Файл: zametki.php
Строк: 52
<?php
include_once("files/zag.php");
include_once("files/ini.php");
$polz=mysql_query("SELECT * FROM `users` WHERE `udata0`='$log' AND `udata1`='$pas' LIMIT 1");
if(mysql_num_rows($polz)==0){
header ("Location: index.php?error");
echo'<div class="p">Ошибка! Пользователь с таким логином и паролем не зарегистрирован, или пароль/логин неверен! <a href="index.php">На главную</a><br>';exit;
}else{
$self = $_SERVER['SCRIPT_NAME'];
$ref=rand(100,100000);
$startan = $_GET['startan'];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=5;
$arr = mysql_query("SELECT * from `zametki` WHERE `zam3`='$log'");
$qi = mysql_query("SELECT * from `zametki` WHERE `zam3`='$log' ORDER by `id` DESC LIMIT $startan,$num_msgs_an;;;");
if (mysql_affected_rows()==0)
{
echo "Заметок ещё нет!";
include_once"files/down.php";
exit();
}
else
{
while($row=mysql_fetch_array($qi))
{
echo ''.$row['zam1'].' - '.$row['zam0'].' ('.$row['zam2'].')<br/>'; if($udata49==7){echo"<a href="chat.php?&go=del&dbid=".$row['dbid']."">[х]</a><br/>";};
}
}
$i = mysql_num_rows($arr);
if($startan!=0)
echo '<a href="?&startan='.($startan-$num_msgs_an).'">«</a> | ';
if($i>$startan+$num_msgs_an)
echo '<a href="?&startan='.($startan+$num_msgs_an).'">»</a>';
include_once"files/online.php";
include_once("files/regeneration.php");
}
include_once"files/down.php";
echo "</p></body></html>";
?>