<!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
            $this->load->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
          $this->load->view('user/header');
          $this->load->view('user/login_header');
          // $this->load->view('user/profileboard');
      ?>            
    <?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->result();
            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 $this->lang->line('menu_list_title'); ?></span></h4>
                        <?php if($this->session->flashdata('success_message')) {?>
                             <div class="col-lg-12 ">     <p class="frgtpwd frgtpwd1"><i class="fa fa-thumbs-up"></i><?php echo $this->session->flashdata('success_message');?></p></div>
                              <?php } elseif ($this->session->flashdata('error_message')) { ?>
                                <div class="col-lg-12">  <p class="frgtpwd frgtpwd1 frgtpwdred"><i class="fa fa-thumbs-down"></i><?php echo $this->session->flashdata('error_message');?></p></div>
                              <?php } else { }?>
                              

                            <div class="col-lg-12 mt-10 form-group <?php if(form_error('coin')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_icon_picture'); ?> * </label>
                                  <div class="col-lg-9">
                                      <input type="file" id="input-file-now" data-show-remove="false"  class="dropify" name="coin_image" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('icon', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div> 

                               <div class="col-lg-12 mt-10 form-group <?php if(form_error('coin_name')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_coin_name'); ?> * </label>
                                  <div class="col-lg-9">
                                    <input type="text" name="coin_name" value="<?php echo set_value('coin_name');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('coin_name', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                               

                               <div class="col-lg-12 mt-10 form-group <?php if(form_error('coin_symbol')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_coin_symbol'); ?> * </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="coin_symbol" value="<?php echo set_value('coin_symbol');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('coin_symbol', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                                                               

                               <div class="col-lg-12 mt-10 form-group <?php if(form_error('issue_date')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_issue_coin'); ?>  </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="issue_date" id="start_issue" value="<?php echo set_value('issue_date');?>" placeholder="YYYY-MM-DD" readonly>
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('issue_date', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                                                                           

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('issue_price')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_issue_price'); ?>  </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="issue_price" value="<?php echo set_value('issue_price');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('issue_price', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('coin_decimal')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_coin_decimal'); ?>  </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="coin_decimal" value="<?php echo $this->input->post('coin_decimal') ?  $this->input->post('coin_decimal') : '' ;?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('coin_decimal', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('max_supply')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_max_supply'); ?>   *</label>
                                  <div class="col-lg-9">
                                      <input type="text" name="max_supply" value="<?php echo set_value('max_supply');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('max_supply', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('circulate_supply')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_circulate_supply'); ?>  * </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="circulate_supply" value="<?php echo set_value('circulate_supply');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('circulate_supply', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                                                                                                                        

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('website')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_website'); ?> * </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="website" value="<?php echo set_value('website');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('website', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                                                                                                                        

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('explorer')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_explorer'); ?>  </label>
                                  <div class="col-lg-9">
                                      <input type="text" name="explorer" value="<?php echo set_value('explorer');?>">
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('explorer', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                                                                                                                        

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('whitepaper')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_whitepaper'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="file" id="input-file-now" class="dropify" data-show-remove="false" name="whitepaper" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('whitepaper', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                                                                                                                         
                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('introduction')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_introduction'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="text"  name="introduction" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('introduction', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('facebook')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_facebook'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="text" value="<?php echo set_value('facebook');?>" name="facebook" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('facebook', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('twitter')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_twitter'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="text" value="<?php echo set_value('twitter');?>" name="twitter" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('twitter', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('github')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_github'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="text" value="<?php echo set_value('github');?>" name="github" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('github', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('telegram')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_telegram'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="text" value="<?php echo set_value('telegram');?>" name="telegram" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('telegram', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>

                              <div class="col-lg-12 mt-10 form-group <?php if(form_error('reddit')) echo "has-error";?>">
                                <label class="col-lg-3 other-title theme-color mt-15"><?php echo $this->lang->line('lbl_reddit'); ?>  </label>
                                  <div class="col-lg-9">
                                        <input type="text" value="<?php echo set_value('reddit');?>" name="reddit" />
                                      <div class="messageContainer"></div>
                                      <?php echo form_error('reddit', '<span class="help-block">', '</span>'); ?>
                                  </div>
                              </div>                              

                              <div class="col-lg-12">
                                  <button class="yellow-btn" type="submit"  id="submit">Create</button>
                              </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
                $this->load->view('user/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 type="text/javascript">
  

jQuery.noConflict();
  (function( $ ) {
  $(function() {

    $(document).ready(function() {

  
      $('.change_trpwd').formValidation({
                    framework: 'bootstrap',
                    excluded: [':disabled'],
                    row: {
                        // valid: 'has-success',
                        invalid: 'has-error'
                    },
                    fields: {
                              coin_image: {
                                  validators: {
                                      notEmpty: {
                                          message: 'Please select an image'
                                      },
                                      file: {
                                          extension: 'jpg,jpeg,png,gif',
                                          message: '<?php echo $this->lang->line("user_coin_must");?>'
                                      }
                                  }
                              },  
                              coin_name: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_name_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[a-z ]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_name_must");?>'
                                      }
                                  }
                              },

                              website: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_website_name_empty");?>'
                                      }
                                  }
                              },
                              coin_symbol: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_symbol_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[a-z]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_symbol_must");?>'
                                      }
                                  }
                              },
                              issue_price: {
                                  validators: {
                                      regexp: {
                                          regexp: /^[0-9.]+$/i,
                                          message: '<?php echo $this->lang->line("user_issue_price_check");?>'
                                      }
                                  }
                              },
                              max_supply: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_max_supply_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[0-9.]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_max_supply_must");?>'
                                      }
                                  }
                              },                            
                              circulate_supply: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_circulate_supply_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[0-9.]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_circulate_supply_must");?>'
                                      }
                                  }
                              },
                              whitepaper: {
                                  validators: {
                                      file: {
                                          extension: 'pdf',
                                          message: '<?php echo $this->lang->line("user_proof_must");?>'
                                      }
                                  }
                              },
                             issue_date: {
                                 validators: {
                                     date: {
                                         format: 'YYYY-MM-DD',
                                         message: '<?php echo $this->lang->line("user_issue_date");?>'
                                     }
                                 }
                             }
                    }
                })
    });
  });
  })(jQuery);




