PHP interesse |
|
ikz it nu beetje te prutsen met templatepower.
nu zegt mijn browser dat ik een fout heb, een javascript fout wordt aangegeven:
Ongeldig teken
ik heb deze code:
<?php
else
{
$tpl = new TemplatePower("templates/downloads.tpl");
$tpl->prepare();
$query = mysql_query("SELECT * FROM Downloads_cat ORDER BY Id DESC");
while ($sql = mysql_fetch_array($query))
{
$query2 = mysql_query("SELECT Id,Naam,Mid,Timestamp FROM Downloads WHERE Catid='".$sql['Id']."' LIMIT 0,1");
while ($sql2 = mysql_fetch_array($query2))
{
$id = $sql2['Id'];
$naam = htmlentities($sql2['Naam']);
$poster = membernaam($sql2['Mid']);
$datum = datum($sql2['Timestamp'],"0");
$tpl->newBlock("downloads");
$tpl->assign(array(
"catid" => $sql['Id'],
"catnaam" => htmlentities($sql['Naam']),
"plaatje" => $sql['Plaatje'],
"beschrijving" => ubb($sql['Beschrijving'],"0"),
"id" => $sql2['Id'],
"naam" => $sql2['Naam'],
"poster" => membernaam($sql2['Mid']),
"datum" => datum($sql2['Timestamp'],"0"),
"achtergrond" => ($bg++ % 2) ? 'bg1' : 'bg2',
"aantal" => $aantal++
));
}
}
$bg = 0;
$query3 = mysql_query("SELECT Id,Naam,Mid,Timestamp,Hits,Screenshot FROM Downloads ORDER BY Id DESC LIMIT 0,10");
while ($sql3 = mysql_fetch_array($query3))
{
$tpl->newBlock("downloads_onder");
$tpl->assign(array(
"id" => $sql3['Id'],
"naam" => $sql3['Naam'],
"poster" => membernaam($sql3['Mid']),
"datum" => datum($sql3['Timestamp'],"3"),
"hits" => $sql3['Hits'],
"screenshot" => htmlentities($sql3['Screenshot'])
));
if ($sql3['Screenshot'] != "")
{
$tpl->newBlock("screenshot_ja");
}
else
{
$tpl->newBlock("screenshot_nee");
}
}
$tpl->printToScreen();
}
?>
<?php else { $tpl = new TemplatePower("templates/downloads.tpl"); $tpl->prepare(); $query = mysql_query("SELECT * FROM Downloads_cat ORDER BY Id DESC"); { $query2 = mysql_query("SELECT Id,Naam,Mid,Timestamp FROM Downloads WHERE Catid='".$sql['Id']."' LIMIT 0,1"); { $id = $sql2['Id']; $poster = membernaam($sql2['Mid']); $datum = datum($sql2['Timestamp'],"0"); $tpl->newBlock("downloads"); "catid" => $sql['Id'], "plaatje" => $sql['Plaatje'], "beschrijving" => ubb($sql['Beschrijving'],"0"), "id" => $sql2['Id'], "naam" => $sql2['Naam'], "poster" => membernaam($sql2['Mid']), "datum" => datum($sql2['Timestamp'],"0"), "achtergrond" => ($bg++ % 2) ? 'bg1' : 'bg2', "aantal" => $aantal++ )); } } $bg = 0; $query3 = mysql_query("SELECT Id,Naam,Mid,Timestamp,Hits,Screenshot FROM Downloads ORDER BY Id DESC LIMIT 0,10"); { $tpl->newBlock("downloads_onder"); "id" => $sql3['Id'], "naam" => $sql3['Naam'], "poster" => membernaam($sql3['Mid']), "datum" => datum($sql3['Timestamp'],"3"), "hits" => $sql3['Hits'], )); if ($sql3['Screenshot'] != "") { $tpl->newBlock("screenshot_ja"); } else { $tpl->newBlock("screenshot_nee"); } } $tpl->printToScreen(); } ?>
en de volgende .tpl code:
<table border='0' width='100%' cellspacing='0' cellpadding='2' class='brechts'>
<tr>
<td width='15%' class='koptabel blinks'><b>Categorie</b></td>
<td width='45%' class='koptabel'><b>Beschrijving</b></td>
<td width='15%' class='koptabel'><b>Reviews</b></td>
<td width='25%' class='koptabel'><b>Laatste</b></td>
</tr>
<!-- START BLOCK : downloads -->
<tr class='{achtergrond}'>
<td width='15%' class='blinks bonder' align='center'>
<a href='site.php?p=downloads&cid={catid}'><img src='uploads/downloads_cat/{plaatje}' border='0' class='dashed' alt='{catnaam}'></a>
</td>
<td width='45%' class='blinks bonder'>
<a href='site.php?p=downloads&cid={catid}'><b>{catnaam}</b></a><br><br>{beschrijving}
</td>
<td width='15%' class='blinks bonder'>{aantal}</td>
<td width='25%' class='blinks bonder'>
Naam: <a href='site.php?p=downloads&id={id}'><b>{naam}</b></a><br>
Poster: {poster}<br>
Tijd: {datum}<br>
</td>
</tr>
<!-- END BLOCK : downloads -->
</table><br>
<font class='kop'><b>Laatste 10 downloads</b></font><br>
<br>
<table border='0' width='100%' cellspacing='0' cellpadding='2' class='brechts'>
<tr class='koptabel'>
<td width='25%' class='blinks'><b>Download</b></td>
<td width='15%'><b>Poster</b></td>
<td width='35%'><b>Datum</b></td>
<td width='15%'><b>Hits</b></td>
<td width='10%'><b>Screenshot</b></td>
</tr>
<!-- START BLOCK : downloads_onder -->
<tr class='{achtergrond} 'onmouseover=\"this.className='bgover';\" onmouseout=\"this.className='{achtergrond}';\">
<td width='25%' class='blinks bonder'><a href='site.php?p=downloads&id={id}'><b>{naam}</b></a></td>
<td width='15%' class='blinks bonder'>{poster}</td>
<td width='35%' class='blinks bonder'>{datum}</td>
<td width='15%' class='blinks bonder'>{hits}</td>
<td width='10%' class='blinks bonder'>
<!-- START BLOCK : screenshot_ja -->
<center><a href='uploads/uploads_screenshot/{screenshot}' target='_blank'><img src='images/screenshot.gif' border='0' alt='Bekijk de screenshot'></a></center>
<!-- END BLOCK : screenshot_ja -->
<!-- START BLOCK : screenshot_nee -->
<i>Geen</i>
<!-- END BLOCK : screenshot_nee -->
</td>
</tr>
<!-- END BLOCK : downloads_onder -->
</table>
<table border='0' width='100%' cellspacing='0' cellpadding='2' class='brechts'> <tr> <td width='15%' class='koptabel blinks'><b>Categorie</b></td> <td width='45%' class='koptabel'><b>Beschrijving</b></td> <td width='15%' class='koptabel'><b>Reviews</b></td> <td width='25%' class='koptabel'><b>Laatste</b></td> </tr> <!-- START BLOCK : downloads --> <tr class='{achtergrond}'> <td width='15%' class='blinks bonder' align='center'> <a href='site.php?p=downloads&cid={catid}'><img src='uploads/downloads_cat/{plaatje}' border='0' class='dashed' alt='{catnaam}'></a> </td> <td width='45%' class='blinks bonder'> <a href='site.php?p=downloads&cid={catid}'><b>{catnaam}</b></a><br><br>{beschrijving} </td> <td width='15%' class='blinks bonder'>{aantal}</td> <td width='25%' class='blinks bonder'> Naam: <a href='site.php?p=downloads&id={id}'><b>{naam}</b></a><br> Poster: {poster}<br> Tijd: {datum}<br> </td> </tr> <!-- END BLOCK : downloads --> </table><br> <font class='kop'><b>Laatste 10 downloads</b></font><br> <br> <table border='0' width='100%' cellspacing='0' cellpadding='2' class='brechts'> <tr class='koptabel'> <td width='25%' class='blinks'><b>Download</b></td> <td width='15%'><b>Poster</b></td> <td width='35%'><b>Datum</b></td> <td width='15%'><b>Hits</b></td> <td width='10%'><b>Screenshot</b></td> </tr> <!-- START BLOCK : downloads_onder --> <tr class='{achtergrond} 'onmouseover=\"this.className='bgover';\" onmouseout=\"this.className='{achtergrond}';\"> <td width='25%' class='blinks bonder'><a href='site.php?p=downloads&id={id}'><b>{naam}</b></a></td> <td width='15%' class='blinks bonder'>{poster}</td> <td width='35%' class='blinks bonder'>{datum}</td> <td width='15%' class='blinks bonder'>{hits}</td> <td width='10%' class='blinks bonder'> <!-- START BLOCK : screenshot_ja --> <center><a href='uploads/uploads_screenshot/{screenshot}' target='_blank'><img src='images/screenshot.gif' border='0' alt='Bekijk de screenshot'></a></center> <!-- END BLOCK : screenshot_ja --> <!-- START BLOCK : screenshot_nee --> <i>Geen</i> <!-- END BLOCK : screenshot_nee --> </td> </tr> <!-- END BLOCK : downloads_onder --> </table>
kan iemand de fout zien, ik zit namelijk al een tijde te zoeken/prutsen maar kom er niet uit... bvd
HEB HEM AL
gesloten
|