Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: brand.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; } .notifyjs-corner{ top: 67px !important; left: 50% !important; } .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/brand/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/brand').get_query_string(); ?>"> <div class="form-group row"> <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..." aria-controls="DataTables_Table_0" type="search" name="search_value" value="<?= $this->input->post('search_value'); ?>"> </div> </div> </div> <div class="col-md-6 col-12 text-right" style="display: flex; align-items: flex-end; justify-content: flex-end;"> <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-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('CUST_CH_105'); ?></th> <th><?php echo $this->lang->line('BE_CODE_5'); ?></th> <th><?php echo $this->lang->line('CUST_LBL_301'); ?></th> </tr> </thead> <tbody> <?php $i = 0; foreach ($brand_list as $key => $row) { ?> <tr class="item_holder"> <td align="center"><?= ($i+1) ?></td> <td align="center"> <a href="<?php echo base_url($this->config->item('apanel_name')."/ecomm/brand/edit/".$row->id).get_query_string();?>" title="<?= $row->brand_name; ?>"> <?php if(strlen($row->brand_name) > 20){ echo substr(stripslashes($row->brand_name), 0, 20).'...'; }else{ echo $row->brand_name; } ?> </a> </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="<?php echo base_url($this->config->item('apanel_name')."/ecomm/brand/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> </td> </tr> <?php $i++; } ?> <?php if(empty($brand_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> <script type="text/javascript"> $(".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/brand/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){ res = $.trim(res); if(res=='success'){ swal({ title: "Deleted", text: "Your brand has been deleted", type: "success" },function() { $(btn).closest('.item_holder').fadeOut("200"); }); } else { alert("Error"); } } }); }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/brand/deactive'); ?>/'+_id; }else{ href = '<?= base_url($this->config->item('apanel_name').'/ecomm/brand/active'); ?>/'+_id; } $.ajax({ type:'GET', url:href, success:function(res){ $('.notifyjs-corner').empty(); $.notify( res, { position:"top center",className: 'success' } ); } }); }); </script>