From 0e9ca82379755420b4a2c1daaa7a6153f00e2e14 Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Tue, 31 Jul 2007 04:35:35 +0000 Subject: [PATCH] Fixed some errors and added make replys in /idb/inc/replys.php git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@56 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- forum.php | 2 +- inc/replys.php | 199 +++++++++++++++++++++++++++++++++++++++++++++++++--- inc/topics.php | 36 ++++++++-- inc/versioninfo.php | 4 +- topic.php | 14 +++- 5 files changed, 232 insertions(+), 23 deletions(-) diff --git a/forum.php b/forum.php index b1e9960..a9fd7ad 100644 --- a/forum.php +++ b/forum.php @@ -11,7 +11,7 @@ Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ - $FileInfo: forum.php - Last Update: 07/30/2007 SVN 54 - Author: cooldude2k $ + $FileInfo: forum.php - Last Update: 07/30/2007 SVN 56 - Author: cooldude2k $ */ require('preindex.php'); $usefileext = $Settings['file_ext']; diff --git a/inc/replys.php b/inc/replys.php index 67715d3..82a4668 100644 --- a/inc/replys.php +++ b/inc/replys.php @@ -11,7 +11,7 @@ Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ - $FileInfo: replys.php - Last Update: 07/23/2007 SVN 51 - Author: cooldude2k $ + $FileInfo: replys.php - Last Update: 07/30/2007 SVN 56 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="replys.php"||$File3Name=="/replys.php") { @@ -23,8 +23,11 @@ $prenum=mysql_num_rows($preresult); $prei=0; while ($prei < $prenum) { $TopicName=mysql_result($preresult,$prei,"TopicName"); +$TopicID=mysql_result($preresult,$prei,"id"); $TopicForumID=mysql_result($preresult,$prei,"ForumID"); $TopicCatID=mysql_result($preresult,$prei,"CategoryID"); +$TopicClosed=mysql_result($preresult,$prei,"Closed"); +$NumberReplies=mysql_result($preresult,$prei,"NumReply"); $ViewTimes=mysql_result($preresult,$prei,"NumViews"); if(!isset($CatPermissionInfo['CanViewCategory'][$TopicCatID])) { $CatPermissionInfo['CanViewCategory'][$TopicCatID] = "no"; } @@ -47,17 +50,18 @@ if($CatPermissionInfo['CanViewCategory'][$TopicCatID]=="yes"&&   - - + + "> + if($PermissionInfo['CanMakeReplys'][$TopicForumID]=="yes"&&$TopicClosed==0) { ?> - + ">
 
/", "
\n", nl2br($MyPost)); $MyDescription=mysql_result($result,$i,"Description"); $requery = query("select * from `".$Settings['sqltable']."members` where `id`=%i", array($MyUserID)); $reresult=mysql_query($requery); @@ -209,19 +214,191 @@ echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr
 
- + +
+ + + + + + + + + + + + +
+#"> + "; ?>
Making a Reply in
+
"> + + + + + + + + +
+ + +
+
+
+ + + + + + +
+
 
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+#"> + "; ?>
 Make Reply Message:
+
Your Reply Description is too big.
+
+
You Guest Name is too big.
+
+
Sorry the referering url dose not match our host name.
+
+
You need to enter a Reply Description.
+
+
You need to enter a Guest Name.
+
+
You do not have permission to make a reply here.
+
+
You need to enter a Reply.
+

+ Reply to Topic was posted.
+ Click #post">here to view your reply.
  +

 
+
  - - + + "> - + + if($PermissionInfo['CanMakeReplys'][$TopicForumID]=="yes"&&$TopicClosed==0) { ?> - + ">
diff --git a/inc/topics.php b/inc/topics.php index ce30c43..b9bf37a 100644 --- a/inc/topics.php +++ b/inc/topics.php @@ -11,7 +11,7 @@ Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ - $FileInfo: topics.php - Last Update: 07/30/2007 SVN 54 - Author: cooldude2k $ + $FileInfo: topics.php - Last Update: 07/30/2007 SVN 56 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="topics.php"||$File3Name=="/topics.php") { @@ -34,7 +34,7 @@ $RedirectTimes=mysql_result($preresult,$prei,"Redirects"); $NumberViews=mysql_result($preresult,$prei,"NumViews"); $NumberPosts=mysql_result($preresult,$prei,"NumPosts"); $NumberTopics=mysql_result($preresult,$prei,"NumTopics"); -$PostCountAdd=mysql_result($preresult,$prei,"NumTopics"); +$PostCountAdd=mysql_result($preresult,$prei,"PostCountAdd"); $ForumType = strtolower($ForumType); if(!isset($CatPermissionInfo['CanViewCategory'][$ForumCatID])) { $CatPermissionInfo['CanViewCategory'][$ForumCatID] = "no"; } @@ -223,12 +223,15 @@ gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); } -
"> +"> - + + + + @@ -239,6 +242,9 @@ gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }

+ + +
@@ -258,6 +264,7 @@ $REFERERurl = null; unset($REFERERurl); if(!isset($_POST['TopicName'])) { $_POST['TopicName'] = null; } if(!isset($_POST['TopicDesc'])) { $_POST['TopicDesc'] = null; } if(!isset($_POST['TopicPost'])) { $_POST['TopicPost'] = null; } +if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; } ?>
@@ -281,6 +288,13 @@ if(!isset($_POST['TopicPost'])) { $_POST['TopicPost'] = null; }
Your Topic Description is too big.
+ + + + @@ -295,6 +309,9 @@ $_POST['TopicName'] = @remove_spaces($_POST['TopicName']); $_POST['TopicDesc'] = stripcslashes(htmlspecialchars($_POST['TopicDesc'], ENT_QUOTES)); $_POST['TopicDesc'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['TopicDesc']); $_POST['TopicDesc'] = @remove_spaces($_POST['TopicDesc']); +$_POST['GuestName'] = stripcslashes(htmlspecialchars($_POST['GuestName'], ENT_QUOTES)); +$_POST['GuestName'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['GuestName']); +$_POST['GuestName'] = @remove_spaces($_POST['GuestName']); $_POST['TopicPost'] = stripcslashes(htmlspecialchars($_POST['TopicPost'], ENT_QUOTES)); $_POST['TopicPost'] = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['TopicPost']); //$_POST['TopicPost'] = @remove_spaces($_POST['TopicPost']); @@ -310,6 +327,13 @@ if ($_POST['TopicName']==null) { $Error="Yes"; ?>
You need to enter a Topic Description.
+ + + + - + -- 2.11.0
+
You Guest Name is too big.
+
+
You need to enter a Guest Name.
+
@@ -324,8 +348,7 @@ if ($_POST['TopicName']==null) { $Error="Yes"; ?>