Exemplo n.º 1
0
 public function renderButton_Click($strFormId, $strControlId, $strParameter)
 {
     $intPersonId = intval($strParameter);
     QApplication::DisplayAlert("In a real application, you'd be redirected to the page that edits person #" . $intPersonId);
     // You'd do something like this in a real application:
     // QApplication::Redirect("person_edit.php?intPersonId=" . $intPersonId);
 }
Exemplo n.º 2
0
Arquivo: index.php Projeto: alcf/chms
 public function btnGenerate_Click($strFormId, $strControlId, $strParameter)
 {
     QApplication::DisplayAlert(sprintf('Receipts for %s are now being generated.  Please come back shortly to check on its status.', $this->lstYear->SelectedValue));
     if (strlen($strParameter)) {
         file_put_contents(RECEIPT_PDF_PATH . '/run.txt', $this->lstYear->SelectedValue . " " . $strParameter);
     } else {
         file_put_contents(RECEIPT_PDF_PATH . '/run.txt', $this->lstYear->SelectedValue . " " . $this->lstQuarter->SelectedValue);
     }
     chmod(RECEIPT_PDF_PATH . '/run.txt', 0777);
 }
Exemplo n.º 3
0
Arquivo: course.php Projeto: alcf/chms
 protected function btnDelete_Click()
 {
     if ($this->mctObject->ClassCourse->CountClassMeetings()) {
         QApplication::DisplayAlert('Cannot delete a Course that has classes assigned to it.');
         return;
     } else {
         $this->mctObject->DeleteClassCourse();
         QApplication::Redirect('/classes/');
     }
 }
Exemplo n.º 4
0
Arquivo: grade.php Projeto: alcf/chms
 protected function btnDelete_Click()
 {
     if ($this->mctObject->ClassGrade->CountClassRegistrations()) {
         QApplication::DisplayAlert('Cannot delete a grade that is being used for existing students.');
         return;
     } else {
         $this->mctObject->DeleteClassGrade();
         QApplication::Redirect('/classes/');
     }
 }
Exemplo n.º 5
0
 public function dlgUpload_done($strFormId, $strControlId, $strParameter)
 {
     $this->dlgUpload->HideDialogBox();
     $originalFileName = $this->dlgUpload->flcFileAsset->FileName;
     if (strtolower(substr($originalFileName, -3)) != "zip") {
         QApplication::DisplayAlert("Invalid uploaded plugin file - only ZIP allowed: " . $originalFileName);
         return;
     }
     $pluginFolder = QPluginInstaller::processUploadedPluginArchive($this->dlgUpload->flcFileAsset);
     if ($pluginFolder == null) {
         QApplication::DisplayAlert(QPluginInstaller::getLastError());
         return;
     }
     QApplication::Redirect('plugin_edit.php?strType=new&strName=' . $pluginFolder);
 }
Exemplo n.º 6
0
 public function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     $objPerson = $this->pnlPerson->Person;
     // Validate the Dates
     $dttDateArray = GroupParticipation::GetParticipationDatesArrayForPersonIdGroupIdGroupRoleId($objPerson->Id, $this->objGroup->Id, $this->lstRole->SelectedValue);
     // Add This One
     $dttDateArray[] = array($this->dtxDateStart->DateTime, $this->dtxDateEnd->DateTime);
     // If we have trouble trying to add it, let's redirect the user to the full record
     if (!GroupParticipation::IsValidDates($dttDateArray)) {
         QApplication::DisplayAlert('You are adding a participation that already exists.  Taking you to this person\'s record for more information.');
         return $this->ReturnTo('#' . $this->objGroup->Id . '/edit_participation/' . $objPerson->Id);
     }
     // Go ahead and create the record
     $this->objGroup->AddPerson($objPerson, $this->lstRole->SelectedValue, $this->dtxDateStart->DateTime, $this->dtxDateEnd->DateTime);
     return $this->ReturnTo('#' . $this->objGroup->Id);
 }
 protected function SetItemCheckedState($itemId, $blnChecked)
 {
     $objProject = Project::Load($itemId);
     if ($blnChecked) {
         // Simulate an associating with the project
         QApplication::DisplayAlert('Associating ' . $objProject->Name);
         // To actually do the association, we would execute the following:
         /*
         				$objParentProject = Project::Load(1);	// We were associating the ACME project
         				$objParentProject->AssociateProjectAsRelated ($objProject);
         */
     } else {
         // Simulate unassociating the Project
         QApplication::DisplayAlert('Unassociating ' . $objProject->Name);
     }
 }
