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

Размер файла: 2.03Kb
<?php
session_start();
$mod_title="установка мода";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
if($auth=="ok")
{
$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;
}
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>
";
$_pg="0";
$ag="-10";
$_pg2="10";
if(!empty($_GET['_pg']))
{
$ag=$_GET['_pg']-"10";
$_pg=$_GET['_pg'];
$_pg2=$_GET['_pg']+"10";
}
$lxc="";
$query = "SELECT * FROM modcat WHERE mid='$_GET[mid]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id3,$name3,$text3,$author3,$mid3) = mysql_fetch_row($cat))
{
$_xtest="no";
$query = "SELECT * FROM mods WHERE login='$_COOKIE[login]' AND name='$name3'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$name,$mid) = mysql_fetch_row($cat))
{
$_xtest="yes";
}
if($_xtest=="no")
{
$query = "INSERT INTO mods (login,name,mid) VALUES ('$_COOKIE[login]','$name3','$mid3')";
$result = mysql_query ($query)
or die ("<span style='color:red'>ошибка установки!</span>");
echo "<span style='color:green'>Мод установлен!</span><br>";
}
else
{
echo "<span style='color:red'>мод уже установлен!</span><br>";
}
}
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>