OSDN Git Service

Add files via upload
[idb/iDB.git.git] / rss.php
diff --git a/rss.php b/rss.php
index c400604..faf873f 100644 (file)
--- a/rss.php
+++ b/rss.php
@@ -8,21 +8,31 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     Revised BSD License for more details.
 
-    Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
-    Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
+    Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
 
-    $FileInfo: rss.php - Last Update: 12/09/2008 SVN 207 - Author: cooldude2k $
+    $FileInfo: rss.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
 */
-//@ini_set("display_errors", true); 
-//@ini_set("display_startup_errors", true);
-@error_reporting(E_ALL ^ E_NOTICE);
-require_once('mysql.php');
+if(ini_get("register_globals")) {
+require_once('inc/misc/killglobals.php'); }
+$pretime = explode(" ", microtime());
+$utime = $pretime[0];
+$time = $pretime[1];
+$starttime = $utime + $time;
+require_once('sql.php');
+$idbactcheck = array("rss", "oldrss", "atom", "opml", "opensearch");
+/*if($Settings['enable_search']=="off"||$GroupInfo['CanSearch']=="no") {
+header("Content-Type: text/plain; charset=".$Settings['charset']); 
+ob_clean(); echo "Sorry you can not search on this board."; $urlstatus = 503;
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }*/
 if($Settings['enable_rss']=="off") {
-@header("Content-Type: text/plain; charset=".$Settings['charset']); 
-ob_clean(); echo "Sorry RSS Feeds are not enabled for this board."; 
-gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
+header("Content-Type: text/plain; charset=".$Settings['charset']); 
+ob_clean(); echo "Sorry RSS Feeds are not enabled for this board."; $urlstatus = 503;
+gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
 if($_GET['act']==null) { $_GET['act'] = "rss"; }
-if($_GET['act']=="rss"||$_GET['act']=="oldrss"||$_GET['act']=="atom") {
+if(!in_array($_GET['act'], $idbactcheck)) { $_GET['act']="rss"; }
+if($_GET['act']=="rss"||$_GET['act']=="oldrss"||$_GET['act']=="atom"||
+       $_GET['act']=="opml"||$_GET['act']=="opensearch") {
        $_GET['feedtype'] = $_GET['act']; $Feed['Feed']="Done";
        require($SettDir['inc'].'rssfeed.php'); }
-?>
\ No newline at end of file
+?>