Вот не смотря работает или нет, набросала вам набросок.. проверяйте.
<!--c1--><div class='codetop'>Код</div><div class='codemain'><!--ec1--><?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."latest_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."latest_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."latest_downloads_panel/locale/English.php";
}
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'>
<tr width='50%'><td width='50%'>";
openside($locale['LDP_001']);
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif'>
<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."'
title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 28)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
closeside();
echo "</td></tr>";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."popular_downloads_panel/locale/English.php";
}
echo "<tr width='50%'><td width='50%'>";
openside("Популярне загрузки");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
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'><img src='".THEME."images/bullet.gif'> <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>";
?><!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>Код</div><div class='codemain'><!--ec1--><?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."latest_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."latest_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."latest_downloads_panel/locale/English.php";
}
echo "<table cellSpacing='0' cellPadding='0' width='100%' border='0'>
<tr width='50%'><td width='50%'>";
openside($locale['LDP_001']);
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif'>
<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."'
title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 28)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
closeside();
echo "</td></tr>";
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
if (file_exists(INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php")) {
include INFUSIONS."popular_downloads_panel/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."popular_downloads_panel/locale/English.php";
}
echo "<tr width='50%'><td width='50%'>";
openside("Популярне загрузки");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
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'><img src='".THEME."images/bullet.gif'> <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>";
?><!--c2--></div><!--ec2-->