Ciao,
ho letto il vostro articolo su come creare i tutorials, molto utile! :-)
Ho un problema però...
ecco il codice+la screen:
index.php
codice:
<?
include("connetti.php");
include("header.php");
function GetTemplate($template) {
return str_replace("\"","\\\"",implode("",file($template)));
}
## QUESTA FUNZIONE STAMPA A VIDEO IL TEMPLATE RISULTANTE DALLA FUNZIONE PRECEDENTE
function Stampa($template) {
echo $template;
}
## SCORRIAMO I RISULTATI DELL'INTERROGAZIONE E STAMPIAMO LE SINGOLE NOTIZIE
$news=mysql_query("SELECT * FROM news");
while($nw = mysql_fetch_array($news)) {
$id = $nw['id'];
$titolo = $nw['titolo'];
$anteprima = nl2br($nw['anteprima']);
$data = date("d/m/Y", $nw['data']);
}
#MENU GUIDE E TUTORIALS
$gd=mysql_query("SELECT * FROM gd_cat");
while($gd_cat = mysql_fetch_array($gd)) {
$cat_id = $gd_cat['id'];
$nome = $gd_cat['nome'];
eval("Stampa(\"".GetTemplate("template.php")."\");");
}
?>
templates.php
codice:
<html>
<head>
<title>CdCopy.IT</title>
</head>
<link href="style.css" rel="stylesheet" type="text/css">
<body>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="15%"><table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td>$m</td>
</tr>
</table></td>
<td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tabella2">
<tr bgcolor="#dddddd">
<td colspan="3">$titolo - $data </td>
</tr>
<tr>
<td colspan="3">$anteprima</td>
</tr>
<tr>
<td width="68%"><div align="right"></div></td>
<td width="15%">[img]img/vecchio.gif[/img]</td>
<td width="15%">[img]img/vecchio.gif[/img]Leggi tutto... </td>
</tr>
</table></td>
<td width="15%"><div align="center">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td>$m</td>
</tr>
</table>
</div></td>
</tr>
</table>
</body>
</html>
Ecco...
io ho provato a posizionare il menu in tanti modi ma niente