From cd6c6c4e2b4f0e260a7b4b8007953aa0c7dbb11d Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 3 Feb 2024 08:16:13 -0500 Subject: [PATCH] back office help --- application/controllers/Confg.php | 29 +++++++ .../views/bko/configure/extra/appfaq_form.php | 81 +++++++++++++++++++ .../bko/configure/view_bko_configure.php | 2 +- 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 application/views/bko/configure/extra/appfaq_form.php 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 @@ +
+ App Help +
+
+
+ + + title; + // echo $row->name; + // echo $row->body; + // id | uid | icon | title | contents +?> + + + + + + + + + +
+ id?> + + + + + + + + + + + + + + + + +
+ +
+ +
+ uid?> +
+
+
+
+ +
+ +
+ + + diff --git a/application/views/bko/configure/view_bko_configure.php b/application/views/bko/configure/view_bko_configure.php index ca3c1ef..eccb70d 100644 --- a/application/views/bko/configure/view_bko_configure.php +++ b/application/views/bko/configure/view_bko_configure.php @@ -66,7 +66,7 @@