本文整理汇总了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;
}
}
示例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();
}
}
示例3: GetProjectID
public function GetProjectID($projectname = '')
{
$ProjectModule = new ProjectModule();
$MysqlWhere = " where {$ProjectModule->ProjectName}='{$projectname}'";
$ProjectList = $ProjectModule->GetProjectLists($MysqlWhere);
$FengxinID = $ProjectList[0]['ProjectID'];
return $FengxinID;
}
示例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;
}
}
示例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 . '> ' . $ValueTwo['ProjectPropertyName'] . ' </option>';
unset($selected);
}
$String .= '</select>';
$String .= '</p>';
}
$CustProInfo['property'] = $String;
}
$this->CustomersProjectID = $CustomersProjectID;
$this->CustProInfo = $CustProInfo;
}