Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. /**
  2.  
  3.    * Genera un nuevo cliente con el perfil de prospecto.
  4.  
  5.    */
  6.  
  7.   public function crear()
  8.  
  9.   {
  10.  
  11.     $this->page_title .= 'Nuevo prospecto';
  12.  
  13.     if(Input::hasPost('cliente'))
  14.  
  15.     {
  16.  
  17.       $Cliente = new Cliente();
  18.  
  19.       $Cliente->crear(Filter::get_array(Input::post('cliente'), 'htmlspecialchars', array('charset' => 'UTF-8')));
  20.  
  21.       if(!Message::has('error'))
  22.  
  23.       {
  24.  
  25.         Flash::valid('El Prospecto ha sido registrado de forma correcta.');
  26.  
  27.         return (Input::post('action') == 0) ? Router::redirect("cliente") : Router::redirect("cotizacion/crear/{$Cliente->id}");
  28.  
  29.       }
  30.  
  31.       Message::showFlash();
  32.  
  33.     }
  34.  
  35.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement