|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/public_html/imagemanager/ |
Upload File : |
<?php
// Do login
$msg = "";
if (isset($_REQUEST['submitBtn'])) {
// If password match, then set login
if ($_REQUEST['login'] == "demo" && $_REQUEST['password'] == "demo") {
// Set session
session_start();
$_SESSION['isLoggedIn'] = true;
$_SESSION['user'] = $_REQUEST['login'];
// Redirect
header("location: images.php?" . $_SERVER['QUERY_STRING']);
die;
} else
$msg = "Wrong username/password";
}
?>
<html>
<head>
<title>Sample login page</title>
<link href="themes/default/css/general.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript">
<!--
// Remove frameset
if (top.location != location)
top.location.href = document.location.href;
-->
</script>
</head>
<body>
<table border="0" width="100%" height="100%">
<tr height="100%">
<td height="100%" valign="middle" width="100%" align="middle">
<table border="0">
<tr>
<td><form method="post">
<fieldset style="width: auto;">
<legend align="left">Image Manager Login</legend>
<table border="0">
<tr>
<td>Username: </td>
<td><input type="text" name="login" value="" class="inputText" /></td>
</tr>
<tr>
<td>Password: </td>
<td><input type="password" name="password" value="" class="inputText" /></td>
</tr>
</table>
<br />
<input type="submit" name="submitBtn" value="Login" class="button" />
</fieldset>
<br style="clear: both;" />
<?php
if ($msg != "")
echo $msg;
?>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>