Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
- $FileInfo: categories.php - Last Update: 06/18/2007 SVN 26 - Author: cooldude2k $
+ $FileInfo: categories.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="categories.php"||$File3Name=="/categories.php") {
$LastTopic = "User: <span title=\"".$oldusername."\">".$UsersName."</span><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>"; } }
@mysql_free_result($gltresult);
$ForumType = strtolower($ForumType);
-if ($ForumType=="forum") {
- $PreForum=$ThemeSet['ForumIcon']; }
-if ($ForumType=="subforum") {
- $PreForum=$ThemeSet['SubForumIcon']; }
-if ($ForumType=="subforum") {
- $PreForum=$ThemeSet['SubForumIcon']; }
-if ($ForumType=="redirect") {
- $PreForum=$ThemeSet['RedirectIcon']; }
+if ($ForumType=="forum") { $PreForum=$ThemeSet['ForumIcon']; }
+if ($ForumType=="subforum") { $PreForum=$ThemeSet['SubForumIcon']; }
+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">
Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
- $FileInfo: filename.php - Last Update: 07/07/2007 SVN 38 - Author: cooldude2k $
+ $FileInfo: filename.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="filename.php"||$File3Name=="/filename.php") {
here we make a fake version that always sends false out. :P */
if(!function_exists('get_magic_quotes_gpc')) {
function get_magic_quotes_gpc() { return false; } }
-//Version info stuff. :P
+// Version info stuff. :P
function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
$return_var = $proname." ".$reltype." ".$subver.".".$ver.".".$supver;
if($showsvn==false) { $showsvn = null; }
if($showsvn==true) { $return_var .= " SVN ".$svnver; }
if($showsvn!=true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
return $return_var; }
+// Version number and date stuff. :P
$VER1[0] = 0; $VER1[1] = 1; $VER1[2] = 5; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 38; $RName = "iDB"; $SFName = "IntDB";
-$SVNDay[0] = 07; $SVNDay[1] = 07; $SVNDay[2] = 2007; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 39; $RName = "iDB"; $SFName = "IntDB";
+$SVNDay[0] = 07; $SVNDay[1] = 10; $SVNDay[2] = 2007; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
$VerInfo['iDB_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,false);
$VerInfo['iDB_Ver_SVN'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[1],$SubVerN,true);
$VerInfo['iDB_Full_Ver'] = version_info($RName,$VER1[0],$VER1[1],$VER1[2],$VER2[0],$SubVerN,false);
$VerInfo['iDB_Ver_Show'] = $VerInfo['iDB_Ver_SVN']; $VerInfo['iDB_Full_Ver_Show'] = $VerInfo['iDB_Full_Ver_SVN'];
if(isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = $Settings['showverinfo']; }
if(!isset($Settings['showverinfo'])) { $idbmisc['showverinfo'] = false; }
+// URLs and names and stuff. :P
$CD2k = "Cool Dude 2k"; $GM2k = "Game Maker 2k";
$iDB = "Internet Discussion Boards"; $iTB = "Internet Tag Boards"; $DF2k = "Discussion Forums 2k"; $TB2k = "Tag Boards 2k";
$iDBURL1 = "<a href=\"http://intdb.sourceforge.net/\" onclick=\"window.open(this.href);return false;\">"; $iDBURL2 = $iDBURL1.$iDB."</a>";
$DF2kURL1 = "<a href=\"http://df2k.berlios.de/\" onclick=\"window.open(this.href);return false;\">"; $DF2kURL2 = $DF2kURL1.$DF2k."</a>";
$GM2kURL = "<a href=\"http://upload.idb.s1.jcink.com/\" title=\"".$GM2k."\" onclick=\"window.open(this.href);return false;\">".$GM2k."</a>";
$iDBURL3 = "<a href=\"http://idb.berlios.de/\" title=\"".$iDB."\" onclick=\"window.open(this.href);return false;\">".$iDB."</a>";
-$PHPQA = "PHP-Quick-Arcade"; $PHPV1 = @phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = PHP_OS;
+$PHPQA = "PHP-Quick-Arcade"; $PHPV1 = @phpversion(); $PHPV2 = "PHP ".$PHPV1; $OSType = PHP_OS; // Check OS Name
if($OSType=="WINNT") { $OSType="Windows NT"; } if($OSType=="WIN32") { $OSType="Windows 9x"; }
$OSType2 = $PHPV2." / ".$OSType; $ZENDV1 = @zend_version(); $ZENDV2 = "Zend engine ".$ZENDV1;
+// Show or hide the version number
if($idbmisc['showverinfo']==true) {
@header("X-iDB-Powered-By: ".$VerInfo['iDB_Ver_Show']);
@header("Generator: ".$VerInfo['iDB_Ver_Show']); }
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: 06/18/2007 SVN 26 - Author: cooldude2k $
+ $FileInfo: forums.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="forums.php"||$File3Name=="/forums.php") {
if($LastTopic==null) { $LastTopic=" <br /> "; }
$ForumType = strtolower($ForumType);
$PreForum = $ThemeSet['ForumIcon'];
-if ($ForumType=="forum") {
- $PreForum=$ThemeSet['ForumIcon']; }
-if ($ForumType=="subforum") {
- $PreForum=$ThemeSet['SubForumIcon']; }
-if ($ForumType=="redirect") {
- $PreForum=$ThemeSet['RedirectIcon']; }
+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">
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: 06/15/2007 SVN 24 - Author: cooldude2k $
+ $FileInfo: function.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="function.php"||$File3Name=="/function.php") {
if(dirname($_SERVER['REQUEST_URI'])!="."||
dirname($_SERVER['REQUEST_URI'])!=null) {
$basedir = dirname($_SERVER['REQUEST_URI'])."/"; }*/
+// Get the base dir name
if(dirname($_SERVER['SCRIPT_NAME'])!="."||
dirname($_SERVER['SCRIPT_NAME'])!=null) {
$basedir = dirname($_SERVER['SCRIPT_NAME'])."/"; }
$URL['REFERER'] = $REFERERurl['host'];
$URL['HOST'] = $_SERVER["SERVER_NAME"];
$REFERERurl = null; unset($REFERERurl);
+// Make the Query String if we are not useing &=
function qstring($qstr=";",$qsep="=")
{ $_GET = null; $_GET = array();
if (!isset($_SERVER['QUERY_STRING'])) {
$myphpath = $_SERVER["PHP_SELF"];
$mypathinfo = str_replace($myscript, "", $myphpath);
@putenv("PATH_INFO=".$mypathinfo); } }
+// Change Path info to Get Vars :
function mrstring() {
$urlvar = explode('/',$_SERVER['PATH_INFO']);
$num=count($urlvar); $i=1;
$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)
-{
+// Redirect to another file with ether timed or nontimed redirect
+function redirect($type,$file,$time=0,$url=null,$dbsr=true) {
if($type!="location"&&
$type!="refresh") {
$type=="location"; }
@session_write_close();
header("Location: ".$file); }
return true; }
+// Make a url
function url_maker($file="index",$ext=".php",$qvarstr=null,$qstr=";",$qsep="=",$prexqstr=null,$exqstr=null,$fixhtml=true) {
$fileurl = null; if(!isset($ext)) { $ext = null; }
if($ext==null) { $ext = ".php"; }
++$sandi; } }
return $fileurl; }
$thisdir = dirname(realpath("Preindex.php"))."/";
+// Get the Query String
function GetQueryStr($qstr=";",$qsep="=",$fixhtml=true)
{ $pregqstr = preg_quote($qstr,"/");
$pregqsep = preg_quote($qsep,"/");
GZip and Zlib by Jean-loup Gailly (compression) and Mark Adler (decompression) http://www.zlib.net/
BZip2 and libbzip2 by Julian Seward http://www.bzip.org/
- $FileInfo: compression.php - Last Update: 06/04/2007 SVN 18 - Author: cooldude2k $
+ $FileInfo: compression.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="compression.php"||$File3Name=="/compression.php") {
require('index.php');
exit(); }
-
+//Check if zlib is loaded
if(@extension_loaded("zlib")) {
function gunzip($infile, $outfile) {
+ $string = null;
$zp = gzopen($infile, "r");
while(!gzeof($zp))
$string .= gzread($zp, 4096);
fwrite($fp, $string, strlen($string));
fclose($fp);
}
-function gzip($infile, $outfile, $param = 5)
-{
+function gzip($infile, $outfile, $param = 5) {
$fp = fopen($infile, "r");
$data = fread ($fp, filesize($infile));
fclose($fp);
gzwrite($zp, $data);
gzclose($zp);
} }
-
+//Check if bz2 is loaded
if(@extension_loaded("bz2")) {
-function bzip($infile, $outfile)
-{
+function bzip($infile, $outfile) {
$fp = fopen($infile, "r");
$data = fread($fp, filesize($infile));
fclose($fp);
}
function bunzip($infile, $outfile) {
+ $string = null;
$zp = bzopen($infile, "r");
while(!feof($zp))
$string .= bzread($zp, 4096);
fwrite($fp, $string, strlen($string));
fclose($fp);
} }
-
+//Check if zip is loaded
if(@extension_loaded("zip")) {
/* Nothing for now... :P */ }
-
+//Check if rar is loaded
if(@extension_loaded("rar")) {
/* Nothing for now... :P */ }
Copyright 2004-2007 Cool Dude 2k - http://intdb.sourceforge.net/
Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
- $FileInfo: functions.php - Last Update: 07/02/2007 SVN 36 - Author: cooldude2k $
+ $FileInfo: functions.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="functions.php"||$File3Name=="/functions.php") {
require('index.php');
exit(); }
+// Check the file names
function CheckFile($FileName) {
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name==$FileName||$File3Name=="/".$FileName) {
if ($_GET['act']=="DeleteSession") { @session_destroy(); }
if ($_GET['act']=="ResetSession") { @session_unset(); }
if ($_GET['act']=="NewSessionID") { @session_regenerate_id(); }
+/*
if ($_GET['act']=="PHPInfo") { @phpinfo(); exit(); }
if ($_GET['act']=="phpinfo") { @phpinfo(); exit(); }
if ($_GET['act']=="PHPCredits") { @phpcredits(); exit(); }
-if ($_GET['act']=="phpcredits") { @phpcredits(); exit(); }
+if ($_GET['act']=="phpcredits") { @phpcredits(); exit(); }
+*/// Connect to mysql database
function ConnectMysql($sqlhost,$sqluser,$sqlpass,$sqldb) {
$StatSQL = @mysql_connect($sqlhost,$sqluser,$sqlpass);
$StatBase = @mysql_select_db($sqldb);
return true; }
$Names['RS'] = "Renee Sabonis";
define("_renee_", $Names['RS']);
+// Change the title and gzip page
function change_title($new_title,$use_gzip="off",$gzip_type="gzip") {
global $Settings;
if($gzip_type!="gzip") { if($gzip_type!="deflate") { $gzip_type = "gzip"; } }
if($gzip_type=="deflate") {
$goutput = gzcompress($output); }
echo $goutput; } }
+// Fix amp => (&) to & and gzip page
function fix_amp($use_gzip="off",$gzip_type="gzip") {
global $Settings;
if($gzip_type!="gzip") { if($gzip_type!="deflate") { $gzip_type = "gzip"; } }
$output = @ob_get_clean();
$Names['RJ'] = "René Johnson";
define("_rene_", $Names['RJ']);
+// GZip page for faster download
function gzip_page($use_gzip="off",$gzip_type="gzip") {
global $Settings;
if($gzip_type!="gzip") { if($gzip_type!="deflate") { $gzip_type = "gzip"; } }
echo $goutput; } }
$foo="bar"; $$foo="foo";
// SafeSQL Lite Source Code by Cool Dude 2k
+// Make SQL Query's safe
function query($query_string,$query_vars) {
$query_array = array(array("%i","%I","%F","%S"),array("%d","%d","%f","%s"));
$query_string = str_replace($query_array[0], $query_array[1], $query_string);
++$query_i; }
$query_val[0] = $query_string;
return call_user_func_array("sprintf",$query_val); }
+// Kill bad vars for some functions
function killbadvars($varname) {
$badphp1 = array('$'); $badphp2 = array(null);
$varname = str_replace($badphp1, $badphp2, $varname);
$varname = preg_replace("/(HTTP_COOKIE_VARS|HTTP_SESSION_VARS)/i", null, $varname);
$varname = preg_replace("/(HTTP_GET_VARS|HTTP_POST_VARS|HTTP_POST_FILES)/i", null, $varname);
return $varname; }
+// Change the text to icons(smileys)
function text2icons($Text,$sqlt) {
global $Settings;
$reneequery="SELECT * FROM ".$sqlt."smileys";
$Smile1 = preg_quote($SmileText,"/");
$Text = preg_replace("/".$Smile1."/i",$Smile2,$Text); }
++$renees; } return $Text; }
+// Remove the bad stuff
function remove_spaces($Text) {
$Text = preg_replace("/(^\t+|\t+$)/","",$Text);
$Text = preg_replace("/(^\n+|\n+$)/","",$Text);
$Text = preg_replace("/\s\s+/"," ",$Text);
$Text = preg_replace("/(^\s+|\s+$)/","",$Text);
return $Text; }
+// Fix some chars
function fixbamps($text) {
$fixamps1 = array("&copy;","&reg;","&trade;","&quot;","&amp;","&lt;","&gt;","&(a|e|i|o|u|y)acute;","&(a|e|i|o|u)grave;","&(a|e|i|o|u)circ;","&(a|e|i|o|u|y)uml;","&(a|o|n)tilde;","&aring;","&aelig;","&ccedil;","&eth;","&oslash;","&szlig;","&thorn;");
$fixamps2 = array("©","®","™",""","&","<",">","&\\1acute;","&\\1grave;","&\\1circ;","&\\1uml;","&\\1tilde;","å","æ","ç","ð","ø","ß","þ");
++$ampi; }
$text = preg_replace("/&#(x[a-f0-9]+|[0-9]+);/i", "&#$1;", $text);
return $text; }
+// Get next id for stuff
function getnextid($tablepre,$table) {
$getnextidq = query("SHOW TABLE STATUS LIKE '".$tablepre.$table."'", array());
$getnextidr = mysql_query($getnextidq);
@mysql_free_result($getnextidr); }
$Names['RSA'] = "Rachel Sabonis";
define("_rachel_", $Names['RSA']);
+// Redirect to another file with ether timed or nontimed redirect
function redirects($type,$url,$time=0) {
if($type!="location"&&
$type!="refresh") {
if($type=="location") {
header("Location: ".$url); }
return true; }
+// Start a xml document
function xml_tag_make($type,$attbs,$retval=false) {
$renee1 = explode("&",$attbs);
$reneenum=count($renee1);
echo '<?'.$type.$attblist.'?>'."\n"; }
if($retval==true) {
return '<?'.$type.$attblist.'?>'."\n"; } }
+// Start a xml document (old version)
function xml_doc_start($ver,$encode,$retval=false) {
if($retval==false) {
echo xml_tag_make('xml','version='.$ver.'&encoding='.$encode,true); }
if($retval==true) {
return xml_tag_make('xml','version='.$ver.'&encoding='.$encode,true); } }
+// Change Time Stamp to a readable time
function GMTimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {
$TCHour = date("H",$timestamp);
$TCMinute = date("i",$timestamp);
return date($format,mktime($TCHour,$TCMinute,$TCSecond,$TCMonth,$TCDay,$TCYear)); }
$Names['CK'] = "Christine";
define("_christine_", $Names['CK']);
+// Change Time Stamp to a readable time
function TimeChange($format,$timestamp,$offset,$minoffset=null,$dst=null) {
return GMTimeChange($format,$timestamp,$offset,$minoffset,$dst); }
+// Make a GMT Time Stamp
function GMTimeStamp() {
$GMTHour = gmdate("H");
$GMTMinute = gmdate("i");
if($dst=="on") { if($dstake!="done") {
$dstake = "done"; $tsa['hour'] = $tsa['hour']+1; } }
return date($format,mktime(gmdate('h')+$tsa['hour'],gmdate('i')+$tsa['minute'],gmdate('s'),gmdate('n'),gmdate('j'),gmdate('Y'))); }
+// Get Server offset
function GetSeverZone() {
$TestHour1 = date("H");
@putenv("OTZ=".@getenv("TZ"));
$UsersName=mysql_result($gunresult,$gunnum-1,"Name"); }
@mysql_free_result($gunresult);
return $UsersName; }
+// hmac hash function
function hmac($data,$key,$hash='sha1',$blocksize=64) {
if (strlen($key)>$blocksize) {
$key=pack('H*',$hash($key)); }
$ipad=str_repeat(chr(0x36),$blocksize);
$opad=str_repeat(chr(0x5c),$blocksize);
return $hash(($key^$opad).pack('H*',$hash(($key^$ipad).$data))); }
+// b64hmac hash function
function b64e_hmac($data,$key,$extdata,$hash='sha1',$blocksize=64) {
$extdata2 = hexdec($extdata); $key = $key.$extdata2;
return base64_encode(hmac($data,$key,$hash,$blocksize).$extdata); }
+// salt hmac hash function
function salt_hmac($size1=4,$size2=6) {
$hprand = rand(4,6); $i = 0; $hpass = "";
while ($i < $hprand) {
function is_empty($var) {
if (((is_null($var) || rtrim($var) == "") &&
$var !== false) || (is_array($var) && empty($var))) {
- return true; } else {
- return false; } }
+ return true; } else { return false; } }
+// Hash two times with md5 and sha1
function PassHash2x($Text) {
$Text = md5($Text);
$Text = sha1($Text);
return $Text; }
+// Hash two times with hmac-md5 and hmac-sha1
function PassHash2x2($data,$key,$extdata,$blocksize=64) {
$extdata2 = hexdec($extdata); $key = $key.$extdata2;
$Text = hmac($data,$key,"md5").$extdata;
$subject = preg_replace("/".$search."/i", $replace, $subject); }
return $subject; } }
$foobar="fubar"; $$foobar="foobar";
+// Debug info
function dump_included_files() { return var_dump(get_included_files()); }
function count_included_files() { return count(get_included_files()); }
function dump_extensions() { return var_dump(get_loaded_extensions()); }
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: 07/07/2007 SVN 38 - Author: cooldude2k $
+ $FileInfo: xhtml10.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="xhtml10.php"||$File3Name=="/xhtml10.php") {
require('index.php');
exit(); }
+// Check to see if we serv the file as html or xhtml
+// if we do xhtml we also check to see if user's browser
+// can dispay if or else fallback to html
if($Settings['output_type']=="html") {
$ccstart = "//<!--"; $ccend = "//-->";
@header("Content-Type: text/html; charset=".$Settings['charset']); }
$endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1."iDB</a> © ".$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");
+// Check if we are on a secure HTTP connection
if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+// Get the board's url
if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
$BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
$BoardURL = $Settings['idburl']; }
+// Get the html level
if($Settings['html_level']!="Strict") {
if($Settings['html_level']!="Transitional") {
$Settings['html_level'] = "Transitional"; } }
-?>
-<?php if($Settings['html_level']=="Strict") { ?>
+// HTML Document Starts
+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") { ?>
<?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 } ?>
+<?php } // HTML meta tags and other html, head tags ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
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: 07/07/2007 SVN 38 - Author: cooldude2k $
+ $FileInfo: xhtml11.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="xhtml11.php"||$File3Name=="/xhtml11.php") {
require('index.php');
exit(); }
+// Check to see if we serv the file as html or xhtml
+// if we do xhtml we also check to see if user's browser
+// can dispay if or else fallback to html
if($Settings['output_type']!="xhtml") {
$Settings['output_type'] = "xhtml"; }
if($Settings['output_type']=="html") {
$endpagevar = "<div class=\"copyright\">Powered by ".$iDBURL1."iDB</a> © ".$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");
+// Check if we are on a secure HTTP connection
if($_SERVER['HTTPS']=="on") { $prehost = "https://"; }
if($_SERVER['HTTPS']!="on") { $prehost = "http://"; }
+// Get the board's url
if($Settings['idburl']=="localhost"||$Settings['idburl']==null) {
$BoardURL = $prehost.$_SERVER["HTTP_HOST"].$basedir; }
if($Settings['idburl']!="localhost"&&$Settings['idburl']!=null) {
$BoardURL = $Settings['idburl']; }
-?>
+ // HTML Document Starts, HTML meta tags and other html, head tags ?>
<!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">
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: 06/27/2007 SVN 29 - Author: cooldude2k $
+ $FileInfo: mysql.php - Last Update: 07/10/2007 SVN 39 - Author: cooldude2k $
*/
@error_reporting(E_ALL ^ E_NOTICE);
@ini_set('session.use_trans_sid', false);
if($Settings['fixpathinfo']==true) {
$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
@putenv("PATH_INFO=".$_SERVER['ORIG_PATH_INFO']); }
+// Check to see if varubles are set
if(!isset($SettDir['inc'])) { $SettDir['inc'] = "inc/"; }
if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
if(!isset($SettDir['admin'])) { $SettDir['admin'] = "inc/admin/"; }
if(!isset($_GET['act'])) { $_GET['act'] = null; }
if(!isset($_POST['act'])) { $_POST['act'] = null; }
if(!isset($_GET['id'])) { $_GET['id'] = null; }
-$_TEG = array(null);
-$_TEG['part'] = preg_replace("/Part(1|2|3|4)/","\\1",$_GET['act']);
-$_GET['act'] = strtolower($_GET['act']);
-if(isset($_TEG['part'])) {
-if($_TEG['part']<=4&&$_TEG['part']>=1) {
-$_GET['act'] = "Part".$_TEG['part']; } }
require_once($SettDir['inc'].'filename.php');
require_once($SettDir['inc'].'function.php');
if($Settings['enable_pathinfo']==true) {
mrstring(); /* Change Path info to Get Vars :P */ }
+// Check to see if varubles are set
require_once($SettDir['misc'].'setcheck.php');
@ini_set("default_charset",$Settings['charset']);
$File1Name = dirname($_SERVER['SCRIPT_NAME'])."/";
require($SettDir['inc'].'forbidden.php');
exit(); }
//error_reporting(E_ERROR);
+// Check if gzip is on and if user's browser can accept gzip pages
if($Settings['use_gzip']=="on") {
if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'], "gzip")) {
$GZipEncode['Type'] = "gzip"; } else {
@header("Content-Encoding: deflate"); } }
/* if(eregi("msie",$browser) && !eregi("opera",$browser)){
@header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); } */
+// Some http stuff
@session_set_cookie_params(0, $basedir);
@session_cache_limiter("private, must-revalidate");
@header("Cache-Control: private, must-revalidate"); // IE 6 Fix
@session_name($Settings['sqltable']."sess");
@session_start(); }
@output_reset_rewrite_vars();
-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']);
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: 06/07/2007 SVN 20 - Author: cooldude2k $
+ $FileInfo: rss.php - Last Update: 07/10/2007 SVN 39 - 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/"; }
+// Check to see if varubles are set
+if(!isset($SettDir['inc'])) { $SettDir['inc'] = "inc/"; }
+if(!isset($SettDir['misc'])) { $SettDir['misc'] = "inc/misc/"; }
+if(!isset($SettDir['admin'])) { $SettDir['admin'] = "inc/admin/"; }
+if(!isset($SettDir['mod'])) { $SettDir['mod'] = "inc/mod/"; }
+if(!isset($SettDir['themes'])) { $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['act']==null) { $_GET['act'] = "rss"; }