-
Notifications
You must be signed in to change notification settings - Fork 0
/
reviewajax.php
40 lines (34 loc) · 1.29 KB
/
reviewajax.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php include("securearea.php"); ?>
<?php
class Reviewajax extends Securearea
{
public function index()
{
$this->load->view('testajax_view');
}
public function getAjaxRev(){
$page = $_GET['page'];
$proId = $_GET['id'];
$this->load->model('product_model');
$countries = $this->product_model->getAjaxReview($page, $proId);
foreach($countries as $country){
echo "<div class='info'><h5> Posted By<span style='color:#F75213; font-weight: bold;'> ".$country->user_name."</span> on <span style='font-weight: bold;'>".$country->date."</span></h5></div>";
echo "<div class='rev'>";
echo "<p>".$country->review_comment."</p>";
echo "<div class='rat'>";
for($i=1;$i<=$country->ratings_score;$i++)
{
echo "<span style='font-size:150%;color:gold;'>★</span>";
}
echo "</div>";
echo "</div>";
}
exit;
}
}
/*
foreach($countries as $country){
echo "<div><div><h5> Posted By<span style='color:#F75213; font-weight: bold;'> ".$country->user_name."</span> on <span style='font-weight: bold;'>".$country->date."</span></h5></div><div><p>".$country->review_comment."</p><div>"for($i=1;$i<=$country->ratings_score;$i++){"<i class="fa fa-star ystar" aria-hidden="true"></i>"}"</div></div></div>";
}
<span style='font-size:150%;color:gold;'>★</span>
*/