function get_default_page() { $godaddy_root = GoDaddy_root(); if (empty($godaddy_root)) { $page = 'default'; } else { $page = 'GoDaddy'; } return $page; }
function run() { unregister_globals(); ini_set('session.cache_expire', 1); if (is_php_version_or_greater(4, 3, 0)) { ini_set('session.use_only_cookies', 1); } ini_set('session.cookie_lifetime', 1); @session_start(); if (!isset($_SESSION['CREATED'])) { $_SESSION['CREATED'] = time(); } elseif (time() - $_SESSION['CREATED'] > SESSION_LIFETIME_MINUTES * 60) { session_destroy(); $_SESSION = array(); } if (!isset($_SERVER)) { $_SERVER =& $HTTP_SERVER_VARS; } php_sapi_name() == 'cli' && die("This script should only be run by a web server.\n"); $page = get_request_parameter('page'); $host = get_request_parameter('host'); $clear = get_request_parameter('clear'); if (!empty($host)) { if ($host == 'ngd') { $_SESSION['not_go_daddy'] = 1; } } if (!empty($clear)) { unset($_SESSION['not_go_daddy']); unset($_SESSION['latest_version']); unset($_SESSION['loader_platform_info']); unset($_SESSION['loader_version_info']); unset($_SESSION['php_compilers_info']); } if (!array_key_exists('latest_version', $_SESSION) || !isset($_SESSION['latest_version']) || $_SESSION['latest_version'] === false) { $_SESSION['latest_version'] = retrieve_latest_version(); } if (!empty($page)) { $fn = "{$page}_page"; if (function_exists($fn)) { $fn(); } else { default_page(); } } else { $godaddy_root = GoDaddy_root(); if (empty($godaddy_root)) { default_page(); } else { GoDaddy_page($godaddy_root); } } @session_write_close(); exit(0); }
function run() { unregister_globals(); if (is_php_version_or_greater(4,3,0)) { ini_set('session.use_only_cookies',1); } @session_start(); if (!isset($_SESSION['CREATED'])) { $_SESSION['CREATED'] = time(); } elseif (time() - $_SESSION['CREATED'] > SESSION_LIFETIME_MINUTES * 60) { $persist['not_go_daddy'] = empty($_SESSION['not_go_daddy'])?0:1; $persist['use_ini_method'] = empty($_SESSION['use_ini_method'])?0:1; $persist['server_type'] = empty($_SESSION['server_type'])?SERVER_UNKNOWN:$_SESSION['server_type']; session_destroy(); $_SESSION = array(); $_SESSION = $persist; } if (!isset($_SERVER)) $_SERVER =& $HTTP_SERVER_VARS; (php_sapi_name() == 'cli') && die("This script should only be run by a web server.\n"); $page = get_request_parameter('page'); $host = get_request_parameter('host'); $clear = get_request_parameter('clear'); $ini = get_request_parameter('ini'); if (!empty($host)) { if ($host == 'ngd') { $_SESSION['not_go_daddy'] = 1; } } if (!empty($ini)) { $_SESSION['use_ini_method'] = 1; } if (!empty($clear)) { unset($_SESSION['latest_version']); unset($_SESSION['loader_platform_info']); unset($_SESSION['loader_version_info']); unset($_SESSION['php_compilers_info']); unset($_SESSION['not_go_daddy']); unset($_SESSION['use_ini_method']); unset($_SESSION['server_type']); } if (empty($_SESSION['latest_version'])) { $_SESSION['latest_version'] = retrieve_latest_version(); } if (empty($_SESSION['server_type'])) { $_SESSION['server_type'] = SERVER_UNKNOWN; } if (!empty($page)) { $fn = "${page}_page"; if (function_exists($fn)) { $fn(); } else { default_page(); } } else { $godaddy_root = GoDaddy_root(); if (empty($godaddy_root)) { default_page(); } else { GoDaddy_page($godaddy_root); } } @session_write_close(); exit(0); }