JezK
Edit File: page1.php
<?php include("header.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['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["displayInstructions"])) { // echo '<script>$(window).load( function(){$("#open").trigger("click");});</script>'; $_SESSION["displayInstructions"] = 1; } ?> <div class="col-md-12"> <!-- Trigger the modal with a button --> <button type="button" class="btn btn-info btn-lg" id="open" data-toggle="modal" data-target="#myModal" style="display:none;">Open Modal</button> <!-- Modal --> <div class="modal fade" id="myModal" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="border-bottom: 1px solid #e5e5e5;"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title text-center">Instructions</h4> </div> <div class="modal-body"> <h3 class="" style="margin: 0px 0px 10px 0px;">Please make sure that you have soft copies of the following </h3> <ol class="instructions"> <!--<li>Detail of affiliated SHG's to the organisaiton in the enclosed format <a class="btn btn-default" href="download.php?type=1&file=loyaltiList.xlsx" style="float: right;margin-right: 5%;margin-top: -1%;">Download</a> </li>--> <li>Brief profile of the organization and details of the current organisation </li> <li>Brief profile of the Executive members of the organization.</li> <li>Organogram of the organization showing the flow of work.</li> <li>List of staff having relevant experience in the field for managing the financials activities. </li> <li>Annual reports for last three years.</li> <li>Audited P/L, Balance sheets for last three years certified by the auditors.</li> <li>IT returns for last three years.</li> <!-- <li>An affidavit stating that no criminal proceedings have been registered/ are pending against the organization.</li>--> <li> Organization PAN card and valid registration certificate.</li> <li>Organization registration certificate.</li> <li>Letter stating TAN number received , if any.</li> <li>Letter stating FCRA registration number received, if any. </li> <li>80G/12A certification letter, if any.</li> <li>Trust Deed / Registration Deed / Memorandum & Article of Association/ Bye Laws/ Rules and Regulations. (Highlighting the clause, that allows the organization to indulge in financial activities).</li> <!--li> In case the organization is in loss, details of the projects to be received in the years ahead.</li--> <li>Board Resolution stating the name of the person authorized to sign the agreement on behalf of the organization<a class="btn btn-default" href="download.php?type=1&file=Board_Resolution.docx" style="margin-right: 1%;margin-top: -1%;margin-left:2%">Download</a></li> <li>Signed copy of ID and Address proof of Authorized Signatories of the Organization.</li> <li>Bank Pass Book Xerox for the remittance of BC Commission</li> <li>Self attested copy of VoterID, Aadhar Card, Pan Card (Any One) and Passport size photo of board of directors and the staffs engaged in NABFINS work</li> <!--li>Residential Proof of the organization. (Ex. Land line telephone bill, EB Bill…Etc not less than 3 Months)</li--> <li>Current / On going projects detail of the organisation, If Any<a class="btn btn-default" href="download.php?type=1&file=Current_projects_detail.docx" style="margin-right: 1%;margin-top: -1%;"id="addmargin">Download</a></li> <li>Loyalty List--Please download and fill the details in the sheet before you start filling the form <a class="btn btn-default" href="download.php?type=1&file=loyaltiList.xlsx" style="margin-right: 1%;margin-top: -1%;"id="addmargin1">Download</a></li> </ol> <div style="clear:both;"></div> <div class="text-center"><input type="button" value="OK" class="btn btn-cs" data-dismiss="modal"></div> </div> </div> </div> </div> </div> <div class="container main"> <div class="row"> <form action="app/page1App.php" id="page1Form" class="form-horizontal" method="post" > <div class="col-md-12 formContainer" > <section> <div class="form-group"> <label class="col-md-3 customlabel" for="applicationName">Application for</label> <div> <input type="radio" name="applicationType" id="businessFacilitator" value="1" <?php echo $applicationType1; ?> onclick="setValidityYears(3)"> <label id="label" class="customlabel1" for="businessFacilitator">Business facilitator</label> <input class="offset-md-2" type="radio" name="applicationType" id="businessCorrespondent" value="2" <?php echo $applicationType2; ?> onclick="setValidityYears(5)"> <label id="label" class="customlabel1" for="businessCorrespondent">Business Correspondent</label> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="applicationName">Name of the Organization <span class="star">*</span></label> <div> <input type="hidden" value="<?php echo $formSubmissionID; ?>" id="formSubmissionID" name="formSubmissionID"> <input type="text" name="applicationName" id="applicationName" value="<?php echo $applicationName; ?>" class="w-100" required> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="address">Address <span class="star">*</span></label> <div> <input type="text" name="address" id="address" value="<?php echo $userAddress; ?>" placeholder="H.no, Street Name" class="w-100"> </div> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="city">City/Village Name</label> <div class=""> <input type="text" name="city" id="city" value="<?php echo $city; ?>" placeholder="City" class="w-100"> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="state">State</label> <div class=""> <select name="state" id="state" class="w-100" onchange="getDistricts(this.value)"> <option value="0">Select State</option> <?php echo $states; ?> </select> </div> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="district">District</label> <div class=""> <select name="district" id="district" class="w-100" onchange="getDistricts(this.value)"> <option value="0">Select District</option> <?php echo $districts; ?> </select> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="phoneNumber">Phone Number <span class="star">*</span> </label> <div class=""> <input type="text" name="mobileNumber" id="mobileNumber" value="<?php echo $mobileNumber; ?>" placeholder="Ex:0123456789" class="w-100" maxlength="15" onkeypress="return number2(event)"> </div> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="faxNumber">Fax Number</label> <div class=""> <input type="text" name="fax" id="fax" placeholder="Ex:0123456789" value="<?php echo $fax; ?>" class="w-100" maxlength="15" onkeypress="return number(event)"> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="email">Email <span class="star">*</span></label> <div class=""> <input type="email" name="email" id="email" maxlength="256" value="<?php echo $email; ?>" placeholder="abc@gmail.com" class="email w-100"> </div> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="website">Website</label> <div class=""> <input type="text" name="website" id="website" value="<?php echo $website; ?>" placeholder="http://www.xyz.com" class="w-100"> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="contactPerson">Contact Person</label> <div class=""> <input type="text" name="contactPerson" id="contactPerson" value="<?php echo $contactPerson; ?>" placeholder="" class="w-100"> </div> </div> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="designation">Designation</label> <div class=""> <input type="text" name="designation" id="designation" value="<?php echo $bcDesignation; ?>" placeholder="Ex:executive" class="w-100"> </div> </div> </div> <div class="col-sm-6"> <div class="form-group"> <label class="customlabel1" for="constitution">Constitution <span class="star">*</span></label> <div class=""> <select name="constitution" id="constitution" class="w-100"> <option value="0" <?php echo $constitution0; ?>>Select constitution</option> <option value="1" <?php echo $constitution1; ?>>Trust</option> <option value="2" <?php echo $constitution2; ?>>Society</option> <option value="3" <?php echo $constitution3; ?>>Co-op Society</option> <option value="4" <?php echo $constitution4; ?>>Company Act</option> </select> </div> </div> </div> </div> </section> <section> <div class="col-md-12 removePadding"> </div> <div class="col-md-12 table-responsive removePadding"> <table class="table table-bordered cs-table"> <thead> <tr> <th>Acts unders which registered</th> <th>Date & Place Of Registration</th> <th>Registration Number</th> <th>Validity Period</th> </tr> </thead> <tbody class="input_fields_wrap cStyle"> <?php echo $registrationDetails; ?> </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 removePadding"> <textarea style="width:100%" name="activity" id="activity" rows="7" placeholder=""><?php echo $bcActivity; ?></textarea> </div> </div> </section> <div class="text-right col-md-12"> <input type="button" id ="hii" 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> <!-- .owl-carousel --> </div><!-- .content-carousel-wrapper --> <script type="text/javascript"> $(document).ready(function() { $('.registerDate input').datepicker({ format: 'mm/dd/yyyy', startDate: '-3d' }); // $(function(){ // $('.input-group').datepicker({ // calendarWeeks: true, // todayHighlight: true, // autoclose: true, // format: 'dd/mm/yyyy', // "endDate": new Date() // }); // $('.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() { //var max_fields = ; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID document.getElementById('validityText').style.display = 'none'; var x = '<?php echo $registrationCount; ?>'; //initlal text box count $(add_button).click(function(e) { act = document.getElementById('act' + x).value; date = document.getElementById('date' + x); place = document.getElementById('place' + x); registrationNumber = document.getElementById('registrationNumber' + x); validPeriod = document.getElementById('validity' + x); if (act != 0 && date.value.trim() != "" && place.value.trim() != "" && registrationNumber.value.trim() != "" && validPeriod.value.trim() != "") { //on add input button click 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 + '"/><select name="act[]" id="act' + x + '"><option value="0">Select Act</option><option value="1">Trust</option><option value="2">Society</option><option value="3">Co-op</option><option value="4">Companies</option></select></td><td class="td2"><div class="input-group date registerDate" style="padding-right: 4px;"><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-group date validDate"><input type="text" class="form-control" name="validity[]" id="validity' + x + '" placeholder="Valid Period" readonly /><span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span></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(); }) }); 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) { if(e.keyCode == 13 || (e.keyCode >= 48 && e.keyCode <= 57)) { return true; } else { return false; } }*/ function number(e) { var key = e.keyCode || e.charCode; if (key == 13 || key == 43 || (key >= 48 && key <= 57) || key == 8 || key == 46) { //alert(); return true; } else { return false; } } function validatePage1() { applicationName = document.getElementById('applicationName'); address = document.getElementById('address'); phoneNumber = document.getElementById('mobileNumber'); faxNumber = document.getElementById('faxNumber'); email = document.getElementById('email'); website = document.getElementById('website'); state = document.getElementById('state').value; district = document.getElementById('district').value; constitution = document.getElementById('constitution').value; activity = document.getElementById('activity'); act1 = document.getElementById('act1').value; date1 = document.getElementById('date1'); place1 = document.getElementById('place1'); registrationNumber1 = document.getElementById('registrationNumber1'); validPeriod1 = document.getElementById('validity1'); 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 (applicationName.value.trim() == '') { alert("Please enter application name."); applicationName.value = ""; applicationName.focus(); return false; } if (address.value.trim() == '') { alert("Please enter address."); address.value = ""; address.focus(); return false; } /*if(city.value.trim() == '') { alert("Please enter city."); 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 (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() != "") { var result = ValidURL(website.value); if(result == -1) { return false; } }*/ /*if(pincode.value.trim() == '') { alert("7") alert("Please enter pincode."); 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 validity period."); validPeriod1.value = ""; validPeriod1.focus(); return false; }*/ if (activity.value.trim() == '') { alert("Please enter activity."); activity.value = ""; activity.focus(); return false; } if (email.value.trim() != "") { $.post("app/ajax.php", { type: 5, email: email.value }, function(result) { if (result > 0) { alert("Email already exists. Please enter another email."); email.focus(); return false; } else { document.getElementById('page1Form').submit(); } }); } return true; } function submitForm() { // alert("uhguhgug"); } 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 showValidityText(i) { if (i == 2) { document.getElementById('validityText').style.display = 'block'; } else { document.getElementById('validityText').style.display = 'none'; } } /* function number2(e) { if(e.keyCode == 13 || e.keyCode == 43 || (e.keyCode >= 48 && e.keyCode <= 57)) { 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) { //alert(); return true; } else { return false; } } function setValidityYears(years) { document.getElementById('validityText').innerHTML = '(Renewal after ' + years + ' years)' } </script> <script> $("#open").hide(); </script> <!--<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>--> <!--<script src="https://code.jquery.com/jquery-migrate-1.4.1.min.js"></script>--> <?php include "footer.php" ?> <!--style="float: right;margin-right: 1%;margin-top: -1%;"id="addmargin"--> <style> @media (max-width:768px) { input#businessFacilitator { position: relative; top: 35px !important; } input#businessCorrespondent { position: relative; top: 35px !important; } label#label { position: relative; left: 25px !important; } } /*css for login button in responsive*/ @media (max-width: 991px) { .hidden-md-down { display: block !important; } ul#markut-main-menu { display: none !important; } } </style>