so vielleicht:
PHP-Code:
$inhalt = $result['inhalt'];
echo eval ($inhalt);
$inhalt = $result['inhalt'];
echo eval ($inhalt);
<?php
echo template("User CP");
?>
function template($titel)
{
//Verbindung zur Datenbank
$query = @mysql_query("SELECT inhalt, titel FROM template WHERE titel = '".$titel."'") or die('Konnte Templates nicht auswählen!');
//Datenbank auswerten
$result = @mysql_fetch_array($query) or die("Konnte das Template nicht auswählen!");
$inhalt = $result['inhalt'];
eval ("\$inhalt = \"$inhalt\";");
return $inhalt;
}
<table cellpadding=0 cellspacing=0 border=0 width="400">
<tr id="tablecat">
<td align="center"><img src="img/oben_links.gif"></td>
<td align="center" width="100%" background="img/oben_bg.gif">
<font size=2 face="Verdana, Arial, Helvetica, sans-serif"><b>Userdatem</b></font>
</td>
<td align="center"><img src="img/oben_rechts.gif"></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 bgcolor="black" width="400">
<tr>
<td>
<table width="100%" border=0 cellspacing=1 cellpadding=5>
<tr>
<td width="400" bgcolor="#7b92ad"><i>$user_mail</i></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="400">
<tr id="tablecat">
<td align="center"><img src="img/unten_links.gif"></td>
<td align="center" width="100%" background="img/unten_bg.gif">
</td>
<td align="center"><img src="img/unten_rechts.gif"></td>
</tr>
</table>
<br><br>
<table cellpadding=0 cellspacing=0 border=0 width="400">
<tr id="tablecat">
<td align="center"><img src="img/oben_links.gif"></td>
<td align="center" width="100%" background="img/oben_bg.gif">
<font size=2 face="Verdana, Arial, Helvetica, sans-serif"><b>$sprache_cp_titel_statistik</b></font>
</td>
<td align="center"><img src="img/oben_rechts.gif"></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 bgcolor="black" width="400">
<tr>
<td>
<table width="100%" border=0 cellspacing=1 cellpadding=5>
<tr>
<td width="400" bgcolor="#7b92ad"><i>-Nicht vorhanden-</i></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="400">
<tr id="tablecat">
<td align="center"><img src="img/unten_links.gif"></td>
<td align="center" width="100%" background="img/unten_bg.gif">
</td>
<td align="center"><img src="img/unten_rechts.gif"></td>
</tr>
</table>
<br><br>
<table cellpadding=0 cellspacing=0 border=0 width="400">
<tr id="tablecat">
<td align="center"><img src="img/oben_links.gif"></td>
<td align="center" width="100%" background="img/oben_bg.gif">
<font size=2 face="Verdana, Arial, Helvetica, sans-serif"><b>$sprache_cp_titel_pn</b></font>
</td>
<td align="center"><img src="img/oben_rechts.gif"></td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 bgcolor="black" width="400">
<tr>
<td>
<table width="100%" border=0 cellspacing=1cellpadding=5>
<tr>
<td width="400" bgcolor="#7b92ad"><i>-Coming soon-</i></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width="400">
<tr id="tablecat">
<td align="center"><img src="img/unten_links.gif"></td>
<td align="center" width="100%" background="img/unten_bg.gif">
</td>
<td align="center"><img src="img/unten_rechts.gif"></td>
</tr>
</table>
function template($titel)
{
//Verbindung zur Datenbank
$query = @mysql_query("SELECT inhalt, titel FROM template WHERE titel = '".$titel."'") or die('Konnte Templates nicht auswählen!');
//Datenbank auswerten
$result = @mysql_fetch_array($query) or die("Konnte das Template nicht auswählen!");
// $inhalt = $result['inhalt'];
// eval ("\$inhalt = \"$inhalt\";");
eval ("\$inhalt = \"$result[inhalt]\";");
return $inhalt;
}
Kommentar