<?php
include(dirname(__FILE__) . '/../header1.php');
?>
<link rel="stylesheet" href="<?php echo base_url() ?>js/jquery/themes/base/jquery.ui.all.css">
<script src="<?php echo base_url() ?>js/jquery/jquery-1.4.2.js"></script>
<script src="<?php echo base_url() ?>js/jquery/ui/jquery.ui.core.js"></script>
<script src="<?php echo base_url() ?>js/jquery/ui/jquery.ui.widget.js"></script>
<script src="<?php echo base_url() ?>js/jquery/ui/jquery.ui.datepicker.js"></script>
<script src="<?php echo base_url() ?>js/jquery/ui/i18n/jquery.ui.datepicker-ja.js"></script>
	<script>
	$(function() {
		$("#datepicker").datepicker({dateFormat: 'yy-mm-dd'});
	});
	</script>
<link rel="stylesheet" href="<?php echo base_url() ?>css/ui.spinner.css">
<script type="text/javascript" src="<?php echo base_url() ?>js/jquery.ui-1.6rc2/ui/ui.core.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>js/jquery.ui-1.6rc2/ui/ui.spinner.js"></script>
    <script>
    $(document).ready(function(){
        $("#s1").spinner({max: 20, min: 0});
        $("#s2").spinner({max: 20, min: 0});
        $("#s3").spinner({max: 20, min: 0});
        $("#s4").spinner({max: 20, min: 0});
        $("#s5").spinner({max: 20, min: 0});
        $("#s6").spinner({max: 20, min: 0});
    });
    </script>
<?php
include(dirname(__FILE__) . '/../header2.php');
?>
<image src="<?php echo site_url('images/step1.png') ?>">

<h2>宿泊内容入力</h2>

<?php
if (isset($error) && count($error))
{
    echo '<div class="form_error"><ul>' . "\n";
    foreach ($error as $err)
    {
        echo "<li>" . $err . "</li>" . "\n";
    }
    echo '</ul></div>' . "\n";
}
?>

<?php echo form_open('res/index/' . $hotelid . '/' . $planid . '/' . $d); ?>

<table class="inp">
<tr>
<th>プラン :</th>
<td><?php echo $plan_name . '(' . $guest_min . '～' . $guest_max . '人)'; ?></td>
</tr>
<tr>
<th>チェックイン日 :</th><td>
<?php
$s_cin = substr($d, 0, 4) . '-' . substr($d, 4, 2) . '-' . substr($d, 6, 2);
echo $s_cin;
echo ' (' . $this->Common_model->week($s_cin) . ')';
?></td></tr>
<tr><th>* チェックアウト日 :</th>
<td>
<input type="text" name="cout" id="datepicker" value="<?php echo set_value('cout', isset($cout) ? $cout : ''); ?>" size="30" />
<?php echo form_error('cout'); ?>
</td></tr>
<tr><th>部屋タイプ :</th>
<td>
<?php echo $roomtype_name . '(' . $roomtypes_guest_min . '～' . $roomtypes_guest_max . '人)'; ?>
</td></tr>
<tr><th>* 部屋数 :</th>
<td>
<input type="text" name="room_num" id="s1" value="<?php echo set_value('room_num', isset($room_num) ? $room_num : ''); ?>" size="4" />
<?php echo form_error('room_num'); ?>
</td></tr>
<tr><th>* 1部屋あたりの人数 :</th><td>
<table>
<th><tr>
<td>大人:</td><td>
<input type="text" name="basic_num" id="s2" value="<?php echo set_value('basic_num', isset($basic_num) ? $basic_num : ''); ?>" size="4" /> 
</td><td>
子供A:</td><td>
<input type="text" name="child1_num" id="s3" value="<?php echo set_value('child1_num', isset($child1_num) ? $child1_num : ''); ?>" size="4" />
</td><td>
子供B:</td><td>
<input type="text" name="child2_num" id="s4" value="<?php echo set_value('child2_num', isset($child2_num) ? $child2_num : ''); ?>" size="4" />
</td><td>
子供C:</td><td>
<input type="text" name="child3_num" id="s5" value="<?php echo set_value('child3_num', isset($child3_num) ? $child3_num : ''); ?>" size="4" />
</td><td>
子供D:</td><td>
<input type="text" name="child4_num" id="s6" value="<?php echo set_value('child4_num', isset($child4_num) ? $child4_num : ''); ?>" size="4" />
</td></tr></table>
<?php echo form_error('basic_num'); ?>
<?php echo form_error('child1_num'); ?>
<?php echo form_error('child2_num'); ?>
<?php echo form_error('child3_num'); ?>
<?php echo form_error('child4_num'); ?>
</td>
</tr>
</table>
<input type="submit" name="mysubmit" value="見積もりへ進む" />

</form>

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