Re: couldn't connect to phpqladmin
Aaron Collins <[email protected]> Wed, 20 Jul 2005 18:00:52 -1000
| Newsgroups | gmane.mail.qmail.ldap.phpqladmin |
|---|---|
| Organization | Ehawaii.gov |
| Message-ID | <[email protected]> |
--Boundary-00=_03x3CBWQaz0GH/y Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Samba patch Here is the first version of the patch to add samba support. I'm sure their will be many updates to this piece. with this it allows you to add sambasamaccount as an objectclass in your template and it will scan for that and add all the needed attributes. It also gives you a samba admin menu if your user has the object. -- Aaron Collins Systems Administrator / Release Engineer Hawaii Information Consortium [email protected] 808-587-4213 --Boundary-00=_03x3CBWQaz0GH/y Content-Type: text/x-diff; charset="iso-8859-1"; name="samba.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="samba.patch" ? phpQLAdmin/README.samba ? phpQLAdmin/include/attrib.givenname.inc ? phpQLAdmin/include/attrib.sambadomainname.inc ? phpQLAdmin/include/attrib.sambahomedrive.inc ? phpQLAdmin/include/attrib.sambahomepath.inc ? phpQLAdmin/include/attrib.sambalogonscript.inc ? phpQLAdmin/include/attrib.sambaprofilepath.inc ? phpQLAdmin/include/attrib.sambasid.inc ? phpQLAdmin/include/attrib.sn.inc ? phpQLAdmin/tables/user_add-samba.inc ? phpQLAdmin/tables/user_details-samba.inc Index: phpQLAdmin/user_add.php =================================================================== RCS file: /var/cvs/phpQLAdmin/user_add.php,v retrieving revision 2.128 diff -u -r2.128 user_add.php --- phpQLAdmin/user_add.php 9 Jun 2005 15:05:36 -0000 2.128 +++ phpQLAdmin/user_add.php 21 Jul 2005 03:57:31 -0000 @@ -366,7 +366,7 @@ } // It exists, it's valid. Does it already exists in the database? - if($error_text["mail"] == "" and pql_email_exists($_pql, $_REQUEST["mail"])) { + if(empty($error_text["mail"]) and pql_email_exists($_pql, $_REQUEST["mail"])) { $error = true; $error_text["mail"] = pql_complete_constant($LANG->_('Mail address %address% already exists'), array("address" => '<i>'.$_REQUEST["mail"].'</i>')); @@ -456,6 +456,7 @@ } } // }}} + if(!empty($error_text["forwardingaddress"])) { echo "Error with forwardingaddress\n"; } // {{{ Generate the mailHost attribute/value if($_REQUEST["mail"] and @@ -639,7 +640,7 @@ <?php echo pql_complete_constant($LANG->_('Create account in domain %domain%'), array("domain" => $_REQUEST["orgname"])); ?> <?php -if($_SESSION["ADVANCED_MODE"] && is_array($template)) { +if(!empty($_SESSION["ADVANCED_MODE"]) && is_array($template)) { echo ': '.$template["short"]; } elseif(!is_array($template)) { // Retreive template we're using @@ -662,7 +663,6 @@ echo "Request array: "; printr($_REQUEST); echo "Error array: "; printr($error_text); } - switch($_REQUEST["page_next"]) { case "": // Step 1 - Choose account properties (type of account) @@ -684,7 +684,7 @@ case "save": // Step 4 - Save the user into DB - if($_REQUEST["page_curr"] and $_REQUEST["autogenerate"] and empty($_REQUEST["password_shown"])) + if(!empty($_REQUEST["page_curr"]) and !empty($_REQUEST["autogenerate"]) and empty($_REQUEST["password_shown"])) $include = "./tables/user_add-show_password.inc"; else $include = "./tables/user_add-save.inc"; Index: phpQLAdmin/user_detail.php =================================================================== RCS file: /var/cvs/phpQLAdmin/user_detail.php,v retrieving revision 2.93 diff -u -r2.93 user_detail.php --- phpQLAdmin/user_detail.php 11 Jun 2005 12:20:00 -0000 2.93 +++ phpQLAdmin/user_detail.php 21 Jul 2005 03:57:31 -0000 @@ -104,6 +104,7 @@ // uses 'objectClass: pilotPerson' -> http://rfc-1274.rfcindex.net/ $attribs = array("cn" => pql_get_define("PQL_ATTR_CN"), "sn" => pql_get_define("PQL_ATTR_SN"), + "givenname" => pql_get_define("PQL_ATTR_GIVENNAME"), "uidnumber" => pql_get_define("PQL_ATTR_QMAILUID"), "gidnumber" => pql_get_define("PQL_ATTR_QMAILGID"), "loginshell" => pql_get_define("PQL_ATTR_LOGINSHELL"), @@ -114,6 +115,7 @@ "mailhost" => pql_get_define("PQL_ATTR_MAILHOST"), "homedirectory" => pql_get_define("PQL_ATTR_HOMEDIR"), "roomnumber" => pql_get_define("PQL_ATTR_ROOMNUMBER"), + "o" => pql_get_define("PQL_ATTR_O"), "telephonenumber" => pql_get_define("PQL_ATTR_TELEPHONENUMBER"), "homephone" => pql_get_define("PQL_ATTR_HOMEPHONE"), "homepostaladdress" => pql_get_define("PQL_ATTR_HOMEPOSTALADDRESS"), @@ -121,6 +123,13 @@ "personaltitle" => pql_get_define("PQL_ATTR_PERSONALTITLE"), "mobile" => pql_get_define("PQL_ATTR_MOBILE"), "pager" => pql_get_define("PQL_ATTR_PAGER"), + "sambasid" => pql_get_define("PQL_ATTR_SAMBASID"), + "sambaprofilepath" => pql_get_define("PQL_ATTR_SAMBAPROFILEPATH"), + "sambahomedrive" => pql_get_define("PQL_ATTR_SAMBAHOMEDRIVE"), + "sambahomepath" => pql_get_define("PQL_ATTR_SAMBAHOMEPATH"), + "sambadomainname" => pql_get_define("PQL_ATTR_SAMBADOMAINNAME"), + "sambalogonscript" => pql_get_define("PQL_ATTR_SAMBALOGONSCRIPT"), + "sambauserworkstations" => pql_get_define("PQL_ATTR_SAMBAUSERWORKSTATIONS"), "startwithadvancedmode"=> pql_get_define("PQL_ATTR_START_ADVANCED")); foreach($attribs as $key => $attrib) { if($attrib == pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $_GET["rootdn"])) @@ -192,17 +201,12 @@ // If this user have a username (ie, 'uid') then let's see if this user is member // of more groups (listed in the 'memberUid' attribute). if($uid) { - $memberuid = array(); - foreach($_SESSION["BASE_DN"] as $base) { - $base = urldecode($base); -// BUG: This won't work - wrong params!! - $muids = pql_search($_pql->ldap_linkid, $base, - pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")."=".$uid, - pql_get_define("PQL_ATTR_CN")); - - for($i=0; isset($muids[$i]); $i++) - $memberuid[] = $muids[$i]; - } + $memberuid = array(); + foreach($_SESSION["BASE_DN"] as $base) { + $base = pql_get_define("PQL_CONF_SUBTREE_GROUPS") .', '. $_REQUEST['domain']; + $memberuid = pql_search($_pql->ldap_linkid, $base, + pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")."=".$uid); + } } // }}} @@ -215,13 +219,20 @@ $objectclasses = array($objectclasses); } foreach($objectclasses as $oc) { - if(eregi('qmailGroup', $oc)) - $USER_IS_GROUP = 1; + if(eregi('qmailGroup', $oc)) + $USER_IS_GROUP = 1; + if(eregi('sambaSamAccount', $oc)) + $USER_IS_SAMBA = 1; } // }}} // {{{ Setup the buttons $buttons = array('basic' => 'User data'); +// {{If they had the objectClass, then show them the menu +if($USER_IS_SAMBA) { + $smb = array('samba' => 'Samba Settings'); + $buttons = $buttons + $smb; +} if(!$USER_IS_GROUP) { $new = array('personal' => 'Personal details', 'status' => 'Account status', @@ -259,12 +270,13 @@ $buttons = $buttons + $new; } -pql_generate_button($buttons, "user=".$url["user"]); echo " <br>\n"; +pql_generate_button($buttons, "user=".$url["user"]); echo " <br>\n\n"; // }}} // {{{ Load the correct view page if($_GET["view"] == 'basic') include("./tables/user_details-basic.inc"); if($_GET["view"] == 'personal') include("./tables/user_details-personal.inc"); +if($_GET["view"] == 'samba') include("./tables/user_details-samba.inc"); if($_GET["view"] == 'email') include("./tables/user_details-email.inc"); if($_GET["view"] == 'status') include("./tables/user_details-status.inc"); if($_GET["view"] == 'delivery') include("./tables/user_details-delivery.inc"); Index: phpQLAdmin/user_edit_attribute.php =================================================================== RCS file: /var/cvs/phpQLAdmin/user_edit_attribute.php,v retrieving revision 2.56 diff -u -r2.56 user_edit_attribute.php --- phpQLAdmin/user_edit_attribute.php 9 Jun 2005 15:05:36 -0000 2.56 +++ phpQLAdmin/user_edit_attribute.php 21 Jul 2005 03:57:31 -0000 @@ -100,6 +100,7 @@ attribute_print_form(); } } elseif(($_REQUEST["submit"] == 3) and (($_REQUEST["attrib"] == 'dnmember') or + ($_REQUEST["attrib"] == 'memberuid') or ($_REQUEST["attrib"] == 'dnmoderator') or ($_REQUEST["attrib"] == 'dnsender'))) { attribute_print_form($_REQUEST["action"]); Index: phpQLAdmin/include/attrib.userpassword.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/attrib.userpassword.inc,v retrieving revision 2.32 diff -u -r2.32 attrib.userpassword.inc --- phpQLAdmin/include/attrib.userpassword.inc 28 May 2005 15:14:10 -0000 2.32 +++ phpQLAdmin/include/attrib.userpassword.inc 21 Jul 2005 03:57:40 -0000 @@ -136,6 +136,29 @@ $_SESSION["NEW_PASS"] = $_REQUEST["userpassword"]; } + //Check if samba is in use so we can keep the passwords in sync + //Perhaps we should give the admin the choice of weather or not we should use lanman + //since it's so insecure. Thoughts anyone? + $objectclasses = pql_get_attribute($_pql->ldap_linkid, $_REQUEST["user"], + pql_get_define("PQL_ATTR_OBJECTCLASS")); + if($objectclasses and !is_array($objectclasses)) { + // Make it an array for the following foreach() to work.. + $objectclasses = array($objectclasses); + } + foreach($objectclasses as $oc) { + if(eregi(pql_get_define("PQL_ATTR_SAMBAOBJECTCLASS"), $oc)) + $USER_IS_SAMBA = 1; + } + + if($USER_IS_SAMBA){ + $nt = pql_password_hash($_REQUEST["userpassword"], '{ntpasswd}'); + $lm = pql_password_hash($_REQUEST["userpassword"], '{lmpasswd}'); + pql_modify_attribute($_pql->ldap_linkid, $_REQUEST["user"], + pql_get_define("PQL_ATTR_SAMBANTPASSWORD"), 1, $nt); + pql_modify_attribute($_pql->ldap_linkid, $_REQUEST["user"], + pql_get_define("PQL_ATTR_SAMBALMPASSWORD"), 1, $lm); + } + if($_REQUEST["principal"] and extension_loaded('kadm5') and function_exists("kadm5_init_with_password") and ($_REQUEST["pwscheme"] == '{KERBEROS}')) { if(kadmin_cpw($_pql->ldap_linkid, $_REQUEST["principal"], $_REQUEST["userpassword"])) success = 1; Index: phpQLAdmin/include/config_attributes.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/config_attributes.inc,v retrieving revision 2.37 diff -u -r2.37 config_attributes.inc --- phpQLAdmin/include/config_attributes.inc 26 May 2005 15:53:18 -0000 2.37 +++ phpQLAdmin/include/config_attributes.inc 21 Jul 2005 03:57:40 -0000 @@ -225,6 +225,23 @@ pql_set_define("PQL_ATTR_PASSWD_CLEAR", strtolower('clearTextPassword'), false); // }}} +// {{{ Samba Attributes +pql_set_define("PQL_ATTR_SAMBASID", strtolower('sambaSID'), false); +pql_set_define("PQL_ATTR_SAMBAPROFILEPATH", strtolower('sambaProfilePath'), false); +pql_set_define("PQL_ATTR_SAMBAHOMEDRIVE", strtolower('sambaHomeDrive'), false); +pql_set_define("PQL_ATTR_SAMBAHOMEPATH", strtolower('sambaHomePath'), false); +pql_set_define("PQL_ATTR_SAMBADOMAINNAME", strtolower('sambaDomainName'), false); +pql_set_define("PQL_ATTR_SAMBALOGONSCRIPT", strtolower('sambaLogonScript'), false); +pql_set_define("PQL_ATTR_SAMBAUSERWORKSTATIONS", strtolower('sambaUserWorkstations'), false); +pql_set_define("PQL_ATTR_SAMBALMPASSWORD", strtolower('sambaLMPassword'), false); +pql_set_define("PQL_ATTR_SAMBANTPASSWORD", strtolower('sambaNTPassword'), false); +pql_set_define("PQL_ATTR_SAMBAACCTFLAGS", strtolower('sambaAcctFlags'), false); +pql_set_define("PQL_ATTR_SAMBAACCTFLAGS", strtolower('sambaAcctFlags'), false); +pql_set_define("PQL_ATTR_SAMBAPWDMUSTCHANGE", strtolower('sambaPwdMustChange'), false); +pql_set_define("PQL_ATTR_SAMBAPWDLASTSET", strtolower('sambaPwdLastSet'), false); +pql_set_define("PQL_ATTR_SAMBAOBJECTCLASS", strtolower('sambaSamAccount'), false); +// }}} + // {{{ These are the internal phpQLAdmin attributes - GLOBAL configuration // Toggles pql_set_define("PQL_ATTR_CONTROL_USE", strtolower('useControls'), false); Index: phpQLAdmin/include/config_plugins.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/config_plugins.inc,v retrieving revision 2.19 diff -u -r2.19 config_plugins.inc --- phpQLAdmin/include/config_plugins.inc 26 May 2005 15:53:18 -0000 2.19 +++ phpQLAdmin/include/config_plugins.inc 21 Jul 2005 03:57:40 -0000 @@ -210,6 +210,51 @@ "", pql_get_define("PQL_ATTR_CN")); +pql_plugin_register(pql_get_define("PQL_ATTR_SN"), + "attrib.sn.inc", + "", + pql_get_define("PQL_ATTR_SN")); + +pql_plugin_register(pql_get_define("PQL_ATTR_GIVENNAME"), + "attrib.givenname.inc", + "", + pql_get_define("PQL_ATTR_GIVENNAME")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBAHOMEDRIVE"), + "attrib.sambahomedrive.inc", + "", + pql_get_define("PQL_ATTR_SAMBAHOMEDRIVE")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBALOGONSCRIPT"), + "attrib.sambalogonscript.inc", + "", + pql_get_define("PQL_ATTR_SAMBALOGONSCRIPT")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBASID"), + "attrib.sambasid.inc", + "", + pql_get_define("PQL_ATTR_SAMBASID")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBAUSERWORKSTATIONS"), + "attrib.sambauserworkstations.inc", + "", + pql_get_define("PQL_ATTR_SAMBAUSERWORKSTATIONS")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBADOMAINNAME"), + "attrib.sambadomainname.inc", + "", + pql_get_define("PQL_ATTR_SAMBADOMAINNAME")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBAPROFILEPATH"), + "attrib.sambaprofilepath.inc", + "", + pql_get_define("PQL_ATTR_SAMBAPROFILEPATH")); + +pql_plugin_register(pql_get_define("PQL_ATTR_SAMBAHOMEPATH"), + "attrib.sambahomepath.inc", + "", + pql_get_define("PQL_ATTR_SAMBAHOMEPATH")); + pql_plugin_register(pql_get_define("PQL_ATTR_LDAPACI"), "attrib.aci.inc", "", Index: phpQLAdmin/include/pql.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql.inc,v retrieving revision 2.207 diff -u -r2.207 pql.inc --- phpQLAdmin/include/pql.inc 13 Jun 2005 11:46:26 -0000 2.207 +++ phpQLAdmin/include/pql.inc 21 Jul 2005 03:57:41 -0000 @@ -507,19 +507,39 @@ // - {SHA}kldfaldkjadsfdsad= // - {MD5}lkasjfdndiasdfee= // - {crypt}cryptedpassword + // - {ntpasswd}NT Password + // - {lmpasswd}Lan Manager // - {SASL}principal@realm // - cleartextpasswort - if(!function_exists("mhash") and ($hash = "{MD5}")) { - // We do not have access to MD5 encryption - force {CRYPT}! - unset($hash); - - $log = date("M d H:i:s"); - $log .= "MD5 encryption (mhash) not compiled into PHP. Please review the file doc/INSTALL. Falling back to using {CRYPT}"; - @error_log($log, 3, "phpQLadmin.log"); - } + + if(!function_exists("mhash") and ($hash == "{MD5}")) { + // We do not have access to MD5 encryption - force {CRYPT}! + unset($hash); + + $log = date("M d H:i:s"); + $log .= "MD5 encryption (mhash) not compiled into PHP. Please review the file doc/INSTALL. Falling back to +using {CRYPT}"; + @error_log($log, 3, "phpQLadmin.log"); + } switch($hash){ + case "{ntpasswd}": + // NT Password + $passwd_cmd = "/usr/sbin/mkntpwd " . $password; + $HashPass = `$passwd_cmd`; + $ntpassword = substr($HashPass, strpos($HashPass, ':')+1); + $ntpassword = rtrim($ntpassword); + return $ntpassword; + + case "{lmpasswd}": + // Lan Manager + $passwd_cmd = "/usr/sbin/mkntpwd " . $password; + $HashPass = `$passwd_cmd`; + $lmpassword = substr($HashPass, 0, strpos($HashPass, ':')); + $lmpassword = rtrim($lmpassword); + return $lmpassword; + case "{SSHA}": // SHA1 hashing (salted) if(function_exists("mhash")) Index: phpQLAdmin/include/pql_config.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_config.inc,v retrieving revision 1.79 diff -u -r1.79 pql_config.inc --- phpQLAdmin/include/pql_config.inc 9 Jun 2005 15:21:32 -0000 1.79 +++ phpQLAdmin/include/pql_config.inc 21 Jul 2005 03:57:41 -0000 @@ -35,9 +35,9 @@ if(is_array($value)) { unset($tmp); - for($i=0; $value[$i]; $i++) { + for($i=0; !empty($value[$i]); $i++) { $tmp .= $value[$i]; - if($value[$i+1]) + if(!empty($value[$i+1])) $tmp .= ','; } @@ -98,9 +98,15 @@ require($_SESSION["path"]."/include/config_attributes.inc"); // Attribute definitions if($_SESSION["USER_HOST"]) { - if(!$_pql) + if(empty($_pql)) // Open a connection to the LDAP server - $_pql = new pql($_SESSION["USER_HOST"], $_SESSION["USER_DN"], $_SESSION["USER_PASS"]); + + //Added the following to clean up php notices/warnings + if(!empty($_SESSION["USER_DN"])){ $bindn = $_SESSION["USER_DN"]; } + else{ $bindn = ''; } + if(!empty($_SESSION["USER_PASS"])){ $bindpw = $_SESSION["USER_PASS"]; } + else{ $bindpw = ''; } + $_pql = new pql($_SESSION["USER_HOST"], $bindn, $bindpw); $_SESSION["ALLOW_BRANCH_CREATE"] = 0; $_SESSION["ALLOW_CONTROL_CREATE"] = 0; $_SESSION["ALLOW_EZMLM_CREATE"] = 0; @@ -154,7 +160,7 @@ } // 4a. Verify if the user is administrator on the topmost DN (i.e. 'super admin') -> Allow creation of domain/branches. - if($_SESSION["USER_DN"] && !$_SESSION["ALLOW_BRANCH_CREATE"]) { + if(!empty($_SESSION["USER_DN"]) && empty($_SESSION["ALLOW_BRANCH_CREATE"])) { $_SESSION["ALLOW_BRANCH_CREATE"] = pql_validate_administrator($_pql->ldap_linkid, $dn, pql_get_define("PQL_ATTR_ADMINISTRATOR"), $_SESSION["USER_DN"]); @@ -167,13 +173,13 @@ } // 4b. Verify if the user is controlsAdministrator in the topmost DN -> Allow administration of QmailLDAP/Control objects. - if($_SESSION["USER_DN"] && !$_SESSION["ALLOW_CONTROL_CREATE"]) + if(!empty($_SESSION["USER_DN"]) && empty($_SESSION["ALLOW_CONTROL_CREATE"])) $_SESSION["ALLOW_CONTROL_CREATE"] = pql_validate_administrator($_pql->ldap_linkid, $dn, pql_get_define("PQL_ATTR_ADMINISTRATOR_CONTROLS"), $_SESSION["USER_DN"]); // 4c. Verify if the user is ezmlmAdministrator in the topmost DN -> Allow administration of Ezmlm lists. - if($_SESSION["USER_DN"] && !$_SESSION["ALLOW_EZMLM_CREATE"]) + if(!empty($_SESSION["USER_DN"]) && empty($_SESSION["ALLOW_EZMLM_CREATE"])) $_SESSION["ALLOW_EZMLM_CREATE"] = pql_get_dn($_pql->ldap_linkid, $dn, pql_get_define("PQL_ATTR_ADMINISTRATOR_EZMLM").'='.$_SESSION["USER_DN"]); if(!pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $dn)) { @@ -186,7 +192,7 @@ } // 5. Check the Control DN if the user is there -> Allow management of Controls information - if(!$_SESSION["ALLOW_CONTROL_CREATE"]) + if(empty($_SESSION["ALLOW_CONTROL_CREATE"])) $_SESSION["ALLOW_CONTROL_CREATE"] = pql_validate_administrator($_pql->ldap_linkid, $_SESSION["USER_SEARCH_DN_CTR"], pql_get_define("PQL_ATTR_ADMINISTRATOR_CONTROLS"), $_SESSION["USER_DN"]); Index: phpQLAdmin/include/pql_formating.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_formating.inc,v retrieving revision 2.44 diff -u -r2.44 pql_formating.inc --- phpQLAdmin/include/pql_formating.inc 13 Jun 2005 11:48:51 -0000 2.44 +++ phpQLAdmin/include/pql_formating.inc 21 Jul 2005 03:57:42 -0000 @@ -112,7 +112,7 @@ foreach($buttons as $view => $text) { // Generate the button link etc ?> - <a href="<?=$url?>view=<?=$view?><?php if($link) { echo "&$link"; } ?>"><img alt="/ <?=$LANG->_($text)?> \" vspace="0" hspace="0" border="0" src="tools/navbutton.php?<?php echo urlencode($LANG->_($text)); ?>"></a> + <a href="<?=$url?>view=<?=$view?><?php if($link) { echo "&$link"; } ?>"><img alt="/ <?=$LANG->_($text)?> \" vspace="0" hspace="0" border="0" src="tools/navbutton.php?LABEL=<?php echo urlencode($LANG->_($text)); ?>"></a> <?php // Increase button counter" $i++; Index: phpQLAdmin/include/pql_plugins.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_plugins.inc,v retrieving revision 2.4 diff -u -r2.4 pql_plugins.inc --- phpQLAdmin/include/pql_plugins.inc 22 Jun 2005 13:58:33 -0000 2.4 +++ phpQLAdmin/include/pql_plugins.inc 21 Jul 2005 03:57:42 -0000 @@ -144,7 +144,7 @@ // {{{ pql_plugin_register(name, cat, file, attribs) // Register a plugin for specified attribute -function pql_plugin_register($name, $cat, $file, $attribs) { +function pql_plugin_register($name, $file, $cat, $attribs) { global $_pql_plugins; $_pql_plugins->add_plugin($name, $file, $cat); Index: phpQLAdmin/include/pql_search.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_search.inc,v retrieving revision 2.42 diff -u -r2.42 pql_search.inc --- phpQLAdmin/include/pql_search.inc 13 Jun 2005 12:55:56 -0000 2.42 +++ phpQLAdmin/include/pql_search.inc 21 Jul 2005 03:57:42 -0000 @@ -70,13 +70,13 @@ // Ignore the 'count' value and values with a number // ldap_get_entries() returns a very funny array - flatten // it! - if(is_array($value) and $value[1]) { + if(is_array($value) and !empty($value[1])) { // A multi value - such as 'mailAlternateAddress' // or 'objectClass' etc. Take ALL values, ignoring // any empty values that might exists. $count = count($value); for($j=0; $j <= $count; $j++) { - if($value[$j]) + if(!empty($value[$j])) $entry[$i][$key][] = pql_maybe_decode($value[$j]); } } elseif(!is_array($value)) @@ -138,7 +138,7 @@ // Get the (WHOLE) object but only return only the attributes of interest. $object = pql_search($linkid, $dn, "(".pql_get_define("PQL_ATTR_OBJECTCLASS")."=*)", 'BASE', 1, $operational); - if($object and $object[0][$attribute]) + if(!empty($object) and !empty($object[0][$attribute])) return($object[0][$attribute]); elseif($object and $object[$attribute]) // Most likley returned from a cached object... @@ -224,8 +224,8 @@ else if(pql_get_define("PQL_CONF_REFERENCE_DOMAINS_WITH", $TOP_DN) == 'dc') $ocs = '(objectClass=domain)'; // Could also be 'domainComponent' - if(pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $TOP_DN)) - $filter = pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $TOP_DN)."=*"; + if(pql_get_define("PQL_CONF_REFERENCE_DOMAINS_WITH", $TOP_DN)) + $filter = pql_get_define("PQL_CONF_REFERENCE_DOMAINS_WITH", $TOP_DN)."=*"; else // User reference for this branch/domain not specified. Use default... $filter = 'uid=*'; @@ -780,15 +780,15 @@ // Go through each object class foreach($VALUE as $value_attrib => $value_data) { // Go through each MUST attribute(s) - for($j=0; $value_data["MUST"][$j]; $j++) { + for($j=0; !empty($value_data["MUST"][$j]); $j++) { // Go through each attribute alias(es) foreach($ATTRS["ALIAS"] as $attrs_attrib => $attrs_data) { - if(lc($value_data["MAY"][$j]) == lc($attrs_attrib)) { + if(!empty($value_data["MAY"][$j]) and (lc($value_data["MAY"][$j]) == lc($attrs_attrib)) ) { foreach($attrs_data as $alias) $VALUE[$value_attrib]["MAY"][$j] .= ":$alias"; } - if(lc($value_data["MUST"][$j]) == lc($attrs_attrib)) { + if(!empty($value_data["MUST"][$j]) and (lc($value_data["MUST"][$j]) == lc($attrs_attrib)) ) { foreach($attrs_data as $alias) $VALUE[$value_attrib]["MUST"][$j] .= ":$alias"; } Index: phpQLAdmin/include/pql_session.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_session.inc,v retrieving revision 1.4 diff -u -r1.4 pql_session.inc --- phpQLAdmin/include/pql_session.inc 18 May 2005 20:29:16 -0000 1.4 +++ phpQLAdmin/include/pql_session.inc 21 Jul 2005 03:57:42 -0000 @@ -2,15 +2,11 @@ // Manage PHP sessions per phpQLAdmin instance // $Id: pql_session.inc,v 1.4 2005/05/18 20:29:16 turbo Exp $ -// {{{ Get the URI path -// Replace '/' with '\/' so that regexp will work -$root = preg_replace("/\//", "\\/", $_SERVER["DOCUMENT_ROOT"]); - -// Remove the document root from _MY_ location. -$uri = preg_replace("/$root/", '', __FILE__); - -// Remove the actual path to the file -$uri = '/'.preg_replace("/include\/pql_session.inc/", '', $uri); +// Fix the URI Retgathering +$uri = $_SERVER['REQUEST_URI']; +$me = basename($uri); +$uri = preg_replace("/$me/", '', $uri); +$uri = preg_replace("/\/\//", '/\//', $uri); // }}} // {{{ Retreive the protocol and server name Index: phpQLAdmin/include/pql_templates.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_templates.inc,v retrieving revision 2.5 diff -u -r2.5 pql_templates.inc --- phpQLAdmin/include/pql_templates.inc 18 May 2005 20:29:16 -0000 2.5 +++ phpQLAdmin/include/pql_templates.inc 21 Jul 2005 03:57:42 -0000 @@ -119,16 +119,16 @@ $schema = pql_get_subschema($linkid, 'objectclasses'); // Get all the MUST attributes for all the included object classes - for($j=0; $objectclasses[$j]; $j++) { + for($j=0; !empty($objectclasses[$j]); $j++) { $oc = lc($objectclasses[$j]); // short form - if($schema[$oc]["MUST"]) { - for($k=0; $schema[$oc]["MUST"][$k]; $k++) { + if(!empty($schema[$oc]["MUST"])) { + for($k=0; !empty($schema[$oc]["MUST"][$k]); $k++) { $must[] = $schema[$oc]["MUST"][$k]; } } - if($schema[$oc]["MAY"]) { - for($k=0; $schema[$oc]["MAY"][$k]; $k++) { + if(!empty($schema[$oc]["MAY"])) { + for($k=0; !empty($schema[$oc]["MAY"][$k]); $k++) { $may[] = $schema[$oc]["MAY"][$k]; } } @@ -166,20 +166,33 @@ // For each of the userObjectClass'es in the template, get required attributes $attribs = pql_templates_attributes($linkid, $template_def["userobjectclass"]); + if(!$type or (lc($type) == "must")) { - for($i=0; $attribs['must'][$i]; $i++) { - if(lc($attribs['must'][$i]) == lc($attribute)) + for($i=0; !empty($attribs['must'][$i]); $i++) { + if(ereg(":", $attribs['must'][$i])){ + list($real, $alias) = split(":", $attribs['must'][$i]); + if( (lc($real) == lc($attribute)) or (lc($alias) == lc($attribute)) ){ + return 1; + } + } + if(lc($attribs['must'][$i]) == lc($attribute)){ return 1; + } } } - if(!$type or (lc($type) == "may")) { for($i=0; $attribs['may'][$i]; $i++) { - if(lc($attribs['may'][$i]) == lc($attribute)) + if(ereg(":", $attribs['may'][$i])){ + list($real, $alias) = split(":", $attribs['may'][$i]); + if( (lc($real) == lc($attribute)) or (lc($alias) == lc($attribute)) ){ + return 2; + } + } + if(lc($attribs['may'][$i]) == lc($attribute)){ return 2; + } } } - return false; } // }}} Index: phpQLAdmin/include/pql_write.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/include/pql_write.inc,v retrieving revision 2.31 diff -u -r2.31 pql_write.inc --- phpQLAdmin/include/pql_write.inc 13 Jun 2005 12:03:17 -0000 2.31 +++ phpQLAdmin/include/pql_write.inc 21 Jul 2005 03:57:43 -0000 @@ -409,7 +409,9 @@ // }}} // {{{ If this is a 'system' account, create the Group object - if($type == "system" and $entry[pql_get_define("PQL_ATTR_QMAILGID")]) { + if(in_array('posixaccount', $entry[pql_get_define("PQL_ATTR_OBJECTCLASS")]) and + $entry[pql_get_define("PQL_ATTR_QMAILGID")]) + { // Remember this for the NEW entry object... $gidnr = $entry[pql_get_define("PQL_ATTR_QMAILGID")]; $rdnattr = $entry[pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $rootdn)]; @@ -436,6 +438,12 @@ } // }}} + if(file_exists($_SESSION["path"]."/.DEBUG_ME")) { + echo "DNs added: "; + printr($dns); + die(); + } + return $dns; } @@ -447,7 +455,6 @@ // ------------------------------------------------ // {{{ pql_user_del(ldap, domain, user, delete_forwards) - // Delete a user from the LDAP database function pql_user_del($ldap, $domain, $user, $delete_forwards) { $linkid = $ldap->ldap_linkid; Index: phpQLAdmin/tables/domain_details-dnszone.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/tables/domain_details-dnszone.inc,v retrieving revision 1.36 diff -u -r1.36 domain_details-dnszone.inc --- phpQLAdmin/tables/domain_details-dnszone.inc 8 Jun 2005 14:04:52 -0000 1.36 +++ phpQLAdmin/tables/domain_details-dnszone.inc 21 Jul 2005 03:57:55 -0000 @@ -10,7 +10,7 @@ elseif($_REQUEST["dns_domain_name"]) $dns_domain_name = $_REQUEST["dns_domain_name"]; ?> - <a href="<?=$_SERVER["PHP_SELF"]?>?rootdn=<?=$_REQUEST["rootdn"]?>&domain=<?=$_REQUEST["domain"]?>&view=<?=$_REQUEST["view"]?>&dns_domain_name=<?=$dname?>"><img alt="/ <?=$dname?> \" vspace="0" hspace="0" border="0" src="tools/navbutton.php?<?php echo urlencode($dname)?>"></a> + <a href="<?=$_SERVER["PHP_SELF"]?>?rootdn=<?=$_REQUEST["rootdn"]?>&domain=<?=$_REQUEST["domain"]?>&view=<?=$_REQUEST["view"]?>&dns_domain_name=<?=$dname?>"><img alt="/ <?=$dname?> \" vspace="0" hspace="0" border="0" src="tools/navbutton.php?LABEL=<?php echo urlencode($dname)?>"></a> <?php } ?> </table> Index: phpQLAdmin/tables/domain_details-websrv.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/tables/domain_details-websrv.inc,v retrieving revision 1.13 diff -u -r1.13 domain_details-websrv.inc --- phpQLAdmin/tables/domain_details-websrv.inc 1 Jun 2005 11:35:40 -0000 1.13 +++ phpQLAdmin/tables/domain_details-websrv.inc 21 Jul 2005 03:57:55 -0000 @@ -33,7 +33,7 @@ ?> <table cellspacing="0" border="0" width="100%" cellpadding="0" size="100%"> <tr> - <td colspan="2" valign="bottom" align="left" width="100%"><?php $i=1; foreach($web_srvs as $srv => $data) { ?><a href="<?=$_SERVER["PHP_SELF"]."?rootdn=".$url["rootdn"]."&domain=".$url["domain"]."&view=".$_REQUEST["view"]."&server=$srv"?>"><img alt="/ <?=$srv?> \" vspace="0" hspace="0" border="0" src="tools/navbutton.php?<?=$srv?>"></a><?php if(!($i%2)) { ?><br><?php }; $i++; } ?></td> + <td colspan="2" valign="bottom" align="left" width="100%"><?php $i=1; foreach($web_srvs as $srv => $data) { ?><a href="<?=$_SERVER["PHP_SELF"]."?rootdn=".$url["rootdn"]."&domain=".$url["domain"]."&view=".$_REQUEST["view"]."&server=$srv"?>"><img alt="/ <?=$srv?> \" vspace="0" hspace="0" border="0" src="tools/navbutton.php?LABEL=<?=$srv?>"></a><?php if(!($i%2)) { ?><br><?php }; $i++; } ?></td> </tr> </table> Index: phpQLAdmin/tables/user_add-save.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/tables/user_add-save.inc,v retrieving revision 1.38 diff -u -r1.38 user_add-save.inc --- phpQLAdmin/tables/user_add-save.inc 27 May 2005 10:52:59 -0000 1.38 +++ phpQLAdmin/tables/user_add-save.inc 21 Jul 2005 03:57:57 -0000 @@ -27,7 +27,7 @@ and pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $_REQUEST["rootdn"]) == pql_get_define("PQL_ATTR_UID"))) and - pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_GIVENNAME"), 'MUST')) + pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_GIVENNAME"))) { if($_REQUEST["surname"]) $entry[pql_get_define("PQL_ATTR_GIVENNAME")] = $_REQUEST["surname"]; @@ -42,7 +42,7 @@ and pql_get_define("PQL_CONF_REFERENCE_USERS_WITH", $_REQUEST["rootdn"]) == pql_get_define("PQL_ATTR_UID"))) and - pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_SN"), 'MUST')) + pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_SN"))) { if($_REQUEST["name"]) $entry[pql_get_define("PQL_ATTR_SN")] = $_REQUEST["name"]; @@ -58,7 +58,7 @@ and pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_SN"))) or - pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_SN"), 'MUST')) + pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_SN"))) { if($_REQUEST["surname"] and $_REQUEST["name"]) $entry[pql_get_define("PQL_ATTR_CN")] = trim($_REQUEST["surname"]) . " " . trim($_REQUEST["name"]); @@ -88,7 +88,7 @@ // {{{ Add the additional email addresses as well $email_temp = split('\@', $_REQUEST["mail"]); $email_temp = $email_temp[0]; - if(pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_MAILALTERNATE"), 'MUST')) { + if(pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_MAILALTERNATE"))) { // For group objects, we need a 'catchall' mail alias as well. if($_REQUEST["email_domain"]) $entry[pql_get_define("PQL_ATTR_MAILALTERNATE")][] = $email_temp . "-catchall@" . $_REQUEST["email_domain"]; @@ -105,7 +105,6 @@ // }}} } // }}} - if($_REQUEST["forwardingaddress"] and pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_FORWARDS"))) { @@ -128,7 +127,7 @@ } // {{{ Add [ug]id number, gecos etc to the entry array -if(pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_QMAILUID"), 'MUST')) { +if(pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_QMAILUID"))) { // Get a free UserID number $uidnr = pql_get_next_ugidnumber($_pql, 'uid', $_REQUEST["rootdn"]); if($uidnr > 0) @@ -157,7 +156,7 @@ // }}} // {{{ Add the password to the entry array -if(pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_PASSWD"))) { +if(pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_PASSWD"), "MAY") == false) { if(eregi('KERBEROS', $_REQUEST["pwscheme"])) { // We're using the {KERBEROS} password scheme. Special circumstances. // The userPassword and krb5PrincipalName needs to be set. This is @@ -197,6 +196,7 @@ } // }}} + // {{{ Add login shell if($_REQUEST["loginshell"] and pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_LOGINSHELL"))) @@ -239,6 +239,7 @@ } // }}} + // {{{ Add home directory to the entry array if($_REQUEST["homedirectory"] and pql_templates_check_attribute($_pql->ldap_linkid, $template, pql_get_define("PQL_ATTR_HOMEDIR"))) @@ -269,6 +270,12 @@ // {{{ Setup the objectclass(es) $entry[pql_get_define("PQL_ATTR_OBJECTCLASS")] = $template["userobjectclass"]; // }}} +// {{{ Check if this is a samba Use +foreach($template["userobjectclass"] as $oc) { + if(eregi(pql_get_define("PQL_ATTR_SAMBAOBJECTCLASS"), $oc)) + require($_SESSION["path"].'/tables/user_add-samba.inc'); +} +// }}} if(file_exists($_SESSION["path"]."/.DEBUG_ME")) { echo "Entry array: "; printr($entry); Index: phpQLAdmin/tables/user_details-basic.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/tables/user_details-basic.inc,v retrieving revision 1.23 diff -u -r1.23 user_details-basic.inc --- phpQLAdmin/tables/user_details-basic.inc 19 Apr 2005 04:44:32 -0000 1.23 +++ phpQLAdmin/tables/user_details-basic.inc 21 Jul 2005 03:57:58 -0000 @@ -52,6 +52,19 @@ <?php } +?> + <tr class="<?php pql_format_table(); ?>"> + <td class="title"><?=$LANG->_('Firstname')?></td> + <td><?=$givenname?></td> + <td><a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&attrib=givenname&user=<?=$url["user"]?>&view=<?=$_GET["view"]?>&oldvalue=<?=$givenname?>"><img src="images/edit.png" width="12" height="12" alt="<?=$LANG->_('Change First name')?>" border="0"></a></td> + </tr> + <tr class="<?php pql_format_table(); ?>"> + <td class="title"><?=$LANG->_('Lastname')?></td> + <td><?=$sn?></td> + <td><a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&attrib=sn&user=<?=$url["user"]?>&view=<?=$_GET["view"]?>&oldvalue=<?=$sn?>"><img src="images/edit.png" width="12" height="12" alt="<?=$LANG->_('Change last name')?>" border="0"></a></td> + </tr> +<?php + // {{{ Surname and Lastname // - Can/'should' be multi-valued, hence pql_format_table_single() $class=pql_format_table(0); @@ -104,19 +117,21 @@ <tr class="<?php pql_format_table(); ?>"> <td class="title"><?=$LANG->_('Additional group(s)')?></td> -<?php if(isset($memberuid[1])) { +<?php if(isset($memberuid)) { + $new_tr = 0; + $username = $$ref; foreach($memberuid as $muid) { - $muid = pql_maybe_idna_decode($muid); + //$muid = pql_maybe_idna_decode($muid); if($new_tr) { ?> <tr class="<?php pql_format_table(); ?>"> <td class="title"></td> <?php } ?> - <td><?=$muid?></td> + <td><?= $muid['cn'] ?></td> <td> - <a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&user=<?=$url["user"]?>&attrib=<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>&<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>=<?=$muid?>&submit=4&action=delete&view=<?=$_REQUEST["view"]?>"><img src="images/del.png" width="12" height="12" alt="<?=$LANG->_('Remove user from group')?>" border="0"></a> + <a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&user=<?=$url["user"]?>&attrib=<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>&<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>=<?=$username?>&group=<?= $muid['dn'] ?>&submit=4&action=delete&view=<?=$_REQUEST["view"]?>"><img src="images/del.png" width="12" height="12" alt="<?=$LANG->_('Remove user from group')?>" border="0"></a> </td> <?php $new_tr = 1; } // if new_tr @@ -124,12 +139,12 @@ <tr class="<?php pql_format_table(); ?>"> <td class="title"></td> <td colspan="4"> - <a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&user=<?=$url["user"]?>&attrib=<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>&submit=3&action=add&view=<?=$_REQUEST["view"]?>"><?php echo pql_complete_constant($LANG->_('Add %what%'), array('what' => $LANG->_('additional group'))); ?></a> + <a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&user=<?=$url["user"]?>&attrib=<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>&uid=<?=$username?>&submit=3&action=add&view=<?=$_REQUEST["view"]?>"><?php echo pql_complete_constant($LANG->_('Add %what%'), array('what' => $LANG->_('additional group'))); ?></a> </td> </tr> <?php } else { ?> <td colspan="4"> - <a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&user=<?=$url["user"]?>&attrib=<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>&submit=3&action=add&view=<?=$_REQUEST["view"]?>"><?php echo pql_complete_constant($LANG->_('Add %what%'), array('what' => $LANG->_('additional group'))); ?></a> + <a href="user_edit_attribute.php?rootdn=<?=$url["rootdn"]?>&domain=<?=$url["domain"]?>&user=<?=$url["user"]?>&attrib=<?=pql_get_define("PQL_ATTR_ADDITIONAL_GROUP")?>&uid=<?=$username?>&submit=3&action=add&view=<?=$_REQUEST["view"]?>"><?php echo pql_complete_constant($LANG->_('Add %what%'), array('what' => $LANG->_('additional group'))); ?></a> </td> <?php } } Index: phpQLAdmin/tables/user_details-personal.inc =================================================================== RCS file: /var/cvs/phpQLAdmin/tables/user_details-personal.inc,v retrieving revision 1.5 diff -u -r1.5 user_details-personal.inc --- phpQLAdmin/tables/user_details-personal.inc 14 Feb 2004 15:31:53 -0000 1.5 +++ phpQLAdmin/tables/user_details-personal.inc 21 Jul 2005 03:57:58 -0000 @@ -1,5 +1,12 @@ <table cellspacing="0" cellpadding="3" border="0"> <th colspan="3" align="left"><?=$LANG->_('Personal details')?></th> + + <tr class="<?php pql_format_table(); ?>"> + <td class="title"><?=$LANG->_('Company/Organization')?></td> + <td><?php if($o) { echo $o; } else { echo $LANG->_('Not set'); }?></td> + <td><?=$o_link?></td> + </tr> + <tr class="<?php pql_format_table(); ?>"> <td class="title"><?=$LANG->_('Title')?></td> <td><?php if($personaltitle) { echo $personaltitle; } else { echo $LANG->_('Not set'); }?></td> Index: phpQLAdmin/tools/navbutton.php =================================================================== RCS file: /var/cvs/phpQLAdmin/tools/navbutton.php,v retrieving revision 2.17 diff -u -r2.17 navbutton.php --- phpQLAdmin/tools/navbutton.php 13 Jan 2005 05:33:39 -0000 2.17 +++ phpQLAdmin/tools/navbutton.php 21 Jul 2005 03:57:58 -0000 @@ -3,9 +3,7 @@ require("../include/pql_formating.inc"); -$string = implode($_SERVER["argv"]," "); -$string = urldecode($string); - +$string = $_REQUEST["LABEL"]; // Prepare the text - remove unwanted characters etc $string = stripslashes($string); $string = ereg_replace("\r\n", "\n", $string) ; --Boundary-00=_03x3CBWQaz0GH/y Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --Boundary-00=_03x3CBWQaz0GH/y--