Dragon-Knight/templates/admin/edit_user.php

90 lines
6.9 KiB
PHP
Raw Permalink Normal View History

2024-12-20 14:20:34 -06:00
<h2>Edit <?= $user['username'] ?></h2>
<form action="/admin/users/<?= $user['id'] ?>" method="post" hx-post="/admin/users/<?= $user['id'] ?>" hx-target="#main">
<table>
<colgroup><col><col></colgroup>
<tbody>
<tr><td>ID</td><td><?= $user['id'] ?></td></tr>
<tr><td>Username</td><td><input type="text" name="username" value="<?= $user['username'] ?>"></td></tr>
<tr><td>Email</td><td><input type="text" name="email" value="<?= $user['email'] ?>"></td></tr>
<tr><td>Register Date</td><td><?= pretty_date($user['regdate']) ?></td></tr>
<tr><td>Last Online</td><td><?= pretty_date($user['onlinetime']) ?></td></tr>
<tr><td>Auth Level</td><td>
<select name="authlevel">
<option value="0" <?= $user['authlevel'] == 0 ? 'selected' : '' ?>>User</option>
<option value="1" <?= $user['authlevel'] == 1 ? 'selected' : '' ?>>Admin</option>
<option value="2" <?= $user['authlevel'] == 2 ? 'selected' : '' ?>>Blocked</option>
</select><br>
<span class="small">Set to "Blocked" to temporarily (or permanently) ban a user.</span>
</td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Latitude</td><td><input type="number" name="latitude" value="<?= $user['latitude'] ?>" /></td></tr>
<tr><td>Longitude</td><td><input type="number" name="longitude" value="<?= $user['longitude'] ?>" /></td></tr>
<tr><td>Character Class</td><td>
<select name="charclass">
<option value="1" <?= $user['charclass'] == 1 ? 'selected' : '' ?>><?= env('class_1_name') ?></option>
<option value="2" <?= $user['charclass'] == 2 ? 'selected' : '' ?>><?= env('class_2_name') ?></option>
<option value="3" <?= $user['charclass'] == 3 ? 'selected' : '' ?>><?= env('class_3_name') ?></option>
</select>
</td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Current Action</td><td><input type="text" name="currentaction" value="<?= $user['currentaction'] ?>" /></td></tr>
<tr><td>Current Fight</td><td><input type="number" name="currentfight" value="<?= $user['currentfight'] ?>" /></td></tr>
<tr><td>Current Monster</td><td><input type="number" name="currentmonster" value="<?= $user['currentmonster'] ?>" /></td></tr>
<tr><td>Current Monster HP</td><td><input type="number" name="currentmonsterhp" value="<?= $user['currentmonsterhp'] ?>" /></td></tr>
<tr><td>Current Monster Sleep</td><td><input type="number" name="currentmonsterimmune" value="<?= $user['currentmonsterimmune'] ?>" /></td></tr>
<tr><td>Current Monster Immune</td><td><input type="number" name="currentmonstersleep" value="<?= $user['currentmonstersleep'] ?>" /></td></tr>
<tr><td>Current Uber Damage</td><td><input type="number" name="currentuberdamage" value="<?= $user['currentuberdamage'] ?>" /></td></tr>
<tr><td>Current Uber Defense</td><td><input type="number" name="currentuberdefense" value="<?= $user['currentuberdefense'] ?>" /></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Current HP</td><td><input type="number" name="currenthp" value="<?= $user['currenthp'] ?>" /></td></tr>
<tr><td>Current MP</td><td><input type="number" name="currentmp" value="<?= $user['currentmp'] ?>" /></td></tr>
<tr><td>Current TP</td><td><input type="number" name="currenttp" value="<?= $user['currenttp'] ?>" /></td></tr>
<tr><td>Max HP</td><td><input type="number" name="maxhp" value="<?= $user['maxhp'] ?>" /></td></tr>
<tr><td>Max MP</td><td><input type="number" name="maxmp" value="<?= $user['maxmp'] ?>" /></td></tr>
<tr><td>Max TP</td><td><input type="number" name="maxtp" value="<?= $user['maxtp'] ?>" /></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Level</td><td><input type="number" name="level" value="<?= $user['level'] ?>" /></td></tr>
<tr><td>Gold</td><td><input type="number" name="gold" value="<?= $user['gold'] ?>" /></td></tr>
<tr><td>Experience</td><td><input type="number" name="experience" value="<?= $user['experience'] ?>" /></td></tr>
<tr><td>Gold Bonus</td><td><input type="number" name="goldbonus" value="<?= $user['goldbonus'] ?>" /></td></tr>
<tr><td>EXP Bonus</td><td><input type="number" name="expbonus" value="<?= $user['expbonus'] ?>" /></td></tr>
<tr><td>Strength</td><td><input type="number" name="strength" value="<?= $user['strength'] ?>" /></td></tr>
<tr><td>Dexterity</td><td><input type="number" name="dexterity" value="<?= $user['dexterity'] ?>" /></td></tr>
<tr><td>Attack Power</td><td><input type="number" name="attackpower" value="<?= $user['attackpower'] ?>" /></td></tr>
<tr><td>Defense Power</td><td><input type="number" name="defensepower" value="<?= $user['defensepower'] ?>" /></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Weapon ID</td><td><input type="number" name="weaponid" value="<?= $user['weaponid'] ?>"></td></tr>
<tr><td>Armor ID</td><td><input type="number" name="armorid" value="<?= $user['armorid'] ?>"></td></tr>
<tr><td>Shield ID</td><td><input type="number" name="shieldid" value="<?= $user['shieldid'] ?>"></td></tr>
<tr><td>Slot 1 ID</td><td><input type="number" name="slot1id" value="<?= $user['slot1id'] ?>"></td></tr>
<tr><td>Slot 2 ID</td><td><input type="number" name="slot2id" value="<?= $user['slot2id'] ?>"></td></tr>
<tr><td>Slot 3 ID</td><td><input type="number" name="slot3id" value="<?= $user['slot3id'] ?>"></td></tr>
<tr><td>Weapon Name</td><td><input type="text" name="weaponname" value="<?= $user['weaponname'] ?>"></td></tr>
<tr><td>Armor Name</td><td><input type="text" name="armorname" value="<?= $user['armorname'] ?>"></td></tr>
<tr><td>Shield Name</td><td><input type="text" name="shieldname" value="<?= $user['shieldname'] ?>"></td></tr>
<tr><td>Slot 1 Name</td><td><input type="text" name="slot1name" value="<?= $user['slot1name'] ?>"></td></tr>
<tr><td>Slot 2 Name</td><td><input type="text" name="slot2name" value="<?= $user['slot2name'] ?>"></td></tr>
<tr><td>Slot 3 Name</td><td><input type="text" name="slot3name" value="<?= $user['slot3name'] ?>"></td></tr>
<tr><td colspan="2"></td></tr>
<tr><td>Drop Code</td><td><input type="number" name="dropcode" value="<?= $user['dropcode'] ?>"></td></tr>
<tr><td>Spells</td><td><input type="text" name="spells" value="<?= $user['spells'] ?>"></td></tr>
<tr><td>Towns</td><td><input type="text" name="towns" value="<?= $user['towns'] ?>"></td></tr>
</tbody>
</table>
<button type="submit">Save</button>
<button type="reset">Reset</button>
</form>