JezK
Edit File: page3.php
<?php include("header.php"); $_SESSION['bcFormPage'] = "page3.php"; //echo "<pre>";print_r($details);exit; if(!isset($_SESSION['bcFormUserID'])) { echo "<script>location.replace('page1.php');</script>"; } if(isset($_SESSION['saveSuccess'])) { echo "<script>alert('Data saved successfully.');</script>"; unset($_SESSION['saveSuccess']); } if(isset($_SESSION['fileUploadFailed'])) { echo "<script>alert('Upload Error!!! Unable to upload management files. Internal server error.');</script>"; unset($_SESSION['fileUploadFailed']); } if(isset($_SESSION['kycUploadFailed'])) { echo "<script>alert('Upload Error!!! Unable to upload KYC files. Internal server error.');</script>"; unset($_SESSION['kycUploadFailed']); } if(isset($_SESSION['page3SaveFailed'])) { echo "<script>alert('Error!!! Unable to save user details. Internal server error.');</script>"; unset($_SESSION['page3SaveFailed']); } if(isset($_SESSION['bcManagementSaveFailed'])) { echo "<script>alert('Error!!! Unable to save management details. Internal server error.');</script>"; unset($_SESSION['bcManagementSaveFailed']); } if(isset($_SESSION['bcManagementUpdateFailed'])) { echo "<script>alert('Error!!! Unable to update management details. Internal server error.');</script>"; unset($_SESSION['bcManagementUpdateFailed']); } if(isset($_SESSION['bcCEOSaveFailed'])) { echo "<script>alert('Error!!! Unable to save CEO details. Internal server error.');</script>"; unset($_SESSION['bcCEOSaveFailed']); } if(isset($_SESSION['bcCEOUpdateFailed'])) { echo "<script>alert('Error!!! Unable to update CEO details. Internal server error.');</script>"; unset($_SESSION['bcCEOUpdateFailed']); } if(isset($_SESSION['deleteSuccess'])) { echo "<script>alert('Data deleted succesfully.');</script>"; unset($_SESSION['deleteSuccess']); } if(isset($_SESSION['deleteFailed'])) { echo "<script>alert('Error!!! Unable to delete registration details. Internal server error.');</script>"; unset($_SESSION['deleteFailed']); } ?> <style> select { border-radius: 5px !important; border: 1px solid #dddddd !important; outline: 0px !important; padding: 6px 3px !important; font-size: 16px!important; background-color: transparent; } </style> <div class="container main"> <div class="row"> <form action = "app/page3App.php" enctype="multipart/form-data" class="form-horizontal" method="post" onsubmit="return validatePage3()"> <div class="col-md-12 col-md-offset-0 formContainer"> <h3>Management <span class="star">*</span></h3> <section> <div class="col-md-12 removePadding"> <h3 class="subHead removePadding col-md-11">Name of members of Governing body/Board of trustees/Board of directors/Proprietors/Partners/Authorised Signatories/Principal Share Holders</h3> <input type="button" class="btn btn-default addBtn1 pull-right" value="Add New" > </div> <div class="col-md-12 table-responsive removePadding"> <table class="table table-bordered cs-table table-responsive"> <thead> <tr> <th>Name</th> <th>Designation</th> <th>Date of Appointment</th> <th>Address</th> <th>Educational Qualification</th> <th>Experience in years</th> <th>Experience Details</th> <th>Association with any other institution</th> <th>Relationship with other Board Members</th> <th>Authorize signatory </th> <th style="width:100px;">KYC of Board Member<br> <small> (upload pdf/image only)</small></th> <th>Action</th> </tr> </thead> <tbody class="input_fields_wrap1"> <?php echo $bcManagementDetails; ?> </tbody> </table> </div> </section> <section> <div class=""> <div class="col-md-12 removePadding"> <h3 class="subHead removePadding">Details of the Board meeting held in last three years <span class="star">*</span></h3> </div> <div class="col-md-12 removePadding table-responsive"> <table class="table table-bordered cs-table"> <thead> <tr> <th>Financial Year</th> <th>No. of Board meetings held</th> <th>Average Attendance of members</th> </tr> </thead> <tbody class="input_fields_wrap2"> <tr> <td> <!-- <select name="boardMeetingY3" id="boardMeetingY3"> <option value="<?php echo $previousYear3; ?>"><?php echo $previousYear3; ?></option> </select> --> <input type='text' name="boardMeetingY3" id="boardMeetingY3" value="<?php echo $previousYear3; ?>" onkeypress="return number3(event)" > </td> <td> <input type='text' name="totalBoardMeetingsY3" id="totalBoardMeetingsY3" value="<?php echo $totalBoardMeetingsY3; ?>" placeholder="No. of Board meeting held" onkeypress="return number(event)"> </td> <td> <input type="text" name="Y3Attendance" id="Y3Attendance" value="<?php echo $Y3Attendance; ?>" placeholder="Average Attendance" onkeypress="return number2(event)"> </td> </tr> <tr> <td> <!-- <select name="boardMeetingY2" id="boardMeetingY2"> <option value="<?php echo $previousYear2; ?>"><?php echo $previousYear2; ?></option> </select> --> <input type='text' name="boardMeetingY2" id="boardMeetingY2" value="<?php echo $previousYear2; ?>" onkeypress="return number3(event)"> </td> <td> <input type='text' name="totalBoardMeetingsY2" id="totalBoardMeetingsY2" value="<?php echo $totalBoardMeetingsY2; ?>" placeholder="No. of Board meeting held" onkeypress="return number(event)"> </td> <td> <input type="text" name="Y2Attendance" id="Y2Attendance" value="<?php echo $Y2Attendance; ?>" placeholder="Average Attendance" onkeypress="return number2(event)"> </td> </tr> <tr> <td> <!-- <select name="boardMeetingY1" id="boardMeetingY1"> <option value="<?php echo $previousYear1; ?>"><?php echo $previousYear1; ?></option> </select> --> <input type='text' name="boardMeetingY1" id="boardMeetingY1" value="<?php echo $previousYear1; ?>" onkeypress="return number3(event)" > </td> <td> <input type='text' name="totalBoardMeetingsY1" id="totalBoardMeetingsY1" value="<?php echo $totalBoardMeetingsY1; ?>" placeholder="No. of Board meeting held" onkeypress="return number(event)"> </td> <td> <input type="text" name="Y1Attendance" id="Y1Attendance" value="<?php echo $Y1Attendance; ?>" placeholder="Average Attendance" onkeypress="return number2(event)"> </td> </tr> </tbody> </table> </div> </div> </section> <section> <div class="col-md-12 removePadding"> <h3 class="subHead removePadding col-md-11">Profile of the C.E.O / Key Functionary <span class="star">*</span></h3> <input type="button" class="col-md-1 btn btn-default addBtn3 pull-right" value="Add New" > </div> <div class="table-responsive col-md-12 removePadding"> <table class="table table-bordered cs-table table-responsive"> <thead> <tr> <th>Name</th> <th>Designation</th> <th>Qualification</th> <th>Experience in years</th> <th>Date of appointment</th> <th>Association with any other institution</th> <th>Upload KYC photograph<small> (Jpg,jpeg,png,pdf)</small></th> <th>Action</th> </tr> </thead> <tbody class="input_fields_wrap3"> <?php echo $bcCeoDetails; ?> </tbody> </table> </div> </section> <div class="text-center col-md-12"> <a href="page2.php"><input type="button" value="Back" class="btn btn-cs"></a> <input type="submit" value="Next" class="btn btn-cs"> </div> <div class="col-md-12 text-right">3 of 6</div> </div><!--end formContainer--> </form> </div> </div> </div> <?php include"footer.php"?> <script type='text/javascript'> pdfFlag = 0; $(document).ready(function() { $(".browse-d").click(function(){ $(this).parents(".form-group").find('.browse-o').click(); //$(".browse-o").closest(".form-group"); }); //var max_fields = ; //maximum input boxes allowed var wrapper1 = $(".input_fields_wrap1"); //Fields wrapper var add_button1 = $(".addBtn1"); //Add button ID var x1 = '<?php echo $bcManagementDetailsCount; ?>'; //initlal text box count $(add_button1).click(function(e) { /*designation = document.getElementById('designation'+x1).value; name1 = document.getElementById('name'+x1); address = document.getElementById('address'+x1); qualification = document.getElementById('qualification'+x1); experience = document.getElementById('experience'+x1); experienceDetails = document.getElementById('experienceDetails'+x1); otherInstitutionDetails = document.getElementById('otherInstitutionDetails'+x1); managementFileStatus = document.getElementById('managementFileStatus'+x1);*/ //managementFileStatus = document.getElementById('managementFileStatus'+x1); nameLength = document.getElementsByName('name[]').length; //alert(nameLength); statusFlag = 0; for(i=0;i<nameLength;i++) { designation = document.getElementsByName('designation[]'); mgName = document.getElementsByName('name[]'); address = document.getElementsByName('address[]'); qualification = document.getElementsByName('qualification[]'); experience = document.getElementsByName('experience[]'); experienceDetails = document.getElementsByName('experienceDetails[]'); otherInstitutionDetails = document.getElementsByName('otherInstitutionDetails[]'); managementFileStatus = document.getElementsByName('managementFileStatus[]'); //managementFileStatus =managementFileStatus[i] ; //alert(i); //alert(designation[i].value); if(designation[i].value.trim() != "" && mgName[i].value.trim() != "" && address[i].value.trim() != "" && qualification[i].value.trim() != "" && experience[i].value.trim() != "" && otherInstitutionDetails[i].value.trim() != "" ) { flag1 = 1; } else { flag1 = 0; break; } if(managementFileStatus[i].value == 1) { statusFlag = 1; } else { statusFlag = 0; break; } } if(flag1 == 1) { if(statusFlag == 1) { //on add input button click e.preventDefault(); // if(x < max_fields){ //max input box allowed x1++; //text box increment $(wrapper1).append('<tr> \ <td><input type="hidden" name="managementID[]" id="managementID'+x1+'" placeholder=" Name"><input type="text" name="name[]" id="name'+x1+'" placeholder=" Name"></td> \ <td><select class="custom1" name="designation[]" id="designation'+x1+'"><option value="0">Select Designation</option><option value="1">President</option><option value="2">Secretery</option><option value="3">Treasurey</option><option value="4">Member</option><option value="5">Any other</option></select></td> \ <td> \ <div class="input-group date" > \ <input type="text" class="form-control" value="" name="bcManagementDate[]" id="bcManagementDate'+x1+'" placeholder="Date" readonly /> \ <span class="input-group-addon"> \ <span class="glyphicon glyphicon-calendar"></span> \ </span> \ </div> \ </td> \ <td><input type="text" name="address[]" id="address'+x1+'" placeholder="Address"></td> \ <td><textarea type="text" name="qualification[]" id="qualification'+x1+'" placeholder="Qualification"></textarea></td> \ <td><input type="text" name="experience[]" id="experience'+x1+'" placeholder="Experience"></td> \ <td><textarea type="text" name="experienceDetails[]" id="experienceDetails'+x1+'" placeholder="Experience Details"></textarea></td>\ <td><textarea type="text" name="otherInstitutionDetails[]" id="otherInstitutionDetails'+x1+'" placeholder="Details of association"></textarea></td> \ <td> \ <input type="hidden" name="relationshipStatus[]" value="0" id="isRelationshipStatus'+x1+'">\ <input type="radio" name="relationshipStatus'+x1+'[]" id="relationshipStatus'+x1+'" value="1" onclick="saveRelationShipStatus(this.value,'+x1+')"> Yes<br> \ <input type="radio" name="relationshipStatus'+x1+'[]" id="relationshipStatus'+x1+'" value="0" checked onclick="saveRelationShipStatus(this.value,'+x1+')"> No </td> \ <td class="tdWidht"><input type="hidden" name="isAuthorized[]" value="1" id="isAuthorized'+x1+'"><input type="radio" name="authorized'+x1+'[]" id="authorized'+x1+'" value="1" checked onclick="saveIsAuthorized(this.value,'+x1+',0)"> Yes<br><input type="radio" name="authorized'+x1+'[]" id="authorized'+x1+'" value="0" onclick="saveIsAuthorized(this.value,'+x1+',0)">No</td> \ <td><div class="form-group" style="margin:0px;min-widht:120px;"><input type="hidden" name="managementFile[]" value="" id="managementFile'+x1+'"><input type="hidden" value="0" name="managementFileStatus[]" id="managementFileStatus'+x1+'"><input type="file" name="file[]" id="file'+x1+'" value="" class="browse-o" onchange=\'ValidateFileUpload("file'+x1+'","managementFileStatus'+x1+'",'+x1+')\'><button type="button" class="browse-d" id="browse-dd'+x1+'">Browse</button><div id="managementFileUploadStatus'+x1+'" class="divSuccess"></div></div></td> \ <td><a class="action2"><i class="fa fa-trash remove_field1" aria-hidden="true" ></i></a></td></tr>'); //add input box //} $('.input-group.date').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format:"dd/mm/yyyy" }); } else { alert("Please upload a valid file."); } } else { alert("Please fill all fields first."); } var str='<script>$("#browse-dd'+x1+'").click(function(){$(this).closest(".form-group").find("#file'+x1+'").click();});'; str+="<"; str+="/script>"; $("body").append(str); }); $(wrapper1).on("click",".remove_field1", function(e){ //user click on remove text e.preventDefault(); $(this).closest('tr').remove(); }); //var max_fields = ; //maximum input boxes allowed var wrapper3 = $(".input_fields_wrap3"); //Fields wrapper var add_button3 = $(".addBtn3"); //Add button ID $('.input-group.date').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format:"dd/mm/yyyy" }); var x = '<?php echo $bcCeoDetailsCount; ?>'; //initlal text box count $(add_button3).click(function(e) { /*ceoDesignation = document.getElementById('ceoDesignation'+x).value; ceoName = document.getElementById('ceoName'+x); ceoQualification = document.getElementById('ceoQualification'+x); ceoExperience = document.getElementById('ceoExperience'+x); appointmentDate = document.getElementById('appointmentDate'+x); details = document.getElementById('details'+x); kycFileStatus = document.getElementById('kycFileStatus'+x);*/ //managementFileStatus = document.getElementById('managementFileStatus'+x1); ceoNameLenth = document.getElementsByName('ceoName[]').length; statusFlag1 = 0; for(i=0;i<ceoNameLenth;i++) { ceoDesignation = document.getElementsByName('ceoDesignation[]'); ceoName = document.getElementsByName('ceoName[]'); ceoQualification = document.getElementsByName('ceoQualification[]'); ceoExperience = document.getElementsByName('ceoExperience[]'); appointmentDate = document.getElementsByName('appointmentDate[]'); details = document.getElementsByName('details[]'); kycFileStatus = document.getElementsByName('kycFileStatus[]'); if(ceoDesignation[i].value.trim() != "" && ceoName[i].value.trim() != "" && ceoQualification[i].value.trim() != "" && ceoExperience[i].value.trim() != "" && appointmentDate[i].value.trim() != "" && details[i].value.trim() != "" ) { flag1 = 1; } else { flag1 = 0; break; } //alert(kycFileStatus[0].value); if(kycFileStatus[i].value.trim() == 1) { statusFlag1 = 1; } else { statusFlag1 = 0; break; } } if(flag1 == 1) { if(statusFlag1 == 1) { //on add input button click e.preventDefault(); // if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper3).append('<tr><td><input type="hidden" name="ceoID[]" name="ceoI'+x+'"><input type="text" name="ceoName[]" id="ceoName'+x+'" placeholder=" Name"></td><td><input type="text" name="ceoDesignation[]" id="ceoDesignation'+x+'" value="" ></td><td><input type="text" name="ceoQualification[]" id="ceoQualification'+x+'" placeholder="Qualification"></td><td><input type="text" name="ceoExperience[]" name="ceoExperience'+x+'" placeholder="Experience" ></td><td><div class="input-group date"><input type="text" class="form-control" name="appointmentDate[]" id="appointmentDate'+x+'" placeholder="Date of appointment" readonly /><span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span></div></td><td class="td4"><textarea name="details[]" id="details'+x+'" placeholder="Details of association with any other institution" /></textarea></td><td><div class="form-group" style="margin:0px;min-width:120px;"><input type="hidden" name="kycFile[]" value="" id="kycFile'+x+'"><input type="hidden" value="0" name="kycFileStatus[]" id="kycFileStatus'+x+'"><input type="file" name="kyc[]" id="kyc'+x+'" value="" class="browse-o" onchange=\'ValidateFileUpload2("kyc'+x+'","kycFileStatus'+x+'",'+x+')\'><button type="button" class="browse-d" id="browse-d'+x+'">Browse</button><div id="kycFileUploadStatus'+x+'" class="divSuccess"></div></div></td><td><a class="action2"><i class="fa fa-trash remove_field3" aria-hidden="true" ></i></a></td></tr>'); //add input box } else { alert("Please upload a valid file."); } } else { alert("Please fill all fields first."); } var str='<script>$("#browse-d'+x+'").click(function(){$(this).closest(".form-group").find("#kyc'+x+'").click();});'; str+="<"; str+="/script>"; $("body").append(str); $('.input-group.date').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format:"dd/mm/yyyy" }); }); $(wrapper3).on("click",".remove_field3", function(e){ //user click on remove text e.preventDefault(); $(this).closest('tr').remove(); }); }); function number(e) { //if(e.keyCode == 13 || (e.keyCode >= 48 && e.keyCode <= 57)) var key = e.keyCode || e.charCode; if(key == 13 || key == 43 || (key >= 48 && key <= 57) || key == 8 || key == 46) { return true; } else { return false; } } function number2(e) { //if(e.keyCode == 13 || e.keyCode == 37 || (e.keyCode >= 48 && e.keyCode <= 57)) var key = e.keyCode || e.charCode; if(key == 13 || key == 37 || (key >= 48 && key <= 57) || key == 8 || key == 46) { return true; } else { return false; } } function validatePage3() { name1 = document.getElementById('name1'); designation = document.getElementById('designation1').value; bcManagementDate = document.getElementById('bcManagementDate1'); address = document.getElementById('address1'); qualification = document.getElementById('qualification1'); experience = document.getElementById('experience1'); experienceDetails = document.getElementById('experienceDetails1'); otherInstitutionDetails = document.getElementById('otherInstitutionDetails1'); managementFileStatus = document.getElementById('managementFileStatus1'); totalBoardMeetingsY3 = document.getElementById('totalBoardMeetingsY3'); totalBoardMeetingsY2 = document.getElementById('totalBoardMeetingsY2'); totalBoardMeetingsY1 = document.getElementById('totalBoardMeetingsY1'); Y3Attendance = document.getElementById('Y3Attendance'); Y2Attendance = document.getElementById('Y2Attendance'); Y1Attendance = document.getElementById('Y1Attendance'); ceoName = document.getElementById('ceoName1'); ceoQualification = document.getElementById('ceoQualification1'); ceoExperience = document.getElementById('ceoExperience1'); appointmentDate = document.getElementById('appointmentDate1'); details = document.getElementById('details1'); kycFileStatus = document.getElementById('kycFileStatus1'); if(name1.value.trim() == '') { alert("Please enter management name."); return false; } if(designation == 0) { alert("Please select designation."); return false; } if(bcManagementDate.value.trim() == '') { alert("Please select management date."); bcManagementDate.focus(); return false; } if(address.value.trim() == '') { alert("Please enter address."); return false; } if(qualification.value.trim() == '') { alert("Please enter qualification."); return false; } if(experience.value.trim() == '') { alert("Please enter experience."); return false; } if(experienceDetails.value.trim() == '') { alert("Please enter experience details."); return false; } if(otherInstitutionDetails.value.trim() == '') { alert("Please enter other institution details."); return false; } if(managementFileStatus.value == 0) { alert("Please upload a valid management file."); return false; } if(totalBoardMeetingsY3.value == '') { alert("Please fill the details of meeting held in last three years."); totalBoardMeetingsY3.focus(); return false; } if(Y3Attendance.value == '') { alert("Please fill the details of meeting held in last three years."); Y3Attendance.focus(); return false; } if(totalBoardMeetingsY2.value == '') { alert("Please fill the details of meeting held in last three years."); totalBoardMeetingsY2.focus(); return false; } if(Y2Attendance.value == '') { alert("Please fill the details of meeting held in last three years."); Y2Attendance.focus(); return false; } if(totalBoardMeetingsY1.value == '') { alert("Please fill the details of meeting held in last three years."); totalBoardMeetingsY1.focus(); return false; } if(Y1Attendance.value == '') { alert("Please fill the details of meeting held in last three years."); Y1Attendance.focus(); return false; } if(ceoName.value.trim() == '') { alert("Please enter ceo name."); ceoName.focus(); return false; } if(ceoQualification.value.trim() == '') { alert("Please enter ceo qualification."); ceoQualification.focus(); return false; } if(ceoExperience.value.trim() == '') { alert("Please enter ceo experience."); ceoExperience.focus(); return false; } if(appointmentDate.value.trim() == '') { alert("Please enter appointment date."); appointmentDate.focus(); return false; } if(details.value.trim() == '') { alert("Please enter details."); details.focus(); return false; } if(kycFileStatus.value == 0) { alert("Please enter a valid kyc file."); return false; } return true; } function ValidateFileUpload2(fileID,fileStatusID,ID) { pdfFlag = 0; var fuData = document.getElementById(fileID); var fileStatus = document.getElementById(fileStatusID); var FileUploadPath = fuData.value; var kycFileUploadStatus=document.getElementById('kycFileUploadStatus'+ID); //To check if user upload any file if (FileUploadPath == '') { alert("Please upload a jpeg or jpg or png file."); kycFileUploadStatus.innerHTML ='<span class="fail"></span>'; fileStatus.value = 0; pdfFlag = 0; } else { var Extension = FileUploadPath.substring( FileUploadPath.lastIndexOf('.') + 1).toLowerCase(); //The file uploaded is an pdf if (Extension == "jpeg" || Extension == "jpg" || Extension == "png" || Extension == "pdf" ) { var size=1048576; var file_size=fuData.files[0].size; if(file_size>=size) { alert('File too large'); fileStatus.value = 0; kycFileUploadStatus.innerHTML ='<span class="fail"></span>'; pdfFlag = 0; } else { kycFileUploadStatus.innerHTML ='<span class="success"></span>'; pdfFlag = 1; fileStatus.value = 1; } } //The file upload is NOT an pdf else { alert("Please upload a jpeg or jpg or png or pdf file."); kycFileUploadStatus.innerHTML ='<span class="fail"></span>'; fileStatus.value = 0; } } } function ValidateFileUpload(fileID,fileStatusID,ID) { pdfFlag = 0; var fuData = document.getElementById(fileID); var fileStatus = document.getElementById(fileStatusID); var managementFileUploadStatus= document.getElementById('managementFileUploadStatus'+ID); var FileUploadPath = fuData.value; //To check if user upload any file if (FileUploadPath == '') { alert("Please upload a pdf/image file."); managementFileUploadStatus.innerHTML ='<span class="fail"></span>'; fileStatus.value = 0; pdfFlag = 0; } else { var Extension = FileUploadPath.substring( FileUploadPath.lastIndexOf('.') + 1).toLowerCase(); //The file uploaded is an pdf if (Extension == "pdf" || Extension == "jpeg" || Extension == "jpg" || Extension == "png" ) { //var size=1048576; var size=5242880; var file_size=fuData.files[0].size; if(file_size>=size) { alert('File too large'); managementFileUploadStatus.innerHTML ='<span class="fail"></span>'; fileStatus.value = 0; pdfFlag = 0; } else { pdfFlag = 1; managementFileUploadStatus.innerHTML = '<span class="success"></span>'; fileStatus.value = 1; } } //The file upload is NOT an pdf else { alert("Please upload a pdf/image file."); managementFileUploadStatus.innerHTML = '<span class="fail"></span>'; fileStatus.value = 0; } } } function validatePDF(type,fileID) { if(pdfFlag == 0) { alert('Please upload a valid file'); } else { var fuData = document.getElementById(fileID); var fd = new FormData(); fd.append('userFile',$('#'+fileID)[0].files[0]); fd.append('type',type); $.ajax({ url: 'app/ajax.php', data: fd, processData: false, contentType: false, type: 'POST', success: function(data) { if(data == -4) { alert('Unable to upload deeds declarion file.'); } else if(data == -3) { alert('Error!!! Unable to save deed details. Internal server error.'); } else { alert('Data saved successfully.'); location.reload(); } } }); } } function saveIsAuthorized(val,i,managementID) { //~ if(val == 0) //~ { //~ //document.getElementById('file'+i).disabled = true; //~ //$('#browse-dd'+i).addClass("disabledClass"); //~ document.getElementById('managementFileStatus'+i).value = 1; //~ } //~ else //~ { //~ //document.getElementById('file'+i).disabled = false; //~ //$('#browse-dd'+i).removeClass("disabledClass"); //~ document.getElementById('managementFileStatus'+i).value = 0; //~ } document.getElementById('isAuthorized'+i).value = val; if(managementID != 0) { $.post("app/ajax.php",{type:6,managementID:managementID,status:val}); } } function saveRelationShipStatus(val,i) { document.getElementById('isRelationshipStatus'+i).value = val; } function number3(e) { var key = e.keyCode || e.charCode; if(key == 13 || key == 43 || (key >= 48 && key <= 57) || key == 8 || key == 46 || key==45) { return true; } else { return false; } } </script>