move install.d/lists into modules/lists
[platal.git] / bin / lists.create_promo.php
... / ...
CommitLineData
1#!/usr/bin/php4 -q
2<?php
3require_once("xorg.inc.php");
4require_once('validations.inc.php');
5
6$opt = getopt('p:o:h');
7
8if(empty($opt['p']) || empty($opt['o']) || isset($opt['h'])) {
9 echo <<<EOF
10usage: lists.create_promo.php -p promo -o owner
11 create mailing list for promo "promo" with initial owner "owner"
12
13EOF;
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?>