Exemplo n.º 8
0
Arquivo: upload.php Projeto: alcf/chms
 protected function btnSave_Click()
 {
     $strText = file_get_contents($this->flcUpload->FilePath);
     try {
         $intEntriesModified = 0;
         $intEntriesAdded = 0;
         $intRows = PaypalBatch::ProcessReport($strText, $intEntriesModified, $intEntriesAdded);
         if (!$intEntriesAdded && !$intEntriesModified) {
             QApplication::DisplayAlert('No new or modified entries found.  No changes were made.');
         } else {
             if ($intEntriesAdded) {
                 QApplication::DisplayAlert(sprintf('PayPal import successful.  %s payment entries were updated.  WARNING: %s unlinked credit card payment entries had to be created.', $intEntriesModified, $intEntriesAdded));
             } else {
                 QApplication::DisplayAlert(sprintf('PayPal import successful.  %s payment entries were updated.', $intEntriesModified));
             }
         }
         QApplication::ExecuteJavaScript('document.location = "/stewardship/paypal/";');
     } catch (QCallerException $objExc) {
         QApplication::DisplayAlert('There were problems processing the report file: "' . $objExc->getMessage() . '"');
         return;
     }
 }
 /**
  * Respond to the button click for the non-delegated events.
  */
 public function dtgPersonsButton_Click($strFormId, $strControlId, $strParameter)
 {
     $intPersonId = intval($strParameter);
     $objPerson = Person::Load($intPersonId);
     QApplication::DisplayAlert("You clicked on a person with ID #{$intPersonId}: {$objPerson->FirstName} {$objPerson->LastName}");
 }
Exemplo n.º 10
0
 protected function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     // Create address record(s)
     $objHomeAddress = $this->objHomeAddressValidator->CreateAddressRecord();
     if ($this->objMailingAddressValidator) {
         $objMailingAddress = $this->objMailingAddressValidator->CreateAddressRecord();
     } else {
         $objMailingAddress = null;
     }
     if (trim($this->dtxDateOfBirth->Text)) {
         $dttDateOfBirth = $this->dtxDateOfBirth->DateTime;
     } else {
         $dttDateOfBirth = null;
     }
     $objPerson = QApplication::$PublicLogin->ProvisionalPublicLogin->Reconcile(trim(strtolower($this->txtPassword->Text)), $this->lstQuestion->SelectedValue ? $this->lstQuestion->SelectedValue : trim($this->txtQuestion->Text), trim(strtolower($this->txtAnswer->Text)), trim($this->txtHomePhone->Text), trim($this->txtMobilePhone->Text), $objHomeAddress, $objMailingAddress, $dttDateOfBirth, $this->rblGender->SelectedValue);
     if ($objPerson->PublicLogin->Id != QApplication::$PublicLogin->Id) {
         QLog::Log(sprintf('Provisioned PublicLogin::Reconcile() matched against a Person with an existing PublicLogin: PublicLogin(%s) and Person(%s)', QApplication::$PublicLogin->Id, $objPerson->Id));
         QApplication::DisplayAlert('It appears that another registration exists with the same name and home address.  Before we can proceed, please contact ALCF Online Member Support at 650-625-1500 or records@alcf.net for more information.  Please reference PLID ' . QApplication::$PublicLogin->Id . ' when calling.');
     } else {
         // OptOut Email Flag
         if (!$this->chkBulkEmail->Checked) {
             $objPerson->CanEmailFlag = false;
             $objPerson->Save();
         } else {
             //Upon confirmation, add them to the newletter list
             $objList = CommunicationList::LoadByToken('alcfweekly');
             if ($objList) {
                 if (!$objList->IsPersonAssociated($objPerson)) {
                     $objList->AssociatePerson($objPerson);
                 }
                 $objPerson->Save();
             }
         }
         QApplication::RedirectOnPublicLogin('/register/thankyou.php');
     }
 }
Exemplo n.º 11
0
 protected function accordion_change()
 {
     QApplication::DisplayAlert($this->Accordion->Active . ' selected.');
 }
Exemplo n.º 12
0
 public function btnRegister_Click($strFormId, $strControlId, $strParameter)
 {
     if ($this->GetAmount() == 0) {
         $this->objSignupEntry->Complete();
         QApplication::Redirect($this->objSignupEntry->ConfirmationUrl);
     } else {
         QApplication::DisplayAlert('You must enter in payment information.');
         $this->RefreshForm();
     }
 }
