<?php
error_reporting(0);
ob_start();
session_start();
include('functions.php'); 
require_once("class/class.admin_users.php");
require_once("class/class.client_org.php");
require_once("class/class.photos.php");
require_once("class/class.course.php");
require_once("class/class.batch.php");
require_once("class/class.subjects.php");
require_once("class/class.std_category.php");

/*Premium*/
$clientObj=new client_org;
$client_Obj=new client_org;
$userphotoObj=new photos;
$courseObj=new course;
$batchObj=new batch;
$subjectObj=new subjects;
$std_categoryObj=new std_category;
$userid=$_SESSION['admin_id'];
$org_id=$_SESSION['org_id'];
$empid=$_SESSION['emp_id'];
$userObj=new admin_users;
if($empid!='')
{
//$emp_regObj->check_emp_login();
//$emp_regObj->select($empid);
//$maildepartment=$emp_regObj->department;
//$user_check=$userphotoObj->userid($userid);
}
else
{
$userObj->check_admin_login();
$userObj->select($userid);
$user_check=$userphotoObj->userid($userid);
}
$client_Obj->select($org_id);
$contact=$client_Obj->contact_person;
$address=$client_Obj->address;
$phone=$client_Obj->phone_number;
if($contact=='' || $address=='' || $phone=='')
{
	$setting_error=1;
}
if(!$user_check==-1)
{
}
else
{
$userphotoObj->select($user_check);
}
 $basename = basename($_SERVER['REQUEST_URI']);
 $dashboard='dashboard.php'; 
 $settingspage='general_setting.php';
 if(isset($_GET['id']))
	{
	$coursepage='course.php?id='.sanitize($_GET['id']);
	}else{
  $coursepage='course.php';
	}
	 if(isset($_GET['id']))
	{
	$batchpage='batch.php?id='.sanitize($_GET['id']);
	}else{
   $batchpage='batch.php';
	}
	if(isset($_GET['id']))
	{
	$subjectspage='subjects.php?id='.sanitize($_GET['id']);
	}else{
    $subjectspage='subjects.php';
	}
	if(isset($_GET['id']))
	{
	$stdcatpage='std_category.php?id='.sanitize($_GET['id']);
	}else{
	 $stdcatpage='std_category.php';
	}
	if(isset($_GET['id']))
	{
	$leavepage='emp_leave.php?id='.sanitize($_GET['id']);
	}else{
	  $leavepage='emp_leave.php';
	}
	  $mytimetablepage='timetable.php';
	   if($empid=='')
	   {
	   $profilepage='my_profile.php';
	   }
	   else
	   {
		   $profilepage='profile.php';
	   }
	   if(isset($_GET['id']))
	{
	$addeventpage='add_event.php?id='.sanitize($_GET['id']);
	}else{
	    $addeventpage='add_event.php';
	}
	
	
	?>
		
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web School, School Management Software</title>
<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
<link rel="shortcut icon" type="image/x-icon" href="<?php echo SITE_URL; ?>favicon.ico">

<!-- bootstrap framework-->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>bootstrap/css/bootstrap.min.css">
<!-- todc-bootstrap -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/todc-bootstrap.min.css">
<!-- font awesome -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/font-awesome/css/font-awesome.min.css">
<!-- flag icon set -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>img/flags/flags.css">
<!-- retina ready -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/retina.css">
<!-- bootstrap switch -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/bootstrap-switch/stylesheets/bootstrap-switch.css">
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/bootstrap-switch/stylesheets/ebro_bootstrapSwitch.css">
<link rel="stylesheet" type="text/css" href="<?php echo SITE_URL; ?>css/jquery.autocomplete.css" />

