Вход Регистрация
Файл: gamele.ru/cron/cron.php
Строк: 31
<?php
session_start
();
include(
"/var/www/gamale/data/www/gamele.ru/includes/config.inc.php");
include(
"/var/www/gamale/data/www/gamele.ru/includes/functions.php");
include(
"/var/www/gamale/data/www/gamele.ru/includes/database/BotsGroup.php");

$query mysql_query("SELECT * FROM `crons`");
while(
$row mysql_fetch_assoc($query)){
    switch(
$row['type']){
        case
'1':
            if( 
$row['cron_time'] <= time() ){
                include(
$row['folder']);
                
mysql_query("UPDATE `crons` SET `cron_time`='".(time()+$row['time'])."' WHERE `folder` = '".$row['folder']."'");
            }
        break;
        case
'2':
            
$TimeType explode("|",$row['time']);
            switch(
$row['cron_time']){
                case
'HOUR':
                    if(
in_array(date("H"),$TimeType)){
                        include(
$row['folder']);
                        echo 
$row['folder']." < HOUR";
                    }
                break;
                case
'MINUTES':
                    if(
in_array(date("i"),$TimeType)){
                        include(
$row['folder']);
                        echo 
$row['folder']." < MINUTES";
                    }
/*
                    print in_array(date("i"),$TimeType);
                    
                    print ">>>>>>>>".date("i")." <> ".$TimeType." <> ".$row['time'];
                    print_r($TimeType);
*/
                
break;
            }
        break;
        case
'3':
            
$TimeType explode("|",$row['time']);
            if( 
$row['cron_time'] < time() ){
                include(
$row['folder']);
                
mysql_query("UPDATE `crons` SET `cron_time`='".(time()+rand($TimeType[0],$TimeType[1]))."' WHERE `folder` = '".$row['folder']."'");
            }
        break;
    }
}
?>
Онлайн: 0
Реклама