Просмотр файла users.php

Размер файла: 4.19Kb
<?php
####################
# Автор: [Svig]    #
# ICQ: 563000172   #
####################

$m = "m";
if($_GET['pol']==$m)
{
include ("conf.php");
include ("lock.php");

if ($user == $myrow["user"] && $pass == $myrow["pass"])
{



$num = 10;
@$page = $_GET['page'];
$result00 = mysql_query("SELECT COUNT(*) FROM userlist WHERE pol='Мужской'");
$temp = mysql_fetch_array($result00);
$posts = $temp[0];
$total = (($posts - 1) / $num) + 1;
$total =  intval($total);
$page = intval($page);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $num - $num;


$r = mysql_query ("select id,user,name from userlist where pol='Мужской' order by id desc limit $start, $num",$db);
$r2 = mysql_query ("select id,user,name from userlist where pol='Мужской'");
if (mysql_num_rows($r2) > 0)
{
$myrow2 = mysql_fetch_array($r);
include ("head.php");
do {
echo "<div class='nav'>";
echo "<img src='img/m.gif' alt=''/></a> [<b><a href='info.php?user=$user&pass=$pass&id=".$myrow2['id']."'>".$myrow2['user']."</a></b>]";
echo " ".$myrow2['name']."<br />";
echo "</div>";
}
while ($myrow2 = mysql_fetch_array($r));


echo "<div class='nav'>";
if ($page != 1) echo "<a href=users.php?pol=m&user=$user&pass=$pass&page=".($page - 1).">Назад</a>";
if ($page != $total) echo " <a href=users.php?pol=m&user=$user&pass=$pass&page=".($page + 1).">Далее</a>";
echo "</div>";


}
else
{
include ("head.php");
echo "<div class='nav'>";
echo "Cписок парней пуст!<br />";
echo "</div>";
echo "<div class='nav'>";
echo "• <a href=menu.php?user=$user&pass=$pass>В меню</a>";
echo "</div>";
include ("foot.php");
exit();
}





echo "<div class='nav'>";
echo "• <a href=menu.php?user=$user&pass=$pass>В меню</a>";
echo "</div>";
include ("foot.php");
exit();
}
else
{
include ("head.php");
echo "<div class='nav'>";
echo "Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo "</div>";
echo <<<sss
<div class='nav'>
<a href="index.php">На главную</a>
</div>
sss;
include ("foot.php");
}
}



$w = "w";
if($_GET['pol']==$w)
{
include ("conf.php");
include ("lock.php");

if ($user == $myrow["user"] && $pass == $myrow["pass"])
{


$num = 10;
@$page = $_GET['page'];
$result00 = mysql_query("SELECT COUNT(*) FROM userlist WHERE pol='Женский'");
$temp = mysql_fetch_array($result00);
$posts = $temp[0];
$total = (($posts - 1) / $num) + 1;
$total =  intval($total);
$page = intval($page);
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
$start = $page * $num - $num;


$r = mysql_query ("select id,user,name from userlist where pol='Женский' order by id desc limit $start, $num",$db);
$r2 = mysql_query ("select id,user,name from userlist where pol='Женский'");
if (mysql_num_rows($r2) > 0)
{
$myrow2 = mysql_fetch_array($r);
include ("head.php");
do {
echo "<div class='nav'>";
echo "<img src='img/w.gif' alt=''/></a> [<b><a href='info.php?user=$user&pass=$pass&id=".$myrow2['id']."'>".$myrow2['user']."</a></b>]";
echo " ".$myrow2['name']."<br />";
echo "</div>";
}
while ($myrow2 = mysql_fetch_array($r));


echo "<div class='nav'>";
if ($page != 1) echo "<a href=users.php?pol=w&user=$user&pass=$pass&page=".($page - 1).">Назад</a>";
if ($page != $total) echo " <a href=users.php?pol=w&user=$user&pass=$pass&page=".($page + 1).">Далее</a>";
echo "</div>";

}
else
{
include ("head.php");
echo "<div class='nav'>";
echo "Cписок девушек пуст!<br />";
echo "</div>";
echo "<div class='nav'>";
echo "• <a href=menu.php?user=$user&pass=$pass>В меню</a>";
echo "</div>";
include ("foot.php");
exit();
}




echo "<div class='nav'>";
echo "• <a href=menu.php?user=$user&pass=$pass>В меню</a>";
echo "</div>";
include ("foot.php");
exit();
}
else
{
include ("head.php");
echo "<div class='nav'>";
echo "Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo "</div>";
echo <<<sss
<div class='nav'>
<a href="index.php">На главную</a>
</div>
sss;
include ("foot.php");
}
}


?>