TOP100:
<?php
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 100");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 100);
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
\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
?>
Naujausi:
@openside("Naujausi siuntimai");
$result=dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,10");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
if(dbrows($result)!=0){
while($data=dbarray($result)){
echo "<tr>
<td class='side-small'><a target=_blank href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' class='side'><b>".trimlink($data['download_title'], 80)."</b></a></td>
<td align='right' class='sidesmall'>$data[download_count]</td>
</tr>\n";
}
echo "</table>\n";
} else {
echo $locale['004'];
echo "</table>\n";
}
@closeside();
TOP ir NEW (50 ant 50 horizontalei)
echo "<table width='100%'>
<tr>
<td width='50%'>";
openside("Naujausi Siuntiniai");
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_datestamp DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>Nėra siuntinių</center>\n";
}
closeside();
echo "</td>
<td width='50%'>";
openside("Top 10");
$result = dbquery(
"SELECT td.*,tdc.* FROM ".$db_prefix."downloads td
INNER JOIN ".$db_prefix."download_cats tdc ON td.download_cat=tdc.download_cat_id
WHERE ".groupaccess('download_cat_access')." ORDER BY download_count DESC LIMIT 0,10"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>Nėra siuntinių</center>\n";
}
closeside();
echo "</tr>
</table>";
Atsitiktiniai:
openside("Atsitiktiniai siuntiniai");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY RAND() DESC LIMIT 0,10");
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'> ".$data['download_description']."
</td>
<td align='right'><a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'><b>Parsisiųsti</b></a></td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
closeside();
0
https://valgo.me |