Subversion Repositories SmartDukaan

Rev

Rev 12738 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
12694 anikendra 1
<!DOCTYPE html>
2
<html lang="en">
3
  <head>
4
    <meta charset="utf-8">
5
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
    <?php if(isset($title) && !empty($title)){?>
7
      <title><?php echo $title;?></title>
8
    <?php } elseif(isset($stylesheet) && $stylesheet == 'common.css'){?>
9
    <title>Mobile Phone Reviews and Best Deals in India | saholic.com</title>
10
    <?php }?>
11
    <?php if(isset($metaDescription) && !empty($metaDescription)){?>
12
      <meta name="Description" content="<?php echo $metaDescription;?>"/>
13
    <?php } elseif(isset($stylesheet) && $stylesheet == 'common.css'){?>
14
    <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."/>
15
    <?php }?>
16
    <?php if(isset($metaKeywords) && !empty($metaKeywords)){?>
17
      <meta name="keywords" content="<?php echo $metaKeywords;?>"/>
18
    <?php } elseif(isset($stylesheet) && $stylesheet == 'common.css'){?>
19
      <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"/>
20
    <?php } ?>
21
    <link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon">
22
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
23
    <!-- <link rel="stylesheet/less" href="<?php //echo base_url();?>assets/css/common.less" type="text/css"> -->
24
    <?php if(isset($stylesheet) && !empty($stylesheet)){?>
25
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/<?php echo $stylesheet.'?version='.$this->config->item('cdn_version');?>" type="text/css">
26
 
27
    <?php } ?>
28
          <?php $authorized=$this->session->userdata('authorized');?>
12738 anikendra 29
          <?php $fosauthorized=$this->session->userdata('fosauthorized');?>
12694 anikendra 30
 
31
<script>
32
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
34
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
35
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
36
 
37
  ga('create', '<?php echo $this->config->item('ga_id');?>', 'auto');
38
  ga('send', 'pageview');
39
  ga('require', 'ecommerce');   // Load the ecommerce plug-in.
40
      //less.refresh();
41
      var base_url="<?php echo base_url();?>";
42
/*
43
      var _gaq = _gaq || [];
44
      _gaq.push(['_setAccount', '<?php echo $this->config->item('ga_id');?>']);
45
      _gaq.push(['_setDomainName', '<?php echo $this->config->item('ga_domain');?>']);
46
      _gaq.push(['_trackPageview']);
47
 
48
      (function() {
49
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
50
        //ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
51
	ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
52
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
53
      })();
54
*/
55
<?php if(isset($authorized['isPrivateDealUser']) && !empty($authorized['isPrivateDealUser'])) :?>
56
	var dimensionValue = 'PrivateDeal';
57
	ga('set', 'dimension1', dimensionValue);
58
/*
59
_gaq.push(['_setCustomVar',
60
      1,             // This custom var is set to slot #1.  Required parameter.
61
      'typeofuser',   // The name of the custom variable.  Required parameter.
62
      'PrivateDeal',      // Sets the value of "User Type" to "Member" or "Visitor" depending on status.  Required parameter.
63
      1             // Sets the scope to session-level.  Optional parameter.
64
]);
65
*/
66
<?php endif;?>
67
    </script>
68
  </head>
69
  <body>
70
    <header class="clearfix">
71
      <div class="menu" onclick="toggleOverlay(event)"></div>
72
        <h1><a href="<?php echo base_url();?>"><img src="<?=base_url()?>assets/images/logo.PNG" alt="saholic logo"/></a></h1>
73
        <?php if($stylesheet != 'authorize.css'){?>
74
        <a class="cart" href="<?php echo base_url().'cart'?>">
75
          <span>
76
	<?php
77
        if(isset($authorized) && !empty($authorized)){
78
          $cartCount = $authorized['totalItems'];
79
        }else{
80
          $cartCount = 0;
81
        }echo $cartCount;?>
82
        </span>
83
        </a> <?php } ?>
84
        <?php $authorized = $this->session->userdata('authorized');
