当前位置: 首页>>代码示例>>PHP>>正文


PHP QApplication::QueryString方法代码示例

本文整理汇总了PHP中QApplication::QueryString方法的典型用法代码示例。如果您正苦于以下问题:PHP QApplication::QueryString方法的具体用法?PHP QApplication::QueryString怎么用?PHP QApplication::QueryString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QApplication的用法示例。


在下文中一共展示了QApplication::QueryString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     $this->pnlTab = new QTabs($this);
     $pnlDummy = new QPanel($this->pnlTab);
     $pnlDummy = new QPanel($this->pnlTab);
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders = array(NarroLink::ProjectList(t('Projects')), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_ALL, '', 0, 0, 10, 0, 0, t('Translate')), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Review')));
     /**
      * Do not show the langauge tab if only two languages are active (source and target
      * Unless the user is an administrator and might want to set another one active
      */
     if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
         $this->pnlLanguageTab = new QTabs($this->pnlTab);
         $pnlDummy = new QPanel($this->pnlLanguageTab);
         $arrLangHeaders[] = t('List');
         if (QApplication::HasPermissionForThisLang('Can add language')) {
             $this->pnlLanguageEdit = new NarroLanguageEditPanel($this->pnlLanguageTab, NarroLanguage::Load(QApplication::QueryString('lid')));
             $arrLangHeaders[] = QApplication::QueryString('lid') ? t('Edit') : t('Add');
         }
         $this->pnlLanguageTab->Headers = $arrLangHeaders;
         $this->pnlLanguageTab->Selected = 1;
         $arrHeaders[] = t('Languages');
         $this->pnlTab->Selected = count($arrHeaders) - 1;
     }
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::UserList('', t('Users'));
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::RoleList(0, '', t('Roles'));
     if (QApplication::HasPermissionForThisLang('Administrator')) {
         $pnlDummy = new QPanel($this->pnlTab);
         $arrHeaders[] = NarroLink::Log('', t('Application Log'));
     }
     $this->pnlTab->Headers = $arrHeaders;
 }
开发者ID:Jobava,项目名称:narro,代码行数:35,代码来源:language_edit.php

示例2: Form_Create

 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;
 }
开发者ID:Jobava,项目名称:narro,代码行数:30,代码来源:account.php

示例3: Form_Create

 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'));
 }
开发者ID:Jobava,项目名称:narro,代码行数:26,代码来源:change_password.php

示例4: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     $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'));
     $this->pnlSelectedTab = new NarroProjectFileListPanel($this->objProject, $this->objParentFile, $this->pnlMainTab);
     $this->pnlSelectedTab->ChangeDirectory(QApplication::QueryString('pf'));
     $arrHeaders[] = NarroLink::ProjectFileList($this->objProject->ProjectId, '', '', t('Files'));
     $this->pnlMainTab->Selected = count($arrHeaders) - 1;
     $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)) {
         $pnlDummy = new QPanel($this->pnlMainTab);
         $arrHeaders[] = NarroLink::ProjectExport($this->objProject->ProjectId, t('Export'));
     }
     $this->pnlMainTab->Headers = $arrHeaders;
 }
开发者ID:Jobava,项目名称:narro,代码行数:29,代码来源:files.php

示例5: __construct

 public function __construct(NarroProject $objNarroProject, string $strCurrentPath = null, $objParentObject, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     $this->pnlBreadcrumb = new NarroBreadcrumbPanel($this);
     $this->pnlBreadcrumb->strSeparator = ' / ';
     $this->objProject = $objNarroProject;
     $this->chkShowHierarchy = new QCheckBox($this);
     $this->chkShowHierarchy->Checked = QApplication::QueryString('s') == '';
     $this->chkShowHierarchy->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'dtgFile_SetConditions'));
     $this->chkShowFolders = new QCheckBox($this);
     $this->chkShowFolders->Checked = true;
     $this->chkShowFolders->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'dtgFile_SetConditions'));
     $this->strTemplate = __NARRO_INCLUDES__ . '/narro/panel/NarroProjectFileListPanel.tpl.php';
     $this->ChangeDirectory($strCurrentPath);
     $this->btnSearch = new QButton($this);
     $this->btnSearch->Text = t('Search');
     $this->btnSearch->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSearch_Click'));
     $this->btnSearch->PrimaryButton = true;
     $this->txtSearch = new QTextBox($this);
     $this->txtSearch->Text = QApplication::QueryString('s');
     $this->ChangeDirectory(QApplication::QueryString('pf'));
     $this->dtgFile_Create();
     $this->dtgFile_SetConditions();
 }
