Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12694 anikendra 1
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2
 
3
class Faq extends MY_Controller {
4
 
5
public $layoutName ='';
6
 
7
  function __construct() {
8
 
9
    // Call the CI_controller constructor
10
    parent::__construct();
11
    // $admin = $this->session->userdata('admin');
12
    // if(!isset($admin) || empty($admin)) {
13
    //   redirect(base_url().'authorize');
14
    // }
15
    $this->layout->setlayout('layout/layout_main');
16
    $this->load->model('faq_model');
17
    $this->layoutName= $this->layout->getLayout();
18
    $this->layoutName =substr($this->layoutName , 0, strrpos($this->layoutName , "/")).'/';
19
    // print_r($this->session->all_userdata());
20
 
21
 
22
  }
23
  public function index(){
24
   $data = array();
25
    //get cache 
26
    $configdata =array();
27
    $configdata = $this->config->item('faq');
28
    $cachemodule = array('header','footer');
29
    $configdata = getCache($configdata,$cachemodule);
30
    //end of get cache
31
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
32
    $data['stylesheet'] = 'recharge.css';
33
    $data['title'] = 'Frequently asked quesitons | saholic.com';
34
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
35
    $this->layout->view('faq/faq_view',$data);
36
  }
37
 
38
  public function privacy(){
39
   // $data = array();
40
    //get cache 
41
    $configdata =array();
42
    $configdata = $this->config->item('faq');
43
    $cachemodule = array('header','footer');
44
    $configdata = getCache($configdata,$cachemodule);
45
    //end of get cache
46
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
47
    $data['stylesheet'] = 'recharge.css';
48
    $data['title'] = 'Privacy Policy | saholic.com';
49
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
50
    $this->layout->view('faq/privacy_policy',$data);
51
  }
52
 
53
  public function terms(){
54
   // $data = array();
55
    //get cache 
56
    $configdata =array();
57
    $configdata = $this->config->item('faq');
58
    $cachemodule = array('header','footer');
59
    $configdata = getCache($configdata,$cachemodule);
60
    //end of get cache
61
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
62
    $data['stylesheet'] = 'recharge.css';
63
    $data['title'] = 'Terms & Conditions | saholic.com';
64
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
65
    $this->layout->view('faq/terms_conditions',$data);
66
  }
67
  public function otg(){
68
   // $data = array();
69
    //get cache 
70
    $configdata =array();
71
    $configdata = $this->config->item('faq');
72
    $cachemodule = array('header','footer');
73
    $configdata = getCache($configdata,$cachemodule);
74
    //end of get cache
75
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
76
    $data['stylesheet'] = 'recharge.css';
77
    $data['title'] = 'On Time Guarantee, We Pay if we Delay';
78
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
79
    $this->layout->view('faq/otg',$data);
80
  }
81
 
82
 public function instore(){
83
   // $data = array();
84
    //get cache 
85
    $configdata =array();
86
    $configdata = $this->config->item('faq');
87
    $cachemodule = array('header','footer');
88
    $configdata = getCache($configdata,$cachemodule);
89
    //end of get cache
90
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
91
    $data['stylesheet'] = 'recharge.css';
92
    $data['title'] = 'Instore Pickup';
93
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
94
    $this->layout->view('faq/instore',$data);
95
  }
96
 
97
  public function insure(){
98
   // $data = array();
99
    //get cache 
100
    $configdata =array();
101
    $configdata = $this->config->item('faq');
102
    $cachemodule = array('header','footer');
103
    $configdata = getCache($configdata,$cachemodule);
104
    //end of get cache
105
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
106
    $data['stylesheet'] = 'recharge.css';
107
    $data['title'] = 'Insure Against Theft';
108
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
109
    $this->layout->view('faq/insure',$data);
110
  }
111
 
112
  public function emi(){
113
   $data = array();
114
    //get cache 
115
    $configdata =array();
116
    $configdata = $this->config->item('payment');
117
    $checkConfig = $this->config->item('payment');
118
    unset($configdata['response'][0]);
119
    unset($configdata['response'][2]);
120
    unset($checkConfig['response'][0]);
121
    unset($checkConfig['response'][2]);
122
    $cachemodule = array('header','footer','response');
123
    $configdata = getCache($configdata,$cachemodule);
124
    $newData = array();
125
    foreach ($checkConfig['response'] as $key => $value) {
126
      $newData[] = $value;
127
    }
128
    $newparams = array();
129
    if(isset($configdata['response'])){
130
      foreach($newData as $key => $value){
131
        if(!array_key_exists($value,$configdata['response'])){
132
          $api = 1;
133
        }
134
      }
135
    }
136
    //end of get cache
137
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
138
    $data['stylesheet'] = 'recharge.css';
139
    if(isset($api) && $api == 1){
140
      $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$checkConfig);
141
    }elseif(!isset($api)){
142
      $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$configdata['module']);
143
    }
