Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Aug 7, 2019
1 parent 009c7dc commit 8571b4e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
20 changes: 17 additions & 3 deletions inc/admin/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
$FileInfo: main.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
$FileInfo: main.php - Last Update: 08/07/2019 SVN 909 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="main.php"||$File3Name=="/main.php") {
Expand Down Expand Up @@ -1209,10 +1209,13 @@ function add_prefix($tarray) {
?><tr style="text-align: left;">
<td style="width: 50%;"><span class="TextBoxLabel">Database File Size:</span></td>
<td style="width: 50%;"><?php echo sprintf("%u", filesize($Settings['sqldb']))." bytes"; ?></td>
</tr><tr style="text-align: left;">
<td style="width: 50%;"><span class="TextBoxLabel">Human Readable File Size:</span></td>
<td style="width: 50%;"><?php echo human_filesize(sprintf("%u", filesize($Settings['sqldb']))); ?></td>
</tr><?php } if($Settings['sqltype']=="cubrid") { ?><tr style="text-align: left;">
<td style="width: 50%;"><span class="TextBoxLabel">CUBRID PHP:</span></td>
<td style="width: 50%;"><?php echo $DBType['PHP']; ?></td>
</tr><?php } ?><tr style="text-align: left;">
</tr><?php } if($Settings['sqltype']!="sqlite"&&$Settings['sqltype']!="sqlite3") { ?><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" value="<?php echo $Settings['sqluser']; ?>" /></td>
</tr><tr style="text-align: left;">
Expand All @@ -1227,10 +1230,21 @@ function add_prefix($tarray) {
</tr><tr style="text-align: left;">
<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" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
</tr></table>
</tr><?php } if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3") { ?><tr style="text-align: left;">
<td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database FileName:</label></td>
<td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" value="<?php echo $Settings['sqldb']; ?>" /></td>
</tr><tr style="text-align: left;">
<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" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
</tr><?php } ?></table>
<table style="text-align: left;">
<tr style="text-align: left;">
<td style="width: 100%;">
<?php if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3") { ?>
<input type="hidden" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" />
<input type="hidden" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" value="<?php echo $Settings['sqlpass']; ?>" />
<input type="hidden" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="<?php echo $Settings['sqlhost']; ?>" />
<?php } ?>
<input type="hidden" name="act" value="sql" style="display: none;" />
<input type="hidden" name="update" value="now" style="display: none;" />
<input type="submit" class="Button" value="Apply" name="Apply_Changes" />
Expand Down
9 changes: 8 additions & 1 deletion inc/misc/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
$FileInfo: functions.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
$FileInfo: functions.php - Last Update: 08/07/2019 SVN 909 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="functions.php"||$File3Name=="/functions.php") {
Expand Down Expand Up @@ -582,4 +582,11 @@ function dump_extensions($type="var_dump") {
if($type=="var_dump") { return var_dump(get_loaded_extensions()); }
if($type=="var_export") { return var_export(get_loaded_extensions()); } }
function count_extensions() { return count(get_loaded_extensions()); }
// human_filesize by evgenij at kostanay dot kz
// URL: https://www.php.net/manual/en/function.filesize.php#120250
function human_filesize($bytes, $decimals = 2) {
$factor = floor((strlen($bytes) - 1) / 3);
if ($factor > 0) $sz = 'KMGT';
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . ' ' . @$sz[$factor - 1] . 'B';
}
?>
6 changes: 3 additions & 3 deletions inc/versioninfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
$FileInfo: versioninfo.php - Last Update: 08/06/2019 SVN 908 - Author: cooldude2k $
$FileInfo: versioninfo.php - Last Update: 08/07/2019 SVN 909 - Author: cooldude2k $
*/
$File3Name = basename($_SERVER['SCRIPT_NAME']);
if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
Expand All @@ -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] = 5; $VER1[2] = 2; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 908;
$SVNDay[0] = 8; $SVNDay[1] = 6; $SVNDay[2] = 2019; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 909;
$SVNDay[0] = 8; $SVNDay[1] = 7; $SVNDay[2] = 2019; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
$AltName = "DF2k"; $AltName2 = "DF2k"; $RName = "iDB"; $SFName = "IntDB";
$RFullName = "Internet Discussion Boards"; $AltFullName = "Discussion Forums 2k"; $AltGM2k = "Game Maker 2k";
$VerCheckName = "iDB"; $AltVerCheckName = "DF2k"; $AltiDBHome = "https://idb.osdn.jp/";
Expand Down

0 comments on commit 8571b4e

Please sign in to comment.