开发者ID:Jobava,项目名称:narro,代码行数:30,代码来源:NarroProjectFileListPanel.class.php

示例6: lstSort_Create

 public function lstSort_Create()
 {
     $this->lstSort = new QListBox($this);
     $this->lstSort->AddItem(t('not sorted'), null, true);
     $this->lstSort->AddItem(t('sorted by most recent translation'), self::SORT_TRANSLATION_DATE);
     $this->lstSort->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'btnSearch_Click'));
     if (QApplication::QueryString('o')) {
         $this->lstSort->SelectedValue = QApplication::QueryString('o');
     }
 }
开发者ID:Jobava,项目名称:narro,代码行数:10,代码来源:NarroReviewPanel.class.php

示例7: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     $this->pnlMainTab = new QTabs($this);
     if (QApplication::QueryString('p') > 0) {
         if ($this->SetupNarroProject(QApplication::QueryString('p')) === false) {
             return false;
         }
     }
 }
开发者ID:Jobava,项目名称:narro,代码行数:10,代码来源:NarroGenericProjectForm.class.php

示例8: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     $this->txtSearch = new SearchTextBox($this, 'txtSearch');
     $this->txtSearch->Text = QApplication::QueryString('search');
     $this->txtSearch->AddAction(new QEnterKeyEvent(0, "qc.getControl('txtSearch').value != ''"), new QServerAction('txtSearch_Enter'));
     $this->txtSearch->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->dtrForums = new QDataRepeater($this, 'dtrForums');
     $this->dtrForums->Template = 'dtrForums.tpl.php';
     $this->dtrForums->SetDataBinder('dtrForums_Bind');
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:11,代码来源:index.php

