<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?php echo base_url(); ?>" />
        <title><?php echo $this->config->item('company') ?></title>
        <link rel="stylesheet" rev="stylesheet" href="<?php echo base_url(); ?>css/ospos.css" />
        <link rel="stylesheet" rev="stylesheet" href="<?php echo base_url(); ?>css/ospos_print.css"  media="print"/>
        <link href='<?php echo base_url();?>css/favicon.ico' rel='icon' type='image/x-icon'/>
        <script>BASE_URL = '<?php echo site_url(); ?>';</script>

        <script src="<?php echo base_url(); ?>js/jquery-1.2.6.min.js" type="text/javascript" language="javascript" charset="UTF-8"></script> 
<!--        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>-->
        <script src="<?php echo base_url(); ?>js/jquery.color.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.metadata.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.form.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.tablesorter.min.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.ajax_queue.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.bgiframe.min.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.autocomplete.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.validate.min.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jquery.jkey-1.1.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/thickbox.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/common.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/manage_tables.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/swfobject.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/date.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/datepicker.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/printThis.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
        <script src="<?php echo base_url(); ?>js/jQuery.print.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
<!--         <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>-->



<!--REPORT-->

<style>
/* Set a style for all buttons */

/* Extra styles for the cancel button */
.cancelbtn {
  color: white;
  padding: 14px 20px;
  margin: 0px 0;
  border: none;
  cursor: pointer;
  width: 100%;
  opacity: 0.9;
  padding: 14px 20px;
  background-color: #f44336;
}

/* Extra styles for the cancel button */
.submitbtn {
background-color: #04AA6D;
  color: white;
  padding: 14px 20px;
  margin: 0px 0;
  border: none;
  cursor: pointer;
  width: 100%;
  opacity: 0.9;
  padding: 14px 20px;
  width: 50%;
}
/* Float cancel and signup buttons and add an equal width */
.cancelbtn, .signupbtn,submitbtn {
  float: left;
  width: 50%;
}
submitbtn:hover {
  opacity:1;
  background-color: #f44336;
}
cancelbtn:hover {
  opacity:1;
}

/* Add padding to container elements */
.container {
  padding: 16px;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: #474e5d;
  padding-top: 50px;
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
  border: 1px solid #888;
  width: 50%; /* Could be more or less, depending on screen size */
}
 
/* The Close Button (x) */
.close {
  position: absolute;
  right: 35px;
  top: 15px;
  font-size: 40px;
  font-weight: bold;
  color: #f1f1f1;
}

.close:hover,
.close:focus {
  color: #f44336;
  cursor: pointer;
}

/* Clear floats */
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
  .cancelbtn, .signupbtn {
     width: 100%;
  }
}

.eye{
  width:27px;
  cursor: pointer;
  height:15px;
  position:relative;
  display:inline-block;
  --background:#aaa;
  --color:currentColor;
}

.eye div{
  overflow:hidden;
  height:50%;
  position:relative;
  margin-bottom:-1px;
  cursor: pointer;
}

.eye div:before{
  content:'';
  background:currentColor;
  position:absolute;
  left:0;
  right:0;
  height:300%;
  border-radius:100%;
}

.eye div:last-child:before{
  bottom:0;
}

.eye:before{

  content:'';
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:0.35em;
  height:0.35em;
  background:var(--color);
  border:0.1em solid var(--background);
  border-radius:100%;
  z-index:1;

}

.eye:after{

  content:'';
  position:absolute;
  top:-0.15em;
  left:calc(33.333% - 0.15em);
  transform:rotate(45deg) scaleX(0);
  transform-origin:left center;
  width:90%;
  height:0.1em;
  background:var(--color);
  border-top:0.1em solid var(--background);
  z-index:2;
  transition:transform 0.25s;
}
.eye.slash:after{
  transform:rotate(45deg) scaleX(1);
}
</style>

