Файл: l2ps_v5/files/xtotut1.php
Строк: 199
<?php
include_once("files/ini.php");
$self = $_SERVER['SCRIPT_NAME'];
$time=time();
mysql_query("UPDATE `users` SET `udata55`='$self' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata56`='$time' WHERE `udata0`='$log'");
echo"<hr>";
$pr_q = mysql_query("SELECT * from `users` where `udata56`>('".time()."'-'5000') and `udata55`='$self' and `udata20`='$udata20' and `udata37`='$udata37' ");
while($arr = mysql_fetch_array($pr_q)){
$aglava=mysql_query("SELECT * FROM `clan` WHERE `clan0`='$arr[udata23]' ");
$arrs= mysql_fetch_array($aglava);
$ggg=$arrs['clan2'];
if($arr['udata67']=="200" or $arr['udata67']=="777"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="lime"><b><up>$arr[udata0].GM</b></up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}}
else{
if($arr['udata86']>="1"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<i><font color="red"><up>$arr[udata0]</up></font></i></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}}else
if($arr['udata67']=="100" or $arr['udata67']=="501" or $arr['udata67']=="500"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="blue"><b><up>$arr[udata0]</b></up></font></a>[M]
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}}else
if($arr[udata75]=="vip"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="gold"><b><up>$arr[udata0]</b></up></font></a>[ViP]
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}}else
if($arr[udata25]!==""){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="$arr[udata25]"><up>$arr[udata0]</up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else
if($arr[udata9]=="80"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="#008B8B"><up>$arr[udata0]</up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else
if($arr[udata9]=="81"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="#00CDCD"><up>$arr[udata0]</up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else
if($arr[udata9]=="82"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="#00EEEE"><up>$arr[udata0]</up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else
if($arr[udata9]=="83"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="#00CDCD"><up>$arr[udata0]</up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else
if($arr[udata9]=="84"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="#00FFFF"><up><b>$arr[udata0]</b></up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else
if($arr[udata9]=="85"){
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">
<font color="#FF4500"><up><b>$arr[udata0]</b></up></font></a>
</small> ";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}else{
$sss=$arr['udata23'];
if($sss!==""){
if(!empty($ggg)){
echo"<img src="pic/clan/$ggg" alt="clan"/>";}}
echo " <a href="search.php?&nick=$arr[udata0]&go=go">$arr[udata0]</a></small>";
if($arr['udata48']!=="dead" and $arr[udata0]!=="$log"){
$elita=mysql_query("SELECT * FROM `clanwar` WHERE `war`='$udata23' and `war1`='$arr[udata23]' or `war1`='$udata23' and `war`='$arr[udata23]' ");
if(mysql_num_rows($elita)==1){
echo"<a href="okrestnosti.php?war&&nick=$arr[udata0]">[O]</a></small> ";}else{
echo"<a href="okrestnosti.php?pk&&nick=$arr[udata0]">[x]</a></small>";}
}
}
}
}
echo"<hr><center>";
if($udata21=="1" and $udata55!=="/chat.php"){
$self = $_SERVER['SCRIPT_NAME'];
// Переменная хранит число сообщений выводимых на станице
$num = 5;
// Извлекаем из URL текущую страницу
$page = $_GET['page'];
// Определяем общее число сообщений в базе данных
$result = mysql_query("SELECT COUNT(*) FROM gb ORDER by `dbid`DESC");
$posts = mysql_result($result, 0);
// Находим общее число страниц
$total = intval(($posts - 1) / $num) + 1;
// Определяем начало сообщений для текущей страницы
$page = intval($page);
// Если значение $page меньше единицы или отрицательно
// переходим на первую страницу
// А если слишком большое, то переходим на последнюю
if(empty($page) or $page < 0) $page = 1;
if($page > $total) $page = $total;
// Вычисляем начиная к какого номера
// следует выводить сообщения
$start = $page * $num - $num;
// Выбираем $num сообщений начиная с номера $start
$arr = mysql_query("SELECT * from `gb`");
$qi = mysql_query("SELECT * from `gb` ORDER by `dbid` DESC LIMIT $start, $num");
if (mysql_affected_rows()==0)
{
echo "Сообщений ещё нет!";
}
else
{
while($row=mysql_fetch_array($qi))
{
$row['text'] = replase_smile($row['text']);
$row['text']=($row['text']);
$d = time()-$row['date'];
echo '<br><a href="search.php?&nick='.$row['login'].'&go=go">'.$row['login'].'</a> ('.sec2day($d).' назад)<br>'.$row['text'].' , <a href="chat.php?&nick='.$row['login'].'&go=go">ответить</a> '; if($udata67==200 or $udata67==100 ){echo"<a href="chat.php?&go=del&dbid=".$row['dbid']."">[х]</a>";};
}
}
echo "</table>";
echo "<form method="post" action="chat.php?&go=add"><br>";
echo "<input name="text" maxlength="200" title="ttext"/><br/>";
echo '<input type="submit" value="Написать" /></form>';
// Проверяем нужны ли стрелки назад
if ($page != 1) $pervpage = '<br><a href=chat.php?page=1>1</a> ... ';
// Проверяем нужны ли стрелки вперед
if ($page != $total) $nextpage = ' ... <a href=chat.php?page=' .$total. '>' .$total. '</a>';
// Находим две ближайшие станицы с обоих краев, если они есть
if($page - 2 > 0) $page2left = ' <a href=chat.php?page='. ($page - 2) .'>'. ($page - 2) .'</a> ';
if($page - 1 > 0) $page1left = '<a href=chat.php?page='. ($page - 1) .'>'. ($page - 1) .'</a> ';
if($page + 2 <= $total) $page2right = ' <a href=chat.php?page='. ($page + 2) .'>'. ($page + 2) .'</a>';
if($page + 1 <= $total) $page1right = ' <a href=chat.php?page='. ($page + 1) .'>'. ($page + 1) .'</a>';
// Вывод меню
echo "<br>Страницы:";
echo $pervpage.$page2left.$page1left.'<b>'.$page.'</b>'.$page1right.$page2right.$nextpage;
echo"</center><br>";
}
?>