<?php
ob_start();
error_reporting(0);
session_start();



//collect action if ther is

if(isset($_REQUEST['act']))
{
	//collect the action
	$act = $_REQUEST['act'];
}


//includes functions and classes
//include 'includes/functions.php';




//includes functions and classes for applicants
//include 'includes/applicants_functions.php';

//includes functions and classes for applicants
//include 'includes/applicants_functions_prence.php';
//include functions
include ('includes/includes.php');


include_once 'includes/session_timer.php'; // call the session and cookie checkings

//include authenticator
include 'includes/auth.php';




//declare current page to be the base name 
$currentPage = basename( $_SERVER['SCRIPT_NAME']);


//get user id first
$user_id = get_user_id();



//redirect accessed if the session / cookie was timed out
redirect_asset($user_id);



?>






<body>

    			
                
                <!-- Header  -->
                <div id="top-nav" class="row alert alert-success" style="margin-bottom:0px;">
                	
                  
                  <div class="col-sm-3"> <a class="navbar-brand" href="#"> <img src="images/admin_logo.png" height="35" width="150">  </a> </div>
                     
                  
                  <div class="col-sm-2"> </div>
                  
                       
                 <div class="col-sm-7">
                 
                 
                  <span class="label label-danger pull-right" > <i  class="glyphicon glyphicon-user"></i> Admin: <i><?php echo get_total_admin_users_online(); ?></i> </span>
                      &nbsp;&nbsp;
                      &nbsp;&nbsp;
                  <span class="label label-info pull-right" > <i  class="glyphicon glyphicon-user"></i> Visitors: <i> <?php echo get_total_ordinary_users_online(); ?>
                   </i> </span> &nbsp;&nbsp;
                    
                   
                   <span class="label label-warning pull-right" > <i class="glyphicon glyphicon-info-sign"></i> last login:<?php echo  get_user_last_loggedout($user_id); ?> 
                   </span>&nbsp;&nbsp;
                   <span class="label label-success pull-right"> <i class="glyphicon glyphicon-info-sign"></i> IP: <?php echo get_user_ip($user_id);?> </span>  &nbsp;&nbsp;
                 </div>     
             
                  
                 
                </div>
                <!-- /top header -->
                
                <div class="row" style="height:3px;">
                </div>


				<!-- header goes here -->
                <div id="header">
                	<?php include 'includes/header.php'; ?>
                </div>
                
                
                
          <!-- container -->      
          <div class="container ">
                
                <!-- notification layout -->
				<div class="row">
					<div style="height:5px; display:block;"> </div>
                    
                    
                   <?php include 'includes/notifications.php';?>
                   
	
				</div>		
				<!-- /notification -->
                
                <!-- /div.col-md-6 -->
                
                
                
                <!-- /toolbar menu -->
                <?php include 'includes/toolbar_menu/toolbar_menu_switch.php';?>
                <!-- /toolbar_menu-->
                
                <!-- home menu -->
                
                	<?php include 'includes/home_menu/home_menu_switch.php'; ?>
        
                <!-- / home menu -->
               
				<!-- activity menu -->
				<div class="col-md-6">
					<?php include'includes/activity_menu/activity_menu_switch.php'; ?>
                    
                   				
				</div>
				<!-- /activity menu -->
                
                <!-- tab menu -->
                <div class="row">
         
                   <?php include 'includes/tab_menu/tab_menu_switch.php'; ?>
                        
                    
                </div>
				<!-- /tab menu -->
                
                <!-- footer -->
                <!-- /footer -->
		
			
	
	</div>
    <!-- /container -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    
   
    <!-- #########################plugins for the js - graphs ############################################ -->
    <?php include 'includes/js_graphs.php';?>
    <!-- ##########################plugins for js graphs################################### -->
    
    
   
    <?php include 'includes/js_plugins.php';?>
   
   	
   
    
    
  
    
  </body>

	
    
    <!-- #########################plugins for the ric text editor############################################ -->
    <?php //include 'includes/jquery.rte.plugins.php';?>
    <!-- ##########################plugins for rich text editor################################### -->
    
   
    <!-- tracker -->
    <?php  set_user_log($user_id, $act);
     ob_end_flush();
    
    ?>
	
    