
into validate.php. = They (config/strings) were used eveywhere validate was used = Validate already included auth.php (which included i18n.php) = Now including just one file does a lot of stuff including loading SM config, validating data, and loading internationalization = Since we only include config.php once and not dozens of times, we could have a slight speed increase
31 lines
658 B
PHP
31 lines
658 B
PHP
<?php
|
|
|
|
/**
|
|
** auth.php
|
|
**
|
|
** Contains functions used to do authentication.
|
|
**
|
|
** $Id$
|
|
**/
|
|
|
|
if (defined ('auth_php'))
|
|
return;
|
|
define ('auth_php', true);
|
|
|
|
include '../functions/i18n.php';
|
|
|
|
function is_logged_in () {
|
|
if (session_is_registered('user_is_logged_in'))
|
|
return;
|
|
|
|
echo "<html><body bgcolor=\"ffffff\">\n";
|
|
echo "<br><br>";
|
|
echo "<center>";
|
|
echo "<b>"._("You must be logged in to access this page.")."</b><br>";
|
|
echo "<a href=\"../src/login.php\" target=\"_top\">"._("Go to the login page")."</a>\n";
|
|
echo "</center>";
|
|
echo "</body></html>\n";
|
|
exit;
|
|
}
|
|
|
|
?>
|