Файл: in4at/mad.php
Строк: 36
<?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);
$madint = 60;
$mad_bot=0;
$fu=fopen("syst/mad.dat","a+");
flock($fu,LOCK_EX);
$mad_data=file("syst/mad.dat");
if ($mad_data[0]<time())
{
ftruncate($fu,0);
fwrite($fu,"n");
if($mad_data[1]==1){
$mad_bot=2;
} else {
$mad_bot=1;
}
fwrite($fu,$mad_bot);
fflush($fu);
} else {
$mad_bot=0;
}
if($mad_bot!=0){
if($mad_data[1]==1)
{
$mad1=@file("syst/madquest.txt");
$mad_rand1=rand(0,sizeof($mad1)-1);
$mad_mes = '<br/>'.$mad1[$mad_rand1];
$mad_mes = str_replace("[nick]","$us",$mad_mes);
$rnd = rand(0,99999999);
$mad_today=date ("H:i");
$time = getmicrotime();
$madbot = mysql_query("Select user from users where id='9' LIMIT 1;");
$mb = mysql_fetch_array($madbot);
$madus = $mb['user'];
mysql_query("Insert into room8 set klu4= '".$rnd."', time='".$mad_today."', who='".$madus."', message='".$mad_mes."', id='".$time."', towhom='', hid='0', usid='9'");
mysql_query("ANALYZE TABLE room8");
ftruncate($fu,0);
$mad_data = time() + $madint;
fwrite($fu,"$mad_datan");
fwrite($fu,2);
}
if($mad_data[1]==2)
{
$mad1=@file("syst/madansw.txt");
$mad_rand1=rand(0,sizeof($mad1)-1);
$mad_mes = '<br/>'.$mad1[$mad_rand1];
$mad_mes = str_replace("[nick]","$us",$mad_mes);
$rnd = rand(0,99999999);
$mad_today=date ("H:i");
$time = getmicrotime();
$madbot = mysql_query("Select user from users where id='9' LIMIT 1;");
$mb = mysql_fetch_array($madbot);
$madus = $mb['user'];
mysql_query("Insert into room8 set klu4= '".$rnd."', time='".$mad_today."', who='".$madus."', message='".$mad_mes."', id='".$time."', towhom='', hid='0', usid='9'");
mysql_query("ANALYZE TABLE room8");
ftruncate($fu,0);
$mad_data = time() + $madint;
fwrite($fu,"$mad_datan");
fwrite($fu,1);
}
}
flock($fu,LOCK_UN);
fclose($fu);
?>