0){ echo "sxd.log.add({$d},[" . esc($LNG['stop_' . $f[9]]) . "]);" . (($f[9] == 3 || $f[9] == 4) ? 'sxd.resumeJob();' : 'sxd.hideLoading();'); } else{ if($JOB['act'] == 'backup') $f[3] = filesize(file_exists($JOB['file_name']) ? $JOB['file_name'] : $JOB['file_tmp']); if($f[4] != 'EK' && time() > $f[1] + 45) { fopen($JOB['file_stp'],'w'); $f[9] = 0; $f[1] = $time; fwrite($fh, implode("\t", $f) . "\n"); echo "sxd.log.add({$d},[" . esc($LNG['job_freeze']) . "]);sxd.hideLoading();z('btn_resume').style.display = '';z('btn_pause').style.display = 'none';"; } echo "sxd.timer.set({$f[0]},{$time},{$pt});sxd.progress.current.set({$pc},0,{$f[7]}, {$f[8]});sxd.progress.total.set({$pt},{$f[3]});"; } break; case 'stop': $fs = fopen($JOB['file_stp'],'w'); fwrite($fs, 1); echo "sxd.log.add({$d},[" . esc($LNG['stop_job']) . "]);"; break; case 'pause': fopen($JOB['file_stp'],'w'); echo "sxd.log.add({$d},[" . esc($LNG['stop_job']) . "]);"; break; } } else echo "sxd.hideLoading();"; function load_lang($lng_name = 'auto'){ if($lng_name == 'auto'){ include('lang/list.php'); $lng = 'en'; if(preg_match_all('/[a-z]{2}(-[a-z]{2})?/', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $m)) { foreach($m[0] AS $l){ if(isset($langs[$l])){ $lng_name = $l; break; } } } } if(file_exists("lang/lng_{$lng_name}.php")) return "lang/lng_{$lng_name}.php"; else return "lang/lng_en.php"; } function esc($str){ return "'" . addcslashes($str, "\\\0\n\r\t\'") . "'"; } function sxd_error($errno, $errmsg, $filename, $linenum, $vars){ global $JOB; if($errno == 8192) return; if(strpos($errmsg, 'timezone settings')) return; if(!empty($JOB['file_stp'])) fopen($JOB['file_stp'],'w'); $errortype = array(1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024 => 'User Notice'); $str = "{$errortype[$errno]}: {$errmsg} ({$filename}:{$linenum})"; //error_log("[info.php]\n{$str}\n", 3, "error.log"); if($errno == 8 || $errno == 1024) { echo "sxd.log.add('" . date("Y.m.d H:i:s") . "',[" . esc($str) . "], 4);sxd.hideLoading();"; } elseif($errno < 1024) { echo "sxd.log.add('" . date("Y.m.d H:i:s") . "',[" . esc($str) . "], 4);sxd.hideLoading();"; die; } }