From aab1c4213ac4a065b693a0a5914e670eb37d8107 Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Fri, 17 Jun 2011 20:53:38 +0000 Subject: [PATCH] Added act checker. :P git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@676 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- calendar.php | 5 ++++- category.php | 5 ++++- event.php | 5 ++++- forum.php | 7 +++++-- inc/versioninfo.php | 6 +++--- index.php | 5 ++++- member.php | 5 ++++- messenger.php | 5 ++++- profile.php | 5 ++++- rss.php | 4 +++- search.php | 5 ++++- subcategory.php | 5 ++++- subforum.php | 7 +++++-- topic.php | 5 ++++- 14 files changed, 56 insertions(+), 18 deletions(-) diff --git a/calendar.php b/calendar.php index 5200c72..6f79ac3 100644 --- a/calendar.php +++ b/calendar.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: calendar.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $ + $FileInfo: calendar.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -19,6 +19,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['calendar'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("view", "create"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -29,6 +30,8 @@ require($SettDir['inc'].'navbar.php'); if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if($_GET['act']=="view") { require($SettDir['inc'].'calendars.php'); } if($_GET['act']=="create") diff --git a/category.php b/category.php index 83f7ad6..bea8903 100644 --- a/category.php +++ b/category.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: category.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $ + $FileInfo: category.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -21,6 +21,7 @@ $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['category'].$usefileext.$_SERVER['PATH_INFO']; if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } +$idbactcheck = array("view", "lowview", "stats"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -31,6 +32,8 @@ require($SettDir['inc'].'navbar.php'); } $CatCheck = null; if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } if($_GET['act']=="view") { require($SettDir['inc'].'categories.php'); } diff --git a/event.php b/event.php index 3f56630..7301f56 100644 --- a/event.php +++ b/event.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: event.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $ + $FileInfo: event.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -19,6 +19,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['event'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("view", "create", "makeevent"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -26,6 +27,8 @@ $filewpath = $exfile['event'].$usefileext.$_SERVER['PATH_INFO']; @@ -36,13 +37,15 @@ require($SettDir['inc'].'navbar.php'); } $ForumCheck = null; if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } if($_GET['act']=="view"||$_GET['act']=="create"|| $_GET['act']=="maketopic"||$_POST['act']=="maketopics") { require($SettDir['inc'].'topics.php'); } if($_GET['act']=="lowview") { require($SettDir['inc'].'lowtopics.php'); } -if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom") { +if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom"||$_GET['act']=="opml") { redirect("location",$rbasedir.url_maker($exfile['rss'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss'],FALSE)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302; gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } diff --git a/inc/versioninfo.php b/inc/versioninfo.php index 91d8f22..40f5015 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: versioninfo.php - Last Update: 06/16/2011 SVN 675 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") { @@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) { return $return_var; } // Version number and date stuff. :P $VER1[0] = 0; $VER1[1] = 4; $VER1[2] = 5; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 675; -$SVNDay[0] = 06; $SVNDay[1] = 16; $SVNDay[2] = 2011; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 676; +$SVNDay[0] = 06; $SVNDay[1] = 17; $SVNDay[2] = 2011; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; $AltName = "RDB"; $AltName2 = "ReneeDB"; $RName = "iDB"; $SFName = "IntDB"; $RFullName = "Internet Discussion Boards"; $AltFullName = "Renee Discussion Boards"; if(!isset($Settings['usealtname'])) { $Settings['usealtname'] = "no"; } diff --git a/index.php b/index.php index cd29865..c28ec9b 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: index.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $ + $FileInfo: index.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -20,6 +20,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['index'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("view", "lowview", "stats"); if(isset($_GET['showcategory'])&&is_numeric($_GET['showcategory'])) { $showact = "view"; @@ -68,6 +69,8 @@ require($SettDir['inc'].'navbar.php'); } if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if($_GET['act']=="view") { require($SettDir['inc'].'forums.php'); } if($_GET['act']=="lowview") diff --git a/member.php b/member.php index 5074e49..723670d 100644 --- a/member.php +++ b/member.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: member.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $ + $FileInfo: member.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -21,6 +21,9 @@ if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['member'].$Settings['file_ext'].$_SERVER['PATH_INFO']; if($_GET['act']==null) { $_GET['act'] = "login"; } if(!isset($_GET['view'])) { $_GET['view'] = null; } +$idbactcheck = array("view", "signup", "login", "logout", "online", "list", "makemember", "makemembers"); +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="login"; } ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> diff --git a/messenger.php b/messenger.php index 1de6a4d..48ff019 100644 --- a/messenger.php +++ b/messenger.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: messenger.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $ + $FileInfo: messenger.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -19,6 +19,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['messenger'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("view", "viewsent", "read", "create", "sendmessage"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -36,6 +37,8 @@ if($_SESSION['UserGroup']!=$Settings['GuestGroup']|| $GroupInfo['CanPM']=="yes") { if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if(!is_numeric($_GET['id'])&&$_GET['act']!="create") { $_GET['id']="1"; } if($_GET['act']=="view"||$_GET['act']=="viewsent") diff --git a/profile.php b/profile.php index f721e4e..eda6d57 100644 --- a/profile.php +++ b/profile.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: profile.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $ + $FileInfo: profile.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -19,6 +19,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['profile'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("view", "signature", "avatar", "settings", "profile", "userinfo"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -33,6 +34,8 @@ if($_SESSION['UserGroup']!=$Settings['GuestGroup']|| $GroupInfo['CanEditProfile']=="yes") { if($_GET['act']==null||$_GET['act']=="notepad") { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if($_GET['act']=="view"|| $_GET['act']=="signature"|| $_GET['act']=="avatar"|| diff --git a/rss.php b/rss.php index 736c5fa..141798d 100644 --- a/rss.php +++ b/rss.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: rss.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $ + $FileInfo: rss.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -20,6 +20,7 @@ $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; @@ -29,6 +30,7 @@ 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(!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"; diff --git a/search.php b/search.php index 84d00a0..6cff997 100644 --- a/search.php +++ b/search.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: search.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $ + $FileInfo: search.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -19,6 +19,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['search'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("topic", "topics"); ?> Search" href="" /> @@ -47,6 +48,8 @@ if(!isset($_POST['act'])) { $_POST['act'] = null; } if($_GET['act']==null||$_GET['act']=="topic"|| $_POST['act']=="topic"||$_POST['act']=="topics") { $_GET['act']="topics"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="topics"; } if(!isset($_GET['msearch'])) { $_GET['msearch'] = null; } if(!isset($_POST['msearch'])) { $_POST['msearch'] = null; } if($_GET['msearch']==null&& diff --git a/subcategory.php b/subcategory.php index c4d246c..2e77c8f 100644 --- a/subcategory.php +++ b/subcategory.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: subcategory.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $ + $FileInfo: subcategory.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -21,6 +21,7 @@ $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['category'].$usefileext.$_SERVER['PATH_INFO']; if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } +$idbactcheck = array("view", "lowview", "stats"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -31,6 +32,8 @@ require($SettDir['inc'].'navbar.php'); } $CatCheck = null; if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } if($_GET['act']=="view") { require($SettDir['inc'].'subcategories.php'); } diff --git a/subforum.php b/subforum.php index 2efebfa..55eee7a 100644 --- a/subforum.php +++ b/subforum.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: subforum.php - Last Update: 06/14/2011 SVN 672 - Author: cooldude2k $ + $FileInfo: subforum.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -21,6 +21,7 @@ $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['subforum'].$usefileext.$_SERVER['PATH_INFO']; if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } +$idbactcheck = array("view", "lowview", "oldrss", "rss", "atom", "opml"); if($Settings['enable_rss']=="on") { ?> @@ -36,12 +37,14 @@ require($SettDir['inc'].'navbar.php'); } $ForumCheck = null; if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } if($_GET['act']=="view") { require($SettDir['inc'].'subforums.php'); } if($_GET['act']=="lowview") { require($SettDir['inc'].'lowsubforums.php'); } -if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom") { +if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom"||$_GET['act']=="opml") { redirect("location",$rbasedir.url_maker($exfile['rss'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss'],FALSE)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302; gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } diff --git a/topic.php b/topic.php index 215a8ac..980b4c5 100644 --- a/topic.php +++ b/topic.php @@ -11,7 +11,7 @@ Copyright 2004-2011 iDB Support - http://idb.berlios.de/ Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: topic.php - Last Update: 12/07/2010 SVN 600 - Author: cooldude2k $ + $FileInfo: topic.php - Last Update: 06/17/2011 SVN 676 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -20,6 +20,7 @@ require('preindex.php'); $usefileext = $Settings['file_ext']; if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['topic'].$usefileext.$_SERVER['PATH_INFO']; +$idbactcheck = array("view", "create", "delete", "pin", "unpin", "move", "open", "close", "announce", "edit", "makereply", "editreply", "lowview"); ?> <?php echo $Settings['board_name'].$idbpowertitle; ?> @@ -30,6 +31,8 @@ require($SettDir['inc'].'navbar.php'); } $ForumCheck = null; if($_GET['act']==null) { $_GET['act']="view"; } +if(!in_array($_GET['act'], $idbactcheck)) +{ $_GET['act']="view"; } if(!is_numeric($_GET['id'])) { $_GET['id']="1"; } if($_GET['act']=="view"||$_GET['act']=="create"||$_GET['act']=="delete"|| -- 2.11.4.GIT