/** * Redirect to another page or site * * @param $sUrl * @return string */ function oos_redirect($sUrl) { if (ENABLE_SSL == '1') { if (strtolower(oos_server_get_var('HTTPS')) == 'on' || oos_server_get_var('HTTPS') == '1' || oos_server_has_var('SSL_PROTOCOL')) { // We are loading an SSL page if (substr($sUrl, 0, strlen(OOS_HTTP_SERVER)) == OOS_HTTP_SERVER) { // NONSSL url $sUrl = OOS_HTTPS_SERVER . substr($sUrl, strlen(OOS_HTTP_SERVER)); // Change it to SSL } } } // clean URL if (strpos($sUrl, '&') !== false) { $sUrl = str_replace('&', '&', $sUrl); } if (strpos($sUrl, '&&') !== false) { $sUrl = str_replace('&&', '&', $sUrl); } header('Location: ' . $sUrl); oos_exit(); }
require 'includes/oos_define.php'; // Load server utilities require 'includes/functions/function_server.php'; require 'includes/core/classes/utilities_class.php'; require 'includes/core/classes/core_api_class.php'; // redirect to the installation module if DB_SERVER is empty if (strlen(OOS_DB_TYPE) < 1) { if (is_dir('install')) { header('Location: install/step.php'); exit; } } // set the type of request (secure or not) $request_type = 'NONSSL'; if (ENABLE_SSL == '1') { if (strtolower(oos_server_get_var('HTTPS')) == 'on' || oos_server_get_var('HTTPS') == '1' || oos_server_has_var('SSL_PROTOCOL')) { $request_type = 'SSL'; } } // require the list of project filenames require 'includes/oos_filename.php'; // require the list of project database tables require 'includes/oos_tables.php'; // define general functions used application-wide require 'includes/functions/function_global.php'; require 'includes/functions/function_kernel.php'; require 'includes/functions/function_input.php'; require 'includes/functions/function_output.php'; require 'includes/functions/function_encoded.php'; // require the password crypto functions require 'includes/functions/function_password.php';
// redirect to the installation module if DB_SERVER is empty if (strlen(OOS_DB_TYPE) < 1) { if (is_dir('install')) { header('Location: install/step.php'); exit; } } // set the type of request (secure or not) $request_type = 'NONSSL'; if (ENABLE_SSL == '1') { if (strtolower(oos_server_get_var('HTTPS')) == 'on' || (oos_server_get_var('HTTPS') == '1') || oos_server_has_var('SSL_PROTOCOL')) { $request_type = 'SSL'; } } // require the list of project filenames require 'includes/oos_filename.php'; // require the list of project database tables require 'includes/oos_tables.php'; // define general functions used application-wide require 'includes/functions/function_compatibility.php'; require 'includes/functions/function_global.php'; require 'includes/functions/function_kernel.php'; require 'includes/functions/function_input.php';
/** * Gets the current protocol * * Returns the HTTP protocol used by current connection, it could be 'http' or 'https'. * * Last Editor: Author: r23 * @author Marco Canini <*****@*****.**> * @access public * @return string current HTTP protocol */ function oos_server_get_protocol() { $sProtocol = 'http'; if (ENABLE_SSL == '1') { if (strtolower(oos_server_has_var('HTTPS')) == 'on' || oos_server_has_var('SSL_PROTOCOL')) { $sProtocol = 'https'; } } return $sProtocol . '://'; }