<!DOCTYPE html>

<html class="no-js" lang="en">
<head>
<?php

use App\Libraries\MyEncrypt;
$session = session();
$validation =  \Config\Services::validation();


echo view('user/common_style1');
echo view('user/common_header');
?>
<body style="background-image: url('styles/images/pattern.jpg');"> 

<link rel="stylesheet" href="<?php echo base_url();?>/styles/css/set1.css">
<style>
.contact_one .contact_left_content form input[type="text"]{border:0px;}
.input__label-content {
font-weight: normal;
color: #8d8d8d;
}
.form-group {
margin-bottom: 8px;
}
.input--hoshi select {
text-transform: none;
}

.contact_left_content .help-block {
padding: 0 10px 10px;
position: absolute;
}
.contact_page_btn button{
border: 1px solid #fff;
background-color: transparent;
width: 240px;
height: 50px;
margin: 5px 0 0 5px;
color: #fff;
font-weight: 700;
text-transform: uppercase;
position: relative;
z-index: 999;
}
.input--hoshi .select2-container {
border:0px;
height:50px;
padding:12px 20px;
width:100%;
font-size:16px;
background:#f9f9f9 url(styles/img/arw1.png) no-repeat right center;
margin-top:13px;
border-bottom: 1px solid #B9C1CA !important;
color:#8d8d8d;
transition: transform 0.3s;
}
a{
color:#595f6e;
/*cursor: default;*/
}
/*.form-group input {
min-height: 112px;
}*/

div.coun ul li div.select2-result-label{
cursor: default;
}
.select2-choice{
cursor: default;
}
div.coun small.help-block{
padding-top: 15px !important;
}
.contact_left_content .help-block {
width: 99%;
}
#select2-drop{
border: none;
}
.select2-input{
border: 1px solid #e6e6e6;
margin-top:5px;
}
.agree small {
padding-top: 20px !important;
}


.page-container{
overflow-x: hidden;
}
.yellow-btn button {
all: unset;
cursor: pointer;
}

.select2-container {
display: inline-block;
margin: 0;
position: relative;
vertical-align: middle;
height: 35px;
}            

.help-block
{
color :rgb(169, 68, 66) !important;       
}
.small, small {
font-size: 11px;
color: red;
font-weight: 600;
}
</style>  
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>


<section class="bg-white form-page">
  <div class="container">
    <div class="row">
      <div class="col-lg-10 offset-lg-1">
        <div class="icon-square inner-box form-bg bg-white">
          <div class="row">
            <div class="col-lg-6">

            <div class="form-logo form-logo02 bg-primary text-center">
            <?php 
            $logo_img = site_info('site_logo');
            if($logo_img) {
            ?>
            <a  href="<?php echo base_url();?>"><img  src="<?php echo base_url();?>/content/site/<?php echo site_info('site_logo');?>" alt="<?php echo site_info('site_logo');?>"></a> 
            <?php } else { ?>
            <a href="<?php echo base_url();?>"><img src="<?php echo base_url();?>/styles/new_style/images/form-logo.png" class="img-fluid"></a> 
            <?php } ?> </a>
            </div>
            </div>

            <div class="col-lg-6">
              <div class="form-reg">
                <div class="row">

        <div class="form-container mb-10">    
          
<?php if($session->getFlashData('success_message')) {?>
<div class="row"><div class="col-lg-12 "><p class="frgtpwd frgtpwd1"><i class="fa fa-thumbs-up"></i><?php echo $session->getFlashData('success_message');?></p></div></div>
<?php } 
else if ($session->getFlashData('error_message')) 
{ 
?>
<div class="row"><div class="col-lg-12">  <p class="frgtpwd frgtpwd1 frgtpwdred"><i class="fa fa-thumbs-down"></i><?php echo $session->getFlashData('error_message');?></p></div></div>
<?php } else { }?>

<div class="form-title">
<h4 class="text-black mont"><?php echo lang('Register Here'); ?></h4>
</div>
<br>

<?php 
$us_data = userMinPass();
?> 
<form class="steps-validation create-user" method="post" action="<?php echo base_url();?>/user/register/reg1">
<div class="col-md-12">
    <div class="form">                                      
       

        <div class="form-block form-group"> 
                <input name="first_name" class="form-control" type="text"  required="" id="first_name" placeholder="<?php echo 'Enter First Name'; ?>"/>
        </div>

         <div class="form-block form-group"> 
                <input name="last_name" class="form-control" type="text" id="last_name" required="" placeholder="<?php echo 'Enter Your Last Name'; ?>"/>
        </div>

        <div class="form-block form-group">
                <input name="password" class="form-control" type="password" id="input-4" required="" placeholder="<?php echo 'Enter your Password Here'; ?>"/>
        </div>
        <div class="form-block form-group"> 
                <input name="cpassword" class="form-control" type="password" id="input-3" required="" placeholder="<?php echo 'Please Retype your Password Here'; ?>"/>
        </div>
        <div class="form-block form-group"> 
               <select name="country" id="country" class="form-control">
                   <option>Select Country</option>
                   <?php foreach($country as $value) { ?>
                   <option value="<?php echo $value->iso_2;?>"><?php echo $value->Country;?></option>
                   <?php } ?>
               </select>
        </div>


       
        <div class="mt-3" style="display: none;"> 
            <div class="form-group has-feedback has-feedback-left agree">
                <span style="padding-top:13px" class="">
                    <input name="agree" class="" type="checkbox" id="" required="" data/>
                    <label class="" for="agree">
                        <span><a href="cms/terms"><?php echo 'Agree Terms and Conditions'; ?></a></span>
                    </label>
                </span>
            </div>
        </div>

    </div>