85
          if(isset($authorized['isLoggedIn']) && !empty($authorized['isLoggedIn'])){ ?>
86
        <div class="profile selected-pr" onclick="toggleOverlay(event)"></div>
87
        <?php } else {?>
88
        <div class="profile" onclick="toggleOverlay(event)"></div>
89
        <?php } ?>
90
      </header>
91
 
92
 
93
<?php
94
       if($stylesheet != 'authorize.css'){
95
      $data = $response['header'];
96
      if(isset($data) and !empty($data))
97
      {
98
      foreach($data as $headkey=>$value)
99
      {
100
        if(isset($value['render']) and !empty($value['render']))
101
        {
102
          unset($value['render']);
103
          if(isset($value) and !empty($value))
104
          $this->load->view($this->layoutName.$headkey,array($headkey=>$value));
105
        else
106
          $this->load->view($this->layoutName.$headkey);
107
        }
108
        else
109
          { 
12751 anikendra 110
            if(isset($value) and !empty($value) and count($value)>1){ //echo 'header';
111
              delete_cache('header');
112
            }
12694 anikendra 113
          }
114
 
115
 
116
      }
117
 
118
      }
119
    }
120
?>
121
<div class="profile-overlay" style="display:none">
122
  <?php if(isset($authorized['isLoggedIn']) && !empty($authorized['isLoggedIn'])){?>
123
  <div>Account</div>
124
   <?php } else { ?>
12751 anikendra 125
   <?php if(empty($fosauthorized)):?>
12738 anikendra 126
   <div><a href="<?php echo base_url().'fos/login';?>">Sign In</a></div>
12751 anikendra 127
   <?php endif;?>
12694 anikendra 128
  <?php }?>
129
  <?php if(isset($authorized['isLoggedIn']) && !empty($authorized['isLoggedIn'])){ ?>
130
  <?php if(isset($authorized['isPrivateDealUser']) && !empty($authorized['isPrivateDealUser'])) :?>
131
  <a href="<?php echo base_url().'private-deals/1';?>">My Deals</a>
132
  <?php endif;?>
12732 anikendra 133
  <!-- <a href="<?php echo base_url().'my-orders';?>">My Orders</a> -->
134
  <!-- <a href="<?php echo base_url().'my-recharges';?>">My Recharges</a> -->
135
  <!-- <a href="<?php echo base_url().'my-wallet';?>">My Wallet</a> -->
136
  <!-- <a href="<?php echo base_url().'login-details';?>">Change Password</a> -->
137
  <!-- <a href="<?php echo base_url().'logout';?>">Logout<span><?php print_r($authorized['email']);?></span></a> -->
12694 anikendra 138
  <!-- <a href="#">My Account</a> --> 
139
  <?php } else {?>
12738 anikendra 140
<!--  <a href="<?php echo base_url().'login';?>">Sign In</a>
141
  <a href="<?php echo base_url().'register';?>">Register</a>  -->
12694 anikendra 142
  <?php } ?>
12738 anikendra 143
	<?php if(isset($fosauthorized['Id'])):?>
144
  <a href="<?php echo base_url().'logout';?>">Logout<span><?php print_r($authorized['email']);?></span></a> 
145
	<?php endif;?>
12694 anikendra 146
</div><!--profile-overlay-->
147
 
148
</header>
149
<?php
150
$msg = $this->session->flashdata('msg');
151
if(isset($msg) && $msg == 'Registered Successfully'){
152
$authorized = $this->session->userdata('authorized');
153
$email = $authorized['email'];?>
154
<?php 
155
echo "<div class='sucess-reg'>".$this->session->flashdata('msg'). "</div>";
156
}
157
 ?>
12751 anikendra 158
<?php
159
 
160
 
161
function delete_cache($uri_string=null)
162
{
163
    $CI =& get_instance();
164
    $path = $CI->config->item('cache_path');
165
    $path = rtrim($path, DIRECTORY_SEPARATOR);
166
 
167
    $cache_path = ($path == '') ? APPPATH.'cache/' : $path;
168
 
169
    $uri =  $CI->config->item('base_url').
170
            $CI->config->item('index_page').
171
            $uri_string;
172
 
173
    $cache_path .= md5($uri);
174
 
175
    return unlink($cache_path);
176
}
177
 
178
?>