<?php 
	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$addressFields = $rivermedia->delivery_address();
?>
<form class="form-horizontal" id="form_delivery_address" autocomplete="dammit" action="javascript:void(0);" method="post">
  <fieldset>
    <legend>Customer reference</legend>
    <div class="form-group col-lg-12">
      <label for="customer_order_number" class="col-lg-12" id="label_customer_order_number">Order Number (Optional)&nbsp;<span></span></label>
      <div class="col-lg-12">
      	<input style="display:none" type="text" id="fake_order_number_0_" name="fake_order_number_0_"/>
        <input style="display:none" type="text" id="fake_addr_line1_0_" name="fake_addr_line1_0_"/>
        <input style="display:none" type="text" id="fake_addr_line2_0_" name="fake_addr_line2_0_"/>
        <input style="display:none" type="text" id="fake_addr_line3_0_" name="fake_addr_line3_0_"/>
        <input style="display:none" type="text" id="fake_addr_line4_0_" name="fake_addr_line4_0_"/>
        <input style="display:none" type="text" id="fake_addr_postal_code_0_" name="fake_addr_postal_code_0_"/>
        <input type="text" class="form-control" id="customer_order_number" name="customer_order_number" maxlength="12" placeholder="Order Number (Optional)" autosuggest="random-stuff" autocomplete="off" required>
      </div>
    </div>
  </fieldset>
  <fieldset>
    <legend>Ship items to:</legend>
    <div class="form-group col-lg-12">
      <label for="addr_line1" class="col-lg-12" id="label_addr_line1">Address Line 1&nbsp;<span></span></label>
      <div class="col-lg-12">
      	<input style="display:none" type="text" id="fake_order_number_1_" name="fake_order_number_1_"/>
        <input style="display:none" type="text" id="fake_addr_line1_1_" name="fake_addr_line1_1_"/>
        <input style="display:none" type="text" id="fake_addr_line2_1_" name="fake_addr_line2_1_"/>
        <input style="display:none" type="text" id="fake_addr_line3_1_" name="fake_addr_line3_1_"/>
        <input style="display:none" type="text" id="fake_addr_line4_1_" name="fake_addr_line4_1_"/>
        <input style="display:none" type="text" id="fake_addr_postal_code_1_" name="fake_addr_postal_code_1_"/>
        <input type="text" class="form-control" id="addr_line1" name="addr_line1" maxlength="30" placeholder="Line 1" autosuggest="random-stuff" autocomplete="off" required>
      </div>
    </div>
    <div class="form-group col-lg-12">
      <label for="addr_line2" class="col-lg-12" id="label_addr_line2">Address Line 2&nbsp;<span></span></label>
      <div class="col-lg-12">
      	<input style="display:none" type="text" id="fake_order_number_2_" name="fake_order_number_2_"/>
        <input style="display:none" type="text" id="fake_addr_line1_2_" name="fake_addr_line1_2_"/>
        <input style="display:none" type="text" id="fake_addr_line2_2_" name="fake_addr_line2_2_"/>
        <input style="display:none" type="text" id="fake_addr_line3_2_" name="fake_addr_line3_2_"/>
        <input style="display:none" type="text" id="fake_addr_line4_2_" name="fake_addr_line4_2_"/>
        <input style="display:none" type="text" id="fake_addr_postal_code_2_" name="fake_addr_postal_code_2_"/>
        <input type="text" class="form-control" id="addr_line2" name="addr_line2" maxlength="30" placeholder="Line 2" autosuggest="random-stuff" autocomplete="off" required>
      </div>
    </div>
    <div class="form-group col-lg-12">
      <label for="addr_line3" class="col-lg-12" id="label_addr_line3">Address Line 3&nbsp;<span></span></label>
      <div class="col-lg-12">
      	<input style="display:none" type="text" id="fake_order_number_3_" name="fake_order_number_3_"/>
        <input style="display:none" type="text" id="fake_addr_line1_3_" name="fake_addr_line1_3_"/>
        <input style="display:none" type="text" id="fake_addr_line2_3_" name="fake_addr_line2_3_"/>
        <input style="display:none" type="text" id="fake_addr_line3_3_" name="fake_addr_line3_3_"/>
        <input style="display:none" type="text" id="fake_addr_line4_3_" name="fake_addr_line4_3_"/>
        <input style="display:none" type="text" id="fake_addr_postal_code_3_" name="fake_addr_postal_code_3_"/>
        <input type="text" class="form-control" id="addr_line3" name="addr_line3" maxlength="30" placeholder="Line 3" autosuggest="random-stuff" autocomplete="off" required>
      </div>
    </div>
    <div class="form-group col-lg-12">
      <label for="addr_line4" class="col-lg-12" id="label_addr_line4">Address Line 4&nbsp;<span></span></label>
      <div class="col-lg-12">
      	<input style="display:none" type="text" id="fake_order_number_4_" name="fake_order_number_4_"/>
        <input style="display:none" type="text" id="fake_addr_line1_4_" name="fake_addr_line1_4_"/>
        <input style="display:none" type="text" id="fake_addr_line2_4_" name="fake_addr_line2_4_"/>
        <input style="display:none" type="text" id="fake_addr_line3_4_" name="fake_addr_line3_4_"/>
        <input style="display:none" type="text" id="fake_addr_line4_4_" name="fake_addr_line4_4_"/>
        <input style="display:none" type="text" id="fake_addr_postal_code_4_" name="fake_addr_postal_code_4_"/>
        <input type="text" class="form-control" id="addr_line4" name="addr_line4" maxlength="30" placeholder="Line 4" autosuggest="random-stuff" autocomplete="off">
      </div>
    </div>
    <div class="form-group col-lg-12">
      <label for="addr_postal_code" class="col-lg-12" id="label_addr_postal_code">Postal Code &nbsp;<span></span></label>
      <div class="col-lg-12">
      	<input style="display:none" type="text" id="fake_order_number_5_" name="fake_order_number_5_"/>
        <input style="display:none" type="text" id="fake_addr_line1_5_" name="fake_addr_line1_5_"/>
        <input style="display:none" type="text" id="fake_addr_line2_5_" name="fake_addr_line2_5_"/>
        <input style="display:none" type="text" id="fake_addr_line3_5_" name="fake_addr_line3_5_"/>
        <input style="display:none" type="text" id="fake_addr_line4_5_" name="fake_addr_line4_5_"/>
      	<input style="display:none" type="text" id="fake_addr_postal_code_5_" name="fake_addr_postal_code_5_"/>
        <input type="text" class="form-control" id="addr_postal_code" name="addr_postal_code" placeholder="Postal Code" autosuggest="random-stuff" autocomplete="off" required maxlength="4">
      </div>
    </div>
  </fieldset>
  <input type="hidden" name="h_customer_order_number" id="h_customer_order_number" value="<?php echo $rivermedia->get_customer_order_number(); ?>" />
  <input type="hidden" name="h_addr_line1" id="h_addr_line1" value="<?php echo $addressFields[0]; ?>" />
  <input type="hidden" name="h_addr_line2" id="h_addr_line2" value="<?php echo $addressFields[1]; ?>" />
  <input type="hidden" name="h_addr_line3" id="h_addr_line3" value="<?php echo $addressFields[2]; ?>" />
  <input type="hidden" name="h_addr_line4" id="h_addr_line4" value="<?php echo $addressFields[3]; ?>" />
  <input type="hidden" name="h_addr_postal_code" id="h_addr_postal_code" value="<?php echo $addressFields[4]; ?>" />
</form>