<!-- aditional stylesheets -->
<!-- vector map -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/jvectormap/jquery-jvectormap-1.2.2.css">
<!-- owl carousel -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/owl-carousel/owl.carousel.css">
<!-- responsive lightbox -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/magnific-popup/magnific-popup.css">
<!-- linecons -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/linecons/style.css">
<!-- fullcalendar -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/fullcalendar/fullcalendar.css">
<!--Timepicker-->
<link rel="stylesheet" media="all" type="text/css" href="<?php echo SITE_URL; ?>js/jquery-ui.css" />
<link rel="stylesheet" media="all" type="text/css" href="<?php echo SITE_URL; ?>js/jquery-ui-timepicker-addon.css" />

<!-- aditional stylesheets -->
<!-- 2col multiselect -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/multi-select/css/multi-select.css">
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/multi-select/css/ebro_multi-select.css">
<!-- select2 -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/select2/select2.css">
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/select2/ebro_select2.css">
<!-- datepicker -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/lib/datepicker/css/datepicker.css">
<!-- iCheck -->
<link href="<?php echo SITE_URL; ?>js/lib/iCheck/skins/minimal/minimal.css" rel="stylesheet">

<!-- ebro styles -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/style.css">
<!-- ebro theme -->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/theme/color_1.css" id="theme">
<link href="<?php echo SITE_URL; ?>js/lib/FooTable/css/footable.core.css" rel="stylesheet" type="text/css"/>
<!--Pop up-->
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/css3-modal-popups.css">
<link rel="stylesheet" href="<?php echo SITE_URL; ?>css/custom_style.css">
<link rel="stylesheet" href="<?php echo SITE_URL; ?>js/jquery-ui.css">
<!--Delete button-->
<link rel="stylesheet" type="text/css" href="<?php echo SITE_URL; ?>facebox/css/styles.css" />
<link rel="stylesheet" type="text/css" href="<?php echo SITE_URL; ?>facebox/jquery.confirm/jquery.confirm.css" />

<!--[if lt IE 9]>
		<link rel="stylesheet" href="css/ie.css">
		<script src="js/ie/html5shiv.js"></script>
		<script src="js/ie/respond.min.js"></script>
		<script src="js/ie/excanvas.min.js"></script>
	<![endif]-->

<!-- custom fonts -->
<link href='http://fonts.googleapis.com/css?family=Roboto:300,700&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css'>
</head>
<body class=" sidebar_hidden side_fixed">
<div id="wrapper_all">
<header id="top_header">
  <div class="container">
    <div class="row">
      <div class="col-xs-6 col-sm-2"> <a href="<?php if($empid==''){ echo SITE_URL;?>dashboard.php<?php }else{ echo SITE_URL;?>employees/dashboard.php<?php }?>" class="logo_main" title="Web School, School Management Software">
        <?php if(!$client_Obj->logo==''){ ?>
        <img src="<?php echo SITE_URL; ?><?php echo $client_Obj->logo; ?>" width="100" height="50" alt="">
        <?php } else { ?>
        <img src="img/logo_main.png" alt="">
        <?php }?>
        </a> </div>
      <div class="col-sm-push-4 col-sm-3 text-right hidden-xs">
        
							
							<div class="notification_dropdown dropdown">
								<a href="#" class="notification_icon dropdown-toggle" data-toggle="dropdown">
									<span class="label label-danger">0 </span>
									<i class="icon-envelope-alt icon-2x"></i>
								</a>
								<ul class="dropdown-menu dropdown-menu-wide">
									<li>
										<div class="dropdown_heading">Messages</div>
										<div class="dropdown_content">
											<ul class="dropdown_items">
                                            
												<li>
													 <h3> </h3>
													<p class="large_info"></p>  
													<i class="icon-exclamation-sign indicator"></i>
												</li>
                                                
												Test Message
												
											</ul>
										</div>
										<div class="dropdown_footer">
											<a href="" class="btn btn-sm btn-default"  style="cursor:pointer;">Show all</a>
											<div class="pull-right dropdown_actions">
												
											</div>
										</div>
									</li>
								</ul>
							</div>
      
     
        
      </div>
      <div class="col-xs-6 col-sm-push-4 col-sm-3">
        <div class="pull-right dropdown"> <a href="#" class="user_info dropdown-toggle" title="<?php echo $userObj->username; ?>" data-toggle="dropdown"> <img src="<?php echo SITE_URL; ?><?php if($empid!=''){if($emp_photoObj->photo==''){?>img/user_avatar.png<?php } else { echo $emp_photoObj->photo; } } else { if($userphotoObj->path==''){?>img/user_avatar.png<?php } else { echo $userphotoObj->path; }} ?>" alt=""> <span class="caret"></span> </a>
          <ul class="dropdown-menu">
            <li><a href="<?php echo SITE_URL; ?><?php if($empid==''){ ?>my_profile.php<?php }else{?>employees/profile.php<?php } ?>">Profile</a></li>
            <li><a href="javascript:void(0)">Change Password</a></li>
            <li><a href="<?php if($empid!=''){?><?php echo SITE_URL; ?>employees/<?php }else { ?><?php echo SITE_URL; ?><?php }?>logout.php?<?php echo time(); ?>">Log Out</a></li>
          </ul>
        </div>
      </div>
      <div class="col-xs-12 col-sm-pull-6 col-sm-4">
       
      </div>
    </div>
  </div>
