You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
909 B
PHTML
43 lines
909 B
PHTML
9 years ago
|
<?php
|
||
|
|
||
|
/*
|
||
|
* 站点相关信息查询
|
||
|
*/
|
||
|
|
||
|
class Site_model extends CI_Model {
|
||
|
/*
|
||
|
|
||
|
tour
|
||
|
single-city-tour
|
||
|
yangtzecruise
|
||
|
hotel
|
||
|
china-flights
|
||
|
travelguide
|
||
|
|
||
|
*/
|
||
|
|
||
|
var $SSC_ParentID = 0;
|
||
|
var $menus = 0;
|
||
|
|
||
|
function __construct() {
|
||
|
parent::__construct();
|
||
|
$this->HT = $this->load->database('HT', TRUE);
|
||
|
}
|
||
|
|
||
|
function get_country_by_id($id,$lgc=FALSE) {
|
||
|
if ($lgc===FALSE)
|
||
|
{
|
||
|
$lgc = $this->config->item('Site_LGC');
|
||
|
}
|
||
|
elseif (!is_numeric($lgc))
|
||
|
{
|
||
|
return array();
|
||
|
}
|
||
|
$sql = "SELECT ci2.COI2_COI_SN, \n"
|
||
|
. " ci2.COI2_Country \n"
|
||
|
. "FROM COuntryInfo2 ci2 \n"
|
||
|
. "WHERE ci2.COI2_LGC = ? and COI2_COI_SN = ?";
|
||
|
$query = $this->HT->query($sql, array($lgc,$id));
|
||
|
return $query->result();
|
||
|
}
|
||
|
}
|