<input type="hidden" id="id" name="id" value="<?php echo $user->getID(); ?> " /> <table> <tr> <th>Name:</th> <td><?php echo $user->getName(); ?> </td> </tr> <tr> <th>Rank:</th> <td><?php echo $user->getRank()->getName(); ?> </td> </tr> <tr> <th>Clearance: </th> <td><?php echo $user->getClearance()->getClearanceName(); ?> </td> </tr> <tr> <th><label for="merits">Merits</label></th> <td><input type="number" id="merits" name="merits" value="<?php echo $user->getMerits(); ?>
</td> </tr> <tr> <th><label for="name">Name:</label></th> <td><input type="text" id="name" name="name" value="<?php echo $user->getName(); ?> " required /></td> </tr> <tr> <th><label for="rank">Rank:</label></th> <td> <select id="rank" name="rank"> <?php foreach (Rank::getRanks($_SESSION['user']) as $rank) { if ($user->getRank()->getRank() == $rank->getRank()) { echo '<option value=' . $rank->getRank() . ' selected>' . $rank->getName() . '</option>'; } else { echo '<option value=' . $rank->getRank() . '>' . $rank->getName() . '</option>'; } } ?> </select> </td> </tr> <tr> <th><label for="divcommand">Division Command Status:</label> </th> <td> <select id="divcommand" name="divcommand"> <?php if ($user->getDivLeader()) {
<ul> <?php $User = new User(); $rank = $User->getRank(); $data = file_get_contents('app/package.json'); $json = json_decode($data, true); foreach ($json['menu'] as $key => $menu) { if ($key == 'top' || $key == 'main' || $key == 'tools' || $key == 'options' || $key == 'site') { echo ucfirst($key) . '<br>'; foreach ($menu as $item) { if ($item['permission'] <= $rank) { echo '<li><a href="' . $item['location'] . '">' . $item['name'] . '</a></li>'; if (isset($item['sub'])) { echo '<ul>'; foreach ($item['sub'] as $sub) { if ($sub['permission'] <= $rank) { echo '<li><a href="' . $sub['location'] . '">' . $sub['name'] . '</a></li>'; } } echo '</ul>'; } } } $dirs = scandir('../packages'); foreach ($dirs as $dir) { if ($dir != '.' && $dir != '..' && is_dir('../packages/' . $dir)) { $packData = file_get_contents('../packages/' . $dir . '/package.json'); $packJson = json_decode($packData, true); if (isset($packJson['menu'])) { foreach (array_keys($packJson['menu']) as $packKey) { if ($key == $packKey) {
if ($user->getID() != getUser()->getID() && getUser()->getRank() != RANK_ADMIN) { header("Location: " . orongoURL("orongo-admin/index.php?msg=0")); exit; } $titletext = getUser()->getID() == $user->getID() ? l("You") : $user->getID(); $form = new AdminFrontendForm(100, l("Edit User") . " (" . $titletext . ")", "POST", orongoURL("actions/action_Edit.php?user." . $user->getID()), false); if (getUser()->getRank() == RANK_ADMIN) { $form->addInput("Username", "new_name", "text", $user->getName(), true); } $form->addInput("Password", "new_password", "password", "", false); $form->addInput("Email", "new_email", "email", $user->getEmail(), true); if (getUser()->getRank() < RANK_ADMIN) { $form->addInput("Current Password", "password", "password", "", true); } if (getUser()->getRank() >= RANK_ADMIN) { if ($user->getRank() == RANK_ADMIN) { $form->addSelect("new_rank", array(l("Admin") => 3, l("User") => 1, l("Writer") => 2)); } if ($user->getRank() == RANK_WRITER) { $form->addSelect("new_rank", array(l("Writer") => 2, l("User") => 1, l("Admin") => 3)); } if ($user->getRank() == RANK_USER) { $form->addSelect("new_rank", array(l("User") => 1, l("Writer") => 2, l("Admin") => 3)); } } $form->addButton("Save", true); $create->addObject($form); $create->render(); break; case "page": if (getUser()->getRank() < RANK_WRITER) {
?> </header> <section> <article> <div class="top"> <a href="index.php"><h2>Stripcollectie F.C. De Kampioenen:</h2></a> <div class="topright"> *zoekbalk* </div> </div> <table class='table table-striped table-bordered table-hover table-responsive'> <!-- http://www.w3schools.com/bootstrap/bootstrap_tables.asp --> <tr><th>ID</th><th>Afbeelding</th><th>Titel</th><?php if (isset($_SESSION['isLoggedIn']) && $user->getRank() >= 6) { echo "<th style='width:50px'>Bewerken</th><th style='width:50px'>Verwijderen</th>"; } ?> </tr> <?php $db = new Database(); $result = $db->getAllComics(); if ($result) { foreach ($result as $comic) { $owned = $comic->getOwned(); if ($owned >= 1) { $bgColor = "#6CE65E"; } else { $bgColor = "#E65E5E"; }