Beispiel #1
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();
         }
     }
 }
Beispiel #2
0
 public function GetRenewals($CustomersProjectID = 0, $Year = 1)
 {
     //获取G宝盆项目id
     $ProjectId = TONGYI_ID;
     $CustProModule = new CustProModule();
     $PropertyModule = new PropertyModule();
     $AgentModule = new AgentModule();
     $where = "Where CustomersProjectID={$CustomersProjectID} and AgentID={$_SESSION['AgentID']} and ProjectId={$ProjectId}";
     $CustProInfo = $CustProModule->GetLists($where);
     $EndTime = $CustProInfo[0]['EndTime'];
     $GongNeng = $CustProInfo[0]['GongNeng'];
     $NowTime = Date('Y');
     if (Date('Y', $EndTime) - $NowTime > 10) {
         die('达最高上限年限');
     }
     //获取当前代理的G宝盆等级
     $Agentinfo = $AgentModule->GetOneInfoByKeyID($_SESSION['AgentID']);
     $LevelID['AgentPriceID'] = $Agentinfo['GBaoPenAgentPriceID'];
     //获取该等级的折扣
     $AgentPriceModule = new AgentPriceModule();
     $AgentPriceinfo = $AgentPriceModule->GetOneInfoByArrayKeys($LevelID);
     $AgenDiscount = $AgentPriceinfo['AgenDiscount'];
     //获取该功能的价格
     $Propertyinfo = $PropertyModule->GetProjectPropertyLists("where ProjectID={$ProjectId} and ProjectPropertyID={$GongNeng}");
     $MarketPrice = $Propertyinfo[0]['MarketPrice'];
     $StandardCost = ceil($MarketPrice * $AgenDiscount * $Year);
     $data['newEndTime'] = date('Y-m-d', strtotime("{$EndTime}+ {$Year} years"));
     $data['StandardCost'] = $StandardCost;
     $data['AgenDiscount'] = $AgentPriceinfo['AgenDiscount'];
     return $data;
 }
Beispiel #3
0
 public function GetProjectProperty()
 {
     $ProjectID = _intval($this->_GET['ProjectID']);
     $PropertyModule = new PropertyModule();
     $String = '';
     //产品下属性列表
     $MysqlWhere = ' where ProjectID=' . $ProjectID . ' and ProjectPropertyParentID=0';
     $Data = $PropertyModule->GetProjectPropertyLists($MysqlWhere, 0, 100);
     foreach ($Data as $Key => $Value) {
         $String .= '<p>' . $Value['ProjectPropertyName'];
         $String .= '<select name="ProjectPropertyID[]" id="ProjectPropertyID' . $Value['ProjectPropertyID'] . '">';
         $MysqlWhereTwo = ' where ProjectPropertyParentID=' . $Value['ProjectPropertyID'];
         $Data[$Key]['Two'] = $PropertyModule->GetProjectPropertyLists($MysqlWhereTwo, 0, 100);
         foreach ($Data[$Key]['Two'] as $KeyTwo => $ValueTwo) {
             $String .= '<option value="' . $ValueTwo['ProjectPropertyID'] . '" >&nbsp;&nbsp;' . $ValueTwo['ProjectPropertyName'] . '&nbsp;&nbsp;</option>';
         }
         $String .= '</select>';
         $String .= '</p>';
     }
     echo $String;
     exit;
 }