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


PHP QQN::Ministry方法代码示例

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


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

示例1: Form_Create

 protected function Form_Create()
 {
     $this->dtgStaff = new LoginDataGrid($this);
     $this->dtgStaff->FontSize = 11;
     $this->dtgStaff->AddColumn(new QDataGridColumn('View', '<?= $_FORM->RenderView($_ITEM); ?>', 'HtmlEntities=false', 'Width=30px'));
     $this->dtgStaff->MetaAddColumn(QQN::Login()->Username, 'Width=75px');
     $this->dtgStaff->MetaAddColumn(QQN::Login()->FirstName, 'Name=Name', 'Html=<?= $_ITEM->Name; ?>', 'Width=110px');
     $this->dtgStaff->AddColumn(new QDataGridColumn('Acct Disabled', '<?= (!$_ITEM->DomainActiveFlag || !$_ITEM->LoginActiveFlag) ? "Disabled":""; ?>', 'Width=60px'));
     $this->dtgStaff->MetaAddTypeColumn('RoleTypeId', 'RoleType', 'Name=Role', 'Width=120px');
     foreach (PermissionType::$NameArray as $intId => $strName) {
         $this->dtgStaff->AddColumn(new QDataGridColumn('<span style="font-size: 10px;">' . $strName . '</span>', '<?= $_FORM->RenderPermission(' . $intId . ', $_ITEM); ?>', 'Width=50px', 'HtmlEntities=false'));
     }
     $this->dtgStaff->SetDataBinder('dtgStaff_Bind');
     $this->dtgStaff->SortColumnIndex = 1;
     $this->dtgStaff->SortDirection = 0;
     $this->dtgStaff->Paginator = new QPaginator($this->dtgStaff);
     $this->dtgStaff->ItemsPerPage = 100;
     $this->lstActiveFlag = new QListBox($this);
     $this->lstActiveFlag->Name = 'Active';
     $this->lstActiveFlag->AddItem('Active', true, true);
     $this->lstActiveFlag->AddItem('Inactive', false);
     $this->lstActiveFlag->AddAction(new QChangeEvent(), new QAjaxAction('dtgStaff_Refresh'));
     $this->lstMinistry = new QListBox($this);
     $this->lstMinistry->Name = 'Ministry';
     $this->lstMinistry->AddItem('- View All -', null);
     foreach (Ministry::LoadAll(QQ::OrderBy(QQN::Ministry()->Name)) as $objMinistry) {
         $this->lstMinistry->AddItem($objMinistry->Name, $objMinistry->Id);
     }
     $this->lstMinistry->AddAction(new QChangeEvent(), new QAjaxAction('dtgStaff_Refresh'));
 }
开发者ID:alcf,项目名称:chms,代码行数:30,代码来源:index.php

