OSDN Git Service

Add CAPTCHA System to guest stuff. :P
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Sun, 12 Oct 2008 01:16:05 +0000 (01:16 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Sun, 12 Oct 2008 01:16:05 +0000 (01:16 +0000)
git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@174 2b68903e-0b30-0410-9a39-a2e4f3c5be39

inc/events.php
inc/members.php
inc/pm.php
inc/replys.php
inc/topics.php
inc/versioninfo.php
mysql.php
setup/mkconfig.php

index ded0efb..99f09bc 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: events.php - Last Update: 10/10/2008 SVN 173 - Author: cooldude2k $
+    $FileInfo: events.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="events.php"||$File3Name=="/events.php") {
@@ -190,8 +190,11 @@ echo "</table>";
        <td style="width: 50%;"><input maxlength="30" type="text" name="EventName" class="TextBox" id="EventName" size="20" /></td>
 </tr><?php if($_SESSION['UserGroup']==$Settings['GuestGroup']) { ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="GuestName">Insert Guest Name:</label></td>
+       <?php if(!isset($_SESSION['GuestName'])) { ?>
        <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" /></td>
-</tr><?php } ?><tr style="text-align: left;">
+       <?php } if(isset($_SESSION['GuestName'])) { ?>
+       <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
+</tr><?php } } ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="EventStart">Insert Event Start:</label></td>
        <td style="width: 50%;"><input maxlength="10" type="text" name="EventStart" class="TextBox" id="EventStart" size="20" value="MM/DD/YYYY" /></td>
 </tr><tr style="text-align: left;">
@@ -202,6 +205,10 @@ echo "</table>";
 <table style="text-align: left;">
 <tr style="text-align: left;">
 <td style="width: 100%;">
+<?php if($_SESSION['UserGroup']==$Settings['GuestGroup']&&$Settings['captcha_guest']=="on") { ?>
+<label class="TextBoxLabel" for="signcode"><img src="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=MkCaptcha",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
+<input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br />
+<?php } ?>
 <label class="TextBoxLabel" for="EventText">Insert Event Text:</label><br />
 <textarea rows="10" name="EventText" id="EventText" cols="40" class="TextBox"></textarea><br />
 <input type="hidden" name="act" value="makeevents" style="display: none;" />
@@ -232,6 +239,9 @@ if(!isset($_POST['EventText'])) { $_POST['EventText'] = null; }
 if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
 $TimeIn = explode("/",$_POST['EventStart']);
 $TimeOut = explode("/",$_POST['EventEnd']);
+if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+require($SettDir['inc']."captcha.php"); }
 ?>
 <div class="Table1Border">
 <table class="Table1">
@@ -252,7 +262,17 @@ $TimeOut = explode("/",$_POST['EventEnd']);
        <br />Your Event Name is too big.<br />
        </span>&nbsp;</td>
 </tr>
