<?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
+---------------------------------------------------------+
Edit by Maksim Dimitrov
Date 15.08.2007
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
openside($locale['023']);
$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)) {
$resultuser = dbquery(
"SELECT ta.*,tac.*, tu.user_id,user_name FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
LEFT JOIN ".$db_prefix."users tu ON ta.article_name=tu.user_id
WHERE article_id='".$data['article_id']."'"
);
while($datauser = dbarray($resultuser)) {
$user=$datauser['user_name'];
$cat=trimlink($data['article_cat_name'],23);
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''>
<a href='".BASEDIR."articles.php?cat_id=".$data['article_cat_id']."' class='side'>[$cat]</a>:
<a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>[$itemsubject]</a>-
<a href='".BASEDIR."profile.php?lookup=".$datauser['user_id']."' class='side'>[$user]</a><br>\n";
}
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
?>