<?php include(__DIR__."/../layout/top.php"); ?>
<div class="row">
<div class="col-md-12">
<h3>Users</h3>
<form method="post">
<table class="table">
<tr>
<th>Username</th>
<td><input name="username" value="<?php echo $editUser->username; ?>" class="form-control"></td>
</tr>
<th>Primary Mail</th>
<td><input name="" value="<?php echo $editUser->getMail(); ?>" class="form-control" disabled></td>
<th>Developer</th>
<td><input name="developer" type="checkbox" <?php if($editUser->developer) { echo 'checked'; } ?>></td>
<th>Admin</th>
<td><input name="admin" type="checkbox" <?php if($editUser->admin) { echo 'checked'; } ?>></td>
</table>
<input type="submit" value="Save" class="btn btn-warning">
</form>
<h4>Mails</h4>
<th>#</th>
<th>Mail</th>
<th>Status</th>
<th>Actions</th>
<?php
foreach($mails as $mail) {
?>
<td><?php echo $mail->id; ?></td>
<td><?php echo $mail->mail; ?></td>
<td><?php echo $mail->status ?></td>
<td>
if($mail->status == "waiting") {
echo '<a href="/gui/mailValidation/'.$mail->id.'/'.$mail->validation_code.'" class="btn btn-danger btn-sm">Aktivieren</a>';
}
echo '<a href="/gui/admin/resendInviteMail?id='.$mail->id.'" class="btn btn-warning btn-sm">Resend Validation Mail</a>';
</td>
<?php } ?>
</div>
<?php include(__DIR__."/../layout/bottom.php"); ?>