Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: PHP  |  size: 3.07 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. ##########################################################################
  4. #                                                                        #
  5. #           Version 4       /                        /   /               #
  6. #          -----------__---/__---__------__----__---/---/-               #
  7. #           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
  8. #          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
  9. #                       Free Content / Management System                 #
  10. #                                   /                                    #
  11. #                                                                        #
  12. #                                                                        #
  13. #   Copyright 2005-2010 by webspell.org                                  #
  14. #                                                                        #
  15. #   visit webSPELL.org, webspell.info to get webSPELL for free           #
  16. #   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
  17. #   - It's NOT allowed to remove this copyright-tag                      #
  18. #   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
  19. #                                                                        #
  20. #   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
  21. #   Far Development by Development Team - webspell.org                   #
  22. #                                                                        #
  23. #   visit webspell.org                                                   #
  24. #                                                                        #
  25. ##########################################################################
  26. */
  27.  
  28. $_language->read_module('news');
  29. $_language->read_module('bbcode', true);
  30.  
  31. $ergebnis=safe_query("SELECT newsID, rubric FROM ".PREFIX."news WHERE newsID='".$topnewsID."' AND intern<=".isclanmember($userID)." AND published='1' LIMIT 0,1");
  32. $anz = mysql_num_rows($ergebnis);
  33. if($anz) {
  34.  
  35.         $dn=mysql_fetch_array($ergebnis);
  36.  
  37.         $message_array = array();
  38.         $query=safe_query("SELECT * FROM ".PREFIX."news_contents WHERE newsID='".$dn['newsID']."'");
  39.         while($qs = mysql_fetch_array($query)) {
  40.                 $message_array[] = array('lang' => $qs['language'], 'headline' => $qs['headline'], 'message' => $qs['content']);
  41.         }
  42.         $showlang = select_language($message_array);
  43.  
  44.         $headline=clearfromtags($message_array[$showlang]['headline']);
  45.         $content=$message_array[$showlang]['message'];
  46.        
  47.         if(mb_strlen($content)>$maxtopnewschars) {
  48.                 $content=mb_substr($content, 0, $maxtopnewschars);
  49.                 $content.='...';
  50.         }
  51.         $content = nl2br(strip_tags($content));
  52.        
  53.         $rubricID = $dn['rubric'];
  54.         $ds=mysql_fetch_array(safe_query("SELECT pic_topnews FROM `".PREFIX."news_rubrics` WHERE rubricID='$rubricID'"));
  55.         $pic = $ds['pic_topnews'];
  56.  
  57.         eval ("\$addbbcode = \"".gettemplate("addbbcode")."\";");
  58.         eval ("\$addflags = \"".gettemplate("flags")."\";");
  59.         eval ("\$sc_topnews = \"".gettemplate("sc_topnews")."\";");
  60.  
  61.         echo $sc_topnews;
  62. } else echo $_language->module['no_topnews'];
  63. ?>