-<?php } if (pre_strlen($TimeIn[0])<"2") { $Error="Yes";  ?>
+<?php } if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+if (PhpCaptcha::Validate($_POST['signcode'])) {
+//echo 'Valid code entered';
+} else { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Invalid code entered<br />
+       </span>&nbsp;</td>
+</tr>
+<?php } } if (pre_strlen($TimeIn[0])<"2") { $Error="Yes";  ?>
 <tr>
        <td><span class="TableMessage">
        <br />Event Start Month is too small.<br />
@@ -361,6 +381,10 @@ $_POST['EventText'] = stripcslashes(htmlspecialchars($_POST['EventText'], ENT_QU
 //$_POST['EventText'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['EventText']);
 $_POST['EventText'] = remove_bad_entities($_POST['EventText']);
 //$_POST['EventText'] = @remove_spaces($_POST['EventText']);
+if($_SESSION['UserGroup']==$Settings['GuestGroup']) {
+if(isset($_POST['GuestName'])&&$_POST['GuestName']!=null) {
+@setcookie("GuestName", $_POST['GuestName'], time() + (7 * 86400), $cbasedir);
+$_SESSION['GuestName']=$_POST['GuestName']; } }
 /*    <_<  iWordFilter  >_>      
    by Kazuki Przyborowski - Cool Dude 2k */
 $katarzynaqy=query("SELECT * FROM `".$Settings['sqltable']."wordfilter`", array(null));
index 1a108bf..0421d1b 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: members.php - Last Update: 10/10/2008 SVN 173 - Author: cooldude2k $
+    $FileInfo: members.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="members.php"||$File3Name=="/members.php") {
@@ -535,7 +535,11 @@ if($_SESSION['UserID']==0||$_SESSION['UserID']==null) {
 <table style="text-align: left;">
 <tr style="text-align: left;">
        <td style="width: 30%;"><label class="TextBoxLabel" for="Name">Insert a UserName:</label></td>
+       <?php if(!isset($_SESSION['GuestName'])) { ?>
        <td style="width: 70%;"><input maxlength="24" type="text" class="TextBox" name="Name" size="20" id="Name" /></td>
+       <?php } if(isset($_SESSION['GuestName'])) { ?>
+       <td style="width: 70%;"><input maxlength="24" type="text" class="TextBox" name="Name" size="20" id="Name" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
+       <?php } ?>
 </tr><tr>
        <td style="width: 30%;"><label class="TextBoxLabel" for="Password">Insert a Password:</label></td>
        <td style="width: 70%;"><input maxlength="30" type="password" class="TextBox" name="Password" size="20" id="Password" /></td>
@@ -624,7 +628,7 @@ echo "<option value=\"".$showmin."\">0:".$showmin." minutes</option>\n"; }
 </td></tr>
 <tr style="text-align: left;">
 <td style="width: 100%;">
-<label class="TextBoxLabel" for="signcode"><img src="index.php?act=MkCaptcha" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
+<label class="TextBoxLabel" for="signcode"><img src="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=MkCaptcha",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
 <input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br /><?php } ?>
 <input type="hidden" style="display: none;" name="act" value="makemembers" />
 <input type="submit" class="Button" value="Sign UP" />
@@ -651,7 +655,7 @@ $URL['HOST'] = $_SERVER["SERVER_NAME"];
 $REFERERurl = null;
 if(!isset($_POST['username'])) { $_POST['username'] = null; }
 if(!isset($_POST['TOS'])) { $_POST['TOS'] = null; }
- if($Settings['use_captcha']=="on") {
+if($Settings['use_captcha']=="on") {
 require($SettDir['inc']."captcha.php"); }
 ?>
 <div class="Table1Border">
index a28ab50..26fa7ef 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: pm.php - Last Update: 10/10/2008 SVN 173 - Author: cooldude2k $
+    $FileInfo: pm.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="pm.php"||$File3Name=="/pm.php") {
@@ -518,12 +518,19 @@ echo "</table>";
        <td style="width: 50%;"><input maxlength="45" type="text" name="MessageDesc" class="TextBox" id="MessageDesc" size="20" /></td>
 </tr><?php if($_SESSION['UserGroup']==$Settings['GuestGroup']) { ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="GuestName">Insert Guest Name:</label></td>
+       <?php if(!isset($_SESSION['GuestName'])) { ?>
        <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" /></td>
-</tr><?php } ?>
+       <?php } if(isset($_SESSION['GuestName'])) { ?>
+       <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
+</tr><?php } } ?>
 </table>
 <table style="text-align: left;">
 <tr style="text-align: left;">
 <td style="width: 100%;">
+<?php if($_SESSION['UserGroup']==$Settings['GuestGroup']&&$Settings['captcha_guest']=="on") { ?>
+<label class="TextBoxLabel" for="signcode"><img src="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=MkCaptcha",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
+<input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br />
+<?php } ?>
 <label class="TextBoxLabel" for="Message">Insert Your Message:</label><br />
 <textarea rows="10" name="Message" id="Message" cols="40" class="TextBox"></textarea><br />
 <input type="hidden" name="act" value="sendmessages" style="display: none;" />
@@ -548,6 +555,9 @@ if(!isset($_POST['MessageName'])) { $_POST['MessageName'] = null; }
 if(!isset($_POST['MessageDesc'])) { $_POST['MessageDesc'] = null; }
 if(!isset($_POST['Message'])) { $_POST['Message'] = null; }
 if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
+if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+require($SettDir['inc']."captcha.php"); }
 ?>
 <div class="Table1Border">
 <table class="Table1">
@@ -568,7 +578,17 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
        <br />Send to user name too big.<br />
        </span>&nbsp;</td>
 </tr>
-<?php } if ($_POST['SendMessageTo']==null) { $Error="Yes";  ?>
+<?php } if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+if (PhpCaptcha::Validate($_POST['signcode'])) {
+//echo 'Valid code entered';
+} else { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Invalid code entered<br />
+       </span>&nbsp;</td>
+</tr>
+<?php } } if ($_POST['SendMessageTo']==null) { $Error="Yes";  ?>
 <tr>
        <td><span class="TableMessage">
        <br />You need to enter a user name to send message to.<br />
@@ -617,6 +637,10 @@ $_POST['Message'] = stripcslashes(htmlspecialchars($_POST['Message'], ENT_QUOTES
 //$_POST['Message'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['Message']);
 //$_POST['Message'] = @remove_spaces($_POST['Message']);
 $_POST['Message'] = remove_bad_entities($_POST['Message']);
+if($_SESSION['UserGroup']==$Settings['GuestGroup']) {
+if(isset($_POST['GuestName'])&&$_POST['GuestName']!=null) {
+@setcookie("GuestName", $_POST['GuestName'], time() + (7 * 86400), $cbasedir);
+$_SESSION['GuestName']=$_POST['GuestName']; } }
 /*    <_<  iWordFilter  >_>      
    by Kazuki Przyborowski - Cool Dude 2k */
 $katarzynaqy=query("SELECT * FROM `".$Settings['sqltable']."wordfilter`", array(null));
index bbec63a..c34feec 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: replys.php - Last Update: 10/10/2008 SVN 173 - Author: cooldude2k $
+    $FileInfo: replys.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="replys.php"||$File3Name=="/replys.php") {
@@ -468,12 +468,19 @@ echo "</table>";
        <td style="width: 50%;"><input maxlength="45" type="text" name="ReplyDesc" class="TextBox" id="ReplyDesc" size="20" value="<?php echo $QuoteDescription; ?>" /></td>
 </tr><?php if($_SESSION['UserGroup']==$Settings['GuestGroup']) { ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="GuestName">Insert Guest Name:</label></td>
+       <?php if(!isset($_SESSION['GuestName'])) { ?>
        <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" /></td>
-</tr><?php } ?>
+       <?php } if(isset($_SESSION['GuestName'])) { ?>
+       <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
+</tr><?php } } ?>
 </table>
 <table style="text-align: left;">
 <tr style="text-align: left;">
 <td style="width: 100%;">
+<?php if($_SESSION['UserGroup']==$Settings['GuestGroup']&&$Settings['captcha_guest']=="on") { ?>
+<label class="TextBoxLabel" for="signcode"><img src="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=MkCaptcha",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
+<input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br />
+<?php } ?>
 <label class="TextBoxLabel" for="ReplyPost">Insert Your Reply:</label><br />
 <textarea rows="10" name="ReplyPost" id="ReplyPost" cols="40" class="TextBox"><?php echo $QuoteReply; ?></textarea><br />
 <input type="hidden" name="act" value="makereplies" style="display: none;" />
@@ -504,6 +511,9 @@ $REFERERurl = null;
 if(!isset($_POST['ReplyDesc'])) { $_POST['ReplyDesc'] = null; }
 if(!isset($_POST['ReplyPost'])) { $_POST['ReplyPost'] = null; }
 if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
+if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+require($SettDir['inc']."captcha.php"); }
 ?>
 <div class="Table1Border">
 <table class="Table1">
@@ -525,6 +535,16 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
        </span>&nbsp;</td>
 </tr>
 <?php } if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+if (PhpCaptcha::Validate($_POST['signcode'])) {
+//echo 'Valid code entered';
+} else { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Invalid code entered<br />
+       </span>&nbsp;</td>
+</tr>
+<?php } } if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
        pre_strlen($_POST['GuestName'])>="25") { $Error="Yes"; ?>
 <tr>
        <td><span class="TableMessage">
@@ -549,6 +569,10 @@ $_POST['ReplyPost'] = stripcslashes(htmlspecialchars($_POST['ReplyPost'], ENT_QU
 //$_POST['ReplyPost'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['ReplyPost']);
 //$_POST['ReplyPost'] = @remove_spaces($_POST['ReplyPost']);
 $_POST['ReplyPost'] = remove_bad_entities($_POST['ReplyPost']);
+if($_SESSION['UserGroup']==$Settings['GuestGroup']) {
+if(isset($_POST['GuestName'])&&$_POST['GuestName']!=null) {
+@setcookie("GuestName", $_POST['GuestName'], time() + (7 * 86400), $cbasedir);
+$_SESSION['GuestName']=$_POST['GuestName']; } }
 /*    <_<  iWordFilter  >_>      
    by Kazuki Przyborowski - Cool Dude 2k */
 $katarzynaqy=query("SELECT * FROM `".$Settings['sqltable']."wordfilter`", array(null));
index 500fe73..247978e 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: topics.php - Last Update: 10/10/2008 SVN 173 - Author: cooldude2k $
+    $FileInfo: topics.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="topics.php"||$File3Name=="/topics.php") {
@@ -339,8 +339,11 @@ echo "</table>";
        <td style="width: 50%;"><input maxlength="30" type="text" name="TopicName" class="TextBox" id="TopicName" size="20" /></td>
 </tr><?php if($_SESSION['UserGroup']==$Settings['GuestGroup']) { ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="GuestName">Insert Guest Name:</label></td>
+       <?php if(!isset($_SESSION['GuestName'])) { ?>
        <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" /></td>
-</tr><?php } ?><tr style="text-align: left;">
+       <?php } if(isset($_SESSION['GuestName'])) { ?>
+       <td style="width: 50%;"><input maxlength="25" type="text" name="GuestName" class="TextBox" id="GuestName" size="20" value="<?php echo $_SESSION['GuestName']; ?>" /></td>
+</tr><?php } } ?><tr style="text-align: left;">
        <td style="width: 50%;"><label class="TextBoxLabel" for="TopicDesc">Insert Topic Description:</label></td>
        <td style="width: 50%;"><input maxlength="45" type="text" name="TopicDesc" class="TextBox" id="TopicDesc" size="20" /></td>
 </tr>
@@ -348,6 +351,10 @@ echo "</table>";
 <table style="text-align: left;">
 <tr style="text-align: left;">
 <td style="width: 100%;">
+<?php if($_SESSION['UserGroup']==$Settings['GuestGroup']&&$Settings['captcha_guest']=="on") { ?>
+<label class="TextBoxLabel" for="signcode"><img src="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=MkCaptcha",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>" alt="CAPTCHA Code" title="CAPTCHA Code" /></label><br />
+<input maxlength="25" type="text" class="TextBox" name="signcode" size="20" id="signcode" value="Enter SignCode" /><br />
+<?php } ?>
 <label class="TextBoxLabel" for="TopicPost">Insert Your Post:</label><br />
 <textarea rows="10" name="TopicPost" id="TopicPost" cols="40" class="TextBox"></textarea><br />
 <input type="hidden" name="act" value="maketopics" style="display: none;" />
@@ -376,6 +383,9 @@ 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; }
+if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+require($SettDir['inc']."captcha.php"); }
 ?>
 <div class="Table1Border">
 <table class="Table1">
