Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: brand.php
<div class="row" style="padding-left:30px;padding-right: 30px"> <div class="col-xs-12"> <div class="card mrg_bottom"> <div class="page_title_block"> <div class="col-md-5 col-xs-12"> <div class="page_title">Manage Brand</div> </div> <div class="col-md-6 col-md-offset-1 col-xs-12"> <div class="col-sm-12"> <div class="search_list"> <div class="search_block"> <form method="post" action=""> <input class="form-control input-sm" placeholder="Search..." aria-controls="DataTables_Table_0" type="search" name="search_value" required value="<?php if(isset($_POST['search_value'])){ echo $_POST['search_value']; }?>"> <button type="submit" name="data_search" class="btn-search"><i class="fa fa-search"></i></button> </form> </div> <div class="add_btn_primary"> <a href="<?php echo site_url($this->config->item('apanel_name') . "/brand/add");?>">Add New</a> </div> </div> </div> </div> </div> <div class="clearfix"></div> <div class="col-md-12 mrg-top"> <?php if(!empty($brand_list)){ ?> <div class="row"> <?php define('IMG_PATH', base_url().'assets/images/brand/'); $i=0; foreach ($brand_list as $key => $row) { ?> <div class="col-lg-2 col-sm-6 col-xs-12 item_holder"> <div class="block_wallpaper add_wall_category" style="box-shadow:0px 3px 8px rgba(0, 0, 0, 0.3)"> <div class="wall_image_title"> <h2><a href="<?php echo site_url($this->config->item('apanel_name') . "/brand/edit/".$row->id);?>" title="<?=$row->brand_name?>" style="text-shadow: 1px 1px 1px #000;font-size: 16px"> <?php if(strlen($row->brand_name) > 15){ echo substr(stripslashes($row->brand_name), 0, 15).'...'; }else{ echo $row->brand_name; } ?> </a></h2> <ul> <li><a href="<?php echo site_url($this->config->item('apanel_name') . "/brand/edit/".$row->id);?>" data-toggle="tooltip" data-tooltip="Edit"><i class="fa fa-edit"></i></a></li> <li><a href="" data-toggle="tooltip" class="btn_delete_a" data-id="<?=$row->id?>" data-tooltip="Delete"><i class="fa icon-trash" data-toggle="tooltip" data-placement="top" title="Delete"></i></a></li> <li> <div class="row toggle_btn"> <input type="checkbox" id="enable_disable_check_<?=$i?>" data-id="<?=$row->id?>" class="cbx hidden enable_disable" <?php if($row->status==1){ echo 'checked';} ?>> <label for="enable_disable_check_<?=$i?>" class="lbl"></label> </div> </li> </ul> </div> <span> <?php if(file_exists(IMG_PATH.$row->brand_image) || $row->brand_image==''){ ?> <img src="https://via.placeholder.com/300x300?text=No image" style="height: 150px !important"> <?php }else{ ?> <img src="<?=IMG_PATH.$row->brand_image?>" style="height: 150px !important"/> <?php } ?> </span> </div> </div> <?php $i++; } ?> </div> <?php }else{ ?> <div class="col-lg-12 col-sm-12 col-xs-12" style=""> <h3 class="text-muted" style="font-weight: 400">Sorry! no records found...</h3> </div> <?php } ?> </div> <div class="clearfix"></div> <div class="col-md-12 col-xs-12"> <div class="pagination_item_block"> <nav> <?php if(!empty($links)){ echo $links; } ?> </nav> </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 = '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){ 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 = 'brand/deactive/'+_id; }else{ href = 'brand/active/'+_id; } $.ajax({ type:'GET', url:href, success:function(res){ $('.notifyjs-corner').empty(); $.notify( res, { position:"top center",className: 'success' } ); } }); }); </script>