Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function hapus($tes_id)
- {
- $tes_id= $this->uri->segment(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();
- $image=$images['tes_image'];
- $image1=$images['testi_img1'];
- $image2=$images['testi_img2'];
- $image3=$images['testi_img3'];
- $image4=$images['testi_img4'];
- $image5=$images['testi_img5'];
- $image6=$images['testi_img6'];
- $image7=$images['testi_photo'];
- $file = array($image,$image1,$image2,$image3,$image4,$image5,$image6,$image7);
- $arrlength = count($file);
- for($x = 0; $x < $arrlength; $x++) {
- // print_r('uploads/testimoni/' . $file[$x]."<br>");
- unlink('uploads/testimoni/' . $file[$x]);
- }
- $this->testimoni_model->hapus($tes_id);//
- redirect ('admin/testimonial');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement