public function delete_data($list_id, $id)
 {
     $ObjListImage = new listingsImagesModel();
     if ($id) {
         $col = $ObjListImage->get_image_by_listimg_id($id);
         if ($col) {
             $filepath = $col->filepath;
             $filepath_thumb = $col->filepath_thumb;
             $filepath_medium = $col->filepath_medium;
             $filepath_large = $col->filepath_large;
             $delete = @unlink($filepath);
             $delete = @unlink($filepath_thumb);
             $delete = @unlink($filepath_medium);
             $delete = @unlink($filepath_large);
             //if( $delete ){
             $delete = $ObjListImage->delete_data(array('`' . $ObjListImage->tblid . '`=' => $id));
             //}
         }
     }
     return Redirect::to('listings_images/' . $list_id);
 }