Файл: sellruk.php
Строк: 41
<?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{
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=15;
$arr = mysql_query("SELECT * from `item` WHERE `uda7`='".$log."' AND NOT `uda2`='vesh2' AND NOT `uda2`='Medal' ");
$qi = mysql_query("SELECT * from `item` WHERE `uda7`='".$log."' AND NOT `uda2`='vesh2' AND NOT `uda2`='Medal' ORDER by `id` DESC LIMIT $startan,$num_msgs_an;;;");
if (mysql_affected_rows()==0)
{
echo "Вещей нет!";
}
else
{
while($row=mysql_fetch_array($qi))
{
if($row[uda2]=="vesh"){
echo"<b><small><a href="sellrukvesh.php?&name=$row[uda4]&id=$row[id]">$row[uda4]</a></small></b> <small>- ($row[uda3] штук)</small><br/>";}
elseif($row[uda2]=="vesh2"){
echo"<b><small><a href="sellrukvesh.php?&name=$row[uda4]&id=$row[id]">$row[uda4]</a></small></b> <small>- ($row[uda3]] штук) </small><br/>";}
else{
echo"<b><small><a href="sellrukshmot.php?&name=$row[uda4]&id=$row[id]">$row[uda4]</a></small></b><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/down.php";
?>