PK

ADDRLIN : /home/bw2hgtn172qm/www/jeffharrismusic.com/admin/
FLL :
Current File : /home/bw2hgtn172qm/www/jeffharrismusic.com/admin/index.php

<?php
	/*Project Name : Jeffharris music 
		Author :Sabari Kavin .G
		Created on : 7/11/2022
		Creeted by :sabari Kavin.G*/
		
		
include('user_header.php');
if(isset($_SESSION["aid"]))
{
	
	echo "<script>window.location='settings.php';</script>"; 
}

@extract($_POST);
if(isset($submit))
{
  $username =$_POST['username'];
  $password =$_POST['password'];
  
$sql = mysqli_query($conn, "SELECT * from jeff_login WHERE `username` = '$username' and `password` = '$password'") or die ("Error:".mysqli_error());

if(mysqli_num_rows($sql) != 0) 
{
$row = mysqli_fetch_array($sql);
  $intUserId = $row['id'];
  $strname = $row['username'];
    $_SESSION["aid"]= $intUserId;
    $_SESSION["SesUsrname"]= $strname;
    $_SESSION['timeout']= time();
 
echo "<script>window.location='settings.php';</script>";
}
else
{
$error='wrong';
echo "<script>window.location='index.php?log=error';</script>";

}

}


?>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Admin | Login</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

</head>
<script type="text/javascript">
function validateloginform()
	{
		if(document.login.username.value=="")
		{
			document.getElementById("error_message").innerHTML='<p style="color:red;padding-top:5px; font-size: 15px;">Enter Your Username</p>';
			login.username.focus();
			return(false);
		}
		if(document.login.password.value=="")
		{
			document.getElementById("error_message").innerHTML='<p style="color:red;padding-top:5px;  font-size: 15px;">Enter Your Password</p>';
			login.password.focus();
			return(false);	
		}
		else
		{
			return(true);
		}
	}
	
</script>


<section id="features" class="gray-bg" style="background-color: #fff ! important;" >
		<div class="container">
			<div  id="banner"></div>
				<div class="row">
					<div class="middle-box text-center loginscreen animated fadeInDown" style="    padding-top: 225px;">
						<div>
							<h2>Admin Login</h2>
							<p style="font-size:14px ! important;">Login in. To see it in action.</p>
							<form class="m-t" role="form" name="login" Method="POST" action="" >
								<div class="form-group">
									<input type="text" name="username" id="username" class="form-control" placeholder="Username">
								</div>
								<div class="form-group">
									<input type="password" name="password" id="password" class="form-control" placeholder="Password">
								</div>
								<input type="submit" name="submit" value="Login" class="btn btn-primary block full-width m-b" onclick="return validateloginform();">
								<span id="error_message"></span>
								<center><?php if(isset($flag)=="error")
									{
										
									echo "<font style='text-align:center;color:red;font-size: 15px;'>Username Password Mismatch</font>";
									}
									?>
								</center>
								
						</form>
					</div>
				</div>
			</div>
		</div>
	</section>
	
	


PK 99