Размер файла: 1.72Kb
<?php
require_once "../system/connect.php";
require_once "../system/config.php";
require_once "../system/functions.php";
require_once "../system/dannuser.php";
require_once "../system/start.php";
echo '<a href="add.php">добавить сообщение</a> | <a href="bbcode.php">bbcode</a><br>';
if(empty($_GET['start'])) { $start=0; } else { $start=$_GET['start']; }
$skolko_guest=mysql_query("SELECT COUNT(*) FROM `guest`");
$count_guest=mysql_result($skolko_guest,0);
$select_guest=mysql_query("SELECT * FROM `guest` ORDER BY `id` DESC LIMIT $start,$num;");
echo '<div class="cont">';
while($arr_guest=mysql_fetch_array($select_guest)) {
echo '<div class="menu2">';
echo '<img src="../osa.gif" alt="" /></div>';
echo '<div class="menu1">';
echo '<a href="../pages/anketa.php?id='.$arr_guest['login'].'">'.$arr_guest['login'].'</a>
<b> '.$arr_guest['text1'].'</b>
'.$arr_guest['time'].'<br>';
$anketa=mysql_query("SELECT * FROM `users` WHERE `login`='".$arr_guest['login']."' LIMIT 1;");
$ank=mysql_fetch_array($anketa);
if($ank['dostup']==1) { echo "Должность: <font color=red>Админ</font></div>"; }
else { echo "Должность: <font color=red>Не имеет</font></div>"; }
echo ''.$arr_guest['msg'].'<br>
'.$arr_guest['agent'].','.$arr_guest['ip'].'<br>';
if($arr_guest['otvet']!='') { echo "<font color=red>Ответ админа: ".$arr_guest['otvet']."</font><br>"; }
echo "<br>"; }
if($start!=0) { echo '<a href="index.php?start='.($start-$num).'">назад</a>'; } else { echo 'назад'; }
echo ' | ';
if($count_guest>$start+$num) { echo '<a href="index.php?start='.($start+$num).'">далее</a>'; } else { echo 'далее'; }
echo '</div>';
require_once "../foot.php";
?>