Example #1
0
    public function GetCalssList()
    {
        $ModelClass = new ModelClassModule();
        $ModelClassLists = $ModelClass->GetListsAll();
        $String = '';
        foreach ($ModelClassLists as $Value) {
            $String .= '  <sort>
			<id>' . $Value['ID'] . '</id>
			<sortname>' . $Value['CName'] . '</sortname>
			</sort>
			';
        }
        $String = '<?xml version="1.0" encoding="utf-8"?>
		<sorts>' . $String . '</sorts>';
        echo $String;
        exit;
    }
Example #2
0
 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();
         }
     }
 }