Advertisement
freddy0512

success

Jun 17th, 2015
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. public function hapus($tes_id)
  2. {
  3. $tes_id= $this->uri->segment(4);
  4. $images= $this->db->query("SELECT * FROM `testimonial` a, testimonial_images b where a.tes_id=b.id_tes_id and a.tes_id='$tes_id'")->row_array();
  5. $image=$images['tes_image'];
  6. $image1=$images['testi_img1'];
  7. $image2=$images['testi_img2'];
  8. $image3=$images['testi_img3'];
  9. $image4=$images['testi_img4'];
  10. $image5=$images['testi_img5'];
  11. $image6=$images['testi_img6'];
  12. $image7=$images['testi_photo'];
  13. $file = array($image,$image1,$image2,$image3,$image4,$image5,$image6,$image7);
  14. $arrlength = count($file);
  15. for($x = 0; $x < $arrlength; $x++) {
  16.  
  17. // print_r('uploads/testimoni/' . $file[$x]."<br>");
  18. unlink('uploads/testimoni/' . $file[$x]);
  19. }
  20.  
  21. $this->testimoni_model->hapus($tes_id);//
  22. redirect ('admin/testimonial');
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement