| @@ -13,15 +13,15 @@ | ||
| 13 | 13 | . '&id=' . urlencode(classSupernova::$config->server_updater_id); | 
| 14 | 14 | |
| 15 | 15 |  switch($mode) { | 
| 16 | - case SNC_MODE_REGISTER: | |
| 17 | -    if(classSupernova::$config->server_updater_key || classSupernova::$config->server_updater_id) { | |
| 18 | -      if($ajax) { | |
| 19 | - print(SNC_VER_REGISTER_ERROR_REGISTERED); | |
| 16 | + case SNC_MODE_REGISTER: | |
| 17 | +      if(classSupernova::$config->server_updater_key || classSupernova::$config->server_updater_id) { | |
| 18 | +        if($ajax) { | |
| 19 | + print(SNC_VER_REGISTER_ERROR_REGISTERED); | |
| 20 | + } | |
| 21 | + die(); | |
| 20 | 22 | } | 
| 21 | - die(); | |
| 22 | - } | |
| 23 | - $url .= "&name=" . urlencode(classSupernova::$config->game_name) . "&url=" . urlencode(SN_ROOT_VIRTUAL); | |
| 24 | - break; | |
| 23 | + $url .= "&name=" . urlencode(classSupernova::$config->game_name) . "&url=" . urlencode(SN_ROOT_VIRTUAL); | |
| 24 | + break; | |
| 25 | 25 | } | 
| 26 | 26 | |
| 27 | 27 | $check_result = sn_get_url_contents($url); | 
| @@ -34,69 +34,69 @@ | ||
| 34 | 34 | } | 
| 35 | 35 | |
| 36 | 36 |  switch($mode) { | 
| 37 | - case ADM_TOOL_CONFIG_RELOAD: | |
| 38 | - classSupernova::$config->db_loadAll(); | |
| 39 | - sys_refresh_tablelist(); | |
| 40 | - | |
| 41 | -    classSupernova::$config->db_loadItem('game_watchlist'); | |
| 42 | -    if(classSupernova::$config->game_watchlist) { | |
| 43 | -      classSupernova::$config->game_watchlist_array = explode(';', classSupernova::$config->game_watchlist); | |
| 44 | -    } else { | |
| 45 | - unset(classSupernova::$config->game_watchlist_array); | |
| 46 | - } | |
| 47 | - break; | |
| 48 | - | |
| 49 | - case ADM_TOOL_MD5: | |
| 50 | -    $template = gettemplate("admin/md5enc", true); | |
| 51 | -    $password_seed = sys_get_param_str_unsafe('seed', SN_SYS_SEC_CHARS_ALLOWED); | |
| 52 | -    $password_length = sys_get_param_int('length', 16); | |
| 53 | -    $string = ($string = sys_get_param_str_unsafe('string')) ? $string : sys_random_string($password_length, $password_seed); | |
| 54 | - | |
| 55 | - $template->assign_vars(array( | |
| 56 | - 'SEED' => $password_seed, | |
| 57 | - 'LENGTH' => $password_length, | |
| 58 | - 'STRING' => htmlentities($string), | |
| 59 | - 'MD5' => md5($string), | |
| 60 | - )); | |
| 61 | - display($template, classLocale::$lang['adm_tools_md5_header'], false, '', true); | |
| 62 | - break; | |
| 63 | - | |
| 64 | - case ADM_TOOL_FORCE_ALL: | |
| 65 | -    classSupernova::$config->db_saveItem('db_version', 0); | |
| 66 | -    require_once('../includes/update.php'); | |
| 67 | - break; | |
| 68 | - | |
| 69 | - case ADM_TOOL_FORCE_LAST: | |
| 70 | -    classSupernova::$config->db_saveItem('db_version', floor(classSupernova::$config->db_version - 1)); | |
| 71 | -    require_once('../includes/update.php'); | |
| 72 | - break; | |
| 73 | - | |
| 74 | - case ADM_TOOL_INFO_PHP: | |
| 75 | - phpinfo(); | |
| 76 | - break; | |
| 77 | - | |
| 78 | - case ADM_TOOL_INFO_SQL: | |
| 79 | -    $template = gettemplate("simple_table", true); | |
| 80 | - | |
| 81 | - $status = array( | |
| 82 | - classLocale::$lang['adm_tool_sql_server_version'] => classSupernova::$db->db_get_server_info(), | |
| 83 | - classLocale::$lang['adm_tool_sql_client_version'] => classSupernova::$db->db_get_client_info(), | |
| 84 | - classLocale::$lang['adm_tool_sql_host_info'] => classSupernova::$db->db_get_host_info(), | |
| 85 | - ); | |
| 86 | - templateAssignTable($template, 'server', $status); | |
| 87 | - | |
| 88 | - templateAssignTable($template, 'status', classSupernova::$db->db_get_server_stat()); | |
| 89 | - templateAssignTable($template, 'params', classSupernova::$db->db_core_show_status()); | |
| 90 | - | |
| 91 | - $template->assign_vars(array( | |
| 92 | - 'PAGE_HEADER' => classLocale::$lang['adm_tool_sql_page_header'], | |
| 93 | - 'COLUMN_NAME_1' => classLocale::$lang['adm_tool_sql_param_name'], | |
| 94 | - 'COLUMN_NAME_2' => classLocale::$lang['adm_tool_sql_param_value'], | |
| 95 | - 'TABLE_FOOTER' => 'test', | |
| 96 | - )); | |
| 97 | - | |
| 98 | - display($template, classLocale::$lang['adm_bn_ttle'], false, '', true); | |
| 99 | - break; | |
| 37 | + case ADM_TOOL_CONFIG_RELOAD: | |
| 38 | + classSupernova::$config->db_loadAll(); | |
| 39 | + sys_refresh_tablelist(); | |
| 40 | + | |
| 41 | +      classSupernova::$config->db_loadItem('game_watchlist'); | |
| 42 | +      if(classSupernova::$config->game_watchlist) { | |
| 43 | +        classSupernova::$config->game_watchlist_array = explode(';', classSupernova::$config->game_watchlist); | |
| 44 | +      } else { | |
| 45 | + unset(classSupernova::$config->game_watchlist_array); | |
| 46 | + } | |
| 47 | + break; | |
| 48 | + | |
| 49 | + case ADM_TOOL_MD5: | |
| 50 | +      $template = gettemplate("admin/md5enc", true); | |
| 51 | +      $password_seed = sys_get_param_str_unsafe('seed', SN_SYS_SEC_CHARS_ALLOWED); | |
| 52 | +      $password_length = sys_get_param_int('length', 16); | |
| 53 | +      $string = ($string = sys_get_param_str_unsafe('string')) ? $string : sys_random_string($password_length, $password_seed); | |
| 54 | + | |
| 55 | + $template->assign_vars(array( | |
| 56 | + 'SEED' => $password_seed, | |
| 57 | + 'LENGTH' => $password_length, | |
| 58 | + 'STRING' => htmlentities($string), | |
| 59 | + 'MD5' => md5($string), | |
| 60 | + )); | |
| 61 | + display($template, classLocale::$lang['adm_tools_md5_header'], false, '', true); | |
| 62 | + break; | |
| 63 | + | |
| 64 | + case ADM_TOOL_FORCE_ALL: | |
| 65 | +      classSupernova::$config->db_saveItem('db_version', 0); | |
| 66 | +      require_once('../includes/update.php'); | |
| 67 | + break; | |
| 68 | + | |
| 69 | + case ADM_TOOL_FORCE_LAST: | |
| 70 | +      classSupernova::$config->db_saveItem('db_version', floor(classSupernova::$config->db_version - 1)); | |
| 71 | +      require_once('../includes/update.php'); | |
| 72 | + break; | |
| 73 | + | |
| 74 | + case ADM_TOOL_INFO_PHP: | |
| 75 | + phpinfo(); | |
| 76 | + break; | |
| 77 | + | |
| 78 | + case ADM_TOOL_INFO_SQL: | |
| 79 | +      $template = gettemplate("simple_table", true); | |
| 80 | + | |
| 81 | + $status = array( | |
| 82 | + classLocale::$lang['adm_tool_sql_server_version'] => classSupernova::$db->db_get_server_info(), | |
| 83 | + classLocale::$lang['adm_tool_sql_client_version'] => classSupernova::$db->db_get_client_info(), | |
| 84 | + classLocale::$lang['adm_tool_sql_host_info'] => classSupernova::$db->db_get_host_info(), | |
| 85 | + ); | |
| 86 | + templateAssignTable($template, 'server', $status); | |
| 87 | + | |
| 88 | + templateAssignTable($template, 'status', classSupernova::$db->db_get_server_stat()); | |
| 89 | + templateAssignTable($template, 'params', classSupernova::$db->db_core_show_status()); | |
| 90 | + | |
| 91 | + $template->assign_vars(array( | |
| 92 | + 'PAGE_HEADER' => classLocale::$lang['adm_tool_sql_page_header'], | |
| 93 | + 'COLUMN_NAME_1' => classLocale::$lang['adm_tool_sql_param_name'], | |
| 94 | + 'COLUMN_NAME_2' => classLocale::$lang['adm_tool_sql_param_value'], | |
| 95 | + 'TABLE_FOOTER' => 'test', | |
| 96 | + )); | |
| 97 | + | |
| 98 | + display($template, classLocale::$lang['adm_bn_ttle'], false, '', true); | |
| 99 | + break; | |
| 100 | 100 | |
| 101 | 101 | } | 
| 102 | 102 | |