No tak ale ja mam to na tpl, a tam jest zwykle php i nie zabardzo mi to wychodzi.
Wygląda to tak.
<?php
$query="select id,name,sdescription,size,rating,numrate,downloads,pid from upload_f
iles";
$result=$db->sql_query($query);
if(!$result)
{
message_die(GENERAL_ERROR, "Opis błędu", "", __LINE__, __FILE__, $query);
}
while($row=$db->sql_fetchrow($result))
{
if($row["pid"]==$cat)
{
if($candelete==1)
$delete="<br><a href="delete.php?id=".$row["id"]."">Usun plik</a>";
else
$delete="";
$template->assign_block_vars('filerow',array( 'name' => $row["name"],
'sdesc' => $row["sdescription"],
'size' => changetosize($row["size"]),
'count' => $row["downloads"],
'id' => $row["id"],
'delete' => $delete));
}
}
?>
a w tpl
Kod
<!-- BEGIN filerow -->
<td width="6%" align="center" valign="middle" class="down2"><img src="img/bullet.gif" width="27" height="27" /></td>
<td align="left" valign="middle" class="down2"><strong><a href="download_viewfile.php?id={filerow.id}">{filerow.name}</a></strong><br />
<span class="style3">Lorem Ipsum has been the industry's standard.</span></td>
<td width="17%" align="center" valign="middle" class="down2">{filerow.size}</td>
<td width="18%" align="center" valign="middle" class="down2">{filerow.count}</td>
</tr>
<!-- END filerow -->