backport du script de creation de liste promo
authorx2002bobillot <x2002bobillot@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 19 Feb 2006 15:52:11 +0000 (15:52 +0000)
committerx2002bobillot <x2002bobillot@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sun, 19 Feb 2006 15:52:11 +0000 (15:52 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@245 839d8a87-29fc-0310-9880-83ba4fa771e5

bin/lists.create_promo.php [new file with mode: 0755]

diff --git a/bin/lists.create_promo.php b/bin/lists.create_promo.php
new file mode 100755 (executable)
index 0000000..f7bc204
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/php4 -q
+<?php
+require_once("xorg.inc.php");
+require_once('validations.inc.php');
+
+$opt = getopt('p:o:h');
+
+if(empty($opt['p']) || empty($opt['o']) || isset($opt['h'])) {
+    echo <<<EOF
+usage: lists.create_promo.php -p promo -o owner
+       create mailing list for promo "promo" with initial owner "owner"
+
+EOF;
+    exit;
+}
+
+$promo = intval($opt['p']);
+$owner = $opt['o'];
+
+$req = new ListeReq(0, "promo$promo", "Liste de la promotion $promo",
+               1 /*private*/, 2 /*moderate*/, 0 /*free subscription*/,
+               array($owner), array());
+$req->submit();
+?>