protected function btnSubmit_Click($strFormId, $strControlId, $strParameter) { $this->txtEmail->Visible = false; $this->btnSubmit->Visible = false; $this->lblMessage->Visible = true; $this->btnBack->Visible = true; $strEmail = trim(strtolower($this->txtEmail->Text)); PublicLogin::RetrieveUsernameForEmail($strEmail); $this->lblMessage->Text = '<p>We are looking to see if <strong>' . QApplication::HtmlEntities($strEmail) . '</strong> exists in the system, and if so ' . 'we will send you an email that contains your username. This should only take a moment, but please wait up to a few minnutes for delivery.</p>' . '<p>On the off-chance that the email gets caught by SPAM filters, you may also want to check your SPAM or Junk Mail folder.</p>' . '<p>If you encounter any issues, please feel free and ' . Registry::GetValue('contact_sentence_my_alcf_support') . '.</p>'; }
/** * This will QUEUE a message for delivery. * @param string $strToAddress * @param string $strFromAddress if null, it will look up from Registry * @param string $strSubject * @param string $strBody * @param string $strCc * @param string $strBcc */ public static function QueueMessage($strToAddress, $strFromAddress, $strSubject, $strBody, $strCc = null, $strBcc = null) { $objEmailMessage = new OutgoingEmailQueue(); $objEmailMessage->ToAddress = $strToAddress; $objEmailMessage->FromAddress = $strFromAddress ? $strFromAddress : Registry::GetValue('system_email_address'); $objEmailMessage->CcAddress = $strCc; $objEmailMessage->BccAddress = $strBcc; $objEmailMessage->Subject = $strSubject; $objEmailMessage->Body = $strBody; $objEmailMessage->DateQueued = QDateTime::Now(); $objEmailMessage->ErrorFlag = false; $objEmailMessage->Save(); }
protected function Form_Create() { $this->lblMessage = new QLabel($this); $this->lblMessage->Text = 'You have successfully unsubscribed from the ' . urldecode(QApplication::PathInfo(0)) . ' Email List/s'; $this->btnReturnToSubscribe = new QButton($this); $this->btnReturnToSubscribe->Text = 'Subscribe to additional Mailing Lists'; $this->btnReturnToSubscribe->CssClass = 'primary'; $this->btnReturnToSubscribe->CausesValidation = false; $this->btnReturnToSubscribe->AddAction(new QClickEvent(), new QAjaxAction('btnReturnToSubscribe_Click', null, true)); // If a person ID was provided, check to see if they are an alcf member // If they are, check to see whether they also are leaving the church $this->lblExitMembership = new QLabel($this); $this->lblExitMembership->HtmlEntities = false; $this->lblExitMembership->Text = '<p>We notice that you\'re unsubscribing from the church newsletter email list.</p>' . '<p>If you also no longer plan on attending ALCF, would you like us to update your information accordingly?<br>' . 'Make the appropriate selections below and we will update your records as requested.</p>'; $this->lblExitMembership->Visible = false; $this->chkMemberExit = new QRadioButtonList($this); $this->chkMemberExit->AddItem('Remove me from ALCF Membership', true); $this->chkMemberExit->AddItem('Remove my household from ALCF Membership', false); $this->chkMemberExit->Visible = false; $this->lstTermination = new QListBox($this); $this->lstTermination->Name = 'Reason for Termination'; $this->lstTermination->AddItem('- Select One -', null); if ($strTerminationReasons = Registry::GetValue('membership_termination_reason')) { foreach (explode(',', $strTerminationReasons) as $strReason) { $strReason = trim($strReason); $this->lstTermination->AddItem($strReason, $strReason); } } $this->lstTermination->AddItem('- Other... -', -1); $this->lstTermination->Visible = false; $this->lstTermination->AddAction(new QChangeEvent(), new QAjaxAction('lstTermination_Change')); // Setup "Other" textbox $this->txtTermination = new QTextBox($this); $this->txtTermination->Name = ' '; $this->txtTermination->Visible = false; $this->btnSubmitMemberExit = new QButton($this); $this->btnSubmitMemberExit->Text = 'Submit Request'; $this->btnSubmitMemberExit->CssClass = 'primary'; $this->btnSubmitMemberExit->Visible = false; $this->btnSubmitMemberExit->AddAction(new QClickEvent(), new QAjaxAction('btnSubmitMemberExit_Click')); $this->objPersonId = QApplication::PathInfo(1); if ($this->objPersonId) { $objPerson = Person::Load($this->objPersonId); if ($objPerson->CurrentMembershipInfo) { $this->lblExitMembership->Visible = true; $this->chkMemberExit->Visible = true; $this->lstTermination->Visible = true; $this->btnSubmitMemberExit->Visible = true; } } }
/** * This queues up and sends an email requesting the registrant to confirm * the registration. */ public function SendConfirmationEmail() { // Template $strTemplateName = 'registration'; // Calculate Email Address - THIS WILL RETURN if none is found $strFromAddress = 'ALCF my.alcf Registration <*****@*****.**>'; $strToAddress = $this->strEmailAddress; $strSubject = 'Your Online Registration'; // Setup the SubstitutionArray $strArray = array(); // Setup Always-Used Fields $strArray['PERSON_NAME'] = $this->strFirstName . ' ' . $this->strLastName; // Add Payment Info $strArray['URL'] = $this->ConfirmationUrl . '/' . $this->strConfirmationCode; $strArray['CODE'] = $this->strConfirmationCode; $strArray['USERNAME'] = $this->PublicLogin->Username; $strArray['CONTACT'] = strip_tags(Registry::GetValue('contact_sentence_my_alcf_support')); OutgoingEmailQueue::QueueFromTemplate($strTemplateName, $strArray, $strToAddress, $strFromAddress, $strSubject); }
/** * This will reset this publiclogin's password and will email the new password to the email account on file. * If no primary email address this will throw an exception. * @return string */ public function ResetPassword() { if (!$this->Person->PrimaryEmail->Address) { throw new QCallerException('ResetPassword for a PublicLogin record with no attached primary email: ' . $this->Id); } $strTemporaryPassword = str_replace('0', '', str_replace('1', '', md5(microtime()))); $strTemporaryPassword = substr($strTemporaryPassword, 0, 6); $this->SetPassword($strTemporaryPassword); $this->TemporaryPasswordFlag = true; $this->Save(); // Setup email info $strFromAddress = 'ALCF my.alcf Account Support <*****@*****.**>'; $strToAddress = $this->Person->PrimaryEmail->Address; $strSubject = 'Account Support: Your Temporary Password'; // Setup the SubstitutionArray $strArray = array(); // Setup Always-Used Fields $strArray['PERSON_NAME'] = $this->Person->Name; $strArray['PASSWORD'] = $strTemporaryPassword; $strArray['CONTACT'] = strip_tags(Registry::GetValue('contact_sentence_my_alcf_support')); OutgoingEmailQueue::QueueFromTemplate('reset_password', $strArray, $strToAddress, $strFromAddress, $strSubject); return $strTemporaryPassword; }
$keys = $registry->EnumValuesEx(Registry::HKCU, $test_key); check_error(); echo "Created RegistryValue objects :{$eol}"; foreach ($keys as $value) { echo "{$tab}" . str_replace("{$eol}", "{$eol}{$tab}", print_r($value, true)); } // 7) Retrieve created key values - You must known the type of each key before doing that, or else use the GetValue() method, // which works only on REG_SZ, REG_EXPAND_SZ, REG_DWORD and REG_BINARY types. echo "Created values :{$eol}"; echo "{$tab}{$test_key}/BinaryValueFromArray : " . $registry->GetBinaryValue(Registry::HKCU, $test_key, 'BinaryValueFromArray') . $eol; echo "{$tab}{$test_key}/BinaryValueFromHexString : " . $registry->GetBinaryValue(Registry::HKCU, $test_key, 'BinaryValueFromHexString') . $eol; echo "{$tab}{$test_key}/BinaryValueFromString : " . $registry->GetBinaryValue(Registry::HKCU, $test_key, 'BinaryValueFromString') . $eol; echo "{$tab}{$test_key}/DWORDValue : 0x" . sprintf("%08X", $registry->GetDWORDValue(Registry::HKCU, $test_key, 'DWORDValue')) . $eol; echo "{$tab}{$test_key}/ExpandedStringValue : " . $registry->GetExpandedStringValue(Registry::HKCU, $test_key, 'ExpandedStringValue') . $eol; echo "{$tab}{$test_key}/BinaryValueFromHexString : " . $registry->GetBinaryValue(Registry::HKCU, $test_key, 'BinaryValueFromHexString') . $eol; echo "{$tab}{$test_key}/MultiStringValueMultiple : " . implode(', ', $registry->GetMultiStringValue(Registry::HKCU, $test_key, 'MultiStringValueMultiple')) . $eol; echo "{$tab}{$test_key}/MultiStringValueSingle : " . implode(', ', $registry->GetMultiStringValue(Registry::HKCU, $test_key, 'MultiStringValueSingle')) . $eol; echo "{$tab}{$test_key}/MultiStringValueMultiple : " . implode(', ', $registry->GetMultiStringValue(Registry::HKCU, $test_key, 'MultiStringValueMultiple')) . $eol; echo "{$tab}{$test_key}/QWORDBigValue : " . $registry->GetQWORDValue(Registry::HKCU, $test_key, 'QWORDBigValue') . $eol; echo "{$tab}{$test_key}/QWORDValue : " . $registry->GetQWORDValue(Registry::HKCU, $test_key, 'QWORDValue') . $eol; echo "{$tab}{$test_key}/StringValue : " . $registry->GetQWORDValue(Registry::HKCU, $test_key, 'StringValue') . $eol; echo "{$tab}{$test_key}/WShellDWORDValue : 0x" . sprintf("%08X", $registry->GetValue(Registry::HKCU, $test_key, 'WShellDWORDValue')) . $eol; // Note that the GetValue() method for WShell does not seem to process variable expansion echo "{$tab}{$test_key}/WShellExpandedStringValue: " . $registry->GetValue(Registry::HKCU, $test_key, 'WShellExpandedStringValue') . $eol; echo "{$tab}{$test_key}/WShellStringValue : " . $registry->GetValue(Registry::HKCU, $test_key, 'WShellStringValue') . $eol; // 8) Delete a subkey (HKCU\TestRegistry\Values\WShellExpandedStringValue key) $registry->DeleteValue(Registry::HKCU, $test_key, 'WShellExpandedStringValue'); check_error(); // 9) Delete the test subkey - leads to an error, since a key can only be deleted if it has no subkeys - so you'll have to delete TestRegistry manually under HKCU $registry->DeleteKey(Registry::HKCU, 'TestRegistry'); check_error();
<?php require __INCLUDES__ . '/header_my.inc.php'; ?> <h1>my.alcf Account Support</h1> <h2>Reset My Password</h2> <p style="font-size: 14px;">Please fill out the following form to reset your password. Your new password will be emailed to you using the email address we have on file for your account.</p> <p>If you encounter any issues, please feel free and <?php _p(Registry::GetValue('contact_sentence_my_alcf_support'), false); ?> .</p> <div class="section"> <?php $this->lblFirstMessage->Render(); ?> <?php $this->lblFinalMessage->Render(); ?> <?php $this->txtUsername->RenderWithName(); ?> <?php $this->lblQuestion->RenderWithName(); ?> <?php $this->txtAnswer->RenderWithName(); ?> </div>
/** * This will send a confirmation email for the OnlineDonation item * @param string $strToAddress an explicitly set EmailAddress to send, or if null, it will try and deduce it from the attached person record */ public function SendConfirmationEmail($strToAddress = null) { // Template $strTemplateName = 'online_donation'; // Calculate Email Address - THIS WILL RETURN if none is found $strFromAddress = 'ALCF Online Donation <*****@*****.**>'; if (!$strToAddress) { $strToAddress = $this->CalculateConfirmationEmailAddress(); } if (!$strToAddress) { return; } $strSubject = 'Your Online Donation'; // Setup the SubstitutionArray $strArray = array(); // Setup Always-Used Fields $strArray['PERSON_NAME'] = $this->Person->Name; $strArray['ONLINE_DONATION_ID'] = sprintf('%05s', $this->Id); // Add Payment Info $strArray['AMOUNT'] = QApplication::DisplayCurrency($this->Amount); $strArray['CREDIT_CARD'] = $this->CreditCardPayment->CreditCardDescription; $strProductArray = array(); foreach ($this->GetOnlineDonationLineItemArray() as $objLineItem) { $strProductArray[] = sprintf('%s - %s', $objLineItem->StewardshipFund ? $objLineItem->StewardshipFund->ExternalName : $objLineItem->Other, QApplication::DisplayCurrency($objLineItem->Amount)); } $strArray['PAYMENT_ITEMS'] = implode("\r\n", $strProductArray); OutgoingEmailQueue::QueueFromTemplate($strTemplateName, $strArray, $strToAddress, $strFromAddress, $strSubject, null, trim(Registry::GetValue('donation_receipt_bcc'))); }
protected function SetupPanel() { // Ensure the User is allowed to Edit Memberships if (!QApplication::IsLoginHasPermission(PermissionType::EditMembershipStatus)) { return $this->ReturnTo('#general/view_membership'); } // Get and Validate the Membership Object $this->objMembership = Membership::Load($this->strUrlHashArgument); if (!$this->objMembership) { // Trying to create a NEW membership // Let's make sure this person doesn't have a current membership if ($this->objPerson->CurrentMembershipInfo) { return $this->ReturnTo('#general/view_membership'); } $this->objMembership = new Membership(); $this->objMembership->Person = $this->objPerson; $this->blnEditMode = false; $this->btnSave->Text = 'Create'; } else { // Ensure the Membership object belongs to the person if ($this->objMembership->PersonId != $this->objPerson->Id) { return $this->ReturnTo('#general/view_membership'); } $this->blnEditMode = true; $this->btnSave->Text = 'Update'; $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 permenantly DELETE this record?')); $this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click')); $this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction()); } // Create Controls $this->dtxDateStart = new QDateTimeTextBox($this); $this->dtxDateStart->Name = 'Membership Started'; $this->dtxDateStart->Required = true; $this->dtxDateStart->Text = $this->objMembership->DateStart ? $this->objMembership->DateStart->__toString() : null; $this->calDateStart = new QCalendar($this, $this->dtxDateStart); $this->dtxDateEnd = new QDateTimeTextBox($this); $this->dtxDateEnd->Name = 'Membership Ended'; $this->dtxDateEnd->Text = $this->objMembership->DateEnd ? $this->objMembership->DateEnd->__toString() : null; $this->dtxDateEnd->AddAction(new QBlurEvent(), new QAjaxControlAction($this, 'dtxDateEnd_Blur')); $this->calDateEnd = new QCalendar($this, $this->dtxDateEnd); $this->dtxDateStart->RemoveAllActions(QClickEvent::EventName); $this->dtxDateEnd->RemoveAllActions(QClickEvent::EventName); $this->lstTermination = new QListBox($this); $this->lstTermination->Name = 'Reason for Termination'; $this->lstTermination->AddItem('- Select One -', null); if ($strTerminationReasons = Registry::GetValue('membership_termination_reason')) { foreach (explode(',', $strTerminationReasons) as $strReason) { $strReason = trim($strReason); $this->lstTermination->AddItem($strReason, $strReason, strtolower($strReason) == strtolower($this->objMembership->TerminationReason)); } } $this->lstTermination->AddItem('- Other... -', -1); // Setup "Other" textbox $this->txtTermination = new QTextBox($this); $this->txtTermination->Name = ' '; // Pre-Select "Other" if applicable if ($this->objMembership->TerminationReason && is_null($this->lstTermination->SelectedValue)) { $this->lstTermination->SelectedValue = -1; $this->txtTermination->Text = $this->objMembership->TerminationReason; } // Setup and Call Actions $this->lstTermination->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'txtTermination_Refresh')); $this->txtTermination_Refresh(); $this->dtxDateEnd_Blur(); }
<?php require __INCLUDES__ . '/header_my.inc.php'; ?> <h1>my.alcf Account Profile</h1> If you would like to update other items (such as family and marriage information, etc.) please <?php _p(Registry::GetValue('contact_sentence_records_support'), false); ?> .<br/><br/> <h4><?php _p(QApplication::$PublicLogin->Person->Name); ?> 's Contact Information</h4> <div class="section"> <div class="sectionButtons"> <?php $this->btnAddress->Render(); ?> </div> <?php $this->lblHomeAddress->RenderWithName(); ?> <?php $this->lblMailingAddress->RenderWithName(); ?> </div> <div class="section">
</a><br/> <?php _p(Registry::GetValue('gitinfo_qcodo_date')); ?> </p> <p> <strong>Qcodo.com Website</strong><br/> <a href="<?php _p(Registry::GetValue('gitinfo_qcodo-website_url')); ?> " style="font-style: italic;"><?php _p(Registry::GetValue('gitinfo_qcodo-website_message')); ?> </a><br/> <?php _p(Registry::GetValue('gitinfo_qcodo-website_date')); ?> </p> </div> </div> <h1>Code Less. Do More.</h1> <div class="mainContent"> <p>The <strong>Qcodo Development Framework</strong> is an open-source <a href="http://www.php.net/">PHP</a> framework that focuses on freeing developers from unnecessary tedious, mundane coding. The result is that developers can do what they do best: <ul> <li>Focus on implementing <b>functionality</b> and <b>usability</b></li> <li>Improving <b>performance</b></li> <li>Ensuring <b>security</b></li>
protected function btnFinalSubmit_Click() { if ($this->objPublicLogin->LostPasswordAnswer != trim(strtolower($this->txtAnswer->Text))) { $this->txtAnswer->Warning = 'Your answer is not correct'; $this->txtAnswer->Blink(); $this->txtAnswer->Focus(); return; } $this->objPublicLogin->ResetPassword(); $this->lblFirstMessage->Visible = false; $this->lblQuestion->Visible = false; $this->txtAnswer->Visible = false; $this->btnFinalSubmit->Visible = false; $this->lblFinalMessage->Visible = true; $this->lblFinalMessage->HtmlEntities = false; $this->lblFinalMessage->Text = '<p>We have reset your <strong>my.alcf</strong> account with a temporary password that we have emailed to the email address we have on file for your account. ' . 'Please wait up to a few minnutes for delivery.</p>' . '<p>On the off-chance that the email gets caught by SPAM filters, you may also want to check your SPAM or Junk Mail folder.</p>' . '<p>If you encounter any issues, please feel free and ' . Registry::GetValue('contact_sentence_my_alcf_support') . '.</p>'; $this->btnBack->Visible = true; }