[ Index ]
 

Code source de PHP NUKE 7.9

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/ -> backend.php (source)

   1  <?php
   2  
   3  /************************************************************************/

   4  /* PHP-NUKE: Web Portal System                                          */

   5  /* ===========================                                          */

   6  /*                                                                      */

   7  /* Copyright (c) 2005 by Francisco Burzi                                */

   8  /* http://phpnuke.org                                                   */

   9  /*                                                                      */

  10  /* This program is free software. You can redistribute it and/or modify */

  11  /* it under the terms of the GNU General Public License as published by */

  12  /* the Free Software Foundation; either version 2 of the License.       */

  13  /************************************************************************/

  14  
  15  include ("mainfile.php");
  16  include ("includes/ipban.php");
  17  global $prefix, $db, $nukeurl;
  18  header("Content-Type: text/xml");
  19  $cat = intval($cat);
  20  if (isset($cat) && !empty($cat)) {
  21      $catid = $db->sql_fetchrow($db->sql_query("SELECT catid FROM ".$prefix."_stories_cat WHERE title LIKE '%$cat%' LIMIT 1"));
  22      if ($catid == "") {
  23          $result = $db->sql_query("SELECT sid, title, hometext FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 10");
  24      } else {
  25          $catid = intval($catid);
  26          $result = $db->sql_query("SELECT sid, title, hometext FROM ".$prefix."_stories WHERE catid='$catid' ORDER BY sid DESC LIMIT 10");
  27      }
  28  } else {
  29      $result = $db->sql_query("SELECT sid, title, hometext FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 10");
  30  }
  31  
  32  echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
  33  echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
  34  echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n";
  35  echo "<rss version=\"0.91\">\n\n";
  36  echo "<channel>\n";
  37  echo "<title>".htmlentities($sitename)."</title>\n";
  38  echo "<link>$nukeurl</link>\n";
  39  echo "<description>".htmlentities($backend_title)."</description>\n";
  40  echo "<language>$backend_language</language>\n\n";
  41  
  42  while ($row = $db->sql_fetchrow($result)) {
  43      $rsid = intval($row['sid']);
  44      $rtitle = filter($row['title'], "nohtml");
  45      $rtext = filter($row['hometext']);
  46      echo "<item>\n";
  47      echo "<title>".htmlentities($rtitle)."</title>\n";
  48      echo "<link>$nukeurl/modules.php?name=News&amp;file=article&amp;sid=$rsid</link>\n";
  49      echo "<description>".htmlentities($rtext)."</description>\n";
  50      echo "</item>\n\n";
  51  }
  52  echo "</channel>\n";
  53  echo "</rss>";
  54  
  55  ?>


Généré le : Sun Apr 1 11:11:59 2007 par Balluche grâce à PHPXref 0.7