Copyright 2004-2009 iDB Support - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: admin.php - Last Update: 11/14/2009 SVN 346 - Author: cooldude2k $
+ $FileInfo: admin.php - Last Update: 11/15/2009 SVN 350 - Author: cooldude2k $
*/
if(@ini_get("register_globals")) {
require_once('inc/misc/killglobals.php'); }
if($_GET['act']=="settings"||
$_GET['act']=="mysql"||
$_GET['act']=="info"||
+ $_GET['act']=="optimize"||
$_GET['act']=="delsessions")
{ $AdminMenu = "main";
require($SettDir['admin'].'main.php'); }
Copyright 2004-2009 iDB Support - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: main.php - Last Update: 11/14/2009 SVN 347 - Author: cooldude2k $
+ $FileInfo: main.php - Last Update: 11/15/2009 SVN 350 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="main.php"||$File3Name=="/main.php") {
if(!isset($_POST['update'])) { $_POST['update'] = null; }
$iDBRDate = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
$iDBRSVN = $VER2[2]." ".$SubVerN;
+$OutPutLog = null;
$LastUpdateS = "Last Update: ".$iDBRDate." ".$iDBRSVN;
$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-".$SVNDay[2]." iDB Support - http://idb.berlios.de/\n Copyright 2004-".$SVNDay[2]." Game Maker 2k - http://gamemaker2k.org/\n iDB Installer made by Game Maker 2k - http://idb.berlios.net/\n\n \$FileInfo: settings.php & settingsbak.php - ".$LastUpdateS." - 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 */");
$sqlgc = query('DELETE FROM `'.$Settings['sqltable'].'sessions` WHERE `expires` < %i', array($time));
exec_query($sqlgc);
$_POST['update'] = "now"; $_GET['act'] = "view"; }
+if($_GET['act']=="optimize"&&$GroupInfo['ViewDBInfo']=="yes") {
+$TablePreFix = $Settings['sqltable'];
+function add_prefix($tarray) {
+global $TablePreFix;
+return $TablePreFix.$tarray; }
+$TableChCk = array("categories", "catpermissions", "events", "forums", "groups", "members", "messenger", "permissions", "posts", "restrictedwords", "sessions", "smileys", "topics", "wordfilter");
+$TableChCk = array_map("add_prefix",$TableChCk);
+$tcount = count($TableChCk); $ti = 0;
+$TblOptimized = 0;
+while ($ti < $tcount) {
+if(isset($OptimizeAr["Msg_text"])) { unset($OptimizeAr["Msg_text"]); }
+if(isset($OptimizeAr[3])) { unset($OptimizeAr[3]); }
+$OptimizeTea = exec_query(query("OPTIMIZE TABLE `".$TableChCk[$ti]."`", array(null)));
+$OptimizeAr = mysql_fetch_array($OptimizeTea);
+if(!isset($OptimizeAr["Msg_text"])&&
+ isset($OptimizeAr[3])) { $OptimizeAr["Msg_text"] = $OptimizeAr[3]; }
+if($OptimizeAr["Msg_text"]=="OK") {
+ ++$TblOptimized; } ++$ti; }
+$OutPutLog = "MySQL Output: ".$TblOptimized." Tables optimized.";
+$_POST['update'] = "now"; $_GET['act'] = "view"; }
?>
</td>
<td style="width: 85%; vertical-align: top;">
<tr class="TableMenuRow3" id="ProfileUpdate">
<td class="TableMenuColumn3">
<div style="text-align: center;">
+<?php if(isset($OutPutLog)) { echo "<br />".$OutPutLog; } ?>
<br />Settings have been updated <a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=".$_GET['act']."&menu=main",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">click here</a> to go back. ^_^<br /> </div>
<?php } if($_GET['act']=="view"&&$_POST['update']!="now") {
$query = query("SELECT * FROM `".$Settings['sqltable']."members` WHERE `id`=%i LIMIT 1", array($_SESSION['UserID']));
Copyright 2004-2009 iDB Support - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: table.php - Last Update: 11/14/2009 SVN 346 - Author: cooldude2k $
+ $FileInfo: table.php - Last Update: 11/15/2009 SVN 350 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="table.php"||$File3Name=="/table.php") {
<td class="TableSMenuColumn3"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=sqldumper",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">SQL Dumper</a></td>
</tr><tr class="TableSMenuRow3">
<td class="TableSMenuColumn3"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=delsessions",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Clean Sessions</a></td>
+</tr><tr class="TableSMenuRow3">
+<td class="TableSMenuColumn3"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=optimize",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Optimize Tables</a></td>
<?php } ?>
</tr><tr class="TableSMenuRow3">
<td class="TableSMenuColumn3"><a href="<?php echo url_maker($exfile['admin'],$Settings['file_ext'],"act=info",$Settings['qstr'],$Settings['qsep'],$prexqstr['admin'],$exqstr['admin']); ?>">Edit Board Info</a></td>
Copyright 2004-2009 iDB Support - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: function.php - Last Update: 10/29/2009 SVN 329 - Author: cooldude2k $
+ $FileInfo: function.php - Last Update: 11/15/2009 SVN 350 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="function.php"||$File3Name=="/function.php") {
function html_tag_make($name="br",$emptytag=true,$attbvar=null,$attbval=null,$extratest=null) {
$var_num = count($attbvar); $value_num = count($attbval);
if($var_num!=$value_num) {
- echo "Erorr Number of Var and Values dont match!";
+ trigger_error("Erorr Number of Var and Values dont match!",E_USER_ERROR);
return false; } $i = 0;
while ($i < $var_num) {
if($i==0) { $mytag = "<".$name." ".$attbvar[$i]."=\"".$attbval[$i]."\""; }
Copyright 2004-2009 iDB Support - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: functions.php - Last Update: 11/15/2009 SVN 349 - Author: cooldude2k $
+ $FileInfo: functions.php - Last Update: 11/15/2009 SVN 350 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="functions.php"||$File3Name=="/functions.php") {
if(!isset($link_identifier)) {
$result = mysql_query($query); }
if (!$result) {
- echo "Invalid query: ".mysql_error();
+ trigger_error("Invalid query: ".mysql_error(),E_USER_ERROR);
return false; }
if ($result) {
++$NumQueries;
// by Kazuki Przyborowski - Cool Dude 2k */
function http_set_cookie($name,$value=null,$expire=null,$path=null,$domain=null,$secure=false,$httponly=false) {
$mkcookie = null; $expireGMT = null;
- if(!isset($name)) { echo "Error: You need to enter a name for cookie."; return false; }
- if(!isset($expire)) { echo "Error: You need to enter a time for cookie to expire."; return false; }
+ if(!isset($name)) {
+ trigger_error("Error: You need to enter a name for cookie.",E_USER_ERROR);
+ return false; }
+ if(!isset($expire)) {
+ trigger_error("Error: You need to enter a time for cookie to expire.",E_USER_ERROR);
+ return false; }
$expireGMT = gmdate("D, d-M-Y H:i:s \G\M\T", $expire);
if(!isset($value)) { $value = null; }
if(!isset($httponly)||$httponly==false) {
Copyright 2004-2009 iDB Support - http://idb.berlios.de/
Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
- $FileInfo: versioninfo.php - Last Update: 11/15/2009 SVN 349 - Author: cooldude2k $
+ $FileInfo: versioninfo.php - Last Update: 11/15/2009 SVN 350 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
if($showsvn!==true&&$showsvn!=null) { $return_var .= " ".$showsvn." ".$svnver; }
return $return_var; }
// Version number and date stuff. :P
-$VER1[0] = 0; $VER1[1] = 3; $VER1[2] = 1; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Pre-Alpha"; $VER2[1] = "PA"; $VER2[2] = "SVN"; $SubVerN = 349; $RName = "iDB"; $SFName = "IntDB";
+$VER1[0] = 0; $VER1[1] = 3; $VER1[2] = 2; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 350; $RName = "iDB"; $SFName = "IntDB";
$SVNDay[0] = 11; $SVNDay[1] = 15; $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);