dolibarr  7.0.0-beta
modLdap.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
27 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
28 
29 
33 class modLdap extends DolibarrModules
34 {
40  function __construct($db)
41  {
42  $this->db = $db;
43  $this->numero = 200;
44 
45  $this->family = "technic";
46  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
47  $this->name = preg_replace('/^mod/i','',get_class($this));
48  $this->description = "Synchronisation Ldap";
49  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
50  $this->version = 'dolibarr';
51  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
52  // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
53  $this->special = 1;
54  // Name of image file used for this module.
55  // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
56  // If file is in module/images directory, use this->picto=DOL_URL_ROOT.'/module/images/file.png'
57  $this->picto = 'technic';
58 
59  // Data directories to create when module is enabled
60  $this->dirs = array("/ldap/temp");
61 
62  // Config pages
63  $this->config_page_url = array("ldap.php");
64 
65  // Dependancies
66  $this->depends = array();
67  $this->requiredby = array();
68 
69  // Constants
70  $this->const = array(
71  0=>array('LDAP_SERVER_TYPE','chaine','openldap','',0),
72  1=>array('LDAP_SERVER_PROTOCOLVERSION','chaine','3','',0),
73  2=>array('LDAP_SERVER_HOST','chaine','localhost','',0),
74  3=>array('LDAP_USER_DN','chaine','ou=users,dc=example,dc=com','',0),
75  4=>array('LDAP_GROUP_DN','chaine','ou=groups,dc=example,dc=com','',0),
76  5=>array('LDAP_FILTER_CONNECTION','chaine','&(objectClass=inetOrgPerson)','',0),
77  6=>array('LDAP_FIELD_LOGIN','chaine','uid','',0),
78  7=>array('LDAP_FIELD_FULLNAME','chaine','cn','',0),
79  8=>array('LDAP_FIELD_NAME','chaine','sn','',0),
80  9=>array('LDAP_FIELD_FIRSTNAME','chaine','givenname','',0),
81  10=>array('LDAP_FIELD_MAIL','chaine','mail','',0),
82  11=>array('LDAP_FIELD_PHONE','chaine','telephonenumber','',0),
83  12=>array('LDAP_FIELD_FAX','chaine','facsimiletelephonenumber','',0),
84  13=>array('LDAP_FIELD_MOBILE','chaine','mobile','',0),
85  );
86 
87  // Boxes
88  $this->boxes = array();
89 
90  // Permissions
91  $this->rights = array();
92  $this->rights_class = 'ldap';
93  }
94 }
Class DolibarrModules.
</td >< tdclass="liste_titre"align="right"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="'.$i.'"'.$disabled.'></td >< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"></td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:554
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:104
Class to describe and enable module Ldap.
__construct($db)
Constructor.