Просмотр файла release_fix#2/mods/forum/index.php

Размер файла: 2.06Kb
<?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")
{
$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 WHERE sub='' ORDER BY id LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$fid,$name,$sub) = mysql_fetch_row($cat))
{
echo "$id-<a href='?do=forum/open&id=$fid'>$name</a><br>";
}
echo "<br>";
echo "<a href='?do=forum/index&_pg=$ag'><<<назад</a>|<a href='?do=forum/index&_pg=$_pg2'>далее>>></a><br>";
include "data/buttons.auth.php";
}
else
{
$query = "SELECT * FROM forum WHERE sub='' ORDER BY id LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$fid,$name,$sub) = mysql_fetch_row($cat))
{
echo "$id-<a href='?do=forum/open&id=$fid'>$name</a><br>";
}
echo "<br>";
echo "<a href='?do=forum/index&_pg=$ag'><<<назад</a>|<a href='?do=forum/index&_pg=$_pg2'>далее>>></a><br>";
include "data/button.php";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>