Файл: region_clean/search_city.php
Строк: 189
<?php
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "start.php";
require_once "sid.php";
header("Cache-Control: no-cache");
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "version.php";
if (!isset($go)) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="search" title="Поиск">n
<p align="center">n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">n";
echo "<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>";
echo '<title>Поиск</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">';
}
echo '<div class = "c4">Поиск юзеров по городу</div><br/>';
if ($ver != "wml") echo "<form method="POST" action="search_city.php?go=view&$ses&ref=$ref" name="auth">n";
echo $fsize1;
echo 'Город:<br/>';
echo $fsize2;
echo "<input name="nick" title="nick"/><br/>n";
echo $fsize1;
echo 'Транслит: <input type = "checkbox" name = "trun" value = "1"/><br/>';
if ($ver == "wml") {
echo $fsize1;
echo "<anchor title="go">Найти<go href="search_city.php?go=view&$ses&ref=$ref" method="post">
<postfield name="nick" value="$(nick)"/>
<postfield name="trun" value="$(trun)"/>
</go></anchor>";
echo $fsize2;
echo '<br/>';
} else {
echo '<br/><input type="submit" class="ibutton" value="Найти" name="enter"><br/>';
}
echo $fsize1;
echo "<br/><div class = 'd1'><a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize2;
include_once "foot.php";
exit;
}
if (@$go == "view") {
if ($_POST['trun'] == 1) $nick = trun_to_rus($nick);
$nick = mysql_real_escape_string(check($nick, ENT_QUOTES));
if ($nick != '') $nick = mysql_real_escape_string(check($nick, ENT_QUOTES));
if ($nick == '') $nick = 0;
$select = mysql_query ("Select * from users where city LIKE '%" .$nick. "%'");
if (mysql_affected_rows() == 0) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>
<card id="error" title="Ошибка" ontimer="search_city.php?$ses&ref=$ref"><timer value="15"/>
<p align="center">";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Ошибка</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo 'Юзеров из города ' . $nick . ' не найдено!<br/>';
echo $fsize2;
include_once "foot.php";
exit;
}
ob_start();
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="results" title="Поиск">n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Поиск</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
while(false != ($inf = mysql_fetch_assoc($select))) {
$usid = $inf['id'];
$nick = $inf['user'];
$sex = $inf['sex'];
$us_ip = $inf['user_ip'];
$us_soft = $inf['user_soft'];
$level = $inf['level'];
$ign = $inf['ignor'];
$version = $inf['version'];
$onl = $inf['nl'];
$vron = $inf['vron'];
///////////////////
if ($vron == 0) {
if ($onl + 100 > time())
{
$onst = ' <img src="icon/onn.gif" alt="."/><br/>';
} else {
$onst = ' <img src="icon/off.gif" alt="."/><br/>';
}
}
elseif ($vron == 1)
{
$onst = ' <img src="icon/inv.gif" alt="."/><br/>';
}
if ($sex == "М") { echo "Пользователь <b>" . $nick . "</b> (М) " . $onst . "<br/>n";
} else { echo "Пользователь <b>" . $nick . "</b> (Ж) " . $onst . "<br/>n";
}
echo "
<b>Город:</b> " . $inf['city'] . "<br />
[<a href="info.php?$ses&nk=$usid&ref=$ref">Анкета пользователя</a>]
[<a href="ignor.php?mod=add&$ses&nk=$usid&ref=$ref">Добавить в игнор</a>]";
if ($inf['razr'] == 0) {
echo "[<a href="friends.php?mod=addz&$ses&nick=$usid&ref=$ref">Добавить в контакты</a>]<br/>";
}
if (($rm != 9) or ($rm != 11) or $row['level'] == 7) {
if ($row['evel'] > 3) echo "[<a href="kick.php?$ses&nk=$usid&ref=$ref">Пнуть</a>]";
if ($row['level'] > 5) echo "[<a href="bannaip.php?$ses&nk=$usid&ref=$ref">Банн ip+soft!!!</a>]<br />";
if ($row['level'] > 6) {
echo "
[<a href="apanel.php?$ses&nk=$usid&go=fullignmake&ref=$ref">Полный игнор!</a>]
[<a href="bann.php?$ses&nk=$usid&ref=$ref">Забанить ник</a>]
[<a href="deluser.php?$ses&nk=$usid&ref=$ref">Удалить ник</a>]
[<b><a href="apanel.php?go=view&$ses&nick=$usid&ref=$ref">Апдейт юзера</a></b>]<br />";
}
}
if ($row['level'] > 5) {
if (($inf['level'] < 7) or ($row['level'] > 6)) {
echo '<b>IP:</b> '.$us_ip.'<br/>
<b>Soft:</b> '.htmlspecialchars($us_soft).'<br/>';
if ($version == 1) echo "<b>Версия чата:</b> WAP 1.2<br/>n";
else echo "<b>Версия чата:</b> WAP 2.0<br/>n";
}
}
echo $divide;
}
echo "---<br/><a href="search_city.php?$ses&ref=$ref">Искать еще</a><br/>n
<div class = 'd1'><a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize2;
include_once "foot.php";
ob_end_flush();
}
?>