Advertisement
alfonsus

Controller - Destination.php - new

Jan 21st, 2019
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') or exit('No direct script access allowed');
  3.  
  4. class Destination extends CI_Controller
  5. {
  6.  
  7. /**
  8. * Index Page for this controller.
  9. *
  10. * Maps to the following URL
  11. * http://example.com/index.php/welcome
  12. * - or -
  13. * http://example.com/index.php/welcome/index
  14. * - or -
  15. * Since this controller is set as the default controller in
  16. * config/routes.php, it's displayed at http://example.com/
  17. *
  18. * So any other public methods not prefixed with an underscore will
  19. * map to /index.php/welcome/<method_name>
  20. * @see https://codeigniter.com/user_guide/general/urls.html
  21. */
  22. public function index()
  23. {
  24.  
  25. $var['url'] = base_url();
  26. $var['assets'] = $var['url'] . "assets/themes/tourism/";
  27. $var['title'] = "Destination - Indonesia Tourism Investment";
  28. $var['content'] = $this->load->view("destination/index.php", $var, true);
  29. $var['modal'] = $this->modal_destination();
  30.  
  31. $this->load->view('template/template.php', $var);
  32. }
  33. public function modal_destination()
  34. {
  35. $this->load->library('Mylib');
  36. $select = $this->mylib->selectpicker($select_data = array("Mustard", "Orange"));
  37. $data_modal['id'] = "addDestination";
  38. $data_modal['title'] = "Judul";
  39. $data_modal['content'] = '
  40. <div class="container-fluid">
  41. <div class="row">
  42. <div class="col-6">
  43. <div class="form-group row no-gutters">
  44. <label class="col-5 col-form-label">Select Province</label>
  45. <div class="col-7">
  46. ' . $select . '
  47.  
  48. </div>
  49. </div>
  50. </div>
  51. <div class="col-6">
  52. <div class="form-group row no-gutters">
  53. <label class="col-5 col-form-label">Select City</label>
  54. <div class="col-7">
  55. <select class="selectpicker">
  56. <option>Mustard</option>
  57. <option>Ketchup</option>
  58. <option>Barbecue</option>
  59. </select>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65.  
  66. ';
  67. $data_modal['btn'] = "btnDestination";
  68. $this->load->view("library/modal.php", $data_modal);
  69.  
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement