initial commit of file from CVS for smeserver-webshare on Sat Sep 7 21:15:27 AEST 2024
This commit is contained in:
34
root/opt/webshare-tools/phpfm/incl/header.inc.php
Normal file
34
root/opt/webshare-tools/phpfm/incl/header.inc.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
list($seconds, $microseconds) = explode(" ", microtime());
|
||||
$time_start = $seconds + $microseconds;
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
header("Content-Type: text/html; charset=$StrLanguageCharset");
|
||||
|
||||
if (isset($session_save_path)) session_save_path($session_save_path);
|
||||
ini_set('magic_quotes_gpc', 1);
|
||||
ini_set('session.use_trans_sid', 0);
|
||||
error_reporting(E_ALL);
|
||||
clearstatcache();
|
||||
session_start();
|
||||
|
||||
$base_url = "?".SID."&";
|
||||
|
||||
if (isset($_POST['input_username']) && isset($_POST['input_password']) && $_POST['input_username'] == $username && md5($_POST['input_password']) == md5($password))
|
||||
{
|
||||
$_SESSION['session_username'] = $_POST['input_username'];
|
||||
$_SESSION['session_password'] = md5($_POST['input_password']);
|
||||
}
|
||||
else if (isset($_GET['action']) && $_GET['action'] == "logout")
|
||||
{
|
||||
$_SESSION = array();
|
||||
session_destroy();
|
||||
setcookie(session_name(),"",0,"/");
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user