Example #1
0
 public function __construct()
 {
     //$GLOBALS['Log']->ToFile('logs'.DIRECTORY_SEPARATOR.'raw.txt',Log_TypeRaw);
     //$GLOBALS['Log']->ToOutput(Log_TypeAll);
     $GLOBALS['Log']->ToFile('logs' . DIRECTORY_SEPARATOR . 'debug_log.txt', Log_TypeDebug);
     $GLOBALS['Log']->ToFile('logs' . DIRECTORY_SEPARATOR . 'all_log.txt', Log_TypeAll);
     //$GLOBALS['Log']->ToSQLite('logs'.DIRECTORY_SEPARATOR.'raw.db',Log_TypeRaw);
     /*$this->Config['server'][0]['port'] = 6667;
       $this->Config['server'][0]['url'] = "irc.smoula.net";
       $this->Config['nick'] = Array ('Adria','Adruska');//,'Ariak','Adroid');
       $this->Config['channel'] = Array ('#sg.cz','#adria');
       $this->Config['user_message'] = Array (
       0=>'ble',
       3=>$this->Config['nick'][0].' 8 * :BLPSBot v1.01 :'.IRCBot_Version,
       1=>'a a a a',
       'default'=>$this->Config['nick'][0].' BLPSBot v1.01 :'.IRCBot_Version);
       $this->Config['timeout']['user_message']=5;
       $this->Config['timeout']['nick_message']=5;
       $this->Config['timeout']['connect']=10;
       //*/
     Set_Time_Limit(0);
     //  timelimit=0
     Ignore_User_Abort(1);
     //  user abort ignore
     if (!$this->LoadConfig()) {
         $GLOBALS['Log']->Sys('Unable to load config file (' . IRCBot_ConfigFile . ')');
         die;
     }
     //*/
     //$this->Start();
 }
            $box[$j] = $temp;
            $k = $box[($box[$a] + $box[$j]) % 256];
            $cipherby = ord(defined("BX_UTF") ? mb_substr($data, $i, 1, 'latin1') : substr($data, $i, 1)) ^ $k;
            $cipher .= chr($cipherby);
        }
        if ($type == 'D') {
            $res_data = urldecode(urlencode($cipher));
        } else {
            $res_data = urlencode($cipher);
        }
        return $res_data;
    }
}
/*************************************************************************************************/
/*************************************************************************************************/
@Set_Time_Limit(10000);
if (In_Array($_REQUEST["fcajax"], array("cl", "vf", "df")) && check_bitrix_sessid()) {
    if ($_REQUEST["fcajax"] == "cl") {
        if (!$RIGHT_COLLECT) {
            $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
        }
        if (IntVal($_REQUEST["tm"]) < 5) {
            $_REQUEST["tm"] = 5;
        }
        $collector = new CFileChecker();
        $arTs = array("ts" => IntVal($_REQUEST["ts"]), "Completed" => IntVal($_REQUEST["completed"]), "StartPoint" => $_REQUEST["startpoint"], "MaxExecutionTime" => IntVal($_REQUEST["tm"]));
        $arErrors = array();
        $res = $collector->CollectCrc(IntVal($_REQUEST["region"]), Explode(",", $_REQUEST["exts"]), $_REQUEST["pwd"], $arTs, $arErrors);
        if (Count($arErrors) > 0) {
            echo "ERR|" . Implode("|", $arErrors);
        } else {