From 2f6c086513c421d1046f1358cbff2df56d4998ca Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Wed, 6 Oct 2010 05:30:04 +0000 Subject: [PATCH] Small update to ( iLo-Fi / iLowView ). O_o git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@578 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/lowreplies.php | 18 ++++++++++++------ inc/versioninfo.php | 14 ++++++++------ index.php | 16 +++++++++++----- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/inc/lowreplies.php b/inc/lowreplies.php index 86d4beb..c5cbe1c 100644 --- a/inc/lowreplies.php +++ b/inc/lowreplies.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: lowreplies.php - Last Update: 09/05/2010 SVN 572 - Author: cooldude2k $ + $FileInfo: lowreplies.php - Last Update: 09/06/2010 SVN 578 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="replies.php"||$File3Name=="/replies.php") { @@ -41,7 +41,10 @@ if($TopicClosed==3&&$PermissionInfo['CanModForum'][$TopicForumID]=="no") { redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); sql_free_result($preresult); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } -$NumberReplies=sql_result($preresult,0,"NumReply"); +if(!isset($_GET['post'])||$_GET['post']!==null) { +$NumberReplies=sql_result($preresult,0,"NumReply"); } +if(isset($_GET['post'])&&$_GET['post']!==null) { +$NumberReplies=1; } $ViewTimes=sql_result($preresult,0,"NumViews"); sql_free_result($preresult); $forumcheckx = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."forums\" WHERE \"id\"=%i".$ForumIgnoreList1." LIMIT 1", array($TopicForumID)); @@ -140,7 +143,10 @@ $PageLimit = $Settings['max_posts'] * $snumber; if($PageLimit<0) { $PageLimit = 0; } //End Reply Page Code $i=0; -$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" ASC ".$SQLimit, array($_GET['id'],$PageLimit,$Settings['max_posts'])); +if(!isset($_GET['post'])||$_GET['post']!==null) { +$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i ORDER BY \"TimeStamp\" ASC ".$SQLimit, array($_GET['id'],$PageLimit,$Settings['max_posts'])); } +if(isset($_GET['post'])&&$_GET['post']!==null) { +$query = sql_pre_query("SELECT * FROM \"".$Settings['sqltable']."posts\" WHERE \"TopicID\"=%i AND \"id\"=%i ORDER BY \"TimeStamp\" ASC ".$SQLimit, array($_GET['id'],$_GET['post'],$PageLimit,$Settings['max_posts'])); } $result=sql_query($query,$SQLStat); $num=sql_num_rows($result); if($num==0) { redirect("location",$rbasedir.url_maker($exfile['index'],$Settings['file_ext'],"act=lowview",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); @@ -309,7 +315,7 @@ $eunum = sql_num_rows($euresult); } if($MyEditUserID==$MyUserID) { $EditUserID = $User1ID; $EditUserGroupID = $User1GroupID; - $EditUserHidden=$User1Hidden; + //$EditUserHidden=$User1Hidden; $EditUserName = $User1Name; $EditUserGroup=$User1Group; $EditUserNamePrefix=null; @@ -361,8 +367,8 @@ if($_SESSION['UserID']==0) { $CanEditReply = false; $CanDeleteReply = false; } $ReplyNum = $i + $PageLimit + 1; ?> -
-
+
+
diff --git a/inc/versioninfo.php b/inc/versioninfo.php index a682c75..6026107 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: versioninfo.php - Last Update: 09/05/2010 SVN 577 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 09/06/2010 SVN 578 - 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] = 1; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 577; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 09; $SVNDay[1] = 05; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 578; $RName = "iDB"; $SFName = "IntDB"; +$SVNDay[0] = 09; $SVNDay[1] = 06; $SVNDay[2] = 2010; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; $VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false); $VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true); $VerInfo['iDB_Full_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,false); @@ -72,7 +72,9 @@ if($Settings['showverinfo']!="on") { //header("X-".$RName."-Powered-By: ".$RName); //header("X-Powered-By: PHP"); header("Generator: ".$RName); } -// Uncomment next two lines to get rid of version info headers -//header("X-Powered-By: "); -//header("Generator: "); +if(!isset($Settings['hideverinfohttp'])) { + $Settings['hideverinfohttp'] = "off"; } +if($Settings['hideverinfohttp']=="on") { +header("X-Powered-By: "); +header("Generator: "); } ?> diff --git a/index.php b/index.php index c329871..f446bf0 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,7 @@ Copyright 2004-2010 iDB Support - http://idb.berlios.de/ Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/ - $FileInfo: index.php - Last Update: 09/05/2010 SVN 576 - Author: cooldude2k $ + $FileInfo: index.php - Last Update: 09/06/2010 SVN 578 - Author: cooldude2k $ */ if(ini_get("register_globals")) { require_once('inc/misc/killglobals.php'); } @@ -22,24 +22,30 @@ if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; } $filewpath = $exfile['index'].$usefileext.$_SERVER['PATH_INFO']; if(isset($_GET['showcategory'])&&is_numeric($_GET['showcategory'])) { -redirect("location",$rbasedir.url_maker($exfile['category'],$Settings['file_ext'],"act=view&id=".$_GET['showcategory'],$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category'],FALSE)); +$showact = "view"; +if($_GET['act']=="lowview") { $showact = "lowview"; } +redirect("location",$rbasedir.url_maker($exfile['category'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showcategory'],$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category'],FALSE)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } if(isset($_GET['showforum'])&&is_numeric($_GET['showforum'])) { -redirect("location",$rbasedir.url_maker($exfile['forum'],$Settings['file_ext'],"act=view&id=".$_GET['showforum'],$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum'],FALSE)); +$showact = "view"; +if($_GET['act']=="lowview") { $showact = "lowview"; } +redirect("location",$rbasedir.url_maker($exfile['forum'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showforum'],$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum'],FALSE)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } if(isset($_GET['showtopic'])&&is_numeric($_GET['showtopic'])) { +$showact = "view"; +if($_GET['act']=="lowview") { $showact = "lowview"; } if(isset($_GET['showpost'])&&is_numeric($_GET['showpost'])) { -redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$_GET['showtopic']."&post=".$_GET['showpost'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)); +redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showtopic']."&post=".$_GET['showpost'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); } if(!isset($_GET['showpost'])) { $_GET['showpost'] = null; } if(!isset($_GET['showpost'])||!is_numeric($_GET['showpost'])) { if(!isset($_GET['showpage'])) { $_GET['showpage'] = 1; } if(!isset($_GET['showpage'])||!is_numeric($_GET['showpage'])) { $_GET['showpage'] = 1; } -redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$_GET['showtopic']."&page=".$_GET['showpage'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)); +redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showtopic']."&page=".$_GET['showpage'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE)); ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); } gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); } -- 2.11.4.GIT