芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/www/resupres/application/classes/controller/mobile/elections2012.php
template->metaDescription = 'Page des mentions légales du site : resultats-presidentielles-2012.fr . Vous y trouverez toute les informations légales ainsi que les informations pour nous contacter.'; $this->template->metaKeywords = 'Duels politiques, primaires 2012,Statistiques, sondages, présidentielles 2012, candidats 2012, election 2012, sarkozy 2012, le pen 2012, ségolène royale 2012, 2012'; $this->template->pageTitle = 'Mentions légales'; $this->template->content = view::factory('mobile/mentionsLegales'); } public function action_citoyen() { $this->template->metaDescription = 'Sur cette page vous trouverez toute les informations à savoir sur la démocratie et le système de vote. Un bon moyen de répondre à la question : Qu\'est ce qu\'être citoyen en 2012 ?'; $this->template->metaKeywords = 'Conscience du vote, pourquoi voter, le vote c\'est quoi,candidats 2012, election 2012, sarkozy 2012, le pen 2012, ségolène royale 2012, 2012'; $this->template->pageTitle = 'Pourquoi voter ?'; $this->template->content = view::factory('mobile/citoyen'); } public function action_contact() { $this->template->metaDescription = 'Contactez-nous pour toute question ou autre. Nous sommes une agence de développement Web, si vous avez des idées nous pourrons les réaliser.'; $this->template->metaKeywords = 'Contactez nous, election 2012, sarkozy 2012, le pen 2012, ségolène royale 2012, 2012'; $this->template->pageTitle = 'Nous contacter'; $this->template->content = view::factory('mobile/contact'); // on teste la réception d'une requete post $this->template->content->envoie = false; $this->template->content->nom = ''; $this->template->content->prenom = ''; $this->template->content->mail = ''; $this->template->content->message = ''; $this->template->content->nomErreur = false; $this->template->content->prenomErreur = false; $this->template->content->mailErreur = false; $this->template->content->messageErreur = false; $this->template->content->captchaErreur = false; if (count($_POST) > 0) { //Requete post reçue //on récupère toute les variable de formulaire en les protègeant $nom = $this->request->post('nom'); $prenom = $this->request->post('prenom'); $email = $this->request->post('mail'); $message = $this->request->post('message'); /* $privatekey = "6Le-q8MSAAAAAP2eculKLkiU3-UxmYz-gB3p-g7C"; //$privatekey = "6LcDrMMSAAAAAAPC4NyTJAd0MhbvEGbNi7pd1N04"; $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); */ //on test si le defalut a été appliqué if ($nom != '' && $prenom != '' && $email != '' && $message != '' && filter_var($email, FILTER_VALIDATE_EMAIL)) {//&& $resp->is_valid) { //formulaire complet on procède à l'envoie du mail. $mail = new PHPMailer(); $mail->Port = 587; $mail->CharSet = "UTF-8"; $mail->From = $email; $mail->FromName = $nom . ' ' . $prenom; $mail->Sender = $email; $mail->Subject = 'Contact élection présidentielle'; $mail->Body = 'Nouveau contact:
Nom : ' . $nom . '
Prénom : ' . $prenom . '
Mail : ' . $email . '
Message :
' . $message; $mail->IsSMTP(); $mail->Host = "ssl0.ovh.net"; // replace with your smtp server $mail->Username = "postmaster@prisma-web.pro"; // replace with your smtp username (if SMTPAuth is true) $mail->Password = "Tp1wK98"; // replace with your smtp password (if SMTPAuth is true) $mail->SMTPAuth = true; $mail->AddAddress('contact@prisma-web.pro', 'Contact Prisma-Web'); $mail->IsHTML(true); $envoie = $mail->Send(); $this->template->content->envoie = $envoie; $mail->ClearAddresses(); $mail->ClearAttachments(); } else { //un ou plusieur champs ne sont pas rempli if ($nom == '') { $this->template->content->nomErreur = true; } else { $this->template->content->nom = $nom; } if ($prenom == '') { $this->template->content->prenomErreur = true; } else { $this->template->content->prenom = $prenom; } if ($email == '' || !filter_var($email, FILTER_VALIDATE_EMAIL)) { $this->template->content->mailErreur = true; } $this->template->content->mail = $email; if ($message == '') { $this->template->content->messageErreur = true; } else { $this->template->content->message = $message; } /* if (!$resp->is_valid) { $this->template->content->captchaErreur = true; } * */ //echo 'erreur'; } } } public function action_presse() { $this->template->metaDescription = 'Tout les articles presse et média faisant références au site resultats-presirentielles-2012.fr'; $this->template->metaKeywords = 'presse, média, election 2012, sarkozy 2012, le pen 2012, ségolène royale 2012, 2012'; $this->template->pageTitle = 'Presse - Média'; $this->template->content = view::factory('mobile/presse'); } public function action_resultats_presidentielles_2007() { $this->template->content = view::factory('mobile/resultats-presidentielles-2007'); } public function action_resultats_presidentielles_2002() { $this->template->content = view::factory('mobile/resultats-presidentielles-2002'); } public function action_resultats_presidentielles_1995() { $this->template->content = view::factory('mobile/resultats-presidentielles-1995'); } public function action_resultats_presidentielles_1988() { $this->template->content = view::factory('mobile/resultats-presidentielles-1988'); } public function action_resultats_presidentielles_1981() { $this->template->content = view::factory('mobile/resultats-presidentielles-1981'); } public function action_resultats_presidentielles_1974() { $this->template->content = view::factory('mobile/resultats-presidentielles-1974'); } public function action_resultats_presidentielles_1969() { $this->template->content = view::factory('mobile/resultats-presidentielles-1969'); } public function action_resultats_presidentielles_1965() { $this->template->content = view::factory('mobile/resultats-presidentielles-1965'); } }