Skip to content

Commit

Permalink
5 comment and feedback show dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Apr 9, 2020
1 parent f96dfd3 commit c58f65f
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 0 deletions.
14 changes: 14 additions & 0 deletions admin/controllers/home/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
);
$total_feedback_order = get_total('feedbacks', $options_feedback_order);

$options_feedback_five = array(
'limit' => 5,
'offset' => 0,
'order_by' => 'id DESC'
);
$feedback_five = get_all('feedbacks', $options_feedback_five);

$options_feedback_new = array(
'limit' => 1,
'offset' => 0,
Expand Down Expand Up @@ -98,6 +105,13 @@
);
$total_rows_comment = get_total('comments', $options_comments);

$options_comment_five = array(
'limit' => 5,
'offset' => 0,
'order_by' => 'id DESC'
);
$comment_five = get_all('comments', $options_comment_five);

$options_comment_new = array(
'limit' => 1,
'offset' => 0,
Expand Down
99 changes: 99 additions & 0 deletions admin/views/home/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,105 @@
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-lg-6 col-md-12">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2>Bảng <strong>Bình luận gần đây</strong></h2>
<ul class="header-dropdown">
<li class="dropdown"> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <i class="zmdi zmdi-more"></i> </a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="javascript:void(0);">Q/lý bình luận</a></li>
<li><a href="javascript:void(0);">Q/lý phản hồi</a></li>
<li><a href="admin.php?controller=order">Q/lý đơn hàng</a></li>
</ul>
</li>
<li class="remove">
<a role="button" class="boxs-close"><i class="zmdi zmdi-close"></i></a>
</li>
</ul>
</div>
<div class="body">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Nội dung</th>
<th>Người gửi</th>
<th>Hành động</th>
</tr>
</thead>
<tbody>
<?php foreach ($comment_five as $comment) : ?>
<tr>
<td><?php echo substr($comment['content'], 0, 150);
if (strlen($comment['content']) > 150) echo '...'; ?> </td>
<td><?= $comment['author'] ?></td>
<td></td>
</tr>
<?php endforeach; ?>
<tr>
<td><strong>All (6) | Mine (1) | Pending (2) | Approved (4) | Spam (0) | Trash (0)</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-md-12">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2>Bảng <strong>Phản hồi gần đây</strong></h2>
<ul class="header-dropdown">
<li class="dropdown"> <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <i class="zmdi zmdi-more"></i> </a>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="javascript:void(0);">Q/lý bình luận</a></li>
<li><a href="javascript:void(0);">Q/lý phản hồi</a></li>
<li><a href="admin.php?controller=order">Q/lý đơn hàng</a></li>
</ul>
</li>
<li class="remove">
<a role="button" class="boxs-close"><i class="zmdi zmdi-close"></i></a>
</li>
</ul>
</div>
<div class="body">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Nội dung</th>
<th>Người gửi</th>
<th>Hành động</th>
</tr>
</thead>
<tbody>
<?php foreach ($feedback_five as $feedback) : ?>
<tr>
<td><?= substr($feedback['subject'], 0, 150) ?> </td>
<td><?= $feedback['name'] ?></td>
<td></td>
</tr>
<?php endforeach; ?>
<tr>
<td><strong>All (6) | Mine (1) | Pending (2) | Approved (4) | Spam (0) | Trash (0)</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php require('admin/views/shared/footer.php'); ?>

0 comments on commit c58f65f

Please sign in to comment.