12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- !defined('BASEPATH') && exit('No direct script access allowed');
- class About extends MY_Main_Controller
- {
- public function __construct()
- {
- parent::__construct();
- $this->load->model('web_setting_model','web_setting');
- }
- public function index()
- {
- $name = 'about';
- $item = $this->web_setting->getValueByName($name);
-
- $data['item'] = $item[0]['value'];
- $this->load_view($data);
- }
- public function index1()
- {
- $name = 'about';
- $item = $this->web_setting->getValueByName($name);
-
- $data['item'] = $item[0]['value'];
- $this->action_name = __FUNCTION__;
- $this->load_view($data);
- }
- public function download(){
- $this->load->helper('download');
- $name = 'pdf';
- $pdf = $this->web_setting->getValueByName($name);
- $file_name = $pdf[0]['value'];
- $stream = file_get_contents(UPLOAD_FILE_DIR.DIRECTORY_SEPARATOR.$file_name);
- force_download($file_name, $stream);
-
- }
- }
- ?>
|