setTemplatePath($this->module_path.'tpl'); switch($this->module_info->page_type) { case 'WIDGET' : { $this->cache_file = sprintf("%sfiles/cache/page/%d.%s.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType()); $this->interval = (int)($this->module_info->page_caching_interval); break; } case 'OUTSIDE' : { $this->cache_file = sprintf("./files/cache/opage/%d.cache.php", $this->module_info->module_srl); $this->interval = (int)($this->module_info->page_caching_interval); $this->opage_path = $this->module_info->opage_path; break; } } } /** * @brief General request output **/ function dispPageIndex() { // Variables used in the template Context:: set() if($this->module_srl) Context::set('module_srl',$this->module_srl); $page_type_name = strtolower($this->module_info->page_type); $page_content = call_user_method('_get'.ucfirst($page_type_name).'Content', &$this); Context::set('module_info', $this->module_info); Context::set('page_content', $page_content); $this->setTemplateFile('content'); } function _getWidgetContent(){ if($this->interval>0) { if(!file_exists($this->cache_file)) $mtime = 0; else $mtime = filemtime($this->cache_file); if($mtime + $interval*60 > time()) { $page_content = FileHandler::readFile($this->cache_file); $page_content = preg_replace('@<\!--#Meta:@', '