ci = &get_instance(); } /*分类*/ function _typeclass($classid,$en=3,$num=900,$order=NULL) { $this->ci->load->_model('Model_typeclass','typeclass'); $where = "classid = '$classid'"; if($en == '2') { $where .= " and spare != '0' and spare != '' and spare != 'null'"; } if($en == '1') { $where .= " and ae != ''"; } $result = $this->ci->typeclass->find_all($where,'*',$order,0,$num); return $result; } /*分类2 这个是按照要求部分花型不显示出来*/ function _typeclassyc($classid,$num=900,$order=NULL) { $this->ci->load->_model('Model_typeclass','typeclass'); $where = "classid = '$classid'"; $where .= " and id != 105 and id != 107 and id != 112 and id != 114 and id != 115 and id != 116 and id != 117 and id != 118 and id != 119 and id != 120 and id != 121 and id != 122 and id != 123 and id != 124 and id != 125 and id != 292 and id != 63 and id != 289 and id != 290 and id != 181 and id != 273 and id != 148 and id != 38 and id != 291 and id != 55 and id != 271 and id != 285 and id != 186 and id != 187 and id != 188 and id != 189 and id != 53 and id != 67"; $result = $this->ci->typeclass->find_all($where,'*',$order,0,$num); return $result; } /*店铺*/ function _shop($type,$num=900,$order=NULL) { $this->ci->load->_model('Model_shop','shop'); $where = '1=1'; if($type) { $where .= " and type = '$type'"; } $result = $this->ci->shop->find_all($where,'*',$order,0,$num); return $result; } /*USER店铺*/ function _usershop($num=100,$order=NULL) { $this->ci->load->_model('Model_shop','shop'); $user = $this->ci->user->get_api($_SESSION['api']); $usersp = explode('|',trim($user['shop'],'|'));$sid = ''; foreach ($usersp as $v) { $sid .= " id = ".$v." or"; } $result = $this->ci->shop->find_all(rtrim($sid,'or'),'*',$order,0,$num); return $result; } /*仓库*/ function _warehouse($classid,$num=100,$order='px asc') { $this->ci->load->_model('Model_warehouse','warehouse'); $this->ci->load->_model('Model_user','user'); $this->ci->load->library('session'); $user = $this->ci->user->get_api($_SESSION['api']); $where = "id != 2 and id != 14 and id != 11 and id != 15 and id != 10 and id != 1 and id != 4"; $result = $this->ci->warehouse->find_all($where,'*',$order,0,$num); return $result; } /*独立站仓库*/ function _dlzwarehouse($classid,$num=100,$order='px asc') { $this->ci->load->_model('Model_warehouse','warehouse'); $where = "id != 2 and id != 7 and id != 8 and id != 9 and id != 14 and id != 11 and id != 15 and id != 10 and id != 1 and id != 4"; $result = $this->ci->warehouse->find_all($where,'*',$order,0,$num); return $result; } /*快递*/ function _express($num=100,$ae,$order=NULL) { $this->ci->load->_model('Model_express','express'); $where = "off != '1'"; if($ae == 'smt') { $where .= " and aecode != 'Others'"; } $result = $this->ci->express->find_all($where,'*',$order,0,$num); return $result; } /*翔文快递*/ function _xwexpress($num=100,$order=NULL) { $this->ci->load->_model('Model_express','express'); $where = "off != '1' and servicename like '%翔文%'"; //and ((id > 42 and id < 50) or id = 55 or id = 61 or id = 65)"; $result = $this->ci->express->find_all($where,'*',$order,0,$num); return $result; } /*供应商*/ function _purchase($classid,$num=100,$order=NULL) { $this->ci->load->_model('Model_purchase','purchase'); $where = "1 = 1"; $result = $this->ci->purchase->find_all($where,'*',$order,0,$num); return $result; } /*国家*/ function _country($num=500,$order=NULL) { $this->ci->load->_model('Model_country','country'); $where = "1 = 1"; $result = $this->ci->country->find_all($where,'*',$order,0,$num); return $result; } /*海关申报*/ function _customsdeclaration($num=500,$order=NULL) { $this->ci->load->_model('Model_customsdeclaration','customsdeclaration'); $where = "1 = 1"; $result = $this->ci->customsdeclaration->find_all($where,'*',$order,0,$num); return $result; } /*仓库产品位置*/ function _whlabelwz($num=100,$order=NULL) { $this->ci->load->_model('Model_whlabelwz','whlabelwz'); $where = "1 = 1"; $result = $this->ci->whlabelwz->find_all($where,'*',$order,0,$num); return $result; } /*IOSS*/ function _ioss($num=500,$order=NULL) { $this->ci->load->_model('Model_ioss','ioss'); $where = "1 = 1"; $result = $this->ci->ioss->find_all($where,'*',$order,0,$num); return $result; } /*email*/ function _email($num=500,$shop,$order=NULL) { $this->ci->load->_model('Model_email','email'); $where = "1 = 1"; if($shop) { $where .= "shop = '$shop'"; } $result = $this->ci->email->find_all($where,'*',$order,0,$num); return $result; } /*品牌*/ function _brand($num=100,$order=NULL) { $this->ci->load->_model('Model_brand','brand'); $where = "1 = 1"; $result = $this->ci->brand->find_all($where,'*',$order,0,$num); return $result; } /*备货类型*/ function _whlabel_type($num=100,$order=NULL) { $this->ci->load->_model('Modelwhlabel_type','whlabel_type'); $where = "1 = 1"; $result = $this->ci->whlabel_type->find_all($where,'*',$order,0,$num); return $result; } /*公司名称*/ function _whlabel_company($num=100,$order=NULL) { $this->ci->load->_model('Model_company','company'); $where = "1 = 1"; $result = $this->ci->company->find_all($where,'*',$order,0,$num); return $result; } } /*通用类对象*/ function get_common(){ return new Common(); } /*分类*/ function typeclass($classid,$en=3,$num=900,$order='sequence asc'){ $com = &get_common(); return $com->_typeclass($classid,$en,$num,$order); } /*分类2 这个是按照要求部分花型不显示出来*/ function typeclassyc($classid,$num=900,$order='sequence asc'){ $com = &get_common(); return $com->_typeclassyc($classid,$num,$order); } /*店铺*/ function shop($type=269,$num=900,$order='id asc'){ $com = &get_common(); return $com->_shop($type,$num,$order); } /*USER店铺*/ function usershop($num=100,$order='px asc'){ $com = &get_common(); return $com->_usershop($num,$order); } /*仓库*/ function warehouse($num=900,$order='id asc'){ $com = &get_common(); return $com->_warehouse($num,$order); } /*独立站仓库*/ function dlzwarehouse($num=20,$order='id asc'){ $com = &get_common(); return $com->_warehouse($num,$order); } /*快递*/ function express($num=20,$ae=1,$order='idsort desc'){ $com = &get_common(); return $com->_express($num,$ae,$order); } /*翔文快递*/ function xwexpress($num=20,$order='idsort desc'){ $com = &get_common(); return $com->_xwexpress($num,$order); } /*供应商*/ function purchase($num=20,$order='id asc'){ $com = &get_common(); return $com->_purchase($num,$order); } /*国家*/ function country($num=500,$order='name asc'){ $com = &get_common(); return $com->_country($num,$order); } /*海关申报*/ function customsdeclaration($num=500,$order='px asc'){ $com = &get_common(); return $com->_customsdeclaration($num,$order); } /*仓库产品位置*/ function whlabelwz($num=100,$order='id asc'){ $com = &get_common(); return $com->_whlabelwz($num,$order); } /*IOSS*/ function ioss($num=500,$order='id asc'){ $com = &get_common(); return $com->_ioss($num,$order); } /*email*/ function email($num=500,$shop='',$order='id asc'){ $com = &get_common(); return $com->_email($num,$shop,$order); } /*品牌*/ function brand($num=500,$order='id asc'){ $com = &get_common(); return $com->_brand($num,$order); } /*备货类型*/ function whlabel_type($num=500,$order='id asc'){ $com = &get_common(); return $com->_whlabel_type($num,$order); } /*公司*/ function company($num=500,$order='id asc'){ $com = &get_common(); return $com->_whlabel_company($num,$order); } /*载入编辑器*/ function load_editor($id='content',$top = '0px',$height='300px',$content='
";print_r($arr);echo ""; exit; } /* End of file Common.php */ /* Location: ./app/libraries/Common.php */