ok
Direktori : /home2/selectio/public_html/subamangala/admin/modal/ |
Current File : /home2/selectio/public_html/subamangala/admin/modal/update-enquiery.php |
<?php include "../config/config.php"; $ids = $_GET['id']; $statement = $pdo->prepare("SELECT * FROM enquiery_table e where e.id=".$ids); $statement->execute(); $datas = $statement->fetchAll(PDO::FETCH_ASSOC); $totalData = $statement->rowCount(); if($totalData==1){ ?> <style> .modal-open .modal { overflow-x: hidden; overflow-y: hidden; } </style> <div class="modal-dialog modal-lg" role="document" id="add_modal" style="overflow-x: hidden; overflow-y: hidden;"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title mt-0" id="myLargeModalLabel"><b>Update Enquiery Details</b></h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top: -25px;"><i class="fa fa-times"></i></button> </div> <form id="add_form" method="post"> <div id="content-div"> <input type="hidden" name="ids" value="<?=$ids?>"> <div class="modal-body" style="padding: 20px 40px 20px 40px;"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label>Name</label> <input type="text" name="enquiery_name" id="enquiery_name" class="form-control tamil" value="<?=$datas[0]['name']?>" required> <input type="hidden" name="ids" id="ids" class="form-control" value="<?=$_GET['id']?>" required> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Father Name</label> <input type="text" name="father_name" id="father_name" class="form-control tamil" value="<?=$datas[0]['father_name']?>" required> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Gender</label> <select name="gender" class="form-control tip select2" id="gender"> <option value="">Select The Gender</option> <option value="Male" <?php if('Male'==$datas[0]['gender']){echo "selected";} ?>>Male</option> <option value="Female" <?php if('Female'==$datas[0]['gender']){echo "selected";} ?>>Female</option> </select> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Mobile No</label> <input type="number" name="mobile_no" id="mobile_no" class="form-control" value="<?=$datas[0]['mobile_no']?>" required> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Alter No</label> <input type="number" name="alter_no" id="alter_no" class="form-control" value="<?=$datas[0]['alter_no']?>" required> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Native Place</label> <input type="text" name="native_place" id="native_place" class="form-control tamil" value="<?=$datas[0]['native_place']?>" required> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Community</label> <input type="text" name="community" id="community" class="form-control tamil" value="<?=$datas[0]['community']?>" required> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>Status</label> <select name="status" class="form-control tip select2" id="status"> <option value="">Select The Status</option> <option value="1" <?php if(1==$datas[0]['status']){echo "selected";} ?>>Enquiery</option> <option value="0" <?php if(0==$datas[0]['status']){echo "selected";} ?>>Canceled</option> </select> </div> </div> </div> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary">Update</button> </div> </div> </form> <div id="loading-div" style="display: none; padding-bottom: 80px;"> <center> <img src="img/loading.gif" style="width: 250px;"><br><b class="blinking">Processing Please Wait...</b></center> </div> </div> </div> <?php } ?> <script language=JavaScript src="tamil/utf.js"> </SCRIPT> <SCRIPT language=JavaScript src="tamil/tamil.js"></SCRIPT> <script> $(document).ready(function(){ $('input,textarea').on('keydown',function(event){ if(event.which==121){ $(this).toggleClass('tamil'); return false; } if($(this).hasClass('tamil')){ toggleKBMode(event); }else{ return true; } }); $('input,textarea').on('keypress',function(event){ if($(this).hasClass('tamil')){ convertThis(event); } }); }); </script> <script> $('#add_form').on('submit', function(e){ console.log("Click And Form Working"); e.preventDefault(); $('#loading-div').show(); $('#content-div').hide(); var formData = new FormData(this); formData.append('type', 'update_enquiery'); $.ajax({ url: 'apis/subamangala-matrimony.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { if(response['status']==200){ alert(response['message']); $("#add_modal .close").click(); $('#add_form').trigger("reset"); emp_datas(); $('#loading-div').hide(); $('#content-div').show(); }else{ alert(response['message']); $('#loading-div').hide(); $('#content-div').show(); } } }); }); </script>