144
    //print_r($data['response']);
145
    $tmp = $data['response'];
146
    //set cache to output or renew cache
147
    if(isset($cachemodule) and !empty($cachemodule) && !isset($api))
148
    {
149
      foreach($cachemodule as $cm)
150
      {
151
        if(isset($configdata[$cm]) and !empty($configdata[$cm]))
152
        {
153
          $data['response'][$cm]=$configdata[$cm];
154
        }
155
      }
156
    }
157
    if(isset($data['response']['response'])){
158
      foreach($newData as $key => $value){
159
        if(!array_key_exists($value,$data['response']['response'])){
160
          $noCache = 1;
161
        }
162
      }
163
    }
164
    //print_r($newparams);
165
    if(!isset($noCache)){
166
      setCache($configdata['module'],$cachemodule,$data['response']);
167
    }
168
    //end of set cache\
169
    $this->layout->view('faq/faq_view',$data);
170
  }
171
 
172
  public function oneassists(){
173
   // $data = array();
174
    //get cache 
175
    $configdata =array();
176
    $configdata = $this->config->item('faq');
177
    $cachemodule = array('header','footer');
178
    $configdata = getCache($configdata,$cachemodule);
179
    //end of get cache
180
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
181
    $data['stylesheet'] = 'recharge.css';
182
    $data['title'] = 'OneAssist Data Protection';
183
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
184
    $this->layout->view('faq/oneassists',$data);
185
  }
186
 
187
  public function aboutus(){
188
   // $data = array();
189
    //get cache 
190
    $configdata =array();
191
    $configdata = $this->config->item('faq');
192
    $cachemodule = array('header','footer');
193
    $configdata = getCache($configdata,$cachemodule);
194
    //end of get cache
195
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
196
    $data['stylesheet'] = 'recharge.css';
197
    $data['title'] = 'About Us';
198
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
199
    $this->layout->view('faq/aboutus',$data);
200
  }
201
 
202
  public function easylinux(){
203
   // $data = array();
204
    //get cache 
205
    $configdata =array();
206
    $configdata = $this->config->item('faq');
207
    $cachemodule = array('header','footer');
208
    $configdata = getCache($configdata,$cachemodule);
209
    //end of get cache
210
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
211
    $data['stylesheet'] = 'recharge.css';
212
    $data['title'] = 'Learn to install and use Linux';
213
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
214
    $this->layout->view('faq/easylinux',$data);
215
  }
216
 
217
  public function rechargeoffer(){
218
   // $data = array();
219
    //get cache 
220
    $configdata =array();
221
    $configdata = $this->config->item('faq');
222
    $cachemodule = array('header','footer');
223
    $configdata = getCache($configdata,$cachemodule);
224
    //end of get cache
225
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
226
    $data['stylesheet'] = 'recharge.css';
227
    $data['title'] = 'Recharge Offer';
228
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
229
    $this->layout->view('faq/rechargeoffer',$data);
230
  }
231
 
232
  public function pickup(){
233
   // $data = array();
234
    //get cache 
235
    $configdata =array();
236
    $configdata = $this->config->item('faq');
237
    $cachemodule = array('header','footer');
238
    $configdata = getCache($configdata,$cachemodule);
239
    //end of get cache
240
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
241
    $data['stylesheet'] = 'recharge.css';
242
    $data['title'] = 'Buy Online and pick up in store';
243
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
244
    $this->layout->view('faq/pickup',$data);
245
  }
246
}
247
 
248
/* End of file welcome.php */
249
/* Location: ./application/controllers/welcome.php */