<?php
openside_panel("Navigacija");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,10");
if (dbrows($result) != 0) {
echo "<table align='center' width='268' cellpadding='0' cellspacing='0' style='padding:10px;'>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='small'>
<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."'>".trimlink($data['download_title'], 23)."</a>
</td>
<td align='right' style='color:#FFF;'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>nera</div>\n";
}
closeside_panel();
?>
<?php
global $userdata, $aidlink, $locale, $db_prefix, $theme_width, $result;
openside_panel("Navigacija");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,10");
if (dbrows($result) != 0) {
echo "<table align='center' width='264' cellpadding='0' cellspacing='0' style='padding:5px;'>";
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']."'>$itemsubject</a></td>\n
<td align='right' style='color:#FFF;'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>nera</center>\n";
}
closeside_panel();
?>
openside("Populiarios naujienos");
$result = dbquery(
"SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
LEFT JOIN ".$db_prefix."news_cats tc ON tn.news_cat=tc.news_cat_id
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
ORDER BY news_reads DESC LIMIT 0,34"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['news_subject'], 28);
echo "<a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
openside("NEW naujienos");
$result = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC LIMIT 0,10");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='side-small'>
<img src='".THEME."images/bullet.gif'>
<a href='".BASEDIR."news.php?readmore=".$data['news_id']." ' title='".$data['news_subject']."' class='side'>".trimlink($data['news_subject'], 20)."</a>
</td>
<td align='right'>".dbcount("(comment_id)", "comments", "comment_item_id='".$data['news_id']."'")." / ".$data['news_reads']."</td></tr>";
}
echo "<tr><td class='side-small' align='right' colspan='2'>[<a href='".BASEDIR."viewpage.php?page_id=2' class='side'>Архив</a>]</td></tr></table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
closeside();