exec("INSERT INTO `$dbname`.`csrf_token` (`token`,`timestamp`,`sessionid`) VALUES ('$csrf_token','".time()."','".session_id()."')") === false) { $err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3; } if (($db_csrf = $mysqlcon->query("SELECT * FROM `$dbname`.`csrf_token` WHERE `sessionid`='".session_id()."'")->fetchALL(PDO::FETCH_UNIQUE|PDO::FETCH_ASSOC)) === false) { $err_msg = print_r($mysqlcon->errorInfo(), true); $err_lvl = 3; } if ((isset($_POST['start']) || isset($_POST['stop']) || isset($_POST['restart']) || isset($_POST['logfilter'])) && !isset($db_csrf[$_POST['csrf_token']])) { echo '
'.$output.''; $err_lvl = 1; usleep(80000); $logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter); } } if (isset($_POST['stop']) && isset($db_csrf[$_POST['csrf_token']])) { if(!is_writable($cfg['logs_path'])) { $err_msg = "!!!! Logs folder is not writable !!!!
'.$output.'';; $err_lvl = 1; usleep(80000); $logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter); } } if (isset($_POST['restart']) && isset($db_csrf[$_POST['csrf_token']])) { if(!is_writable($cfg['logs_path'])) { $err_msg = "!!!! Logs folder is not writable !!!!
'.$output.''; $err_lvl = 1; usleep(80000); $logoutput = getlog($cfg,$number_lines,$filters,$filter2,$inactivefilter); } } $disabled = ''; if($cfg['teamspeak_host_address'] == NULL || $cfg['teamspeak_query_port'] == NULL || $cfg['teamspeak_voice_port'] == NULL || $cfg['teamspeak_query_user'] == NULL || $cfg['teamspeak_query_pass'] == NULL || $cfg['teamspeak_query_nickname'] == NULL || $cfg['rankup_definition'] == NULL || $cfg['logs_path'] == NULL) { $disabled = 1; $err_msg = $lang['wibot9']; $err_lvl = 2; } ?>