示例2: Form_Create

 protected function Form_Create()
 {
     // Display: Username
     $this->txtUsername = new QTextBox($this);
     $this->txtUsername->Name = 'Username';
     // Display: First Name
     $this->txtFirstName = new QTextBox($this);
     $this->txtFirstName->Name = 'First Name';
     // Display: Last Name
     $this->txtLastName = new QTextBox($this);
     $this->txtLastName->Name = 'Last Name';
     // Display: Email
     $this->txtEmail = new QTextBox($this);
     $this->txtEmail->Name = 'Email';
     foreach (Ministry::LoadAll(QQ::OrderBy(QQN::Ministry()->Name)) as $objMinistry) {
         $rblMinistry = new QRadioButtonList($this);
         $rblMinistry->Name = $objMinistry->Name;
         $rblMinistry->AddItem('Yes', $objMinistry->Id, false);
         $rblMinistry->AddItem('No', 0, true);
         $rblMinistry->RepeatColumns = 2;
         $this->rblMinistryArray[] = $rblMinistry;
     }
     $this->lstRoleType = new QListBox($this);
     $this->lstRoleType->Name = 'Role';
     foreach (RoleType::$NameArray as $intKey => $strName) {
         $this->lstRoleType->AddItem($strName, $intKey, false);
     }
     $this->rblLoginActive = new QRadioButtonList($this);
     $this->rblLoginActive->Name = 'ChMS Login Enabled';
     $this->rblLoginActive->AddItem('Yes', true, true);
     $this->rblLoginActive->AddItem('No', false, false);
     $this->rblLoginActive->RepeatColumns = 2;
     foreach (PermissionType::$NameArray as $intId => $strName) {
         $rblPermission = new QRadioButtonList($this);
         $rblPermission->Name = 'Can ' . $strName;
         $rblPermission->AddItem('Yes', $intId, false);
         $rblPermission->AddItem('No', 0, true);
         $rblPermission->RepeatColumns = 2;
         $this->rblPermissionArray[] = $rblPermission;
     }
     $this->txtNewPassword = new QTextBox($this);
     $this->txtNewPassword->Name = 'Set Password: ';
     $this->txtNewPassword->TextMode = QTextMode::Password;
     $this->txtConfirmPassword = new QTextBox($this);
     $this->txtConfirmPassword->Name = "Confirm Password";
     $this->txtConfirmPassword->TextMode = QTextMode::Password;
     // Add controls and stuff for Editable pages
     $this->btnSave = new QButton($this);
     $this->btnSave->Text = 'Update';
     $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     $this->btnSave->CssClass = 'primary';
     $this->btnCancel = new QLinkButton($this);
     $this->btnCancel->Text = 'Cancel';
     $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
     $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnCancel->CssClass = 'cancel';
 }
开发者ID:alcf,项目名称:chms,代码行数:57,代码来源:add.php

示例3: 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

示例4: Form_Create

 protected function Form_Create()
 {
     $this->pnlMinistries = new QPanel($this);
     $this->pnlMinistries->TagName = 'ul';
     $this->pnlMinistries->CssClass = 'subnavSide subnavSideSmall';
     $this->pnlMinistries->AutoRenderChildren = true;
     $this->pxyMinistry = new QControlProxy($this);
     $this->pxyMinistry->AddAction(new QClickEvent(), new QAjaxAction('pxyMinistry_Click'));
     $this->pxyMinistry->AddAction(new QClickEvent(), new QTerminateAction());
     $blnFirst = true;
     foreach (Ministry::LoadArrayByActiveFlag(true, QQ::OrderBy(QQN::Ministry()->Name)) as $objMinistry) {
         if ($objMinistry->IsLoginCanViewMinistry(QApplication::$Login)) {
             $pnlMinistry = new QPanel($this->pnlMinistries, 'pnlMinistry' . $objMinistry->Id);
             $pnlMinistry->TagName = 'li';
             $pnlMinistry->ActionParameter = $objMinistry->Id;
             if ($blnFirst) {
                 $blnFirst = false;
                 $pnlMinistry->CssClass = 'first';
             }
             $this->pnlMinistry_Refresh($objMinistry);
         }
     }
     // Last
     if ($blnFirst != true) {
         // only set if non-empty panel variable
         $pnlMinistry->CssClass = 'last';
     }
     $this->lstSignupFormType = new QListBox($this);
     $this->lstSignupFormType->AddAction(new QChangeEvent(), new QAjaxAction('lstSignupFormType_Change'));
     $this->lstSignupFormType->Visible = false;
     $this->chkViewAll = new QCheckBox($this);
     $this->chkViewAll->Text = 'View "Inactive" Signup Forms as well';
     $this->chkViewAll->AddAction(new QClickEvent(), new QAjaxAction('chkViewAll_Click'));
     $this->chkViewAll->Visible = false;
     $this->lblMinistry = new QLabel($this);
     $this->lblMinistry->TagName = 'h3';
     $this->lblMinistry_Refresh();
     $this->dtgSignupForms = new QDataGrid($this);
     $this->dtgSignupForms->CssClass = 'datagrid';
     $this->dtgSignupForms->AddColumn(new QDataGridColumn('Form Name', '<?= $_FORM->RenderName($_ITEM); ?>', 'HtmlEntities=false', 'Width=440px'));
     $this->dtgSignupForms->AddColumn(new QDataGridColumn('Signups', '<?= SignupEntry::CountBySignupFormIdSignupEntryStatusTypeId($_ITEM->Id, SignupEntryStatusType::Complete); ?>', 'Width=60px'));
     $this->dtgSignupForms->AddColumn(new QDataGridColumn('Type', '<?= $_ITEM->Type; ?>', 'Width=80px'));
     $this->dtgSignupForms->AddColumn(new QDataGridColumn('Date Created', '<?= $_ITEM->DateCreated->ToString("DDD, MMM D, YYYY"); ?>', 'Width=140px'));
     $this->dtgSignupForms->SetDataBinder('dtgSignupForms_Bind');
     $this->lblStartText = new QLabel($this);
     $this->lblStartText->Text = '<h3>Events and Signup Forms</h3><p>Please select a ministry from the list on the right.</p>';
     $this->lblStartText->HtmlEntities = false;
     $this->SetUrlHashProcessor('Form_ProcessHash');
 }
