Parašė Adriano· 2007 Bir. 25 19:06:27
#8
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright Ā© 2002 - 2005 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; }
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)) {
$result2 = dbquery("SELECT * FROM ".$db_prefix."article_cats WHERE article_cat_id='".$data['article_cat']."'");
$data2 = dbarray($result2);
$itemcat = $data2['article_cat_name'];
$itemsnippet = $data['article_snippet'];
$itemsnippet = stripslashes($itemsnippet);
$itemsubject = $data['article_subject'];
//$itemsubject = trimlink($data['article_subject'], 23);
echo "<table width='100%' cellpadding='0' cellspacing='0' class='scapmainrazdel'>
<tr>
<td class='tbl2'><nobr><img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."article".$data['article_id'].".html' title='".$data['article_subject']."' class='side'><strong>$itemsubject</strong></a></nobr></td>
<td class='tbl2' align='right'><a href='".BASEDIR."articlecategory".$data['article_cat_id'].".html' title='$itemcat' class='side'><strong>$itemcat</strong></a></td></tr>
<tr><td class='tbl1' style='text-align:justify' colspan='2'>$itemsnippet</td></tr></table>";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
?>
Va niekur neradau tu eiluciu
Redagavo Adriano· 2007 Bir. 25 19:06:45