Ejemplo n.º 1
0
<?php 
//BLIR BRUKT I ADMIN
require_once 'inc/dbutil.php';
$obj = new DbUtil();
$tmpVal = $obj->getTable();
echo "<p class='text-center'>Guild Members</p>";
echo "<table class='table'>";
echo "<tr><th>Character name</th><th>Remove player</th></tr>";
foreach ($tmpVal as $row) {
    if ($row['guildmembership'] == 1 && $row['gamerID'] != $_SESSION['gamerID']) {
        echo "<tr>";
        echo "<td>" . $row['username'] . "</td>";
        echo "<td>";
        echo "<form action='inc/deleteuser.php' method='post'>";
        echo "<input type='hidden' name='deleteuser' value='" . $row['gamerID'] . "'>";
        echo "<button type='submit' class='btn btn-danger' >Delete</button>";
        echo "</form>";
        echo "</td>";
        echo "</tr>";
    }
}
echo "</table>";
Ejemplo n.º 2
0
<?php

require_once 'inc/dbutil.php';
$db = new DbUtil();
$users = $db->getTable();
foreach ($users as $tmpUser) {
    echo "<option value='{$tmpUser['gamerID']}' >{$tmpUser['username']}</option>";
}