query("SELECT * FROM `$dbname`.`job_check`")->fetchAll(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) { $err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3; } else { 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']) && hash_equals($_SESSION[$rspathhex.'username'], $cfg['webinterface_user']) && hash_equals($_SESSION[$rspathhex.'password'], $cfg['webinterface_pass'])) { if (substr(php_uname(), 0, 7) == "Windows") { if (file_exists($GLOBALS['pidfile'])) { $pid = str_replace(array("\r", "\n"), '', file_get_contents($GLOBALS['pidfile'])); 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($GLOBALS['pidfile'])) { $check_pid = str_replace(array("\r", "\n"), '', file_get_contents($GLOBALS['pidfile'])); $result = str_replace(array("\r", "\n"), '', shell_exec("ps ".$check_pid)); if (strstr($result, $check_pid)) { $botstatus = 1; } else { $botstatus = 0; } } else { $botstatus = 0; } } } if(isset($_POST['switchexpert']) && isset($_SESSION[$rspathhex.'username']) && hash_equals($_SESSION[$rspathhex.'username'], $cfg['webinterface_user']) && hash_equals($_SESSION[$rspathhex.'password'], $cfg['webinterface_pass'])) { if ($_POST['switchexpert'] == "check") $cfg['webinterface_advanced_mode'] = 1; else $cfg['webinterface_advanced_mode'] = 0; if (($mysqlcon->exec("INSERT INTO `$dbname`.`cfg_params` (`param`,`value`) VALUES ('webinterface_advanced_mode','{$cfg['webinterface_advanced_mode']}') ON DUPLICATE KEY UPDATE `value`=VALUES(`value`);")) === false) { print_r($mysqlcon->errorInfo(), true); $err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3; } } ?> TSN Ranksystem - ts-ranksystem.com '; } ?> '; } ?>
"; $err_msg = sprintf($lang['winav10'], $host,'!
', '
'); $err_lvl = 2; } ?>