renderTime() public static method

public static renderTime ( $section, $description = null )
コード例 #1
0
 public function init()
 {
     parent::__construct();
     iaSystem::renderTime('main', 'beforeSmartyFuncInit');
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'captcha', array(__CLASS__, 'captcha'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_wysiwyg', array(__CLASS__, 'ia_wysiwyg'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_add_media', array(__CLASS__, 'ia_add_media'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_print_css', array(__CLASS__, 'ia_print_css'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_print_js', array(__CLASS__, 'ia_print_js'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_print_title', array(__CLASS__, 'ia_print_title'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_page_url', array(__CLASS__, 'ia_page_url'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'lang', array(__CLASS__, 'lang'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'preventCsrf', array(__CLASS__, 'preventCsrf'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'printImage', array(__CLASS__, 'printImage'));
     $this->registerPlugin(self::PLUGIN_BLOCK, 'access', array(__CLASS__, 'access'));
     $this->registerPlugin(self::PLUGIN_BLOCK, 'ia_add_js', array(__CLASS__, 'ia_add_js'));
     $iaCore = iaCore::instance();
     if (iaCore::ACCESS_FRONT == $iaCore->getAccessType()) {
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'accountActions', array(__CLASS__, 'accountActions'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'accordion', array(__CLASS__, 'accordion'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'arrayToLang', array(__CLASS__, 'arrayToLang'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_blocks', array(__CLASS__, 'ia_blocks'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_block_view', array(__CLASS__, 'ia_block_view'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_url', array(__CLASS__, 'ia_url'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'navigation', array(__CLASS__, 'pagination'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'printFavorites', array(__CLASS__, 'printFavorites'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'width', array(__CLASS__, 'width'));
         $this->registerPlugin(self::PLUGIN_BLOCK, 'ia_block', array(__CLASS__, 'ia_block'));
     }
     // uncomment this to get rid of useless whitespaces in html
     // $this->loadFilter('output', 'trimwhitespace');
     $iaCore->startHook('phpSmartyAfterFuncInit', array('iaSmarty' => &$this));
 }
コード例 #2
0
 public function init()
 {
     parent::__construct();
     iaSystem::renderTime('main', 'beforeSmartyFuncInit');
     $this->iaCore = iaCore::instance();
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'captcha', array(__CLASS__, 'captcha'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_wysiwyg', array(__CLASS__, 'ia_wysiwyg'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_add_media', array(__CLASS__, 'ia_add_media'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_print_css', array(__CLASS__, 'ia_print_css'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_print_js', array(__CLASS__, 'ia_print_js'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_print_title', array(__CLASS__, 'ia_print_title'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_page_url', array(__CLASS__, 'ia_page_url'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'lang', array(__CLASS__, 'lang'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'preventCsrf', array(__CLASS__, 'preventCsrf'));
     $this->registerPlugin(self::PLUGIN_FUNCTION, 'printImage', array(__CLASS__, 'printImage'));
     $this->registerPlugin(self::PLUGIN_BLOCK, 'access', array(__CLASS__, 'access'));
     $this->registerPlugin(self::PLUGIN_BLOCK, 'ia_add_js', array(__CLASS__, 'ia_add_js'));
     $iaCore = iaCore::instance();
     if (iaCore::ACCESS_FRONT == $iaCore->getAccessType()) {
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'accountActions', array(__CLASS__, 'accountActions'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'arrayToLang', array(__CLASS__, 'arrayToLang'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_blocks', array(__CLASS__, 'ia_blocks'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_block_view', array(__CLASS__, 'ia_block_view'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'ia_url', array(__CLASS__, 'ia_url'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'navigation', array(__CLASS__, 'pagination'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'printFavorites', array(__CLASS__, 'printFavorites'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'width', array(__CLASS__, 'width'));
         $this->registerPlugin(self::PLUGIN_FUNCTION, 'displayTreeNodes', array(__CLASS__, 'displayTreeNodes'));
         $this->registerPlugin(self::PLUGIN_BLOCK, 'ia_block', array(__CLASS__, 'ia_block'));
     }
     // uncomment this to get rid of useless whitespaces in html
     // $this->loadFilter('output', 'trimwhitespace');
     $iaCore->startHook('phpSmartyAfterFuncInit', array('iaSmarty' => &$this));
     iaSystem::renderTime('main', 'afterSmartyFuncInit');
     $this->assign('tabs_content', array());
     $this->assign('tabs_before', array());
     $this->assign('tabs_after', array());
     $this->assign('fieldset_before', array());
     $this->assign('fieldset_after', array());
     $this->assign('field_before', array());
     $this->assign('field_after', array());
     $this->resources['subrion'] = 'text:Loading Subrion Awesome Stuff..., js:intelli/intelli, js:_IA_URL_tmp/cache/intelli.config, ' . (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType() ? 'js:_IA_TPL_bootstrap.min, js:bootstrap/js/bootstrap-switch.min, js:bootstrap/js/passfield.min, js:intelli/intelli.admin, js:admin/footer, css:_IA_URL_js/bootstrap/css/passfield' : 'js:intelli/intelli.minmax, js:frontend/footer') . ',js:_IA_URL_tmp/cache/intelli' . (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType() ? '.admin' : '') . '.lang.' . $this->iaCore->iaView->language;
     $this->resources['extjs'] = 'text:Loading ExtJS..., css:_IA_URL_js/extjs/resources/ext-theme-neptune/ext-theme-neptune-all' . ($this->iaCore->get('sap_style') ? '-' . $this->iaCore->get('sap_style') : '') . ', js:extjs/ext-all';
     $this->resources['datepicker'] = 'js:bootstrap/js/datepicker/bootstrap-datepicker, js:bootstrap/js/datepicker/locales/bootstrap-datepicker.' . $this->iaCore->get('lang') . ', css:_IA_URL_js/bootstrap/css/datepicker3';
     $this->iaCore->startHook('phpSmartyAfterMediaInit', array('iaSmarty' => &$this));
 }
コード例 #3
0
function smarty_function_ia_hooker($params, &$smarty)
{
    if (!isset($params['name'])) {
        return;
    }
    $name = $params['name'];
    iaDebug::debug('smarty', $name, 'hooks');
    iaSystem::renderTime('smarty', $name);
    $iaCore = iaCore::instance();
    $hooks = $iaCore->getHooks();
    if (!array_key_exists($name, $hooks) || empty($hooks[$name])) {
        return;
    }
    foreach ($hooks[$name] as $hook) {
        $hook['type'] = in_array($hook['type'], array('php', 'html', 'plain', 'smarty')) ? $hook['type'] : 'php';
        if (empty($hook['pages']) || in_array($iaCore->iaView->name(), $hook['pages'])) {
            if ($hook['filename']) {
                switch ($hook['type']) {
                    case 'php':
                        if (file_exists(IA_HOME . $hook['filename'])) {
                            include IA_HOME . $hook['filename'];
                        }
                        break;
                    case 'smarty':
                        echo $smarty->fetch(IA_HOME . $hook['filename']);
                }
            } else {
                switch ($hook['type']) {
                    case 'php':
                        eval($hook['code']);
                        break;
                    case 'smarty':
                        echo $smarty->fetch('eval:' . $hook['code']);
                        break;
                    case 'html':
                        echo $hook['code'];
                        break;
                    case 'plain':
                        echo iaSanitize::html($hook['code']);
                }
            }
        }
    }
}
コード例 #4
0
ファイル: ia.debug.php プロジェクト: kamilklkn/subrion
 public function __construct()
 {
     iaSystem::renderTime('end');
     $debug = self::STATE_OPENED;
     if (isset($_COOKIE['debug'])) {
         if (self::STATE_CLOSED == $_COOKIE['debug']) {
             $debug = self::STATE_CLOSED;
         }
     }
     $this->_debugCss();
     echo '<div id="debug-toggle"><a href="#" class="' . $debug . '"></a></div>';
     echo '<div id="debug" class="' . $debug . ' clearfix">';
     $this->_box('info');
     $this->_box('hooks');
     $this->_box('sql');
     $this->_box('timer');
     empty(self::$_data['error']) || $this->_box('error');
     empty(self::$_data['debug']) || $this->_box('debug', self::STATE_OPENED);
 }
コード例 #5
0
ファイル: index.php プロジェクト: UzielSilva/subrion
    if (count($chunks) > 2) {
        if (!in_array($chunks[1], array('co', 'com', 'net', 'org', 'gov', 'ltd', 'ac', 'edu'))) {
            $domain = implode('.', array($chunks[1], $chunks[0]));
            if ($chunks[2] != 'www') {
                $domain = implode('.', array($chunks[2], $chunks[1], $chunks[0]));
            }
        }
    }
    $domain = '.' . $domain;
}
ini_set('session.gc_maxlifetime', 1800);
// 30 minutes
//session_set_cookie_params(1800, '/', $domain, false, true);
session_name('INTELLI_' . substr(md5(IA_HOME), 0, 10));
session_start();
setcookie(session_name(), session_id(), time() + 1800);
require_once IA_CLASSES . 'ia.system.php';
require_once IA_INCLUDES . 'function.php';
if (function_exists('spl_autoload_register')) {
    spl_autoload_register(array('iaSystem', 'autoload'));
}
iaSystem::renderTime('start');
if (INTELLI_DEBUG) {
    register_shutdown_function(array('iaSystem', 'shutdown'));
    ob_start(array('iaSystem', 'output'));
} else {
    error_reporting(0);
}
set_error_handler(array('iaSystem', 'error'));
iaSystem::renderTime('Core started');
iaCore::instance()->init();
コード例 #6
0
ファイル: ia.core.smarty.php プロジェクト: bohmszi/kdbe_cms
 public function ia_template($resourceName, $useCustom = true)
 {
     if ($useCustom) {
         $default = $resourceName;
         $templateName = $this->iaCore->iaView->theme;
         if (defined('IA_CURRENT_PACKAGE')) {
             if (iaCore::ACCESS_ADMIN == $this->iaCore->getAccessType()) {
                 if (is_file(IA_PACKAGE_TEMPLATE_ADMIN . $resourceName)) {
                     $resourceName = IA_PACKAGE_TEMPLATE_ADMIN . $resourceName;
                 }
             } elseif (is_file(IA_FRONT_TEMPLATES . $templateName . IA_DS . 'packages' . IA_DS . IA_CURRENT_PACKAGE . IA_DS . $resourceName)) {
                 $resourceName = IA_FRONT_TEMPLATES . $templateName . IA_DS . 'packages' . IA_DS . IA_CURRENT_PACKAGE . IA_DS . $resourceName;
             } elseif (is_file(IA_PACKAGE_TEMPLATE_COMMON . $resourceName)) {
                 $resourceName = IA_PACKAGE_TEMPLATE_COMMON . $resourceName;
             }
         } elseif (defined('IA_CURRENT_PLUGIN')) {
             if (iaCore::ACCESS_FRONT == $this->iaCore->getAccessType() && is_file(IA_FRONT_TEMPLATES . $templateName . IA_DS . 'plugins' . IA_DS . IA_CURRENT_PLUGIN . IA_DS . $resourceName)) {
                 $resourceName = IA_FRONT_TEMPLATES . $templateName . IA_DS . 'plugins' . IA_DS . IA_CURRENT_PLUGIN . IA_DS . $resourceName;
             } else {
                 $resourceName = IA_PLUGIN_TEMPLATE . $resourceName;
             }
         }
         $resourceName = $resourceName == $default ? IA_TEMPLATES . $templateName . IA_DS . $resourceName : $resourceName;
         is_file($resourceName) || ($resourceName = IA_TEMPLATES . $templateName . IA_DS . $default);
         is_file($resourceName) || ($resourceName = IA_TEMPLATES . 'common' . IA_DS . $default);
     } else {
         $resourceName = $this->template_dir . $resourceName;
     }
     if (!$this->templateExists($resourceName)) {
         if (INTELLI_DEBUG || INTELLI_QDEBUG) {
             trigger_error('Unable to find the following resource: <b>' . $resourceName . '</b>', E_USER_ERROR);
         } else {
             echo '<div style="font-weight: bold; color: #f00; margin: 20px 0;">File Missing: ' . $resourceName . '</div>';
         }
     }
     iaSystem::renderTime('after check file ' . $resourceName);
     return $resourceName;
 }
コード例 #7
0
ファイル: ia.core.php プロジェクト: UzielSilva/subrion
 public function factory($name, $type = self::CORE)
 {
     $result = null;
     if (is_string($name)) {
         $className = self::CLASSNAME_PREFIX . ucfirst(strtolower($name));
         if (isset($this->_classInstances[$className])) {
             $result = $this->_classInstances[$className];
         } else {
             iaSystem::renderTime('class', 'Loading class ' . $className);
             $fileSize = $this->loadClass($type, strtolower($name) == 'db' ? INTELLI_CONNECT : $name);
             if (false === $fileSize) {
                 return false;
             }
             iaDebug::debug('ia.' . $type . '.' . $name . iaSystem::EXECUTABLE_FILE_EXT . ' (' . iaSystem::byteView($fileSize) . ')', 'Initialized Classes List', 'info');
             $result = new $className();
             $result->init();
             $this->_classInstances[$className] = $result;
         }
     } elseif (is_array($name)) {
         $result = array();
         foreach ($name as $className) {
             $result[] = $this->factory($className, $type);
         }
     }
     return $result;
 }