当前位置: 首页>>代码示例>>PHP>>正文


PHP ProjectModule::GetProjectLists方法代码示例

本文整理汇总了PHP中ProjectModule::GetProjectLists方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectModule::GetProjectLists方法的具体用法?PHP ProjectModule::GetProjectLists怎么用?PHP ProjectModule::GetProjectLists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProjectModule的用法示例。


在下文中一共展示了ProjectModule::GetProjectLists方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Edit

 public function Edit()
 {
     $AgentPriceModule = new AgentPriceModule();
     if ($this->_POST) {
         //提交修改
         $AgentPriceID = _intval($this->_POST['AgentPriceID']);
         $Data['LevelID'] = trim($this->_POST['LevelID']);
         $Data['ProjectID'] = trim($this->_POST['ProjectID']);
         $Data['AgenDiscount'] = trim($this->_POST['AgenDiscount']);
         $Data['Remarks'] = trim($this->_POST['Remarks']);
         $Data['AddTime'] = time();
         $Page = _intval($this->_POST['Page']);
         if (!$Data['LevelID'] || !$Data['ProjectID'] || !$Data['AgenDiscount']) {
             $this->__Message('信息填写不完整!');
         }
         if ($AgentPriceModule->UpdateArrayByKeyID($Data, $AgentPriceID)) {
             $this->__Message('修改成功!', UrlRewriteSimple($this->MyModule, 'Lists', true) . '&Page=' . $Page, '继续操作');
         } else {
             $this->__Message('修改失败,请再一次尝试!');
         }
     }
     if ($this->_GET) {
         //获取用户信息
         $this->AgentPriceID = _intval($this->_GET['AgentPriceID']);
         $this->Page = _intval($this->_GET['Page']);
         $AgentPriceInfo = $AgentPriceModule->GetOneInfoByKeyID($this->AgentPriceID);
         $this->AgentPriceInfo = $AgentPriceInfo;
         $ProjectModule = new ProjectModule();
         $this->ProjectLists = $ProjectModule->GetProjectLists();
         include 'Include/LevelArray.php';
         $this->LevelArray = $LevelArray;
     }
 }
开发者ID:baiduXM,项目名称:agent,代码行数:33,代码来源:class.AgentPrice.php

示例2: AddAccount

 public function AddAccount()
 {
     if ($this->_POST) {
         //提交添加
         $Post['ProjectID'] = _intval($this->_POST['ProjectID']);
         $Post['AgentID'] = _intval($this->_POST['AgentID']);
         $Remarks = trim($this->_POST['Remarks']);
         $JinE = trim($this->_POST['JinE']);
         $Page = _intval($this->_POST['Page']);
         if ($JinE < 1 || $Post['ProjectID'] == 0 || $Post['AgentID'] == 0) {
             $this->__Message('信息填写错误!');
         }
         $AgentAccountModule = new AgentAccountModule();
         $AgentAccountInfo = $AgentAccountModule->GetOneInfoByArrayKeys($Post);
         if (empty($AgentAccountInfo)) {
             //添加数据表
             $Post['Remarks'] = $Remarks;
             $Post['Total'] = $JinE;
             $Post['Balance'] = $JinE;
             $IsOk = $AgentAccountModule->InsertArray($Post);
         } else {
             //更新数据表
             $UpdateInfo['Remarks'] = $Remarks;
             $UpdateInfo['Total'] = $AgentAccountInfo['Total'] + $JinE;
             $UpdateInfo['Balance'] = $AgentAccountInfo['Balance'] + $JinE;
             $IsOk = $AgentAccountModule->UpdateArrayByArrayKeys($UpdateInfo, $Post);
         }
         if ($IsOk) {
             $AddOrderIsOk = $this->AddOrder($Post['AgentID'], $Post['ProjectID'], $JinE + $AgentAccountInfo['Balance'], $JinE);
             if ($AddOrderIsOk == 0) {
                 $this->__Message('入账成功,记录操作失败!', UrlRewriteSimple($this->MyModule, 'Lists', true) . '&Page=' . $Page, '继续操作');
             }
             $this->__Message('入账成功!', UrlRewriteSimple($this->MyModule, 'Lists', true) . '&Page=' . $Page, '继续操作');
         } else {
             $this->__Message('入账失败,请再一次尝试!');
         }
     } else {
         $AgentID = trim($this->_GET['AgentID']);
         $AgentModule = new AgentModule();
         $this->AgentInfo = $AgentModule->GetOneInfoByKeyID($AgentID);
         //print_r($this->AgentInfo);exit;
         include 'Include/LevelArray.php';
         $ProjectModule = new ProjectModule();
         $this->ProjectLists = $ProjectModule->GetProjectLists();
     }
 }
开发者ID:baiduXM,项目名称:agent,代码行数:46,代码来源:class.Agent.php

示例3: GetProjectID

 public function GetProjectID($projectname = '')
 {
     $ProjectModule = new ProjectModule();
     $MysqlWhere = " where {$ProjectModule->ProjectName}='{$projectname}'";
     $ProjectList = $ProjectModule->GetProjectLists($MysqlWhere);
     $FengxinID = $ProjectList[0]['ProjectID'];
     return $FengxinID;
 }
开发者ID:baiduXM,项目名称:agent,代码行数:8,代码来源:class.Agent.php

