Das wäre zum Beispiel auch ne Möglichkeit, die
ich gerne verwende:
Auszug:
//parse html template
if ($HTTP_GET_VARS["page_id"]=="home") {
require_once ("press.php");
listfiles($directory,$headfile,$sfile, $pages);
$fd = @fopen ("layerstylez.tmpl.html", "r");
$stylez = fread ($fd, filesize ($filename));
fclose ($fd);
$fd = @fopen ("layercontentz.tmpl.html", "r");
$contentz = fread ($fd, filesize ($filename));
fclose ($fd);
$xtpl->assign("LAYERSTYLEZ", $stylez);
$xtpl->assign("LAYERCONTENTZ", $contentz);
$xtpl->assign("TICKER", $ticker);
} else {
$xtpl->assign("LAYERSTYLEZ","");
$xtpl->assign("LAYERCONTENTZ", "");
}
$xtpl->assign("DOTB", $dotbcg);
$xtpl->assign("SPACER", $spacerstatus);
$xtpl->assign("COLOR",$row);
$xtpl->assign("PIC",$bigleft);
$xtpl->assign("STAT",$mainlinks);
// READ PRESSLOFT FILES
if($HTTP_GET_VARS["page_id"]=="press")
{
$di = $HTTP_GET_VARS["di"];
include ("press.php");
// CALLING FUNCTION LISTFILES IN MAINDIRECTORY
switch ($HTTP_GET_VARS["fct"])
{
case"";
if($HTTP_GET_VARS["type"]!="1"){
// CONTENT FILE READING
$fd = @fopen ($filename, "rb");
if ($fd) {
$info = fread ($fd, filesize ($filename));
fclose ($fd);
}
}
listfiles($directory,$headfile,$sfile, $pages);
break;
case"more";
listfiles_more($directory,$headfile,$sfile_more,$di,$word,$txt,$images,$zip,$directory_archiv);
break;
}
usw....
Vom Prinzip her auch nicht anders als Smarty...
Viele Grüße
Chris