@@ -396,7 +406,17 @@ if(!isset($_POST['GuestName'])) { $_POST['GuestName'] = null; }
        <br />Your Topic Name is too big.<br />
        </span>&nbsp;</td>
 </tr>
-<?php } if (pre_strlen($_POST['TopicDesc'])>="45") { $Error="Yes";  ?>
+<?php } if($_SESSION['UserGroup']==$Settings['GuestGroup']&&
+       $Settings['captcha_guest']=="on") {
+if (PhpCaptcha::Validate($_POST['signcode'])) {
+//echo 'Valid code entered';
+} else { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Invalid code entered<br />
+       </span>&nbsp;</td>
+</tr>
+<?php } } if (pre_strlen($_POST['TopicDesc'])>="45") { $Error="Yes";  ?>
 <tr>
        <td><span class="TableMessage">
        <br />Your Topic Description is too big.<br />
@@ -430,6 +450,10 @@ $_POST['TopicPost'] = stripcslashes(htmlspecialchars($_POST['TopicPost'], ENT_QU
 //$_POST['TopicPost'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['TopicPost']);
 $_POST['TopicPost'] = remove_bad_entities($_POST['TopicPost']);
 //$_POST['TopicPost'] = @remove_spaces($_POST['TopicPost']);
+if($_SESSION['UserGroup']==$Settings['GuestGroup']) {
+if(isset($_POST['GuestName'])&&$_POST['GuestName']!=null) {
+@setcookie("GuestName", $_POST['GuestName'], time() + (7 * 86400), $cbasedir);
+$_SESSION['GuestName']=$_POST['GuestName']; } }
 /*    <_<  iWordFilter  >_>      
    by Kazuki Przyborowski - Cool Dude 2k */
 $katarzynaqy=query("SELECT * FROM `".$Settings['sqltable']."wordfilter`", array(null));
index 2baff7b..741a34a 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: versioninfo.php - Last Update: 10/10/2008 SVN 173 - Author: cooldude2k $
+    $FileInfo: versioninfo.php - Last Update: 10/11/2008 SVN 174 - 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] = 3; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 173; $RName = "iDB"; $SFName = "IntDB";
-$SVNDay[0] = 10; $SVNDay[1] = 10; $SVNDay[2] = 2008; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 174; $RName = "iDB"; $SFName = "IntDB";
+$SVNDay[0] = 10; $SVNDay[1] = 11; $SVNDay[2] = 2008; $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);
index b0f1e11..f057800 100644 (file)
--- a/mysql.php
+++ b/mysql.php
@@ -11,7 +11,7 @@
     Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
 
-    $FileInfo: mysql.php - Last Update: 09/26/2008 SVN 172 - Author: cooldude2k $
+    $FileInfo: mysql.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 //@ini_set("display_errors", true); 
 //@ini_set("display_startup_errors", true);
@@ -27,6 +27,7 @@ if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
        require_once($SettDir['misc'].'killglobals.php'); }
 require('settings.php');
 $Settings['use_captcha'] = "on";
