Thread: Template Engine
View Single Post
Old 03-17-2009, 08:39 AM   #10 (permalink)
triumvirat
The Wanderer
 
triumvirat's Avatar
 
Join Date: Dec 2008
Location: Russia, Moscow
Posts: 14
Thanks: 0
triumvirat is on a distinguished road
Default

Use strict PHP as template engine:

PHP Code:
                <? foreach($user_data as $row):?>
                <tr class="center color_hover">
                    <td><?=$row["id"]?></td>
                    <td><a href="?id=<?=$row["id"]?>"><?=$row["user_name"]?></a></td>
                    
                    <td><a href="/admin/user/?id_country=<?=$row['user_country']?>"><?=$row['country_name']?></a>, <a href="/admin/user/?id_region=<?=$row['user_region']?>"><?=$row['region_name']?></a>, <a href="/admin/user/?id_city=<?=$row['user_city']?>"><?=$row['city_name']?></a></td>
                    
                    <td>
                    <? if($row["user_icq"]): ?>
                        <img src="http://web.icq.com/whitepages/online?icq=<?=$row["user_icq"]?>&amp;img=5" alt="" />
                    <? else: ?>
                        <img src="<?=$http_images_system_icons?>icq_empty.png" alt="" />
                    <? endif; ?>
                    </td>
                    <td>
                    <? if($row["user_url"]): ?>
                        <a onclick="return open_window(this.href)" href="<?=$row["user_url"]?>"><img src="<?=$http_images_system_icons?>homepage_noempty.png" alt="" /></a>
                    <? else: ?>
                        <img src="<?=$http_images_system_icons?>homepage_empty.png" alt="" />
                    <? endif; ?>
                    </td>
...............
Smarty - the PHP writеten in PHP. IMHO.
triumvirat is offline  
Reply With Quote