<?
  ##########################################
## Àâòîð: Ãîâíî êîäûðü -=ØÀÕÒÅÐ=-           #  
## Ñàéò: http://masteram.us ICQ  : 46-92-90 #
### Âåðñèÿ 4.0 Ëèöåíçèîííàÿ                 #
## Äàííàÿ âåðñèÿ ñêðèïòà ÿâëÿëàñü ÏËÀÒÍÎÉ,  #
## âû ÍÅ ÈÌÅËÈ ÏÐÀÂÀ ðàñïðîñòðÿíÿòü äàííûé  #
## ñêðèïò èëè êàêèå-ëèáî ÷àñòè åãî êîäà...  #
## À ÒÅÏÅÐÜ ÑÂÑÅÌ ÍÀ ÝÒÎ ÏÎÕÓÉ!!!)))        #
  #########################################
$interv = $set['shuttime'];
$printan=0;
$b = $db->sql_fetchrow($db->sql_query ("Select shut from botst where id='1'"));
$andata = $b['shut'];
if ($andata < $time){
$andata = $time + $interv;
$db->sql_query ("Update botst set shut='".$andata."' where id='1'");
$printan=1;
}

if($printan==1){
$a = $db->sql_fetchrow($db->sql_query("select count(ids) as num from shutki"));
$rnd = rand(1,$a['num']);
$b = $db->sql_fetchrow($db->sql_query ("SELECT * FROM shutki WHERE ids = '".$rnd."' LIMIT 1;"));
$sh_post=$db->sql_fetchfield($db->sql_query("select COUNT(*) from rooms WHERE `shut` != '0';"),0);
$k_page=k_page($sh_post,$sh_post);
$page=page($k_page);
$sh1=$sh_post*$page-$sh_post;

$num = @$db->sql_query( @"SELECT * from rooms WHERE `shut` != '0' order by rm DESC limit $sh1, $sh_post;" );
while($nums = @$db->sql_fetchrow($num)){
$db->sql_query ("INSERT INTO message (user,user_id,time,msg,rm) VALUES ('$user_shut','0','$time','$b[message]','$nums[rm]')");
}
}
?>