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


PHP utils::GetAbsoluteUrlAppRoot方法代码示例

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


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

示例1: DisplayBareProperties

 function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array())
 {
     $aFieldsMap = parent::DisplayBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams);
     if (!$bEditMode) {
         $sUrl = utils::GetAbsoluteUrlAppRoot() . 'webservices/export-v2.php?format=spreadsheet&login_mode=basic&query=' . $this->GetKey();
         $sOql = $this->Get('oql');
         $sMessage = null;
         try {
             $oSearch = DBObjectSearch::FromOQL($sOql);
             $aParameters = $oSearch->GetQueryParams();
             foreach ($aParameters as $sParam => $val) {
                 $sUrl .= '&arg_' . $sParam . '=["' . $sParam . '"]';
             }
             $oPage->p(Dict::S('UI:Query:UrlForExcel') . ':<br/><textarea cols="80" rows="3" READONLY>' . $sUrl . '</textarea>');
             if (count($aParameters) == 0) {
                 $oBlock = new DisplayBlock($oSearch, 'list');
                 $aExtraParams = array('table_id' => 'query_preview_' . $this->getKey());
                 $sBlockId = 'block_query_preview_' . $this->GetKey();
                 // make a unique id (edition occuring in the same DOM)
                 $oBlock->Display($oPage, $sBlockId, $aExtraParams);
             }
         } catch (OQLException $e) {
             $sMessage = '<div class="message message_error" style="padding-left: 30px;"><div style="padding: 10px;">' . Dict::Format('UI:RunQuery:Error', $e->getHtmlDesc()) . '</div></div>';
             $oPage->p($sMessage);
         }
     }
     return $aFieldsMap;
 }
开发者ID:henryavila,项目名称:itop,代码行数:28,代码来源:query.class.inc.php

