01.
<div
class
=
"panel-body text-left"
>
02.
<table
class
=
"table table-responsive"
>
03.
<?php
04.
if
(
$add
->getData()){
05.
print_r(
$add
->getData());
06.
foreach
(
$add
->getData()
as
$row
){
07.
?>
08.
<tr>
09.
<td>
10.
<span
class
=
"fa fa-chevron-circle-right"
></span> <?php
echo
$row
->food; ?>
11.
</td>
12.
<td>
13.
<?php
echo
$row
->unit.
' '
.
$row
->u_name; ?>
14.
</td>
15.
<td>
16.
<?php
echo
number_format(
$row
->unit*
$row
->calories).
' '
.
'แคลอร์รี่'
; ?>
17.
</td>
18.
<td
class
=
"text-right"
>
19.
<button
class
=
"btn btn-danger btn-xs"
data-toggle=
"tooltip"
title=
"คุณต้องการจะลบ<?php echo $row->food; ?>ใช่หรือไม่?"
>
20.
<a href=
"index.php?page=delete&id=<?php echo $row->ci_id; ?>"
onclick=
"return confirm('คุณต้องการลบ<?php echo $row->food; ?>ใช่หรือไม่?')"
style=
"color:white"
>
21.
<span
class
=
"fa fa-minus-circle"
></span>
22.
</a>
23.
</button>
24.
</td>
25.
</tr>
26.
<?php }}
else
{ ?>
27.
<tr>
28.
<td
class
=
"text-center"
>
29.
<strong><span
class
=
"fa fa-warning"
></span> ไม่พบข้อมูล!</strong>
30.
</td>
31.
</tr>
32.
<?php } ?>
33.
</table>
34.
</div>