[ Index ]
 

Code source de e107 0.7.8

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

title

Body

[fermer]

/ -> backend.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/backend.php,v $
  14  |     $Revision: 1.5 $
  15  |     $Date: 2005/06/27 01:45:02 $
  16  |     $Author: streaky $
  17  +----------------------------------------------------------------------------+
  18  */
  19  require_once ("class2.php");
  20      
  21  $pubdate = strftime("%a, %d %b %Y %I:%M:00 GMT", time());
  22  $rss = "<?xml version=\"1.0\"?>
  23      <rss version=\"2.0\">
  24      <channel>
  25      <title>".SITENAME."</title>
  26      <link>".SITEURL."</link>
  27      <description>".SITEDESCRIPTION."</description>
  28      <language>en-gb</language>
  29      <copyright>".SITEDISCLAIMER."</copyright>
  30      <managingEditor>".SITEADMIN."</managingEditor>
  31      <webMaster>".SITEADMINEMAIL."</webMaster>
  32      <pubDate>{$pubdate}</pubDate>
  33      <lastBuildDate>{$pubdate}</lastBuildDate>
  34      <docs>http://backend.userland.com/rss</docs>
  35      <skipDays><day></day></skipDays>
  36      <skipHours><hour></hour></skipHours>
  37      <generator>e107 website system (http://e107.org)</generator>
  38      <ttl>60<ttl>
  39       
  40      <image>
  41      <title>".SITENAME."</title>
  42      <url>".SITEBUTTON."</url>
  43      <link>".SITEURL."</link>
  44      <width>88</width>
  45      <height>31</height>
  46      <description>".SITETAG."</description>
  47      </image>
  48       
  49      <textInput>
  50      <title>Search</title>
  51      <description>Search ".SITENAME."</description>
  52      <name>query</name>
  53      <link>".SITEURL."search.php</link>
  54      </textInput>
  55      ";
  56      
  57  $sql2 = new db;
  58  $sql->db_Select("news", "*", "news_class=0 AND (news_start=0 || news_start < ".time().") AND (news_end=0 || news_end>".time().") ORDER BY news_datestamp DESC LIMIT 0, 10");
  59  while ($row = $sql->db_Fetch()) {
  60      extract($row);
  61       
  62      $sql2->db_Select("news_category", "*", "category_id='{$news_category}'");
  63      $row = $sql->db_Fetch();
  64       extract($row);
  65       
  66      $sql2->db_Select("user", "user_name", "user_id='{$news_author}' ");
  67      $row = $sql->db_Fetch();
  68       extract($row);
  69       
  70       
  71      $tmp = explode(" ", $news_body);
  72      unset($nb);
  73      for($a = 0; $a <= 100; $a++) {
  74          $nb .= $tmp[$a]." ";
  75      }
  76      $nb = htmlspecialchars($nb);
  77      $wlog .= $news_title."\n".SITEURL."/comment.php?comment.news.".$news_id."\n\n";
  78       
  79      $itemdate = strftime("%a, %d %b %Y %I:%M:00 GMT", $news_datestamp);
  80       
  81       
  82       
  83       
  84      $rss .= "<item>
  85          <title>$news_title</title>
  86          <link>http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$news_id."</link>
  87          <description>$nb</description>
  88          <category domain=\"".SITEURL."\">$category_name</category>
  89          <comments>http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$news_id."</comments>
  90          <author>$user_name</author>
  91          <pubDate>$itemdate</pubDate>
  92          <guid isPermaLink=\"true\">http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$news_id."</guid>
  93          </item>
  94          ";
  95       
  96  }
  97      
  98      
  99  $rss .= "</channel>
 100      </rss>";
 101      
 102      
 103  echo $rss;    
 104      
 105  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7