Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Reikia nedaug paredaguoti panelę top siuntinių

Parašė Ponas24· 2011 Kov. 8 21:03:44
#2


echo "<table width='100%'>
 
<tr>
 
<td width='50%'>";
 
opentable("<center>Naujausi Siuntiniai</center>");
 
$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> [".$data['download_count']."]<br>\n";
 
}
 
} else {
 
echo "<center>Nėra siuntinių</center>\n";
 
}
 
closetable();
 
echo "</td>
 
<td width='50%'>";
 
opentable("<center>Top 10</center>");
 
$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> [".$data['download_count']."]<br>\n";
 
}
 
} else {
 
echo "<center>Nėra siuntinių</center>\n";
 
}
 
closetable();
 
echo "</tr>
 
</table>";