query("SELECT * FROM `$dbname`.`job_check`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC); if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSION[$rspathhex.'upinfomsg'])) { if(!isset($err_msg)) { $err_msg = ' '.sprintf($lang['upinf2'], date("Y-m-d H:i",$job_check['last_update']['timestamp']), ' ', ''); $err_lvl = 1; $_SESSION[$rspathhex.'upinfomsg'] = 1; } } if(!isset($_POST['start']) && !isset($_POST['stop']) && !isset($_POST['restart']) && isset($_SESSION[$rspathhex.'username']) && $_SESSION[$rspathhex.'username'] == $cfg['webinterface_user'] && $_SESSION[$rspathhex.'password'] == $cfg['webinterface_pass']) { if (substr(php_uname(), 0, 7) == "Windows") { if (file_exists(substr(__DIR__,0,-12).'logs\pid')) { $pid = str_replace(array("\r", "\n"), '', file_get_contents(substr(__DIR__,0,-12).'logs\pid')); exec("wmic process where \"processid=".$pid."\" get processid 2>nul", $result); if(isset($result[1]) && is_numeric($result[1])) { $botstatus = 1; } else { $botstatus = 0; } } else { $botstatus = 0; } } else { if (file_exists(substr(__DIR__,0,-12).'logs/pid')) { $check_pid = str_replace(array("\r", "\n"), '', file_get_contents(substr(__DIR__,0,-12).'logs/pid')); $result = str_replace(array("\r", "\n"), '', shell_exec("ps ".$check_pid)); if (strstr($result, $check_pid)) { $botstatus = 1; } else { $botstatus = 0; } } else { $botstatus = 0; } } } ?> TSN Ranksystem - ts-ranksystem.com
"; $err_msg = sprintf($lang['winav10'], $host,'!
', '
'); $err_lvl = 2; } function error_handling($msg,$type = NULL) { switch ($type) { case NULL: echo '
'; break; case 1: echo '
'; break; case 2: echo '
'; break; case 3: echo '
'; break; } echo '',$msg,'
'; } ?>