steffen: server/kolab-webadmin/kolab-webadmin/www/admin/service index.php, 1.2, 1.3

cvs at intevation.de cvs at intevation.de
Tue Jun 15 03:51:34 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service
In directory doto:/tmp/cvs-serv29003/kolab-webadmin/www/admin/service

Modified Files:
	index.php 
Log Message:
updated version, added list of kolab-servers to servicepage

Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/service/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- index.php	27 May 2004 13:24:35 -0000	1.2
+++ index.php	15 Jun 2004 01:51:31 -0000	1.3
@@ -38,6 +38,7 @@
   global $http;
   global $amavis;
   global $quotawarn;
+  global $kolabhost;
 
   // Get values from LDAP
   if (($result = ldap_read($ldap->connection, "k=kolab,".$_SESSION['base_dn'], '(objectclass=*)')) &&
@@ -52,6 +53,8 @@
 	$http = $attrs['apache-http'][0];
 	$amavis = $attrs['postfix-enable-virus-scan'][0];
 	$quotawarn = $attrs['cyrus-quotawarn'][0];
+	$kolabhost = $attrs['kolabhost'];
+	unset( $kolabhost['count'] );
 	ldap_free_result($result);
   }
 }
@@ -86,6 +89,30 @@
   }  
 }
 
+if( $_REQUEST['deletekolabhost'] ) {
+  extract_ldap_values();
+  $key = array_search($_REQUEST['akolabhost'],$kolabhost);
+  if( $key !== false ) {
+	unset( $kolabhost[ $key ] );
+  }
+  $attrs = array();
+  $attrs['kolabhost'] = $kolabhost;
+  if( !($result = ldap_modify($ldap->connection, "k=kolab,".$_SESSION['base_dn'], $attrs)) ) {
+	$errors[] = "LDAP Error: failed to modify kolab configuration object ".ldap_error($ldap->connection);
+  }
+}
+if( $_REQUEST['addkolabhost'] ) {
+  extract_ldap_values();
+  if( trim($_REQUEST['akolabhost']) ) {
+	$kolabhost[] = trim($_REQUEST['akolabhost']);
+	$attrs = array();
+	$attrs['kolabhost'] = $kolabhost;
+	if( !($result = ldap_modify($ldap->connection, "k=kolab,".$_SESSION['base_dn'], $attrs)) ) {
+	  $errors[] = "LDAP Error: failed to modify kolab configuration object ".ldap_error($ldap->connection);
+	}
+  }
+}
+
 // Fill in output form
 extract_ldap_values();
 $entries = array( array( 'service' => 'pop3', 'name'  => 'POP3 Service', 'enabled' => toboolstr( $pop3 ) ),
@@ -105,6 +132,7 @@
 $smarty->assign( 'page_title', $menuitems[$sidx]['title'] );
 $smarty->assign( 'entries', $entries );
 $smarty->assign( 'quotawarn', $quotawarn );
+$smarty->assign( 'kolabhost', $kolabhost );
 $smarty->assign( 'menuitems', $menuitems );
 $smarty->assign( 'submenuitems', 
 				 array_key_exists('submenu', 





More information about the commits mailing list