<?php


include("include/db.php");
ob_start();
session_start();
if($_POST['Login']=="Login") 
{ 
	 $sql="select * from user_creation where user_name='$_POST[user]' And password='$_POST[password]'  and status='Yes' and delete_status!='1'";
	    $rs=mysql_query($sql);
	    $rscount=mysql_num_rows($rs);
	    if($rscount!=0)
		{
		while($rsdata=mysql_fetch_object($rs))
		{
			$_SESSION['login_user_id']=$rsdata->user_id;
			$_SESSION['user_type']=$rsdata->user_type;
			$_SESSION['login_user_name']=$rsdata->user_name;
			$_SESSION['login_pass_word']=$rsdata->password;
			echo "<script>window.location.href='main_fram.php?file=dashboard'</script>";
		}
		}
		else
		{
			echo "<script>alert('Try Again!!!!')</script>";
		}
		/*if($_SESSION['login_user_name']=='admin')
		{
		include("database_backups/backup.php");
		}*/
} 

?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SRI AMMAN DIGITAL PRINTS</title>
<link href="css/login_form_css.css" type="text/css" rel="stylesheet" />
</head>
<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css" />
<script src="js/jquery/jquery.js" type="text/javascript"></script>
<script src="js/jquery/jquery-1.8.2.js"></script>
<script src="js/jquery/jquery-ui.js"></script>
<script language="javascript" type="text/javascript" src="js/login_form_ajax.js"></script>
<BODY class="login_bg" style="background-image:url(img/tcat.png); background-repeat:repeat !important;">
<div class="container">
      <div id="login">
        <h2><span class="fontawesome-lock"></span>Log In</h2>
        <form id="login_form" name="login_form" action="#" method="POST">
          <fieldset>
            <p ><input type="text" id="user" name="user" placeholder="Username"></p>                     
            <p><input type="password" id="password" name="password" placeholder="Password"></p>
            <p><div id="login_type_div"></div></p>
            <p><div id="login_type_div"></div></p>
            <p><input type="submit" value="Login" id="Login" name="Login"></p>
          </fieldset>
        </form>
      </div>
    </div>
<table width="100%">
<tr>
<td>
<?php echo $msg;?>
</td>
</tr>
</table>
</body>
</html>
