public function Lists() { if ($this->_GET) { $ProjectID = _intval($this->_GET['ProjectID']); $this->ProjectID = $ProjectID; $PropertyModule = new PropertyModule(); $ProjectModule = new ProjectModule(); //产品下属性列表 if ($ProjectID == 1) { $ModelClass = new ModelClassModule(); $ModelClassLists = $ModelClass->GetListsAll(); $this->ModelClassLists = $ModelClassLists; $this->Data = array_merge($PropertyModule->GetAllModelLists(), $PropertyModule->GetAllModelLists('tb_model_packages')); $ProjectInfo = $ProjectModule->GetOneInfoByKeyID($ProjectID); $this->ProjectInfo = $ProjectInfo; $NO = $this->_GET['NO']; if ($NO) { $Model = $PropertyModule->GetOneInfoByNO($NO); if (!$Model) { $Model = $PropertyModule->GetOneInfoByNO($NO, 'PackagesNum', 'tb_model_packages'); } $this->Model = $Model; } if ($this->_GET['State']) { $this->State = $this->_GET['State']; } else { $this->State = 0; } } else { $MysqlWhere = ' where ProjectID=' . $ProjectID . ' and ProjectPropertyParentID=0'; $Data = $PropertyModule->GetProjectPropertyLists($MysqlWhere, 0, 100); foreach ($Data as $Key => $Value) { $MysqlWhereTwo = ' where ProjectPropertyParentID=' . $Value['ProjectPropertyID']; $Data[$Key]['Two'] = $PropertyModule->GetProjectPropertyLists($MysqlWhereTwo, 0, 100); } $this->Data = $Data; //一级产品属性 $ParentMysqlWhere = ' where ProjectID=' . $ProjectID . ' and ProjectPropertyParentID=0'; $ParentData = $PropertyModule->GetProjectPropertyLists($ParentMysqlWhere, 0, 100); $this->ParentData = $ParentData; //产品信息 $ProjectInfo = $ProjectModule->GetOneInfoByKeyID($ProjectID); $this->ProjectInfo = $ProjectInfo; //产品属性信息 $ProjectPropertyID = _intval($this->_GET['ProjectPropertyID']); if ($ProjectPropertyID > 0) { $ProjectPropertyInfo = $PropertyModule->GetOneInfoByKeyID($ProjectPropertyID); $this->MyFuWuString = ',' . $ProjectPropertyInfo['MyFuWu'] . ','; $this->OtherFuWuString = ',' . $ProjectPropertyInfo['OtherFuWu'] . ','; $this->ProjectPropertyInfo = $ProjectPropertyInfo; } //服务 $FuWuModule = new FuWuModule(); $this->FuWuList = $FuWuModule->SelectLists(); } } }
public function GetDoubleStModel() { $ModelID = _intval($this->_GET['ModelID']); //当前页数 $Model = new ModelModule(); $ModelInfo = $Model->GetOnePackagesInfoByKeyID($ModelID); $ModelPC = $Model->GetOneInfoByKeyID('\'' . $ModelInfo['PCNum'] . '\'', 'NO'); $ModelPhone = $Model->GetOneInfoByKeyID('\'' . $ModelInfo['PhoneNum'] . '\'', 'NO'); $ModelClassID = explode(',', $ModelInfo['ModelClassID']); $ModelClass = new ModelClassModule(); $ModelClassInfo = ''; foreach ($ModelClassID as $val) { if ($val) { $CName = $ModelClass->GetOneInfoByKeyID($val); $ModelClassInfo .= $CName['CName']; } } if (!$ModelClassInfo) { $ModelClassInfo = '其他'; } //上一篇 $BackInfo = $Model->GetOneInfoPackagesByKeyIDBack($ModelID, ' and TuiJian>0'); //下一篇 $NextInfo = $Model->GetOneInfoPackagesByKeyIDzNext($ModelID, ' and TuiJian>0'); $ModelInfo['Color'] = str_replace(',', ' ', $ModelInfo['Color']); if (!$ModelInfo['Url_status']) { $ModelInfo['PCUrl'] = ''; $ModelInfo['EWM'] = ''; } else { $ModelInfo['EWM'] = 'http://s.jiathis.com/qrcode.php?url=' . $ModelInfo['PhoneUrl']; } if (!$ModelInfo['Content']) { $ModelInfo['Content'] = '<![CDATA[<div align="center"><img width="100%" src="' . DAILI_DOMAIN . 'uploads/img_url/' . $ModelPC['Pic'] . '" /></div> <div align="center"><img width="50%" src="' . DAILI_DOMAIN . 'uploads/img_url/' . $ModelPhone['Pic'] . '" /></div>]]>'; } $String .= '<?xml version="1.0" encoding="utf-8"?> <main> <model> <id>' . $ModelInfo['ID'] . '</id> <no>' . $ModelInfo['PackagesNum'] . '</no> <title>' . $ModelInfo['PackagesName'] . '</title> <color>' . $ModelInfo['Color'] . '</color> <star>' . $ModelInfo['BaiDuXingPing'] . '</star> <price>' . $ModelInfo['Price'] . '</price> <descript>' . $ModelInfo['Descript'] . '</descript> <youhui>' . $ModelInfo['Youhui'] . '</youhui> <sort>' . $ModelClassInfo . '</sort> <tone>' . $ModelInfo['ZhuSeDiao'] . '</tone> <pl>' . $ModelInfo['Language'] . '</pl> <website>' . $ModelInfo['PCUrl'] . '</website> <time>' . $ModelInfo['AddTime'] . '</time> <prev>' . $BackInfo['ID'] . '</prev> <next>' . $NextInfo['ID'] . '</next> <ewm>' . $ModelInfo['EWM'] . '</ewm> <content>' . $ModelInfo['Content'] . '</content> <time>' . $ModelInfo['AddTime'] . '</time> </model> </main> '; echo $String; exit; }