| 10841 |
lgm |
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();
|
| 11108 |
lgm |
11 |
// $admin = $this->session->userdata('admin');
|
|
|
12 |
// if(!isset($admin) || empty($admin)) {
|
|
|
13 |
// redirect(base_url().'authorize');
|
|
|
14 |
// }
|
| 10841 |
lgm |
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';
|
| 11012 |
lgm |
33 |
$data['title'] = 'Frequently asked quesitons | saholic.com';
|
| 10841 |
lgm |
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';
|
| 11012 |
lgm |
48 |
$data['title'] = 'Privacy Policy | saholic.com';
|
| 10841 |
lgm |
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';
|
| 11012 |
lgm |
63 |
$data['title'] = 'Terms & Conditions | saholic.com';
|
| 10841 |
lgm |
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 |
}
|
| 11252 |
lgm |
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 |
|
| 11032 |
lgm |
112 |
public function emi(){
|
|
|
113 |
$data = array();
|
|
|
114 |
//get cache
|
|
|
115 |
$configdata =array();
|
|
|
116 |
$configdata = $this->config->item('payment');
|
| 11071 |
lgm |
117 |
$checkConfig = $this->config->item('payment');
|
| 11032 |
lgm |
118 |
unset($configdata['response'][0]);
|
|
|
119 |
unset($configdata['response'][2]);
|
| 11071 |
lgm |
120 |
unset($checkConfig['response'][0]);
|
|
|
121 |
unset($checkConfig['response'][2]);
|
| 11032 |
lgm |
122 |
$cachemodule = array('header','footer','response');
|
|
|
123 |
$configdata = getCache($configdata,$cachemodule);
|
|
|
124 |
$newData = array();
|
| 11071 |
lgm |
125 |
foreach ($checkConfig['response'] as $key => $value) {
|
| 11032 |
lgm |
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){
|
| 11071 |
lgm |
140 |
$data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$checkConfig);
|
| 11032 |
lgm |
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 |
}
|
| 11383 |
anikendra |
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'] = 'Insure Against Theft';
|
|
|
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 |
}
|
| 10841 |
lgm |
186 |
}
|
|
|
187 |
|
|
|
188 |
/* End of file welcome.php */
|
| 11383 |
anikendra |
189 |
/* Location: ./application/controllers/welcome.php */
|