本文整理汇总了PHP中QApplication::Authenticate方法的典型用法代码示例。如果您正苦于以下问题:PHP QApplication::Authenticate方法的具体用法?PHP QApplication::Authenticate怎么用?PHP QApplication::Authenticate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QApplication
的用法示例。
在下文中一共展示了QApplication::Authenticate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Form_Create
protected function Form_Create()
{
// QApplication::$Database[1]->EnableProfiling();
$this->SetupTransaction();
if ($this->objTransaction->EntityQtypeId == EntityQtype::Asset) {
QApplication::Authenticate(2);
}
if ($this->objTransaction->EntityQtypeId == EntityQtype::Inventory) {
QApplication::Authenticate(3);
}
// $this->lblLocation_Create();
$this->lblUser_Create();
$this->lblNote_Create();
$this->lblCreationDate_Create();
$this->dtgEntity_Create();
$this->ctlHeaderMenu_Create();
$this->ctlShortcutMenu_Create();
}
示例2:
* Tracmor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once '../includes/prepend.inc.php';
QApplication::Authenticate(6);
require_once __FORMBASE_CLASSES__ . '/ReceiptEditFormBase.class.php';
require '../contacts/CompanyEditPanel.class.php';
require '../contacts/ContactEditPanel.class.php';
require '../contacts/AddressEditPanel.class.php';
/**
* This is a quick-and-dirty draft form object to do Create, Edit, and Delete functionality
* of the Receipt class. It extends from the code-generated
* abstract ReceiptEditFormBase class.
*
* Any display custimizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* Additional qform control objects can also be defined and used here, as well.
*
* @package Application
示例3: Form_Create
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require '../includes/prepend.inc.php';
/* if you DO NOT have "includes/" in your include_path */
QApplication::Authenticate(7);
require_once __FORMBASE_CLASSES__ . '/AuditListFormBase.class.php';
class InventoryAuditViewForm extends QForm
{
// Header Menu
protected $ctlHeaderMenu;
// Shortcut Menu
protected $ctlShortcutMenu;
// The view type radio button list
protected $rblDiscrepancy;
// The Audit Datagrid
protected $dtgAudit;
// The Audit Objects Array By AssetId
protected $objAssetArrayById;
protected function Form_Create()
{
示例4:
* Tracmor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once '../includes/prepend.inc.php';
QApplication::Authenticate(2);
require_once __FORMBASE_CLASSES__ . '/AssetEditFormBase.class.php';
/**
* This is a quick-and-dirty draft form object to do Create, Edit, and Delete functionality
* of the Asset class. It extends from the code-generated
* abstract AssetEditFormBase class.
*
* Any display custimizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* Additional qform control objects can also be defined and used here, as well.
*
* @package Application
* @subpackage FormDraftObjects
*
*/
示例5:
<?php
// Include prepend.inc to load Qcodo
require '../includes/prepend.inc.php';
/* if you DO NOT have "includes/" in your include_path */
// require('prepend.inc.php'); /* if you DO have "includes/" in your include_path */
// Include the classfile for DirectoryTokenListFormBase
require __FORMBASE_CLASSES__ . '/DirectoryTokenListFormBase.class.php';
// Security check for ALLOW_REMOTE_ADMIN
// To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below
QApplication::CheckRemoteAdmin();
QApplication::Authenticate(PersonType::Administrator);
/**
* This is a quick-and-dirty draft form object to do the List All functionality
* of the DirectoryToken class. It extends from the code-generated
* abstract DirectoryTokenListFormBase class.
*
* Any display custimizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* Additional qform control objects can also be defined and used here, as well.
*
* @package My Application
* @subpackage FormDraftObjects
*
*/
class DirectoryTokenListForm extends DirectoryTokenListFormBase
{
}
// Go ahead and run this form object to generate the page and event handlers, using
// generated/directory_token_list.tpl.php as the included HTML template file
示例6:
* Tracmor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once '../includes/prepend.inc.php';
QApplication::Authenticate(4);
require_once __FORMBASE_CLASSES__ . '/CompanyListFormBase.class.php';
require '../contacts/CompanyMassEditPanel.class.php';
/**
* This is a quick-and-dirty draft form object to do the List All functionality
* of the Company class. It extends from the code-generated
* abstract CompanyListFormBase class.
*
* Any display custimizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* Additional qform control objects can also be defined and used here, as well.
*
* @package Application
* @subpackage FormDraftObjects
*
示例7: dirname
<?php
require dirname(__FILE__) . '/../../../includes/prepend.inc.php';
QApplication::Authenticate(array(RoleType::ChMSAdministrator));
class AdminEditAttributeForm extends ChmsForm
{
protected $strPageTitle;
protected $intNavSectionId = ChmsForm::NavSectionAdministration;
protected $mctCommentCategory;
protected $txtName;
protected $btnSave;
protected $btnCancel;
protected function Form_Create()
{
$this->mctCommentCategory = CommentCategoryMetaControl::Create($this, QApplication::PathInfo(0), QMetaControlCreateType::CreateOrEdit);
if (!$this->mctCommentCategory->EditMode) {
$this->mctCommentCategory->CommentCategory->OrderNumber = 0;
}
$this->strPageTitle = 'Administration - ' . ($this->mctCommentCategory->EditMode ? 'Edit' : 'Create New') . ' Comment Category';
$this->txtName = $this->mctCommentCategory->txtName_Create();
$this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->btnSave = new QButton($this);
$this->btnSave->Text = $this->mctCommentCategory->EditMode ? 'Update' : 'Create';
$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());
示例8: dirname
<?php
require dirname(__FILE__) . '/../../includes/prepend.inc.php';
QApplication::Authenticate(null, array(PermissionType::ManageClasses));
class ClassesForm extends ChmsForm
{
protected $strPageTitle = 'Classes@ALCF - ';
protected $intNavSectionId = ChmsForm::NavSectionEvents;
protected $mctObject;
protected $txtName;
protected $txtCode;
protected $btnSave;
protected $btnCancel;
protected $btnDelete;
protected function Form_Create()
{
$this->mctObject = ClassCourseMetaControl::CreateFromPathInfo($this, QMetaControlCreateType::CreateOnRecordNotFound);
if ($this->mctObject->EditMode) {
$this->strPageTitle .= 'Edit Course';
} else {
$this->strPageTitle .= 'Create New Course';
}
$this->txtName = $this->mctObject->txtName_Create();
$this->txtName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->txtCode = $this->mctObject->txtCode_Create();
$this->txtCode->AddAction(new QEnterKeyEvent(), new QTerminateAction());
$this->btnSave = new QButton($this);
$this->btnSave->CssClass = 'primary';
$this->btnSave->Text = $this->mctObject->EditMode ? 'Update' : 'Create';
$this->btnSave->CausesValidation = true;
$this->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
示例9: dirname
<?php
require dirname(__FILE__) . '/../../../includes/prepend.inc.php';
QApplication::Authenticate(null, array(PermissionType::AccessStewardship));
class AdminMainForm extends ChmsForm
{
protected $strPageTitle = 'Stewardship - Pay Pal Reconciliation - All Batches';
protected $intNavSectionId = ChmsForm::NavSectionStewardship;
protected $dtgBatches;
protected $lstStatus;
protected $txtDescription;
protected $lstCreatedBy;
protected function Form_Create()
{
$this->dtgBatches = new PaypalBatchDataGrid($this);
$this->dtgBatches->Paginator = new QPaginator($this->dtgBatches);
$this->dtgBatches->MetaAddColumn('Number', 'Name=Batch Number', 'Html=<?= $_FORM->RenderBatchLabel($_ITEM); ?>', 'HtmlEntities=false', 'Width=200px');
$this->dtgBatches->MetaAddColumn('DateReceived', 'Name=Date Created', 'Width=200px');
$this->dtgBatches->MetaAddColumn('ReconciledFlag', 'Name=Posted?', 'Html=<?= $_ITEM->ReconciledFlag ? "Yes" : "No"; ?>', 'Width=100px');
$this->dtgBatches->MetaAddColumn('DateReconciled', 'Name=Date Posted', 'Width=200px');
$this->dtgBatches->AddColumn(new QDataGridColumn('Number of Transactions', '<?= $_FORM->RenderCount($_ITEM); ?>', 'Width=200px'));
$this->dtgBatches->SetDataBinder('dtgBatches_Bind');
$this->dtgBatches->SortColumnIndex = 0;
$this->dtgBatches->SortDirection = 1;
}
public function RenderCount(PaypalBatch $objBatch)
{
return $objBatch->CountCreditCardPayments();
}
public function RenderBatchLabel(PaypalBatch $objBatch)
{
示例10:
* Tracmor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once '../includes/prepend.inc.php';
QApplication::Authenticate(5);
require_once __FORMBASE_CLASSES__ . '/ShipmentListFormBase.class.php';
require '../shipping/shipmentMassEditPanel.class.php';
/**
* This is a quick-and-dirty draft form object to do the List All functionality
* of the Shipment class. It extends from the code-generated
* abstract ShipmentListFormBase class.
*
* Any display custimizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* Additional qform control objects can also be defined and used here, as well.
*
* @package Application
* @subpackage FormDraftObjects
*
示例11:
* Tracmor is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once '../includes/prepend.inc.php';
QApplication::Authenticate(3);
require_once __FORMBASE_CLASSES__ . '/InventoryModelListFormBase.class.php';
/**
* This is a quick-and-dirty draft form object to do the List All functionality
* of the InventoryModel class. It extends from the code-generated
* abstract InventoryModelListFormBase class.
*
* Any display custimizations and presentation-tier logic can be implemented
* here by overriding existing or implementing new methods, properties and variables.
*
* Additional qform control objects can also be defined and used here, as well.
*
* @package Application
* @subpackage FormDraftObjects
*
*/
示例12: dirname
<?php
require dirname(__FILE__) . '/../../includes/prepend.inc.php';
QApplication::Authenticate(null, array(PermissionType::ManageSafariKids));
class SkForm extends ChmsForm
{
protected $strPageTitle = 'Safari Kids - Link a ParentPager Record';
protected $intNavSectionId = ChmsForm::NavSectionSafariKids;
protected $dtgAttendantHistory;
protected $dtgChildHistory;
protected $objParentPagerIndividual;
protected $pnlSelectPerson;
protected $btnSave;
protected $btnCancel;
protected $btnHideToggle;
protected function Form_Create()
{
$this->objParentPagerIndividual = ParentPagerIndividual::Load(QApplication::PathInfo(0));
if (!$this->objParentPagerIndividual) {
QApplication::Redirect('/sk/');
}
$this->pnlSelectPerson = new SelectPersonPanel($this);
$this->pnlSelectPerson->Required = true;
$this->pnlSelectPerson->Name = 'Search NOAH';
$this->pnlSelectPerson->txtName->Text = $this->objParentPagerIndividual->FirstName . ' ' . $this->objParentPagerIndividual->LastName;
$this->pnlSelectPerson->txtName_Change();
$this->pnlSelectPerson->AllowCreate = true;
switch (strtoupper($this->objParentPagerIndividual->Gender)) {
case 'M':
$this->pnlSelectPerson->lstGender->SelectedValue = 'M';
break;
示例13: dirname
<?php
require dirname(__FILE__) . '/../../includes/prepend.inc.php';
QApplication::Authenticate(null, array(PermissionType::AddNewIndividual));
class CreateIndividualForm extends ChmsForm
{
protected $strPageTitle = 'Add New Individual';
protected $intNavSectionId = ChmsForm::NavSectionPeople;
protected $txtPersonFirstName;
protected $txtPersonMiddleName;
protected $txtPersonLastName;
protected $txtPersonSuffix;
protected $txtPersonNickname;
protected $txtPersonPriorLastNames;
protected $dtxPersonDateOfBirth;
protected $calPersonDateOfBirth;
protected $lstPersonGender;
protected $txtPersonHomePhone;
protected $txtPersonCellPhone;
protected $lstPersonMobileProvider;
protected $txtPersonWorkPhone;
protected $txtPersonEmail;
protected $lstCanMail;
protected $lstCanEmail;
protected $lstCanPhone;
protected $chkAddToNewsletter;
protected $txtSpouseFirstName;
protected $txtSpouseMiddleName;
protected $txtSpouseLastName;
protected $txtSpouseSuffix;
protected $txtSpouseNickname;
示例14: array
<?php
QApplication::Authenticate(null, array(PermissionType::MergeIndividuals));
class Vicp_Merge_Fields extends Vicp_Base
{
/**
* @var Person
*/
public $objPersonMergeWith;
public $btnLeft;
public $btnRight;
protected function SetupPanel()
{
$this->objPersonMergeWith = Person::Load($this->strUrlHashArgument);
if (!$this->objPersonMergeWith || $this->objPersonMergeWith->Id == $this->objPerson->Id) {
return $this->ReturnTo($this->objPerson->LinkUrl);
}
// Do the households match up okay?
$blnHouseholdOkay = true;
if ($this->objPerson->HouseholdAsHead) {
foreach ($this->objPersonMergeWith->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
if ($objHouseholdParticipation->HouseholdId != $this->objPerson->HouseholdAsHead->Id) {
if ($objHouseholdParticipation->Household->CountHouseholdParticipations() > 1) {
$blnHouseholdOkay = false;
}
}
}
}
if ($this->objPersonMergeWith->HouseholdAsHead) {
foreach ($this->objPerson->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
if ($objHouseholdParticipation->HouseholdId != $this->objPersonMergeWith->HouseholdAsHead->Id) {
示例15: Form_Create
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tracmor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tracmor; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require '../includes/prepend.inc.php';
/* if you DO NOT have "includes/" in your include_path */
QApplication::Authenticate(1);
class HomeIndexForm extends QForm
{
// Header Menu
protected $ctlHeaderMenu;
protected function Form_Create()
{
// Create the Header Menu
$this->ctlHeaderMenu_Create();
}
// Create and Setup the Header Composite Control
protected function ctlHeaderMenu_Create()
{
$this->ctlHeaderMenu = new QHeaderMenu($this);
}
}