Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. function BuscarOTPorId(){
  2.  
  3. if('<?=$this->uri->segment(3);?>'){
  4. $.ajax({
  5. type: "POST",
  6. url: "<?= base_url()?>AgregarOTController/BuscarOTPorId/"+'<?=$this->uri->segment(3);?>',
  7. data: "",
  8. success: function(objView){
  9.  
  10. }
  11. });
  12.  
  13. }
  14. }
  15.  
  16. public function BuscarOTPorId(){
  17. $id_ot =$this->uri->segment('3');
  18. $getOT =$this->MainModel->BuscarOTPorId($id_ot);
  19.  
  20. $data = array();
  21. $toJson = array(
  22. 'success' => 'true',
  23. 'ViewSet' => array(),
  24. 'getOT'=>$getOT
  25. );
  26. $toJson['ViewSet']['header'] = $this->load->view('Header/header', $data, true);
  27. $toJson['ViewSet']['leftpanel'] = $this->load->view('leftpanel/leftpanel', $data, true);
  28. $toJson['ViewSet']['create'] = $this->load->view('OT/AgregarOT2', $data, true);
  29.  
  30. $this->output
  31. ->set_content_type('application/json')
  32. ->set_output(json_encode($toJson));
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement