<!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"/>
        <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>-->




        <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;
                    }
                </style>

                </head>
                <body>
                    <?php
                    $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);
                    }
                    ?>

                    <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">
                                    <span style="font-size:14px; text-align:right;">
                                        <?php echo "&nbsp" . $this->lang->line('common_welcome') . " $user_info->first_name $user_info->last_name! "; ?></br>
                                        <?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') . '">Search</a> |'; ?>
                                        <?php echo'<a href="' . base_url('index.php/reports/invoices') . '">Reprint</a> |'; ?>
                                        <?php echo'<a href="' . base_url('index.php/reports') . '">Reports</a> |'; ?>
                                        <?php }?>
                                          <?php if($this->Employee->has_permission('dbbackup', $this->Employee->get_logged_in_employee_info()->person_id) == 1){?>
                                        <?php echo'<a href="' . base_url('index.php/dbbackup') . '">DB Backup</a> |'; ?>
                                        <?php echo'<a href="' . base_url('index.php/dbbackup/sync') . '">Sync</a> |'; ?>
                                         <?php }?>
                                          <?php if($this->Employee->has_permission('employees', $this->Employee->get_logged_in_employee_info()->person_id) == 1){?>
                                         <?php 
                                        	 echo anchor("employees/change_password/".$this->Employee->get_logged_in_employee_info()->person_id."/width:300","Change Password",array('class'=>'thickbox','title'=>'Change Password'))." |";
                                         ?>
                                        <?php }?>
                                        <?php echo anchor("home/logout", $this->lang->line("common_logout")); ?>
                                    </span>
                                </div>
                            </div>
                            <!-- USER TOOLS END -->    

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