Changeset 5946 in spip-zone for _plugins_/_stable_/ecard/envoi_ecard.html


Ignore:
Timestamp:
Oct 6, 2006, 3:46:49 PM (14 years ago)
Author:
cedric@…
Message:

generalisation de l'API de forms pour la personalisation des emails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_stable_/ecard/envoi_ecard.html

    r5548 r5946  
    1 <?php
    2 
    3 $renvoyer_image = false;
    4 
    5 
    6 if ($mel_confirm == 'oui' AND ($id_reponse = intval($id_reponse))
    7                 && (isset($id_article)) && ($id_article = intval($id_article)) ) {
    8         $query = "SELECT * FROM spip_reponses WHERE id_reponse=$id_reponse";
    9         $result = spip_query($query);
    10         if ($row = spip_fetch_array($result)) {
    11                 $id_form = $row['id_form'];
    12                 // D'abord verifier que l'URL est legitime, donc que la demande a bien
    13                 // ete generee par SPIP
    14                 if (verifier_action_auteur("forms confirme reponse $id_reponse", $hash)) {
    15                         include_spip('ecard_filtres');
    16                         generer_mail_ecard_formulaire($id_form, $id_reponse, $id_article);
    17                 }
    18         }
    19         $renvoyer_image = true;
    20 }
    21 
    22 if ($renvoyer_image) {
    23         $image = "47494638396118001800800000ffffff00000021f90401000000002c0000000018001800000216848fa9cbed0fa39cb4da8bb3debcfb0f86e248965301003b";
    24         $image = pack("H*", $image);
    25         $size = strlen($image);
    26        
    27         Header("Content-Type: image/gif");
    28         Header("Content-Length: ".$size);
    29         Header("Cache-Control: no-cache,no-store");
    30         Header("Pragma: no-cache");
    31         Header("Connection: close");
    32        
    33         echo $image;
    34 }
    35 
    36 
    37 ?>
     1[(#HTTP_HEADER{Content-Type: image/gif})][(#INCLURE{fond=valide_form}{mel_confirm}{id_reponse}{hash}{id_article}{modele=form_reponse_email_ecard})]
Note: See TracChangeset for help on using the changeset viewer.