alpha_full/Publication/newsLetter/unsuscribe.php
2026-04-06 22:58:51 +02:00

45 lines
1.7 KiB
PHP
Executable File

<?php
$nomFicAppelant = basename(__FILE__);
if (!isset( $_SESSION )) {if (!isset( $_SESSION ) ) {session_start(); }}
echo '<!DOCTYPE html>';
echo '<html>';
echo '<head>';
include ("./_include/initSessLg.php");
if (isset($_GET['idMail'])) {$idMail=$_GET['idMail'];}
else{
if (!empty($_SESSION['idMail']))
{$idMail=($_SESSION['idMail']);}
}
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '</head>';
echo '<body valign="top" >';
if (!empty($idMail)) {
$reqUpdate="UPDATE clients SET news=2 WHERE idMail='" .$idMail. "';";
if (isset($debug[1]) && $debug[1] == '1' ) {echo 'reqUpdate = ' .$reqUpdate,'<br>';}
$resConn=$idPdo->reqUpdate($reqUpdate);
if (isset($debug[1]) && $debug[1] == '1' ) {echo 'result= ' .$result,'<br>';}
// a traduire LG flag edt traduction
// flag edt faire un style css dédié
echo '<table margin="4" cellspacing="4" cellpadding="12" border="0" align="center" bordercolor="#E3680C" >';
echo '<tr align="center" >';
echo '<td colspan="2" align="center" >';
if ($resConn)
{echo '<br>Vous &#234;tes d&#233;sabonn&#233; de la newsletter : ' .$idMail. '<br>';}
else
{echo '<br>Erreur lors du d&#233;sabonnement de la newsletter : ' .$idMail. '<br>';}
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td colspan="2" align="center" >';
if ($lg=='') {$lg='FRA';}
include ("./menu/barreClient.php");
echo '</td>';
echo '</tr>';
echo '</table>';
}
else
echo '<br><u>Erreur lors du d&#233;sabonnement de la newsletter : idMail vide' .$idMail. '</u><br>';
echo '</body>';
echo '</html>';
?>