Parašė sufer· 2007 Sau. 5 20:01:56
#5
M4niaC parašė:
geriau padetum nesijuokes :(
openside("name");
echo"<table>
<tr>
<td width='50%'>";
openside("TOP naujienos");
$result = dbquery("select * from ".$db_prefix."news order by news_reads desc limit 5");
echo '<table align="center"><tr><td align="left"><b>Straipsnis</b></td><td align="right"><b>Skaityta</b></td></tr>';
while ($data = dbarray($result))
{
$link = BASEDIR."news.php?readmore=".$data['news_id'];
echo '<td align="left"><a href="'.$link.'">'.$data['news_subject'].'</a></td><td align="right">'.$data['news_reads'].'</td></tr>';
}
echo '</table>';
closeside();
echo "</td>
<td width='50%'>";
openside("TOP siuntiniai");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,7");
echo '<table align="center"><tr><td align="left"><b>Atsisiūsta</b></td><td align="right"><b>Failų</b></td></tr>';
if (dbrows($result) != 0) {
echo "<table cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "
</td>
</tr>
</table>";
closeside();
taip geriau turetu buti ;)