back office help

This commit is contained in:
CHIEFSOFT\ameye
2024-02-03 08:16:13 -05:00
parent 653f467dfa
commit cd6c6c4e2b
3 changed files with 111 additions and 1 deletions
+29
View File
@@ -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