<?php 
$sessionArray = $rivermedia->get_login_session();
if (!(is_array($sessionArray))) {
?>
<!-- Create Account -->
<div class="modal fade" id="create_account" tabindex="-1" role="dialog" aria-labelledby="modalSignInLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Account</h4>
      </div>
      <div class="modal-body">
        <p>
        <form class="form-horizontal" id="form_create_account" autocomplete="dammit" action="javascript:void(0);" method="post">
          <!-- fake fields are a workaround for chrome autofill getting the wrong fields -->
          <input style="display:none" type="text" id="fakeusernameremembered" name="fakeusernameremembered"/>
          <input style="display:none" type="password" id="fakepasswordremembered" name="fakepasswordremembered"/>
          <fieldset>
            <legend><i class="fa fa-user" aria-hidden="true"></i> Create new</legend>
            <div class="form-group col-lg-12">
              <label for="acc_email" class="col-lg-12" id="label_acc_email">Email address&nbsp;<span></span></label>
              <div class="col-lg-12">
                <input type="email" class="form-control" id="acc_email" name="acc_email" placeholder="Email address" value="" autosuggest="random-stuff">
              </div>
            </div>
            <div class="form-group col-lg-6">
              <label for="acc_password" class="col-lg-12" id="label_acc_password">Password&nbsp;<span></span></label>
              <div class="col-lg-12">
                <input style="display:none" type="password" id="fakepasswordremembered1" name="fakepasswordremembered1"/>
                <input type="password" class="form-control" id="acc_password" name="acc_password" placeholder="Password"  value="">
              </div>
            </div>
            <div class="form-group col-lg-6">
              <label for="acc_password_confirm" class="col-lg-12" id="label_acc_password_confirm">Confirm password&nbsp;<span></span></label>
              <div class="col-lg-12">
                <input type="password" class="form-control" id="acc_password_confirm" name="acc_password_confirm" placeholder="Confirm password"  value="">
              </div>
            </div>
            <div class="form-group col-lg-12">
              <label class="col-lg-1 control-label radio_label">Title</label>
              <div class="col-lg-12">
                <div class="radio col-lg-3">
                  <label class="radio_label">
                    <input type="radio" name="title" id="title1" value="MR" checked="">
                    Mr </label>
                </div>
                <div class="radio col-lg-3">
                  <label class="radio_label">
                    <input type="radio" name="title" id="title2" value="MISS">
                    Miss </label>
                </div>
                <div class="radio col-lg-3">
                  <label class="radio_label">
                    <input type="radio" name="title" id="title2" value="MRS">
                    Mrs </label>
                </div>
                <div class="radio col-lg-3">
                  <label class="radio_label">
                    <input type="radio" name="title" id="title2" value="MS">
                    Ms </label>
                </div>
              </div>
            </div>
            <div class="form-group col-lg-6">
              <label for="acc_n1" class="col-lg-12" id="label_acc_n1">First name</label>
              <div class="col-lg-12">
                <input type="text" class="form-control" id="acc_n1" name="acc_n1" placeholder="First name"  value="">
              </div>
            </div>
            <div class="form-group col-lg-6">
              <label for="acc_n2" class="col-lg-12" id="label_acc_n2">Last name</label>
              <div class="col-lg-12">
                <input type="text" class="form-control" id="acc_n2" name="acc_n2" placeholder="Last name"  value="">
              </div>
            </div>
            <div class="form-group col-lg-6">
              <label for="acc_tel" class="col-lg-12" id="label_acc_tel">Phone</label>
              <div class="col-lg-12">
                <input type="text" class="form-control phonefields" id="acc_tel" name="acc_tel" placeholder="Phone"  value="">
              </div>
            </div>
            <div class="form-group col-lg-6">
              <label for="acc_dob" class="col-lg-12" id="label_acc_dob">Date of birth</label>
              <div class="col-lg-12">
                <input type="text" class="form-control datemaskfields" id="acc_dob" name="acc_dob" placeholder="Date of birth: YYYY-MM-DD" value="">
              </div>
            </div>
          </fieldset>
        </form>
        </p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" id="cancel_create_account" data-dismiss="modal">Cancel</button>
        <button type="button" class="btn btn-primary" id="submit_create_account">Create account</button>
      </div>
      <div id="ajax_create_account" class="hidden"></div>
    </div>
  </div>
</div>
<?php
};
?>

