Location: PHPKode > projects > LDAP Navigator > ldapnavigator-0.9.6/config-default.php
<?php

session_start();
set_magic_quotes_runtime(0);


if( !extension_loaded( "ldap")) {
  	dl( "ldap.so" ); // change to .dll under Win32
}

// loads of misc. functions
include_once('./functions.php');

// html components classes (textinput,button...)
include_once( './lib/html.php' );


// hack for php versions >= 4.2
if( minimum_version( "4.2.0") ) 
{
	extract( $_SESSION );
	is_array($_GET) && extract( $_GET );
	is_array($_POST) && extract( $_POST );
	$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
}


$LDAPNAV_VERSION = '0.9.6';


class LDAPConfig 
{
};

$config = new LDAPConfig();


/**** configuration starts here *****/

// 1 = let user enter host manually in login page 
$config->anyHost = 1;

$config->host = array(
	"host1:389",
	"host2:389",
);


//	a list of base DNs to display in login form
$config->basedn = array(
	"o=FTI",
);

/* a list of possible users identifier or DN to display on login page
	empty the array to get an open textinput 
*/
$config->binddn = array(
	'cn=Manager,o=FTI',
);

/*
   default directory brand
   possible values: openldap, netscape, iplanet
   used to tune some vendor specific stuffs or protocol variants
*/
$config->directoryBrand = 'openldap';

// some stuff to customize titlebar and page footer
$config->appName = "LDAP Navigator";
$config->adminName = "Administrator";
$config->adminEmail = "ldap-hide@address.com";

/**** end basic config, below : "advanced" config *****/

// directory where cache files are kept
$config->tmpdir			= "c:/temp";

// prefix of cache files used in the Tree view
$config->tmpfile_prefix    = "ldapnav";

// search form : values and labels of the "Field" popup 
$config->searchFields = array(
	"" => "Name or OU",
	"cn" => "Name (CN)",
	"uid" => "Identifier (UID)",
	"ou" => "Department (OU)",
	"objectclass" => "Objectclass",
	"gidnumber" => "GID number",
	"uidnumber" => "UID number",
);

// default attributes to get back and display in the search results grid
$config->searchDefaultAttributes = "objectclass,cn,ou,description,mail";

// number of empty "new attribute" fields in "Entry form"
$config->newattrnum =  3;

// empty fields number in new entry form
$config->newEntryAttributesCount = 8;

// max number of childrenitems per node displayed in the tree view
$config->maxtreeitems		= 100;

// items per page in the search results page
$config->maxlistitems		= 30;

// batch update : number of errors over which the batch updates are interrupted, *not cancelled*
$config->maxBatchErrors   = 30;

$config->filter = array(
	"objectclass=*",
	"objectclass=person",
	"objectclass=organizationalunit"
);


$config->port[]	= 389;

/*
 objectclass to icon mapping table
 you may add some more mappings icons must be placed in img/ directory
 objectclass *must* be lowercased

**************************************************/
$config->objectclassIcons = array(
	"_default" => "closedfolder.gif", // default icon to use
	"organizationalunit" => "closedfolder.gif",
	"account" => "posixaccount.gif",
	"organizationalrole" => "vcard.gif",
	"person" => "person.gif",
	"device" => "computer.gif",
	"groupofuniquenames" => "twopeople.gif",
	"agwcontactcard" => "vcard.gif",
	"room" => "room.gif",
	"posixaccount" => "posixaccount.gif",
	"certificationauthority" => "certificationauthority.gif",
	"crldistributionpoint" => "certificaterevocationlist.gif",
	"icalevent" => "icalevent.gif",
	"icalalarm" => "icalalarm.gif",
	"icaltodo" => "icaltodo.gif",
);

/*
  attribute <-> content-type mapping
  attribute *must* be lowercased
*/
$config->attributeContentTypes = array(
	"usercertificate;binary" => "application/x-x509-ca-cert",
	"certificaterevocationlist;binary" => "application/pkix-crl",
	"jpegphoto" => "image/jpeg",
	"photo" => "image/jpeg",
);

/*
	 attributes that can not be edited
	 customize if you need - *attribute must be lowercased*
*/
$config->readOnlyAttributes = array(
	"creatorsname", "createtimestamp",
	"modifiersname", "modifytimestamp",
);


/*
	rendering functions for displaying attribute on entry properties page
	$attributesPlugins is a mapper hash used by entry/properties.php
	the mapping used is : attribute => functionName
	where functionName is a callback function to be implemented in attribute.plugins.php.
	It's purpose is to personnalize how an attribute is displayed on the page.
	Whenever the entry contains one of these attribute, the callback function is called 
	instead of displaying the attribute value (default behavior).
	Callback takes 2 parameters: the attribute value, and the attribute value's index 
	Callback returns the html code to be displayed
	IMPORTANT: attribute name *must be lowercased*
*/

$attributesPluginsMap = array(
	"objectclass" => "objectclassLink",
	"member" => "DNLink",
	"uniquemember" => "DNLink",
	"aci" => "aciInfo",
	"mail" => "mailtoLink",
	"memberuid" => "uidLookup",
	"userpassword" => "passwordChangeBox",
	"jpegphoto" => "binaryDataNotDisplayed",
	"photo" => "binaryDataNotDisplayed",
	"cnetphoto" => "showImage",
	"javaserializeddata" => "binaryDataNotDisplayed",
	"javaclassnames" => "javaDocLink",
//	"usercertificate"	 => "downloadButton",
//	"usercertificate;binary"	 => "downloadButton",
	"usercertificate;binary"	 => "binaryDataNotDisplayed",
	"jpegphoto"	 => "downloadButton",
	"postaladdress" => "formatPostalAddress",
	"ftapplicationrolesdn" => "DNLink",
	"ftprofiledn" => "DNLink",
	"ftisaleofficedn" => "DNLink",
);

/*
 whether to show hostname on the root node of the tree
*/
$config->showHostname = false;


?>
Return current item: LDAP Navigator