function image_status(status, type, id){
 
   swal({
    
     title: "Are you sure?",
     text: "You want to update Image Approve",
     icon: "warning",
     buttons: true,
     dangerMode: true,
   })
   .then((willDelete) => {

    if (willDelete) {

  $.ajax({
    url  : SITEURL + 'admin/update-image',
    method: 'POST',
    data : { "status" : status, "type": type, "id": id },
    dataType : "JSON",
    headers: headers,
    
    
    success: function(res) {            

      $('#table').DataTable().ajax.reload(null, false);
      
     // $('#reload_span').ajax.reload(true, true);
      
      swal(res.message, { icon: "success", timer: 2000}); 

    },          
    error: function(error){

      ajax_error(error);              
  } 
      });  
    }
 });
}
// This function is used to update image approve (admin / null).
This function is used to update image approve (admin / null).
This function is used to update image approve ( admin / null ) .
function image_status(status, type, id){
   swal({
     title: "Are you sure?",
     text: "You want to update Image Approve",
     icon: "warning",
     buttons: true,
     dangerMode: true,
   })
   .then((willDelete) => {
    if (willDelete) {
  $.ajax({
    url  : SITEURL + 'admin/update-image',
    method: 'POST',
    data : { "status" : status, "type": type, "id": id },
    dataType : "JSON",
    headers: headers,
    success: function(res) {            
      $('#table').DataTable().ajax.reload(null, false);
      swal(res.message, { icon: "success", timer: 2000}); 
    },          
    error: function(error){
      ajax_error(error);              
  } 
      });  
    }
 });
}
function image_status ( status , type , id ) { swal ( { title : "Are you sure?" , text : "You want to update Image Approve" , icon : "warning" , buttons : true , dangerMode : true , } ) . then ( ( willDelete ) => { if ( willDelete ) { $ . ajax ( { url : SITEURL + 'admin/update-image' , method : 'POST' , data : { "status" : status , "type" : type , "id" : id } , dataType : "JSON" , headers : headers , success : function ( res ) { $ ( '#table' ) . DataTable ( ) . ajax . reload ( null , false ) ; swal ( res . message , { icon : "success" , timer : 2000 } ) ; } , error : function ( error ) { ajax_error ( error ) ; } } ) ; } } ) ; }
This function is used to update image approve (admin / null).
This function is used to update image approve ( admin / null ) .
// $('#reload_span').ajax.reload(true, true);