Parašė Lordcraft· 2008 Vas. 27 16:02:29
#14
tai su tuo kodu viskas gerai bet su ta naujienu statistika kazkas blogai nes as turiu tokio panel ir man veikia kuo puikiausiai:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
echo "<table width='100%'>
<tr>
<td width='25%'>";
openside("<center>Naujienos</center>");
$result = dbquery("SELECT * FROM ".$db_prefix."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_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."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>".trimlink($data['news_subject'], 23)."</a>
</td>
<td align='right'>".$data['news_reads']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();
echo "</td>
<td width='25%'>";
openside("<center>Naujausi siuntiniai</center>");
$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><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 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='25%'>";
openside("<center>Populeriausi pranesimai</center>");
$result = dbquery("
SELECT tf.forum_id, tt.thread_id, tt.thread_subject, COUNT(tp.post_id) as count_posts
FROM ".$db_prefix."forums tf
INNER JOIN ".$db_prefix."threads tt USING(forum_id)
INNER JOIN ".$db_prefix."posts tp USING(thread_id)
WHERE ".groupaccess('forum_access')." GROUP BY thread_id ORDER BY count_posts DESC, thread_lastpost DESC LIMIT 5
");
if (dbrows($result) != 0) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['thread_subject'], 20);
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif'>
<a href='".FORUM."viewthread.php?forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."' title='".$data['thread_subject']."' class='side'>$itemsubject</a>
</td>
<td align='right'>".$data['count_posts']."</td>
</tr>";
}
echo "</table>\n";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='25%'>";
openside("<center>Atsitiktines nuorodos</center>");
if(dbcount("(*)", "money_links", "id > 0") > 0){
$snd = mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
dbquery("DELETE FROM ".$db_prefix."money_links WHERE `galiojaiki` < '".$snd."'");
$sql = dbquery("SELECT * FROM ".$db_prefix."money_links ORDER BY RAND() LIMIT 5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($linkas = dbarray($sql)){
echo "<tr>
<td class='small'>
<img src='".THEME."images/bullet.gif'> <a href='".stripinput(htmlspecialchars($linkas[nuoroda]))."' class='side'>".stripinput(htmlspecialchars($linkas[tekstas]))."</a></td>
<td align='right'>".$data['weblink_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
echo "";
closeside();
echo "</td>
</table>";
?>