$nel_user = null; $nel_debug = array(); nt_common_add_debug(date("Y-m-d H:i:s", time())); nt_common_add_debug('-- Basic init complete, time to get some work done.'); // login and session process if (isset($NELTOOL['GET_VARS']['mode']) && $NELTOOL['GET_VARS']['mode'] == 'logout') { $nel_user = null; nt_auth_stop_session(); nt_common_redirect('index.php'); exit; } elseif (isset($NELTOOL['SESSION_VARS']['nelid']) && !empty($NELTOOL['SESSION_VARS']['nelid'])) { $nel_user = nt_auth_load_user($NELTOOL['SESSION_VARS']['nelid']); } elseif (isset($NELTOOL['POST_VARS']['nel_login']) && isset($NELTOOL['POST_VARS']['nel_passwd']) && $NELTOOL['POST_VARS']['action'] == 'login') { $nel_user = nt_auth_check_login($NELTOOL['POST_VARS']['nel_login'], $NELTOOL['POST_VARS']['nel_passwd']); if ($nel_user) { nt_auth_set_session_var('nelid', $nel_user['user_id']); nt_auth_set_logging_count($nel_user['user_id']); $nel_user['new_login'] = true; } } if (!$nel_user) { nt_auth_load_login(); exit; } nt_common_add_debug('-- User authentification complete.'); // some site settings if (NELTOOL_DEBUG && $nel_user['group_level'] == 10) { $tpl->assign('NELTOOL_DEBUG', true); //$nel_debug); } $tpl->assign('nel_script', $NELTOOL['SERVER_VARS']['SCRIPT_NAME']);
} if (isset($NELTOOL['GET_VARS']['shard'])) { $view_shard_id = $NELTOOL['GET_VARS']['shard']; nt_auth_set_session_var('view_shard_id', $view_shard_id); } if (isset($NELTOOL['GET_VARS']['refdata'])) { $tmp_data = unserialize(base64_decode($NELTOOL['GET_VARS']['refdata'])); if (is_array($tmp_data)) { $NELTOOL['POST_VARS'] = $tmp_data; } } $current_refresh_rate = nt_auth_get_session_var('current_refresh_rate'); if (isset($_POST['services_refresh'])) { if ($current_refresh_rate != $_POST['services_refresh']) { $current_refresh_rate = $_POST['services_refresh']; nt_auth_set_session_var('current_refresh_rate', $current_refresh_rate); } } if ($current_refresh_rate == null) { $current_refresh_rate = 0; } elseif ($current_refresh_rate > 0) { $tpl->assign('nel_tool_refresh', '<meta http-equiv=refresh content="' . $current_refresh_rate . '">'); } $tpl->assign('tool_refresh_list', $refresh_rates); $tpl->assign('tool_refresh_rate', $current_refresh_rate); $tpl->assign('tool_domain_list', $nel_user['access']['domains']); $tpl->assign('tool_domain_selected', $view_domain_id); $tpl->assign('tool_shard_list', $nel_user['access']['shards']); $tpl->assign('tool_shard_selected', $view_shard_id); $tool_shard_filters = tool_main_get_shard_ids($view_shard_id); $tpl->assign('tool_shard_filters', $tool_shard_filters);
$view_domain_id = $nel_user['group_default_domain_id']; $view_shard_id = $nel_user['group_default_shard_id']; nt_auth_set_session_var('view_domain_id', $view_domain_id); nt_auth_set_session_var('view_shard_id', $view_shard_id); } if (isset($NELTOOL['GET_VARS']['domain'])) { if ($view_domain_id != $NELTOOL['GET_VARS']['domain']) { $view_domain_id = $NELTOOL['GET_VARS']['domain']; nt_auth_set_session_var('view_domain_id', $view_domain_id); $view_shard_id = null; nt_auth_unset_session_var('view_shard_id'); } } if (isset($NELTOOL['GET_VARS']['shard'])) { $view_shard_id = $NELTOOL['GET_VARS']['shard']; nt_auth_set_session_var('view_shard_id', $view_shard_id); } if (isset($NELTOOL['GET_VARS']['refdata'])) { $tmp_data = unserialize(base64_decode($NELTOOL['GET_VARS']['refdata'])); if (is_array($tmp_data)) { $NELTOOL['POST_VARS'] = $tmp_data; } } $tpl->assign('tool_domain_list', $nel_user['access']['domains']); $tpl->assign('tool_domain_selected', $view_domain_id); $tpl->assign('tool_shard_list', $nel_user['access']['shards']); $tpl->assign('tool_shard_selected', $view_shard_id); $tool_shard_filters = tool_main_get_shard_ids($view_shard_id); $tpl->assign('tool_shard_filters', $tool_shard_filters); //if (tool_admin_applications_check('tool_player_locator_display_players')) $tpl->assign('restriction_tool_player_locator_display_players', true); //if (tool_admin_applications_check('tool_player_locator_locate')) $tpl->assign('restriction_tool_player_locator_locate', true);