ich habe momentan so eine kleines Problem und zwar wil er an einem Bestimmten platz $nextday nicht ausgeben!
index.php
<? $filename="index.php"; include 'global.inc.php'; eval("echo \"".gettemplate("index.htm")."\";"); ?>
func.inc.php
<? function getTemplate($file) { $templateFolder = "templates/"; return str_replace("\"","\\\"",implode("",file($templateFolder.$file))); } ?>
global.inc
<? include 'mysql.inc.php'; include 'func.inc.php'; eval("\$header = \"".gettemplate("header.htm")."\";"); eval("\$links = \"".gettemplate("links.htm")."\";"); if($filename=="index.php"){$mode="";} elseif($filename=="stundenplan.php"){eval("\$nextday = \"".gettemplate("mode_plan.htm")."\";");} elseif($filename=="lehrerplan.php"){eval("\$nextday = \"".gettemplate("mode_plan.htm")."\";");} ?>
mysql.inc.php
<? mysql_connect('localhost', 'root', ''); mysql_select_db('plan'); ?>
stundenplan.php
<? $filename="stundenplan.php"; include 'global.inc.php'; eval("echo \"".gettemplate("index.htm")."\";"); ?>
/template/header.htm
<table width="100%"> <tr> <td width="80%"><p align="left">Vertretungsplan(0.1 beta)</p></td> <td width="20%"><p align="right"> $nextday </p></td> </tr> </table>
/template/index.htm
<table border="0" width="100%"> <tr> <td width="90%">$header</td> <td width="10%"></td> </tr> <tr> <td width="90%">$middel</td> <td align="left" valign="top" width="10%">$links</td> </tr> </table>
/template/mode_plan.htm
Mo|Di|Mi|Do|Fr
/template/mode_verplan.htm
Heute|Morgen
So bloß das $nextday gibt er nicht in der header.htm aus aber in allen anderen tempaltes schon !
MFG