function modeEot($template, $EXT = 'htm') { global $db_mode, $db_tplpath; if ($db_mode == 'area') { $srcTpl = getAreaSrcTpl($template, $EXT); $tarTpl = D_P . "data/tplcache/" . $db_tplpath . $template . '.' . $EXT; } else { $srcTpl = M_P . "template/{$template}.{$EXT}"; $tarTpl = D_P . "data/tplcache/" . $db_mode . '_' . $template . '.' . $EXT; } if (!file_exists($srcTpl)) { return false; } if (pwFilemtime($tarTpl) > pwFilemtime($srcTpl)) { return $tarTpl; } else { return modeTemplate($template, $srcTpl, $tarTpl); } }
function getpath($template, $EXT = 'htm') { $srcTpl = $this->dir . 'default/' . "{$template}.{$EXT}"; $tarTpl = D_P . "data/tplcache/cms_" . $template . '.' . $EXT; if (!file_exists($srcTpl)) { return false; } if (pwFilemtime($tarTpl) > pwFilemtime($srcTpl)) { return $tarTpl; } return modeTemplate($srcTpl, $tarTpl); }
function areaEot($template, $EXT = 'htm') { global $alias; $ifNeedParsePW = 0; $srcTpl = getAreaChannelTpl($template, $alias, $EXT); $tarTpl = D_P . "data/tplcache/area_" . $alias . '_' . $template . '.' . $EXT; if (!file_exists($srcTpl)) { return false; } $srcTplTime = pwFilemtime($srcTpl); if ($template == 'main') { $ifNeedParsePW = 1; $configFile = AREA_PATH . $alias . '/' . PW_PORTAL_CONFIG; $srcTplTime = max(pwFilemtime($configFile), $srcTplTime); } if (pwFilemtime($tarTpl) > $srcTplTime) { return $tarTpl; } if ($ifNeedParsePW) { return areaTemplate($alias, $srcTpl, $tarTpl); } return modeTemplate($srcTpl, $tarTpl); }