Файл: pages/admin/_story_donations.php
Строк: 40
<div class="block1
"><div class="h-title1
">История пожертвований</div></div>
<div class="block2"><br>
<?PHP
$tdadd = time() - 60*60*12;
if(isset($_POST["clean"])){
$db->Query("DELETE FROM db_donations WHERE date_add < '$tdadd'");
echo "<center><font color = 'green'><b>Очищено</b></font></center><BR />";
}
$db->Query("SELECT * FROM db_donations 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="75" 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="100"><?=$data["sum"]; ?></td>
<td align="center" width="150"><?=date("d.m.Y в H:i:s",$data["date_add"]); ?></td>
</tr>
<?PHP
}
?>
</table>
<BR />
<form action="" method="post">
<center><input type="submit" name="clean" value="Очистить" style="height:30px;" class="btn_8"/></center>
</form>
<?PHP
}else echo "<center><b>Записей нет</b></center><BR />";
?>
</div>
<div class="block3"></div>
<div class="clr"></div>
<div class="clr"></div>