Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: coupon.php
<style> .page-title { padding: 2rem 0 !important;} .onoffswitch { position: relative; width: 56px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; } .onoffswitch-checkbox { display: none; } .onoffswitch-label { display: block; overflow: hidden; cursor: pointer; border: 2px solid #FFFFFF; border-radius: 20px; } .onoffswitch-inner { display: block; width: 200%; margin-left: -100%; transition: margin 0.3s ease-in 0s; } .onoffswitch-inner:before, .onoffswitch-inner:after { display: block; float: left; width: 50%; height: 22px; padding: 0; line-height: 22px; font-size: 12px; color: black; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; box-sizing: border-box; } .onoffswitch-inner:before { content: "ON"; padding-left: 0; background-color: #26a69a; color: #FFFFFF; } .onoffswitch-inner:after { content: "OFF"; padding-right: 6px; background-color: rgb(38 50 56); color: #FFFFFF; text-align: right; } .onoffswitch-switch { display: block; width: 12px; margin: 5px; background: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 30px; border: 2px solid #FFFFFF; border-radius: 20px; transition: all 0.3s ease-in 0s; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { margin-left: 0; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { right: 0px; } </style> <!-- Page header --> <div class="page-header border-bottom-0 mt-3 service_top_links ml-2"></div> <div class="page-header border-bottom-0 services_header"> <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> <?=$page_title?></h4> </div> <div class="actions"> <a href="<?php echo base_url($this->config->item('apanel_name')."/ecomm/coupon/add").get_query_string();?>">+ <?php echo $this->lang->line('BE_LBL_963'); ?></a> </div> </div> </div> <!-- /page header --> <!-- Content area --> <div class="content pt-0"> <div class="card"> <div class="card-header header-elements-inline services_search"> <h5 class="card-title cardCollapse"><?php echo $this->lang->line('CUST_CH_BTN'); ?></h5> <div class="header-elements"> <div class="list-icons"> <a class="list-icons-item rotate-180" data-action="collapse"></a> </div> </div> </div> <div class="card-body CollapsedCardBody" style="display: block;"> <div class="row"> <div class="col-xl-12"> <form method="post" action="<?= base_url($this->config->item('apanel_name').'/ecomm/coupon').get_query_string(); ?>"> <div class="form-group row mb-0"> <div class="col-md-6 col-12"> <div class="search_list"> <div class="search_block"> <label class="control-label" style="float: left;"><?php echo $this->lang->line('BE_LBL_966'); ?></label> <input class="form-control input-sm" placeholder="Search here..." aria-controls="DataTables_Table_0" type="search" name="search_value" value="<?php echo $this->input->post('search_value'); ?>"> </div> </div> </div> <div class="mt-3 col-md-6 col-12"> <button type="submit" name="data_search" class="btn ThemeColorButton"><?php echo $this->lang->line('CUST_CH_BTN'); ?></button> </div> </div> </form> </div> </div> </div> </div> <div class="card"> <div class="row"> <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> <div class="card-body"> <div class="form-group row"> <div class="col-lg-12"> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover" width="100%"> <thead> <tr> <th>#</th> <th><?php echo $this->lang->line('BE_LBL_969'); ?></th> <th><?php echo $this->lang->line('CUST_CH_5'); ?></th> <th><?php echo $this->lang->line('BE_LBL_504'); ?></th> </tr> </thead> <tbody> <?php $i = 0; foreach ($coupon_list as $key => $row) { ?> <tr class="item_holder"> <td align="center"><?= ($i+1) ?></td> <td align="center"> <?php if($row->coupon_amt==0){ ?> <h2><a href="<?php echo base_url($this->config->item('apanel_name')."/ecomm/coupon/edit/".$row->id).get_query_string();?>" style="text-shadow: 1px 1px 1px #000;font-size: 16px"><?=$row->coupon_per?>%</a></h2> <?php } else { ?> <h2><a href="<?php echo base_url($this->config->item('apanel_name')."/ecomm/coupon/edit/".$row->id).get_query_string();?>" style="text-shadow: 1px 1px 1px #000;font-size: 16px"><?=$row->coupon_amt?> Amt.</a></h2> <?php } ?> </td> <td align="center"> <div class="onoffswitch"> <input type="checkbox" id="enable_disable_check_<?=$i?>" data-id="<?=$row->id?>" name="onoffswitch" class="onoffswitch-checkbox cbx hidden enable_disable" <?php if($row->status==1){ echo 'checked';} ?>> <label for="enable_disable_check_<?=$i?>" class="lbl onoffswitch-label"> <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span> </label> </div> </td> <td align="center"> <a style="margin-right: 10px;" href="" data-toggle="tooltip" data-tooltip="View" class="coupons_detail"><i class="fa fa-eye" style="font-size: 20px"></i></a><a style="margin-right: 10px;" href="<?php echo base_url($this->config->item('apanel_name')."/ecomm/coupon/edit/".$row->id).get_query_string(); ?>" data-toggle="tooltip" data-tooltip="Edit"><i class="fa fa-edit" style="font-size: 20px"></i></a><a href="" data-toggle="tooltip" class="btn_delete_a" data-id="<?=$row->id?>" data-tooltip="Delete"><i class="fa fa-trash-o" style="font-size: 20px"></i></a> <div class="detailsHolder" style="display: none;"> <div class="modal-body"> <div class="row"> <div style="text-align: justify;" class="w-100"> <h4>Coupon Description</h4> <hr/> <?=$row->coupon_desc?> </div> </div> <hr/> <div class="row"> <div class="col-md-4"> <?php if($row->coupon_amt==0){ ?> <p style="font-weight: normal !important;"><strong>Discount: </strong><?=$row->coupon_per?>%</p> <?php } else{ ?> <p style="font-weight: normal !important;"><strong>Discount: </strong><?=$row->coupon_amt?> Amt.</p> <?php } ?> </div> <div class="col-md-8"> <p style="font-weight: normal !important;"><strong>Maximum Discount (Amount): </strong><?=$row->coupon_max_amt?></p> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger btn_delete" data-dismiss="modal">Close</button> </div> </div> </td> </tr> <?php $i++; } ?> <?php if(empty($coupon_list)) { ?> <tr> <td colspan="99" align="center"><?php echo $this->lang->line('BE_LBL_968'); ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <?php if(!empty($links)){ ?> <div class="form-group row"> <div class="col-12"> <div class="pagination_item_block"> <nav> <?php echo $links; ?> </nav> </div> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <div id="coupons_detail" class="modal fade" role="dialog" style=""> <div class="modal-dialog"> <div class="modal-content"> </div> </div> </div> <script type="text/javascript"> $(".coupons_detail").click(function(e){ e.preventDefault(); $("#coupons_detail").modal("show"); $("#coupons_detail .modal-content").html($(this).siblings(".detailsHolder").html()); }); $(".btn_delete_a").click(function(e){ e.preventDefault(); var _id=$(this).data("id"); e.preventDefault(); var href = '<?= base_url($this->config->item('apanel_name').'/ecomm/coupon/delete'); ?>/'+_id; var btn = this; swal({ title: "Are you sure ?", type: "warning", showCancelButton: true, confirmButtonClass: "btn-danger btn_edit", cancelButtonClass: "btn-warning btn_edit", confirmButtonText: "Yes", cancelButtonText: "No", closeOnConfirm: false, closeOnCancel: false, showLoaderOnConfirm: true }, function(isConfirm) { if (isConfirm) { $.ajax({ type:'GET', url:href, success:function(res){ if($.trim(res)=='success'){ swal({ title: "Deleted", text: "Your coupon has been deleted", type: "success" },function() { $(btn).closest('.item_holder').fadeOut("200"); }); } else { swal.close(); $('.notifyjs-corner').empty(); $.notify( $.trim(res), { position:"top center",className: 'success'} ); } } }); }else{ swal.close(); } }); }); $(".enable_disable").on("click",function(e){ var href; var btn = this; var _id=$(this).data("id"); var _for=$(this).prop("checked"); if(_for==false){ href = '<?= base_url($this->config->item('apanel_name').'/ecomm/coupon/deactive'); ?>/'+_id; }else{ href = '<?= base_url($this->config->item('apanel_name').'/ecomm/coupon/active'); ?>/'+_id; } $.ajax({ type:'GET', url:href, success:function(res){ $('.notifyjs-corner').empty(); $.notify( $.trim(res), { position:"top center",className: 'success'} ); } }); }); </script>