Файл: in4at/mafhist.php
Строк: 65
<?php
##################################################################################################
## Script name : In4at ##
## Version : Final ##
## Made by : XPYCT(Сергей Мищенко) ##
## E-mail : bce-ok@bk.ru ##
## ICQ : 447-50-50-62 ##
## Site : http://vkontakte.ru/id31604521 ##
## Внимание! Скрипт распространяется бесплатно! Модификация W4at by XPYCT ##
##################################################################################################
define('REQ_2_chat', true);
require('4at_set.php');
require('db_con.php');
require('style.php');
if ($py !== spy_code) require('us_info.php');
if (!isset($rm)) $rm = 1;
$rmaf = 'maf'.$rm;
$ringame = 'ingame'.$rm;
$us=$row['user'];
$smset = $row['smiles'];
mysql_query("select * from $ringame WHERE gamer_id = '".$id."'");
if (mysql_affected_rows()!=0) $gmes = 1;else $gmes = 0;
$max = $row['max'];
$bind1 = $row['bind1'];
$bind2 = $row['bind2'];
$bind3 = $row['bind3'];
$bind4 = $row['bind4'];
$bind5 = $row['bind5'];
$bind6 = $row['bind6'];
$qi=mysql_query("Select who from ignor where user= '".$id."'");
while($ia=mysql_fetch_array($qi)){
$ignor[]=$ia[0];}
echo head;
if ($vv!=0) echo '<div class="d0"><b>История</b></div>';
else echo "<card id="history" title="История"><p>";
echo $fsize1;
echo "» <a href="maf.php?$wp&rm=$rm#add" accesskey="$bind1">Сказать</a> ($bind1)<br/>n";
echo "» <a href="maf.php?$wp&rm=$rm" accesskey="$bind2">Обновить</a> ($bind2)<br/>---";
$res = mysql_query("Select * from $rmaf order by id desc LIMIT 400");
$kol = mysql_affected_rows();
@$total=$kol -1;
if (!isset($num)) $num=0;
$mread = $num;
for ($i = 1;$i<=$num;$i++) $data = mysql_fetch_array($res);
$i = $num;
while (($mread < $num+$max)&&($i<=$total)){
$data = mysql_fetch_array($res);
$date = $data['time'];
$name = $data['who'];
$usid = $data['usid'];
$msg = $data['message'];
$gm = $data['gamemes'];
if ($smset==0&&$data['messagewosm']!='') $msg = $data['messagewosm'];
if ($smset==2&&$data['messagewoasm']!='') $msg = $data['messagewoasm'];
$time = $data['id'];
$th = $data['towhom'];
$hid = $data['hid'];
$i++;
if ((!in_array($usid, $ignor))&&(($hid != 2)||($id == $usid))&&($gmes==0||($gmes==1&&$gm==1))){
if ($th == "") {
echo "<br/><b><a href="mafinside.php?$wp&rm=$rm&nk=$usid">$name</a></b>[$date]>$msgn";$mread++;}
else if (($th == $id)||($id == $usid)){
echo "<br/><b><a href="mafinside.php?$wp&rm=$rm&nk=$usid">$name</a>[P!]</b>[$date] >$msgn";$mread++;}
}
}
echo '<br/>'.divide;
mysql_close ($link);
$page_next = $num + $max-1;
$page_prev = $num - $max+1;
if ($num + $max < $total) {
echo "<a href="mafhist.php?$wp&rm=$rm&num=$page_next" accesskey="$bind6">>>></a> ($bind6)<br/>";
}
if ($num >= $max) {
echo "<a href="mafhist.php?$wp&rm=$rm&num=$page_prev" accesskey="$bind5"><<<</a> ($bind5)<br/>";
}
echo divide;
echo "» <a href="enter.php?$wp" accesskey="$bind4">Выйти</a> ($bind4)n";
echo $fsize2;
echo foot;
?>