<?php
///////////////////////////////////////////////////////////////////////////////////////
// opencart1.4.7【日本語版】
// opencart.jp
// sagawa.php
// このファイルは、佐川急便の配送モジュールです。
// ver 1.0.0 Coding By sae seagreenzzz@gmail.com
// GPL ver 3
///////////////////////////////////////////////////////////////////////////////////////
?>
<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('view/image/shipping.png');"><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location='<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
  <div class="content">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
      <table class="form">
        <tr>
        	<td>
            	<?php echo $entry_status ?>
            </td>
            <td>
                <select name="sagawa_status">
                  <?php if ($sagawa_status) { ?>
                  <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                  <option value="0"><?php echo $text_disabled; ?></option>
                  <?php } else { ?>
                  <option value="1"><?php echo $text_enabled; ?></option>
                  <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                  <?php } ?>
                </select>
            </td>
        </tr>
        <tr>
          <td><?php echo $entry_zone ?></td>
          <td><select name="sagawa_zone">
          	  <option value="0"><?php echo $selected_default ?></option>
              <?php foreach($select_zone as $key => $val ) {

						if( $sagawa_zone == $val ){
			  ?>
              <option value="<?php echo $val ?>" selected="selected"><?php echo $val; ?></option>
              <?php
			   			}else{
			   ?>
              <option value="<?php echo $val?>"><?php echo $val; ?></option>
              <?php
			  			}//if-end

					}//foreach-end
			  ?>
            </select>
          <?php echo $text_shipping ?>
          </td>
        </tr>
        <tr>
          <td><label for="di"><?php echo $entry_district ?></label><input type="radio" name="sagawa_price" <?php echo $checked_di ?> id="di" value="di" /></td>
          <td>
              <div>
              	<div style="width:50em; padding:5px;">
                	<?php echo $hokkaido ?><input type="text" name="ho_p" size="20" value="<?php echo $ho_p ?>" />&nbsp;円                    &nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $hokkaido . '）'?><input type="text" name="ho_p_free" size="20" value="<?php echo $ho_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $touhoku ?><input type="text" name="to_p" size="20" value="<?php echo $to_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $touhoku . '）'?><input type="text" name="to_p_free" size="20" value="<?php echo $to_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $kantou ?><input type="text" name="ka_p" size="20" value="<?php echo $ka_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $kantou . '）'?><input type="text" name="ka_p_free" size="20" value="<?php echo $ka_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $shinetsu ?><input type="text" name="shi_p" size="20" value="<?php echo $shi_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $shinetsu . '）'?><input type="text" name="shi_p_free" size="20" value="<?php echo $shi_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $hokuriku ?><input type="text" name="hoku_p" size="20" value="<?php echo $hoku_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $hokuriku . '）'?><input type="text" name="hoku_p_free" size="20" value="<?php echo $hoku_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $toukai ?><input type="text" name="tou_p" size="20" value="<?php echo $tou_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $toukai . '）'?><input type="text" name="tou_p_free" size="20" value="<?php echo $tou_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $kinki ?><input type="text" name="ki_p" size="20" value="<?php echo $ki_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $kinki . '）'?><input type="text" name="ki_p_free" size="20" value="<?php echo $ki_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $chugoku ?><input type="text" name="chu_p" size="20" value="<?php echo $chu_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $chugoku . '）'?><input type="text" name="chu_p_free" size="20" value="<?php echo $chu_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $shikoku ?><input type="text" name="shiko_p" size="20" value="<?php echo $shiko_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $shikoku . '）'?><input type="text" name="shiko_p_free" size="20" value="<?php echo $shiko_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $kyusyu ?><input type="text" name="kyu_p" size="20" value="<?php echo $kyu_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $kyusyu . '）'?><input type="text" name="kyu_p_free" size="20" value="<?php echo $kyu_p_free ?>" />&nbsp;円
                </div>
                <div style="width:50em; padding:5px;">
                	<?php echo $okinawa ?><input type="text" name="oki_p" size="20" value="<?php echo $oki_p ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_district_free . '（' . $okinawa . '）'?><input type="text" name="oki_p_free" size="20" value="<?php echo $oki_p_free ?>" />&nbsp;円
                </div>
              </div>
            </td>
        <tr>
            <td>
            	<label for="ev"><?php echo $entry_evenly ?></label><input type="radio" name="sagawa_price" id="ev" value="ev" <?php echo $checked_ev ?> />
            </td>
            <td>
            	<div style="width:50em; padding:5px;">
            		<?php echo $zenkoku ?><input type="text" name="sagawa_evenly" size="20" value="<?php echo $sagawa_evenly ?>" />&nbsp;円&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $entry_evenly_free ?><input type="text" name="sagawa_evenly_free" size="20" value="<?php echo $sagawa_evenly_free ?>" />&nbsp;円
                </div>
            </td>
        </tr>
        </tr>
        <tr>
            <td>
            	<label for="pu"><?php echo $entry_purchase ?></label><input type="radio" name="sagawa_price" id="pu" value="pu" <?php echo $checked_pu ?> />
            </td>
            <td>
            	<input type="text" name="sagawa_purchase" size="50" value="<?php echo $sagawa_purchase ?>" />&nbsp;円
                <div style="padding:10px; line-height:1.5em; color: #666666;">
                	<?php echo $text_exe ?>
                </div>
            </td>
        </tr>
        <tr>
        	<td>
            	<?php echo $entry_time ?>
            </td>
            <td>
            	<textarea name="sagawa_time" rows="10" cols="40"><?php echo $sagawa_time ?>
                </textarea>
                <div>
                	<label for="stop"><?php echo $text_stop ?></label><input type="checkbox" value="1" name="sagawa_stop" id="stop" <?php echo $sagawa_stop ?> />
                </div>
            </td>
        </tr>
        <tr>
          <td><?php echo $entry_sort_order; ?></td>
          <td><input type="text" name="sagawa_sort_order" value="<?php echo $sagawa_sort_order; ?>" size="1" /></td>
        </tr>
      </table>
    </form>
  </div>
  <div  style="float:right; padding:10px;" class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location='<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
</div>
<?php echo $footer; ?>