Exemplo n.º 13
0
 public function btnGo_Click($strFormId, $strControlId, $strParameter)
 {
     //get a list of project ids that have had their status changed
     $changedIds = $this->colProjectSelected->GetChangedIds();
     //load all the changed project objects at once so we can avoid multiple DB hits
     $temp = Project::QueryArray(QQ::In(QQN::Project()->Id, array_keys($changedIds)));
     //Put them in an associated list so we can find the needed ones easily later
     $changedItems = array();
     foreach ($temp as $item) {
         $changedItems[$item->Id] = $item;
     }
     foreach ($changedIds as $id => $blnSelected) {
         //look up the appropriate item using the handily indexed array we built earlier
         $item = $changedItems[$id];
         if ($blnSelected) {
             //Associate this Project
             QApplication::DisplayAlert('Associating ' . $item->Name);
         } else {
             //Unassociate this Project
             QApplication::DisplayAlert('Unassociating ' . $item->Name);
         }
     }
 }
Exemplo n.º 14
0
 function AddClicked($strFormId, $strControlId, $strParameter)
 {
     $arrParameter = explode('~', $strParameter);
     $arrPrepare['ASIN'] = $arrParameter[0];
     $arrPrepare['Title'] = $arrParameter[1];
     $arrPrepare['ProductGroup'] = $arrParameter[2];
     $arrPrepare['Image'] = $arrParameter[3];
     $arrPrepare['DetailPageURL'] = $arrParameter[4];
     //Fill the new MyAssets table which is MyISAM based and better
     $this->objMyAssets = new Myassets();
     $this->objMyAssets->Asin = $arrPrepare['ASIN'];
     $this->objMyAssets->Title = $arrPrepare['Title'];
     $this->objMyAssets->ImageURL = $arrPrepare['Image'];
     $this->objMyAssets->DetailPageURL = $arrPrepare['DetailPageURL'];
     $this->objMyAssets->ProductGroup = $arrPrepare['ProductGroup'];
     switch ($arrPrepare['ProductGroup']) {
         case 'Book':
             //Fill MyAssets
             $this->objMyAssets->Author = $arrParameter[5];
             $this->objMyAssets->NumberOfPages = $arrParameter[7];
             $this->objMyAssets->Publisher = $arrParameter[8];
             $this->objMyAssets->Isbn = $arrParameter[10];
             break;
         case 'DVD':
             //Fill MyAssets
             $this->objMyAssets->Actor = $arrParameter[5];
             $this->objMyAssets->Director = $arrParameter[6];
             $this->objMyAssets->RunningTime = $arrParameter[7];
             break;
         case 'Music':
             //Fill MyAssets
             $this->objMyAssets->Artist = $arrParameter[5];
             $this->objMyAssets->Label = $arrParameter[6];
             $this->objMyAssets->NumberOfDiscs = $arrParameter[7];
             break;
     }
     $this->objMyAssets->Owner = $_SESSION['User'];
     $this->objMyAssets->Save();
     QApplication::DisplayAlert('"' . $this->objMyAssets->Title . '"' . ' has been added to your library');
 }
Exemplo n.º 15
0
 protected function getGoogleContacts()
 {
     $objContacts = new GetContacts();
     $arrContacts = $objContacts->GetGContacts($this->txtUser, $this->txtPassword);
     $contactCount = sizeof($arrContacts);
     foreach ($arrContacts as $person) {
         $count = Peopledetails::QueryCount(QQ::Equal(QQN::Peopledetails()->Email, $person['contactMail']));
         if ($count != 0) {
             $objPerson = Peopledetails::QuerySingle(QQ::Equal(QQN::Peopledetails()->Email, $person['contactMail']));
         } else {
             $objPerson = new Peopledetails();
         }
         $objPerson->FullName = $person['contactName'];
         $objPerson->Phone = $person['contactPhone'];
         $objPerson->Address = $person['contactAddr'];
         $objPerson->Email = $person['contactMail'];
         $objPerson->Save();
     }
     QApplication::DisplayAlert('Successfully imported ' . $contactCount . 'contacts from Google Contacts');
 }
Exemplo n.º 16
0
 public function btnSmsSend_Click($strFormId, $strControlId, $strParameter)
 {
     if (!QApplication::$Login->Email) {
         QApplication::DisplayAlert('Your NOAH Account was not set up with your @alcf.net email address, so unfortunately you cannot yet send a SMS Message.  Please contact it@alcf.net to have this fixed.');
         return;
     }
     SmsMessage::QueueSmsForGroup($this->objGroup, QApplication::$Login, $this->txtSmsTitle->Text, $this->txtSmsBody->Text);
     $this->dtgSmsMessage->Refresh();
     $this->txtSmsTitle->Text = null;
     $this->txtSmsBody->Text = null;
     QApplication::DisplayAlert('Your SMS Message was queued to be sent!  You will receive a copy of this SMS to your email at ' . QApplication::$Login->Email . '.');
 }
 public function btnSelect_Click()
 {
     if (!$this->objSelectedPerson) {
         QApplication::DisplayAlert('Please select a person before proceeding');
         return;
     }
     $objMethodCallback = $this->objMethodCallback;
     $strMethodCallback = $this->strMethodCallback;
     $objMethodCallback->{$strMethodCallback}($this->objSelectedPerson);
     $this->HideDialogBox();
 }