</header>
<nav id="top_navigation">
  <div class="container">
    <ul id="icon_nav_h" class="top_ico_nav clearfix">
      <li <?php if($basename==$dashboard){?> class="active" <?php } ?>> <a href="<?php echo SITE_URL; ?><?php if($empid==''){ ?>dashboard.php<?php } else { ?>employees/dashboard.php<?php } ?>"> <i class="icon-home icon-2x"></i> <span class="menu_label">Home</span> </a> </li>
      <li <?php if($basename==$settingspage || $basename==$profilepage|| $basename==$mytimetablepage || $basename==$coursepage || $basename==$batchpage || $basename==$subjectspage || $basename==$stdcatpage || $basename==$leavepage || $basename==$addeventpage){?> class="active" <?php } ?>> <a href="<?php echo SITE_URL; ?><?php if($empid==''){ ?>general_setting.php<?php }else{ ?>employees/profile.php<?php } ?>"> <i class="icon-wrench icon-2x"></i> <span class="menu_label">Settings</span> </a> </li>
      
       <li > <a href="#" class="upgrade"> <i class="icon-envelope-alt icon-2x"></i> <span class="menu_label">Message</span> </a> </li>
       
       
     <li > <a href="#" class="upgrade"> <i class="icon-user icon-2x"></i> <span class="menu_label">Human Resource</span> </a> </li>
      <li > <a href="#" class="upgrade"> <i class="icon-group icon-2x"></i> <span class="menu_label">Student</span> </a> </li>
      <li > <a href="#" class="upgrade"> 
        <!--<span class="label label-danger">12</span>--> 
        <i class="icon-tasks icon-2x"></i> <span class="menu_label">Timetable</span> </a> </li>
      <li > <a href="#" class="upgrade"> <i class="icon-edit icon-2x"></i> <span class="menu_label">Exam</span> </a> </li>
      
      <li > <a href="#" class="upgrade"> <i class="icon-usd icon-2x"></i> <span class="menu_label">Fees</span> </a> </li>
      
       
     
       <li> <a href="#" class="upgrade"><i class="icon-book icon-2x"></i> <span class="menu_label">Library</span> </a> </li>
       
        <li > <a href="#" class="upgrade"> <i class="icon-truck icon-2x"></i> <span class="menu_label">Transport</span> </a> </li>
        
         <li > <a href="#" class="upgrade"> <i class="icon-hospital icon-2x"></i> <span class="menu_label">Hostel</span> </a> </li>
         
          <li > <a href="#" class="upgrade"> <i class="icon-file-text-alt icon-2x"></i> <span class="menu_label">Assignment</span> </a> </li>
          <li > <a href="#" class="upgrade"> <i class="icon-list-alt icon-2x"></i> <span class="menu_label">Notes</span> </a> </li>
          
          
          
    </ul>
  </div>
</nav>
<!--Pop up-->