Merge branch 'master' of github.com:hainatravel/information-system

hotfix/paypal-note
LiaoYijun 4 years ago
commit d5077c1ecc

@ -193,7 +193,7 @@ class Api extends CI_Controller {
}else if (!empty($row->pic1)){
$picurl = $row->pic1;
}else{
$picurl="//data.chinatravel.com/images/loading2.gif";
$picurl="//data.chinatravel.com/images/no-photos.jpg";
}
// if (strpos($picurl,"chinatravel.com")!== false){
// }else{

@ -263,6 +263,32 @@ class Api_model extends CI_Model {
* @Date Changed:
*/
function getGuideList($old_pid,$new_pid){
$sql = " select top 1 ic_url from dbo.infoContents
inner join infoStructures on ic_id=is_ic_id
where is_id = ? ";
$query = $this->HT->query ($sql ,array($new_pid));
if ($query->num_rows()>0){
$url = $query->row()->ic_url;
}else{
$url = "";
}
if ($url==""){$url="nourl";}
////原来读取旧信息数据
// SELECT ic_url,ic_url_title,ic_photo
// ,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2
// ,'2' as sortby
// FROM dbo.infoContents
// inner join infoStructures on ic_id=is_ic_id
// WHERE is_sitecode='ct'
// and ic_status=1
// and is_parent_id = ?
$sql = "
select * from (
SELECT ic_url,ic_url_title,ic_photo
@ -270,9 +296,9 @@ class Api_model extends CI_Model {
,'2' as sortby
FROM dbo.infoContents
inner join infoStructures on ic_id=is_ic_id
WHERE is_sitecode='ct'
WHERE is_sitecode='chinatravel'
and ic_status=1
and is_parent_id = ?
and ic_url like ?
UNION ALL
@ -288,8 +314,7 @@ class Api_model extends CI_Model {
order by sortby
";
$qurey = $this->HT->query($sql,array("-1",$new_pid));
$qurey = $this->HT->query($sql,array($url."/%",$new_pid));
return $qurey->result();
}

Loading…
Cancel
Save