<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <?php

      use App\Libraries\MyEncrypt;
      use App\Helpers\site_helper;
      $this->db = db_connect();
      $this->session = session();
      $this->common_model = model('CommonModel');
           echo view('user/common_style1');

           echo view('user/common_style');
 ?>
 
<link rel="stylesheet" href="<?php echo base_url();?>styles/css/dropify.min.css">
<!-- <link rel="stylesheet" href="<?php echo base_url();?>styles/css/style.css"> -->
 <style>
  .contact_one .contact_left_content form input[type="text"]{border:0px;}
  .prfledit label, .prfledit label {
  padding-top: 10px;
}
.profilesub ul li label{
  display: inline;
  color: #eb5055;
}
.help-block {
    color: #eb5055;
    margin: 0em 0em 0em !important;
}
p.frgtpwd {

text-transform: none;
  }

.dropify-wrapper {
  border: 1px solid rgba(33, 33, 33, 0.1); }

.dropzone {
  border: 1px solid rgba(33, 33, 33, 0.1);
  min-height: 200px;
  background: transparent; }
  .dropzone .dz-preview.dz-image-preview {
    background: transparent none repeat scroll 0 0; }

.button-example {
  padding: 15px;
  background: #000;
}

.button {
  display: inline-block;
  padding: 10px 15px;
  font-family: Helvetica, Arial, sans-serif;
  border: 3px solid #aaa;
  border-radius: 6px;
  cursor: pointer;
}

.button-green {
  background: #1ec279;
  border-color: #1ec279;
  color: #fff;
}

.button-green.button-outline {
  background: none;
}

.button-green:hover {
  background: #19a969;
  border-color: #19a969;
}

.button-view a:hover{
  opacity: 0.1;
}


  </style>
        
</head>
<body>
<div id="preloader">
            <div class="preloader_spinner"> </div>
        </div>
