<?php require_once('Connections/ADPOPi.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/authentication.php'); ?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$Authenticate = new WA_MySQLi_Auth($ADPOPi);
$Authenticate->Action = "authenticate";
$Authenticate->Name = "";
$Authenticate->Table = "sys_user";
$Authenticate->addFilter("usr_id", "=", "s", "".($rs_users->getColumnVal("usr_id")) ."");
$Authenticate->addFilter("usr_pwd", "=", "s", "".($rs_users->getColumnVal("usr_pwd")) ."");
$Authenticate->storeResult("usr_id", "usr");
$Authenticate->storeResult("usr_pwd", "pass");
$Authenticate->storeResult("usr_site_id", "site");
$Authenticate->AutoReturn = true;
$SuccessRedirect = "success.php";
$FailedRedirect = "failure.php";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();
}
?>
<?php
$rs_users = new WA_MySQLi_RS("rs_users",$ADPOPi,1);
$rs_users->setQuery("SELECT * FROM sys_user");
$rs_users->execute();
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>/title>
<link href="CSS/adpop.css" rel="stylesheet" type="text/css">
</head>
<body id="loginbg">
<form METHOD="post" id="login" title="Login"><table class="centered" width="300" border="0" cellpadding="1">
<tbody>
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="20"><font color="#CAC6C6" face="Gotham, Helvetica Neue, Helvetica, Arial, sans-serif" > Please Login </font></td>
</tr>
<tr>
<td bgcolor="#CAC6C6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="26%"> </td>
<td width="8%"> </td>
<td width="66%" colspan="2"> </td>
</tr>
<tr>
<td> Username:</td>
<td width="8%"> </td>
<td width="33%"><input type="text" name="user" id="user"></td>
<td width="33%" rowspan="2"><img src="images/aad_logo_v3_6001.png" width="150" height="55" alt=""/></td>
</tr>
<tr>
<td> Password:</td>
<td> </td>
<td><input type="password" name="pass" id="pass"></td>
</tr>
<tr>
<td colspan="4" height="3"></td>
</tr>
<tr>
<td colspan="1"> <input type="submit" name="submit" id="submit" value="Log In"></td><td></td><td> </td><td align="center"><font size="-1" face="Gotham, Helvetica Neue, Helvetica, Arial, sans-serif">Forgot Password?</font></td>
</tr>
<tr>
<td colspan="4" height="3"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table></form>
</body>
</html>