<commit_before><?php

namespace Celmedia\Toyocosta\VehiculosBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\File\Input;



class LandingController extends Controller
{

	public function etiquetaSeoAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaSeo.html.twig');
    }

    public function etiquetaInnventoAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaInnvento.html.twig');
    }

    public function etiquetaBumeranAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaBumeran.html.twig');
    }

    public function etiquetaUrbanoAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaUrbano.html.twig');
    }
    
    public function etiquetaFacebookAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaFacebook.html.twig');
    }
    
    public function etiquetaGoogleAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaGoogle.html.twig');
    }

    public function mailingEtiquetaAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Mailing:etiqueta.html.twig');
    }

    
	
	public function envioLandingAction(Request $request){



        if ($request->isMethod('POST')) {

            $nombre = $request->request->get('nombre');
            $apellido = $request->request->get('apellido');
            $telefono = $request->request->get('telefono');
            $email = $request->request->get('email');
            $celular = $request->request->get('celular');
            $cedula = $request->request->get('cedula');
            $comentario = $request->request->get('comentario');
            $campana = $request->request->get('campana');


            $info = new \Celmedia\Toyocosta\ContenidoBundle\Entity\InfoLandings();

            $info->setNombre( $nombre  );
            $info->setApellido( $apellido  );
            $info->setTelefono( $telefono  );
            $info->setEmail( $email  );
            $info->setCedula( $cedula  );
            $info->setCelular( $celular  );
            $info->setComentarios( $comentario  );
            
            
            $em = $this->getDoctrine()->getManager(); 
            $em->persist(  $info );
            $em->flush();



            $subject = "Pedido de Informacion de ".$campana." desde Toyocosta"; 



            $body = '<strong>Informacion del Landing Page:</strong> <br /><br />               
            Nombre:  '.$info->getNombre().' <br />
            Apellido:   '. $info->getApellido() .' <br />
            Cedula:  '.$info->getCedula().' <br />
            Telefono:  '. $info->getTelefono() .'  <br />
            Email:  '. $info->getEmail() .' <br />
            Celular:  '. $info->getCelular() .' <br />
            Comentarios:  '. $info->getComentarios() .' ';

            $message = \Swift_Message::newInstance()

            ->setSubject($subject)

            ->setFrom(array('<EMAIL>' => 'Web Toyocosta'))

            ->setTo(array( $correos_array , '<EMAIL>' => 'Toyocosta', '<EMAIL>' => 'Admin'))
            
            ->setContentType("text/html")

            ->setBody($body);

            $envioMail = $this->get('mailer')->send($message);<commit_msg>error con la variable.<commit_after><?php

namespace Celmedia\Toyocosta\VehiculosBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\File\Input;



class LandingController extends Controller
{

	public function etiquetaSeoAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaSeo.html.twig');
    }

    public function etiquetaInnventoAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaInnvento.html.twig');
    }

    public function etiquetaBumeranAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaBumeran.html.twig');
    }

    public function etiquetaUrbanoAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaUrbano.html.twig');
    }
    
    public function etiquetaFacebookAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaFacebook.html.twig');
    }
    
    public function etiquetaGoogleAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Landing:etiquetaGoogle.html.twig');
    }

    public function mailingEtiquetaAction(){

        return $this->render('CelmediaToyocostaVehiculosBundle:Mailing:etiqueta.html.twig');
    }

    
	
	public function envioLandingAction(Request $request){



        if ($request->isMethod('POST')) {

            $nombre = $request->request->get('nombre');
            $apellido = $request->request->get('apellido');
            $telefono = $request->request->get('telefono');
            $email = $request->request->get('email');
            $celular = $request->request->get('celular');
            $cedula = $request->request->get('cedula');
            $comentario = $request->request->get('comentario');
            $campana = $request->request->get('campana');


            $info = new \Celmedia\Toyocosta\ContenidoBundle\Entity\InfoLandings();

            $info->setNombre( $nombre  );
            $info->setApellido( $apellido  );
            $info->setTelefono( $telefono  );
            $info->setEmail( $email  );
            $info->setCedula( $cedula  );
            $info->setCelular( $celular  );
            $info->setComentarios( $comentario  );
            
            
            $em = $this->getDoctrine()->getManager(); 
            $em->persist(  $info );
            $em->flush();



            $subject = "Pedido de Informacion de ".$campana." desde Toyocosta"; 



            $body = '<strong>Informacion del Landing Page:</strong> <br /><br />               
            Nombre:  '.$info->getNombre().' <br />
            Apellido:   '. $info->getApellido() .' <br />
            Cedula:  '.$info->getCedula().' <br />
            Telefono:  '. $info->getTelefono() .'  <br />
            Email:  '. $info->getEmail() .' <br />
            Celular:  '. $info->getCelular() .' <br />
            Comentarios:  '. $info->getComentarios() .' ';

            $message = \Swift_Message::newInstance()

            ->setSubject($subject)

            ->setFrom(array('<EMAIL>' => 'Web Toyocosta'))

            ->setTo(array( $email , '<EMAIL>' => 'Toyocosta', '<EMAIL>' => 'Admin'))
            
            ->setContentType("text/html")

            ->setBody($body);

            $envioMail = $this->get('mailer')->send($message);
{'fraction_non_alphanumeric': 0.15003489183531055, 'fraction_numerical': 0.0, 'mean_word_length': 2.628354430379747, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2562869', 'n_tokens_mistral': 2282, 'n_tokens_neox': 2195, 'n_words': 300}