From c7c8883ac81cb55a1504c05d0672e83de3cf0ca0 Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Sat, 1 Sep 2007 09:28:36 +0000 Subject: [PATCH] Added filter by member to iDB search system and some bug fixes. :P git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@94 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/events.php | 6 +++--- inc/members.php | 10 +++++----- inc/pm.php | 10 +++++----- inc/replys.php | 12 ++++++------ inc/searchs.php | 33 +++++++++++++++++++++++++++++---- inc/topics.php | 8 ++++---- inc/versioninfo.php | 6 +++--- search.php | 11 ++++++++--- 8 files changed, 63 insertions(+), 33 deletions(-) diff --git a/inc/events.php b/inc/events.php index 4e1ba71..4103113 100644 --- a/inc/events.php +++ b/inc/events.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: events.php - Last Update: 08/31/2007 SVN 93 - Author: cooldude2k $ + $FileInfo: events.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="events.php"||$File3Name=="/events.php") { @@ -233,7 +233,7 @@ $TimeOut = explode("/",$_POST['EventEnd']);  Make Event Message: - +="30") { $Error="Yes"; ?>
Your Event Name is too big.
@@ -312,7 +312,7 @@ $TimeOut = explode("/",$_POST['EventEnd']);
+ strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?>
You Guest Name is too big.
diff --git a/inc/members.php b/inc/members.php index 19a3b71..1ed716a 100644 --- a/inc/members.php +++ b/inc/members.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: members.php - Last Update: 08/31/2007 SVN 93 - Author: cooldude2k $ + $FileInfo: members.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="members.php"||$File3Name=="/members.php") { @@ -320,13 +320,13 @@ $REFERERurl = null; unset($REFERERurl); +if (strlen($_POST['userpass'])>="30") { $Error="Yes"; ?> - +="20") { $Error="Yes"; ?>

Your password is too big.

Your user name is too big.
@@ -556,13 +556,13 @@ if(!isset($_POST['TOS'])) { $_POST['TOS'] = null; }
- +="30") { $Error="Yes"; ?> - +="20") { $Error="Yes"; ?> - +="25") { $Error="Yes"; ?> - +="30") { $Error="Yes"; ?> - +="30") { $Error="Yes"; ?> + strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?> - +="30") { $Error="Yes"; ?> + strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?> - +="30") { $Error="Yes"; ?> + strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?> + strlen($_POST['TopicName'])>="30") { $Error="Yes"; ?> diff --git a/inc/topics.php b/inc/topics.php index 3098bb8..d4b7a8c 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: 08/18/2007 SVN 87 - Author: cooldude2k $ + $FileInfo: topics.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="topics.php"||$File3Name=="/topics.php") { @@ -327,20 +327,20 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; } - +="30") { $Error="Yes"; ?> - +="30") { $Error="Yes"; ?> + strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?>

Your password is too big.

Your user name is too big.
diff --git a/inc/pm.php b/inc/pm.php index 6980401..96788ed 100644 --- a/inc/pm.php +++ b/inc/pm.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: pm.php - Last Update: 08/31/2007 SVN 93 - Author: cooldude2k $ + $FileInfo: pm.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="pm.php"||$File3Name=="/pm.php") { @@ -451,7 +451,7 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
 Make Message:

Send to user name too big.
@@ -463,20 +463,20 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
You need to enter a user name to send message to.

Message Name is too big.

Message Description is too big.

You Guest Name is too big.
diff --git a/inc/replys.php b/inc/replys.php index 6eaab8a..ad2146a 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: 08/30/2007 SVN 92 - Author: cooldude2k $ + $FileInfo: replys.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="replys.php"||$File3Name=="/replys.php") { @@ -429,14 +429,14 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
 Make Reply Message:

Your Reply Description is too big.

You Guest Name is too big.
@@ -807,21 +807,21 @@ if($PermissionInfo['CanModForum'][$TopicForumID]=="yes"&&
 Edit Reply Message:

Your Reply Description is too big.

You Guest Name is too big.

You Topic Name is too big.
diff --git a/inc/searchs.php b/inc/searchs.php index 6d568dd..3d04f76 100644 --- a/inc/searchs.php +++ b/inc/searchs.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: searchs.php - Last Update: 08/18/2007 SVN 86 - Author: cooldude2k $ + $FileInfo: searchs.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="searchs.php"||$File3Name=="/searchs.php") { @@ -32,7 +32,7 @@ if($_GET['act']=="topics") { @@ -46,6 +46,9 @@ if($_GET['act']=="topics") { + + +
-">Topic Search +">Topic Search  
="25") { + $_GET['msearch'] = null; } +if($_GET['msearch']!=null) { +$memsiquery = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s'", array($_GET['msearch'])); +$memsiresult=mysql_query($memsiquery); +$memsinum=mysql_num_rows($memsiresult); +$memsi=0; +if($memsinum==0) { $_GET['msearch'] = null; } +if($memsinum!=0) { +$memsid=mysql_result($memsiresult,$memsi,"id"); +@mysql_free_result($memsiresult); } } +if($_GET['msearch']==null) { if($_GET['type']!="wildcard") { $query = query("SELECT * FROM `".$Settings['sqltable']."topics` WHERE `TopicName`='%s' ORDER BY `Pinned` DESC, `LastUpdate` DESC", array($_GET['search'])); } if($_GET['type']=="wildcard") { -$query = query("SELECT * FROM `".$Settings['sqltable']."topics` WHERE `TopicName` LIKE '%s' ORDER BY `Pinned` DESC, `LastUpdate` DESC", array($_GET['search'])); } +$query = query("SELECT * FROM `".$Settings['sqltable']."topics` WHERE `TopicName` LIKE '%s' ORDER BY `Pinned` DESC, `LastUpdate` DESC", array($_GET['search'])); } } +if($_GET['msearch']!=null) { +if($_GET['type']!="wildcard") { +$query = query("SELECT * FROM `".$Settings['sqltable']."topics` WHERE `TopicName`='%s' AND `UserID`=%i ORDER BY `Pinned` DESC, `LastUpdate` DESC", array($_GET['search'],$memsid)); } +if($_GET['type']=="wildcard") { +$query = query("SELECT * FROM `".$Settings['sqltable']."topics` WHERE `TopicName` LIKE '%s' AND `UserID`=%i ORDER BY `Pinned` DESC, `LastUpdate` DESC", array($_GET['search'],$memsid)); } } $result=mysql_query($query); $num=mysql_num_rows($result); if($num<=0) { @@ -110,7 +130,12 @@ $pstring = $pstring."
-">Searching for + +">Searching for + +">Searching for by +  "; ?>
 Make Topic Message:

Your Topic Name is too big.

Your Topic Description is too big.

You Guest Name is too big.
diff --git a/inc/versioninfo.php b/inc/versioninfo.php index 228d64a..f1c8700 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.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: versioninfo.php - Last Update: 08/31/2007 SVN 93 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 09/01/2007 SVN 94 - 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] = 1; $VER1[2] = 9; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 93; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 08; $SVNDay[1] = 31; $SVNDay[2] = 2007; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 94; $RName = "iDB"; $SFName = "IntDB"; +$SVNDay[0] = 09; $SVNDay[1] = 01; $SVNDay[2] = 2007; $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); diff --git a/search.php b/search.php index 6bef529..4dfdfc1 100644 --- a/search.php +++ b/search.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: search.php - Last Update: 07/17/2007 SVN 46 - Author: cooldude2k $ + $FileInfo: search.php - Last Update: 09/01/2007 SVN 94 - Author: cooldude2k $ */ require('preindex.php'); $usefileext = $Settings['file_ext']; @@ -44,8 +44,13 @@ if(!isset($_POST['act'])) { $_POST['act'] = null; } if($_GET['act']==null||$_GET['act']=="topic"|| $_POST['act']=="topic"||$_POST['act']=="topics") { $_GET['act']="topics"; } -if($_GET['act']=="topics") -{ require($SettDir['inc'].'searchs.php'); } } +if($_GET['act']=="topics") { +if(!isset($_GET['msearch'])) { $_GET['msearch'] = null; } +if(!isset($_POST['msearch'])) { $_POST['msearch'] = null; } +if($_GET['msearch']==null&& + $_POST['msearch']!=null) { + $_GET['msearch'] = $_POST['msearch']; } +require($SettDir['inc'].'searchs.php'); } } require($SettDir['inc'].'endpage.php'); if(!isset($_GET['search'])) { $_GET['search'] = null; } ?> -- 2.11.0