Subversion Repositories SmartDukaan

Rev

Rev 10841 | Rev 11032 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Faq extends MY_Controller {

public $layoutName ='';
  
  function __construct() {

    // Call the CI_controller constructor
    parent::__construct();
    $admin = $this->session->userdata('admin');
    if(!isset($admin) || empty($admin)) {
      redirect(base_url().'authorize');
    }
    $this->layout->setlayout('layout/layout_main');
    $this->load->model('faq_model');
    $this->layoutName= $this->layout->getLayout();
    $this->layoutName =substr($this->layoutName , 0, strrpos($this->layoutName , "/")).'/';
    // print_r($this->session->all_userdata());
    

  }
  public function index(){
   $data = array();
    //get cache 
    $configdata =array();
    $configdata = $this->config->item('faq');
    $cachemodule = array('header','footer');
    $configdata = getCache($configdata,$cachemodule);
    //end of get cache
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
    $data['stylesheet'] = 'recharge.css';
    $data['title'] = 'Frequently asked quesitons | saholic.com';
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
    $this->layout->view('faq/faq_view',$data);
  }
  
  public function privacy(){
   // $data = array();
    //get cache 
    $configdata =array();
    $configdata = $this->config->item('faq');
    $cachemodule = array('header','footer');
    $configdata = getCache($configdata,$cachemodule);
    //end of get cache
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
    $data['stylesheet'] = 'recharge.css';
    $data['title'] = 'Privacy Policy | saholic.com';
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
    $this->layout->view('faq/privacy_policy',$data);
  }
  
  public function terms(){
   // $data = array();
    //get cache 
    $configdata =array();
    $configdata = $this->config->item('faq');
    $cachemodule = array('header','footer');
    $configdata = getCache($configdata,$cachemodule);
    //end of get cache
    $this->lessphp->object()->ccompile('assets/css/recharge.less','assets/css/recharge.css');
    $data['stylesheet'] = 'recharge.css';
    $data['title'] = 'Terms & Conditions | saholic.com';
    $data['response']=$this->faq_model->getHome($this->input->get(),$this->input->post(),$this->config->item('faq'));
    $this->layout->view('faq/terms_conditions',$data);
  }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */