Файл: in4at/kommands.php
Строк: 69
<?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 ##
##################################################################################################
Error_Reporting(0);
$rnd = rand(0,99999999);
$today = date("H:i");
$time = getmicrotime();
$in2room = 'room'.$rm;
if (substr_count($msg, '!anekdot')!=0||substr_count($msg, '!анекдот')!=0){
$lastan=mysql_fetch_array(mysql_query("select lastan from system"));
if ($lastan[0]!=$id){
$r = mysql_query("select count(klu4) as num from anekdot");
$a = mysql_fetch_array($r);
$rnd = rand(1,$a['num']);
$r = mysql_query("SELECT message FROM anekdot WHERE klu4 = '".$rnd."' LIMIT 1;");
$b = mysql_fetch_array($r);
$mes = '<br/>'.$b['message'];
$shut = mysql_query("Select user from users where id='3' LIMIT 1;");
$zz = mysql_fetch_array($shut);
$shutnik = $zz['user'];
mysql_query("Insert into $in2room set klu4= '".$rnd."', time='".$today."', who='".$shutnik."', message='".$mes."', id='".$time."', towhom='', hid='0', usid='3'");
mysql_query("ANALYZE TABLE $in2room");
mysql_query("Update system set lastan='".$id."'");
}
} else {
if (substr_count($msg, '!fakt')!=0||substr_count($msg, '!факт')!=0){
$lastan=mysql_fetch_array(mysql_query("select lastzn from system"));
if ($lastzn[0]!=$id){
$umn1=file('syst/doyouknow.txt');
$umn2=file('syst/info.txt');
$umn_rand1=rand(0,sizeof($umn1)-1);
$umn_rand2=rand(0,sizeof($umn2)-1);
$umn_mes = '<br/>'.$umn1[$umn_rand1].$umn2[$umn_rand2];
$znatok = mysql_query("Select user from users where id='6' LIMIT 1;");
$zn = mysql_fetch_array($znatok);
$umn = $zn['user'];
mysql_query("Insert into $in2room set klu4= '".$rnd."', time='".$today."', who='".$umn."', message='".$umn_mes."', id='".$time."', towhom='', hid='0', usid='6'");
mysql_query("ANALYZE TABLE $in2room");
mysql_query("Update system set lastzn='".$id."'");
}
}
}
?>