HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/nyiet8349bzl/Backup/sbc_back/homedir/public_html/ncbm/bsadmin-portal/index.php
<?php
error_reporting(0);
include("../config/connection.php");
$obj = new Connection();
if(@$_SESSION['admin']['user_id']!='')
{
	echo "<script>window.location.href='dashboard.php'</script>";
}
$erroMSG="";
if(isset($_REQUEST['Sign_in'])){
	$mail_id = $_POST['Email'];
	$password=mysql_real_escape_string($_REQUEST['Password']);
	$mdpassword= md5($password);
	//echo $mdpassword; 
	$query = mysql_query("select * from user where user_name='".$mail_id."' and user_password='".$mdpassword."' and role_id='1'");
    $erroMSG='';
	if(mysql_num_rows($query)>0){
		$result = mysql_fetch_array($query);
        $usersession=array();
        $usersession['user_id']=$result['id'];				
        $usersession['user_name']=$result['user_name'];
        $_SESSION['admin']=$usersession;
		echo "<script>window.location='dashboard.php'</script>";
	}else{
		$erroMSG = "Invalid email id or password";
	}
}
?>
<!doctype html>
<html class="fixed">
<head>
<title>Login</title>
		<!-- Basic -->
		<meta charset="UTF-8">
		<meta name="keywords" content="HTML5 Admin Template" />
		<meta name="description" content="Porto Admin - Responsive HTML5 Template">
		<meta name="author" content="okler.net">
		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<!-- Web Fonts  -->
		<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
		<!-- Vendor CSS -->
		<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css" />
		<link rel="stylesheet" href="assets/vendor/magnific-popup/magnific-popup.css" />
		<link rel="stylesheet" href="assets/vendor/bootstrap-datepicker/css/bootstrap-datepicker3.css" />
		<!-- Theme CSS -->
		<link rel="stylesheet" href="assets/stylesheets/theme.css" />
		<!-- Theme Custom CSS -->
		<link rel="stylesheet" href="assets/stylesheets/theme-custom.css">
		<!-- Head Libs -->
		<script src="assets/vendor/modernizr/modernizr.js"></script>	
		<script src="assets/vendor/style-switcher/style.switcher.localstorage.js"></script>
	</head>
	<body>
		<!-- start: page -->
		<section class="body-sign">
			<div class="center-sign">
				<a href="#" class="logo pull-left">
					<img src="assets/images/logo.png" height="75" alt="logo" />
				</a>
				<div class="panel panel-sign">
					<div class="panel-title-sign mt-xl text-right">
						<h2 class="title text-uppercase text-weight-bold m-none"><i class="fa fa-user mr-xs"></i> Sign In</h2>
					</div>
					<div class="panel-body">
						<div  id="errorClass" style="background-color: #FFEBE8; color:#FF0000;font-size:14px; text-align:center;line-height:30px"><?php if($erroMSG!=''){ echo $erroMSG; } ?></div>
						 <form name="acdlogin" action="" method="POST" onsubmit="return valid_login();">
							<div class="form-group mb-lg">
								<label>User Name</label>
								<div class="input-group input-group-icon">
									<input type="text" id="inputEmail" name="Email" placeholder="User Name" maxlength="45" class="form-control input-lg"/>
									<span class="input-group-addon">
										<span class="icon icon-lg">
											<i class="fa fa-user"></i>
										</span>
									</span>
								</div>
							</div>
							<div class="form-group mb-lg">
								<div class="clearfix">
									<label class="pull-left">Password</label>
								</div>
								<div class="input-group input-group-icon">
									<input type="password" id="inputPassword"  name="Password" placeholder="User Password" maxlength="15" class="form-control input-lg"/>
									<span class="input-group-addon">
										<span class="icon icon-lg">
											<i class="fa fa-lock"></i>
										</span>
									</span>
								</div>
							</div>
							<div class="row">
								<div class="col-sm-8">
								</div>
								<div class="col-sm-4 text-right">
									 <input type="submit" class="btn btn-primary hidden-xs" name="Sign_in" value="Sign in"/>
								</div>
							</div>
						</form>
					</div>
				</div>
				
			</div>
		</section>
		<!-- end: page -->
		<!-- Vendor -->
		<script src="assets/vendor/jquery/jquery.js"></script>		
		<script src="assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>		
		<script src="assets/vendor/jquery-cookie/jquery-cookie.js"></script>		
		<script src="assets/vendor/style-switcher/style.switcher.js"></script>		
		<script src="assets/vendor/bootstrap/js/bootstrap.js"></script>		
		<script src="assets/vendor/nanoscroller/nanoscroller.js"></script>		
		<script src="assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>		
		<script src="assets/vendor/magnific-popup/jquery.magnific-popup.js"></script>	
		<script src="assets/vendor/jquery-placeholder/jquery-placeholder.js"></script>
		<!-- Theme Base, Components and Settings -->
		<script src="assets/javascripts/theme.js"></script>
		<!-- Theme Custom -->
		<script src="assets/javascripts/theme.custom.js"></script>
		<!-- Theme Initialization Files -->
		<script src="assets/javascripts/theme.init.js"></script>
		<!-- Analytics to Track Preview Website -->		
		 <script>
		function valid_login(){
	   
			if(document.acdlogin.Email.value == '')
			{
				$("#errorClass").html("Please enter user name");
				document.acdlogin.Email.focus();
				return false;
			}
			
			if(document.acdlogin.inputPassword.value == '')
			{
				 $("#errorClass").html("Please enter password");
				document.acdlogin.inputPassword.focus();
				return false;
			}
		
		}
	</script>
	</body>
</html>