From: Florent Bruneau Date: Mon, 3 Sep 2007 20:46:29 +0000 (+0200) Subject: Backport SVN revision 1935 & 1936 (New script to send a marketing to a X-Git-Tag: xorg/0.9.15~180 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5be526be7ead90c3f250f2c916347ed73cf3c2c4;p=platal.git Backport SVN revision 1935 & 1936 (New script to send a marketing to a promotion) Signed-off-by: Florent Bruneau --- 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: +?> +