</div>
    <div style="clear:both;"><br></div>
            <div class="col-lg-12 mt-4">
                    <div class="form-btn text-center ">
                <button  class="btn btn-primary" type="submit"><?php echo 'Submit'; ?></button>
            </div>
        </div>
   
</form>

<!-- ============= contact_wrapper end ============== -->

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>


<?php
echo view('user/footer1');
?>
<?php
echo view('user/common_script');
?>
<script src="<?php echo base_url();?>/styles/js/jquery-1.12.2.min.js"></script>
<script src="<?php echo base_url();?>/styles/js/classie.js"></script>
<script src="<?php echo base_url();?>/styles/js/jquery.counterup.min.js"></script>
<script type="text/javascript">
(function() {

if (!String.prototype.trim) {
(function() {

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 ) {

if( inputEl.value.trim() !== '' ) {
classie.add( inputEl.parentNode, 'input--filled' );
}


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 type="text/javascript" src="<?php echo base_url();?>styles/js/jquery-parallax.js"></script>-->

<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 type="text/javascript">
jQuery.noConflict();
(function( $ ) {
$(function() {

$(document).ready(function() {

$('#referralname_check').change(function(){

$.ajax({
type: 'post',
url : '<?php echo base_url();?>/user/register/getfullname',
data : {'sponsor':$('#referralname_check').val()},
dataType: 'json',
success : function(msg)
{
if(msg['fullname']) {
    $('#sponsorname').val(msg['fullname']);
} else {
    $('#sponsorname').val('');
}
}
});

})

if ($("#simg").length > 0) {
function formatFlags(state) {
if (!state.id) return state.text;
return "<img style='padding-right:10px;' src='<?php echo base_url();?>/assets/images/flags/" + state.id.toLowerCase() + ".png'/>" + state.text;
}
$("#simg").select2({
formatResult: formatFlags,
formatSelection: formatFlags,
escapeMarkup: function(m) {
return m;
}
});
}

$('#simg').change(function(){
var id = $(this).val();
if(id) {
$.ajax({
type: 'post',
url : '<?php echo base_url();?>/user/register/changecountry',
data : {'id':id},
success : function(msg)
{
if(msg!=0) {
    $('#code').val('+'+msg);
    $('#co').addClass('input--filled');
}
}
});
}
});


$("#refresh").on('click', function(e) {
$.ajax({
type: 'post',
url : '<?php echo base_url();?>/user/register/refersh',
data : { },
success : function(msg)
{
$("#capt").attr('src',msg);
}
});
});

$('.create-user').formValidation({
framework: 'bootstrap',
fields: {
<?php if(isset($us_data)) { ?>

first_name: {
validators: {
notEmpty: {
    message: '<?php echo "User First Name Cannot be Empty";?>'
},
stringLength: {
min: 0,
}
}
},

last_name: {
validators: {
notEmpty: {
    message: '<?php echo "User Last Name Cannot be Empty";?>'
},
stringLength: {
min: 0,
}
}
},



password: {
validators: {
notEmpty: {
    message: '<?php echo "User Password Cannot be Empty";?>'
},
stringLength: {
min: <?php echo $us_data;?>,
message: '<?php echo ("user_password_limit");?><?php echo $us_data;?>'
}

}
},
cpassword: {
validators: {
notEmpty: {
    message: '<?php echo "Confirm Password Cannot be Empty";?>'
},
stringLength: {
min: <?php echo $us_data;?>,
message: '<?php echo ("user_confirmpassword_limit");?><?php echo $us_data;?>',
},
identical: {
    field: "password",
    message: '<?php echo "Confirm Password did not match";?>'
}

}
},
<?php } else { ?>

password: {
validators: {
notEmpty: {
    message: '<?php echo "User Password cannot be Empty";?>'
}

}
},
cpassword: {
validators: {
notEmpty: {
    message: '<?php echo "User Confirm Password Cannot be Empty";?>'
},
identical: {
    field: "password",
    message: '<?php echo "User Confirmpassword did not match";?>'
}

}
},
<?php } ?>



// agree: {
// validators: {
// notEmpty: {
//     message: '<?php echo "Please Agree Terms And Conditions before Submit the Form";?>'
// }
// }
// }

}
})

});

});
})(jQuery);

</script>
</body>
</html>