예제 #1
0
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);
    }
}
예제 #2
0
파일: core.php 프로젝트: jechiy/PHPWind
 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);
 }
예제 #3
0
파일: common.php 프로젝트: jechiy/PHPWind
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);
}