<!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=iso-8859-1" />
<title>Login</title>
<script type="text/javascript" src="javascript/jquery.js"></script>
<link rel="icon" href="images/infosollogosmall.gif" type="image/x-icon" />
 <link rel="stylesheet" href="css/style.css"  type="text/css"></link>
<script type="text/javascript">
 $(document).ready(function() {
	  $('#loginname,#pwd').bind("keydown", function(e) {
	 if(e.which==13)
	 $('#main_submit').trigger('click');
	 
 });
	 
	 $("#main_submit").click(function() {
		 if($('#fny option').length<1||$('#cmp option').length<1)
		 jSuccess('Please wait until loading complete..');
		 else
		 {
		 if($.trim($('#loginname').val())!=''&&$.trim($('#pwd').val())!='')
		 {
		  $.post('login_exec.php',$('form').serialize(), function (html) {
            if(html=='bingo')
			{
				window.location.assign('sales/sorder/sorderreg.php');
				}
				else if(html=='whack')
				{	$("#loginerr").html("Sorry Invalid Login");
					 $("#loginerr").animate({
     				 height:'100%'
   					 });
					}
        }); //post ends
		 }
		else
		{
			$("#loginerr").html("Enter Username and Password");
					 $("#loginerr").animate({
     				 height:'100%'
   					 });
			}
		 }
		 
	 });
 });//document ends
</script> 
 <style type="text/css">

  .loginform table{
 border: 1px solid #D7D6D6;
 -webkit-border-radius: 10px;
-moz-border-radius:10px;
border-radius:10px;
 }
 input[type="text"],input[type="password"] {
width: 215px;

	     padding: 8px;
    font-weight: 100;
 }
 
table select{
width: 215px;

padding: 8px;
	 
 }
 #loginerr{
	 color:#078DE6;
	 font-size:1em; 
	 width:100%; 
	 height:0%; 
background-color: #ACA4A4;

	 
 }
</style>
</head>

<body>

<div class="main">
<div class="page">
<div class="header">
<div class="banner">
<p class="cmpname">MANUFACTURING AND INVENTORY SOLUTIONS</p>
</div>
</div>
<div>
<div >
<form class="loginform" action="" method="">
  <table width="500px" height="325px" border="0" cellpadding="1" cellspacing="0">

<tr>
  <td colspan="2" align="center"  height="40px"><div id="loginerr"></div></td>
  </tr>
<tr><td width="198" align="center">Login Name:</td><td width="294" align="left"><input type="text" name="loginname" id="loginname" class="nocaps"  autofocus="autofocus" /></td></tr>
<tr><td align="center">Password:</td><td align="left"><input  name="pwd" id="pwd" type="password" class="nocaps"/></td></tr>

<tr align="center"><td align="center">Fin Year:</td>
<td align="left"><select name="fny" id="fny">
</select> </td></tr>
<tr><td align="center">Company:</td>
<td align="left"><select name="cmp" id="cmp">
</select></td></tr>
<tr><td align="center">Branch:</td>
<td align="left"><select name="branch" id="branch">
	
</select></td></tr>
<tr>
  <td rowspan="2" align="left" valign="bottom"><span style="border-top:none; margin-left:15px">Version:2.0.1</span></td>
  <td align="right">
   
      <input name="submit" type="button" id="main_submit" class="login button" value="LOGIN" style="width:auto;margin-right: 80px;" />

     </td>
</tr>
<tr>
  <td align="left" height="10px" style="border-top:none"><a href="attendance.php" target="_new">Click here</a> to register your attendance</td>
</tr>
 </table>
</form>
</div>




</div>



</div>
</div>
<script language="javascript" type="text/javascript">

  $(window).load(function() {
    $.post("data.php",function(data){
	var str=data.split('@@@');
	var fny=str[0].split('#fny#');
	var cmp=str[1].split('#cmp#');
	var branch=str[2].split('#branch#');
	for(i=0;i<fny.length-1;i++)
	$("#fny").append('<option>'+fny[i]+'</option>');
	for(i=0;i<cmp.length-1;i++)
	$("#cmp").append('<option>'+cmp[i]+'</option>');
	for(i=0;i<branch.length-1;i++)
	$("#branch").append('<option>'+branch[i]+'</option>');
  });
  });


</script>
<?php include('footer.php'); ?>