<?php 
if (!(is_array($sessionArray))) {
?>
<!-- Sign in -->
<!-- Modal -->
<div class="modal fade" id="modalSignIn" tabindex="-1" role="dialog" aria-labelledby="modalSignInLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content"> 
      <!-- Modal Header -->
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span> </button>
        <h4 class="modal-title" id="modalSignInLabel"><i class="fa fa-user" aria-hidden="true"></i> Sign In </h4>
        
      </div>
      <!-- Modal Body -->
      <div id="signin_area" class="modal-body">
        <div class="form-group col-lg-6">
          <label for="signin_email" class="col-lg-12" id="label_signin_email">Email address&nbsp;<span></span></label>
          <div class="col-lg-12">
            <input style="display:none" type="text" id="fakeusernameremembered_si" name="fakeusernameremembered_si"/>
            <input style="display:none" type="password" id="fakepasswordremembered_si" name="fakepasswordremembered_si"/>
            <input type="email" class="form-control" id="signin_email" name="signin_email" placeholder="Email address" value="" autosuggest="random-stuff">
          </div>
        </div>
        <div class="form-group col-lg-6">
          <label for="signin_password" class="col-lg-12" id="label_signin_password">Password&nbsp;<span></span></label>
          <div class="col-lg-12">
            <input style="display:none" type="text" id="fakeusernameremembered_si1" name="fakeusernameremembered_si1"/>
            <input style="display:none" type="password" id="fakepasswordremembered_si1" name="fakepasswordremembered_si1"/>
            <input type="password" class="form-control" id="signin_password" name="signin_password" placeholder="Password"  value="">
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
      <!-- Modal Footer -->
      <div class="modal-footer">
      	<div id="modal_ajax_sign_in" class="pull-left" style="opacity:0;"><i class="fa fa-cog fa-spin"></i>&nbsp;Please wait</div>
        <button type="button" class="btn btn-primary" id="closebutton" data-dismiss="modal"> Close </button>
        <button type="button" class="btn btn-success" id="signinbutton"> Sign In </button>
      </div>
    </div>
  </div>
</div> 
<?php
};
?>
<?php 
if (is_array($sessionArray)) {
?>
<!-- Modal -->
<div class="modal fade" id="modalWorkArea" tabindex="-1" role="dialog" aria-labelledby="modalWorkAreaLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content"> 
      <!-- Modal Header -->
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span> </button>
        <h4 class="modal-title" id="modalWorkAreaLabel"> Modal title </h4>
      </div>
      <!-- Modal Body -->
      <div id="work_area" class="modal-body"><p>Loading...</p></div>
      <!-- Modal Footer -->
      <div class="modal-footer">
      	<div id="modal_ajax_actions" class="pull-left"><i class="fa fa-cog fa-spin"></i>&nbsp;Please wait</div>
        <button type="button" class="btn btn-primary" id="closebutton" data-dismiss="modal"> Close </button>
        <button type="button" class="btn btn-success" id="savechangesbutton"> Next <i class="fa fa-arrow-circle-right" aria-hidden="true"></i> </button>
      </div>
    </div>
  </div>
</div> 
<?php
};
?>
<!-- View product-->
<div class="modal fade" id="modalViewProduct" tabindex="-1" role="dialog" aria-labelledby="modalViewProductLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content"> 
      <!-- Modal Header -->
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"> <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span> </button>
        <h4 class="modal-title" id="modalViewProductLabel"> Product title </h4>
      </div>
      <!-- Modal Body -->
      <div id="modal_product_area" class="modal-body" style="text-align:center;"><p>Loading...</p></div>
      <!-- Modal Footer -->
    </div>
  </div>
</div> 
<!-- End view product -->

<!-- Confirm Delete Modal-->
<!-- Modal Dialog -->
<div class="modal fade" id="confirmDelete" role="dialog" aria-labelledby="confirmDeleteLabel" aria-hidden="true">
<div class="modal-dialog">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      <h4 class="modal-title">Remove Product</h4>
    </div>
    <div class="modal-body">
      <p>Remove this item from the shopping cart?</p>
    </div>
    <div class="modal-footer">
      <button type="button" class="btn btn-default" id="canceldelete" data-dismiss="modal">Cancel</button>
      <button type="button" class="btn btn-danger" id="confirm">Delete</button>
    </div>
  </div>
</div>
</div>

<!-- Modal Message -->
<div class="modal fade" id="modalPopup" role="dialog">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
      </div>
      <div class="modal-body">
        <p>Modal message</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
