Merge branch 'master' of github.com:hainatravel/information-system
commit
84c06cb1da
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class recommends_and_tips_model extends CI_Model
|
||||||
|
{
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->HT = $this->load->database('HT', TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function recommends_list($is_id)
|
||||||
|
{
|
||||||
|
$sql = " SELECT
|
||||||
|
ir.ir_id
|
||||||
|
,ir.ir_is_id
|
||||||
|
,ir.ir_keyword
|
||||||
|
,ir.ir_name
|
||||||
|
,ir.ir_pointer_is_id
|
||||||
|
,ir.ir_pointer_it_id
|
||||||
|
,ir.ir_rule
|
||||||
|
,ir.ir_urls
|
||||||
|
,ir.ir_datetime
|
||||||
|
,ir.ir_sitecode
|
||||||
|
from infoRecommends ir
|
||||||
|
where 1=1
|
||||||
|
AND ir.ir_sitecode=?
|
||||||
|
AND ir.ir_is_id=?
|
||||||
|
";
|
||||||
|
$query = $this->HT->query($sql, array($this->config->item('site_code'), $is_id));
|
||||||
|
//print_r($this->INFO->queries);
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tips_detail($it_id)
|
||||||
|
{
|
||||||
|
$timestamp=time();
|
||||||
|
$sql = " SELECT TOP 1
|
||||||
|
it.it_id
|
||||||
|
,it.it_title
|
||||||
|
,it.it_expires
|
||||||
|
,it.it_content
|
||||||
|
,it.it_sitecode
|
||||||
|
,it.it_datetime
|
||||||
|
from infoTips it
|
||||||
|
where 1=1
|
||||||
|
AND it.it_sitecode=?
|
||||||
|
AND it.it_id=?
|
||||||
|
AND it.it_expires>=?
|
||||||
|
";
|
||||||
|
$query = $this->HT->query($sql, array($this->config->item('site_code'), $it_id,$timestamp));
|
||||||
|
//print_r($this->HT->queries);
|
||||||
|
if ($query->num_rows() > 0) {
|
||||||
|
$row = $query->row();
|
||||||
|
return $row;
|
||||||
|
} else {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,123 @@
|
|||||||
|
<div class="nextcontext">
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Article A']) || !empty($recommands['Article B']) || !empty($recommands['Article C']) || !empty($recommands['Article D'])){ ?>
|
||||||
|
<h2 class="nexttitle">More Travel Ideas and Inspiration</h2>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Article A'])){ ?>
|
||||||
|
<div class="nextarticle">
|
||||||
|
<a href="<?php echo $recommands['Article A']->ic_url; ?>"> <img
|
||||||
|
src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Article A']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Article A']->ic_title; ?>"></a>
|
||||||
|
<div class="nextarticlebg">
|
||||||
|
<div class="nextarticlename">
|
||||||
|
<a href="<?php echo $recommands['Article A']->ic_url; ?>"> <?php echo $recommands['Article A']->ic_title; ?> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Article B'])){ ?>
|
||||||
|
<div class="nextarticle">
|
||||||
|
<a href="<?php echo $recommands['Article B']->ic_url; ?>"> <img
|
||||||
|
src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Article B']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Article B']->ic_title; ?>"></a>
|
||||||
|
<div class="nextarticlebg">
|
||||||
|
<div class="nextarticlename">
|
||||||
|
<a href="<?php echo $recommands['Article B']->ic_url; ?>"> <?php echo $recommands['Article B']->ic_title; ?> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Article C'])){ ?>
|
||||||
|
<div class="nextarticle">
|
||||||
|
<a href="<?php echo $recommands['Article C']->ic_url; ?>"> <img
|
||||||
|
src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Article C']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Article C']->ic_title; ?>"></a>
|
||||||
|
<div class="nextarticlebg">
|
||||||
|
<div class="nextarticlename">
|
||||||
|
<a href="<?php echo $recommands['Article C']->ic_url; ?>"> <?php echo $recommands['Article C']->ic_title; ?> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Article D'])){ ?>
|
||||||
|
<div class="nextarticle">
|
||||||
|
<a href="<?php echo $recommands['Article D']->ic_url; ?>"> <img
|
||||||
|
src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Article D']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Article D']->ic_title; ?>"></a>
|
||||||
|
<div class="nextarticlebg">
|
||||||
|
<div class="nextarticlename">
|
||||||
|
<a href="<?php echo $recommands['Article D']->ic_url; ?>"> <?php echo $recommands['Article D']->ic_title; ?> </a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Tour A']) || !empty($recommands['Tour B']) || !empty($recommands['Tour C']) || !empty($recommands['Tour D'])){ ?>
|
||||||
|
<h2 class="nexttitle">Get Inspired with Our Sample Itineraries</h2>
|
||||||
|
<p class="nextinfo">At Asia Highlights, we create your kind of journey — your dates, your destinations, at your pace. You can have any trip tailor made for your travel.</p>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Tour A'])){ ?>
|
||||||
|
<div class="tournext">
|
||||||
|
<img src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Tour A']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Tour A']->ic_title; ?>">
|
||||||
|
<div class="nextbg">
|
||||||
|
<div class="tournextname"><a href="<?php echo $recommands['Tour A']->ic_url; ?>"><?php echo $recommands['Tour A']->ic_title; ?></a></div>
|
||||||
|
<div class="tournextbutton"><a href="<?php echo $recommands['Tour A']->ic_url; ?>"
|
||||||
|
rel="nofollow">Explore</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Tour B'])){ ?>
|
||||||
|
<div class="tournext">
|
||||||
|
<img src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Tour B']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Tour B']->ic_title; ?>">
|
||||||
|
<div class="nextbg">
|
||||||
|
<div class="tournextname"><a href="<?php echo $recommands['Tour B']->ic_url; ?>"><?php echo $recommands['Tour B']->ic_title; ?></a></div>
|
||||||
|
<div class="tournextbutton"><a href="<?php echo $recommands['Tour B']->ic_url; ?>"
|
||||||
|
rel="nofollow">Explore</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Tour C'])){ ?>
|
||||||
|
<div class="tournext">
|
||||||
|
<img src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Tour C']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Tour C']->ic_title; ?>">
|
||||||
|
<div class="nextbg">
|
||||||
|
<div class="tournextname"><a href="<?php echo $recommands['Tour C']->ic_url; ?>"><?php echo $recommands['Tour C']->ic_title; ?></a></div>
|
||||||
|
<div class="tournextbutton"><a href="<?php echo $recommands['Tour C']->ic_url; ?>"
|
||||||
|
rel="nofollow">Explore</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($recommands['Tour D'])){ ?>
|
||||||
|
<div class="tournext">
|
||||||
|
<img src="https://data.asiahighlights.com/grey.gif" loader="lazy"
|
||||||
|
originalsrc="<?php echo $recommands['Tour D']->mobile_photo; ?>"
|
||||||
|
class="img-responsive" alt="<?php echo $recommands['Tour D']->ic_title; ?>">
|
||||||
|
<div class="nextbg">
|
||||||
|
<div class="tournextname"><a href="<?php echo $recommands['Tour D']->ic_url; ?>"><?php echo $recommands['Tour D']->ic_title; ?></a></div>
|
||||||
|
<div class="tournextbutton"><a href="<?php echo $recommands['Tour D']->ic_url; ?>"
|
||||||
|
rel="nofollow">Explore</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
Loading…
Reference in New Issue