%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/alliance/domains/congress-eldw.eu/public_html/
Upload File :
Create Path :
Current File : /home/alliance/domains/congress-eldw.eu/public_html/p-partager.php

<?php
include_once("inc/config.php");
include_once("inc/functions.php");
include_once("inc/init.php");

verif_get($_POST['id']);


if(isset($_POST['recaptcha_response'])){
	$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
    $recaptcha_secret = '6Lfxh_cZAAAAAJEi1R6RC02o50zZPj9DEqXLEyhh';
    $recaptcha_response = $_POST['recaptcha_response'];

    // Make and decode POST request:
    $recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
    $recaptcha = json_decode($recaptcha);
	
	// Take action based on the score returned:
    if ($recaptcha->score >= 0.5) {
		if($_GET['section'] == 1)
		{
			$sect = $section->aff_section($_POST['id']);
			if($sect == null) {
				header("Location: 404.html");
				exit(0);
			}

			if(verifie_email($_POST['email']) == "ok")
			{
				if($sect != null) {

				$db = new BaseOps;
				$header = get_temp("templates/newsletter/header.php", $url_site,$lang->getlang());
				$footer = get_temp("templates/newsletter/footer_actu.php", $url_site,$lang->getlang());
				
				$query = "SELECT s.*,sl.titre,sl.permalien,sl.texte,cl.name,c.code_iso FROM `section` s  LEFT JOIN `section_lang` sl ON s.id=sl.section lEFT JOIN `country` c ON s.pays = c.id LEFT JOIN `country_lang` cl ON c.id = cl.country WHERE s.id = ".$_POST['id']." AND sl.lang = ".$lang->getlangid()." AND cl.lang = ".$lang->getlangid();
				$infos = $db->select_array($query);
				$content .= get_section("templates/newsletter/section_mail.php", $infos, $url_site, $lang->getlang());

				$subject="=?UTF-8?B?".base64_encode(stripslashes(html_entity_decode($infos['titre'], ENT_QUOTES, 'UTF-8')))."?=";
				$headers= "From: \"".lang("titresite")."\" <".$email_noreply.">\n";
				$headers.='Content-type: text/html; charset=utf-8';
				mail($_POST['email'], $subject, $header.$content.$footer, $headers);

				$pageactu = $lang->getlang()."/".$infos['id']."-".$infos['permalien']."/";
				header("Location:".$url_site.$pageactu."?envoi=1");
				exit(0);
				}
				else {
				//echo verifie_email($_POST['email']);
				header("Location:".$url_site);
				exit(0);
				}
			}
			else {
			//echo verifie_email($_POST['email']);
			header("Location:".$url_site);
			exit(0);
			}
		}
		else if($_GET['page'] == 1)
		{
			$page = new Page;
			$pg = $page->infos_page($_POST['id'],$lang->getlangid());
			if($pg == null) {
				header("Location: 404.html");
				exit(0);
			}

			if(verifie_email($_POST['email']) == "ok")
			{
				if($pg != null) {
				
				$sec = $section->aff_section($section->page_sec($_POST['id']));
				$pagesec = $lang->getlang()."/".$sec['id']."-".$sec['permalien']."/";
				$pagepg = $pagesec.$pg['id']."-".$pg['permalien'].".html";
				
				$header = get_temp("templates/newsletter/header_page.php", $url_site);
				$footer = get_temp("templates/newsletter/footer_page.php", $url_site);
				$content = '<h2><a href="'.$url_site.$pagepg.'">'.$pg['titre'].'</a></h2>';
				
				if($pg['lieu']!="" && $pg['date_debut']!="" && $pg['date_fin']!="" && $pg['public']!=""){
					$content .= '<div id="pageinfos" class="bg_profil_'.$sec['profil'].'">';
					if($pg['lieu']!=""){
						$content.='<div class="lieu"><img src="'.$url_site.'images/boussole.png" alt="boussole"> '.$pg['lieu'].'</div>';
					}
					if($pg['date_fin']!="0000-00-00" && $pg['date_fin']!=""){
						$content.='<div class="lieu"><img src="'.$url_site.'images/clock.png" alt="date"> '.lang("From").' <strong>'.dateLang($pg['date_debut'],$lang->getlangid()).'</strong> '.lang("to").' <strong>'.dateLang($pg['date_fin'],$lang->getlangid()).'</strong></div>';
					}
					else{
						if($pg['date_debut']!="0000-00-00" && $pg['date_debut']!=""){
							$content.='<div class="lieu"><img src="'.$url_site.'images/clock.png" alt="date"> <strong>'.dateLang($pg['date_debut'],$lang->getlangid()).'</strong></div>';
						}
					}
					if($pg['public']!=""){
						$content.='<div class="lieu"><img src="'.$url_site.'images/public.png" alt="public"> '.$pg['public'].'</div>';
					}
					$content .= '</div>';
				}
				
				$result = $page->liste_blocs($_POST['id']);
				if($result != null) {
				foreach ($result as $bloc)
				{
					$content .= get_bloc("templates/newsletter/bloc".$bloc['type'].".php", $bloc, $url_site, $lang->getlang());
				}
				}
				
				$subject="=?UTF-8?B?".base64_encode(stripslashes(html_entity_decode($sec['titre']." : ".$pg['titre'], ENT_QUOTES, 'UTF-8')))."?=";
				$headers= "From: \"".lang("titresite")."\" <".$email_noreply.">\n";
				$headers.='Content-type: text/html; charset=utf-8';
				mail($_POST['email'], $subject, $header.$content.$footer, $headers);

				//echo $content;
				header("Location:".$url_site.$pagepg."?envoi=1");
				exit(0);
				}
				else {
				//echo verifie_email($_POST['email']);
				header("Location:".$url_site);
				exit(0);
				}
			}
			else {
			//echo verifie_email($_POST['email']);
			header("Location:".$url_site);
			exit(0);
			}
		}
		else {
		header("Location:".$url_site);
		exit(0);
		}
	}
}
header("Location:".$url_site);
?>

Zerion Mini Shell 1.0