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


PHP QApplication::JavaScriptArrayHighPriority方法代码示例

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


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

示例1: GetControlHtml

 protected function GetControlHtml()
 {
     $strStyle = $this->GetStyleAttributes();
     if ($strStyle) {
         $strStyle = sprintf('style="%s"', $strStyle);
     }
     $strAttributes = $this->GetAttributes();
     // Store the Output Buffer locally
     $strAlreadyRendered = ob_get_contents();
     $JavaScriptArray = QApplication::$JavaScriptArray;
     $AlertMessageArray = QApplication::$AlertMessageArray;
     $JavaScriptArrayHighPriority = QApplication::$JavaScriptArrayHighPriority;
     ob_clean();
     // Evaluate the template
     require '../common/header_menu.tpl.php';
     $strTemplateEvaluated = ob_get_contents();
     ob_clean();
     // Restore the output buffer and return evaluated template
     print $strAlreadyRendered;
     $strToReturn = sprintf('<span id="%s" %s%s>%s</span>', $this->strControlId, $strStyle, $strAttributes, $strTemplateEvaluated);
     QApplication::$JavaScriptArray = $JavaScriptArray;
     QApplication::$AlertMessageArray = $AlertMessageArray;
     QApplication::$JavaScriptArrayHighPriority = $JavaScriptArrayHighPriority;
     return $strToReturn;
 }
开发者ID:brustj,项目名称:tracmor,代码行数:25,代码来源:QHeaderMenu.class.php

示例2: RenderJavaScript

 public static function RenderJavaScript($blnOutput = true)
 {
     $strScript = '';
     foreach (QApplication::$AlertMessageArray as $strAlert) {
         $strAlert = addslashes($strAlert);
         $strScript .= sprintf('alert("%s"); ', $strAlert);
     }
     foreach (QApplication::$JavaScriptArrayHighPriority as $strJavaScript) {
         $strJavaScript = trim($strJavaScript);
         if (QString::LastCharacter($strJavaScript) != ';') {
             $strScript .= sprintf('%s; ', $strJavaScript);
         } else {
             $strScript .= sprintf('%s ', $strJavaScript);
         }
     }
     foreach (QApplication::$JavaScriptArray as $strJavaScript) {
         $strJavaScript = trim($strJavaScript);
         if (QString::LastCharacter($strJavaScript) != ';') {
             $strScript .= sprintf('%s; ', $strJavaScript);
         } else {
             $strScript .= sprintf('%s ', $strJavaScript);
         }
     }
     QApplication::$AlertMessageArray = array();
     QApplication::$JavaScriptArrayHighPriority = array();
     QApplication::$JavaScriptArray = array();
     if ($strScript) {
         if ($blnOutput) {
             _p($strScript, false);
         } else {
             return $strScript;
         }
     } else {
         return null;
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:36,代码来源:QApplicationBase.class.php

示例3: Form_Create

 protected function Form_Create()
 {
     if (QApplication::QueryString('intDownloadCsv')) {
         $this->RenderBegin(false);
         session_cache_limiter('must-revalidate');
         // force a "no cache" effect
         header("Pragma: hack");
         // IE chokes on "no cache", so set to something, anything, else.
         $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT";
         header($ExpStr);
         header('Content-Type: text/csv');
         header('Content-Disposition: csv; filename=skipped_records.csv');
         $file = fopen(sprintf("%s/%s_contact_skipped.csv", __TRACMOR_TMP__, $_SESSION['intUserAccountId']), "r");
         ob_end_clean();
         while ($row = fgets($file, 1000)) {
             print $row;
             @ob_flush();
             flush();
         }
         QApplication::$JavaScriptArray = array();
         QApplication::$JavaScriptArrayHighPriority = array();
         $this->RenderEnd(false);
         exit;
     }
     // Create the Header Menu
     $this->ctlHeaderMenu_Create();
     //$this->ctlShortcutMenu_Create();
     $this->pnlMain_Create();
     $this->pnlStepOne_Create();
     $this->Buttons_Create();
     $this->intStep = 1;
     $this->intSkippedRecordCount = 0;
     $this->blnImportEnd = true;
     $this->btnRemoveArray = array();
     $this->arrItemCustomField = array();
     $this->Labels_Create();
     $this->objDatabase = Asset::GetDatabase();
     // Load Custom Field
     foreach (CustomField::LoadArrayByActiveFlagEntity(1, EntityQtype::Contact) as $objCustomField) {
         $this->arrItemCustomField[$objCustomField->CustomFieldId] = $objCustomField;
     }
     $this->blnError = true;
     $intRoleId = QApplication::$objUserAccount->RoleId;
     $objRoleEntityQtypeBuiltInAuthorization = RoleEntityQtypeBuiltInAuthorization::LoadByRoleIdEntityQtypeIdAuthorizationId($intRoleId, EntityQtype::Contact, 2);
     // Check the user have edit permissions
     if ($objRoleEntityQtypeBuiltInAuthorization && $objRoleEntityQtypeBuiltInAuthorization->AuthorizedFlag) {
         $this->blnError = false;
     }
     if (isset($intCustomFieldIdArray) && count($intCustomFieldIdArray)) {
         //QApplication::$Database[1]->EnableProfiling();
         // Load restrict permisions for Custom Fields
         $objConditions = QQ::AndCondition(QQ::Equal(QQN::RoleEntityQtypeCustomFieldAuthorization()->RoleId, (string) $intRoleId), QQ::In(QQN::RoleEntityQtypeCustomFieldAuthorization()->EntityQtypeCustomField->CustomFieldId, $intCustomFieldIdArray), QQ::Equal(QQN::RoleEntityQtypeCustomFieldAuthorization()->AuthorizedFlag, false));
         $objClauses = array();
         array_push($objClauses, QQ::Expand(QQN::RoleEntityQtypeCustomFieldAuthorization()->EntityQtypeCustomField->EntityQtypeCustomFieldId));
         array_push($objClauses, QQ::OrderBy(QQN::RoleEntityQtypeCustomFieldAuthorization()->EntityQtypeCustomFieldId));
         $arrRoleEntityQtypeCustomFieldAuthorization = RoleEntityQtypeCustomFieldAuthorization::QueryArray($objConditions, $objClauses);
         if ($arrRoleEntityQtypeCustomFieldAuthorization) {
             foreach ($arrRoleEntityQtypeCustomFieldAuthorization as $objRoleAuth) {
                 if (array_key_exists($objRoleAuth->EntityQtypeCustomField->CustomFieldId, $this->arrAssetCustomField)) {
                     unset($this->arrAssetCustomField[$objRoleAuth->EntityQtypeCustomField->CustomFieldId]);
                 }
             }
         }
         //QApplication::$Database[1]->OutputProfiling();
     }
     $this->intUserArray = array();
     // Load Users
     foreach (UserAccount::LoadAll() as $objUser) {
         $this->intUserArray[strtolower($objUser->Username)] = $objUser->UserAccountId;
     }
     $this->strAcceptibleMimeArray = array('text/plain' => 'txt', 'text/comma-separated-values' => 'csv', 'text/csv' => 'csv', 'text/x-comma-separated-values' => 'csv', 'application/vnd.ms-excel' => 'csv', 'application/csv' => 'csv', 'text/x-csv' => 'csv');
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:72,代码来源:contact_import.php

示例4: Form_Create

 protected function Form_Create()
 {
     if (QApplication::QueryString('intDownloadCsv')) {
         $this->RenderBegin(false);
         session_cache_limiter('must-revalidate');
         // force a "no cache" effect
         header("Pragma: hack");
         // IE chokes on "no cache", so set to something, anything, else.
         $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT";
         header($ExpStr);
         header('Content-Type: text/csv');
         header('Content-Disposition: csv; filename=skipped_records.csv');
         $file = fopen(sprintf("%s%s/%s_skipped.csv", __DOCROOT__ . __SUBDIRECTORY__, __TRACMOR_TMP__, $_SESSION['intUserAccountId']), "r");
         ob_end_clean();
         while ($row = fgets($file, 1000)) {
             print $row;
             @ob_flush();
             flush();
         }
         QApplication::$JavaScriptArray = array();
         QApplication::$JavaScriptArrayHighPriority = array();
         $this->RenderEnd(false);
         exit;
     }
     // Create the Header Menu
     $this->ctlHeaderMenu_Create();
     $this->pnlMain_Create();
     $this->pnlStepOne_Create();
     $this->Buttons_Create();
     $this->intStep = 1;
     $this->intSkippedRecordCount = 0;
     $this->blnImportEnd = true;
     $this->btnRemoveArray = array();
     $this->arrAssetCustomField = array();
     $this->Labels_Create();
     $this->objDatabase = Asset::GetDatabase();
     // Load Asset Custom Field
     foreach (CustomField::LoadArrayByActiveFlagEntity(1, 1) as $objCustomField) {
         $this->arrAssetCustomField[$objCustomField->CustomFieldId] = $objCustomField;
     }
     $this->arrAssetModelCustomField = array();
     // Load Asset Model Custom Field
     foreach (CustomField::LoadArrayByActiveFlagEntity(1, 4) as $objCustomField) {
         $this->arrAssetModelCustomField[$objCustomField->CustomFieldId] = $objCustomField;
     }
     $this->intUserArray = array();
     // Load Users
     foreach (UserAccount::LoadAll() as $objUser) {
         $this->intUserArray[strtolower($objUser->Username)] = $objUser->UserAccountId;
     }
     $this->strAcceptibleMimeArray = array('text/plain' => 'txt', 'text/comma-separated-values' => 'csv', 'text/csv' => 'csv', 'text/x-comma-separated-values' => 'csv', 'application/vnd.ms-excel' => 'csv', 'application/csv' => 'csv', 'text/x-csv' => 'csv');
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:52,代码来源:asset_import.php

示例5: lblExportCsv_Click

 public function lblExportCsv_Click($strFormId, $strControlId, $strParameter)
 {
     $this->objForm->RenderCsvBegin(false);
     session_cache_limiter('must-revalidate');
     // force a "no cache" effect
     header("Pragma: hack");
     // IE chokes on "no cache", so set to something, anything, else.
     $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT";
     header($ExpStr);
     header('Content-Type: text/csv');
     header('Content-Disposition: csv; filename=export.csv');
     for ($i = 1; $i <= ceil($this->objParentControl->TotalItemCount / 200); $i++) {
         $this->objParentControl->PageNumber = $i;
         $this->objParentControl->ItemsPerPage = 200;
         $this->objParentControl->DataBind();
         if ($i == 1) {
             ob_end_clean();
             $this->PrintCsvHeader();
         }
         if ($this->objParentControl->DataSource) {
             foreach ($this->objParentControl->DataSource as $objObject) {
                 $this->PrintCsvRow($objObject);
                 @ob_flush();
                 flush();
             }
         }
         $this->ParentControl->DataSource = null;
     }
     QApplication::$JavaScriptArray = array();
     QApplication::$JavaScriptArrayHighPriority = array();
     $this->objForm->RenderCsvEnd(false);
     exit;
 }
开发者ID:brustj,项目名称:tracmor,代码行数:33,代码来源:QDataGridColumnToggle.class.php


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