Файл: l2ps_v5/forum.php
Строк: 282
<?php
include ("files/ini.php");
include ("files/zag.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{
switch($_GET[mod]){
default:
if($game=="newforum"){
$g=mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='$id' LIMIT 1");
if(mysql_num_rows($g)==1){
if($udata9<"20"){echo "Форум доступен с 20-го уровня.";
include ("files/down.php");
exit;
}
echo'<form method="post" action="forum.php?game=newforums&id='.$id.'&uid='.$uid.'">';
echo "Название темы:<br/>";
echo "<input class="button" name="nazva" maxlength="30" title="Название темы" emptyok="true"/>";
echo "<br/>Текст сообщения:<br/>";
echo "<input class="button" name="msg" maxlength="500" title="Сообщение" emptyok="true"/><br/>";
echo '<input type="checkbox" name="transi" value="ok"> Транслировать название темы?<br/>';
echo '<input type="checkbox" name="transik" value="ok"> Транслировать название сообщение?<br/>';
echo '<input class="button" type="submit" value="Ок"/></form>';
}else{echo "Такой раздел не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="newforums"){
$g=mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='$id' LIMIT 1");
if(mysql_num_rows($g)==1){
if(empty($nazva)){
header ("Location: forum.php?game=theme&id=$id");
include ("files/down.php");
exit;
}
if(empty($msg)){
header ("Location: forum.php?game=theme&id=$id");
include ("files/down.php");
exit;
}
if($transi=="ok"){
require_once "files/translit.php";
if(ereg("[а-яА-Я]",$nazva)){}else{
$nazva=str_replace($trans1,$trans2,$nazva);}
}
if($transik=="ok"){
require_once "files/translit.php";
if(ereg("[а-яА-Я]",$msg)){}else{
$msg=str_replace($trans1,$trans2,$msg);}
}
/*if($udata67 == "777" or $udata67 == "200"){
$time = date("H:i d.m.y");
$new = "INSERT INTO l2pirates_themes VALUES('$id','','$nazva','$log','$time','1','1','1','$log')";
$result = mysql_query($new);
$u=mysql_query("SELECT * FROM `l2pirates_themes` ORDER by `uid` DESC");
$dat=mysql_fetch_array($u);
$uids=$dat[uid];
$mg = "INSERT INTO l2pirates_forummsgs VALUES('$id','$uids','0','$log','$time','<font color=lime>$msg</font>')";
$result = mysql_query($mg);
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg=$po[forumthemes]+1;
$msg2=$po[forummsg]+1;
mysql_query("UPDATE `l2pirates_forums` SET `forumthemes`='$msg',`forummsg`='$msg2' WHERE `id`='$id'");
mysql_query("UPDATE `l2pirates_forumosts` SET `nick`='$log'");}else{
if($udata67 == "501" or $udata67 == "500" or $udata67 == "100"){
$time = date("H:i d.m.y");
$new = "INSERT INTO l2pirates_themes VALUES('$id','','$nazva','$log','$time','1','1','1','$log')";
$result = mysql_query($new);
$u=mysql_query("SELECT * FROM `l2pirates_themes` ORDER by `uid` DESC");
$dat=mysql_fetch_array($u);
$uids=$dat[uid];
$mg = "INSERT INTO l2pirates_forummsgs VALUES('$id','$uids','0','$log','$time','<font color=blue>$msg</font>')";
$result = mysql_query($mg);
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg=$po[forumthemes]+1;
$msg2=$po[forummsg]+1;
mysql_query("UPDATE `l2pirates_forums` SET `forumthemes`='$msg',`forummsg`='$msg2' WHERE `id`='$id'");
mysql_query("UPDATE `l2pirates_forumosts` SET `nick`='<font color=blue>$log</font>'");}else{*/
$time = date("H:i d.m.y");
$new = "INSERT INTO l2pirates_themes VALUES('$id','','$nazva','$log','$time','1','1','1','$log')";
$result = mysql_query($new);
$u=mysql_query("SELECT * FROM `l2pirates_themes` ORDER by `uid` DESC");
$dat=mysql_fetch_array($u);
$uids=$dat[uid];
$mg = "INSERT INTO l2pirates_forummsgs VALUES('$id','$uids','0','$log','$time','$msg')";
$result = mysql_query($mg);
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg=$po[forumthemes]+1;
$msg2=$po[forummsg]+1;
mysql_query("UPDATE `l2pirates_forums` SET `forumthemes`='$msg',`forummsg`='$msg2' WHERE `id`='$id'");
mysql_query("UPDATE `l2pirates_forumosts` SET `nick`='$log'");//}}
header ("Location: forum.php?game=tem&id=$id&uid=$uids");
}else{echo "Такой раздел не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="saves"){
$g=mysql_query("SELECT * FROM `l2pirates_themes` WHERE `id`='$id' AND `uid`='$uid' LIMIT 1");
if(mysql_num_rows($g)==1){
if(empty($msg)){
header ("Location: forum.php?game=say&id=$id&uid=$uid");
include ("files/down.php");
exit;
}
if($transi=="ok"){
require_once "files/translit.php";
if(ereg("[а-яА-Я]",$msg)){}else{
$msg=str_replace($trans1,$trans2,$msg);}
}
/*if($udata67 == "777" or $udata67 == "200"){
$time = date("H:i d.m.y");
$q = mysql_query("SELECT COUNT(`aid`) FROM `l2pirates_forummsgs` WHERE `uid`='$uid'");
$aid = mysql_result($q, 0);
$otvet = "INSERT INTO l2pirates_forummsgs VALUES('$id','$uid','$aid','$log','$time','<font color=lime>$msg</font>')";
$result = mysql_query($otvet);
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg2=$po[forummsg]+1;
mysql_query("UPDATE `l2pirates_forums` SET `forummsg`='$msg2' WHERE `id`='$id'");
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$po = mysql_fetch_array($result666);
$msg2=$po[msg]+1;
mysql_query("UPDATE `l2pirates_themes` SET `msg`='$msg2',`posl`='$log' WHERE `uid`='$uid'");
mysql_query("UPDATE `l2pirates_forumosts` SET `nick`='$log'");}else{
if($udata67 == "501" or $udata67 == "500" or $udata67 == "100"){
$time = date("H:i d.m.y");
$q = mysql_query("SELECT COUNT(`aid`) FROM `l2pirates_forummsgs` WHERE `uid`='$uid'");
$aid = mysql_result($q, 0);
$otvet = "INSERT INTO l2pirates_forummsgs VALUES('$id','$uid','$aid','$log','$time','<font color=blue>$msg</font>')";
$result = mysql_query($otvet);
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg2=$po[forummsg]+1;
mysql_query("UPDATE `l2pirates_forums` SET `forummsg`='$msg2' WHERE `id`='$id'");
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$po = mysql_fetch_array($result666);
$msg2=$po[msg]+1;
mysql_query("UPDATE `l2pirates_themes` SET `msg`='$msg2',`posl`='$log' WHERE `uid`='$uid'");
mysql_query("UPDATE `l2pirates_forumosts` SET `nick`='$log'");}else{*/
$time = date("H:i d.m.y");
$q = mysql_query("SELECT COUNT(`aid`) FROM `l2pirates_forummsgs` WHERE `uid`='$uid'");
$aid = mysql_result($q, 0);
$otvet = "INSERT INTO l2pirates_forummsgs VALUES('$id','$uid','$aid','$log','$time','$msg')";
$result = mysql_query($otvet);
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg2=$po[forummsg]+1;
mysql_query("UPDATE `l2pirates_forums` SET `forummsg`='$msg2' WHERE `id`='$id'");
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$po = mysql_fetch_array($result666);
$msg2=$po[msg]+1;
mysql_query("UPDATE `l2pirates_themes` SET `msg`='$msg2',`posl`='$log' WHERE `uid`='$uid'");
mysql_query("UPDATE `l2pirates_forumosts` SET `nick`='$log'");//}}
header ("Location: forum.php?game=tem&id=$id&uid=$uid");
}else{echo "Такая тема не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="say"){
$g=mysql_query("SELECT * FROM `l2pirates_themes` WHERE `id`='$id' AND `uid`='$uid' LIMIT 1");
if(mysql_num_rows($g)==1){
if($udata9<"20"){echo "Форум доступен с 20-го уровня.";
include ("files/down.php");
exit;
}
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$onoff = mysql_fetch_array($result666);
if($onoff[onoff]=="0"){
echo "Этот топик закрыт!";
include ("files/down.php");
exit;
}
echo'<form method="post" action="forum.php?game=saves&id='.$id.'&uid='.$uid.'">';
echo "Текст сообщения:<br/>";
echo "<input class="button" name="msg" maxlength="500" title="Сообщение" emptyok="true"/><br/>";
echo '<input type="checkbox" name="transi" value="ok"> Транслит?<br/>';
echo '<input class="button" type="submit" value="Написать"/></form>';
}else{echo "Такая тема не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="tem"){
$req = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='$uid' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mags = mysql_fetch_array($req))
{
$ws=explode("*",$mags[name]);
$req = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='$id' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
$w=explode("*",$mag[forumname]);
echo"<b>$mag[forumname]</b><div class='bts'></div>";
echo "<img src="l2pic/logo/forumtext.gif"> <a href="forum.php">Форум</a> / <a href="forum.php?game=theme&id=$id">$mag[forumname]</a> / $mags[name]<hr>";
}}
}}
$g=mysql_query("SELECT * FROM `l2pirates_themes` WHERE `id`='$id' AND `uid`='$uid' LIMIT 1");
if(mysql_num_rows($g)==1){
$q = mysql_query("SELECT COUNT(`oid`) FROM `l2pirates_forummsgs` WHERE `oid`='$id' AND `uid`='$uid'");
$kmsg = mysql_result($q, 0);
echo "<img src="l2pic/logo/forumtext.gif"> В теме сообщений (<b>$kmsg</b>)<div class='bts'></div>";
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=5;
$qi = mysql_query("SELECT * FROM `l2pirates_forummsgs` WHERE `oid`='$id' AND `uid`='$uid' ORDER by `aid` ASC LIMIT $startan,$num_msgs_an");
while($row=mysql_fetch_array($qi))
{
/*$req = mysql_query("SELECT * FROM `users` WHERE `udata0` = '$row[autor]' LIMIT 1");
$pic = mysql_fetch_array($req);
if($udata67 == "777" or $udata67 == "200"){
echo " <a href="search.php?nick=$row[autor]&go=go"><font color='lime'>$row[autor].GM</font></a>";
}else{
if($udata67 == "501" or $udata67 == "500" or $udata67 == "100"){
echo " <a href="search.php?nick=$row[autor]&go=go"><font color='DeepSkyBlue'>$row[autor]</font></a>";
}else{
if($udata67 == "503" or $udata67 == "504" or $udata67 == "505"){
echo " <a href="search.php?nick=$row[autor]&go=go"><font color='gold'>$row[autor]</font></a>";
}else{*/
echo "$row[aid]) <a href="search.php?nick=$row[autor]&go=go">$row[autor]</a><font color=#999999> ($row[time])</font><hr>";
//}}}
//$koment = strip_tags($row['msg']);
//$koment = smiles($koment);
echo"<font color=#999999>Пишит:</font> $row[msg] </a><br/>";
//echo"<br/>$koment";
echo"<br/><div class='bts'></div>";
}
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$onoff = mysql_fetch_array($result666);
$req = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='$uid' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mags = mysql_fetch_array($req))
{
if($onoff[onoff]=="1"){
if($mags[autor]=="$log"){
echo"<img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=okclose2&id=$id&uid=$uid">Закрыть топик</a><hr>";
}}}}
if($onoff[onoff]=="1"){
echo'<form method="post" action="forum.php?game=saves&id='.$id.'&uid='.$uid.'">';
echo "Текст сообщения:<br/>";
echo "<input class="button" name="msg" maxlength="500" title="Сообщение" emptyok="true"/><br/>";
echo '<input type="checkbox" name="transi" value="ok"> Транслит?<br/>';
echo '<input class="button" type="submit" value="Написать"/></form>';
//echo "<img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=say&id=$id&uid=$uid">Добавить сообщение</a><br/>";
if($udata67 == "777" or $udata67 == "200" or $udata67 == "501" or $udata67 == "500" or $udata67 == "100"){
echo "<hr><img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=okclose&id=$id&uid=$uid">Закрыть топик</a><hr/>";
}
}else{
echo "<font color=red>Вы не можете комментировать этот топик!</font>";
if($udata67 == "777" or $udata67 == "200" or $udata67 == "501" or $udata67 == "500" or $udata67 == "100"){
echo "<hr><img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=okclose&id=$id&uid=$uid">Открыть топик</a><hr/>";
}
}
if($udata67 == "777" or $udata67 == "200" or $udata67 == "501" or $udata67 == "500" or $udata67 == "100"){
echo "<img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=deltem&id=$id&uid=$uid">Удалить топик</a><br/>";
}
$q = mysql_query("SELECT COUNT(`uid`) FROM `l2pirates_forummsgs` WHERE `uid`='$uid'");
$kol = mysql_result($q, 0);
echo "<div class='bts'></div>";
if($startan!= 0) $page2left = ' <a href= forum.php?game=tem&startan='. ($startan - 5) .'&page='.($page-1).'&id='.$id.'&uid='.$uid.'>'. ($page - 1) .'</a> | ';
if(empty($page)){$page=1;}
if($kol > $startan + 5) $page2right = ' | <a href= forum.php?game=tem&startan='. ($startan + 5) .'&page='. ($page+1) .'&id='.$id.'&uid='.$uid.'>'. ($page + 1) .'</a>';
echo $page2left.'<b>('.$page.')</b>'.$page1right.$page2right.'<br/>';
}else{echo "Такая тема не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="deltem"){
if($udata67 == "777"){
$result666 = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='".$id."'");
$po = mysql_fetch_array($result666);
$msg2=$po[forumthemes]-1;
$q = mysql_query("SELECT COUNT(`uid`) FROM `l2pirates_forummsgs` WHERE `uid`='".$uid."' AND `oid`='".$id."'");
$kol = mysql_result($q, 0);
$msg=$po[forummsg]-$kol;
mysql_query("UPDATE `l2pirates_forums` SET `forummsg`='$msg',`forumthemes`='$msg2' WHERE `id`='$id'");
mysql_query("DELETE FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
mysql_query("DELETE FROM `l2pirates_forummsgs` WHERE `uid`='".$uid."'");
echo "Тема удалена!";
header ("Location: forum.php?game=theme&id=$id");
}else{echo"Вы не админ!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="okclose2"){
$g=mysql_query("SELECT * FROM `l2pirates_themes` WHERE `id`='$id' AND `uid`='$uid' AND `autor`='$log' LIMIT 1");
if(mysql_num_rows($g)==1){
if($log=="$log"){
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$onoff = mysql_fetch_array($result666);
if($onoff[onoff]=="1"){
mysql_query("UPDATE `l2pirates_themes` SET `onoff`='0' WHERE `uid`='$uid'");
echo "Топик закрыт!";
header ("Location: forum.php?game=tem&id=$id&uid=$uid");
}
}else{echo"Вы не админ!";
header ("Location: forum.php?");
}
}else{echo "Такая тема не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="okclose"){
$g=mysql_query("SELECT * FROM `l2pirates_themes` WHERE `id`='$id' AND `uid`='$uid' LIMIT 1");
if(mysql_num_rows($g)==1){
if($udata67 == "777"){
$result666 = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `uid`='".$uid."'");
$onoff = mysql_fetch_array($result666);
if($onoff[onoff]=="1"){
mysql_query("UPDATE `l2pirates_themes` SET `onoff`='0' WHERE `uid`='$uid'");
echo "Топик закрыт!";
header ("Location: forum.php?game=tem&id=$id&uid=$uid");
}else{
mysql_query("UPDATE `l2pirates_themes` SET `onoff`='1' WHERE `uid`='$uid'");
echo "Топик открыт!";
header ("Location: forum.php?game=tem&id=$id&uid=$uid");
}
}else{echo"Вы не админ!";
header ("Location: forum.php?");
}
}else{echo "Такая тема не существует!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="theme"){
$req = mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='$id' LIMIT 1");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
$w=explode("*",$mag[forumname]);
echo"<b>$mag[forumname]</b><div class='bts'></div>";
echo "<img src="l2pic/logo/forumtext.gif"> <a href="forum.php">Форум</a> / $mag[forumname]<hr>";
}}
//остальные
$g=mysql_query("SELECT * FROM `l2pirates_forums` WHERE `id`='$id' LIMIT 1");
if(mysql_num_rows($g)==1){
$q = mysql_query("SELECT COUNT(`id`) FROM `l2pirates_themes` WHERE `id`='$id'");
$kol = mysql_result($q, 0);
if($kol=="0"){echo "В данном разделе пока нет тем.<br>";}
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=5;
$qi = mysql_query("SELECT * FROM `l2pirates_themes` WHERE `id`='$id' ORDER by `uid` DESC LIMIT $startan,$num_msgs_an");
while($row=mysql_fetch_array($qi))
{
if($row[autor]=="$log"){
echo "";
}
if($row[onoff]=="0"){
echo "<img src='/l2pic/logo/them_01.png' alt='*'/> ";
}
if($row[onoff]=="1"){
//echo "<img src='/l2pic/logo/golosgallery.png' alt='*'/> ";
}
if($row[top]=="2"){
echo "<img src='/l2pic/logo/golosgallery.png' alt='*'/> ";
}
$req = mysql_query("SELECT * FROM `users` WHERE `udata0` = '$row[autor]'");
$pic = mysql_fetch_array($req);
echo " <a href="search.php?nick=$row[autor]&go=go">$row[autor]</a>";
echo" <small><font color=#999999>($row[time])</font></small><br/><img src="l2pic/logo/forumtext.gif">
<a href="forum.php?game=tem&id=$row[id]&uid=$row[uid]">$row[name]</a> (<b>$row[msg]</b>)<br/><img src="l2pic/logo/forumtext.gif"> Последний ответил: ";
$req = mysql_query("SELECT * FROM `users` WHERE `udata0` = '$row[posl]'");
$pic = mysql_fetch_array($req);
echo " <a href="search.php?nick=$row[posl]&go=go">$row[posl]</a>";
echo"<div class='bts'></div>";
}
echo "<img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=newforum&id=$id">Новая тема</a>";
echo"<div class='bts'></div>";
$q = mysql_query("SELECT COUNT(`id`) FROM `l2pirates_themes` WHERE `id`='$id'");
$kol = mysql_result($q, 0);
if($startan!= 0) $page2left = ' <a href= forum.php?game=theme&startan='. ($startan - 5) .'&page='.($page-1).'&id='.$id.'>'. ($page - 1) .'</a> | ';
if(empty($page)){$page=1;}
if($kol > $startan + 5) $page2right = ' | <a href= forum.php?game=theme&startan='. ($startan + 5) .'&page='. ($page+1) .'&id='.$id.'>'. ($page + 1) .'</a>';
echo $page2left.'<b>('.$page.')</b>'.$page1right.$page2right.'<br/>';
include ("files/down.php");
exit;
}}
if($game=="razsave"){
if($udata67 == "777"){
if(empty($forumname)){
header ("Location: forum.php?game=addraz");
include ("files/down.php");
exit;
}
$raz = "INSERT INTO l2pirates_forums VALUES('','$forumname','0','0')";
$result = mysql_query($raz);
echo "Раздел успешно создан!";
header ("Location: forum.php?");
}else{echo"Вы не админ!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
if($game=="addraz"){
if($udata67 == "777"){
echo'<form method="post" action="forum.php?game=razsave">';
echo "Название раздела:<br/>";
echo "<input class="button" name="forumname" maxlength="30" title="Название раздела" emptyok="true"/>";
echo '<input class="button" type="submit" value="Добавить"/></form>';
}else{echo"Вы не админ!";
header ("Location: forum.php?");
}
include ("files/down.php");
exit;
}
//////////////////
$q = mysql_query("SELECT COUNT(`id`) FROM `l2pirates_forums`;");
$kol = mysql_result($q, 0);
if($kol<="0"){echo "Разделы на форуме еще не создали.";
if($udata67 == "777"){
echo "<br/><img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=addraz">Создать раздел</a>";
}
include ("files/down.php");
exit;
}
$qi = mysql_query("SELECT * FROM `l2pirates_forums` ORDER by `id` ASC");
while($row=mysql_fetch_array($qi)){
echo "<img src="l2pic/logo/forumtext.gif"> <a href="forum.php?game=theme&id=$row[id]">$row[forumname]</a> [<b>$row[forumthemes]</b>/<b>$row[forummsg]</b>]<br/>";}
$q1 = mysql_query("SELECT COUNT(`id`) FROM `l2pirates_forums`;");//разделы
$kol1 = mysql_result($q1, 0);
$q2 = mysql_query("SELECT COUNT(`aid`) FROM `l2pirates_forummsgs`;");//сообщения
$kol2 = mysql_result($q2, 0);
$q3 = mysql_query("SELECT COUNT(`id`) FROM `l2pirates_themes`;");//темы
$kol3 = mysql_result($q3, 0);
if($udata67 == "777"){
echo "<br/><img src='/l2pic/logo/forums1.png' alt='*'/> <a href="forum.php?game=addraz">Создать раздел</a>";
}
$result666 = mysql_query("SELECT * FROM `l2pirates_forumosts`");
$post = mysql_fetch_array($result666);
echo"<br/>
<img src='/l2pic/logo/forums1.png' alt='*'/> Всего на форуме разделов: (<b>$kol1</b>)<br/>
<img src='/l2pic/logo/forums1.png' alt='*'/> Всего на форуме тем: (<b>$kol3</b>)<br/>
<img src='/l2pic/logo/forums1.png' alt='*'/> Всего на форуме сообщений: (<b>$kol2</b>)<br/>";
}}
include ("files/down.php");
?>