| 1 | #!/usr/bin/php4 -q |
| 2 | <?php |
| 3 | require_once("xorg.inc.php"); |
| 4 | require_once('validations.inc.php'); |
| 5 | |
| 6 | $opt = getopt('p:o:h'); |
| 7 | |
| 8 | if(empty($opt['p']) || empty($opt['o']) || isset($opt['h'])) { |
| 9 | echo <<<EOF |
| 10 | usage: lists.create_promo.php -p promo -o owner |
| 11 | create mailing list for promo "promo" with initial owner "owner" |
| 12 | |
| 13 | EOF; |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | $promo = intval($opt['p']); |
| 18 | $owner = $opt['o']; |
| 19 | |
| 20 | $req = new ListeReq(0, "promo$promo", "Liste de la promotion $promo", |
| 21 | 1 /*private*/, 2 /*moderate*/, 0 /*free subscription*/, |
| 22 | array($owner), array()); |
| 23 | $req->submit(); |
| 24 | ?> |