开发者ID:alcf,项目名称:chms,代码行数:49,代码来源:index.php

示例5: SetupPanel

 protected function SetupPanel()
 {
     $this->lstMinistries = new QListBox($this);
     $this->lstMinistries->Name = 'Select a Ministry';
     $this->lstMinistries->AddItem('- Select One -');
     foreach (Ministry::LoadArrayByActiveFlag(true, QQ::OrderBy(QQN::Ministry()->Name)) as $objMinistry) {
         if ($objMinistry->IsLoginCanAdminMinistry(QApplication::$Login)) {
             $this->lstMinistries->AddItem($objMinistry->Name, $objMinistry->Id);
         }
     }
     $this->dtgGroups = new QDataGrid($this);
     $this->dtgGroups->Name = '&nbsp;';
     $this->dtgGroups->AddColumn(new QDataGridColumn('Group Name', '<?= $_CONTROL->ParentControl->RenderName($_ITEM); ?>', 'HtmlEntities=false'));
     $this->dtgGroups->AddColumn(new QDataGridColumn('Type', '<?= $_ITEM->Type; ?>'));
     $this->dtgGroups->SetDataBinder('dtgGroups_Bind', $this);
     $this->lstMinistries->AddAction(new QChangeEvent(), new QAjaxControlAction($this->dtgGroups, 'Refresh'));
 }
开发者ID:alcf,项目名称:chms,代码行数:17,代码来源:Vicp_Groups_AddGroup.class.php

