Файл: pages/admin/_story_sell2.php
Строк: 40
<div class="s-bk-lf">
<div class="acc-title">История продаж воды</div>
</div>
<div class="silver-bk"><div class="clr"></div>
<?PHP
$tdadd2 = time() - 5*60;
if(isset($_POST["clean2"])){
$db->Query("DELETE FROM db_sell_items2 WHERE date_add2 < '$tdadd2'");
echo "<center><font color = 'blue'><b>Очищено</b></font></center><BR />";
}
$db->Query("SELECT * FROM db_sell_items2 ORDER BY id DESC");
if($db->NumRows() > 0){
?>
<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='center' width="99%">
<tr bgcolor="#efefef">
<td align="center" width="50" class="m-tb">ID</td>
<td align="center" class="m-tb">Пользователь</td>
<td align="center" width="80" class="m-tb">Продал</td>
<td align="center" width="80" class="m-tb">Получил</td>
<td align="center" width="150" class="m-tb">Дата операции</td>
</tr>
<?PHP
while($data = $db->FetchArray()){
?>
<tr class="htt">
<td align="center" width="50"><?=$data["id"]; ?></td>
<td align="center"><?=$data["user"]; ?></td>
<td align="center" width="80"><?=$data["all_sell2"]; ?></td>
<td align="center" width="80"><?=sprintf("%.2f",$data["amount2"]); ?></td>
<td align="center" width="150"><?=date("d.m.Y в H:i:s",$data["date_add2"]); ?></td>
</tr>
<?PHP
}
?>
</table>
<BR />
<form action="" method="post">
<center><input type="submit" name="clean2" value="Очистить" /></center>
</form>
<?PHP
}else echo "<center><b>Записей нет</b></center><BR />";
?>
</div>
<div class="clr"></div>