printSTDERR" -a Create a new announcement with the given announcement text.\n";
...
...
@@ -42,21 +43,27 @@ sub usage()
printSTDERR" -b If there is an action associated with this announcement, this is the text which goes into the action button. Can include HTML. If it is unset, there is no action button.\n";
printSTDERR" -u URL of action associated with this announcement. {uid_idx} and {uid} can be used as URL templates to generate a different URL on a per-user basis. If it is unset, there is no action button.\n";
printSTDERR" -m The maximum number of times that this announcement will appear to a user. Every page view (even those in a single session) counts. A value of '0' indicates that the announcement should keep appearing indefinitely until dismissed by the user or an action is taken. Defaults to 20.\n";
printSTDERR" -l List all active global announcements.\n";
printSTDERR" -l List global announcements. Defaults to listing active announcements.\n";
printSTDERR" -r Retire announcement with the given idx. A retired announcement will no longer be displayed to users.\n";
printSTDERR" -i Info about a particular announcement.\n";
exit(-1);
}
my$optlist="hag:s:b:u:m:lr:";
my$optlist="hag:s:b:u:m:lr:i:";
my$add_mode=0;
my$list_mode=0;
my$retire_mode=0;
my$info_mode=0;
my$genesis=undef;
my$style="alert-info";
my$button=undef;
my$url=undef;
my$max_seen=20;
my$retire_idx=undef;
my$info_idx=undef;
my$text=undef;
my$list_type="active";
my$query_result;
# Protos
sub fatal($);
...
...
@@ -106,6 +113,10 @@ if (defined($options{"r"})) {