示例6: UpdateLocalGroupsHierarchy

 public function UpdateLocalGroupsHierarchy()
 {
     // Groups Sync -- Second Pass, update the hierarchy
     foreach ($this->arrGroups as $intKey => $arrResult) {
         $strArray = AlcfLdap::GetValuesFromPath($arrResult["distinguishedname"][0]);
         $strHierarchyArray = $strArray['OU'];
         $strGroupName = $strHierarchyArray[0];
         $strToken = substr(strtolower($arrResult['samaccountname'][0]), 3);
         $objMinistry = Ministry::LoadByToken($strToken);
         $strParentGroupName = $strHierarchyArray[1];
         if ($strParentGroupName != 'People') {
             $objParentMinistryArray = Ministry::QueryArray(QQ::Equal(QQN::Ministry()->Name, $strParentGroupName));
             if (count($objParentMinistryArray) != 1) {
                 throw new Exception('Found more than one ministry with the same name');
             }
             $objMinistry->ParentMinistry = $objParentMinistryArray[0];
             $objMinistry->Save();
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:20,代码来源:AlcfLdap.class.php

示例7: Form_Create

 protected function Form_Create()
 {
     // Load and validate the Staff Person we're trying to view
     $this->objLogin = Login::Load(QApplication::PathInfo(0));
     if (!$this->objLogin) {
         QApplication::Redirect('/admin/users');
     }
     $this->strPageTitle .= $this->objLogin->Name;
     // Display: Username
     $this->lblUsername = new QLabel($this);
     $this->lblUsername->Name = 'Username';
     $this->lblUsername->Text = $this->objLogin->Username;
     // Display: Email
     $this->lblEmail = new QLabel($this);
     $this->lblEmail->Name = 'Email';
     if ($this->objLogin->Email) {
         $this->lblEmail->Text = $this->objLogin->Email;
     } else {
         $this->lblEmail->Text = 'none';
         $this->lblEmail->CssClass = 'na';
     }
     // Display Ministry Involvement Information
     $this->lblMinistries = new QLabel($this);
     $this->lblMinistries->Name = 'Ministry Involvement';
     $strArray = array();
     foreach ($this->objLogin->GetMinistryArray() as $objMinistry) {
         $strArray[] = QApplication::HtmlEntities($objMinistry->Name);
     }
     $this->lblMinistries->Text = implode(' &nbsp;&bull;&nbsp; ', $strArray);
     if (!$this->lblMinistries->Text) {
         $this->lblMinistries->CssClass = 'na';
         $this->lblMinistries->Text = 'n/a';
     }
     $this->lblMinistries->HtmlEntities = false;
     foreach (Ministry::LoadAll(QQ::OrderBy(QQN::Ministry()->Name)) as $objMinistry) {
         $rblMinistry = new QRadioButtonList($this);
         $rblMinistry->Name = $objMinistry->Name;
         if (in_array($objMinistry->Name, $strArray)) {
             $rblMinistry->AddItem('Yes', $objMinistry->Id, true);
             $rblMinistry->AddItem('No', 0, false);
         } else {
             $rblMinistry->AddItem('Yes', $objMinistry->Id, false);
             $rblMinistry->AddItem('No', 0, true);
         }
         $rblMinistry->RepeatColumns = 2;
         $this->rblMinistryArray[] = $rblMinistry;
     }
     foreach (PermissionType::$NameArray as $intId => $strName) {
         $rblPermission = new QRadioButtonList($this);
         $rblPermission->Name = 'Can ' . $strName;
         $rblPermission->AddItem('Yes', $intId, $this->objLogin->IsPermissionAllowed($intId));
         $rblPermission->AddItem('No', 0, !$this->objLogin->IsPermissionAllowed($intId));
         $rblPermission->RepeatColumns = 2;
         $this->rblPermissionArray[] = $rblPermission;
     }
     $this->lblRoleType = new QLabel($this);
     $this->lblRoleType->Name = 'Role';
     $this->lblRoleType->Text = "Volunteer";
     //not going to let this change to anything different
     $this->lblDomainActive = new QLabel($this);
     $this->lblDomainActive->Name = 'Domain Account Active';
     $this->lblDomainActive->Text = $this->objLogin->DomainActiveFlag ? 'Yes' : 'No';
     $this->rblLoginActive = new QRadioButtonList($this);
     $this->rblLoginActive->Name = 'ChMS Login Enabled';
     $this->rblLoginActive->AddItem('Yes', true, $this->objLogin->LoginActiveFlag);
     $this->rblLoginActive->AddItem('No', false, !$this->objLogin->LoginActiveFlag);
     $this->rblLoginActive->RepeatColumns = 2;
     $this->lblDateLastLogin = new QLabel($this);
     $this->lblDateLastLogin->Name = 'Date of Last ChMS Access';
     if ($this->objLogin->DateLastLogin) {
         $this->lblDateLastLogin->Text = $this->objLogin->DateLastLogin->ToString('MMMM D YYYY') . ' at ' . $this->objLogin->DateLastLogin->ToString('h:mmz');
     } else {
         $this->lblDateLastLogin->Text = 'None';
         $this->lblDateLastLogin->CssClass = 'na';
     }
     // Add controls and stuff for Editable pages
     $this->btnSave = new QButton($this);
     $this->btnSave->Text = 'Update';
     $this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     $this->btnSave->CssClass = 'primary';
     $this->strPassword = new QTextBox($this);
     $this->strPassword->Name = "Reset Password";
     $this->strConfirmPassword = new QTextBox($this);
     $this->strConfirmPassword->Name = "Confirm Password";
     $this->lblMessage = new QLabel($this);
     $this->btnCancel = new QLinkButton($this);
     $this->btnCancel->Text = 'Cancel';
     $this->btnCancel->AddAction(new QClickEvent(), new QAjaxAction('btnCancel_Click'));
     $this->btnCancel->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnCancel->CssClass = 'cancel';
 }
开发者ID:alcf,项目名称:chms,代码行数:91,代码来源:edit.php

示例8: SetupEditControls

 /**
  * Basic setup of edit-related QControls for a Group to be used for all group types
  * @return void
  */
 protected function SetupEditControls()
 {
     $this->mctGroup = new GroupMetaControl($this, $this->objGroup);
     $this->txtName = $this->mctGroup->txtName_Create();
     $this->txtName->Select();
     $this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtName->Required = true;
     $this->chkActiveFlag = $this->mctGroup->chkActiveFlag_Create();
     $this->chkActiveFlag->Name = 'Active?';
     $this->chkActiveFlag->Text = 'Check if this is an "Active" group.';
     $this->lstParentGroup = $this->mctGroup->lstParentGroup_Create();
     $this->lstParentGroup->Name = 'In Group Category';
     $this->lstEmailBroadcastType = $this->mctGroup->lstEmailBroadcastType_Create();
     $this->lstEmailBroadcastType->Instructions = '<span class="help" onclick="displayHelp(\'helpEmailBroadcastType\')"><img src="/assets/images/icons/help.png" alt="help"></span>';
     $this->txtToken = $this->mctGroup->txtToken_Create();
     $this->txtToken->Name = 'Email Address';
     $this->txtToken->HtmlAfter = '<span> @ groups.alcf.net</span>';
     $this->chkConfidentialFlag = $this->mctGroup->chkConfidentialFlag_Create();
     $this->chkConfidentialFlag->Name = 'Confidential?';
     $this->chkConfidentialFlag->Text = 'Check if this group is considered a "Confidential" group';
     // Confidentiality not for Group Categories
     if ($this->mctGroup->Group->GroupTypeId == GroupType::GroupCategory) {
         $this->chkConfidentialFlag->Visible = false;
         $this->chkConfidentialFlag->Checked = false;
     }
     // Setup Ministry with Rules
     if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
         $this->lstMinistry = $this->mctGroup->lstMinistry_Create(null, null, QQ::OrderBy(QQN::Ministry()->Name));
     } else {
         $intMinistryIdArray = array();
         foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
         $this->lstMinistry = $this->mctGroup->lstMinistry_Create(null, QQ::In(QQN::Ministry()->Id, $intMinistryIdArray), QQ::OrderBy(QQN::Ministry()->Name));
     }
     if ($this->mctGroup->EditMode) {
         $this->lstMinistry->Enabled = false;
     }
     // Setup EmailBroadcast-related controls
     $this->lstEmailBroadcastType->GetItem(0)->Name = '- None -';
     $this->lstEmailBroadcastType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'txtToken_Refresh'));
     $this->txtToken_Refresh();
     // Delete?
     if ($this->mctGroup->EditMode) {
         $this->btnDelete = new QLinkButton($this);
         $this->btnDelete->Text = 'Delete';
         $this->btnDelete->CssClass = 'delete';
         if ($this->mctGroup->Group->CountChildGroups()) {
             $this->btnDelete->AddAction(new QClickEvent(), new QAlertAction('This Group Category has child groups.  You must first move or delete those child groups before you can delete this Group Category.'));
             $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
         } else {
             if ($this->mctGroup->Group->GroupTypeId == GroupType::GroupCategory) {
                 $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to DELETE this group?  This will also delete all participation records and archived messages and cannot be undone.'));
                 $this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));
                 $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
             } else {
                 $this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to DELETE this group?  This will also delete all participation records and archived messages and cannot be undone.\\n\\nA better option would be to simply mark this group as "Inactive".'));
                 $this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));
                 $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:67,代码来源:CpGroup_Base.class.php

