79 lines
2.7 KiB
PHP
79 lines
2.7 KiB
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="css/white.css" />
|
|
<link rel="alternate stylesheet" type="text/css" media="screen" title="black" href="css/black.css" />
|
|
<link rel="alternate stylesheet" type="text/css" media="screen" title="white" href="css/white.css" />
|
|
<link rel="alternate stylesheet" type="text/css" media="screen" title="blue" href="css/blue.css" />
|
|
<script type="text/javascript">
|
|
window.onload=function(){
|
|
var formref=document.getElementById("switchform")
|
|
indicateSelected(formref.switchcontrol)
|
|
}
|
|
</script>
|
|
<!--This script should appear below your LINK stylesheet tags -->
|
|
|
|
<script src="styleswitch.js" type="text/javascript">
|
|
|
|
/***********************************************
|
|
* Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
|
|
* This notice MUST stay intact for legal use
|
|
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
|
|
***********************************************/
|
|
|
|
</script>
|
|
|
|
<?php include 'config.php';?>
|
|
<?php echo "<title>$yourname's Server Access</title>";?>
|
|
|
|
</head>
|
|
|
|
<?php
|
|
$username = "$user";
|
|
$password = "$pass";
|
|
$nonsense = "superkey";
|
|
|
|
if (isset($_COOKIE['PrivatePageLogin'])) {
|
|
if ($_COOKIE['PrivatePageLogin'] == md5($password.$nonsense)) {
|
|
?>
|
|
<frameset cols="200,*,300" frameborder="0" border="0" framespacing="0">
|
|
<frame src="left.php" name="left" >
|
|
<frame src="main.php" name="main" >
|
|
<frame src="right.php" name="right" >
|
|
</frameset>
|
|
<?php
|
|
exit;
|
|
} else {
|
|
echo "Bad Cookie.";
|
|
exit;
|
|
}
|
|
}
|
|
|
|
if (isset($_GET['p']) && $_GET['p'] == "login") {
|
|
if ($_POST['user'] != $username) {
|
|
echo "Sorry, that username does not match.";
|
|
exit;
|
|
} else if ($_POST['keypass'] != $password) {
|
|
echo "Sorry, that password does not match.";
|
|
exit;
|
|
} else if ($_POST['user'] == $username && $_POST['keypass'] == $password) {
|
|
setcookie('PrivatePageLogin', md5($_POST['keypass'].$nonsense));
|
|
header("Location: $_SERVER[PHP_SELF]");
|
|
} else {
|
|
echo "Sorry, you could not be logged in at this time.";
|
|
}
|
|
}
|
|
?>
|
|
Home Server Logon.
|
|
|
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?p=login" method="post">
|
|
<label><input type="text" name="user" id="user" /> Name</label><br />
|
|
<label><input type="password" name="keypass" id="keypass" /> Password</label><br />
|
|
<input type="submit" id="submit" value="Login" />
|
|
</form>
|
|
<body>
|
|
</body>
|
|
</html>
|