From: Pierre Habouzit (MadCoder Date: Tue, 11 Jan 2005 12:34:26 +0000 (+0000) Subject: push marketing mail funciton into an include, will be usefull for marketing/private.php X-Git-Tag: xorg/old~471 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ffb8f44cf04fac224e82b4dab6661bf84462112e;p=platal.git push marketing mail funciton into an include, will be usefull for marketing/private.php git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-284 --- diff --git a/include/marketing.inc.php b/include/marketing.inc.php new file mode 100644 index 0000000..b23d0b3 --- /dev/null +++ b/include/marketing.inc.php @@ -0,0 +1,34 @@ +xdb->execute('UPDATE register_marketing SET nb=nb+1,hash={?},last=NOW() WHERE uid={?} AND email={?}', $hash, $id, $email); + + // TODO HERE SEND A MARKETING MAIL +} + +// }}} +?> diff --git a/include/validations/marketing.inc.php b/include/validations/marketing.inc.php index 3c1cfb2..f2eed59 100644 --- a/include/validations/marketing.inc.php +++ b/include/validations/marketing.inc.php @@ -82,9 +82,8 @@ class MarkReq extends Validate function commit() { global $globals; - $hash = rand_url_id(12); - $globals->xdb->execute('UPDATE register_marketing SET nb=1,hash={?} WHERE uid={?} AND email={?}', $hash, $this->m_id, $this->m_email); - // TODO HERE SEND A MARKETING MAIL + require_once('marketing.inc.php'); + mark_send_mail(); return true; }