diff --git a/application/controllers/Confg.php b/application/controllers/Confg.php index 3951e08..bf8ec1e 100644 --- a/application/controllers/Confg.php +++ b/application/controllers/Confg.php @@ -36,6 +36,17 @@ class Confg extends Bko_Controller { if ($data['page_id'] != '') { switch ($data['page_id']) { + case 'APPHELP': + + $this->load->library('table'); + $this->table->set_template($this->template); + $mysql = "SELECT id ,uid ,icon ,title ,contents FROM help_items WHERE status = 1 ORDER BY id ASC"; // WHERE agent_id = " . $data['agent_id']; + $query = $this->db->query($mysql); + $data['faq_result'] = $query->result(); + $data['faq_table'] = $this->table->generate($query); + $this->load->view('bko/configure/extra/appfaq_form', $data); + + break; case "JOBCATEG": $this->load->library('table'); @@ -157,6 +168,24 @@ class Confg extends Bko_Controller { } } } + + public function updateHelpfaq(){ + if ($_GET) { + $faq_id = $this->input->get('faq_id'); + $title = trim($this->input->get('title')); + $faq_uid = trim($this->input->get('faq_uid')); + $msg = trim($this->input->get('msg')); + if($title !='' & $msg !='' & $faq_id > 0 ){ + $sql1 = "UPDATE help_items SET title='$title',contents='$msg' WHERE id = $faq_id AND uid='$faq_uid' "; + $this->db->query($sql1); + echo 'Updated'; + } + else{ + echo 'Not Updated'; + } + } + } + public function updatefaq(){ // url: "/confg/updatefaq?faq_id=" + page_id + "&title=" + title + "&code=" + code + "&msg=" + msg diff --git a/application/views/bko/configure/extra/appfaq_form.php b/application/views/bko/configure/extra/appfaq_form.php new file mode 100644 index 0000000..b7aaff8 --- /dev/null +++ b/application/views/bko/configure/extra/appfaq_form.php @@ -0,0 +1,81 @@ +