• R/O
  • HTTP
  • SSH
  • HTTPS

iDB.git: Commit

Internet Discussion Boards is a message board system by Game Maker 2k. Its very easy to set up. Your web host needs PHP and CUBRID / MySQL / MariaDB / PostgreSQL / SQLite. Internet Discussion Boards is Open Source so you can make changes to it.


Commit MetaInfo

Revision8571b4e7be486706d4d4399f87d88ab5b5628484 (tree)
Zeit2019-08-07 15:58:00
AutorKazuki Suzuki Przyborowski <kazuki.przyborowski@gmai...>
CommiterGitHub

Log Message

Add files via upload

Ändern Zusammenfassung

Diff

--- a/inc/admin/main.php
+++ b/inc/admin/main.php
@@ -11,7 +11,7 @@
1111 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
1212 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
1313
14- $FileInfo: main.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
14+ $FileInfo: main.php - Last Update: 08/07/2019 SVN 909 - Author: cooldude2k $
1515 */
1616 $File3Name = basename($_SERVER['SCRIPT_NAME']);
1717 if ($File3Name=="main.php"||$File3Name=="/main.php") {
@@ -1209,10 +1209,13 @@ $admincptitle = " ".$ThemeSet['TitleDivider']." Database Manager";
12091209 ?><tr style="text-align: left;">
12101210 <td style="width: 50%;"><span class="TextBoxLabel">Database File Size:</span></td>
12111211 <td style="width: 50%;"><?php echo sprintf("%u", filesize($Settings['sqldb']))." bytes"; ?></td>
1212+</tr><tr style="text-align: left;">
1213+ <td style="width: 50%;"><span class="TextBoxLabel">Human Readable File Size:</span></td>
1214+ <td style="width: 50%;"><?php echo human_filesize(sprintf("%u", filesize($Settings['sqldb']))); ?></td>
12121215 </tr><?php } if($Settings['sqltype']=="cubrid") { ?><tr style="text-align: left;">
12131216 <td style="width: 50%;"><span class="TextBoxLabel">CUBRID PHP:</span></td>
12141217 <td style="width: 50%;"><?php echo $DBType['PHP']; ?></td>
1215-</tr><?php } ?><tr style="text-align: left;">
1218+</tr><?php } if($Settings['sqltype']!="sqlite"&&$Settings['sqltype']!="sqlite3") { ?><tr style="text-align: left;">
12161219 <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseUserName">Insert Database User Name:</label></td>
12171220 <td style="width: 50%;"><input type="text" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" /></td>
12181221 </tr><tr style="text-align: left;">
@@ -1227,10 +1230,21 @@ $admincptitle = " ".$ThemeSet['TitleDivider']." Database Manager";
12271230 </tr><tr style="text-align: left;">
12281231 <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
12291232 <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
1230-</tr></table>
1233+</tr><?php } if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3") { ?><tr style="text-align: left;">
1234+ <td style="width: 50%;"><label class="TextBoxLabel" for="DatabaseName">Insert Database FileName:</label></td>
1235+ <td style="width: 50%;"><input type="text" name="DatabaseName" class="TextBox" id="DatabaseName" size="20" value="<?php echo $Settings['sqldb']; ?>" /></td>
1236+</tr><tr style="text-align: left;">
1237+ <td style="width: 50%;"><label class="TextBoxLabel" for="tableprefix">Insert Table Prefix:<br /></label></td>
1238+ <td style="width: 50%;"><input type="text" name="tableprefix" class="TextBox" id="tableprefix" size="20" value="<?php echo $Settings['sqltable']; ?>" /></td>
1239+</tr><?php } ?></table>
12311240 <table style="text-align: left;">
12321241 <tr style="text-align: left;">
12331242 <td style="width: 100%;">
1243+<?php if($Settings['sqltype']=="sqlite"||$Settings['sqltype']=="sqlite3") { ?>
1244+<input type="hidden" name="DatabaseUserName" class="TextBox" id="DatabaseUserName" size="20" value="<?php echo $Settings['sqluser']; ?>" />
1245+<input type="hidden" name="DatabasePassword" class="TextBox" id="DatabasePassword" size="20" value="<?php echo $Settings['sqlpass']; ?>" />
1246+<input type="hidden" name="DatabaseHost" class="TextBox" id="DatabaseHost" size="20" value="<?php echo $Settings['sqlhost']; ?>" />
1247+<?php } ?>
12341248 <input type="hidden" name="act" value="sql" style="display: none;" />
12351249 <input type="hidden" name="update" value="now" style="display: none;" />
12361250 <input type="submit" class="Button" value="Apply" name="Apply_Changes" />
--- a/inc/misc/functions.php
+++ b/inc/misc/functions.php
@@ -11,7 +11,7 @@
1111 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
1212 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
1313
14- $FileInfo: functions.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
14+ $FileInfo: functions.php - Last Update: 08/07/2019 SVN 909 - Author: cooldude2k $
1515 */
1616 $File3Name = basename($_SERVER['SCRIPT_NAME']);
1717 if ($File3Name=="functions.php"||$File3Name=="/functions.php") {
@@ -582,4 +582,11 @@ function dump_extensions($type="var_dump") {
582582 if($type=="var_dump") { return var_dump(get_loaded_extensions()); }
583583 if($type=="var_export") { return var_export(get_loaded_extensions()); } }
584584 function count_extensions() { return count(get_loaded_extensions()); }
585+// human_filesize by evgenij at kostanay dot kz
586+// URL: https://www.php.net/manual/en/function.filesize.php#120250
587+function human_filesize($bytes, $decimals = 2) {
588+ $factor = floor((strlen($bytes) - 1) / 3);
589+ if ($factor > 0) $sz = 'KMGT';
590+ return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . ' ' . @$sz[$factor - 1] . 'B';
591+}
585592 ?>
--- a/inc/versioninfo.php
+++ b/inc/versioninfo.php
@@ -11,7 +11,7 @@
1111 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
1212 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
1313
14- $FileInfo: versioninfo.php - Last Update: 08/06/2019 SVN 908 - Author: cooldude2k $
14+ $FileInfo: versioninfo.php - Last Update: 08/07/2019 SVN 909 - Author: cooldude2k $
1515 */
1616 $File3Name = basename($_SERVER['SCRIPT_NAME']);
1717 if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
@@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
2727 return $return_var; }
2828 // Version number and date stuff. :P
2929 $VER1[0] = 0; $VER1[1] = 5; $VER1[2] = 2; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
30-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 908;
31-$SVNDay[0] = 8; $SVNDay[1] = 6; $SVNDay[2] = 2019; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
30+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 909;
31+$SVNDay[0] = 8; $SVNDay[1] = 7; $SVNDay[2] = 2019; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
3232 $AltName = "DF2k"; $AltName2 = "DF2k"; $RName = "iDB"; $SFName = "IntDB";
3333 $RFullName = "Internet Discussion Boards"; $AltFullName = "Discussion Forums 2k"; $AltGM2k = "Game Maker 2k";
3434 $VerCheckName = "iDB"; $AltVerCheckName = "DF2k"; $AltiDBHome = "https://idb.osdn.jp/";
Show on old repository browser