示例9: IsLoginAssociated

 /**
  * Checks to see if an association exists with a specific Login
  * @param Login $objLogin
  * @return bool
  */
 public function IsLoginAssociated(Login $objLogin)
 {
     if (is_null($this->intId)) {
         throw new QUndefinedPrimaryKeyException('Unable to call IsLoginAssociated on this unsaved Ministry.');
     }
     if (is_null($objLogin->Id)) {
         throw new QUndefinedPrimaryKeyException('Unable to call IsLoginAssociated on this Ministry with an unsaved Login.');
     }
     $intRowCount = Ministry::QueryCount(QQ::AndCondition(QQ::Equal(QQN::Ministry()->Id, $this->intId), QQ::Equal(QQN::Ministry()->Login->LoginId, $objLogin->Id)));
     return $intRowCount > 0;
 }
开发者ID:alcf,项目名称:chms,代码行数:16,代码来源:MinistryGen.class.php

示例10: setTimeout

    ?>
		<br clear="all"/>
<?php 
}
?>
	</div>


<?php 
if (QApplication::$Login) {
    ?>
	<div class="navbar" style="background-color: #766; width: 100%; border-top: 2px solid #766; border-bottom: 2px solid #766; height: 19px;">
		<div style="width: 980px; margin: auto; font-size: 11px;">
			<div id="ministryMenu" onmouseout="mmTimer = setTimeout('ToggleMinistryMenu();', 350);" onmouseover="clearTimeout(mmTimer);">
<?php 
    foreach (Ministry::LoadArrayByActiveFlag(true, QQ::OrderBy(QQN::Ministry()->Name)) as $objMinistry) {
        $strCssClass = null;
        if (QApplication::$Ministry && QApplication::$Ministry->Id == $objMinistry->Id) {
            $strCssClass = ' class="selected"';
        }
        printf('<a href="/%s"%s>%s</a>', $objMinistry->Token, $strCssClass, $objMinistry->Name);
    }
    if (QApplication::$Ministry) {
        $strLabel = 'Ministry: ' . QApplication::$Ministry->Name;
    } else {
        $strLabel = 'Ministries & Depts';
    }
    ?>
			</div>
			<ul>
				<li id="ministryTab"><a href="#" onclick="return ToggleMinistryMenu();" id="ministryTabLink" <?php 
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:header_growthgroups.inc.php

示例11: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Ministry-based QQNode.
  * It will also verify that it is a proper Ministry-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'ministry') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "ministry".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::Ministry()->Id;
                 case 'Token':
                     return QQN::Ministry()->Token;
                 case 'Name':
                     return QQN::Ministry()->Name;
                 case 'ParentMinistryId':
                     return QQN::Ministry()->ParentMinistryId;
                 case 'ParentMinistry':
                     return QQN::Ministry()->ParentMinistry;
                 case 'GroupTypeBitmap':
                     return QQN::Ministry()->GroupTypeBitmap;
                 case 'SignupFormTypeBitmap':
                     return QQN::Ministry()->SignupFormTypeBitmap;
                 case 'ActiveFlag':
                     return QQN::Ministry()->ActiveFlag;
                 default:
                     throw new QCallerException('Simple Property not found in MinistryDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:63,代码来源:MinistryDataGridGen.class.php


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