Tab completion suxx
[platal.git] / include / marketing.inc.php
index 920b432..d615c92 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -24,7 +24,6 @@ require_once("xorg.misc.inc.php");
 // {{{ function mark_from_mail
 
 function mark_from_mail($uid, $email) {
-    global $globals;
     $res = XDB::query(
         "SELECT u.nom, u.prenom, a.alias
            FROM register_marketing  AS r
@@ -34,7 +33,6 @@ function mark_from_mail($uid, $email) {
         $uid, $email);
     $sender = $res->fetchOneAssoc();
     return "\"".$sender['prenom']." ".$sender['nom']."\" <".$sender['alias']."@polytechnique.org>";
-    
 }
 
 // }}}
@@ -80,9 +78,6 @@ function mark_text_mail($uid, $email)
 
 function mark_send_mail($uid, $email, $perso, $to='', $title='', $text='') 
 {
-    require_once("diogenes/diogenes.hermes.inc.php");
-    global $globals;
-
     $hash = rand_url_id(12);
     XDB::execute('UPDATE register_marketing SET nb=nb+1,hash={?},last=NOW() WHERE uid={?} AND email={?}', $hash, $uid, $email);
  
@@ -97,7 +92,7 @@ function mark_send_mail($uid, $email, $perso, $to='', $title='', $text='')
     $sender = substr($from, 1, strpos($from, '"', 2)-1);
     $text = str_replace(array("%%hash%%", "%%sender%%"), array($hash, $sender), $text);
 
-    $mailer = new HermesMailer();
+    $mailer = new PlMailer();
     $mailer->setFrom($from);
     $mailer->addTo($to);
     $mailer->setSubject($title);
@@ -110,7 +105,6 @@ function mark_send_mail($uid, $email, $perso, $to='', $title='', $text='')
 
 function relance($uid, $nbx = -1)
 {
-    require_once('xorg.mailer.inc.php');
     global $globals;
 
     if ($nbx < 0) {
@@ -134,7 +128,7 @@ function relance($uid, $nbx = -1)
     $pass_encrypted = hash_encrypt($pass);
     $fdate    = strftime('%d %B %Y', strtotime($date));
     
-    $mymail = new XOrgMailer('marketing/mail.relance.tpl');
+    $mymail = new PlMailer('marketing/mail.relance.tpl');
     $mymail->assign('nbdix',      $nbx);
     $mymail->assign('fdate',      $fdate);
     $mymail->assign('lusername',  $alias);