<script src="<?php echo base_url();?>ckeditor/ckeditor.js"></script>
      <section class="content-header">
      <h1>

        Members 

      </h1>

      <ol class="breadcrumb">

        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>

        <li><a href="<?php echo base_url('admin/users/alllist');?>">Members</a></li>

        <li class="active"> Edit</li>

      </ol>

    </section>

    

    <section class="content">

      <div class="row">

      <?php echo $this->utility->showMsg();?>

        <div class="col-md-12">

        <div class="loader" style="display:none;"><img src='<?php echo base_url();?>assets/images/loading.gif' alt='loading' /></div>

          <!-- Horizontal Form -->

          <div class="box box-info">

            <div class="box-header with-border">

              <h3 class="box-title">Edit </h3>

            </div>

            <!-- /.box-header -->

            <!-- form start -->

            <form id="add_frm" name="add_frm" class="form-horizontal" method="post" action="" enctype="multipart/form-data">

              <div class="box-body">

                <div class="form-group">

                  <label class="col-sm-2 control-label">Email</label>

                  <div class="col-sm-6">

                    <input type="text" class="form-control" id="email" name="email" value="<?php if(!empty($userDetails)){ echo $userDetails['email']; } ?>" placeholder="Please enter email" autocomplete="off">

                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Username</label>

                  <div class="col-sm-6">

                    <input type="text" class="form-control" id="username" name="username" value="<?php if(!empty($userDetails)){ echo $userDetails['username']; } ?>" placeholder="Please enter username" autocomplete="off">

                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Password</label>

                  <div class="col-sm-6">

                    <input type="text" class="form-control" id="password" name="password" value="" placeholder="Please enter password" autocomplete="off">
                    <!-- <span class="toggle" style="cursor:pointer;">Show</span> -->
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Discount</label>

                  <div class="col-sm-6">

                    <select name="discount" class="form-control">
                    <?php for($i=1; $i<101; $i++){ ?>
                        <option value="<?php echo $i; ?>" <?php if(!empty($memberDiscount) && $memberDiscount['discount']==$i){ echo 'selected'; }?>><?php echo $i; ?></option>
                    <?php }?>
                    </select>
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Membership</label>

                  <div class="col-sm-6">

                    <label class="" ><?php if(!empty($membershipDetails)){ echo ucfirst($membershipDetails['userstatus']). ' Membership'; } else { echo 'No membership'; } ?><img src="<?php echo  base_url();?>assets/userfiles/img/logo-gold-mini.png" width=30></label>
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Account Type</label>

                  <div class="col-sm-6">

                    <select name="acount_type" class="form-control">
                        <option value="lady" <?php if(!empty($userDetails) && $userDetails['accounttype']=='lady') { echo 'selected'; }?>> Lady </option>
                        <option value="gentleman" <?php if(!empty($userDetails) && $userDetails['accounttype']=='gentleman') { echo 'selected'; }?>> Gentleman </option>
                        <option value="couple" <?php if(!empty($userDetails) && $userDetails['accounttype']=='couple') { echo 'selected'; }?>> Couple </option>
                    </select>
                  </div>

                </div>
              <?php 
              $userDetials = $userDetails;
              if($userDetails['accounttype']!='couple') { ?>
                <div style="border: 1px solid #b3975b ; border-radius: 5px; margin-bottom: 20px; padding : 15px;">
                <div class="form-group">
                   <label class="col-sm-2 control-label">AGE</label>

                          <div class="col-sm-2">
                  
                          <?php $he_date = date('d',$userDetails['dob_gentleman']); 
                                  $he_mon = date('m',$userDetails['dob_gentleman']); 
                                  $he_year = date('Y',$userDetails['dob_gentleman']); 
                            ?>
                                <select name="he_year" id="he_year" class="form-control">
                                    <option value="0">Year</option>
                                    <?php for($i=date('Y')-18;$i>date('Y')-78;$i--){ ?>
                                      <option value="<?php echo $i; ?>" <?php if($he_year==$i){ echo 'selected'; }?>><?php echo $i; ?></option>
                                    <?php } ?>  
                                </select>
                                </div>
                                <div class="col-sm-2">
                                <select name="he_month" id="he_month" class="month" class="form-control">
                                    <option value="0">Month</option>
                                    <option value="1" <?php if($he_mon==1 || $he_mon==01){ echo 'selected'; }?>>Jan</option>
                                    <option value="2" <?php if($he_mon==2 || $he_mon==02){ echo 'selected'; }?>>Feb</option>
                                    <option value="3" <?php if($he_mon==3 || $he_mon==03){ echo 'selected'; }?>>Mar</option>
                                    <option value="4" <?php if($he_mon==4 || $he_mon==04){ echo 'selected'; }?>>Apr</option>
                                    <option value="5" <?php if($he_mon==5 || $he_mon==05){ echo 'selected'; }?>>May</option>
                                    <option value="6" <?php if($he_mon==6 || $he_mon==06){ echo 'selected'; }?>>Jun</option>
                                    <option value="7" <?php if($he_mon==7 || $he_mon==07){ echo 'selected'; }?>>Jul</option>
                                    <option value="8" <?php if($he_mon==8 || $he_mon==08){ echo 'selected'; }?>>Aug</option>
                                    <option value="9" <?php if($he_mon==9 || $he_mon==09){ echo 'selected'; }?>>Sep</option>
                                    <option value="10" <?php if($he_mon==10){ echo 'selected'; }?>>Oct</option>
                                    <option value="11" <?php if($he_mon==11){ echo 'selected'; }?>>Nov</option>
                                    <option value="12" <?php if($he_mon==12){ echo 'selected'; }?>>Dec</option>
                                </select>
                                </div>
                                <div class="col-sm-2">
                                <select name="he_date" id="he_date" class="day" class="form-control">
                                    <option value="0">Day</option>
                                    <?php for($j=1;$j<32;$j++){ ?>
                                      <option value="<?php echo $j; ?>" <?php if($he_date==$j){ echo 'selected'; }?>><?php echo $j; ?></option>
                                    <?php } ?>  
                                </select>
                            </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Physis</label>

                  <div class="col-sm-6">

                    
                                <select name="he_physis" id="he_physis" class="form-control">
                                    <option value="">--</option>
                                    <option value="Adventurous" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Adventurous'){ echo 'selected'; }?>>Adventurous</option>
                                    <option value="Affectionate" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Affectionate'){ echo 'selected'; }?>>Affectionate</option>
                                    <option value="Appealing" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Appealing'){ echo 'selected'; }?>>Appealing</option>
                                    <option value="Athletic" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Athletic'){ echo 'selected'; }?>>Athletic</option>
                                    <option value="Attractive" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Attractive'){ echo 'selected'; }?>>Attractive</option>
                                    <option value="Beautiful" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Beautiful'){ echo 'selected'; }?>>Beautiful</option>
                                    <option value="Caring" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Caring'){ echo 'selected'; }?>>Caring</option>
                                    <option value="Charming" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Charming'){ echo 'selected'; }?>>Charming</option>
                                    <option value="Classy" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Classy'){ echo 'selected'; }?>>Classy</option>
                                    <option value="Curvy" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Curvy'){ echo 'selected'; }?>>Curvy</option>
                                    <option value="Dreamy" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Dreamy'){ echo 'selected'; }?>>Dreamy</option>
                                    <option value="Educated" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Educated'){ echo 'selected'; }?>>Educated</option>
                                    <option value="Elegant" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Elegant'){ echo 'selected'; }?>>Elegant</option>
                                    <option value="Experienced" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Experienced'){ echo 'selected'; }?>>Experienced</option>
                                    <option value="Feminine" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Feminine'){ echo 'selected'; }?>>Feminine</option>
                                    <option value="Fit" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Fit'){ echo 'selected'; }?>>Fit</option>
                                    <option value="Gorgeous" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Gorgeous'){ echo 'selected'; }?>>Gorgeous</option>
                                    <option value="Handsome" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Handsome'){ echo 'selected'; }?>>Handsome</option>
                                    <option value="Hot" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Hot'){ echo 'selected'; }?>>Hot</option>
                                    <option value="Intelectual" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Intelectual'){ echo 'selected'; }?>>Intelectual</option>
                                    <option value="Lovely" <?php if(!empty($userDetails) && ucfirst($userDetails['physis_gentleman'])=='Lovely'){ echo 'selected'; }?>>Lovely</option>
                                    <option value="Luscious" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Luscious'){ echo 'selected'; }?>>Luscious</option>
                                    <option value="Masculine" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Masculine'){ echo 'selected'; }?>>Masculine</option>
                                    <option value="Muscular" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Muscular'){ echo 'selected'; }?>>Muscular</option>
                                    <option value="Natural" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Natural'){ echo 'selected'; }?>>Natural</option>
                                    <option value="Passionate" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Passionate'){ echo 'selected'; }?>>Passionate</option>
                                    <option value="Pretty" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Pretty'){ echo 'selected'; }?>>Pretty</option>
                                    <option value="Respectful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Respectful'){ echo 'selected'; }?>>Respectful</option>
                                    <option value="Romantic" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Romantic'){ echo 'selected'; }?>>Romantic</option>
                                    <option value="Seductive" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Seductive'){ echo 'selected'; }?>>Seductive</option>
                                    <option value="Sexy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Sexy'){ echo 'selected'; }?>>Sexy</option>
                                    <option value="Shapely" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Shapely'){ echo 'selected'; }?>>Shapely</option>
                                    <option value="Shy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Shy'){ echo 'selected'; }?>>Shy</option>
                                    <option value="Skinny" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Skinny'){ echo 'selected'; }?>>Skinny</option>
                                    <option value="Strong" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Strong'){ echo 'selected'; }?>>Strong</option>
                                    <option value="Stylish" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Stylish'){ echo 'selected'; }?>>Stylish</option>
                                    <option value="Tall" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Tall'){ echo 'selected'; }?>>Tall</option>
                                    <option value="Tattooed" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Tattooed'){ echo 'selected'; }?>>Tattooed</option>
                                    <option value="Warm" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Warm'){ echo 'selected'; }?>>Warm</option>
                                    <option value="Wealthy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Wealthy'){ echo 'selected'; }?>>Wealthy</option>
                                    <option value="Youthful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Youthful'){ echo 'selected'; }?>>Youthful</option>
                                </select>
                  </div>

                </div>
                </div>
              <?php } else { ?>
              <div style="border: 1px solid #b3975b ; border-radius: 5px; margin-bottom: 20px; padding : 15px;">
              <h4>SHE</h4>  
                <div class="form-group">

                  <label class="col-sm-2 control-label">AGE</label>

                          <div class="col-sm-2">
                          <?php $she_date = date('d',$userDetials['dob_lady']); 
                                  $she_mon = date('m',$userDetials['dob_lady']); 
                                  $she_year = date('Y',$userDetials['dob_lady']); 
                            ?>
                                <select name="she_year" id="she_year" class="form-control">
                                    <option value="0">Year</option>
                                    <?php for($i=date('Y')-18;$i>date('Y')-78;$i--){ ?>
                                      <option value="<?php echo $i; ?>" <?php if($she_year==$i){ echo 'selected'; }?>><?php echo $i; ?></option>
                                    <?php } ?>  
                                </select>
                                </div>
                                <div class="col-sm-2">
                                <select name="she_month" id="she_month" class="month" class="form-control">
                                     <option value="0">Month</option>
                                    <option value="1" <?php if($she_mon==1 || $she_mon==01){ echo 'selected'; }?>>Jan</option>
                                    <option value="2" <?php if($she_mon==2 || $she_mon==02){ echo 'selected'; }?>>Feb</option>
                                    <option value="3" <?php if($she_mon==3 || $she_mon==03){ echo 'selected'; }?>>Mar</option>
                                    <option value="4" <?php if($she_mon==4 || $she_mon==04){ echo 'selected'; }?>>Apr</option>
                                    <option value="5" <?php if($she_mon==5 || $she_mon==05){ echo 'selected'; }?>>May</option>
                                    <option value="6" <?php if($she_mon==6 || $she_mon==06){ echo 'selected'; }?>>Jun</option>
                                    <option value="7" <?php if($she_mon==7 || $she_mon==07){ echo 'selected'; }?>>Jul</option>
                                    <option value="8" <?php if($she_mon==8 || $she_mon==08){ echo 'selected'; }?>>Aug</option>
                                    <option value="9" <?php if($she_mon==9 || $she_mon==09){ echo 'selected'; }?>>Sep</option>
                                    <option value="10" <?php if($she_mon==10){ echo 'selected'; }?>>Oct</option>
                                    <option value="11" <?php if($she_mon==11){ echo 'selected'; }?>>Nov</option>
                                    <option value="12" <?php if($she_mon==12){ echo 'selected'; }?>>Dec</option>
                                </select>
                                </div>
                                <div class="col-sm-2">
                                <select name="she_date" id="she_date" class="day" class="form-control">
                                    <option value="0">Day</option>
                                    <?php for($j=1;$j<32;$j++){ ?>
                                      <option value="<?php echo $j; ?>" <?php if($she_date==$j){ echo 'selected'; }?>><?php echo $j; ?></option>
                                    <?php } ?>  
                                </select>
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Physis</label>

                  <div class="col-sm-6">

                    
                                <select name="she_physis" id="she_physis" class="form-control">
                                    <option value="">--</option>
                                    <option value="Adventurous" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Adventurous'){ echo 'selected'; }?>>Adventurous</option>
                                    <option value="Affectionate" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Affectionate'){ echo 'selected'; }?>>Affectionate</option>
                                    <option value="Appealing" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Appealing'){ echo 'selected'; }?>>Appealing</option>
                                    <option value="Athletic" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Athletic'){ echo 'selected'; }?>>Athletic</option>
                                    <option value="Attractive" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Attractive'){ echo 'selected'; }?>>Attractive</option>
                                    <option value="Beautiful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Beautiful'){ echo 'selected'; }?>>Beautiful</option>
                                    <option value="Caring" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Caring'){ echo 'selected'; }?>>Caring</option>
                                    <option value="Charming" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Charming'){ echo 'selected'; }?>>Charming</option>
                                    <option value="Classy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Classy'){ echo 'selected'; }?>>Classy</option>
                                    <option value="Curvy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Curvy'){ echo 'selected'; }?>>Curvy</option>
                                    <option value="Dreamy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Dreamy'){ echo 'selected'; }?>>Dreamy</option>
                                    <option value="Educated" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Educated'){ echo 'selected'; }?>>Educated</option>
                                    <option value="Elegant" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Elegant'){ echo 'selected'; }?>>Elegant</option>
                                    <option value="Experienced" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Experienced'){ echo 'selected'; }?>>Experienced</option>
                                    <option value="Feminine" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Feminine'){ echo 'selected'; }?>>Feminine</option>
                                    <option value="Fit" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Fit'){ echo 'selected'; }?>>Fit</option>
                                    <option value="Gorgeous" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Gorgeous'){ echo 'selected'; }?>>Gorgeous</option>
                                    <option value="Handsome" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Handsome'){ echo 'selected'; }?>>Handsome</option>
                                    <option value="Hot" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Hot'){ echo 'selected'; }?>>Hot</option>
                                    <option value="Intelectual" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Intelectual'){ echo 'selected'; }?>>Intelectual</option>
                                    <option value="Lovely" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Lovely'){ echo 'selected'; }?>>Lovely</option>
                                    <option value="Luscious" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Luscious'){ echo 'selected'; }?>>Luscious</option>
                                    <option value="Masculine" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Masculine'){ echo 'selected'; }?>>Masculine</option>
                                    <option value="Muscular" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Muscular'){ echo 'selected'; }?>>Muscular</option>
                                    <option value="Natural" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Natural'){ echo 'selected'; }?>>Natural</option>
                                    <option value="Passionate" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Passionate'){ echo 'selected'; }?>>Passionate</option>
                                    <option value="Pretty" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Pretty'){ echo 'selected'; }?>>Pretty</option>
                                    <option value="Respectful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Respectful'){ echo 'selected'; }?>>Respectful</option>
                                    <option value="Romantic" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Romantic'){ echo 'selected'; }?>>Romantic</option>
                                    <option value="Seductive" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Seductive'){ echo 'selected'; }?>>Seductive</option>
                                    <option value="Sexy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Sexy'){ echo 'selected'; }?>>Sexy</option>
                                    <option value="Shapely" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Shapely'){ echo 'selected'; }?>>Shapely</option>
                                    <option value="Shy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Shy'){ echo 'selected'; }?>>Shy</option>
                                    <option value="Skinny" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Skinny'){ echo 'selected'; }?>>Skinny</option>
                                    <option value="Strong" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Strong'){ echo 'selected'; }?>>Strong</option>
                                    <option value="Stylish" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Stylish'){ echo 'selected'; }?>>Stylish</option>
                                    <option value="Tall" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Tall'){ echo 'selected'; }?>>Tall</option>
                                    <option value="Tattooed" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Tattooed'){ echo 'selected'; }?>>Tattooed</option>
                                    <option value="Warm" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Warm'){ echo 'selected'; }?>>Warm</option>
                                    <option value="Wealthy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Wealthy'){ echo 'selected'; }?>>Wealthy</option>
                                    <option value="Youthful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_lady'])=='Youthful'){ echo 'selected'; }?>>Youthful</option>
                                </select>
                  </div>

                </div>
                </div>
                <div style="border: 1px solid #b3975b ; border-radius: 5px; margin-bottom: 20px; padding : 15px;">
                <h4>HE</h4>
                <div class="form-group">

                  <label class="col-sm-2 control-label">AGE</label>

                          <div class="col-sm-2">
                          <?php $he_date = date('d',$userDetials['dob_gentleman']); 
                                  $he_mon = date('m',$userDetials['dob_gentleman']); 
                                  $he_year = date('Y',$userDetials['dob_gentleman']); 
                            ?>
                                <select name="he_year" id="he_year" class="form-control">
                                    <option value="0">Year</option>
                                    <?php for($i=date('Y')-18;$i>date('Y')-78;$i--){ ?>
                                      <option value="<?php echo $i; ?>" <?php if($he_year==$i){ echo 'selected'; }?>><?php echo $i; ?></option>
                                    <?php } ?>  
                                </select>
                                </div>
                                <div class="col-sm-2">
                                <select name="he_month" id="he_month" class="month" class="form-control">
                                    <option value="0">Month</option>
                                    <option value="1" <?php if($he_mon==1 || $he_mon==01){ echo 'selected'; }?>>Jan</option>
                                    <option value="2" <?php if($he_mon==2 || $he_mon==02){ echo 'selected'; }?>>Feb</option>
                                    <option value="3" <?php if($he_mon==3 || $he_mon==03){ echo 'selected'; }?>>Mar</option>
                                    <option value="4" <?php if($he_mon==4 || $he_mon==04){ echo 'selected'; }?>>Apr</option>
                                    <option value="5" <?php if($he_mon==5 || $he_mon==05){ echo 'selected'; }?>>May</option>
                                    <option value="6" <?php if($he_mon==6 || $he_mon==06){ echo 'selected'; }?>>Jun</option>
                                    <option value="7" <?php if($he_mon==7 || $he_mon==07){ echo 'selected'; }?>>Jul</option>
                                    <option value="8" <?php if($he_mon==8 || $he_mon==08){ echo 'selected'; }?>>Aug</option>
                                    <option value="9" <?php if($he_mon==9 || $he_mon==09){ echo 'selected'; }?>>Sep</option>
                                    <option value="10" <?php if($he_mon==10){ echo 'selected'; }?>>Oct</option>
                                    <option value="11" <?php if($he_mon==11){ echo 'selected'; }?>>Nov</option>
                                    <option value="12" <?php if($he_mon==12){ echo 'selected'; }?>>Dec</option>
                                </select>
                                </div>
                                <div class="col-sm-2">
                                <select name="he_date" id="he_date" class="day" class="form-control">
                                    <option value="0">Day</option>
                                    <?php for($j=1;$j<32;$j++){ ?>
                                      <option value="<?php echo $j; ?>" <?php if($he_date==$j){ echo 'selected'; }?>><?php echo $j; ?></option>
                                    <?php } ?>  
                                </select>
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Physis</label>

                  <div class="col-sm-6">

                    
                                <select name="he_physis" id="he_physis" class="form-control">
                                    <option value="">--</option>
                                    <option value="Adventurous" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Adventurous'){ echo 'selected'; }?>>Adventurous</option>
                                    <option value="Affectionate" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Affectionate'){ echo 'selected'; }?>>Affectionate</option>
                                    <option value="Appealing" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Appealing'){ echo 'selected'; }?>>Appealing</option>
                                    <option value="Athletic" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Athletic'){ echo 'selected'; }?>>Athletic</option>
                                    <option value="Attractive" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Attractive'){ echo 'selected'; }?>>Attractive</option>
                                    <option value="Beautiful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Beautiful'){ echo 'selected'; }?>>Beautiful</option>
                                    <option value="Caring" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Caring'){ echo 'selected'; }?>>Caring</option>
                                    <option value="Charming" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Charming'){ echo 'selected'; }?>>Charming</option>
                                    <option value="Classy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Classy'){ echo 'selected'; }?>>Classy</option>
                                    <option value="Curvy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Curvy'){ echo 'selected'; }?>>Curvy</option>
                                    <option value="Dreamy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Dreamy'){ echo 'selected'; }?>>Dreamy</option>
                                    <option value="Educated" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Educated'){ echo 'selected'; }?>>Educated</option>
                                    <option value="Elegant" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Elegant'){ echo 'selected'; }?>>Elegant</option>
                                    <option value="Experienced" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Experienced'){ echo 'selected'; }?>>Experienced</option>
                                    <option value="Feminine" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Feminine'){ echo 'selected'; }?>>Feminine</option>
                                    <option value="Fit" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Fit'){ echo 'selected'; }?>>Fit</option>
                                    <option value="Gorgeous" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Gorgeous'){ echo 'selected'; }?>>Gorgeous</option>
                                    <option value="Handsome" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Handsome'){ echo 'selected'; }?>>Handsome</option>
                                    <option value="Hot" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Hot'){ echo 'selected'; }?>>Hot</option>
                                    <option value="Intelectual" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Intelectual'){ echo 'selected'; }?>>Intelectual</option>
                                    <option value="Lovely" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Lovely'){ echo 'selected'; }?>>Lovely</option>
                                    <option value="Luscious" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Luscious'){ echo 'selected'; }?>>Luscious</option>
                                    <option value="Masculine" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Masculine'){ echo 'selected'; }?>>Masculine</option>
                                    <option value="Muscular" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Muscular'){ echo 'selected'; }?>>Muscular</option>
                                    <option value="Natural" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Natural'){ echo 'selected'; }?>>Natural</option>
                                    <option value="Passionate" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Passionate'){ echo 'selected'; }?>>Passionate</option>
                                    <option value="Pretty" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Pretty'){ echo 'selected'; }?>>Pretty</option>
                                    <option value="Respectful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Respectful'){ echo 'selected'; }?>>Respectful</option>
                                    <option value="Romantic" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Romantic'){ echo 'selected'; }?>>Romantic</option>
                                    <option value="Seductive" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Seductive'){ echo 'selected'; }?>>Seductive</option>
                                    <option value="Sexy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Sexy'){ echo 'selected'; }?>>Sexy</option>
                                    <option value="Shapely" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Shapely'){ echo 'selected'; }?>>Shapely</option>
                                    <option value="Shy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Shy'){ echo 'selected'; }?>>Shy</option>
                                    <option value="Skinny" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Skinny'){ echo 'selected'; }?>>Skinny</option>
                                    <option value="Strong" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Strong'){ echo 'selected'; }?>>Strong</option>
                                    <option value="Stylish" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Stylish'){ echo 'selected'; }?>>Stylish</option>
                                    <option value="Tall" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Tall'){ echo 'selected'; }?>>Tall</option>
                                    <option value="Tattooed" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Tattooed'){ echo 'selected'; }?>>Tattooed</option>
                                    <option value="Warm" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Warm'){ echo 'selected'; }?>>Warm</option>
                                    <option value="Wealthy" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Wealthy'){ echo 'selected'; }?>>Wealthy</option>
                                    <option value="Youthful" <?php if(!empty($userDetials) && ucfirst($userDetials['physis_gentleman'])=='Youthful'){ echo 'selected'; }?>>Youthful</option>
                                </select>
                  </div>

                </div>
                </div>
              <?php } ?>  
                <div class="form-group">

                  <label class="col-sm-2 control-label">About Text</label>

                  <div class="col-sm-6">
                    <textarea name="about" class="form-control"><?php if(!empty($userDetails)) { echo $userDetails['about']; } ?></textarea>
                  <script>
                           CKEDITOR.replace( 'about',{
                                    filebrowserBrowseUrl : '/castle/fileman/index.html',
                                    filebrowserImageBrowseUrl : '/castle/fileman/index.html?type=image',
                                    removeDialogTabs: 'link:upload;image:upload'
                            });
                        </script> 
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Preferences</label>

                  <div class="col-sm-6">

                    <select name="preferences" class="form-control">
                        <option value="" <?php if(!empty($userDetails) && $userDetails['preferences']=='') { echo 'selected'; }?>>Keine</option>
                        <option value="soft_swap" <?php if(!empty($userDetails) && $userDetails['preferences']=='soft_swap') { echo 'selected'; }?>> Soft Swap </option>
                        <option value="full_swap" <?php if(!empty($userDetails) && $userDetails['preferences']=='full_swap') { echo 'selected'; }?>> Full Swap </option>
                    </select>
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Interested In</label>

                  <div class="col-sm-6">
                    <input type="checkbox" name="interested_lady" value="1" <?php if(!empty($userDetails) && $userDetails['interested_in_ladies']==1) { echo 'checked'; }?>>Ladies
                    <input type="checkbox" name="interested_gen" value="1" <?php if(!empty($userDetails) && $userDetails['interested_in_gentlemen']==1) { echo 'checked'; }?>>Gentleman
                    <input type="checkbox" name="interested_couple" value="1" <?php if(!empty($userDetails) && $userDetails['interested_in_couples']==1) { echo 'checked'; }?>>Couples
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Country</label>

                  <div class="col-sm-6">

                    <select name="country" class="form-control">
                          <option value="">--Select Country--</option>
                      <?php if(!empty($coutries)){
                            foreach($coutries as $row){?>
                              <option value="<?php echo $row['country_code']; ?>" <?php if(!empty($userDetails) && $userDetails['country']==$row['country_code']){ echo 'selected'; }?>><?php echo $row['country_name']; ?></option>
                          <?php } } ?>    
                    </select>
                  </div>

                </div>
                <div class="form-group">

                  <label class="col-sm-2 control-label">Language</label>

                  <div class="col-sm-6">

                    <select name="language" class="form-control">
                      <?php if(!empty($languages)){
                            foreach($languages as $row){?>
                              <option value="<?php echo $row['id']; ?>" <?php if(!empty($userDetails) && $userDetails['userlanguage']==$row['id']){ echo 'selected'; }?>><?php echo $row['name']; ?></option>
                          <?php } } ?>   
                    </select>
                  </div>

                </div>

                <div class="form-group">

                  <label class="col-sm-2 control-label">Images</label>

                  <div class="col-sm-6">
                    <?php if(!empty($avatarImage)){
                    ?>
                      <div class="col-md-6">
                        <?php if($avatarImage['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$avatarImage['path'].'/'.$avatarImage['filename'].'.'.$avatarImage['extension']))
                          { ?>
                        <img src="<?php echo base_url(); ?>assets/userfiles/<?php echo $avatarImage['path']; ?>/<?php echo $avatarImage['filename']; ?>.<?php echo $avatarImage['extension']; ?>" class="img-responsive">
                        <?php  } else { ?>
                        <img class="" src="<?php echo base_url();?>assets/images/default-avatar.jpg" alt="user image" title="">
                      <?php }  ?>
                        <a href="<?php echo  base_url();?>admin/dashboard/delete/<?php echo base64_encode($avatarImage['id']); ?>/<?php echo str_replace('/','-',uri_string()); ?>" class="" onclick="return confirm('Are you sure')">
                          <i class="fa fa-trash tooltipstered"></i>
                        </a>
                      </div>
                    <?php
                          }
                      ?>
                    <?php if(!empty($memberImages)){
                          foreach ($memberImages as $value) {
                    ?>
                      <div class="col-md-6">
                        <?php if($value['filename']!='' && file_exists(FCPATH.'assets/userfiles/'.$value['path'].'/'.$value['filename'].'.'.$value['extension']))
                          { ?>
                        <img src="<?php echo base_url(); ?>assets/userfiles/<?php echo $value['path']; ?>/<?php echo $value['filename']; ?>.<?php echo $value['extension']; ?>" class="img-responsive">
                        <?php  } else { ?>
                        <img class="" src="<?php echo base_url();?>assets/images/default-avatar.jpg" alt="user image" title="">
                      <?php }  ?>
                        
                        <a href="<?php echo  base_url();?>admin/dashboard/delete/<?php echo base64_encode($value['id']); ?>/<?php echo str_replace('/','-',uri_string()); ?>" class="" onclick="return confirm('Are you sure')">
                          <i class="fa fa-trash tooltipstered"></i>
                        </a>
                      </div>
                    <?php
                          }
                      }?>

                      <!--<input type="file" name="imagefile" value="Upload" class="form-control">
                      <input type="checkbox" name="is_private" value="1">Private Image-->
                  </div>

                </div>
                       

              </div>
             <div class="box-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                  <th>#</th>
                  <th>Order date</th>
                  <th>Cart value(&euro;)</th>
                  <th>Total(&euro;)</th>
                  <th>Payment method</th>
                  <th>Type</th>
                  <th>Status</th>
                </thead>
                 <?php if(count($orders)>0)
                { ?>
                <tbody>
                <?php 
                  $i=1;
                  foreach ($orders as $data) 
                  {
                ?>
                <tr>
                    <td><?php echo $i;?></td>
                    <td><?php echo date('d-m-Y h:i:s',$data['created']); ?></td>
                    <td><?php echo number_format($data['total_base']/100, 2,',', '.');?></td>
                    <td><?php echo number_format($data['total_sum']/100, 2,',', '.'); ?></td>
                    <td><?php if($data['payment_method_id']==12){ echo 'Bank Transfer'; } elseif($data['payment_method_id']==13){ echo 'Saferpay'; } elseif($data['payment_method_id']==14){ echo 'Stripe'; } else{ echo 'Pay by cash'; }?></td>
                    <td><?php if($data['event_id']!=''){ echo 'Booking'; } elseif ($data['is_booking']==1) { echo 'Booking'; } else { echo 'Membership'; }?></td> 
                    <td><?php if($data['payed'] == 1) { echo 'Paid'; } else{ echo 'Not Paid'; }?></td> 
                </tr>

               <?php $i++; } ?>
                </tbody>
                <?php } ?>
              </table>
            </div>

              <!-- /.box-body -->

              <div class="box-footer">

                <button type="button" onclick="return_back()"class="btn btn-default  margin-left  " >Cancel</button>

                <input type="submit" class="btn btn-info " value="Update" id="add">

              </div>

              <input type="hidden" name="frmSecurity" value="<?php echo $this->utility->getSecurity();?>"/>

              <!-- /.box-footer -->

            </form>

          </div>

          <!-- /.box -->

         

          <!-- /.box -->

        </div>

        <!--/.col (right) -->

      </div>

      <!-- /.row -->

    </section>

    <style type="text/css">

    .loader{

      position: fixed;

      left: 0;

      top: 0;

      right: 0;

      bottom: 0;

      width: 100%;

      height: 100%;

      background-color: rgba(0, 0, 0, 0.60);

      z-index: 9999;

      text-align: center;

    }

    .loader img{

      z-index: 99999;

      margin-top: 10%;

    }
    input#password {
        -webkit-text-security: disc;
        -moz-text-security: disc;
    }
    </style>

   <script type='text/javascript'>
      $("#add_frm").validate({
        rules: {
          email: {
            required: true,
            email:true
          },
          username:{
            required: true,
          },
          interested:{
            required:true
          },
          country:{
            required: true,
          }
        }
      });
    </script>

   <script type="text/javascript">
    function return_back()
    {
      var back_url='<?php echo base_url()?>admin/users/alllist';
      window.location=back_url;
    }
    
    $(function(){
      $("#example1").DataTable();
      $("#gen_dob").datetimepicker();
      $("#lady_dob").datetimepicker();

      $('.toggle').click(function(){
        if($(this).prev().attr('type')=='password')
        {
          $(this).prev().attr('type','text');
          $(this).html('Hide');
        }
        else
        {
          $(this).prev().attr('type','password');
          $(this).html('Show');
        }
      })
    })

   </script>