示例9: SetupShipment

 protected function SetupShipment()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intShipmentId = QApplication::QueryString('intShipmentId');
     if ($intShipmentId) {
         $this->objShipment = Shipment::Load($intShipmentId);
         if (!$this->objShipment) {
             throw new Exception('Could not find a Shipment object with PK arguments: ' . $intShipmentId);
         }
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:12,代码来源:packing_list.php

示例10: Form_Create

 protected function Form_Create()
 {
     $this->intTabIndex = 1;
     // Call SetupAddress to either Load/Edit Existing or Create New
     $this->SetupAddress();
     if (!$this->blnEditMode) {
         // Load the Company from the $_GET variable passed
         $this->objAddress->CompanyId = QApplication::QueryString('intCompanyId');
     }
     // Create the Header Menu
     $this->ctlHeaderMenu_Create();
     // Create the Shortcut Menu
     $this->ctlShortcutMenu_Create();
     // Create labels for Address information
     $this->lblCompany_Create();
     $this->lblShortDescription_Create();
     $this->lblHeaderAddress_Create();
     $this->lblAddress1_Create();
     $this->lblAddress2_Create();
     $this->lblCity_Create();
     $this->lblStateProvince_Create();
     $this->lblCountry_Create();
     $this->lblPostalCode_Create();
     $this->lblCreationDate_Create();
     $this->lblModifiedDate_Create();
     $this->UpdateAddressLabels();
     // Create/Setup Controls for Address' Data Fields
     $this->txtShortDescription_Create();
     $this->lstCountry_Create();
     $this->txtAddress1_Create();
     $this->txtAddress2_Create();
     $this->txtCity_Create();
     $this->lstStateProvince_Create();
     $this->txtPostalCode_Create();
     $this->UpdateAddressControls();
     // Create all custom contact fields
     $this->customFields_Create();
     $this->UpdateBuiltInFields();
     // Create/Setup Button Action controls
     $this->btnEdit_Create();
     $this->btnSave_Create();
     $this->btnCancel_Create();
     $this->btnDelete_Create();
     $this->atcAttach_Create();
     $this->pnlAttachments_Create();
     // Display labels for the existing address
     if ($this->blnEditMode) {
         $this->displayLabels();
     } else {
         $this->displayInputs();
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:52,代码来源:address_edit.php

示例11: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     if (QApplication::QueryString('p') == 0) {
         $this->pnlMainTab = new QTabs($this);
         $pnlDummy = new QPanel($this->pnlMainTab);
         $arrHeaders[] = NarroLink::ProjectList(t('Projects'));
         $pnlDummy = new QPanel($this->pnlMainTab);
         $arrHeaders[] = NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Translate'));
         $this->pnlReview = new NarroTranslatePanel($this->pnlMainTab);
         $arrHeaders[] = t('Review');
         $this->pnlMainTab->Selected = count($arrHeaders) - 1;
         if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
             $pnlDummy = new QPanel($this->pnlMainTab);
             $arrHeaders[] = NarroLink::LanguageList(t('Languages'));
         }
         $pnlDummy = new QPanel($this->pnlMainTab);
         $arrHeaders[] = NarroLink::UserList('', t('Users'));
         $pnlDummy = new QPanel($this->pnlMainTab);
         $arrHeaders[] = NarroLink::RoleList(0, '', t('Roles'));
         if (QApplication::HasPermissionForThisLang('Administrator')) {
             $pnlDummy = new QPanel($this->pnlMainTab);
             $arrHeaders[] = NarroLink::Log('', t('Application Log'));
         }
         $this->pnlMainTab->Headers = $arrHeaders;
     } else {
         $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, '', NarroTranslatePanel::SHOW_NOT_TRANSLATED, '', 0, 0, 10, 0, 0, t('Translate'));
         $this->pnlReview = new NarroTranslatePanel($this->pnlMainTab);
         $arrHeaders[] = t('Review');
         $this->pnlMainTab->Selected = count($arrHeaders) - 1;
         $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)) {
             $pnlDummy = new QPanel($this->pnlMainTab);
             $arrHeaders[] = NarroLink::ProjectExport($this->objProject->ProjectId, t('Export'));
         }
         $this->pnlMainTab->Headers = $arrHeaders;
     }
 }
开发者ID:Jobava,项目名称:narro,代码行数:52,代码来源:review.php

