<?php
include(dirname(__FILE__) . '/../header.php');
?>
<h2>プラン一覧</h2>

<?php if(is_array($plans)) : ?>
<table class="list">
<th>id</th><th>name</th><th>デフォルト数</th><th>受入人数</th><th>ステータス</th><th>actions</th>
<?php foreach ($plans as $plan): ?>
<tr>
<td><?php echo $plan['planid'] ?></td>
<td><?php echo $plan['plan_name'] ?><br />
<?php echo substr($plan['start_date'], 0, 10) . '～' . substr($plan['end_date'], 0, 10) ?>
</td>
<td><?php echo $plan['default_num'] ?></td>
<td><?php echo $plan['guest_min'] . '～' . $plan['guest_max'] ?></td>
<td><?php echo $plan['status'] ?></td>
<td>
<?php
echo '<a href="' . site_url('admin/plans/edit/'. $hotelid . '/' . $plan['planid']) . '">編集</a> | ';
echo '<a href="' . site_url('admin/plans/delete/'. $hotelid . '/' . $plan['planid']) . '">削除</a> | ';
echo '<a href="' . site_url('admin/vacantplans/index/'. $hotelid . '/' . $plan['planid']) . '">空き編集</a><br />';
echo '<a href="' . site_url('admin/plantoguesttypes/index/'. $hotelid . '/' . $plan['planid']) . '">客タイプ設定</a> | ';
echo '<a href="' . site_url('admin/plantooptions/index/'. $hotelid . '/' . $plan['planid']) . '">オプション設定</a> | ';
echo '<a href="' . site_url('admin/planprices/index/'. $hotelid . '/' . $plan['planid']) . '">料金設定</a>';
?>
</td></tr>

<?php endforeach;?>
</table>
<?php endif;?>
<?php
echo '<a href="' . site_url('admin/plans/add/' . $hotelid) . '">プランの新規追加</a>';
?>

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