EVOLUTION-NINJA
Edit File: view_owner_khata.php
<?php echo view('includes/header');?> <section class="content-header"> <h1> Owner Khata details </h1> </section> <!--- section 1 ----> <section class="content"> <form class="send_owner_khata"> <?php $uri=service('uri') ?> <input type="hidden" class="id" value="<?php echo $uri->getSegment(2);?>"> <div class="row land_owner_a"> <div class="col-sm-4"> <p>Owner Khata</p> <?php $ext = pathinfo($details->owner_khata, PATHINFO_EXTENSION); ?> <?php if($ext == 'jpg' || $ext == 'JPG' || $ext == 'png' || $ext == 'PNG') { ?> <a href="<?php echo base_url('public/doc_owner_khata');?>/<?php echo $details->owner_khata;?>" target="_blank"><img src="<?php echo base_url('public/doc_owner_khata');?>/<?php echo $details->owner_khata;?>" class="appr_plan" style="height:300px;width:300px;"/></a> <br> <a class="remove" id="" href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span>Remove</a> <?php } else if($ext == 'pdf' || $ext == 'PDF') { ?> <a href="<?php echo base_url('public/doc_owner_khata');?>/<?php echo $details->owner_khata;?>" target="_blank"> <embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=<?php echo base_url('public/doc_owner_khata');?>/<?php echo $details->owner_khata;?>" style="height:300px;width:300px;"/> <br> <button type="button" class="btn btn-primary btn-md view">View</button></a> <a class="remove" id="" href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span>Remove</a> <?php } ?> </div> </div> <?php if($details->owner_khata != "") {?> <div class="col-md-12" > <div class="form-group col-md-8"> <button type="button" class="btn btn-primary btn-md center-block send_mail">Send Mail</button> </div> </div> <?php } ?> </form> </section> <!--- section 2 ----> <style type="text/css"> .content-wrapper, .right-side { min-height: 2000px !important; } .bok-details{ background: gainsboro; text-align: center; padding-top: 7px; padding-bottom: 7px; margin-bottom: 30px; margin-top: 33px; } a { color: inherit; } </style> <script type="text/javascript"> var id = $('.id').val(); $(".send_mail").click(function(){ window.location.href="<?php echo site_url('send-mail-owner-contents');?>/"+id+'/'+'owk'; }); $('.remove').click(function() { $.ajax({ url:"<?php echo site_url("delete-owner-khata")?>", type:"POST", data:{id:id}, success:function(response) { //response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { toastr["success"](response.message); window.location.href = "<?php echo site_url('owner-document-list');?>"; } } }); }); </script> <?php echo view('includes/footer');?>