whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
views
/
webapp
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/views/webapp/profile.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php'); $CI = & get_instance(); $CI->load->model('app'); $uid = $userdata[0]['rid']; $country = country(); ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Profile </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Profile</li> </ol> <?php if($this->session->flashdata('msg')){ echo "<br>"; echo $this->session->flashdata('msg'); } ?> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-6"> <div class="box box-primary"> <div class="box-header ui-sortable-handle"> <i class="fa fa-user"></i> <h3 class="box-title">Details</h3> <div class="box-tools pull-right"> <a href="#" class="MyModal" onclick="series()" style="margin-left: 40px;"> <i class="fa fa-pencil-square-o fa-2x" data-toggle="tooltip" data-placement="top" title="Update Profile" aria-hidden="true"></i> </a> </div> </div> <div class="row"> <div class="col-sm-3"> <?php if(!empty($data[0]['photo'])){ ?> <div class="pro-pic"> <img src="<?php echo base_url().'webapp/profile/'.$data[0]['photo']; ?>" style="width:100px;"> </div> <?php }else{ ?> <img src="<?php echo base_url().'webapp/profile/noPhotoAvailable.jpg'; ?>" style="width:100px;"> <?php } ?> <!-- Button trigger modal --> <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <?php echo form_open_multipart("webapp/people/changePhoto"); ?> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Update Profile</h4> </div> <div class="modal-body"> <input type="hidden" name="uid" value="<?php echo $uid; ?>"> <input type="hidden" name="hiddenPhoto" value="<?php echo $data[0]['photo']; ?>"> <div class="form-group"> <label>Name</label> <input type="text" name="name" class="form-control" value="<?php echo $data[0]['name']; ?>"> </div> <div class="form-group"> <label>Email</label> <input type="text" name="email" class="form-control" value="<?php echo $data[0]['email']; ?>"> </div> <div class="row form-group"> <div class="col-sm-6"> <label>Phone Code</label> <input type="text" name="phone_code" id="phone_code" class="form-control" value="<?php echo $data[0]['phone_code']; ?>" readonly> </div> <div class="col-sm-6"> <label>Phone</label> <input type="text" name="phone" class="form-control" maxlength="10" value="<?php echo $data[0]['mobile']; ?>"> </div> </div> <div class="row form-group"> <div class="col-sm-6"> <label>Constitution</label> <select name="constitution" class="form-control form-control-sm"> <option value="">--Select Constitution--</option> <option <?php if($data[0]['constitution'] == 'Proprietorsip'){echo 'selected';} ?> value="Proprietorsip">Proprietorsip</option> <option <?php if($data[0]['constitution'] == 'LLP'){echo 'selected';} ?> value="LLP">LLP</option> <option <?php if($data[0]['constitution'] == 'LLC'){echo 'selected';} ?> value="LLC">LLC</option> <option <?php if($data[0]['constitution'] == 'Private Company'){echo 'selected';} ?> value="Private Company">Private Company</option> <option <?php if($data[0]['constitution'] == 'Public Company'){echo 'selected';} ?> value="Public Company">Public Company</option> <option <?php if($data[0]['constitution'] == 'Partnership'){echo 'selected';} ?> value="Partnership">Partnership</option> </select> </div> <div class="col-sm-6"> <label>Name Of Business</label> <input type="text" name="business_name" class="form-control" value="<?php echo $data[0]['business_name']; ?>"> </div> </div> <div class="form-group"> <label>Constitution Other</label> <input value="<?php echo $data[0]['constitution_other']; ?>" name="constitution_other" type="text" class="form-control form-control-sm" placeholder="constitution if other" > </div> <div class="form-group"> <label>Date Incorporation</label> <input value="<?php if($data[0]['date_incorporation'] != ""){ echo date('d-m-Y',strtotime($data[0]['date_incorporation'])); } ?>" name="date_incorporation" type="text" class="form-control form-control-sm date-picker" placeholder="Date of Incorporation" required > </div> <div class="form-group"> <label>Nature Of Business</label> <?php /*<input value="<?php echo $data[0]['nob']; ?>" name="nob" type="text" class="form-control form-control-sm" placeholder="Nature of the business" required > */ ?> <textarea name="nob" id="nob" class="form-control form-control-sm" placeholder="Nature of the business(100 words allow)" required data-max-words="2" data-announce="true"><?php echo $data[0]['nob']; ?></textarea> </div> <script> document.getElementById("nob").addEventListener("keypress", function(evt){ // Get value of textbox and split into array where there is one or more continous spaces var words = this.value.split(/\s+/); var numWords = words.length; // Get # of words in array var maxWords = 100; // If we are at the limit and the key pressed wasn't BACKSPACE or DELETE, // don't allow any more input if(numWords > maxWords){ evt.preventDefault(); // Cancel event } }); </script> <?php $where5=array('rid'=>$uid); $fltdta_new=$this->model->DetailData('tbl_director',$where5); ?> <div class="form-group"> <span class="director_din"> <?php if($fltdta_new[0]['director_name'] != ""){ for($i=0;$i<count($fltdta_new);$i++){ ?> <div class="xyz div_<?= $i ?>"> <div style="float: left;width: 40%;padding-bottom: 5px;margin-right: 5px;"> <input type="text" name="director_name[]" class="form-control form-control-sm" placeholder="Director Name" value="<?= ($fltdta_new[$i]['director_name'] != '') ? $fltdta_new[$i]['director_name'] : '' ?>"> </div> <div style="float: left;width: 40%;padding-bottom: 5px;margin-right: 5px;"> <input type="text" name="din_no[]" class="form-control form-control-sm" placeholder="DIN No" value="<?= ($fltdta_new[$i]['din_no'] != '') ? $fltdta_new[$i]['din_no'] : '' ?>"> </div> <div> <button class="btn btn-danger waves-effect waves-light" onclick="remove(<?= $i ?>)" type="button" style="height: 36px;margin-bottom: 2px;" >-</button> </div> </div> <?php } }else{ ?> <div class="xyz"> <div style="float: left;width: 40%;padding-bottom: 5px;margin-right: 5px;"> <input type="text" name="director_name[]" class="form-control form-control-sm" placeholder="Director Name"> </div> <div style="float: left;width: 40%;padding-bottom: 5px;margin-right: 5px;"> <input type="text" name="din_no[]" class="form-control form-control-sm" placeholder="DIN No"> </div> <div style="display: none;"> <button style="width: 39px;margin-bottom: 8px;" class="btn btn-primary add_more waves-effect waves-light" type="button" style="height: 36px;" > + </button> </div> </div> <?php } ?> </span> <div> <button onclick="addmore()" class="btn btn-primary add_more waves-effect waves-light" type="button" style="height: 36px;margin-bottom: 2px;" > + </button> </div> </div> <div class="form-group"> <label>Unique Requirements</label> <input value="<?php echo $data[0]['ur']; ?>" name="ur" type="text" class="form-control form-control-sm" placeholder="Unique requirements" required > </div> <div class="form-group"> <label>Report Interval</label> <select name="ri" class="form-control form-control-sm" required> <option value="">--Select Report Interval--</option> <option <?php if($data[0]['ri'] == 'Weekly'){echo 'selected';} ?> value="Weekly">Weekly</option> <option <?php if($data[0]['ri'] == 'Monthly'){echo 'selected';} ?> value="Monthly">Monthly</option> <option <?php if($data[0]['ri'] == 'Quarterly'){echo 'selected';} ?> value="Quarterly">Quarterly</option> <option <?php if($data[0]['ri'] == 'Half Yearly'){echo 'selected';} ?> value="Half Yearly">Half Yearly</option> <option <?php if($data[0]['ri'] == 'Yearly'){echo 'selected';} ?> value="Yearly">Yearly</option> </select> </div> <div class="row form-group"> <div class="col-sm-6"> <label>Country</label> <select class="form-control form-control-sm country" name="country" id="country" required> <option value="">--Select Country--</option> <?php foreach ($country as $k => $v) { ?> <option <?php if($data[0]['country'] == $v['name']){echo 'selected';} ?> value="<?php echo $v['id'].'_'.$v['name']; ?>"><?php echo $v['name']; ?></option> <?php } ?> </select> </div> <div class="col-sm-6"> <label>State</label> <select class="form-control form-control-sm state" name="state" required> <option value="">--Select State1--</option> </select> </div> </div> <div class="row form-group"> <div class="col-sm-6" id="gst"> <label>GST</label> <input value="<?php echo $data[0]['gst']; ?>" name="gst" type="text" maxlength="15" class="form-control form-control-sm gst" placeholder="GST No" > </div> <div class="col-sm-6" id="pan"> <label>PAN</label> <input value="<?php echo $data[0]['pan']; ?>" name="pan" type="text" maxlength="10" class="form-control form-control-sm pan" placeholder="PAN" > </div> </div> <div class="row form-group"> <div class="col-sm-6" id="llc_no"> <label>LLC No</label> <input value="<?php echo $data[0]['llc_no']; ?>" name="llc_no" type="text" class="form-control form-control-sm llc_no" placeholder="LLC No" > </div> <div class="col-sm-6" id="llp_no"> <label>LLP No</label> <input value="<?php echo $data[0]['llp_no']; ?>" name="llp_no" type="text" class="form-control form-control-sm llp_no" placeholder="LLP No" > </div> </div> <div class="row form-group"> <div class="col-sm-6" id="cin_no"> <label>CIN No</label> <input value="<?php echo $data[0]['cin_no']; ?>" name="cin_no" type="text" class="form-control form-control-sm cin_no" placeholder="CIN No" > </div> <div class="col-sm-6" id="tax_id"> <label>TAX ID</label> <input value="<?php echo $data[0]['tax_id']; ?>" name="tax_id" type="text" class="form-control form-control-sm tax_id" placeholder="TAX ID" > </div> </div> <div class="row form-group"> <div class="col-sm-6" id="impo_expo_no"> <label>Import/Export Licence No</label> <input value="<?php echo $data[0]['impo_expo_no']; ?>" name="impo_expo_no" type="text" class="form-control form-control-sm impo_expo_no" placeholder="Import/Export Licence No" > </div> <div class="col-sm-6" id="other_reg_no"> <label>Other Registration No</label> <input value="<?php echo $data[0]['other_reg_no']; ?>" name="other_reg_no" type="text" class="form-control form-control-sm other_reg_no" placeholder="Other Registration No" > </div> </div> <div class="form-group"> <label>Address</label> <textarea name="address" required placeholder="address" class="form-control form-control-sm"><?php echo $data[0]['address']; ?></textarea> </div> <input type="file" name="photo"> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Save changes</button> </div> <?php echo form_close(); ?> </div> </div> </div> </div><!--3--> <div class="col-sm-9"> <table class="table"> <tr> <th>Customer ID</th> <td><?php echo "CLI". $data[0]['rid']; ?></td> </tr> <tr> <th>Name</th> <td><?php echo $data[0]['name']; ?></td> </tr> <tr> <th>Email</th> <td><?php echo $data[0]['email']; ?></td> </tr> <tr> <th>Mobile</th> <td><?php echo $data[0]['mobile']; ?></td> </tr> <tr> <th>Constitution</th> <td><?php echo $data[0]['constitution']; ?></td> </tr> <tr> <th>Constitution if other</th> <td><?php echo $data[0]['constitution_other']; ?></td> </tr> <tr> <th>Date of Incorporation</th> <td><?php if($data[0]['date_incorporation'] != ""){ echo date('d-m-Y',strtotime($data[0]['date_incorporation'])); } else{ echo "00-00-0000"; }?></td> </tr> <tr> <th>Nature of the business</th> <td><?php echo $data[0]['nob']; ?></td> </tr> <tr> <th>Unique requirements</th> <td><?php echo $data[0]['ur']; ?></td> </tr> <tr> <th>Report Interval</th> <td><?php echo $data[0]['ri']; ?></td> </tr> <?php if($data[0]['country'] == "India"){ ?> <tr> <th>GST</th> <td><?php echo $data[0]['gst']; ?></td> </tr> <tr> <th>PAN</th> <td><?php echo $data[0]['pan']; ?></td> </tr> <?php } ?> <tr> <th>LLC No</th> <td><?php echo $data[0]['llc_no']; ?></td> </tr> <tr> <th>LLP No</th> <td><?php echo $data[0]['llp_no']; ?></td> </tr> <?php if($data[0]['country'] == "India"){ ?> <tr> <th>CIN No</th> <td><?php echo $data[0]['cin_no']; ?></td> </tr> <?php } ?> <?php if($data[0]['country'] == "Canada" || $data[0]['country'] == "United States"){ ?> <tr> <th>TAX ID</th> <td><?php echo $data[0]['tax_id']; ?></td> </tr> <?php } ?> <tr> <th>Import/Export Licence No</th> <td><?php echo $data[0]['impo_expo_no']; ?></td> </tr> <tr> <th>Other Registration No</th> <td><?php echo $data[0]['other_reg_no']; ?></td> </tr> <tr> <th>Country</th> <td><?php echo $data[0]['country']; ?></td> </tr> <tr> <th>State</th> <td><?php echo $data[0]['state']; ?></td> </tr> <tr> <th>Address</th> <td><?php echo $data[0]['address']; ?></td> </tr> </table> </div><!--9--> </div><!--row--> </div><!-- /.box --> </div> <div class="col-xs-12 col-sm-12 col-md-6"> <div class="box box-primary"> <div class="box-header ui-sortable-handle"> <i class="fa fa-lock"></i> <h3 class="box-title">Change Password</h3> <div class="box-tools pull-right"> </div> </div> <div class="box-body"> <form method="POST" action="<?php echo base_url().'webapp/users/changepass' ?>" class="validatedForm"> <div class="form-group"> <label>Old Password</label> <input class="form-control" type="Password" name="old_pass" required=""> </div> <div class="form-group"> <label>New Password</label> <input id="password_change" class="form-control" type="Password" name="new_pass" required="" onchange="CheckPassword_change($(this).val());"> </div> <div class="form-group"> <label>Confirm Password</label> <input id="confirm_change" class="form-control" type="Password" name="confirm_pass" required=""> <span id="message_change"></span> </div> <div class="form-group"> <input type="submit" class="btn btn-primary" name="Save"> </div> </form> </div> </div><!-- /.box --> </div> </div> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/webapp/footer.php');?> <script> $(document).ready (function () { $("#country").on("change",function(){ var GetCountry=$("#country").val(); //var id = this.value; var GetCountry = GetCountry.split('_'); var GetCountry = GetCountry[1]; var inputField1 = document.getElementsByClassName('gst'); var inputField2 = document.getElementsByClassName('pan'); var inputField3 = document.getElementsByClassName('llc_no'); var inputField4 = document.getElementsByClassName('llp_no'); var inputField5 = document.getElementsByClassName('cin_no'); var inputField6 = document.getElementsByClassName('tax_id'); var inputField7 = document.getElementsByClassName('impo_expo_no'); var inputField8 = document.getElementsByClassName('other_reg_no'); if(GetCountry == "India"){ var PhoneCode = "+91"; inputField1[0].setAttribute("required" , "required") inputField2[0].setAttribute("required" , "required") inputField3[0].setAttribute("required" , "required") inputField4[0].setAttribute("required" , "required") inputField5[0].setAttribute("required" , "required") inputField6[0].removeAttribute("required") inputField7[0].setAttribute("required" , "required") inputField8[0].setAttribute("required" , "required") $('#gst').show(); $('#pan').show(); $('#llc_no').show(); $('#llp_no').show(); $('#cin_no').show(); $('#tax_id').hide(); $('#impo_expo_no').show(); $('#other_reg_no').show(); }else if(GetCountry == "Canada" || GetCountry == "United States"){ var PhoneCode = "+1"; inputField1[0].removeAttribute("required") inputField2[0].removeAttribute("required") inputField3[0].setAttribute("required" , "required") inputField4[0].setAttribute("required" , "required") inputField5[0].removeAttribute("required") inputField6[0].setAttribute("required" , "required") inputField7[0].setAttribute("required" , "required") inputField8[0].setAttribute("required" , "required") $('#gst').hide(); $('#pan').hide(); $('#llc_no').show(); $('#llp_no').show(); $('#cin_no').hide(); $('#tax_id').show(); $('#impo_expo_no').show(); $('#other_reg_no').show(); } //alert(PhoneCode) $("#phone_code").val(PhoneCode); }); $('.MyModal').click(function() { var GetCountry=$("#country").val(); var GetCountry = GetCountry.split('_'); var GetCountry = GetCountry[1]; var inputField1 = document.getElementsByClassName('gst'); var inputField2 = document.getElementsByClassName('pan'); var inputField3 = document.getElementsByClassName('llc_no'); var inputField4 = document.getElementsByClassName('llp_no'); var inputField5 = document.getElementsByClassName('cin_no'); var inputField6 = document.getElementsByClassName('tax_id'); var inputField7 = document.getElementsByClassName('impo_expo_no'); var inputField8 = document.getElementsByClassName('other_reg_no'); if(GetCountry == "India"){ var PhoneCode = "+91"; inputField1[0].setAttribute("required" , "required") inputField2[0].setAttribute("required" , "required") inputField3[0].setAttribute("required" , "required") inputField4[0].setAttribute("required" , "required") inputField5[0].setAttribute("required" , "required") inputField6[0].removeAttribute("required") inputField7[0].setAttribute("required" , "required") inputField8[0].setAttribute("required" , "required") $('#gst').show(); //inputField[0].setAttribute("required" , "required") $('#pan').show(); $('#llc_no').show(); $('#llp_no').show(); $('#cin_no').show(); $('#tax_id').hide(); $('#impo_expo_no').show(); $('#other_reg_no').show(); }else if(GetCountry == "Canada" || GetCountry == "United States"){ var PhoneCode = "+1"; inputField1[0].removeAttribute("required") inputField2[0].removeAttribute("required") inputField3[0].setAttribute("required" , "required") inputField4[0].setAttribute("required" , "required") inputField5[0].removeAttribute("required") inputField6[0].setAttribute("required" , "required") inputField7[0].setAttribute("required" , "required") inputField8[0].setAttribute("required" , "required") $('#gst').hide(); $('#pan').hide(); $('#llc_no').show(); $('#llp_no').show(); $('#cin_no').hide(); $('#tax_id').show(); $('#impo_expo_no').show(); $('#other_reg_no').show(); } //alert(PhoneCode) $("#phone_code").val(PhoneCode); }); }); </script> <script> function CheckPassword_change(inputtxt) { var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/; if (inputtxt.match(decimal)){ return true; } else { $("#password_change").val(''); alert('Password is weak.Password should be at least 8 characters in length and should include at least one upper case letter, one number, and one special character.') return false; } } $('#password_change, #confirm_change').on('keyup', function () { if ($('#password_change').val() == $('#confirm_change').val()) { $('#message_change').html('Both Password are Matching').css('color', 'green'); } else $('#message_change').html('Both Password are not Matching').css('color', 'red'); }); $(document).on('change', '.country', function (e) { var id = this.value; var id = id.split('_'); var id = id[0]; var dataurl = "<?php echo base_url() ?>" + 'webcontroller/state/'+id; $.ajax({ method: "POST", url: dataurl, dataType: 'json', success: function (result) { $('.state').html(result.html); } }); }); const remove = (id) => { let cls = `.div_${id}` ; $(cls).remove(); } const addmore = () => { let count = $(".xyz").length + 1 ; let dynamichtml = ' <div class="xyz div_'+count+'"> \n\ <div style="float: left;width: 40%;padding-bottom: 5px;margin-right: 5px;">\n\ <input type="text" name="director_name[]" class="form-control form-control-sm" placeholder="Director Name">\n\ </div>\n\ <div style="float: left;width: 40%;padding-bottom: 5px;margin-right: 5px;">\n\ <input type="text" name="din_no[]" class="form-control form-control-sm" placeholder="DIN No">\n\ </div>\n\ <div>\n\ <button class="btn btn-danger waves-effect waves-light" onclick="remove('+count+')" type="button" style="height: 36px;margin-bottom: 2px;" >-</button>\n\ </div> \n\ </div> '; $(".director_din").append(dynamichtml) } function openmodal(){ return new Promise((resolve , reject ) => { $("#myModal").modal("show") resolve() }); } function getstates(){ return new Promise((resolve , reject ) => { var id = $("#country").val(); var id = id.split('_'); var id = id[0]; var dataurl = "<?php echo base_url() ?>" + 'webcontroller/state/'+id; $.ajax({ method: "POST", url: dataurl, dataType: 'json', success: function (result) { $('.state').html(result.html); resolve(); } }); }); } function setState(val){ console.log(val) $(".state").val(val) } async function series(){ let a = await openmodal(); let b = await getstates(); let stateval = '<?php echo $data[0]["state"] ?>' ; let c = await setState(stateval); } </script>
Copyright ©2021 || Defacer Indonesia