<?
  ##########################################
## Àâòîð: -=ØÀÕÒÅÐ=-                        #                                                                                                                                                                                      ## Ñàéò: http://masteram.us                 #                 															                      ## ICQ  :  46-92-90                         #                 														 		           ## Âåðñèÿ 4.0 Ëèöåíçèîííàÿ                  #
## Äàííàÿ âåðñèÿ ñêðèïòà ÿâëÿåòñÿ ÏËÀÒÍÎÉ,  #
## âû ÍÅ ÈÌÅÅÒÅ ÏÐÀÂÀ ðàñïðîñòðÿíÿòü äàííûé #
##  ñêðèïò èëè êàêèå-ëèáî ÷àñòè åãî êîäà... #
  #########################################

$intervt=300;
$printant=0;
$bt = $db->sql_fetchrow($db->sql_query ("Select tupica from botst where id='1'"));
$tndata = $bt['tupica'];
if ($tndata < $time){
$tndata = $time + $intervt;
$db->sql_query ("Update botst set tupica='".$tndata."' where id='1'");
$printant=1;
}

if($printant==1){
$a = $db->sql_fetchrow($db->sql_query("select count(ids) as num from frazi"));
$rnd = rand(1,$a["num"]);
$b = $db->sql_fetchrow($db->sql_query ("SELECT message FROM frazi WHERE ids = '".$rnd."' LIMIT 1;"));
$db->sql_query ("INSERT INTO message (user,user_id,time,msg,rm) VALUES ('$user_tupica','0','".$time."','".$b['message']."','$rm')");
}


?>