public function btnOkay_Click($strFormId, $strControlId, $strParameter) { $this->btnOkay->Enabled = true; $blnNewTopic = false; // Setup stuff if it's a NEW message being posted (either a NEW response or a NEW topic) if (!$this->blnEditMode) { // For NEW TOPIC in this Forum if (!$this->mctMessage->Message->Topic) { $objForum = Forum::Load($this->lstForum->SelectedValue); $objNewTopic = $objForum->PostTopic(trim($this->txtTopicName->Text), trim($this->txtMessage->Text), QApplication::$Person); QApplication::Redirect(sprintf('/forums/forum.php/%s/%s/', $objForum->Id, $objNewTopic->Id)); // Otherwise, it's a new POST in this TOPIC } else { $this->mctMessage->Message->PostDate = QDateTime::Now(); } // Set the Reply Number for this New Message $this->mctMessage->Message->ReplyNumber = $this->mctMessage->Message->Topic->GetNextReplyNumber(); } // Save Everything Else $this->mctMessage->SaveMessage(); $this->mctMessage->Message->RefreshCompiledHtml(); $this->mctMessage->SaveMessage(); // Refresh Stats and Stuff $this->mctMessage->Message->Topic->RefreshStats(); $this->mctMessage->Message->Topic->RefreshSearchIndex(); $this->mctMessage->Message->TopicLink->RefreshStats(); // Send Alerts and Reset Read Flag on any NEW post if (!$this->blnEditMode) { $this->mctMessage->Message->SendAlerts(); $this->mctMessage->Message->Topic->UnassociateAllPeopleAsRead(); //Mark as read for poster $this->mctMessage->Message->Topic->AssociatePersonAsRead(QApplication::$Person); } $this->ParentControl->CloseMessageDialog(true, !$this->blnEditMode); }
protected function Form_Create() { parent::Form_Create(); if (!QApplication::HasPermissionForThisLang('Can export project', $this->objProject->ProjectId)) { QApplication::Redirect(NarroLink::ProjectList()); } $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::Project($this->objProject->ProjectId, t('Overview')); if ($this->objProject instanceof NarroProject && QApplication::HasPermissionForThisLang('Can edit project', $this->objProject->ProjectId)) { $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::ProjectEdit($this->objProject->ProjectId, t('Edit')); } $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::Translate($this->objProject->ProjectId, '', 0, '', 0, 0, 10, 0, 0, t('Translate')); $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::Review($this->objProject->ProjectId, '', NarroReviewPanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Review')); $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::ProjectFileList($this->objProject->ProjectId, '', '', t('Files')); $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::ProjectLanguages($this->objProject->ProjectId, t('Languages')); if (QApplication::HasPermissionForThisLang('Can import project', $this->objProject->ProjectId)) { $pnlDummy = new QPanel($this->pnlMainTab); $arrHeaders[] = NarroLink::ProjectImport($this->objProject->ProjectId, t('Import')); } if (QApplication::HasPermissionForThisLang('Can export project', $this->objProject->ProjectId)) { $this->pnlSelectedTab = new NarroProjectExportPanel($this->objProject, $this->pnlMainTab); $arrHeaders[] = t('Export'); $this->pnlMainTab->Selected = count($arrHeaders) - 1; } $this->pnlMainTab->Headers = $arrHeaders; }
protected function Form_Create() { parent::Form_Create(); if (QApplication::GetUserId() == NarroUser::ANONYMOUS_USER_ID) { $strPassHash = QApplication::QueryString('h'); $strUsername = QApplication::QueryString('u'); if ($strPassHash && $strUsername) { $objUser = NarroUser::LoadByUsernameAndPassword($strUsername, $strPassHash); if ($objUser instanceof NarroUser) { QApplication::$User = $objUser; } else { QApplication::Redirect('login.php'); } } else { QApplication::Redirect('login.php'); } } $this->lblMessage = new QLabel($this); $this->lblMessage->HtmlEntities = false; $this->txtPassword = new QTextBox($this); $this->txtPassword->TextMode = QTextMode::Password; $this->btnChangePassword = new QButton($this); $this->btnChangePassword->PrimaryButton = true; $this->btnChangePassword->Text = t('Change password'); $this->btnChangePassword->AddAction(new QClickEvent(), new QServerAction('btnChangePassword_Click')); }
protected function Form_Create() { switch (QApplication::PathInfo(0)) { case 'funds': $this->dtgReport = new QDataGrid($this); $this->dtgReport->AddColumn(new QDataGridColumn('Fund', '<?= $_ITEM->StewardshipFund->Name; ?>', 'Width=300px')); $this->dtgReport->AddColumn(new QDataGridColumn('Account Number', '<?= $_ITEM->StewardshipFund->AccountNumber; ?>', 'Width=200px')); $this->dtgReport->AddColumn(new QDataGridColumn('Amount', '<?= QApplication::DisplayCurrencyHtml($_ITEM->Amount); ?>', 'HtmlEntities=false', 'Width=245px')); $this->dtgReport->NoDataHtml = 'Changes only to members credited. (No changes to funding accounts or amounts)'; $this->dtgReport->SetDataBinder('dtgReport_Funds_Bind'); break; case 'line_items': $this->dtgReport = new QDataGrid($this); $this->dtgReport->AddColumn(new QDataGridColumn('Person', '<?= $_ITEM->Person->Name; ?>', 'Width=200px')); $this->dtgReport->AddColumn(new QDataGridColumn('Fund', '<?= $_ITEM->StewardshipFund->Name; ?>', 'Width=200px')); $this->dtgReport->AddColumn(new QDataGridColumn('Description', '<?= $_ITEM->Description; ?>', 'Width=200px')); $this->dtgReport->AddColumn(new QDataGridColumn('Amount', '<?= QApplication::DisplayCurrencyHtml($_ITEM->Amount); ?>', 'HtmlEntities=false', 'Width=130px')); $this->dtgReport->SetDataBinder('dtgReport_LineItems_Bind'); break; default: QApplication::Redirect('/stewardship/'); break; } $this->objBatch = StewardshipBatch::Load(QApplication::PathInfo(1)); if (!$this->objBatch) { QApplication::Redirect('/stewardship/'); } $this->objPost = StewardshipPost::LoadByStewardshipBatchIdPostNumber($this->objBatch->Id, QApplication::PathInfo(2)); if (!$this->objPost) { QApplication::Redirect('/stewardship/'); } }
protected function btnLogin_Click($strFormId, $strControlId, $strParameter) { $objPerson = Person::LoadByUsername(trim(strtolower($this->txtUsername->Text))); if (!$objPerson) { $objPerson = Person::LoadByEmail(trim(strtolower($this->txtUsername->Text))); } if ($objPerson && $objPerson->IsPasswordValid($this->txtPassword->Text)) { QApplication::LoginPerson($objPerson); if ($this->chkRemember->Checked) { QApplication::SetLoginTicketToCookie($objPerson); } // Redirect to the correct location if ($objPerson->PasswordResetFlag) { if (array_key_exists('strReferer', $_GET)) { QApplication::Redirect('/profile/password.php?strReferer=' . urlencode($_GET['strReferer'])); } else { QApplication::Redirect('/profile/password.php?strReferer=' . urlencode('/')); } } else { if (array_key_exists('strReferer', $_GET)) { QApplication::Redirect($_GET['strReferer']); } else { QApplication::Redirect('/'); } } } // If we're here, either the username and/or password is not valid $this->txtUsername->Warning = 'Invalid username or password'; $this->txtPassword->Text = null; // Call Form_Validate() to do that blinking thing $this->Form_Validate(); }
protected function Form_Create() { if (isset($_SESSION['User'])) { $_SESSION['User'] = ''; } QApplication::Redirect('index.php'); }
protected function Form_Create() { $this->objList = CommunicationList::LoadById(QApplication::PathInfo(0)); if (!$this->objList) { QApplication::Redirect('/communications/'); } $this->strPageTitle .= $this->objList->Name; $this->dtgMembers = new QDataGrid($this); $this->dtgMembers->UseAjax = true; $this->dtgMembers->Paginator = new QPaginator($this->dtgMembers); if ($this->objList->Ministry->IsLoginCanAdminMinistry(QApplication::$Login)) { $this->dtgMembers->AddColumn(new QDataGridColumn('Edit', '<?= $_FORM->RenderEdit($_ITEM); ?>', 'HtmlEntities=false', 'Width=140px', 'FontSize=10px')); } $this->dtgMembers->AddColumn(new QDataGridColumn('First Name', '<?= $_ITEM[0]; ?>', 'Width=150px', 'SortByCommand=0,0', 'ReverseSortByCommand=0,1')); $this->dtgMembers->AddColumn(new QDataGridColumn('Middle', '<?= $_ITEM[1]; ?>', 'Width=80px', 'SortByCommand=1,0', 'ReverseSortByCommand=1,1')); $this->dtgMembers->AddColumn(new QDataGridColumn('Last Name', '<?= $_ITEM[2]; ?>', 'Width=150px', 'SortByCommand=2,0', 'ReverseSortByCommand=2,1')); $this->dtgMembers->AddColumn(new QDataGridColumn('Email', '<a href="mailto:<?= QApplication::HtmlEntities($_ITEM[3]); ?>"><?= QApplication::HtmlEntities($_ITEM[3]); ?></a>', 'HtmlEntities=false', 'Width=290px', 'SortByCommand=3,0', 'ReverseSortByCommand=3,1')); $this->dtgMembers->AddColumn(new QDataGridColumn('Member?', '<?= $_ITEM[6]; ?>', 'Width=75px', 'SortByCommand=6,0', 'ReverseSortByCommand=6,1')); if ($this->objList->Ministry->IsLoginCanAdminMinistry(QApplication::$Login)) { $this->dtgMembers->SortColumnIndex = 3; } else { $this->dtgMembers->SortColumnIndex = 2; } $this->pxyUnsubscribeEntry = new QControlProxy($this); $this->pxyUnsubscribeEntry->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to unsubscribe this person from the list?')); $this->pxyUnsubscribeEntry->AddAction(new QClickEvent(), new QAjaxAction('pxyUnsubscribeEntry_Click')); $this->pxyUnsubscribeEntry->AddAction(new QClickEvent(), new QTerminateAction()); $this->pxyUnsubscribePerson = new QControlProxy($this); $this->pxyUnsubscribePerson->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to unsubscribe this person from the list?')); $this->pxyUnsubscribePerson->AddAction(new QClickEvent(), new QAjaxAction('pxyUnsubscribePerson_Click')); $this->pxyUnsubscribePerson->AddAction(new QClickEvent(), new QTerminateAction()); $this->dtgMembers->SetDataBinder('dtgMembers_Bind'); $this->SetupEmailMessageControls(); }
protected function Form_Create() { $this->objProvisionalPublicLogin = ProvisionalPublicLogin::Load(QApplication::PathInfo(0)); if (!$this->objProvisionalPublicLogin || $this->objProvisionalPublicLogin->UrlHash != QApplication::PathInfo(1)) { QApplication::Redirect('/register/'); } }
protected function Form_Create() { parent::Form_Create(); if (QApplication::GetUserId() == NarroUser::ANONYMOUS_USER_ID) { QApplication::Redirect(NarroLink::ProjectList()); exit; } if (QApplication::GetUserId() != QApplication::QueryString('u') && QApplication::HasPermissionForThisLang('Can manage users', null)) { $this->objUser = NarroUser::Load(QApplication::QueryString('u')); } if (!$this->objUser instanceof NarroUser) { $this->objUser = QApplication::$User; } $this->pnlBreadcrumb->setElements(NarroLink::ProjectList(t('Projects')), NarroLink::UserList('', t('Users')), $this->objUser->RealName); $this->pnlTab = new QTabs($this); new QPanel($this->pnlTab); $arrHeaders[] = NarroLink::UserProfile($this->objUser->UserId, t('Profile')); if (QApplication::GetUserId() == $this->objUser->UserId || QApplication::HasPermissionForThisLang('Can manage users', null)) { new QPanel($this->pnlTab); $arrHeaders[] = NarroLink::UserPreferences($this->objUser->UserId, t('Preferences')); } new QPanel($this->pnlTab); $arrHeaders[] = NarroLink::UserRole($this->objUser->UserId, t('Roles')); if (QApplication::GetUserId() == $this->objUser->UserId || QApplication::HasPermissionForThisLang('Can manage users', null)) { $this->pnlUser = new NarroUserEditPanel($this->objUser, $this->pnlTab); $arrHeaders[] = NarroLink::UserEdit($this->objUser->UserId, t('Edit')); $this->pnlTab->Selected = count($arrHeaders) - 1; } $this->pnlTab->Headers = $arrHeaders; }
protected function btnSubmitNote_Click($strFormId, $strControlId, $strParameter) { //email success $status = $this->SendMessage(); // return to prayer page QApplication::Redirect('/prayer/complete_send_note.php/' . $status); }
protected function Form_Run() { QApplication::$LoadedPage = 'Home'; if ($_SESSION['User'] == '') { QApplication::Redirect('index.php'); } }
protected function btnOkay_Click($strFormId, $strControlId, $strParameter) { if (array_key_exists('strReferer', $_GET)) { QApplication::Redirect('/login?strReferer=' . urlencode($_GET['strReferer'])); } else { QApplication::Redirect('/login/'); } }
public function pxyDelete_Click($strFormId, $strControlId, $strParameter) { QApplication::DisplayAlert(sprintf('Receipts for %s have been deleted.', $strParameter)); foreach ($this->GetFileArrayForYear($strParameter) as $strFile) { unlink(RECEIPT_PDF_PATH . '/' . $strFile); } QApplication::Redirect('/stewardship/receipts/'); }
public function pxyDelete_Click($strFormId, $strControlId, $strParameter) { QApplication::DisplayAlert(sprintf('Reports for %s have been deleted.', $strParameter)); foreach ($this->GetFileArrayForYear($strParameter) as $strFile) { unlink(STATISTICS_PDF_PATH . '/' . $strFile); } QApplication::Redirect('/stewardship/reports/giving_statistics.php'); }
protected function Redirect() { $objConstant = QcodoConstant::Load(QApplication::PathInfo(0)); if ($objConstant) { QApplication::Redirect('/index.php/' . $this->objConstant->QcodoClass->Name . '/Constants'); } else { QApplication::Redirect('/index.php'); } }
protected function Redirect() { $objVariable = ClassVariable::Load(QApplication::PathInfo(0)); if ($objVariable) { QApplication::Redirect('/index.php/' . $this->objVariable->QcodoClass->Name . '/Variables'); } else { QApplication::Redirect('/index.php'); } }
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/'); } }
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/'); } }
protected function SetupNarroProject($intProjectId) { $this->objProject = NarroProject::Load($intProjectId); if (!$this->objProject) { QApplication::Redirect(NarroLink::ProjectList()); return false; } else { $this->pnlBreadcrumb->setElements(NarroLink::ProjectList(t('Projects')), $this->objProject->ProjectName); return true; } }
protected function Form_Create() { if (isset($_GET['logout'])) { session_destroy(); QApplication::Redirect('word_list.php'); } $this->lblMessage = new QLabel($this); $this->lblMessage->HtmlEntities = false; $this->txtOpenIdUrl = new QTextBox($this, 'username'); $this->txtOpenIdUrl->TabIndex = 1; $this->btnLogin = new QButton($this); $this->btnLogin->Text = 'Autentificare'; $this->btnLogin->PrimaryButton = true; $this->btnLogin->TabIndex = 3; $this->btnLogin->AddAction(new QClickEvent(), new QServerAction('btnLogin_Click')); if (isset($_REQUEST['openid_mode'])) { require_once "Zend/Auth.php"; require_once "Zend/Auth/Adapter/OpenId.php"; require_once "Zend/Auth/Storage/NonPersistent.php"; $auth = Zend_Auth::getInstance(); $auth->authenticate(new Zend_Auth_Adapter_OpenId($this->txtOpenIdUrl->Text)); if ($auth->hasIdentity()) { require_once 'Zend/Session/Namespace.php'; $objSession = new Zend_Session_Namespace('SubmitWord'); $objSession->User = $auth->getIdentity(); QApplication::$User = $auth->getIdentity(); QApplication::Redirect('word_list.php'); } else { $this->lblMessage->ForeColor = 'red'; $this->lblMessage->Text = 'N-am primit nicio identitate, astea sunt datele primite: ' . var_export($auth, true); return false; } } // Instantiate the Meta DataGrid $this->dtgWords = new WordDataGrid($this); // Style the DataGrid (if desired) $this->dtgWords->CssClass = 'datagrid'; $this->dtgWords->AlternateRowStyle->CssClass = 'alternate'; // Add Pagination (if desired) $this->dtgWords->Paginator = new QPaginator($this->dtgWords); $this->dtgWords->ItemsPerPage = 20; $strEditPageUrl = __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__ . '/word_edit.php'; // Create the Other Columns (note that you can use strings for submit_word_word's properties, or you // can traverse down QQN::submit_word_word() to display fields that are down the hierarchy) $this->dtgWords->MetaAddColumn('WordId', 'Name=Id'); if (QApplication::$User) { $this->dtgWords->MetaAddColumn('Word', 'Name=Cuvânt', 'HtmlEntities=false', 'Html=<?= \'<a href="' . $strEditPageUrl . '/\' . $_ITEM->WordId . \'">\' . $_ITEM->Word . \'</a>\'?>'); } else { $this->dtgWords->MetaAddColumn('Word', 'Name=Cuvânt'); } $this->dtgWords->MetaAddTypeColumn('StatusTypeId', 'StatusType', 'Name=Stare'); $this->dtgWords->MetaAddColumn('ProposalCount', 'Name=Propuneri'); $this->dtgWords->MetaAddColumn('LastSent', 'Name=Ultima propunere'); }
protected function btnUpdate_Click($strFormId, $strControlId, $strParameter) { QApplication::$Person->SetPassword($this->txtNewPassword->Text); QApplication::$Person->PasswordResetFlag = false; QApplication::$Person->Save(); if (array_key_exists('strReferer', $_GET)) { QApplication::Redirect($_GET['strReferer']); } else { QApplication::Redirect(QApplication::$Person->ViewProfileUrl); } }
public static function Authenticate($intPersonTypeId = null) { if (!QApplication::$Login) { QApplication::Redirect('http://www.qcodo.com/members/index.php/2'); } if (!is_null($intPersonTypeId)) { // Check to ensure person type if (QApplication::$Login->PersonTypeId != $intPersonTypeId) { QApplication::Redirect('http://www.qcodo.com/members/index.php/2'); } } }
protected function Form_Create() { $intYear = QApplication::PathInfo(0); if ($intYear >= 1950 && $intYear <= 2500) { // looks good } else { QApplication::Redirect('/stewardship/'); } $this->dtgItems = new QDataGrid($this); $this->dtgItems->AddColumn(new QDataGridColumn('Name', '<?= $_ITEM->LinkHtml; ?>', 'HtmlEntities=false', 'Width=950px')); $this->dtgItems->SetDataBinder('dtgItems_Bind'); $this->dtgItems->Paginator = new QPaginator($this->dtgItems); }
public function lstLanguage_Change() { /** * @todo replace this code with a javascript one that keeps the #part */ if (strstr($_SERVER['REQUEST_URI'], 'l=')) { QApplication::Redirect(str_replace('l=' . QApplication::$TargetLanguage->LanguageCode, 'l=' . $this->lstLanguage->SelectedValue, $_SERVER['REQUEST_URI'])); } elseif (strstr($_SERVER['REQUEST_URI'], '?')) { QApplication::Redirect($_SERVER['REQUEST_URI'] . '&l=' . $this->lstLanguage->SelectedValue); } else { QApplication::Redirect($_SERVER['REQUEST_URI'] . '?l=' . $this->lstLanguage->SelectedValue); } }
protected function Form_Create() { $this->objSignupForm = SignupForm::Load(QApplication::PathInfo(0)); if (!$this->objSignupForm) { QApplication::Redirect('/events/'); } // Check for view *and* admin permissions on this ministry if (!$this->objSignupForm->IsLoginCanView(QApplication::$Login)) { QApplication::Redirect('/events/'); } if (!$this->objSignupForm->Ministry->IsLoginCanAdminMinistry(QApplication::$Login)) { QApplication::Redirect('/events/'); } switch ($this->objSignupForm->SignupFormTypeId) { case SignupFormType::Event: $this->strPageTitle .= $this->objSignupForm->Name; break; case SignupFormType::Course: $this->strPageTitle = 'Class Registration - ' . $this->objSignupForm->Name; break; default: throw new Exception('Invalid SignupFormTypeId for SignupForm: ' . $this->objSignupForm->Id); } $this->dlgEdit_Create(); $this->bIsCourse = false; // Child Object switch ($this->objSignupForm->SignupFormTypeId) { case SignupFormType::Event: break; case SignupFormType::Course: $this->bIsCourse = true; break; default: throw new Exception('Invalid SignupFormTypeId for SignupForm: ' . $this->objSignupForm->Id); } // Specifically for class registrations if ($this->bIsCourse) { $this->dtgClassAttendance = new QDataGrid($this); $this->dtgClassAttendance->AddColumn(new QDataGridColumn('Signups', '<?= $_FORM->RenderSignups($_ITEM); ?>', 'Width=300px', 'HtmlEntities=false')); $ClassMeetingArrayForIndex = $this->objSignupForm->ClassMeeting->GetClassMeetingDays(); foreach ($ClassMeetingArrayForIndex as $dtClassMeeting) { $strClassDate = $dtClassMeeting->ToString("DDDD, MMMM D, YYYY"); $this->dtgClassAttendance->AddColumn(new QDataGridColumn($strClassDate, '<?= $_FORM->RenderAttendance($_ITEM, $_COLUMN->Name); ?>', 'Width=300px', 'HtmlEntities=false')); } $this->dtgClassAttendance->SetDataBinder('dtgMyClassAttendance_Bind'); $this->pxyEditClassAttendance = new QControlProxy($this); $this->pxyEditClassAttendance->AddAction(new QClickEvent(), new QAjaxAction('pxyEditClassAttendance_Click')); $this->pxyEditClassAttendance->AddAction(new QClickEvent(), new QTerminateAction()); } }
protected function Form_Create() { // Setup Household Object $this->objHousehold = Household::Load(QApplication::PathInfo(0)); if (!$this->objHousehold) { QApplication::Redirect('/households/'); } $this->strPageTitle .= 'Home Address - ' . $this->objHousehold->Name; $this->pnlContent = new EditHouseholdHomeAddressPanel($this); $this->pnlContent->objDelegate = new EditHomeAddressDelegate($this->pnlContent, '/households/view.php/' . $this->objHousehold->Id, QApplication::PathInfo(1)); $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->pnlContent->objDelegate->dlgMessage)); $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlContent, 'btnSave_Click')); $this->strPageTitle = ($this->pnlContent->objDelegate->mctAddress->EditMode ? 'Edit' : 'Create New') . ' ' . $this->strPageTitle; }
protected function Form_Create() { parent::Form_Create(); $this->objPackage = Package::LoadByToken(QApplication::PathInfo(0)); if (!$this->objPackage) { QApplication::Redirect('/qpm/'); } $this->strPageTitle .= $this->objPackage->Name; $this->dtgContributions = new PackageContributionDataGrid($this); $this->dtgContributions->SetDataBinder('dtgContributions_Bind'); $this->dtgContributions->AlternateRowStyle->CssClass = 'alternate'; $this->dtgContributions->MetaAddColumn(QQN::PackageContribution()->Person->Username, 'Name=QPM Path for Version', 'Html=<?= $_FORM->RenderPath($_ITEM); ?>', 'Width=350px', 'VerticalAlign=top', 'FontNames=Monaco, Courier, Courier New,Monospaced', 'HtmlEntities=false'); $this->dtgContributions->MetaAddColumn(QQN::PackageContribution()->CurrentPackageVersion->Notes, 'Name=Version Notes', 'Html=<?= $_FORM->RenderNotes($_ITEM); ?>', 'Width=400px', 'VerticalAlign=top', 'CssClass=small', 'HtmlEntities=false'); $this->dtgContributions->MetaAddColumn('CurrentPostDate', 'Name=Posted', 'Width=100px', 'VerticalAlign=top'); $this->dtgContributions->MetaAddColumn(QQN::PackageContribution()->Person->DisplayName, 'Name=By', 'Html=<?= $_FORM->RenderPostedBy($_ITEM); ?>', 'HtmlEntities=false', 'Width=100px', 'CssClass=reverseLink', 'VerticalAlign=top'); $this->dtgContributions->SortColumnIndex = 2; $this->dtgContributions->SortDirection = 1; $this->dtgContributions->Paginator = new QPaginator($this->dtgContributions); if ($this->objPackage->IsEditableForPerson(QApplication::$Person)) { $this->btnEdit = new RoundedLinkButton($this); $this->btnEdit->CssClass = 'searchOption'; $this->btnEdit->ToolTip = 'Edit This package'; $this->btnEdit->LinkUrl = '/qpm/edit.php/' . $this->objPackage->Token; } // Setup messages panel if ($this->objPackage->PackageCategory->Token != 'issues') { $this->pnlMessages = new MessagesPanel($this); $this->pnlMessages->SelectTopic($this->objPackage->TopicLink->GetTopic()); $this->pnlMessages->lblTopicInfo_SetTemplate(__INCLUDES__ . '/messages/lblTopicInfoForPackage.tpl.php'); $this->pnlMessages->btnRespond1->Text = 'Post Comment'; $this->pnlMessages->btnRespond2->Text = 'Post Comment'; $this->pnlMessages->strAdditionalCssClass = 'topicForPackage'; if (array_key_exists('lastpage', $_GET)) { $this->pnlMessages->SetPageNumber(QPaginatedControl::LastPage); } } else { $strTokenParts = explode('_', $this->objPackage->Token); if (count($strTokenParts) == 2) { $strIssueNumber = $strTokenParts[1]; } else { $strIssueNumber = null; } $this->pnlMessages = new QPanel($this); $this->pnlMessages->CssClass = 'topic topicForPackage'; $this->pnlMessages->Text = '<h1>Comments</h1>'; $this->pnlMessages->Text .= '<br/>Comments for this issue-related QPM package have been disabled on this screen. To view, post and edit comments, '; $this->pnlMessages->Text .= 'please do so on the <a href="/issues/view.php/' . $strIssueNumber . '">issue page</a>, itself.'; } }
protected function Form_Create() { // Create the Header Menu $this->ctlHeaderMenu_Create(); $this->ctlShortcutMenu_Create(); if ($_GET && $_GET['method'] == 'delete') { $objAudit = Audit::Load($_GET['intAuditId']); if ($objAudit) { $objAudit->Delete(); QApplication::Redirect("./inventory_audit_list.php"); } } // Load an array of Audit objects using join on UserAccount. $this->objAuditArray = Audit::LoadArrayByEntityQtypeId(2, QQ::Clause(QQ::Expand(QQN::Audit()->CreatedByObject))); }
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); }
protected function Form_Create() { $this->objCategory = ClassifiedCategory::LoadByToken(QApplication::PathInfo(0)); if (!$this->objCategory) { QApplication::Redirect('/classifieds/'); } $this->strPageTitle .= $this->objCategory->Name; $this->dtgPosts = new ClassifiedPostDataGrid($this); $this->dtgPosts->Paginator = new QPaginator($this->dtgPosts); $this->dtgPosts->MetaAddColumn('DatePosted', 'Html=<?= $_FORM->RenderDatePosted($_ITEM); ?>', 'Width=120px'); $this->dtgPosts->MetaAddColumn('Title', 'Html=<?= $_FORM->RenderTitle($_ITEM); ?>', 'Width=750px', 'HtmlEntities=false'); $this->dtgPosts->SetDataBinder('dtgPosts_Bind'); $this->dtgPosts->SortColumnIndex = 0; $this->dtgPosts->SortDirection = 1; $this->dtgPosts->NoDataHtml = 'There are currently no approved posts that have been posted in the past 90 days.'; }