Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Plz, Help me.

Parašė Arnelis· 2008 Rugp. 10 17:08:24
#3

Čia bus
Naujausi siuntiniai, top 5 siuntinius, naujausi straipsniai
Persidarysi pats.

echo "<table width='100%'>
<tr>
<td width='33%'>";
openside("Naujausia siuntiniai");
echo "<div class='side-label'><b>Nauji siuntiniai</b></div>\n";
$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'], 23)."</a>
</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();
echo "</td>
<td width='33%'>";
openside("Top 5 Siuntiniai");
echo "<div class='side-label'><b>Top 5 siuntiniai</b></div>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' 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>
<td width='33%'>";
openside("Paskutiniai straipsniai ");
echo "<div class='side-label'><b>Paskutiniai straipsniai</b></div>\n";
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,5"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</tr>
</table>";

Redagavo Arnelis· 2008 Rugp. 10 17:08:34