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.
information-system/application/third_party/flight/models/site_model.php

43 lines
909 B
PHTML

<?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();
}
}