หน้าจอแสดงผล php
โค้ด: เลือกทั้งหมด
$start = request_var('start', 0);
$limit = 10;
$sql_array = array(
'SELECT' => '*',
'FROM' => array(
'tools_plant_type' => 't',
),
'ORDER_BY' => 'id DESC',
'');
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, $limit, $start);
$row = $db->sql_fetchrow($result);
print_r( $row);
while ($row = $db->sql_fetchrow($result)) {
$template->assign_block_vars('loop', array(
'VAR1' => $row['ip_plant_type'],
'VAR2' => $row['plant_type'],
'VAR3' => number_format($row['plant_spacing'], 2),
'VAR4' => date('Y-m-d H:i:s', $row['plant_create_date']),
'VAR5' => checkip($row['plant_user_ip']),
));
}
โค้ด: เลือกทั้งหมด
<!-- BEGIN loop -->
<tr class="bg1">
<td> <span class=""></span>
<font size="1"><a href="./planting_tool.php?action=show&&id={loop.VAR1}">{loop.VAR1} </a>
</font>
</td>
<td> <span class=""></span>
<font size="1"><a href="./planting_tool.php?action=show&&id={loop.VAR1}">{loop.VAR2} </a>
</font>
</td>
<td>
<font size="1"><a href="./planting_tool.php?action=show&&id={loop.VAR1}">{loop.VAR3}</a>
</font>
</td>
<td>
<font size="1"><dfn style="display: none;"> </dfn><a
href="./planting_tool.php?action=show&&id={loop.VAR1}">{loop..VAR4}</a> </font>
</td>
<td>
<font size="1"><dfn style="display: none;"> </dfn><a
href="./planting_tool.php?action=show&&id={loop.VAR1}">{loop.VAR5} </a></font>
</td>
<td width="75" align="">
<font size="1"><a href="./planting_tool.php?action=show_admin&&id={loop.VAR1}">{L_DESCRIPSION_AREA}</a> </font>
</td>
</tr>
<!-- END loop -->