+$Settings['captcha_guest'] = "on";
 $Settings['captcha_clean'] = "off";
 if($Settings['fixbasedir']===true) {
 if($Settings['idburl']!=null&&$Settings['idburl']!="localhost") {
@@ -232,6 +233,14 @@ if($Settings['DefaultDST']=="off") {
        $_SESSION['UserDST'] = "off"; }
 if($Settings['DefaultDST']=="on") { 
        $_SESSION['UserDST'] = "on"; } }
+// Guest Stuff
+if(isset($_SESSION['MemberName'])||
+   isset($_COOKIE['MemberName'])) {
+       $_SESSION['GuestName'] = null;
+       $_COOKIE['GuestName'] = null; }
+if(!isset($_SESSION['MemberName'])&&!isset($_COOKIE['MemberName'])) {
+if(!isset($_SESSION['GuestName'])&&isset($_COOKIE['GuestName'])) {
+       $_SESSION['GuestName'] = $_COOKIE['GuestName']; } }
 // Skin Stuff
 if(!isset($_SESSION['Theme'])) { $_SESSION['Theme'] = null; }
 if(!isset($_GET['theme'])) { $_GET['theme'] = null; }
index fdced34..1718935 100644 (file)
@@ -12,7 +12,7 @@
     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
     iDB Installer made by Game Maker 2k - http://idb.berlios.net/
 
-    $FileInfo: mkconfig.php - Last Update: 05/31/2008 SVN 164 - Author: cooldude2k $
+    $FileInfo: mkconfig.php - Last Update: 10/11/2008 SVN 174 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="mkconfig.php"||$File3Name=="/mkconfig.php") {
@@ -92,7 +92,7 @@ echo "<br />".mysql_errno().": ".mysql_error()."\n"; }
 if ($Error!="Yes") {
 require($SetupDir['setup'].'mktable.php');
 /*
-$query = query("INSERT INTO `".$_POST['tableprefix']."tagboard` VALUES (1,-1,'Cool Dude 2k',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
+$query = query("INSERT INTO `".$_POST['tableprefix']."tagboard` VALUES (1,-1,'Kazuki',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1'), array(null)); 
 */
 $query = query("INSERT INTO `".$_POST['tableprefix']."categories` VALUES (1,1,'Main','yes','category','yes',0,'The Main Category.')", array(null));
 mysql_query($query);
@@ -115,13 +115,13 @@ $EventDay = GMTimeChange("d",$YourDate,0,0,"off");
 $EventDayEnd = GMTimeChange("d",$YourDateEnd,0,0,"off");
 $EventYear = GMTimeChange("Y",$YourDate,0,0,"off");
 $EventYearEnd = GMTimeChange("Y",$YourDateEnd,0,0,"off");
-$query = query("INSERT INTO `".$_POST['tableprefix']."events` VALUES (1, -1, 'Cool Dude 2k', 'Opening', 'This is the day the Board was made. ^_^', %i, %i, %i, %i, %i, %i, %i, %i)", array($YourDate,$YourDateEnd,$EventMonth,$EventMonthEnd,$EventDay,$EventDayEnd,$EventYear,$EventYearEnd));
+$query = query("INSERT INTO `".$_POST['tableprefix']."events` VALUES (1, -1, 'Kazuki', 'Opening', 'This is the day the Board was made. ^_^', %i, %i, %i, %i, %i, %i, %i, %i)", array($YourDate,$YourDateEnd,$EventMonth,$EventMonthEnd,$EventDay,$EventDayEnd,$EventYear,$EventYearEnd));
 mysql_query($query);
 $query = query("INSERT INTO `".$_POST['tableprefix']."forums` VALUES (1,1,1,'Test/Spam','yes','forum',0,'http://',0,0,'A Test Board.','off','yes',1,1)", array(null));
 mysql_query($query);
-$query = query("INSERT INTO `".$_POST['tableprefix']."topics` VALUES (1,1,1,-1,'Cool Dude 2k',%i,%i,'Welcome','Install was successful',0,0,1,1)", array($YourDate,$YourDate));
+$query = query("INSERT INTO `".$_POST['tableprefix']."topics` VALUES (1,1,1,-1,'Kazuki',%i,%i,'Welcome','Install was successful',0,0,1,1)", array($YourDate,$YourDate));
 mysql_query($query);
-$query = query("INSERT INTO `".$_POST['tableprefix']."posts` VALUES (1,1,1,1,-1,'Cool Dude 2k',%i,%i,1,'Welcome to Your Message Board. :) ','Install was successful','127.0.0.1','127.0.0.1')", array($YourDate,$YourEditDate)); 
+$query = query("INSERT INTO `".$_POST['tableprefix']."posts` VALUES (1,1,1,1,-1,'Kazuki',%i,%i,1,'Welcome to Your Message Board. :) ','Install was successful','127.0.0.1','127.0.0.1')", array($YourDate,$YourEditDate)); 
 mysql_query($query);
 $NewPassword = b64e_hmac($_POST['AdminPasswords'],$YourDate,$YourSalt,"sha1");
 //$Name = stripcslashes(htmlspecialchars($AdminUser, ENT_QUOTES, $Settings['charset']));
@@ -146,7 +146,7 @@ $query = query("INSERT INTO `".$_POST['tableprefix']."members` VALUES (-1,'Guest
 mysql_query($query);
 $query = query("INSERT INTO `".$_POST['tableprefix']."members` VALUES (1,'%s','%s','iDBH','%s',1,'yes',0,'%s','Admin',%i,%i,'0','0','0','0','%s','Your Notes','%s','100x100','%s','UnKnow',0,'%s','%s','iDB','%s','%s')", array($_POST['AdminUser'],$NewPassword,$Email,$Interests,$YourDate,$YourDate,$NewSignature,$Avatar,$YourWebsite,$AdminTime,$AdminDST,$UserIP,$YourSalt));
 mysql_query($query);
-$query = query("INSERT INTO `".$_POST['tableprefix']."messenger` VALUES (1,-1,1,'Cool Dude 2k','Test','Hello Welcome to your board.\r\nThis is a Test PM. :P ','Hello Welcome',%i,0)", array($YourDate));
+$query = query("INSERT INTO `".$_POST['tableprefix']."messenger` VALUES (1,-1,1,'Kazuki','Test','Hello Welcome to your board.\r\nThis is a Test PM. :P ','Hello Welcome',%i,0)", array($YourDate));
 mysql_query($query);
 $CHMOD = $_SERVER['PHP_SELF'];
 $pretext = "<?php\n/*\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    Revised BSD License for more details.\n\n    Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/\n    Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/\n    iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n    \$FileInfo: settings.php & settingsbak.php - Last Update: ".$SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]." SVN ".$SubVerN." - Author: cooldude2k \$\n*/\n";