| | |
| | | if(preg_match($regex, $result['ip'])) $ips[] = $result['ip']; |
| | | } |
| | | } |
| | | |
| | | |
| | | /* |
| | | $results = $app->db->queryAllRecords("SELECT xfer FROM dns_slave WHERE xfer != ''"); |
| | | if(!empty($results) && is_array($results)){ |
| | | foreach($results as $result){ |
| | |
| | | } |
| | | } |
| | | } |
| | | */ |
| | | |
| | | $results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''"); |
| | | if(!empty($results) && is_array($results)){ |
| | | foreach($results as $result){ |
| | |
| | | return implode("\n", $domains); |
| | | } |
| | | |
| | | public function is_allowed_user($username, $restrict_names = false) { |
| | | global $app; |
| | | |
| | | if($username == 'root') return false; |
| | | if($restrict_names == true && preg_match('/^web\d+$/', $username) == false) return false; |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public function is_allowed_group($groupname, $restrict_names = false) { |
| | | global $app; |
| | | |
| | | if($groupname == 'root') return false; |
| | | if($restrict_names == true && preg_match('/^client\d+$/', $groupname) == false) return false; |
| | | |
| | | return true; |
| | | } |
| | | |
| | | } |
| | | |
| | | ?> |