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


PHP QQ::In方法代码示例

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


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

示例1: Form_Create

 protected function Form_Create()
 {
     // Load the MetaControl and Ensure Edit Permissions
     $this->mctList = CommunicationListMetaControl::Create($this, QApplication::PathInfo(0), QMetaControlCreateType::CreateOnRecordNotFound);
     if ($this->mctList->EditMode) {
         if (!$this->mctList->CommunicationList->Ministry->IsLoginCanAdminMinistry(QApplication::$Login)) {
             $this->RedirectToView();
         }
     }
     $this->txtName = $this->mctList->txtName_Create();
     $this->txtName->Required = true;
     $this->txtDescription = $this->mctList->txtDescription_Create();
     $this->txtDescription->Required = false;
     $this->txtDescription->TextMode = QTextMode::MultiLine;
     $this->txtDescription->Height = '50px';
     $this->txtToken = $this->mctList->txtToken_Create();
     $this->txtToken->Name = 'Email Address';
     $this->txtToken->HtmlAfter = '<span> @ groups.alcf.net</span>';
     $this->lstType = $this->mctList->lstEmailBroadcastType_Create();
     $this->lstType->Instructions = '<span class="help" onclick="displayHelp(\'helpEmailBroadcastType\')"><img src="/assets/images/icons/help.png" alt="help"></span>';
     $this->chkSubscribable = $this->mctList->chkSubscribable_Create();
     if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
         $this->lstMinistry = $this->mctList->lstMinistry_Create(null, null, QQ::OrderBy(QQN::Ministry()->Name));
     } else {
         $intMinistryIdArray = array();
         foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
         $this->lstMinistry = $this->mctList->lstMinistry_Create(null, QQ::In(QQN::Ministry()->Id, $intMinistryIdArray), QQ::OrderBy(QQN::Ministry()->Name));
     }
     if ($this->mctList->EditMode) {
         $this->lstMinistry->Enabled = false;
     }
     $this->strPageTitle = 'Email List - ' . ($this->mctList->EditMode ? 'Edit' : 'Create New');
     $this->btnSave = new QButton($this);
     $this->btnSave->Text = 'Save';
     $this->btnSave->CssClass = 'primary';
     $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     $this->btnSave->CausesValidation = true;
     $this->btnCancel = new QLinkButton($this);
     $this->btnCancel->Text = 'Cancel';
     $this->btnCancel->CssClass = 'cancel';
     $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
     $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
     if ($this->mctList->EditMode) {
         $this->btnDelete = new QLinkButton($this);
         $this->btnDelete->Text = 'Delete';
         $this->btnDelete->CssClass = 'delete';
         $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to permanently DELETE this Email List?  This will also delete ALL the messages as well!'));
         $this->btnDelete->AddAction(new QClickEvent(), new QAjaxAction('btnDelete_Click'));
         $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:53,代码来源:edit.php

示例2: dtgMembers_Bind

 public function dtgMembers_Bind()
 {
     $objCondition = QQ::In(QQN::Person()->GroupParticipation->GroupId, $this->intGroupIdArray);
     $objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
     $this->dtgMembers->TotalItemCount = Person::QueryCount($objCondition);
     $objClauses = array(QQ::Distinct());
     if ($objClause = $this->dtgMembers->LimitClause) {
         $objClauses[] = $objClause;
     }
     if ($objClause = $this->dtgMembers->OrderByClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgMembers->DataSource = Person::QueryArray($objCondition, $objClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:14,代码来源:CpGroup_ViewGroupCategory.class.php

示例3: testAlias3

 public function testAlias3()
 {
     $emptySelect = QQ::Select();
     $emptySelect->SetSkipPrimaryKey(true);
     $nVoyel = QQ::Alias(QQN::Person()->ProjectAsManager->Milestone, 'voyel');
     $nConson = QQ::Alias(QQN::Person()->ProjectAsManager->Milestone, 'conson');
     $objPersonArray = Person::QueryArray(QQ::IsNotNull($nConson->Id), QQ::Clause(QQ::Expand($nVoyel, QQ::In($nVoyel->Name, array('Milestone A', 'Milestone E', 'Milestone I')), $emptySelect), QQ::Expand($nConson, QQ::NotIn($nConson->Name, array('Milestone A', 'Milestone E', 'Milestone I')), $emptySelect), QQ::GroupBy(QQN::Person()->Id), QQ::Minimum($nVoyel->Name, 'min_voyel'), QQ::Minimum($nConson->Name, 'min_conson'), QQ::Expand(QQN::Person()->ProjectAsManager, null, $emptySelect), QQ::Minimum(QQN::Person()->ProjectAsManager->Id, 'dummy'), QQ::Select(QQN::Person()->FirstName, QQN::Person()->LastName)));
     $this->assertEquals(3, sizeof($objPersonArray));
     $obj = $this->verifyObjectPropertyHelper($objPersonArray, 'LastName', 'Doe');
     $this->assertNull($obj->GetVirtualAttribute('min_voyel'));
     $this->assertEquals('Milestone F', $obj->GetVirtualAttribute('min_conson'));
     $obj = $this->verifyObjectPropertyHelper($objPersonArray, 'LastName', 'Ho');
     $this->assertEquals('Milestone E', $obj->GetVirtualAttribute('min_voyel'));
     $this->assertEquals('Milestone D', $obj->GetVirtualAttribute('min_conson'));
     $obj = $this->verifyObjectPropertyHelper($objPersonArray, 'LastName', 'Wolfe');
     $this->assertEquals('Milestone A', $obj->GetVirtualAttribute('min_voyel'));
     $this->assertEquals('Milestone B', $obj->GetVirtualAttribute('min_conson'));
 }
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:18,代码来源:QQAliasTest.php

示例4: RenderCount

 public function RenderCount($objGroup)
 {
     // Count differently if it's a group Category or Growth Group
     if ($objGroup->Type == GroupType::$NameArray[GroupType::GroupCategory]) {
         // Setup Group Array
         $objGroupArray = $objGroup->GetThisAndChildren();
         $intGroupIdArray = array();
         foreach ($objGroupArray as $objGroup) {
             $intGroupIdArray[] = $objGroup->Id;
         }
         $objCondition = QQ::In(QQN::Person()->GroupParticipation->GroupId, $intGroupIdArray);
         $objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
         $strReturn = Person::QueryCount($objCondition);
         return "<b>" . $strReturn . "</b>";
     } else {
         $objCondition = QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $objGroup->Id);
         $objCondition = QQ::AndCondition($objCondition, QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd));
         return Person::QueryCount($objCondition);
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:20,代码来源:gg_report.php

示例5: dtgGroups_Bind

 public function dtgGroups_Bind()
 {
     if ($this->chkViewAll->Checked) {
         $objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
     } else {
         $objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::IsNull(QQN::Group()->GroupParticipation->DateEnd), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
     }
     // Admins can view anything
     if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
     } else {
         // Non-Admins can only view non-confidential groups
         // OR groups that they are associated with
         $intMinistryIdArray = array();
         foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
         $objSubClause = QQ::OrCondition(QQ::Equal(QQN::Group()->ConfidentialFlag, false), QQ::In(QQN::Group()->MinistryId, $intMinistryIdArray));
         $objClause = QQ::AndCondition($objClause, $objSubClause);
     }
     $this->dtgGroups->DataSource = Group::QueryArray($objClause, QQ::Distinct());
 }
开发者ID:alcf,项目名称:chms,代码行数:21,代码来源:Vicp_Groups.class.php

示例6: Form_Create

 protected function Form_Create()
 {
     $this->lblLabel = new QLabel($this);
     $this->lblLabel->HtmlEntities = false;
     $this->lblLabel->Text = "<h2>Generate Volunteers Report for: </h2>";
     $this->btnGenerateReport = new QButton($this);
     $this->btnGenerateReport->Text = "Generate Report";
     $this->btnGenerateReport->CssClass = "primary";
     $this->btnGenerateReport->AddAction(new QClickEvent(), new QAjaxAction('generateReport_Click'));
     $afterArray = explode(",", QApplication::PathInfo(1));
     $this->lstAfterMonth = new QListBox($this);
     $this->lstAfterMonth->AddItem('Jan', 'Jan');
     $this->lstAfterMonth->AddItem('Feb', 'Feb');
     $this->lstAfterMonth->AddItem('Mar', 'Mar');
     $this->lstAfterMonth->AddItem('Apr', 'Apr');
     $this->lstAfterMonth->AddItem('May', 'May');
     $this->lstAfterMonth->AddItem('Jun', 'Jun');
     $this->lstAfterMonth->AddItem('Jul', 'Jul');
     $this->lstAfterMonth->AddItem('Aug', 'Aug');
     $this->lstAfterMonth->AddItem('Sep', 'Sep');
     $this->lstAfterMonth->AddItem('Oct', 'Oct');
     $this->lstAfterMonth->AddItem('Nov', 'Nov');
     $this->lstAfterMonth->AddItem('Dec', 'Dec');
     if (QApplication::PathInfo(1)) {
         $this->lstAfterMonth->SelectedValue = $afterArray[0];
     }
     $this->lstAfterYear = new QListBox($this);
     $this->lstAfterYear->AddItem('2010', '2010');
     $this->lstAfterYear->AddItem('2011', '2011');
     $this->lstAfterYear->AddItem('2012', '2012');
     $this->lstAfterYear->AddItem('2013', '2013');
     $this->lstAfterYear->AddItem('2014', '2014');
     if (QApplication::PathInfo(1)) {
         $this->lstAfterYear->SelectedValue = $afterArray[1];
     }
     $beforeArray = explode(",", QApplication::PathInfo(0));
     $this->lstBeforeMonth = new QListBox($this);
     $this->lstBeforeMonth->AddItem('Jan', 'Jan');
     $this->lstBeforeMonth->AddItem('Feb', 'Feb');
     $this->lstBeforeMonth->AddItem('Mar', 'Mar');
     $this->lstBeforeMonth->AddItem('Apr', 'Apr');
     $this->lstBeforeMonth->AddItem('May', 'May');
     $this->lstBeforeMonth->AddItem('Jun', 'Jun');
     $this->lstBeforeMonth->AddItem('Jul', 'Jul');
     $this->lstBeforeMonth->AddItem('Aug', 'Aug');
     $this->lstBeforeMonth->AddItem('Sep', 'Sep');
     $this->lstBeforeMonth->AddItem('Oct', 'Oct');
     $this->lstBeforeMonth->AddItem('Nov', 'Nov');
     $this->lstBeforeMonth->AddItem('Dec', 'Dec');
     if (QApplication::PathInfo(0)) {
         $this->lstBeforeMonth->SelectedValue = $beforeArray[0];
     }
     $this->lstBeforeYear = new QListBox($this);
     $this->lstBeforeYear->AddItem('2010', '2010');
     $this->lstBeforeYear->AddItem('2011', '2011');
     $this->lstBeforeYear->AddItem('2012', '2012');
     $this->lstBeforeYear->AddItem('2013', '2013');
     $this->lstBeforeYear->AddItem('2014', '2014');
     if (QApplication::PathInfo(0)) {
         $this->lstBeforeYear->SelectedValue = $beforeArray[1];
     }
     $this->lstMinistryDepartments = new QListBox($this);
     QApplication::PathInfo(2) == 'Select' ? $this->lstMinistryDepartments->AddItem('-- Select A Department Or Ministry --', 'Select', true) : $this->lstMinistryDepartments->AddItem('-- Select A Department Or Ministry --', 'Select');
     QApplication::PathInfo(2) == 'All' ? $this->lstMinistryDepartments->AddItem('All', 'All', true) : $this->lstMinistryDepartments->AddItem('All', 'All');
     QApplication::PathInfo(2) == 'OutreachEvangelismCare' ? $this->lstMinistryDepartments->AddItem('Department: Outreach, Evangelism, and Care', 'OutreachEvangelismCare', true) : $this->lstMinistryDepartments->AddItem('Department: Outreach, Evangelism, and Care', 'OutreachEvangelismCare');
     QApplication::PathInfo(2) == 'AdministrativeOperations' ? $this->lstMinistryDepartments->AddItem('Department: Administrative Operations', 'AdministrativeOperations', true) : $this->lstMinistryDepartments->AddItem('Department: Administrative Operations', 'AdministrativeOperations');
     QApplication::PathInfo(2) == 'Discipleship' ? $this->lstMinistryDepartments->AddItem('Department: Discipleship', 'Discipleship', true) : $this->lstMinistryDepartments->AddItem('Department: Discipleship', 'Discipleship');
     QApplication::PathInfo(2) == 'MinistryOperations' ? $this->lstMinistryDepartments->AddItem('Department: Ministry Operations', 'MinistryOperations', true) : $this->lstMinistryDepartments->AddItem('Department: Ministry Operations', 'MinistryOperations');
     QApplication::PathInfo(2) == 'WorshipArts' ? $this->lstMinistryDepartments->AddItem('Department: Worship Arts', 'WorshipArts', true) : $this->lstMinistryDepartments->AddItem('Department: Worship Arts', 'WorshipArts');
     QApplication::PathInfo(2) == 'WorshipService' ? $this->lstMinistryDepartments->AddItem('Department: Worship Service', 'WorshipService', true) : $this->lstMinistryDepartments->AddItem('Department: Worship Service', 'WorshipService');
     foreach (Ministry::LoadAll() as $objMinistry) {
         QApplication::PathInfo(2) == $objMinistry->Token ? $this->lstMinistryDepartments->AddItem('Ministry: ' . $objMinistry->Name, $objMinistry->Token, true) : $this->lstMinistryDepartments->AddItem('Ministry: ' . $objMinistry->Name, $objMinistry->Token);
     }
     // May or may not display a table
     $this->dtgVolunteers = new QDataGrid($this);
     $this->dtgVolunteers->AddColumn(new QDataGridColumn('Month and Year', '<?= $_ITEM->month; ?>', 'Width=270px'));
     $this->dtgVolunteers->AddColumn(new QDataGridColumn('# of Volunteers', '<?= $_ITEM->count; ?>', 'Width=270px'));
     // Extract information based off the selections
     if ($this->lstAfterMonth->SelectedValue && $this->lstAfterYear->SelectedValue && $this->lstBeforeMonth->SelectedValue && $this->lstBeforeYear->SelectedValue) {
         $this->startDate = new QDateTime($this->lstAfterMonth->SelectedIndex + 1 . '/1/' . $this->lstAfterYear->SelectedValue);
         $this->endDate = new QDateTime($this->lstBeforeMonth->SelectedIndex + 1 . '/1/' . $this->lstBeforeYear->SelectedValue);
         // Initialize output values
         $this->objPersonArray = array();
         $this->monthCount = array();
         $this->tempDate = new QDateTime($this->lstAfterMonth->SelectedIndex + 1 . '/1/' . $this->lstAfterYear->SelectedValue);
         while ($this->tempDate->IsEarlierOrEqualTo($this->endDate)) {
             $this->monthCount[$this->tempDate->__toString('MMM YYYY')] = 0;
             $this->objPersonArray[$this->tempDate->__toString('MMM YYYY')] = array();
             $this->tempDate->AddMonths(1);
         }
         // Figure out which groups to search first.
         /*
         +----+------------------+----------------------------+
         | id | token            | name                       |
         +----+------------------+----------------------------+
         |  1 | bc               | Biblical Counseling        |
         |  2 | hr               | HR                         |
         |  3 | appurch          | AP/Purchasing              |
         |  4 | busops           | Business Operations        |
         |  5 | finance          | Finance                    |
//.........这里部分代码省略.........
开发者ID:alcf,项目名称:chms,代码行数:101,代码来源:volunteers.php

示例7: _p

// Notice that QuerySingle returned just a single Person object
_p($objPerson->FirstName . ' ' . $objPerson->LastName);
_p('<br/>', false);
?>



	<h3>QueryArray Example</h3>
<?php 
$objPersonArray = Person::QueryArray(QQ::In(QQN::Person()->Id, array(5, 6, 8)));
// Notice that QueryArray returns an array of Person objects... this will
// be true even if the result set only yields 1 row.=
foreach ($objPersonArray as $objPerson) {
    _p($objPerson->FirstName . ' ' . $objPerson->LastName);
    _p('<br/>', false);
}
?>



	<h3>QueryCount Example</h3>
<?php 
$intCount = Person::QueryCount(QQ::In(QQN::Person()->Id, array(5, 6, 8)));
// Notice that QueryCount returns an integer
_p($intCount . ' rows.');
?>



<?php 
require __INCLUDES__ . '/examples/footer.inc.php';
开发者ID:qcodo,项目名称:qcodo,代码行数:31,代码来源:qq.php

示例8: sprintf

            $strPath = '/old_downloads/qform_controls';
            break;
        case 3:
            $strType = 'Other';
            $strPath = '/old_downloads/other';
            break;
        case 4:
            $strType = 'Langauge Files';
            $strPath = '/old_downloads/language_files';
            break;
    }
    $strName = sprintf('Downloads from Old Qcodo.com Website in "%s"', $strType);
    $strContent = sprintf('These are user-contributed downloads from the old *Qcodo.com* website in "%s", placed here for historical/archive purposes.  ', $strType);
    $strContent .= 'For new user-submitted contributions, be sure to check out the "User Contributions":http://www.qcodo.com/qpm/ section of the website.  "View All Old Downloads":wiki:/old_downloads';
    $strContent .= "\r\n\r\n";
    $objWikiItemArray = WikiItem::QueryArray(QQ::In(QQN::WikiItem()->Id, array_keys($arrDownloads[$intIndex])), QQ::OrderBy(QQN::WikiItem()->CurrentName));
    foreach ($objWikiItemArray as $objWikiItem) {
        $strContent .= sprintf('file. %s', $objWikiItem->Path);
        $strContent .= "\r\n\r\n";
    }
    $objWikiItem = WikiItem::CreateNewItem($strPath, WikiItemType::Page);
    $objWikiPage = new WikiPage();
    $objWikiPage->Content = trim($strContent);
    $objWikiPage->CompileHtml();
    $objWikiItem->CreateNewVersion($strName, $objWikiPage, 'Save', array(), Person::Load(1), null);
}
$objWikiItem = WikiItem::CreateNewItem('/old_downloads', WikiItemType::Page);
$strContent = 'These are user-contributed downloads from the old *Qcodo.com* website, placed here for historical/archive purposes.  ';
$strContent .= 'For new user-submitted contributions, be sure to check out the "User Contributions":http://www.qcodo.com/qpm/ section of the website.';
$strContent .= "\r\n\r\n";
$strContent .= 'h2. "QForm Controls":wiki:/old_downloads/qform_controls';
开发者ID:qcodo,项目名称:qcodo-website,代码行数:31,代码来源:migrator.cli.php

示例9: btnAssetModelSearchToolAdd_Click

 public function btnAssetModelSearchToolAdd_Click()
 {
     $this->ctlAssetModelSearchTool->lblWarning->Text = "";
     $intSelectedAssetModelId = $this->ctlAssetModelSearchTool->ctlAssetModelSearch->dtgAssetModel->GetSelected("AssetModelId");
     if (count($intSelectedAssetModelId) < 1) {
         $this->ctlAssetModelSearchTool->lblWarning->Text = "No selected models.";
     } else {
         $lblNewWarning = "";
         foreach (AssetModel::QueryArray(QQ::In(QQN::AssetModel()->AssetModelId, $intSelectedAssetModelId)) as $objNewAssetModel) {
             $blnExists = false;
             foreach ($this->arrAssetModels as $objAssetModel) {
                 if ($objAssetModel->AssetModelId == $objNewAssetModel->AssetModelId) {
                     $blnExists = true;
                 }
             }
             if ($blnExists) {
                 $lblNewWarning .= sprintf("<br />%s - already in list", $objNewAssetModel->AssetModelCode);
             } else {
                 $objAssetModelToAdd = new AssetCustomFieldAssetModel();
                 $objAssetModelToAdd->AssetModelId = $objNewAssetModel->AssetModelId;
                 $objAssetModelToAdd->CustomFieldId = $this->objCustomField->CustomFieldId;
                 array_push($this->arrAssetModels, $objAssetModelToAdd);
             }
         }
         $this->lstAddAssetModel->Warning = $lblNewWarning;
         $this->ctlAssetModelSearchTool->dlgAssetModelSearchTool->HideDialogBox();
     }
     // Uncheck all items but SelectAll checkbox
     $this->UncheckAllItems();
     $this->dtgAssetModels->Refresh();
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:31,代码来源:custom_field_edit.php

示例10: btnAssetSearchToolAdd_Click

 public function btnAssetSearchToolAdd_Click()
 {
     $this->ctlAssetSearchTool->lblWarning->Text = "";
     $intSelectedAssetId = $this->ctlAssetSearchTool->ctlAssetSearch->dtgAsset->GetSelected("AssetId");
     if (count($intSelectedAssetId) < 1) {
         $this->ctlAssetSearchTool->lblWarning->Text = "No selected assets.";
     } else {
         $lblNewWarning = "";
         foreach (Asset::QueryArray(QQ::In(QQN::Asset()->AssetId, $intSelectedAssetId)) as $objAsset) {
             $this->txtNewAssetCode->Text = $objAsset->AssetCode;
             $this->btnAddAsset_Click($this, null, null);
             if ($this->txtNewAssetCode->Warning) {
                 $lblNewWarning .= sprintf("<br />%s - %s", $objAsset->AssetCode, $this->txtNewAssetCode->Warning);
                 $this->txtNewAssetCode->Warning = "";
             }
         }
         $this->txtNewAssetCode->Warning = $lblNewWarning;
         $this->ctlAssetSearchTool->dlgAssetSearchTool->HideDialogBox();
     }
     // Uncheck all items but SelectAll checkbox
     $this->UncheckAllItems();
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:22,代码来源:shipment_edit.php

示例11: LoadArrayBySharedHouseholds

 /**
  * Gets an array of Household objects shared by two people (e.g. all households where both people are participants.
  * @param Person $objPerson1
  * @param Person $objPerson2
  */
 public static function LoadArrayBySharedHouseholds(Person $objPerson1, Person $objPerson2)
 {
     $intSharedHouseholdIdArray = array();
     foreach ($objPerson1->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
         $intSharedHouseholdIdArray[] = $objHouseholdParticipation->HouseholdId;
     }
     return Household::QueryArray(QQ::AndCondition(QQ::Equal(QQN::Household()->HouseholdParticipation->PersonId, $objPerson2->Id), QQ::In(QQN::Household()->Id, $intSharedHouseholdIdArray)));
 }
开发者ID:alcf,项目名称:chms,代码行数:13,代码来源:Household.class.php

示例12: RenderCurrentGroups

 public function RenderCurrentGroups(Person $objPerson)
 {
     $this->objParticipations = GroupParticipation::QueryArray(QQ::AndCondition(QQ::Equal(QQN::GroupParticipation()->PersonId, $objPerson->Id), QQ::IsNull(QQN::GroupParticipation()->DateEnd), QQ::In(QQN::GroupParticipation()->GroupId, $this->intGroupIdArray)), QQ::Clause(QQ::OrderBy(QQN::GroupParticipation()->Group->Name), QQ::Expand(QQN::GroupParticipation()->Group->Name)));
     $strArray = array();
     foreach ($this->objParticipations as $objParticipation) {
         $strArray[] = $objParticipation->Group->Name;
     }
     if (count($strArray)) {
         return implode(' and ', $strArray);
     } else {
         return '<span style="font-size: 10px; color: #999;">No current groups</span>';
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:13,代码来源:CpGroup_Base.class.php

示例13: btnPrintLabels_Click

 protected function btnPrintLabels_Click()
 {
     //if ($this->blnPrintLabels) {
     $this->strBarCodeArray = array();
     $this->strTablesBufferArray = array();
     $this->intCurrentBarCodeLabel = 0;
     // Set start value for PDF generation progress bar
     $_SESSION["intGeneratingStatus"] = 0;
     set_time_limit(0);
     $blnError = false;
     // Array[0] - DataGrid Object name; array[1] - Id; array[2] - used for Bar Code Label Generation
     $arrDataGridObjectNameId = $this->ctlSearchMenu->GetDataGridObjectNameId();
     $this->intObjectIdArray = $this->ctlSearchMenu->{$arrDataGridObjectNameId}[0]->GetSelected($arrDataGridObjectNameId[1]);
     $objCheckedArray = array();
     if (count($this->intObjectIdArray)) {
         // Switch statement for all four entity types
         switch ($this->lstLabelTypeControl->SelectedValue) {
             case 1:
                 // Load an array of Assets by AssetId
                 $objCheckedArray = Asset::QueryArray(QQ::In(QQN::Asset()->AssetId, $this->intObjectIdArray));
                 break;
             case 2:
                 // Load an array of Inventories by InventoryModelId
                 $objCheckedArray = InventoryModel::QueryArray(QQ::In(QQN::InventoryModel()->InventoryModelId, $this->intObjectIdArray));
                 break;
             case 3:
                 // Load an array of Locations by LocationId
                 $objCheckedArray = Location::QueryArray(QQ::In(QQN::Location()->LocationId, $this->intObjectIdArray));
                 break;
             case 4:
                 $objCheckedArray = UserAccount::QueryArray(QQ::In(QQN::UserAccount()->UserAccountId, $this->intObjectIdArray));
                 break;
             default:
                 $this->btnPrintLabels->Warning = "Please select Label Type.<br/>";
                 $this->intObjectIdArray = array();
                 $blnError = true;
                 break;
         }
         $objArrayById = array();
         // Create array of objects where the key is Id
         foreach ($objCheckedArray as $objChecked) {
             $objArrayById[$objChecked->{$arrDataGridObjectNameId}[1]] = $objChecked;
         }
         // Fill the BarCodeArray in the order items sorted in the datagrid
         foreach ($this->intObjectIdArray as $intObjectId) {
             $this->strBarCodeArray[] = $objArrayById[$intObjectId]->{$arrDataGridObjectNameId}[2];
         }
     } else {
         $blnError = true;
     }
     if (!$blnError) {
         $this->btnPrintLabels->Warning = "";
         $this->lstLabelStock->SelectedValue = 0;
         $this->lstLabelOffset->RemoveAllItems();
         $this->lstLabelOffset->AddItem(new QListItem('None', 0, 1));
         $this->lstLabelStock->Enabled = true;
         $this->lstLabelOffset->Enabled = true;
         $this->dlgPrintLabels->ShowDialogBox();
     } else {
         // If we have no checked items
         $this->btnPrintLabels->Warning .= "You must check at least one item.";
     }
     // Enable Print Labels button
     $this->btnPrintLabels->Enabled = true;
     //$this->blnPrintLabels = false;
     /*}
     		else {
     		  $this->btnPrintLabels->Warning = "Please wait... loading.";
     		  $this->blnPrintLabels = true;
     		  QApplication::ExecuteJavaScript("document.getElementById('".$this->btnPrintLabels->ControlId."').click(); document.getElementById('warning_loading').innerHTML = '';");
     		}*/
     QApplication::ExecuteJavaScript("document.getElementById('warning_loading').innerHTML = '';");
 }
开发者ID:jdellinger,项目名称:tracmor,代码行数:73,代码来源:labels.php

示例14: __set

 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "TranslationPath":
             if (file_exists($mixValue)) {
                 $this->strTranslationPath = $mixValue;
             } else {
                 if (!file_exists(dirname($mixValue))) {
                     throw new Exception(sprintf('Cannot create "%s" because the parent directory "%s" does not exist', $mixValue, dirname($mixValue)));
                 }
                 if (!is_writable(dirname($mixValue))) {
                     throw new Exception(sprintf('Cannot create "%s" because the parent directory "%s" is not writable', $mixValue, dirname($mixValue)));
                 }
                 chmod(dirname($mixValue), 0777);
                 if (mkdir($mixValue, 0777, true)) {
                     $this->strTranslationPath = $mixValue;
                 } else {
                     throw new Exception(sprintf(t('TranslationPath "%s" does not exist.'), $mixValue));
                 }
                 NarroUtils::RecursiveChmod($mixValue);
             }
             break;
         case "TemplatePath":
             if (file_exists($mixValue)) {
                 $this->strTemplatePath = $mixValue;
             } else {
                 if (!file_exists(dirname($mixValue))) {
                     throw new Exception(sprintf('Cannot create "%s" because the parent directory "%s" does not exist', $mixValue, dirname($mixValue)));
                 }
                 if (!is_writable(dirname($mixValue))) {
                     throw new Exception(sprintf('Cannot create "%s" because the parent directory "%s" is not writable', $mixValue, dirname($mixValue)));
                 }
                 chmod(dirname($mixValue), 0777);
                 if (mkdir($mixValue, 0777, true)) {
                     $this->strTranslationPath = $mixValue;
                 } else {
                     throw new Exception(sprintf(t('TranslationPath "%s" does not exist.'), $mixValue));
                 }
                 NarroUtils::RecursiveChmod($mixValue);
             }
             break;
         case "User":
             if ($mixValue instanceof NarroUser) {
                 $this->objUser = $mixValue;
             } else {
                 throw new Exception(t('User should be set with an instance of NarroUser'));
             }
             break;
         case "Project":
             if ($mixValue instanceof NarroProject) {
                 $this->objProject = $mixValue;
             } else {
                 throw new Exception(t('Project should be set with an instance of NarroProject'));
             }
             break;
         case "TargetLanguage":
             if ($mixValue instanceof NarroLanguage) {
                 $this->objTargetLanguage = $mixValue;
             } else {
                 throw new Exception(t('TargetLanguage should be set with an instance of NarroLanguage'));
             }
             break;
         case "SourceLanguage":
             if ($mixValue instanceof NarroLanguage) {
                 $this->objSourceLanguage = $mixValue;
             } else {
                 throw new Exception(t('SourceLanguage should be set with an instance of NarroLanguage'));
             }
             break;
         case "Approve":
             try {
                 $this->blnApprove = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "SkipUntranslated":
             try {
                 $this->blnSkipUntranslated = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "ApproveAlreadyApproved":
             try {
                 $this->blnApproveAlreadyApproved = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "CheckEqual":
             try {
                 $this->blnCheckEqual = QType::Cast($mixValue, QType::Boolean);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
//.........这里部分代码省略.........
开发者ID:Jobava,项目名称:narro,代码行数:101,代码来源:NarroProjectImporter.class.php

示例15: foreach

	<h2>Example 2: Projects that are related to both 'Blueman Industrial Site Architecture' and 'ACME Payment System' projects</h2>
<?php 
$objProjectArray = Project::QueryArray(QQ::AndCondition(QQ::Equal(QQ::Alias(QQN::Project()->ProjectAsRelated, 'related1')->Project->Name, 'Blueman Industrial Site Architecture'), QQ::Equal(QQ::Alias(QQN::Project()->ProjectAsRelated, 'related2')->Project->Name, 'ACME Payment System')));
foreach ($objProjectArray as $objProject) {
    _p($objProject->Name . " (" . $objProject->Description . ")");
    _p('<br/>', false);
}
?>

	<h2>Example 3: Managers having one least a project with a conson milestone, and for each manager, the first voyel milestone and the first conson one</h2>
<?php 
$emptySelect = QQ::Select();
$emptySelect->SetSkipPrimaryKey(true);
$nVoyel = QQ::Alias(QQN::Person()->ProjectAsManager->Milestone, 'voyel');
$nConson = QQ::Alias(QQN::Person()->ProjectAsManager->Milestone, 'conson');
$objPersonArray = Person::QueryArray(QQ::IsNotNull($nConson->Id), QQ::Clause(QQ::Expand(QQN::Person()->ProjectAsManager, null, $emptySelect), QQ::Expand($nVoyel, QQ::In($nVoyel->Name, array('Milestone A', 'Milestone E', 'Milestone I')), $emptySelect), QQ::Expand($nConson, QQ::NotIn($nConson->Name, array('Milestone A', 'Milestone E', 'Milestone I')), $emptySelect), QQ::GroupBy(QQN::Person()->Id), QQ::Minimum($nVoyel->Name, 'min_voyel'), QQ::Minimum($nConson->Name, 'min_conson'), QQ::Expand(QQN::Person()->ProjectAsManager, null, $emptySelect), QQ::Minimum(QQN::Person()->ProjectAsManager->Id, 'dummy'), QQ::Select(QQN::Person()->FirstName, QQN::Person()->LastName)));
foreach ($objPersonArray as $objManager) {
    _p($objManager->FirstName . ' ' . $objManager->LastName . " (" . $objManager->GetVirtualAttribute('min_voyel') . ', ' . $objManager->GetVirtualAttribute('min_conson') . ")");
    _p('<br/>', false);
}
?>

	<h2>Example 4: Projects with, for each one, the "min" city from the addresses containing 'r' and the "min" city from the addresses NOT containing 'r' </h2>
<?php 
$nWithR = QQ::Alias(QQN::Project()->PersonAsTeamMember->Person->Address, 'with_r');
$nWithoutR = QQ::Alias(QQN::Project()->PersonAsTeamMember->Person->Address, 'without_r');
$objProjectArray = Project::QueryArray(QQ::All(), QQ::Clause(QQ::Expand($nWithR, QQ::Like($nWithR->Street, '%r%')), QQ::Expand($nWithoutR, QQ::NotLike($nWithoutR->Street, '%r%')), QQ::GroupBy(QQN::Project()->Id), QQ::Minimum($nWithR->City, 'min_city_r'), QQ::Minimum($nWithoutR->City, 'min_city_wor')));
foreach ($objProjectArray as $objProject) {
    _p($objProject->Name . " (" . $objProject->GetVirtualAttribute('min_city_r') . ', ' . $objProject->GetVirtualAttribute('min_city_wor') . ")");
    _p('<br/>', false);
}
开发者ID:vaibhav-kaushal,项目名称:qc-framework,代码行数:31,代码来源:alias.php


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