Subversion Repositories SmartDukaan

Rev

Rev 12751 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <?php if(isset($title) && !empty($title)){?>
      <title><?php echo $title;?></title>
    <?php } elseif(isset($stylesheet) && $stylesheet == 'common.css'){?>
    <title>Mobile Phone Reviews and Best Deals in India | saholic.com</title>
    <?php }?>
    <?php if(isset($metaDescription) && !empty($metaDescription)){?>
      <meta name="Description" content="<?php echo $metaDescription;?>"/>
    <?php } elseif(isset($stylesheet) && $stylesheet == 'common.css'){?>
    <meta name="Description" content="Comprehensive reviews and Best Deals on mobile phones in India. Experience n' buy online. FREE Next Day delivery. Original product - Full manufacturer warranty."/>
    <?php }?>
    <?php if(isset($metaKeywords) && !empty($metaKeywords)){?>
      <meta name="keywords" content="<?php echo $metaKeywords;?>"/>
    <?php } elseif(isset($stylesheet) && $stylesheet == 'common.css'){?>
      <meta name="keywords" content="Mobile phones, mobile phone reviews, mobile phone, mobile accessories, latest mobile phones, mobile phone prices, mobile phones India, mobile phone comparison"/>
    <?php } ?>
    <link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!-- <link rel="stylesheet/less" href="<?php //echo base_url();?>assets/css/common.less" type="text/css"> -->
    <?php if(isset($stylesheet) && !empty($stylesheet)){?>
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/<?php echo $stylesheet.'?version='.$this->config->item('cdn_version');?>" type="text/css">

    <?php } ?>
          <?php $authorized=$this->session->userdata('authorized');?>
          <?php $fosauthorized=$this->session->userdata('fosauthorized');?>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '<?php echo $this->config->item('ga_id');?>', 'auto');
  ga('send', 'pageview');
  ga('require', 'ecommerce');   // Load the ecommerce plug-in.
      //less.refresh();
      var base_url="<?php echo base_url();?>";
/*
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '<?php echo $this->config->item('ga_id');?>']);
      _gaq.push(['_setDomainName', '<?php echo $this->config->item('ga_domain');?>']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        //ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
*/
<?php if(isset($authorized['isPrivateDealUser']) && !empty($authorized['isPrivateDealUser'])) :?>
        var dimensionValue = 'PrivateDeal';
        ga('set', 'dimension1', dimensionValue);
/*
_gaq.push(['_setCustomVar',
      1,             // This custom var is set to slot #1.  Required parameter.
      'typeofuser',   // The name of the custom variable.  Required parameter.
      'PrivateDeal',      // Sets the value of "User Type" to "Member" or "Visitor" depending on status.  Required parameter.
      1             // Sets the scope to session-level.  Optional parameter.
]);
*/
<?php endif;?>
    </script>
  </head>
  <body>
    <header class="clearfix">
      <div class="menu" onclick="toggleOverlay(event)"></div>
        <h1><a href="<?php echo base_url();?>"><img src="<?=base_url()?>assets/images/logo.PNG" alt="saholic logo"/></a></h1>
        <?php if($stylesheet != 'authorize.css'){?>
        <a class="cart" href="<?php echo base_url().'cart'?>">
          <span>
        <?php
        if(isset($authorized) && !empty($authorized)){
          $cartCount = $authorized['totalItems'];
        }else{
          $cartCount = 0;
        }echo $cartCount;?>
        </span>
        </a> <?php } ?>
        <?php $authorized = $this->session->userdata('authorized');
          if(isset($authorized['isLoggedIn']) && !empty($authorized['isLoggedIn'])){ ?>
        <div class="profile selected-pr" onclick="toggleOverlay(event)"></div>
        <?php } else {?>
        <div class="profile" onclick="toggleOverlay(event)"></div>
        <?php } ?>
      </header>
      
    
<?php
       if($stylesheet != 'authorize.css'){
      $data = $response['header'];
      if(isset($data) and !empty($data))
      {
      foreach($data as $headkey=>$value)
      {
        if(isset($value['render']) and !empty($value['render']))
        {
          unset($value['render']);
          if(isset($value) and !empty($value))
          $this->load->view($this->layoutName.$headkey,array($headkey=>$value));
        else
          $this->load->view($this->layoutName.$headkey);
        }
        else
          { 
            if(isset($value) and !empty($value) and count($value)>1){ //echo 'header';
              delete_cache('header');
            }
          }
      
        
      }
      
      }
    }
?>
<div class="profile-overlay" style="display:none">
  <?php if(isset($authorized['isLoggedIn']) && !empty($authorized['isLoggedIn'])){?>
  <div>Account</div>
   <?php } else { ?>
   <?php if(empty($fosauthorized)):?>
   <div><a href="<?php echo base_url().'fos/login';?>">Sign In</a></div>
   <?php endif;?>
  <?php }?>
  <?php if(isset($authorized['isLoggedIn']) && !empty($authorized['isLoggedIn'])){ ?>
  <?php if(isset($authorized['isPrivateDealUser']) && !empty($authorized['isPrivateDealUser'])) :?>
  <a href="<?php echo base_url().'private-deals/1';?>">My Deals</a>
  <?php endif;?>
  <!-- <a href="<?php echo base_url().'my-orders';?>">My Orders</a> -->
  <!-- <a href="<?php echo base_url().'my-recharges';?>">My Recharges</a> -->
  <!-- <a href="<?php echo base_url().'my-wallet';?>">My Wallet</a> -->
  <!-- <a href="<?php echo base_url().'login-details';?>">Change Password</a> -->
  <!-- <a href="<?php echo base_url().'logout';?>">Logout<span><?php print_r($authorized['email']);?></span></a> -->
  <!-- <a href="#">My Account</a> --> 
  <?php } else {?>
<!--  <a href="<?php echo base_url().'login';?>">Sign In</a>
  <a href="<?php echo base_url().'register';?>">Register</a>  -->
  <?php } ?>
        <?php if(isset($fosauthorized['Id'])):?>
  <a href="<?php echo base_url().'logout';?>">Logout<span></span></a> 
        <?php endif;?>
</div><!--profile-overlay-->

</header>
<?php
$msg = $this->session->flashdata('msg');
if(isset($msg) && $msg == 'Registered Successfully'){
$authorized = $this->session->userdata('authorized');
$email = $authorized['email'];?>
<?php 
echo "<div class='sucess-reg'>".$this->session->flashdata('msg'). "</div>";
}
 ?>
<?php


function delete_cache($uri_string=null)
{
    $CI =& get_instance();
    $path = $CI->config->item('cache_path');
    $path = rtrim($path, DIRECTORY_SEPARATOR);

    $cache_path = ($path == '') ? APPPATH.'cache/' : $path;

    $uri =  $CI->config->item('base_url').
            $CI->config->item('index_page').
            $uri_string;

    $cache_path .= md5($uri);

    return unlink($cache_path);
}

?>