JezK
Edit File: page1.php
<?php include("header.php"); $_SESSION['sliFormPage'] = 'page1.php'; include("app/getStates.php"); if(isset($_SESSION['registrationSaveFailed'])) { echo "<script>alert('Error!!! Unable to save registration details. Internal server error.');</script>"; unset($_SESSION['registrationSaveFailed']); } if(isset($_SESSION['registrationUpdateFailed'])) { echo "<script>alert('Error!!! Unable to update registration details. Internal server error.');</script>"; unset($_SESSION['registrationUpdateFailed']); } if(isset($_SESSION['fcraUpdateFailed'])) { echo "<script>alert('Error!!! Unable to update fcra details. Internal server error.');</script>"; unset($_SESSION['fcraUpdateFailed']); } if(isset($_SESSION['fcraSaveFailed'])) { echo "<script>alert('Error!!! Unable to save fcra details. Internal server error.');</script>"; unset($_SESSION['fcraSaveFailed']); } if(isset($_SESSION['userSaveFailed'])) { echo "<script>alert('Error!!! Unable to save user details. Internal server error.');</script>"; unset($_SESSION['userSaveFailed']); } if(isset($_SESSION['userUpdateFailed'])) { echo "<script>alert('Error!!! Unable to update user details. Internal server error.');</script>"; unset($_SESSION['userUpdateFailed']); } 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']); } if(isset($_SESSION['fcraUploadFailed'])) { echo "<script>alert('Error!!! Unable to upload FCRA file. Internal server error.');</script>"; unset($_SESSION['fcraUploadFailed']); } if(isset($_SESSION['panUploadFailed'])) { echo "<script>alert('Error!!! Unable to upload PAN file. Internal server error.');</script>"; unset($_SESSION['panUploadFailed']); } if(isset($_SESSION['fcraSaveFailed'])) { echo "<script>alert('Error!!! Unable to save FCRA details. Internal server error.');</script>"; unset($_SESSION['fcraSaveFailed']); } if(isset($_SESSION['panSaveFailed'])) { echo "<script>alert('Error!!! Unable to save PAN details. Internal server error.');</script>"; unset($_SESSION['panSaveFailed']); } ?> <div class="container main"> <div class="row"> <form action = "app/page1App.php" id="page1Form" enctype="multipart/form-data" class="form-horizontal" method="post"> <div class="col-md-12 formContainer"> <section> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="SliName">Name of the SLI <span class="star">*</span></label> <div> <input type="text" name="sliName" id="sliName" value="<?php echo $sliName; ?>" class="col-md-4" required autofocus> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="address" >Address Line 1 <span class="star">*</span></label> <div > <input type="text" name="address" id="address" value="<?php echo $useraddress; ?>" placeholder="H.no,Street Name" class="col-md-4"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="city">Address Line 2 <span class="star">*</span></label> <div class=""> <input type="text" name="city" id="city" value="<?php echo $city; ?>" placeholder="City" class="col-md-4"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="city">Address Line 3</label> <div class=""> <input type="text" name="addressLine3" id="addressLine3" value="<?php echo $addressLine3; ?>" placeholder="Address" class="col-md-4"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="state" >State <span class="star">*</span></label> <div class=""> <select name="state" class="col-md-4" id="state" name="state" onchange="getDistricts(this.value)"> <option value="0">Select State</option> <?php echo $states; ?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="district">District <span class="star">*</span></label> <div class=""> <select name="district" id="district" class="col-md-4"> <option value="0">Select District</option> <?php echo $districts; ?> </select> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="phoneNumber">Phone Number <span class="star">*</span></label> <div class=""> <input type="text" name="phoneNumber" id="phoneNumber" value="<?php echo $mobileNumber; ?>" maxlength="10" placeholder="Ex:0123456789" class="col-md-4" onkeypress="return number2(event)"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="faxNumber">Fax Number <!--<span class="star">*</span>--></label> <div class=""> <input type="text" name="faxNumber" id="faxNumber" maxlength="15" value="<?php echo $fax; ?>" placeholder="Ex:0123456789" class="col-md-4" onkeypress="return number(event)"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="email">Email <span class="star">*</span></label> <div class=""> <input type="email" name="email" id="email" value="<?php echo $email; ?>" maxlength="256" placeholder="abc@gmail.com" class="email col-md-4"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="website">Website</label> <div class=""> <input type="text" name="website" id="website" maxlength="256" value="<?php echo $website; ?>" placeholder="www.xyz.com" class="col-md-4"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="pincode">Pincode <span class="star">*</span></label> <div class=""> <input type="text" name="pincode" id="pincode" maxlength="6" value="<?php echo $zipcode; ?>" placeholder="123456" class="col-md-4" onkeypress="return number(event)"> </div> </div> <div class="form-group"> <label class="col-md-3 offset-lg-3" for="constitution">Constitution <span class="star">*</span></label> <div class=""> <select name="constitution" id="constitution" class="col-md-4"> <option value="0" <?php echo $constitution0; ?>>Select constitution</option> <option value="1" <?php echo $constitution1; ?>>Trust</option> <option value="2" <?php echo $constitution2; ?>><!--Society-->FPO / MPCS</option> <option value="3" <?php echo $constitution3; ?>>Co-op Society</option> <option value="4" <?php echo $constitution4; ?>>Company Act</option> </select> </div> </div> </section> <section> <div class="col-md-12 removePadding"> <h3 class="subHead col-md-11 removePadding ">Details Of Registration <span class="star">*</span></h3> <input type="button" class="col-md-1 btn btn-default add_field_button" value="Add New"> </div> <div class="col-md-12 table-responsive removePadding"> <table class="table table-bordered cs-table"> <thead> <tr> <th>Act of Registration</th> <th>Date & Place of registration</th> <th>Registration number</th> <th>Validity period</th> <th>Action</th> </tr> </thead> <tbody class="input_fields_wrap"> <?php echo $resgistrationDetails; ?> </tbody> </table> </div> </section> <section> <div class=""> <h3 class="subHead">Activities of the Business Entity <span class="star">*</span></h3> <div class="col-md-12" style="padding:10px 20px"> <div class="form-group"> <label class="col-md-2" for="existing">Existing</label> <div class="col-md-6"> <!-- <input type="text" value="<?php echo $existing; ?>" name="existing" id="existing"> --> <textarea style="width:100%;" name="existing" id="existing"><?php echo $existing; ?></textarea> </div> </div> <div class="form-group"> <label class="col-md-2" for="proposed">Proposed</label> <div class="col-md-6"> <!-- <input type="text" name="proposed" value="<?php echo $proposed; ?>" id="proposed"> --> <textarea style="width:100%;" name="proposed" id="proposed"><?php echo $proposed; ?></textarea> </div> </div> <!--<div class="form-group"> <label class="col-md-2" for="pan">PAN <span class="star">*</span></label> <div class="col-md-6"> <input type="text" name="pan" value="<?php echo $pan; ?>" id="pan" maxlength="10"> </div> </div>--> </div> </div> </section> <section> <div class="col-md-12 removePadding"> <h3 class="subHead">Whether Registered under Foreign Contribution (Regulation) Act, 1976(FCRA)? <input type="radio" name="isFCRA" value="1" id="fcraYes" <?php echo $isFCRA1; ?> onclick="displayAct(1)"> <label for="fcraYes" style="color:black;font-weight:normal;cursor:pointer;">Yes</label> <input type="radio" name="isFCRA" value="0" id="fcraNo" <?php echo $isFCRA2; ?> onclick="displayAct(0)"> <label for="fcraNo" style="color:black;font-weight:normal;cursor:pointer;">No</label> </h3> </div> <div class="col-md-12" id="regulationAct"> <!--<div class="form-group"> <label class="col-md-2" for="details">Details:</label> <textarea placeholder="Details" id="FCRADetails" rows="7" class="col-md-10" name="FCRADetails"><?php echo $FCRADetails; ?></textarea> </div>--> <div class="form-group"> <label class="col-md-2" for="details">Date of Registration:</label> <div class="input-group date col-md-3 offset-lg-3" > <input type="text" class="form-control" value="<?php echo $FCRARegistrationDate; ?>" name="FCRARegistrationDate" id="FCRARegistrationDate" placeholder="Date of registration" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <div class="form-group"> <label class="col-md-2" for="details">Date of Renewal:</label> <div class="input-group date col-md-3 offset-lg-3" > <input type="text" class="form-control" value="<?php echo $FCRARenewalDate; ?>" name="FCRARenewalDate" id="FCRARenewalDate" placeholder="Date of Renewal" /> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <div class="form-group"> <label class="col-md-2">Upload Provision<br> <small>(upload pdf/image only)</small>:</label> <input type="hidden" value="<?php echo $txtFCRAStatus; ?>" id="txtFCRAUpload" name="txtFCRAUpload"> <input type="hidden" value="<?php echo $txtFCRAFileName; ?>" name="txtFCRAFileName"> <input type="file" value="" id="FCRAFile" name="FCRAFile" class="browse-o" onchange="ValidateFileUpload('FCRAFile','txtFCRAUpload','FCRAUploadStatus')"> <button type="button" class="browse-d">Browse</button> <!--<input type="button" value="Upload" class="uploadBtn" onclick="validatePDF(2,'FCRAFile','FCRAUploadStatus','txtFCRAUpload')">--> <div id="FCRAUploadStatus" class="divSuccess"><?php echo $FCRAUploadStatus; ?></div> </div> </div> <section> <!--<div class="col-md-12 removePadding"> <h3 class="subHead">* Whether a Permanent Account Number (PAN) obtained from Competent Authority? <input type="radio" name="isPAN" value="1" id="panYes" <?php echo $isPAN1; ?> onclick="displayAuthority(1)"> <label for="panYes" style="color:black;font-weight:normal;cursor:pointer;">Yes</label> <input type="radio" name="isPAN" value="0" id="panNo" <?php echo $isPAN2; ?> onclick="displayAuthority(0)"> <label for="panNo" style="color:black;font-weight:normal;cursor:pointer;">No</label> </h3> </div>--> <div class="col-md-12 removePadding "> <h3 class="subHead">Please upload a PAN <span class="star">*</span></h3> <div class="form-group" id="panAuthority"> <label class="col-md-2">Upload<br> <small>(upload pdf/image only)</small>:</label> <input type="hidden" value="<?php echo $txtAuthorityStatus; ?>" id="txtAuthorityUpload" name="txtAuthorityUpload"> <input type="hidden" value="<?php echo $txtPANFileName; ?>" name="txtPANFileName"> <input type="file" value="" id="panFile" name="panFile" class="browse-o" onchange="ValidateFileUpload('panFile','txtAuthorityUpload','authorityUploadStatus')"> <button type="button" class="browse-d">Browse</button> <!--<input type="button" value="Upload" class="uploadBtn" onclick="validatePDF(3,'panFile','authorityUploadStatus','txtAuthorityUpload')">--> <div id="authorityUploadStatus" class="divSuccess"><?php echo $authorityUploadStatus; ?></div> </div> <div class="form-group"> <label class="col-md-2" for="pan">PAN Number<span class="star">*</span></label> <div class="col-md-6"> <input type="text" name="pan" value="<?php echo $pan; ?>" id="pan" maxlength="10"> </div> </div> </div> </section> <div class="text-center col-md-12"> <input type="button" value="Next" class="btn btn-cs" onclick="return validatePage1()"> </div> <div class="col-md-12 text-right">1 of 6</div> </div><!--end formContainer--> </form> </div> </div> <script type="text/javascript"> $(function(){ $('.input-group.registerDate').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' // "endDate": new Date() }); $('.input-group.validDate').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' //"startDate": new Date() }); }); </script> <script type='text/javascript'> $(document).ready(function() { $('.input-group.registerDate').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' // "endDate": new Date() }); $('.input-group.validDate').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' //"startDate": new Date() }); $('.input-group.date').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' // "startDate": new Date() }); var fcra1 = '<?php echo $isFCRA1; ?>'; var pan1 = '<?php echo $isPAN1; ?>'; if(fcra1 == '') { document.getElementById('regulationAct').style.display = "none"; } else { document.getElementById('regulationAct').style.display = "block"; } /*if(pan1 == '') { document.getElementById('panAuthority').style.display = "none"; } else { document.getElementById('panAuthority').style.display = "block"; }*/ $(".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 wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID var x = '<?php echo $registrationCount; ?>'; //initlal text box count $(add_button).click(function(e) //on add input button click { //act = document.getElementById('act'+x).value; act = document.getElementById('act'+x); date = document.getElementById('date'+x); place = document.getElementById('place'+x); registrationNumber = document.getElementById('registrationNumber'+x); //validPeriod = document.getElementById('validPeriod'+x); //validPeriodTo = document.getElementById('validPeriodTo'+x); actLength = document.getElementsByName('act[]').length; for(i=0;i<actLength;i++) { act = document.getElementsByName('act[]'); date = document.getElementsByName('date[]'); place = document.getElementsByName('place[]'); registrationNumber = document.getElementsByName('registrationNumber[]'); if(act[i].value.trim() != "" && date[i].value.trim() != "" && place[i].value.trim() != "" && registrationNumber[i].value.trim() != "" ) { flag = 1; } else { flag = 0; break; } } //if(act.value.trim() != "" && date.value.trim() != "" && place.value.trim() != "" && registrationNumber.value.trim() != "" ) if(flag == 1) { e.preventDefault(); //if(x < max_fields){ //max input box allowed x++; //text box increment $(wrapper).append('<tr><td class="td1"><input type="hidden" class="form-control" name="registeredID[]" id="registeredID'+x+'"/><input type="text" name="act[]" id="act'+x+'" placeholder="" class="place"></td><td class="td2"><div class="input-group date registerDate" ><input type="text" class="form-control dateinput" name="date[]" id="date'+x+'" placeholder="Date" /><span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span></div><input type="text" name="place[]" id="place'+x+'" placeholder="Place" class="place"></td> \ <td class="td3"><input type="text" name="registrationNumber[]" id="registrationNumber'+x+'" placeholder="Registration Number"></td> \ <td class="td4"> \ <div class=""> \ <input type="hidden" name="validPeriod[]" value="1" id="validPeriod'+x+'">\ <input type="radio" name="validPeriodStatus'+x+'[]" id="permanent'+x+'" value="1" onclick="validityPeriodStatus(1,'+x+')" checked> \ <label for="permanent'+x+'" >Permanent</label><br> \ <input type="radio" name="validPeriodStatus'+x+'[]" id="temporary'+x+'" value="2" onclick="validityPeriodStatus(2,'+x+')"> \ <label for="temporary'+x+'">Temporary</label> <br> \ </div> \ </td><td class="td5"><a class="action2"><i class="fa fa-trash remove_field" aria-hidden="true" ></i></a></td></tr>'); //add input box //} $('.input-group.registerDate').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' //"endDate": new Date() }); $('.input-group.validDate').datepicker({ calendarWeeks: true, todayHighlight: true, autoclose: true, format: 'dd/mm/yyyy' //"startDate": new Date() }); } else { alert("Please fill all fields first."); } }); $(wrapper).on("click",".remove_field", function(e){ //user click on remove text e.preventDefault(); $(this).closest('tr').remove(); x--; }) }); function getDistricts(stateID) { if(stateID == 0) { document.getElementById('district').innerHTML = ""; document.getElementById('district').innerHTML = '<option value="0">Select District</option>'; } else { $.post("app/ajax.php",{type:1,stateID:stateID},function(data) { document.getElementById('district').innerHTML = '<option value="0">Select District</option>'+data; }); } } function number(e) { 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) { 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 validatePage1() { sliName = document.getElementById('sliName'); address = document.getElementById('address'); city = document.getElementById('city'); pincode = document.getElementById('pincode'); pan = document.getElementById('pan'); existing = document.getElementById('existing'); proposed = document.getElementById('proposed'); email = document.getElementById('email'); website = document.getElementById('website'); state = document.getElementById('state').value; district = document.getElementById('district').value; phoneNumber = document.getElementById('phoneNumber'); faxNumber = document.getElementById('faxNumber'); constitution = document.getElementById('constitution').value; act1 = document.getElementById('act1').value; date1 = document.getElementById('date1'); place1 = document.getElementById('place1'); registrationNumber1 = document.getElementById('registrationNumber1'); //validPeriod1 = document.getElementById('validPeriod1'); //validPeriodTo1 = document.getElementById('validPeriodTo1'); var regpan = /^([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}?$/; var regEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(sliName.value.trim() == '') { alert("Please enter SLI Name."); sliName.value = ""; sliName.focus(); return false; } if(address.value.trim() == '') { alert("Please enter address1."); address.value = ""; address.focus(); return false; } if(city.value.trim() == '') { alert("Please enter address2."); city.value = ""; city.focus(); return false; } if(state == 0) { alert("Please select state."); return false; } if(district == 0) { alert("Please select district."); return false; } if(phoneNumber.value.length == 0) { alert("Please enter phone number."); phoneNumber.value = ""; phoneNumber.focus(); return false; } if(phoneNumber.value.length < 10) { alert("Invalid phone number."); phoneNumber.value = ""; phoneNumber.focus(); return false; } /*if(faxNumber.value.length == 0) { alert("Fax number should not be empty."); faxNumber.value = ""; faxNumber.focus(); return false; } if(faxNumber.value.length < 10) { alert("Invalid fax number."); faxNumber.value = ""; faxNumber.focus(); return false; }*/ if(email.value.trim() == '') { alert("Please enter email."); email.value = ""; email.focus(); return false; } if(!regEmail.test(email.value)) { alert('Please enter valid Email'); email.focus(); return false; } /*if(website.value.trim() == '') { alert("Please enter website address."); website.value = ""; website.focus(); return false; }*/ /*if(website.value.trim() != "") { var result = ValidURL(website.value); if(result == -1) { return false; } }*/ if(pincode.value.trim() == '') { alert("Please enter pincode."); pincode.value = ""; pincode.focus(); return false; } if(pincode.value.length < 6) { alert("Invalid pincode number."); pincode.value = ""; pincode.focus(); return false; } if(constitution == 0) { alert("Please select constitution."); return false; } /* if(act1== 0) { alert("Please select a act."); return false; } if(date1.value.trim() == '') { alert("Please enter date."); date1.value = ""; date1.focus(); return false; } if(place1.value.trim() == '') { alert("Please enter place."); place1.value = ""; place1.focus(); return false; } if(registrationNumber1.value.trim() == '') { alert("Please enter registration number."); registrationNumber1.value = ""; registrationNumber1.focus(); return false; } /*if(validPeriod1.value.trim() == '') { alert("Please enter from validity period."); validPeriod1.value = ""; validPeriod1.focus(); return false; } if(validPeriodTo1.value.trim() == '') { alert("Please enter to validity period."); validPeriodTo1.value = ""; validPeriodTo1.focus(); return false; }*/ actLength = document.getElementsByName('act[]').length; for(i=0;i<actLength;i++) { act = document.getElementsByName('act[]'); date = document.getElementsByName('date[]'); place = document.getElementsByName('place[]'); registrationNumber = document.getElementsByName('registrationNumber[]'); if(act[i].value== 0) { alert("Please enter act of registration."); act[i].value = ""; act[i].focus(); return false; } if(date[i].value.trim() == '') { alert("Please enter date."); date[i].value = ""; date[i].focus(); return false; } if(place[i].value.trim() == '') { alert("Please enter place."); place[i].value = ""; place[i].focus(); return false; } if(registrationNumber[i].value.trim() == '') { alert("Please enter registration number."); registrationNumber[i].value = ""; registrationNumber[i].focus(); return false; } } if(existing.value.trim() == '') { alert("Please enter existing details."); existing.value = ""; existing.focus(); return false; } if(proposed.value.trim() == '') { alert("Please enter proposed details."); proposed.value = ""; proposed.focus(); return false; } if(pan.value.trim() == '') { alert("Please enter PAN."); pan.value = ""; pan.focus(); return false; } if(regpan.test(pan.value) == false) { alert("Invalid PAN. Please enter valid PAN."); pan.value = ""; pan.focus(); return false; } if(email.value.trim() != "") { $.post("app/ajax.php",{type:7,email:email.value},function(result) { if(result > 0) { alert("Email already exists. Please enter another email."); return false; } else { fcraYes = document.getElementById('fcraYes'); FCRADetails = document.getElementById('FCRADetails'); FCRAFile = document.getElementById('FCRAFile'); txtFCRAUpload = document.getElementById('txtFCRAUpload'); txtAuthorityUpload = document.getElementById('txtAuthorityUpload'); if(fcraYes.checked == true) { /*if(FCRADetails.value.trim() == "") { alert("Please enter FCRA details.") return false; }*/ if(txtFCRAUpload.value == 0) { alert("Please upload FCRA file.") return false; } } if(txtAuthorityUpload.value == 0) { alert("Please upload PAN file.") return false; } /*if(panYes.checked == true) { if(txtAuthorityUpload.value == 0) { alert("Please upload PAN file.") return false; } }*/ document.getElementById('page1Form').submit(); } }); } return true; } function validDate(str) { var pattern =/^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/; if(!pattern .test(str)) { alert("Please enter valid date (dd/mm/yyyy)."); return -1; } else { return 1; } } function ValidURL(str) { var regex = /(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/; if(!regex .test(str)) { alert("Please enter valid webiste address.[Ex: http://www.abc.com]."); return -1; } else { return 1; } } function addTable() { return false; } function ValidateFileUpload(fileID,txtID,uploadStatusID) { pdfFlag = 0; var fuData = document.getElementById(fileID); var txtField = document.getElementById(txtID); var uploadStatus = document.getElementById(uploadStatusID); var FileUploadPath = fuData.value; //To check if user upload any file if (FileUploadPath == '') { alert("Please upload a pdf/image file."); uploadStatus.innerHTML = "<span class='fail'></span>"; txtField.value = 0; pdfFlag = 0; } else { var Extension = FileUploadPath.substring( FileUploadPath.lastIndexOf('.') + 1).toLowerCase(); //The file uploaded is an pdf if (Extension == "pdf" || Extension == "jpg" || Extension == "jpeg" || Extension == "png") { var size=1048576; var file_size=fuData.files[0].size; if(file_size>=size) { alert('File too large'); uploadStatus.innerHTML = "<span class='fail'></span>"; txtField.value = 0; pdfFlag = 0; } else { pdfFlag = 1; txtField.value = 1; uploadStatus.innerHTML = "<span class='success'></span>"; } } //The file upload is NOT an pdf else { alert("Please upload a pdf/image file."); uploadStatus.innerHTML = "<span class='fail'></span>"; txtField.value = 0; } } } function displayAct(type) { if(type == 0) { document.getElementById('regulationAct').style.display = "none"; /*document.getElementById('FCRADetails').value = ""; document.getElementById('FCRAUploadStatus').innerHTML = ""; document.getElementById('FCRAFile').value = ""; document.getElementById('txtFCRAUpload').value = 0;*/ } else { document.getElementById('regulationAct').style.display = "block"; } } function displayAuthority(type) { /*if(type == 0) { document.getElementById('panAuthority').style.display = "none"; /*document.getElementById('panFile').value = ""; document.getElementById('authorityUploadStatus').innerHTML = ""; document.getElementById('txtAuthorityUpload').value = 0;*/ /*}*/ /*else { document.getElementById('panAuthority').style.display = "block"; }*/ } function validityPeriodStatus(val,i) { document.getElementById('validPeriod'+i).value = val; } </script> <style> /*css for login button in responsive*/ @media (max-width: 991px) { .hidden-md-down { display: block !important; } ul#markut-main-menu { display: none !important; } } </style> <?php include"footer.php"?>