*/ class pageMobile extends pageView { function init() { switch($this->module_info->page_type) { case 'WIDGET' : { $this->cache_file = sprintf("%sfiles/cache/page/%d.%s.%s.m.cache.php", RX_BASEDIR, $this->module_info->module_srl, Context::getLangType(), Context::getSslStatus()); $this->interval = (int)($this->module_info->page_caching_interval); break; } case 'OUTSIDE' : { $this->cache_file = sprintf("./files/cache/opage/%d.%s.m.cache.php", $this->module_info->module_srl, Context::getSslStatus()); $this->interval = (int)($this->module_info->page_caching_interval); $this->path = $this->module_info->mpath; break; } } } 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); $method = '_get' . ucfirst($page_type_name) . 'Content'; if (method_exists($this, $method)) { $page_content = $this->{$method}(); } else { throw new Rhymix\Framework\Exception(sprintf('%s method is not exists', $method)); } Context::set('module_info', $this->module_info); Context::set('page_content', $page_content); $this->setTemplatePath($this->module_path . 'tpl'); $this->setTemplateFile('mobile'); } function _getWidgetContent() { // Arrange a widget ryeolro if($this->module_info->mcontent) { $cache_file = sprintf("%sfiles/cache/page/%d.%s.m.cache.php", RX_BASEDIR, $this->module_info->module_srl, Context::getLangType()); $interval = (int)($this->module_info->page_caching_interval); if($interval>0) { if(!file_exists($cache_file) || filesize($cache_file) < 1) { $mtime = 0; } else { $mtime = filemtime($cache_file); } if($mtime + $interval*60 > $_SERVER['REQUEST_TIME']) { $page_content = FileHandler::readFile($cache_file); $page_content = str_replace('