diff options
author | James Bottomley <JBottomley@Parallels.com> | 2013-04-28 09:43:09 -0700 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-04-28 09:43:50 -0700 |
commit | 1eeea44dfe0da1a83e75711e3c9ba86bab59a969 (patch) | |
tree | 00f306b0f00d3e83ecd6744b3800181c6a8e9166 | |
parent | e4315247481abd31a6fcf7f20212906742ac1b24 (diff) | |
download | asterisk-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.php | 29 |
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'); + } +} +?> |