Location: PHPKode > projects > Guild DKP System > dkpsystem1.4/includes/admin/login.php
<?php
$loginStatus = "<font color='#FF6600'>Pending</font>";
$username = stripslashes($_POST[txtUsername]);
$password = stripslashes($_POST[txtPassword]);
$sql = $db->query("SELECT id FROM dkp_login WHERE username=\"$username\" AND password=\"$password\"");
if($db->count_rows($sql) > 0) {
	//User logged in
	session_register("login");
	$_SESSION[username] = $username;
	$loginStatus = "<font color='#006600'>Valid</font>";
}
else {
	if(session_is_registered("login")) {
		session_unregister("login");
	}
	$loginStatus = "<font color='#FF0000'>Failed</font>";
}
?>
<meta http-equiv="refresh" content="2;url=?s=points">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
  <tr>
    <td bgcolor="#003366"><font color="#FFFFFF" size="2" face="Tahoma"><strong>Login</strong></font></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
  <tr> 
    <td bgcolor="#003366"><font color="#CCCCCC" size="1" face="Tahoma"><strong>Status</strong></font></td>
  </tr>
  <tr> 
    <td bgcolor="#999999"><font color="#000000" size="1" face="Tahoma"><strong>Please 
      wait while your account is being validated <u><?php echo $username; ?></u>.<br>
      You will be automatically re-directed to the main page.</strong></font></td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC"><strong><font color="#000000" size="1" face="Tahoma">Result: 
      <?php echo $loginStatus; ?> </font></strong></td>
  </tr>
</table>
Return current item: Guild DKP System