Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/
Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
- $FileInfo: functions.php - Last Update: 12/10/2008 SVN 209 - Author: cooldude2k $
+ $FileInfo: functions.php - Last Update: 5/08/2009 SVN 251 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="functions.php"||$File3Name=="/functions.php") {
$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; }
+// Trying to fix this bug. ^_^
+// http://xforce.iss.net/xforce/xfdb/49697
+if(!isset($Settings['DefaultTheme'])) {
+ $Settings['DefaultTheme'] = "iDB"; }
+$BoardTheme = $Settings['DefaultTheme'];
+function chack_themes($theme) {
+global $BoardTheme;
+if(!isset($theme)) { $theme = null; }
+require('settings.php');
+$ckskindir = dirname(realpath("settings.php"))."/".$SettDir['themes'];
+if ($handle = opendir($ckskindir)) { $dirnum = null;
+ while (false !== ($ckfile = readdir($handle))) {
+ if ($dirnum==null) { $dirnum = 0; }
+ if (file_exists($ckskindir.$ckfile."/info.php")) {
+ if ($ckfile != "." && $ckfile != "..") {
+ include($ckskindir.$ckfile."/info.php");
+ $cktheme[$dirnum] = $ckfile;
+ ++$dirnum; } } }
+ closedir($handle); asort($cktheme); }
+$theme=preg_replace("/(.*?)\.\/(.*?)/", $BoardTheme, $theme);
+if(!in_array($theme,$cktheme)||strlen($theme)>26) {
+ $theme = $BoardTheme; } return $theme; }
// Change the text to icons(smileys)
function text2icons($Text,$sqlt) {
global $Settings;
Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
- $FileInfo: profilemain.php - Last Update: 2/22/2008 SVN 232 - Author: cooldude2k $
+ $FileInfo: profilemain.php - Last Update: 5/08/2009 SVN 251 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="profilemain.php"||$File3Name=="/profilemain.php") {
if(!is_numeric($_POST['RepliesPerPage'])) { $_POST['RepliesPerPage'] = "10"; }
if(!is_numeric($_POST['TopicsPerPage'])) { $_POST['TopicsPerPage'] = "10"; }
if(!is_numeric($_POST['MessagesPerPage'])) { $_POST['MessagesPerPage'] = "10"; }
- $querynewskin = query("UPDATE `".$Settings['sqltable']."members` SET `UseTheme`='%s',`TimeZone`='%s',`DST`='%s',`LastActive`=%i,RepliesPerPage=%i,TopicsPerPage=%i,MessagesPerPage=%i,`IP`='%s' WHERE `id`=%i", array($_POST['skin'],$_POST['YourOffSet'],$_POST['DST'],$NewDay,$_POST['RepliesPerPage'],$_POST['TopicsPerPage'],$_POST['MessagesPerPage'],$NewIP,$_SESSION['UserID']));
+ $querynewskin = query("UPDATE `".$Settings['sqltable']."members` SET `UseTheme`='%s',`TimeZone`='%s',`DST`='%s',`LastActive`=%i,RepliesPerPage=%i,TopicsPerPage=%i,MessagesPerPage=%i,`IP`='%s' WHERE `id`=%i", array(chack_themes($_POST['skin']),$_POST['YourOffSet'],$_POST['DST'],$NewDay,$_POST['RepliesPerPage'],$_POST['TopicsPerPage'],$_POST['MessagesPerPage'],$NewIP,$_SESSION['UserID']));
mysql_query($querynewskin); } } }
if($_GET['act']=="profile") {
if($_POST['update']!="now") {
Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
- $FileInfo: versioninfo.php - Last Update: 5/06/2009 SVN 250 - Author: cooldude2k $
+ $FileInfo: versioninfo.php - Last Update: 5/08/2009 SVN 251 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
return $return_var; }
// Version number and date stuff. :P
$VER1[0] = 0; $VER1[1] = 2; $VER1[2] = 7; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 250; $RName = "iDB"; $SFName = "IntDB";
-$SVNDay[0] = 5; $SVNDay[1] = 06; $SVNDay[2] = 2009; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 251; $RName = "iDB"; $SFName = "IntDB";
+$SVNDay[0] = 5; $SVNDay[1] = 08; $SVNDay[2] = 2009; $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);
Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
- $FileInfo: mysql.php - Last Update: 5/01/2009 SVN 247 - Author: cooldude2k $
+ $FileInfo: mysql.php - Last Update: 5/08/2009 SVN 251 - Author: cooldude2k $
*/
//@ini_set("display_errors", true);
//@ini_set("display_startup_errors", true);
if($_GET['css']!=null) {
$_GET['theme'] = $_GET['css']; } }
if($_GET['theme']!=null) {
-$_GET['theme']=preg_replace("/(.*?)\.\/(.*?)/", "iDB", $_GET['theme']);
+$_GET['theme'] = chack_themes($_GET['theme']);
if($_GET['theme']=="../"||$_GET['theme']=="./") {
$_GET['theme']="iDB"; $_SESSION['Theme']="iDB"; }
if (file_exists($SettDir['themes'].$_GET['theme']."/settings.php")) {