ok
Direktori : /home2/globaltriumphfou/public_html/admin_panel/ |
Current File : /home2/globaltriumphfou/public_html/admin_panel/operation-l.php |
<?php session_start(); $pre="TrendData_"; include "dbconn.php"; $datetime=date('Y-m-d H:i:s'); $operation=trim($_POST['operation']); switch($operation){ case 'Login': $email=mysqli_real_escape_string($connection,trim($_POST['email'])); $password=mysqli_real_escape_string($connection,trim($_POST['password'])); $sqlquery=mysqli_query($connection,"select * from admin_login where Admin_Id='$email' and Admin_Pass='$password'"); $qryfetch=mysqli_fetch_assoc($sqlquery); if(mysqli_num_rows($sqlquery)==1) { $A_Id=$qryfetch['A_Id']; $_SESSION[$pre.'userid']=$qryfetch['Admin_Id']; $_SESSION[$pre.'username']=$qryfetch['Admin_Name']; $_SESSION[$pre.'uid']=$A_Id; $_SESSION[$pre.'utype']=$qryfetch['Admin_Type']; $_SESSION[$pre.'ustatus']=$qryfetch['Admin_Status']; if($qryfetch['Admin_Status']=='1'){ ?> <script> window.location='home'; </script> <?php } else echo 'Account Deactivated'; } else echo "Invalid userid or password"; break; } mysqli_close($connection); ?>