Файл: search.php
Строк: 50
<?php
include ("functions.php");
$add = "add";
if($_GET['mode']==$add)
{
include ("conf.php");
include ("lock.php");
if ($user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
bann($user);
include ("head.php");
sms($user,$pass);
echo "<div class='nav'>";
echo <<<sss
<form name="form" action="search.php?mode=s&user=$user&pass=$pass" method="POST">
sss;
echo "Ник: <br /><input name='nicks' type='text' value=''><br />";
echo "<input type='submit' value='Искать'></form>";
echo "</div>";
echo '<a href="users.php?pol=m&user='.$user.'&pass='.$pass.'">Поиск парней</a>
<a href="users.php?pol=w&user='.$user.'&pass='.$pass.'">Поиск девушек</a>';
echo "<a href=menu.php?user=$user&pass=$pass>В меню</a>";
include ("foot.php");
exit();
}
else
{
include ("head.php");
echo "<div class='nav'>";
echo "Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo "</div>";
echo <<<sss
<a href="index.php">На главную</a>
sss;
include ("foot.php");
}
}
$s = "s";
if($_GET['mode']==$s)
{
include ("conf.php");
include ("lock.php");
if ($user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
bann($user);
$nicks = mysql_real_escape_string(trim($_POST['nicks']));
$result=mysql_query("SELECT * FROM userlist WHERE user='$nicks'");
if (mysql_num_rows($result) > 0)
{
$myrow2 = mysql_fetch_array($result);
include ("head.php");
do {
echo "<html><head>
<meta http-equiv='Refresh' content='0; URL=info.php?user=$user&pass=$pass&id=".$myrow2['id']."'>
</head></html>";
}
while ($myrow2 = mysql_fetch_array ($result));
exit();
}
else
{
unset($nicks);
include ("head.php");
echo "<div class='nav'>";
echo "Юзер не найден!<br />";
echo "</div>";
echo "<a href=search.php?mode=add&user=$user&pass=$pass>Назад</a><";
echo "<a href=menu.php?user=$user&pass=$pass>В меню</a>";
include ("foot.php");
exit();
}
echo "<a href=menu.php?user=$user&pass=$pass>В меню</a>";
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");
}
}
?>