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


PHP headPublisher::getSingleton方法代码示例

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


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

示例1: render

 /**
  * Prints the ToolBar
  *
  * @param string $value
  * @return string
  */
 public function render($value)
 {
     $this->toolBar = new toolBar($this->xmlfile, $this->home);
     $template = PATH_CORE . 'templates/' . $this->type . '.html';
     $out = $this->toolBar->render($template, $scriptCode);
     $oHeadPublisher =& headPublisher::getSingleton();
     $oHeadPublisher->addScriptFile($this->toolBar->scriptURL);
     $oHeadPublisher->addScriptCode($scriptCode);
     return $out;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:16,代码来源:class.toolBar.php

示例2: render

 /**
  * render
  *
  * @param  string $value 
  *
  * @return object $out
  */
 function render($value)
 {
     $this->xmlMenu = new xmlMenu($this->xmlfile, $this->home);
     $this->xmlMenu->setValues($value);
     $this->type = 'xmlmenuDyn';
     $template = PATH_CORE . 'templates/' . $this->type . '.html';
     $out = $this->xmlMenu->render($template, $scriptCode);
     $oHeadPublisher =& headPublisher::getSingleton();
     $oHeadPublisher->addScriptFile($this->xmlMenu->scriptURL);
     $oHeadPublisher->addScriptCode($scriptCode);
     return $out;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:19,代码来源:class.xmlMenu.php

示例3: Menu

 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
$RBAC->requirePermissions("PM_SETUP", "PM_USERS");
///////
$adminSelected = null;
if (isset($_REQUEST["s"])) {
    $adminSelected = $_REQUEST["s"];
} else {
    if (isset($_SESSION["ADMIN_SELECTED"])) {
        $adminSelected = $_SESSION["ADMIN_SELECTED"];
    }
}
///////
$oHeadPublisher =& headPublisher::getSingleton();
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load("setup");
$items = array();
$menuTypes = array_unique($oMenu->Types);
foreach ($menuTypes as $i => $v) {
    if ($v == "admToolsContent") {
        unset($menuTypes[$i]);
        break;
    }
}
//sort($menuTypes);
$tabItems = array();
$i = 0;
foreach ($menuTypes as $menuType) {
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:main_init.php

示例4: _default

 private function _default()
 {
     require_once PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php';
     // put full path to Smarty.class.php
     global $G_ENABLE_BLANK_SKIN;
     //menu
     global $G_PUBLISH;
     global $G_MAIN_MENU;
     global $G_SUB_MENU;
     global $G_MENU_SELECTED;
     global $G_SUB_MENU_SELECTED;
     global $G_ID_MENU_SELECTED;
     global $G_ID_SUB_MENU_SELECTED;
     G::verifyPath(PATH_SMARTY_C, true);
     G::verifyPath(PATH_SMARTY_CACHE, true);
     $smarty = new Smarty();
     $oHeadPublisher =& headPublisher::getSingleton();
     $smarty->compile_dir = PATH_SMARTY_C;
     $smarty->cache_dir = PATH_SMARTY_CACHE;
     $smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
     //To setup en extJS Theme for this Skin
     G::LoadClass('serverConfiguration');
     $oServerConf =& serverConf::getSingleton();
     $extSkin = $oServerConf->getProperty("extSkin");
     if (!$extSkin) {
         $extSkin = array();
     }
     $extSkin[SYS_SKIN] = "xtheme-gray";
     $oServerConf->setProperty("extSkin", $extSkin);
     //End of extJS Theme setup
     if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
         $smarty->template_dir = $this->layoutFileBlank['dirname'];
         $smarty->force_compile = $this->forceTemplateCompile;
         $smarty->display($layoutFileBlank['basename']);
     } else {
         $smarty->template_dir = $this->layoutFile['dirname'];
         $meta = null;
         $header = null;
         if (preg_match("/^.*\\(.*MSIE (\\d+)\\..+\\).*\$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
             $ie = intval($arrayMatch[1]);
             if ($ie == 10) {
                 $ie = 8;
                 $meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE={$ie}\" />";
             }
         }
         if (isset($oHeadPublisher)) {
             if (defined('SYS_SYS')) {
                 $oHeadPublisher->title = isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : '';
             }
             $header = $oHeadPublisher->printHeader();
             $header .= $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
         }
         $smarty->assign("meta", $meta);
         $smarty->assign("header", $header);
         $footer = '';
         if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) {
             $freeOfChargeText = "";
             if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) {
                 $freeOfChargeText = "Supplied free of charge with no support, certification, warranty, <br>maintenance nor indemnity by Colosa and its Certified Partners.";
             }
             if (class_exists('pmLicenseManager')) {
                 $freeOfChargeText = "";
             }
             $fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
             if (file_exists($fileFooter)) {
                 $footer .= file_get_contents($fileFooter);
             } else {
                 $fileFooter = PATH_SKIN_ENGINE . SYS_SKIN . PATH_SEP . 'footer.html';
                 if (file_exists($fileFooter)) {
                     $footer .= file_get_contents($fileFooter);
                 } else {
                     $fileFooter = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
                     if (file_exists($fileFooter)) {
                         $footer .= file_get_contents($fileFooter);
                     } else {
                         $footer .= "<br />Copyright &copy; 2003-" . date('Y') . " <a href=\"http://www.colosa.com\" alt=\"Colosa, Inc.\" target=\"_blank\">Colosa, Inc.</a> All rights reserved.<br /> {$freeOfChargeText} " . "<br><br/><a href=\"http://www.processmaker.com\" alt=\"Powered by ProcessMaker - Open Source Workflow & Business Process Management (BPM) Management Software\" title=\"Powered by ProcessMaker\" target=\"_blank\"></a>";
                     }
                 }
             }
         }
         $oMenu = new Menu();
         $menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
         $smarty->assign('menus', $menus);
         $oSubMenu = new Menu();
         $subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu', $G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
         $smarty->assign('subMenus', $subMenus);
         if (!defined('NO_DISPLAY_USERNAME')) {
             define('NO_DISPLAY_USERNAME', 0);
         }
         if (NO_DISPLAY_USERNAME == 0) {
             $switch_interface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE';
             $smarty->assign('user_logged', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
             $smarty->assign('tracker', SYS_COLLECTION == 'tracker' ? $G_PUBLISH->Parts[0]['File'] != 'tracker/login' ? true : '' : '');
             $smarty->assign('switch_interface', $switch_interface);
             $smarty->assign('switch_interface_label', G::LoadTranslation('ID_SWITCH_INTERFACE'));
             $smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
             $smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
             $smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
             $smarty->assign('workspace', defined('SYS_SYS') ? SYS_SYS : '');
             $uws = isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '' ? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')) : G::LoadTranslation('ID_WORKSPACE_USING');
//.........这里部分代码省略.........
开发者ID:bqevin,项目名称:processmaker,代码行数:101,代码来源:skinEngine.php

示例5: _render

 /**
  * Prints the DynaformEditor
  *
  * @return void
  */
 public function _render()
 {
     global $G_PUBLISH;
     $script = '';
     /* Start Block: Load (Create if doesn't exist) the xmlform */
     $Parameters = array('SYS_LANG' => SYS_LANG, 'URL' => G::encrypt($this->file, URL_KEY), 'DYN_UID' => $this->dyn_uid, 'PRO_UID' => $this->pro_uid, 'DYNAFORM_NAME' => $this->dyn_title, 'FILE' => $this->file, 'DYN_EDITOR' => $this->dyn_editor);
     $_SESSION['Current_Dynafom']['Parameters'] = $Parameters;
     $XmlEditor = array('URL' => G::encrypt($this->file, URL_KEY), 'XML' => '');
     $JSEditor = array('URL' => G::encrypt($this->file, URL_KEY));
     $A = G::encrypt($this->file, URL_KEY);
     try {
         $openDoc = new Xml_Document();
         $fileName = $this->home . $this->file . '.xml';
         if (file_exists($fileName)) {
             $openDoc->parseXmlFile($fileName);
         } else {
             $this->_createDefaultXmlForm($fileName);
             $openDoc->parseXmlFile($fileName);
         }
         //$form = new Form( $this->file , $this->home, SYS_LANG, true );
         $Properties = dynaformEditorAjax::get_properties($A, $this->dyn_uid);
         /* Start Block: Prepare the XMLDB connection */
         define('DB_XMLDB_HOST', PATH_DYNAFORM . $this->file . '.xml');
         define('DB_XMLDB_USER', '');
         define('DB_XMLDB_PASS', '');
         define('DB_XMLDB_NAME', '');
         define('DB_XMLDB_TYPE', 'myxml');
         /* Start Block: Prepare the dynaformEditor */
         $G_PUBLISH = new Publisher();
         $sName = 'dynaformEditor';
         $G_PUBLISH->publisherId = $sName;
         $oHeadPublisher =& headPublisher::getSingleton();
         $oHeadPublisher->setTitle(G::LoadTranslation('ID_DYNAFORM_EDITOR') . ' - ' . $Properties['DYN_TITLE']);
         $G_PUBLISH->AddContent('blank');
         $this->panelConf['title'] = '';
         $G_PUBLISH->AddContent('panel-init', 'mainPanel', $this->panelConf);
         if ($Properties['DYN_TYPE'] == 'xmlform') {
             $G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_Toolbar', 'display:none', $Parameters, '', '');
         } else {
             $G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_ToolbarGrid', 'display:none', $Parameters, '', '');
         }
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Editor', 'display:none', $Parameters, '', '');
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_XmlEditor', 'display:none', $XmlEditor, '', '');
         $G_PUBLISH->AddContent('blank');
         $i = 0;
         $aFields = array();
         $aFields[] = array('XMLNODE_NAME' => 'char', 'TYPE' => 'char', 'UP' => 'char', 'DOWN' => 'char');
         $oSession = new DBSession(new DBConnection(PATH_DYNAFORM . $this->file . '.xml', '', '', '', 'myxml'));
         $oDataset = $oSession->Execute('SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" ) AND TYPE <> "pmconnection"');
         $iMaximun = $oDataset->count();
         while ($aRow = $oDataset->Read()) {
             $aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'], 'TYPE' => $aRow['TYPE'], 'UP' => $i > 0 ? G::LoadTranslation('ID_UP') : '', 'DOWN' => $i < $iMaximun - 1 ? G::LoadTranslation('ID_DOWN') : '', 'row__' => $i + 1);
             $i++;
             break;
         }
         global $_DBArray;
         $_DBArray['fields'] = $aFields;
         $_SESSION['_DBArray'] = $_DBArray;
         G::LoadClass('ArrayPeer');
         $oCriteria = new Criteria('dbarray');
         $oCriteria->setDBArrayTable('fields');
         /**
          * *@Erik-> this is deprecated,.
          * (unuseful) $G_PUBLISH->AddContent('propeltable', 'paged-table', 'dynaforms/fields_List', $oCriteria, $Parameters, '', SYS_URI.'dynaforms/dynaforms_PagedTableAjax');**
          */
         $G_PUBLISH->AddContent('blank');
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_JSEditor', 'display:none', $JSEditor, '', '');
     } catch (Exception $e) {
     }
     $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Properties', 'display:none', $Properties, '', '');
     //for showHide tab option @Neyek
     $G_PUBLISH->AddContent('blank');
     $G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_PREVIEW"), $sName . '[3]', 'dynaformEditor.changeToPreview', 'dynaformEditor.saveCurrentView');
     $G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_XML"), $sName . '[4]', 'dynaformEditor.changeToXmlCode', 'dynaformEditor.saveCurrentView');
     if ($Properties['DYN_TYPE'] != 'grid') {
         $G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_HTML"), $sName . '[5]', 'dynaformEditor.changeToHtmlCode', 'dynaformEditor.saveCurrentView');
     }
     $G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_FIELDS_LIST"), $sName . '[6]', 'dynaformEditor.changeToFieldsList', 'dynaformEditor.saveCurrentView');
     if ($Properties["DYN_TYPE"] != "grid") {
         $G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_JAVASCRIPTS"), $sName . '[7]', 'dynaformEditor.changeToJavascripts', 'dynaformEditor.saveCurrentView');
     }
     $G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_PROPERTIES"), $sName . '[8]', 'dynaformEditor.changeToProperties', 'dynaformEditor.saveCurrentView');
     //for showHide tab option @Neyek
     if ($Properties["DYN_TYPE"] != "grid") {
         $G_PUBLISH->AddContent("panel-tab", G::LoadTranslation("ID_CONDITIONS_EDITOR"), $sName . "[9]", "dynaformEditor.changeToShowHide", "dynaformEditor.saveShowHide");
     }
     $G_PUBLISH->AddContent('panel-close');
     $oHeadPublisher->addScriptFile("/js/maborak/core/maborak.loader.js", 2);
     $oHeadPublisher->addScriptFile('/jscore/dynaformEditor/core/dynaformEditor.js');
     //$oHeadPublisher->addScriptFile('/js/dveditor/core/dveditor.js');
     //$oHeadPublisher->addScriptFile('/codepress/codepress.js',1);
     $oHeadPublisher->addScriptFile('/js/codemirrorOld/js/codemirror.js', 1);
     $oHeadPublisher->addScriptFile('/js/grid/core/grid.js');
     $oHeadPublisher->addScriptCode('
     var DYNAFORM_URL="' . $Parameters['URL'] . '";
//.........这里部分代码省略.........
开发者ID:bqevin,项目名称:processmaker,代码行数:101,代码来源:class.dynaformEditor.php

示例6: RenderContent0

 /**
  * It Renders content according to Part['Type']
  *
  * @author Fernando Ontiveros Lira <fernando@colosa.com>
  *
  * @param intPos = 0
  * @return void
  *
  */
 public function RenderContent0($intPos = 0, $showXMLFormName = false)
 {
     global $G_FORM;
     global $G_TABLE;
     global $G_TMP_TARGET;
     global $G_OP_MENU;
     global $G_IMAGE_FILENAME;
     global $G_IMAGE_PARTS;
     global $_SESSION;
     //Changed from $HTTP_SESSION_VARS
     global $G_OBJGRAPH;
     //For graphLayout component
     $this->intPos = $intPos;
     $Part = $this->Parts[$intPos];
     $this->publishType = $Part['Type'];
     switch ($this->publishType) {
         case 'externalContent':
             $G_CONTENT = new Content();
             if ($Part['Content'] != "") {
                 $G_CONTENT = G::LoadContent($Part['Content']);
             }
             G::LoadTemplateExternal($Part['Template']);
             break;
         case 'image':
             $G_IMAGE_FILENAME = $Part['File'];
             $G_IMAGE_PARTS = $Part['Data'];
             break;
         case 'appform':
             global $APP_FORM;
             $G_FORM = $APP_FORM;
             break;
         case 'xmlform':
         case 'dynaform':
             global $G_FORM;
             if ($Part['AbsolutePath']) {
                 $sPath = $Part['AbsolutePath'];
             } else {
                 if ($this->publishType == 'xmlform') {
                     $sPath = PATH_XMLFORM;
                 } else {
                     $sPath = PATH_DYNAFORM;
                 }
             }
             //if the xmlform file doesn't exists, then try with the plugins folders
             if (!is_file($sPath . $Part['File'] . '.xml')) {
                 $aux = explode(PATH_SEP, $Part['File']);
                 //check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment
                 if (count($aux) > 2) {
                     //Subfolders
                     $filename = array_pop($aux);
                     $aux0 = implode(PATH_SEP, $aux);
                     $aux = array();
                     $aux[0] = $aux0;
                     $aux[1] = $filename;
                 }
                 if (count($aux) == 2 && defined('G_PLUGIN_CLASS')) {
                     $oPluginRegistry =& PMPluginRegistry::getSingleton();
                     if ($response = $oPluginRegistry->isRegisteredFolder($aux[0])) {
                         if ($response !== true) {
                             $sPath = PATH_PLUGINS . $response . PATH_SEP;
                         } else {
                             $sPath = PATH_PLUGINS;
                         }
                     }
                 }
             }
             if (!class_exists($Part['Template']) || $Part['Template'] === 'xmlform') {
                 $G_FORM = new Form($Part['File'], $sPath, SYS_LANG, false);
             } else {
                 eval('$G_FORM = new ' . $Part['Template'] . ' ( $Part[\'File\'] , "' . $sPath . '");');
             }
             if ($this->publishType == 'dynaform' && ($Part['Template'] == 'xmlform' || $Part['Template'] == 'xmlform_preview')) {
                 $dynaformShow = isset($G_FORM->printdynaform) && $G_FORM->printdynaform ? 'gulliver/dynaforms_OptionsPrint' : 'gulliver/dynaforms_Options';
                 $G_FORM->fields = G::array_merges(array('__DYNAFORM_OPTIONS' => new XmlForm_Field_XmlMenu(new Xml_Node('__DYNAFORM_OPTIONS', 'complete', '', array('type' => 'xmlmenu', 'xmlfile' => $dynaformShow, 'parentFormId' => $G_FORM->id)), SYS_LANG, PATH_XMLFORM, $G_FORM)), $G_FORM->fields);
             }
             //Needed to make ajax calls
             //The action in the form tag.
             if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') {
                 $G_FORM->action = urlencode(G::encrypt($Part['Target'], URL_KEY));
             } else {
                 $G_FORM->action = $Part['Target'];
             }
             if (!(isset($Part['ajaxServer']) && $Part['ajaxServer'] !== '')) {
                 if ($this->publishType == 'dynaform') {
                     $Part['ajaxServer'] = '../gulliver/defaultAjaxDynaform';
                 } else {
                     $Part['ajaxServer'] = '../gulliver/defaultAjax';
                 }
             }
             if (defined('ENABLE_ENCRYPT') && ENABLE_ENCRYPT == 'yes') {
                 $G_FORM->ajaxServer = urlencode(G::encrypt($Part['ajaxServer'], URL_KEY));
//.........这里部分代码省略.........
开发者ID:norahmollo,项目名称:processmaker,代码行数:101,代码来源:class.publisher.php

示例7: generatedDocumentsSummary

 public function generatedDocumentsSummary()
 {
     global $G_PUBLISH;
     G::loadClass('configuration');
     $oHeadPublisher =& headPublisher::getSingleton();
     $conf = new Configurations();
     $oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true);
     //adding a javascript file .js
     $oHeadPublisher->addContent('cases/casesGenerateDocumentPage');
     //adding a html file  .html.
     $oHeadPublisher->assign("FORMATS", $conf->getFormats());
     $oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
     G::RenderPage('publish', 'extJs');
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:14,代码来源:ajaxListener.php

示例8: render

 /**
  * Function render
  *
  * @author David S. Callizaya S. <davidsantos@colosa.com>
  * @access public
  * @param string values
  * @return string
  */
 public function render($values)
 {
     $html = '';
     foreach ($this->fields as $f => $v) {
         $html .= $v->render('');
     }
     $this->id = $this->owner->id . $this->name;
     $tpl = new xmlformTemplate($this, PATH_CORE . 'templates/xmlform.html');
     $this->values = $values;
     //$this->rows=count(reset($values));
     $tpl->template = $tpl->printTemplate($this);
     //In the header
     $oHeadPublisher =& headPublisher::getSingleton();
     $oHeadPublisher->addScriptFile($this->scriptURL);
     $oHeadPublisher->addScriptCode($tpl->printJavaScript($this));
     return $tpl->printObject($this);
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:25,代码来源:class.xmlform.php

示例9: eventsList

 /**
  * eventsList
  *
  * @param string $sProcessUID
  * @param string $type
  * @return boolean true
  * throw Exception $oError
  */
 public function eventsList($sProcessUID, $type)
 {
     try {
         global $G_PUBLISH;
         $G_PUBLISH = new Publisher();
         $oHeadPublisher =& headPublisher::getSingleton();
         $oHeadPublisher->addScriptFile('/jscore/events/events.js');
         switch ($type) {
             case 'message':
                 $EVN_ACTION = "SEND_MESSAGE";
                 break;
             case 'conditional':
                 $EVN_ACTION = "EXECUTE_CONDITIONAL_TRIGGER";
                 break;
             case 'multiple':
                 $EVN_ACTION = "EXECUTE_TRIGGER";
                 break;
         }
         $oCriteria = $this->getEventsCriteria($sProcessUID, $EVN_ACTION);
         $G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/eventsShortList', $oCriteria, array('PRO_UID' => $sProcessUID, 'EVN_TYPE' => $EVN_ACTION));
         G::RenderPage('publish', 'raw');
         return true;
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:34,代码来源:class.processMap.php

示例10: getHeadPublisher

 /**
  * method to get the local getHeadPublisher object
  */
 public function getHeadPublisher()
 {
     if (!is_object($this->headPublisher)) {
         $this->headPublisher = headPublisher::getSingleton();
     }
     return $this->headPublisher;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:10,代码来源:class.controller.php

示例11: renderTable

    /**
     * Function renderTable
     *
     * @author David S. Callizaya S. <davidsantos@colosa.com>
     * @param eter $block : = 'content'(Prints contentBlock only)
     * @access public
     * @return string
     */
    public function renderTable($block = '', $fields = '')
    {
        //Render Title
        $thereisnotitle = true;
        foreach ($this->fields as $r => $rval) {
            if ($this->fields[$r]['Type'] === 'title') {
                $this->title = $this->fields[$r]['Label'];
                unset($this->fields[$r]);
                $thereisnotitle = false;
            }
        }
        if ($thereisnotitle) {
            $this->title = '';
        }
        $oHeadPublisher =& headPublisher::getSingleton();
        $oHeadPublisher->addInstanceModule('leimnud', 'panel');
        $time_start = microtime(true);
        $this->prepareQuery(true);
        $time_end = microtime(true);
        $time = $time_end - $time_start;
        // verify if there are templates folders registered, template and method folders are the same
        $folderTemplate = explode('/', $this->template);
        $oPluginRegistry =& PMPluginRegistry::getSingleton();
        if ($oPluginRegistry->isRegisteredFolder($folderTemplate[0])) {
            $templateFile = PATH_PLUGINS . $this->template . '.html';
        } else {
            $templateFile = PATH_TPL . $this->template . '.html';
            // Prepare the template
        }
        $this->tpl = new TemplatePower($templateFile);
        $this->tpl->prepare();
        if (is_array($fields)) {
            foreach ($fields as $key => $val) {
                $this->tpl->assignGlobal($key, $val);
                //Changed to Global by JHL on Dec 14,2009.. then thes fields are available for all Blocks
            }
        }
        /**
         * ******** HEAD BLOCK **************
         */
        if ($block === '' || $block === 'head') {
            $this->tpl->newBlock('headBlock');
            $this->tpl->assign('pagedTable_Id', $this->id);
            $this->tpl->assign('pagedTable_Name', $this->name);
            $this->tpl->assign('pagedTable_Height', $this->xmlForm->height);
            $this->tpl->assign("title", $this->title);
            if (file_exists($this->xmlForm->home . $this->filterForm . '.xml')) {
                $filterForm = new filterForm($this->filterForm, $this->xmlForm->home);
                if ($this->menu === '') {
                    $this->menu = 'gulliver/pagedTable_Options';
                }
            }
            if (file_exists($this->xmlForm->home . $this->menu . '.xml')) {
                $menu = new xmlMenu($this->menu, $this->xmlForm->home);
                $this->tpl->newBlock('headerBlock');
                $template = PATH_CORE . 'templates' . PATH_SEP . $menu->type . '.html';
                $menu->setValues($this->xmlForm->values);
                $menu->setValues(array('PAGED_TABLE_ID' => $this->id));
                if (isset($filterForm->name)) {
                    $menu->setValues(array('SEARCH_FILTER_FORM' => $filterForm->name));
                }
                $this->tpl->assign('content', $menu->render($template, $scriptCode));
                $oHeadPublisher->addScriptFile($menu->scriptURL);
                $oHeadPublisher->addScriptCode($scriptCode);
            }
            if (file_exists($this->xmlForm->home . $this->filterForm . '.xml')) {
                $this->tpl->newBlock('headerBlock');
                $this->filterForm_Id = $filterForm->id;
                $filterForm->type = 'filterform';
                $filterForm->ajaxServer = '../gulliver/defaultAjax';
                $template = PATH_CORE . 'templates/' . $filterForm->type . '.html';
                $filterForm->setValues($this->xmlForm->values);
                $filterForm->setValues(array('PAGED_TABLE_ID' => $this->id));
                $filterForm->setValues(array('PAGED_TABLE_FAST_SEARCH' => $this->fastSearch));
                $this->tpl->assign('content', $filterForm->render($template, $scriptCode));
                $oHeadPublisher->addScriptFile($filterForm->scriptURL);
                $oHeadPublisher->addScriptCode($scriptCode);
                if (isset($_SESSION)) {
                    $_SESSION[$filterForm->id] = $filterForm->values;
                }
            }
        }
        /**
         * ******** CONTENT BLOCK **************
         */
        if ($block === '' || $block === 'content') {
            $this->tpl->newBlock('contentBlock');
            $this->tpl->assign('gridWidth', '=[' . substr($this->gridWidth, 1) . ']');
            $this->tpl->assign('fieldNames', '=[' . substr($this->gridFields, 1) . ']');
            $this->tpl->assign('ajaxUri', '="' . addslashes($this->ajaxServer) . '"');
            $this->tpl->assign('currentUri', '="' . addslashes($this->ownerPage) . '"');
            $this->tpl->assign('currentOrder', '="' . addslashes($this->orderBy) . '"');
//.........这里部分代码省略.........
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:101,代码来源:class.propelTable.php

示例12: renderTable

    /**
     * Function renderTable
     * @author David S. Callizaya S. <davidsantos@colosa.com>
     * @param $block : = 'content'(Prints contentBlock only)
     * @access public
     * @return string
     */
    function renderTable($block = '')
    {
        // DBConnection
        $this->prepareQuery();
        //Query for get the number of rows
        $this->query = $this->ses->execute($this->sql);
        $this->totRows = $this->query->count();
        $this->totpages = ceil($this->query->count() / $this->rowsPerPage);
        //Query for obtain the records
        $this->query = $this->ses->execute($this->sql . ' LIMIT ' . ($this->currentPage - 1) * $this->rowsPerPage . ', ' . $this->rowsPerPage);
        // Prepare the template
        $this->tpl = new TemplatePower(PATH_CORE . $this->template);
        $this->tpl->prepare();
        /********** HEAD BLOCK ***************/
        if ($block === '' || $block === 'head') {
            $this->tpl->newBlock('headBlock');
            $this->tpl->assign('pagedTable_Id', $this->id);
            $this->tpl->assign('pagedTable_Name', $this->name);
            $this->tpl->assign('pagedTable_Height', $this->xmlForm->height);
            if (file_exists($this->xmlForm->home . $this->filterForm . '.xml')) {
                $filterForm = new filterForm($this->filterForm, $this->xmlForm->home);
                if ($this->menu === '') {
                    $this->menu = 'gulliver/pagedTable_Options';
                }
            }
            if (file_exists($this->xmlForm->home . $this->menu . '.xml')) {
                $menu = new xmlMenu($this->menu, $this->xmlForm->home);
                $this->tpl->newBlock('headerBlock');
                $template = PATH_CORE . 'templates' . PATH_SEP . $menu->type . '.html';
                $menu->setValues($this->xmlForm->values);
                $menu->setValues(array('PAGED_TABLE_ID' => $this->id));
                $menu->setValues(array('PAGED_TABLE_FAST_SEARCH' => $this->fastSearch));
                if (isset($filterForm->name)) {
                    $menu->setValues(array('SEARCH_FILTER_FORM' => $filterForm->name));
                }
                $this->tpl->assign('content', $menu->render($template, $scriptCode));
                $oHeadPublisher =& headPublisher::getSingleton();
                $oHeadPublisher->addScriptFile($menu->scriptURL);
                $oHeadPublisher->addScriptCode($scriptCode);
            }
            if (file_exists($this->xmlForm->home . $this->filterForm . '.xml')) {
                $this->tpl->newBlock('headerBlock');
                $this->filterForm_Id = $filterForm->id;
                $filterForm->type = 'filterform';
                $filterForm->ajaxServer = '../gulliver/defaultAjax';
                $template = PATH_CORE . 'templates/' . $filterForm->type . '.html';
                $filterForm->setValues($this->xmlForm->values);
                $filterForm->setValues(array('PAGED_TABLE_ID' => $this->id));
                $filterForm->setValues(array('PAGED_TABLE_FAST_SEARCH' => $this->fastSearch));
                $this->tpl->assign('content', $filterForm->render($template, $scriptCode));
                $oHeadPublisher =& headPublisher::getSingleton();
                $oHeadPublisher->addScriptFile($filterForm->scriptURL);
                $oHeadPublisher->addScriptCode($scriptCode);
                if (isset($_SESSION)) {
                    $_SESSION[$filterForm->id] = $filterForm->values;
                }
            }
        }
        /********** CONTENT BLOCK ***************/
        if ($block === '' || $block === 'content') {
            $this->tpl->newBlock('contentBlock');
            $this->tpl->assign('gridWidth', '=[' . substr($this->gridWidth, 1) . ']');
            $this->tpl->assign('fieldNames', '=[' . substr($this->gridFields, 1) . ']');
            $this->tpl->assign('ajaxUri', '="' . addslashes($this->ajaxServer) . '"');
            $this->tpl->assign('currentUri', '="' . addslashes($this->ownerPage) . '"');
            $this->tpl->assign('currentOrder', '="' . addslashes($this->orderBy) . '"');
            $this->tpl->assign('currentPage', '=' . $this->currentPage);
            $this->tpl->assign('currentFilter', '="' . '"');
            $this->tpl->assign('totalRows', '=' . $this->query->count());
            $this->tpl->assign('rowsPerPage', '=' . $this->rowsPerPage);
            $this->tpl->assign('popupPage', '="' . addslashes($this->popupPage) . '"');
            $this->tpl->assign('popupWidth', '=' . $this->popupWidth);
            $this->tpl->assign('popupHeight', '=' . $this->popupHeight);
            $this->tpl->assign('pagedTable_Id', $this->id);
            $this->tpl->assign('pagedTable_Name', $this->name);
            $this->tpl->assign("pagedTable_JS", "{$this->id}.element=document.getElementById('pagedtable[{$this->id}]');");
            $this->renderTitle();
            //Render rows
            $gridRows = 0;
            for ($j = 0; $j < $this->query->count(); $j++) {
                $result = $this->query->read();
                $gridRows++;
                $this->tpl->newBlock("row");
                $this->tpl->assign("class", "Row" . ($j % 2 + 1));
                $this->tdStyle = '';
                $this->tdClass = '';
                foreach ($this->fields as $r => $rval) {
                    if (strcasecmp($this->fields[$r]['Type'], 'cellMark') == 0) {
                        $result1 = $result;
                        $result1['row__'] = $j + 1;
                        $this->xmlForm->setDefaultValues();
                        $this->xmlForm->setValues($result1);
                        $result1 = array_merge($this->xmlForm->values, $result1);
//.........这里部分代码省略.........
开发者ID:nshong,项目名称:processmaker,代码行数:101,代码来源:class.pagedTable.php

示例13: streamFile


//.........这里部分代码省略.........
                     require_once $filename;
                     return;
                 }
                 break;
             case 'tar':
                 G::sendHeaders($filename, 'application/x-tar', $download, $downloadFileName);
                 break;
             default:
                 //throw new Exception ( "Unknown type of file '$file'. " );
                 G::sendHeaders($filename, 'application/octet-stream', $download, $downloadFileName);
                 break;
                 break;
         }
     } else {
         if (strpos($file, 'gulliver') !== false) {
             list($path, $filename) = explode('gulliver', $file);
         }
         $_SESSION['phpFileNotFound'] = $file;
         G::header("location: /errors/error404.php?l=" . $_SERVER['REQUEST_URI']);
     }
     switch (strtolower($typefile)) {
         case "js":
             $paths = explode('/', $filename);
             $jsName = $paths[count($paths) - 1];
             $output = '';
             $pathJs = PATH_GULLIVER_HOME . PATH_SEP . 'js' . PATH_SEP;
             switch ($jsName) {
                 case 'draw2d.js':
                     $cachePath = PATH_C . 'ExtJs' . PATH_SEP;
                     $checksum = G::getCheckSum(array($pathJs . 'ext/wz_jsgraphics.js', $pathJs . 'ext/mootools.js', $pathJs . 'ext/moocanvas.js'));
                     $cf = $cachePath . "ext-draw2d-cache.{$checksum}.js";
                     $cfStored = G::getCacheFileNameByPattern($cachePath, 'ext-draw2d-cache.*.js');
                     //error_log("draw2d.js ".$checksum ."==". $cfStored['checksum']);
                     if (is_file($cfStored['filename']) && $checksum == $cfStored['checksum']) {
                         $output = file_get_contents($cf);
                     } else {
                         if (is_file($cfStored['filename'])) {
                             @unlink($cfStored['filename']);
                         }
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/wz_jsgraphics.js'));
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/mootools.js'));
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/moocanvas.js'));
                         $output .= file_get_contents($pathJs . 'ext/draw2d.js');
                         //already minified
                         file_put_contents($cf, $output);
                         //error_log("draw2d.js writting ".$cf);
                     }
                     break;
                 case 'ext-all.js':
                     $cachePath = PATH_C . 'ExtJs' . PATH_SEP;
                     $checksum = G::getCheckSum(array($pathJs . 'ext/pmos-common.js', $pathJs . 'ext/ux/miframe.js', $pathJs . 'ext/ux.locationbar/Ext.ux.LocationBar.js', $pathJs . 'ext/ux.statusbar/ext-statusbar.js', $pathJs . 'ext/ux.treefilterx/Ext.ux.tree.TreeFilterX.js'));
                     $cfStored = G::getCacheFileNameByPattern($cachePath, 'ext-all-cache.*.js');
                     $cf = PATH_C . 'ExtJs' . PATH_SEP . "ext-all-cache.{$checksum}.js";
                     if (is_file($cfStored['filename']) && $checksum == $cfStored['checksum']) {
                         $output = file_get_contents($cf);
                     } else {
                         if (is_file($cfStored['filename'])) {
                             @unlink($cfStored['filename']);
                         }
                         $output .= file_get_contents($pathJs . 'ext/ext-all.js');
                         //already minified
                         $output .= file_get_contents($pathJs . 'ext/ux/ux-all.js');
                         //already minified
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/pmos-common.js'));
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/ux/miframe.js'));
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/ux.locationbar/Ext.ux.LocationBar.js'));
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/ux.statusbar/ext-statusbar.js'));
                         $output .= JSMin::minify(file_get_contents($pathJs . 'ext/ux.treefilterx/Ext.ux.tree.TreeFilterX.js'));
                         file_put_contents($cf, $output);
                     }
                     break;
                 case 'maborak.js':
                     $oHeadPublisher =& headPublisher::getSingleton();
                     foreach ($oHeadPublisher->maborakFiles as $fileJS) {
                         //$output .= JSMin::minify ( file_get_contents ( $fileJS ) );
                         $output .= G::trimSourceCodeFile($fileJS);
                     }
                     break;
                 case 'maborak.loader.js':
                     $oHeadPublisher =& headPublisher::getSingleton();
                     foreach ($oHeadPublisher->maborakLoaderFiles as $fileJS) {
                         $output .= JSMin::minify(file_get_contents($fileJS));
                         //$output .= G::trimSourceCodeFile ($fileJS );
                     }
                     break;
                 default:
                     $output = file_get_contents($filename);
                     //$output = JSMin::minify ( file_get_contents ( $filename ) );
                     //$output = G::trimSourceCodeFile ($filename );
             }
             print $output;
             break;
         case 'css':
             //$output = JSMin::minify ( file_get_contents ( $filename) );
             print G::trimSourceCodeFile($filename);
             break;
         default:
             @readfile($filename);
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:101,代码来源:class.g.php

示例14: ini_get

<?php
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get( 'upload_max_filesize' );
$mul = substr( $UPLOAD_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize)
    $uploadMaxSize = $postMaxSize;
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'users/users', true ); //adding a javascript file .js
$oHeadPublisher->assign( 'USR_UID', $_GET['USR_UID'] );
$oHeadPublisher->assign( 'MODE', $_GET['MODE'] );
$oHeadPublisher->assign( 'MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ' );
G::RenderPage( 'publish', 'extJs' );
开发者ID:rrsc,项目名称:processmaker,代码行数:18,代码来源:usersEdit.php

示例15: loadLeimud

 public function loadLeimud()
 {
     $oHeadPublisher = headPublisher::getSingleton();
     // Defining the maborak js file, this file is the concat of many js files and here we are including all of them.
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/maborak.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/common.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/effects.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/webResource.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'dveditor/core/dveditor.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'tinymce/jscripts/tiny_mce/tiny_mce.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/tree/tree.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'json/core/json.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'form/core/form.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'form/core/pagedTable.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'grid/core/grid.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.panel.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.validator.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.app.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.rpc.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.fx.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.drag.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.drop.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.dom.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.abbr.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.dashboard.js', true);
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/js-calendar/js-calendar.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/suggest/bsn.AutoSuggest_2.1.3.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/tooltip/pmtooltip.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'thirdparty/krumo/krumo.js');
     $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/calendar/pmcalendar.js', true);
     $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'cases/core/cases.js', true);
     $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'cases/core/cases_Step.js', true);
     $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'processmap/core/processmap.js', true);
     $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'appFolder/core/appFolderList.js', true);
     $oHeadPublisher->addMaborakFile(PATH_THIRDPARTY . 'htmlarea/editor.js', true);
     //$oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . "widgets/jscalendar/lang/calendar-" . SYS_LANG . ".js");
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:37,代码来源:PmBootstrap.php


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