read_file(); include "common.php"; include "art_func.php"; //include "lang.html"; $path=ereg_replace("\?.*$","",$REQUEST_URI); if (eregi("/([^/]*\.html)$",$path,$regs)): $fname=$regs[1]; $path=ereg_replace("/[^/]*$","",$path); endif; $path=ereg_replace("/$","",$path); $arr=explode("/",$path); $sz=count($arr); if ($sz>1): $rname=$arr[$sz-1]; else: $rname=$arr[0]; endif; if (!$rname&&$fname=="index.html"): $rname=""; $CatInfo=GetCatInfo(0,$rname); elseif($rname): $CatInfo=GetCatInfo(0,$rname); endif; if (!$CatInfo["id"]): NotFound(); exit; //elseif($CatInfo["visible"]=="N" ||$CatInfo["deleted"]=="Y"): elseif($CatInfo["deleted"]=="Y"): NotFound(); exit; else: //show the page $templ=$CatInfo["template"]; if (!$templ): $templ="default.php"; endif; if (!$CatInfo["id"]): NotFound(); exit; //elseif($CatInfo["visible"]=="N" ||$CatInfo["deleted"]=="Y"): elseif($CatInfo["deleted"]=="Y"): NotFound(); exit; endif; if ($QUERY_STRING == "adm"): $adm=1; else: $adm=0; endif; header("HTTP/1.1 200 OK"); header("Last-Modified: " . gmdate("D, d M Y H:i:s",Time()). " GMT"); if (!$tst_cache): ob_start(); include $DOCUMENT_ROOT."/templates/$templ"; $content=ob_get_contents(); if ($content): $my_cache->write_file($content);endif; ob_end_flush(); endif; endif; ?>