Exemplo n.º 18
0
 public function btnGenerate_Click($strFormId, $strControlId, $strParameter)
 {
     QApplication::DisplayAlert(sprintf('Reports for %s are now being generated.  Please come back shortly to check on its status.', $this->lstYear->SelectedValue));
     file_put_contents(STATISTICS_PDF_PATH . '/run.txt', $this->lstYear->SelectedValue);
     chmod(STATISTICS_PDF_PATH . '/run.txt', 0777);
 }
 protected function pxyExample_Click($strFormId, $strControlId, $strParameter)
 {
     QApplication::DisplayAlert('Pretending to edit Project #' . $strParameter);
 }
Exemplo n.º 20
0
 protected function SelectItem($strItemId)
 {
     $objItem = $this->tnvNavigation->GetItem($strItemId);
     /*			if (!$objItem) {
     				$intQcodoClassId = (integer) $strItemId;
     				$objClass = QcodoClass::Load($intQcodoClassId);
     				$this->tnvNavigation->GetItem('g' . $objClass->ClassGroupId)->Expanded = true;
     				$this->tnvNavigation->GetItem($objClass->Id)->Expanded = true;
     				$this->tnvNavigation->GetItem(substr($strItemId, 0, strlen($objClass->Id) + 1))->Expanded = true;
     				$objItem = $this->tnvNavigation->GetItem($strItemId);
     			}*/
     $this->tnvNavigation->SelectedItem = $objItem;
     if ($this->tnvNavigation->SelectedItem) {
         $objQcodoClass = QcodoClass::Load($strItemId);
         if (!$objQcodoClass->FileId) {
             QApplication::DisplayAlert('Please refer to the PHP Website (www.php.net) for documentation on the "' . $objQcodoClass->Name . '" class.');
             return;
         }
         $this->pnlDocumentation->RemoveChildControls(true);
         $strItemId = $this->tnvNavigation->SelectedItem->Value;
         if ($intPosition = strpos($strItemId, 'm')) {
             $intOperationId = substr($strItemId, $intPosition + 1);
             if ($intOperationId) {
                 new MethodPanel(Operation::Load($intOperationId), $this->pnlDocumentation);
             } else {
                 new MethodPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
             }
         } else {
             if ($intPosition = strpos($strItemId, 'p')) {
                 new PropertyPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
             } else {
                 if ($intPosition = strpos($strItemId, 'v')) {
                     new VariablePanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
                 } else {
                     if ($intPosition = strpos($strItemId, 'c')) {
                         new ConstantPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
                     } else {
                         new ClassPanel(QcodoClass::Load($strItemId), $this->pnlDocumentation);
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 21
0
 public function btnScanCheckTest_Click()
 {
     $strErrorNumber = '';
     $strErrorString = '';
     $objSock = null;
     $objSock = @fsockopen(MICRIMAGE_IP, 23, $strErrorNumber, $strErrorString, 10);
     if (!$objSock || $strErrorNumber || $strErrorString) {
         QApplication::DisplayAlert(sprintf('Could not connect to %s: %s (%s)', MICRIMAGE_IP, $strErrorString, $strErrorNumber));
         if ($objSock) {
             fclose($objSock);
         }
         return;
     } else {
         fwrite($objSock, "LE 68\r\n");
         fgets($objSock);
         fclose($objSock);
         QApplication::DisplayAlert('Connection successful (MICRimage LED will blink several times)');
     }
 }
Exemplo n.º 22
0
 protected function tabs_change($strFormId, $strControlId, $strParameter)
 {
     $index = $this->Tabs->Active;
     $id = $this->Tabs->SelectedId;
     $strItems = $index . ', ' . $id;
     QApplication::DisplayAlert($strItems);
 }
Exemplo n.º 23
0
 protected function btnVotes_Click()
 {
     if (!QApplication::$Person) {
         QApplication::RedirectToLogin();
     } else {
         if ($this->objIssue->IsPersonVoted(QApplication::$Person)) {
             $this->objIssue->ClearVote(QApplication::$Person);
             $this->pnlVotes->Refresh();
         } else {
             if ($this->objIssue->PostedByPersonId == QApplication::$Person->Id) {
                 QApplication::DisplayAlert('Sorry!  You cannot vote on bugs and issues you posted yourself.');
             } else {
                 $this->objIssue->SetVote(QApplication::$Person);
                 $this->pnlVotes->Refresh();
             }
         }
     }
 }
Exemplo n.º 24
0
 public function btnNullPassword_Click()
 {
     $this->mctPerson->Person->Password = null;
     $this->mctPerson->Person->Save();
     QApplication::DisplayAlert('This user\'s password has been nulled out.');
 }
Exemplo n.º 25
0
 protected function btnOkay_Click()
 {
     if (!$this->IsImageUploadedValid()) {
         $this->flcImage->Warning = 'Invalid Image File';
         return;
     }
     $objShowcaseItem = new ShowcaseItem();
     $objShowcaseItem->Person = QApplication::$Person;
     $objShowcaseItem->Name = trim($this->txtName->Text);
     $objShowcaseItem->Description = trim($this->txtDescription->Text);
     $objShowcaseItem->Url = trim($this->txtUrl->Text);
     $objShowcaseItem->LiveFlag = false;
     $objShowcaseItem->SaveWithImage($this->flcImage->File);
     $this->dlgBox->HideDialogBox();
     QApplication::DisplayAlert('Thank you for your submission!  We will email you if/when your showcase item is posted.');
 }
Exemplo n.º 26
0
 public function objPanel4_Click($strFormId, $strControlId, $strParameter)
 {
     QApplication::DisplayAlert('Panel 4 Clicked, panel 3 will not trigger a click');
 }
Exemplo n.º 27
0
Arquivo: merge.php Projeto: alcf/chms
 protected function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     if (!$this->objSelectedHousehold) {
         QApplication::DisplayAlert('Please Select a Household');
         return;
     }
     $this->objHousehold->MergeHousehold($this->objSelectedHousehold, Person::Load($this->lstHead->SelectedValue));
     $this->RedirectToViewPage();
 }
Exemplo n.º 28
0
 protected function Login()
 {
     /*$cookie = new Zend_Http_Cookie('Esteemed',$this->txtUserId->Text,'180','localhost','/',true);
     		if(isset($cookie))
     		{
     			QApplication::DisplayAlert('Cookie is not set');
     		}*/
     $objChkLogin = new Login();
     $blnVal = $objChkLogin->Login_Validate($this->txtUserId->Text, $this->txtPassword->Text);
     if ($blnVal == 'Right') {
         $_SESSION['User'] = $_SESSION['objUser']->MemberId;
         QApplication::Redirect('postlogin.php');
     } else {
         $_SESSION['User'] = '';
         QApplication::DisplayAlert('Incorrect User/Password');
     }
 }
Exemplo n.º 29
0
 protected function AddClicked($strFormId, $strControlId, $strParameter)
 {
     $this->strBorrower = $strParameter;
     $this->dlgPeopleBox->HideDialogBox();
     $this->LendBasket();
     $objPerson = Peopledetails::QuerySingle(QQ::Equal(QQN::Peopledetails()->Id, $this->strBorrower));
     QApplication::DisplayAlert('You have given the items to ' . $objPerson->FullName);
     $this->objBasket->EmptyBasket();
     $this->dtrBasket->DataSource = $this->objBasket->GetBasket();
 }
Exemplo n.º 30
0
				<p align="left" id="LoginButton"><?php 
    $this->btnLogin->Render();
    ?>
</p>
				
			</div>
		</div>
		<div id="information">
				<p style="font-size: 16px;"><b><u>Benifits of using Apitva.</u></b></p>
				<p>	<img src="../assets/images/48x48/note_accept.png" />&nbsp;&nbsp;&nbsp;&nbsp;Keep track of all the Books, Movies and CD's you have</p>
				<p>	<img src="../assets/images/48x48/promotion.png" />&nbsp;&nbsp;&nbsp;&nbsp;Share your library with others and view their library too</p>
				<p>	<img src="../assets/images/48x48/process.png" />&nbsp;&nbsp;&nbsp;&nbsp;Track your items which you have shared or borrowed</p>
				<p style="font-size: 15px;"><b>Still not a member <?php 
    $this->lnkRegister->Render();
    ?>
</b></p>
		</div>
		<?php 
}
if (isset(QApplication::$AlertMessageArray)) {
    foreach (QApplication::$AlertMessageArray as $val) {
        QApplication::DisplayAlert($val);
    }
}
?>
		
	</div>

<?php 
$this->RenderEnd();
require __INCLUDES__ . '/footer.inc.php';