[Kolab-devel] server/kolab/kolab/admin/server index.php,1.7,1.8 by martin at doto.intevation.de
root at intevation.de
root at intevation.de
Fri Jul 18 03:42:05 CEST 2003
Update of /kolabrepository/server/kolab/kolab/admin/server
In directory doto:/tmp/cvs-serv3274
Modified Files:
index.php
Log Message:
MArtin K.: Added mynetworks feature
Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/server/index.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- index.php 14 Jun 2003 13:32:52 -0000 1.7
+++ index.php 18 Jul 2003 01:42:03 -0000 1.8
@@ -25,6 +25,7 @@
$hostname = "";
$mydomain = "";
+$mynetworks = "";
$change = "";
// print_r($HTTP_GET_VARS);
@@ -32,6 +33,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)) ||
@@ -98,6 +101,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));
@@ -109,6 +113,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));
@@ -122,6 +127,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 whch 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