Faq page
This commit is contained in:
@@ -50,7 +50,12 @@ class Confg extends Bko_Controller {
|
|||||||
|
|
||||||
case "JOBSKILLTYPE":
|
case "JOBSKILLTYPE":
|
||||||
|
|
||||||
echo 'akkfkkg';
|
$this->load->library('table');
|
||||||
|
$this->table->set_template($this->template);
|
||||||
|
$mysql = "SELECT * FROM skill_category ORDER BY category ASC"; // temporary
|
||||||
|
$query = $this->db->query($mysql);
|
||||||
|
$data['skill_category_table'] = $this->table->generate($query);
|
||||||
|
$this->load->view('bko/configure/extra/jobskill_form', $data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "AREASON":
|
case "AREASON":
|
||||||
@@ -123,11 +128,16 @@ class Confg extends Bko_Controller {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "FAQSET":
|
case "FAQSET":
|
||||||
|
|
||||||
|
$mysql2 = " SELECT code,description FROM faq_category";
|
||||||
|
$query2 = $this->db->query($mysql2);
|
||||||
|
$data['faq_category'] = $query2->result();
|
||||||
|
|
||||||
$this->load->library('table');
|
$this->load->library('table');
|
||||||
$this->table->set_template($this->template);
|
$this->table->set_template($this->template);
|
||||||
$mysql = "SELECT * FROM faq"; // WHERE agent_id = " . $data['agent_id'];
|
$mysql = "SELECT id,title,dir,msg,flags,added,status FROM faq"; // WHERE agent_id = " . $data['agent_id'];
|
||||||
$query = $this->db->query($mysql);
|
$query = $this->db->query($mysql);
|
||||||
// $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
|
$data['faq_result'] = $query->result();
|
||||||
$data['faq_table'] = $this->table->generate($query);
|
$data['faq_table'] = $this->table->generate($query);
|
||||||
$this->load->view('bko/configure/extra/faq_form', $data);
|
$this->load->view('bko/configure/extra/faq_form', $data);
|
||||||
break;
|
break;
|
||||||
@@ -136,7 +146,9 @@ class Confg extends Bko_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function updatefaq(){
|
||||||
|
echo 'got here';
|
||||||
|
}
|
||||||
public function addSkill() {
|
public function addSkill() {
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,66 @@
|
|||||||
</div>
|
</div>
|
||||||
<form>
|
<form>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
foreach ($faq_result as $row)
|
||||||
|
{
|
||||||
|
// echo $row->title;
|
||||||
|
// echo $row->name;
|
||||||
|
// echo $row->body;
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td style="width:50px;">
|
||||||
|
<?=$row->id?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<table class="table table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<input type="text" class="form-control" id="title<?=$row->id?>" name="title<?=$row->id?>" aria-describedby="titleHelp" placeholder="Enter Title" value="<?=$row->title?>">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<textarea class="form-control" id="msg<?=$row->id?>" name="msg<?=$row->id?>" rows="3"><?=$row->msg?></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select class="form-control" id="code<?=$row->id?>" name="code<?=$row->id?>">
|
||||||
|
<option value="">Select Category</option>
|
||||||
|
<?php
|
||||||
|
foreach($faq_category as $r1){
|
||||||
|
?>
|
||||||
|
<option value="<?= $r1->code?>"><?= $r1->description?></option>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right;">
|
||||||
|
<div id='updt<?=$row->id?>'></div> <button type="button" class="btn btn-info" onclick="updaFAQ('<?=$row->id?>');">Update</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -18,3 +78,29 @@
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
<!--
|
||||||
|
|
||||||
|
function updaFAQ(page_id) {
|
||||||
|
|
||||||
|
let title= $('#title'+page_id).val();
|
||||||
|
let msg= $('#msg'+page_id).val();
|
||||||
|
let code= $('#code'+page_id).val();
|
||||||
|
|
||||||
|
//alert(code);
|
||||||
|
/*
|
||||||
|
$('#configure_detail').html('Processing...');
|
||||||
|
$('#acc' + page_id).prop('disabled', true); */
|
||||||
|
$.ajax({
|
||||||
|
url: "/confg/updatefaq?faq_id=" + page_id + "&title=" + title + "&code=" + code + "&msg=" + msg
|
||||||
|
}).done(function (data) {
|
||||||
|
$('#updt'+page_id).html(data);
|
||||||
|
// $('#acc' + page_id).prop('disabled', false);
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -->
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Job Skill
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<title>WrenchBoard BackOffice</title>
|
<title>WrenchBoard BackOffice</title>
|
||||||
<link rel="shortcut icon" href="/assets/ext/images/favicon.png">
|
<link rel="shortcut icon" href="/assets/ext/images/favicon.png">
|
||||||
<!-- Global stylesheets -->
|
<!-- Global stylesheets -->
|
||||||
<meta http-equiv="refresh" content="8400;url=/bko/logout">
|
<meta http-equiv="refresh" content="14400;url=/bko/logout">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
|
||||||
<link href="/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
|
<link href="/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
|
||||||
<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
|
<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
|
||||||
|
|||||||
Reference in New Issue
Block a user