From dbebf38f2b1d858063dbe4d26f66fde98a19eacd Mon Sep 17 00:00:00 2001 From: Kazuki Przyborowski Date: Fri, 12 Jun 2009 00:59:25 +0000 Subject: [PATCH] Another small update. git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@263 2b68903e-0b30-0410-9a39-a2e4f3c5be39 --- inc/function.php | 15 ++++++++++----- inc/misc/functions.php | 4 ++-- inc/versioninfo.php | 6 +++--- setup/mkconfig.php | 3 ++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/inc/function.php b/inc/function.php index 8c381d1..581344f 100644 --- a/inc/function.php +++ b/inc/function.php @@ -11,7 +11,7 @@ Copyright 2004-2008 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: function.php - Last Update: 12/09/2008 SVN 207 - Author: cooldude2k $ + $FileInfo: function.php - Last Update: 6/11/2009 SVN 263 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="function.php"||$File3Name=="/function.php") { @@ -58,18 +58,23 @@ $REFERERurl = null; * @param string an optional prefix * @return string the formatted uuid */ - function uuid($useold = false,$more_entropy = false,$prefix = '') + function uuid($useold = false,$more_entropy = false,$mtrand = false,$prefix = '') { - if($useold==true) { + if($useold===true&&$mtrand===false) { $chars = uniqid(md5(rand()),$more_entropy); } - if($useold==false) { + if($useold===false&&$mtrand===false) { $chars = md5(uniqid(rand(),$more_entropy)); } + if($useold===true&&$mtrand===true) { + $chars = uniqid(md5(mt_rand()),$more_entropy); } + if($useold===false&&$mtrand===true) { + $chars = md5(uniqid(mt_rand(),$more_entropy)); } $uuid = substr($chars,0,8) . '-'; $uuid .= substr($chars,8,4) . '-'; $uuid .= substr($chars,12,4) . '-'; $uuid .= substr($chars,16,4) . '-'; $uuid .= substr($chars,20,12); - return $prefix . $uuid; + if(isset($prefix)) { return $prefix . $uuid; } + if(!isset($prefix)) { return $uuid; } } // Make the Query String if we are not useing &= function qstring($qstr=";",$qsep="=") diff --git a/inc/misc/functions.php b/inc/misc/functions.php index 6fb13e2..69db995 100644 --- a/inc/misc/functions.php +++ b/inc/misc/functions.php @@ -11,7 +11,7 @@ Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ - $FileInfo: functions.php - Last Update: 6/07/2009 SVN 262 - Author: cooldude2k $ + $FileInfo: functions.php - Last Update: 6/11/2009 SVN 263 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="functions.php"||$File3Name=="/functions.php") { @@ -151,7 +151,7 @@ if ($handle = opendir($ckskindir)) { $dirnum = null; if ($dirnum==null) { $dirnum = 0; } if (file_exists($ckskindir.$ckfile."/info.php")) { if ($ckfile != "." && $ckfile != "..") { - include($ckskindir.$ckfile."/info.php"); + //include($ckskindir.$ckfile."/info.php"); $cktheme[$dirnum] = $ckfile; ++$dirnum; } } } closedir($handle); asort($cktheme); } diff --git a/inc/versioninfo.php b/inc/versioninfo.php index 5cda1ef..b35fed6 100644 --- a/inc/versioninfo.php +++ b/inc/versioninfo.php @@ -11,7 +11,7 @@ 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: 6/07/2009 SVN 262 - Author: cooldude2k $ + $FileInfo: versioninfo.php - Last Update: 6/11/2009 SVN 263 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") { @@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) { return $return_var; } // Version number and date stuff. :P $VER1[0] = 0; $VER1[1] = 2; $VER1[2] = 7; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2]; -$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 262; $RName = "iDB"; $SFName = "IntDB"; -$SVNDay[0] = 6; $SVNDay[1] = 07; $SVNDay[2] = 2009; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2]; +$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 263; $RName = "iDB"; $SFName = "IntDB"; +$SVNDay[0] = 6; $SVNDay[1] = 11; $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); diff --git a/setup/mkconfig.php b/setup/mkconfig.php index edaa60f..da03b6c 100644 --- a/setup/mkconfig.php +++ b/setup/mkconfig.php @@ -12,7 +12,7 @@ Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/ iDB Installer made by Game Maker 2k - http://idb.berlios.net/ - $FileInfo: mkconfig.php - Last Update: 6/07/2009 SVN 262 - Author: cooldude2k $ + $FileInfo: mkconfig.php - Last Update: 6/11/2009 SVN 263 - Author: cooldude2k $ */ $File3Name = basename($_SERVER['SCRIPT_NAME']); if ($File3Name=="mkconfig.php"||$File3Name=="/mkconfig.php") { @@ -90,6 +90,7 @@ $query = query("INSERT INTO `".$_POST['tableprefix']."tagboard` VALUES (1,-1,'". */ $query = query("INSERT INTO `".$_POST['tableprefix']."categories` VALUES (1,1,'Main','yes','category','yes',0,0,0,'The Main Category.')", array(null)); mysql_query($query); +$ServerUUID = uuid(false,true,false,null); if(!is_numeric($_POST['YourOffSet'])) { $_POST['YourOffSet'] = "0"; } if($_POST['YourOffSet']>12) { $_POST['YourOffSet'] = "12"; } if($_POST['YourOffSet']<-12) { $_POST['YourOffSet'] = "-12"; } -- 2.11.0