Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: voucher_list.php
<!-- Page header --> <div class="page-header border-bottom-0"> <div class="page-header-content header-elements-md-inline"> <div class="page-title d-flex"> <h4><a href="javascript:void(0)" class="BackButton-Link" onclick="goBack()"><i class="icon-arrow-left52 mr-2"></i></a> <?php echo $this->lang->line('voucher_lists'); if ($id > 0) echo " # $id"; ?> </h4> </div> </div> </div> <!-- /page header --> <!-- Content area --> <div class="content pt-0"> <div class="justify-content-right" style="text-align: right;"> <input type="button" value="<?php echo $this->lang->line('CUST_LBL_229') . ' ' . $this->lang->line('voucher_lists'); ?>" class="btn btn-primary ThemeColorButton cancel_vouchers" /> <input type="button" value="Delete Vouchers" class="delete_vouchers btn btn-primary ThemeColorButton" /> </div> <div class="card"> <!-- Our Working Area Start --> <?php if ($this->session->flashdata('message') != ''){ ?> <div class="form-group row"> <div class="col-lg-12"> <div class="alert alert-success"><?php echo $this->session->flashdata('message'); ?></div> </div> </div> <?php } ?> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover"> <thead> <tr class="bg-primary"> <th width="50"><input type="checkbox" name="checkall_voucher" id="checkall_voucher" value=""></th> <th><?php echo $this->lang->line('BE_CODE_10'); ?></th> <th><?php echo $this->lang->line('BE_PM_11'); ?></th> <th><?php echo $this->lang->line('voucher_no'); ?></th> <th><?php echo $this->lang->line('start_date'); ?></th> <th><?php echo $this->lang->line('end_date'); ?></th> <th><?php echo $this->lang->line('voucher_used'); ?></th> </tr> </thead> <tbody> <?php $i = 1; foreach($vouchers as $row ) { ?> <tr> <td><input type="checkbox" name="post_voucher_ids[]" id="checkbox<?php echo $no;?>" value="<?php echo $row->id; ?>" class="post_voucher_ids"></td> <td><?php echo $i;?></td> <td class="highlight"><? echo $currency.' '.$row->price;?></td> <td><?php echo stripslashes($row->voucher_number);?></td> <td><?php echo stripslashes($row->from_date);?></td> <td><?php echo stripslashes($row->to_date);?></td> <td><?php echo $row->status == 1 ? '<li class="fa fa-check-square-o"></li>' : '<li class="fa fa-times"></li>'; ?></td> </tr> <?php $i++; } ?> <?php if(empty($vouchers)) { ?> <tr> <td colspan="5"> <strong><?php echo $this->lang->line('BE_GNRL_9'); ?></strong> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <script> $("#checkall_voucher").click(function () { $(".post_voucher_ids").not(this).prop('checked', this.checked); }); $(".delete_vouchers").click(function(e){ e.preventDefault(); var _ids = $.map($('.post_voucher_ids:checked'), function(c){return c.value; }); if(_ids!='') { var href = "<?php echo base_url($this->config->item('apanel_name').'/voucher/delete_multiple_vouchers?ids='); ?>"+_ids; var btn = this; let text; if (confirm("Are you sure, you want to delete!") == true) { $.ajax({ type:'GET', url:href, dataType: 'json', success:function(res){ console.log(res.success); showStickyErrorToast(res.success, '', 'success'); setTimeout(function () { window.location.reload(true); }, 3000); } }); } else { alert("You canceled the action!"); } } }); $(".cancel_vouchers").click(function(e){ e.preventDefault(); var _ids = $.map($('.post_voucher_ids:checked'), function(c){return c.value; }); if(_ids!='') { var href = "<?php echo base_url($this->config->item('apanel_name').'/voucher/cancel_multiple_vouchers?ids='); ?>"+_ids; var btn = this; let text; if (confirm("Are you sure, you want to cancel!") == true) { $.ajax({ type:'GET', url:href, dataType: 'json', success:function(res){ console.log(res.success); showStickyErrorToast(res.success, '', 'success'); setTimeout(function () { window.location.reload(true); }, 3000); } }); } else { alert("You canceled the action!"); } } }); </script>