[Kolab-devel] server/kolab/kolab/admin/server index.php,1.6,1.6.2.1 by martin at doto.intevation.de

root at intevation.de root at intevation.de
Fri Jul 18 03:39:09 CEST 2003


Update of /kolabrepository/server/kolab/kolab/admin/server
In directory doto:/tmp/cvs-serv3144

Modified Files:
      Tag: KOLAB_1_0
	index.php 
Log Message:
Martin K.: Adding mynetworks to server config (thanks to Stephan Buys
<s.buys at codefusion.co.za>)


Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/server/index.php,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -d -r1.6 -r1.6.2.1
--- index.php	22 May 2003 17:50:35 -0000	1.6
+++ index.php	18 Jul 2003 01:39:07 -0000	1.6.2.1
@@ -26,6 +26,7 @@
    
 $hostname = "";
 $mydomain = ""; 
+$mynetworks = ""; 
 $change = "";
 
 // print_r($HTTP_GET_VARS);
@@ -33,6 +34,8 @@
 if (isset($HTTP_GET_VARS['change'])) $change = trim(urldecode($HTTP_GET_VARS['change']));
 if (isset($HTTP_GET_VARS['hostname'])) $hostname = trim(urldecode($HTTP_GET_VARS['hostname']));
 if (isset($HTTP_GET_VARS['mydomain'])) $mydomain = trim(urldecode($HTTP_GET_VARS['mydomain']));
+if (isset($HTTP_GET_VARS['mynetworks'])) $mynetworks = trim(urldecode($HTTP_GET_VARS['mynetworks']));
+
 if (!($uid = $_SERVER["PHP_AUTH_USER"]) || 
     !($password=$_SERVER['PHP_AUTH_PW']) ||
     !($bind_dn = uid2dn($uid)) ||
@@ -99,6 +102,7 @@
                 ldap_free_result($result);
              }
          }
+         if ($mynetworks) $attrs['postfix-mynetworks'][0] = $mynetworks; 
 
          if (!ldap_modify ($link,"k=kolab,".$_SESSION['base_dn'],$attrs)) 
             array_push($errors, "LDAP Error: failed to modify kolab config object ".ldap_error($link));
@@ -110,6 +114,7 @@
        ($attrs = ldap_get_attributes($link, $entry))) {
       $hostname = $attrs['fqhostname'][0]; 
       $mydomain = $attrs['postfix-mydomain'][0];
+      $mynetworks = $attrs['postfix-mynetworks'][0];
       ldap_free_result($result);
    } else array_push($errors, "LDAP Error: could not kolab configuration object ".ldap_error($link));
 
@@ -124,6 +129,9 @@
    print("<tr><td> E-Mail Domain</td>\n");
    print("<td><input type=\"text\" name=\"mydomain\" size=25 maxlength=80 value=\"$mydomain\"></td>\n");
    print("<td> Be advised that renaming the E-Mail Domain affects all E-Mail Addresses! </td></tr>\n");
+   print("<tr valign=\"top\"><td> Local Networks</td>\n");
+   print("<td><textarea name=\"mynetworks\" cols=\"20\" rows=\"4\">$mynetworks</textarea></td>\n");
+   print("<td> This determines the networks who are treated as authorised to postfix</td></tr>\n");
    print("</table>\n");
    print("<input type=\"hidden\" name=\"change\" value=\"change\">\n");
 





More information about the devel mailing list