aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <JBottomley@Parallels.com>2013-04-28 09:43:09 -0700
committerJames Bottomley <JBottomley@Parallels.com>2013-04-28 09:43:50 -0700
commit1eeea44dfe0da1a83e75711e3c9ba86bab59a969 (patch)
tree00f306b0f00d3e83ecd6744b3800181c6a8e9166
parente4315247481abd31a6fcf7f20212906742ac1b24 (diff)
downloadasterisk-aastra-1eeea44dfe0da1a83e75711e3c9ba86bab59a969.tar.gz
BlackListManager: add class for managing black/white lists
Base on DatabaseListManager, this class is really simple. Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--include/BlacklistManager.class.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/BlacklistManager.class.php b/include/BlacklistManager.class.php
new file mode 100644
index 0000000..eeb6a2e
--- /dev/null
+++ b/include/BlacklistManager.class.php
@@ -0,0 +1,29 @@
+<?php
+##
+# Copyright 2013 by James Bottomley
+##
+# Blacklist handling class
+##
+require_once('Blacklist.class.php');
+require_once('DatabaseListManager.class.php');
+
+class BlacklistManager extends Blacklist {
+ function white_manager() {
+ $list = new DatabaseListManager($this, $this->url.'?action=white_manager');
+ $list->manager('whitelist', true,
+ $this->url.'?action=newnum&num=');
+ }
+
+ function black_manager() {
+ $list = new DatabaseListManager($this, $this->url.'?action=black_manager');
+ $list->manager('blacklist', false,
+ $this->url.'?action=newnum&num=');
+ }
+
+ function start() {
+ parent::start();
+ $this->do->addSoftkey('6', 'Blacklist Manager', $this->url.'?action=black_manager');
+ $this->do->addSoftkey('7', 'Whitelist Manager', $this->url.'?action=white_manager');
+ }
+}
+?>