示例4: Lists

 public function Lists()
 {
     $MysqlWhere = ' where 1';
     $Page = intval($this->_GET['Page']);
     $Page = $Page ? $Page : 1;
     $ProjectModule = new ProjectModule();
     $ProjectListsNum = $ProjectModule->GetProjectListsNum($MysqlWhere);
     $Rscount = $ProjectListsNum['Num'];
     $PageSize = 10;
     if ($Rscount) {
         $Data['RecordCount'] = $Rscount;
         $Data['PageSize'] = $PageSize ? $PageSize : $Data['RecordCount'];
         $Data['PageCount'] = ceil($Data['RecordCount'] / $PageSize);
         $Data['Page'] = min($Page, $Data['PageCount']);
         $Offset = ($Page - 1) * $Data['PageSize'];
         if ($Page > $Data['PageCount']) {
             $Page = $Data['PageCount'];
         }
         $Data['Data'] = $ProjectModule->GetProjectLists($MysqlWhere, $Offset, $Data['PageSize']);
         MultiPage($Data, 10);
         $this->Data = $Data;
     }
 }
开发者ID:baiduXM,项目名称:agent,代码行数:23,代码来源:class.Project.php

示例5: Lists

 public function Lists()
 {
     $CustomersID = _intval($this->_GET['CustomersID']);
     $MysqlWhere = ' where CustomersID=' . $CustomersID;
     $Page = intval($this->_GET['Page']);
     $Page = $Page ? $Page : 1;
     $CustProModule = new CustProModule();
     $ListsNum = $CustProModule->GetListsNum($MysqlWhere);
     $Rscount = $ListsNum['Num'];
     $PageSize = 10;
     if ($Rscount) {
         $Data['RecordCount'] = $Rscount;
         $Data['PageSize'] = $PageSize ? $PageSize : $Data['RecordCount'];
         $Data['PageCount'] = ceil($Data['RecordCount'] / $PageSize);
         $Data['Page'] = min($Page, $Data['PageCount']);
         $Offset = ($Page - 1) * $Data['PageSize'];
         if ($Page > $Data['PageCount']) {
             $Page = $Data['PageCount'];
         }
         $Data['Data'] = $CustProModule->GetLists($MysqlWhere, $Offset, $Data['PageSize']);
         $ProjectModule = new ProjectModule();
         $CustomersModule = new CustomersModule();
         $PropertyModule = new PropertyModule();
         foreach ($Data['Data'] as $Key => $Value) {
             $CustomersInfo = $CustomersModule->GetOneInfoByKeyID($Value['CustomersID']);
             $Data['Data'][$Key]['CompanyName'] = $CustomersInfo['CompanyName'];
             $ProjectInfo = $ProjectModule->GetOneInfoByKeyID($Value['ProjectID']);
             $Data['Data'][$Key]['ProjectName'] = $ProjectInfo['ProjectName'];
             if ($Value['ProjectPropertyID'] != '') {
                 $Data['Data'][$Key]['ProjectPropertyArray'] = $PropertyModule->GetProjectPropertyLists(' where ProjectPropertyID in(' . $Value['ProjectPropertyID'] . ')', 0, 100);
             }
         }
         MultiPage($Data, 10);
         $this->Data = $Data;
     }
     //获取用户信息
     $CustomersID = _intval($this->_GET['CustomersID']);
     $CustomersModule = new CustomersModule();
     $CustomersInfo = $CustomersModule->GetOneInfoByKeyID($CustomersID);
     $this->CustomersInfo = $CustomersInfo;
     //获取所有产品
     $ProjectModule = new ProjectModule();
     $ProjectLists = $ProjectModule->GetProjectLists('', 0, 100);
     $this->ProjectLists = $ProjectLists;
     //客戶产品信息
     $CustomersProjectID = _intval($this->_GET['CustomersProjectID']);
     if ($CustomersProjectID > 0) {
         $CustProInfo = $CustProModule->GetOneInfoByKeyID($CustomersProjectID);
         //产品下属性列表
         $ProjectID = $CustProInfo['ProjectID'];
         $PropertyModule = new PropertyModule();
         $String = '';
         $selected = '';
         $MysqlWhere = ' where ProjectID=' . $ProjectID . ' and ProjectPropertyParentID=0';
         $PropertyData = $PropertyModule->GetProjectPropertyLists($MysqlWhere, 0, 100);
         foreach ($PropertyData as $Key => $Value) {
             $String .= '<p>' . $Value['ProjectPropertyName'];
             $String .= '<select name="ProjectPropertyID[]" id="ProjectPropertyID' . $Value['ProjectPropertyID'] . '">';
             $MysqlWhereTwo = ' where ProjectPropertyParentID=' . $Value['ProjectPropertyID'];
             $PropertyData[$Key]['Two'] = $PropertyModule->GetProjectPropertyLists($MysqlWhereTwo, 0, 100);
             foreach ($PropertyData[$Key]['Two'] as $KeyTwo => $ValueTwo) {
                 $a = ',' . $CustProInfo['ProjectPropertyID'] . ',';
                 $b = ',' . $ValueTwo['ProjectPropertyID'] . ',';
                 if (strstr($a, $b)) {
                     $selected = 'selected="selected"';
                 }
                 $String .= '<option value="' . $ValueTwo['ProjectPropertyID'] . '" ' . $selected . '>&nbsp;&nbsp;' . $ValueTwo['ProjectPropertyName'] . '&nbsp;&nbsp;</option>';
                 unset($selected);
             }
             $String .= '</select>';
             $String .= '</p>';
         }
         $CustProInfo['property'] = $String;
     }
     $this->CustomersProjectID = $CustomersProjectID;
     $this->CustProInfo = $CustProInfo;
 }
开发者ID:baiduXM,项目名称:agent,代码行数:77,代码来源:class.CustPro.php


注:本文中的ProjectModule::GetProjectLists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。