|
|
|
|
@ -266,6 +266,7 @@ class Api_model extends CI_Model {
|
|
|
|
|
* @param {type} $old_pid,$new_pid 父类的Id,分为旧网站的和新网站的
|
|
|
|
|
* @return:
|
|
|
|
|
* @Date Changed:
|
|
|
|
|
* 这个目前就只有CT能用
|
|
|
|
|
*/
|
|
|
|
|
function getGuideList($old_pid,$new_pid){
|
|
|
|
|
|
|
|
|
|
@ -301,7 +302,7 @@ class Api_model extends CI_Model {
|
|
|
|
|
,'2' as sortby , is_sort
|
|
|
|
|
FROM dbo.infoContents
|
|
|
|
|
inner join infoStructures on ic_id=is_ic_id
|
|
|
|
|
WHERE is_sitecode='".$this->WebCode."'
|
|
|
|
|
WHERE is_sitecode='ct'
|
|
|
|
|
and ic_status=1
|
|
|
|
|
and ic_url like ?
|
|
|
|
|
and is_parent_id <> ?
|
|
|
|
|
@ -313,7 +314,7 @@ class Api_model extends CI_Model {
|
|
|
|
|
,'1' as sortby ,is_sort
|
|
|
|
|
FROM dbo.infoContents
|
|
|
|
|
inner join infoStructures on ic_id=is_ic_id
|
|
|
|
|
WHERE is_sitecode='".$this->WebCode."'
|
|
|
|
|
WHERE is_sitecode='chinatravel'
|
|
|
|
|
and ic_status=1
|
|
|
|
|
and is_parent_id = ?
|
|
|
|
|
) allbt
|
|
|
|
|
@ -576,6 +577,74 @@ class Api_model extends CI_Model {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取发布的线路详细页的所有产品对应的线路类型列表。(用于搜索页)
|
|
|
|
|
*/
|
|
|
|
|
function getLineTypeList(){
|
|
|
|
|
|
|
|
|
|
$sql = " SELECT DISTINCT CLI_LineType
|
|
|
|
|
FROM CustomerLineInfo INNER JOIN
|
|
|
|
|
CustomerLineInfo2 ON CustomerLineInfo.CLI_SN = CustomerLineInfo2.CLI2_CLI_SN
|
|
|
|
|
WHERE (CLI_DEI_SN=".$this->dei_sn.")
|
|
|
|
|
AND (CLI_State = 1005004)
|
|
|
|
|
AND (CLI2_LGC = ".$this->CTLGC.")
|
|
|
|
|
and isnull(CustomerLineInfo2.DeleteFlag,0)=0
|
|
|
|
|
and CLI_NO in ( SELECT convert(varchar(100),(
|
|
|
|
|
SELECT TOP 1 im_value
|
|
|
|
|
FROM information_ct.dbo.infoMetas
|
|
|
|
|
WHERE im_key = 'meta_ct_page_value'
|
|
|
|
|
AND im_ic_id = ic_id
|
|
|
|
|
)) AS code
|
|
|
|
|
FROM information_ct.dbo.infoContents
|
|
|
|
|
INNER JOIN information_ct.dbo.infoStructures ON ic_id = is_ic_id
|
|
|
|
|
WHERE is_sitecode ='".$this->WebCode."' AND ic_status = 1
|
|
|
|
|
and ic_id in (select im_ic_id from information_ct.dbo.infoMetas where im_key='meta_ct_page_type' and convert(varchar(100),im_value)='tourdetail')
|
|
|
|
|
|
|
|
|
|
)";
|
|
|
|
|
|
|
|
|
|
$query =$this->HT->query($sql);
|
|
|
|
|
$all_values = array();
|
|
|
|
|
|
|
|
|
|
if ($query->num_rows() > 0) {
|
|
|
|
|
foreach ($query->result_array() as $row) {
|
|
|
|
|
$column_data = $row['code'];
|
|
|
|
|
// 分割逗号分隔的值
|
|
|
|
|
$values = explode(',', $column_data);
|
|
|
|
|
// 去除每个值的空白字符
|
|
|
|
|
$values = array_map('trim', $values);
|
|
|
|
|
// 合并到总数组
|
|
|
|
|
$all_values = array_merge($all_values, $values);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 去重
|
|
|
|
|
$unique_values = array_unique($all_values);
|
|
|
|
|
|
|
|
|
|
// // 重新索引数组(可选)
|
|
|
|
|
// $unique_values = array_values($unique_values);
|
|
|
|
|
|
|
|
|
|
// // 按数值大小排序(如果需要)
|
|
|
|
|
// sort($unique_values, SORT_NUMERIC);
|
|
|
|
|
|
|
|
|
|
// 合并为逗号分隔的字符串,所有类型的字符串
|
|
|
|
|
$result_string = implode(',', $unique_values);
|
|
|
|
|
|
|
|
|
|
//return $result_string;
|
|
|
|
|
$sql2 = " select SYC_SN, SYC2_CodeDiscribe
|
|
|
|
|
from SystemCode
|
|
|
|
|
inner join SystemCode2 on SYC_SN = SYC2_SYC_SN
|
|
|
|
|
where SYC_Type=6 and SYC2_LGC=".$this->CTLGC." and SYC2_CodeDiscribe>'' and SYC_SN in (".$result_string.") ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$query = $this->HT->query($sql2);
|
|
|
|
|
if ($query->num_rows()>0){
|
|
|
|
|
return $query->result();
|
|
|
|
|
}else {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* End of file Api_model.php */
|
|
|
|
|
|