CH 增加最新客人反馈列表标签

hotfix/paypal-note
Jimmy Liow 2 years ago
parent e7f76b5ede
commit caae5bcdc3

@ -653,6 +653,18 @@ class Information extends CI_Controller
} }
} }
$feedback_newest = $this->Feedback_model->get_feedback_newest();
$feedback_newest_content = $this->load->view(
$template_path . '-feedback-newest',
array('feedback_list' => $feedback_newest),
true
);
$information->ic_content = str_replace(
'<!--@FEEDBACK_NEWEST@-->',
$feedback_newest_content,
$information->ic_content
);
// 天气预报模板 // 天气预报模板
$weather_forecast_content = $this->load->view( $weather_forecast_content = $this->load->view(
$template_path . '-weather-forecast', $template_path . '-weather-forecast',

@ -7,6 +7,40 @@ class Feedback_model extends CI_Model {
$this->HT = $this->load->database('HT', TRUE); $this->HT = $this->load->database('HT', TRUE);
} }
/**
* 返回最新八条反馈信息
*/
function get_feedback_newest() {
$feedback_query =
$this->HT->query("
select top 8
tad_content, tai_customerid, tai_title, tai_getdate, tai_url
from Eva_TAInfo
left join Eva_TADetail on TAD_TAI_SN=TAI_SN
where TAD_Content is not null
order by tai_getdate desc");
$feedback_result = $feedback_query->result();
$feedback_list = [];
foreach ($feedback_result as $feedback_row) {
$createdOn = new DateTime($feedback_row->tai_getdate);
$createdOnString = $createdOn->format('M Y');
$feedback = [
'title' => $feedback_row->tai_title,
'customer' => $feedback_row->tai_customerid,
'content' => $feedback_row->tad_content,
'url' => $feedback_row->tai_url,
'createdOn' => $createdOnString
];
$feedback_list[] = $feedback;
}
return $feedback_list;
}
/** /**
* 根据城市英文名查找最新八条反馈信息 * 根据城市英文名查找最新八条反馈信息
*/ */

@ -0,0 +1,51 @@
<p class="visible-xs" style="font-size: 18px; font-weight: 600; text-align: center; font-style: italic; padding-bottom: 5px;">
<img src="https://data.chinahighlights.com/image/aboutus/awards/china-highlights-ta-2022-certificate.png"
class="img-responsive" style="margin: 0 auto;">
<img alt="Tour Review" class="img-responsive"
src="https://data.chinahighlights.com/image/travelguide/best-china/trip-advisor-logp-bg-global-highlights.png"
style="width: 180px;
display: block;
margin: 10px auto;">
Based on 10,000+ reviews
</p>
<div class="table-responsive">
<table>
<tbody>
<tr>
<td class="hidden-xs">
<div class="feedback_logo" style="font-size: 18px; font-weight: 600; text-align: center; font-style: italic;">
<img src="https://data.chinahighlights.com/image/aboutus/awards/china-highlights-ta-2022-certificate.png"
class="img-responsive" style="margin: 0 auto;">
<img alt="Tour Review" class="img-responsive"
src="https://data.chinahighlights.com/image/travelguide/best-china/trip-advisor-logp-bg-global-highlights.png" style="width: 180px;
display: block;
margin: 10px auto;">
Based on 10,000+ reviews
</div>
</td>
<?php foreach ($feedback_list as $index => $feedback) {?>
<td>
<div class="tour_feedback">
<div class="feedback_content">
<strong>
<?php echo $feedback['title'] ?>
</strong>
<p>
<?php echo $feedback['content'] ?>
</p>
<a href="<?php echo $feedback['url'] ?>" target="_blank">more</a>
</div>
<div class="customer_name">
<?php echo $feedback['createdOn'] ?>,
<?php echo $feedback['customer'] ?>
</div>
<img alt="" class="img-responsive" height="40" width="211"
src="https://data.chinahighlights.com/image/aboutus/feedback/five-star.png">
</div>
</td>
<?php }?>
</tr>
</tbody>
</table>
</div>
Loading…
Cancel
Save