/** * 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(); }
/** * Redirect to another page or site * * @param string $sUrl * @return string */ function redirect($sUrl) { if ( ( strpos($sUrl, "\n") !== false ) || ( strpos($sUrl, "\r") !== false ) ) { $aPages = oos_get_pages(); $sUrl = oos_href_link($aPages['main'], null, 'NONSSL', false); } if ( strpos($sUrl, '&') !== false ) { $sUrl = str_replace('&', '&', $sUrl); } header('Location: ' . $sUrl); oos_exit(); }
/** * Redirect to another page or site * * @param string $sUrl * @return string */ function redirect($sUrl) { if (strpos($sUrl, "\n") !== false || strpos($sUrl, "\r") !== false) { $aFilename = oos_get_filename(); $aModules = oos_get_modules(); $sUrl = oos_href_link($aModules['main'], $aFilename['main'], null, 'NONSSL', false); } if (strpos($sUrl, '&') !== false) { $sUrl = str_replace('&', '&', $sUrl); } header('Location: ' . $sUrl); oos_exit(); }