From ffb8f44cf04fac224e82b4dab6661bf84462112e Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Tue, 11 Jan 2005 12:34:26 +0000 Subject: [PATCH] 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 --- include/marketing.inc.php | 34 ++++++++++++++++++++++++++++++++++ include/validations/marketing.inc.php | 5 ++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 include/marketing.inc.php 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; } -- 2.1.4