Page principale | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de classe | Membres de fichier

htdocs/lib/ldap.lib.php

Aller à la documentation de ce fichier.
00001 <?PHP 00002 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 00003 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00018 * or see http://www.gnu.org/ 00019 * 00020 * $Id$ 00021 * $Source$ 00022 * 00023 */ 00024 00040 function dolibarr_ldap_connect() 00041 { 00042 $ldapconnect = ldap_connect(LDAP_SERVER_HOST); 00043 00044 return $ldapconnect; 00045 } 00046 00054 function dolibarr_ldap_bind($ds) 00055 { 00056 if (defined("LDAP_SERVER_PASS") && LDAP_SERVER_DN && LDAP_SERVER_PASS) 00057 { 00058 $ldapbind = ldap_bind($ds, LDAP_SERVER_DN, LDAP_SERVER_PASS); 00059 } 00060 00061 return $ldapbind; 00062 } 00063 00070 function dolibarr_ldap_unbind($ds) 00071 { 00072 00073 $ldapunbind = ldap_unbind($ds); 00074 00075 return $ldapunbind; 00076 } 00077 00084 function dolibarr_ldap_getversion($ds) 00085 { 00086 $version = 0; 00087 00088 ldap_get_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version); 00089 00090 return $version; 00091 } 00092 00101 function dolibarr_ldap_setversion($ds,$version) 00102 { 00103 $ldapsetversion = ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, $version); 00104 00105 return $ldapsetversion; 00106 } 00107 00114 function dolibarr_ldap_unacc($str) 00115 { 00116 $stu = ereg_replace("é","e",$str); 00117 $stu = ereg_replace("è","e",$stu); 00118 $stu = ereg_replace("ê","e",$stu); 00119 $stu = ereg_replace("à","a",$stu); 00120 $stu = ereg_replace("ç","c",$stu); 00121 $stu = ereg_replace("ï","i",$stu); 00122 $stu = ereg_replace("ä","a",$stu); 00123 return $stu; 00124 } 00125 00126 ?>

Généré le Thu Jul 15 20:50:38 2004 pour dolibarr par doxygen 1.3.7