芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/breadwinnerv2/application/controllers/Templates.php
load->library("Aauth"); if (!$this->aauth->is_loggedin()) { redirect('/user/', 'refresh'); } if ($this->aauth->get_user()->roleid < 5) { exit('
Sorry! You have insufficient permissions to access this section
'); } $this->load->model('templates_model','templates'); } public function email() { $head['usernm'] = $this->aauth->get_user()->username; $data['emails'] = $this->templates->get_template(6,13); $head['title'] = 'Email Templates'; $this->load->view('fixed/header'); $this->load->view('templates/email',$data); $this->load->view('fixed/footer'); } public function email_update() { if ($this->input->post()) { $id = $this->input->post('id'); $subject = $this->input->post('subject'); $body = $this->input->post('body'); $this->templates->edit($id,$subject,$body); } else { $head['usernm'] = $this->aauth->get_user()->username; $id = $this->input->get('id'); $head['title'] = 'Edit Email Template'; $data['email'] = $this->templates->template_info($id ); $this->load->view('fixed/header'); $this->load->view('templates/email-edit', $data); $this->load->view('fixed/footer'); } } public function sms() { $head['usernm'] = $this->aauth->get_user()->username; $data['emails'] = $this->templates->get_template(30,36); $head['title'] = 'Email Templates'; $this->load->view('fixed/header'); $this->load->view('templates/sms',$data); $this->load->view('fixed/footer'); } public function sms_update() { if ($this->input->post()) { $id = $this->input->post('id'); $subject = 'SMS'; $body = $this->input->post('body'); $this->templates->edit($id,$subject,$body); } else { $head['usernm'] = $this->aauth->get_user()->username; $id = $this->input->get('id'); $head['title'] = 'Edit SMS Template'; $data['sms'] = $this->templates->template_info($id ); $this->load->view('fixed/header'); $this->load->view('templates/sms-edit', $data); $this->load->view('fixed/footer'); } } }