JezK
Edit File: menuheader.php
<?php session_start(); date_default_timezone_set("Asia/Calcutta"); include_once("adm_operations.php"); $operations=new adm_operations(); include("session_check.php"); include('school_timeout.php'); include("academic_check.php"); $page = basename($_SERVER['PHP_SELF']); $access=$operations->getvalidModuleaccess($_SESSION['child']['log_school_id']); $personaccess=$operations->getthisuseraccessPrivileges($_SESSION['child']['auth_id']); $appdetails=$operations->gettingAppDetails(); if($personaccess[0]==0) { $mngt="javascript:void(0)"; $smngt='class="inactive"'; if($personaccess[1]!=0) $allow = explode(',',rtrim($personaccess[1],',')); else $allow=array('0'); } else { $mngt='academicyear_management.php'; if($personaccess[0]=='1' && $access!=0) { $allow = $access; } else { $allow = array('0'); $access = array('0'); } } if($access==0) { $atten="javascript:void(0)"; $dairy="javascript:void(0)"; $noti="javascript:void(0)"; $exm="javascript:void(0)"; $tmgt="javascript:void(0)"; $feem="javascript:void(0)"; } else { if(in_array(1,$access) && in_array(1,$allow)) { $atten="attendance.php"; } else { $atten="javascript:void(0)"; $satten='class="inactive"'; } if(in_array(2,$access) && in_array(2,$allow)) { $dairy="diary_management.php"; } else { $dairy="javascript:void(0)"; $sdairy='class="inactive"'; } if(in_array(3,$access) && in_array(3,$allow)) { //$noti="noticeboard_management.php"; $noti="multipledates.php"; } else { $noti="javascript:void(0)"; $snoti='class="inactive"'; } if(in_array(4,$access) && in_array(4,$allow)) { $exm="examination_management.php"; } else { $exm="javascript:void(0)"; $sexm='class="inactive"'; } if(in_array(5,$access) && in_array(5,$allow)) { $tmgt="transport_management.php"; } else { $tmgt="javascript:void(0)"; $stmgt='class="inactive"'; } if(in_array(6,$access) && in_array(6,$allow)) { $feem="fee_management.php"; } else { $feem="javascript:void(0)"; $sfeem='class="inactive"'; } } $dashboard = ""; $dairyclass = ""; $exmclass = ""; $trnsclass = ""; $attenclass = ""; $feeclass = ""; $noticlass = ""; $sacp=""; if($page == "dashboard.php") // logic to highlight the selected tabs { $dashboard = "selected"; } else if($page == "attendance.php" || $page=="monthly_attendance.php") { $attenclass = "selected"; } else if($page == "diary_management.php" || $page=="update_homework.php" || $page=="edit_diary.php") { $dairyclass = "selected"; } else if($page == "examination_management.php" || $page == "exam_schedule.php" || $page == "marksof_student.php" || $page == "addgrades_tostudent.php" || $page == "report_card.php" || $page =="update_examschedule.php" || $page =="updatestudent_marksinfo.php" || $page =="updatemarks_by_student.php" || $page=="Report_card.php" || $page=='marks_upload.php') { $exmclass = "selected"; } else if($page == "transport_management.php" || $page=="add_stafftoroute.php" || $page=="edit_studentroute.php" || $page=="edit_staffroute.php" || $page=="add_studenttoroute.php" || $page=="trip_history.php") { $trnsclass = "selected"; } else if($page == "fee_management.php" || $page=="add_feeschedule.php" || $page=="fee_accounts.php" || $page=="update_feeschedule.php") { $feeclass = "selected"; } else if( $page == "general_comments.php" || $page == "update_general_comments.php" || $page =="edit_comment.php") { $dairyclass = "selected"; } else if( $page == "noticeboard_management.php" || $page == "send_message.php" || $page == "edit_notice.php" || $page =="vacation.php" || $page=="activities.php" || $page=="ptm.php" || $page=="for_you.php" || $page=="multipledates.php") { $noticlass = "selected"; } else if($page=="change_password.php") { $sacp="selected"; } if($_SESSION['child']['current_academic_id']!=$_SESSION['child']['choosen_academic_id']) { $clr='men1'; $fimg='images/Fee_new_dynamic.png'; $ayclr='background:#18B88D'; } else if($_SESSION['child']['current_academic_id']==$_SESSION['child']['choosen_academic_id'] || $_SESSION['child']['current_academic_id']=='' || $_SESSION['child']['current_academic_id']=='Not defined') { $clr='men'; $fimg='images/Fee_new.png'; // To change the color of menu bar if academic year are different $ayclr='background:#18B88D'; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title> <?php echo $appdetails['app_name'];?> School Admin</title> <link rel="shortcut icon" href="uploads/skoolonline.png"/ width="16px" height="auto"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" media="all"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"> <!-- <link rel="stylesheet" type="text/css" media="screen" href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min.css">--> <link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen"> <link rel="stylesheet" href="http://cdn.datatables.net/1.10.2/css/jquery.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="Excel/media/css/jquery.dataTables.css"> <link rel="stylesheet" type="text/css" href="Excel/css/dataTables.tableTools.css"> <link rel="stylesheet" type="text/css" href="Excel/examples/resources/syntax/shCore.css"> <link rel="stylesheet" type="text/css" href="Excel/examples/resources/demo.css"> <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script type="text/javascript" src="http://cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script> <!-- new menu style --> <link href="css/style.css" rel="stylesheet"> <!-- new menu style end --> <style> /*green menu start*/ .remove_padng_margn{ padding: 0px !important; } .imgg { background: #FFFFFF; } .inactive { opacity: 0.5; } div.dt-buttons { float: right; margin-bottom: 10px; position: relative; } div.dt-button, a.dt-button { padding: 0.3em 0.8em !important; } .glyphicon-off { color: #cc8647; } .table thead:first-child tr:first-child th { background: #d8efe9; } .table-hover tbody tr:hover td { background: #ebf3f1 !important; } /* .btnclr{ background: #cc8647 ; color:white; } .btnclr:hover{ background: #cc8647 !important; color:white; } .btnclr:active{ background: #cc8647 !important; color:white; }*/ /* #nav { margin: auto; width: 638px; padding-left: 0; padding-right: 0; list-style: none; background: #18b88d !important; } #nav li:hover, li:active { background: 18b88d !important; width: 90px; } #nav li.selected { background: rgb(54, 120, 102) !important; }*/ </style> </head> <body> <div class="container-fluid remove_padng_margn" > <div class="bdyTopbar"> </div> <!-- leftcol--> <div class="col-sm-2 leftColStyle"> <div class="row"> <div class="logoStyle"><img src="<?php echo $appdetails['app_logo'];?>" /></div> <div class="leftMnuCntr"> <ul id="menu1" class="<?=$clr;?>"> <li class="mheader <?=$dashboard?>"> <a href="dashboard.php"> <img src="images/dashboard_new.png" title ="Dashboard"></i> Dashboard</a> </li> <li class="mheader <?=$attenclass?>" id="pic2" > <a href="<?=$atten;?>" <?=$satten;?>> <img src="images/attendance_new.png" title ="Attendance">Attendance</a> </li> <li class="mheader <?=$dairyclass?>" id="pic3"> <a href="<?=$dairy;?>" <?=$sdairy;?>> <img src="images/diary_new.png" title ="Diary">Diary</a> </li> <li class="mheader <?=$noticlass?>" id="pic4"> <a href="<?=$noti;?>" <?=$snoti;?>> <img src="images/noticeboard_new.png" title =" Notice Board"> Notice Board</a> </li> <li class="mheader <?=$exmclass?>" id="pic5"> <a href="<?=$exm;?>" <?=$sexm;?>> <img src="images/examinations_new.png" title =" Examinations"></i>Examinations</a> </li> <li class="mheader <?=$trnsclass?>" id="pic6"> <a href="<?=$tmgt;?>" <?=$stmgt;?>> <img src="images/transport_new2.png" title =" Transport"> Transport</a> </li> <li class="mheader <?=$feeclass?>" id="pic7"> <a href="<?=$feem;?>" <?=$sfeem;?>> <img src="<?=$fimg?>" title =" Fee"> Fee</a> </li> <li class="mheader <?=$sacp?>"> <a href="change_password.php"><i class=" glyphicon glyphicon-wrench" title =" Settings"></i> <span >Settings</span></a> </li> <li class="mheader" id="pic8"> <a href="<?=$mngt?>" <?=$smngt?> style="font-family: Lato-Bold_0!important;"> <img src="images/management_new.png" title =" Management" ></i>Management</a> </li> </ul> </div> </div> </div> <!-- Leftcol End--> <!-- Top bar--> <div class="col-sm-10 remvepdngs"> <div class="topBar"> <div class="pull-left"> <h1>Welcome<span><?php echo $_SESSION['child']['school_name'];?></span></h1> </div> <div class="pull-right"> <ul class="list-inline"> <li>Current AY: <?=$_SESSION['child']['cur_year_name'];?> | Chosen AY: <?=$_SESSION['child']['choosen_year_name'];?> </li> <li> <a href="logout.php"><img src="images/logout.png"></a> </li> </ul> </div> <div style="clear:both"></div> </div> </div> <!-- Body--> <div class="col-sm-10"> <!-- Top bar End--> <script> var refreshTime = 600000; // every 10 minutes in milliseconds window.setInterval(function () { $.ajax({ cache: false , type: "GET" , url: "session_check.php" , success: function (data) {} }); }, refreshTime); $(window).bind('onbeforeunload', function () { $.ajax({ type: 'GET' , url: "logout.php" , success: function (data) {} }); }); </script>