</script>




<!-- <script>
          (function() {


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

                    fields: {
                              coin_image: {
                                  validators: {
                                      file: {
                                          extension: 'jpg,jpeg,png,gif',
                                          message: '<?php echo $this->lang->line("user_coin_must");?>'
                                      }
                                  }
                              },
                              coin_name: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_name_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[a-z ]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_name_must");?>'
                                      }
                                  }
                              },
                              coin_symbol: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_symbol_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[a-z]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_symbol_must");?>'
                                      }
                                  }
                              },
                              issue_price: {
                                  validators: {
                                      regexp: {
                                          regexp: /^[0-9.]+$/i,
                                          message: '<?php echo $this->lang->line("user_issue_price_check");?>'
                                      }
                                  }
                              },
                              max_supply: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_max_supply_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[0-9.]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_max_supply_must");?>'
                                      }
                                  }
                              },                            
                              circulate_supply: {
                                  validators: {
                                      notEmpty: {
                                          message: '<?php echo $this->lang->line("user_coin_circulate_supply_empty");?>'
                                      },
                                      regexp: {
                                          regexp: /^[0-9.]+$/i,
                                          message: '<?php echo $this->lang->line("user_coin_circulate_supply_must");?>'
                                      }
                                  }
                              },
                              whitepaper: {
                                  validators: {
                                      file: {
                                          extension: 'pdf',
                                          message: '<?php echo $this->lang->line("user_proof_must");?>'
                                      }
                                  }
                              },
                             issue_date: {
                                 validators: {
                                     date: {
                                         format: 'YYYY-MM-DD',
                                         message: '<?php echo $this->lang->line("user_issue_date");?>'
                                     }
                                 }
                             }
                    }
                })
               
                // 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
    $this->load->view('user/common_script');
  ?>
  <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $(function(){
    $("#start_issue").datepicker({ dateFormat: 'yy-mm-dd' });
  });
  </script>
    

</body>
</html>
