Mod configuration panel tweaks

master
Pentium44 2021-02-10 16:08:07 -08:00
parent 548085597e
commit 1dcacb5177
3 changed files with 17 additions and 9 deletions

View File

@ -70,11 +70,11 @@ html, body {
padding: 4px;
}
table { padding: 1px; max-width: 100%; }
tr, td { padding: 5px; text-align: center; }
td:nth-child(3n+0) { background-color: #343434; }
td:nth-child(3n+1) { background-color: #404040; }
td:nth-child(3n+2) { background-color: #464646; }
#admint table { padding: 1px; max-width: 100%; }
#admint tr, td { padding: 5px; }
#admint td:nth-child(3n+0) { background-color: #343434; text-align: center; }
#admint td:nth-child(3n+1) { background-color: #404040; text-align: center; }
#admint td:nth-child(3n+2) { background-color: #464646; text-align: center; }
textarea {
background-color: #222222;

View File

@ -103,13 +103,21 @@ function modUploadForm() {
function modsForm() {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>?do=configure-mods" method="post">
<table><tr>
<?php
chdir("mods");
$docount = 0;
foreach(glob("*") as $filename) {
echo "<input class='text' type='checkbox' name='$filename'> $filename<br />\n";
echo "<td><input class='text' type='checkbox' name='$filename'> $filename</td>\n";
$docount++;
if($docount == 3) {
echo "</tr><tr>";
$docount = 0;
}
}
chdir("..");
?>
</tr></table>
<input style="padding: 2px;" class="text" type="submit" name="submitBtn" value="Set mods">
</form>
<?php

View File

@ -625,7 +625,7 @@ else if(isset($_GET['do']))
echo "<h3>Change default game</h3>";
chdir("games");
foreach(glob("*") as $gamemode) {
echo "<a href='index.php?do=configure-game&game=$gamemode' class='button'>$gamemode</a>";
echo "<a href='index.php?do=configure-game&game=$gamemode' class='button'>$gamemode</a> ";
}
chdir("..");
@ -993,14 +993,14 @@ else
// To be continued!
chdir("mtm_db/users");
echo "<table><tr><td>Username</td><td>Full Name</td><td>Email</td><td>Server-Type/Port</td><td>User ID</td><td>Server Stat</td></tr>";
echo "<div id='admint'><table><tr><td>Username</td><td>Full Name</td><td>Email</td><td>Server-Type/Port</td><td>User ID</td><td>Server Stat</td></tr>";
foreach(glob("*.php") as $user_account_file) {
include_once($user_account_file);
$servertype = file_get_contents("$userid.type");
$serverstatus = file_get_contents("$userid.pid.status");
echo "<tr><td>$user_handle</td><td>$user_fullname</td><td>$user_email</td><td>$servertype/$portrange$userid</td><td>$userid</td><td>$serverstatus</td></tr>";
}
echo "</table>";
echo "</table></div>";
}
}