Esempio n. 1
0
File: index.php Progetto: alcf/chms
 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');
 }
Esempio n. 2
0
 /**
  * Main DataGen Runner
  * @return void
  */
 public static function Run()
 {
     self::$SystemStartDate = new QDateTime('2004-01-01');
     self::$MaximumPersonId = Person::QuerySingle(QQ::All(), QQ::OrderBy(QQN::Person()->Id, false))->Id;
     self::DisplayForEachTaskStart($strDescription = 'Generating Signup Forms for Ministry', Ministry::CountByActiveFlag(true));
     foreach (Ministry::LoadArrayByActiveFlag(true) as $objMinistry) {
         self::DisplayForEachTaskNext($strDescription);
         $intCount = rand(self::FormsPerMinistryMinimum, self::FormsPerMinistryMaximum);
         self::DisplayForEachTaskStart($strDescriptionInside = '   Generating Signup Forms', $intCount);
         for ($i = 0; $i < $intCount; $i++) {
             self::DisplayForEachTaskNext($strDescriptionInside);
             self::GenerateFormInMinistry($objMinistry);
         }
         self::DisplayForEachTaskEnd($strDescriptionInside, true);
     }
     self::DisplayForEachTaskEnd($strDescription);
 }
Esempio n. 3
0
 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'));
 }
Esempio n. 4
0
File: index.php Progetto: alcf/chms
 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->lblMinistry = new QLabel($this);
     $this->lblMinistry->TagName = 'h3';
     $this->lblMinistry_Refresh();
     $this->dtgCommLists = new CommunicationListDataGrid($this);
     $this->dtgCommLists->MetaAddColumn('Name', 'Name=List Name', 'Html=<?= $_FORM->RenderName($_ITEM); ?>', 'HtmlEntities=false', 'Width=260px');
     $this->dtgCommLists->MetaAddTypeColumn('EmailBroadcastTypeId', 'EmailBroadcastType', 'Name=List Type', 'Width=120px');
     $this->dtgCommLists->MetaAddColumn('Token', 'Name=Email', 'Html=<?= $_FORM->RenderEmail($_ITEM); ?>', 'HtmlEntities=false', 'Width=350px');
     $this->dtgCommLists->SetDataBinder('dtgCommLists_Bind');
     $this->dtgCommLists->NoDataHtml = '<p>There are no Email Lists for this ministry.</p>';
     $this->lblStartText = new QLabel($this);
     $this->lblStartText->Text = '<h3>Email Lists in Ministries</h3><p>Please select an ministry from the list on the right.</p>';
     $this->lblStartText->HtmlEntities = false;
 }
Esempio n. 5
0
 /**
  * Retrieves a list of Groups that can be managed by a given login
  * @param Login $objLogin
  * @return Group[]
  */
 public static function LoadArrayByManagedByLogin(Login $objLogin)
 {
     if ($objLogin->RoleTypeId == RoleType::ChMSAdministrator) {
         $intMinistryIdArray = array();
         foreach (Ministry::LoadArrayByActiveFlag(true) as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
     } else {
         $intMinistryIdArray = array();
         foreach ($objLogin->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
     }
     return Group::QueryArray(QQ::AndCondition(QQ::Equal(QQN::Group()->GroupTypeId, GroupType::RegularGroup), QQ::In(QQN::Group()->MinistryId, $intMinistryIdArray), QQ::Equal(QQN::Group()->ActiveFlag, true)), QQ::OrderBy(QQN::Group()->Name));
 }
Esempio n. 6
0
    ?>
		<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 
Esempio n. 7
0
File: index.php Progetto: alcf/chms
 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->lstGroupType = new QListBox($this);
     $this->lstGroupType->AddAction(new QChangeEvent(), new QAjaxAction('lstGroupType_Change'));
     $this->lstGroupType->Visible = false;
     $this->chkViewAll = new QCheckBox($this);
     $this->chkViewAll->Text = 'View "Inactive" Groups 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->dtgGroups = new QDataGrid($this);
     $this->dtgGroups->CssClass = 'datagrid';
     $this->dtgGroups->AddColumn(new QDataGridColumn('Group Name', '<?= $_FORM->RenderName($_ITEM); ?>', 'HtmlEntities=false', 'Width=260px'));
     $this->dtgGroups->AddColumn(new QDataGridColumn('Type', '<?= $_ITEM->Type; ?>', 'Width=120px'));
     $this->dtgGroups->AddColumn(new QDataGridColumn('Email', '<?= $_ITEM->EmailTypeHtml ; ?>', 'HtmlEntities=false', 'Width=350px'));
     $this->dtgGroups->SetDataBinder('dtgGroups_Bind');
     //			$this->dtgGroups->Visible = false;
     $this->btnGroupReport = new QButton($this);
     $this->btnGroupReport->CssClass = 'primary';
     $this->btnGroupReport->AddAction(new QClickEvent(), new QAjaxAction('btnGroupReport_Click'));
     $this->btnGroupReport->Name = "Growth Group Report";
     $this->btnGroupReport->Text = "Growth Group Report";
     $this->btnGroupReport->Visible = false;
     $this->btnGroupRegistrations = new QButton($this);
     $this->btnGroupRegistrations->CssClass = 'primary';
     $this->btnGroupRegistrations->AddAction(new QClickEvent(), new QAjaxAction('btnGroupRegistrations_Click'));
     $this->btnGroupRegistrations->Name = "Process New Growth Group Registrations";
     $this->btnGroupRegistrations->Text = "Process New Growth Group Registrations";
     $this->btnGroupRegistrations->Visible = false;
     $this->lblStartText = new QLabel($this);
     $this->lblStartText->Text = '<h3>Groups and Ministries</h3><p>Please select a ministry from the list on the right.</p>';
     $this->lblStartText->HtmlEntities = false;
     $this->SetUrlHashProcessor('Form_ProcessHash');
 }