Advertisement
freddy0512

hapus

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