• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP headPublisher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: headPublisher

 function &getSingleton()
 {
     if (self::$instance == NULL) {
         self::$instance = new headPublisher();
     }
     return self::$instance;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:7,代码来源:class.headPublisher.php


示例2: 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


示例3: 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


示例4: _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


示例5: RenderContent0


//.........这里部分代码省略.........
                 }
             }
             if (isset($_SESSION)) {
                 $_SESSION[$G_FORM->id] = $G_FORM->values;
             }
             // by default load the core template
             if ($Part['Template'] == 'xmlform_preview') {
                 $Part['Template'] = 'xmlform';
             }
             $template = PATH_CORE . 'templates/' . $Part['Template'] . '.html';
             //erik: new feature, now templates such as xmlform.html can be personalized via skins
             if (defined('SYS_SKIN') && strtolower(SYS_SKIN) != 'classic') {
                 // First, verify if the template exists on Custom skins path
                 if (is_file(PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html')) {
                     $template = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html';
                     //Second, verify if the template exists on base skins path
                 } elseif (is_file(G::ExpandPath("skinEngine") . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html')) {
                     $template = G::ExpandPath("skinEngine") . SYS_SKIN . PATH_SEP . $Part['Template'] . '.html';
                 }
             }
             //end new feature
             if ($Part['Template'] == 'grid') {
                 print '<form class="formDefault">';
             }
             $scriptCode = '';
             if ($this->localMode != '') {
                 // @# las modification by erik in 09/06/2008
                 $G_FORM->mode = $this->localMode;
             }
             print $G_FORM->render($template, $scriptCode);
             if ($Part['Template'] == 'grid') {
                 print '</form>';
             }
             $oHeadPublisher =& headPublisher::getSingleton();
             $oHeadPublisher->addScriptFile($G_FORM->scriptURL);
             $oHeadPublisher->addScriptCode($scriptCode);
             /**
              * We've implemented the conditional show hide fields..
              *
              * @author Erik A. Ortiz <[email protected]>
              * @date Fri Feb 19, 2009
              */
             if ($this->publishType == 'dynaform') {
                 if (isset($_SESSION['CURRENT_DYN_UID']) || isset($_SESSION['CONDITION_DYN_UID'])) {
                     require_once "classes/model/FieldCondition.php";
                     $oFieldCondition = new FieldCondition();
                     //This dynaform has show/hide field conditions
                     if (isset($_SESSION['CURRENT_DYN_UID']) && $_SESSION['CURRENT_DYN_UID'] != '') {
                         $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($_SESSION["CURRENT_DYN_UID"]);
                         //lsl
                     } else {
                         if (isset($_SESSION['CONDITION_DYN_UID']) && $_SESSION['CONDITION_DYN_UID'] != '') {
                             $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($_SESSION["CONDITION_DYN_UID"]);
                             //lsl
                         }
                     }
                 }
             }
             if (isset($ConditionalShowHideRoutines) && $ConditionalShowHideRoutines) {
                 G::evalJScript($ConditionalShowHideRoutines);
             }
             break;
         case 'pagedtable':
             global $G_FORM;
             //if the xmlform file doesn't exists, then try with the plugins folders
             $sPath = PATH_XMLFORM;
开发者ID:norahmollo,项目名称:processmaker,代码行数:67,代码来源:class.publisher.php


示例6: 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


示例7: render

 /**
  * Function render
  *
  * @author David S. Callizaya S. <[email protected]>
  * @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


示例8: 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


示例9: exit

        exit(200);
    } else {
        include $dbfile;
    }
} else {
    exit(201);
}
G::LoadThirdParty('pear/json', 'class.json');
G::LoadThirdParty('smarty/libs', 'Smarty.class');
G::LoadSystem('xmlform');
G::LoadSystem('xmlDocument');
G::LoadSystem('form');
G::LoadSystem('headPublisher');
$counter = 1;
$t = new lime_test(13, new lime_output_color());
$obj =& headPublisher::getSingleton();
$method = array();
$testItems = 0;
$methods = get_class_methods('headPublisher');
$t->diag('class headPublisher');
$t->is(10, count($methods), "class headPublisher " . count($methods) . " methods.");
$t->isa_ok($obj, 'headPublisher', $counter++ . ' class headPublisher created');
$t->can_ok($obj, 'getSingleton', $counter++ . ' getSingleton()');
$t->can_ok($obj, 'setTitle', $counter++ . ' setTitle()');
$t->can_ok($obj, 'addScriptFile', $counter++ . ' addScriptFile()');
$t->can_ok($obj, 'addInstanceModule', $counter++ . ' addInstanceModule()');
$t->can_ok($obj, 'addClassModule', $counter++ . ' addClassModule()');
$t->can_ok($obj, 'addScriptCode', $counter++ . ' addScriptCode()');
$t->can_ok($obj, 'printHeader', $counter++ . ' printHeader()');
$t->can_ok($obj, 'printRawHeader', $counter++ . ' printRawHeader()');
$t->can_ok($obj, 'clearScripts', $counter++ . ' clearScripts()');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:classHeadPublisherTest.php


示例10: renderTable

    /**
     * Function renderTable
     *
     * @author David S. Callizaya S. <[email protected]>
     * @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


示例11: renderTable

    /**
     * Function renderTable
     * @author David S. Callizaya S. <[email protected]>
     * @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


示例12: 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


示例13: 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


示例14: 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


示例15: _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(' 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP header类代码示例发布时间:2022-05-23
下一篇:
PHP h2o类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap