$rows = dbcount("(article_id)", DB_ARTICLES); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } if ($rows != 0) { $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 ".$_GET['rowstart'].",20" ); if (dbrows($result) != 0) { while($data = dbarray($result)) { $itemsubject = trimlink($data['article_subject'], 100); if ($data['article_datestamp']+604800 > time()+($settings['timeoffset']*3600)) { $new = " [NOWY]"; } else { $new = ""; } echo "".showdate("longdate", $data['article_datestamp'])." | ".$data['article_cat_name']."
".$itemsubject."$new
"; echo "
"; } } else { echo "
Brak promocji
\n"; } if ($rows > 20) echo "
\n".makepagenav($_GET['rowstart'], 20, $rows, 3, FUSION_SELF."?")."\n
\n"; }