From 3cfde6928c9538bd1992dd094d8cc7aa5c6e336e Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Tue, 20 Nov 2007 09:33:04 +0000 Subject: [PATCH] Some more UTF-8 support thanks to people at php.net Manual. ^_^ git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@129 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/calendars.php | 10 +++---- inc/categories.php | 10 +++---- inc/events.php | 30 ++++++++++----------- inc/forums.php | 10 +++---- inc/members.php | 14 +++++----- inc/misc/utf8.php | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ inc/pm.php | 10 +++---- inc/profilemain.php | 26 +++++++++--------- inc/replys.php | 12 ++++----- inc/searchs.php | 4 +-- inc/subcategories.php | 10 +++---- inc/subforums.php | 10 +++---- inc/topics.php | 8 +++--- inc/versioninfo.php | 6 ++--- mysql.php | 4 ++- 15 files changed, 157 insertions(+), 81 deletions(-) create mode 100644 inc/misc/utf8.php diff --git a/inc/calendars.php b/inc/calendars.php index e9ba5c9..d26d82b 100644 --- a/inc/calendars.php +++ b/inc/calendars.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: calendars.php - Last Update: 08/16/2007 SVN 84 - Author: cooldude2k $ + $FileInfo: calendars.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="calendars.php"||$File3Name=="/calendars.php") { @@ -54,8 +54,8 @@ $EventYearEnd=mysql_result($result,$is,"EventYearEnd"); if($EventMonthEnd!=$MyMonth) { $EventDayEnd = $CountDays; } if($EventMonth<$MyMonth) { $EventDay = 1; } $oldeventname=$EventName; -$EventName1 = substr($EventName,0,10); -if (strlen($EventName)>10) { $EventName1 = $EventName1."..."; } +$EventName1 = pre_substr($EventName,0,10); +if (pre_strlen($EventName)>10) { $EventName1 = $EventName1."..."; } $EventName=$EventName1; if(!isset($EventsName[$EventDay])) { $EventsName[$EventDay] = null; } if ($EventsName[$EventDay] != null) { @@ -85,8 +85,8 @@ $BirthDay=mysql_result($bdresult,$bdi,"BirthDay"); $BirthMonth=mysql_result($bdresult,$bdi,"BirthMonth"); $BirthYear=mysql_result($bdresult,$bdi,"BirthYear"); $oldusername=$UserNamebd; -$UserNamebd1 = substr($UserNamebd,0,10); -if (strlen($UserNamebd)>10) { $UserNamebd1 = $UserNamebd1."..."; } +$UserNamebd1 = pre_substr($UserNamebd,0,10); +if (pre_strlen($UserNamebd)>10) { $UserNamebd1 = $UserNamebd1."..."; } $UserNamebd=$UserNamebd1; if(!isset($EventsName[$BirthDay])) { $EventsName[$BirthDay] = null; } if ($EventsName[$BirthDay] != null) { diff --git a/inc/categories.php b/inc/categories.php index 99a4ff6..2a157d5 100644 --- a/inc/categories.php +++ b/inc/categories.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: categories.php - Last Update: 10/29/2007 SVN 120 - Author: cooldude2k $ + $FileInfo: categories.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="categories.php"||$File3Name=="/categories.php") { @@ -128,15 +128,15 @@ $NumPages = ceil($NumRPosts/$Settings['max_posts']); } if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } $ShowReply = $NumReplys + 1; -$TopicName1 = substr($TopicName,0,15); -if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } +$TopicName1 = pre_substr($TopicName,0,15); +if (pre_strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } $UsersID=mysql_result($gltresult,0,"UserID"); $GuestName=mysql_result($gltresult,0,"GuestName"); $UsersName = GetUserName($UsersID,$Settings['sqltable']); if($UsersName=="Guest") { $UsersName=$GuestName; if($UsersName==null) { $UsersName="Guest"; } } -$UsersName1 = substr($UsersName,0,18); -if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; +$UsersName1 = pre_substr($UsersName,0,18); +if (pre_strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; $oldtopicname=$TopicName; $oldusername=$UsersName; $TopicName=$TopicName1; $UsersName=$UsersName1; } $lul = null; if($UsersID!="-1") { diff --git a/inc/events.php b/inc/events.php index ed15cfd..65902d6 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: 11/10/2007 SVN 124 - Author: cooldude2k $ + $FileInfo: events.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="events.php"||$File3Name=="/events.php") { @@ -241,86 +241,86 @@ $TimeOut = explode("/",$_POST['EventEnd']);  Make Event Message: -="30") { $Error="Yes"; ?> +="30") { $Error="Yes"; ?>
Your Event Name is too big.
- +
Event Start Month is too small.
-"2") { $Error="Yes"; ?> +"2") { $Error="Yes"; ?>
Event Start Month is too big.
- +
Event Start Day is too small.
-"2") { $Error="Yes"; ?> +"2") { $Error="Yes"; ?>
Event Start Day is too big.
- +
Event Start Year is too small.
-"4") { $Error="Yes"; ?> +"4") { $Error="Yes"; ?>
Event Start Year is too big.
- +
Event End Month is too small.
-"2") { $Error="Yes"; ?> +"2") { $Error="Yes"; ?>
Event End Month is too big.
- +
Event End Day is too small.
-"2") { $Error="Yes"; ?> +"2") { $Error="Yes"; ?>
Event End Day is too big.
- +
Event End Year is too small.
-"4") { $Error="Yes"; ?> +"4") { $Error="Yes"; ?>
Event End Year is too big.
="25") { $Error="Yes"; ?> + pre_strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?>
You Guest Name is too big.
diff --git a/inc/forums.php b/inc/forums.php index 85908bf..67d313b 100644 --- a/inc/forums.php +++ b/inc/forums.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: forums.php - Last Update: 10/29/2007 SVN 120 - Author: cooldude2k $ + $FileInfo: forums.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="forums.php"||$File3Name=="/forums.php") { @@ -114,15 +114,15 @@ $NumPages = ceil($NumRPosts/$Settings['max_posts']); } if($NumRPosts<=$Settings['max_posts']) { $NumPages = 1; } $ShowReply = $NumReplys + 1; -$TopicName1 = substr($TopicName,0,12); -if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } +$TopicName1 = pre_substr($TopicName,0,12); +if (pre_strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } $UsersID=mysql_result($gltresult,0,"UserID"); $GuestName=mysql_result($gltresult,0,"GuestName"); $UsersName = GetUserName($UsersID,$Settings['sqltable']); -$UsersName1 = substr($UsersName,0,18); +$UsersName1 = pre_substr($UsersName,0,18); if($UsersName=="Guest") { $UsersName=$GuestName; if($UsersName==null) { $UsersName="Guest"; } } -if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; +if (pre_strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; $oldtopicname=$TopicName; $oldusername=$UsersName; $TopicName=$TopicName1; $UsersName=$UsersName1; } $lul = null; if($UsersID!="-1") { diff --git a/inc/members.php b/inc/members.php index db8efa3..44cf3b5 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: 11/10/2007 SVN 124 - Author: cooldude2k $ + $FileInfo: members.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="members.php"||$File3Name=="/members.php") { @@ -366,13 +366,13 @@ $REFERERurl = null; unset($REFERERurl); ="30") { $Error="Yes"; ?> +if (pre_strlen($_POST['userpass'])>="30") { $Error="Yes"; ?> -="20") { $Error="Yes"; ?> +="20") { $Error="Yes"; ?> -="30") { $Error="Yes"; ?> +="30") { $Error="Yes"; ?> -="45") { $Error="Yes"; ?> +="45") { $Error="Yes"; ?> ="25") { $Error="Yes"; ?> + pre_strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?>

Your password is too big.

Your user name is too big.
@@ -545,8 +545,8 @@ echo "\n"; }
-="30") { $Error="Yes"; ?> +="30") { $Error="Yes"; ?> -="20") { $Error="Yes"; ?> +="20") { $Error="Yes"; ?> -="25") { $Error="Yes"; ?> +="25") { $Error="Yes"; ?> -="30") { $Error="Yes"; ?> +="30") { $Error="Yes"; ?> -="45") { $Error="Yes"; ?> +="45") { $Error="Yes"; ?> ="25") { $Error="Yes"; ?> + pre_strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?> @@ -392,8 +392,8 @@ if($BirthMonth!=null&&$BirthDay!=null&&$BirthYear!=null) { if($BirthYear=="0") { $BirthYear = "YYYY"; } if($BirthDay=="0") { $BirthDay = "DD"; } if($BirthMonth=="0") { $BirthMonth = "MM"; } - if(strlen($BirthMonth)=="1") { $BirthMonth = "0".$BirthMonth; } - if(strlen($BirthDay)=="1") { $BirthDay = "0".$BirthDay; } + if(pre_strlen($BirthMonth)=="1") { $BirthMonth = "0".$BirthMonth; } + if(pre_strlen($BirthDay)=="1") { $BirthDay = "0".$BirthDay; } $User1Birthday = $BirthMonth."/".$BirthDay."/".$BirthYear; } $tsa_mem = explode(":",$User1TimeZone); $TimeZoneArray = array("offset" => $User1TimeZone, "hour" => $tsa_mem[0], "minute" => $tsa_mem[1]); @@ -451,8 +451,8 @@ echo "\n"; 0:".$showmin." minutes\n"; ++$mini; } ?> @@ -503,14 +503,14 @@ if($_POST['act']=="profile"&& $BirthExpl = explode("/",$_POST['EventDay']); if(count($BirthExpl)=="3") { if(is_numeric($BirthExpl[0])&&is_numeric($BirthExpl[1])&&is_numeric($BirthExpl[2])) { - if(strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; } - if(strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; } - if(strlen($BirthExpl[0])=="2"&&strlen($BirthExpl[1])=="2"&&strlen($BirthExpl[2])=="4") { + if(pre_strlen($BirthExpl[0])=="1") { $BirthExpl[0] = "0".$BirthExpl[0]; } + if(pre_strlen($BirthExpl[1])=="1") { $BirthExpl[1] = "0".$BirthExpl[1]; } + if(pre_strlen($BirthExpl[0])=="2"&&pre_strlen($BirthExpl[1])=="2"&&pre_strlen($BirthExpl[2])=="4") { $BirthIn = mktime(12,12,12,$BirthExpl[0],$BirthExpl[1],$BirthExpl[2]); $BirthMonth=GMTimeChange("m",$BirthIn,0,0,"off"); $BirthDay=GMTimeChange("d",$BirthIn,0,0,"off"); $BirthYear=GMTimeChange("Y",$BirthIn,0,0,"off"); } - if(strlen($BirthExpl[0])!="2"||strlen($BirthExpl[1])!="2"||strlen($BirthExpl[2])!="4") { + if(pre_strlen($BirthExpl[0])!="2"||pre_strlen($BirthExpl[1])!="2"||pre_strlen($BirthExpl[2])!="4") { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } } if (!is_numeric($BirthExpl[0])||!is_numeric($BirthExpl[1])||!is_numeric($BirthExpl[2])) { $BirthMonth="0"; $BirthDay="0"; $BirthYear="0"; } } @@ -606,9 +606,9 @@ if($OldHashType=="iDBH"&&$UpdateHash!=true) { $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha1"); } if($YourPassword!=$OldPassword) { $Error="Yes"; ?>
Your old Password did not match.
 
- +
Your password is too big.
 
- +
Your old password is too big.
 
Your passwords did not match.
 
diff --git a/inc/replys.php b/inc/replys.php index 6320d78..86ff2b0 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: 11/10/2007 SVN 124 - Author: cooldude2k $ + $FileInfo: replys.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="replys.php"||$File3Name=="/replys.php") { @@ -489,14 +489,14 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; } -="45") { $Error="Yes"; ?> +="45") { $Error="Yes"; ?> ="25") { $Error="Yes"; ?> + pre_strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?> -="45") { $Error="Yes"; ?> +="45") { $Error="Yes"; ?> ="25") { $Error="Yes"; ?> + pre_strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?> ="30") { $Error="Yes"; ?> + pre_strlen($_POST['TopicName'])>="30") { $Error="Yes"; ?>

Your password is too big.

Your user name is too big.
diff --git a/inc/misc/utf8.php b/inc/misc/utf8.php new file mode 100644 index 0000000..7ba87ed --- /dev/null +++ b/inc/misc/utf8.php @@ -0,0 +1,74 @@ += $len) + break; + + if ($chr & 0x80) + { + $chr <<= 1; + while ($chr & 0x80) + { + $i++; + $chr <<= 1; + } + } + } + return $count; +} } + +/* substr for UTF-8 - by: felipe @ http://us2.php.net/manual/en/function.substr.php#57899 */ +if($Settings['charset']=="UTF-8") { +function utf8_substr($str,$from,$len){ +# utf8 substr +# www.yeap.lv + return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'. + '((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#s', + '$1',$str); +} } + +function pre_substr($str,$from,$len) { +global $chkcharset; +if($chkcharset=="UTF-8") { +return utf8_substr($str,$from,$len); } +if($chkcharset!="UTF-8") { +return substr($str,$from,$len); } } + +function pre_strlen($str) { +global $chkcharset; +if($chkcharset=="UTF-8") { +return strlen_utf8($str); } +if($chkcharset!="UTF-8") { +return strlen($str); } } + +?> \ No newline at end of file diff --git a/inc/pm.php b/inc/pm.php index 2e4b012..54868d5 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: 11/10/2007 SVN 124 - Author: cooldude2k $ + $FileInfo: pm.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="pm.php"||$File3Name=="/pm.php") { @@ -484,7 +484,7 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
 Make Message:

Send to user name too big.
@@ -496,20 +496,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/profilemain.php b/inc/profilemain.php index 5471a03..d836ac6 100644 --- a/inc/profilemain.php +++ b/inc/profilemain.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: profilemain.php - Last Update: 11/10/2007 SVN 124 - Author: cooldude2k $ + $FileInfo: profilemain.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="profilemain.php"||$File3Name=="/profilemain.php") { @@ -307,8 +307,8 @@ echo "\n"; 0:".$showmin." minutes\n"; ++$mini; } ?>
 Make Reply Message:

Your Reply Description is too big.

You Guest Name is too big.
@@ -893,21 +893,21 @@ if($PermissionInfo['CanEditTopicsClose'][$TopicForumID]=="no"&&$TopicClosed==1)
 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 f389d1b..1ff8a40 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: 10/23/2007 SVN 119 - Author: cooldude2k $ + $FileInfo: searchs.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="searchs.php"||$File3Name=="/searchs.php") { @@ -69,7 +69,7 @@ if($_GET['act']=="topics") {
="25") { +if(pre_strlen($_GET['msearch'])>="25") { $_GET['msearch'] = null; } if($_GET['msearch']!=null) { $memsiquery = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `Name`='%s'", array($_GET['msearch'])); diff --git a/inc/subcategories.php b/inc/subcategories.php index 38a4f1e..1a22614 100644 --- a/inc/subcategories.php +++ b/inc/subcategories.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: subcategories.php - Last Update: 10/29/2007 SVN 120 - Author: cooldude2k $ + $FileInfo: subcategories.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="subcategories.php"||$File3Name=="/subcategories.php") { @@ -135,15 +135,15 @@ $TopicID=mysql_result($gltresult,0,"id"); $TopicName=mysql_result($gltresult,0,"TopicName"); $NumReplys=mysql_result($gltresult,0,"NumReply"); $ShowReply = $NumReplys + 1; -$TopicName1 = substr($TopicName,0,12); -if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } +$TopicName1 = pre_substr($TopicName,0,12); +if (pre_strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } $UsersID=mysql_result($gltresult,0,"UserID"); $GuestName=mysql_result($gltresult,0,"GuestName"); $UsersName = GetUserName($UsersID,$Settings['sqltable']); -$UsersName1 = substr($UsersName,0,18); +$UsersName1 = pre_substr($UsersName,0,18); if($UsersName=="Guest") { $UsersName=$GuestName; if($UsersName==null) { $UsersName="Guest"; } } -if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; +if (pre_strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; $oldtopicname=$TopicName; $oldusername=$UsersName; $TopicName=$TopicName1; $UsersName=$UsersName1; } $lul = null; if($UsersID!="-1") { diff --git a/inc/subforums.php b/inc/subforums.php index 523b2a9..ed945df 100644 --- a/inc/subforums.php +++ b/inc/subforums.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: subforums.php - Last Update: 10/29/2007 SVN 120 - Author: cooldude2k $ + $FileInfo: subforums.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="subforums.php"||$File3Name=="/subforums.php") { @@ -157,15 +157,15 @@ $TopicID=mysql_result($gltresult,0,"id"); $TopicName=mysql_result($gltresult,0,"TopicName"); $NumReplys=mysql_result($gltresult,0,"NumReply"); $ShowReply = $NumReplys + 1; -$TopicName1 = substr($TopicName,0,15); -if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } +$TopicName1 = pre_substr($TopicName,0,15); +if (pre_strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; } $UsersID=mysql_result($gltresult,0,"UserID"); $GuestName=mysql_result($gltresult,0,"GuestName"); $UsersName = GetUserName($UsersID,$Settings['sqltable']); -$UsersName1 = substr($UsersName,0,18); +$UsersName1 = pre_substr($UsersName,0,18); if($UsersName=="Guest") { $UsersName=$GuestName; if($UsersName==null) { $UsersName="Guest"; } } -if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; +if (pre_strlen($UsersName)>15) { $UsersName1 = $UsersName1."..."; $oldtopicname=$TopicName; $oldusername=$UsersName; $TopicName=$TopicName1; $UsersName=$UsersName1; } $LastTopic = "User: ".$UsersName."
\nTopic: ".$TopicName.""; } diff --git a/inc/topics.php b/inc/topics.php index 2e03939..3ad7044 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: 11/10/2007 SVN 124 - Author: cooldude2k $ + $FileInfo: topics.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="topics.php"||$File3Name=="/topics.php") { @@ -363,20 +363,20 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
 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 58eef11..f6e2c92 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: 11/15/2007 SVN 128 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 11/20/2007 SVN 129 - 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] = 2; $VER1[2] = 0; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 128; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 11; $SVNDay[1] = 15; $SVNDay[2] = 2007; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 129; $RName = "iDB"; $SFName = "IntDB"; +$SVNDay[0] = 11; $SVNDay[1] = 20; $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/mysql.php b/mysql.php index 63e88e2..614f177 100644 --- a/mysql.php +++ b/mysql.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: mysql.php - Last Update: 11/15/2007 SVN 128 - Author: cooldude2k $ + $FileInfo: mysql.php - Last Update: 11/20/2007 SVN 129 - Author: cooldude2k $ */ //@ini_set("display_errors", true); //@ini_set("display_startup_errors", true); @@ -46,6 +46,7 @@ if($Settings['charset']!="ISO-8859-15"&&$Settings['charset']!="ISO-8859-1"&& $Settings['charset']!="GB2312"&&$Settings['charset']!="BIG5-HKSCS"&& $Settings['charset']!="Shift_JIS"&&$Settings['charset']!="EUC-JP") { $Settings['charset'] = "ISO-8859-15"; } } + $chkcharset = $Settings['charset']; @ini_set('default_charset', $Settings['charset']); //@session_save_path($SettDir['inc']."temp/"); if(!isset($Settings['sqldb'])) { @@ -79,6 +80,7 @@ if(!isset($_GET['debug'])) { $_GET['debug'] = false; } if(!isset($_GET['post'])) { $_GET['post'] = null; } if(!isset($_POST['License'])) { $_POST['License'] = null; } if(!isset($_SERVER['HTTPS'])) { $_SERVER['HTTPS'] = "off"; } +require_once($SettDir['misc'].'utf8.php'); require_once($SettDir['inc'].'filename.php'); require_once($SettDir['inc'].'function.php'); if($Settings['enable_pathinfo']==true) { -- 2.11.0