<?php
include("include/dbc.php");
include("include/connect.php");
session_start();
$error="style='display:none;'";
$submitcheck=$_POST['submit'];
if($submitcheck==1)
{
if($_POST){
$user_name=addslashes($_POST['user_name']);
$password=addslashes($_POST['password']);
$query1=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='1'");
$query2=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='2'");
$query3=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='3'");
$query4=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='4'");
$query5=mysql_query("SELECT * FROM tbl_login WHERE user_name = '$user_name' and password='$password' and user_level='5'");
if(empty($query1)){
echo "Invalid User ID or Password";
}
else{
header("Location:Admin/home.php");
}
if(empty($query2)){
echo "Invalid User ID or Password";
}
else{
header("Location:Zone/home.php");
}
if(empty($query3)){
echo "Invalid User ID or Password";
}
else{
header("Location:Circle/home.php");
}
if(empty($query4)){
echo "Invalid User ID or Password";
}
else{
header("Location:Division/home.php");}
if(empty($query5)){
echo "Invalid User ID or Password";
}
else{
header("Location:Sub-div/home.php");}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title>Assam Power Distribution Company Limited</title>
<style type="text/css">
body
{
background-image:url(images/background2.jpg);
margin:0px;
font-family:arial,helvetica,tahoma,georgia;
}
.container
{
width:950px;
height:auto;
position:relative;
margin-left:auto;
margin-right:auto;
}
#header
{
width:950px;
height:102px;
margin-right:0px;
margin-left:0px;
margin-top: 20px;
border-radius: 11px 10px 10px 11px;
position:relative;
background:url(images/header.jpg) no-repeat;
}
/* Styling the slideshow */
#loginContainer{
width:500px;
height:500px;
position:absolute;
margin:30px auto 30px;
margin-left:215px;
opacity: 50;
}
#login_user{
border-radius: 40px 0px 40px 0px;
position:absolute;
height:300px;
width:490px;
background-image:url("images/Grunge_Backgrounds___Paper_by_zerocustom1989.png") ;
margin:10px 0 0 10px;
z-index:100;
-moz-box-shadow:0 0 10px #111;
-webkit-box-shadow:0 0 10px #111;
box-shadow:0 0 10px #111;
}
.roundedCornerMinimalDark
{
border-radius: 7px 7px 7px 7px;
margin-left: 40px;
float: left;
margin-bottom: 20px;
padding: 20px;
width: 380px;
}
form
{
float: left;
margin: 0;
padding: 0;
}
.span-10
{
width: 390px;
}
.roundedCornerMinimalDark p
{
margin-top: 10px;
}
label
{
color: #F1E8E3;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
margin-bottom: 5px;
}
input.span-10[type="text"]
{
border-radius: 7px 7px 7px 7px;
width: 368px;
}
input.span-10[type="password"]
{
border-radius: 7px 7px 7px 7px;
width: 368px;
}
input[type="text"], input[type="password"], textarea, input.text
{
background: url("images/nav-bg.jpg") no-repeat scroll 0 0 transparent;
border: 1px solid #221D1A;
color: #3C352F;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
height: 20px;
margin-bottom: 15px;
padding: 5px;
}
#submit
{
clear: left;
float: left;
margin-top: 5px;
margin-bottom: 5px;
}
.sharedLinks a
{
display: block;
}
.clear
{
clear: both;
}
#contentBottomMinimal
{
background: url("images/nav-bg.jpg") no-repeat scroll 0 0 transparent;
height: 8px;
margin: 0 auto;
padding-bottom: 72px;
width: 476px;
}
#footer
{
height: 152px;
width: auto;
background:url(images/footerbck.png) repeat-x scroll 0 0 transparent;
margin-top:400px;
margin-left: -30px;
margin-right: 0px;
}
#copy
{
width: auto;
height: auto;
padding: 0px 0px 0px px;
overflow: hidden; /* important */
font-family:LucidaGrande, Lucida Sans, Arial;
font-size:10px;
text-align: justify;
color: ##000000;
margin: 135px 0px 0px 1130px;
position: absolute;
}
</style>
</head>
<body>
<div class="container">
<div id="header">
</div>
<div id="loginContainer">
<div id="login_user">
<div class="roundedCornerMinimalDark">
<form id="user_new" class="user_new" method="post" accept-charset="UTF-8">
<div class="span-10">
<p class="span-10">
<label>User Name:</label>
<br/><br/>
<input id="user_name" class="span-10" type="text" value="" size="30" name="user_name" autocomplete="off">
<br>
<label>Password:</label>
<br />
<br/>
<input id="password" class="span-10" type="password" size="30" name="password" autocomplete="off">
<br/><br/>
<input id="submit" type="image" src="images/button-sign-in-submit.png" alt="Sign In">
<input type="hidden" name="submit" value="1">
</p>
</div>
</form>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="copy">
© Copyright APDCL ® 2012. All rights reserved.
</div>
</div>
</div>
</body>
</html>
utpal407 0 Newbie Poster
utpal407 0 Newbie Poster
Dani 4,329 The Queen of DaniWeb Administrator Featured Poster Premium Member
diafol
weekendrockstar 12 Junior Poster in Training
utpal407 0 Newbie Poster
utpal407 0 Newbie Poster
diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.