<?php
include(dirname(__FILE__) . '/../header.php');
?>
<h2>会員一覧</h2>

<?php echo $this->session->flashdata('msg') ?>

<?php if(is_array($members)) : ?>
<table class="list">
<th>id</th><th>name</th><th>email</th><th>actions</th>
<?php foreach ($members as $member): ?>
<tr>
<td><?php echo $member['memberid'] ?></td>
<td><?php echo $member['name'] ?></td>
<td><?php echo $member['email'] ?></td>
<td>
<?php
$system = $this->phpsession->get('system');
if (isset($system['ssl']) && $system['ssl'] == 'true')
{
    echo '<a href="' . site_url('admin/members/edit/'. $hotelid . '/' . $member['memberid'], true) . '">編集</a>';
}
else
{
    echo '<a href="' . site_url('admin/members/edit/'. $hotelid . '/' . $member['memberid']) . '">編集</a>';
}
echo '&nbsp;|&nbsp;';
echo '<a href="' . site_url('admin/members/delete/'. $hotelid . '/' . $member['memberid'], true) . '">削除</a>';
?>
</td></tr>

<?php endforeach;?>
</table>
<?php endif;?>
<?php echo $links ?>
<?php
$system = $this->phpsession->get('system');
if (isset($system['ssl']) && $system['ssl'] == 'true')
{
    echo '<a href="' . site_url('admin/members/add/' . $hotelid, true) . '">会員の追加</a>';
}
else
{
    echo '<a href="' . site_url('admin/members/add/' . $hotelid) . '">会員の追加</a>';
}
?>
<?php
include(dirname(__FILE__) . '/../footer.php');
?>
