1: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2:
3: 4: 5: 6: 7: 8: 9: 10:
11:
12: class Setting extends CI_Controller {
13:
14:
15: 16: 17: 18: 19: 20:
21:
22: function __construct(){
23: parent::__construct();
24: $this->load->driver('cache', array('backup' => 'file'));
25: }
26:
27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37:
38:
39: public function duplicate_index()
40: {
41: $duplicate_index = $this->db->select('index_title')->from('xenon_index')->group_by('index_title')->having('count(*) >',1)->get();
42: if($duplicate_index->num_rows() > 0){
43: $index_titles = array();
44: foreach($duplicate_index->result() as $index){
45: $index_titles[] = $index->index_title;
46: }
47: }
48: $this->load->view('head');
49: $this->load->view('setting/duplicate_index',array('index_titles'=>$index_titles));
50: $this->load->view('foot');
51: }
52:
53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63:
64:
65: public function index(){
66: $this->load->view('head');
67: $this->load->view('setting/landing');
68: $this->load->view('foot');
69: }
70:
71:
72: 73: 74: 75: 76: 77: 78: 79: 80: 81:
82: public function clean($type = ''){
83: if($type == ''){
84: if($this->cache->file->clean()!==FALSE){
85: redirect('employee');
86: }else{
87: $this->load->view('head');
88: echo 'Cache deletion failed.';
89: $this->load->view('foot');
90: }
91: }else if($type == 'services'){
92: header('Location:http://services.greenmedicineworks.com/_clean_it');
93: }
94: }
95: }?>