Guest User

Untitled

a guest
Jul 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. function msj_cargando() {
  2. $('#modalLoad').modal('show');
  3.  
  4. $.ajax({
  5. url : "<?php echo base_url('index.php/reg_calls_controller/todas_calls/')?>",
  6. type: "POST",
  7. dataType: "JSON",
  8. success: function(data) {
  9. console.log(data);
  10. //alert(data);
  11. $('#modalLoad').modal('hide');
  12. },
  13. error: function (jqXHR, textStatus, errorThrown) {
  14. alert(textStatus);
  15. $('#modalLoad').modal('hide');
  16. swal({
  17. title: "Error!",
  18. text: "La conexion no fue exitosa!",
  19. icon: "error",
  20. button: true,
  21. dangerMode: false,
  22. });
  23. }
  24. });
  25.  
  26. }
  27.  
  28. public function todas_calls() {
  29.  
  30. $sess_array = array(
  31. 'id_user' => $this->session->userdata['sess_data']['id_user'],
  32. 'username' => $this->session->userdata['sess_data']['username']
  33. );
  34.  
  35. $data = array();
  36. $data['sess_data'] = $sess_array;
  37.  
  38. $data['todas_calls'] = $this->reg_calls_model->todas_calls();
  39.  
  40. $data['menu_higher'] = $this->load->view('elementos/menu_higher_view.php', $data, TRUE);
  41. $data['menu_left'] = $this->load->view('elementos/menu_left_view.php', '', TRUE);
  42.  
  43. echo json_encode($data);
  44.  
  45. $this->load->view("todas_calls_view.php", $data);
  46.  
  47. }
Add Comment
Please, Sign In to add comment