Commit 218f07f7 by Jansa Jose

doctor feedback

parent 6d9c6fd5
......@@ -16,8 +16,8 @@ class Appfeedback extends CI_Controller {
public function index() {
$all_policy = $this->Appfeedback_model->get_doctor_feedback();
$template['page'] = "ManagePolicy/addPolicy";
$template['page_title'] = "Manage Policy Page";
$template['page'] = "Appfeedback/feedback_doctor";
$template['page_title'] = "Manage Feedbacks";
$template['data'] = $all_policy;
$this->load->view('template', $template);
}
......
......@@ -6,9 +6,14 @@ class Appfeedback_model extends CI_Model {
parent::_construct();
}
function get_doctor_feedback($policyData){
function get_doctor_feedback(){
$this->db->select('tbl_doctors.name,tbl_app_feedback.*');
$this->db->join('tbl_doctors','tbl_doctors.id = tbl_app_feedback.doctor_id');
$result = $this->db->get_where('tbl_app_feedback',array('doctor_id !=' =>'0'))->result();
print_r($result);
echo $this->db->last_query();exit();
if($result){
return $result;
}else{
return false;
}
}
}
\ No newline at end of file
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>Doctor Feedbacks</h1>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- Add -->
<div class="col-md-12">
<?php
if($this->session->flashdata('message')) {
$message = $this->session->flashdata('message');
?>
<div class="alert alert-<?php echo $message['class']; ?>">
<button class="close" data-dismiss="alert" type="button">×</button>
<?php echo $message['message']; ?>
</div>
<?php
}
?>
</div>
<div class="col-xs-12">
<div class="box box-solid box-info">
<div class="box-header">
<h3 class="box-title">Doctor Feedbacks</h3>
</div>
<div class="box-body">
<?php if(count($data) > 0){?>
<table class="table table-bordered table-striped datatable" data-ordering="true">
<thead>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $customer) {?>
<tr>
<td class="hidden"><?php echo $customer->id; ?></td>
<td><?php echo $customer->name; ?></td>
<td><?php echo $customer->feedback_type; ?></td>
<td><?php echo $customer->feedback_content; ?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th class="hidden">ID</th>
<th>Name</th>
<th>Feedback Type</th>
<th>Feedback Content</th>
</tr>
</tfoot>
</table>
<?php } else{ ?>
<div>No Result Found</div>
<?php } ?>
</div>
</div>
</div>
<!-- /.row -->
</section><!-- /.content -->
</div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment