(60*60)) safe_query("DELETE FROM ".PREFIX."articles WHERE articlesID='$ds[articlesID]'"); } echo'
'; } elseif($_GET['delete']) { include("_mysql.php"); include("_settings.php"); include("_functions.php"); if(!isnewsadmin($userID)) die('no access!'); $ds=mysql_fetch_array(safe_query("SELECT screens FROM ".PREFIX."articles WHERE articlesID='".$_GET['articlesID']."'")); if($ds[screens]) { $screens=explode("|", $ds[screens]); if(is_array($screens)) { $filepath = "./images/articles-pics/"; foreach($screens as $screen) { if(file_exists($filepath.$screen)) @unlink($filepath.$screen); } } } safe_query("DELETE FROM ".PREFIX."articles WHERE articlesID='".$_GET['articlesID']."'"); safe_query("DELETE FROM ".PREFIX."comments WHERE parentID='".$_GET['articlesID']."' AND type='ar'"); if($close) echo''; else header("Location: index.php?site=articles"); } function top5() { $pagebg=PAGEBG; $border=BORDER; $bghead=BGHEAD; $bgcat=BGCAT; echo''; // RATING $ergebnis=safe_query("SELECT * FROM ".PREFIX."articles WHERE saved='1' ORDER BY rating DESC LIMIT 0,5"); $top='TOP 5 ARTICLES (rating)'; eval ("\$top5_head = \"".gettemplate("top5_head")."\";"); echo $top5_head; $n=1; while($ds=mysql_fetch_array($ergebnis)) { if($n%2) { $bg1=BG_1; $bg2=BG_2; } else { $bg1=BG_3; $bg2=BG_4; } $title=''.clearfromtags($ds[title]).''; $poster=''.getnickname($ds[poster]).''; $viewed='('.$ds[viewed].')'; $ratings=array(0,0,0,0,0,0,0,0,0,0); for($i=0; $i<$ds[rating]; $i++) { $ratings[$i]=1; } $ratingpic=''; foreach($ratings as $pic) { $ratingpic.=''; } echo' | ||
'.$n.'. | '.$ratingpic.' | '.$title.' |