|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/temp_db/../config/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
function CheckPermission($menu,$con)
{
$user_id=$_SESSION['user']['id'];
$permission=mysqli_query($con,"select * from user_permission where status=1 and user_id=$user_id and menu='$menu'");
if(mysqli_num_rows($permission)>0)
{
return "1";
}
else
{
return "0";
}
}
$filename=str_replace("/demo/","",$_SERVER['REQUEST_URI']);
if($filename=="Class.php" || $filename=="division.php")
{
if(CheckPermission('class_division',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Sub_Head.php")
{
if(CheckPermission('sub_head',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="bank.php")
{
if(CheckPermission('bank',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Head.php")
{
if(CheckPermission('head',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Receipt_head_create.php")
{
if(CheckPermission('fees_receipt_head',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Student_entry.php")
{
if(CheckPermission('new_student',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Student_view.php" || $filename=="Apply_fees_code_view.php" || $filename=="S_fees_code.php")
{
if(CheckPermission('update_student',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Apply_fees_code.php")
{
if(CheckPermission('apply_fees_code',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Apply_fees_code_delete")
{
if(CheckPermission('remove_fees_code',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Pay_fees.php")
{
if(CheckPermission('pay_fees',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="chequelist.php" || $filename=="online_approve.php" || $filename=="challan_approve.php")
{
if(CheckPermission('payment_approve',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="recpt_report_excle.php" || $filename=="recpt_report_subhead.php" || $filename=="reportsexcel.php")
{
if(CheckPermission('daily_reports',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="balancelist.php" || $filename=="balancelistprint.php" || $filename=="balancelistprint1.php" || $filename=="balancelistprint3.php")
{
if(CheckPermission('balance_reports',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="discount-report.php")
{
if(CheckPermission('discount',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="Inventory/admin/login.php")
{
if(CheckPermission('inventory',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
if($filename=="upgradestudent.php" || $filename=="exportstudent.php" || $filename=="send_balance_sms.php")
{
if(CheckPermission('utility',$con)!="1")
{
echo"<script>alert('Unable to access this page'); window.location='dashboard.php';</script>";
}
}
?>