/* Decoded by unphp.net */ include("./includes/connection.php"); include("./includes/header.php"); $controlforminput = ''; if(!isset($_SESSION['userinfo'])){ @session_destroy(); header("Location: ../index.php?InvalidPrivilege=yes"); } if(isset($_SESSION['userinfo']['Storage_And_Supply_Work'])){ if($_SESSION['userinfo']['Storage_And_Supply_Work'] != 'yes'){ header("Location: ./index.php?InvalidPrivilege=yes"); } }else{ @session_destroy(); header("Location: ../index.php?InvalidPrivilege=yes"); } ;echo '







'; if(isset($_POST['submittedSupervisorInformationForm'])){ $Supervisor_Username = mysqli_real_escape_string($conn,$_POST['Supervisor_Username']); $Supervisor_Password = mysqli_real_escape_string($conn,md5($_POST['Supervisor_Password'])); $Sub_Department_Name = $_POST['Sub_Department_Name']; if($Supervisor_Username != ''&&$Supervisor_Username != null &&$Supervisor_Password != ''&&$Supervisor_Password != null &&$Sub_Department_Name != ''&&$Sub_Department_Name != null){ $query="select * from tbl_branches b, tbl_branch_employee be, tbl_employee e, tbl_privileges p where b.branch_id = be.branch_id and e.employee_id = be.employee_id and e.employee_id = p.employee_id and p.Given_Username = '{$Supervisor_Username}' and p.Given_Password = '{$Supervisor_Password}' and p.Session_Master_Priveleges = 'yes'; "; $result= mysqli_query($conn,$query); $no=mysqli_num_rows($result); if($no>0){ $row=mysqli_fetch_assoc($result); @session_start(); $_SESSION['Storage_Supervisor'] = $row; $_SESSION['Storage'] = $Sub_Department_Name; $select_id = mysqli_query($conn,"select Sub_Department_ID, Sub_Department_Name from tbl_sub_department where sub_department_name = '$Sub_Department_Name'") or die(mysqli_error($conn)); $num_rows = mysqli_num_rows($select_id); if($num_rows >0){ $row2 = mysqli_fetch_assoc($select_id); $_SESSION['Storage_Info'] = $row2; } header("Location:./storageandsupply.php?StorageAndSupply=StorageAndSupplyThisPage"); }else{ echo ""; } }else{ echo ""; } } ;echo '
STORAGE AND SUPPLY SUPERVISOR AUTHENTICATION
Supervisor Username
Supervisor Password
Sub Department
CANCEL
'; include("./includes/footer.php"); ;echo '';