
<?php
include('sessionStart.php');
//checks user logged in or not
if(isset($_SESSION['admin'])){
$rand = rand(1000,30000)*1000000;
	@header("Location: adminhome.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" />
<title>Untitled Document</title>
<script type="text/javascript">

function validform(theForm)
{
 if(login.user_name.value == "" || login.password.value == "" )
 {
    alert("Enter username and password");
   	return false;
 }
  else
  {
   login.submit();
  }
return true;

}


</script>
</head>

<body>
<div>
<form id="login" name="login" method="post" action="login.php">
                                <table align="center" width="300" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td colspan="2" align="center" valign="middle" style="color:#F00;" class="verdana"></td>
                                  </tr>
                                  <tr>
                                    <td align="right" valign="middle">&nbsp;</td>
                                    <td align="left" valign="middle">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td width="27%" align="right" valign="middle" class="verdana">Username : </td>
                                    <td width="73%" align="left" valign="middle"><input type="text" name="user_name" id="user_name" class="textbox" /></td>
                                  </tr>
                                  <tr>
                                    <td align="right" valign="middle">&nbsp;</td>
                                    <td align="left" valign="middle">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td align="right" valign="middle" class="verdana">Password : </td>
                                    <td align="left" valign="middle"><input type="password" name="password" id="password" class="textbox" /></td>
                                  </tr>
                                  <tr>
                                    <td align="right" valign="middle">&nbsp;</td>
                                    <td align="left" valign="middle">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td colspan="2" align="center" valign="middle">
                                    <input type="submit" value="submit" alt="" width="75" onClick="javascript:return validform(this);" height="25" border="0"  /></td>
                                  </tr>
                                </table>
                              </form>
</div>
</body>
</html>