Размер файла: 1.21Kb
<?
include ('.../inc/avtoriz.php') ;
include ('.../inc/config.php');
include ('.../inc/connect.php');
?>
<head>
<script src="d.js" type="text/javascript"></script>
</head>
<div class="pageContent">
<div id="main"> <div class="container"><div class="left">
<b><font color = "green ">Управление комментами</font></b><br>
<?
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `comments` "),0);
if ($count > 0) {
$com = mysql_query("SELECT * FROM `comments` ORDER BY `date` ",$db);
while ($comment = mysql_fetch_array($com)) {
echo '<div class="examplecom"> '.$comment ['author'].' написал '.$comment ['date'].'
<br>
'.$comment ['text'].'</div>
<a href = "dell_comm.php?id= '.$comment['id'].'" > <strong>Удалить</strong></a><hr>
';
}
}
else {
echo'<p class="examplecom">Нет записей</p>';
}
////////////////////////////////////////
if ($_GET['chistka']==2 and !empty($_GET['chistka']) ) {
$chist1=mysql_query("TRUNCATE TABLE `comments`",$db);
}
?>
<hr>
<b> <font color ="red"> <a href="?chistka=2" onclick="return log_yn('очистить всё')" >очистить всё</a></font> </b>
<br><b> <a href = "index.php">к меню </a></b><br>
</div> </div> </div> </div>