<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<?php require_once('../Connections/diamond.php');?>
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?><?php
if ((((isset($_POST["autologinoption"]))?$_POST["autologinoption"]:"") != "")) {
setcookie("AutoLoginPWD", "".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if ((((isset($_POST["autologinoption"]))?$_POST["autologinoption"]:"") != "")) {
setcookie("AutoLoginUN", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if ((((isset($_POST["remembermeoption"]))?$_POST["remembermeoption"]:"") != "")) {
setcookie("RememberMePWD", "".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if ((((isset($_POST["remembermeoption"]))?$_POST["remembermeoption"]:"") != "")) {
setcookie("RememberMeUN", "".((isset($_POST["username"]))?$_POST["username"]:"") ."", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if (isset($_POST["LogIn_x"]) && !isset($_POST["remembermeoption"])) {
setcookie("RememberMePWD", "", time()+(60*60*24*30), "/", "", 0);
}
?><?php
if (isset($_POST["LogIn_x"]) && !isset($_POST["remembermeoption"])) {
setcookie("RememberMeUN", "", time()+(60*60*24*30), "/", "", 0);
}
?>
<?php
if(isset($_POST["LogIn_x"])){
$WA_Auth_Parameter = array(
"connection" => $diamond,
"database" => $database_diamond,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"username".$WA_Auth_Separator."password"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["username"]))?$_POST["username"]:"") ."".$WA_Auth_Separator."".((isset($_POST["userpassword"]))?$_POST["userpassword"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"userID"),
"sessionNames" => explode($WA_Auth_Separator,"userID"),
"successRedirect" => "index.php",
"failRedirect" => "adminLogin.php",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Log In</title>
<link href="../WA_SecurityAssist/styles/Modular_Slate.css" rel="stylesheet" type="text/css" />
<link href="../WA_SecurityAssist/styles/Verdana.css" rel="stylesheet" type="text/css" />
<link href="adminMain.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #A99A6B;
}
-->
</style></head>
<body>
<div id="LogInContainer" class="WAATK">
<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" name="WAATKLogInForm" id="WAATKLogInForm">
<h1 class="heading"><br>
diamond.com Admin Login<br>
<br>
</h1>
<table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="WAATKDataTable">
<tr>
<th><div align="right">User name</div></th>
<td><div align="left">
<input type="text" class="WAATKTextField" name="username" value="<?php echo((isset($_COOKIE["RememberMeUN"]) && isset($_COOKIE["RememberMePWD"]))?$_COOKIE["RememberMeUN"]:"") ?>" />
</div></td>
</tr>
<tr>
<th><div align="right">Password</div></th>
<td><div align="left">
<input type="password" class="WAATKTextField" name="userpassword" value="<?php echo((isset($_COOKIE["RememberMePWD"]))?$_COOKIE["RememberMePWD"]:"") ?>" />
</div></td>
</tr>
<tr>
<th class="WAATKDataTableHeader"><div align="right">
<input type="checkbox" name="remembermeoption" <?php echo((isset($_COOKIE["RememberMeUN"]))?"checked":"") ?> value="1" />
</div></th>
<td class="WAATKDataTableCell"><div align="left">Remember me</div></td>
</tr>
<tr>
<th class="WAATKDataTableHeader"><div align="right">
<input type="checkbox" name="autologinoption" value="1" />
</div></th>
<td class="WAATKDataTableCell"><div align="left">Auto log in</div></td>
</tr>
</table>
<div class="WAATKButtonRow">
<input type="image" hspace="0" vspace="0" border="0" name="LogIn" id="LogIn" value="Log In" alt="Log In" src="../WA_SecurityAssist/images/Slate/Modular_login.gif" />
</div>
</form>
</div>
</body>
</html>