<?php
include(dirname(__FILE__) . '/../header.php');
?>
<h2>ユーザ一覧</h2>

<?php if(is_array($users)) : ?>
<table class="list">
<th>id</th><th>type</th><th>name</th><th>email</th><th>actions</th>
<?php foreach ($users as $user): ?>
<tr>
<td><?php echo $user['userid'] ?></td>
<td><?php echo $user['usertype'] ?></td>
<td><?php echo $user['name'] ?></td>
<td><?php echo $user['email'] ?></td>
<td>
<?php
echo '<a href="' . site_url('admin/users/edit/'. $user['userid']) . '">編集</a>';
echo '&nbsp;|&nbsp;';
echo '<a href="' . site_url('admin/users/delete/'. $user['userid']) . '">削除</a>';
?>
</td></tr>

<?php endforeach;?>
</table>
<?php endif;?>
<?php
echo '<a href="' . site_url('admin/users/add/') . '">ユーザの追加</a>';
?>
<?php
include(dirname(__FILE__) . '/../footer.php');
?>
