<commit_before><?php

namespace site\SiteBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

use site\SiteBundle\Entity\Devis;
use site\SiteBundle\Form\DevisType;
use site\SiteBundle\Entity\Contact;
use site\SiteBundle\Form\ContactType;

class SiteController extends Controller
{
    public function indexAction()
    {
        return $this->render('siteSiteBundle:Site:index.html.twig');
    }
    public function serviceAction()
    {
        return $this->render('siteSiteBundle:Site:service.html.twig');
    }
    public function agencesAction()
    {
        return $this->render('siteSiteBundle:Site:agences.html.twig');
    }
    public function colis_interditsAction()
    {
        return $this->render('siteSiteBundle:Site:colis_interdits.html.twig');
    }
    public function mentions_legalesAction()
    {
        return $this->render('siteSiteBundle:Site:mentions_legales.html.twig');
    }
    public function contactAction()
    {
    $enquiry = new Contact();
    $form = $this->createForm(new ContactType(), $enquiry);

    $request = $this->getRequest();
    if ($request->getMethod() == 'POST') {
        $form->bindRequest($request);

        if ($form->isValid()) {
        $form = $form->getData();
        $destinataire = '<EMAIL>';
        $email = $form->getEmail();
        $sujet = '[CONTACT - OuiCarry]: '.$form->getSujet();
        $message = "From: ".$email."\n\n
        Nom: ".$form->getNom()."\n
        Message:\n\n ".$form->getMessage()."\n";
        $headers ="";
        $headers .= "Reply-To: ".$email."\n";
        $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"";
        mail($destinataire,$sujet,$message,$headers);
        echo "<script>";
        echo "timer = setTimeout(\"document.location.href='home'\", 100)";
        echo "</script>";
        echo "<SCRIPT LANGUAGE=\"JavaScript\">alert('Message envoye avec succes.');</SCRIPT>";
        exit;
        }
    }
    return $this->render('siteSiteBundle:Site:contact.html.twig',
                          array('form' => $form->createView()));
    }
    public function devisAction()
    {
    $enquiry = new Devis();
    $form = $this->createForm(new DevisType(), $enquiry);

    $request = $this->getRequest();
    if ($request->getMethod() == 'POST') {
        $form->bindRequest($request);
        if ($form->isValid()) {
        $form = $form->getData();
        $destinataire = '<EMAIL>';
        $email = $form->getEmail();
        $sujet = '[DEMMANDE DE DEVIS - OuiCarry]: '.$form->getType();
        $message = "From: ".$email."\n\n
        Nom: ".$form->getNom()."\n
        Type: ".$form->getType()."\n
        Poids: ".$form->getPoids()."\n
        Valeur: ".$form->getValeur()."\n
        Ville de départ: ".$form->getDepart()."\n
        Ville de destination: ".$form->getDestination()."\n
        Description: ".$form->getDescription()."\n";
        $headers ="";
        $headers .= "Reply-To: ".$email."\n";
        $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"";
        mail($destinataire,$sujet,$message,$headers);
        echo "<script>";
        echo "timer = setTimeout(\"document.location.href='home'\", 100)";
        echo "</script>";<commit_msg>Version Prod<commit_after><?php

namespace site\SiteBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

use site\SiteBundle\Entity\Devis;
use site\SiteBundle\Form\DevisType;
use site\SiteBundle\Entity\Contact;
use site\SiteBundle\Form\ContactType;

class SiteController extends Controller
{
    public function indexAction()
    {
        return $this->render('siteSiteBundle:Site:index.html.twig');
    }
    public function serviceAction()
    {
        return $this->render('siteSiteBundle:Site:service.html.twig');
    }
    public function agencesAction()
    {
        return $this->render('siteSiteBundle:Site:agences.html.twig');
    }
    public function colis_interditsAction()
    {
        return $this->render('siteSiteBundle:Site:colis_interdits.html.twig');
    }
    public function mentions_legalesAction()
    {
        return $this->render('siteSiteBundle:Site:mentions_legales.html.twig');
    }
    public function contactAction()
    {
    $enquiry = new Contact();
    $form = $this->createForm(new ContactType(), $enquiry);

    $request = $this->getRequest();
    if ($request->getMethod() == 'POST') {
        $form->bindRequest($request);

        if ($form->isValid()) {
        $form = $form->getData();
        $destinataire = '<EMAIL>';
        $email = $form->getEmail();
        $sujet = '[CONTACT - OuiCarry]: '.$form->getSujet();
        $message = "From: ".$email."\n\n
        Nom: ".$form->getNom()."\n
        Message:\n\n ".$form->getMessage()."\n";
        $headers ="";
        $headers .= "Reply-To: ".$email."\n";
        $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"";
        mail($destinataire,$sujet,$message,$headers);
        echo "<script>";
        echo "timer = setTimeout(\"document.location.href='home'\", 100)";
        echo "</script>";
        echo "<SCRIPT LANGUAGE=\"JavaScript\">alert('Message envoye avec succes.');</SCRIPT>";
        exit;
        }
    }
    return $this->render('siteSiteBundle:Site:contact.html.twig',
                          array('form' => $form->createView()));
    }
    public function devisAction()
    {
    $enquiry = new Devis();
    $form = $this->createForm(new DevisType(), $enquiry);

    $request = $this->getRequest();
    if ($request->getMethod() == 'POST') {
        $form->bindRequest($request);
        if ($form->isValid()) {
        $form = $form->getData();
        $destinataire = '<EMAIL>';
        $email = $form->getEmail();
        $sujet = '[DEMANDE DE DEVIS - OuiCarry]: '.$form->getType();
        $message = "From: ".$email."\n\n
        Nom: ".$form->getNom()."\n
        Type: ".$form->getType()."\n
        Poids: ".$form->getPoids()."\n
        Valeur: ".$form->getValeur()."\n
        Ville de départ: ".$form->getDepart()."\n
        Ville de destination: ".$form->getDestination()."\n
        Description: ".$form->getDescription()."\n";
        $headers ="";
        $headers .= "Reply-To: ".$email."\n";
        $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"";
        mail($destinataire,$sujet,$message,$headers);
        echo "<script>";
        echo "timer = setTimeout(\"document.location.href='home'\", 100)";
        echo "</script>";
{'fraction_non_alphanumeric': 0.18948655256723718, 'fraction_numerical': 0.004889975550122249, 'mean_word_length': 2.7145289443813847, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4223453', 'n_tokens_mistral': 2082, 'n_tokens_neox': 2063, 'n_words': 350}