Dragon-Knight/templates/admin/main_settings.php

111 lines
4.2 KiB
PHP

<h2>Main Settings</h2>
<p>These options control several major settings for the game engine.</p>
<p>Note that these particular settings are written to the .env file in the root directory, and not the database.</p>
<br>
<form action="/admin/main" method="post" hx-post="/admin/main" hx-target="#main">
<table>
<tr>
<td width="20%"><span class="highlight">Game Open:</span></td>
<td>
<select name="gameopen">
<option value="1" <?= env('game_open') ? 'selected' : '' ?>>Open</option>
<option value="0" <?= !env('game_open') ? 'selected' : '' ?>>Closed</option>
</select><br>
<span class="small">Close the game if you are upgrading or working on settings and don't want to
cause odd errors for end-users. Closing the game will completely halt all activity.</span>
</td>
</tr>
<tr>
<td width="20%">Game Name:</td>
<td>
<input type="text" name="gamename" value="<?= env('game_name') ?>"><br>
<span class="small">Change this if you want to change to call your game something different.</span>
</td>
</tr>
<tr>
<td width="20%">Game URL:</td>
<td>
<input type="text" name="gameurl" value="<?= env('game_url') ?>"><br>
<span class="small">Please specify the full URL to your game installation
("https://www.dragonknight.com/"). This gets used in the registration email sent to users. If
you leave this field blank or incorrect, users may not be able to register correctly.</span>
</td>
</tr>
<tr>
<td width="20%">Admin Email:</td>
<td>
<input type="text" name="adminemail" value="<?= env('admin_email') ?>"><br>
<span class="small">Please specify your email address. This gets used when the game has to send an
email to users.</span>
</td>
</tr>
<tr>
<td width="20%">Map Size:</td>
<td>
<input type="number" name="gamesize" value="<?= env('game_size') ?>"><br>
<span class="small">
Default is 250. This is the size of each map quadrant. Note that monster
levels increase every 5 spaces, so you should ensure that you have at least (map size / 5)
monster levels total, otherwise there will be parts of the map without any monsters, or some
monsters won't ever get used. Ex: with a map size of 250, you should have 50 monster levels total.
</span>
</td>
</tr>
<tr>
<td width="20%">Email Verification:</td>
<td>
<select name="verifyemail">
<option value="0" <?= !env('verify_email') ? 'selected' : '' ?>>Disabled</option>
<option value="1" <?= env('verify_email') ? 'selected' : '' ?>>Enabled</option>
</select><br>
<span class="small">Make users verify their email address for added security.</span>
</td>
</tr>
<tr>
<td width="20%">Show News:</td>
<td>
<select name="shownews">
<option value="0" <?= !env('show_news') ? 'selected' : '' ?>>No</option>
<option value="1" <?= env('show_news') ? 'selected' : '' ?>>Yes</option>
</select><br>
<span class="small">Toggle display of the Latest News box in towns.
</td>
</tr>
<tr>
<td width="20%">Show Who's Online:</td>
<td>
<select name="showonline">
<option value="0" <?= !env('show_online') ? 'selected' : '' ?>>No</option>
<option value="1" <?= env('show_online') ? 'selected' : '' ?>>Yes</option>
</select><br>
<span class="small">Toggle display of the Who's Online box in towns.</span>
</td>
</tr>
<tr>
<td width="20%">Show Babblebox:</td>
<td>
<select name="showbabble">
<option value="0" <?= !env('show_babble') ? 'selected' : '' ?>>No</option>
<option value="1" <?= env('show_babble') ? 'selected' : '' ?>>Yes</option>
</select><br>
<span class="small">Toggle display of the Babble Box in towns.</span>
</td>
</tr>
<tr>
<td width="20%">Class 1 Name:</td>
<td><input type="text" name="class1name" value="<?= env('class_1_name') ?>"><br></td>
</tr>
<tr>
<td width="20%">Class 2 Name:</td>
<td><input type="text" name="class2name" value="<?= env('class_2_name') ?>"><br></td>
</tr>
<tr>
<td width="20%">Class 3 Name:</td>
<td><input type="text" name="class3name" value="<?= env('class_3_name') ?>"><br></td>
</tr>
</table>
<button type="submit">Save</button>
<button type="reset">Reset</button>
</form>