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

Размер файла: 2.88Kb
<?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";
}
if(!empty($_GET['dx']))
{
$login2d="";
$query = "SELECT * FROM mail WHERE login='$_COOKIE[login]' AND id='$_GET[dx]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$login,$login2,$text,$read) = mysql_fetch_row($cat))
{
$login2d=$login2;
$ol="";
$query3 = "SELECT * FROM users WHERE login='$login2'";
$cat3 = mysql_query ($query3);
if(!$cat3) exit (mysql_error());
while(list($id4,$login4,$pass4,$mail4,$reg4,$class4,$m4,$h4,$z4,$s4,$mon4,$gold4,$pms4,$lvl4,$ava4,$ban4,$online2) = mysql_fetch_row($cat3))
{
if($online2=="no")
{
$ol="<span style='color:red'>[off]</span>";
}
else
{
$ol="<span style='color:green'>[on]</span>";
}
}
echo "$id-$name<br>от <a href='?do=game/info&dox=$login2'>$login2</a> $ol:<br>$text<br><br>";
}
echo "<a href='?do=game/mail/sent&xs=$login2d&style=2'>ответить</a><br>";
$query="UPDATE mail SET read1='1' WHERE login='".$_COOKIE[login]."' AND id='$_GET[dx]'";
$result=mysql_query($query)
or die("<span style='color:red'>ошибка обновления пользователя!</span><br>");
}
else
{
$query = "SELECT * FROM mail WHERE login='$_COOKIE[login]' ORDER BY id DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$login,$login2,$text,$read) = mysql_fetch_row($cat))
{
echo "$id-<a href='?do=game/mail/in&dx=$id'>$name</a> [от:<a href='?do=game/info&dox=$login2'>$login2</a>]";
if($read=="0")
{
echo "[<span style='color:red'>не прочитано</span>]<br>";
}
else
{
echo "<br>";
}
}
echo "<a href='?do=game/mail/in&_pg=$ag'><<<назад</a>|<a href='?do=game/mail/in&_pg=$_pg2'>далее>>></a><br>";
}
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>