示例12: __construct

 public function __construct($objParentObject, $intEntityQtypeId = null, $strControlId = null)
 {
     // First, call the parent to do most of the basic setup
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     $this->objParentObject = $objParentObject;
     $this->intEntityQtypeId = $intEntityQtypeId;
     $this->chkEntityView = new QCheckBox($this);
     $this->chkEntityEdit = new QCheckBox($this);
     $this->chkBuiltInView = new QCheckBox($this);
     $this->chkBuiltInView->Enabled = false;
     $this->chkBuiltInView->Checked = true;
     $intRoleId = QApplication::QueryString('intRoleId');
     if ($intRoleId) {
         $objBuiltInViewAuth = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId($intRoleId, $intEntityQtypeId, 1);
     }
     if (isset($objBuiltInViewAuth)) {
         $this->chkBuiltInView->Checked = $objBuiltInViewAuth->AuthorizedFlag;
     }
     $this->chkBuiltInEdit = new QCheckBox($this);
     if ($intRoleId) {
         $objBuiltInEditAuth = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId($intRoleId, $intEntityQtypeId, 2);
     }
     if (isset($objBuiltInEditAuth)) {
         $this->chkBuiltInEdit->Checked = $objBuiltInEditAuth->AuthorizedFlag;
     }
     // Load all custom fields and their values into an array arrCustomChecks
     $objCustomFieldArray = CustomField::LoadObjCustomFieldArray($intEntityQtypeId, false, null);
     foreach ($objCustomFieldArray as $objCustomField) {
         $chkCustomView = new QCheckBox($this);
         $chkCustomEdit = new QCheckBox($this);
         $objEntityQtypeCustomField = EntityQtypeCustomField::LoadByEntityQtypeIdCustomFieldId($intEntityQtypeId, $objCustomField->CustomFieldId);
         if ($objEntityQtypeCustomField) {
             $objCustomAuthView = RoleEntityQtypeCustomFieldAuthorization::LoadByRoleIdEntityQtypeCustomFieldIdAuthorizationId($intRoleId, $objEntityQtypeCustomField->EntityQtypeCustomFieldId, 1);
             if ($objCustomAuthView) {
                 $chkCustomView->Checked = $objCustomAuthView->AuthorizedFlag;
             }
             $objCustomAuthEdit = RoleEntityQtypeCustomFieldAuthorization::LoadByRoleIdEntityQtypeCustomFieldIdAuthorizationId($intRoleId, $objEntityQtypeCustomField->EntityQtypeCustomFieldId, 2);
             if ($objCustomAuthEdit) {
                 $chkCustomEdit->Checked = $objCustomAuthEdit->AuthorizedFlag;
             }
         }
         $this->arrCustomChecks[] = array('name' => $objCustomField->ShortDescription . ':', 'view' => $chkCustomView, 'edit' => $chkCustomEdit);
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:49,代码来源:QFieldLevelAuthComposite.php

示例13: SetupDepreciationClass

 protected function SetupDepreciationClass()
 {
     // Lookup Object PK information from PathInfo (if applicable)
     // Set mode to Edit or New depending on what's found
     $intDepreciationClassId = QApplication::QueryString('intDepreciationClassId');
     if ($intDepreciationClassId) {
         $this->objDepreciationClass = DepreciationClass::Load($intDepreciationClassId);
         if (!$this->objDepreciationClass) {
             throw new Exception('Could not find a DepreciationClass object with PK arguments: ' . $intDepreciationClassId);
         }
         $this->blnEditMode = true;
     } else {
         $this->objDepreciationClass = new DepreciationClass();
         $this->blnEditMode = false;
     }
 }
开发者ID:jdellinger,项目名称:tracmor,代码行数:16,代码来源:depreciation_class_edit.php

示例14: __construct

 public function __construct($objParentObject, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     $this->strTemplate = __NARRO_INCLUDES__ . '/narro/panel/NarroRoleListPanel.tpl.php';
     $this->pnlRolePermissions = new NarroRolePermissionPanel($this);
     if (QApplication::QueryString('r')) {
         $this->pnlRolePermissions->Role = NarroRole::Load(QApplication::QueryString('r'));
     }
     $this->pnlRoleUsers = new NarroRoleUserListPanel($this);
     if ($this->pnlRolePermissions->Role instanceof NarroRole) {
         $this->pnlRoleUsers->Role = $this->pnlRolePermissions->Role;
     }
     switch (QApplication::QueryString('view')) {
         case 'permission':
             $this->pnlRolePermissions->Display = QDisplayStyle::Inline;
             $this->pnlRoleUsers->Display = QDisplayStyle::None;
             break;
         case 'user':
             $this->pnlRolePermissions->Display = QDisplayStyle::None;
             $this->pnlRoleUsers->Display = QDisplayStyle::Inline;
             break;
         default:
             $this->pnlRolePermissions->Display = QDisplayStyle::None;
             $this->pnlRoleUsers->Display = QDisplayStyle::None;
     }
     // Setup DataGrid Columns
     $this->colRoleName = new QDataGridColumn(t('Role'), '<?= $_CONTROL->ParentControl->dtgRole_RoleNameColumn_Render($_ITEM) ?>', array('OrderByClause' => QQ::OrderBy(QQN::NarroRole()->RoleName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::NarroRole()->RoleName, false)));
     $this->colRoleName->HtmlEntities = false;
     $this->colActions = new QDataGridColumn(t('Actions'), '<?= $_CONTROL->ParentControl->dtgRole_Actions_Render($_ITEM) ?>');
     $this->colActions->HtmlEntities = false;
     // Setup DataGrid
     $this->dtgRole = new NarroDataGrid($this);
     $this->dtgRole->Title = t('Roles');
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgRole->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgRole->SetDataBinder('dtgRole_Bind', $this);
     $this->dtgRole->AddColumn($this->colRoleName);
     $this->dtgRole->AddColumn($this->colActions);
     $this->dtgRole->SortColumnIndex = 0;
 }
开发者ID:Jobava,项目名称:narro,代码行数:47,代码来源:NarroRoleListPanel.class.php

示例15: Form_Create

 protected function Form_Create()
 {
     parent::Form_Create();
     $this->pnlTab = new QTabPanel($this);
     $this->pnlTab->UseAjax = false;
     $this->pnlRoleTab = new QTabPanel($this->pnlTab);
     $this->pnlRoleEdit = new NarroRoleEditPanel($this->pnlRoleTab, NarroRole::Load(QApplication::QueryString('rid')));
     $this->pnlRoleTab->addTab(new QPanel($this->pnlRoleTab), t('List'), NarroLink::RoleList());
     $this->pnlRoleTab->addTab($this->pnlRoleEdit, QApplication::QueryString('lid') ? t('Edit') : t('Add'));
     $this->pnlTab->addTab(new QPanel($this->pnlTab), t('Projects'), NarroLink::ProjectList());
     $this->pnlTab->addTab(new QPanel($this->pnlTab), t('Translate'), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_ALL, '', 0, 0, 10, 0, 0));
     $this->pnlTab->addTab(new QPanel($this->pnlTab), t('Languages'), NarroLink::LanguageList());
     $this->pnlTab->addTab(new QPanel($this->pnlTab), t('Users'), NarroLink::UserList());
     $this->pnlTab->addTab($this->pnlRoleTab, t('Roles'));
     $this->pnlTab->SelectedTab = 4;
     $this->pnlRoleTab->SelectedTab = 1;
     $this->pnlTab = new QTabs($this);
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::ProjectList(t('Projects'));
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_TRANSLATED, '', 0, 0, 10, 0, 0, t('Translate'));
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::Review(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Translate'));
     if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
         $pnlDummy = new QPanel($this->pnlTab);
         $arrHeaders[] = NarroLink::LanguageList(t('Languages'));
     }
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::UserList('', t('Users'));
     $this->pnlRoleTab = new QTabs($this->pnlTab);
     new QPanel($this->pnlRoleTab);
     $arrRoleHeaders[] = NarroLink::RoleList(0, '', t('List'));
     if (QApplication::HasPermissionForThisLang('Can add role')) {
         $pnlDummy = new NarroRoleEditPanel($this->pnlRoleTab, NarroRole::Load(QApplication::QueryString('rid')));
         $arrRoleHeaders[] = NarroLink::RoleEdit(null, t('Add'));
         $this->pnlRoleTab->Selected = count($arrRoleHeaders) - 1;
     }
     $this->pnlRoleTab->Headers = $arrRoleHeaders;
     $arrHeaders[] = t('Roles');
     $this->pnlTab->Selected = count($arrHeaders) - 1;
     if (QApplication::HasPermissionForThisLang('Administrator')) {
         $pnlDummy = new QPanel($this->pnlTab);
         $arrHeaders[] = NarroLink::Log('', t('Application Log'));
     }
     $this->pnlTab->Headers = $arrHeaders;
 }
开发者ID:Jobava,项目名称:narro,代码行数:46,代码来源:role.php


注:本文中的QApplication::QueryString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。