File size: 1.57Kb
<?php
session_start();
$mod_title="библиотека";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
$mcl="";
$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) = mysql_fetch_row($cat))
{
$mcl=$class;
$level=$lvl;
}
$query = "SELECT * FROM count";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$guild,$arena) = mysql_fetch_row($cat))
{
$guildc=$guild;
$arenac=$arena;
}
$_pg="0";
$ag="-10";
$_pg2="10";
if(!empty($_GET['_pg']))
{
$ag=$_GET['_pg']-"10";
$_pg=$_GET['_pg'];
$_pg2=$_GET['_pg']+"10";
}
if(empty($_GET['dox']))
{
$query = "SELECT * FROM wiki ORDER BY id DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$text) = mysql_fetch_row($cat))
{
echo "<a href='?do=lib&dox=$name'>$name</a><br>";
}
}
else
{
$query = "SELECT * FROM wiki WHERE name='$_GET[dox]' ORDER BY id DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$text) = mysql_fetch_row($cat))
{
echo "$id-$name<br>$text<br><br>";
}
}
echo "<a href='?do=lib&_pg=$ag'><<<назад</a>|<a href='?do=lib&_pg=$_pg2'>далее>>></a><br>";
include "data/button.php";
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>