|
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
openside("Ostatnie newsy");
$result = dbquery(
"SELECT tn.*, tc.* FROM ".DB_NEWS." tn
LEFT JOIN ".DB_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().") AND news_draft='0'
ORDER BY news_sticky DESC, news_datestamp DESC LIMIT 0,5"
);
if (dbrows($result)) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['news_subject'], 23);
echo THEME_BULLET." <a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>$itemsubject</a> ".showdate("%d.%m.%Y %H:%M", $data['news_datestamp'])."<br />\n";
}
} else {
echo "<div style='text-align:center'>Brak</div>\n";
}
closeside();
?>
|