WebEdit Pro requires Microsoft Internet Explorer 5.5 or above
Please visit Microsoft to download the latest version of Internet Explorer
", "");
} else if ($ToDo == "PrintVersion") {
PrintVersion();
} else if ($ToDo == "ShowHelp") {
ShowHelp();
} else {
Pass();
}
// Don't print the footer if editing a page...
$footerless_actions = array (
'Edit', 'ShowHelp', 'SavePage',
);
if (!in_array($ToDo, $footerless_actions)) {
PrintFooter();
}
// Flush the output buffer
ob_end_flush();
//*************************************************************
// Start Functions
//*************************************************************
/**
* DoLogin
* Check a users credentials and log them in if they are a valid user
*
* @return void
*/
function DoLogin()
{
$loginError = false;
$Username = $_POST['ezy_username'];
$Password = $_POST['ezy_password'];
PrintPageHedaer();
// should be array_key_exists for PHP version 4.1 and above
if (array_key_exists($Username, $GLOBALS['users'])) {
if ($Password == $GLOBALS['users'][$Username][0]) {
$_SESION['auth'] = true;
$_SESSION['access'] = true;
$_SESSION['StartDir'] = $GLOBALS['users'][$Username][1];
$_SESSION['ImageDir'] = $GLOBALS['users'][$Username][2];
$x = str_replace(' ','',$GLOBALS['users'][$Username][3]);
$_SESSION['ExcludeDirs'] = explode(',',$x);
} else {
$loginError = true;
}
} else {
$loginError = true;
}
if ($loginError == true) {
PrintHeader();
PrintError("Login","Incorrect Login / Password combination
Please try again", "");
}
}
/**
* PrintError
* Display an error an die
*
* @param string $str_error_header The title of the errror
* @param string $str_error_message The description of the error
* @param string $str_system_message An additional message to display after the
* description of the error
*
* @return void
*/
function PrintError($str_error_header, $str_error_message, $str_system_message)
{
// Define this variable as static so that if we get an error about the
// footer the first time we can skip it the second time, avoiding an
// infinite loop
static $bool_footer_error= false;
if ($str_error_header == '') {
$str_error_header = 'Error';
}
if ($str_error_message == '') {
$str_error_message = 'A system error has occured. Could not continue.';
}
?>
|
|
|||