b388570d675fca4b8d1bb816f3597e7ec56c1716
1 <?php
3 class filterServerService {
5 static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
6 {
7 $plugins = ServerService::getServiceList();
8 $list = array();
9 foreach($plugins as $name => $obj){
10 if($obj->is_account){
11 $data = $plugins[$name]->getListEntry();
12 $data['objectClass'] = array('FAKE_OC_ServerService');
13 $data['name'] = $name;
14 if($data['AllowStart']) $data['objectClass'][] = "AllowStart";
15 if($data['AllowStop']) $data['objectClass'][] = "AllowStop";
16 if($data['AllowRestart']) $data['objectClass'][] = "AllowRestart";
17 if($data['AllowRemove']) $data['objectClass'][] = "AllowRemove";
18 if($data['AllowEdit']) $data['objectClass'][] = "AllowEdit";
19 foreach($data as $key => $value){
20 if(!is_array($data[$key])) $data[$key] = array($data[$key]);
21 $list[$name][] = $key;
22 $list[$name][$key] = $data[$key];
23 $list[$name][$key]['count'] = count($data[$key]);
24 $list[$name]['count'] = count($data);
25 $list[$name]['dn'] = $key;
26 }
27 }
28 }
29 return($list);
30 }
31 }
33 ?>