<script>
// Get the modal
var modal = document.getElementById('id01');

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
	if (event.target == modal) {
		modal.style.display = "none";
	}
}
function togglePW(){
	//toggle password visibility
	document.querySelector('.eye').classList.toggle('slash');
	//show/hide the password
	var password = document.querySelector('[name=password]');
	if(password.getAttribute('type') === 'password'){
		password.setAttribute('type', 'text');
	} else {
		password.setAttribute('type', 'password');
	}
}
</script>
<div id="id01" class="modal">
  <span onclick="document.getElementById('id01').style.display='none'" class="close" title="Close Modal">&times;</span>
  <form class="modal-content" action="<?php echo base_url()."/index.php/employees/check_report_password";?>" method="POST">
    <div class="container">
      <h1 style="padding-bottom:20px;">Manager Password</h1>
      <label for="psw"><b>Password</b></label>
      
       <input style="padding: 7px;" type="password" name="password" placeholder="Enter Password" autocomplete="off" value="" required>
    <div class="eye slash" onclick="togglePW()">
        <div></div>
        <div></div>
    </div>
      <div class="clearfix" style="padding-top:20px;">
        <button type="button" onclick="document.getElementById('id01').style.display='none'" class="cancelbtn">Cancel</button>
        <button type="submit" class="submitbtn">Report ON</button>
      </div>
    </div>
  </form>
