<?php
include(dirname(__FILE__) . '/../header1.php');
include(dirname(__FILE__) . '/../mypage_header2.php');
?>
<h2>予約一覧</h2>

<?php if(is_array($resservations)) : ?>
<table class="list">
<th>resid</th><th>rescode</th><th>予約日</th><th>プラン</th><th>チェックイン</th><th>チェックアウト</th><th>料金</th><th>actions</th>
<?php foreach ($resservations as $res): ?>
<tr>
<td><?php echo $res['resid'] ?></td>
<td><?php echo $res['rescode'] ?></td>
<td><?php echo $res['created'] ?></td>
<td><?php echo $res['plan_name'] ?></td>
<td><?php echo $res['cin'] ?></td>
<td><?php echo $res['cout'] ?></td>
<td><?php echo number_format($res['total_price']) . '円' ?></td>
<td>
<?php
echo '<a href="' . site_url('mypage/resdetail/'. $hotel['hotelid'] . '/' . $res['resid']) . '">詳細</a>';
?>
</td></tr>

<?php endforeach;?>
</table>
<?php endif;?>

<?php
include(dirname(__FILE__) . '/../footer.php');
?>
