Exemple #1
0
					<th>Active</th>
					<th>Room</th>
					<th>Capacity</th>
					<th>Capacity exclusive</th>
				</tr>
			</thead>
			<tbody>
				<?php 
$conditions = null;
if (isset($_GET['room'])) {
    $id_room = (int) $_GET['room'];
    $conditions = 'chat_rooms.id = ' . $id_room;
}
$users_model = new UsersModel();
$users_model->setFieldsSelect(array('chat_users.*', 'chat_rooms.room', 'chat_rooms.description', 'chat_rooms.capacity', 'chat_rooms.capacity_exclusive'));
$users_model->setJoin('INNER JOIN chat_rooms ON (chat_users.id_room = chat_rooms.id)');
$users_model->setCond($conditions);
$users = $users_model->load_all();
foreach ($users as $user) {
    echo '<tr>';
    echo '<td><a href="?delete=' . $user['id'] . '">Delete User</a> | <a href="?block_ip=' . $user['ip'] . '">Block IP</a> | <a href="?block_user='******'id'] . '">Block User</a></td>';
    echo '<td>' . $user['id'] . '</td>';
    echo '<td>' . $user['user'] . '</td>';
    echo '<td>' . $user['ip'] . '</td>';
    echo '<td>' . ($user['active'] ? 'Yes' : 'No	') . '</td>';
    echo '<td>' . $user['room'] . '</td>';
    echo '<td>' . $user['capacity'] . '</td>';
    echo '<td>' . $user['capacity_exclusive'] . '</td>';
    echo '</tr>';
}
?>