summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/modules/newsletter.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/utils/modules/newsletter.php b/utils/modules/newsletter.php
index 3ca3f41..3881794 100644
--- a/utils/modules/newsletter.php
+++ b/utils/modules/newsletter.php
@@ -116,7 +116,8 @@ class Newsletter {
// Admin config
public $admin_title = "Newsletter";
public $admin_submodules = array("Send newsletter" => "send",
- "Config" => "config");
+ "Config" => "config",
+ "View list" => "view");
public function admin_send($action, $vars)
{
@@ -185,6 +186,20 @@ class Newsletter {
}
}
+ public function admin_view($action, $vars)
+ {
+ switch($action) {
+ default:
+ echo "<p>There are " . sizeof($this->mailinglist->mailinglist) . " receivers:</p>\n";
+ echo "<ul>\n";
+ foreach($this->mailinglist->mailinglist as $m) {
+ echo " <li>".xmlenc($m->email)." (added ".date("M jS, Y - H:i:s", $m->timestamp).")</li>\n";
+ }
+ echo "</ul>\n";
+ break;
+ }
+ }
+
public function admin($sub, $action, $vars)
{
switch($sub) {
@@ -195,6 +210,10 @@ class Newsletter {
case "config":
$this->admin_config($action, $vars);
break;
+
+ case "view":
+ $this->admin_view($action, $vars);
+ break;
}
}