File size: 1.98Kb
<?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>";
if(empty($_GET['dox']))
{
echo "
<form method='POST' action='?do=forum/create&dox=go&id=$_GET[id]'>
имя темы:<br>
<input type='text' name='name' size='15'><br>
<input type='submit' value='создать тему'><br>
</form>
";
}
else
{
$namexcv=htmlspecialchars($_POST['name']);
$query = "INSERT INTO forum_thm (fid,name) VALUES ('$_GET[id]','$namexcv')";
$result = mysql_query ($query)
or die ("<span style='color:red'>ошибка!</span>");
echo "<span style='color:green'>Тема создана!</span><br>";
}
include "data/buttons.auth.php";
}
else
{
echo "сначало тебе необходимо<br><a href='?do=registr'>зарегистрироваться</a> или <a href='?do=login'>войтиы</a><br>";
include "data/button.php";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>