File size: 2.2Kb
<?php
$mod_title="форум-темы";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
include "server_config.php";
$_pg="0";
$ag="-10";
$_pg2="10";
if(!empty($_GET['_pg']))
{
$ag=$_GET['_pg']-"10";
$_pg=$_GET['_pg'];
$_pg2=$_GET['_pg']+"10";
}
if($auth=="ok")
{
$_GET['id']=htmlspecialchars($_GET['id']);
$level="";
$guildc="";
$avac="";
$arenac="";
$expc="";
$s1="";
$m1="";
$z1="";
$h1="";
$mycl="";
$points2="";
$money="";
$gold1="";
$pvpx="";
$guilds="";
$query = "SELECT * FROM users WHERE login='$_COOKIE[login]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online,$exp,$guild,$point2,$pvp) = mysql_fetch_row($cat))
{
$guilds=$guild;
$pvpx=$pvp;
$s1=$s;
$m1=$m;
$z1=$z;
$h1=$h;
$avac=$ava;
$level=$lvl;
$expc=$exp;
$mycl=$class;
$points2=$point2;
$gold1=$gold;
$money=$mon;
}
echo "
<img src='img/bo.png'> <a href='?do=game/char'>персонаж($level)</a>|<img src='img/bs.png'> <a href='?do=game/history'>история</a><br>
<br>";
$query = "SELECT * FROM forum_thm WHERE fid='$_GET[id]' ORDER BY id LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$fid,$name) = mysql_fetch_row($cat))
{
echo "$id-<a href='?do=forum/read&style=2&id=$name'>$name</a><br>";
}
echo "<br>";
echo "<a href='?do=forum/open&_pg=$ag'><<<назад</a>|<a href='?do=forum/open&_pg=$_pg2'>далее>>></a><br>
<a href='?do=forum/create&id=$_GET[id]'>[создать тему]</a><br>
";
include "data/buttons.auth.php";
}
else
{
$query = "SELECT * FROM forum_thm WHERE fid='$_GET[id]' ORDER BY id LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$fid,$name) = mysql_fetch_row($cat))
{
echo "$id-<a href='?do=forum/read&id=$fid&style=2'>$name</a><br>";
}
echo "<br>";
echo "<a href='?do=forum/open&_pg=$ag'><<<назад</a>|<a href='?do=forum/open&_pg=$_pg2'>далее>>></a><br>";
include "data/button.php";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>