OSDN Git Service

Update SVN to iDB 0.1.5 SVN 1
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Wed, 9 May 2007 16:35:23 +0000 (16:35 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Wed, 9 May 2007 16:35:23 +0000 (16:35 +0000)
git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@1 2b68903e-0b30-0410-9a39-a2e4f3c5be39

84 files changed:
LICENSE [new file with mode: 0644]
README [new file with mode: 0644]
TOS [new file with mode: 0644]
calendar.php [new file with mode: 0644]
category.php [new file with mode: 0644]
event.php [new file with mode: 0644]
forum.php [new file with mode: 0644]
inc/admin/index.php [new file with mode: 0644]
inc/calendars.php [new file with mode: 0644]
inc/categories.php [new file with mode: 0644]
inc/endpage.php [new file with mode: 0644]
inc/events.php [new file with mode: 0644]
inc/filename.php [new file with mode: 0644]
inc/forums.php [new file with mode: 0644]
inc/function.php [new file with mode: 0644]
inc/index.php [new file with mode: 0644]
inc/javascript.php [new file with mode: 0644]
inc/members.php [new file with mode: 0644]
inc/misc/compression.php [new file with mode: 0644]
inc/misc/functions.php [new file with mode: 0644]
inc/misc/index.php [new file with mode: 0644]
inc/misc/killglobals.php [new file with mode: 0644]
inc/misc/setcheck.php [new file with mode: 0644]
inc/mod/index.php [new file with mode: 0644]
inc/navbar.php [new file with mode: 0644]
inc/pm.php [new file with mode: 0644]
inc/prelogin.php [new file with mode: 0644]
inc/profilemain.php [new file with mode: 0644]
inc/replys.php [new file with mode: 0644]
inc/rss.gif [new file with mode: 0644]
inc/rssfeed.php [new file with mode: 0644]
inc/stats.php [new file with mode: 0644]
inc/subcategories.php [new file with mode: 0644]
inc/subforums.php [new file with mode: 0644]
inc/topics.php [new file with mode: 0644]
inc/xhtml10.php [new file with mode: 0644]
inc/xhtml11.php [new file with mode: 0644]
index.php [new file with mode: 0644]
install.php [new file with mode: 0644]
javascript.js [new file with mode: 0644]
member.php [new file with mode: 0644]
messenger.php [new file with mode: 0644]
mysql.php [new file with mode: 0644]
preindex.php [new file with mode: 0644]
profile.php [new file with mode: 0644]
rss.php [new file with mode: 0644]
settings.php [new file with mode: 0644]
settingsbak.php [new file with mode: 0644]
setup/convert/index.php [new file with mode: 0644]
setup/convert/info.php [new file with mode: 0644]
setup/index.php [new file with mode: 0644]
setup/license.php [new file with mode: 0644]
setup/mkconfig.php [new file with mode: 0644]
setup/mktable.php [new file with mode: 0644]
setup/presetup.php [new file with mode: 0644]
setup/setup.php [new file with mode: 0644]
smileys/README [new file with mode: 0644]
smileys/angry.gif [new file with mode: 0644]
smileys/cool.gif [new file with mode: 0644]
smileys/hmm.gif [new file with mode: 0644]
smileys/huh.gif [new file with mode: 0644]
smileys/index.php [new file with mode: 0644]
smileys/laugh.gif [new file with mode: 0644]
smileys/mad.gif [new file with mode: 0644]
smileys/ohmy.gif [new file with mode: 0644]
smileys/sad.gif [new file with mode: 0644]
smileys/sleep.gif [new file with mode: 0644]
smileys/smile.gif [new file with mode: 0644]
smileys/sweat.gif [new file with mode: 0644]
smileys/tongue.gif [new file with mode: 0644]
smileys/tongue2.gif [new file with mode: 0644]
smileys/wub.gif [new file with mode: 0644]
smileys/x.gif [new file with mode: 0644]
subcategory.php [new file with mode: 0644]
subforum.php [new file with mode: 0644]
themes/iDB/css.css [new file with mode: 0644]
themes/iDB/favicon.ico [new file with mode: 0644]
themes/iDB/grad.png [new file with mode: 0644]
themes/iDB/index.php [new file with mode: 0644]
themes/iDB/info.php [new file with mode: 0644]
themes/iDB/noavatar.png [new file with mode: 0644]
themes/iDB/settings.php [new file with mode: 0644]
themes/index.php [new file with mode: 0644]
topic.php [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..b7925dc
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,34 @@
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+Copyright (c) 2004-2007 Game Maker 2k
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  1. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+
+  2. Redistributions in binary form must reproduce the above copyright 
+     notice, this list of conditions and the following disclaimer in 
+     the documentation and/or other materials provided with the distribution.
+
+  3. Neither the name of Game Maker 2k nor the names of its contributors
+     may be used to endorse or promote products derived from this software
+     without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
+THE POSSIBILITY OF SUCH DAMAGE.
+
+Important Note: The Emoticons distributed with the Software were
+created by Jcink; its usage is not governed under the terms of
+this license agreement. Information regarding its usage can be
+found on textfileBB's Web site at http://tfbb.jcink.com/.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..39042cf
--- /dev/null
+++ b/README
@@ -0,0 +1,85 @@
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+//                       __________________________________________
+//                      //        Internet Discussion Boards      \\
+//                      ||          Made by Game Maker 2k:         ||
+//                      ||Cool Dude 2k http://intdb.sourceforge.net||
+//                      || Help to make Internet Discussion Boards ||
+//                      ||        Jcink ( http://jcink2k.com/ )    ||
+//                      ||           Dubbs Rules ( unknown )       ||
+//                      ||            Renee S ( unknown )          ||
+//                      ||    deat ( http://www.gprogress.com/ )   ||
+//                      ||   SSS ( http://sss2005.s1.jcink.com/ )  ||
+//                      ||    SeanJ ( http://seanj.jcink.com/ )    ||
+//                      ||            Jonathan ( unknown )         ||
+//                      ||            czambran ( unknown )         ||
+//                      \\       (c) 2004-2007 Game Maker 2k      //
+//                       """"""""""""""""""""""""""""""""""""""""""
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/ http://idb.berlios.net/
+// Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/ 
+// http://s1.jcink.com/s/host/idb/  http://idb.everywebhost.com/  http://cooldude2k.id.funpic.org/
+//             Game Maker 2k Copyright 2000-2007 Cool Dude 2k (René Johnson)
+// Emoticons made by Jcink for TextfileBB (http://tfbb.jcink.com/) Under TFBB License
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// iDB Installer made by Game Maker 2k - http://upload.idb.s1.jcink.com/
+// How to delete installer if error happens:
+// Delete install.php file and the setup folder/dir and everyting inside it also.
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// Important Note: The Emoticons distributed with the Software were
+// created by Jcink; its usage is not governed under the terms of
+// this license agreement. Information regarding its usage can be
+// found on textfileBB's Web site at http://tfbb.jcink.com/.
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// Emoticons made by Jcink for TextfileBB (http://tfbb.jcink.com/) Under TFBB License
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+//                         ______________________________________
+//                        //     Also Get PHP-Quick-Arcade      \\
+//                        ||          And TextFileBB             ||
+//                        ||Website: http://quickarcade.jcink.com||
+//                        ||Website: http://tfbb.jcink.com       ||
+//                        ||  by: Jcink ( http://jcink2k.com/ )  ||
+//                        ||         (c) 2007 Jcink              ||
+//                        \\                                    //
+//                         """"""""""""""""""""""""""""""""""""""
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// This program is free software; you can redistribute it and/or modify           
+// it under the terms of the Revised BSD License.                                        
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// This program is distributed in the hope that it will be useful,                    
+// but WITHOUT ANY WARRANTY; without even the implied warranty of         
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         
+// Revised BSD License for more details.                                              
+// Read LICENSE for more info.
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.     
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+//                                  About Free Software: 
+// Free software is not just free of cost (like "free beer").
+// It is free as in freedom (like "free speech").
+// Free software gives you the freedom to use a program,
+// study how it works, improve it, and share it with others.
+// For more information, visit the Free Software Foundation.(http://www.fsf.org/)
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// List Can be fond at http://upload.idb.s1.jcink.com/index.php/topic,103.0.html
+// Free WebHosts
+// Hosts that iDB Works on
+//     * http://freejcinkhosting.afraid.org:81/
+//     * http://funpic.org/
+//     * http://5gigs.com/
+//     * http://www.lycos.co.uk/
+//     * http://www.100webspace.com/
+//     * http://www.globalweb.com.ru/ 
+// Hosts that iDB dose not work on
+//     * http://awardspace.com/
+// Paid WebHosts
+// Hosts that iDB Works on
+//     * Unknow
+// Hosts that iDB dose not works on
+//     * Unknow
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/TOS b/TOS
new file mode 100644 (file)
index 0000000..28f8409
--- /dev/null
+++ b/TOS
@@ -0,0 +1,21 @@
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+Please remember that we are not responsible for any 
+messages posted. We do not vouch for or warrant the 
+accuracy, completeness or usefulness of any message, 
+and are not responsible for the contents of any message. 
+The messages express the views of the author of the 
+message, not necessarily the views of this BB. Any user 
+who feels that a posted message is objectionable is 
+encouraged to contact us immediately by email. We have 
+the ability to remove objectionable messages and we will 
+make every effort to do so, within a reasonable time 
+frame, if we determine that removal is necessary. You 
+agree, through your use of this service, that you will 
+not use this BB to post any material which is knowingly 
+false and/or defamatory, inaccurate, abusive, vulgar, 
+hateful, harassing, obscene, profane, sexually oriented, 
+threatening, invasive of a person's privacy, or 
+otherwise violative of any law. You agree not to post 
+any copyrighted material unless the copyright is owned 
+by you or by this BB.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
diff --git a/calendar.php b/calendar.php
new file mode 100644 (file)
index 0000000..82547c1
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: calendar.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['calendar'].$usefileext.$_SERVER['PATH_INFO'];
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php
+require($SettDir['inc'].'navbar.php');
+
+if($_GET['act']==null) {
+$_GET['act']="view"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'calendars.php'); }
+require($SettDir['inc'].'endpage.php'); ?>
+</body>
+</html>
+<?php
+change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Calendar",$Settings['use_gzip']);
+?>
diff --git a/category.php b/category.php
new file mode 100644 (file)
index 0000000..600dcd9
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: category.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['category'].$usefileext.$_SERVER['PATH_INFO'];
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'categories.php'); }
+require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php
+change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Category ".$CategoryName,$Settings['use_gzip']);
+?>
diff --git a/event.php b/event.php
new file mode 100644 (file)
index 0000000..ec4cec4
--- /dev/null
+++ b/event.php
@@ -0,0 +1,41 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: event.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['event'].$usefileext.$_SERVER['PATH_INFO'];
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+require($SettDir['inc'].'navbar.php');
+if($_GET['act']=="event"){ $_GET['act']="view"; }
+
+if($_GET['act']=="view"||$_GET['act']==null) {
+$_GET['act']="view";
+require($SettDir['inc'].'events.php'); } ?>
+<div>&nbsp;</div>
+<?php require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Event ".$EventName,$Settings['use_gzip']); ?>
diff --git a/forum.php b/forum.php
new file mode 100644 (file)
index 0000000..cc42ab9
--- /dev/null
+++ b/forum.php
@@ -0,0 +1,43 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['forum'].$usefileext.$_SERVER['PATH_INFO'];
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($Settings['enable_rss']==true) {
+?>
+<link rel="alternate" type="application/rss+xml" title="Forum Topics RSS Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=rss&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
+<link rel="alternate" type="application/rss+xml" title="Forum Topics Atom Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=atom&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
+<?php } ?>
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+$ForumCheck = null;
+if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'topics.php'); } 
+require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Forum ".$ForumName,$Settings['use_gzip']); ?>
diff --git a/inc/admin/index.php b/inc/admin/index.php
new file mode 100644 (file)
index 0000000..32439df
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../../index.php');
+?>
\ No newline at end of file
diff --git a/inc/calendars.php b/inc/calendars.php
new file mode 100644 (file)
index 0000000..d83fb12
--- /dev/null
@@ -0,0 +1,122 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="calendars.php"||$File3Name=="/calendars.php") {
+       require('index.php');
+       exit(); }
+// Count the Days in this month
+$MyTimeStamp = GMTimeStamp();
+$CountDays = GMTimeGet("t",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyDay = GMTimeGet("j",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyDay2 = GMTimeGet("jS",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyDayName = GMTimeGet("l",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyYear = GMTimeGet("Y",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyYear2 = GMTimeGet("y",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyMonth = GMTimeGet("m",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyTimeStamp1 = mktime("0","0","0",$MyMonth,"1",$MyYear);
+$MyTimeStamp2 = mktime("24","59","59",$MyMonth,$CountDays,$MyYear);
+$MyMonthName = GMTimeGet("F",$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$FirstDayThisMouth = date("w", mktime(0, 0, 0, $MyMonth, 1, $MyYear));
+$EventsName = array();
+$query = query("select * from ".$Settings['sqltable']."events where TimeStamp>=%i and TimeStampEnd<=%i", array($MyTimeStamp1,$MyTimeStamp2));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$is=0;
+while ($is < $num) {
+$EventID=mysql_result($result,$is,"id");
+$EventUser=mysql_result($result,$is,"UserID");
+$EventGuest=mysql_result($result,$is,"GuestName");
+$EventName=mysql_result($result,$is,"EventName");
+$EventText=mysql_result($result,$is,"EventText");
+$EventStart=mysql_result($result,$is,"TimeStamp");
+$EventEnd=mysql_result($result,$is,"TimeStampEnd");
+$EventDay = GMTimeChange("j",$EventStart,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$EventDayEnd = GMTimeChange("j",$EventEnd,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$oldeventname=$EventName;
+$EventName1 = substr($EventName,0,10);
+if (strlen($EventName)>10) { $EventName1 = $EventName1."..."; }
+$EventName=$EventName1;
+if ($EventsName[$EventDay] != null) {
+       $EventsName[$EventDay] .= ",\n\r<a href=\"".url_maker($exfile['event'],$Settings['file_ext'],"act=event&id=".$EventID,$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event'])."\" style=\"font-size: 9px;\" title=\"View Event ".$oldeventname.".\">".$EventName."</a>";        }
+if ($EventsName[$EventDay] == null) {
+       $EventsName[$EventDay] = "<a href=\"".url_maker($exfile['event'],$Settings['file_ext'],"act=event&id=".$EventID,$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event'])."\" style=\"font-size: 9px;\" title=\"View Event ".$oldeventname.".\">".$EventName."</a>"; }
+if ($EventDay<$EventDayEnd) {
+$NextDay = $EventDay+1;
+$EventDayEnd = $EventDayEnd+1;
+while ($NextDay < $EventDayEnd) {
+if ($EventsName[$NextDay] != null) {
+       $EventsName[$NextDay] .= ",\n\r<a href=\"".url_maker($exfile['event'],$Settings['file_ext'],"act=event&id=".$EventID,$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event'])."\" style=\"font-size: 9px;\" title=\"View Event ".$oldeventname.".\">".$EventName."</a>";         }
+if ($EventsName[$NextDay] == null) {
+       $EventsName[$NextDay] = "<a href=\"".url_maker($exfile['event'],$Settings['file_ext'],"act=event&id=".$EventID,$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event'])."\" style=\"font-size: 9px;\" title=\"View Event ".$oldeventname.".\">".$EventName."</a>"; }
+$NextDay++; } }
+$EventsID[$EventDay] = $EventID;
+$is++;
+} @mysql_free_result($result);
+$MyDays = array();
+$MyDays[] = "Sunday";
+$MyDays[] = "Monday";
+$MyDays[] = "Tuesday";
+$MyDays[] = "Wednesday";
+$MyDays[] = "Thursday";
+$MyDays[] = "Friday";
+$MyDays[] = "Saturday";
+$DayNames = "";
+foreach ($MyDays as $x => $y) {
+    $DayNames .= '<th class="TableRow2" style="width: 12%;">' . $y . '</th>'."\r\n";
+}
+$WeekDays = "";
+$i = $FirstDayThisMouth + 1;
+if ($FirstDayThisMouth != "0") {
+    $WeekDays .= '<td class="TableRow3" align="center" colspan="' . $FirstDayThisMouth . '">&nbsp;</td>'."\r\n";
+}
+$Day_i = "1";
+$ii = $i;
+for ($i; $i <= ($CountDays + $FirstDayThisMouth) ;$i++) {
+if ($ii == 8) {
+$WeekDays .= "</tr><tr class=\"TableRow3\">"."\r\n";
+$ii = 1; }
+ if ($MyDay == $Day_i) {
+$Extra = 'class="TableRow3"'; }
+else {
+$Extra = 'class="TableRow2"'; }
+if ($Day_i != $_GET['HighligtDay']) {
+if ($Day_i != $MyDay) {
+$WeekDays .= '<td class="TableRow3" style="height: 60px; vertical-align: top;">' . $Day_i . '<div style="text-align: left;">' . $EventsName[$Day_i] . '</div></td>'."\r\n";     }      }
+if ($Day_i == $MyDay) {
+$WeekDays .= '<td class="TableRow3" style="height: 60px; vertical-align: top;">' . $Day_i . '<div style="text-align: left;">' . $EventsName[$Day_i] . '</div></td>'."\r\n";     }
+$Day_i++;
+$ii++;
+}
+if ((8 - $ii) >= "1") {
+$WeekDays .= '<td class="TableRow3" align="center" colspan="' . (8 - $ii) . '">&nbsp;</td>'."\r\n"; } ?>
+<div class="Table1Border">
+<table class="Table1"><tr class="TableRow1">
+<th class="TableRow1" colspan="7">
+<span style="float: left;"><?php echo $ThemeSet['TitleIcon']; ?><?php echo "Today is ".$MyDayName." the ".$MyDay2." of ".$MyMonthName.", ".$MyYear; ?></span>
+<span style="float: right;"><?php echo "The time is ".GMTimeGet('g:i a',$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']); ?>&nbsp;</span>
+</th>
+</tr><tr class="TableRow2">
+<?php echo $DayNames; ?>
+</tr><tr class="TableRow3">
+<?php echo $WeekDays; ?>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4" colspan="7">&nbsp;</td>
+</tr>
+</table></div>
+<div>&nbsp;</div>
diff --git a/inc/categories.php b/inc/categories.php
new file mode 100644 (file)
index 0000000..c3305ef
--- /dev/null
@@ -0,0 +1,146 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: categories.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name=="categories.php"||$File3Name=="/categories.php") {\r
+       require('index.php');\r
+       exit(); }\r
+$prequery = query("select * from ".$Settings['sqltable']."categories where ID=%i and ShowCategory='yes'", array($_GET['id']));\r
+$preresult=mysql_query($prequery);\r
+$prenum=mysql_num_rows($preresult);\r
+$prei=0;\r
+if($prenum==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }\r
+while ($prei < $prenum) {\r
+$CategoryID=mysql_result($preresult,$prei,"id");\r
+$CategoryName=mysql_result($preresult,$prei,"Name");\r
+$CategoryShow=mysql_result($preresult,$prei,"ShowCategory");\r
+$CategoryType=mysql_result($preresult,$prei,"CategoryType");\r
+$SubShowForums=mysql_result($preresult,$prei,"SubShowForums");\r
+$CategoryDescription=mysql_result($preresult,$prei,"Description");\r
+$CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);\r
+if($CatCheck!="skip") {\r
+if($CategoryType=="subcategory") {\r
+redirect("location",$basedir.url_maker($exfile['subcategory'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['subcategory'],$exqstr['subcategory'],FALSE)); } }\r
+$toggle=""; $togglecode = "<span style=\"float: right;\">&nbsp;</span>";\r
+if($ThemeSet['EnableToggle']==true) {\r
+/*     Toggle Code     */\r
+$query2 = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and CategoryID=%i and InSubForum='0' ORDER BY ID", array($CategoryID));\r
+$result2=mysql_query($query2);\r
+$num2=mysql_num_rows($result2);\r
+$i2=0;\r
+$toggle="";\r
+while ($i2 < $num2) {\r
+$ForumID=mysql_result($result2,$i2,"id");\r
+$i3=$i2+1;\r
+if ($i3!=$num2) {\r
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }\r
+if ($i3==$num2) {\r
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }\r
+if ($i3==$num2) {\r
+$toggle=$toggle."toggletag('Cat".$CategoryID."'),toggletag('CatEnd');return false;"; }\r
+++$i2; }\r
+if($toggle==null) { $toggle="toggletag('Cat".$CategoryID."'),toggletag('CatEnd');return false;"; }\r
+@mysql_free_result($result2);\r
+$togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#Toggle".$CategoryID."\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }\r
+if($ThemeSet['EnableToggle']==false) { $toggle="";\r
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>"; }\r
+?>\r
+<div class="Table1Border">\r
+<table class="Table1">\r
+<tr class="TableRow1">\r
+<td class="TableRow1" colspan="5"><span style="float: left;">\r
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile[$CategoryType],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$CategoryType],$exqstr[$CategoryType]); ?>" id="Toggle<?php echo $CategoryID; ?>"><?php echo $CategoryName; ?></a></span>\r
+<?php echo $togglecode; ?></td>\r
+</tr>\r
+<?php\r
+$query = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and CategoryID=%i and InSubForum=0 ORDER BY ID", array($CategoryID));\r
+$result=mysql_query($query);\r
+$num=mysql_num_rows($result);\r
+$i=0;\r
+if($num>=1) {\r
+?>\r
+<tr id="Cat<?php echo $CategoryID; ?>" class="TableRow2">\r
+<th class="TableRow2" style="width: 4%;">&nbsp;</th>\r
+<th class="TableRow2" style="width: 58%;">Forum</th>\r
+<th class="TableRow2" style="width: 7%;">Topics</th>\r
+<th class="TableRow2" style="width: 7%;">Posts</th>\r
+<th class="TableRow2" style="width: 24%;">Last Topic</th>\r
+</tr>\r
+<?php }\r
+while ($i < $num) {\r
+$ForumID=mysql_result($result,$i,"id");\r
+$ForumName=mysql_result($result,$i,"Name");\r
+$ForumShow=mysql_result($result,$i,"ShowForum");\r
+$ForumType=mysql_result($result,$i,"ForumType");\r
+$NumTopics=mysql_result($result,$i,"NumTopics");\r
+$NumPosts=mysql_result($result,$i,"NumPosts");\r
+$ForumDescription=mysql_result($result,$i,"Description");\r
+unset($LastTopic);\r
+$gltquery = query("select * from ".$Settings['sqltable']."topics where (CategoryID=%i and ForumID=%i) ORDER BY LastUpdate DESC", array($CategoryID,$ForumID));\r
+$gltresult=mysql_query($gltquery);\r
+$gltnum=mysql_num_rows($gltresult);\r
+if($gltnum>0){\r
+$TopicID=mysql_result($gltresult,0,"id");\r
+$TopicName=mysql_result($gltresult,0,"TopicName");\r
+$NumReplys=mysql_result($gltresult,0,"NumReply");\r
+$ShowReply = $NumReplys + 1;\r
+$TopicName1 = substr($TopicName,0,15);\r
+if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; }\r
+$UsersID=mysql_result($gltresult,0,"UserID");\r
+$GuestName=mysql_result($gltresult,0,"GuestName");\r
+$UsersName = GetUserName($UsersID,$Settings['sqltable']);\r
+if($UsersName=="Guest") { $UsersName=$GuestName;\r
+if($UsersName==null) { $UsersName="Guest"; } }\r
+$UsersName1 = substr($UsersName,0,18);\r
+if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."...";\r
+$oldtopicname=$TopicName; $oldusername=$UsersName;\r
+$TopicName=$TopicName1; $UsersName=$UsersName1; } $lul = null;\r
+if($UsersID!="-1") {\r
+$lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }\r
+if($UsersID=="-1") {\r
+$lul = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }\r
+$LastTopic = "User: <a href=\"".$lul."\" title=\"".$oldusername."\">".$UsersName."</a><br />\nTopic: <a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#post".$ShowReply."\" title=\"".$oldtopicname."\">".$TopicName."</a>"; }\r
+@mysql_free_result($gltresult);\r
+$ForumType = strtolower($ForumType);\r
+if ($ForumType=="forum") {\r
+       $PreForum=$ThemeSet['ForumIcon']; }\r
+if ($ForumType=="subforum") {\r
+       $PreForum=$ThemeSet['SubForumIcon']; }\r
+if ($ForumType=="subforum") {\r
+       $PreForum=$ThemeSet['SubForumIcon']; }\r
+if ($ForumType=="redirect") {\r
+       $PreForum=$ThemeSet['RedirectIcon']; }\r
+?>\r
+<tr class="TableRow3" id="Forum<?php echo $ForumID; ?>">\r
+<td class="TableRow3"><div class="forumicon">\r
+<?php echo $PreForum; ?></div></td>\r
+<td class="TableRow3"><div class="forumname"><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"><?php echo $ForumName; ?></a></div>\r
+<div class="forumescription"><?php echo $ForumDescription; ?></div></td>\r
+<td class="TableRow3" style="text-align: center;"><?php echo $NumTopics; ?></td>\r
+<td class="TableRow3" style="text-align: center;"><?php echo $NumPosts; ?></td>\r
+<td class="TableRow3"><?php echo $LastTopic; ?></td>\r
+</tr>\r
+<?php\r
+++$i; } @mysql_free_result($result);\r
+if($num>=1) { ?>\r
+<tr id="CatEnd" class="TableRow4">\r
+<td class="TableRow4" colspan="5">&nbsp;</td>\r
+</tr>\r
+<?php } ?>\r
+</table></div>\r
+<div>&nbsp;</div>\r
+<?php ++$prei; } @mysql_free_result($preresult); ?>\r
diff --git a/inc/endpage.php b/inc/endpage.php
new file mode 100644 (file)
index 0000000..1b44dd4
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: endpage.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="endpage.php"||$File3Name=="/endpage.php") {
+       require('index.php');
+       exit(); }
+if($_GET['debug']=="true"||$_GET['debug']=="on") {
+       $endpagevar=$endpagevar."<br />\nFiles included: ".count_included_files()." &amp; Extensions Enabled: ".count_extensions().$ThemeSet['LineDivider']."<a href=\"http://validator.w3.org/check/referer?verbose=1\" title=\"Validate HTML\" onclick=\"window.open(this.href);return false;\">HTML</a>".$ThemeSet['LineDivider']."<a href=\"http://jigsaw.w3.org/css-validator/check/referer?profile=css3\" title=\"Validate CSS\" onclick=\"window.open(this.href);return false;\">CSS</a>"; }
+       $endpagevar=$endpagevar."</div>\n";
+echo $endpagevar;
+@mysql_close();
+?>
\ No newline at end of file
diff --git a/inc/events.php b/inc/events.php
new file mode 100644 (file)
index 0000000..93b9ce5
--- /dev/null
@@ -0,0 +1,130 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="events.php"||$File3Name=="/events.php") {
+       require('index.php');
+       exit(); }
+?>
+<div class="Table1Border">
+<table class="Table1">
+<?php
+if($_GET['act']=="view"||$_GET['act']==null) {
+$query = query("select * from ".$Settings['sqltable']."events where ID=%i", array($_GET['id']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$is=0;
+if($num==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+while ($is < $num) {
+$EventID=mysql_result($result,$is,"id");
+$EventUser=mysql_result($result,$is,"UserID");
+$EventGuest=mysql_result($result,$is,"GuestName");
+$EventName=mysql_result($result,$is,"EventName");
+$EventText=mysql_result($result,$is,"EventText");
+$EventStart=mysql_result($result,$is,"TimeStamp");
+$EventEnd=mysql_result($result,$is,"TimeStampEnd");
+$EventStart = GMTimeChange("M. j Y",$EventStart,null);
+$EventEnd = GMTimeChange("M. j Y",$EventEnd,null);
+$requery = query("select * from ".$Settings['sqltable']."members where ID=%i", array($EventUser));
+$reresult=mysql_query($requery);
+$renum=mysql_num_rows($reresult);
+$rei=0;
+while ($rei < $renum) {
+$User1ID=$EventUser;
+$User1Name=mysql_result($reresult,$rei,"Name");
+$User1Email=mysql_result($reresult,$rei,"Email");
+$User1Title=mysql_result($reresult,$rei,"Title");
+$User1Joined=mysql_result($reresult,$rei,"Joined");
+$User1Joined=GMTimeChange("M j Y",$User1Joined,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$User1GroupID=mysql_result($reresult,$rei,"GroupID");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($User1GroupID));
+$gresult=mysql_query($gquery);
+$User1Group=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$User1Signature=mysql_result($reresult,$rei,"Signature");
+$User1Avatar=mysql_result($reresult,$rei,"Avatar");
+$User1AvatarSize=mysql_result($reresult,$rei,"AvatarSize");
+if ($User1Avatar=="http://"||$User1Avatar==null) {
+$User1Avatar=$ThemeSet['NoAvatar'];
+$User1AvatarSize=$ThemeSet['NoAvatarSize']; }
+$AvatarSize1=explode("x", $User1AvatarSize);
+$AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
+$User1Website=mysql_result($reresult,$rei,"Website");
+$User1PostCount=mysql_result($reresult,$rei,"PostCount");
+$User1IP=mysql_result($reresult,$rei,"IP");
+++$rei; } @mysql_free_result($reresult);
+++$is; } @mysql_free_result($result);
+if($User1Name=="Guest") { $User1Name=$EventGuest;
+if($User1Name==null) { $User1Name="Guest"; } }
+$EventText = text2icons($EventText,$Settings['sqltable']); $User1Signature = text2icons($User1Signature,$Settings['sqltable']);
+?>
+<tr class="TableRow1">
+<td class="TableRow1" colspan="2"><span style="font-weight: bold; float: left;"><?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['event'],$Settings['file_ext'],"act=view&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event']); ?>"><?php echo $EventName; ?></a></span><?php if($ThemeSet['TopicLayout']!="Type 2") { ?>
+<span style="float: right;">&nbsp;</span><?php } ?></td>
+</tr>
+<tr class="TableRow2">
+<td class="TableRow2" style="vertical-align: middle; width: 20%;">
+&nbsp;<a href="<?php
+if($User1ID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$User1ID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($User1ID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $User1Name; ?></a></td>
+<td class="TableRow2" style="vertical-align: middle; width: 80%;">
+<div style="text-align: left; float: left;">
+<span style="font-weight: bold;">Event Start: </span><?php echo $EventStart; ?><?php echo $ThemeSet['LineDividerTopic']; ?><span style="font-weight: bold;">Event End: </span><?php echo $EventEnd; ?>
+</div>
+<div style="text-align: right;">&nbsp;</div>
+</td>
+</tr>
+<tr>
+<td class="TableRow3" style="vertical-align: top;">
+ <?php  /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */  ?>
+ <table class="AvatarTable" style="width: 100px; height: 100px; text-align: center;">
+       <tr class="AvatarRow" style="width: 100%; height: 100%;">
+               <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
+               <img src="<?php echo $User1Avatar; ?>" alt="<?php echo $User1Name; ?>'s Avatar" title="<?php echo $User1Name; ?>'s Avatar" style="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
+               </td>
+       </tr>
+ </table><br />
+User Title: <?php echo $User1Title; ?><br />
+Group: <?php echo $User1Group; ?><br />
+Member: <?php 
+if($User1ID!="-1") { echo $User1ID; }
+if($User1ID=="-1") { echo 0; }
+?><br />
+Posts: <?php echo $User1PostCount; ?><br />
+Joined: <?php echo $User1Joined; ?><br /><br />
+</td>
+<td class="TableRow3" style="vertical-align: middle;">
+<div class="eventpost"><?php echo $EventText; ?></div>
+<?php if(isset($User1Signature)) { ?> <br />--------------------
+<div class="signature"><?php echo $User1Signature; ?></div><?php } ?>
+</td>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4" colspan="2">
+<span style="float: left;">&nbsp;<a href="<?php
+if($User1ID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$User1ID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($User1ID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $ThemeSet['Profile']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="<?php echo $User1Website; ?>" onclick="window.open(this.href);return false;"><?php echo $ThemeSet['WWW']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="#Act/PM"><?php echo $ThemeSet['PM']; ?></a></span>
+<span style="float: right;">&nbsp;</span></td>
+</tr>
+<?php } ?>
+</table></div>
\ No newline at end of file
diff --git a/inc/filename.php b/inc/filename.php
new file mode 100644 (file)
index 0000000..5632cbf
--- /dev/null
@@ -0,0 +1,118 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: filename.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name=="filename.php"||$File3Name=="/filename.php") {\r
+       require('index.php');\r
+       exit(); }\r
+       $rssurlon = false;\r
+if(dirname($_SERVER['SCRIPT_NAME'])!=".") {\r
+$basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }\r
+if(dirname($_SERVER['SCRIPT_NAME'])==".") {\r
+$basedir = dirname($_SERVER['PHP_SELF'])."/"; }\r
+if($basedir=="\/") { $basedir="/"; }\r
+$basedir = str_replace("//", "/", $basedir);\r
+if($Settings['fixbasedir']!=null&&$Settings['fixbasedir']!="") {\r
+               $basedir = $Settings['fixbasedir']; }\r
+$BaseURL = $basedir;\r
+if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }\r
+if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }\r
+if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {\r
+       $rssurl = $prehost.$_SERVER["HTTP_HOST"].$BaseURL; }\r
+if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {\r
+       $rssurlon = "on"; $rssurl = $Settings['idburl']; }\r
+if($Settings['rssurl']!=null&&$Settings['rssurl']!="") {\r
+       $rssurlon = "on"; $rssurl = $Settings['rssurl']; }\r
+//Version info stuff. :P \r
+function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {\r
+       $return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;\r
+       if($showsvn==false) { $showsvn = null; }\r
+       if($showsvn==true) { $return_var .= " SVN ".$svnver; }\r
+       if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }\r
+       return $return_var; }\r
+$VER1[0] = 0; $VER1[1] = 1; $VER1[2] = 5; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];\r
+$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 54; $RName = "iDB"; $SFName = "IntDB";\r
+$SVNDay[0] = 5; $SVNDay[1] = 08; $SVNDay[2] = 2007; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];\r
+$VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false);\r
+$VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true);\r
+$VerInfo['iDB_Full_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,false);\r
+$VerInfo['iDB_Full_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,true);\r
+$VerInfo['iDB_Ver_Show'] = $VerInfo['iDB_Ver_SVN']; $VerInfo['iDB_Full_Ver_Show'] = $VerInfo['iDB_Full_Ver_SVN'];\r
+if(isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = $Settings['showverinfo']; }\r
+if(!isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = false; }\r
+$CD2k = "Cool Dude 2k"; $GM2k = "Game Maker 2k";\r
+$iDB = "Internet Discussion Boards"; $iTB = "Internet Tag Boards"; $DF2k = "Discussion Forums 2k"; $TB2k = "Tag Boards 2k";\r
+$iDBURL1 = "<a href=\"http://intdb.sourceforge.net/\" onclick=\"window.open(this.href);return false;\">"; $iDBURL2 = $iDBURL1.$iDB."</a>";\r
+$DF2kURL1 = "<a href=\"http://df2k.berlios.de/\" onclick=\"window.open(this.href);return false;\">"; $DF2kURL2 = $DF2kURL1.$DF2k."</a>";\r
+$GM2kURL = "<a href=\"http://upload.idb.s1.jcink.com/\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";\r
+$iDBURL3 = "<a href=\"http://idb.berlios.de/\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">".$iDB."</a>";\r
+$PHPQA = "PHP-Quick-Arcade"; $PHPV1 = @phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = PHP_OS;\r
+if($OSType=="WINNT") { $OSType="Windows NT"; } if($OSType=="WIN32") { $OSType="Windows 9x"; }\r
+$OSType2 = $PHPV2." / ".$OSType; $ZENDV1 = @zend_version(); $ZENDV2 = "Zend engine ".$ZENDV1;\r
+if($idbmisc['showverinfo']==true) {\r
+@header("X-iDB-Powered-By: ".$VerInfo['iDB_Ver_Show']);\r
+@header("Generator: ".$VerInfo['iDB_Ver_Show']); }\r
+if($idbmisc['showverinfo']!=true) {\r
+@header("X-iDB-Powered-By: iDB");\r
+//@header("X-Powered-By: PHP");\r
+@header("Generator: iDB"); }\r
+//File naming stuff. <_< \r
+$exfile = array(); $exfilerss = array();\r
+$exqstr = array(); $exqstrrss = array();\r
+$exfile['calendar'] = 'calendar';\r
+$prexqstr['calendar'] = null; $exqstr['calendar'] = null;\r
+$exfile['category'] = 'category';\r
+$prexqstr['category'] = null; $exqstr['category'] = null;\r
+$exfile['event'] = 'event';\r
+$prexqstr['event'] = null; $exqstr['event'] = null;\r
+$exfile['forum'] = 'forum';\r
+$prexqstr['forum'] = null; $exqstr['forum'] = null;\r
+$exfile['index'] = 'index';\r
+$prexqstr['index'] = null; $exqstr['index'] = null;\r
+$exfile['member'] = 'member';\r
+$prexqstr['member'] = null; $exqstr['member'] = null;\r
+$exfile['messenger'] = 'messenger';\r
+$prexqstr['messenger'] = null; $exqstr['messenger'] = null;\r
+$exfile['profile'] = 'profile';\r
+$prexqstr['profile'] = null; $exqstr['profile'] = null;\r
+$exfile['rss'] = 'rss';\r
+$prexqstr['rss'] = null; $exqstr['rss'] = null;\r
+$exfile['subforum'] = 'subforum';\r
+$prexqstr['subforum'] = null; $exqstr['subforum'] = null;\r
+$exfile['subcategory'] = 'subcategory';\r
+$prexqstr['subcategory'] = null; $exqstr['subcategory'] = null;\r
+$exfile['topic'] = 'topic';\r
+$prexqstr['topic'] = null; $exqstr['topic'] = null;\r
+$exfile['redirect'] = 'forum';\r
+$prexqstr['redirect'] = null; $exqstr['redirect'] = null;\r
+$exfilejs['javascript'] = 'javascript';\r
+$prexqstrjs['javascript'] = null; $exqstrjs['javascript'] = null;\r
+$exfilerss['forum'] = 'forum'; \r
+$prexqstrrss['forum'] = null; $exqstrrss['forum'] = null;\r
+$exfilerss['subforum'] = "subforum";\r
+$prexqstrrss['subforum'] = null; $exqstrrss['subforum'] = null;\r
+$exfilerss['subcategory'] = "subcategory";\r
+$prexqstrrss['subcategory'] = null; $exqstrrss['subcategory'] = null;\r
+$exfilerss['redirect'] = 'forum';\r
+$prexqstrrss['redirect'] = null; $exqstrrss['redirect'] = null;\r
+$exfilerss['topic'] = "topic";\r
+$prexqstrrss['topic'] = null; $exqstrrss['topic'] = null;\r
+$exfilerss['category'] = 'category';\r
+$prexqstrrss['category'] = null; $exqstrrss['category'] = null;\r
+$exfilerss['event'] = 'event';\r
+$prexqstrrss['event'] = null; $exqstrrss['event'] = null;\r
+?>
\ No newline at end of file
diff --git a/inc/forums.php b/inc/forums.php
new file mode 100644 (file)
index 0000000..989cb8b
--- /dev/null
@@ -0,0 +1,145 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="boards.php"||$File3Name=="/boards.php") {
+       require('index.php');
+       exit(); }
+$prequery = query("select * from ".$Settings['sqltable']."categories where ShowCategory='yes' and InSubCategory=0", array());
+$preresult=mysql_query($prequery);
+$prenum=mysql_num_rows($preresult);
+$prei=0;
+while ($prei < $prenum) {
+$CategoryID=mysql_result($preresult,$prei,"id");
+$CategoryName=mysql_result($preresult,$prei,"Name");
+$CategoryShow=mysql_result($preresult,$prei,"ShowCategory");
+$CategoryType=mysql_result($preresult,$prei,"CategoryType");
+$SubShowForums=mysql_result($preresult,$prei,"SubShowForums");
+$CategoryDescription=mysql_result($preresult,$prei,"Description");
+$CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);
+$toggle=""; $togglecode = "<span style=\"float: right;\">&nbsp;</span>";
+if($ThemeSet['EnableToggle']==true) {
+/*     Toggle Code     */
+$query2 = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and CategoryID='%s' and InSubForum=0", array($CategoryID));
+$result2=mysql_query($query2);
+$num2=mysql_num_rows($result2);
+$i2=0;
+$toggle="";
+while ($i2 < $num2) {
+$ForumID=mysql_result($result2,$i2,"id");
+$i3=$i2+1;
+if ($i3!=$num2) {
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }
+if ($i3==$num2) {
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }
+if ($i3==$num2) {
+$toggle=$toggle."toggletag('Cat".$CategoryID."'),toggletag('CatEnd".$CategoryID."');return false;"; }
+++$i2; }
+if($toggle==null) { $toggle="toggletag('Cat".$CategoryID."'),toggletag('CatEnd".$CategoryID."');return false;"; } 
+@mysql_free_result($result2); 
+$togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#Toggle".$CategoryID."\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }
+if($ThemeSet['EnableToggle']==false) { $toggle="";
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>"; }
+?>
+<div class="Table1Border">
+<table class="Table1">
+<tr class="TableRow1">
+<td class="TableRow1" colspan="5"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile[$CategoryType],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$CategoryType],$exqstr[$CategoryType]); ?>" id="Toggle<?php echo $CategoryID; ?>"><?php echo $CategoryName; ?></a></span>
+<?php echo $togglecode; ?></td>
+</tr>
+<?php
+$query = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and CategoryID=%i and InSubForum=0 ORDER BY ID", array($CategoryID));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+if($num>=1) {
+?>
+<tr id="Cat<?php echo $CategoryID; ?>" class="TableRow2">
+<th class="TableRow2" style="width: 4%;">&nbsp;</th>
+<th class="TableRow2" style="width: 58%;">Forum</th>
+<th class="TableRow2" style="width: 7%;">Topics</th>
+<th class="TableRow2" style="width: 7%;">Posts</th>
+<th class="TableRow2" style="width: 24%;">Last Topic</th>
+</tr>
+<?php }
+while ($i < $num) {
+$ForumID=mysql_result($result,$i,"id");
+$ForumName=mysql_result($result,$i,"Name");
+$ForumShow=mysql_result($result,$i,"ShowForum");
+$ForumType=mysql_result($result,$i,"ForumType");
+$NumTopics=mysql_result($result,$i,"NumTopics");
+$NumPosts=mysql_result($result,$i,"NumPosts");
+$ForumDescription=mysql_result($result,$i,"Description");
+$ForumType = strtolower($ForumType);
+unset($LastTopic);
+$gltquery = query("select * from ".$Settings['sqltable']."topics where CategoryID=%i and ForumID=%i ORDER BY LastUpdate DESC", array($CategoryID,$ForumID));
+$gltresult=mysql_query($gltquery);
+$gltnum=mysql_num_rows($gltresult);
+if($gltnum>0){
+$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."..."; }
+$UsersID=mysql_result($gltresult,0,"UserID");
+$GuestName=mysql_result($gltresult,0,"GuestName");
+$UsersName = GetUserName($UsersID,$Settings['sqltable']);
+$UsersName1 = substr($UsersName,0,18);
+if($UsersName=="Guest") { $UsersName=$GuestName;
+if($UsersName==null) { $UsersName="Guest"; } }
+if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."...";
+$oldtopicname=$TopicName; $oldusername=$UsersName;
+$TopicName=$TopicName1; $UsersName=$UsersName1; } $lul = null;
+if($UsersID!="-1") {
+$lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($UsersID=="-1") {
+$lul = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+$LastTopic = "User: <a href=\"".$lul."\" title=\"".$oldusername."\">".$UsersName."</a><br />\nTopic: <a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#post".$ShowReply."\" title=\"".$oldtopicname."\">".$TopicName."</a>"; }
+if($LastTopic==null) { $LastTopic="&nbsp;<br />&nbsp;"; }
+$ForumType = strtolower($ForumType);
+$PreForum = $ThemeSet['ForumIcon'];
+if ($ForumType=="forum") {
+       $PreForum=$ThemeSet['ForumIcon']; }
+if ($ForumType=="subforum") {
+       $PreForum=$ThemeSet['SubForumIcon']; }
+if ($ForumType=="redirect") {
+       $PreForum=$ThemeSet['RedirectIcon']; }
+?>
+<tr class="TableRow3" id="Forum<?php echo $ForumID; ?>">
+<td class="TableRow3"><div class="forumicon">
+<?php echo $PreForum; ?></div></td>
+<td class="TableRow3"><div class="forumname"><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"><?php echo $ForumName; ?></a></div>
+<div class="forumdescription"><?php echo $ForumDescription; ?></div></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $NumTopics; ?></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $NumPosts; ?></td>
+<td class="TableRow3"><?php echo $LastTopic; ?></td>
+</tr>
+<?php
+++$i; } @mysql_free_result($result);
+if($num>=1) {
+?>
+<tr id="CatEnd<?php echo $CategoryID; ?>" class="TableRow4">
+<td class="TableRow4" colspan="5">&nbsp;</td>
+</tr>
+<?php } ?>
+</table></div>
+<div>&nbsp;</div>
+<?php
+++$prei; }
+@mysql_free_result($preresult); ?>
diff --git a/inc/function.php b/inc/function.php
new file mode 100644 (file)
index 0000000..8744eb1
--- /dev/null
@@ -0,0 +1,180 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: function.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="events.php"||$File3Name=="/events.php") {
+       require('index.php');
+       exit(); }
+require_once($SettDir['misc'].'functions.php');
+/* Change Some PHP Settings Fix the & to &amp; */
+if($Settings['use_iniset']==true&&$Settings['qstr']!="/") {
+@ini_set("arg_separator.output",htmlentities($Settings['qstr'], ENT_QUOTES));
+@ini_set("arg_separator.input",$Settings['qstr']);
+@ini_set("arg_separator",htmlentities($Settings['qstr'], ENT_QUOTES)); }
+//$basepath = pathinfo($_SERVER['REQUEST_URI']);
+/*if(dirname($_SERVER['REQUEST_URI'])!="."||
+       dirname($_SERVER['REQUEST_URI'])!=null) {
+$basedir = dirname($_SERVER['REQUEST_URI'])."/"; }*/
+if(dirname($_SERVER['SCRIPT_NAME'])!="."||
+       dirname($_SERVER['SCRIPT_NAME'])!=null) {
+$basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
+if($basedir==null||$basedir==".") {
+if(dirname($_SERVER['SCRIPT_NAME'])=="."||
+       dirname($_SERVER['SCRIPT_NAME'])==null) {
+$basedir = dirname($_SERVER['PHP_SELF'])."/"; } }
+if($basedir=="\/") { $basedir="/"; }
+$basedir = str_replace("//", "/", $basedir);
+if($Settings['fixbasedir']!=null&&$Settings['fixbasedir']!="") {
+               $basedir = $Settings['fixbasedir']; }
+$BaseURL = $basedir;
+// Get our Host Name and Referer URL's Host Name
+$REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
+$URL['REFERER'] = $REFERERurl['host'];
+$URL['HOST'] = $_SERVER["SERVER_NAME"];
+$REFERERurl = null; unset($REFERERurl);
+function qstring($qstr=";",$qsep="=")
+{ $_GET = null; $_GET = array();
+if (!isset($_SERVER['QUERY_STRING'])) {
+$_SERVER['QUERY_STRING'] = getenv('QUERY_STRING'); }
+@ini_get("arg_separator.input", $qstr);
+$_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']);
+$preqs = explode($qstr,$_SERVER["QUERY_STRING"]);
+$qsnum = count($preqs); $qsi = 0;
+while ($qsi < $qsnum) {
+$preqst = explode($qsep,$preqs[$qsi],2);
+$fix1 = array(" ",'$'); $fix2  = array("_","_");
+$preqst[0] = str_replace($fix1, $fix2, $preqst[0]);
+$preqst[0] = killbadvars($preqst[0]);
+if($preqst[0]!=null) {
+$_GET[$preqst[0]] = $preqst[1]; }
+++$qsi; } return true; }
+if($_SERVER['PATH_INFO']==null) {
+       if(@getenv('PATH_INFO')!=null&&@getenv('PATH_INFO')!="1") {
+$_SERVER['PATH_INFO'] = @getenv('PATH_INFO'); }
+if(@getenv('PATH_INFO')==null) {
+$myscript = $_SERVER["SCRIPT_NAME"];
+$myphpath = $_SERVER["PHP_SELF"];
+$mypathinfo = str_replace($myscript, "", $myphpath);
+@putenv("PATH_INFO=".$mypathinfo); } }
+function mrstring() {
+$urlvar = explode('/',$_SERVER['PATH_INFO']);
+$num=count($urlvar); $i=1;
+while ($i <= $num) {
+//$urlvar[$i] = urldecode($urlvar[$i]);
+if($_GET[$urlvar[$i]]==null&&$urlvar[$i]!=null) {
+$fix1 = array(" ",'$'); $fix2  = array("_","_");
+$urlvar[$i] = str_replace($fix1, $fix2, $urlvar[$i]);
+$urlvar[$i] = killbadvars($urlvar[$i]);
+       $_GET[$urlvar[$i]] = $urlvar[$i+1]; }
+++$i; ++$i; } return true; }
+function redirect($type,$file,$time=0,$url=null,$dbsr=true)
+{
+if($type!="location"&&
+       $type!="refresh") {
+       $type=="location"; }
+if($url!=null) {
+$file = $url.$file; }
+if($dbsr==true) {
+$file = str_replace("//", "/", $file); }
+if($type=="refresh") {
+header("Refresh: ".$time."; URL=".$file); }
+if($type=="location") {
+@session_write_close();
+header("Location: ".$file); }
+return true; }
+function url_maker($file,$ext,$qvarstr=null,$qstr=";",$qsep="=",$prexqstr=null,$exqstr=null,$fixhtml=true) {
+if($ext==null) { $ext = ".php"; } 
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $ext = null; }
+$file = $file.$ext;
+if($qvarstr==null) { $fileurl = $file; }
+if($fixhtml==true) {
+$qstr = htmlentities($qstr, ENT_QUOTES);
+$qsep = htmlentities($qsep, ENT_QUOTES); }
+if($prexqstr!=null) { 
+$rene1 = explode("&",$prexqstr);
+$renenum=count($rene1);
+$renei=0;
+$reneqstr = "index.php?";
+if($qstr!="/") { $fileurl = $file."?"; }
+if($qstr=="/") { $fileurl = $file."/"; }
+while ($renei < $renenum) {
+       $rene2 = explode("=",$rene1[$renei]);
+       $rene2[0] = urlencode($rene2[0]);
+       $rene2[1] = urlencode($rene2[1]);
+       if($qstr!="/") {
+       $fileurl = $fileurl.$rene2[0].$qsep.$rene2[1]; }
+       if($qstr=="/") {
+       $fileurl = $fileurl.$rene2[0]."/".$rene2[1]."/"; }
+       $reneis = $renei + 1;
+       if($qstr!="/") {
+       if($reneis < $renenum) { $fileurl = $fileurl.$qstr; } }
+       ++$renei; } }
+if($qvarstr!=null&&$qstr!="/") { $fileurl = $fileurl.$qstr; }
+if($qvarstr!=null) { 
+if($prexqstr==null) {
+if($qstr!="/") { $fileurl = $file."?"; }
+if($qstr=="/") { $fileurl = $file."/"; } }
+$cind1 = explode("&",$qvarstr);
+$cindnum=count($cind1);
+$cindi=0;
+$cindqstr = "index.php?";
+while ($cindi < $cindnum) {
+       $cind2 = explode("=",$cind1[$cindi]);
+       $cind2[0] = urlencode($cind2[0]);
+       $cind2[1] = urlencode($cind2[1]);
+       if($qstr!="/") {
+       $fileurl = $fileurl.$cind2[0].$qsep.$cind2[1]; }
+       if($qstr=="/") {
+       $fileurl = $fileurl.$cind2[0]."/".$cind2[1]."/"; }
+       $cindis = $cindi + 1;
+       if($qstr!="/") {
+       if($cindis < $cindnum) { $fileurl = $fileurl.$qstr; } }
+       ++$cindi; } }
+if($exqstr!=null&&$qstr!="/") { $fileurl = $fileurl.$qstr; }
+if($exqstr!=null) { 
+if($qvarstr==null&&$prexqstr==null) {
+if($qstr!="/") { $fileurl = $file."?"; }
+if($qstr=="/") { $fileurl = $file."/"; } }
+$sand1 = explode("&",$exqstr);
+$sanum=count($sand1);
+$sandi=0;
+$sandqstr = "index.php?";
+while ($sandi < $sanum) {
+       $sand2 = explode("=",$sand1[$sandi]);
+       $sand2[0] = urlencode($sand2[0]);
+       $sand2[1] = urlencode($sand2[1]);
+       if($qstr!="/") {
+       $fileurl = $fileurl.$sand2[0].$qsep.$sand2[1]; }
+       if($qstr=="/") {
+       $fileurl = $fileurl.$sand2[0]."/".$sand2[1]."/"; }
+       $sandis = $sandi + 1;
+       if($qstr!="/") {
+       if($sandis < $sanum) { $fileurl = $fileurl.$qstr; } }
+       ++$sandi; } }
+return $fileurl; }
+$thisdir = dirname(realpath("Preindex.php"))."/";
+function GetQueryStr($qstr=";",$qsep="=",$fixhtml=true)
+{ $pregqstr = preg_quote($qstr,"/");
+$pregqsep = preg_quote($qsep,"/");
+$oqstr = $qstr; $oqsep = $qsep;
+if($fixhtml==true||$fixhtml==null) {
+$qstr = htmlentities($qstr, ENT_QUOTES);
+$qsep = htmlentities($qsep, ENT_QUOTES); }
+$OldBoardQuery = preg_replace("/".$pregqstr."/isxS", $qstr, $_SERVER['QUERY_STRING']);
+$BoardQuery = "?".$OldBoardQuery;
+return $BoardQuery; }
+?>
diff --git a/inc/index.php b/inc/index.php
new file mode 100644 (file)
index 0000000..c541476
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../index.php');
+?>
\ No newline at end of file
diff --git a/inc/javascript.php b/inc/javascript.php
new file mode 100644 (file)
index 0000000..0d9ffee
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: javascript.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="javascript.php"||$File3Name=="/javascript.php") {
+       require('inc/forbidden.php');
+       exit(); }
+@header("Content-Language: en");
+@header("Vary: Accept");
+?>
+function getid(id) {
+var itm;
+itm = document.getElementById(id);
+return itm; }
+
+function toggletag(id) {
+var itm;
+itm = document.getElementById(id);
+if (itm.style.display == "none") {
+itm.style.display = ""; }
+else {
+itm.style.display = "none"; } }
+
+function bgchange(id,color) {
+var itm;
+itm = document.getElementById(id);
+itm.style.backgroundColor = ''+color+''; }
+
+function innerchange(tag,text1,text2) {
+var usrname;
+usrname = document.getElementsByTagName(tag);
+for (var i = 0; i < usrname.length; i++) {
+if(usrname[i].innerHTML==text1) {
+usrname[i].innerHTML = text2; } } }
+
+<?php gzip_page($Settings['use_gzip']); ?>
diff --git a/inc/members.php b/inc/members.php
new file mode 100644 (file)
index 0000000..a850c17
--- /dev/null
@@ -0,0 +1,664 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="members.php"||$File3Name=="/members.php") {
+       require('index.php');
+       exit(); }
+?>
+<div class="Table1Border">
+<table class="Table1">
+<?php
+if($_GET['act']=="list") {
+?>
+<tr class="TableRow1">
+<td class="TableRow1" colspan="7"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Member List</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="Member" class="TableRow2">
+<th class="TableRow2" style="width: 5%;">ID</th>
+<th class="TableRow2" style="width: 28%;">Name</th>
+<th class="TableRow2" style="width: 10%;">Group</th>
+<th class="TableRow2" style="width: 10%;">Posts</th>
+<th class="TableRow2" style="width: 20%;">Joined</th>
+<th class="TableRow2" style="width: 20%;">Last Active</th>
+<th class="TableRow2" style="width: 7%;">Website</th>
+</tr>
+<?php
+$orderlist = null;
+$orderlist = "order by `ID` asc";
+if($_GET['orderby']==null) { 
+       if($_GET['sortby']!=null) { 
+               $_GET['orderby'] = $_GET['sortby']; } }
+if($_GET['orderby']==null) { $_GET['orderby'] = "joined"; }
+if($_GET['orderby']!=null) {
+if($_GET['orderby']=="id") { $orderlist = "order by `ID`"; }
+if($_GET['orderby']=="name") { $orderlist = "order by `Name`"; }
+if($_GET['orderby']=="joined") { $orderlist = "order by `Joined`"; }
+if($_GET['orderby']=="active") { $orderlist = "order by `LastActive`"; }
+if($_GET['orderby']=="posts") { $orderlist = "order by `PostCount`"; }
+if($_GET['orderby']=="offset") { $orderlist = "order by `TimeZone`"; } }
+if($_GET['ordertype']==null) { 
+       if($_GET['sorttype']!=null) { 
+               $_GET['ordertype'] = $_GET['sorttype']; } }
+if($_GET['ordertype']==null) { $_GET['ordertype'] = "asc"; }
+if($_GET['ordertype']!=null) {
+if($_GET['ordertype']=="ascending") { $orderlist .= " asc"; }
+if($_GET['ordertype']=="descending") { $orderlist .= " desc"; }
+if($_GET['ordertype']=="asc") { $orderlist .= " asc"; }
+if($_GET['ordertype']=="desc") { $orderlist .= " desc"; } }
+if(!is_numeric($_GET['gid'])) { $_GET['gid'] = null; }
+if($_GET['gid']!=null&&$_GET['groupid']==null) { $_GET['groupid'] = $_GET['gid']; }
+if(!is_numeric($_GET['groupid'])) { $_GET['groupid'] = null; }
+if($_GET['groupid']==null) {
+$query = query("select * from ".$Settings['sqltable']."members ".$orderlist, array(null)); }
+if($_GET['groupid']!=null) {
+$query = query("select * from ".$Settings['sqltable']."members where GroupID=%i ".$orderlist, array($_GET['groupid'])); }
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+while ($i < $num) {
+$MemList['ID']=mysql_result($result,$i,"id");
+$MemList['Name']=mysql_result($result,$i,"Name");
+$MemList['Email']=mysql_result($result,$i,"Email");
+$MemList['GroupID']=mysql_result($result,$i,"GroupID");
+$MemList['WarnLevel']=mysql_result($result,$i,"WarnLevel");
+$MemList['Interests']=mysql_result($result,$i,"Interests");
+$MemList['Title']=mysql_result($result,$i,"Title");
+$MemList['Joined']=mysql_result($result,$i,"Joined");
+$MemList['Joined']=GMTimeChange("F j Y, g:i a",$MemList['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MemList['LastActive']=mysql_result($result,$i,"LastActive");
+$MemList['LastActive']=GMTimeChange("F j Y, g:i a",$MemList['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MemList['Website']=mysql_result($result,$i,"Website");
+$MemList['Gender']=mysql_result($result,$i,"Gender");
+$MemList['PostCount']=mysql_result($result,$i,"PostCount");
+$MemList['TimeZone']=mysql_result($result,$i,"TimeZone");
+$MemList['DST']=mysql_result($result,$i,"DST");
+$MemList['IP']=mysql_result($result,$i,"IP");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($MemList['GroupID']));
+$gresult=mysql_query($gquery);
+$MemList['Group']=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$membertitle = " ".$ThemeSet['TitleDivider']." Member List";
+if($MemList['Group']!=$Settings['GuestGroup']) {
+?>
+<tr class="TableRow3" id="Member<?php echo $MemList['ID']; ?>">
+<td class="TableRow3" style="text-align: center;"><?php echo $MemList['ID']; ?></td>
+<td class="TableRow3">&nbsp;<a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$MemList['ID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $MemList['Name']; ?></a></td>
+<td class="TableRow3" style="text-align: center;"><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list&gid=".$MemList['GroupID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $MemList['Group']; ?></a></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $MemList['PostCount']; ?></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $MemList['Joined']; ?></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $MemList['LastActive']; ?></td>
+<td class="TableRow3" style="text-align: center;"><a href="<?php echo $MemList['Website']; ?>" onclick="window.open(this.href);return false;">Website</a></td>
+</tr>
+<?php }
+++$i; } @mysql_free_result($result);
+?>
+<tr id="CatEnd" class="TableRow4">
+<td class="TableRow4" colspan="7">&nbsp;</td>
+</tr>
+<?php }
+if($_GET['act']=="view") { ?>
+<tr class="TableRow1">
+<td class="TableRow1" colspan="2"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Viewing Profile</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="Member" class="TableRow2">
+<th class="TableRow2" style="width: 50%;">Avatar</th>
+<th class="TableRow2" style="width: 50%;">User Info</th>
+</tr>
+<?php
+$query = query("select * from ".$Settings['sqltable']."members where ID=%i", array($_GET['id']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+if($num==0||$_GET['id']=="-1") { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+$ViewMem['ID']=mysql_result($result,$i,"id");
+$ViewMem['Name']=mysql_result($result,$i,"Name");
+$ViewMem['Signature']=mysql_result($result,$rei,"Signature");
+$ViewMem['Avatar']=mysql_result($result,$rei,"Avatar");
+$ViewMem['AvatarSize']=mysql_result($result,$rei,"AvatarSize");
+$ViewMem['Email']=mysql_result($result,$i,"Email");
+$ViewMem['GroupID']=mysql_result($result,$i,"GroupID");
+$ViewMem['WarnLevel']=mysql_result($result,$i,"WarnLevel");
+$ViewMem['Interests']=mysql_result($result,$i,"Interests");
+$ViewMem['Title']=mysql_result($result,$i,"Title");
+$ViewMem['Joined']=mysql_result($result,$i,"Joined");
+$ViewMem['Joined']=GMTimeChange("M j Y, g:i a",$ViewMem['Joined'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$ViewMem['LastActive']=mysql_result($result,$i,"LastActive");
+$ViewMem['LastActive']=GMTimeChange("M j Y, g:i a",$ViewMem['LastActive'],$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$ViewMem['Website']=mysql_result($result,$i,"Website");
+$ViewMem['Gender']=mysql_result($result,$i,"Gender");
+$ViewMem['PostCount']=mysql_result($result,$i,"PostCount");
+$ViewMem['TimeZone']=mysql_result($result,$i,"TimeZone");
+$ViewMem['DST']=mysql_result($result,$i,"DST");
+unset($dstake); $dstake = null;
+if($ViewMem['DST']=="on") { 
+if($dstake!="done") {
+if($ViewMem['TimeZone']>=0) { $dstake = "done";
+       $ViewMem['TimeZone'] = $ViewMem['TimeZone']-1; } }
+if($dstake!="done") {
+if($ViewMem['TimeZone']<0) { $dstake = "done";
+       $ViewMem['TimeZone'] = $ViewMem['TimeZone']+1; } } }
+$ViewMem['IP']=mysql_result($result,$i,"IP");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($ViewMem['GroupID']));
+$gresult=mysql_query($gquery);
+$ViewMem['Group']=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$membertitle = " ".$ThemeSet['TitleDivider']." Viewing Profile ".$ViewMem['Name'];     
+if ($ViewMem['Avatar']=="http://"||$ViewMem['Avatar']==null) {
+$ViewMem['Avatar']=$ThemeSet['NoAvatar'];
+$ViewMem['AvatarSize']=$ThemeSet['NoAvatarSize']; }
+$AvatarSize1=explode("x", $ViewMem['AvatarSize']);
+$AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
+$ViewMem['Signature'] = text2icons($ViewMem['Signature'],$Settings['sqltable']);
+if($_GET['view']==null) { $_GET['view'] = "profile"; }
+if($_GET['view']!="profile"&&$_GET['view']!="avatar"&&
+       $_GET['view']!="website"&&$_GET['view']!="homepage") { $_GET['view'] = "profile"; }
+if($_GET['view']=="avatar") { 
+       @session_write_close();
+       @header("Location: ".$ViewMem['Avatar']); }
+if($_GET['view']=="website"||$_GET['view']=="homepage") { 
+       if ($ViewMem['Website']!="http://"&&$ViewMem['Website']!=null) {
+       @session_write_close();
+       @header("Location: ".$ViewMem['Website']); }
+       if ($ViewMem['Website']=="http://"||$ViewMem['Website']==null) {
+       @session_write_close();
+       @header("Location: ".$BoardURL."index.php?act=view"); } }
+?>
+<tr class="TableRow3" id="MemberProfile">
+<td class="TableRow3">
+<?php  /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */  ?>
+ <table class="AvatarTable" style="width: 100%; height: 100px; text-align: center;">
+       <tr class="AvatarRow" style="width: 100px; height: 100px;">
+               <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
+               <img src="<?php echo $ViewMem['Avatar']; ?>" alt="<?php echo $ViewMem['Name']; ?>'s Avatar" title="<?php echo $ViewMem['Name']; ?>'s Avatar" style="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
+               </td>
+       </tr>
+ </table>
+<div style="text-align: center;">
+Name: <?php echo $ViewMem['Name']; ?><br />
+Title: <?php echo $ViewMem['Title']; ?></div>
+</td>
+<td class="TableRow3">
+&nbsp;User Name: <?php echo $ViewMem['Name']; ?><br />
+&nbsp;User Title: <?php echo $ViewMem['Title']; ?><br />
+&nbsp;User Group: <?php echo $ViewMem['Group']; ?><br />
+&nbsp;User Joined: <?php echo $ViewMem['Joined']; ?><br />
+&nbsp;Last Active: <?php echo $ViewMem['LastActive']; ?><br />
+&nbsp;User Time: <?php echo GMTimeGet("M j Y, g:i a",$ViewMem['TimeZone']); ?><br />
+&nbsp;User Website: <a href="<?php echo $ViewMem['Website']; ?>" onclick="window.open(this.href);return false;">Website</a><br />
+&nbsp;Post Count: <?php echo $ViewMem['PostCount']; ?><br />
+&nbsp;Interests: <?php echo $ViewMem['Interests']; ?><br />
+</td>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4" colspan="2">&nbsp;</td>
+</tr>
+<?php } @mysql_free_result($result);
+if($_GET['act']=="logout") {
+@session_unset();
+@setcookie("MemberName", null, GMTimeStamp() - 3600, $basedir);
+@setcookie("UserID", null, GMTimeStamp() - 3600, $basedir);
+@setcookie("SessPass", null, GMTimeStamp() - 3600, $basedir);
+@setcookie(session_name(), "", GMTimeStamp() - 3600, $basedir);
+unset($_COOKIE[session_name()]);
+$_SESSION = array();
+@session_unset();
+@session_destroy();
+@redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false));
+}
+
+if($_GET['act']=="login")
+{
+$membertitle = " ".$ThemeSet['TitleDivider']." Login";
+?>
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log in</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr class="TableRow2">
+<th class="TableRow2" style="width: 100%; text-align: left;">&nbsp;Inert your login info: </th>
+</tr>
+<tr class="TableRow3">
+<td class="TableRow3">
+<form method="post" action="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login_now",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 30%;"><label class="TextBoxLabel" for="username">Enter UserName: </label></td>
+       <td style="width: 70%;"><input class="TextBox" id="username" type="text" name="username" /></td>
+</tr><tr>
+       <td style="width: 30%;"><label class="TextBoxLabel" for="userpass">Enter Password: </label></td>
+       <td style="width: 70%;"><input class="TextBox" id="userpass" type="password" name="userpass" maxlength="30" /></td>
+</tr><tr>
+       <td style="width: 30%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
+       <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
+<option value="true">Yes</option>
+<option value="false">No</option>
+</select></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<input type="hidden" name="act" value="loginmember" style="display: none;" />
+<input class="Button" type="submit" value="Log in" />
+</td></tr></table>
+</form>
+</td>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+<?php } if($_POST['act']=="loginmember") {
+$membertitle = " ".$ThemeSet['TitleDivider']." Login";
+$REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
+$URL['REFERER'] = $REFERERurl['host'];
+$URL['HOST'] = $_SERVER["SERVER_NAME"];
+$REFERERurl = null; unset($REFERERurl);
+?>
+<tr class="TableRow1">
+<td class="TableRow1">
+<span style="float: left;">&nbsp;<a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log in</a></span>
+<span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr class="TableRow2">
+<th class="TableRow2" style="width: 100%; text-align: left;">&nbsp;Login Message: </th>
+</tr>
+<tr class="TableRow3">
+<td class="TableRow3">
+<table style="width: 100%; height: 25%; text-align: center;">
+<?php
+if (strlen($_POST['userpass'])=="30") { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Your password is too big.<br />
+       </span></td>
+</tr>
+<?php } if (strlen($_POST['username'])=="20") { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Your user name is too big.<br />
+       <span></td>
+</tr>
+<?php } if ($Settings['TestReferer']==true) {
+       if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Sorry the referering url dose not match our host name.<br />
+       <span></td>
+</tr>
+<?php } }
+if ($Error=="Yes") {
+@redirect("refresh",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false),"4"); }
+if($Error!="Yes"){
+$YourName = stripcslashes(htmlspecialchars($_POST['username'], ENT_QUOTES));
+$YourName = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $YourName);
+$YourName = @remove_spaces($YourName);
+$passtype="ODFH";
+$querylog = query("select * from ".$Settings['sqltable']."members where Name = '%s'", array($YourName));
+$resultlog=mysql_query($querylog);
+$numlog=mysql_num_rows($resultlog);
+if($numlog>=1) {
+$i=0;
+$YourPassTry=mysql_result($resultlog,$i,"Password");
+$HashType=mysql_result($resultlog,$i,"HashType");
+$JoinedPass=mysql_result($resultlog,$i,"Joined");
+$HashSalt=mysql_result($resultlog,$i,"Salt");
+$UpdateHash = false;
+if($HashType=="ODFH") { 
+       $YourPassword = sha1(md5($_POST['userpass'])); }
+if($HashType=="DF4H") { 
+       $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
+if($HashType=="iDBH"||$UpdateHash!=true) { 
+       $YourPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$HashSalt,"sha1"); }
+if($YourPassword==$YourPassTry) { 
+$passright = false;
+} if($YourPassword==$YourPassTry) {
+$passright = true;
+$YourIDM=mysql_result($resultlog,$i,"id");
+$YourNameM=mysql_result($resultlog,$i,"Name");
+$YourPassM=mysql_result($resultlog,$i,"Password");
+$YourGroupM=mysql_result($resultlog,$i,"GroupID");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($YourGroupM));
+$gresult=mysql_query($gquery);
+$YourGroupM=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$YourTimeZoneM=mysql_result($resultlog,$i,"TimeZone");
+$YourDSTM=mysql_result($resultlog,$i,"DST");
+$JoinedDate=mysql_result($resultlog,$i,"Joined");
+$UseTheme=mysql_result($resultlog,$i,"UseTheme");
+$NewHashSalt = salt_hmac();
+$NewPassword = b64e_hmac($_POST['userpass'],$JoinedPass,$NewHashSalt,"sha1");
+$NewDay=GMTimeStamp();
+$NewIP=$_SERVER['REMOTE_ADDR'];
+$queryup = query("update ".$Settings['sqltable']."members set Password='%s',HashType='iDBH',LastActive='%s',IP='%s',Salt='%s' WHERE id=%i", array($NewPassword,$NewDay,$NewIP,$NewHashSalt,$YourIDM));
+mysql_query($queryup);
+@mysql_free_result($resultlog); @mysql_free_result($queryup);
+//session_regenerate_id();
+$_SESSION['Theme']=$UseTheme;
+$_SESSION['MemberName']=$YourNameM;
+$_SESSION['UserID']=$YourIDM;
+$_SESSION['UserTimeZone']=$YourTimeZoneM;
+$_SESSION['UserGroup']=$YourGroupM;
+$_SESSION['UserDST']=$YourDSTM;
+if($_POST['storecookie']==true) {
+setcookie("MemberName", $YourNameM, time() + (7 * 86400), $basedir);
+setcookie("UserID", $YourIDM, time() + (7 * 86400), $basedir);
+setcookie("SessPass", $NewPassword, time() + (7 * 86400), $basedir); }
+} } if($numlog<=0) {
+//echo "Password was not right or user not found!! <_< ";
+} ?>
+<?php if($passright==true) {
+@redirect("refresh",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false),"3"); ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
+       Click <a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">here</a> to continue to board.<br />&nbsp;
+       </span></td>
+</tr>
+<?php } if($passright==false) { ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Password was not right or user not found!! &lt;_&lt;<br />
+       Click <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$exqstr['member'],$prexqstr['member']); ?>">here</a> to try again.<br />&nbsp;
+       </span></td>
+</tr>
+<?php } } ?>
+</table>
+</td></tr>
+<tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+<?php }
+if($_GET['act']=="signup")
+{ 
+$membertitle = " ".$ThemeSet['TitleDivider']." Signing up"; ?>
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Register</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr class="TableRow2">
+<th class="TableRow2" style="width: 100%; text-align: left;">&nbsp;Inert your user info: </th>
+</tr>
+<tr class="TableRow3">
+<td class="TableRow3">
+<form method="post" action="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=makemember",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 30%;"><label class="TextBoxLabel" for="Name">Insert a UserName:</label></td>
+       <td style="width: 70%;"><input type="text" class="TextBox" name="Name" size="20" id="Name" /></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="Password">Insert a Password:</label></td>
+       <td><input type="password" class="TextBox" name="Password" size="20" id="Password" maxlength="30" /></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="RePassword">ReInsert a Password:</label></td>
+       <td><input type="password" class="TextBox" name="RePassword" size="20" id="RePassword" maxlength="30" /></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="Email">Insert Your Email:</label></td>
+       <td><input type="text" class="TextBox" name="Email" size="20" id="Email" /></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
+       <td><select id="YourOffSet" name="YourOffSet" class="TextBox"><?php
+$plusi = 1; $minusi = 12;
+$plusnum = 13; $minusnum = 0;
+while ($minusi > $minusnum) {
+if($Settings['DefaultTimeZone']==-$minusi) {
+echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
+if($Settings['DefaultTimeZone']!=-$minusi) {
+echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
+--$minusi; }
+if($Settings['DefaultTimeZone']==0) { ?>
+<option selected="selected" value="0">GMT +/- 0:00 hours</option>
+<?php } if($Settings['DefaultTimeZone']!=0) { ?>
+<option value="0">GMT +/- 0:00 hours</option>
+<?php }
+while ($plusi < $plusnum) {
+if($Settings['DefaultTimeZone']==$plusi) {
+echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
+if($Settings['DefaultTimeZone']!=$plusi) {
+echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
+++$plusi; }
+?></select></td>
+</tr><tr>
+       <td style="width: 40%;"><label class="TextBoxLabel" for="DST">Is <span title="Daylight Savings Time">DST</span> / <span title="Summer Time">ST</span> on or off:</label></td>
+       <td style="width: 60%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
+<?php if($Settings['DefaultDST']=="off"||$Settings['DefaultDST']!="on") { ?>
+<option selected="selected" value="off">off</option><?php echo "\n" ?><option value="on">on</option>
+<?php } if($Settings['DefaultDST']=="on") { ?>
+<option selected="selected" value="on">on</option><?php echo "\n" ?><option value="off">off</option>
+<?php } echo "\n" ?></select></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="YourGender">Your Gender:</label></td>
+       <td><select id="YourGender" name="YourGender" class="TextBox">
+<option value="Male">Male</option>
+<option value="Female">Female</option>
+<option value="Unknow">Unknow</option>
+</select></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="Website">Insert your Website:</label></td>
+       <td><input type="text" class="TextBox" name="Website" size="20" value="http://" id="Website" /></td>
+</tr><tr>
+       <td><label class="TextBoxLabel" for="Avatar">Insert a URL for Avatar:</label></td>
+       <td><input type="text" class="TextBox" name="Avatar" size="20" value="http://" id="Avatar" /></td>
+</tr><tr>
+       <td style="width: 30%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
+       <td style="width: 70%;"><select id="storecookie" name="storecookie" class="TextBox">
+<option value="true">Yes</option>
+<option value="false">No</option>
+</select></td>
+</tr>
+</table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<label class="TextBoxLabel" for="TOSBox">TOS - Please read fully and check 'I agree' box ONLY if you agree to terms</label><br />
+<textarea rows="10" cols="58" id="TOSBox" name="TOSBox" class="TextBox" readonly="readonly" accesskey="T"><?php 
+       echo file_get_contents("TOS");  ?></textarea><br />
+<input type="checkbox" class="TextBox" name="TOS" value="Agree" id="TOS" /><label class="TextBoxLabel" for="TOS">I Agree</label><br/>
+<input type="hidden" style="display: none;" name="act" value="makemembers" />
+<input type="submit" class="Button" value="Sign UP" />
+</td></tr></table>
+</form>
+</td>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+<?php } if($_GET['act']=="makemember") {
+       if($_POST['act']=="makemembers") {
+$membertitle = " ".$ThemeSet['TitleDivider']." Signing up";
+$REFERERurl = parse_url($_SERVER['HTTP_REFERER']);
+$URL['REFERER'] = $REFERERurl['host'];
+$URL['HOST'] = $_SERVER["SERVER_NAME"];
+$REFERERurl = null; unset($REFERERurl);
+?>
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: right;">&nbsp;</span>
+&nbsp;<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">Register</a></td>
+</tr>
+<tr class="TableRow2">
+<th class="TableRow2" style="width: 100%; text-align: left;">&nbsp;Signup Message: </th>
+</tr>
+<tr class="TableRow3">
+<td class="TableRow3">
+<table style="width: 100%; height: 25%; text-align: center;">
+<?php if (strlen($_POST['Password'])=="30") { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Your password is too big.<br />
+       </span></td>
+</tr>
+<?php } if (strlen($_POST['username'])=="20") { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Your user name is too big.<br />
+       </span></td>
+</tr>
+<?php } if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Your passwords did not match.<br />
+       </span></td>
+</tr>
+<?php } if ($Settings['TestReferer']==true) {
+       if ($URL['HOST']!=$URL['REFERER']) { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Sorry the referering url dose not match our host name.<br />
+       </span></td>
+</tr>
+<?php } }
+$Name = stripcslashes(htmlspecialchars($_POST['Name'], ENT_QUOTES));
+$Name = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Name);
+$Name = @remove_spaces($Name);
+$sql_email_check = mysql_query(query("select Email from ".$Settings['sqltable']."members where Email = '%s'", array($_POST['Email'])));
+$sql_username_check = mysql_query(query("select Name from ".$Settings['sqltable']."members where Name = '%s'", array($Name)));
+$email_check = mysql_num_rows($sql_email_check); 
+$username_check = mysql_num_rows($sql_username_check);
+@mysql_free_result($sql_email_check); @mysql_free_result($sql_username_check);
+if ($_POST['TOS']!="Agree") { $Error="Yes";  ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />You need to  agree to the tos.<br />
+       </span></td>
+</tr>
+<?php } if ($_POST['Name']==null) { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />You need to enter a name.<br />
+       </span></td>
+</tr>
+<?php } if ($_POST['Name']=="ShowMe") { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />You need to enter a name.<br />
+       </span></td>
+</tr>
+<?php } if ($_POST['Password']==null) { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />You need to enter a password.<br />
+       </span></td>
+</tr>
+<?php } if ($_POST['Email']==null) { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />You need to enter a email.<br />
+       </span></td>
+</tr>
+<?php } if($email_check > 0) { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Email address is already used.<br />
+       </span></td>
+</tr>
+<?php } if($username_check > 0) { $Error="Yes"; ?>
+<tr>
+       <td><span class="TableMessage">
+       <br />UserName is already used.<br />
+       </span></td>
+</tr>
+<?php } if ($Error=="Yes") {
+@redirect("refresh",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE),"4"); }
+if ($Error!="Yes") {
+$_POST['UserIP'] = $_SERVER['REMOTE_ADDR'];
+$_POST['Group'] = $Settings['MemberGroup'];
+$_POST['Joined'] = GMTimeStamp(); $_POST['LastActive'] = GMTimeStamp();
+$_POST['Signature'] = ""; $_POST['Interests'] = "";
+$_POST['Title'] = ""; $_POST['PostCount'] = "0";
+if($Settings['AdminValidate']==true||$Settings['AdminValidate']!=false)
+{ $ValidateStats="no"; $yourgroup=$Settings['ValidateGroup']; }
+if($Settings['AdminValidate']==false)
+{ $ValidateStats="yes"; $yourgroup=$Settings['MemberGroup']; }
+$HashSalt = salt_hmac(); 
+$NewPassword = b64e_hmac($_POST['Password'],$_POST['Joined'],$HashSalt,"sha1");
+$_GET['YourPost'] = $_POST['Signature'];
+//require( './'.$SettDir['misc'].'HTMLTags.php');
+$_GET['YourPost'] = htmlspecialchars($_GET['YourPost'], ENT_QUOTES);
+$_GET['YourPost'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_GET['YourPost']);
+$NewSignature = $_GET['YourPost'];
+$_GET['YourPost'] = preg_replace("/\t+/"," ",$_GET['YourPost']);
+$_GET['YourPost'] = preg_replace("/\s\s+/"," ",$_GET['YourPost']);
+$Avatar = stripcslashes(htmlspecialchars($_POST['Avatar'], ENT_QUOTES));
+$Avatar = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Avatar);
+$Avatar = @remove_spaces($Avatar);
+$Website = stripcslashes(htmlspecialchars($_POST['Website'], ENT_QUOTES));
+$Website = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $Website);
+$Website = @remove_spaces($Website);
+$gquerys = query("select * from ".$Settings['sqltable']."groups where Name='%s'", array($Settings['MemberGroup']));
+$gresults=mysql_query($gquerys);
+$yourgroup=mysql_result($gresults,0,"id");
+@mysql_free_result($gresults);
+$yourid = getnextid($Settings['sqltable'],"members");
+$_POST['Interests'] = @remove_spaces($_POST['Interests']);
+$_POST['Title'] = @remove_spaces($_POST['Title']);
+$_POST['Email'] = @remove_spaces($_POST['Email']);
+$query = query("insert into ".$Settings['sqltable']."members values (".$yourid.",'%s','%s','%s','%s','%s','%s','%i','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')", array($Name,$NewPassword,"iDBH",$_POST['Email'],$yourgroup,$ValidateStats,"0",$_POST['Interests'],$_POST['Title'],$_POST['Joined'],$_POST['LastActive'],"0",$NewSignature,'Your Notes',$Avatar,"100x100",$Website,$_POST['YourGender'],$_POST['PostCount'],$_POST['YourOffSet'],$_POST['DST'],$Settings['DefaultTheme'],$_POST['UserIP'],$HashSalt));
+mysql_query($query);
+$querylogr = query("select * from ".$Settings['sqltable']."members where Name='%s' AND Password='%s'", array($Name,$NewPassword));
+$resultlogr=mysql_query($querylogr);
+$numlogr=mysql_num_rows($resultlogr);
+if($numlogr>=1) {
+$ir=0;
+$YourIDMr=mysql_result($resultlogr,$ir,"id");
+$YourNameMr=mysql_result($resultlogr,$ir,"Name");
+$YourGroupMr=mysql_result($resultlogr,$ir,"GroupID");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($YourGroupMr));
+$gresult=mysql_query($gquery);
+$YourGroupMr=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$YourTimeZoneMr=mysql_result($resultlogr,$ir,"TimeZone");
+$YourDSTMr=mysql_result($resultlogr,$ir,"DST"); }
+@mysql_free_result($resultlogr);
+@session_regenerate_id(true);
+$_SESSION['Loggedin']=true;
+$_SESSION['MemberName']=$YourNameMr;
+$_SESSION['UserID']=$YourIDMr;
+$_SESSION['UserTimeZone']=$YourTimeZoneMr;
+$_SESSION['UserDST']=$YourDSTMr;
+$_SESSION['UserGroup']=$YourGroupMr;
+if($_POST['storecookie']==true) {
+@setcookie("MemberName", $YourNameM, time() + (7 * 86400), $basedir);
+@setcookie("UserID", $YourIDM, time() + (7 * 86400), $basedir);
+@setcookie("SessPass", $YourPassM, time() + (7 * 86400), $basedir); }
+//$SendPMtoID=$_SESSION['UserID'];
+//$YourPMID = 1;
+//$PMTitle = "Welcome ".$Name.".";
+//$YourMessage = "Hello ".$Name.". Welcome to ".$Settings['board_name'].". I hope you have fun here. ^_^ ";
+//$_POST['YourDate'] = $_POST['Joined'];
+//$query = query("insert into ".$Settings['sqltable']."messenger values (null,%s,%s,'%s','%s','%s',%s,0)", array($YourPMID,$SendPMtoID,'',$PMTitle,$YourMessage,$_POST['YourDate']));
+//mysql_query($query);
+@redirect("refresh",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],FALSE),"3");
+?>
+<tr>
+       <td><span class="TableMessage">
+       <br />Welcome to the Board <?php echo $_SESSION['MemberName']; ?>. ^_^<br />
+       Click <a href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">here</a> to continue to board.<br />&nbsp;
+       </span></td>
+</tr>
+<?php } ?>
+</table>
+</td></tr>
+<tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+<?php } } ?>
+</table></div>
\ No newline at end of file
diff --git a/inc/misc/compression.php b/inc/misc/compression.php
new file mode 100644 (file)
index 0000000..07fee03
--- /dev/null
@@ -0,0 +1,79 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+    GZip and Zlib by Jean-loup Gailly (compression) and Mark Adler (decompression) http://www.zlib.net/\r
+       BZip2 and libbzip2 by Julian Seward http://www.bzip.org/\r
+\r
+    $FileInfo: compression.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name=="compression.php"||$File3Name=="/compression.php") {\r
+       require('index.php');\r
+       exit(); }\r
+\r
+if(@extension_loaded("zlib")) {\r
+function gunzip($infile, $outfile) {\r
+  $zp = gzopen($infile, "r");\r
+  while(!gzeof($zp))\r
+       $string .= gzread($zp, 4096);\r
+  gzclose($zp);\r
+  $fp = fopen($outfile, "w");\r
+  fwrite($fp, $string, strlen($string));\r
+  fclose($fp);\r
+}\r
+\r
+function gunzip2($infile, $outfile) {\r
+ $string = implode("", gzfile($infile));\r
+ $fp = fopen($outfile, "w");\r
+ fwrite($fp, $string, strlen($string));\r
+ fclose($fp);\r
+}\r
+function gzip($infile, $outfile, $param = 5)\r
+{\r
+ $fp = fopen($infile, "r");\r
+ $data = fread ($fp, filesize($infile));\r
+ fclose($fp);\r
+ $zp = gzopen($outfile, "w".$param);\r
+ gzwrite($zp, $data);\r
+ gzclose($zp);\r
+} }\r
+\r
+if(@extension_loaded("bz2")) {\r
+function bzip($infile, $outfile)\r
+{\r
+ $fp = fopen($infile, "r");\r
+ $data = fread($fp, filesize($infile));\r
+ fclose($fp);\r
+ $zp = bzopen($outfile, "w");\r
+ bzwrite($zp, $data);\r
+ bzclose($zp);\r
+}\r
+\r
+function bunzip($infile, $outfile) {\r
+  $zp = bzopen($infile, "r");\r
+  while(!feof($zp))\r
+       $string .= bzread($zp, 4096);\r
+  bzclose($zp);\r
+  $fp = fopen($outfile, "w");\r
+  fwrite($fp, $string, strlen($string));\r
+  fclose($fp);\r
+} }\r
+\r
+if(@extension_loaded("zip")) {\r
+/* Nothing for now... :P */ }\r
+\r
+if(@extension_loaded("rar")) {\r
+/* Nothing for now... :P */ }\r
+\r
+?>\r
diff --git a/inc/misc/functions.php b/inc/misc/functions.php
new file mode 100644 (file)
index 0000000..0925b67
--- /dev/null
@@ -0,0 +1,342 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: functions.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name=="functions.php"||$File3Name=="/functions.php") {\r
+       require('index.php');\r
+       exit(); }\r
+function CheckFile($FileName) {\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name==$FileName||$File3Name=="/".$FileName) {\r
+       require('index.php');\r
+       exit(); }\r
+return null; }\r
+function CheckFiles($FileName) {\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name==$FileName||$File3Name=="/".$FileName) {\r
+       return true; } }\r
+CheckFile("functions.php");\r
+require($SettDir['misc']."compression.php");\r
+if ($_GET['act']=="DeleteSession") {\r
+       @session_destroy(); }\r
+if ($_GET['act']=="ResetSession") {\r
+       @session_unset(); }\r
+if ($_GET['act']=="NewSessionID") {\r
+       @session_regenerate_id(); }\r
+if ($_GET['act']=="PHPInfo") {\r
+       @phpinfo(); exit(); }\r
+if ($_GET['act']=="phpinfo") {\r
+       @phpinfo(); exit(); }\r
+if ($_GET['act']=="PHPCredits") {\r
+       @phpcredits(); exit(); }\r
+if ($_GET['act']=="phpcredits") {\r
+       @phpcredits(); exit(); }\r
+function ConnectMysql($sqlhost,$sqluser,$sqlpass,$sqldb) {\r
+$StatSQL = @mysql_connect($sqlhost,$sqluser,$sqlpass);\r
+$StatBase = @mysql_select_db($sqldb);\r
+if (!$StatSQL) { return false; }\r
+if (!$StatBase) { return false; }\r
+return true; }\r
+       $Names['RS'] = "Renee Sabonis";\r
+define("_renee_", $Names['RS']);\r
+function change_title($new_title,$use_gzip) {\r
+global $Settings;\r
+$output = @ob_get_clean();\r
+$output = preg_replace("/<title>(.*?)<\/title>/", "<title>".$new_title."</title>", $output);\r
+/* Change Some PHP Settings Fix the &PHPSESSID to &amp;PHPSESSID */\r
+$SessName = @session_name();\r
+$output = preg_replace("/&PHPSESSID/", "&amp;PHPSESSID", $output);\r
+$qstrcode = htmlentities($Settings['qstr']);\r
+$output = str_replace($Settings['qstr'].$SessName, $qstrcode.$SessName, $output);\r
+if($use_gzip!=true) {\r
+       if($Settings['send_pagesize']==true) {\r
+       Header("Content-Length: " . strlen($output)); }\r
+       echo $output; }\r
+if($use_gzip==true) {\r
+       $goutput = gzencode($output);\r
+       if($Settings['send_pagesize']==true) {\r
+       Header("Content-Length: " . strlen(gzencode($goutput))); }\r
+       echo $goutput; } }\r
+function fix_amp($use_gzip) {\r
+global $Settings;\r
+$output = @ob_get_clean();\r
+/* Change Some PHP Settings Fix the &PHPSESSID to &amp;PHPSESSID */\r
+$SessName = @session_name();\r
+$output = preg_replace("/&PHPSESSID/", "&amp;PHPSESSID", $output);\r
+$qstrcode = htmlentities($Settings['qstr']);\r
+$output = str_replace($Settings['qstr'].$SessName, $qstrcode.$SessName, $output);\r
+if($use_gzip!=true) {\r
+       if($Settings['send_pagesize']==true) {\r
+       Header("Content-Length: " . strlen($output)); }\r
+       echo $output; }\r
+if($use_gzip==true) {\r
+       $goutput = gzencode($output);\r
+       if($Settings['send_pagesize']==true) {\r
+       Header("Content-Length: " . strlen(gzencode($goutput))); }\r
+       echo $goutput; } }\r
+function gzip_page($use_gzip) {\r
+global $Settings;\r
+$output = @ob_get_clean();\r
+       $Names['RJ'] = "René Johnson";\r
+define("_rene_", $Names['RJ']);\r
+if($use_gzip!=true) {\r
+       if($Settings['send_pagesize']==true) {\r
+       Header("Content-Length: " . strlen($output)); }\r
+       echo $output; }\r
+if($use_gzip==true) {\r
+       $goutput = gzencode($output);\r
+       if($Settings['send_pagesize']==true) {\r
+       Header("Content-Length: " . strlen(gzencode($goutput))); }\r
+       echo $goutput; } }\r
+$foo="bar"; $$foo="foo";\r
+// SafeSQL Lite Source Code by Cool Dude 2k\r
+function query($query_string,$query_vars) {\r
+   $query_array = array(array("%i","%I","%F","%S"),array("%d","%d","%f","%s"));\r
+   $query_string = str_replace($query_array[0], $query_array[1], $query_string);\r
+   if (get_magic_quotes_gpc()) {\r
+       $query_vars  = array_map("stripslashes", $query_vars); }\r
+   $query_vars = array_map("mysql_real_escape_string", $query_vars);\r
+   $query_val = $query_vars;\r
+$query_num = count($query_val);\r
+$query_i = 0;\r
+while ($query_i < $query_num) {\r
+$query_is = $query_i+1;\r
+$query_val[$query_is] = $query_vars[$query_i];\r
+++$query_i; }\r
+   $query_val[0] = $query_string;\r
+   return call_user_func_array("sprintf",$query_val); }\r
+function killbadvars($varname) {\r
+$badphp1 = array('$'); $badphp2 = array(null);\r
+$varname = str_replace($badphp1, $badphp2, $varname);\r
+$varname = preg_replace("/(_SERVER|_ENV|_COOKIE|_SESSION)/i", null, $varname);\r
+$varname = preg_replace("/(_GET|_POST|_FILES|_REQUEST|GLOBALS)/i", null, $varname);\r
+$varname = preg_replace("/(HTTP_SERVER_VARS|HTTP_ENV_VARS)/i", null, $varname);\r
+$varname = preg_replace("/(HTTP_COOKIE_VARS|HTTP_SESSION_VARS)/i", null, $varname);\r
+$varname = preg_replace("/(HTTP_GET_VARS|HTTP_POST_VARS|HTTP_POST_FILES)/i", null, $varname);\r
+       return $varname; }\r
+function text2icons($Text,$sqlt) {\r
+global $Settings;\r
+$renquery="SELECT * FROM ".$sqlt."smileys";\r
+$renresult=mysql_query($renquery);\r
+$rennum=mysql_num_rows($renresult);\r
+$reni=0;\r
+while ($reni < $rennum) {\r
+$FileName=mysql_result($renresult,$reni,"FileName");\r
+$SmileName=mysql_result($renresult,$reni,"SmileName");\r
+$SmileText=mysql_result($renresult,$reni,"SmileText");\r
+$SmileDirectory=mysql_result($renresult,$reni,"Directory");\r
+$ShowSmile=mysql_result($renresult,$reni,"Show");\r
+$Smile1 = array($SmileText);\r
+$Smile2 = array('<img src="'.$SmileDirectory.''.$FileName.'" style="vertical-align: middle; border: 0px;" title="'.$SmileName.'" alt="'.$SmileName.'" />');\r
+$Text=str_replace($Smile1, $Smile2, $Text);\r
+++$reni; } return $Text; }\r
+function remove_spaces($Text) {\r
+$Text = preg_replace("/(^\t+|\t+$)/","",$Text);\r
+$Text = preg_replace("/(^\n+|\n+$)/","",$Text);\r
+$Text = preg_replace("/(^\r+|\r+$)/","",$Text);\r
+$Text = preg_replace("/(\r|\n|\t)+/"," ",$Text);\r
+$Text = preg_replace("/\s\s+/"," ",$Text);\r
+$Text = preg_replace("/(^\s+|\s+$)/","",$Text);\r
+return $Text; }\r
+function fixbamps($text) {\r
+$fixamps1 = array("&amp;copy;","&amp;reg;","&amp;trade;","&amp;quot;","&amp;amp;","&amp;lt;","&amp;gt;","&amp;(a|e|i|o|u|y)acute;","&amp;(a|e|i|o|u)grave;","&amp;(a|e|i|o|u)circ;","&amp;(a|e|i|o|u|y)uml;","&amp;(a|o|n)tilde;","&amp;aring;","&amp;aelig;","&amp;ccedil;","&amp;eth;","&amp;oslash;","&amp;szlig;","&amp;thorn;");\r
+$fixamps2 = array("&copy;","&reg;","&trade;","&quot;","&amp;","&lt;","&gt;","&\\1acute;","&\\1grave;","&\\1circ;","&\\1uml;","&\\1tilde;","&aring;","&aelig;","&ccedil;","&eth;","&oslash;","&szlig;","&thorn;");\r
+$ampnum = count($fixamps1); $ampi=0;\r
+while ($ampi < $ampnum) {\r
+$text = preg_replace("/".$fixamps1[$ampi]."/i", $fixamps2[$ampi], $text);\r
+++$ampi; }\r
+$text = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $text);\r
+return $text; }\r
+function getnextid($tablepre,$table) {\r
+   $getnextidq = query("SHOW TABLE STATUS LIKE '".$tablepre.$table."'", array());\r
+   $getnextidr = mysql_query($getnextidq);\r
+   $getnextid = mysql_fetch_assoc($getnextidr);\r
+   return $getnextid['Auto_increment'];\r
+   @mysql_free_result($getnextidr); }\r
+       $Names['RSA'] = "Rachel Sabonis";\r
+define("_rachel_", $Names['RSA']);\r
+function redirects($type,$url,$time=0) {\r
+if($type!="location"&&\r
+       $type!="refresh") {\r
+       $type=="location"; }\r
+if($type=="refresh") {\r
+header("Refresh: ".$time."; URL=".$url); }\r
+if($type=="location") {\r
+header("Location: ".$url); }\r
+return true; }\r
+function xml_doc_start($ver,$encode,$retval=false) {\r
+       if($retval!=false&&$retval!=true) { $retval=false; }\r
+       if($retval==false) {\r
+       echo '<?xml version="'.$ver.'" encoding="'.$encode.'"?>'."\n"; }\r
+       if($retval==true) {\r
+       return '<?xml version="'.$ver.'" encoding="'.$encode.'"?>'."\n"; } }\r
+function GMTimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {\r
+$TCHour = date("H",$timestamp);\r
+$TCMinute = date("i",$timestamp);\r
+$TCSecond = date("s",$timestamp);\r
+$TCMonth = date("n",$timestamp);\r
+$TCDay = date("d",$timestamp);\r
+$TCYear = date("Y",$timestamp);\r
+unset($dstake); $dstake = null;\r
+if(!is_numeric($offset)) { $offset = 0; }\r
+if(!is_numeric($minoffset)) { $minoffset = 0; }\r
+if($dst!="on"&&$dst!="off") { $dst = "off"; }\r
+if($dst=="on") { \r
+if($dstake!="done") {\r
+if($offset>=0) { $dstake = "done";\r
+       $offset = $offset-1; } }\r
+if($dstake!="done") {\r
+if($offset<0) { $dstake = "done";\r
+       $offset = $offset+1; } } }\r
+$TCHour = $TCHour + $offset;\r
+$TCMinute = $TCMinute + $minoffset;\r
+return date($format,mktime($TCHour,$TCMinute,$TCSecond,$TCMonth,$TCDay,$TCYear)); }\r
+function TimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {\r
+$TCHour = date("H",$timestamp);\r
+$TCMinute = date("i",$timestamp);\r
+$TCSecond = date("s",$timestamp);\r
+$TCMonth = date("n",$timestamp);\r
+$TCDay = date("d",$timestamp);\r
+$TCYear = date("Y",$timestamp);\r
+unset($dstake); $dstake = null;\r
+if(!is_numeric($offset)) { $offset = 0; }\r
+if(!is_numeric($minoffset)) { $minoffset = 0; }\r
+if($dst!="on"&&$dst!="off") { $dst = "off"; }\r
+if($dst=="on") { \r
+if($dstake!="done") {\r
+if($offset>=0) { $dstake = "done";\r
+       $offset = $offset-1; } }\r
+if($dstake!="done") {\r
+if($offset<0) { $dstake = "done";\r
+       $offset = $offset+1; } } }\r
+$TCHour = $TCHour + $offset;\r
+$TCMinute = $TCMinute + $minoffset;\r
+return date($format,mktime($TCHour,$TCMinute,$TCSecond,$TCMonth,$TCDay,$TCYear)); }\r
+function GMTimeStamp() {\r
+$GMTHour = gmdate("H");\r
+$GMTMinute = gmdate("i");\r
+$GMTSecond = gmdate("s");\r
+$GMTMonth = gmdate("n");\r
+$GMTDay = gmdate("d");\r
+$GMTYear = gmdate("Y");\r
+return mktime($GMTHour,$GMTMinute,$GMTSecond,$GMTMonth,$GMTDay,$GMTYear); }\r
+function GMTimeStampS() { return time() - date('Z', time()); }\r
+function GMTimeGet($format,$offset,$minoffset=null,$dst=null) { \r
+       return GMTimeChange($format,GMTimeStamp(),$offset,$minoffset,$dst); }\r
+function GMTimeGetS($format,$offset,$minoffset=null,$dst=null) {\r
+unset($dstake); $dstake = null;\r
+if(!is_numeric($offset)) { $offset = 0; }\r
+if(!is_numeric($minoffset)) { $minoffset = 0; }\r
+if($dst!="on"&&$dst!="off") { $dst = "off"; }\r
+if($dst=="on") { \r
+if($dstake!="done") {\r
+if($offset>=0) { $dstake = "done";\r
+       $offset = $offset-1; } }\r
+if($dstake!="done") {\r
+if($offset<0) { $dstake = "done";\r
+       $offset = $offset+1; } } }\r
+return date($format,mktime(gmdate('h')+$offset,gmdate('i')+$minoffset,gmdate('s'),gmdate('n'),gmdate('j'),gmdate('Y'))); }\r
+function GetSeverZone() {\r
+$TestHour1 = date("H");\r
+@putenv("OTZ=".@getenv("TZ"));\r
+@putenv("TZ=GMT");\r
+$TestHour2 = date("H");\r
+@putenv("TZ=".@getenv("OTZ"));\r
+$TestHour3 = $TestHour1-$TestHour2;\r
+return $TestHour3; }\r
+function SeverOffSet() {\r
+$TestHour1 = date("H");\r
+$TestHour2 = gmdate("H");\r
+$TestHour3 = $TestHour1-$TestHour2;\r
+return $TestHour3; }\r
+function SeverOffSetNew() {\r
+return gmdate("g",mktime(0,date("Z"))); }\r
+function gmtime() { return time() - (int) date('Z'); }\r
+function file_get_source($filename,$return = FALSE) {\r
+// Acts like highlight_file();\r
+$phpsrc = file_get_contents($filename);\r
+$phpsrcs = highlight_string($phpsrc,$return);\r
+return $phpsrcs; }\r
+function valid_get_source($filename) {\r
+$phpsrcs = file_get_source($filename,TRUE);\r
+// Change font tag to span tag for valid xhtml\r
+$phpsrcs = preg_replace("/\<font color=\"(.*?)\"\>/i", "<span style=\"color: \\1;\">", $phpsrcs);\r
+$phpsrcs = preg_replace("/\<\/font>/i", "</span>", $phpsrcs);\r
+return $phpsrcs; }\r
+function GetUserName($idu,$sqlt) {\r
+$gunquery = query("select * from ".$sqlt."members where id=%i", array($idu));\r
+$gunresult=mysql_query($gunquery);\r
+$gunnum=mysql_num_rows($gunresult);\r
+if($gunnum>0){\r
+$UsersName=mysql_result($gunresult,$gunnum-1,"Name"); }\r
+@mysql_free_result($gunresult);\r
+return $UsersName; }\r
+function hmac($data,$key,$hash='sha1',$blocksize=64) {\r
+  if (strlen($key)>$blocksize) {\r
+  $key=pack('H*',$hash($key)); }\r
+  $key=str_pad($key, $blocksize, chr(0x00));\r
+  $ipad=str_repeat(chr(0x36),$blocksize);\r
+  $opad=str_repeat(chr(0x5c),$blocksize);\r
+  return $hash(($key^$opad).pack('H*',$hash(($key^$ipad).$data))); }\r
+function b64e_hmac($data,$key,$extdata,$hash='sha1',$blocksize=64) {\r
+       $extdata2 = hexdec($extdata); $key = $key.$extdata2;\r
+  return base64_encode(hmac($data,$key,$hash,$blocksize).$extdata); }\r
+function salt_hmac($size1=4,$size2=6) {\r
+$hprand = rand(4,6); $i = 0; $hpass = "";\r
+while ($i < $hprand) {\r
+$hspsrand = rand(1,2);\r
+if($hspsrand!=1&&$hspsrand!=2) { $hspsrand=1; }\r
+if($hspsrand==1) { $hpass .= chr(rand(48,57)); }\r
+if($hspsrand==2) { $hpass .= chr(rand(65,70)); }\r
+++$i; } return $hpass; }\r
+/* is_empty by M at http://us2.php.net/manual/en/function.empty.php#74093 */\r
+function is_empty($var) {\r
+    if (((is_null($var) || rtrim($var) == "") &&\r
+               $var !== false) || (is_array($var) && empty($var))) {\r
+        return true; } else {\r
+        return false; } }\r
+function PassHash2x($Text) {\r
+$Text = md5($Text);\r
+$Text = sha1($Text);\r
+return $Text; }\r
+function PassHash2x2($data,$key,$extdata,$blocksize=64) {\r
+$extdata2 = hexdec($extdata); $key = $key.$extdata2;\r
+$Text = hmac($data,$key,"md5").$extdata; \r
+$Text = hmac($Text,$key,"sha1").$extdata;\r
+return base64_encode($Text); }\r
+function cp($infile,$outfile,$mode="w") { \r
+   $contents = file_get_contents($infile);\r
+   $cpfp = fopen($outfile,$mode);\r
+   fwrite($cpfp, $contents);\r
+   fclose($cpfp);\r
+   return true; }\r
+/* str_ireplace for PHP below ver. 5 // \r
+// by René Johnson - Cool Dude 2k    */\r
+if(!function_exists('str_ireplace')) {\r
+function str_ireplace($search,$replace,$subject) {\r
+$search = preg_quote($search, "/");\r
+return preg_replace("/".$search."/i", $replace, $subject); } }\r
+$foobar="fubar"; $$foobar="foobar";\r
+function dump_included_files() {       return var_dump(get_included_files()); }\r
+function count_included_files() {      return count(get_included_files()); }\r
+function dump_extensions() {   return var_dump(get_loaded_extensions()); }\r
+function count_extensions() {  return count(get_loaded_extensions()); }\r
+?>\r
diff --git a/inc/misc/index.php b/inc/misc/index.php
new file mode 100644 (file)
index 0000000..32439df
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../../index.php');
+?>
\ No newline at end of file
diff --git a/inc/misc/killglobals.php b/inc/misc/killglobals.php
new file mode 100644 (file)
index 0000000..f8c784d
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+       Kill Register Globals (Register Globals are very lame we dont need them anyways. :P)
+
+    $FileInfo: killglobals.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="killqlobals.php"||$File3Name=="/killqlobals.php") {
+       require('index.php');
+       exit(); }
+function unregister_globals() {
+   $REQUEST = $_REQUEST;
+   $GET = $_GET;
+   $POST = $_POST;
+   $COOKIE = $_COOKIE;
+   if(isset($_SESSION)) {
+   $SESSION = $_SESSION; }
+   $FILES = $_FILES;
+   $ENV = $_ENV;
+   $SERVER = $_SERVER;
+   foreach($GLOBALS as $key => $value) {
+   if($key!='GLOBALS') {
+   unset($GLOBALS[$key]); } }
+   $_REQUEST = $REQUEST;
+   $_GET = $GET;
+   $_POST = $POST;
+   $_COOKIE = $COOKIE;
+   if(isset($SESSION)) {
+   $_SESSION = $SESSION; }
+   $_FILES = $FILES;
+   $_ENV = $ENV;
+   $_SERVER = $SERVER; }
+unregister_globals();
+?>
\ No newline at end of file
diff --git a/inc/misc/setcheck.php b/inc/misc/setcheck.php
new file mode 100644 (file)
index 0000000..03948e0
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: setcheck.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+if($Settings['DefaultTheme']==null) {
+       $Settings['DefaultTheme'] = "iDB"; }
+if($Settings['DefaultTimeZone']==null) {
+       $Settings['DefaultTimeZone'] = SeverOffSet(null); }
+if(!is_numeric($Settings['DefaultTimeZone'])) {
+       $Settings['DefaultTimeZone'] = SeverOffSet(null); }
+if($Settings['DefaultDST']!="on"&&
+       $Settings['DefaultDST']!="off") { 
+       $Settings['DefaultDST'] = "off"; }
+if($Settings['enable_rss']!="on"&&
+       $Settings['enable_rss']!=true) { 
+       $Settings['enable_rss'] = false; }
+if($Settings['enable_rss']=="on") { 
+    $Settings['enable_rss'] = true; }
+if($Settings['EnableToggle']!="on"&&
+       $Settings['EnableToggle']!="off") { 
+       $Settings['EnableToggle'] = "off"; }
+if($Settings['EnableToggle']!="on"&&
+       $Settings['EnableToggle']!=true) { 
+       $Settings['EnableToggle'] = false; }
+if($Settings['EnableToggle']=="on") { 
+    $Settings['EnableToggle'] = true; }
+if($Settings['DefaultTheme']!=null) {
+if (file_exists("themes/".$Settings['DefaultTheme']."/settings.php")) {
+/* The file Skin Exists */ }
+else { $Settings['DefaultTheme']="iDB";
+/* The file Skin Dose Not Exists */ } }
+if($Settings['TestReferer']!=true&&
+       $Settings['TestReferer']!=false) {
+       $Settings['TestReferer'] = false; }
+if($Settings['charset']==null) {
+       $Settings['charset'] = "iso-8859-15"; }
+if($Settings['qstr']==null) {
+       $Settings['qstr'] = "&"; }
+if($Settings['qsep']==null) {
+       $Settings['qsep'] = "="; }
+if($Settings['qsep']=="#"||
+       $Settings['qstr']=="#") {
+       $Settings['qstr'] = "&";
+       $Settings['qsep'] = "="; }
+if($Settings['qsep']==$Settings['qstr']) {
+       $Settings['qstr'] = "&";
+       $Settings['qsep'] = "="; }
+if($Settings['qstr']=="/"||
+       $Settings['qstr']=="&") {
+       $Settings['qsep'] = "="; }
+if($Settings['qstr']!="&"&&
+       $Settings['qstr']!="/") {
+@qstring($Settings['qstr'],$Settings['qsep']); }
+if($Settings['file_ext']==null) {
+       $Settings['file_ext'] = ".php"; }
+if($Settings['rss_ext']==null) {
+       $Settings['rss_ext'] = ".php"; }
+if($Settings['js_ext']==null) {
+       $Settings['js_ext'] = ".js"; }
+if($Settings['add_power_by']==true) {
+$idbpowertitle = " (Powered by ".$iDB.")";
+$itbpowertitle = " (Powered by ".$iTB.")"; }
+if($Settings['add_power_by']!=true) {
+$idbpowertitle = null;
+$itbpowertitle = null; }
+if($Settings['GuestGroup']==null) {
+       $Settings['GuestGroup'] = "Guest"; }
+if($Settings['MemberGroup']==null) {
+       $Settings['MemberGroup'] = "Member"; }
+if($Settings['ValidateGroup']==null&&
+       $Settings['AdminValidate']==true) {
+$Settings['ValidateGroup'] = "Validate"; }
+if($Settings['fixpathinfo']==null) {
+       $Settings['fixpathinfo'] = false; }
+if($Settings['fixbasedir']==null) {
+       $Settings['fixbasedir'] = false; }
+if($Settings['html_type']=="html4") { 
+       $Settings['html_type'] = "html10"; }
+if ($_GET['act']=="iDBInfo") { @header('Location: http://developer.berlios.de/projects/idb/'); }
+if ($_GET['act']=="iDBSite") { @header('Location: http://intdb.sourceforge.net/'); }
+if ($_GET['act']=="GM2kSite") { @header('Location: http://upload.idb.s1.jcink.com/'); }
+/*if($_GET['debug']=="true"||$_GET['debug']=="on") {
+       output_add_rewrite_var("amp;debug",$_GET['debug']); }*/
+if ($_GET['act']==null&&$_GET['action']!=null) { $_GET['act']=$_GET['action']; }
+if ($_GET['act']==null&&$_GET['activity']!=null) { $_GET['act']=$_GET['activity']; }
+if ($_GET['act']==null&&$_GET['function']!=null) { $_GET['act']=$_GET['function']; }
+if ($_GET['act']==null&&$_GET['mode']!=null) { $_GET['act']=$_GET['mode']; }
+if ($_GET['act']==null&&$_GET['show']!=null) { $_GET['act']=$_GET['show']; }
+if ($_GET['act']==null&&$_GET['do']!=null) { $_GET['act']=$_GET['do']; }
+if ($_GET['act']=="idx"||$_GET['act']=="View") { $_GET['act']="view"; }
+?>
\ No newline at end of file
diff --git a/inc/mod/index.php b/inc/mod/index.php
new file mode 100644 (file)
index 0000000..32439df
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../../index.php');
+?>
\ No newline at end of file
diff --git a/inc/navbar.php b/inc/navbar.php
new file mode 100644 (file)
index 0000000..91403b5
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: navbar.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="navbar.php"||$File3Name=="/navbar.php") {
+       require('index.php');
+       exit(); }
+if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+$pmquery1 = query("select * from ".$Settings['sqltable']."messenger where `PMSentID` = %i and `Read` = 0", array($_SESSION['UserID']));
+$pmresult1=mysql_query($pmquery1);
+$PMNumber=mysql_num_rows($pmresult1);
+@mysql_free_result($pmresult1); /*
+$pmquery2 = query("select * from ".$Settings['sqltable']."messenger where `SenderID` = %i and `Read` = 0", array($_SESSION['UserID']));
+$pmresult2=mysql_query($pmquery2);
+$SentPMNumber=mysql_num_rows($pmresult2);
+@mysql_free_result($pmresult2); */ }
+if($ThemeSet['LogoStyle']==null) { $logostyle = ""; }
+if($ThemeSet['LogoStyle']!=null) { $logostyle = "style=\"".$ThemeSet['LogoStyle']."\" "; }
+?>
+<div class="NavBorder">
+<table id="NavBarTable" class="NavBar1">
+<tr class="NavBar2">
+<td id="NavBarLogo" class="NavBar2"><?php echo $ThemeSet['PreLogo']; ?>
+<a <?php echo $logostyle; ?>title="<?php echo $Settings['board_name'].$idbpowertitle; ?>" href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>">
+<?php echo $ThemeSet['Logo']; ?></a>
+<?php echo $ThemeSet['SubLogo']; ?></td>
+</tr>
+<tr class="NavBar3">
+<td id="NavBarLinks" class="NavBar3"><span style="float: left;">&nbsp;<?php if($_SESSION['UserGroup']==$Settings['GuestGroup']) {?>Welcome Guest ( <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=login",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log in</a><?php echo $ThemeSet['LineDivider']; ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=signup",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Register</a> )<?php } if($_SESSION['UserGroup']!=$Settings['GuestGroup']) { ?>Logged as: <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_SESSION['UserID'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>"><?php echo $_SESSION['MemberName']; ?></a> ( <a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Log out</a> )<?php } ?></span>
+<span style="float: right;"><?php if($_SESSION['UserGroup']!=$Settings['GuestGroup']) { ?><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Profile</a><?php echo $ThemeSet['LineDivider']; ?><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">MailBox&nbsp;(<?php echo $PMNumber; ?>)</a><?php echo $ThemeSet['LineDivider']; ?><?php } ?><a href="<?php echo url_maker($exfile['member'],$Settings['file_ext'],"act=list",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); ?>">Members</a><?php echo $ThemeSet['LineDivider']; ?><a href="<?php echo url_maker($exfile['calendar'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['calendar'],$exqstr['calendar']); ?>">Calendar</a>&nbsp;</span></td>
+</tr>
+</table></div>
+<div>&nbsp;</div>
\ No newline at end of file
diff --git a/inc/pm.php b/inc/pm.php
new file mode 100644 (file)
index 0000000..2e49732
--- /dev/null
@@ -0,0 +1,278 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="pm.php"||$File3Name=="/pm.php") {
+       require('index.php');
+       exit(); }
+?>
+<table class="Table3">
+<tr style="width: 100%; vertical-align: top;">
+       <td style="width: 15%; vertical-align: top;">
+       <div class="Table1Border">
+       <table id="MessengerLinks" class="Table1" style="width: 100%; float: left; vertical-align: top;">
+<tr class="TableRow1">
+<td class="TableRow1"><?php echo $ThemeSet['TitleIcon'] ?>Messenger</td>
+</tr><tr class="TableRow2">
+<td class="TableRow2">&nbsp;</td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">View MailBox</a></td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=viewsent",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">View SentBox</a></td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="#<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=send",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">Send Message</a></td>
+</tr><tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr></table></div>
+</td>
+       <td style="width: 85%; vertical-align: top;">
+<?php
+if($_GET['act']=="view") {
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1" colspan="6"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">MailBox&nbsp;(<?php echo $PMNumber; ?>)</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="Messenger" class="TableRow2">
+<th class="TableRow2" style="width: 4%;">State</th>
+<th class="TableRow2" style="width: 46%;">Message Name</th>
+<th class="TableRow2" style="width: 25%;">Sender</th>
+<th class="TableRow2" style="width: 25%;">Time</th>
+</tr>
+<?php
+$query = query("select * from ".$Settings['sqltable']."messenger where `PMSentID` = %i ORDER BY DateSend DESC", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+while ($i < $num) {
+$PMID=mysql_result($result,$i,"id");
+$SenderID=mysql_result($result,$i,"SenderID");
+$SenderName = GetUserName($SenderID,$Settings['sqltable']);
+$SentToID=mysql_result($result,$i,"PMSentID");
+$SentToName = GetUserName($SentToID,$Settings['sqltable']);
+$PMGuest=mysql_result($result,$i,"GuestName");
+$MessageName=mysql_result($result,$i,"MessageTitle");
+$MessageDesc=mysql_result($result,$i,"Description");
+$DateSend=mysql_result($result,$i,"DateSend");
+$DateSend=GMTimeChange("F j, Y, g:i a",$DateSend,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MessageStat=mysql_result($result,$i,"Read");
+if($SenderName=="Guest") { $SenderName=$PMGuest;
+if($SenderName==null) { $SenderName="Guest"; } }
+$PreMessage = $ThemeSet['MessageUnread'];
+if ($MessageStat==0) {
+       $PreMessage=$ThemeSet['MessageUnread']; }
+if ($MessageStat==1) {
+       $PreMessage=$ThemeSet['MessageRead']; }
+?>
+<tr class="TableRow3" id="Message<?php echo $PMID; ?>">
+<td class="TableRow3"><div class="messagestate">
+<?php echo $PreMessage; ?></div></td>
+<td class="TableRow3"><div class="messagename">
+<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=read&id=".$PMID,$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>"><?php echo $MessageName; ?></a></div>
+<div class="messagedesc"><?php echo $MessageDesc; ?></div></td>
+<td class="TableRow3" style="text-align: center;"><a href="<?php
+if($SenderID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=read&id".$SenderID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($SenderID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $SenderName; ?></a></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $DateSend; ?></td>
+</tr>
+<?php ++$i; } @mysql_free_result($result); ?>
+<tr id="MessengerEnd" class="TableRow4">
+<td class="TableRow4" colspan="6">&nbsp;</td>
+</tr>
+<?php } 
+if($_GET['act']=="viewsent") {
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1" colspan="6"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>">MailBox&nbsp;(<?php echo $PMNumber; ?>)</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="Messenger" class="TableRow2">
+<th class="TableRow2" style="width: 4%;">State</th>
+<th class="TableRow2" style="width: 46%;">Message Name</th>
+<th class="TableRow2" style="width: 25%;">Sent To</th>
+<th class="TableRow2" style="width: 25%;">Time</th>
+</tr>
+<?php
+$query = query("select * from ".$Settings['sqltable']."messenger where `SenderID` = %i ORDER BY DateSend DESC", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+while ($i < $num) {
+$PMID=mysql_result($result,$i,"id");
+$SenderID=mysql_result($result,$i,"SenderID");
+$SenderName = GetUserName($SenderID,$Settings['sqltable']);
+$SentToID=mysql_result($result,$i,"PMSentID");
+$SentToName = GetUserName($SentToID,$Settings['sqltable']);
+$PMGuest=mysql_result($result,$i,"GuestName");
+$MessageName=mysql_result($result,$i,"MessageTitle");
+$MessageDesc=mysql_result($result,$i,"Description");
+$DateSend=mysql_result($result,$i,"DateSend");
+$DateSend=GMTimeChange("F j, Y, g:i a",$DateSend,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MessageStat=mysql_result($result,$i,"Read");
+if($SenderName=="Guest") { $SenderName=$PMGuest;
+if($SenderName==null) { $SenderName="Guest"; } }
+$PreMessage = $ThemeSet['MessageUnread'];
+if ($MessageStat==0) {
+       $PreMessage=$ThemeSet['MessageUnread']; }
+if ($MessageStat==1) {
+       $PreMessage=$ThemeSet['MessageRead']; }
+?>
+<tr class="TableRow3" id="Message<?php echo $PMID; ?>">
+<td class="TableRow3"><div class="messagestate">
+<?php echo $PreMessage; ?></div></td>
+<td class="TableRow3"><div class="messagename">
+<a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=read&id=".$PMID,$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>"><?php echo $MessageName; ?></a></div>
+<div class="messagedesc"><?php echo $MessageDesc; ?></div></td>
+<td class="TableRow3" style="text-align: center;"><a href="<?php
+if($SentToID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$SentToID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($SentToID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $SentToName; ?></a></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $DateSend; ?></td>
+</tr>
+<?php ++$i; } ?>
+<tr id="MessengerEnd" class="TableRow4">
+<td class="TableRow4" colspan="6">&nbsp;</td>
+</tr>
+<?php } @mysql_free_result($result);
+if($_GET['act']=="read") {
+$query = query("select * from ".$Settings['sqltable']."messenger where ID=%i", array($_GET['id']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$is=0;
+if($num==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+while ($is < $num) {
+$PMID=mysql_result($result,$is,"id");
+$SenderID=mysql_result($result,$is,"SenderID");
+$SenderName = GetUserName($SenderID,$Settings['sqltable']);
+$SentToID=mysql_result($result,$is,"PMSentID");
+$SentToName = GetUserName($SentToID,$Settings['sqltable']);
+$PMGuest=mysql_result($result,$is,"GuestName");
+$MessageName=mysql_result($result,$is,"MessageTitle");
+$DateSend=mysql_result($result,$is,"DateSend");
+$DateSend=GMTimeChange("F j, Y, g:i a",$DateSend,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MessageText=mysql_result($result,$is,"MessageText");
+$MessageDesc=mysql_result($result,$i,"Description");
+$requery = query("select * from ".$Settings['sqltable']."members where ID=%i", array($SenderID));
+$reresult=mysql_query($requery);
+$renum=mysql_num_rows($reresult);
+$rei=0;
+if($_SESSION['UserID']!=$SentToID&&
+       $_SESSION['UserID']!=$SenderID) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+while ($rei < $renum) {
+$User1ID=$SenderID;
+$User1Name=mysql_result($reresult,$rei,"Name");
+$User1Email=mysql_result($reresult,$rei,"Email");
+$User1Title=mysql_result($reresult,$rei,"Title");
+$User1Joined=mysql_result($reresult,$rei,"Joined");
+$User1Joined=GMTimeChange("M j Y",$User1Joined,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$User1GroupID=mysql_result($reresult,$rei,"GroupID");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($User1GroupID));
+$gresult=mysql_query($gquery);
+$User1Group=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$User1Signature=mysql_result($reresult,$rei,"Signature");
+$User1Avatar=mysql_result($reresult,$rei,"Avatar");
+$User1AvatarSize=mysql_result($reresult,$rei,"AvatarSize");
+if ($User1Avatar=="http://"||$User1Avatar==null) {
+$User1Avatar=$ThemeSet['NoAvatar'];
+$User1AvatarSize=$ThemeSet['NoAvatarSize']; }
+$AvatarSize1=explode("x", $User1AvatarSize);
+$AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
+$User1Website=mysql_result($reresult,$rei,"Website");
+$User1PostCount=mysql_result($reresult,$rei,"PostCount");
+$User1IP=mysql_result($reresult,$rei,"IP");
+++$rei; } @mysql_free_result($reresult);
+++$is; } @mysql_free_result($result);
+if($_SESSION['UserID']==$SentToID) {
+$queryup = query("update ".$Settings['sqltable']."messenger set `Read`=%i WHERE id=%i", array(1,$_GET['id']));
+mysql_query($queryup); }
+if($User1Name=="Guest") { $User1Name=$PMGuest;
+if($User1Name==null) { $User1Name="Guest"; } }
+$MessageText = text2icons($MessageText,$Settings['sqltable']);
+$User1Signature = text2icons($User1Signature,$Settings['sqltable']);
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1" colspan="2"><span style="font-weight: bold; float: left;"><?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['messenger'],$Settings['file_ext'],"act=view&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['messenger'],$exqstr['messenger']); ?>"><?php echo $MessageName; ?></a></span><?php if($ThemeSet['TopicLayout']!="Type 2") { ?>
+<span style="float: right;">&nbsp;</span><?php } ?></td>
+</tr>
+<tr class="TableRow2">
+<td class="TableRow2" style="vertical-align: middle; width: 20%;">
+&nbsp;<a href="<?php
+if($User1ID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$User1ID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($User1ID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $User1Name; ?></a></td>
+<td class="TableRow2" style="vertical-align: middle; width: 80%;">
+<div style="text-align: left; float: left;">
+<span style="font-weight: bold;">Time Sent: </span><?php echo $DateSend; ?>
+</div>
+<div style="text-align: right;">&nbsp;</div>
+</td>
+</tr>
+<tr>
+<td class="TableRow3" style="vertical-align: top;">
+ <?php  /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */  ?>
+ <table class="AvatarTable" style="width: 100px; height: 100px; text-align: center;">
+       <tr class="AvatarRow" style="width: 100%; height: 100%;">
+               <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
+               <img src="<?php echo $User1Avatar; ?>" alt="<?php echo $User1Name; ?>'s Avatar" title="<?php echo $User1Name; ?>'s Avatar" style="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
+               </td>
+       </tr>
+ </table><br />
+User Title: <?php echo $User1Title; ?><br />
+Group: <?php echo $User1Group; ?><br />
+Member: <?php 
+if($User1ID!="-1") { echo $User1ID; }
+if($User1ID=="-1") { echo 0; }
+?><br />
+Posts: <?php echo $User1PostCount; ?><br />
+Joined: <?php echo $User1Joined; ?><br /><br />
+</td>
+<td class="TableRow3" style="vertical-align: middle;">
+<div class="pmpost"><?php echo $MessageText; ?></div>
+<?php if(isset($User1Signature)) { ?> <br />--------------------
+<div class="signature"><?php echo $User1Signature; ?></div><?php } ?>
+</td>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4" colspan="2">
+<span style="float: left;">&nbsp;<a href="<?php
+if($User1ID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$User1ID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($User1ID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $ThemeSet['Profile']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="<?php echo $User1Website; ?>" onclick="window.open(this.href);return false;"><?php echo $ThemeSet['WWW']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="#Act/PM"><?php echo $ThemeSet['PM']; ?></a></span>
+<span style="float: right;">&nbsp;</span></td></tr>
+<?php } ?>
+</table></div>
+</td></tr>
+</table>
\ No newline at end of file
diff --git a/inc/prelogin.php b/inc/prelogin.php
new file mode 100644 (file)
index 0000000..2811aca
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: prelogin.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="prelogin.php"||$File3Name=="/prelogin.php") {
+       require('index.php');
+       exit(); }
+$_SESSION['CheckCookie']="done";
+$querylog2 = query("select * from ".$Settings['sqltable']."members where Name = '%s' and Password='%s'", array($_COOKIE['MemberName'],$_COOKIE['SessPass']));
+$resultlog2=mysql_query($querylog2);
+$numlog2=mysql_num_rows($resultlog2);
+if($numlog2>=1) {
+$il=0;
+$YourIDAM=mysql_result($resultlog2,$il,"id");
+$YourGroupAM=mysql_result($resultlog2,$il,"GroupID");
+$YourPassAM=mysql_result($resultlog2,$il,"Password");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($YourGroupAM));
+$gresult=mysql_query($gquery);
+$YourGroupAM=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$YourTimeZoneAM=mysql_result($resultlog2,$il,"TimeZone");
+$UseThemeAM=mysql_result($resultlog2,$il,"UseTheme");
+$YourDSTAM=mysql_result($resultlog2,$il,"DST");
+$NewDay=GMTimeStamp();
+$NewIP=$_SERVER['REMOTE_ADDR'];
+$queryup = query("update ".$Settings['sqltable']."members set LastActive='%s',IP='%s' WHERE id='%s'", array($NewDay,$NewIP,$YourIDAM));
+$_SESSION['Theme']=$UseThemeAM;
+$_SESSION['MemberName']=$_COOKIE['MemberName'];
+$_SESSION['UserID']=$YourIDAM;
+$_SESSION['UserTimeZone']=$YourTimeZoneAM;
+$_SESSION['UserGroup']=$YourGroupAM;
+$_SESSION['UserDST']=$YourDSTAM;
+setcookie("MemberName", $YourNameM, time() + (7 * 86400), $basedir);
+setcookie("UserID", $YourIDAM, time() + (7 * 86400), $basedir);
+setcookie("SessPass", $YourPassAM, time() + (7 * 86400), $basedir);
+} if($numlog2<=0) {
+redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE));
+} @mysql_free_result($resultlog2);
+?>
diff --git a/inc/profilemain.php b/inc/profilemain.php
new file mode 100644 (file)
index 0000000..5200cc6
--- /dev/null
@@ -0,0 +1,544 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="profilemain.php"||$File3Name=="/profilemain.php") {
+       require('index.php');
+       exit(); }
+?>
+<table class="Table3">
+<tr style="width: 100%; vertical-align: top;">
+       <td style="width: 15%; vertical-align: top;">
+       <table id="ProfileLinks" class="Table1" style="width: 100%; float: left; vertical-align: top;">
+<tr class="TableRow1">
+<td class="TableRow1"><?php echo $ThemeSet['TitleIcon'] ?>Profile Settings</td>
+</tr><tr class="TableRow2">
+<td class="TableRow2">&nbsp;</td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit NotePad</a></td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=profile",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit Profile</a></td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=signature",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit Signature</a></td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=avatar",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Edit Avatar</a></td>
+</tr><tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr></table><div>&nbsp;</div>
+<table class="Table1" style="width: 100%; float: left; vertical-align: top;">
+<tr class="TableRow1">
+<td class="TableRow1"><?php echo $ThemeSet['TitleIcon'] ?>Board Settings</td>
+</tr><tr class="TableRow2">
+<td class="TableRow2">&nbsp;</td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Board Settings</a></td>
+</tr><tr class="TableRow3">
+<td class="TableRow3"><a href="<?php echo url_maker($exfile['profile'],$Settings['file_ext'],"act=userinfo",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']); ?>">Change User Info</a></td>
+</tr><tr class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr></table>
+</td>
+       <td style="width: 85%; vertical-align: top;">
+<?php if($_POST['update']=="now"&&$_GET['act']!=null) {
+$updateact = url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " - Updating Settings";
+@redirect("refresh",$basedir.url_maker($exfile['profile'],$Settings['file_ext'],"act=".$_GET['act'],$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile'],FALSE),"3");
+$noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $updateact; ?>">Updating Settings</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">Updating Settings</th>
+</tr>
+<tr class="TableRow3" id="ProfileUpdate">
+<td class="TableRow3">
+<div style="text-align: center;">
+<br />Profile updated <a href="<?php echo $updateact; ?>">click here</a> to go back. ^_^<br />&nbsp;</div>
+<?php } if($_GET['act']=="view") {
+if($_POST['update']!="now") {
+$query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+$YourID=mysql_result($result,$i,"id");
+$Notes=mysql_result($result,$i,"Notes");
+$noteact = url_maker($exfile['profile'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." NotePad";
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $noteact; ?>">NotePad</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">NotePad</th>
+</tr>
+<tr class="TableRow3" id="NotePadRow">
+<td class="TableRow3">
+<form method="post" action="<?php echo $notepadact; ?>"><div style="text-align: center;">
+<label class="TextBoxLabel" for="NotePad">Your NotePad</label><br />
+<textarea class="TextBox" name="NotePad" id="NotePad" style="width: 75%; height: 128px;" rows="10" cols="84"><?php echo $Notes; ?></textarea>
+<input type="hidden" name="act" value="view" style="display: none;" />
+<input type="hidden" name="update" value="now" style="display: none;" />
+<br /><input type="submit" class="Button" value="Save" />&nbsp;<input class="Button" type="reset" />
+</div></form></td>
+</tr>
+<tr id="ProfileEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+</table>
+</div>
+<?php @mysql_free_result($result); }
+if($_POST['update']=="now") {
+if($_POST['act']=="view"&&
+       $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+       $_POST['NotePad'] = htmlentities($_POST['NotePad'], ENT_QUOTES);
+       $NewDay=GMTimeStamp();
+       $NewIP=$_SERVER['REMOTE_ADDR'];
+       $querynewskin = query("update ".$Settings['sqltable']."members set Notes='%s',LastActive='%s',IP='%s' WHERE id=%i", array($_POST['NotePad'],$NewDay,$NewIP,$_SESSION['UserID']));
+               mysql_query($querynewskin); } } }
+if($_GET['act']=="signature") {
+if($_POST['update']!="now") {
+$query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+$YourID=mysql_result($result,$i,"id");
+$Signature=mysql_result($result,$i,"Signature"); 
+$signatureact = url_maker($exfile['profile'],$Settings['file_ext'],"act=signature",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." Signature Editor";
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $signatureact; ?>">Signature Editer</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">Signature Editor</th>
+</tr>
+<tr class="TableRow3" id="SignatureRow">
+<td class="TableRow3">
+<form method="post" action="<?php echo $signatureact; ?>"><div style="text-align: center;">
+<label class="TextBoxLabel" for="Signature">Your Signature</label><br />
+<textarea class="TextBox" name="Signature" id="Signature" style="width: 75%; height: 128px;" rows="10" cols="84"><?php echo $Signature; ?></textarea>
+<input type="hidden" name="act" value="signature" style="display: none;" />
+<input type="hidden" name="update" value="now" style="display: none;" />
+<br /><input type="submit" class="Button" value="Save" />&nbsp;<input class="Button" type="reset" />
+</div></form></td>
+</tr>
+<tr id="ProfileEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+</table>
+</div>
+<?php @mysql_free_result($result); }
+if($_POST['update']=="now") {
+if($_POST['act']=="signature"&&
+       $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+       $_POST['Signature'] = htmlentities($_POST['Signature'], ENT_QUOTES);
+       $_POST['Signature'] = preg_replace("/\t+/"," ",$_POST['Signature']);
+       $_POST['Signature'] = preg_replace("/\s\s+/"," ",$_POST['Signature']);
+       $NewDay=GMTimeStamp();
+       $NewIP=$_SERVER['REMOTE_ADDR'];
+       $querynewskin = query("update ".$Settings['sqltable']."members set Signature='%s',LastActive='%s',IP='%s' WHERE id=%i", array($_POST['Signature'],$NewDay,$NewIP,$_SESSION['UserID']));
+       mysql_query($querynewskin); } } }
+if($_GET['act']=="avatar") {
+if($_POST['update']!="now") {
+$query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+$YourID=mysql_result($result,$i,"id");
+$User1Avatar=mysql_result($result,$i,"Avatar"); 
+$User1AvatarSize=mysql_result($result,$i,"AvatarSize");
+$avataract = url_maker($exfile['profile'],$Settings['file_ext'],"act=avatar",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." Avatar Editor";
+$Pre1Avatar = $User1Avatar;
+if ($User1Avatar==null) { $User1Avatar="http://"; }
+if ($Pre1Avatar=="http://"||$Pre1Avatar==null) {
+$Pre1Avatar=$ThemeSet['NoAvatar'];
+$User1AvatarSize=$ThemeSet['NoAvatarSize']; }
+$AvatarSize1=explode("x", $User1AvatarSize);
+$AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $avataract; ?>">Avatar Editer</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">Avatar Editor</th>
+</tr>
+<tr class="TableRow3" id="AvatarEditor">
+<td class="TableRow3">
+<form method="post" action="<?php echo $avataract; ?>">
+ <?php  /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */  ?>
+ <table class="AvatarTable" style="width: 100px; height: 100px; text-align: center;">
+       <tr class="AvatarRow" style="width: 100%; height: 100%;">
+               <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
+               <img src="<?php echo $Pre1Avatar; ?>" alt="<?php echo $_SESSION['MemberName']; ?>'s Avatar" title="<?php echo $_SESSION['MemberName']; ?>'s Avatar" style="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
+               </td>
+       </tr>
+ </table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="Avatar">Your Avatar</label></td>
+       <td style="width: 60%;"><input type="text" class="TextBox" name="Avatar" id="Avatar" value="<?php echo $User1Avatar; ?>" size="20" /></td>
+       </tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="AvatarSizeW">Avatar Width</label></td>
+       <td style="width: 60%;"><select size="1" name="AvatarSizeW" id="AvatarSizeW" class="TextBox">
+       <option value="<?php echo $AvatarSize1W; ?>" selected="selected"><?php echo $AvatarSize1W; ?></option><?php echo "\n"; $r=1; while ($r <= 100) { ?><option value="<?php echo $r ?>"><?php echo $r; ?></option><?php echo "\n"; ++$r; } ?>
+</select></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="AvatarSizeH">Avatar Height</label></td>
+       <td style="width: 60%;"><select size="1" name="AvatarSizeH" id="AvatarSizeH" class="TextBox">
+<option value="<?php echo $AvatarSize1H; ?>" selected="selected"><?php echo $AvatarSize1H; ?></option><?php echo "\n"; $s=1; while ($s <= 100) { ?><option value="<?php echo $s ?>"><?php echo $s; ?></option><?php echo "\n"; ++$s; } ?>
+</select></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<input type="hidden" name="act" value="avatar" style="display: none;" />
+<input type="hidden" name="update" value="now" style="display: none;" />
+<input type="submit" class="Button" value="Save" />
+<input class="Button" type="reset" />
+</td></tr></table>
+</form></td>
+</tr>
+<tr id="ProfileEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+</table>
+</div>
+<?php @mysql_free_result($result); }
+if($_POST['update']=="now") {
+if($_POST['Avatar']!=null&&$_POST['AvatarSizeW']!=null&&$_POST['AvatarSizeH']!=null&&
+       $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+       if($_POST['AvatarSizeW']>=100) { $_POST['AvatarSizeW']=100; }
+       if($_POST['AvatarSizeH']>=100) { $_POST['AvatarSizeH']=100; }
+       $fullavatarsize = $_POST['AvatarSizeW']."x".$_POST['AvatarSizeH'];
+       $_POST['Avatar'] = htmlentities($_POST['Avatar'], ENT_QUOTES);
+       $NewDay=GMTimeStamp();
+       $NewIP=$_SERVER['REMOTE_ADDR'];
+       $_POST['Avatar'] = @remove_spaces($_POST['Avatar']);
+       $querynewskin = query("update ".$Settings['sqltable']."members set Avatar='%s',AvatarSize='%s',LastActive='%s',IP='%s' WHERE id=%i", array($_POST['Avatar'],$fullavatarsize,$NewDay,$NewIP,$_SESSION['UserID']));
+       mysql_query($querynewskin); } } }
+if($_GET['act']=="settings") {
+if($_POST['update']!="now") {
+$query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+$YourID=mysql_result($result,$i,"id");
+$User1TimeZone=mysql_result($result,$i,"TimeZone"); 
+$User1DST=mysql_result($result,$i,"DST");
+$settingsact = url_maker($exfile['profile'],$Settings['file_ext'],"act=settings",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." Board Settings"; ?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $settingsact; ?>">Board Settings</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">Board Settings</th>
+</tr>
+<tr class="TableRow3" id="BoardSettings">
+<td class="TableRow3">
+<form method="post" action="<?php echo $settingsact; ?>">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
+       <td style="width: 60%;"><select id="YourOffSet" name="YourOffSet" class="TextBox">
+<option selected="selected" value="<?php echo $User1TimeZone; ?>">Old Value (<?php echo $User1TimeZone.":00 hours"; ?>)</option>
+<?php
+$plusi = 1; $minusi = 12;
+$plusnum = 13; $minusnum = 0;
+while ($minusi > $minusnum) {
+echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n";
+--$minusi; }
+?>
+<option value="0">GMT +/- 0:00 hours</option>
+<?php
+while ($plusi < $plusnum) {
+echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n";
+++$plusi; }
+?></select></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="skin">Pick a CSS Theme</label></td>
+       <td style="width: 60%;"><select id="skin" name="skin" class="TextBox">
+<option selected="selected" value="<?php echo $_SESSION['Theme']; ?>">Old Value (<?php echo $_SESSION['Theme']; ?>)</option><?php
+$skindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
+if ($handle = opendir($skindir)) {
+   while (false !== ($file = readdir($handle))) {
+          if (file_exists($skindir.$file."/info.php")) {
+                  if ($file != "." && $file != "..") {
+          include($skindir.$file."/info.php");
+       echo "<option value=\"".$file."\">".$ThemeInfo['ThemeName']."</option>\n";
+   } } }
+   closedir($handle);
+} ?>
+</select></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="DST">Is <span title="Daylight Savings Time">DST</span> / <span title="Summer Time">ST</span> on or off:</label></td>
+       <td style="width: 60%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
+<?php if($User1DST=="off"||$User1DST!="on") { ?>
+<option selected="selected" value="off">off</option><?php echo "\n" ?><option value="on">on</option>
+<?php } if($User1DST=="on") { ?>
+<option selected="selected" value="on">on</option><?php echo "\n" ?><option value="off">off</option>
+<?php } echo "\n" ?></select></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<input type="hidden" name="act" value="settings" style="display: none;" />
+<input type="hidden" name="update" value="now" style="display: none;" />
+<input type="submit" class="Button" value="Save" />
+<input class="Button" type="reset" />
+</td></tr></table>
+</form></td>
+</tr>
+<tr id="ProfileEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+</table>
+</div>
+<?php @mysql_free_result($result); }
+if($_POST['update']=="now") {
+if($_POST['act']=="settings"&&
+       $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+       $NewDay=GMTimeStamp();
+       $NewIP=$_SERVER['REMOTE_ADDR'];
+       $querynewskin = query("update ".$Settings['sqltable']."members set UseTheme='%s',TimeZone='%s',DST='%s',LastActive='%s',IP='%s' WHERE id=%i", array($_POST['skin'],$_POST['YourOffSet'],$_POST['DST'],$NewDay,$NewIP,$_SESSION['UserID']));
+       mysql_query($querynewskin); } } }
+if($_GET['act']=="profile") {
+if($_POST['update']!="now") {
+$query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+$YourID=mysql_result($result,$i,"id");
+$User1Interests=mysql_result($result,$i,"Interests"); 
+$User1Title=mysql_result($result,$i,"Title");
+$User1Website=mysql_result($result,$i,"Website"); 
+$User1Gender=mysql_result($result,$i,"Gender");
+$User1TimeZone=mysql_result($result,$i,"TimeZone"); 
+$User1DST=mysql_result($result,$i,"DST");
+$profileact = url_maker($exfile['profile'],$Settings['file_ext'],"act=profile",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." Profile Editor";
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $profileact; ?>">Profile Editer</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">Profile Editor</th>
+</tr>
+<tr class="TableRow3" id="ProfileEditor">
+<td class="TableRow3">
+<form method="post" action="<?php echo $profileact; ?>">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="Interests">Your Interests</label></td>
+       <td style="width: 60%;"><input type="text" class="TextBox" name="Interests" id="Interests" value="<?php echo $User1Interests; ?>" /></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="Title">Your Title</label></td>
+       <td style="width: 60%;"><input type="text" class="TextBox" name="Title" id="Title" value="<?php echo $User1Title; ?>" /></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="Website">Your Website</label></td>
+       <td style="width: 60%;"><input type="text" class="TextBox" name="Website" id="Website" value="<?php echo $User1Website; ?>" /></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
+       <td style="width: 60%;"><select id="YourOffSet" name="YourOffSet" class="TextBox">
+<option selected="selected" value="<?php echo $User1TimeZone; ?>">Old Value (<?php echo $User1TimeZone.":00 hours"; ?>)</option>
+<?php
+$plusi = 1; $minusi = 12;
+$plusnum = 13; $minusnum = 0;
+while ($minusi > $minusnum) {
+echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n";
+--$minusi; }
+?>
+<option value="0">GMT +/- 0:00 hours</option>
+<?php
+while ($plusi < $plusnum) {
+echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n";
+++$plusi; }
+?></select></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="YourGender">Your Gender:</label></td>
+       <td style="width: 60%;"><select id="YourGender" name="YourGender" class="TextBox">
+<option selected="selected" value="<?php echo $User1Gender; ?>">Old Value (<?php echo $User1Gender; ?>)</option>
+<option value="Male">Male</option>
+<option value="Female">Female</option>
+<option value="Unknow">Unknow</option>
+</select></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="DST">Is <span title="Daylight Savings Time">DST</span> / <span title="Summer Time">ST</span> on or off:</label></td>
+       <td style="width: 60%;"><select id="DST" name="DST" class="TextBox"><?php echo "\n" ?>
+<?php if($User1DST=="off"||$User1DST!="on") { ?>
+<option selected="selected" value="off">off</option><?php echo "\n" ?><option value="on">on</option>
+<?php } if($User1DST=="on") { ?>
+<option selected="selected" value="on">on</option><?php echo "\n" ?><option value="off">off</option>
+<?php } echo "\n" ?></select></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<input type="hidden" name="act" value="profile" style="display: none;" />
+<input type="hidden" name="update" value="now" style="display: none;" />
+<input type="submit" class="Button" value="Save" />
+<input class="Button" type="reset" />
+</td></tr></table>
+</form></td>
+</tr>
+<tr id="ProfileEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+</table>
+</div>
+<?php @mysql_free_result($result); }
+if($_POST['update']=="now") {
+if($_POST['act']=="profile"&&
+       $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+       $_POST['Interests'] = htmlentities($_POST['Interests'], ENT_QUOTES);
+       $_POST['Interests'] = @remove_spaces($_POST['Interests']);
+       $_POST['Title'] = htmlentities($_POST['Title'], ENT_QUOTES);
+       $_POST['Title'] = @remove_spaces($_POST['Title']);
+       $_POST['Website'] = htmlentities($_POST['Website'], ENT_QUOTES);
+       $_POST['Website'] = @remove_spaces($_POST['Website']);
+       $_SESSION['UserTimeZone'] = $_POST['YourOffSet'];
+       $_SESSION['UserDST'] = $_POST['DST'];
+       $NewDay=GMTimeStamp();
+       $NewIP=$_SERVER['REMOTE_ADDR'];
+       $querynewprofile = query("update ".$Settings['sqltable']."members set Interests='%s',Title='%s',Website='%s',TimeZone='%s',Gender='%s',DST='%s',LastActive='%s',IP='%s' WHERE id=%i", array($_POST['Interests'],$_POST['Title'],$_POST['Website'],$_POST['YourOffSet'],$_POST['YourGender'],$_POST['DST'],$NewDay,$NewIP,$_SESSION['UserID']));
+       mysql_query($querynewprofile); } } }
+if($_GET['act']=="userinfo") {
+if($_POST['update']!="now") {
+$query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+$YourID=mysql_result($result,$i,"id");
+$User1Email=mysql_result($result,$i,"Email"); 
+$userinfoact = url_maker($exfile['profile'],$Settings['file_ext'],"act=userinfo",$Settings['qstr'],$Settings['qsep'],$prexqstr['profile'],$exqstr['profile']);
+$profiletitle = " ".$ThemeSet['TitleDivider']." User Info Editer";
+?>
+<div class="Table1Border">
+<table class="Table1" style="width: 100%;">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo $userinfoact; ?>">User Info Editer</a>
+</span><span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr id="ProfileTitle" class="TableRow2">
+<th class="TableRow2">User Info Editer</th>
+</tr>
+<tr class="TableRow3" id="UserInfoEditor">
+<td class="TableRow3">
+<form method="post" action="<?php echo $userinfoact; ?>">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="OldPass">Insert old Password:</label></td>
+       <td style="width: 60%;"><input type="password" class="TextBox" name="OldPass" size="20" id="OldPass" maxlength="30" /></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="Password">Insert a Password:</label></td>
+       <td style="width: 60%;"><input type="password" class="TextBox" name="Password" size="20" id="Password" maxlength="30" /></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="RePassword">ReInsert a Password:</label></td>
+       <td style="width: 60%;"><input type="password" class="TextBox" name="RePassword" size="20" id="RePassword" maxlength="30" /></td>
+</tr><tr style="text-align: left;">
+       <td style="width: 40%;"><label class="TextBoxLabel" for="Email">Insert Your Email:</label></td>
+       <td style="width: 60%;"><input type="text" class="TextBox" name="Email" size="20" id="Email" value="<?php echo $User1Email; ?>" /></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<input type="hidden" name="act" value="userinfo" style="display: none;" />
+<input type="hidden" name="update" value="now" style="display: none;" />
+<input type="submit" class="Button" value="Save" />
+<input class="Button" type="reset" />
+</td></tr></table>
+</form></td>
+</tr>
+<tr id="ProfileEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr>
+</table>
+</div>
+<?php @mysql_free_result($result); }
+if($_POST['update']=="now") {
+if($_POST['act']=="userinfo"&&
+       $_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+       $query = query("select * from ".$Settings['sqltable']."members where `id`=%i", array($_SESSION['UserID']));
+       $result=mysql_query($query);
+       $num=mysql_num_rows($result);
+       $i=0;
+       $OldPassword=mysql_result($result,$i,"Password");
+       $OldHashType=mysql_result($result,$i,"HashType");
+       $OldJoined=mysql_result($result,$i,"Joined");
+       $OldSalt=mysql_result($result,$i,"Salt");
+       $UpdateHash = false; $NewSalt = salt_hmac(); 
+if($OldHashType=="ODFH") { 
+       $YourPassword = sha1(md5($_POST['OldPass']));
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha1"); }
+if($OldHashType=="DF4H") { 
+       $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1");
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha1"); }
+if($OldHashType=="iDBH"&&$UpdateHash!=true) { 
+       $YourPassword = b64e_hmac($_POST['OldPass'],$OldJoined,$OldSalt,"sha1");
+       $NewPassword = b64e_hmac($_POST['Password'],$OldJoined,$NewSalt,"sha1"); }
+if($YourPassword!=$OldPassword) { $Error="Yes"; ?>
+<div class="TableMessage">Your old Password did not match.<br />&nbsp;</div>
+<?php } if(strlen($_POST['Password'])=="30") { $Error="Yes"; ?>
+<div class="TableMessage">Your password is too big.<br />&nbsp;</div>
+<?php } if(strlen($_POST['OldPass'])=="30") { $Error="Yes"; ?>
+<div class="TableMessage">Your old password is too big.<br />&nbsp;</div>
+<?php } if ($_POST['Password']!=$_POST['RePassword']) { $Error="Yes";  ?>
+<div class="TableMessage">Your passwords did not match.<br />&nbsp;</div>
+<?php }
+       $NewDay=GMTimeStamp();
+       $NewIP=$_SERVER['REMOTE_ADDR'];
+       if ($Error!="Yes") {
+       setcookie("SessPass", $NewPassword, time() + (7 * 86400), $basedir);
+       $_POST['Email'] = @remove_spaces($_POST['Email']);
+       $querynewuserinfo = query("update ".$Settings['sqltable']."members set Password='%s',HashType='iDBH',Email='%s',LastActive='%s',IP='%s',Salt='%s' WHERE id=%i", array($NewPassword,$_POST['Email'],$NewDay,$NewIP,$NewSalt,$_SESSION['UserID']));
+       mysql_query($querynewuserinfo); } } } }
+?>
+<?php if($_POST['update']=="now"&&$_GET['act']!=null) {
+       $profiletitle = " - Updating Settings"; ?>
+</td></tr>
+<tr id="ProfileTitleEnd" class="TableRow4">
+<td class="TableRow4">&nbsp;</td>
+</tr></table></div><?php } ?>
+</td></tr>
+</table>
\ No newline at end of file
diff --git a/inc/replys.php b/inc/replys.php
new file mode 100644 (file)
index 0000000..85b5b56
--- /dev/null
@@ -0,0 +1,158 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="replys.php"||$File3Name=="/replys.php") {
+       require('index.php');
+       exit(); }
+$prequery = query("select * from ".$Settings['sqltable']."topics where ID=%i", array($_GET['id']));
+$preresult=mysql_query($prequery);
+$prenum=mysql_num_rows($preresult);
+$prei=0;
+while ($prei < $prenum) {
+$TopicName=mysql_result($preresult,$prei,"TopicName");
+$ViewTimes=mysql_result($preresult,$prei,"NumViews");
+++$prei; } @mysql_free_result($preresult);
+?>
+<table style="width: 100%;" class="Table2">
+<tr>
+ <td style="width: 20%; text-align: left;">&nbsp;</td>
+ <td style="width: 80%; text-align: right;"><a href="#Act/Reply"><?php echo $ThemeSet['AddReply']; ?></a><?php echo $ThemeSet['ButtonDivider']; ?><a href="#Act/Topic"><?php echo $ThemeSet['NewTopic']; ?></a></td>
+</tr>
+</table>
+<div>&nbsp;</div>
+<div class="Table1Border">
+<table class="Table1">
+<tr class="TableRow1">
+<td class="TableRow1" colspan="2"><span style="font-weight: bold; float: left;"><?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']); ?>"><?php echo $TopicName; ?></a></span><?php if($ThemeSet['TopicLayout']!="Type 2") { ?>
+<span style="float: right;">&nbsp;</span><?php } ?></td>
+</tr>
+<?php
+$query = query("select * from ".$Settings['sqltable']."posts where TopicID=%i ORDER BY TimeStamp ASC", array($_GET['id']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+if($num==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($num!=0) { 
+if($ViewTimes==0||$ViewTimes==null) { $NewViewTimes = 1; }
+if($ViewTimes!=0&&$ViewTimes!=null) { $NewViewTimes = $ViewTimes + 1; }
+$viewsup = query("update ".$Settings['sqltable']."topics set NumViews='%s' WHERE id=%i", array($NewViewTimes,$_GET['id']));
+mysql_query($viewsup); }
+while ($i < $num) {
+$MyPostID=mysql_result($result,$i,"id");
+$MyTopicID=mysql_result($result,$i,"TopicID");
+$MyForumID=mysql_result($result,$i,"ForumID");
+$MyCategoryID=mysql_result($result,$i,"CategoryID");
+$MyUserID=mysql_result($result,$i,"UserID");
+$MyGuestName=mysql_result($result,$i,"GuestName");
+$MyTimeStamp=mysql_result($result,$i,"TimeStamp");
+$MyTimeStamp=GMTimeChange("M j, Y, g:i a",$MyTimeStamp,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$MyPost=mysql_result($result,$i,"Post");
+$requery = query("select * from ".$Settings['sqltable']."members where ID=%i", array($MyUserID));
+$reresult=mysql_query($requery);
+$renum=mysql_num_rows($reresult);
+$rei=0;
+while ($rei < $renum) {
+$User1ID=$MyUserID; $GuestName = $MyGuestName;
+$User1Name=mysql_result($reresult,$rei,"Name");
+$User1Email=mysql_result($reresult,$rei,"Email");
+$User1Title=mysql_result($reresult,$rei,"Title");
+$User1Joined=mysql_result($reresult,$rei,"Joined");
+$User1Joined=GMTimeChange("M j Y",$User1Joined,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$User1GroupID=mysql_result($reresult,$rei,"GroupID");
+$gquery = query("select * from ".$Settings['sqltable']."groups where ID=%i", array($User1GroupID));
+$gresult=mysql_query($gquery);
+$User1Group=mysql_result($gresult,0,"Name");
+@mysql_free_result($gresult);
+$User1Signature=mysql_result($reresult,$rei,"Signature");
+$User1Avatar=mysql_result($reresult,$rei,"Avatar");
+$User1AvatarSize=mysql_result($reresult,$rei,"AvatarSize");
+if ($User1Avatar=="http://"||$User1Avatar==null) {
+$User1Avatar=$ThemeSet['NoAvatar'];
+$User1AvatarSize=$ThemeSet['NoAvatarSize']; }
+$AvatarSize1=explode("x", $User1AvatarSize);
+$AvatarSize1W=$AvatarSize1[0]; $AvatarSize1H=$AvatarSize1[1];
+$User1Website=mysql_result($reresult,$rei,"Website");
+$User1PostCount=mysql_result($reresult,$rei,"PostCount");
+$User1IP=mysql_result($reresult,$rei,"IP");
+++$rei; } @mysql_free_result($reresult);
+if($User1Name=="Guest") { $User1Name=$GuestName;
+if($User1Name==null) { $User1Name="Guest"; } }
+$MyPost = text2icons($MyPost,$Settings['sqltable']);
+$User1Signature = text2icons($User1Signature,$Settings['sqltable']);
+?>
+<tr class="TableRow2">
+<td class="TableRow2" style="vertical-align: middle; width: 20%;">
+&nbsp;<a href="<?php
+if($User1ID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$User1ID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($User1ID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $User1Name; ?></a></td>
+<td class="TableRow2" style="vertical-align: middle; width: 80%;">
+<div style="text-align: left; float: left;">
+<a style="vertical-align: middle;" id="post<?php echo $i+1; ?>">
+<span style="font-weight: bold;">Time Posted: </span><?php echo $MyTimeStamp; ?></a>
+</div>
+<div style="text-align: right;"><a href="#Act/Report"><?php echo $ThemeSet['Report']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="#Act/Quote"><?php echo $ThemeSet['QuoteReply']; ?></a>&nbsp;</div>
+</td>
+</tr>
+<tr class="TableRow3">
+<td class="TableRow3" style="vertical-align: top;">
+ <?php  /* Avatar Table Thanks For SeanJ's Help at http://seanj.jcink.com/ */  ?>
+ <table class="AvatarTable" style="width: 100px; height: 100px; text-align: center;">
+       <tr class="AvatarRow" style="width: 100%; height: 100%;">
+               <td class="AvatarRow" style="width: 100%; height: 100%; text-align: center; vertical-align: middle;">
+               <img src="<?php echo $User1Avatar; ?>" alt="<?php echo $User1Name; ?>'s Avatar" title="<?php echo $User1Name; ?>'s Avatar" style="border: 0px; width: <?php echo $AvatarSize1W; ?>px; height: <?php echo $AvatarSize1H; ?>px;" />
+               </td>
+       </tr>
+ </table><br />
+User Title: <?php echo $User1Title; ?><br />
+Group: <?php echo $User1Group; ?><br />
+Member: <?php 
+if($User1ID!="-1") { echo $User1ID; }
+if($User1ID=="-1") { echo 0; }
+?><br />
+Posts: <?php echo $User1PostCount; ?><br />
+Joined: <?php echo $User1Joined; ?><br /><br />
+</td>
+<td class="TableRow3" style="vertical-align: middle;">
+<div class="replypost"><?php echo $MyPost; ?></div>
+<?php if(isset($User1Signature)) { ?> <br />--------------------
+<div class="signature"><?php echo $User1Signature; ?></div><?php } ?>
+</td>
+</tr>
+<tr class="TableRow4">
+<td class="TableRow4" colspan="2">
+<span style="float: left;">&nbsp;<a href="<?php
+if($User1ID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$User1ID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($User1ID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $ThemeSet['Profile']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="<?php echo $User1Website; ?>" onclick="window.open(this.href);return false;"><?php echo $ThemeSet['WWW']; ?></a><?php echo $ThemeSet['LineDividerTopic']; ?><a href="#Act/PM"><?php echo $ThemeSet['PM']; ?></a></span>
+<span style="float: right;">&nbsp;</span></td>
+</tr>
+<?php ++$i; } @mysql_free_result($result); ?>
+</table></div>
+<div>&nbsp;</div>
+<table class="Table2" style="width: 100%;">
+<tr>
+ <td style="width: 20%; text-align: left;">&nbsp;</td>
+ <td style="width: 80%; text-align: right;"><a href="#Act/Reply"><?php echo $ThemeSet['AddReply']; ?></a><?php echo $ThemeSet['ButtonDivider']; ?><a href="#Act/Reply"><?php echo $ThemeSet['FastReply']; ?></a><?php echo $ThemeSet['ButtonDivider']; ?><a href="#Act/Topic"><?php echo $ThemeSet['NewTopic']; ?></a></td>
+</tr>
+</table>
+<div>&nbsp;</div>
diff --git a/inc/rss.gif b/inc/rss.gif
new file mode 100644 (file)
index 0000000..c81ac37
Binary files /dev/null and b/inc/rss.gif differ
diff --git a/inc/rssfeed.php b/inc/rssfeed.php
new file mode 100644 (file)
index 0000000..6c4259a
--- /dev/null
@@ -0,0 +1,129 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: rss2.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="rssfeed.php"||$File3Name=="/rssfeed.php") {
+       require('index.php');
+       exit(); }
+$boardsname = htmlentities($Settings['board_name']);
+$boardsname = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $boardsname);
+$_GET['feedtype'] = strtolower($_GET['feedtype']);
+if($_GET['feedtype']!="rss"&&
+$_GET['feedtype']!="atom") { $_GET['feedtype'] = "rss"; }
+//$basepath = pathinfo($_SERVER['REQUEST_URI']);
+/*if(dirname($_SERVER['REQUEST_URI'])!="."||
+       dirname($_SERVER['REQUEST_URI'])!=null) {
+$basedir = dirname($_SERVER['REQUEST_URI'])."/"; }*/
+if(dirname($_SERVER['SCRIPT_NAME'])!="."||
+       dirname($_SERVER['SCRIPT_NAME'])!=null) {
+$basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
+if($basedir==null||$basedir==".") {
+if(dirname($_SERVER['SCRIPT_NAME'])=="."||
+       dirname($_SERVER['SCRIPT_NAME'])==null) {
+$basedir = dirname($_SERVER['PHP_SELF'])."/"; } }
+if($basedir=="\/") { $basedir="/"; }
+$basedir = str_replace("//", "/", $basedir);
+if($Settings['fixpathinfo']!=true&&
+       $Settings['fixpathinfo']!=false&&
+       $Settings['fixpathinfo']!=null) {
+               $basedir = "/"; } $BaseURL = $basedir;
+if(isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = $Settings['showverinfo']; }
+if(!isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = false; }
+if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
+if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
+       $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$BaseURL; }
+if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
+       $BoardURL = $Settings['idburl']; }
+if ($_GET['id']==null) { $_GET['id']="1"; }
+if($rssurlon==true) { $BoardURL =  $rssurl; }
+$feedsname = basename($_SERVER['SCRIPT_NAME']);
+if($_SERVER['PATH_INFO']!=null) {
+$feedsname .= htmlentities($_SERVER['PATH_INFO']); }
+if($_SERVER['QUERY_STRING']!=null) {
+$feedsname .= "?".htmlentities($_SERVER['QUERY_STRING']); }
+$checkfeedtype = "application/rss+xml";
+if($_GET['feedtype']=="rss") { $checkfeedtype = "application/rss+xml"; }
+if($_GET['feedtype']=="atom") { $checkfeedtype = "application/atom+xml"; }
+if(stristr($_SERVER["HTTP_ACCEPT"],$checkfeedtype) ) {
+@header("Content-Type: application/rss+xml; charset=".$Settings['charset']); }
+else{ if(stristr($_SERVER["HTTP_ACCEPT"],"application/xml") ) {
+@header("Content-Type: application/xml; charset=".$Settings['charset']); }
+else { if (stristr($_SERVER["HTTP_USER_AGENT"],"FeedValidator")) {
+   @header("Content-Type: application/xml; charset=".$Settings['charset']);
+} else { @header("Content-Type: text/xml; charset=".$Settings['charset']); } } }
+@header("Content-Language: en");
+@header("Vary: Accept");
+$query = query("select * from ".$Settings['sqltable']."topics where ForumID=%i ORDER BY Pinned DESC, LastUpdate DESC", array($_GET['id']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$Atom = null; $RSS = null; $i=0;
+while ($i < $num) {
+$TopicID=mysql_result($result,$i,"id");
+$CategoryID=mysql_result($result,$i,"CategoryID");
+$UsersID=mysql_result($result,$i,"UserID");
+$GuestName=mysql_result($result,$i,"GuestName");
+$TheTime=mysql_result($result,$i,"TimeStamp");
+$TheTime=GMTimeChange("D, j M Y G:i:s \G\M\T",$TheTime,0);
+$TopicName=mysql_result($result,$i,"TopicName");
+$ForumDescription=mysql_result($result,$i,"Description");
+$Atom .= '<entry>'."\n".'<title>'.htmlentities($TopicName).'</title>'."\n".'<summary>'.htmlentities($ForumDescription).'</summary>'."\n".'<link rel="alternate" href="'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'" />'."\n".'<id>'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'</id>'."\n".'<author>'."\n".'<name>'.$SettInfo['Author'].'</name>'."\n".'</author>'."\n".'<updated>'.gmdate("Y-m-d\TH:i:s\Z").'</updated>'."\n".'</entry>'."\n";
+$RSS .= '<item>'."\n".'<title>'.htmlentities($TopicName).'</title>'."\n".'<description>'.htmlentities($ForumDescription).'</description>'."\n".'<link>'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'</link>'."\n".'<guid>'.$BoardURL.url_maker($exfilerss['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstrrss['topic'],$exqstrrss['topic']).'</guid>'."\n".'</item>'."\n";
+++$i; } @mysql_free_result($result);
+xml_doc_start("1.0",$Settings['charset']);
+if($Settings['showverinfo']==true) { ?>
+<!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
+<?php } if($Settings['showverinfo']!=true) { ?>
+<!-- generator="<?php echo $iDB; ?>" -->
+<?php } echo "\n"; if($_GET['feedtype']=="rss") { ?>
+<rss version="2.0">
+<channel>
+   <title><?php echo $boardsname; ?></title>
+   <description>RSS Feed of the Topics in Board <?php echo $boardsname; ?></description>
+   <link><?php echo $BoardURL; ?></link>
+   <language>en</language>
+   <?php if($Settings['showverinfo']==true) { ?>
+   <generator><?php echo $VerInfo['iDB_Ver_Show']; ?></generator>
+   <?php } if($Settings['showverinfo']!=true) { ?>
+   <generator><?php echo $iDB; ?></generator>
+   <?php } echo "\n"; ?>
+   <copyright><?php echo $SettInfo['Author']; ?></copyright>
+   <ttl>120</ttl>
+   <image>
+       <url><?php echo $BoardURL.$SettDir['rss']; ?>rss.gif</url>
+       <title><?php echo $boardsname; ?></title>
+       <link><?php echo $BoardURL; ?></link>
+   </image>
+ <?php echo "\n".$RSS."\n"; ?></channel>
+</rss>
+<?php } if($_GET['feedtype']=="atom") { ?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+  <title><?php echo $boardsname; ?></title>
+   <subtitle>RSS Feed of the Topics in Board <?php echo $boardsname; ?></subtitle>
+   <link rel="self" href="<?php echo $feedsname; ?>" />
+   <id><?php echo $BoardURL; ?></id>
+   <updated><?php echo gmdate("Y-m-d\TH:i:s\Z"); ?></updated>
+   <?php if($Settings['showverinfo']==true) { ?>
+   <generator><?php echo $VerInfo['iDB_Ver_Show']; ?></generator>
+   <?php } if($Settings['showverinfo']!=true) { ?>
+   <generator><?php echo $iDB; ?></generator>
+   <?php } echo "\n"; ?>
+  <icon><?php echo $BoardURL; ?>inc/rss.gif</icon>
+ <?php echo "\n".$Atom."\n"; ?>
+</feed>
+<?php } mysql_close();
+gzip_page($Settings['use_gzip']); ?>
diff --git a/inc/stats.php b/inc/stats.php
new file mode 100644 (file)
index 0000000..294a3a6
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: stats.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="stats.php"||$File3Name=="/stats.php") {
+       require('index.php');
+       exit(); }
+if($_GET['act']=="view"||$_GET['act']=="stats") { $toggle = null; 
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>";
+if($ThemeSet['EnableToggle']==true) {
+$toggle = "toggletag('Stats1'),toggletag('Stats2'),toggletag('Stats3');return false;";
+$togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#Toggle\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }
+if($ThemeSet['EnableToggle']==false) { $toggle = null;
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>"; }
+$ntquery = query("select * from ".$Settings['sqltable']."topics", array(null));
+$ntresult = mysql_query($ntquery);
+$numtopics = mysql_num_rows($ntresult);
+$npquery = query("select * from ".$Settings['sqltable']."posts", array(null));
+$npresult = mysql_query($npquery);
+$numposts = mysql_num_rows($npresult);
+$nmquery = query("select * from ".$Settings['sqltable']."members", array(null));
+$nmresult = mysql_query($nmquery);
+$nummembers = mysql_num_rows($nmresult);
+$sql_guest_check = mysql_query(query("select * from ".$Settings['sqltable']."members where id = '%s'", array("-1")));
+$guest_check = mysql_num_rows($sql_guest_check); @mysql_free_result($sql_guest_check);
+if($guest_check > 0) { $nummembers = $nummembers - 1; }
+?>
+<div class="Table1Border">
+<table class="Table1">
+<tr class="TableRow1">
+<td class="TableRow1" colspan="2"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon']; ?><a id="bstats" href="<?php echo url_maker($exfile['index'],$Settings['file_ext'],"act=stats",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); ?>#bstats">Board Statistics</a></span>
+<?php echo $togglecode; ?></td>
+</tr>
+<tr id="Stats1" class="TableRow2">
+<td class="TableRow2" colspan="2" style="width: 100%; font-weight: bold;">Board Stats</td>
+</tr>
+<tr class="TableRow3" id="Stats2">
+<td style="width: 4%;" class="TableRow3"><div class="forumicon">
+<?php echo $ThemeSet['StatsIcon']; ?>&nbsp;</div></td>
+<td style="width: 96%;" class="TableRow3"><div class="forumname">
+&nbsp;Our members have made a total of <?php echo $numposts; ?> post(s)<br />
+&nbsp;We have a total of <?php echo $numtopics; ?> topic(s) made<br />
+&nbsp;We have <?php echo $nummembers; ?> registered members<br />
+</div></td>
+</tr>
+<tr id="Stats3" class="TableRow4">
+<td class="TableRow4" colspan="2">&nbsp;</td>
+</tr>
+</table></div>
+<div>&nbsp;</div>
+<?php
+@mysql_free_result($ntresult);
+@mysql_free_result($npresult);
+@mysql_free_result($nmresult); }
+?>
\ No newline at end of file
diff --git a/inc/subcategories.php b/inc/subcategories.php
new file mode 100644 (file)
index 0000000..de52b9d
--- /dev/null
@@ -0,0 +1,166 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: subcategories.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name=="subcategories.php"||$File3Name=="/subcategories.php") {\r
+       require('index.php');\r
+       exit(); }\r
+$checkquery = query("select * from ".$Settings['sqltable']."categories where ID=%s", array($_GET['id']));\r
+$checkresult=mysql_query($checkquery);\r
+$checknum=mysql_num_rows($checkresult);\r
+$checki=0;\r
+if($checknum===0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }\r
+$CategoryID=mysql_result($checkresult,$checki,"id");\r
+$CategoryName=mysql_result($checkresult,$checki,"Name");\r
+$CategoryShow=mysql_result($checkresult,$checki,"ShowCategory");\r
+$CategoryType=mysql_result($checkresult,$checki,"CategoryType");\r
+$SubShowForums=mysql_result($checkresult,$checki,"SubShowForums");\r
+$CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);\r
+$SCategoryName = $CategoryName;\r
+if($CategoryType=="category") {\r
+redirect("location",$basedir.url_maker($exfile['category'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category'],FALSE)); }\r
+@mysql_free_result($checkresult);\r
+$prequery = query("select * from ".$Settings['sqltable']."categories where ShowCategory='yes' and InSubCategory=%i", array($_GET['id']));\r
+$preresult=mysql_query($prequery);\r
+$prenum=mysql_num_rows($preresult);\r
+$prei=0;\r
+while ($prei < $prenum) {\r
+$CategoryID=mysql_result($preresult,$prei,"id");\r
+$CategoryName=mysql_result($preresult,$prei,"Name");\r
+$CategoryShow=mysql_result($preresult,$prei,"ShowCategory");\r
+$CategoryType=mysql_result($preresult,$prei,"CategoryType");\r
+$SSubShowForums=mysql_result($preresult,$prei,"SubShowForums");\r
+$CategoryDescription=mysql_result($preresult,$prei,"Description");\r
+$CategoryType = strtolower($CategoryType); $SubShowForums = strtolower($SubShowForums);\r
+$toggle=""; $togglecode = "<span style=\"float: right;\">&nbsp;</span>";\r
+if($ThemeSet['EnableToggle']==true) {\r
+/*     Toggle Code     */\r
+$query2 = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and CategoryID='%s' and InSubForum=0", array($CategoryID));\r
+$result2=mysql_query($query2);\r
+$num2=mysql_num_rows($result2);\r
+$i2=0;\r
+$toggle="";\r
+while ($i2 < $num2) {\r
+$ForumID=mysql_result($result2,$i2,"id");\r
+$i3=$i2+1;\r
+if ($i3!=$num2) {\r
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }\r
+if ($i3==$num2) {\r
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }\r
+if ($i3==$num2) {\r
+$toggle=$toggle."toggletag('SubCat".$CategoryID."'),toggletag('SubCatEnd".$CategoryID."');return false;"; }\r
+++$i2; }\r
+if($toggle==null) { $toggle="toggletag('SubCat".$CategoryID."'),toggletag('SubCatEnd".$CategoryID."');return false;"; } \r
+@mysql_free_result($result2); \r
+$togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#Toggle".$CategoryID."\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }\r
+if($ThemeSet['EnableToggle']==false) { $toggle="";\r
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>"; }\r
+?>\r
+<div class="Table1Border">\r
+<table class="Table1">\r
+<tr class="TableRow1">\r
+<td class="TableRow1" colspan="5"><span style="float: left;">\r
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile[$CategoryType],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$CategoryType],$exqstr[$CategoryType]); ?>" id="SubToggle<?php echo $CategoryID; ?>"><?php echo $CategoryName; ?></a></span>\r
+<?php echo $togglecode; ?></td>\r
+</tr>\r
+<?php\r
+$query = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and CategoryID=%i and InSubForum=0 ORDER BY ID", array($CategoryID));\r
+$result=mysql_query($query);\r
+$num=mysql_num_rows($result);\r
+$i=0;\r
+if($num>=1) {\r
+?>\r
+<tr id="SubCat<?php echo $CategoryID; ?>" class="TableRow2">\r
+<th class="TableRow2" style="width: 4%;">&nbsp;</th>\r
+<th class="TableRow2" style="width: 58%;">Forum</th>\r
+<th class="TableRow2" style="width: 7%;">Topics</th>\r
+<th class="TableRow2" style="width: 7%;">Posts</th>\r
+<th class="TableRow2" style="width: 24%;">Last Topic</th>\r
+</tr>\r
+<?php }\r
+while ($i < $num) {\r
+$ForumID=mysql_result($result,$i,"id");\r
+$ForumName=mysql_result($result,$i,"Name");\r
+$ForumShow=mysql_result($result,$i,"ShowForum");\r
+$ForumType=mysql_result($result,$i,"ForumType");\r
+$NumTopics=mysql_result($result,$i,"NumTopics");\r
+$NumPosts=mysql_result($result,$i,"NumPosts");\r
+$ForumDescription=mysql_result($result,$i,"Description");\r
+$ForumType = strtolower($ForumType);\r
+unset($LastTopic);\r
+$gltquery = query("select * from ".$Settings['sqltable']."topics where CategoryID=%i and ForumID=%i ORDER BY LastUpdate DESC", array($CategoryID,$ForumID));\r
+$gltresult=mysql_query($gltquery);\r
+$gltnum=mysql_num_rows($gltresult);\r
+if($gltnum>0){\r
+$TopicID=mysql_result($gltresult,0,"id");\r
+$TopicName=mysql_result($gltresult,0,"TopicName");\r
+$NumReplys=mysql_result($gltresult,0,"NumReply");\r
+$ShowReply = $NumReplys + 1;\r
+$TopicName1 = substr($TopicName,0,12);\r
+if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; }\r
+$UsersID=mysql_result($gltresult,0,"UserID");\r
+$GuestName=mysql_result($gltresult,0,"GuestName");\r
+$UsersName = GetUserName($UsersID,$Settings['sqltable']);\r
+$UsersName1 = substr($UsersName,0,18);\r
+if($UsersName=="Guest") { $UsersName=$GuestName;\r
+if($UsersName==null) { $UsersName="Guest"; } }\r
+if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."...";\r
+$oldtopicname=$TopicName; $oldusername=$UsersName;\r
+$TopicName=$TopicName1; $UsersName=$UsersName1; } $lul = null;\r
+if($UsersID!="-1") {\r
+$lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }\r
+if($UsersID=="-1") {\r
+$lul = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }\r
+$LastTopic = "User: <a href=\"".$lul."\" title=\"".$oldusername."\">".$UsersName."</a><br />\nTopic: <a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#post".$ShowReply."\" title=\"".$oldtopicname."\">".$TopicName."</a>"; }\r
+if($LastTopic==null) { $LastTopic="&nbsp;<br />&nbsp;"; }\r
+$ForumType = strtolower($ForumType);\r
+$PreForum = $ThemeSet['ForumIcon'];\r
+if ($ForumType=="forum") {\r
+       $PreForum=$ThemeSet['ForumIcon']; }\r
+if ($ForumType=="subforum") {\r
+       $PreForum=$ThemeSet['SubForumIcon']; }\r
+if ($ForumType=="redirect") {\r
+       $PreForum=$ThemeSet['RedirectIcon']; }\r
+?>\r
+<tr class="TableRow3" id="Forum<?php echo $ForumID; ?>">\r
+<td class="TableRow3"><div class="forumicon">\r
+<?php echo $PreForum; ?></div></td>\r
+<td class="TableRow3"><div class="forumname"><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"><?php echo $ForumName; ?></a></div>\r
+<div class="forumdescription"><?php echo $ForumDescription; ?></div></td>\r
+<td class="TableRow3" style="text-align: center;"><?php echo $NumTopics; ?></td>\r
+<td class="TableRow3" style="text-align: center;"><?php echo $NumPosts; ?></td>\r
+<td class="TableRow3"><?php echo $LastTopic; ?></td>\r
+</tr>\r
+<?php\r
+++$i; } @mysql_free_result($result);\r
+if($num>=1) {\r
+?>\r
+<tr id="SubCatEnd<?php echo $CategoryID; ?>" class="TableRow4">\r
+<td class="TableRow4" colspan="5">&nbsp;</td>\r
+</tr>\r
+<?php } ?>\r
+</table></div>\r
+<div>&nbsp;</div>\r
+<?php\r
+++$prei; }\r
+@mysql_free_result($preresult);\r
+$CatCheck = "skip";\r
+if($SubShowForums!="yes") { \r
+       $CategoryName = $SCategoryName; }\r
+if($SubShowForums!="no") {\r
+require($SettDir['inc'].'categories.php'); }\r
+?>\r
diff --git a/inc/subforums.php b/inc/subforums.php
new file mode 100644 (file)
index 0000000..3bafea8
--- /dev/null
@@ -0,0 +1,169 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: subforums.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";\r
+$File2Name = $_SERVER['SCRIPT_NAME'];\r
+$File3Name=str_replace($File1Name, null, $File2Name);\r
+if ($File3Name=="subforums.php"||$File3Name=="/subforums.php") {\r
+       require('index.php');\r
+       exit(); }\r
+$checkquery = query("select * from ".$Settings['sqltable']."forums where ID=%s", array($_GET['id']));\r
+$checkresult=mysql_query($checkquery);\r
+$checknum=mysql_num_rows($checkresult);\r
+$checki=0;\r
+$ForumName=mysql_result($checkresult,$checki,"Name");\r
+$ForumType=mysql_result($checkresult,$checki,"ForumType");\r
+$CategoryID=mysql_result($checkresult,$checki,"CategoryID");\r
+$RedirectURL=mysql_result($checkresult,$checki,"RedirectURL");\r
+$RedirectTimes=mysql_result($checkresult,$checki,"Redirects");\r
+$CanHaveTopics=mysql_result($checkresult,$checki,"CanHaveTopics");\r
+$NumberViews=mysql_result($checkresult,$checki,"NumViews");\r
+$SForumName = $ForumName;\r
+$ForumType = strtolower($ForumType); $CanHaveTopics = strtolower($CanHaveTopics);\r
+if($CanHaveTopics!="yes"&&$ForumType!="redirect") {\r
+if($NumberViews==0||$NumberViews==null) { $NewNumberViews = 1; }\r
+if($NumberViews!=0&&$NumberViews!=null) { $NewNumberViews = $NumberViews + 1; }\r
+$viewup = query("update ".$Settings['sqltable']."forums set NumViews='%s' WHERE id=%i", array($NewNumberViews,$_GET['id']));\r
+mysql_query($viewup); }\r
+if($ForumType=="redirect") {\r
+if($RedirectTimes==0||$RedirectTimes==null) { $NewRedirTime = 1; }\r
+if($RedirectTimes!=0&&$RedirectTimes!=null) { $NewRedirTime = $RedirectTimes + 1; }\r
+$redirup = query("update ".$Settings['sqltable']."forums set Redirects='%s' WHERE id=%i", array($NewRedirTime,$_GET['id']));\r
+mysql_query($redirup);\r
+if($RedirectURL!="http://"&&$RedirectURL!="") {\r
+redirect("location",$RedirectURL,0,null,false); }\r
+if($RedirectURL=="http://"||$RedirectURL=="") {\r
+redirect("location",url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }\r
+if($ForumType=="forum") {\r
+redirect("location",$basedir.url_maker($exfile['forum'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum'],FALSE)); }\r
+@mysql_free_result($checkresult);\r
+$prequery = query("select * from ".$Settings['sqltable']."categories where ShowCategory='yes' and id=%i ORDER BY id", array($CategoryID));\r
+$preresult=mysql_query($prequery);\r
+$prenum=mysql_num_rows($preresult);\r
+$prei=0;\r
+while ($prei < $prenum) {\r
+$CategoryID=mysql_result($preresult,$prei,"id");\r
+$CategoryName=mysql_result($preresult,$prei,"Name");\r
+$CategoryShow=mysql_result($preresult,$prei,"ShowCategory");\r
+$CategoryDescription=mysql_result($preresult,$prei,"Description");\r
+$toggle=""; $togglecode = "<span style=\"float: right;\">&nbsp;</span>";\r
+if($ThemeSet['EnableToggle']==true) {\r
+/*     Toggle Code     */\r
+$query2 = query("select * from ".$Settings['sqltable']."forums where ShowForum='yes' and InSubForum=%i ORDER BY ID", array($_GET['id']));\r
+$result2=mysql_query($query2);\r
+$num2=mysql_num_rows($result2);\r
+$i2=0;\r
+$toggle="";\r
+while ($i2 < $num2) {\r
+$ForumID=mysql_result($result2,$i2,"id");\r
+$i3=$i2+1;\r
+if ($i3!=$num2) {\r
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }\r
+if ($i3==$num2) {\r
+$toggle=$toggle."toggletag('Forum".$ForumID."'),"; }\r
+if ($i3==$num2) {\r
+$toggle=$toggle."toggletag('Cat".$CategoryID."'),toggletag('CatEnd".$CategoryID."');return false;"; }\r
+++$i2; }\r
+@mysql_free_result($result2);\r
+$togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#SubToggle".$CategoryID."\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }\r
+if($toggle==null) { $toggle="toggletag('Cat".$CategoryID."'),toggletag('CatEnd".$CategoryID."');return false;"; }\r
+if($ThemeSet['EnableToggle']==false) { $toggle="";\r
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>"; }\r
+?>\r
+<div class="Table1Border">\r
+<table class="Table1">\r
+<tr class="TableRow1">\r
+<td class="TableRow1" colspan="5"><span style="float: left;">\r
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['category'],$Settings['file_ext'],"act=view&id=".$CategoryID,$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category']); ?>" id="SubToggle<?php echo $CategoryID; ?>"><?php echo $CategoryName; ?></a></span>\r
+<?php echo $togglecode; ?></td>\r
+</tr>\r
+<?php\r
+$query = query("select * from ".$Settings['sqltable']."forums where (ShowForum='yes' and CategoryID=%i and InSubForum=%i) ORDER BY ID", array($CategoryID,$_GET['id']));\r
+$result=mysql_query($query);\r
+$num=mysql_num_rows($result);\r
+$i=0;\r
+?>\r
+<tr id="Cat<?php echo $CategoryID; ?>" class="TableRow2">\r
+<th class="TableRow2" style="width: 4%;">&nbsp;</th>\r
+<th class="TableRow2" style="width: 58%;">Forum</th>\r
+<th class="TableRow2" style="width: 7%;">Topics</th>\r
+<th class="TableRow2" style="width: 7%;">Posts</th>\r
+<th class="TableRow2" style="width: 24%;">Last Topic</th>\r
+</tr>\r
+<?php\r
+while ($i < $num) {\r
+$ForumID=mysql_result($result,$i,"id");\r
+$ForumName=mysql_result($result,$i,"Name");\r
+$ForumShow=mysql_result($result,$i,"ShowForum");\r
+$ForumType=mysql_result($result,$i,"ForumType");\r
+$NumTopics=mysql_result($result,$i,"NumTopics");\r
+$NumPosts=mysql_result($result,$i,"NumPosts");\r
+$ForumDescription=mysql_result($result,$i,"Description");\r
+unset($LastTopic);\r
+$gltquery = query("select * from ".$Settings['sqltable']."topics where ForumID=%i ORDER BY LastUpdate DESC", array($ForumID));\r
+$gltresult=mysql_query($gltquery);\r
+$gltnum=mysql_num_rows($gltresult);\r
+if($gltnum>0){\r
+$TopicID=mysql_result($gltresult,0,"id");\r
+$TopicName=mysql_result($gltresult,0,"TopicName");\r
+$NumReplys=mysql_result($gltresult,0,"NumReply");\r
+$ShowReply = $NumReplys + 1;\r
+$TopicName1 = substr($TopicName,0,15);\r
+if (strlen($TopicName)>12) { $TopicName1 = $TopicName1."..."; }\r
+$UsersID=mysql_result($gltresult,0,"UserID");\r
+$GuestName=mysql_result($gltresult,0,"GuestName");\r
+$UsersName = GetUserName($UsersID,$Settings['sqltable']);\r
+$UsersName1 = substr($UsersName,0,18);\r
+if($UsersName=="Guest") { $UsersName=$GuestName;\r
+if($UsersName==null) { $UsersName="Guest"; } }\r
+if (strlen($UsersName)>15) { $UsersName1 = $UsersName1."...";\r
+$oldtopicname=$TopicName; $oldusername=$UsersName;\r
+$TopicName=$TopicName1; $UsersName=$UsersName1; }\r
+$LastTopic = "User: <a href=\"".url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'])."\" title=\"".$oldusername."\">".$UsersName."</a><br />\nTopic: <a href=\"".url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'])."#post".$ShowReply."\" title=\"".$oldtopicname."\">".$TopicName."</a>"; }\r
+@mysql_free_result($gltresult);\r
+$ForumType = strtolower($ForumType);\r
+$PreForum = $ThemeSet['ForumIcon'];\r
+if ($ForumType=="forum") {\r
+       $PreForum=$ThemeSet['ForumIcon']; }\r
+if ($ForumType=="subforum") {\r
+       $PreForum=$ThemeSet['SubForumIcon']; }\r
+if ($ForumType=="redirect") {\r
+       $PreForum=$ThemeSet['RedirectIcon']; }\r
+?>\r
+<tr class="TableRow3" id="Forum<?php echo $ForumID; ?>">\r
+<td class="TableRow3"><div class="forumicon">\r
+<?php echo $PreForum; ?></div></td>\r
+<td class="TableRow3"><div class="forumname"><a href="<?php echo url_maker($exfile[$ForumType],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr[$ForumType],$exqstr[$ForumType]); ?>"><?php echo $ForumName; ?></a></div>\r
+<div class="forumdescription"><?php echo $ForumDescription; ?></div></td>\r
+<td class="TableRow3" style="text-align: center;"><?php echo $NumTopics; ?></td>\r
+<td class="TableRow3" style="text-align: center;"><?php echo $NumPosts; ?></td>\r
+<td class="TableRow3"><?php echo $LastTopic; ?></td>\r
+</tr>\r
+<?php\r
+++$i; } @mysql_free_result($result);\r
+?>\r
+<tr id="CatEnd<?php echo $CategoryID; ?>" class="TableRow4">\r
+<td class="TableRow4" colspan="5">&nbsp;</td>\r
+</tr>\r
+</table></div>\r
+<div>&nbsp;</div>\r
+<?php\r
+++$prei; } @mysql_free_result($preresult);\r
+$ForumCheck = "skip";\r
+if($CanHaveTopics!="yes") { \r
+       $ForumName = $SForumName; }\r
+if($CanHaveTopics!="no") {\r
+require($SettDir['inc'].'topics.php'); }\r
+?>\r
diff --git a/inc/topics.php b/inc/topics.php
new file mode 100644 (file)
index 0000000..ed9d101
--- /dev/null
@@ -0,0 +1,192 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="topics.php"||$File3Name=="/topics.php") {
+       require('index.php');
+       exit(); }
+?>
+<table style="width: 100%;" class="Table2">
+<tr>
+ <td style="width: 20%; text-align: left;">&nbsp;</td>
+ <td style="width: 80%; text-align: right;"><a href="#Act/Topic"><?php echo $ThemeSet['NewTopic']; ?></a></td>
+</tr>
+</table>
+<div>&nbsp;</div>
+<div class="Table1Border">
+<table class="Table1">
+<?php
+$prequery = query("select * from ".$Settings['sqltable']."forums where ID=%s", array($_GET['id']));
+$preresult=mysql_query($prequery);
+$prenum=mysql_num_rows($preresult);
+$prei=0;
+if($prenum==0) { redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+while ($prei < $prenum) {
+$ForumID=mysql_result($preresult,$prei,"id");
+$ForumName=mysql_result($preresult,$prei,"Name");
+$ForumType=mysql_result($preresult,$prei,"ForumType");
+$RedirectURL=mysql_result($preresult,$prei,"RedirectURL");
+$RedirectTimes=mysql_result($preresult,$prei,"Redirects");
+$NumberViews=mysql_result($preresult,$prei,"NumViews");
+$ForumType = strtolower($ForumType);
+if($ForumType!="redirect") {
+if($NumberViews==0||$NumberViews==null) { $NewNumberViews = 1; }
+if($NumberViews!=0&&$NumberViews!=null) { $NewNumberViews = $NumberViews + 1; }
+$viewup = query("update ".$Settings['sqltable']."forums set NumViews='%s' WHERE id=%i", array($NewNumberViews,$_GET['id']));
+mysql_query($viewup); }
+if($ForumType=="redirect") {
+if($RedirectTimes==0||$RedirectTimes==null) { $NewRedirTime = 1; }
+if($RedirectTimes!=0&&$RedirectTimes!=null) { $NewRedirTime = $RedirectTimes + 1; }
+$redirup = query("update ".$Settings['sqltable']."forums set Redirects='%s' WHERE id=%i", array($NewRedirTime,$_GET['id']));
+mysql_query($redirup);
+if($RedirectURL!="http://"&&$RedirectURL!="") {
+redirect("location",$RedirectURL,0,null,false); }
+if($RedirectURL=="http://"||$RedirectURL=="") {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } }
+if($ForumCheck!="skip") {
+if($ForumType=="subforum") {
+redirect("location",$basedir.url_maker($exfile['subforum'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['subforum'],$exqstr['subforum'],FALSE)); } }
+$toggle=""; $togglecode = "<span style=\"float: right;\">&nbsp;</span>";
+if($ThemeSet['EnableToggle']==true) {
+/*     Toggle Code     */
+$query2 = query("select * from ".$Settings['sqltable']."topics where ForumID=%s ORDER BY ID", array($_GET['id']));
+$result2=mysql_query($query2);
+$num2=mysql_num_rows($result2);
+$i2=0;
+$toggle="";
+while ($i2 < $num2) {
+$TopicID=mysql_result($result2,$i2,"id");
+$i3=$i2+1;
+if ($i3!=$num2) {
+$toggle=$toggle."toggletag('Topic".$TopicID."'),"; }
+if ($i3==$num2) {
+$toggle=$toggle."toggletag('Topic".$TopicID."'),"; }
+if ($i3==$num2) {
+$toggle=$toggle."toggletag('Forum".$_GET['id']."'),toggletag('ForumEnd');return false;"; }
+++$i2; }
+if($toggle==null) { $toggle="toggletag('Forum".$_GET['id']."'),toggletag('ForumEnd');return false;"; }
+@mysql_free_result($result2);
+$togglecode = "<span style=\"float: right;\"><a href=\"".$filewpath."#Toggle".$ForumID."\" onclick=\"".$toggle."\">".$ThemeSet['Toggle']."</a>".$ThemeSet['ToggleExt']."</span>"; }
+if($ThemeSet['EnableToggle']==false) { $toggle="";
+$togglecode = "<span style=\"float: right;\">&nbsp;</span>"; }
+?>
+<tr class="TableRow1">
+<td class="TableRow1" colspan="6"><span style="float: left;">
+<?php echo $ThemeSet['TitleIcon'] ?><a href="<?php echo url_maker($exfile['forum'],$Settings['file_ext'],"act=view&id=".$ForumID,$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum']); ?>#<?php echo $ForumID; ?>" id="Toggle<?php echo $ForumID; ?>"><?php echo $ForumName; ?></a></span>
+<?php echo $togglecode; ?></td>
+</tr>
+<?php ++$prei; } @mysql_free_result($preresult); ?>
+<tr id="Forum<?php echo $ForumID; ?>" class="TableRow2">
+<th class="TableRow2" style="width: 4%;">State</th>
+<th class="TableRow2" style="width: 36%;">Topic Name</th>
+<th class="TableRow2" style="width: 15%;">Author</th>
+<th class="TableRow2" style="width: 15%;">Time</th>
+<th class="TableRow2" style="width: 5%;">Replys</th>
+<th class="TableRow2" style="width: 25%;">Last Reply</th>
+</tr>
+<?php
+$query = query("select * from ".$Settings['sqltable']."topics where ForumID=%i ORDER BY Pinned DESC, LastUpdate DESC", array($_GET['id']));
+$result=mysql_query($query);
+$num=mysql_num_rows($result);
+$i=0;
+while ($i < $num) {
+$TopicID=mysql_result($result,$i,"id");
+$UsersID=mysql_result($result,$i,"UserID");
+$GuestName=mysql_result($result,$i,"GuestName");
+$TheTime=mysql_result($result,$i,"TimeStamp");
+$TheTime=GMTimeChange("F j, Y",$TheTime,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$NumReply=mysql_result($result,$i,"NumReply");
+$TopicName=mysql_result($result,$i,"TopicName");
+$TopicDescription=mysql_result($result,$i,"Description");
+$PinnedTopic=mysql_result($result,$i,"Pinned");
+$TopicStat=mysql_result($result,$i,"Closed");
+$UsersName = GetUserName($UsersID,$Settings['sqltable']);
+if($UsersName=="Guest") { $UsersName=$GuestName;
+if($UsersName==null) { $UsersName="Guest"; } }
+$glrquery = query("select * from ".$Settings['sqltable']."posts where ForumID=%i and TopicID=%i ORDER BY TimeStamp DESC", array($_GET['id'],$TopicID));
+$glrresult=mysql_query($glrquery);
+$glrnum=mysql_num_rows($glrresult);
+if($glrnum>0){
+$ReplyID1=mysql_result($glrresult,0,"id");
+$UsersID1=mysql_result($glrresult,0,"UserID");
+$GuestName1=mysql_result($glrresult,0,"GuestName");
+$TimeStamp1=mysql_result($glrresult,0,"TimeStamp");
+$TimeStamp1=GMTimeChange("F j, Y",$TimeStamp1,$_SESSION['UserTimeZone'],0,$_SESSION['UserDST']);
+$UsersName1 = GetUserName($UsersID1,$Settings['sqltable']); }
+if($UsersName1=="Guest") { $UsersName1=$GuestName1;
+if($UsersName1==null) { $UsersName1="Guest"; } }
+if($TimeStamp1!=null) { $lul = null;
+if($UsersID1!="-1") {
+$lul = url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID1,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($UsersID1=="-1") {
+$lul = url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+$LastReply = "User: <a href=\"".$lul."\">".$UsersName1."</a><br />\nTime: ".$TimeStamp1; }
+@mysql_free_result($glrresult);
+if($TimeStamp1==null) { $LastReply = "&nbsp;<br />&nbsp;"; }
+$PreTopic = $ThemeSet['TopicIcon'];
+if ($PinnedTopic==1) {
+       if($NumReply>=$Settings['hot_topic_num']) {
+               $PreTopic=$ThemeSet['HotPinTopic']; }
+       if($NumReply<$Settings['hot_topic_num']) {
+               $PreTopic=$ThemeSet['PinTopic']; } }
+if ($TopicStat==1) {
+       if($NumReply>=$Settings['hot_topic_num']) {
+               $PreTopic=$ThemeSet['HotClosedTopic']; }
+       if($NumReply<$Settings['hot_topic_num']) {
+               $PreTopic=$ThemeSet['ClosedTopic']; } }
+if ($PinnedTopic==0) {
+       if ($TopicStat==0) {
+               if($NumReply>=$Settings['hot_topic_num']) {
+                       $PreTopic=$ThemeSet['HotTopic']; }
+               if($NumReply<$Settings['hot_topic_num']) {
+                       $PreTopic=$ThemeSet['TopicIcon']; } } }
+if ($PinnedTopic==1) {
+       if ($TopicStat==1) {
+               if($NumReply>=$Settings['hot_topic_num']) {
+                       $PreTopic=$ThemeSet['HotPinClosedTopic']; }
+               if($NumReply<$Settings['hot_topic_num']) {
+                       $PreTopic=$ThemeSet['PinClosedTopic']; } } }
+?>
+<tr class="TableRow3" id="Topic<?php echo $TopicID; ?>">
+<td class="TableRow3"><div class="topicstate">
+<?php echo $PreTopic; ?></div></td>
+<td class="TableRow3"><div class="topicname">
+<a href="<?php echo url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$TopicID,$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic']); ?>"><?php echo $TopicName; ?></a></div>
+<div class="topicdescription"><?php echo $TopicDescription; ?></div></td>
+<td class="TableRow3" style="text-align: center;"><a href="<?php
+if($UsersID!="-1") {
+echo url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$UsersID,$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member']); }
+if($UsersID=="-1") {
+echo url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index']); }
+?>"><?php echo $UsersName; ?></a></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $TheTime; ?></td>
+<td class="TableRow3" style="text-align: center;"><?php echo $NumReply; ?></td>
+<td class="TableRow3"><?php echo $LastReply; ?></td>
+</tr>
+<?php ++$i; } @mysql_free_result($result); ?>
+<tr id="ForumEnd" class="TableRow4">
+<td class="TableRow4" colspan="6">&nbsp;</td>
+</tr>
+</table></div>
+<div>&nbsp;</div>
+<table class="Table2" style="width: 100%;">
+<tr>
+ <td style="width: 20%; text-align: left;">&nbsp;</td>
+ <td style="width: 80%; text-align: right;"><a href="#Act/Topic"><?php echo $ThemeSet['NewTopic']; ?></a></td>
+</tr>
+</table>
+<div>&nbsp;</div>
diff --git a/inc/xhtml10.php b/inc/xhtml10.php
new file mode 100644 (file)
index 0000000..6a3be15
--- /dev/null
@@ -0,0 +1,107 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: xhtml10.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
+       require('index.php');
+       exit(); }
+if($Settings['output_type']=="html") {
+       $ccstart = "//<!--"; $ccend = "//-->";
+@header("Content-Type: text/html; charset=iso-8859-15"); }
+if($Settings['output_type']=="xhtml") {
+if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
+       $ccstart = "//<![CDATA["; $ccend = "//]]>";
+       @header("Content-Type: application/xhtml+xml; charset=iso-8859-15");
+       xml_doc_start("1.0","iso-8859-15"); }
+else { if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
+       $ccstart = "//<![CDATA["; $ccend = "//]]>";
+   @header("Content-Type: application/xhtml+xml; charset=iso-8859-15");
+       xml_doc_start("1.0","iso-8859-15");
+} else { $ccstart = "//<!--"; $ccend = "//-->";
+       @header("Content-Type: text/html; charset=iso-8859-15"); } } }
+if($Settings['output_type']!="xhtml") {
+       if($Settings['output_type']!="html") {
+               $ccstart = "//<!--"; $ccend = "//-->";
+@header("Content-Type: text/html; charset=iso-8859-15"); } }
+@header("Content-Script-Type: text/javascript");
+if(isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = $Settings['showverinfo']; }
+if(!isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = false; }
+if($Settings['showverinfo']!=true) {
+$iDBURL1 = "<a href=\"http://intdb.sourceforge.net/\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">"; }
+if($Settings['showverinfo']==true) {
+$iDBURL1 = "<a href=\"http://intdb.sourceforge.net/\" title=\"".$VerInfo['iDB_Ver_Show']."\" onclick=\"window.open(this.href);return false;\">"; }
+$GM2kURL = "<a href=\"http://upload.idb.s1.jcink.com/\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
+$csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
+$endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1."iDB</a> &copy; ".$GM2kURL." @ ".$csryear." - ".$cryear." <a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=bsd",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\" title=\"iDB is licensed under the Revised BSD License\">BSDL</a> <br />\n".$ThemeSet['CopyRight'];
+@header("Content-Language: en");
+@header("Vary: Accept");
+if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
+if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
+       $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
+if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
+       $BoardURL = $Settings['idburl']; }
+if($Settings['html_level']!="Strict") {
+       if($Settings['html_level']!="Transitional") {
+               $Settings['html_level'] = "Transitional"; } }
+?>
+<?php if($Settings['html_level']=="Strict") { ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<?php } if($Settings['html_level']=="Transitional") { ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?php } if($Settings['html_level']=="Frameset") { ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" 
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<?php } ?>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<meta http-equiv="Content-Language" content="en" />
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Settings['charset']; ?>" />
+<meta http-equiv="Content-Script-Type" content="text/javascript" />
+<base href="<?php echo $BoardURL; ?>" />
+<?php if($Settings['showverinfo']==true) { ?>
+<meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
+<?php } if($Settings['showverinfo']!=true) { ?>
+<meta name="Generator" content="<?php echo $iDB; ?>" />
+<?php } echo "\n"; ?>
+<meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
+<meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
+<meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
+<meta name="ROBOTS" content="Index, FOLLOW" />
+<meta name="revisit-after" content="1 days" />
+<meta name="GOOGLEBOT" content="Index, FOLLOW" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<?php if($Settings['showverinfo']==true) { ?>
+<!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
+<?php } if($Settings['showverinfo']!=true) { ?>
+<!-- generator="<?php echo $iDB; ?>" -->
+<?php } echo "\n"; ?>
+
+<script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
+<?php if($ThemeSet['CSSType']!="import"&&$ThemeSet['CSSType']!="link") { 
+$ThemeSet['CSSType'] = "import"; } if($ThemeSet['CSSType']=="import") { ?>
+<style type="text/css"><?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?></style>
+<?php } if($ThemeSet['CSSType']=="link") { ?>
+<link rel="prefetch alternate stylesheet" href="<?php echo $BoardURL.$ThemeSet['CSS']; ?>" />
+<link rel="stylesheet" type="text/css" href="<?php echo $BoardURL.$ThemeSet['CSS']; ?>" />
+<?php } if($ThemeSet['FavIcon']!=null) { ?>
+<link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
+<link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
+<?php } ?>
diff --git a/inc/xhtml11.php b/inc/xhtml11.php
new file mode 100644 (file)
index 0000000..295005b
--- /dev/null
@@ -0,0 +1,98 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: xhtml11.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="xhtml11.php"||$File3Name=="/xhtml11.php") {
+       require('index.php');
+       exit(); }
+if($Settings['output_type']!="xhtml") {
+       $Settings['output_type'] = "xhtml"; }
+if($Settings['output_type']=="html") {
+       $ccstart = "//<!--"; $ccend = "//-->";
+@header("Content-Type: text/html; charset=".$Settings['charset']); }
+if($Settings['output_type']=="xhtml") {
+if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
+       $ccstart = "//<![CDATA["; $ccend = "//]]>";
+@header("Content-Type: application/xhtml+xml; charset=".$Settings['charset']);
+       xml_doc_start("1.0",$Settings['charset']); }
+else { if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
+       $ccstart = "//<![CDATA["; $ccend = "//]]>";
+   @header("Content-Type: application/xhtml+xml; charset=".$Settings['charset']);
+       xml_doc_start("1.0",$Settings['charset']);
+} else { $ccstart = "//<!--"; $ccend = "//-->";
+       @header("Content-Type: text/html; charset=".$Settings['charset']); } } }
+@header("Content-Script-Type: text/javascript");
+if($Settings['output_type']!="xhtml") {
+       if($Settings['output_type']!="html") {
+               $ccstart = "//<!--"; $ccend = "//-->";
+@header("Content-Type: text/html; charset=".$Settings['charset']); } }
+if(isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = $Settings['showverinfo']; }
+if(!isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = false; }
+if($Settings['showverinfo']!=true) {
+$iDBURL1 = "<a href=\"http://intdb.sourceforge.net/\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">"; }
+if($Settings['showverinfo']==true) {
+$iDBURL1 = "<a href=\"http://intdb.sourceforge.net/\" title=\"".$VerInfo['iDB_Ver_Show']."\" onclick=\"window.open(this.href);return false;\">"; }
+$GM2kURL = "<a href=\"http://upload.idb.s1.jcink.com/\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
+$csryear = "2004"; $cryear = date("Y"); if($cryear<=2004) { $cryear = "2005"; }
+$endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1."iDB</a> &copy; ".$GM2kURL." @ ".$csryear." - ".$cryear." <a href=\"".url_maker($exfile['index'],$Settings['file_ext'],"act=bsd",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'])."\" title=\"iDB is licensed under the Revised BSD License\">BSDL</a> <br />\n".$ThemeSet['CopyRight'];
+@header("Content-Language: en");
+@header("Vary: Accept");
+if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
+if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
+       $BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
+if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
+       $BoardURL = $Settings['idburl']; }
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
+   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Language" content="en" />
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Settings['charset']; ?>" />
+<meta http-equiv="Content-Script-Type" content="text/javascript" />
+<base href="<?php echo $BoardURL; ?>" />
+<?php if($Settings['showverinfo']==true) { ?>
+<meta name="Generator" content="<?php echo $VerInfo['iDB_Ver_Show']; ?>" />
+<?php } if($Settings['showverinfo']!=true) { ?>
+<meta name="Generator" content="<?php echo $iDB; ?>" />
+<?php } echo "\n"; ?>
+<meta name="Author" content="<?php echo $SettInfo['Author']; ?>" />
+<meta name="Keywords" content="<?php echo $SettInfo['Keywords']; ?>" />
+<meta name="Description" content="<?php echo $SettInfo['Description']; ?>" />
+<meta name="ROBOTS" content="Index, FOLLOW" />
+<meta name="revisit-after" content="1 days" />
+<meta name="GOOGLEBOT" content="Index, FOLLOW" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<?php if($Settings['showverinfo']==true) { ?>
+<!-- generator="<?php echo $VerInfo['iDB_Ver_Show']; ?>" -->
+<?php } if($Settings['showverinfo']!=true) { ?>
+<!-- generator="<?php echo $iDB; ?>" -->
+<?php } echo "\n"; ?>
+
+<script type="text/javascript" src="<?php echo url_maker($exfilejs['javascript'],$Settings['js_ext'],null,$Settings['qstr'],$Settings['qsep'],$prexqstrjs['javascript'],$exqstrjs['javascript']); ?>"></script>
+<?php if($ThemeSet['CSSType']!="import"&&$ThemeSet['CSSType']!="link") { 
+$ThemeSet['CSSType'] = "import"; } if($ThemeSet['CSSType']=="import") { ?>
+<style type="text/css"><?php echo "\n@import url(\"".$ThemeSet['CSS']."\");\n"; ?></style>
+<?php } if($ThemeSet['CSSType']=="link") { ?>
+<link rel="prefetch alternate stylesheet" href="<?php echo $BoardURL.$ThemeSet['CSS']; ?>" />
+<link rel="stylesheet" type="text/css" href="<?php echo $BoardURL.$ThemeSet['CSS']; ?>" />
+<?php } if($ThemeSet['FavIcon']!=null) { ?>
+<link rel="icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
+<link rel="shortcut icon" href="<?php echo $ThemeSet['FavIcon']; ?>" />
+<?php } ?>
diff --git a/index.php b/index.php
new file mode 100644 (file)
index 0000000..e33e618
--- /dev/null
+++ b/index.php
@@ -0,0 +1,37 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['index'].$usefileext.$_SERVER['PATH_INFO'];
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+
+if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'forums.php'); }
+if($_GET['act']=="view"||$_GET['act']=="stats")
+{ require($SettDir['inc'].'stats.php'); }
+require($SettDir['inc'].'endpage.php');
+?>
+</body>
+</html>
+<?php fix_amp($Settings['use_gzip']); ?>
diff --git a/install.php b/install.php
new file mode 100644 (file)
index 0000000..1c2e22e
--- /dev/null
@@ -0,0 +1,93 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: install.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+@error_reporting(E_ALL ^ E_NOTICE); unset($preact['idb']);
+if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
+       $preact['idb'] = "installing";  }
+if ($_GET['act']==null||$_GET['act']=="view") { $_GET['act']="Part1"; }
+if ($_POST['act']==null||$_POST['act']=="view") { $_POST['act']="Part1"; }
+require('preindex.php');
+$SetupDir['setup'] = "setup/"; $SetupDir['convert'] = "setup/convert/";
+$ConvertDir['setup'] = "setup/"; $ConvertDir['convert'] = "setup/convert/";
+require($SetupDir['convert'].'info.php');
+unset($Error); ?>
+
+<title> <?php echo "Installing ".$VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php'); ?>
+
+<table class="Table1">
+<tr class="TableRow1">
+<td class="TableRow1"><span style="float: left;">
+&nbsp;<a href="Install.php">Install <?php echo $VerInfo['iDB_Ver_Show']." on ".$OSType2; ?> </a></span>
+<span style="float: right;">&nbsp;</span></td>
+</tr>
+<tr class="TableRow2">
+<th class="TableRow2" style="width: 100%; text-align: left;">
+<span style="float: left;">&nbsp;Inert your install info: </span>
+<span style="float: right;">&nbsp;</span>
+</th>
+</tr>
+<?php
+if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
+if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+if(dirname($_SERVER['SCRIPT_NAME'])!=".") {
+$this_dir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
+if(dirname($_SERVER['SCRIPT_NAME'])==".") {
+$this_dir = dirname($_SERVER['PHP_SELF'])."/"; }
+if($this_dir=="\/") { $this_dir="/"; }
+$idbdir = addslashes(str_replace("\\","/",dirname(__FILE__)."/"));
+function sql_list_dbs() {
+   $result = mysql_query("SHOW DATABASES;");
+   while( $data = mysql_fetch_row($result) ) {
+       $array[] = $data[0];
+   } return $array; }
+if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
+if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
+if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
+   require($SetupDir['setup'].'license.php'); } } }
+if ($_GET['act']=="Part2"&&$_POST['act']=="Part2") {
+if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
+if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
+   require($SetupDir['setup'].'presetup.php'); } } }
+if($_POST['SetupType']=="convert") {
+       require($ConvertInfo['ConvertFile']); }
+if($_POST['SetupType']=="install") {
+if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
+if ($_GET['act']=="Part3"&&$_POST['act']=="Part3") {
+if ($_GET['act']!="Part4"&&$_POST['act']!="Part4") {
+   require($SetupDir['setup'].'setup.php'); } } } }
+if($_POST['SetupType']=="install") {
+if ($_GET['act']!="Part2"&&$_POST['act']!="Part2") {
+if ($_GET['act']!="Part3"&&$_POST['act']!="Part3") {
+if ($_GET['act']=="Part4"&&$_POST['act']=="Part4") {
+   require($SetupDir['setup'].'/mkconfig.php'); } } } }
+if ($Error=="Yes") { ?>
+<br />Install Failed with errors. <a href="install.php?act=view">Click here</a> to restart install. &lt;_&lt;
+<br /><br />
+</td>
+</tr>
+<?php } ?>
+<tr class="TableRow4">
+<td class="TableRow4" colspan="2">&nbsp;<a href="index.php?act=ReadMe">Readme.txt</a>&nbsp;</td>
+</tr>
+</table>
+<div>&nbsp;</div>
+<?php require($SettDir['inc'].'endpage.php'); ?>
+</body>
+</html>
+<?php fix_amp(null); ?>
diff --git a/javascript.js b/javascript.js
new file mode 100644 (file)
index 0000000..1be3440
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: javascript.js - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+function getid(id) {
+var itm;
+itm = document.getElementById(id);
+return itm; }
+
+function toggletag(id) {
+var itm;
+itm = document.getElementById(id);
+if (itm.style.display == "none") {
+itm.style.display = ""; }
+else {
+itm.style.display = "none"; } }
+
+function bgchange(id,color) {
+var itm;
+itm = document.getElementById(id);
+itm.style.backgroundColor = ''+color+''; }
+
+function innerchange(tag,text1,text2) {
+var usrname;
+usrname = document.getElementsByTagName(tag);
+for (var i = 0; i < usrname.length; i++) {
+if(usrname[i].innerHTML==text1) {
+usrname[i].innerHTML = text2; } } }
diff --git a/member.php b/member.php
new file mode 100644 (file)
index 0000000..e7f9ae9
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: member.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['member'].$Settings['file_ext'].$_SERVER['PATH_INFO'];
+if($_GET['act']==null) { $_GET['act'] = "login"; }
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php if($_GET['act']==null)
+{ $_GET['act']="loginmember"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+require($SettDir['inc'].'navbar.php');
+if($_GET['act']=="login"||
+$_POST['act']=="loginmember"||
+$_GET['act']=="logout")
+{ require($SettDir['inc'].'members.php'); } 
+if($_GET['act']=="list"||
+$_GET['act']=="view"||
+$_GET['act']=="signup")
+{ require($SettDir['inc'].'members.php'); } 
+if($_GET['act']=="makemember") {
+if($_POST['act']=="makemembers") {
+require($SettDir['inc'].'members.php'); } } ?>
+<div>&nbsp;</div>
+<?php require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php 
+if($membertitle==null) {
+fix_amp($Settings['use_gzip']); }
+if($membertitle!=null) {
+change_title($Settings['board_name'].$membertitle,$Settings['use_gzip']); }
+?>
diff --git a/messenger.php b/messenger.php
new file mode 100644 (file)
index 0000000..7c04c99
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: messenger.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['messenger'].$usefileext.$_SERVER['PATH_INFO'];
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+if($_SESSION['UserGroup']==$Settings['GuestGroup']) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); } ?>
+
+<?php if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($_GET['act']=="view"||$_GET['act']=="viewsent")
+{ require($SettDir['inc'].'pm.php'); }
+if($_GET['act']=="read")
+{ require($SettDir['inc'].'pm.php'); } ?>
+
+<div>&nbsp;</div>
+<?php require($SettDir['inc'].'endpage.php'); ?>
+
+</body>
+</html>
+<?php 
+if($_GET['act']=="read") {
+change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Message ".$MessageName,$Settings['use_gzip']); }
+if($_GET['act']=="viewsent") { 
+change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Sent MailBox",$Settings['use_gzip']); }
+if($_GET['act']!="read"&&$_GET['act']!="viewsent") { 
+change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing MailBox",$Settings['use_gzip']); }
+?>
diff --git a/mysql.php b/mysql.php
new file mode 100644 (file)
index 0000000..9306261
--- /dev/null
+++ b/mysql.php
@@ -0,0 +1,161 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    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: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+@error_reporting(E_ALL ^ E_NOTICE);
+//@output_reset_rewrite_vars();
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="mysql.php"||$File3Name=="/mysql.php") {
+       @header('Location: index.php');
+       exit(); }
+if(@ini_get("register_globals")) { $PreDir['misc'] = "inc/misc/";
+       require_once($PreDir['misc'].'killglobals.php'); unset($PreDir); }
+require_once('settings.php');
+@ini_set("error_prepend_string","<span style='color: ff0000;'>");
+@ini_set("error_append_string","</span>");
+if($Settings['fixpathinfo']==true) {
+       $_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
+       @putenv("PATH_INFO=".$_SERVER['ORIG_PATH_INFO']); }
+if($SettDir['inc']==null) { $SettDir['inc'] = "inc/"; }
+if($SettDir['misc']==null) { $SettDir['misc'] = "inc/misc/"; }
+if($SettDir['admin']==null) { $SettDir['admin'] = "inc/admin/"; }
+if($SettDir['mod']==null) { $SettDir['mod'] = "inc/mod/"; }
+if($SettDir['themes']==null) { $SettDir['themes'] = "themes/"; }
+require_once($SettDir['inc'].'filename.php');
+require_once($SettDir['inc'].'function.php');
+@mrstring(); // Change Path info to Get Vars :P
+require_once($SettDir['misc'].'setcheck.php');
+@ini_set("default_charset",$Settings['charset']);
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="mysql.php"||$File3Name=="/mysql.php") {
+       require($SettDir['inc'].'forbidden.php');
+       exit(); }
+//error_reporting(E_ERROR);
+if($Settings['use_gzip']==true) {
+if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) {
+       /* Do Nothing :P */ } else { $Settings['use_gzip'] = false; } }
+@ob_start();
+if($Settings['use_gzip']==true) { 
+       @header("Content-Encoding: gzip"); }
+/* if(eregi("msie",$browser) && !eregi("opera",$browser)){
+@header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); } */
+@session_set_cookie_params(0, $basedir);
+@session_cache_limiter("private, must-revalidate");
+@header("Cache-Control: private, must-revalidate"); // IE 6 Fix
+@header("Pragma: private, must-revalidate");
+@header("Date: ".gmdate("D, d M Y H:i:s")." GMT");
+@header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+@header("Expires: ".gmdate("D, d M Y H:i:s")." GMT");
+if($preact['idb']!="installing") {
+@session_name($Settings['sqltable']."sess");
+@session_start(); }
+if($Settings['hash_type']!="hmac-md5") {
+if($Settings['hash_type']!="hmac-sha1") {
+$Settings['hash_type']="hmac-sha1"; } }
+if($_GET['act']=="bsdl"||$_GET['act']=="BSDL") { $_GET['act']="bsd"; }
+if($_GET['act']=="bsd"||$_GET['act']=="bsd") {
+@header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("LICENSE"); gzip_page($Settings['use_gzip']); die(); }
+if($_GET['act']=="README"||$_GET['act']=="ReadME") { $_GET['act']="readme"; }
+if($_GET['act']=="readme"||$_GET['act']=="ReadMe") {
+@header("Content-Type: text/plain; charset=".$Settings['charset']);
+require("README"); gzip_page($Settings['use_gzip']); die(); }
+if($_GET['act']=="js"||$_GET['act']=="javascript") {
+@header("Content-Script-Type: text/javascript");
+if(stristr($_SERVER["HTTP_ACCEPT"],"application/x-javascript") ) {
+@header("Content-Type: application/x-javascript; charset=".$Settings['charset']); } else {
+if(stristr($_SERVER["HTTP_ACCEPT"],"application/javascript") ) {
+@header("Content-Type: application/javascript; charset=".$Settings['charset']); } else {
+@header("Content-Type: text/javascript; charset=".$Settings['charset']); } }
+require("inc/javascript.php"); die(); }
+if(CheckFiles("install.php")!=true) {
+       if($Settings['sqldb']==null) {
+               redirect("location",$basedir."install.php"); }
+@ConnectMysql($Settings['sqlhost'],$Settings['sqluser'],$Settings['sqlpass'],$Settings['sqldb']); }
+if(CheckFiles("install.php")==true) {
+       $Settings['board_name'] = "Installing iDB"; }
+if($_SESSION['CheckCookie']!="done") {
+if($_COOKIE['SessPass']!=null&&
+$_COOKIE['MemberName']!=null) {
+require('inc/prelogin.php'); } }
+if($_SESSION['UserGroup']==null) { 
+$_SESSION['UserGroup']=$Settings['GuestGroup']; }
+//Time Zone Set
+if($_SESSION['UserTimeZone']==null||
+       !is_numeric($_SESSION['UserTimeZone'])) {
+       if($Settings['DefaultTimeZone']!=null&&
+       is_numeric($Settings['DefaultTimeZone'])) {
+       $_SESSION['UserTimeZone'] = $Settings['DefaultTimeZone']; }
+       if($Settings['DefaultTimeZone']==null) {
+       $_SESSION['UserTimeZone'] = SeverOffSet(); }
+       if(!is_numeric($Settings['DefaultTimeZone'])) {
+       $_SESSION['UserTimeZone'] = SeverOffSet(); } }
+if($_SESSION['UserDST']==null) {
+if($Settings['DefaultDST']=="off") { 
+       $_SESSION['UserDST'] = "off"; }
+if($Settings['DefaultDST']=="on") { 
+       $_SESSION['UserDST'] = "on"; } }
+// Skin Stuff
+if($_GET['theme']==null) {
+       if($_POST['theme']!=null) {
+               $_GET['theme'] = $_POST['theme']; }
+       if($_POST['skin']!=null) {
+               $_GET['theme'] = $_POST['skin']; }
+       if($_POST['style']!=null) {
+               $_GET['theme'] = $_POST['style']; }
+       if($_POST['css']!=null) {
+               $_GET['theme'] = $_POST['css']; }
+       if($_GET['skin']!=null) {
+               $_GET['theme'] = $_GET['skin']; }
+       if($_GET['style']!=null) {
+               $_GET['theme'] = $_GET['style']; }
+       if($_GET['css']!=null) {
+               $_GET['theme'] = $_GET['css']; } }
+if($_GET['theme']!=null) {
+$_GET['theme']=preg_replace("/(.*?)\.\/(.*?)/", "iDB", $_GET['theme']);
+if($_GET['theme']=="../"||$_GET['theme']=="./") {
+$_GET['theme']="iDB"; $_SESSION['Theme']="iDB"; }
+if (file_exists($SettDir['themes'].$_GET['theme']."/settings.php")) {
+$_SESSION['Theme'] = $_GET['theme'];
+if($_SESSION['UserGroup']!=$Settings['GuestGroup']) {
+$NewDay=GMTimeStamp();
+$qnewskin = query("update ".$Settings['sqltable']."members set UseTheme='%s',LastActive='%s' WHERE id=%i", array($_GET['theme'],$NewDay,$_SESSION['UserID']));
+mysql_query($qnewskin); }
+/* The file Theme Exists */ }
+else { $_GET['theme'] = $Settings['DefaultTheme']; 
+$_SESSION['Theme'] = $Settings['DefaultTheme'];
+/* The file Theme Dose Not Exists */ } }
+if($_GET['theme']==null) { 
+if($_SESSION['Theme']!=null) {
+$_GET['theme']=$_SESSION['Theme']; }
+if($_SESSION['Theme']==null) {
+$_SESSION['Theme']=$Settings['DefaultTheme'];
+$_GET['theme']=$Settings['DefaultTheme']; } }
+$PreSkin['skindir1'] = $_SESSION['Theme'];
+$PreSkin['skindir2'] = $SettDir['themes'].$_SESSION['Theme'];
+require($SettDir['themes'].$_GET['theme']."/settings.php");
+if($Settings['EnableToggle']==null||$Settings['EnableToggle']==false) { 
+       $ThemeSet['EnableToggle'] = false; }
+if($ThemeSet['EnableToggle']==null||$ThemeSet['Toggle']==false||
+       $ThemeSet['Toggle']==null) { $ThemeSet['EnableToggle'] = false; }
+if($_SESSION['DBName']==null) {
+       $_SESSION['DBName'] = $Settings['sqldb']; }
+if($_SESSION['DBName']!=null) {
+       if($_SESSION['DBName']!=$Settings['sqldb']) {
+@redirect("location",$basedir.url_maker($exfile['member'],$Settings['file_ext'],"act=logout",$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],false)); } }
+?>
diff --git a/preindex.php b/preindex.php
new file mode 100644 (file)
index 0000000..b25eba4
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: preindex.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="preindex.php"||$File3Name=="/preindex.php") {
+       @header('Location: index.php');
+       exit(); }
+require('mysql.php');
+if($Settings['enable_rss']==true) {
+if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
+       require($SettDir['inc'].'rssfeed.php'); } }
+if($Settings['output_type']=="htm") {
+       $Settings['output_type'] = "html"; }
+if($Settings['output_type']=="xhtm") {
+       $Settings['output_type'] = "xhtml"; }
+if($Settings['output_type']=="xml+htm") {
+       $Settings['output_type'] = "xhtml"; }
+if($Settings['html_type']=="xhtml10") {
+require($SettDir['inc'].'xhtml10.php'); }
+if($Settings['html_type']=="xhtml11") {
+if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
+$ccstart = "//<![CDATA["; $ccend = "//]]>";
+require($SettDir['inc'].'xhtml11.php'); } else {
+if (stristr($_SERVER["HTTP_USER_AGENT"],"W3C_Validator")) {
+       $ccstart = "//<![CDATA["; $ccend = "//]]>";
+   require($SettDir['inc'].'xhtml11.php'); } else { 
+          $ccstart = "//<!--"; $ccend = "//-->";
+          $Settings['html_type']="xhtml10";
+          $Settings['html_level']="Strict";
+          require($SettDir['inc'].'xhtml10.php'); } } }
+if($Settings['html_type']!="xhtml10") {
+       if($Settings['html_type']!="xhtml11") {
+       $ccstart = "//<!--"; $ccend = "//-->";
+       require($SettDir['inc'].'xhtml10.php'); } }
+?>
\ No newline at end of file
diff --git a/profile.php b/profile.php
new file mode 100644 (file)
index 0000000..444f8f5
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: profile.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['profile'].$usefileext.$_SERVER['PATH_INFO'];
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+if($_SESSION['UserGroup']==$Settings['GuestGroup']) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($_GET['act']==null||$_GET['act']=="notepad")
+{ $_GET['act']="view"; }
+if($_GET['act']=="view"||
+$_GET['act']=="signature"||
+$_GET['act']=="avatar"||
+$_GET['act']=="settings"||
+$_GET['act']=="profile"||
+$_GET['act']=="userinfo")
+{ require($SettDir['inc'].'profilemain.php'); } ?>
+<div>&nbsp;</div>
+<?php require($SettDir['inc'].'endpage.php'); ?>
+
+</body>
+</html>
+<?php 
+if($profiletitle==null) {
+fix_amp($Settings['use_gzip']); }
+if($profiletitle!=null) {
+change_title($Settings['board_name'].$profiletitle,$Settings['use_gzip']); }
+?>
diff --git a/rss.php b/rss.php
new file mode 100644 (file)
index 0000000..388498f
--- /dev/null
+++ b/rss.php
@@ -0,0 +1,36 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: rss.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+@error_reporting(E_ALL ^ E_NOTICE);
+if(@ini_get("register_globals")) {
+       require_once('inc/misc/killglobals.php'); }
+require_once('mysql.php');
+if($SettDir['inc']==null) { $SettDir['inc'] = "inc/"; }
+if($SettDir['misc']==null) { $SettDir['misc'] = "inc/misc/"; }
+if($SettDir['admin']==null) { $SettDir['admin'] = "inc/admin/"; }
+if($SettDir['mod']==null) { $SettDir['mod'] = "inc/mod/"; }
+if($SettDir['themes']==null) { $SettDir['themes'] = "themes/"; }
+if($Settings['enable_rss']==false) {
+redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false)); }
+if($_GET['feed']!="rss"&&$_GET['feed']!="atom") {
+       $_GET['feed'] = "rss"; }
+if($_GET['feedtype']!="rss"&&$_GET['feedtype']!="atom") {
+       if($_GET['feed']=="rss"||$_GET['feed']=="atom") { $_GET['feedtype'] = $_GET['feed']; }
+       if($_GET['act']=="rss"||$_GET['act']=="atom") { $_GET['feedtype'] = $_GET['act']; }
+       if($_GET['feedtype']!="rss"&&$_GET['feedtype']!="atom") { $_GET['feedtype'] = "rss"; } }
+if($_GET['feed']=="rss"||$_GET['act']=="Feed"||$_GET['feed']=="atom") {
+       $_GET['feedtype'] = $_GET['feed']; $Feed['Feed']="Done";
+       require($SettDir['inc'].'rssfeed.php'); }
+?>
\ No newline at end of file
diff --git a/settings.php b/settings.php
new file mode 100644 (file)
index 0000000..5f2d9a1
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: settings.php & settingsbak.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+/*     You Need to install iDB. Run install.php        */
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="settings.php"||$File3Name=="/settings.php"||
+    $File3Name=="settingsbak.php"||$File3Name=="/settingsbak.php") {
+    @header('Location: index.php');
+    exit(); }
+?>
\ No newline at end of file
diff --git a/settingsbak.php b/settingsbak.php
new file mode 100644 (file)
index 0000000..5f2d9a1
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: settings.php & settingsbak.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+/*     You Need to install iDB. Run install.php        */
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="settings.php"||$File3Name=="/settings.php"||
+    $File3Name=="settingsbak.php"||$File3Name=="/settingsbak.php") {
+    @header('Location: index.php');
+    exit(); }
+?>
\ No newline at end of file
diff --git a/setup/convert/index.php b/setup/convert/index.php
new file mode 100644 (file)
index 0000000..522a791
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../../index.php');
+?>
\ No newline at end of file
diff --git a/setup/convert/info.php b/setup/convert/info.php
new file mode 100644 (file)
index 0000000..079936b
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: info.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$ConvertInfo = array();
+$ConvertInfo['ConvertFrom'] = null;
+$ConvertInfo['ConvertTo'] = null;
+$ConvertInfo['ConvertName'] = null;
+$ConvertInfo['ConvertMaker'] = null;
+$ConvertInfo['ConvertMakerURL'] = null;
+$ConvertInfo['ConvertFile'] = null;
+$ConvertInfo['ConvertVersion'] = null;
+$ConvertInfo['ConvertPreVersion'] = null;
+/* Demo Convert File */
+// $ConvertInfo = array();
+// $ConvertInfo['ConvertFrom'] = "DF2k";
+// $ConvertInfo['ConvertTo'] = "iDB";
+// $ConvertInfo['ConvertName'] = "DF2k to iDB";
+// $ConvertInfo['ConvertMaker'] = "Cool Dude 2k";
+// $ConvertInfo['ConvertMakerURL'] = "http://upload.idb.s1.jcink.com/";
+// $ConvertInfo['ConvertFile'] = "setup/convert/convert.php";
+// $ConvertInfo['ConvertVersion'] = "1";
+// $ConvertInfo['ConvertPreVersion'] = "1";
+?>
\ No newline at end of file
diff --git a/setup/index.php b/setup/index.php
new file mode 100644 (file)
index 0000000..f1819f4
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../index.php');
+?>
\ No newline at end of file
diff --git a/setup/license.php b/setup/license.php
new file mode 100644 (file)
index 0000000..bb7952a
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: license.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="presetup.php"||$File3Name=="/presetup.php") {
+       require('index.php');
+       exit(); }
+if($SetupDir['setup']==null) { $SetupDir['setup'] = "setup/"; }
+if($SetupDir['convert']==null) { $SetupDir['convert'] = "setup/convert/"; }
+?>
+<tr class="TableRow3">
+<td class="TableRow3">
+<form method="post" name="install" id="install" action="install.php?act=Part2">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 50%;"><label class="TextBoxLabel" for="LicenseBox">License - Please read fully and check 'I agree' box ONLY if you agree to license</label><br />
+       <textarea rows="34" id="LicenseBox" name="LicenseBox" class="TextBox" cols="79" readonly="readonly" accesskey="L">
+       <?php echo file_get_contents("LICENSE"); ?></textarea><br />
+       <input type="checkbox" class="TextBox" name="License" value="Agree" id="License" /><label class="TextBoxLabel" for="License">I Agree</label><br/></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<?php if($ConvertInfo['ConvertFile']==null) { ?>
+<input type="hidden" name="SetupType" value="install" style="display: none;" />
+<?php } ?>
+<input type="hidden" name="act" value="Part2" style="display: none;" />
+<input type="submit" class="Button" value="Next Page" name="Install_Board" />
+<input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
+</td></tr></table>
+</form>
+</td>
+</tr>
\ No newline at end of file
diff --git a/setup/mkconfig.php b/setup/mkconfig.php
new file mode 100644 (file)
index 0000000..e4f8c38
--- /dev/null
@@ -0,0 +1,172 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: mkconfig.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="mkconfig.php"||$File3Name=="/mkconfig.php") {
+       require('index.php');
+       exit(); }
+require_once('settings.php');
+if($SetupDir['setup']==null) { $SetupDir['setup'] = "setup/"; }
+if($SetupDir['convert']==null) { $SetupDir['convert'] = "setup/convert/"; }
+$_POST['DatabaseHost'] = $Settings['sqlhost'];
+$_POST['DatabaseUserName'] = $Settings['sqluser'];
+$_POST['DatabasePassword'] = $Settings['sqlpass'];
+?>
+<tr class="TableRow3" style="text-align: center;">
+<td class="TableRow3" colspan="2">
+<?php
+$_POST['tableprefix'] = preg_replace("/[^A-Za-z0-9_$]/", "", $_POST['tableprefix']);
+if($_POST['tableprefix']==null) { $_POST['tableprefix']="idb_"; }
+if($_POST['sessprefix']==null) { $_POST['sessprefix']="idb_"; }
+$checkfile="settings.php";
+if (!is_writable($checkfile)) {
+   echo "<br />Settings is not writable.";
+   @chmod("settings.php",0755); $Error="Yes";
+   @chmod("settingsbak.php",0755);
+} else { /* settings.php is writable install iDB. ^_^ */ }
+@session_name($_POST['tableprefix']."sess");
+@session_start();
+if (strlen($_POST['AdminPasswords'])<="3") { $Error="Yes";
+echo "<br />Your password is too small."; }
+if (strlen($_POST['AdminUser'])<="3") { $Error="Yes";
+echo "<br />Your user name is too small."; }
+if (strlen($_POST['AdminPasswords'])>="30") { $Error="Yes";
+echo "<br />Your password is too big."; }
+if (strlen($_POST['AdminUser'])>="20") { $Error="Yes";
+echo "<br />Your user name is too big."; }
+if ($_POST['AdminPasswords']!=$_POST['ReaPassword']) { $Error="Yes";
+echo "<br />Your passwords did not match."; }
+if($_POST['HTMLType']=="xhtml11") { $_POST['HTMLLevel']="Strict"; }
+if($_POST['BoardURL']=="http://localhost/"||$_POST['BoardURL']=="http://localhost") {
+       $_POST['BoardURL'] = "localhost"; }
+if($_POST['BoardURL']=="https://localhost/"||$_POST['BoardURL']=="https://localhost") {
+       $_POST['BoardURL'] = "localhost"; }
+if($_POST['WebURL']=="http://localhost/"||$_POST['WebURL']=="http://localhost") {
+       $_POST['WebURL'] = "localhost"; }
+if($_POST['WebURL']=="https://localhost/"||$_POST['WebURL']=="https://localhost") {
+       $_POST['WebURL'] = "localhost"; }
+$_POST['BoardURL'] = addslashes($_POST['BoardURL']);
+$YourDate = GMTimeStamp();
+$GSalt = salt_hmac(); $YourSalt = salt_hmac();
+/* Fix The User Info for iDB */
+$_POST['NewBoardName'] = htmlentities($_POST['NewBoardName'], ENT_QUOTES);
+$_POST['NewBoardName'] = fixbamps($_POST['NewBoardName']);
+$_POST['NewBoardName'] = @remove_spaces($_POST['NewBoardName']);
+$_POST['NewBoardName'] = str_replace("\'", "'", $_POST['NewBoardName']);
+//$_POST['AdminPassword'] = stripcslashes(htmlentities($_POST['AdminPassword'], ENT_QUOTES));
+//$_POST['AdminPassword'] = preg_replace("/\&amp;#(.*?);/is", "&#$1;", $_POST['AdminPassword']);
+$_POST['AdminUser'] = stripcslashes(htmlspecialchars($_POST['AdminUser'], ENT_QUOTES));
+$_POST['AdminUser'] = preg_replace("/&amp;#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $_POST['AdminUser']);
+$_POST['AdminUser'] = @remove_spaces($_POST['AdminUser']);
+if ($_POST['AdminUser']=="Guest") { $Error="Yes";
+echo "<br />You can not use Guest as your name."; }
+/* We are done now with fixing the info. ^_^ */
+$mydbtest = @ConnectMysql($_POST['DatabaseHost'],$_POST['DatabaseUserName'],$_POST['DatabasePassword'],$_POST['DatabaseName']);
+if($mydbtest!=true) { $Error="Yes";
+echo "<br />".mysql_errno().": ".mysql_error()."\n"; }
+if ($Error!="Yes") {
+require($SetupDir['setup'].'mktable.php');
+/*
+$query = "INSERT INTO ".$_POST['tableprefix']."tagboard VALUES (1,-1,'Cool Dude 2k',".$YourDate.",'Welcome to Your New Tag Board. ^_^','127.0.0.1')"; 
+*/
+$query = "INSERT INTO ".$_POST['tableprefix']."categories VALUES (1,'Main','yes','category','yes',0,'The Main Category.')";
+mysql_query($query);
+$YourOffSet = $_POST['YourOffSet'];
+$AdminDST = $_POST['DST'];
+$MyDay = GMTimeGet("d",$YourOffSet,0,$AdminDST);
+$MyMonth = GMTimeGet("m",$YourOffSet,0,$AdminDST);
+$MyYear = GMTimeGet("Y",$YourOffSet,0,$AdminDST);
+$MyYear10 = $MyYear+10;
+$query = "INSERT INTO ".$_POST['tableprefix']."events VALUES (1, -1, 'Cool Dude 2k', 'Opening', 'This is the day the Board was made. ^_^', ".$YourDate.", ".$YourDate.")";
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."forums VALUES (1,1,'Test/Spam','yes','forum',0,0,'http://',0,'A Test Board.','off','yes',1,1)";
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."topics VALUES (1,1,1,-1,'Cool Dude 2k',".$YourDate.",".$YourDate.",'Welcome','Install was Successful',0,0,1,1)";
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."posts VALUES (1,1,1,1,-1,'Cool Dude 2k',".$YourDate.",".$YourDate.",0,'Welcome to Your Message Board. :) ','Install was Successful','127.0.0.1')"; 
+mysql_query($query);
+$NewPassword = b64e_hmac($_POST['AdminPasswords'],$YourDate,$YourSalt,"sha1");
+//$Name = stripcslashes(htmlspecialchars($AdminUser, ENT_QUOTES));
+$YourWebsite = "http://".$_SERVER['HTTP_HOST'].$this_dir."index.php?act=view";
+$UserIP = $_SERVER['REMOTE_ADDR'];
+$PostCount = 2;
+$Email = "admin@".$_SERVER['HTTP_HOST'];
+$AdminTime = $_POST['YourOffSet'];
+$GEmail = "guest@".$_SERVER['HTTP_HOST'];
+$grand = rand(6,16); $i = 0; $gpass = "";
+while ($i < $grand) {
+$csrand = rand(1,3);
+if($csrand!=1&&$csrand!=2&&$csrand!=3) { $csrand=1; }
+if($csrand==1) { $gpass .= chr(rand(48,57)); }
+if($csrand==2) { $gpass .= chr(rand(65,90)); }
+if($csrand==3) { $gpass .= chr(rand(97,122)); }
+++$i; } $GuestPassword = b64e_hmac($gpass,$YourDate,$GSalt,"sha1");
+$url_this_dir = "http://".$_SERVER['HTTP_HOST'].$this_dir."index.php?act=view";
+$YourIP = $_SERVER['REMOTE_ADDR'];
+$query = "INSERT INTO ".$_POST['tableprefix']."members VALUES (-1,'Guest','".$GuestPassword."','iDBH','".$GEmail."',4,'no',0,'Guest Account','Guest',".$YourDate.",".$YourDate.",'0','[B]Test[/B] :)','Your Notes','http://','100x100','http://".$_SERVER['HTTP_HOST']."/','UnKnow',1,'".$AdminTime."','".$AdminDST."','iDB','127.0.0.1','".$GSalt."')";
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."members VALUES (1,'".$_POST['AdminUser']."','".$NewPassword."','iDBH','".$Email."',1,'yes',0,'".$Interests."','Admin',".$YourDate.",".$YourDate.",'0','".$NewSignature."','Your Notes','".$Avatar."','100x100','".$YourWebsite."','UnKnow',0,'".$AdminTime."','".$AdminDST."','iDB','".$UserIP."','".$YourSalt."')";
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."messenger VALUES (1,-1,1,'Cool Dude 2k','Test','Hello Welcome to your board.\n\rThis is a Test PM. :P ','Hello Welcome',".$YourDate.",0)";
+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-2007 Cool Dude 2k - http://intdb.sourceforge.net/\n    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\n    iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n    \$FileInfo: settings.php & settingsbak.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k \$\n*/\n";
+$pretext2 = array("/*   Board Setting Section Begins   */\n\$Settings = array();","/*   Board Setting Section Ends  \n     Board Info Section Begins   */\n\$SettInfo = array();","/*   Board Setting Section Ends   \n     Board Dir Section Begins   */\n\$SettDir = array();","/*   Board Dir Section Ends   */");
+$settcheck = "if (\$File3Name==\"settings.php\"||\$File3Name==\"/settings.php\"||\n    \$File3Name==\"settingsbak.php\"||\$File3Name==\"/settingsbak.php\") {\n    @header('Location: index.php');\n    exit(); }\n";
+$BoardSettings=$pretext2[0]."\n\$Settings['sqlhost'] = '".$_POST['DatabaseHost']."';\n\$Settings['sqldb'] = '".$_POST['DatabaseName']."';\n\$Settings['sqltable'] = '".$_POST['tableprefix']."';\n\$Settings['sqluser'] = '".$_POST['DatabaseUserName']."';\n\$Settings['sqlpass'] = '".$_POST['DatabasePassword']."';\n\$Settings['board_name'] = '".$_POST['NewBoardName']."';\n\$Settings['idbdir'] = '".$idbdir."';\n\$Settings['idburl'] = '".$_POST['BoardURL']."';\n\$Settings['weburl'] = '".$_POST['WebURL']."';\n\$Settings['use_gzip'] = ".$_POST['GZip'].";\n\$Settings['html_type'] = '".$_POST['HTMLType']."';\n\$Settings['html_level'] = '".$_POST['HTMLLevel']."';\n\$Settings['output_type'] = '".$_POST['OutPutType']."';\n\$Settings['GuestGroup'] = 'Guest';\n\$Settings['MemberGroup'] = 'Member';\n\$Settings['ValidateGroup'] = 'Validate';\n\$Settings['AdminValidate'] = false;\n\$Settings['TestReferer'] = ".$_POST['TestReferer'].";\n\$Settings['DefaultTheme'] = 'iDB';\n\$Settings['DefaultTimeZone'] = '".$AdminTime."';\n\$Settings['DefaultDST'] = '".$AdminDST."';\n\$Settings['charset'] = 'iso-8859-15';\n\$Settings['add_power_by'] = false;\n\$Settings['send_pagesize'] = false;\n\$Settings['max_posts'] = '10';\n\$Settings['max_topics'] = '10';\n\$Settings['hot_topic_num'] = '15';\n\$Settings['qstr'] = '&';\n\$Settings['qsep'] = '=';\n\$Settings['file_ext'] = '.php';\n\$Settings['rss_ext'] = '.php';\n\$Settings['js_ext'] = '.js';\n\$Settings['showverinfo'] = true;\n\$Settings['enable_rss'] = true;\n\$Settings['EnableToggle'] = true;\n\$Settings['fixpathinfo'] = false;\n\$Settings['fixbasedir'] = false;\n\$Settings['rssurl'] = false;\n".$pretext2[1]."\n\$SettInfo['board_name'] = '".$_POST['NewBoardName']."';\n\$SettInfo['Author'] = '".$_POST['AdminUser']."';\n\$SettInfo['Keywords'] = '".$_POST['NewBoardName'].",".$_POST['AdminUser']."';\n\$SettInfo['Description'] = '".$_POST['NewBoardName'].",".$_POST['AdminUser']."';\n".$pretext2[2]."\n\$SettDir['maindir'] = '".$idbdir."';\n\$SettDir['inc'] = 'inc/';\n\$SettDir['misc'] = 'inc/misc/';\n\$SettDir['admin'] = 'inc/admin/';\n\$SettDir['mod'] = 'inc/mod/';\n\$SettDir['themes'] = 'themes/';\n".$pretext2[3]."\n?>";
+$BoardSettingsBak = $pretext.$settcheck.$BoardSettings;
+$BoardSettings = $pretext.$settcheck.$BoardSettings;
+$fp = fopen("settings.php","w+");
+fwrite($fp, $BoardSettings);
+fclose($fp);
+//     @cp("settings.php","settingsbak.php");
+$fp = fopen("settingsbak.php","w+");
+fwrite($fp, $BoardSettingsBak);
+fclose($fp);
+$_SESSION['MemberName']=$_POST['AdminUser'];
+$_SESSION['UserID']=1;
+$_SESSION['UserGroup']="Admin";
+$_SESSION['UserTimeZone']=$AdminTime;
+$_SESSION['UserDST'] = "off";
+if($_POST['storecookie']==true) {
+@setcookie("MemberName", $_POST['AdminUser'], time() + (7 * 86400), $basedir);
+@setcookie("UserID", 1, time() + (7 * 86400), $basedir);
+@setcookie("SessPass", $NewPassword, time() + (7 * 86400), $basedir); }
+@mysql_close(); $chdel = true;
+if($Error!="Yes") {
+if($_POST['unlink']==true) {
+$chdel1 = @unlink($SetupDir['setup'].'presetup.php'); $chdel2 = @unlink($SetupDir['setup'].'setup.php');
+$chdel3 = @unlink($SetupDir['setup'].'mkconfig.php'); $chdel4 = @unlink($SetupDir['setup'].'mktable.php');
+$chdel5 = @unlink($SetupDir['setup'].'index.php'); $chdel6 = @unlink($SetupDir['setup'].'license.php');
+$chdel7 = @unlink($SetupDir['convert'].'index.php');
+if($ConvertInfo['ConvertFile']!=null) { $chdel0 = @unlink($ConvertInfo['ConvertFile']); }
+$chdel8 = @unlink($SetupDir['convert'].'info.php'); 
+$chdel9 = @rmdir($SetupDir['convert']); $chdel10 = @rmdir('setup');
+$chdel11 = @unlink('install.php'); } }
+if($chdel1==false||$chdel2==false||$chdel3==false) { $chdel = false; }
+if($chdel4==false||$chdel5==false||$chdel6==false||$chdel7==false) { $chdel = false; }
+if($chdel8==false||$chdel9==false||$chdel10==false||$chdel11==false) { $chdel = false; }
+if($ConvertInfo['ConvertFile']!=null) { if($chdel0==false) { $chdel = false; } }
+?><span class="TableMessage">
+<br />Install Finish <a href="index.php?act=view">Click here</a> to goto board. ^_^</span>
+<?php if($chdel==false) { ?><span class="TableMessage">
+<br />Error: Cound not delete installer. Read readme.txt for more info.</span>
+<?php } ?><br /><br />
+</td>
+</tr>
+<?php } ?>
\ No newline at end of file
diff --git a/setup/mktable.php b/setup/mktable.php
new file mode 100644 (file)
index 0000000..e354063
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: mktable.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="mktable.php"||$File3Name=="/mktable.php") {
+       require('index.php');
+       exit(); }
+if($SetupDir['setup']==null) { $SetupDir['setup'] = "setup/"; }
+if($SetupDir['convert']==null) { $SetupDir['convert'] = "setup/convert/"; }
+$query="CREATE TABLE `".$_POST['tableprefix']."categories` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `ShowCategory` varchar(5) NOT NULL default '', `CategoryType` varchar(15) NOT NULL default '', `SubShowForums` varchar(5) NOT NULL default '', `InSubCategory` int(15) NOT NULL default '0', `Description` text NOT NULL, PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."forums` ( `id` int(15) NOT NULL auto_increment, `CategoryID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ShowForum` varchar(5) NOT NULL default '', `ForumType` varchar(15) NOT NULL default '', `InSubForum` int(15) NOT NULL default '0', `RedirectURL` text NOT NULL, `Redirects` int(15) NOT NULL default '0', `NumViews` int(15) NOT NULL default '0', `Description` text NOT NULL, `PostCountAdd` varchar(15) NOT NULL default '', `CanHaveTopics` varchar(5) NOT NULL default '', `NumPosts` int(15) NOT NULL default '0', `NumTopics` int(15) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."events` ( `id` int(15) NOT NULL auto_increment, `UserID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `EventName` varchar(150) NOT NULL default '', `EventText` text NOT NULL, `TimeStamp` int(15) NOT NULL default '0', `TimeStampEnd` int(15) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."members` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `Password` varchar(150) NOT NULL default '', `HashType` varchar(50) NOT NULL default '', `Email` varchar(150) NOT NULL default '', `GroupID` int(15) NOT NULL default '0', `Validated` varchar(20) NOT NULL default '', `WarnLevel` int(10) NOT NULL default '0', `Interests` varchar(150) NOT NULL default '', `Title` varchar(150) NOT NULL default '', `Joined` int(15) NOT NULL default '0', `LastActive` int(15) NOT NULL default '0', `BirthDay` int(15) NOT NULL default '0', `Signature` text NOT NULL, `Notes` text NOT NULL, `Avatar` varchar(150) NOT NULL default '', `AvatarSize` varchar(10) NOT NULL default '', `Website` varchar(150) NOT NULL default '', `Gender` varchar(15) NOT NULL default '', `PostCount` int(15) NOT NULL default '0', `TimeZone` varchar(5) NOT NULL default '0', `DST` varchar(5) NOT NULL default '0', `UseTheme` varchar(5) NOT NULL default '0', `IP` varchar(20) NOT NULL default '', `Salt` varchar(50) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."messenger` ( `id` int(15) NOT NULL auto_increment, `SenderID` int(15) NOT NULL default '0', `PMSentID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `MessageTitle` varchar(150) NOT NULL default '', `MessageText` text NOT NULL, `Description` text NOT NULL, `DateSend` int(15) NOT NULL default '0', `Read` int(5) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."posts` ( `id` int(15) NOT NULL auto_increment, `TopicID` int(15) NOT NULL default '0', `ForumID` int(15) NOT NULL default '0', `CategoryID` int(15) NOT NULL default '0', `UserID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `TimeStamp` int(15) NOT NULL default '0', `LastUpdate` int(15) NOT NULL default '0', `EditUser` int(15) NOT NULL default '0', `Post` text NOT NULL, `Description` text NOT NULL, `IP` varchar(20) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."smileys` ( `id` int(15) NOT NULL auto_increment, `FileName` text NOT NULL, `SmileName` text NOT NULL, `SmileText` text NOT NULL, `Directory` text NOT NULL, `Show` varchar(15) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+/*
+$query="CREATE TABLE `".$_POST['tableprefix']."tagboard` ( `id` int(15) NOT NULL auto_increment, `UserID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `TimeStamp` int(15) NOT NULL default '0', `Post` text NOT NULL, `IP` varchar(20) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+*/
+$query="CREATE TABLE `".$_POST['tableprefix']."topics` ( `id` int(15) NOT NULL auto_increment, `ForumID` int(15) NOT NULL default '0', `CategoryID` int(15) NOT NULL default '0', `UserID` int(15) NOT NULL default '0', `GuestName` varchar(150) NOT NULL default '', `TimeStamp` int(15) NOT NULL default '0', `LastUpdate` int(15) NOT NULL default '0', `TopicName` varchar(150) NOT NULL default '', `Description` text NOT NULL, `NumReply` int(15) NOT NULL default '0', `NumViews` int(15) NOT NULL default '0', `Pinned` int(5) NOT NULL default '0', `Closed` int(5) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."sessions` ( `SessionID` varchar(255) NOT NULL default '', `SessID` varchar(255) NOT NULL default '', `LastUpdated` int(15) NOT NULL default '0', `DataValue` text NOT NULL, PRIMARY KEY (`SessionID`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."groups` ( `id` int(15) NOT NULL auto_increment, `Name` varchar(150) NOT NULL default '', `PermissionID` int(15) NOT NULL default '0', `NamePrefix` varchar(150) NOT NULL default '', `NameSuffix` varchar(150) NOT NULL default '', `CanViewBoard` varchar(5) NOT NULL default '', `CanEditProfile` varchar(5) NOT NULL default '', `CanAddEvents` varchar(5) NOT NULL default '', `CanPM` varchar(5) NOT NULL default '', `PromoteTo` varchar(150) NOT NULL default '', `PromotePosts` int(15) NOT NULL default '0', `HasModCP` varchar(5) NOT NULL default '', `HasAdminCP` varchar(5) NOT NULL default '', `ViewDBInfo` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."permissions` ( `id` int(15) NOT NULL auto_increment, `PermissionID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `ForumID` int(15) NOT NULL default '0', `CanViewForum` varchar(5) NOT NULL default '', `CanMakeTopics` varchar(5) NOT NULL default '', `CanMakeReplys` varchar(5) NOT NULL default '', `CanEditTopics` varchar(5) NOT NULL default '', `CanEditReplys` varchar(5) NOT NULL default '', `CanDeleteTopics` varchar(5) NOT NULL default '', `CanDeleteReplys` varchar(5) NOT NULL default '', `CanDohtml` varchar(5) NOT NULL default '', `CanUseBBags` varchar(5) NOT NULL default '', `CanModForum` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query="CREATE TABLE `".$_POST['tableprefix']."catpermissions` ( `id` int(15) NOT NULL auto_increment, `PermissionID` int(15) NOT NULL default '0', `Name` varchar(150) NOT NULL default '', `CategoryID` int(15) NOT NULL default '0', `CanViewCategory` varchar(5) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM ;";
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."groups VALUES (1, 'Admin', 1, '', '', 'yes', 'yes', 'yes', 'yes', 'none', 0, 'yes', 'yes', 'no'), (2, 'Moderator', 2, '', '', 'yes', 'yes', 'yes', 'yes', 'none', 0, 'yes', 'no', 'no'), (3, 'Member', 3, '', '', 'yes', 'yes', 'yes', 'yes', 'none', 0, 'no', 'no', 'no'), (4, 'Guest', 4, '', '', 'yes', 'no', 'no', 'no', 'none', 0, 'no', 'no', 'no'), (5, 'Banned', 5, '', '', 'no', 'no', 'no', 'no', 'none', 0, 'no', 'no', 'no'), (6, 'Validate', 6, '', '', 'yes', 'yes', 'no', 'no', 'none', 0, 'no', 'no', 'no');"; 
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."permissions VALUES (1, 1, 'Admin', 1, 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes'), (2, 2, 'Moderator', 1, 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes'), (3, 3, 'Member', 1, 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', 'yes', 'no'), (4, 4, 'Guest', 1, 'yes', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no'), (5, 5, 'Banned', 1, 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no'), (6, 6, 'Validate', 1, 'yes', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no', 'no');"; 
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."catpermissions VALUES (1, 1, 'Admin', 1, 'yes'), (2, 2, 'Moderator', 1, 'yes'), (3, 3, 'Member', 1, 'yes'), (4, 4, 'Guest', 1, 'yes'), (5, 5, 'Banned', 1, 'no'), (6, 6, 'Validate', 1, 'yes');"; 
+mysql_query($query);
+$query = "INSERT INTO ".$_POST['tableprefix']."smileys VALUES (1, 'smile.gif', 'Happy', ':)', 'smileys/', 'yes'), (2, 'tongue.gif', 'Tongue', ':P', 'smileys/', 'yes'), (3, 'tongue2.gif', 'Tongue', ':tongue:', 'smileys/', 'yes'), (4, 'sweat.gif', 'Sweat', ':sweat:', 'smileys/', 'yes'), (5, 'laugh.gif', 'lol', ':lol:', 'smileys/', 'yes'), (6, 'cool.gif', 'Cool', 'B)', 'smileys/', 'yes'), (7, 'sleep.gif', 'Sleep', '-_-', 'smileys/', 'yes'), (8, 'sad.gif', 'Sad', ':(', 'smileys/', 'yes'), (9, 'angry.gif', 'Angry', ':angry:', 'smileys/', 'yes'), (10, 'huh.gif', 'huh', ':huh:', 'smileys/', 'yes'), (11, 'ohmy.gif', 'ohmy', ':o', 'smileys/', 'yes'), (12, 'hmm.gif', 'hmm', ':unsure:', 'smileys/', 'yes'), (13, 'mad.gif', 'Mad', ':mad:', 'smileys/', 'yes'), (14, 'wub.gif', 'Wub', ':wub:', 'smileys/', 'yes'), (15, 'x.gif', 'X', ':x:', 'smileys/', 'yes');";
+mysql_query($query);
+?>
\ No newline at end of file
diff --git a/setup/presetup.php b/setup/presetup.php
new file mode 100644 (file)
index 0000000..0e4d431
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: presetup.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="presetup.php"||$File3Name=="/presetup.php") {
+       require('index.php');
+       exit(); }
+if($SetupDir['setup']==null) { $SetupDir['setup'] = "setup/"; }
+if($SetupDir['convert']==null) { $SetupDir['convert'] = "setup/convert/"; }
+if ($_POST['License']!="Agree") { $Error="Yes";  ?>
+<tr class="TableRow3">
+<td class="TableRow3">
+<span class="TableMessage">
+<br />You need to  agree to the tos.<br /></span>
+<?php }
+if($Error!="Yes") {
+?>
+<tr class="TableRow3">
+<td class="TableRow3">
+<form method="post" name="install" id="install" action="install.php?act=Part3">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
+       <td style="width: 50%;"><input type="text" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="DatabasePassword">Insert Database Password:</label></td>
+       <td style="width: 50%;"><input type="password" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" /></td>
+
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseHost">Insert Database Host:</label></td>
+       <td style="width: 50%;"><input type="text" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="localhost" /></td>
+       <?php if($ConvertInfo['ConvertFile']!=null) { ?>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="SetupType">Type of install to do:</label></td>
+       <td style="width: 50%;"><select size="1" class="TextBox" name="SetupType" id="SetupType">
+       <option value="convert" selected="selected"><?php echo $ConvertInfo['ConvertName']; ?></option>
+       <option value="install">Install iDB</option>
+       </select></td>
+       <?php } ?>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<?php if($ConvertInfo['ConvertFile']==null) { ?>
+<input type="hidden" name="SetupType" value="install" style="display: none;" />
+<?php } ?>
+<input type="hidden" name="act" value="Part3" style="display: none;" />
+<input type="submit" class="Button" value="Next Page" name="Install_Board" />
+<input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
+</td></tr></table>
+</form>
+</td>
+</tr>
+<?php } ?>
\ No newline at end of file
diff --git a/setup/setup.php b/setup/setup.php
new file mode 100644 (file)
index 0000000..6de067f
--- /dev/null
@@ -0,0 +1,169 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+    iDB Installer made by Game Maker 2k - http://idb.berlios.net/
+
+    $FileInfo: setup.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
+$File2Name = $_SERVER['SCRIPT_NAME'];
+$File3Name=str_replace($File1Name, null, $File2Name);
+if ($File3Name=="setup.php"||$File3Name=="/setup.php") {
+       require('index.php');
+       exit(); }
+if($SetupDir['setup']==null) { $SetupDir['setup'] = "setup/"; }
+if($SetupDir['convert']==null) { $SetupDir['convert'] = "setup/convert/"; }
+?>
+<tr class="TableRow3">
+<td class="TableRow3">
+<?php
+$checkfile="settings.php";
+if (!is_writable($checkfile)) {
+   echo "<br />Settings is not writable.";
+   @chmod("settings.php",0755); $Error="Yes";
+   @chmod("settingsbak.php",0755);
+} else { /* settings.php is writable install iDB. ^_^ */ }
+$StatSQL = @mysql_connect($_POST['DatabaseHost'],$_POST['DatabaseUserName'],$_POST['DatabasePassword']);
+if(!$StatSQL) { $Error="Yes";
+echo "<span class=\"TableMessage\">";
+echo "<br />".mysql_errno().": ".mysql_error()."\n</span>\n"; }
+if ($Error!="Yes") {
+$pretext = "<?php\n/*\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the Revised BSD License.\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-2007 Cool Dude 2k - http://intdb.sourceforge.net/\n    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/\n    Emoticons made by Jcink http://tfbb.jcink.com/\n*/\n";
+$BoardSettings=$pretext."\$Settings = array();\n\$Settings['sqlhost'] = '".$_POST['DatabaseHost']."';\n\$Settings['sqluser'] = '".$_POST['DatabaseUserName']."';\n\$Settings['sqlpass'] = '".$_POST['DatabasePassword']."';\n?>";
+$fp = fopen("./settings.php","w+");
+fwrite($fp, $BoardSettings);
+fclose($fp);
+//     @cp("settings.php","settingsbak.php");
+$fp = fopen("./settingsbak.php","w+");
+fwrite($fp, $BoardSettings);
+fclose($fp);
+?>
+<form method="post" name="install" id="install" action="install.php?act=Part4">
+<table style="text-align: left;">
+<tr style="text-align: left;">
+       <td style="width: 50%;"><label class="TextBoxLabel" for="NewBoardName">Insert Board Name:</label></td>
+       <td style="width: 50%;"><input type="text" name="NewBoardName" class="TextBox" id="NewBoardName" size="20" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database Name:</label></td>
+       <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" />
+       <?php /*<select id="dblist" name="dblist" class="TextBox" onchange="document.install.DatabaseName.value=this.value">
+       <option value=" ">none on list</option>
+       <?php $dblist = sql_list_dbs();
+       $num = count($dblist); $i = 0;
+       while ($i < $num) {
+               echo "<option value=\"".$dblist[$i]."\">";
+               echo $dblist[$i]."</option>\n";
+               ++$i;
+       } ?></select><?php */ ?></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
+       <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" value="idb_" size="20" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="AdminUser">Insert Admin User Name:</label></td>
+       <td style="width: 50%;"><input type="text" name="AdminUser" class="TextBox" id="AdminUser" size="20" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="AdminPassword">Insert Admin Password:</label></td>
+       <td style="width: 50%;"><input type="password" name="AdminPasswords" class="TextBox" id="AdminPassword" size="20" maxlength="30" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="ReaPassword">ReInsert Admin Password:</label></td>
+       <td style="width: 50%;"><input type="password" class="TextBox" name="ReaPassword" size="20" id="ReaPassword" maxlength="30" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="BoardURL">Insert The Board URL or localhost to use any url:</label></td>
+       <td style="width: 50%;"><input type="text" class="TextBox" name="BoardURL" size="20" id="BoardURL" value="<?php echo $prehost.$_SERVER['HTTP_HOST'].$this_dir; ?>" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="WebURL">Insert The WebSite URL:</label></td>
+       <td style="width: 50%;"><input type="text" class="TextBox" name="WebURL" size="20" id="WebURL" value="<?php echo $prehost.$_SERVER['HTTP_HOST']."/"; ?>" /></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="UseGzip">Do you want to GZip Pages:</label></td>
+       <td style="width: 50%;"><select size="1" class="TextBox" name="GZip" id="UseGzip">
+       <option value="false">No</option>
+       <option value="true">Yes</option>
+       </select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLType">HTML Type to use:</label></td>
+       <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLType" id="HTMLType">
+       <option value="xhtml10">XHTML 1.0</option>
+       <option value="xhtml11">XHTML 1.1</option>
+       </select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="HTMLLevel">HTML level only for XHTML 1.0/HTML 4.01:</label></td>
+       <td style="width: 50%;"><select size="1" class="TextBox" name="HTMLLevel" id="HTMLLevel">
+       <option value="Transitional">Transitional</option>
+       <option value="Strict">Strict</option>
+       </select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="OutPutType">Output file as:</label></td>
+       <td style="width: 50%;"><select size="1" class="TextBox" name="OutPutType" id="OutPutType">
+       <option value="html">HTML</option>
+       <option value="xhtml">XHTML</option>
+       </select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" title="Store userinfo as a cookie so you dont need to login again." for="storecookie">Store as cookie?</label></td>
+       <td style="width: 50%;"><select id="storecookie" name="storecookie" class="TextBox">
+<option value="true">Yes</option>
+<option value="false">No</option>
+</select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="YourOffSet">Your TimeZone:</label></td>
+       <td style="width: 50%;"><select id="YourOffSet" name="YourOffSet" class="TextBox"><?php
+$myofftime = SeverOffSet();
+$plusi = 1; $minusi = 12;
+$plusnum = 13; $minusnum = 0;
+while ($minusi > $minusnum) {
+if($myofftime==-$minusi) {
+echo "<option selected=\"selected\" value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
+if($myofftime!=-$minusi) {
+echo "<option value=\"-".$minusi."\">GMT - ".$minusi.":00 hours</option>\n"; }
+--$minusi; }
+if($myofftime==0) { ?>
+<option selected="selected" value="0">GMT +/- 0:00 hours</option>
+<?php } if($myofftime!=0) { ?>
+<option value="0">GMT +/- 0:00 hours</option>
+<?php }
+while ($plusi < $plusnum) {
+if($myofftime==$plusi) {
+echo "<option selected=\"selected\" value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
+if($myofftime!=$plusi) {
+echo "<option value=\"".$plusi."\">GMT + ".$plusi.":00 hours</option>\n"; }
+++$plusi; }
+?></select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="DST">Is <span title="Daylight Savings Time">DST</span> / <span title="Summer Time">ST</span> on or off:</label></td>
+       <td style="width: 50%;"><select id="DST" name="DST" class="TextBox">
+<option selected="selected" value="off">off</option>
+<option value="on">on</option>
+</select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="TestReferer">Test Referering URL with host name:</label></td>
+       <td style="width: 50%;"><select id="TestReferer" name="TestReferer" class="TextBox">
+<option selected="selected" value="false">off</option>
+<option value="true">on</option>
+</select></td>
+</tr><tr>
+       <td style="width: 50%;"><label class="TextBoxLabel" for="unlink">Delete Installer When Done?(Might not work)</label></td>
+       <td style="width: 50%;"><select id="unlink" name="unlink" class="TextBox">
+<option value="true">Yes</option>
+<option value="false">No</option>
+</select></td>
+</tr></table>
+<table style="text-align: left;">
+<tr style="text-align: left;">
+<td style="width: 100%;">
+<input type="hidden" name="SetupType" value="install" style="display: none;" />
+<input type="hidden" name="act" value="Part4" style="display: none;" />
+<input type="submit" class="Button" value="Install Board" name="Install_Board" />
+<input type="reset" value="Reset Form" class="Button" name="Reset_Form" />
+</td></tr></table>
+</form>
+</td>
+</tr>
+<?php } ?>
\ No newline at end of file
diff --git a/smileys/README b/smileys/README
new file mode 100644 (file)
index 0000000..246a590
--- /dev/null
@@ -0,0 +1,8 @@
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// Important Note: The Emoticons distributed with the Software were
+// created by Jcink; its usage is not governed under the terms of
+// this license agreement. Information regarding its usage can be
+// found on textfileBB's Web site at http://tfbb.jcink.com/.
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+// Emoticons made by Jcink for TextfileBB (http://tfbb.jcink.com/) Under TFBB License
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\ No newline at end of file
diff --git a/smileys/angry.gif b/smileys/angry.gif
new file mode 100644 (file)
index 0000000..e7ad446
Binary files /dev/null and b/smileys/angry.gif differ
diff --git a/smileys/cool.gif b/smileys/cool.gif
new file mode 100644 (file)
index 0000000..82835ec
Binary files /dev/null and b/smileys/cool.gif differ
diff --git a/smileys/hmm.gif b/smileys/hmm.gif
new file mode 100644 (file)
index 0000000..ac7e36f
Binary files /dev/null and b/smileys/hmm.gif differ
diff --git a/smileys/huh.gif b/smileys/huh.gif
new file mode 100644 (file)
index 0000000..e0b1d3d
Binary files /dev/null and b/smileys/huh.gif differ
diff --git a/smileys/index.php b/smileys/index.php
new file mode 100644 (file)
index 0000000..8ad74ee
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+/*
+    Emoticons made by Jcink for TextfileBB (http://tfbb.jcink.com/) Under TFBB License
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../index.php');
+?>
\ No newline at end of file
diff --git a/smileys/laugh.gif b/smileys/laugh.gif
new file mode 100644 (file)
index 0000000..9ab6b88
Binary files /dev/null and b/smileys/laugh.gif differ
diff --git a/smileys/mad.gif b/smileys/mad.gif
new file mode 100644 (file)
index 0000000..63badf8
Binary files /dev/null and b/smileys/mad.gif differ
diff --git a/smileys/ohmy.gif b/smileys/ohmy.gif
new file mode 100644 (file)
index 0000000..3f52426
Binary files /dev/null and b/smileys/ohmy.gif differ
diff --git a/smileys/sad.gif b/smileys/sad.gif
new file mode 100644 (file)
index 0000000..f75d2a6
Binary files /dev/null and b/smileys/sad.gif differ
diff --git a/smileys/sleep.gif b/smileys/sleep.gif
new file mode 100644 (file)
index 0000000..45c9d11
Binary files /dev/null and b/smileys/sleep.gif differ
diff --git a/smileys/smile.gif b/smileys/smile.gif
new file mode 100644 (file)
index 0000000..ae92ed4
Binary files /dev/null and b/smileys/smile.gif differ
diff --git a/smileys/sweat.gif b/smileys/sweat.gif
new file mode 100644 (file)
index 0000000..b853f5f
Binary files /dev/null and b/smileys/sweat.gif differ
diff --git a/smileys/tongue.gif b/smileys/tongue.gif
new file mode 100644 (file)
index 0000000..4766d78
Binary files /dev/null and b/smileys/tongue.gif differ
diff --git a/smileys/tongue2.gif b/smileys/tongue2.gif
new file mode 100644 (file)
index 0000000..21cf4cf
Binary files /dev/null and b/smileys/tongue2.gif differ
diff --git a/smileys/wub.gif b/smileys/wub.gif
new file mode 100644 (file)
index 0000000..fd80231
Binary files /dev/null and b/smileys/wub.gif differ
diff --git a/smileys/x.gif b/smileys/x.gif
new file mode 100644 (file)
index 0000000..5949069
Binary files /dev/null and b/smileys/x.gif differ
diff --git a/subcategory.php b/subcategory.php
new file mode 100644 (file)
index 0000000..99348bc
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: subcategory.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['category'].$usefileext.$_SERVER['PATH_INFO'];
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'subcategories.php'); }
+require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php
+change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing SubCategory ".$CategoryName,$Settings['use_gzip']);
+?>
diff --git a/subforum.php b/subforum.php
new file mode 100644 (file)
index 0000000..ffdafcd
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: subforum.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['subforum'].$usefileext.$_SERVER['PATH_INFO'];
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($Settings['enable_rss']==true) {
+?>
+<link rel="alternate" type="application/rss+xml" title="SubForum Topics RSS Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=rss&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
+<link rel="alternate" type="application/rss+xml" title="SubForum Topics Atom Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=atom&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
+<?php } ?>
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php');
+$ForumCheck = null;
+if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'subforums.php'); }
+require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing SubForum ".$ForumName,$Settings['use_gzip']); ?>
diff --git a/themes/iDB/css.css b/themes/iDB/css.css
new file mode 100644 (file)
index 0000000..fc268cb
--- /dev/null
@@ -0,0 +1,206 @@
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2006 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2006 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: css.css - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+html {\r
+       font-family: verdana, arial, sans-serif;\r
+       font-size: 11px;\r
+       width: 100%;\r
+       color: #FFFFFF;\r
+       background-color: #000000;\r
+}\r
+body {\r
+       font-family: verdana, arial, sans-serif;\r
+       font-size: 11px;\r
+       margin: 5px 30px 5px 30px; \r
+       color: #FFFFFF;\r
+       background-color: #000000;\r
+}\r
+a:link, a:visited, a:active { \r
+text-decoration: none; \r
+color: #465584; \r
+}\r
+a:hover { \r
+color: #6665A4; \r
+text-decoration: none; \r
+}\r
+.NavBar2 a:link, .NavBar2 a:visited, .NavBar2 a:active, .NavBar2 a:hover { \r
+text-decoration: none; \r
+color: #000000;\r
+font-family: verdana, arial, sans-serif;\r
+font-size: 40px;\r
+}\r
+.copyright { \r
+text-align: center;\r
+font-family: Sans-Serif; \r
+font-size: 12px; \r
+line-height: 11px; \r
+color: #FFFFFF; \r
+}\r
+.copyright a:link, .copyright a:visited, .copyright a:active { \r
+color: #DFDFDF; \r
+text-decoration: none; \r
+}\r
+.copyright a:hover { \r
+color: #FDFDFD; \r
+text-decoration: none; \r
+}\r
+.noborder { \r
+border: 0px;\r
+}\r
+img {\r
+   border: 0px;\r
+   vertical-align: middle;\r
+   display: inline;\r
+}\r
+.NavBar1 { \r
+background-color: #a7b1bd; \r
+font-size: 11px;\r
+font-family: verdana, arial, sans-serif;\r
+color: #000000; \r
+width: 100%;\r
+border: 1px solid #506070;\r
+border-collapse: collapse; \r
+}\r
+.NavBar2 { \r
+background-color: #c7d1dd;\r
+font-size: 11px;\r
+text-align: center;\r
+border: 1px solid #506070;\r
+}\r
+.NavBar3 { \r
+background-color: #d7e1ed;\r
+font-size: 11px;\r
+text-align: left;\r
+border: 1px solid #506070;\r
+}\r
+.Table1 { \r
+background-color: #a7b1bd; \r
+font-size: 11px;\r
+font-family: verdana, arial, sans-serif;  \r
+color: #000000; \r
+width: 100%;\r
+border: 1px solid #506070;\r
+border-collapse: collapse; \r
+}\r
+.Table2 { \r
+background-color: #000000;\r
+font-size: 11px;\r
+font-family: verdana, arial, sans-serif;\r
+color: #000000;\r
+width: 100%;\r
+}\r
+.Table2 a:link, .Table2 a:visited, .Table2 a:active { \r
+text-decoration: none; \r
+color: #7675B4;\r
+}\r
+.Table2 a:hover { \r
+color: #9695C4; \r
+text-decoration: none; \r
+}\r
+.Table3 { \r
+font-size: 11px;\r
+font-family: verdana, arial, sans-serif;  \r
+color: #000000; \r
+width: 100%;\r
+}\r
+.TableRow1 { \r
+background-color: #c7d1dd; \r
+background-image: url(grad.png);\r
+border: 1px solid #506070;\r
+}\r
+.TableRow2 { \r
+background-color: #d7e1ed; \r
+border: 1px solid #506070;\r
+}\r
+.TableRow3 { \r
+background-color: #a7b1bd; \r
+border: 1px solid #506070;\r
+}\r
+.TableRow4 { \r
+background-color: #c7d1dd; \r
+border: 1px solid #506070;\r
+}\r
+.TextBox { \r
+background-color: #c7d1dd; \r
+font-size: 13px; \r
+font-family: Courier, Courier New, Verdana, Arial;   \r
+color: #000000; \r
+border: 1px solid #506070;\r
+border-collapse: collapse; \r
+}\r
+.HiddenTextBox {\r
+display: none;\r
+}\r
+.QuoteTop { \r
+font-family: Verdana, Tahoma, Arial, sans-serif;\r
+font-size: 10px; \r
+color: #A0A0A0; \r
+}\r
+.QuoteBottom { \r
+font-family: Courier, Courier New, Verdana, Arial, serif; \r
+font-size: 12px; \r
+color: #C0C0C0; \r
+background-color: #000000; \r
+border: 1px solid #000; \r
+border-color: #808080;\r
+padding-top: 2px; \r
+padding-right: 2px; \r
+padding-bottom: 2px; \r
+padding-left: 2px \r
+}\r
+.CodeTop  { \r
+font-family: Verdana, Tahoma, Arial, sans-serif; \r
+font-size: 10px; \r
+color: #A0A0A0; \r
+}\r
+.CodeBottom { \r
+font-family: Courier, Courier New, Verdana, Arial;  \r
+font-size: 12px; \r
+color: #C0C0C0; \r
+background-color: #000000; \r
+border: 1px solid #000; \r
+border-color: #808080;\r
+padding-top: 2px; \r
+padding-right: 2px; \r
+padding-bottom: 2px; \r
+padding-left: 2px \r
+}\r
+.CodeBox { \r
+width:500px; \r
+height:100px; \r
+white-space:pre; \r
+overflow:auto; \r
+border:3px outset #000000; \r
+font-family: Courier, Courier New, Verdana, Arial, serif; \r
+font-size: 15px; \r
+}\r
+.Button { \r
+background-color: #c7d1dd; \r
+font-size: 13px; \r
+font-family: Courier, Courier New, Verdana, Arial;   \r
+color: #000000; \r
+border: 1px solid #506070;\r
+border-collapse: collapse; \r
+}\r
+.TextBoxLabel, label {\r
+color: #000000;\r
+font-weight: bold; \r
+cursor: pointer;\r
+font-size: 10px;\r
+}\r
+.TableMessage {\r
+color: #000000;\r
+font-weight: bold; \r
+font-size: 10px;\r
+}
\ No newline at end of file
diff --git a/themes/iDB/favicon.ico b/themes/iDB/favicon.ico
new file mode 100644 (file)
index 0000000..985c946
Binary files /dev/null and b/themes/iDB/favicon.ico differ
diff --git a/themes/iDB/grad.png b/themes/iDB/grad.png
new file mode 100644 (file)
index 0000000..8a8915a
Binary files /dev/null and b/themes/iDB/grad.png differ
diff --git a/themes/iDB/index.php b/themes/iDB/index.php
new file mode 100644 (file)
index 0000000..1289b78
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2006 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2006 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../../index.php');
+?>
\ No newline at end of file
diff --git a/themes/iDB/info.php b/themes/iDB/info.php
new file mode 100644 (file)
index 0000000..32a3e20
--- /dev/null
@@ -0,0 +1,24 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2006 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2006 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: info.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$ThemeInfo = array();\r
+$ThemeInfo['ThemeName'] = "iDB Theme";\r
+$ThemeInfo['ThemeMaker'] = "Cool Dude 2k";\r
+$ThemeInfo['ThemeVersion'] = "0.1.5";\r
+$ThemeInfo['ThemeVersionType'] = "Pre-Alpha";\r
+$ThemeInfo['ThemeSubVersion'] = "SVN 54";\r
+$ThemeInfo['MakerURL'] = "http://upload.idb.s1.jcink.com/";\r
+$ThemeInfo['CopyRight'] = $ThemeInfo['ThemeName']." was made by <a href=\"".$ThemeInfo['MakerURL']."\" title=\"".$ThemeInfo['ThemeMaker']."\">".$ThemeInfo['ThemeMaker']."</a>";\r
+?>
\ No newline at end of file
diff --git a/themes/iDB/noavatar.png b/themes/iDB/noavatar.png
new file mode 100644 (file)
index 0000000..4edae0e
Binary files /dev/null and b/themes/iDB/noavatar.png differ
diff --git a/themes/iDB/settings.php b/themes/iDB/settings.php
new file mode 100644 (file)
index 0000000..9b7553c
--- /dev/null
@@ -0,0 +1,64 @@
+<?php\r
+/*\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the Revised BSD License.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    Revised BSD License for more details.\r
+\r
+    Copyright 2004-2006 Cool Dude 2k - http://intdb.sourceforge.net/\r
+    Copyright 2004-2006 Game Maker 2k - http://upload.idb.s1.jcink.com/\r
+\r
+    $FileInfo: settings.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $\r
+*/\r
+$ThemeSet = array();\r
+$ThemeSet['ThemeName'] = "iDB Theme";\r
+$ThemeSet['ThemeMaker'] = "Cool Dude 2k";\r
+$ThemeSet['ThemeVersion'] = "0.1.5";\r
+$ThemeSet['ThemeVersionType'] = "Pre-Alpha";\r
+$ThemeSet['ThemeSubVersion'] = "SVN 54";\r
+$ThemeSet['MakerURL'] = "http://upload.idb.s1.jcink.com/";\r
+$ThemeSet['CopyRight'] = $ThemeSet['ThemeName']." was made by <a href=\"".$ThemeSet['MakerURL']."\" title=\"".$ThemeSet['ThemeMaker']."\">".$ThemeSet['ThemeMaker']."</a>";\r
+$ThemeSet['CSS'] = "themes/iDB/css.css";\r
+$ThemeSet['CSSType'] = "include";\r
+$ThemeSet['FavIcon'] = "themes/iDB/favicon.ico";\r
+$ThemeSet['PreLogo'] = "<div style=\"text-align: center;\">";\r
+$ThemeSet['Logo'] = $Settings['board_name'];\r
+$ThemeSet['LogoStyle'] = "font-size: 40px; font-family: verdana, arial, sans-serif; color: black;";\r
+$ThemeSet['SubLogo'] = "</div>";\r
+$ThemeSet['EnableToggle'] = false;\r
+$ThemeSet['Toggle'] = "[&#35;]";\r
+$ThemeSet['ToggleExt'] = null;\r
+$ThemeSet['TopicIcon'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"Topic!\">&nbsp;(T)&nbsp;</div>";\r
+$ThemeSet['HotTopic'] = "<div style=\"text-align: center; font-size: 11px; font-weight: bold;\" title=\"Hot Topic!\">&nbsp;(T)&nbsp;</div>";\r
+$ThemeSet['PinTopic'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"Pinned Topic!\">&nbsp;{P}&nbsp;</div>";\r
+$ThemeSet['HotPinTopic'] = "<div style=\"text-align: center; font-size: 11px; font-weight: bold;\" title=\"Hot Pinned Topic!\">&nbsp;{P}&nbsp;</div>";\r
+$ThemeSet['ClosedTopic'] = "<div style=\"text-align: center; font-size: 11px; text-decoration: line-through;\" title=\"Closed Topic!\">&nbsp;[T]&nbsp;</div>";\r
+$ThemeSet['HotClosedTopic'] = "<div style=\"text-align: center; font-size: 11px; text-decoration: line-through; font-weight: bold;\" title=\"Hot Closed Topic!\">&nbsp;[T]&nbsp;</div>";\r
+$ThemeSet['PinClosedTopic'] = "<div style=\"text-align: center; font-size: 11px; text-decoration: line-through;\" title=\"Closed Pinned Topic!\">&nbsp;[P]&nbsp;</div>";\r
+$ThemeSet['HotPinClosedTopic'] = "<div style=\"text-align: center; font-size: 11px; text-decoration: line-through; font-weight: bold;\" title=\"Hot Closed Pinned Topic!\">&nbsp;[P]&nbsp;</div>";\r
+$ThemeSet['MessageRead'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"Message!\">&nbsp;[M]&nbsp;</div>";\r
+$ThemeSet['MessageUnread'] = "<div style=\"text-align: center; font-size: 11px; font-weight: bold;\" title=\"New Message!\">&nbsp;(M)&nbsp;</div>";\r
+$ThemeSet['Profile'] = "Profile";\r
+$ThemeSet['WWW'] = "WWW";\r
+$ThemeSet['PM'] = "PM";\r
+$ThemeSet['TopicLayout'] = "Type 1";\r
+$ThemeSet['AddReply'] = "<span style=\"color: white; font-size: 25px;\" title=\"Add Reply\">Add Reply</span>";\r
+$ThemeSet['FastReply'] = "<span style=\"color: white; font-size: 25px;\" title=\"Fast Reply\">Fast Reply</span>";\r
+$ThemeSet['NewTopic'] = "<span style=\"color: white; font-size: 25px;\" title=\"New Topic\">New Topic</span>";\r
+$ThemeSet['QuoteReply'] = "Quote Reply";\r
+$ThemeSet['Report'] = "Report";\r
+$ThemeSet['LineDivider'] = "&nbsp;|&nbsp;";\r
+$ThemeSet['ButtonDivider'] = "&nbsp;&nbsp;&nbsp;";\r
+$ThemeSet['LineDividerTopic'] = "&nbsp;|&nbsp;";\r
+$ThemeSet['TitleDivider'] = "-&gt;";\r
+$ThemeSet['ForumIcon'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"Forum\">&nbsp;(F)&nbsp;</div>";\r
+$ThemeSet['SubForumIcon'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"SubForum\">&nbsp;{SF}&nbsp;</div>";\r
+$ThemeSet['RedirectIcon'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"Redirect Forum\">&nbsp;[RF]&nbsp;</div>";\r
+$ThemeSet['TitleIcon'] = null;\r
+$ThemeSet['StatsIcon'] = "<div style=\"text-align: center; font-size: 11px;\" title=\"Board Stats\"><br />(S)<br /></div>";\r
+$ThemeSet['NoAvatar'] = "themes/iDB/noavatar.png";\r
+$ThemeSet['NoAvatarSize'] = "100x100";\r
+?>
\ No newline at end of file
diff --git a/themes/index.php b/themes/index.php
new file mode 100644 (file)
index 0000000..bb3df93
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2006 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2006 Game Maker 2k - http://cooldude2k.co.funpic.org/
+
+    $FileInfo: index.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+header('Location: ../index.php');
+?>
\ No newline at end of file
diff --git a/topic.php b/topic.php
new file mode 100644 (file)
index 0000000..877d3da
--- /dev/null
+++ b/topic.php
@@ -0,0 +1,37 @@
+<?php
+/*
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Revised BSD License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    Revised BSD License for more details.
+
+    Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
+    Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
+
+    $FileInfo: topic.php - Last Update: 05/09/2007 SVN 1 - Author: cooldude2k $
+*/
+require('preindex.php');
+$usefileext = $Settings['file_ext'];
+if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
+$filewpath = $exfile['topic'].$usefileext.$_SERVER['PATH_INFO'];
+?>
+
+<title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
+</head>
+<body>
+<?php require($SettDir['inc'].'navbar.php'); 
+if($_GET['act']==null)
+{ $_GET['act']="view"; }
+if(!is_numeric($_GET['id']))
+{ $_GET['id']="1"; }
+if($_GET['act']=="view")
+{ require($SettDir['inc'].'replys.php'); }
+require($SettDir['inc'].'endpage.php');
+?>
+
+</body>
+</html>
+<?php change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Viewing Topic ".$TopicName,$Settings['use_gzip']); ?>