<section class="body_wrapper home_one">
  
         
           <?php
                echo view('user/common_header');
                echo view('user/login_header');
            ?>           
  
 
    <?php 
      $us_data = userMinPass();
    ?> 
    <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
      <div class="table-list clearfix">

      <?php
            $resu=$this->db->query("select * from site_controls where site_id='390'");
            $das=$resu->getResult();
            if($das[0]->site_value=='on')
            {
                if(isset($username->proof_verify))
                {
                  if($username->proof_verify=='' || $username->proof_verify=='2')
                  {
                    $user_dat="1";
                    $cls="display:block;";
                  }
                  else
                  {
                    $user_dat="0";
                    $cls="display:none";
                  }
                }
                else
                {
                  $user_dat="1";
                  $cls="display:block;";
                }
            }  
              
              $prof_doc =  explode('.',$getuser->proof_doc);
              $prof_ver =  explode('.',$getuser->proof_id);

      ?>



      <form class="steps-validation change_trpwd" method="post" action="<?php echo $action;?>" enctype="multipart/form-data">
        <div class="row">
                <div class="profilesub clearfix profilesub2">
                        <h4 class="other-title theme-color"> <span><?php echo lang('language_lang.menu_sub_kyclist'); ?></span></h4>
                        <?php if($this->session->getFlashData('success_message')) {?>
                             <div class="col-lg-12 ">     <p class="frgtpwd frgtpwd1"><i class="fa fa-thumbs-up"></i><?php echo $this->session->getFlashData('success_message');?></p></div>
                              <?php } elseif ($this->session->getFlashData('error_message')) { ?>
                                <div class="col-lg-12">  <p class="frgtpwd frgtpwd1 frgtpwdred"><i class="fa fa-thumbs-down"></i><?php echo $this->session->getFlashData('error_message');?></p></div>
                              <?php } else { }?>
                              <div class="col-lg-12 mt-10">
                                <span class="text-gray mt-15 text-center"><?php echo lang('language_lang.kfc_description');?></span>
                              </div> 

                              <?php
                                if($getuser->proof_verify=="")
                                {
                              ?>                                                            
                                  <div class="col-sm-12 mt-30">                               
                                      <div class="col-sm-6 ol-md-6 col-xs-12" style="<?php echo $cls;?>">
                                        <div class="panel panel-default card-view">
                                          <div class="panel-heading">
                                            <div class="pull-left">
                                              <h6 class="panel-title txt-dark"> <?php echo lang('language_lang.place_user_proid');?></h6>
                                            </div>
                                            <div class="clearfix"></div>
                                          </div>
                                          <div class="panel-wrapper collapse in">
                                            <div class="panel-body">                                         
                                                <input type="file" id="input-file-now" class="dropify" name="proof_id" />
                                                <div class="messageContainer"></div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                      <div class="col-sm-6 col-md-6 col-xs-12" style="<?php echo $cls;?>">
                                          <div class="panel panel-default card-view">
                                              <div class="panel-heading">
                                                <div class="pull-left">
                                                  <h6 class="panel-title txt-dark"><?php echo lang('language_lang.place_user_prodoc'); ?></h6>
                                                </div>
                                                <div class="clearfix"></div>
                                              </div>
                                              <div class="panel-wrapper collapse in">
                                                <div class="panel-body">                                         
                                                    <input type="file" id="input-file-now" class="dropify" name="proof_doc"/>
                                                    <div class="messageContainer"></div>
                                                </div>
                                              </div>
                                          </div>
                                      </div>
                                  </div>

                                  <div class="col-sm-12">
                                      <div style="margin-top: 0" class="sectioncont">
                                          <input type="hidden" value="1" name="reset_upload" id="reset_upload">
                                          <?php echo lang('language_lang.kfc_requirements'); ?>
                                      </div>
                                  </div>

                                  <div class="cmmn col-lg-12">
                                    <div class="contact_page_btn">
                                        <button type="submit" class="yellow-btn"><?php echo lang('language_lang.contact_submit'); ?></button>
                                    </div>
                              </div>                                  

                               <?php
                               }
                               else if($getuser->proof_verify=="0")
                               {?>
                                  <div class="col-sm-12 mt-30">
                                        <p class="frgtpwd frgtpwd1"><i class="fa fa-thumbs-up"></i><?php echo lang('language_lang.menu_kfc_request_send');?>
                                         </p>
                                  </div>
                               <?}
                               else if($getuser->proof_verify=="1")
                               {?>
                                  <div class="col-sm-12 mt-30">                               
                                      <div class="col-sm-6 ol-md-6 col-xs-12" style="<?php echo $cls;?>">
                                        <div class="panel panel-default card-view">
                                          <div class="panel-heading">
                                            <div class="pull-left">
                                              <h6 class="panel-title txt-dark"> <?php echo lang('language_lang.place_user_proid');?></h6>
                                            </div>
                                            <div class="clearfix"></div>
                                          </div>
                                          <div class="panel-wrapper collapse in button-view">
                                            <div class="panel-body" style="max-height:280px;max-width:200px">     
                                            <?php
                                              if($prof_ver[1]!='pdf')
                                              {?>
                                                <img class="img-responsive" style="text-align:center;" src="<?php echo base_url().'uploads/'.$getuser->proof_id;?>">
                                              <?php
                                              }
                                              else
                                              {?>
                                                <img class="img-responsive"  style="text-align:center;" src="<?php echo base_url()?>styles/images/pdf.png">                                    
                                              <?}?>                                      
                                            </div>
                                          </div>
                                        </div>
                                        <a class="btn btn-default" href="<?php echo base_url().'uploads/'.$getuser->proof_id;?>" target="_blank">Click here to view</a>
                                      </div>
                                      <div class="col-sm-6 col-md-6 col-xs-12" style="<?php echo $cls;?>">
                                          <div class="panel panel-default card-view">
                                              <div class="panel-heading">
                                                <div class="pull-left">
                                                  <h6 class="panel-title txt-dark"><?php echo lang('language_lang.place_user_prodoc'); ?></h6>
                                                </div>
                                                <div class="clearfix"></div>
                                              </div>
                                              <div class="panel-wrapper collapse in">
                                                <div class="panel-body" style="max-height:280px;min-width:200px;">                                         
                                                <?php
                                                if($prof_doc[1]!='pdf')
                                                {?>
                                                  <img class="img-responsive"  style="text-align:center;" src="<?php echo base_url().'uploads/'.$getuser->proof_doc;?>">                                    
                                                <?
                                                }else
                                                {?>
                                                  <img class="img-responsive"  style="text-align:center;" src="<?php echo base_url()?>styles/images/pdf.png">                                    
                                                <?}?>  
                                                    <!--<input type="file" id="input-file-now" class="dropify" name="proof_doc"/>-->
                                                </div>
                                              </div>
                                          </div>
                                          <a class="btn btn-default" target="_blank" href="<?php echo base_url().'uploads/'.$getuser->proof_doc;?>">Click here to view</a>
                                      </div>
                                  </div>

                               <?}
                               ?>   
                    </div>
                              
            </div>
            </form>
            <?php
                // $this->load->view('user/shortlinks');
            ?>
            
        </div>
    </div>
  </section>
  
 
  <section class="dmain">
    <div class="container">
        <div class="row">
           
            <div class="col-lg-12"> 
                <div class="">
                <div class="profilesub clearfix profilesub1">
                        
                          
                        
                            </div>
                </div>
            </div>
        </div>
    </div>
  </section>
  <section class="dmain">
  </section>
  <?php
                echo view('user/common_footer');
            ?>
