Beispiel #1
0
 protected function processSettingsForm($config, $key = 'Config', $path = array())
 {
     ClientUser::requireAdmin();
     $output = '<li><input name="" value="' . $key . '" /></li>';
     foreach ($config as $subkey => $value) {
         $subpath = $path;
         $subpath[] = $subkey;
         $output .= '<ul>';
         if (isset($value['#value'])) {
             if (count($value['#value']) > 1) {
                 $output .= '<li><input name="" value="' . $subkey . '" /></li><ul>';
                 foreach ($value['#value'] as $i => $val) {
                     $disabled = $value['#source'][$i] == 'internal' ? 'disabled="true"' : '';
                     $output .= '<li><input name="' . $value['#source'][$i] . '.' . implode('.', $subpath) . '" value="' . $val . '" ' . $disabled . ' /> (' . $value['#source'][$i] . ')</li>';
                 }
                 $output .= '</ul>';
             } else {
                 $disabled = $value['#source'][0] == 'internal' ? 'disabled="true"' : '';
                 $output .= '<li><input name="' . $value['#source'][0] . '.' . implode('.', $subpath) . '" value="' . $subkey . '" ' . $disabled . ' /> : <input name="' . $value['#source'][0] . '.' . implode('.', $subpath) . '" value="' . $value['#value'][0] . '" ' . $disabled . ' /></li>';
             }
         } else {
             $output .= $this->processSettingsForm($value, $subkey, $subpath);
         }
         $output .= '</ul>';
     }
     return $output;
 }
Beispiel #2
0
 public function __construct()
 {
     ClientUser::requireAdmin();
     $list_id = Request::get('list', 'int');
     if ($list_id === 0) {
         Template::getInstance()->set('title', 'Users not on any mailing list.');
         $this->accessTableCondition = array('message_list_id' => array('IS NULL'));
     } elseif ($list_id > 0) {
         $list = Database::getInstance()->selectField('name', 'message_list', array('message_list_id' => $list_id));
         Template::getInstance()->set('title', "Users on list {$list}.");
         $this->accessTableCondition = array('message_list_id' => $list_id);
     } else {
         Template::getInstance()->set('title', 'All users on all lists.');
     }
     parent::__construct();
 }
Beispiel #3
0
 protected function hasAccess()
 {
     ClientUser::requireAdmin();
     return true;
 }
Beispiel #4
0
 public function hasAccess()
 {
     ClientUser::requireAdmin();
     return true;
 }
Beispiel #5
0
 public function __construct()
 {
     ClientUser::requireAdmin();
 }