<?php
	include("./function.php");		//ฟังก์ชั่น
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>
<body bgcolor="#F4F4F4" leftmargin="1" topmargin="1" marginwidth="1" marginheight="1">
<div align="center">
  <table width="100%" height="100%" cellpadding="0" cellspacing="1">
    <tr> 
      <td height="223" align="center" valign="middle"><table width="400" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
          <tr> 
            <td height="19" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#C0E824">
                <form method=POST action="checkadmin.php" name="login_form" onSubmit="return check()">
                  <tr> 
                    <td height="23" align="center"> <b><font color="#000000" size="1" face="MS Sans Serif, AngsanaUPC, CordiaUPC" class=size3>Login 
                      เข้าระบบ </font></b></td>
                  </tr>
                  <tr> 
                    <td bgcolor="#C2DCEF"> <table border=0 cellpadding=2 cellspacing=1 width="100%" align="center">
                        <tr bgcolor="#E5E5FF"> 
                          <td bgcolor="#E8F4CA"> <table border=0 width="100%" cellpadding="3" cellspacing="0">
                              <tr>
                                <td align="right">&nbsp;</td>
                                <td><select name="select">
                                    <option value="admin">Admin</option>
                                    <option value="user" selected>User</option>
                                  </select></td>
                              </tr>
                              <tr> 
                                <td width="132" align="right"><b><font color="#000000" size="1" face="MS Sans Serif, AngsanaUPC, CordiaUPC">Username 
                                  : </font></b></td>
                                <td width="236"> <input size=26 type=text name="username" maxlength=30 class=violet> 
                                </td>
                              </tr>
                              <tr> 
                                <td align="right"><b><font color="#000000" size="1" face="MS Sans Serif, AngsanaUPC, CordiaUPC">Password 
                                  : </font></b></td>
                                <td> <input size=26 type=password name="password" maxlength=30 class=violet> 
                                </td>
                              </tr>
                            </table></table></td>
                  </tr>
                  <tr> 
                    <td align="center"><b> 
                      <script language="JavaScript">
function check()
{
      var v1 = document.login_form.username.value;
      var v2 = document.login_form.password.value;

        if (v1.length==0)
           {
           alert("กรุณาป้อน Username ด้วยครับ");
           document.login_form.username.focus();           
           return false;
           }
        else if (v2.length==0)
           {
           alert("กรุณาป้อน password ด้วยครับ") ;
           document.login_form.password.focus();           
           return false;
           }
        else
           return true;
}
</script>
                      <input type=submit value='เข้าระบบ' name="submit">
                      <input type=reset value='เคลียร์' name="reset">
                      </b> </td>
                  </tr>
                </form>
              </table></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <br>
  <br>

</div>
</body>
</html>
