完成反馈标签功能,等网前数据库更新
parent
2548a8080b
commit
cf4640f5f9
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
class Feedback_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->HT = $this->load->database('HT', TRUE);
|
||||
}
|
||||
|
||||
function get_feedback_by_city($city_name) {
|
||||
|
||||
$feedback_query =
|
||||
$this->HT->query("
|
||||
select top 1
|
||||
tad_content, tai_customerid, tai_title, tai_getdate, tai_url, vci.cii2_name
|
||||
from Eva_TAInfo
|
||||
left join Eva_TADetail on TAD_TAI_SN=TAI_SN
|
||||
left join V_CIty_Info vci on vci.cii_sn = tai_cii_sn and vci.LGC_LGC = 1
|
||||
where TAD_Content is not null and vci.cii2_name = ?
|
||||
order by tai_getdate desc",
|
||||
array($city_name));
|
||||
|
||||
$feedback_row = $feedback_query->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
|
||||
];
|
||||
|
||||
return $feedback;
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<div class="about_ta">
|
||||
<h3>About China Highlights</h3>
|
||||
<p>Since 1959 we've guided everyone ranging from US presidents, Australian Geographic and retired backpackers. Our goal is to create unique trips that take you off-the-beaten path, helping you discover China in a more authentic way. Our motto: "Discovery Your Way!"</p>
|
||||
<div class="infoimage"><img alt="travelers' choice 2020" src="https://data.chinahighlights.com/image/aboutus/feedback/Travelers_Choice_2020.png" loader="lazy">
|
||||
</div>
|
||||
</div>
|
||||
<div class="feedback_content_right">
|
||||
<div class="feedback_content">
|
||||
<div class="content_name"><?php echo $feedback_data['customer'] ?> reviewed in <?php echo $feedback_data['createdOn'] ?></div>
|
||||
<img alt="" class="feedback-rate" src="https://data.chinahighlights.com/image/aboutus/feedback/five-star.png" width="104" height="20">
|
||||
<p><strong><?php echo $feedback_data['title'] ?></strong></p>
|
||||
<p><?php echo $feedback_data['content'] ?> <a href="<?php echo $feedback_data['url'] ?>" target="_blank">more</a></p>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue