/DEV/DISPLAY/modules/form_unsubscribe_OFFER1.php
PHP | 137 lines | 79 code | 43 blank | 15 comment | 27 complexity | 9689f9c42f5cf4d7f3810668633bcc0a MD5 | raw file
- <?php if($_global['dev'] == 1 && isset($_GET['cmt']) && $_GET['cmt'] == 'on') { ?>
- <!-- begin : <?php echo __FILE__; ?> -->
- <?php } ?>
- <?php
-
- include ("../LIB/alerte.email.gdm.php");
-
- //include ("../LIB/alerte.email.varcheck.php");
- //include ("../LIB/alerte.email.gdm.php");
- //var_dump($_REQUEST);
-
- $url_homepage = constant("URL_SITE");
- $gdmid = $_REQUEST['REQUEST_ID'];
- $email = $_REQUEST['EMAIL'];
- $gdm_abonnement = $_REQUEST['ABONNEMENT'];
- /* Desinscription alerte email */
- $gdm = new gdm;
- $gdm_get["REQUEST_ID"] = $gdmid;
-
- //SARA A. 15/06/09 mantis 7286: to retrive the REQUEST_ID only
- list($gdmid) = explode("?" , $gdmid);
-
-
- $gdm_get["EMAIL"] = $email;
- $gdm_rt = $gdm->request("LI".strtoupper($_global['site']), strtoupper($_global['lang']), $gdm_abonnement, "GET", $gdm_get);
- // print_r($gdm_rt) ;
-
-
- // ABONNEMENT
- for ($i = 0; $i < count($gdm_rt); $i ++)
- {
- if (strpos($gdm_rt[$i], "ABONNEMENT=") === 0)
- {
- break;
- }
- }
- $gdm_abonnement = substr($gdm_rt[$i], strpos($gdm_rt[$i], "=") + 1, strlen($gdm_rt[$i]));
- //echo("[".$gdm_abonnement."]");
- // 35 -> TEXTE_LIBRE
- for ($i = 0; $i < count($gdm_rt); $i ++)
- {
- if (strpos($gdm_rt[$i], "TEXTE_LIBRE=") === 0)
- {
- break;
- }
- }
- $search_summary = substr($gdm_rt[$i], strpos($gdm_rt[$i], "=") + 1, strlen($gdm_rt[$i]));
-
- ?>
- <?php if(isset($_GET['cmt']) && $_GET['cmt'] == 'on') { ?><!-- debut contenu --><?php } ?>
- <div id="desinscription">
- <div id="desinscriptioncontent">
-
- <?php if(isset($_GET['cmt']) && $_GET['cmt'] == 'on') { ?><!-- desinscription : PAGE 1 --><?php } ?>
- <?php
- //DPE - 17/10/2006 - TEXTE_LIBRE reactivated as the variable was commented out
- //and the search type was not sent to the mail processing service.
- $gdm_array["TEXTE_LIBRE"] = $search_summary;
- $gdm_array["REQUEST_ID"] = $gdmid;
- $gdm_array["EMAIL"] = $email;
- $gdm_array["UNDEFINED_COL1"] = $_POST['reason'];
- $gdm_array["CHAMP_LIBRE"] = $_POST['reason_other'];
- $gdm_array["UNDEFINED_COL2"] = $_POST['success'];
- $gdm_array["UNDEFINED_COL3"] = $_POST['success_other'];
-
-
-
- $array_service = $_REQUEST['service'];
-
- if (count($array_service) > 0)
- {
- $gdm_array["UNDEFINED_COL4"] = implode(",", $_REQUEST['service']);
- }
-
-
- //print_r($gdm_array);
-
- //var_dump($_REQUEST);
-
- $gdm = new gdm();
-
- $final_str = "";
- $redirect_marmelade = "";
-
- //SARA A. 15/06/09 mantis 7286: to retrive the REQUEST_ID only without the symbol "?"
- $gdm_array["REQUEST_ID"] = $gdmid;
-
-
- $gdm_rt = $gdm->request("LI".strtoupper($_global['site']), strtoupper($_global['lang']), $gdm_abonnement, "DELETE", $gdm_array);
- $gdm_answer = ($gdm_rt[0] == "OK" ? "1" : "0");
- $final_str .= "<b>désinscription alerte email normale:</b><br />";
- $final_str .= "gdm->request(LI".strtoupper($_global['site']).",". strtoupper($_global['lang']).", ".$gdm_abonnement.", DELETE, [gdm_array]);<br />";
- $final_str .= "action: unsubscribe---->".$gdm_answer."<hr>";
- $redirect_marmelade .= "&UNSUBSCRIBE=1";
-
-
- if ($gdm_answer == "1")
- {
- ?>
- <p> Nous vous confirmons la désinscription de l’email <b><?= $email; ?></b> aux emailings des offres partenaires de Logic Immo.</p>
-
- <a class="spir_link_grey_arrow" href="<?= $url_homepage; ?>" title="Retour àla page d'accueil">Retour à la page d'accueil</a>
- <?php
- }
- else
- { //echo "<br /> ERROR CODE:".$gdm_rt[0];
- //echo "<br /> ERROR TEXT:".$gdm_rt[1];
- ?>
- <p>Le serveur est momentanément indisponible.<br />
- Veuillez nous excuser.</p>
-
- <?php
- }
-
- ?>
- <?php if(isset($_GET['cmt']) && $_GET['cmt'] == 'on') { ?><!-- fin code --><?php } ?>
-
-
- </div>
- </div>
- <?php if($_global['dev'] == 1 && isset($_GET['cmt']) && $_GET['cmt'] == 'on') { ?>
- <!-- //end : <?php echo __FILE__; ?> -->
- <?php } ?>