</section>



<script src="<?php echo base_url();?>styles/js/jquery-1.12.2.min.js"></script>

<!-- <script src="<?php echo base_url();?>styles/js/bootstrap.min.js"></script> -->


<script src="<?php echo base_url();?>styles/js/form-file-upload-data.js"></script>
<script src="<?php echo base_url();?>styles/js/dropify.min.js"></script>
<!-- <script src="<?php echo base_url();?>styles/js/bootstrap.min.js"></script> -->

<!-- Bootsrap form validation JS files -->
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/formValidation.js"></script>
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/bootstrap.js"></script>
        
         <script src="<?php echo base_url();?>/assets/boots/js/select_min.js"></script>
    
       <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>/assets/boots/css/select2.css">


<script>
            (function() {

         $('.change_trpwd').formValidation({
                    framework: 'bootstrap',
                    excluded: [':disabled'],
                    
                    fields: {

                            proof_id: {
                                validators: {
                                    notEmpty: {
                                        message: '<?php echo lang("language_lang.user_proof_empty");?>'
                                    },
                                    file: {
                                        extension: 'jpg,jpeg,png,gif',
                                        message: '<?php echo lang("language_lang.user_proof_must");?>'
                                    }
                                }
                            },
                            proof_doc: {
                                validators: {
                                    notEmpty: {
                                        message: '<?php echo lang("language_lang.user_doc_empty");?>'
                                    },
                                    file: {
                                        extension: 'jpg,jpeg,png,gif,pdf',
                                        message: '<?php echo lang("language_lang.user_doc_must");?>'
                                    }
                                }
                            }
                    }
                })
               
                // trim polyfill : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
                if (!String.prototype.trim) {
                    (function() {
                        // Make sure we trim BOM and NBSP
                        var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
                        String.prototype.trim = function() {
                            return this.replace(rtrim, '');
                        };
                    })();
                }

                [].slice.call( document.querySelectorAll( 'input.input__field' ) ).forEach( function( inputEl ) {
                    // in case the input is already filled..
                    if( inputEl.value.trim() !== '' ) {
                        classie.add( inputEl.parentNode, 'input--filled' );
                    }

                    // events:
                    inputEl.addEventListener( 'focus', onInputFocus );
                    inputEl.addEventListener( 'blur', onInputBlur );
                } );

                function onInputFocus( ev ) {
                    classie.add( ev.target.parentNode, 'input--filled' );
                }

                function onInputBlur( ev ) {
                    if( ev.target.value.trim() === '' ) {
                        classie.remove( ev.target.parentNode, 'input--filled' );
                    }
                }
            })();
        </script>
    </script>

  <?php
    echo view('user/common_script');
  ?>
    

</body>
</html>
