Subversion Repositories SmartDukaan

Rev

Rev 11012 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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();
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['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
34
    $this->layout->view('faq/faq_view',$data);
35
  }
36
 
37
  public function privacy(){
38
   // $data = array();
39
    //get cache 
40
    $configdata =array();
41
    $configdata = $this->config->item('faq');
42
    $cachemodule = array('header','footer');
43
    $configdata = getCache($configdata,$cachemodule);
44
    //end of get cache
45
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
46
    $data['stylesheet'] = 'recharge.css';
47
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
48
    $this->layout->view('faq/privacy_policy',$data);
49
  }
50
 
51
  public function terms(){
52
   // $data = array();
53
    //get cache 
54
    $configdata =array();
55
    $configdata = $this->config->item('faq');
56
    $cachemodule = array('header','footer');
57
    $configdata = getCache($configdata,$cachemodule);
58
    //end of get cache
59
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
60
    $data['stylesheet'] = 'recharge.css';
61
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
62
    $this->layout->view('faq/terms_conditions',$data);
63
  }
64
}
65
 
66
/* End of file welcome.php */
67
/* Location: ./application/controllers/welcome.php */