<!DOCTYPE html>
<html>
  <?php
  $this->load->view('template/header_script');

   $Currency = getCurrency();
  

  ?>

  <style>
    .profile_div{
        width:100%;
        text-align: center;
        padding-top:0px;
        padding-bottom: 30px;

    }

    .profile_circle{
        width:120px;
        height:120px;
        border-radius: 50%;
        background-color: #a8a8a8;
        margin: 0 auto;
        position: relative;
    }
    .profile_circle img{
        width:100%;
        height:100%;
        border-radius: 50%;
        object-position: center;
        object-fit: cover;
    }
    .profile_circle input{
        position: absolute;
        top:0px;
        left:0px;
        right:0px;
        bottom: 0px;
        opacity: 0;
    }
</style>
<body class="bg-dark">
<div class="sufee-login d-flex align-content-center flex-wrap">
        <div class="container">
            <div class="login-content">
                <div class="login-logo">

                    <a href="index.html">

                      <label><h1>Express Registration</h1></label>
                    </a>
                </div>
                <div class="login-form">
                  <?php 
        $url = (isset($Express_id)||!empty($Express_id))
        ?'Registration_request/updateExpress/'.$Express_id:'';
        if($this->session->flashdata('message')) { 
        $flashdata = $this->session->flashdata('message'); ?>
          <div class="alert alert-<?= $flashdata['class'] ?>">
            <button class="close" data-dismiss="alert" type="button">×</button>
            <?= $flashdata['message'] ?>
          </div>
          <?php } ?>
          <form role="form" action="<?= base_url($url) ?>" method="post" class="validate" data-parsley-validate="" enctype="multipart/form-data">
            <div class="profile_div">
                <div class="profile_circle">
                      <?php $req = (!isset($Express_id)||empty($Express_id))
                  ?'form-control required':'form-control';?>
                    <img id="image_id_1" src="<?= (isset($ExpressData->image))?base_url($ExpressData->image):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
                      <input name="profile_image" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="<?= base_url($req) ?>"/>
                </div>
            </div>
                        <div class="form-group">
                            <label>User Name</label>
                           <input type="text" data-parsley-trigger="change" data-parsley-minlength="2" data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$" id="nf-brand" name="name" placeholder="Enter Name" class="form-control required" value="<?= (isset($ExpressData->name))?$ExpressData->name:'' ?>" >
                        </div>
                    <div class="form-group">
                    <div class="row">
                    <div class="col-md-3">
                    <label for="nf-email" class=" form-control-label">Code</label>
                    <select name="phone_code" id="selectSm" class="form-control required">
                        <option value=""></option>    
                        <?php foreach($Currency as $crny) { ?> 
                        <?php  if  (isset($Express_id)||!empty($Express_id)) { ?>
                        <option <?= $ExpressData->code == $crny['code'] ? "selected" : "" ; ?> value="<?= $crny['code'] ?>"><?= $crny['code'] ?></option>
                        <?php }else { ?> 
                        <option  value="<?= $crny['code'] ?>"><?= $crny['code'] ?></option>
                        <?php }} ?> 
                      </select>

                  
                    </div>
                    <div class="col-md-9">
                      <label for="nf-email" class=" form-control-label">Phone Number</label>
                      <input type="text" data-parsley-trigger="change" data-parsley-trigger="change"  data-parsley-minlength="2"  data-parsley-pattern="^[0-9\ , - + \/]+$" id="nf-brand" name="phone" placeholder="Enter Phone Number" class="form-control required" value="<?= (isset($ExpressData->phone_no))?$ExpressData->phone_no:'' ?>" >
                    </div>
                </div>
                        <div class="form-group">
                            <label>Email address</label>
                             <input type="email" id="pd_email" name="email" placeholder="Enter Email" class="form-control required" readonly="" onfocusout="myFunction()" value="<?= (isset($ExpressData->email_id))?$ExpressData->email_id:'' ?>" >
                        </div>
                        <div class="form-group">
                            <label>Password</label>
                           <input type="password" data-parsley-trigger="change" data-parsley-trigger="change"  data-parsley-minlength="2"  data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$" id="nf-brand" name="password" placeholder="Enter Password" class="form-control required" value="" >
                        </div>
                         <div class="form-group">
                         <label for="nf-email" class=" form-control-label">Location</label>
                      <input type="text" name="location" id="location"  required class="form-control required" placeholder="Enter Location" onkeypress="ratelocation()" value="<?= (isset($ExpressData->location))?$ExpressData->location:'' ?>">
                      <input type="hidden" name="lat" id="lat" value="<?= (isset($ExpressData->lat))?$ExpressData->lat:'' ?>" required class="form-control required" readonly="">
                      <input type="hidden" name="lng" id="lng"  value="<?= (isset($ExpressData->lng))?$ExpressData->lng:'' ?>" required class="form-control required" readonly="">
                  </div>
                   <div class="form-group">
                      <label for="nf-email" class=" form-control-label">Express Code</label>
                      <input type="text" readonly="" data-parsley-trigger="change" data-parsley-trigger="change"  data-parsley-minlength="2"  data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$" id="nf-brand" name="express_code" placeholder="Express Code" class="form-control required" value="<?= (isset($ExpressData->express_code))?$ExpressData->express_code:'' ?>"  >
                    </div>
                    <div class="form-group">
                      <label for="nf-email" class=" form-control-label">Altered Number</label>
                      <input type="text" data-parsley-trigger="change" data-parsley-trigger="change"  data-parsley-minlength="2"  data-parsley-pattern="^[0-9\ , - + \/]+$" id="nf-brand" name="altered_no" placeholder="Enter Altered Number" class="form-control required" value="<?= (isset($ExpressData->altered_no))?$ExpressData->altered_no:'' ?>" >
                    </div>
                     <div class="form-group"> 
                       <label for="nf-email"  class=" form-control-label">Address</label>
                                <textarea type="text" data-parsley-trigger="change" data-parsley-minlength="2" data-parsley-pattern="^[a-zA-Z0-9\ . _ - ' \/]+$" id="nf-brand" name="address" placeholder="Enter Address" class="form-control required" ><?= (isset($ExpressData->address))?$ExpressData->address:'' ?></textarea> 
                       
                      </div>
                       <!--  <div class="checkbox">
                            <label>
                                <input type="checkbox"> Agree the terms and policy
                            </label>
                        </div> -->
                        <button type="submit" class="btn btn-primary btn-flat m-b-30 m-t-30">Register</button>
                        <div class="social-login-content">
                           <!--  <div class="social-button">
                                <button type="button" class="btn social facebook btn-flat btn-addon mb-3"><i class="ti-facebook"></i>Register with facebook</button>
                                <button type="button" class="btn social twitter btn-flat btn-addon mt-2"><i class="ti-twitter"></i>Register with twitter</button>
                            </div> -->
                        </div>
                       <!--  <div class="register-link m-t-15 text-center">
                            <p>Already have account ? <a href="#"> Sign in</a></p>
                        </div> -->
                    </form>
                </div>
            </div>
        </div>
    </div>

<?php
        $this->load->view('template/footer_script');
    ?>
  </body>
</html>