</div>
<script>
function isBrowserOnline() {
	var x = navigator.onLine;
	var delete_cookie = function(name) {document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';};
	delete_cookie('browser_online_shawpon');
	document.cookie="browser_online_shawpon="+x;
}
window.onload = function(){isBrowserOnline()}
</script>




        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/header/css/960.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/header/css/reset.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/header/css/blue.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/header/css/jquery-ui.css" />
       <!-- <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">-->
            <link rel="stylesheet" href="/resources/demos/style.css">    
                <link type="text/css" href="<?php echo base_url(); ?>css/header/css/smoothness/ui.css" rel="stylesheet" /> 
                <link type="text/css" href="<?php echo base_url(); ?>css/custom.css" rel="stylesheet" />

                <!--[if gte IE 9]>
                  <style type="text/css">
                    .gradient {
                       filter: none;
                    }
                  </style>
                <![endif]-->

                <style type="text/css">
                    html {
                        overflow: auto;
                    }
                    p.odd {
  padding-top:10px;padding-bottom:10px;background-color:#c6eaff;width:186px;color:#000000;padding-left:15px;font-weight:bold;
} p.even {
  padding-top:10px;padding-bottom:10px;background-color:#a6d8f4;width:186px;color:#000000;padding-left:15px;font-weight:bold;
}
 p.logout {
  padding-top:10px;padding-bottom:10px;background-color:#FB6565;width:186px;color:#000000;padding-left:15px;font-weight:bold;
}
                    
                    p:hover{
  background-color: #184f82;color:#3ef40b;
}
                    .dropdown {
  position: relative;
  display: inline-block;
  background:none;
  
 
}
#user_tools a:hover { text-decoration:none; background: #222; }

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 191px;
  box-shadow: 0px 8px 16px 0px #000;
  margin-top: 33px;
  z-index: 1;
  right:-10px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.notificationContainerReport {
  width:30px;height:30px;
  border-radius: 50%;box-shadow: 0 0 10px #99FF04;margin-top: -2px;margin-bottom: -7px;
  background: url('<?php echo base_url()."images/print_button.jpg";?>');
  background-repeat: no-repeat;
  background-size: 33px 33px;
  vertical-align: middle;
   margin: 0px;
   text-decoration: none;
   padding: 1px 1px;
   font-size: 13px;
   position: relative;
   display: inline-block;
   
   
}
.notificationContainerReport:hover {
   box-shadow: 0 0 15px #FF0000;
    background: url('<?php echo base_url()."images/print_button.jpg";?>');
  background-repeat: no-repeat;
   background-size: 33px 33px;
   
}
.notificationContainer {
   margin: 0px;
   /*background-color: rgb(254, 255, 171);*/
   text-decoration: none;
   padding: 1px 1px;
   font-size: 13px;
   position: relative;
   display: inline-block;
   border-radius: 100px;
   border:0px solid #FF0000;
}
.notificationContainer:hover {
   background: #FF0000;
   color:white;
}
.notificationOnline {
   margin: 0px;
   /*background-color: rgb(254, 255, 171);*/
   text-decoration: none;
   padding: 0px 0px;
   font-size: 13px;
   position: relative;
   display: inline-block;
   border-radius: 100px;
   border:0px solid #FF0000;
}
.notificationOnline:hover {
   background: #FF0000;
   color:white;
}
.notificationBadgeback{
background-color: #FF0000;
}
.notificationBadgeback:hover{
background-color: #FF0000;
}
.notificationBadge {
   position: absolute;
   top: -1px;
   right: -3px;
   padding: 0px 7px;
   border-radius: 50%;
   background-color: rgb(0, 170, 51);
   color: white;
}
                </style>

                </head>
                <body>
                <?php
                if($this->session->userdata['reprint_perission']=="reprint_password_ok"){
                	$reprint_password_session_start=$this->session->userdata['reprint_password_session_start'];
                	$reprint_password_session_end=date("Y-m-d H:i:s",strtotime($reprint_password_session_start)+(60*3));

                	if($reprint_password_session_end<date("Y-m-d H:i:s")){
                		$this->session->sess_destroy();
                		redirect('login');
                	}else{
                		$show_permission_reprint=1;
                		$error_message_reprint="";
                	}


                	$refresh_diff=strtotime($reprint_password_session_end)-strtotime(date("Y-m-d H:i:s"));


                	$url1=$_SERVER['REQUEST_URI'];

                	$refresh_time=$refresh_diff;
                }

?>
<?php if($this->session->userdata['reprint_perission']=="reprint_password_ok"){?>
<script>

function refreshpage(interval, countdownel, totalel){
	var countdownel = document.getElementById(countdownel)
	var totalel = document.getElementById(totalel)
	var timeleft = interval+1
	var countdowntimer

	function countdown(){
		timeleft--
		countdownel.innerHTML = timeleft
		if (timeleft == 0){
			clearTimeout(countdowntimer)
			//window.location.reload()
			window.location.href="<?php echo $url1;?>";
		}
		countdowntimer = setTimeout(function(){
			countdown()
		}, 1000)
	}

	countdown()
}
window.onload = function(){
	refreshpage(<?php echo $refresh_time;?>, "countdown") // refreshpage(duration_in_seconds, id_of_element_to_show_result)
}

</script>
<?php }?>
                <?php
                if($this->session->userdata['reprint_perission']=="reprint_password_wrong"){
                	$this->session->sess_destroy();
                	redirect('login');
                }
                $actual_link = "http://$_SERVER[HTTP_HOST]";

                $urlArr = explode("/", $_SERVER[REQUEST_URI]);

                $serverArr = array();
                $server_srting = "";
                foreach ($urlArr as $key => $value) {
                	if ($value != '' AND $value != 'index.php' AND $value != 'login' AND $value != 'home' AND $value != 'customers' AND $value != 'items' AND $value != 'item_kits' AND $value != 'suppliers' AND $value != 'reports' AND $value != 'receivings' AND $value != 'sales' AND $value != 'employees' AND $value != 'giftcards' AND $value != 'config' AND $value != 'dbbackup') {
                		$serverArr[] = $value;
                	}
                }
                if (count($serverArr)) {
                	$server_srting = implode("/", $serverArr);
                }
                if (trim($server_srting)) {
                	$actual_link.="/" . $server_srting;
                }

                $target_file = $actual_link . "/images/company_logo.php";
                $file_content = file_get_contents($target_file, true);

                $company_logo = "logo_grameenshamogree.png";
                if (trim($file_content)) {
                	$company_logo = trim($file_content);
                }

                $current_directory = getcwd();
                $current_date=date("Y-m-d");

                if (file_exists($current_directory . '\application\config\mrp_config.php')) {
                	include('application/config/mrp_config.php');

                }else{
                	$notification_count=0;
                }

                $notification_count=0;
                $server_online_string="";

                function displayDatesHeader($date1, $date2, $format = 'Y-m-d' ) {
                	$dates = array();
                	$current = strtotime($date1);
                	$date2 = strtotime($date2);
                	$stepVal = '+1 day';
                	while( $current <= $date2 ) {
                		$dates[] = date($format, $current);
                		$current = strtotime($stepVal, $current);
                	}
                	return $dates;
                }

                $day_name=date('D', strtotime($current_date));

                $date_array = displayDatesHeader($config_mrp['MRP_MANAGER_LEAVE_START'], $config_mrp['MRP_MANAGER_LEAVE_END']);

                if(intval($config_mrp['MRP_ACTIVE'])==1 AND intval($config_mrp['MRP_LUNCHBREAK'])==0 AND $config_mrp['MRP_WEEKEND']!=$day_name AND !in_array($current_date, $date_array)){
                	$notification_count=1;
                }else{
                	$notification_count=0;
                }

                if($notification_count==0){
                	if(intval(filter_var( $_COOKIE['browser_online_shawpon'], FILTER_VALIDATE_BOOLEAN ))){
                		$notification_count_style="background-color: #19651e;box-shadow: 0 0 10px #19651e;";
                	}else{
                		$notification_count_style="background-color: #19651e;";
                	}

                }else{
                	if(intval(filter_var( $_COOKIE['browser_online_shawpon'], FILTER_VALIDATE_BOOLEAN ))){
                		$notification_count_style="background-color: #19651e;box-shadow: 0 0 10px #19651e;";
                		 $server_online_string="!";
                	}else{
                		$notification_count_style="background-color: #19651e;";
                		 $server_online_string="!";
                	}
                }
                    ?>

                    <div class="container_16" id="wrapper">	
                        <!--LOGO-->
                        <div class="green">
                            <div class="grid_10" id="logo">
                                <a href="<?php echo base_url(); ?>">
                                    <a href="#"><img  style=" vertical-align: top;" src="<?php echo base_url('images/' . $company_logo) ?>" width="250" alt="Grameen Shamogree" /></a> 
                                </a>
                            </div>
                            
                            <div class="grid_6">
                                <!-- USER TOOLS START -->
                                
                                 <div id="user_tools" style=" padding-top: 14px;">
                                 <?php if($this->session->userdata['reprint_perission']=="reprint_password_ok"){?>
                                 <font style="font-size:20px; text-align:right;text-shadow: 2px 2px 4px #FF182D;height: 40px;padding-top:40px;"> 
                                  Your access will be expaired with in <b style="color:#FF0000;font-size:18px;font-weight:bold;" id="countdown"></b> seconds </br>
   									</font>
   									<?php }?>
                                 <?php if(intval($config_mrp['MRP_LUNCHBREAK'])==0){?>
                                 <a href="<?php echo base_url().'/index.php/sales/reset';?>" class="notificationContainer" >
<span class="notificationBadgeback" style='background-image: url("<?php echo base_url()."/images/notification_icon.jpg";?>"); background-repeat: no-repeat;background-size: 48px 48px;padding-bottom: 16px;width: 39px;'>&nbsp;</span>
<span class="notificationBadge" style="<?php echo $notification_count_style;?>width: 12px;height: 28px;line-height: 28px;font-size: 12px;color:#FFFFFF;">0</span>
</a>

<?php }else{?>
<a href="<?php echo base_url().'/index.php/forceupload';?>" class="notificationContainer" >
<span class="notificationBadgeback" style='background-image: url("<?php echo base_url()."/images/notification_icon.jpg";?>"); background-repeat: no-repeat;background-size: 48px 48px;padding-bottom: 16px;width: 39px;'>&nbsp;</span>
<span class="notificationBadge" style="<?php echo $notification_count_style;?>width: 12px;height: 28px;line-height: 28px;font-size: 12px;color:#FFFFFF;">0</span>
</a>
<?php }?>

                                 <?php 
                                 if (file_exists($_SERVER['DOCUMENT_ROOT'].str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME'])."/images/login/".LOCATION_CODE.".jpg")) { ?>
                                 	<a href="<?php echo base_url().'/index.php/forceupload';?>" class="notificationOnline" ><img src="<?php echo base_url()."images/login/".LOCATION_CODE.".jpg";?>" alt="<?php echo $user_info->first_name."&nbsp;".$user_info->last_name;?>" style="width:60px;height:60px;border-radius: 50%;box-shadow: 0 0 10px #2297b4;"></a>
                                 	
                                <?php }else{?>
								 <a href="<?php echo base_url().'/index.php/forceupload';?>" class="notificationOnline" ><img src="<?php echo base_url()."images/login/dummy_100x100.jpg";?>" alt="<?php echo $user_info->first_name."&nbsp;".$user_info->last_name;?>" style="width:60px;border-radius: 50%;box-shadow: 0 0 10px #2297b4;"></a>
								 <?php }?>
                                 <div class="dropdown">
                                 
                                 <?php
                                 $str_pos=strpos($_SERVER['HTTP_HOST'],"ocalhost");
                                 if(intval($str_pos)==0){
                                 	$str_pos=strpos($_SERVER['HTTP_HOST'],"27.0.0.1");
                                 }
                                 
                                 if(intval($str_pos)){

                                 	$username_encode=base64_encode(serialize($user_info->username));
                                 	$online_search_url="http://search.grameenshamogree.com/index.php?page=".$username_encode;

                                  ?>
                                 
   <span style="font-size:18px; text-align:right;text-shadow: 2px 2px 4px #000000;height: 40px;"> 
   
   
   <?php echo "&nbsp" . $this->lang->line('common_welcome') . "&nbsp;<b>".$user_info->first_name."&nbsp;".$user_info->last_name."!".$server_online_string."</b>"; ?></span>
  <div class="dropdown-content" style="box-shadow:#000000 0 0 10px;">
  <?php if($this->Employee->has_permission('reports', $this->Employee->get_logged_in_employee_info()->person_id) == 1){?>
  <?php echo'<a href="' . base_url('index.php/reports/product_search') . '"><p class="odd">Search</p></a>'; ?>
  <?php echo'<a href="' . $online_search_url. '" target="_blank"><p class="even">Online Search</p></a>'; ?>
  
  <?php if($this->session->userdata['reprint_perission']!="reprint_password_ok"){ ?>
   <?php echo'<a href="' . base_url('index.php/reports/non_scaned_item_add') . '"><p class="odd">Non Scaned Item Add</p></a>'; ?>
  <?php }else{ ?>
  <?php echo'<p class="odd">Non Scaned Item Add<font style="color:#FF0000;"> [LOCKED]</font></p>'; ?>
   <?php }?>
   
   <?php if($this->session->userdata['reprint_perission']=="reprint_password_ok"){ ?>
   <?php echo'<a href="' . base_url('index.php/reports/invoices') . '"><p class="even">Reprint</p></a>'; ?>
  <?php }else{ ?>
   <?php echo'<a href="' . base_url('index.php/reports/invoices') . '"><p class="even">Reprint <font style="color:#FF0000;"> [LIMITED]</font></p></a>'; ?>
   <?php }?>
   
   <?php


   $current_directory=getcwd();
   $file_name_with_date="sales_password.txt";
   $filename = $current_directory.'\pdf_report\report_file_runtime\\'.$file_name_with_date;

   $this->session->set_userdata('report_check_weekend','');
   $this->session->set_userdata('report_check_leave_start','');
   $this->session->set_userdata('report_check_leave_end','');

   if ($fd = fopen($filename, 'rb')) {
   	$saved_data = fread($fd, filesize($filename));
   	fclose($fd);

   	$saved_data_array=explode("@#@",$saved_data);

   	$sales_password=$saved_data_array[0];
   	$sales_weekend=$saved_data_array[1];
   	$sales_leave_start=$saved_data_array[2];
   	$sales_leave_end=$saved_data_array[3];

   	$this->session->set_userdata('report_check_weekend',$sales_weekend);
   	$this->session->set_userdata('report_check_leave_start',$sales_leave_start);
   	$this->session->set_userdata('report_check_leave_end',$sales_leave_end);
   }


   if($this->session->userdata['reprint_perission']=="sales_person_user"){

   	$show_report_list=0;
   	$day_name=date('D', strtotime(date("Y-m-d H:i:s")));

   	$report_check_weekend=$this->session->userdata['report_check_weekend'];

   	if($report_check_weekend!=$day_name){

   		function displayDatesCheck($date1, $date2, $format = 'Y-m-d' ) {
   			$dates = array();
   			$current = strtotime($date1);
   			$date2 = strtotime($date2);
   			$stepVal = '+1 day';
   			while( $current <= $date2 ) {
   				$dates[] = date($format, $current);
   				$current = strtotime($stepVal, $current);
   			}
   			return $dates;
   		}
   		$date_array = displayDatesCheck($this->session->userdata['report_check_leave_start'],$this->session->userdata['report_check_leave_end']);

   		if (in_array(date("Y-m-d"), $date_array)){
   			$show_report_list=1;
   			$this->session->set_userdata('report_full_access','0');
   			$this->session->set_userdata('report_pass_all_condition','1');
   		}else{

   			if(strtotime(date("Y-m-d H:i:s"))<=strtotime($this->session->userdata['report_check_session_end'])){
   				$show_report_list=1;
   				$this->session->set_userdata('report_full_access','1');
   				$this->session->set_userdata('report_pass_all_condition','1');
   			}
   		}
   	}else{
   		$show_report_list=1;
   		$this->session->set_userdata('report_full_access','0');
   		$this->session->set_userdata('report_pass_all_condition','1');
   		if(strtotime(date("Y-m-d H:i:s"))<=strtotime($this->session->userdata['report_check_session_end'])){
   			$show_report_list=1;
   			$this->session->set_userdata('report_full_access','1');
   			$this->session->set_userdata('report_pass_all_condition','1');
   		}
   	}
   }
   ?>
   <?php if($show_report_list==1){?>
  <?php echo'<a href="' . base_url('index.php/reports') . '"><p class="odd">Reports</p></a>'; ?>
  <?php }else{?>
      <a style="cursor: pointer;" onclick="document.getElementById('id01').style.display='block'" style="width:auto;"><p class="odd">Reports <font style='color:#FF0000;'> [RESTICTED]</font></p></a>
   <?php //echo anchor("employees/report_password/".$this->Employee->get_logged_in_employee_info()->person_id."/width:436/height:300","<p class='odd'>Reports <font style='color:#FF0000;'> [RESTICTED]</font></p>",array('class'=>'thickbox','title'=>'Reports [LIMITED]')); ?>
  <?php }?>
  
  
  
  <?php echo anchor("reports/sms_summary/width:436/height:400","<p class='even'>Summary For SMS</p>",array('class'=>'thickbox','title'=>'Summary For SMS'));?>
  <?php }?>
   <?php if($this->Employee->has_permission('dbbackup', $this->Employee->get_logged_in_employee_info()->person_id) == 1){?>
   
    <?php if($this->session->userdata['reprint_perission']!="reprint_password_ok"){ ?>
   <?php echo'<a href="' . base_url('index.php/forceupload') . '"><p class="odd">Force Upload</p></a>'; ?>
   <?php echo'<a href="' . base_url('index.php/dbbackup/sync') . '"><p class="even">Sync</p></a>'; ?>
  <?php }else{ ?>
  <?php echo'<p class="odd">Force Upload<font style="color:#FF0000;"> [LOCKED]</font></p>'; ?>
   <?php echo'<p class="even">Sync<font style="color:#FF0000;"> [LOCKED]</font></p>'; ?>
   <?php }?>
                                        
                                         <?php }?>
                                          <?php if($this->Employee->has_permission('employees', $this->Employee->get_logged_in_employee_info()->person_id) == 1){?>
										                                            
										  <?php if($this->session->userdata['reprint_perission']!="reprint_password_ok"){ ?>
										  <?php echo anchor("employees/change_password/".$this->Employee->get_logged_in_employee_info()->person_id."/width:436/height:400","<p class='odd'>Change Password</p>",array('class'=>'thickbox','title'=>'Change Password')); ?>
										  <?php }else{ ?>
										  <?php echo'<p class="odd">Change Password<font style="color:#FF0000;"> [LOCKED]</font></p>'; ?>
										   <?php }?>
                                         
                                        <?php }?>
                                        <?php echo anchor("home/logout", '<p class="logout">'.$this->lang->line("common_logout").'</p>'); ?></p>
                                    </span>
                                    </div>
									<?php }else{?>
                                    
                                     <span style="font-size:14px; text-align:right;">
                                     <?php echo "&nbsp" . $this->lang->line('common_welcome') . "&nbsp;<b>$user_info->first_name $user_info->last_name! </b>"; ?></br>
                                    </span>
                                     <div class="dropdown-content">
                                   <?php echo anchor("home/logout", '<p class="logout">'.$this->lang->line("common_logout").'</p>'); ?></p>
                                   </div>
                                    <?php }?>
  
</div>

                                </div>
                            </div>
                            <!-- USER TOOLS END -->    

                            <div class="clear"> </div>
                        </div>
                        <div id="content_area_wrapper">
                            <div id="content_area">
