From 5be526be7ead90c3f250f2c916347ed73cf3c2c4 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Mon, 3 Sep 2007 22:46:29 +0200 Subject: [PATCH] Backport SVN revision 1935 & 1936 (New script to send a marketing to a promotion) Signed-off-by: Florent Bruneau --- bin/marketPromo.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 bin/marketPromo.php diff --git a/bin/marketPromo.php b/bin/marketPromo.php new file mode 100755 index 0000000..036449e --- /dev/null +++ b/bin/marketPromo.php @@ -0,0 +1,49 @@ +#!/usr/bin/php5 -q +fetchOneCell(); + if (!$uid) { + echo "WARNING Can't find uid for matricule $matri (login $login)\n"; + continue; + } + $market = Marketing::get($uid, "$login@poly.polytechnique.fr"); + if (!is_null($market)) { + echo "WARNING A marketing has already been to $matri on $login\n"; + continue; + } + $market = new Marketing($uid, "$login@poly.polytechnique.fr", 'default', null, 'staff'); + $market->add(false); + $market->send(); +} + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?> + -- 2.1.4