Código PHP:
// redirect to login page if administrator is not yet logged in
if (!tep_session_is_registered('admin')) {
$redirect = false;
$current_page = basename($PHP_SELF);
// if the first page request is to the login page, set the current page to the index page
// so the redirection on a successful login is not made to the login page again
if ( ($current_page == FILENAME_LOGIN) && !tep_session_is_registered('redirect_origin') ) {
$current_page = FILENAME_DEFAULT;
$HTTP_GET_VARS = array();
}
if ($current_page != FILENAME_LOGIN) {
if (!tep_session_is_registered('redirect_origin')) {
tep_session_register('redirect_origin');
$redirect_origin = array('page' => $current_page,
'get' => $HTTP_GET_VARS);
}
// try to automatically login with the HTTP Authentication values if it exists
if (!tep_session_is_registered('auth_ignore')) {
if (isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_USER']) && isset($HTTP_SERVER_VARS['PHP_AUTH_PW']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_PW'])) {
$redirect_origin['auth_user'] = $HTTP_SERVER_VARS['PHP_AUTH_USER'];
$redirect_origin['auth_pw'] = $HTTP_SERVER_VARS['PHP_AUTH_PW'];
}
}
$redirect = true;
}
if (!isset($login_request) || isset($HTTP_GET_VARS['login_request']) || isset($HTTP_POST_VARS['login_request']) || isset($HTTP_COOKIE_VARS['login_request']) || isset($HTTP_SESSION_VARS['login_request']) || isset($HTTP_POST_FILES['login_request']) || isset($HTTP_SERVER_VARS['login_request'])) {
$redirect = true;
}
if ($redirect == true) {
tep_redirect(tep_href_link(FILENAME_LOGIN, (isset($redirect_origin['auth_user']) ? 'action=process' : '')));
}
unset($redirect);
}
Código PHP:
if ($current_page != FILENAME_LOGIN && ($current_page != 'invoice.php'))
Por si las dudas, dejo una página en donde está la documentación de las funciones de OsCommerce: [URL="http://www.oscdox.com/crossx/nav.html?_functions/index.html"]Documentación[/URL]
Desde ya muchas gracias si pueden ayudarme