Advertisement
freddy0512

controller

Jan 31st, 2015
224
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2.  
  3. class Indonesia extends CI_Controller {
  4. public function __construct()
  5. {
  6. parent::__construct();
  7. $this->load->model("indonesia_model");
  8. $this->load->helper('tgl_indonesia');
  9. }
  10. public function index()
  11. {
  12.  
  13. $data['ListIndonesia'] = $this->indonesia_model->getAllIndonesia();
  14.  
  15. $this->load->view("admin/indonesia", $data);
  16. }
  17.  
  18. function delete_multiple()
  19. {
  20. $photo = $this->indonesia_model->link_photo();
  21. if ($photo->num_rows() > 0)
  22. {
  23. $row = $photo->row();
  24. $file_photo = $row->gambar;
  25. $path_to_delete = "images_try";
  26. unlink($path_to_delete.$file_photo);
  27. }
  28. $this->indonesia_model->remove_checked_indonesia();
  29. redirect('admin/indonesia/index');
  30.  
  31. }
  32. }
Advertisement
RAW Paste Data Copied
Advertisement