示例2: MakeObjectURL

 public static function MakeObjectURL($sClass, $iId)
 {
     if (strpos(MetaModel::GetConfig()->Get('portal_tickets'), $sClass) !== false) {
         $sAbsoluteUrl = utils::GetAbsoluteUrlAppRoot();
         $sUrl = "{$sAbsoluteUrl}portal/index.php?operation=details&class={$sClass}&id={$iId}";
     } else {
         $sUrl = '';
     }
     return $sUrl;
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:10,代码来源:main.itop-welcome-itil.php

示例3: GetURL

 public function GetURL()
 {
     $aOverloads = MetaModel::GetConfig()->Get('portal_dispatch_urls');
     if (array_key_exists($this->sPortalid, $aOverloads)) {
         $sRet = $aOverloads[$this->sPortalid];
     } else {
         $sRet = utils::GetAbsoluteUrlAppRoot() . $this->aData['url'];
     }
     return $sRet;
 }
开发者ID:besmirzanaj,项目名称:itop-code,代码行数:10,代码来源:portaldispatcher.class.inc.php

示例4: DisplayWizardStep

 /**
  * Displays one step of the wizard
  */
 public function DisplayWizardStep($aStep, $iStepIndex, &$iMaxInputId, &$aFieldsMap, $bFinishEnabled = false, $aArgs = array())
 {
     if ($iStepIndex == 1) {
         $this->m_oPage->add("<form method=\"post\" enctype=\"multipart/form-data\" action=\"" . utils::GetAbsoluteUrlAppRoot() . "pages/UI.php\">\n");
     }
     $this->m_oPage->add("<div class=\"wizContainer\" id=\"wizStep{$iStepIndex}\" style=\"display:none;\">\n");
     $this->m_oPage->add("<a name=\"step{$iStepIndex}\" />\n");
     $aStates = MetaModel::EnumStates($this->m_sClass);
     $aDetails = array();
     $sJSHandlerCode = '';
     // Javascript code to be executed each time this step of the wizard is entered
     foreach ($aStep as $sAttCode) {
         $oAttDef = MetaModel::GetAttributeDef($this->m_sClass, $sAttCode);
         if ($oAttDef->IsWritable()) {
             $sAttLabel = $oAttDef->GetLabel();
             $iOptions = isset($aStates[$this->m_sTargetState]['attribute_list'][$sAttCode]) ? $aStates[$this->m_sTargetState]['attribute_list'][$sAttCode] : 0;
             $aPrerequisites = $oAttDef->GetPrerequisiteAttributes();
             if ($iOptions & (OPT_ATT_MANDATORY | OPT_ATT_MUSTCHANGE | OPT_ATT_MUSTPROMPT)) {
                 $aFields[$sAttCode] = array();
                 foreach ($aPrerequisites as $sCode) {
                     $aFields[$sAttCode][$sCode] = '';
                 }
             }
             if (count($aPrerequisites) > 0) {
                 $aOptions[] = 'Prerequisites: ' . implode(', ', $aPrerequisites);
             }
             $sFieldFlag = $iOptions & (OPT_ATT_MANDATORY | OPT_ATT_MUSTCHANGE) || !$oAttDef->IsNullAllowed() ? ' <span class="hilite">*</span>' : '';
             $oDefaultValuesSet = $oAttDef->GetDefaultValue();
             // @@@ TO DO: get the object's current value if the object exists
             $sHTMLValue = cmdbAbstractObject::GetFormElementForField($this->m_oPage, $this->m_sClass, $sAttCode, $oAttDef, $oDefaultValuesSet, '', "att_{$iMaxInputId}", '', $iOptions, $aArgs);
             $aFieldsMap["att_{$iMaxInputId}"] = $sAttCode;
             $aDetails[] = array('label' => '<span title="' . $oAttDef->GetDescription() . '">' . $oAttDef->GetLabel() . $sFieldFlag . '</span>', 'value' => "<span id=\"field_att_{$iMaxInputId}\">{$sHTMLValue}</span>");
             if ($oAttDef->GetValuesDef() != null) {
                 $sJSHandlerCode .= "\toWizardHelper.RequestAllowedValues('{$sAttCode}');\n";
             }
             if ($oAttDef->GetDefaultValue() != null) {
                 $sJSHandlerCode .= "\toWizardHelper.RequestDefaultValue('{$sAttCode}');\n";
             }
             if ($oAttDef->IsLinkSet()) {
                 $sJSHandlerCode .= "\toLinkWidgetatt_{$iMaxInputId}.Init();";
             }
             $iMaxInputId++;
         }
     }
     //$aDetails[] = array('label' => '', 'value' => '<input type="button" value="Next &gt;&gt;">');
     $this->m_oPage->details($aDetails);
     $sBackButtonDisabled = $iStepIndex <= 1 ? 'disabled' : '';
     $sDisabled = $bFinishEnabled ? '' : 'disabled';
     $nbSteps = count($this->m_aWizardSteps['mandatory']) + count($this->m_aWizardSteps['optional']);
     $this->m_oPage->add("<div style=\"text-align:center\">\r\n\t\t<input type=\"button\" value=\"" . Dict::S('UI:Button:Back') . "\" {$sBackButtonDisabled} onClick=\"GoToStep({$iStepIndex}, {$iStepIndex} - 1)\" />\r\n\t\t<input type=\"button\" value=\"" . Dict::S('UI:Button:Next') . "\" onClick=\"GoToStep({$iStepIndex}, 1+{$iStepIndex})\" />\r\n\t\t<input type=\"button\" value=\"" . Dict::S('UI:Button:Finish') . "\" {$sDisabled} onClick=\"GoToStep({$iStepIndex}, 1+{$nbSteps})\" />\r\n\t\t</div>\n");
     $this->m_oPage->add_script("\r\nfunction OnEnterStep{$iStepIndex}()\r\n{\r\n\toWizardHelper.ResetQuery();\r\n\toWizardHelper.UpdateWizard();\r\n\t\r\n{$sJSHandlerCode}\r\n\r\n\toWizardHelper.AjaxQueryServer();\r\n}\r\n");
     $this->m_oPage->add("</div>\n\n");
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:56,代码来源:uiwizard.class.inc.php

示例5: GetHyperlink

 public function GetHyperlink($aExtraParams)
 {
     $sHyperlink = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?operation=new&class=' . $this->sClass;
     $aExtraParams['c[menu]'] = $this->GetMenuId();
     return $this->AddParams($sHyperlink, $aExtraParams);
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:6,代码来源:menunode.class.inc.php

示例6: GetRenderContent

 /**
  * Renders the "Actions" popup menu for the given set of objects
  * 
  * Note that the menu links containing (or ending) with a hash (#) will have their fragment
  * part (whatever is after the hash) dynamically replaced (by javascript) when the menu is
  * displayed, to correspond to the current hash/fragment in the page. This allows modifying
  * an object in with the same tab active by default as the tab that was active when selecting
  * the "Modify..." action.
  */
 public function GetRenderContent(WebPage $oPage, $aExtraParams = array(), $sId)
 {
     if ($this->m_sStyle == 'popup') {
         $this->m_sStyle = 'list';
     }
     $sHtml = '';
     $oAppContext = new ApplicationContext();
     $sContext = $oAppContext->GetForLink();
     if (!empty($sContext)) {
         $sContext = '&' . $sContext;
     }
     $sClass = $this->m_oFilter->GetClass();
     $oReflectionClass = new ReflectionClass($sClass);
     $oSet = new CMDBObjectSet($this->m_oFilter);
     $sFilter = $this->m_oFilter->serialize();
     $sFilterDesc = $this->m_oFilter->ToOql(true);
     $aActions = array();
     $sUIPage = cmdbAbstractObject::ComputeStandardUIPage($sClass);
     $sRootUrl = utils::GetAbsoluteUrlAppRoot();
     // 1:n links, populate the target object as a default value when creating a new linked object
     if (isset($aExtraParams['target_attr'])) {
         $aExtraParams['default'][$aExtraParams['target_attr']] = $aExtraParams['object_id'];
     }
     $sDefault = '';
     if (!empty($aExtraParams['default'])) {
         foreach ($aExtraParams['default'] as $sKey => $sValue) {
             $sDefault .= "&default[{$sKey}]={$sValue}";
         }
     }
     $bIsCreationAllowed = UserRights::IsActionAllowed($sClass, UR_ACTION_CREATE) == UR_ALLOWED_YES && $oReflectionClass->IsSubclassOf('cmdbAbstractObject');
     switch ($oSet->Count()) {
         case 0:
             // No object in the set, the only possible action is "new"
             if ($bIsCreationAllowed) {
                 $aActions['UI:Menu:New'] = array('label' => Dict::S('UI:Menu:New'), 'url' => "{$sRootUrl}pages/{$sUIPage}?operation=new&class={$sClass}{$sContext}{$sDefault}");
             }
             break;
         case 1:
             $oObj = $oSet->Fetch();
             $id = $oObj->GetKey();
             $bLocked = false;
             if (MetaModel::GetConfig()->Get('concurrent_lock_enabled')) {
                 $aLockInfo = iTopOwnershipLock::IsLocked(get_class($oObj), $id);
                 if ($aLockInfo['locked']) {
                     $bLocked = true;
                     //$this->AddMenuSeparator($aActions);
                     //$aActions['concurrent_lock_unlock'] = array ('label' => Dict::S('UI:Menu:ReleaseConcurrentLock'), 'url' => "{$sRootUrl}pages/$sUIPage?operation=kill_lock&class=$sClass&id=$id{$sContext}");
                 }
             }
             $bRawModifiedAllowed = UserRights::IsActionAllowed($sClass, UR_ACTION_MODIFY, $oSet) == UR_ALLOWED_YES && $oReflectionClass->IsSubclassOf('cmdbAbstractObject');
             $bIsModifyAllowed = !$bLocked && $bRawModifiedAllowed;
             $bIsDeleteAllowed = !$bLocked && UserRights::IsActionAllowed($sClass, UR_ACTION_DELETE, $oSet);
             // Just one object in the set, possible actions are "new / clone / modify and delete"
             if (!isset($aExtraParams['link_attr'])) {
                 if ($bIsModifyAllowed) {
                     $aActions['UI:Menu:Modify'] = array('label' => Dict::S('UI:Menu:Modify'), 'url' => "{$sRootUrl}pages/{$sUIPage}?operation=modify&class={$sClass}&id={$id}{$sContext}#");
                 }
                 if ($bIsCreationAllowed) {
                     $aActions['UI:Menu:New'] = array('label' => Dict::S('UI:Menu:New'), 'url' => "{$sRootUrl}pages/{$sUIPage}?operation=new&class={$sClass}{$sContext}{$sDefault}");
                 }
                 if ($bIsDeleteAllowed) {
                     $aActions['UI:Menu:Delete'] = array('label' => Dict::S('UI:Menu:Delete'), 'url' => "{$sRootUrl}pages/{$sUIPage}?operation=delete&class={$sClass}&id={$id}{$sContext}");
                 }
                 // Transitions / Stimuli
                 if (!$bLocked) {
                     $aTransitions = $oObj->EnumTransitions();
                     if (count($aTransitions)) {
                         $this->AddMenuSeparator($aActions);
                         $aStimuli = Metamodel::EnumStimuli(get_class($oObj));
                         foreach ($aTransitions as $sStimulusCode => $aTransitionDef) {
                             $iActionAllowed = get_class($aStimuli[$sStimulusCode]) == 'StimulusUserAction' ? UserRights::IsStimulusAllowed($sClass, $sStimulusCode, $oSet) : UR_ALLOWED_NO;
                             switch ($iActionAllowed) {
                                 case UR_ALLOWED_YES:
                                     $aActions[$sStimulusCode] = array('label' => $aStimuli[$sStimulusCode]->GetLabel(), 'url' => "{$sRootUrl}pages/UI.php?operation=stimulus&stimulus={$sStimulusCode}&class={$sClass}&id={$id}{$sContext}");
                                     break;
                                 default:
                                     // Do nothing
                             }
                         }
                     }
                 }
                 // Relations...
                 $aRelations = MetaModel::EnumRelationsEx($sClass);
                 if (count($aRelations)) {
                     $this->AddMenuSeparator($aActions);
                     foreach ($aRelations as $sRelationCode => $aRelationInfo) {
                         if (array_key_exists('down', $aRelationInfo)) {
                             $aActions[$sRelationCode . '_down'] = array('label' => $aRelationInfo['down'], 'url' => "{$sRootUrl}pages/{$sUIPage}?operation=swf_navigator&relation={$sRelationCode}&direction=down&class={$sClass}&id={$id}{$sContext}");
                         }
                         if (array_key_exists('up', $aRelationInfo)) {
                             $aActions[$sRelationCode . '_up'] = array('label' => $aRelationInfo['up'], 'url' => "{$sRootUrl}pages/{$sUIPage}?operation=swf_navigator&relation={$sRelationCode}&direction=up&class={$sClass}&id={$id}{$sContext}");
//.........这里部分代码省略.........
开发者ID:henryavila,项目名称:itop,代码行数:101,代码来源:displayblock.class.inc.php

示例7: ModelReflectionRuntime

     break;
 case 'add_dashlet':
     $oForm = RuntimeDashboard::GetDashletCreationForm();
     $aValues = $oForm->ReadParams();
     $sDashletClass = $aValues['dashlet_class'];
     $sMenuId = $aValues['menu_id'];
     if (is_subclass_of($sDashletClass, 'Dashlet')) {
         $oDashlet = new $sDashletClass(new ModelReflectionRuntime(), 0);
         $oDashlet->FromParams($aValues);
         ApplicationMenu::LoadAdditionalMenus();
         $index = ApplicationMenu::GetMenuIndexById($sMenuId);
         $oMenu = ApplicationMenu::GetMenuNode($index);
         $oMenu->AddDashlet($oDashlet);
         // navigate to the dashboard page
         if ($aValues['open_editor']) {
             $oPage->add_ready_script("window.location.href='" . addslashes(utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?c[menu]=' . urlencode($sMenuId)) . "&edit=1';");
             // reloads the page, doing a GET even if we arrived via a POST
         }
     }
     break;
 case 'shortcut_list_dlg':
     $sOQL = utils::ReadParam('oql', '', false, 'raw_data');
     $sTableSettings = utils::ReadParam('table_settings', '', false, 'raw_data');
     ShortcutOQL::GetCreationDlgFromOQL($oPage, $sOQL, $sTableSettings);
     break;
 case 'shortcut_list_create':
     $oForm = ShortcutOQL::GetCreationForm();
     $aValues = $oForm->ReadParams();
     $oAppContext = new ApplicationContext();
     $aContext = $oAppContext->GetAsHash();
     $sContext = serialize($aContext);
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:31,代码来源:ajax.render.php

示例8: foreach

    }
} else {
    $oSoapServer->setClass('BasicServices', null);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    CMDBObject::SetTrackOrigin('webservice-soap');
    $oSoapServer->handle();
} else {
    echo "This SOAP server can handle the following functions: ";
    $aFunctions = $oSoapServer->getFunctions();
    echo "<ul>\n";
    foreach ($aFunctions as $sFunc) {
        if ($sFunc == 'GetWSDLContents') {
            continue;
        }
        echo "<li>{$sFunc}</li>\n";
    }
    echo "</ul>\n";
    echo "<p>Here the <a href=\"{$sWsdlUri}\">WSDL file</a><p>";
    echo "You may also want to try the following service categories: ";
    echo "<ul>\n";
    foreach (get_declared_classes() as $sPHPClass) {
        if (is_subclass_of($sPHPClass, 'WebServicesBase')) {
            $sServiceCategory = $sPHPClass;
            $sSoapServerUri = utils::GetAbsoluteUrlAppRoot() . 'webservices/soapserver.php';
            $sSoapServerUri .= "?service_category={$sServiceCategory}";
            echo "<li><a href=\"{$sSoapServerUri}\">{$sServiceCategory}</a></li>\n";
        }
    }
    echo "</ul>\n";
}
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:31,代码来源:soapserver.php

示例9:

//   GNU Affero General Public License for more details.
//
//   You should have received a copy of the GNU Affero General Public License
//   along with iTop. If not, see <http://www.gnu.org/licenses/>
/**
 * ???
 *
 * @copyright   Copyright (C) 2010-2012 Combodo SARL
 * @license     http://opensource.org/licenses/AGPL-3.0
 */
require_once '../approot.inc.php';
require_once APPROOT . '/application/application.inc.php';
require_once APPROOT . '/application/startup.inc.php';
$sFullUrl = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php';
$sICOFullUrl = utils::GetAbsoluteUrlAppRoot() . '/images/iTop-icon.ico';
$sPNGFullUrl = utils::GetAbsoluteUrlAppRoot() . 'images/iTop-icon.png';
header('Content-type: text/xml');
?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>iTop</ShortName>
<Contact>webmaster@itop.com</Contact>
<Description>Search in iTop</Description>
<InputEncoding>UTF-8</InputEncoding>
<Url type="text/html" method="get" template="<?php 
echo $sFullUrl;
?>
?text={searchTerms}&amp;operation=full_text"/>
<moz:SearchForm><?php 
echo $sFullUrl;
?>
</moz:SearchForm>
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:31,代码来源:opensearch.xml.php

示例10: DisplayAttachments

    public function DisplayAttachments($oObject, WebPage $oPage, $bEditMode = false)
    {
        // Exit here if the class is not allowed
        if (!$this->IsTargetObject($oObject)) {
            return;
        }
        $oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
        $oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
        if ($this->GetAttachmentsPosition() == 'relations') {
            $sTitle = $oSet->Count() > 0 ? Dict::Format('Attachments:TabTitle_Count', $oSet->Count()) : Dict::S('Attachments:EmptyTabTitle');
            $oPage->SetCurrentTab($sTitle);
        }
        $oPage->add_style(<<<EOF
.attachment {
\tdisplay: inline-block;
\ttext-align:center;
\tfloat:left;
\tpadding:5px;\t
}
.attachment:hover {
\tbackground-color: #e0e0e0;
}
.attachment img {
\tborder: 0;
}
.attachment a {
\ttext-decoration: none;
\tcolor: #1C94C4;
}
.btn_hidden {
\tdisplay: none;
}
EOF
);
        $oPage->add('<fieldset>');
        $oPage->add('<legend>' . Dict::S('Attachments:FieldsetTitle') . '</legend>');
        if ($bEditMode) {
            $sIsDeleteEnabled = $this->m_bDeleteEnabled ? 'true' : 'false';
            $iTransactionId = $oPage->GetTransactionId();
            $sClass = get_class($oObject);
            $sTempId = session_id() . '_' . $iTransactionId;
            $sDeleteBtn = Dict::S('Attachments:DeleteBtn');
            $oPage->add_script(<<<EOF
\tfunction RemoveNewAttachment(att_id)
\t{
\t\t\$('#attachment_'+att_id).attr('name', 'removed_attachments[]');
\t\t\$('#display_attachment_'+att_id).hide();
\t\t\$('#attachment_plugin').trigger('remove_attachment', [att_id]);
\t\treturn false; // Do not submit the form !
\t}
\tfunction ajaxFileUpload()
\t{
\t\t//starting setting some animation when the ajax starts and completes
\t\t\$("#attachment_loading").ajaxStart(function(){
\t\t\t\$(this).show();
\t\t}).ajaxComplete(function(){
\t\t\t\$(this).hide();
\t\t});
\t\t
\t\t/*
\t\t\tprepareing ajax file upload
\t\t\turl: the url of script file handling the uploaded files
                        fileElementId: the file type of input element id and it will be the index of  \$_FILES Array()
\t\t\tdataType: it support json, xml
\t\t\tsecureuri:use secure protocol
\t\t\tsuccess: call back function when the ajax complete
\t\t\terror: callback function when the ajax failed
\t\t\t
                */
\t\t\$.ajaxFileUpload
\t\t(
\t\t\t{
\t\t\t\turl: GetAbsoluteUrlModulesRoot()+'itop-attachments/ajax.attachment.php?obj_class={$sClass}&temp_id={$sTempId}&operation=add', 
\t\t\t\tsecureuri:false,
\t\t\t\tfileElementId:'file',
\t\t\t\tdataType: 'json',
\t\t\t\tsuccess: function (data, status)
\t\t\t\t{
\t\t\t\t\tif(typeof(data.error) != 'undefined')
\t\t\t\t\t{
\t\t\t\t\t\tif(data.error != '')
\t\t\t\t\t\t{
\t\t\t\t\t\t\talert(data.error);
\t\t\t\t\t\t}
\t\t\t\t\t\telse
\t\t\t\t\t\t{
\t\t\t\t\t\t\tvar sDownloadLink = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?operation=download_document&class=Attachment&id='+data.att_id+'&field=contents';
\t\t\t\t\t\t\t\$('#attachments').append('<div class="attachment" id="display_attachment_'+data.att_id+'"><a href="'+sDownloadLink+'"><img src="'+data.icon+'"><br/>'+data.msg+'<input id="attachment_'+data.att_id+'" type="hidden" name="attachments[]" value="'+data.att_id+'"/></a><br/><input type="button" class="btn_hidden" value="{$sDeleteBtn}" onClick="RemoveNewAttachment('+data.att_id+');"/></div>');
\t\t\t\t\t\t\tif({$sIsDeleteEnabled})
\t\t\t\t\t\t\t{
\t\t\t\t\t\t\t\t\$('#display_attachment_'+data.att_id).hover( function() { \$(this).children(':button').toggleClass('btn_hidden'); } );
\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\$('#attachment_plugin').trigger('add_attachment', [data.att_id, data.msg]);
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t//alert(data.msg);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\terror: function (data, status, e)
\t\t\t\t{
//.........这里部分代码省略.........
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:101,代码来源:main.attachments.php

示例11: FilterByContext

     $iRuleIndex = utils::ReadParam('rule', 0);
     $oAuditCategory = MetaModel::GetObject('AuditCategory', $iCategory);
     $oDefinitionFilter = DBObjectSearch::FromOQL($oAuditCategory->Get('definition_set'));
     FilterByContext($oDefinitionFilter, $oAppContext);
     $oDefinitionSet = new CMDBObjectSet($oDefinitionFilter);
     $oFilter = GetRuleResultFilter($iRuleIndex, $oDefinitionFilter, $oAppContext);
     $oErrorObjectSet = new CMDBObjectSet($oFilter);
     $oAuditRule = MetaModel::GetObject('AuditRule', $iRuleIndex);
     $oP->add('<div class="page_header"><h1>Audit Errors: <span class="hilite">' . $oAuditRule->Get('description') . '</span></h1><img style="margin-top: -20px; margin-right: 10px; float: right;" src="../images/stop.png"/></div>');
     $oP->p('<a href="./audit.php?' . $oAppContext->GetForLink() . '">[Back to audit results]</a>');
     $sBlockId = 'audit_errors';
     $oP->p("<div id=\"{$sBlockId}\" style=\"clear:both\">\n");
     $oBlock = DisplayBlock::FromObjectSet($oErrorObjectSet, 'list');
     $oBlock->Display($oP, 1);
     $oP->p("</div>\n");
     $sExportUrl = utils::GetAbsoluteUrlAppRoot() . "pages/audit.php?operation=csv&category=" . $oAuditCategory->GetKey() . "&rule=" . $oAuditRule->GetKey();
     $oP->add_ready_script("\$('a[href*=\"pages/UI.php?operation=search\"]').attr('href', '" . $sExportUrl . "')");
     break;
 case 'audit':
 default:
     $oP->add('<div class="page_header"><h1>' . Dict::S('UI:Audit:InteractiveAudit') . '</h1><img style="margin-top: -20px; margin-right: 10px; float: right;" src="../images/clean.png"/></div>');
     $oAuditFilter = new DBObjectSearch('AuditCategory');
     $oCategoriesSet = new DBObjectSet($oAuditFilter);
     $oP->add("<table style=\"margin-top: 1em; padding: 0px; border-top: 3px solid #f6f6f1; border-left: 3px solid #f6f6f1; border-bottom: 3px solid #e6e6e1;\tborder-right: 3px solid #e6e6e1;\">\n");
     $oP->add("<tr><td>\n");
     $oP->add("<table>\n");
     $oP->add("<tr>\n");
     $oP->add("<th><img src=\"../images/minus.gif\"></th><th class=\"alignLeft\">" . Dict::S('UI:Audit:HeaderAuditRule') . "</th><th>" . Dict::S('UI:Audit:HeaderNbObjects') . "</th><th>" . Dict::S('UI:Audit:HeaderNbErrors') . "</th><th>" . Dict::S('UI:Audit:PercentageOk') . "</th>\n");
     $oP->add("</tr>\n");
     while ($oAuditCategory = $oCategoriesSet->fetch()) {
         try {
开发者ID:henryavila,项目名称:itop,代码行数:31,代码来源:audit.php

示例12: Process

 /**
  * Perform a synchronization between the data stored in the replicas (&synchro_data_xxx_xx table)
  * and the iTop objects. If the lastFullLoadStartDate is NOT specified then the full_load_periodicity
  * is used to determine which records are obsolete.
  * @return void
  */
 public function Process()
 {
     $this->PrepareLogs();
     self::$m_oCurrentTask = $this->m_oDataSource;
     try {
         $this->DoSynchronize();
         $this->m_oStatLog->Set('end_date', time());
         $this->m_oStatLog->Set('status', 'completed');
         $this->m_oStatLog->DBUpdateTracked($this->m_oChange);
         $iErrors = $this->m_oStatLog->GetErrorCount();
         if ($iErrors > 0) {
             $sIssuesOQL = "SELECT SynchroReplica WHERE sync_source_id=" . $this->m_oDataSource->GetKey() . " AND status_last_error!=''";
             $sAbsoluteUrl = utils::GetAbsoluteUrlAppRoot();
             $sIssuesURL = "{$sAbsoluteUrl}synchro/replica.php?operation=oql&datasource=" . $this->m_oDataSource->GetKey() . "&oql=" . urlencode($sIssuesOQL);
             $sSeeIssues = "<p></p>";
             $sStatistics = "<h1>Statistics</h1>\n";
             $sStatistics .= "<ul>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('start_date') . ": " . $this->m_oStatLog->Get('start_date') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('end_date') . ": " . $this->m_oStatLog->Get('end_date') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_replica_seen') . ": " . $this->m_oStatLog->Get('stats_nb_replica_seen') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_replica_total') . ": " . $this->m_oStatLog->Get('stats_nb_replica_total') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_deleted') . ": " . $this->m_oStatLog->Get('stats_nb_obj_deleted') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_deleted_errors') . ": " . $this->m_oStatLog->Get('stats_nb_obj_deleted_errors') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_obsoleted') . ": " . $this->m_oStatLog->Get('stats_nb_obj_obsoleted') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_obsoleted_errors') . ": " . $this->m_oStatLog->Get('stats_nb_obj_obsoleted_errors') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_created') . ": " . $this->m_oStatLog->Get('stats_nb_obj_created') . " (" . $this->m_oStatLog->Get('stats_nb_obj_created_warnings') . " warnings)" . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_created_errors') . ": " . $this->m_oStatLog->Get('stats_nb_obj_created_errors') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_updated') . ": " . $this->m_oStatLog->Get('stats_nb_obj_updated') . " (" . $this->m_oStatLog->Get('stats_nb_obj_updated_warnings') . " warnings)" . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_updated_errors') . ": " . $this->m_oStatLog->Get('stats_nb_obj_updated_errors') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_replica_reconciled_errors') . ": " . $this->m_oStatLog->Get('stats_nb_replica_reconciled_errors') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_replica_disappeared_no_action') . ": " . $this->m_oStatLog->Get('stats_nb_replica_disappeared_no_action') . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_new_updated') . ": " . $this->m_oStatLog->Get('stats_nb_obj_new_updated') . " (" . $this->m_oStatLog->Get('stats_nb_obj_new_updated_warnings') . " warnings)" . "</li>\n";
             $sStatistics .= "<li>" . $this->m_oStatLog->GetLabel('stats_nb_obj_new_unchanged') . ": " . $this->m_oStatLog->Get('stats_nb_obj_new_unchanged') . " (" . $this->m_oStatLog->Get('stats_nb_obj_new_unchanged_warnings') . " warnings)" . "</li>\n";
             $sStatistics .= "</ul>\n";
             $this->m_oDataSource->SendNotification("errors ({$iErrors})", "<p>The synchronization has been executed, {$iErrors} errors have been encountered. Click <a href=\"{$sIssuesURL}\">here</a> to see the records being currently in error.</p>" . $sStatistics);
         } else {
             //$this->m_oDataSource->SendNotification('success', '<p>The synchronization has been successfully executed.</p>');
         }
     } catch (SynchroExceptionNotStarted $e) {
         // Set information for reporting... but delete the object in DB
         $this->m_oStatLog->Set('end_date', time());
         $this->m_oStatLog->Set('status', 'error');
         $this->m_oStatLog->Set('last_error', $e->getMessage());
         $this->m_oStatLog->DBDeleteTracked($this->m_oChange);
         $this->m_oDataSource->SendNotification('fatal error', '<p>The synchronization could not start: \'' . $e->getMessage() . '\'</p><p>Please check its configuration</p>');
     } catch (Exception $e) {
         $this->m_oStatLog->Set('end_date', time());
         $this->m_oStatLog->Set('status', 'error');
         $this->m_oStatLog->Set('last_error', $e->getMessage());
         $this->m_oStatLog->DBUpdateTracked($this->m_oChange);
         $this->m_oDataSource->SendNotification('exception', '<p>The synchronization has been interrupted: \'' . $e->getMessage() . '\'</p><p>Please contact the application support team</p>');
     }
     self::$m_oCurrentTask = null;
     return $this->m_oStatLog;
 }
开发者ID:kira8565,项目名称:ITOP203-ZHCN,代码行数:61,代码来源:synchrodatasource.class.inc.php

示例13: DoBulkModify

 /**
  * Process the reply made from a form built with DisplayBulkModifyForm
  */
 public static function DoBulkModify($oP, $sClass, $aSelectedObj, $sCustomOperation, $bPreview, $sCancelUrl, $aContextData = array())
 {
     $aHeaders = array('form::select' => array('label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList:not(:disabled)', this.checked);\"></input>", 'description' => Dict::S('UI:SelectAllToggle+')), 'object' => array('label' => MetaModel::GetName($sClass), 'description' => Dict::S('UI:ModifiedObject')), 'status' => array('label' => Dict::S('UI:BulkModifyStatus'), 'description' => Dict::S('UI:BulkModifyStatus+')), 'errors' => array('label' => Dict::S('UI:BulkModifyErrors'), 'description' => Dict::S('UI:BulkModifyErrors+')));
     $aRows = array();
     $oP->add("<div class=\"page_header\">\n");
     $oP->add("<h1>" . MetaModel::GetClassIcon($sClass) . "&nbsp;" . Dict::Format('UI:Modify_N_ObjectsOf_Class', count($aSelectedObj), MetaModel::GetName($sClass)) . "</h1>\n");
     $oP->add("</div>\n");
     $oP->set_title(Dict::Format('UI:Modify_N_ObjectsOf_Class', count($aSelectedObj), $sClass));
     if (!$bPreview) {
         // Not in preview mode, do the update for real
         $sTransactionId = utils::ReadPostedParam('transaction_id', '');
         if (!utils::IsTransactionValid($sTransactionId, false)) {
             throw new Exception(Dict::S('UI:Error:ObjectAlreadyUpdated'));
         }
         utils::RemoveTransaction($sTransactionId);
     }
     $iPreviousTimeLimit = ini_get('max_execution_time');
     $iLoopTimeLimit = MetaModel::GetConfig()->Get('max_execution_time_per_loop');
     foreach ($aSelectedObj as $iId) {
         set_time_limit($iLoopTimeLimit);
         $oObj = MetaModel::GetObject($sClass, $iId);
         $aErrors = $oObj->UpdateObjectFromPostedForm('');
         $bResult = count($aErrors) == 0;
         if ($bResult) {
             list($bResult, $aErrors) = $oObj->CheckToWrite(true);
         }
         if ($bPreview) {
             $sStatus = $bResult ? Dict::S('UI:BulkModifyStatusOk') : Dict::S('UI:BulkModifyStatusError');
         } else {
             $sStatus = $bResult ? Dict::S('UI:BulkModifyStatusModified') : Dict::S('UI:BulkModifyStatusSkipped');
         }
         $sCSSClass = $bResult ? HILIGHT_CLASS_NONE : HILIGHT_CLASS_CRITICAL;
         $sChecked = $bResult ? 'checked' : '';
         $sDisabled = $bResult ? '' : 'disabled';
         $aRows[] = array('form::select' => "<input type=\"checkbox\" class=\"selectList\" {$sChecked} {$sDisabled}\"></input>", 'object' => $oObj->GetHyperlink(), 'status' => $sStatus, 'errors' => '<p>' . ($bResult ? '' : implode('</p><p>', $aErrors)) . '</p>', '@class' => $sCSSClass);
         if ($bResult && !$bPreview) {
             $oObj->DBUpdate();
         }
     }
     set_time_limit($iPreviousTimeLimit);
     $oP->Table($aHeaders, $aRows);
     if ($bPreview) {
         $sFormAction = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php';
         // No parameter in the URL, the only parameter will be the ones passed through the form
         // Form to submit:
         $oP->add("<form method=\"post\" action=\"{$sFormAction}\" enctype=\"multipart/form-data\">\n");
         $aDefaults = utils::ReadParam('default', array());
         $oAppContext = new ApplicationContext();
         $oP->add($oAppContext->GetForForm());
         foreach ($aContextData as $sKey => $value) {
             $oP->add("<input type=\"hidden\" name=\"{$sKey}\" value=\"{$value}\">\n");
         }
         $oP->add("<input type=\"hidden\" name=\"operation\" value=\"{$sCustomOperation}\">\n");
         $oP->add("<input type=\"hidden\" name=\"class\" value=\"{$sClass}\">\n");
         $oP->add("<input type=\"hidden\" name=\"preview_mode\" value=\"0\">\n");
         $oP->add("<input type=\"hidden\" name=\"transaction_id\" value=\"" . utils::GetNewTransactionId() . "\">\n");
         $oP->add("<button type=\"button\" class=\"action cancel\" onClick=\"window.location.href='{$sCancelUrl}'\">" . Dict::S('UI:Button:Cancel') . "</button>&nbsp;&nbsp;&nbsp;&nbsp;\n");
         $oP->add("<button type=\"submit\" class=\"action\"><span>" . Dict::S('UI:Button:ModifyAll') . "</span></button>\n");
         foreach ($_POST as $sKey => $value) {
             if (preg_match('/attr_(.+)/', $sKey, $aMatches)) {
                 // Beware: some values (like durations) are passed as arrays
                 if (is_array($value)) {
                     foreach ($value as $vKey => $vValue) {
                         $oP->add("<input type=\"hidden\" name=\"{$sKey}[{$vKey}]\" value=\"" . htmlentities($vValue, ENT_QUOTES, 'UTF-8') . "\">\n");
                     }
                 } else {
                     $oP->add("<input type=\"hidden\" name=\"{$sKey}\" value=\"" . htmlentities($value, ENT_QUOTES, 'UTF-8') . "\">\n");
                 }
             }
         }
         $oP->add("</form>\n");
     } else {
         $oP->add("<button type=\"button\" onClick=\"window.location.href='{$sCancelUrl}'\" class=\"action\"><span>" . Dict::S('UI:Button:Done') . "</span></button>\n");
     }
 }
开发者ID:besmirzanaj,项目名称:itop-code,代码行数:78,代码来源:cmdbabstract.class.inc.php

示例14: Display

    /**
     * Display the graph inside the given page, with the "filter" drawer above it
     * @param WebPage $oP
     * @param hash $aResults
     * @param string $sRelation
     * @param ApplicationContext $oAppContext
     * @param array $aExcludedObjects
     */
    function Display(WebPage $oP, $aResults, $sRelation, ApplicationContext $oAppContext, $aExcludedObjects = array(), $sObjClass = null, $iObjKey = null, $sContextKey, $aContextParams = array())
    {
        $aContextDefs = static::GetContextDefinitions($sContextKey, true, $aContextParams);
        $aExcludedByClass = array();
        foreach ($aExcludedObjects as $oObj) {
            if (!array_key_exists(get_class($oObj), $aExcludedByClass)) {
                $aExcludedByClass[get_class($oObj)] = array();
            }
            $aExcludedByClass[get_class($oObj)][] = $oObj->GetKey();
        }
        $oP->add("<div class=\"not-printable\">\n");
        $oP->add("<div id=\"ds_flash\" class=\"SearchDrawer\" style=\"display:none;\">\n");
        if (!$oP->IsPrintableVersion()) {
            $oP->add_ready_script(<<<EOF
\t\$( "#tabbedContent_0" ).tabs({ heightStyle: "fill" });
EOF
);
        }
        $oP->add_ready_script(<<<EOF
\t\$("#dh_flash").click( function() {
\t\t\$("#ds_flash").slideToggle('normal', function() { \$("#ds_flash").parent().resize(); \$("#dh_flash").trigger('toggle_complete'); } );
\t\t\$("#dh_flash").toggleClass('open');
\t});
    \$('#ReloadMovieBtn').button().button('disable');
EOF
);
        $aSortedElements = array();
        foreach ($aResults as $sClassIdx => $aObjects) {
            foreach ($aObjects as $oCurrObj) {
                $sSubClass = get_class($oCurrObj);
                $aSortedElements[$sSubClass] = MetaModel::GetName($sSubClass);
            }
        }
        asort($aSortedElements);
        $idx = 0;
        foreach ($aSortedElements as $sSubClass => $sClassName) {
            $oP->add("<span style=\"padding-right:2em; white-space:nowrap;\"><input type=\"checkbox\" id=\"exclude_{$idx}\" name=\"excluded[]\" value=\"{$sSubClass}\" checked onChange=\"\$('#ReloadMovieBtn').button('enable')\"><label for=\"exclude_{$idx}\">&nbsp;" . MetaModel::GetClassIcon($sSubClass) . "&nbsp;{$sClassName}</label></span> ");
            $idx++;
        }
        $oP->add("<p style=\"text-align:right\"><button type=\"button\" id=\"ReloadMovieBtn\" onClick=\"DoReload()\">" . Dict::S('UI:Button:Refresh') . "</button></p>");
        $oP->add("</div>\n");
        $oP->add("<div class=\"HRDrawer\"></div>\n");
        $oP->add("<div id=\"dh_flash\" class=\"DrawerHandle\">" . Dict::S('UI:ElementsDisplayed') . "</div>\n");
        $oP->add("</div>\n");
        // class="not-printable"
        $aAdditionalContexts = array();
        foreach ($aContextDefs as $sKey => $aDefinition) {
            $aAdditionalContexts[] = array('key' => $sKey, 'label' => Dict::S($aDefinition['dict']), 'oql' => $aDefinition['oql'], 'default' => array_key_exists('default', $aDefinition) && $aDefinition['default'] == 'yes');
        }
        $sDirection = utils::ReadParam('d', 'horizontal');
        $iGroupingThreshold = utils::ReadParam('g', 5);
        $oP->add_linked_script(utils::GetAbsoluteUrlAppRoot() . 'js/fraphael.js');
        $oP->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot() . 'css/jquery.contextMenu.css');
        $oP->add_linked_script(utils::GetAbsoluteUrlAppRoot() . 'js/jquery.contextMenu.js');
        $oP->add_linked_script(utils::GetAbsoluteUrlAppRoot() . 'js/simple_graph.js');
        try {
            $this->InitFromGraphviz();
            $sExportAsPdfURL = '';
            $sExportAsPdfURL = utils::GetAbsoluteUrlAppRoot() . 'pages/ajax.render.php?operation=relation_pdf&relation=' . $sRelation . '&direction=' . ($this->bDirectionDown ? 'down' : 'up');
            $oAppcontext = new ApplicationContext();
            $sContext = $oAppContext->GetForLink();
            $sDrillDownURL = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?operation=details&class=%1$s&id=%2$s&' . $sContext;
            $sExportAsDocumentURL = utils::GetAbsoluteUrlAppRoot() . 'pages/ajax.render.php?operation=relation_attachment&relation=' . $sRelation . '&direction=' . ($this->bDirectionDown ? 'down' : 'up');
            $sLoadFromURL = utils::GetAbsoluteUrlAppRoot() . 'pages/ajax.render.php?operation=relation_json&relation=' . $sRelation . '&direction=' . ($this->bDirectionDown ? 'down' : 'up');
            $sAttachmentExportTitle = '';
            if ($sObjClass != null && $iObjKey != null) {
                $oTargetObj = MetaModel::GetObject($sObjClass, $iObjKey, false);
                if ($oTargetObj) {
                    $sAttachmentExportTitle = Dict::Format('UI:Relation:AttachmentExportOptions_Name', $oTargetObj->GetName());
                }
            }
            $sId = 'graph';
            $sStyle = '';
            if ($oP->IsPrintableVersion()) {
                // Optimize for printing on A4/Letter vertically
                $sStyle = 'margin-left:auto; margin-right:auto;';
                $oP->add_ready_script("\$('.simple-graph').width(18/2.54*96).resizable({ stop: function() { \$(window).trigger('resized'); }});");
                // Default width about 18 cm, since most browsers assume 96 dpi
            }
            $oP->add('<div id="' . $sId . '" class="simple-graph" style="' . $sStyle . '"></div>');
            $aParams = array('source_url' => $sLoadFromURL, 'sources' => $this->bDirectionDown ? $this->aSourceObjects : $this->aSinkObjects, 'excluded' => $aExcludedByClass, 'grouping_threshold' => $iGroupingThreshold, 'export_as_pdf' => array('url' => $sExportAsPdfURL, 'label' => Dict::S('UI:Relation:ExportAsPDF')), 'export_as_attachment' => array('url' => $sExportAsDocumentURL, 'label' => Dict::S('UI:Relation:ExportAsAttachment'), 'obj_class' => $sObjClass, 'obj_key' => $iObjKey), 'drill_down' => array('url' => $sDrillDownURL, 'label' => Dict::S('UI:Relation:DrillDown')), 'labels' => array('export_pdf_title' => Dict::S('UI:Relation:PDFExportOptions'), 'export_as_attachment_title' => $sAttachmentExportTitle, 'export' => Dict::S('UI:Button:Export'), 'cancel' => Dict::S('UI:Button:Cancel'), 'title' => Dict::S('UI:RelationOption:Title'), 'untitled' => Dict::S('UI:RelationOption:Untitled'), 'include_list' => Dict::S('UI:RelationOption:IncludeList'), 'comments' => Dict::S('UI:RelationOption:Comments'), 'grouping_threshold' => Dict::S('UI:RelationOption:GroupingThreshold'), 'refresh' => Dict::S('UI:Button:Refresh'), 'check_all' => Dict::S('UI:SearchValue:CheckAll'), 'uncheck_all' => Dict::S('UI:SearchValue:UncheckAll'), 'none_selected' => Dict::S('UI:Relation:NoneSelected'), 'nb_selected' => Dict::S('UI:SearchValue:NbSelected'), 'additional_context_info' => Dict::S('UI:Relation:AdditionalContextInfo'), 'zoom' => Dict::S('UI:Relation:Zoom'), 'loading' => Dict::S('UI:Loading')), 'page_format' => array('label' => Dict::S('UI:Relation:PDFExportPageFormat'), 'values' => array('A3' => Dict::S('UI:PageFormat_A3'), 'A4' => Dict::S('UI:PageFormat_A4'), 'Letter' => Dict::S('UI:PageFormat_Letter'))), 'page_orientation' => array('label' => Dict::S('UI:Relation:PDFExportPageOrientation'), 'values' => array('P' => Dict::S('UI:PageOrientation_Portrait'), 'L' => Dict::S('UI:PageOrientation_Landscape'))), 'additional_contexts' => $aAdditionalContexts, 'context_key' => $sContextKey);
            if (!extension_loaded('gd')) {
                // PDF export requires GD
                unset($aParams['export_as_pdf']);
            }
            if (!extension_loaded('gd') || is_null($sObjClass) || is_null($iObjKey)) {
                // Export as Attachment requires GD (for building the PDF) AND a valid objclass/objkey couple
                unset($aParams['export_as_attachment']);
            }
            $oP->add_ready_script("\$('#{$sId}').simple_graph(" . json_encode($aParams) . ");");
        } catch (Exception $e) {
            $oP->add('<div>' . $e->getMessage() . '</div>');
//.........这里部分代码省略.........
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:101,代码来源:displayablegraph.class.inc.php

示例15: OnMenuCreation

 public static function OnMenuCreation()
 {
     global $__comp_menus__;
     // ensure that the global variable is indeed global !
     $__comp_menus__['DataAdministration'] = new MenuGroup('DataAdministration', 70, 'Organization', UR_ACTION_MODIFY, UR_ALLOWED_YES);
     $__comp_menus__['CSVImport'] = new WebPageMenuNode('CSVImport', utils::GetAbsoluteUrlAppRoot() . "pages/csvimport.php", $__comp_menus__['DataAdministration']->GetIndex(), 10);
     $__comp_menus__['Audit'] = new WebPageMenuNode('Audit', utils::GetAbsoluteUrlAppRoot() . "pages/audit.php", $__comp_menus__['DataAdministration']->GetIndex(), 33);
     $__comp_menus__['Catalogs'] = new TemplateMenuNode('Catalogs', '', $__comp_menus__['DataAdministration']->GetIndex(), 50);
     $__comp_menus__['Organization'] = new OQLMenuNode('Organization', "SELECT Organization", $__comp_menus__['Catalogs']->GetIndex(), 10, true);
     $__comp_menus__['ConfigManagement'] = new MenuGroup('ConfigManagement', 20);
     $__comp_menus__['ConfigManagementOverview'] = new DashboardMenuNode('ConfigManagementOverview', dirname(__FILE__) . '/configmanagementoverview_dashboard_menu.xml', $__comp_menus__['ConfigManagement']->GetIndex(), 1);
     $__comp_menus__['Contact'] = new DashboardMenuNode('Contact', dirname(__FILE__) . '/contact_dashboard_menu.xml', $__comp_menus__['ConfigManagement']->GetIndex(), 2);
     $__comp_menus__['NewContact'] = new NewObjectMenuNode('NewContact', 'Contact', $__comp_menus__['Contact']->GetIndex(), 3);
     $__comp_menus__['SearchContacts'] = new SearchMenuNode('SearchContacts', 'Contact', $__comp_menus__['Contact']->GetIndex(), 4);
     $__comp_menus__['Location'] = new OQLMenuNode('Location', "SELECT Location", $__comp_menus__['ConfigManagement']->GetIndex(), 3, true);
     $__comp_menus__['NewCI'] = new NewObjectMenuNode('NewCI', 'FunctionalCI', $__comp_menus__['ConfigManagement']->GetIndex(), 4);
     $__comp_menus__['SearchCIs'] = new SearchMenuNode('SearchCIs', 'FunctionalCI', $__comp_menus__['ConfigManagement']->GetIndex(), 5);
     $__comp_menus__['Document'] = new OQLMenuNode('Document', "SELECT Document", $__comp_menus__['ConfigManagement']->GetIndex(), 6, true);
     $__comp_menus__['Software'] = new OQLMenuNode('Software', "SELECT Software", $__comp_menus__['ConfigManagement']->GetIndex(), 7, true);
     $__comp_menus__['Group'] = new OQLMenuNode('Group', "SELECT Group", $__comp_menus__['ConfigManagement']->GetIndex(), 8, true);
     $__comp_menus__['Typology'] = new DashboardMenuNode('Typology', dirname(__FILE__) . '/typology_dashboard_menu.xml', $__comp_menus__['Catalogs']->GetIndex(), 80);
 }
开发者ID:leandroborgeseng,项目名称:bhtm,代码行数:22,代码来源:model.itop-config-mgmt.php


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