LDAP Account Manager

This file includes information about the Bitstream Vera font.

PDF

Roland Gruber

This file includes information about the Bitstream Vera font.

PDF

Roland Gruber

This file includes information about the Bitstream Vera font.

PDF

Roland Gruber

This file includes information about the Bitstream Vera font.

PDF

Roland Gruber

This file provides functions to load and save account profiles.

profiles

Roland Gruber

getAccountProfiles
\getAccountProfiles
Returns an array of string with all available profiles for the given account type

account type

string

server profile name

string

profile names

array
$scope
$profile
null
loadAccountProfile
\loadAccountProfile
Loads an profile of the given account type

name of the profile (without .<scope> extension)

string

account type

string

hash array (attribute => value)

array
$profile
$scope
saveAccountProfile
\saveAccountProfile
Saves an hash array (attribute => value) to an account profile
<p>file is created, if needed</p>

hash array (attribute => value)

array

name of the account profile (without .<scope> extension)

string

account type

string

true, if saving succeeded

boolean
$attributes
$profile
$scope
delAccountProfile
\delAccountProfile
Deletes an account profile

name of profile (Without .<scope> extension)

string

account type

string

true if profile was deleted

boolean
$file
$scope
copyAccountProfiles
\copyAccountProfiles
Copies account profiles to other server profiles.

account profile names

array

account scope

String

destinations

array

operation succeeded

boolean
$accountProfiles
$scope
$dests
array()
ldap.inc provides basic functions to connect to the OpenLDAP server.

LDAP

Roland Gruber

config.inc
Access to configuration data
convertHex2bin
\convertHex2bin
Converts a HEX string to a binary value

HEX string

string

result binary

\binary
$value
Ldap
\Ldap
Ldap manages connection to LDAP and includes several helper functions.

LDAP

$conf Object of Config to access preferences $server Server handle $is_connected false LDAP connection established $username LDAP username used for bind $password LDAP password used for bind $rand Random number (changes on every page request) __construct __construct Creates a new LDAP object. `object` $config connect connect Connects to the server using the given username and password `string` `string` `boolean` `mixed` $user $passwd $allowAnonymous false close close Closes connection to server server server Returns the LDAP connection handle `object` __sleep __sleep Closes connection to LDAP server before serialization __wakeup __wakeup Reconnects to LDAP server when deserialized new_rand new_rand Calculates a new value for rand `int` encrypt encrypt Encrypts a string `string` `string` `object` $data $prefix '' decrypt decrypt Decrypts a string `object` `string` `string` $data $prefix '' encrypt_login encrypt_login Encrypts username and password `string` `string` $username $password decrypt_login decrypt_login Decrypts username and password `array` destroy destroy Closes connection to LDAP server and deletes encrypted username/password
This file includes the server information tool specification.

Roland Gruber

tools

\LAMTool
toolServerInformation
\toolServerInformation
Server information

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
This file includes the file upload tool specification.

Roland Gruber

tools

\LAMTool
toolFileUpload
\toolFileUpload
File upload

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
This file includes the PDF editor tool specification.

Roland Gruber

tools

\LAMTool
toolPDFEditor
\toolPDFEditor
PDF editor

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
This file includes the OU editor tool specification.

Roland Gruber

tools

\LAMTool
toolOUEditor
\toolOUEditor
OU editor

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
This file includes the profile editor tool specification.

Roland Gruber

tools

\LAMTool
toolProfileEditor
\toolProfileEditor
Profile editor

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
This file includes the test tool specification.

Roland Gruber

tools

\LAMTool
toolTests
\toolTests
Tests page

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
This file includes the schema browser tool specification.

Roland Gruber

tools

\LAMTool
toolSchemaBrowser
\toolSchemaBrowser
Schema browser

tools

getName
getName
Returns the name of the tool.

name

string
getDescription
getDescription
returns a description text for the tool.

description

string
getLink
getLink
Returns a link to the tool page (relative to templates/).

link

string
getRequiresWriteAccess
getRequiresWriteAccess
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
getRequiresPasswordChangeRights
Returns if the tool requires password change rights.

true if password change rights are needed

boolean
getImageLink
getImageLink
Returns the link to the tool image (relative to graphics/)

image URL

string
getPosition
getPosition
Returns the prefered position of this tool on the tools page.
<p>The position may be between 0 and 1000. 0 is the top position.</p>

prefered position

int
getSubTools
getSubTools
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
isVisible
Returns if the tool is visible in the menu.

visible

boolean
isHideable
isHideable
Returns if a tool may be hidden by configuration in the LAM server profile.

hideable

boolean
The account type for Asterisk extensions.

types

Pozdnyak Pavel

Roland Gruber

\baseType
asteriskExt
\asteriskExt
The account type for Asterisk extensions.

types

__construct
__construct
Constructs a new domain type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamAsteriskExtList
\lamAsteriskExtList
Generates the list view.

lists

Pozdnyak Pavel

__construct
__construct
Constructor

account type

string

list object

\lamList
$type
listGetParams
listGetParams
Forces the list view to show only specific attributes.

\global\lamList::listGetParams()

listRefreshData
listRefreshData
Groups the extensions.
<p>(non-PHPdoc)</p>

\global\lamList::listRefreshData()

normalizeLdapOutput
normalizeLdapOutput
Groups the extensions.

extension entries

array
$entries
The account type for mail aliases.

types

Roland Gruber

\baseType
mailAlias
\mailAlias
The account type for mail aliases.

types

__construct
__construct
Constructs a new alias type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamMailAliasList
\lamMailAliasList
Generates the list view.

lists

Roland Gruber

__construct
__construct
Constructor

account type

string

list object

\lamList
$type
The account type for host accounts (e.g.
<p>Samba).</p>

types

Roland Gruber

\baseType
host
\host
The account type for host accounts (e.g.
<p>Samba).</p>

types

__construct
__construct
Constructs a new host type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
getTitleBarSubtitle
getTitleBarSubtitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamHostList
\lamHostList
Generates the list view.

lists

Roland Gruber

__construct
__construct
Constructor

account type

string

list object

\lamList
$type
The account type for Samba domains.

types

Roland Gruber

\baseType
smbDomain
\smbDomain
The account type for Samba domains.

types

__construct
__construct
Constructs a new domain type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
getTitleBarSubtitle
getTitleBarSubtitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamSmbDomainList
\lamSmbDomainList
Generates the list view.

lists

Roland Gruber

__construct
__construct
Constructor

account type

string

list object

\lamList
$type
The account type for group accounts (e.g.
<p>Unix and Samba).</p>

types

Roland Gruber

Ludek Finstrle

\baseType
group
\group
The account type for group accounts (e.g.
<p>Unix and Samba).</p>

types

__construct
__construct
Constructs a new group type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
getTitleBarSubtitle
getTitleBarSubtitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamGroupList
\lamGroupList
Generates the list view.

lists

Roland Gruber

TRANS_PRIMARY_OPTION_NAME
TRANS_PRIMARY_OPTION_NAME
"LG_TP"
ID for config option
$use_primary false Controls if include primary group members into group memebers $primary_hash array() Primary group members hash $refresh_primary false Controls if primary group members needs refresh $include_primary false specifies if primary group members are visible __construct __construct Constructor `string` `\lamList` $type listGetParams listGetParams Sets some internal parameters. listPrintTableCellContent listPrintTableCellContent Prints the content of a cell in the account list for a given LDAP entry and attribute. `array` `string` $entry $attribute listRefreshData listRefreshData Rereads the entries from LDAP. groupRefreshPrimary groupRefreshPrimary Refreshes the primary group members list. listGetAllConfigOptions listGetAllConfigOptions Returns a list of possible configuration options. `array` listConfigurationChanged listConfigurationChanged Called when the configuration options changed.
The account type for user accounts (e.g.
<p>Unix, Samba and Kolab).</p>

types

Roland Gruber

\baseType
user
\user
The account type for user accounts (e.g.
<p>Unix, Samba and Kolab).</p>

types

__construct
__construct
Constructs a new user type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
getTitleBarSubtitle
getTitleBarSubtitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
buildAccountStatusIcon
buildAccountStatusIcon
Builds the HTML code for the icon that shows the account status (locked/unlocked).

account container

\accountContainer

HTML code for icon

String
$container
buildAccountStatusDialogDiv
buildAccountStatusDialogDiv
Builds the dialog to (un)lock parts of an account.

Unix part is active

boolean

Unix part is locked

boolean

Samba part is active

boolean

Samba part is locked

boolean

PPolicy part is active

boolean

PPolicy part is locked

boolean

Windows part is active

boolean

Windows part is locked

boolean
$unixAvailable
$unixLocked
$sambaAvailable
$sambaLocked
$ppolicyAvailable
$ppolicyLocked
$windowsAvailable
$windowsLocked
runEditPagePostAction
runEditPagePostAction
This function is called after the edit page is processed and before the page content is generated.
<p>This can be used to run custom handlers after each page processing.</p>

account container

\accountContainer
$container
\lamList
lamUserList
\lamUserList
Generates the list view.

lists

Roland Gruber

TRANS_PRIMARY_OPTION_NAME
TRANS_PRIMARY_OPTION_NAME
"LU_TP"
ID for config option to translate primary group GIDs to group names
ACCOUNT_STATUS_OPTION_NAME
ACCOUNT_STATUS_OPTION_NAME
"LU_AS"
ID for config option to show account status
ATTR_ACCOUNT_STATUS
ATTR_ACCOUNT_STATUS
'lam_virtual_account_status'
virtual attribute name for account status column
$trans_primary false Controls if GID number is translated to group name $showAccountStatus false Controls if the account status is shown $trans_primary_hash array() translates GID to group name __construct __construct Constructor `string` `\lamList` $type listGetParams listGetParams Sets some internal parameters. listRefreshData listRefreshData Rereads the entries from LDAP. refreshPrimaryGroupTranslation refreshPrimaryGroupTranslation Refreshes the GID to group name cache. listPrintTableCellContent listPrintTableCellContent Prints the content of a cell in the account list for a given LDAP entry and attribute. `array` `string` $entry $attribute getAdditionalTools getAdditionalTools Returns a list of lamListTool objects to display next to the edit/delete buttons. `\lamListTool[]` listGetAllConfigOptions listGetAllConfigOptions Returns a list of possible configuration options. `array` listConfigurationChanged listConfigurationChanged Called when the configuration options changed. listGetAttributeDescriptionList listGetAttributeDescriptionList Returns an hash array containing with all attributes to be shown and their descriptions. <p><br>Format: array(attribute => description) <br> <br>The user list may display an additional account status column</p> `array` canBeFiltered canBeFiltered Returns if the given attribute can be filtered. <p>If filtering is not possible then no filter box will be displayed. <br> <br>The user list allows no filtering for account status.</p> `String` `boolean` $attr getAdditionalLDAPAttributesToRead getAdditionalLDAPAttributesToRead Returns a list of additional LDAP attributes that should be read. <p>This can be used to show additional data even if the user selected other attributes to show in the list. <br> <br>The user list reads pwdAccountLockedTime, sambaAcctFlags and userPassword</p> `array` injectAccountStatusAttribute injectAccountStatusAttribute Injects values for the virtual account status attribute to make it sortable. printAccountStatus printAccountStatus Prints the account status. `array` $attrs isUnixAvailable isUnixAvailable Returns if the Unix part exists. `array` `boolean` $attrs isUnixLocked isUnixLocked Returns if the Unix part is locked. `array` `boolean` $attrs isSambaAvailable isSambaAvailable Returns if the Samba part exists. `array` `boolean` $attrs isSambaLocked isSambaLocked Returns if the Samba part is locked. `array` `boolean` $attrs isPPolicyAvailable isPPolicyAvailable Returns if the PPolicy part exists. `array` `boolean` $attrs isPPolicyLocked isPPolicyLocked Returns if the PPolicy part is locked. `array` `boolean` $attrs isWindowsAvailable isWindowsAvailable Returns if the Windows part exists. `array` `boolean` $attrs isWindowsLocked isWindowsLocked Returns if the Windows part is locked. `array` `boolean` $attrs
The account type for DHCP

types

Thomas Manninger

\baseType
dhcp
\dhcp
The account type for DHCP

types

__construct
__construct
Constructs a new DHCP type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
getTitleBarSubtitle
getTitleBarSubtitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamDHCPList
\lamDHCPList
Generates the list view.

lists

Thomas Manninger

__construct
__construct
Constructor

account type

string

list object

\lamList
$type
listPrintTableCellContent
listPrintTableCellContent
Prints the content of a cell in the account list for a given LDAP entry and attribute.

LDAP attributes

array

attribute name

string
$entry
$attribute
addExtraInputElementsToTopArea
addExtraInputElementsToTopArea
Add DCP main settings button.

left part

\htmlGroup

right part

\htmlGroup
$left
$right
listDoPost
listDoPost
Manages all POST actions (e.g.
<p>button pressed) for the account lists.</p>

HTML fragment to insert into beginning of account list

String
The account type for NIS netgroups.

types

Roland Gruber

\baseType
netgroup
\netgroup
The account type for NIS netgroups.

types

__construct
__construct
Constructs a new group type object.
getAlias
getAlias
Returns the alias name of this account type.

alias name

string
getDescription
getDescription
Returns the description of this account type.

description

string
getListClassName
getListClassName
Returns the class name for the list object.

class name

string
getDefaultListAttributes
getDefaultListAttributes
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

list of descriptions

array
getTitleBarTitle
getTitleBarTitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
getTitleBarSubtitle
getTitleBarSubtitle
Returns the the title text for the title bar on the new/edit page.

account container

\accountContainer

title text

String
$container
\lamList
lamNetgroupList
\lamNetgroupList
Generates the list view.

lists

Roland Gruber

__construct
__construct
Constructor

account type

string

list object

\lamList
$type
This provides several helper function for the account modules.

Tilo Lutz

Roland Gruber

lib

createntlm.inc
createntlm.inc
array_delete
\array_delete
This function will return all values from $array without values of $values.

list of values which should be removed

array

list of original values

array

list of remaining values

array
$values
$array
in_array_ignore_case
\in_array_ignore_case
Checks if a string exists in an array, ignoring case.

search string

String

array

array
$needle
$haystack
getdays
\getdays
This function will return the days from 1.1.1970 until now.

of days

\number
smbflag
\smbflag
Takes a list of Samba flags and creates the corresponding flag string.

is an array of Samba flags (e.g. X or D)

array

Samba flag string

string
$input
lmPassword
\lmPassword
Generates the LM hash of a password.

password original password

string

password hash

string
$password
ntPassword
\ntPassword
Generates the NT hash of a password.

password original password

string

password hash

string
$password
pwd_hash
\pwd_hash
Returns the hash value of a plain text password.

\global\getSupportedHashTypes()

the password string

string

marks the hash as enabled/disabled (e.g. by prefixing "!")

boolean

password hash type (CRYPT, CRYPT-SHA512, SHA, SSHA, MD5, SMD5, PLAIN)

string

the password hash

string
$password
$enabled
true
$hashType
'SSHA'
getSupportedHashTypes
\getSupportedHashTypes
Returns the list of supported hash types (e.g.
<p>SSHA).</p>

hash types

array
generateSalt
\generateSalt
Calculates a password salt of the given legth.

salt length

int

the salt string

String
$len
pwd_enable
\pwd_enable
Marks an password hash as enabled and returns the new hash string

hash value to enable

string

enabled password hash

string
$hash
pwd_disable
\pwd_disable
Marks an password hash as disabled and returns the new hash string

hash value to disable

string

disabled hash value

string
$hash
pwd_is_lockable
\pwd_is_lockable
Checks if a Unix password can be locked.
<p>This checks if the password is not plain text but e.g. contains {SSHA}.</p>

password value

String

can be locked

boolean
$password
pwd_is_enabled
\pwd_is_enabled
Checks if a password hash is enabled/disabled

password hash to check

string

true if the password is marked as enabled

boolean
$hash
generateRandomPassword
\generateRandomPassword
Generates a random password with 12 digits.

password

String
search_domains
\search_domains
Returns an array with all Samba 3 domain entries under the given suffix

LDAP handle (if null then $_SESSION['ldap']->server() is used)

\handle

LDAP suffix to search (if null then $_SESSION['config']->get_Suffix('smbDomain') is used)

String

list of samba3domain objects

array
$server
null
$suffix
null
get_preg
\get_preg
Checks if a given value matches the selected regular expression.

value to check

string

pattern name

string

true if matches, otherwise false

boolean
$argument
$regexp
escapeDN
\escapeDN
Escapes any special characters in an LDAP DN.

DN

String

escaped DN

String
$dn
searchLDAPByAttribute
\searchLDAPByAttribute
This will search the given LDAP suffix for all entries which have the given attribute.

attribute name (may be null)

String

attribute value

String

object class (may be null)

String

list of attributes to return

array

account types

array

list of found entries

array
$name
$value
$objectClass
$attributes
$scopes
searchLDAPByFilter
\searchLDAPByFilter
This will search the given LDAP suffix for all entries which match the given filter.
String

list of attributes to return

array

account types

array

get only attributes but no values (default: false)

boolean

list of found entries

array
$filter
$attributes
$scopes
$attrsOnly
false
searchLDAP
\searchLDAP
Runs an LDAP search.

LDAP suffix

String

filter

String

list of attributes to return

array

list of found entries

array
$suffix
$filter
$attributes
ldapGetDN
\ldapGetDN
Returns the given DN.

DN

String

list of attributes to fetch

array

LDAP handle (optional for admin interface pages)

\handle

attributes or null if not found

array
$dn
$attributes
array('dn')
$handle
null
getLastLDAPError
\getLastLDAPError
Returns the parameters for a StatusMessage of the last LDAP search.

parameters for StatusMessage or null if all was ok

array
cleanLDAPResult
\cleanLDAPResult
Cleans the result of an LDAP search.
<p>This will remove all 'count' entries and also all numeric array keys.</p>

LDAP entries in format $entries[entry number][attribute name][attribute values]

array
$entries
getAbstractDN
\getAbstractDN
Transforms a DN into a more user friendly format.
<p>E.g. "dc=company,dc=de" is transformed to "company > de".</p>

DN

String

transformed DN

String
$dn
compareDN
\compareDN
Helper function to sort DNs.

first argument to compare

string

second argument to compare

string

0 if equal, 1 if $a is greater, -1 if $b is greater

integer
$a
$b
formatLDAPTimestamp
\formatLDAPTimestamp
Formats an LDAP time string (e.g.
<p>from createTimestamp).</p>

LDAP time value

String

formated time

String
$time
obfuscateText
\obfuscateText
Simple function to obfuscate strings.

text to obfuscate

String
$text
deobfuscateText
\deobfuscateText
Simple function to deobfuscate strings.

text to deobfuscate

String
$text
isObfuscatedText
\isObfuscatedText
Checks if the given text is obfuscated.

text to check

String

obfuscated or not

boolean
$text
extractRDNAttribute
\extractRDNAttribute
Extracts the RDN attribute name from a given DN.

DN

String

RDN attribute name

String
$dn
extractRDNValue
\extractRDNValue
Extracts the RDN attribute value from a given DN.

DN

String

RDN attribute value

String
$dn
extractDNSuffix
\extractDNSuffix
Extracts the DN suffix from a given DN.
<p>E.g. ou=people,dc=test,dc=com will result in dc=test,dc=com.</p>

DN

String

DN suffix

String
$dn
sendPasswordMail
\sendPasswordMail
Sends the password mail.

new password

String

LDAP attributes of user

array

recipient address (optional, $user['mail'][0] used by default)

String

list of arrays that can be used to create status messages

array
$pwd
$user
$recipient
null
samba3domain
\samba3domain
Represents a Samba 3 domain entry

modules

$dn DN $name Domain name $SID Domain SID $nextRID Next RID $nextUserRID Next user RID $nextGroupRID Next group RID $RIDbase 1000 RID base to calculate RIDs, default 1000 $minPwdAge seconds after the password can be changed $maxPwdAge seconds after the password must be changed
moduleCache
\moduleCache
Caches module objects.
<p>This improves performance if the same module does not need to be created multiple times (calling get_metaData() each time).</p>

Roland Gruber

$cache array() module cache ("name:scope" => module) getModule getModule Returns a new/cached module with the given name and scope. `String` `String` $name $scope
Interface between modules and other parts of LAM.

metaHTML

Roland Gruber

htmlElement
\htmlElement
Represents a HTML element.
<p>This is used to build HTML code by using objects.</p>

metaHTML

ALIGN_TOP
ALIGN_TOP
0
align to top
ALIGN_LEFT
ALIGN_LEFT
1
align to left
ALIGN_RIGHT
ALIGN_RIGHT
2
align to right
ALIGN_BOTTOM
ALIGN_BOTTOM
3
align to bottom
ALIGN_CENTER
ALIGN_CENTER
4
align to center
VALIDATE_NUMERIC
VALIDATE_NUMERIC
'numeric'
validation rule to allow only numbers ([0-9]+)
$alignment null alignment when inside a table $colspan null colspan if inside a table $rowspan null rowspan if inside a table $cssClasses array() CSS classes $tableCellCssClasses array() table cell CSS classes generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope getAlignmentString getAlignmentString Returns the HTML attributes for the alignment. `String` getColspanString getColspanString Returns the HTML attribute for the colspan. `String` getRowspanString getRowspanString Returns the HTML attribute for the rowspan. `String` setCSSClasses setCSSClasses Adds CSS classes to this element. `array` $classes setTableCellCSSClasses setTableCellCSSClasses Adds CSS classes to the surrounding table cell for this element. `array` $classes getTableCellCSSClasses getTableCellCSSClasses Returns the CSS classes of the surrounding table cell for this element. `array`
\htmlElement
htmlTable
\htmlTable
Structures elements using a table.

metaHTML

footer
footer
"</table>\n"
table footer
newLine
newLine
"</tr><tr>\n"
new line
$elements array() list of subelements $rowOpen false specifies if currently a row is open $width null table width __construct __construct Constructor `String` `` $width null addElement addElement Adds an element to the table. <p>The element may be a htmlElement object or a simple String.</p> `mixed` `boolean` `boolean` $element $newLine false $isTableHeadElement false addNewLine addNewLine Adds another line to the table. generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope mergeTableElements mergeTableElements Merges the content of another htmlTable object into this table. `\$table` $table
\htmlElement
htmlTableRow
\htmlTableRow
A row inside a htmlTable.

\global\htmlTable

metaHTML

$cells table cells __construct __construct Constructor `array` `` $cells generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlInputField
\htmlInputField
A standard input field.

metaHTML

$fieldName unique field name $fieldValue field value $fieldSize 30 field size (default 30) $fieldMaxLength 255 field max length (default 255) $onKeyPress null on keypress event $isPassword false password field $isEnabled true enabled or disabled $obfuscate false indicates that the value should be saved in obfuscated form $transient false indicates that this field should not automatically be saved in the self service or server profile $required false required field $validationRule null validation rule $autocomplete false enable autocomplete $autocompleteMultiValue false multiple values in one field $autocompleteMultiValueSeparatorExp null separator expression for multiple values in one field $autocompleteMultiValueSeparator null separator for multiple values in one field $autocompleteValues array() autocompletion suggestions $autocompleteMinLength 1 autocomplete start at this input length $showCalendar false show calendar $calendarFormat '' calendar format __construct __construct Constructor `String` `String` `String` $fieldName $fieldValue null $fieldSize null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setFieldMaxLength setFieldMaxLength Sets the maximum field length. `int` $fieldMaxLength setFieldSize setFieldSize Sets the field size. `int` $fieldSize setIsPassword setIsPassword Specifies if this is a password field. `boolean` $isPassword setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled setObfuscate setObfuscate Specifies if the value should be saved in obfuscated form (e.g. <p>self service profile).</p> `boolean` $obfuscate setTransient setTransient Specifies that the value should not be automatically saved when used in self service or server profile (default: false). `boolean` $transient setRequired setRequired Specifies if the input field is required. `boolean` $required setValidationRule setValidationRule Specifies the validation rule (e.g. <p>htmlElement::VALIDATE_NUMERIC) for this field. This rule is checked on client side when the input field looses focus.</p> `boolean` $rule enableAutocompletion enableAutocompletion Enables autocompletion for this input field. `array` `int` `boolean` `String` `String` $values $minLength 1 $multiValue false $multiSeparatorExp ',\s*' $multiSeparator ', ' setOnKeyPress setOnKeyPress Sets the JavaScript for the onKeyPress event. `String` $onKeyPress showCalendar showCalendar Shows a calendar when the field is selected. `String` $format
\htmlInputField
htmlTableExtendedInputField
\htmlTableExtendedInputField
An extended input field that combines label, input field and help.

metaHTML

$label Descriptive label $helpID help ID __construct __construct Constructor `String` `String` `String` `String` $label $fieldName $fieldValue null $helpID null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlHelpLink
\htmlHelpLink
Renders a help link.

metaHTML

$helpID help ID $module module name if it should be forced $scope account type if it should be forced __construct __construct Constructor `String` `String` `String` $helpID $module null $scope null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlButton
\htmlButton
Simple button.

metaHTML

$name button name $value button text or image $isImageButton image button or text button $title null title $isEnabled true enabled or disabled $iconClass null icon class (CSS) for buttons with icon + text $onClick null onclick event __construct __construct Constructor. `String` `String` `String` $name $value $isImageButton false generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setTitle setTitle Sets the button title (tooltip). `String` $title setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled setIconClass setIconClass Sets an additional icon for a text button. <p>The icon class is a CSS class that specifies the icon image (e.g. "deleteButton" in layout.css).</p> `String` $iconClass setOnClick setOnClick Sets the onclick event code. <p>This makes this button a simple button that does not submit a form.</p> `String` $onClick
\htmlButton
htmlAccountPageButton
\htmlAccountPageButton
Prints a button for the account pages.

metaHTML

__construct
__construct
Constructor

module name which renders next page

String

name of next page

String

identifier for button

String

button text or image (16x16px, relative to graphics folder)

String

image or text button (default text)

String
$targetModule
$targetPage
$identifier
$value
$isImageButton
false
\htmlElement
htmlSelect
\htmlSelect
Represents a select box.

metaHTML

$name name of select field $size size $multiSelect false allows multi-selection $elements elements $selectedElements array() selected elements $hasDescriptiveElements false descriptive elements $containsOptgroups false contains optgroups $sortElements true sorting enabled $rightToLeftTextDirection false right to left text direction $isEnabled true enabled or disabled $width '' width of input element $transformSingleSelect true transform select boxes with one element to text $onchangeEvent null onchange event $transient false indicates that this field should not automatically be saved in the self service or server profile $tableRowsToHide array() list of enclosing table rows to hide when checked $tableRowsToShow array() list of enclosing table rows to show when checked __construct __construct Constructor. <p><br>Examples: <br> <br>$select = new htmlSelect('myName', array('value1', 'value2'), array('value1')); <br> <br>$select = new htmlSelect('myName', array('label1' => 'value1', 'label2' => 'value2'), array('value1')); <br>$select->setHasDescriptiveElements(true); <br> <br>$select = new htmlSelect('myName', array('optgroupLabel' => array('value1', 'value2')), array('value1')); <br>$select->setHasDescriptiveElements(true); <br>$select->setContainsOptgroups(true);</p> `String` `array` `array` `int` $name $elements $selectedElements array() $size 1 generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope printOptionsHTML printOptionsHTML Prints the HTML code of the option tags. `array` $elements setHasDescriptiveElements setHasDescriptiveElements Specifies if the elements are just a simple list or an assoziative array (default: simple list). `boolean` $hasDescriptiveElements setContainsOptgroups setContainsOptgroups Specifies if the elements are divided into optgroups. `boolean` $containsOptgroups setMultiSelect setMultiSelect Specifies if multi-selection is enabled (default: disabled). `boolean` $multiSelect setSortElements setSortElements Specifies if the elemets should be sorted (default: sort). `boolean` $sortElements setRightToLeftTextDirection setRightToLeftTextDirection Specifies if the text direction should be set to right to left. `boolean` $rightToLeftTextDirection setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled setWidth setWidth Specifies the width of this selection box. `String` $width setTransformSingleSelect setTransformSingleSelect Specifies if select boxes that contain only a single element should be transformed to a simple text field. `boolean` $transformSingleSelect setOnchangeEvent setOnchangeEvent Sets the JavaScript code for the onchange event. `String` $onchangeEvent setTransient setTransient Specifies that the value should not be automatically saved when used in self service or server profile (default: false). `boolean` $transient setTableRowsToHide setTableRowsToHide This will hide the given table rows when the select is changed to the specified value. <p>The given IDs can be of any e.g. input element. Starting from this element the first parent "<tr>" element will be used to show/hide. <br> <br> <br>Example: <tr><td><input type="checkbox" id="mycheckbox"></td></tr> <br> Using "mycheckbox" will use this "tr" to hide/show. <br> <br> Example for $tableRowsToHide: <br> array('yes' => array('option1', 'option2'), 'no' => array('option3'))</p> `array` $tableRowsToHide setTableRowsToShow setTableRowsToShow This will show the given table rows when the select is changed to the specified value. <p>The given IDs can be of any e.g. input element. Starting from this element the first parent "<tr>" element will be used to show/hide. <br> <br> <br>Example: <tr><td><input type="checkbox" id="mycheckbox"></td></tr> <br> Using "mycheckbox" will use this "tr" to hide/show. <br> <br> Example for $tableRowsToShow: <br> array('yes' => array('option1', 'option2'), 'no' => array('option3'))</p> `array` $tableRowsToShow printCodeForShowHideTableRows printCodeForShowHideTableRows Creates the JavaScript code to hide/show table rows based on the select value. `String` $onChange
\htmlSelect
htmlTableExtendedSelect
\htmlTableExtendedSelect
Select with label and help link.

metaHTML

$label descriptive label $helpID help ID __construct __construct Constructor. `String` `array` `array` `String` `String` `int` $name $elements $selectedElements $label $helpID null $size 1 generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlRadio
\htmlRadio
Represents a radio selection.

metaHTML

$name name of select field $elements elements $selectedElement null selected element $isEnabled true enabled or disabled $onchangeEvent null on change code __construct __construct Constructor. <p><br>Examples: <br> <br>$radio = new htmlRadio('myName', array('label1' => 'value1', 'label2' => 'value2'), array('value1'));</p> `String` `array` `String` $name $elements $selectedElement null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled setOnchangeEvent setOnchangeEvent Sets the JavaScript code for the onchange event. `String` $onchangeEvent
\htmlRadio
htmlTableExtendedRadio
\htmlTableExtendedRadio
Radio list with descriptive label and help link.

metaHTML

$label descriptive label $helpID help ID __construct __construct Constructor. `String` `String` `array` `String` `String` $label $name $elements $selectedElement null $helpID null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlOutputText
\htmlOutputText
Prints the text and escapes contained HTML code by default.

metaHTML

$string the text to print $escapeHTML specifies if HTML code should be escaped $isBold false bold text $markAsRequired false mark as required $noWrap false no wrap __construct __construct Constructor. `String` `boolean` $string $escapeHTML true generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setIsBold setIsBold Specifies if the whole text should be printed in bold. `boolean` $isBold setMarkAsRequired setMarkAsRequired Adds a marker that indicates a required field. `boolean` $markAsRequired setNoWrap setNoWrap Specifies if word wrap is allowed for this text. `boolean` $noWrap
\htmlElement
htmlInputCheckbox
\htmlInputCheckbox
Prints the HTML code for a checkbox.

metaHTML

$name unique name of input element $checked value $isEnabled true enabled or disabled $tableRowsToHide array() list of enclosing table rows to hide when checked $tableRowsToShow array() list of enclosing table rows to show when checked $transient false indicates that this field should not automatically be saved in the self service or server profile __construct __construct Constructor. `String` `boolean` $name $checked generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled setTableRowsToHide setTableRowsToHide This will hide the given table rows when the checkbox is checked. <p>The given IDs can be of any e.g. input element. Starting from this element the first parent "<tr>" element will be used to show/hide. <br> <br> <br>Example: <tr><td><input type="checkbox" id="mycheckbox"></td></tr> <br> Using "mycheckbox" will use this "tr" to hide/show.</p> `array` $tableRowsToHide setTableRowsToShow setTableRowsToShow This will show the given table rows when the checkbox is checked. <p>The given IDs can be of any e.g. input element. Starting from this element the first parent "<tr>" element will be used to show/hide. <br> <br> <br>Example: <tr><td><input type="checkbox" id="mycheckbox"></td></tr> <br> Using "mycheckbox" will use this "tr" to hide/show.</p> `array` $tableRowsToShow setTransient setTransient Specifies that the value should not be automatically saved when used in self service or server profile (default: false). `boolean` $transient
\htmlInputCheckbox
htmlTableExtendedInputCheckbox
\htmlTableExtendedInputCheckbox
Checkbox with descriptive label and help link.

metaHTML

$label descriptive label $helpID help ID $labelFirst specifies if label is printed before the checkbox __construct __construct Constructor. `String` `boolean` `String` `String` `boolean` $name $checked $label $helpID null $labelFirst true generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlInputFileUpload
\htmlInputFileUpload
Prints the HTML code for a file upload field.

metaHTML

$name unique name of input element $isEnabled true enabled or disabled __construct __construct Constructor. `String` $name generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled
\htmlInputFileUpload
htmlTableExtendedInputFileUpload
\htmlTableExtendedInputFileUpload
File upload with descriptive label and help link.

metaHTML

$label descriptive label $helpID help ID __construct __construct Constructor. `String` `String` `String` $name $label $helpID null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlInputTextarea
\htmlInputTextarea
Prints the HTML code for a textarea.

metaHTML

$name unique name of input element $value value $colCount column count $rowCount row count $isEnabled true enabled or disabled $richEdit false specifies if LAM should display this field whith a WYSIWYG editor __construct __construct Constructor. `String` `String` `int` `int` $name $value $colCount $rowCount generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setIsEnabled setIsEnabled Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled setIsRichEdit setIsRichEdit Specifies if the textarea should be displayed whith a WYSIWYG editor. <p><br>This requires that the page which displays the textarea also includes the ckeditor JS. <br>Rich editing is disabled by default.</p> `boolean` $richEdit
\htmlInputTextarea
htmlTableExtendedInputTextarea
\htmlTableExtendedInputTextarea
Text area with label and help link.

metaHTML

$label descriptive label $helpID help ID $required false required field __construct __construct Constructor. `String` `String` `int` `int` `String` `String` $name $value $colCount $rowCount $label $helpID null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setRequired setRequired Specifies if this input field must be filled. `boolean` $required
\htmlElement
htmlImage
\htmlImage
Prints the HTML code for an image.

metaHTML

$path path to image $width width $height height $alt alt text __construct __construct Constructor. `String` `int` `int` `String` $path $width null $height null $alt ' ' generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlSpacer
\htmlSpacer
Adds an empty space with given width and height.

metaHTML

$width width of spacer in px $height height of spacer in px __construct __construct Constructor. `String` `String` $width $height generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlStatusMessage
\htmlStatusMessage
Prints a status message (e.g.
<p>error message).</p>

metaHTML

$type message type (e.g. <p>ERROR)</p> $title message title $text message text $params message parameters __construct __construct Constructor. `String` `String` `String` `array` $type $title $text null $params null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlFieldset
\htmlFieldset
Generates a fieldset.

metaHTML

$content fieldset content $label null descriptive label $labelImage null label image __construct __construct Constructor. `\htmlElement` `String` `String` $content $label null $labelImage null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlTitle
\htmlTitle
Generates a title line.
<p>This is used for page titles.</p>

metaHTML

$label null descriptive label __construct __construct Constructor. `String` $label generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlSubTitle
\htmlSubTitle
Generates a subtitle line.
<p>This is used to group multiple fields.</p>

metaHTML

$label null descriptive label $image null optional image $id null optional ID for this element (e.g. <p>to use for JavaScript)</p> __construct __construct Constructor. `String` `String` `String` $label $image null $id null generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlHiddenInput
\htmlHiddenInput
Generates a hidden input field.

metaHTML

$name null field name $value null field value __construct __construct Constructor. `String` `String` $name $value generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlLink
\htmlLink
Generates a link.
<p>The link can include an optional image in front of the link text.</p>

metaHTML

$text null link text $target null link target $image null optional image $title null title $targetWindow null target window $onClick null onClick event $showAsButton false show as button __construct __construct Constructor. `String` `String` `String` `boolean` $text $target $image null $showAsButton false generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setTitle setTitle Sets the link title. `String` $title setTargetWindow setTargetWindow Sets the target window (e.g. <p>_blank).</p> `String` $window setOnClick setOnClick Sets the onClick event. `String` $event
\htmlElement
htmlGroup
\htmlGroup
Groups multiple htmlElements.
<p>This is useful if multiple elements should be included in a single table cell. The HTML code of the subelements is printed in the order they were added. No additional code is added.</p>

metaHTML

$subelements array() link text generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope addElement addElement Adds a subelement. `\htmlElement` $sub
\htmlElement
htmlHorizontalLine
\htmlHorizontalLine
Prints a horizontal line.

metaHTML

generateHTML
generateHTML
Prints the HTML code for this element.

Name of account module

string

List of meta-HTML elements

array

List of values which override the defaults in $input (name => value)

array

If true then no buttons will be displayed

boolean

Start value of tabulator index for input fields

integer

Account type

string

List of input field names and their type (name => type)

array
$module
$input
$values
$restricted
$tabindex
$scope
\htmlElement
htmlDiv
\htmlDiv
Creates a simple DIV element.

metaHTML

$id null unique ID $content null htmlElement that generates inner content __construct __construct Constructor. `String` `\htmlElement` `array` $id $content generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlJavaScript
\htmlJavaScript
Creates a JavaScript element.

metaHTML

$content null htmlElement that generates inner content __construct __construct Constructor. `String` $content generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlEqualWidth
\htmlEqualWidth
Sets all given elements to the same width.

metaHTML

$elements array() list of element IDs __construct __construct Constructor. `array` $elements generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlEqualHeight
\htmlEqualHeight
Sets all given elements to the same height.

metaHTML

$elements array() list of element IDs __construct __construct Constructor. `array` $elements generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
\htmlElement
htmlSortableList
\htmlSortableList
Creates a list of elements that can be sorted by the user via drag'n'drop.

metaHTML

$elements array() list of elements $id '' HTML ID $elementWidth '' element width $onUpdate null on update event __construct __construct Constructor. `array` `String` `String` $elements $id $elementWidth '250px' generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope setOnUpdate setOnUpdate Sets the JS code that is executed when the element order was changed. <p>The code can access the variables event and ui. See JQueryUI docs for details. ui.item.data('posOrig') will contain the original position of the moved element.</p> `String` $onUpdate
\htmlElement
htmlAccordion
\htmlAccordion
Creates a list of content elements in accordion style.
<p>HTML special characters must be escaped before providing to htmlAccordion.</p>
$id null $elements null $openInitial '1' $collapsible false __construct __construct Constructor. `String` `array` `String` `boolean` $id $elements $openInitial '0' $collapsible false generateHTML generateHTML Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module $input $values $restricted $tabindex $scope
Name of argument $multiSeparatorExp does not match with the DocBlock's name $multiSeparator in enableAutocompletion()
Parameter $classes could not be found in __construct()
No DocBlock was found for property $id
No DocBlock was found for property $elements
No DocBlock was found for property $openInitial
No DocBlock was found for property $collapsible
This file includes functions to upgrade the pdf/profiles configuration files.

main

Christian Kropp

Roland Gruber

testPermissions
\testPermissions
check the write/read permission for the upgrade

- permission messages

array
testPermissionRecursive
\testPermissionRecursive
Recursively checks the permissions in a directory.

directory

String

list of files/directories with wrong permission

array
$dir
containsFiles
\containsFiles
Checks if the given directory contains files.
<p>This is used to check if config files need to be migrated.</p>

directory path

String
$dir
upgradeConfigToServerProfileFolders
\upgradeConfigToServerProfileFolders
Saves an hash array (attribute => value) to an account profile

server profiles

array
$profiles
copyConfigTemplates
\copyConfigTemplates
Saves an hash array (attribute => value) to an account profile

server profiles

array
$profiles
recursiveCopy
\recursiveCopy
Copy a file or recursively copy a directory

- source path to file or directory

string

- destination path to file or directory

string

- server profiles (used to avoid copying of newly created folders)

array

copy only files that start with the given filter

string

overwrite existing files

boolean
$src
$dst
$profiles
$fileFilter
null
$overwrite
true
recursiveDelete
\recursiveDelete
Delete a file or recursively delete a directory

- path to file or directory

string

- server profiles (used to avoid copying of newly created folders)

array
$src
$profiles
This file includes functions to manage LAM tools.

tools

Roland Gruber

getTools
\getTools
Returns the tools which are available for LAM.

list of LAMtool classes

array
LAMTool \LAMTool Represents a tool. <p>LAM will scan lib/tools/*.inc for classes which implement this interface. This alows to dynamically plugin additional tools. There will be an entry on the tools page inside LAM for each found class (if it matches the security level). A LAMTool only specifies name, description and location of a tool. The tool functionality is provided by the tool's target page.</p> `` `` getName getName Returns the name of the tool. `string` getDescription getDescription returns a description text for the tool. `string` getLink getLink Returns a link to the tool page (relative to templates/). `string` getRequiresWriteAccess getRequiresWriteAccess Returns if the tool requires write access to LDAP. `boolean` getRequiresPasswordChangeRights getRequiresPasswordChangeRights Returns if the tool requires password change rights. `boolean` getImageLink getImageLink Returns the link to the tool image (relative to graphics/) `string` getPosition getPosition Returns the prefered position of this tool on the tools page. <p>The position may be between 0 and 1000. 0 is the top position.</p> `int` getSubTools getSubTools Returns a list of sub tools or an empty array. `array` isVisible isVisible Returns if the tool is visible in the menu. `boolean` isHideable isHideable Returns if a tool may be hidden by configuration in the LAM server profile. `boolean` LAMSubTool \LAMSubTool Represents a subtool. `` `` $name visible tool name $description tool description $link tool link (relative to templates/) $image image URL (relative to graphics/)
FPDF_VERSION
\FPDF_VERSION
'1.7'
FPDF
\FPDF
$page $n $offsets $buffer $pages $state $compress $k $DefOrientation $CurOrientation $StdPageSizes $DefPageSize $CurPageSize $PageSizes $wPt $hPt $w $h $lMargin $tMargin $rMargin $bMargin $cMargin $x $y $lasth $LineWidth $fontpath $CoreFonts $fonts $FontFiles $diffs $FontFamily $FontStyle $underline $CurrentFont $FontSizePt $FontSize $DrawColor $FillColor $TextColor $ColorFlag $ws $images $PageLinks $links $AutoPageBreak $PageBreakTrigger $InHeader $InFooter $ZoomMode $LayoutMode $title $subject $author $keywords $creator $AliasNbPages $PDFVersion FPDF FPDF $orientation 'P' $unit 'mm' $size 'A4' SetMargins SetMargins $left $top $right null SetLeftMargin SetLeftMargin $margin SetTopMargin SetTopMargin $margin SetRightMargin SetRightMargin $margin SetAutoPageBreak SetAutoPageBreak $auto $margin 0 SetDisplayMode SetDisplayMode $zoom $layout 'default' SetCompression SetCompression $compress SetTitle SetTitle $title $isUTF8 false SetSubject SetSubject $subject $isUTF8 false SetAuthor SetAuthor $author $isUTF8 false SetKeywords SetKeywords $keywords $isUTF8 false SetCreator SetCreator $creator $isUTF8 false AliasNbPages AliasNbPages $alias '{nb}' Error Error $msg Open Open Close Close AddPage AddPage $orientation '' $size '' Header Header Footer Footer PageNo PageNo SetDrawColor SetDrawColor $r $g null $b null SetFillColor SetFillColor $r $g null $b null SetTextColor SetTextColor $r $g null $b null GetStringWidth GetStringWidth $s SetLineWidth SetLineWidth $width Line Line $x1 $y1 $x2 $y2 Rect Rect $x $y $w $h $style '' AddFont AddFont $family $style '' $file '' SetFont SetFont $family $style '' $size 0 SetFontSize SetFontSize $size AddLink AddLink SetLink SetLink $link $y 0 $page -1 Link Link $x $y $w $h $link Text Text $x $y $txt AcceptPageBreak AcceptPageBreak Cell Cell $w $h 0 $txt '' $border 0 $ln 0 $align '' $fill false $link '' MultiCell MultiCell $w $h $txt $border 0 $align 'J' $fill false Write Write $h $txt $link '' Ln Ln $h null Image Image $file $x null $y null $w 0 $h 0 $type '' $link '' GetX GetX SetX SetX $x GetY GetY SetY SetY $y SetXY SetXY $x $y Output Output $name '' $dest '' _dochecks _dochecks _checkoutput _checkoutput _getpagesize _getpagesize $size _beginpage _beginpage $orientation $size _endpage _endpage _loadfont _loadfont $font _escape _escape $s _textstring _textstring $s _UTF8toUTF16 _UTF8toUTF16 $s _dounderline _dounderline $x $y $txt _parsejpg _parsejpg $file _parsepng _parsepng $file _parsepngstream _parsepngstream $f $file _readstream _readstream $f $n _readint _readint $f _parsegif _parsegif $file _newobj _newobj _putstream _putstream $s _out _out $s _putpages _putpages _putfonts _putfonts _putimages _putimages _putimage _putimage $info _putxobjectdict _putxobjectdict _putresourcedict _putresourcedict _putresources _putresources _putinfo _putinfo _putcatalog _putcatalog _putheader _putheader _puttrailer _puttrailer _enddoc _enddoc
No page-level DocBlock was found in file lib/fpdf.php
No DocBlock was found for \FPDF
No DocBlock was found for property $page
No DocBlock was found for property $n
No DocBlock was found for property $offsets
No DocBlock was found for property $buffer
No DocBlock was found for property $pages
No DocBlock was found for property $state
No DocBlock was found for property $compress
No DocBlock was found for property $k
No DocBlock was found for property $DefOrientation
No DocBlock was found for property $CurOrientation
No DocBlock was found for property $StdPageSizes
No DocBlock was found for property $DefPageSize
No DocBlock was found for property $CurPageSize
No DocBlock was found for property $PageSizes
No DocBlock was found for property $wPt
No DocBlock was found for property $hPt
No DocBlock was found for property $w
No DocBlock was found for property $h
No DocBlock was found for property $lMargin
No DocBlock was found for property $tMargin
No DocBlock was found for property $rMargin
No DocBlock was found for property $bMargin
No DocBlock was found for property $cMargin
No DocBlock was found for property $x
No DocBlock was found for property $y
No DocBlock was found for property $lasth
No DocBlock was found for property $LineWidth
No DocBlock was found for property $fontpath
No DocBlock was found for property $CoreFonts
No DocBlock was found for property $fonts
No DocBlock was found for property $FontFiles
No DocBlock was found for property $diffs
No DocBlock was found for property $FontFamily
No DocBlock was found for property $FontStyle
No DocBlock was found for property $underline
No DocBlock was found for property $CurrentFont
No DocBlock was found for property $FontSizePt
No DocBlock was found for property $FontSize
No DocBlock was found for property $DrawColor
No DocBlock was found for property $FillColor
No DocBlock was found for property $TextColor
No DocBlock was found for property $ColorFlag
No DocBlock was found for property $ws
No DocBlock was found for property $images
No DocBlock was found for property $PageLinks
No DocBlock was found for property $links
No DocBlock was found for property $AutoPageBreak
No DocBlock was found for property $PageBreakTrigger
No DocBlock was found for property $InHeader
No DocBlock was found for property $InFooter
No DocBlock was found for property $ZoomMode
No DocBlock was found for property $LayoutMode
No DocBlock was found for property $title
No DocBlock was found for property $subject
No DocBlock was found for property $author
No DocBlock was found for property $keywords
No DocBlock was found for property $creator
No DocBlock was found for property $AliasNbPages
No DocBlock was found for property $PDFVersion
No DocBlock was found for method FPDF()
No DocBlock was found for method SetMargins()
No DocBlock was found for method SetLeftMargin()
No DocBlock was found for method SetTopMargin()
No DocBlock was found for method SetRightMargin()
No DocBlock was found for method SetAutoPageBreak()
No DocBlock was found for method SetDisplayMode()
No DocBlock was found for method SetCompression()
No DocBlock was found for method SetTitle()
No DocBlock was found for method SetSubject()
No DocBlock was found for method SetAuthor()
No DocBlock was found for method SetKeywords()
No DocBlock was found for method SetCreator()
No DocBlock was found for method AliasNbPages()
No DocBlock was found for method Error()
No DocBlock was found for method Open()
No DocBlock was found for method Close()
No DocBlock was found for method AddPage()
No DocBlock was found for method Header()
No DocBlock was found for method Footer()
No DocBlock was found for method PageNo()
No DocBlock was found for method SetDrawColor()
No DocBlock was found for method SetFillColor()
No DocBlock was found for method SetTextColor()
No DocBlock was found for method GetStringWidth()
No DocBlock was found for method SetLineWidth()
No DocBlock was found for method Line()
No DocBlock was found for method Rect()
No DocBlock was found for method AddFont()
No DocBlock was found for method SetFont()
No DocBlock was found for method SetFontSize()
No DocBlock was found for method AddLink()
No DocBlock was found for method SetLink()
No DocBlock was found for method Link()
No DocBlock was found for method Text()
No DocBlock was found for method AcceptPageBreak()
No DocBlock was found for method Cell()
No DocBlock was found for method MultiCell()
No DocBlock was found for method Write()
No DocBlock was found for method Ln()
No DocBlock was found for method Image()
No DocBlock was found for method GetX()
No DocBlock was found for method SetX()
No DocBlock was found for method GetY()
No DocBlock was found for method SetY()
No DocBlock was found for method SetXY()
No DocBlock was found for method Output()
No DocBlock was found for method _dochecks()
No DocBlock was found for method _checkoutput()
No DocBlock was found for method _getpagesize()
No DocBlock was found for method _beginpage()
No DocBlock was found for method _endpage()
No DocBlock was found for method _loadfont()
No DocBlock was found for method _escape()
No DocBlock was found for method _textstring()
No DocBlock was found for method _UTF8toUTF16()
No DocBlock was found for method _dounderline()
No DocBlock was found for method _parsejpg()
No DocBlock was found for method _parsepng()
No DocBlock was found for method _parsepngstream()
No DocBlock was found for method _readstream()
No DocBlock was found for method _readint()
No DocBlock was found for method _parsegif()
No DocBlock was found for method _newobj()
No DocBlock was found for method _putstream()
No DocBlock was found for method _out()
No DocBlock was found for method _putpages()
No DocBlock was found for method _putfonts()
No DocBlock was found for method _putimages()
No DocBlock was found for method _putimage()
No DocBlock was found for method _putxobjectdict()
No DocBlock was found for method _putresourcedict()
No DocBlock was found for method _putresources()
No DocBlock was found for method _putinfo()
No DocBlock was found for method _putcatalog()
No DocBlock was found for method _putheader()
No DocBlock was found for method _puttrailer()
No DocBlock was found for method _enddoc()
This file is the interface to the different account types.

types

Roland Gruber

baseType.inc
parent class of account types
lists.inc
parent class of list views
selfService.inc
Used to check if this is a LAM Pro release.
getTypes
\getTypes
Returns a list of available account types.

list of types

array
getTypeAlias
\getTypeAlias
Returns the alias name of an account type.

type name

string

type alias

string
$type
getTypeDescription
\getTypeDescription
Returns the description of an account type.

type name

string

type description

string
$type
getListClassName
\getListClassName
Returns the class name for the list object.

account type

string

class name

string
$type
getDefaultListAttributes
\getDefaultListAttributes
Returns the default attribute list for an account type.
<p>It is used as default value for the configuration editor.</p>

account type

string

attribute list

string
$type
getListAttributeDescriptions
\getListAttributeDescriptions
Returns a list of attributes which have a translated description.
<p>This is used for the head row in the list view.</p>

account type

string

list of descriptions

array
$type
Interface between modules and self service pages.
<p>This file also includes the self service profile class and helper functions.</p>

selfService

Roland Gruber

modules.inc
modules
types.inc
account types
isLAMProVersion
\isLAMProVersion
Returns if this is a LAM Pro installation.

LAM Pro installation

boolean
getSelfServiceSearchAttributes
\getSelfServiceSearchAttributes
Returns a list of possible search attributes for the self service.

account type

string

attributes

array
$scope
getSelfServiceFieldSettings
\getSelfServiceFieldSettings
Returns the field settings for the self service.

account type

string

settings

array
$scope
getSelfServiceOptions
\getSelfServiceOptions
Returns meta HTML code for each self service field.

account type

string

input fields (array(<moduleName> => array(<field1>, <field2>, ...)))

array

LDAP attributes (attribute names in lower case)

array

indicates that the user is only allowed to change his password and no LDAP content is readable

boolean

list of read-only fields

array

meta HTML code (array(<moduleName> => htmlTableRow))

array
$scope
$fields
$attributes
$passwordChangeOnly
$readOnlyFields
checkSelfServiceOptions
\checkSelfServiceOptions
Checks if all input values are correct and returns the LDAP commands which should be executed.

account type

string

input fields (array(<moduleName> => array(<field1>, <field2>, ...)))

string

LDAP attributes

array

indicates that the user is only allowed to change his password and no LDAP content is readable

boolean

list of read-only fields

array

messages and LDAP commands (array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array()))

array
$scope
$fields
$attributes
$passwordChangeOnly
$readOnlyFields
getSelfServiceProfiles
\getSelfServiceProfiles
Returns a list of all available self service profiles (without .conf)

profile names (array(<account type> => array(<profile1>, <profile2>, ...)))

array
loadSelfServiceProfile
\loadSelfServiceProfile
Loads all settings of a self service profile.

profile name

string

account type

string

true if file was readable

\selfServiceProfile
$name
$scope
saveSelfServiceProfile
\saveSelfServiceProfile
Saves a self service profile.
<p>File is created, if needed</p>

name of the account profile

string

account type

string

self service profile

\selfServiceProfile

true, if saving succeeded

boolean
$name
$scope
$profile
isSelfServiceProfileWritable
\isSelfServiceProfileWritable
Checks if a service profile is writable.

profile name

string

account type

string

true if file is writable

boolean
$name
$scope
getSelfServiceSettings
\getSelfServiceSettings
Returns a hash array (module name => elements) of all module options for the configuration page.

account type

string

currently edited profile

\selfServiceProfile

configuration options

array
$scope
$profile
checkSelfServiceSettings
\checkSelfServiceSettings
Checks if the self service settings are valid

account type

string

hash array containing all options (name => array(...))

array

profile

\selfServiceProfile

list of error messages

array
$scope
$options
$profile
selfServiceProfile
\selfServiceProfile
Includes all settings of a self service profile.

selfService

$serverURL server address $useTLS use TLS $LDAPSuffix LDAP suffix $LDAPUser LDAP user DN $LDAPPassword LDAP password $searchAttribute LDAP search attribute $httpAuthentication HTTP authentication $pageHeader header for self service pages $additionalCSS list of additional CSS links (separated by \n) $loginCaption describing text for user login $loginAttributeText describing text for search attribute $mainPageText describing text for self service main page $inputFields input fields Format: array( <br> array(array('name' => <group name 1>, 'fields' => array(<field1>, <field2>))), <br> array(array('name' => <group name 2>, 'fields' => array(<field3>, <field4>))) <br> ) $readOnlyFields List of fields that are set in read-only mode. $moduleSettings configuration settings of modules __construct __construct Constructor `\selfServiceProfile`
LDAP Account Manager PDF printing library.
<p>It consists of lamPDF class, the createModulePDF() function that may be called by other pages and furthermore some helper functions.</p>

Michael Duergner

Roland Gruber

PDF

FPDF_FONTPATH
\FPDF_FONTPATH
dirname(__FILE__) . '/font/'
\UFPDF
lamPDF
\lamPDF
Creates a LAM information page in PDF format.

PDF

Michael Duergner

Roland Gruber

$page_definitions format settings for page layout $fontName current active font name $fontList array('BitstreamVeraSans-Roman' => array('vera.php', 'verab.php', 'verabi.php', 'verai.php')) list of supported fonts format: <font name> => array(<file for default font style>, <file for bold>, <italic>, <bold italic>) __construct __construct Creates a new lamPDF object. `array` `String` $page_definitions array() $fontName header header Creates the PDF page header. footer footer Creates the PDF page footer.
This file includes functions to manage the configuration files.

configuration

Roland Gruber

Thomas Manninger

status.inc
Used to print messages.
modules.inc
Used to get module information.
types.inc
Used to get type information.
setlanguage
\setlanguage
Sets language settings for automatic translation
checkChmod
\checkChmod
Checks whether a specific flag in the rights string is set.

read,write or execute

\$right

owner,group or other

\$target

the chmod rights

\$chmod

if the chmod $right for $target were set

\true,
$right
$target
$chmod
getConfigProfiles
\getConfigProfiles
Returns an array of string with all available configuration profiles (without .conf)

profile names

array
deleteConfigProfile
\deleteConfigProfile
Deletes the given server profile.

profile name

String

null if success or error message if failed

String
$name
LAMVersion
\LAMVersion
Returns the version number of this LAM installation.
<p>Format: <major version>.<minor version>.<patch level> <br> Major/minor version are always numbers, patch level may contain letters for inofficial releases only (e.g. 0.5.alpha1).</p>

version number

string
metaRefresh
\metaRefresh
Prints a meta refresh page

the URL of the target page

string
$page
isAccountTypeHidden
\isAccountTypeHidden
Checks if the given account type is hidden.

account type (e.g. user)

String

is hidden

boolean
$type
LAMConfig
\LAMConfig
This class manages .conf files.

configuration

ACCESS_ALL
ACCESS_ALL
100
ACCESS_PASSWORD_CHANGE
ACCESS_PASSWORD_CHANGE
20
ACCESS_READ_ONLY
ACCESS_READ_ONLY
0
SAVE_OK
SAVE_OK
0
SAVE_FAIL
SAVE_FAIL
1
LOGIN_LIST
LOGIN_LIST
'list'
LOGIN_SEARCH
LOGIN_SEARCH
'search'
LINE_SEPARATOR
LINE_SEPARATOR
'+::+'
line separator
$ServerURL Server address (e.g. <p>ldap://127.0.0.1:389)</p> $useTLS enables/disables TLS encryption $Admins Array of string: users with admin rights $Passwd Password to edit preferences $treesuffix LDAP suffix for tree view $defaultLanguage Default language $moduleSettings array() module settings $typeSettings array() type settings $toolSettings array() tool settings $scriptPath Path to external lamdaemon script on server where it is executed <p>This is used for managing quota and home directories. optional setting, may not be defined</p> $scriptRights '750' The rights for the home directory $scriptServer Servers where lamdaemon script is executed <p>This is used for managing quota and home directories. optional setting, may not be defined</p> $cachetimeout LDAP cache timeout $searchLimit 0 LDAP search limit $activeTypes "user,group,host,smbDomain" Active account types $file Name of configuration file $accessLevel \LAMconfig::ACCESS_ALL access level $loginMethod \LAMconfig::LOGIN_LIST login method $loginSearchSuffix 'dc=yourdomain,dc=org' search suffix for login $loginSearchFilter 'uid=%USER%' search filter for login $loginSearchDN '' bind user for login search $loginSearchPassword '' bind password for login search $httpAuthentication 'false' specifies if HTTP authentication should be used $lamProMailFrom '' email address for sender of password reset mails $lamProMailReplyTo '' reply-to email address for password reset mails $lamProMailSubject '' subject for password reset mails $lamProMailIsHTML 'false' treat password reset mail body as HTML $lamProMailText '' mail body for password reset mails $settings array("ServerURL", "useTLS", "Passwd", "Admins", "treesuffix", "defaultLanguage", "scriptPath", "scriptServer", "scriptRights", "cachetimeout", "modules", "activeTypes", "types", "tools", "accessLevel", 'loginMethod', 'loginSearchSuffix', 'loginSearchFilter', 'searchLimit', 'lamProMailFrom', 'lamProMailReplyTo', 'lamProMailSubject', 'lamProMailText', 'lamProMailIsHTML', 'httpAuthentication', 'loginSearchDN', 'loginSearchPassword') List of all settings in config file __construct __construct Loads preferences from config file `String` $file reload reload Reloads preferences from config file `boolean` save save Saves preferences to config file getName getName Returns the name of the config file `String` isWritable isWritable Returns if the file can be written on the filesystem. `boolean` getPath getPath Returns the path to the config file. `string` get_ServerURL get_ServerURL Returns the server address as string `string` set_ServerURL set_ServerURL Sets the server address `string` `boolean` $value getUseTLS getUseTLS Returns if TLS is activated. `String` setUseTLS setUseTLS Sets if TLS is activated. `String` `boolean` $useTLS get_Admins get_Admins Returns an array of string with all admin names `array` get_Adminstring get_Adminstring Returns all admin users seperated by semicolons `string` set_Adminstring set_Adminstring Sets the admin string `string` `boolean` $value check_Passwd check_Passwd Checks if the given password matches. `String` `boolean` $password set_Passwd set_Passwd Sets the preferences wizard password `string` `boolean` $value hashPassword hashPassword Returns the hashed password. `String` `String` `String` $password $salt get_Suffix get_Suffix Returns the LDAP suffix for the given account type `string` `string` $scope set_Suffix set_Suffix Sets the LDAP suffix where accounts are saved `string` `string` `boolean` $scope $value get_listAttributes get_listAttributes Returns the list of attributes to show in user list `string` `string` $scope set_listAttributes set_listAttributes Sets the list of attributes to show in user list `string` `string` `boolean` $value $scope get_defaultLanguage get_defaultLanguage Returns the default language string `string` set_defaultLanguage set_defaultLanguage Sets the default language string `string` `boolean` $value get_scriptPath get_scriptPath Returns the path to the external script `string` set_scriptPath set_scriptPath Sets the path to the external script `string` `boolean` $value get_scriptServers get_scriptServers Returns the servers of the external script as a Array `string` set_scriptServers set_scriptServers Sets the servers of the external script `string` `boolean` $value get_scriptRights get_scriptRights Returns the chmod value for new home directories. `string` set_scriptRights set_scriptRights Sets the rights for the home directory. `string` `boolean` $chmod get_cacheTimeout get_cacheTimeout Returns the LDAP cache timeout in minutes `integer` get_cacheTimeoutSec get_cacheTimeoutSec Returns the LDAP cache timeout in seconds `integer` set_cacheTimeout set_cacheTimeout Sets the LDAP cache timeout in minutes (0,1,2,5,10,15) `integer` `boolean` $value get_searchLimit get_searchLimit Returns the LDAP search limit. `integer` set_searchLimit set_searchLimit Sets the LDAP search limit. `integer` `boolean` $value get_AccountModules get_AccountModules Returns an array of all selected account modules `string` `array` $scope set_AccountModules set_AccountModules Sets the selected account modules `array` `string` `boolean` $modules $scope set_moduleSettings set_moduleSettings Sets the settings for the account modules. `array` `boolean` $settings get_moduleSettings get_moduleSettings Returns a list of saved module settings `array` get_ActiveTypes get_ActiveTypes Returns a list of active account types. `array` set_ActiveTypes set_ActiveTypes Sets the list of active types. `array` $types set_typeSettings set_typeSettings Sets the settings for the account types. `array` `boolean` $settings get_typeSettings get_typeSettings Returns a list of saved type settings `array` getToolSettings getToolSettings Returns the tool settings. `array` setToolSettings setToolSettings Sets the tool settings. `array` `boolean` $toolSettings getAccessLevel getAccessLevel Returns the access level for this profile. `int` setAccessLevel setAccessLevel Sets the access level for this profile. `int` $level getLoginMethod getLoginMethod Returns the login method. `String` `` `` setLoginMethod setLoginMethod Sets the login method. `String` $loginMethod getLoginSearchFilter getLoginSearchFilter Returns the login search filter. `String` setLoginSearchFilter setLoginSearchFilter Sets the login search filter. `String` $loginSearchFilter getLoginSearchSuffix getLoginSearchSuffix Returns the login search suffix. `String` setLoginSearchSuffix setLoginSearchSuffix Sets the login search suffix. `String` $loginSearchSuffix setLoginSearchDN setLoginSearchDN Sets the DN for the login search bind user. `String` `boolean` $loginSearchDN getLoginSearchDN getLoginSearchDN Returns the DN for the login search bind user. `String` setLoginSearchPassword setLoginSearchPassword Sets the password for the login search bind user. `String` $loginSearchPassword getLoginSearchPassword getLoginSearchPassword Returns the password for the login search bind user. `String` getHttpAuthentication getHttpAuthentication Returns if HTTP authentication should be used. `String` setHttpAuthentication setHttpAuthentication Specifies if HTTP authentication should be used. `String` $httpAuthentication getLamProMailFrom getLamProMailFrom Returns the sender address for password reset mails. `String` setLamProMailFrom setLamProMailFrom Sets the sender address for password reset mails. `String` `boolean` $lamProMailFrom getLamProMailReplyTo getLamProMailReplyTo Returns the reply-to address for password reset mails. `String` setLamProMailReplyTo setLamProMailReplyTo Sets the reply-to address for password reset mails. `String` `boolean` $lamProMailReplyTo getLamProMailSubject getLamProMailSubject Returns the subject for password reset mails. `String` setLamProMailSubject setLamProMailSubject Sets the subject for password reset mails. `String` $lamProMailSubject getLamProMailIsHTML getLamProMailIsHTML Returns if the password reset mail content should be treated as HTML. `boolean` setLamProMailIsHTML setLamProMailIsHTML Sets if the password reset mail content should be treated as HTML. `boolean` $lamProMailIsHTML getLamProMailText getLamProMailText Returns the mail body for password reset mails. `String` setLamProMailText setLamProMailText Sets the mail body for password reset mails. `String` $lamProMailText
LAMCfgMain
\LAMCfgMain
This class manages config.cfg.

configuration

$default Default profile $password Password to change config.cfg $sessionTimeout Time of inactivity before session times out (minutes) $logLevel log level $logDestination log destination ("SYSLOG":syslog, "/. <p>..":file, "NONE":none)</p> $allowedHosts list of hosts which may access LAM $passwordMinLength 0 minimum length for passwords $passwordMinUpper 0 minimum uppercase characters $passwordMinLower 0 minimum lowercase characters $passwordMinNumeric 0 minimum numeric characters $passwordMinSymbol 0 minimum symbol characters $passwordMinClasses 0 minimum character classes (upper, lower, numeric, symbols) $conffile path to config file $settings array("password", "default", "sessionTimeout", "logLevel", "logDestination", "allowedHosts", "passwordMinLength", "passwordMinUpper", "passwordMinLower", "passwordMinNumeric", "passwordMinClasses", "passwordMinSymbol") list of data fields to save in config file __construct __construct Loads preferences from config file reload reload Reloads preferences from config file config.cfg `boolean` save save Saves preferences to config file config.cfg setPassword setPassword Sets a new config password. `String` $password checkPassword checkPassword Checks if the given password matches. `String` `boolean` $password hashPassword hashPassword Returns the hashed password. `String` `String` `String` $password $salt isWritable isWritable Returns if the configuration file is writable. `boolean` isConfigFileExisting isConfigFileExisting Returns if the configuration file is existing. `boolean`
This file includes UFPDF which adds Unicode support to FPDF.

Steven Wittens

Andrea Rossato

PDF

UFPDF_VERSION
\UFPDF_VERSION
'0.1'
\FPDF
UFPDF
\UFPDF
Main UFPDF class for creating Unicode PDF documents

PDF

\global\FPDF

UFPDF
UFPDF
$orientation
'P'
$unit
'mm'
$format
'A4'
GetStringWidth
GetStringWidth
$s
AddFont
AddFont
$family
$style
''
$file
''
Text
Text
$x
$y
$txt
AcceptPageBreak
AcceptPageBreak
Cell
Cell
$w
$h
0
$txt
''
$border
0
$ln
0
$align
'J'
$fill
0
$link
''
MultiCell
MultiCell
$w
$h
$txt
$border
0
$align
'J'
$fill
0
Write
Write
$h
$txt
$link
''
AliasNbPages
AliasNbPages
$alias
'{nb}'
_puttruetypeunicode
_puttruetypeunicode
$font
_dounderlineU
_dounderlineU
$x
$y
$width
$txt
_textstring
_textstring
$s
_escapetext
_escapetext
$s
_putinfo
_putinfo
_putpages
_putpages
utf8_to_utf16be
utf8_to_utf16be
$txt
$bom
true
code2utf
code2utf
$num
strlen
strlen
$s
utf8_substr
utf8_substr
$str
$start
utf8_to_codepoints
utf8_to_codepoints
$txt
No DocBlock was found for method UFPDF()
No DocBlock was found for method GetStringWidth()
No DocBlock was found for method AddFont()
No DocBlock was found for method Text()
No DocBlock was found for method AcceptPageBreak()
No DocBlock was found for method Cell()
No DocBlock was found for method MultiCell()
No DocBlock was found for method Write()
No DocBlock was found for method AliasNbPages()
No DocBlock was found for method _puttruetypeunicode()
No DocBlock was found for method _dounderlineU()
No DocBlock was found for method _textstring()
No DocBlock was found for method _escapetext()
No DocBlock was found for method _putinfo()
No DocBlock was found for method _putpages()
No DocBlock was found for method utf8_to_utf16be()
No DocBlock was found for method code2utf()
No DocBlock was found for method strlen()
No DocBlock was found for method utf8_substr()
No DocBlock was found for method utf8_to_codepoints()
Manages the Asterisk extension of user accounts.

modules

Pavel Pozdnyak

Roland Gruber

\baseModule
\passwordService
asteriskAccount
\asteriskAccount
Manages the Asterisk extension of user accounts.

modules

ASTERISK_DEFAULT_REALM
ASTERISK_DEFAULT_REALM
"asterisk"
__construct
__construct
Creates a new asteriskAccount object.

account type (user, group, host)

string
$scope
get_metaData
get_metaData
Returns meta data that is interpreted by parent class.

array with meta data

array
load_Messages
load_Messages
This function fills the error message array with messages
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Write variables into object and do some regex checks
save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
get_pdfEntries
get_pdfEntries
Returns a list of PDF entries
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
managesPasswordAttributes
managesPasswordAttributes
This method specifies if a module manages password attributes.

\global\passwordService::managesPasswordAttributes

true if this module manages password attributes

boolean
supportsForcePasswordChange
supportsForcePasswordChange
Specifies if this module supports to force that a user must change his password on next login.

force password change supported

boolean
passwordChangeRequested
passwordChangeRequested
This function is called whenever the password should be changed.
<p>Account modules must change their password attributes only if the modules list contains their module name.</p>

new password

String

list of modules for which the password should be changed

\$modules

force the user to change his password at next login

boolean

list of error messages if any as parameter array for StatusMessage e.g. return arrray(array('ERROR', 'Password change failed.'))

array

\global\passwordService::passwordChangeRequested

$password
$modules
$forcePasswordChange
buildPasswordString
buildPasswordString
Builds the password string for the password attribute.

LDAP attributes

array

module configuration settings

array

password

String

value for password attribute

String
$attributes
$moduleSettings
$password
hashPassword
hashPassword
Hashes a password value to Asterisk format.

password

String

hash

String
$password
checkSelfServiceOptions
checkSelfServiceOptions
Checks if all input values are correct and returns the LDAP attributes which should be changed.
<p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p>

<p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p>

input fields

string

LDAP attributes

array

indicates that the user is only allowed to change his password and no LDAP content is readable

boolean

list of read-only fields

array

messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array(), 'info' => array()))

array
$fields
$attributes
$passwordChangeOnly
$readOnlyFields
Manages the object class "account" for users and hosts.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
account
\account
Manages the object class "account" for users and hosts.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the message array.
module_complete
module_complete
This functions returns true if all needed settings are done.

true if LDAP operation can be done

boolean
getButtonStatus
getButtonStatus
Controls if the module button the account page is visible and activated.

status ("enabled", "disabled", "hidden")

string
save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
get_uploadColumns
get_uploadColumns
Returns an array containing all input columns for the file upload.
<p>Syntax: <br> array( <br> string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>) <br> string: description, // short descriptive name <br> string: help, // help ID <br> string: example, // example value <br> boolean: required // true, if user must set a value for this column <br> )</p>

list of selected account modules

array

column list

array
$selectedModules
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
Provides MAC addresses for hosts.

modules

Roland Gruber

\baseModule
ieee802device
\ieee802device
Provides MAC addresses for hosts.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the error message array with messages
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
Manages Puppet configuration options.

modules

Roland Gruber

\baseModule
puppetClient
\puppetClient
Manages Puppet configuration options.

modules

__construct
__construct
Creates a new authorizedServiceObject object.

account type (user, group, host)

string
$scope
get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
load_Messages
This function fills the error message array with messages
save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
get_profileOptions
get_profileOptions
This function defines what attributes will be used in the account profiles and their appearance in the profile editor.
<p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The return value is an object implementing htmlElement.<br> The field name are used as keywords to load and save profiles. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.</p>

meta HTML object

\htmlElement

\global\baseModule::get_metaData()

\global\htmlElement

load_profile
load_profile
Loads the values of an account profile into internal variables.

hash array with profile values (identifier => value)

array
$profile
getPossibleParentNodes
getPossibleParentNodes
Reurns a list of valid parent nodes for this node.

parent nodes (e.g. array('node1', 'node2'))

array
Manages Windows AD (e.g.
<p>Samba 4) hosts.</p>

modules

Roland Gruber

\baseModule
windowsHost
\windowsHost
Manages Windows AD (e.g.
<p>Samba 4) hosts.</p>

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the $messages variable with output messages from this module.
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
display_html_managedBy
display_html_managedBy
This function will create the meta HTML code to show a page to change the member attribute.

HTML meta data

\htmlElement
process_managedBy
process_managedBy
Processes user input of the members page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns a list of PDF entries
Manages Unix accounts for groups.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
\passwordService
posixGroup
\posixGroup
Manages the object class "posixGroup" for groups.

modules

$changegids change GIDs of users and hosts? $manageCnAttribute true specifies if the cn attribute should be managed by this module $manageDescriptionAttribute true specifies if the description attribute should be managed by this module $cachedGIDList null cache for existing GID numbers $cachedUserToGIDList null cache for existing users and their GIDs $cachedGroupNameList null cache for existing groups build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules delete_attributes delete_attributes Checks if the group which should be deleted is still used as primary group. `\List` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `array` `` display_html_user display_html_user Displays selections to add or remove users from current group. `array` get_metaData get_metaData Returns meta data that is interpreted by parent class `array` get_configOptions get_configOptions Returns a list of elements for the configuration. `array` `array` `array` $scopes $allScopes get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` init init This functin will be called when the module will be loaded `String` $base load_Messages load_Messages This function fills the $messages variable with output messages from this module. module_complete module_complete This functions is used to check if all settings for this module have been made. `boolean` getButtonStatus getButtonStatus Controls if the module button the account page is visible and activated. `string` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` process_user process_user Processes user input of the user selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` check_configOptions check_configOptions Checks input values of module settings. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> If the input data is invalid the return value is an array that contains subarrays to build StatusMessages ('message type', 'message head', 'message text'). <br>If no errors occured the function returns an empty array.</p> `array` `array` `array` `` $scopes $options getNextGIDs getNextGIDs Returns one or more free GID numbers. `integer` `array` `mixed` $count $errors getNextSambaPoolGIDs getNextSambaPoolGIDs Gets the free GID numbers from an Samba pool entry in LDAP. `integer` `array` `mixed` $count $errors managesPasswordAttributes managesPasswordAttributes This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange supportsForcePasswordChange Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested passwordChangeRequested This function is called whenever the password should be changed. <p>Account modules must change their password attributes only if the modules list contains their module name.</p> `String` `\$modules` `boolean` `array` `` $password $modules $forcePasswordChange getGIDs getGIDs Returns a list of existing GID numbers. `array` getUsers getUsers Returns a list of existing users and their GID numbers and cn. `array` groupNameExists groupNameExists Checks if the given group name already exists in LDAP. `String` `boolean` $groupName getGroupNames getGroupNames Returns a list of all group names in LDAP. `array`
Manages DHCP entries.

modules

Thomas Manninger

Roland Gruber

check_ip
\check_ip
Checks if the given IP is valid.

IP address

String

IP must be a subnet

boolean
$ip
$subnet
false
\baseModule
dhcp_settings
\dhcp_settings
Manages DHCP entries.

modules

$all_netbios_node_types all netbios node types $attributes LDAP attributes __construct __construct Creates a new dhcp_settings object. `string` $scope get_metaData get_metaData Returns meta data that is interpreted by parent class `array` load_Messages load_Messages This function fills the message array. save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` checkSubnetMask checkSubnetMask Checks if the subnet mask is valid. `String` `boolean` $mask calculateNetMask calculateNetMask Calculates the net mask from the subnet. `String` `integer` $subnet display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` getDHCPOption getDHCPOption Returns a DHCP option. `String` `String` $name setDHCPOption setDHCPOption Sets a DHCP option. `String` `String` $name $value getDefaultLeaseTime getDefaultLeaseTime Returns the default lease time. `String` setDefaultLeaseTime setDefaultLeaseTime Sets the default lease time. `String` $time getMaxLeaseTime getMaxLeaseTime Returns the maximum lease time. `String` setMaxLeaseTime setMaxLeaseTime Sets the maximum lease time. `String` $time build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules
Manages the eduPerson extension for user accounts.

modules

Roland Gruber

\baseModule
eduPerson
\eduPerson
Manages the eduPerson extension for user accounts.

modules

$affiliationTypes array('faculty', 'student', 'staff', 'alum', 'member', 'affiliate', 'employee', 'library-walk-in') possible affiliation types __construct __construct Creates a new eduPerson object. `string` $scope get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages module_complete module_complete This functions return true if all needed settings are done. `boolean` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array`
Manages quotas for users and groups.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
quota
\quota
Manages quotas for users and groups.

modules

$SPLIT_DELIMITER "###x##y##x###" delimiter for lamdaemon commands $QUOTA_PREFIX 'QUOTA_ENTRY ' prefix for lamdaemon results $quota Saves the quota settings load_Messages load_Messages this functin fills the error message array with messages get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` initQuotas initQuotas Initializes the quota values. getCn getCn Gets the cn from the Unix group module. `String` module_ready module_ready This function is used to check if this module page can be displayed. <p>It returns false if a module depends on data from other modules which was not yet entered.</p> `boolean` postModifyActions postModifyActions Quotas are set in postmodify. `` `boolean` `array` `array` $newAccount $attributes preDeleteActions preDeleteActions Allows the module to run commands before the LDAP entry is deleted. `array` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` replaceSpecialChars replaceSpecialChars Replaces special characters in HTML name values. `string` `string` $input get_profileOptions get_profileOptions Returns a list of elements for the account profiles. `\htmlElement` check_profileOptions check_profileOptions Checks input values of account profiles. `array` `array` $options load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` get_uploadColumns get_uploadColumns Returns an array containing all input columns for the file upload. <p>Syntax: <br> array( <br> string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>) <br> string: description, // short descriptive name <br> string: help, // help ID <br> string: example, // example value <br> boolean: required // true, if user must set a value for this column <br> )</p> `array` `array` $selectedModules doUploadPostActions doUploadPostActions This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data $ids $failed $temp $accounts
Manages Samba 3 accounts for users and hosts.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

sambaSamAccount/sambaMungedDial.inc
terminals server options
\baseModule
\passwordService
sambaSamAccount
\sambaSamAccount
Manages the object class "sambaSamAccount" for users and hosts.

modules

$nopwd use no password? $noexpire password does not expire? $deactivated account deactivated? $groupRids array of well known group rids $userRids array of well known user rids $hex2bitstring array('0' => '0000', '1' => '0001', '2' => '0010', '3' => '0011', '4' => '0100', '5' => '0101', '6' => '0110', '7' => '0111', '8' => '1000', '9' => '1001', 'A' => '1010', 'B' => '1011', 'C' => '1100', 'D' => '1101', 'E' => '1110', 'F' => '1111') HEX to binary conversion table $expirePassword false specifies if the password should be expired $cachedHostList null host cache to reduce LDAP queries $cachedGroupSIDList null group cache to reduce LDAP queries $cachedDomainList null cache for domain list $SPLIT_DELIMITER "###x##y##x###" delimiter for lamdaemon commands __construct __construct Creates a new sambaSamAccount object. `string` $scope load_Messages load_Messages this functin fills the error message array with messages get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` init init Initializes the module after it became part of an accountContainer `string` $base module_ready module_ready This function is used to check if this module page can be displayed. <p>It returns false if a module depends on data from other modules which was not yet entered.</p> `boolean` module_complete module_complete This function is used to check if all settings for this module have been made. `` `boolean` load_attributes load_attributes This function loads the LDAP attributes for this module. `array` $attr save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` process_sambaUserWorkstations process_sambaUserWorkstations Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` process_logonHours process_logonHours Processes user input of the logon hours page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` process_time process_time Processes user input of the time selection page. `array` process_terminalServer process_terminalServer Processes user input of the terminal server page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` display_html_sambaUserWorkstations display_html_sambaUserWorkstations This function will create the HTML page to edit the allowed workstations. `\htmlElement` display_html_logonHours display_html_logonHours This function will create the HTML page to edit logon hours. `\htmlElement` display_html_time display_html_time This function will create the meta HTML code to show a page to change time values. `\htmlElement` display_html_terminalServer display_html_terminalServer This function will create the HTML page to edit the terminal server options. `\htmlElement` display_html_profilePath display_html_profilePath Displays manage profile path page. `\htmlElement` process_profilePath process_profilePath Processes user input of the profile path check page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` get_profileOptions get_profileOptions Returns a list of elements for the account profiles. `\htmlElement` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules getSelfServiceOptions getSelfServiceOptions Returns the meta HTML code for each input field. <p>format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.</p> `array` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields checkSelfServiceOptions checkSelfServiceOptions Checks if all input values are correct and returns the LDAP attributes which should be changed. <p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `string` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields managesPasswordAttributes managesPasswordAttributes This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange supportsForcePasswordChange Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested passwordChangeRequested This function is called whenever the password should be changed. <p>Account modules must change their password attributes only if the modules list contains their module name.</p> `String` `\$modules` `boolean` `array` `` $password $modules $forcePasswordChange getGroupName getGroupName Returns the group name of the group with the given group ID. `String` `String` $groupID getPasswordMustChangeTime getPasswordMustChangeTime Returns the time when the user needs to change his password. `array` `String` $domains $selectedDomain getPasswordCanChangeTime getPasswordCanChangeTime Returns the time when the user can change his password. `array` `String` $domains $selectedDomain getHostList getHostList Returns a list of existing hosts. `array` getGroupSIDList getGroupSIDList Returns a list of existing hosts. `array` getDomains getDomains Returns a list of existing Samba 3 domains. `array` setExpirationDate setExpirationDate Sets the expiration date of this account. <p>If all parameters are null the expiration date will be removed.</p> `String` `String` `String` $year $month $day isExtensionEnabled isExtensionEnabled Returns if the Samba extension is enabled. `boolean` isDeactivated isDeactivated Returns if the Samba part of the current account is deactivated. `boolean` deactivate deactivate Deactivates this account. activate activate Activates this account.
Manages Unix accounts for users and hosts.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

Thomas Manninger

\baseModule
\passwordService
posixAccount
\posixAccount
Manages the object class "posixAccount" for users and hosts.

modules

$SPLIT_DELIMITER "###x##y##x###" delimiter for lamdaemon commands $groups current group list $groups_orig original group list $gonList array() current group of names list $gonList_orig array() original group of names list $lamdaemonServers array() lamdaemon servers $groupCache null cache for group objects $gonCache null cache for group of names objects $clearTextPassword clear text password $cachedUIDList null caches the list of known UIDs $cachedUserNameList null caches the list of known user names $umlautReplacements array('ä' => 'ae', 'Ä' => 'Ae', 'ö' => 'oe', 'Ö' => 'Oe', 'ü' => 'ue', 'Ü' => 'Ue', 'ß' => 'ss', 'é' => 'e', 'è' => 'e', 'ô' => 'o', 'ç' => 'c') replacements for common umlauts load_Messages load_Messages This function fills the error message array with messages. get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` init init Initializes the module after it became part of an accountContainer `string` $base module_complete module_complete This functions is used to check if all settings for this module have been made. `boolean` load_attributes load_attributes This function loads all needed LDAP attributes. `array` $attr save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` postModifyActions postModifyActions Runs the postmodify actions. `` `boolean` `array` `array` $newAccount $attributes delete_attributes delete_attributes Additional LDAP operations on delete. `\List` preDeleteActions preDeleteActions Allows the module to run commands before the LDAP entry is deleted. `array` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` checkASCII checkASCII Checks if an attribute contains only ASCII charaters and replaces invalid characters. `string` `string` $attribute process_group process_group Processes user input of the group selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` process_homedir process_homedir Processes user input of the homedir check page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` display_html_delete display_html_delete Displays the delete homedir option for the delete page. `\htmlElement` display_html_group display_html_group Displays the group selection. `\htmlElement` display_html_homedir display_html_homedir Displays the delete homedir option for the homedir page. `\htmlElement` get_profileOptions get_profileOptions Returns a list of elements for the account profiles. `\profile` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` check_configOptions check_configOptions Checks input values of module settings. `array` `array` `array` $scopes $options build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules doUploadPostActions doUploadPostActions This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data $ids $failed $temp $accounts getNextUIDs getNextUIDs Returns one or more free UID numbers. `integer` `array` `mixed` $count $errors getNextSambaPoolUIDs getNextSambaPoolUIDs Gets the free UID numbers from an Samba pool entry in LDAP. `integer` `array` `mixed` $count $errors getSelfServiceOptions getSelfServiceOptions Returns the meta HTML code for each input field. <p>format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.</p> `array` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields checkSelfServiceOptions checkSelfServiceOptions Checks if all input values are correct and returns the LDAP attributes which should be changed. <p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>"info" are values with informational value (e.g. to be used later by pre/postModify actions)</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `string` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields managesPasswordAttributes managesPasswordAttributes This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange supportsForcePasswordChange Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested passwordChangeRequested This function is called whenever the password should be changed. <p>Account modules must change their password attributes only if the modules list contains their module name.</p> `String` `\$modules` `boolean` `array` `` $password $modules $forcePasswordChange getGID getGID Returns the group ID of the given group. `String` `String` $groupname getGroupName getGroupName Returns the group name of the group with the given group ID. `String` `String` $groupID getGroupDN getGroupDN Returns the group DN of the given group. `String` `String` $groupname findGroups findGroups Finds all existing LDAP groups. `array` findGroupOfNames findGroupOfNames Finds all existing LDAP group of names. `array` getUIDs getUIDs Returns a list of existing UID numbers. `array` userNameExists userNameExists Checks if the given user name already exists in LDAP. `String` `boolean` $userName getUserNames getUserNames Returns a list of all user names in LDAP. `array` areGroupOfNamesActive areGroupOfNamesActive Returns if LAM manages group of names entries. `boolean` getUserNameSuggestion getUserNameSuggestion Returns a suggestion for the user name. <p>By deafult this wil be the first character of the first name plus the last name.</p> `array` `String` $attrs isLockable isLockable Returns if this account can be locked. <p>This is the case if a hashed password is set ("{" at the beginning).</p> isLocked isLocked Returns if the Unix part of the current account is locked. `boolean` lock lock Locks the user password of this account. unlock unlock Unlocks the user password of this account. removeFromUnixGroups removeFromUnixGroups Removes all Unix group memberships from this user. removeFromGONGroups removeFromGONGroups Removes all group of names memberships from this user. getNextUserName getNextUserName Returns the next possible user name based on the given one. <p>If the user name does not end with a number then a "2" is added. User names with numbers at the end are simply increased by one. <br> <br>Attention: This user name might still be in use. This needs to be checked separately.</p> `String` `String` $userName getShells getShells Returns the list of possible login shells. `array`
Manages Windows AD (e.g.
<p>Samba 4) users.</p>

modules

Roland Gruber

\baseModule
\passwordService
windowsUser
\windowsUser
Manages Windows AD (e.g.
<p>Samba 4) users.</p>

modules

DEFAULT_ACCOUNT_CONTROL
DEFAULT_ACCOUNT_CONTROL
512
initial account flags
AC_PWD_NEVER_EXPIRES
AC_PWD_NEVER_EXPIRES
65536
password never expires
AC_SMARTCARD_REQUIRED
AC_SMARTCARD_REQUIRED
262144
login requires smartcard
AC_ACCOUNT_DISABLED
AC_ACCOUNT_DISABLED
2
account is disabled
AC_LOCKED_OUT
AC_LOCKED_OUT
16
currently locked out, read only flag
$groupList array() current group of names list $groupList_orig array() original group of names list $groupCache null cache for groups $pwdLastSet null option for forcing password change, used in postModifyActions $clearTextPassword clear text password get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` init init Initializes the module after it became part of an accountContainer `string` $base load_Messages load_Messages This function fills the $messages variable with output messages from this module. load_attributes load_attributes This function loads all needed LDAP attributes. `array` $attr save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_group display_html_group Displays the group selection. `\htmlElement` process_group process_group Processes user input of the group selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` postModifyActions postModifyActions Runs the postmodify actions. `` `boolean` `array` `array` $newAccount $attributes build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules doUploadPostActions doUploadPostActions This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data $ids $failed $temp $accounts get_pdfEntries get_pdfEntries Returns a list of PDF entries get_profileOptions get_profileOptions Returns a list of elements for the account profiles. `\htmlElement` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile getSelfServiceOptions getSelfServiceOptions Returns the meta HTML code for each input field. <p>format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.</p> `array` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields checkSelfServiceOptions checkSelfServiceOptions Checks if all input values are correct and returns the LDAP attributes which should be changed. <p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `string` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields setSelfServicePassword setSelfServicePassword Sets the user password in self service. <p>Since the change requires the old password we need to run ldapmodify for this task.</p> <p>Enter description here ...</p> `array` `array` $return $attributes managesPasswordAttributes managesPasswordAttributes This method specifies if a module manages password attributes. <p>The module alias will then appear as option in the GUI. <br>If the module only wants to get notified about password changes then return false.</p> `boolean` supportsForcePasswordChange supportsForcePasswordChange Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested passwordChangeRequested This function is called whenever the password should be changed. <p>Account modules must change their password attributes only if the modules list contains their module name.</p> `String` `array` `boolean` `array` $password $modules $forcePasswordChange pwdAttributeValue pwdAttributeValue Creates the LDAP password value. `String` $password isDeactivated isDeactivated Returns if the account is currently deactivated. `array` `boolean` $attrs setIsDeactivated setIsDeactivated Sets if the account is currently deactivated. `boolean` `array` $deactivated $attrs null isLockedOut isLockedOut Returns if the account is currently locked out. `array` `boolean` $attrs unlock unlock Unlocks the account. `array` $attrs isSmartCardRequired isSmartCardRequired Returns if the account requires a smartcard to login. `array` `boolean` $attrs setIsSmartCardRequired setIsSmartCardRequired Sets if the account requires a smartcard to login. `array` `boolean` $attrs $requireCard isNeverExpiring isNeverExpiring Returns if the account never expires. `array` `boolean` $attrs setIsNeverExpiring setIsNeverExpiring Sets if the account never expires. `array` `boolean` $attrs $neverExpires findGroups findGroups Finds all existing groups. `array`
remove this workaround when self service allows to specify the list of active modules
remove this workaround when self service allows to specify the list of active modules
Manages Kolab user accounts.

modules

Roland Gruber

\baseModule
kolabUser
\kolabUser
Manages Kolab user accounts.

modules

$invitationPolicies list of invitation policies __construct __construct Creates a new kolabUser object. `string` $scope get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_deleteUser display_html_deleteUser This function will create the meta HTML code to show a page to mark an account for deletion. `\htmlElement` process_deleteUser process_deleteUser Write variables into object and do some regex checks module_complete module_complete This function returns true if all needed settings are done. `\true,` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` getSelfServiceOptions getSelfServiceOptions Returns the meta HTML code for each input field. <p>format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.</p> `array` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields checkSelfServiceOptions checkSelfServiceOptions Checks if all input values are correct and returns the LDAP attributes which should be changed. <p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `string` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields
Manages DHCP ranges for DHCP server.

modules

Thomas Manninger

Roland Gruber

\baseModule
range
\range
Manages DHCP ranges for DHCP server.

modules

$subnet subnet $ranges ranges $processed Range -> Function attibute_processed already running? $overlaped For check, if IPs overlaped. get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages. calculateSubnet calculateSubnet Calculates the subnet for a given IP and netmask. `String` `String` $ip $mask check_range check_range Checks if the first IP is smaller than the second IP. `String` `String` `\true,` $first_ip $second_ip check_subnet_range check_subnet_range Check if an IP address is in the correct subnet. `String` `String` `String` `true` $ip $subnet $mask overlaped_range overlaped_range Checked, if Ranges are overlaped. `\first` `\second` `\false,` $ip $ipB reset_overlaped_range reset_overlaped_range Reset the overlaped_range() function getButtonStatus getButtonStatus Controls if the module button the account page is visible and activated. `string` load_attributes load_attributes This function loads all needed LDAP attributes. `array` $attr reload_ranges reload_ranges Adapt the Ranges with the subnet. `\true,` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array`
Manages DDNS entries.

modules

Thomas Manninger

Roland Gruber

\baseModule
ddns
\ddns
Manages DDNS entries.

modules

$ddns array() standard DDNS settings get_metaData get_metaData Returns meta data that is interpreted by parent class. `array` load_Messages load_Messages This function fills the message array. module_complete module_complete This functions returns true if all needed settings are done. `boolean` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` check_if_ddns_is_enable check_if_ddns_is_enable This function check if ddns is enable. process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` process_attributes_mainSettings process_attributes_mainSettings Process for mainsettings process_attributes_account process_attributes_account Process for account display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` getDNSServer getDNSServer Returns the IP of the DNS server. `String` getZoneNames getZoneNames Returns the zone names. `array` isDynDNSActivated isDynDNSActivated Returns if DDNS is activated. `boolean` setDynDNSActivated setDynDNSActivated Sets if DDNS is activated. `boolean` $activated addFixIPs addFixIPs Returns if fixed IPs are added to DDNS. `boolean` setFixIPs setFixIPs Sets if client updates are ignored. `boolean` $add isIgnoreClientUpdates isIgnoreClientUpdates Returns if client updates are ignored. `boolean` setIgnoreClientUpdates setIgnoreClientUpdates Sets if client updates are ignored. `boolean` $ignore getUpdateKey getUpdateKey Returns the key for DNS updates. `String` setUpdateKey setUpdateKey Sets the key for DNS updates. `String` $key load_attributes load_attributes This function loads the LDAP attributes when an account should be loaded. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> By default this method loads the object classes and accounts which are specified in {@link getManagedObjectClasses()} and {@link getManagedAttributes()}.</p> `array` $attributes build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules
Manages Samba 3 accounts for groups.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
sambaGroupMapping
\sambaGroupMapping
Manages the object class "sambaGroupMapping" for groups.

modules

$rids Array of well known RIDs $sambaGroupTypes Array of sambaGroupTypes $cachedDomainList null cache for domain list __construct __construct Creates a new module for Samba 3 groups. `string` $scope getGID getGID Gets the GID number from the Unix group module. `String` getCn getCn Gets the cn from the Unix group module. `String` get_uploadColumns get_uploadColumns Returns an array containing all input columns for the file upload. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> This funtion returns an array which contains subarrays which represent an upload column. <b>Syntax of column arrays:</b> <br> <br> array( <br> string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>) <br> string: description, // short descriptive name <br> string: help, // help ID <br> string: example, // example value <br> string: values, // possible input values (optional) <br> string: default, // default value (optional) <br> boolean: required // true, if user must set a value for this column <br> boolean: unique // true if all values of this column must be different values (optional, default: "false") <br> )</p> `array` `array` `` $selectedModules build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` get_profileOptions get_profileOptions Returns a list of elements for the account profiles. `\htmlElement` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile load_Messages load_Messages this functin fills the error message array with messages module_ready module_ready This function is used to check if this module page can be displayed. <p>It returns false if a module depends on data from other modules which was not yet entered.</p> `boolean` module_complete module_complete This function is used to check if all settings for this module have been made. `` `boolean` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` getDomains getDomains Returns a list of existing Samba 3 domains. `array`
Manages Unix shadow accounts for users.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
\passwordService
shadowAccount
\shadowAccount
Manages the object class "shadowAccount" for users.

modules

__construct
__construct
Creates a new shadowAccount object.

account type (user, group, host)

string
$scope
load_Messages
load_Messages
This function builds up the message array.
get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
display_html_attributes
display_html_attributes
This function will create the meta HTML code to show a page with all attributes.

meta HTML code

array
process_expire
process_expire
Processes user input of the expiration page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
display_html_expire
display_html_expire
This function will create the meta HTML code to show a page with the expiration date.

meta HTML code

array
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
load_profile
load_profile
Loads the values of an account profile into internal variables.

hash array with profile values (identifier => value)

array
$profile
managesPasswordAttributes
managesPasswordAttributes
This method specifies if a module manages password attributes.

\global\passwordService::managesPasswordAttributes

true if this module manages password attributes

boolean
supportsForcePasswordChange
supportsForcePasswordChange
Specifies if this module supports to force that a user must change his password on next login.

force password change supported

boolean
passwordChangeRequested
passwordChangeRequested
This function is called whenever the password should be changed.
<p>Account modules must change their password attributes only if the modules list contains their module name.</p>

new password

String

list of modules for which the password should be changed

\$modules

force the user to change his password at next login

boolean

list of error messages if any as parameter array for StatusMessage e.g. return arrray(array('ERROR', 'Password change failed.'))

array

\global\passwordService::passwordChangeRequested

$password
$modules
$forcePasswordChange
setExpirationDate
setExpirationDate
Sets the expiration date of this account.
<p>If all parameters are null the expiration date will be removed.</p>

year (e.g. 2040)

String

month (e.g. 8)

String

day (e.g. 27)

String
$year
$month
$day
Manages SSH public keys.

modules

Roland Gruber

Andrew Dibble <adibble@mobitv.com>

\baseModule
ldapPublicKey
\ldapPublicKey
Manages SSH public keys.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns a list of PDF entries
getSelfServiceOptions
getSelfServiceOptions
Returns the meta HTML code for each input field.
<p>format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.</p>

list of active fields

array

attributes of LDAP account

array

indicates that the user is only allowed to change his password and no LDAP content is readable

boolean

list of read-only fields

array

list of meta HTML elements (field name => htmlTableRow)

array
$fields
$attributes
$passwordChangeOnly
$readOnlyFields
checkSelfServiceOptions
checkSelfServiceOptions
Checks if all input values are correct and returns the LDAP attributes which should be changed.
<p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p>

<p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p>

input fields

string

LDAP attributes

array

indicates that the user is only allowed to change his password and no LDAP content is readable

boolean

list of read-only fields

array

messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array(), 'info' => array()))

array
$fields
$attributes
$passwordChangeOnly
$readOnlyFields
Manages entries based on the object class nisNetgroup.

modules

Roland Gruber

\baseModule
nisnetgroup
\nisnetgroup
Manages entries based on the object class nisNetgroup.

modules

$cachedUserList null user cache $cachedHostList null host cache $cachedGroupList null group cache get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the $messages variable with output messages from this module. save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_group display_html_group Displays the group selection. `\htmlElement` process_group process_group Processes user input of the group selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_select display_html_select Displays the host/user selection. `\htmlElement` process_select process_select Processes user input of the host/user selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules module_complete module_complete This functions is used to check if all settings for this module have been made. `boolean` get_pdfEntries get_pdfEntries Returns a list of PDF entries getGroupList getGroupList Returns a list of existing NIS net groups. `array` getUserList getUserList Returns a list of existing users. `array` getHostList getHostList Returns a list of existing hosts. `array`
Manages Samba 3 domain entries.

modules

Roland Gruber

\baseModule
sambaDomain
\sambaDomain
Manages Samba 3 domain entries.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the error message array with messages
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
Manages the atrributes of object class inetOrgPerson.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
\passwordService
inetOrgPerson
\inetOrgPerson
This module manages LDAP attributes of the object class inetOrgPerson (e.g.
<p>name and address).</p>

modules

SESS_CERTIFICATES_LIST
SESS_CERTIFICATES_LIST
'inetOrgPerson_certificatesList'
session variable for existing user certificates in self service
$cachedManagers null caches the list of possible managers $clearTextPassword null clear text password $departmentCache null cache for departments $oCache null organization cache $ouCache null organizational unit cache $titleCache null title cache $employeeTypeCache null employee type cache $businessCategoryCache null business category cache load_Messages load_Messages This function fills the message array. get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` module_complete module_complete This functions return true if all needed settings are done. `boolean` getButtonStatus getButtonStatus Controls if the module button the account page is visible and activated. `string` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `array` process_photo process_photo Sets a new photo. display_html_photo display_html_photo Displays the photo upload page. `array` display_html_manager display_html_manager This function will create the meta HTML code to show a page to change the manager attribute. `\htmlElement` process_manager process_manager Processes user input of the manager page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_userCertificate display_html_userCertificate Displays the certificate upload page. `array` process_userCertificate process_userCertificate Sets a new certificate or deletes old ones. get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile check_profileOptions check_profileOptions Checks input values of account profiles. `array` `array` $options get_uploadColumns get_uploadColumns Returns an array containing all input columns for the file upload. <p>Syntax: <br> array( <br> string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>) <br> string: description, // short descriptive name <br> string: help, // help ID <br> string: example, // example value <br> boolean: required // true, if user must set a value for this column <br> )</p> `array` `array` $selectedModules build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules doUploadPostActions doUploadPostActions This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data $ids $failed $temp $accounts getSelfServiceOptions getSelfServiceOptions Returns the meta HTML code for each input field. <p>format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links.</p> `array` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields getSelfServiceUserCertificates getSelfServiceUserCertificates Returns the meta HTML code to display the certificate area. <p>This also includes the file upload.</p> `\htmlTable` getSelfServiceUserCertificatesJSBlock getSelfServiceUserCertificatesJSBlock Returns the Java Script functions to manage the certificates. `\htmlJavaScript` checkSelfServiceOptions checkSelfServiceOptions Checks if all input values are correct and returns the LDAP attributes which should be changed. <p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `string` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields handleAjaxRequest handleAjaxRequest Manages AJAX requests. <p>This function may be called with or without an account container.</p> ajaxUpload ajaxUpload Handles an AJAX file upload and prints the JSON result. ajaxDeleteSelfServiceUserCertificate ajaxDeleteSelfServiceUserCertificate Manages the deletion of a certificate. `array` $data invalidAjaxRequest invalidAjaxRequest Invalid AJAX request received. `String` $message null managesPasswordAttributes managesPasswordAttributes This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange supportsForcePasswordChange Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested passwordChangeRequested This function is called whenever the password should be changed. <p>Account modules must change their password attributes only if the modules list contains their module name.</p> `String` `\$modules` `boolean` `array` `` $password $modules $forcePasswordChange getManagers getManagers Returns a list of possible managers. `array` initCache initCache Loads cached data from LDAP such as departmets etc.
Manages user quotas with the object class systemQuotas.

modules

Roland Gruber

\baseModule
systemQuotas
\systemQuotas
Manages user quotas with the object class systemQuotas.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the $messages variable with output messages from this module.
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
checkQuota
checkQuota
Checks if the quota parameters are valid.

mountpoint

String

soft block limit

int

hard block limit

int

soft inode limit

int

hard inode limit

int

position is upload table

boolean

array where error messages are returned

array
$path
$softBlock
$hardBlock
$softInode
$hardInode
$uploadIndex
null
check_profileOptions
check_profileOptions
Checks input values of account profiles.

a hash array (name => value) containing the options

array

list of error messages (array(type, title, text)) to generate StatusMessages, if any

array
$options
load_profile
load_profile
Loads the values of an account profile into internal variables.

hash array with profile values (identifier => value)

array
$profile
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns a list of PDF entries
Manages FreeRadius accounts.

modules

Roland Gruber

\baseModule
freeRadius
\freeRadius
Manages FreeRadius accounts.

modules

$monthList array('01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', '07' => 'Jul', '08' => 'Aug', '09' => 'Sep', '10' => 'Oct', '11' => 'Nov', '12' => 'Dec') list of possible months __construct __construct Creates a new freeRadius object. `string` $scope get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_expiration display_html_expiration This function will create the meta HTML code to show a page to change the expiration date. `\htmlElement` process_expiration process_expiration Processes user input of the time selection page. `array` build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` check_profileOptions check_profileOptions Checks input values of account profiles. `array` `array` $options load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile formatExpirationDate formatExpirationDate Formats the expiration date attribute. `String` $date
Manages Asterisk extensions.

modules

Pavel Pozdniak

Roland Gruber

\baseModule
asteriskExtension
\asteriskExtension
Manages Asterisk extensions.

modules

$filterOwnerForAsteriskAccounts true if true then only Asterisk accounts are shown as possible owners $searchOwnersInTreeSuffix false if true then the tree suffix will be used to search potential owners $extensionRows array() Contains all attributes information for set of accounts $extensionRowsOrig array() Contains all original attributes information for set of accounts $extensionOwners array() extension owners $addRuleFlag false flag if new rule should be added get_metaData get_metaData Returns meta data that is interpreted by parent class `array` load_Messages load_Messages This function fills the error message array with messages display_html_attributes display_html_attributes This function will create the meta HTML code to show a page with all attributes. `\htmlElement` render_exten_owners_set_controls render_exten_owners_set_controls This function prints management elements to manipulate owners of an extension. `\htmlTable` $renderContainer load_extension_parts load_extension_parts Loads all related extension entries. `String` $extension render_extensions_by_priority render_extensions_by_priority Generates the meta HTML for the rules. `String` `\htmlTable` $extension $renderContainer render_extension render_extension Generates the meta HTML for a single rule. `array` `int` `\htmlTable` $extensLine $placeInList $renderContainer array_sort array_sort Sorts an array of arrays by the given key. `array` `String` `String` $array $on $order 'SORT_ASC' display_html_user display_html_user Displays a list of possible owners of this extension. `\htmlElement` process_user process_user Processes user input of the user selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` isMoveToNewSuffix isMoveToNewSuffix Returns if the extension was moved to another OU. `boolean` isExtensionOwnerSet isExtensionOwnerSet Returns true if at least one owner is set and false otherwise `boolean` process_attributes process_attributes Writes variables into object and does some regex checks. `array` processExtensionRows processExtensionRows Processes the rule data. `String` `String` `array` $extensionName $extensionContext setDefaultExtensionOwner setDefaultExtensionOwner Set extension owner as current logged in user. getDefaultExtensionOwner getDefaultExtensionOwner Returns the default extension owner. `String` processSingleExtension processSingleExtension Fills the fileds of a single extension row. <p>In Asterisk it would only be an extension name,a priority,an application, but LDAP spicific add to processing context field.</p> `array` `String` `String` `int` `int` $extRow $extensionName $extensionContext $entryCounter $extensionPriorityCntr processPriorityChange processPriorityChange Reorders the rules if the user clicked on a move button. isThisExtensionPresented isThisExtensionPresented Search by extension name and retun true if fields with this extension name exists and false otherwise. <p>Equal extension names are allowed in different OUs.</p> `String` `boolean` $extension generateNextExtensionName generateNextExtensionName This function searches in the base subtree and finds all extensions names within. <p>The generation algorithm is the naive one, so only work when extension is numbers. All extension name is sorted and new extension name will be greates on + 1.</p> `String` get_pdfEntries get_pdfEntries Returns a list of PDF entries build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules moveExtentionToNewSuffix moveExtentionToNewSuffix Get list of all applications for given extension and move it into new suffix. `array` `array` $rowOrig save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br></p> <p><br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It is possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid)<br> <br><b>"add"</b> are attributes which have to be added to the LDAP entry <br><b>"remove"</b> are attributes which have to be removed from the LDAP entry <br><b>"modify"</b> are attributes which have to be modified in the LDAP entry <br><b>"notchanged"</b> are attributes which stay unchanged <br><b>"info"</b> values with informational value (e.g. to be used later by pre/postModify actions) <br> <br>This builds the required comands from $this-attributes and $this->orig.</p> `array` postDeleteActions postDeleteActions Runs ufter main deltete procedure was done and do postmorten for other parts of extension wtith priority > 1. `array`
Shows general information like the creation time of an account.

modules

Roland Gruber

\baseModule
generalInformation
\generalInformation
Shows general information like the creation time of an account.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
Manages terminal server settings for Samba 3.

modules

Cajus Pollmeier

SAMBA_MUNGEDDIAL_FILEHEADER
\SAMBA_MUNGEDDIAL_FILEHEADER
((((("20002000200020002000200020002000" . "20002000200020002000200020002000") . "20002000200020002000200020002000") . "20002000200020002000200020002000") . "20002000200020002000200020002000") . "20002000200020002000200020002000") . "5000"
File header
SAMBA_MUNGEDDIAL_FILEHEADER_OLD
\SAMBA_MUNGEDDIAL_FILEHEADER_OLD
((((("6d000800200020002000200020002000" . "20002000200020002000200020002000") . "20002000200020002000200064000100") . "20002000200020002000200020002000") . "20002000200020002000200020002000") . "20002000200020002000200020002000") . "50001000"
File header for old format.
sambaMungedDial
\sambaMungedDial
Manages terminal server settings for Samba 3.

Cajus Pollmeier

modules

$ctx array('CtxCfgPresent' => '551e0bb0', 'CtxCfgFlags1' => '00e00010', 'CtxCallback' => '', 'CtxShadow' => '01000000', 'CtxMaxConnectionTime' => '', 'CtxMaxDisconnectionTime' => '', 'CtxMaxIdleTime' => '', 'CtxKeyboardLayout' => '', 'CtxMinEncryptionLevel' => '00', 'CtxWorkDirectory' => '', 'CtxNWLogonServer' => '', 'CtxWFHomeDir' => '', 'CtxWFHomeDirDrive' => '', 'CtxWFProfilePath' => '', 'CtxInitialProgram' => '', 'CtxCallbackNumber' => '') $ctxattributes array("CtxCfgPresent", "CtxCfgFlags1", "CtxCallback", "CtxShadow", "CtxMaxConnectionTime", "CtxMaxDisconnectionTime", "CtxMaxIdleTime", "CtxKeyboardLayout", "CtxMinEncryptionLevel", "CtxWorkDirectory", "CtxNWLogonServer", "CtxWFHomeDir", "CtxWFHomeDirDrive", "CtxWFProfilePath", "CtxInitialProgram", "CtxCallbackNumber") $stringParams array("CtxWorkDirectory", "CtxNWLogonServer", "CtxWFHomeDir", "CtxWFHomeDirDrive", "CtxWFProfilePath", "CtxInitialProgram", "CtxCallbackNumber") $timeParams array("CtxMaxConnectionTime", "CtxMaxDisconnectionTime", "CtxMaxIdleTime") $old_behavior false strhex strhex strhex $string hexstr hexstr hexstr $hex endian endian endian $src genTime genTime genTime $minutes readTime readTime readTime $time to8bit to8bit to8bit $string is_samba_path is_samba_path Checks if this is a valid Samba path. $path encode_munged encode_munged Encode full MungedDial-String $params munge munge Setup parameter given by paramName to MungedDial-Format $paramName $paramValue $isString decode_munged decode_munged Takes a base64-encoded MungedDial-String and returns an array of included parameters and values $munge load load function takes a base64-encoded sambaMungedDial $mungedDial getMunged getMunged Returns ready-to-run mungedDialString to be filled into ldap getOnDemandFlags getOnDemandFlags Returns array of flags, which can be set on-demand with activated java-script getTsLogin getTsLogin Gets Terminal-Server-Login value: enabled/disabled setTsLogin setTsLogin Sets Terminal-Server-Login value: enabled/disabled $checked getBrokenConn getBrokenConn gets Broken-Connection value: disconnect/reset setBrokenConn setBrokenConn sets Broken-Connection value: disconnect/reset $checked getReConn getReConn gets Reconnection value: from any client/from previous client only setReConn setReConn sets Reconnection value: from any client/from previous client only $checked getInheritMode getInheritMode gets Inherit-config-from-client value: enabled/disabled setInheritMode setInheritMode sets Inherit-config-from-client value: enabled/disabled $checked getShadow getShadow gets shadow value (enum): 0-4 0: disabled 1: input on, notify on 2: input on, notify off 3: input off, notify on 4: input off, notify off setShadow setShadow sets shadow value $checked $value getConnectClientDrives getConnectClientDrives gets connect-client-drive-at-logon value: enabled/disabled setConnectClientDrives setConnectClientDrives sets connect-client-drive-at-logon value: enabled/disabled $checked getConnectClientPrinters getConnectClientPrinters gets connect-client-printers-at-logon value: enabled/disabled setConnectClientPrinters setConnectClientPrinters sets connect-client-printers-at-logon value: enabled/disabled $checked getDefaultPrinter getDefaultPrinter gets set-client-printer-to-default value: enabled/disabled setDefaultPrinter setDefaultPrinter sets set-client-printer-to-default value: enabled/disabled $checked getCtxMaxConnectionTimeF getCtxMaxConnectionTimeF SMARTY: gets the checkbox state of "Connection" setCtxMaxConnectionTimeF setCtxMaxConnectionTimeF SMARTY: sets the checkbox "Connection" to unchecked $checked getCtxMaxDisconnectionTimeF getCtxMaxDisconnectionTimeF SMARTY: gets the checkbox state of "Disconnection" setCtxMaxDisconnectionTimeF setCtxMaxDisconnectionTimeF SMARTY: sets the checkbox "Disconnection" to unchecked $checked getCtxMaxIdleTimeF getCtxMaxIdleTimeF SMARTY: gets the checkbox state of "Idle" setCtxMaxIdleTimeF setCtxMaxIdleTimeF SMARTY: sets the checkbox "Idle" to unchecked $checked
No DocBlock was found for property $ctx
No DocBlock was found for property $ctxattributes
No DocBlock was found for property $stringParams
No DocBlock was found for property $timeParams
No DocBlock was found for property $old_behavior
Argument $string is missing from the Docblock of strhex()
Argument $hex is missing from the Docblock of hexstr()
Argument $src is missing from the Docblock of endian()
Argument $minutes is missing from the Docblock of genTime()
Argument $time is missing from the Docblock of readTime()
Argument $string is missing from the Docblock of to8bit()
Argument $path is missing from the Docblock of is_samba_path()
Argument $params is missing from the Docblock of encode_munged()
Argument $paramName is missing from the Docblock of munge()
Argument $paramValue is missing from the Docblock of munge()
Argument $isString is missing from the Docblock of munge()
Argument $munge is missing from the Docblock of decode_munged()
Argument $mungedDial is missing from the Docblock of load()
Argument $checked is missing from the Docblock of setTsLogin()
Argument $checked is missing from the Docblock of setBrokenConn()
Argument $checked is missing from the Docblock of setReConn()
Argument $checked is missing from the Docblock of setInheritMode()
Argument $checked is missing from the Docblock of setShadow()
Argument $value is missing from the Docblock of setShadow()
Argument $checked is missing from the Docblock of setConnectClientDrives()
Argument $checked is missing from the Docblock of setConnectClientPrinters()
Argument $checked is missing from the Docblock of setDefaultPrinter()
Argument $checked is missing from the Docblock of setCtxMaxConnectionTimeF()
Argument $checked is missing from the Docblock of setCtxMaxDisconnectionTimeF()
Argument $checked is missing from the Docblock of setCtxMaxIdleTimeF()
Manages the Asterisk extension of user accounts.

modules

Pavel Pozdnyak

Roland Gruber

\baseModule
\passwordService
asteriskVoicemail
\asteriskVoicemail
Manages the Asterisk extension of user accounts.

modules

__construct
__construct
Creates a new asteriskVoicemail object.

account type (user, group, host)

string
$scope
get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
load_Messages
This function fills the error message array with messages
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Write variables into object and do some regex checks
get_pdfEntries
get_pdfEntries
Returns a list of PDF entries
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
module_complete
module_complete
This functions returns true if all needed settings are done.

true if LDAP operation can be done

boolean
save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
managesPasswordAttributes
managesPasswordAttributes
This method specifies if a module manages password attributes.

\global\passwordService::managesPasswordAttributes

true if this module manages password attributes

boolean
supportsForcePasswordChange
supportsForcePasswordChange
Specifies if this module supports to force that a user must change his password on next login.

force password change supported

boolean
passwordChangeRequested
passwordChangeRequested
This function is called whenever the password should be changed.
<p>Account modules must change their password attributes only if the modules list contains their module name.</p>

new password

String

list of modules for which the password should be changed

\$modules

force the user to change his password at next login

boolean

list of error messages if any as parameter array for StatusMessage e.g. return arrray(array('ERROR', 'Password change failed.'))

array

\global\passwordService::passwordChangeRequested

$password
$modules
$forcePasswordChange
checkSelfServiceOptions
checkSelfServiceOptions
Checks if all input values are correct and returns the LDAP attributes which should be changed.
<p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p>

<p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p>

input fields

string

LDAP attributes

array

indicates that the user is only allowed to change his password and no LDAP content is readable

boolean

list of read-only fields

array

messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array(), 'info' => array()))

array
$fields
$attributes
$passwordChangeOnly
$readOnlyFields
Provides mail routing for user accounts.

modules

Roland Gruber

\baseModule
inetLocalMailRecipient
\inetLocalMailRecipient
Provides mail routing for users.

modules

get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the error message array with messages
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
Manages mailboxes on an IMAP server.

modules

Pavel Pozdniak

Roland Gruber

\baseModule
imapAccess
\imapAccess
Manages mailboxes on an IMAP server.

modules

Pavel Pozdniak

Roland Gruber

$profileQuotaLimit null quota limit from profile get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `array` display_html_password display_html_password Returns the HTML meta data for the password page. `array` renderQuotasForMailbox renderQuotasForMailbox Display the mailbox quota. `\htmlTable` `\stream` `String` `\htmlTable` $htmlTable $mbox $username process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` load_profile load_profile Loads the values of an account profile into internal variables. `array` $profile getAdminPassword getAdminPassword Returns the admin password. `String` doLogin doLogin Checks the password given by user and save it as session parameter. `array` getServerAddress getServerAddress This function returns the IMAP server address including encryption options. `String` getMailboxPrefix getMailboxPrefix This function returns the prefix for mailboxes. <p>If no prefix was given during configuration then "user" will be used (default for Cyrus).</p> `String` isWrongDomain isWrongDomain This function checks if the domain of the mailbox is not in the list of domains listed in the configuration. <p>If it is in the list then it returns false, otherwise returns true. If the list of domains is not set then it returns true.</p> `String` `boolean` $email_domain getSep getSep Returns the path separator. `String`
Manages fixed IP addresses.

modules

Thomas Manninger

Roland Gruber

\baseModule
fixed_ip
\fixed_ip
Manages fixed IP addresses.

modules

$fixed_ip fixed ips $processed false already processed? $overlapd for check if IPs overlap $orig_ips array() original IPs $attributes LDAP attributes get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages. getButtonStatus getButtonStatus Controls if the module button the account page is visible and activated. `string` overlapd_ip overlapd_ip Checked, if ips are overlapd. `` `\false,` $ip reset_overlapd_ip reset_overlapd_ip Reset the overlapd_range() function check_mac check_mac Check, if a mac address is invalid `\mac` `\true,` $mac reload_ips reload_ips Adapt the fixed ip with the subnet. `\true,` load_attributes load_attributes This function loads all needed LDAP attributes. `array` $attr process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` postModifyActions postModifyActions This function is overwritten because the fixed IPs are set after the ldap_add command. `` `boolean` `array` `array` $newAccount $attributes get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array`
Provides Authorized Service for accounts.

modules

J de Jong

\baseModule
authorizedServiceObject
\authorizedServiceObject
Provides Authorized Service for accounts.

modules

__construct
__construct
Creates a new authorizedServiceObject object.

account type (user, group, host)

string
$scope
get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
load_Messages
This function fills the error message array with messages
save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
load_profile
load_profile
Loads the values of an account profile into internal variables.

hash array with profile values (identifier => value)

array
$profile
Manages Windows AD (e.g.
<p>Samba 4) groups.</p>

modules

Roland Gruber

\baseModule
windowsGroup
\windowsGroup
Manages Windows AD (e.g.
<p>Samba 4) groups.</p>

modules

TYPE_SECURITY
TYPE_SECURITY
'security'
security group
TYPE_DISTRIBUTION
TYPE_DISTRIBUTION
'distribution'
email list
SCOPE_DOMAIN_LOCAL
SCOPE_DOMAIN_LOCAL
'domain'
domain local group
SCOPE_GLOBAL
SCOPE_GLOBAL
'global'
global group
SCOPE_UNIVERSAL
SCOPE_UNIVERSAL
'universal'
universal group
$groupTypes possible group types (e.g. <p>distribution)</p> $groupScopes possible group scopes (e.g. <p>universal)</p> __construct __construct Creates a new module for Samba 3 groups. `string` $scope get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the $messages variable with output messages from this module. display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_user display_html_user This function will create the meta HTML code to show a page to change the member attribute. `\htmlElement` process_user process_user Processes user input of the members page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules get_pdfEntries get_pdfEntries Returns a list of PDF entries
Provides NIS mail alias management.

modules

Roland Gruber

\baseModule
nisMailAlias
\nisMailAlias
Provides NIS mail alias management.

modules

$cachedMailList null mail cache get_metaData get_metaData Returns meta data that is interpreted by parent class `array` `` load_Messages load_Messages This function fills the error message array with messages save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. `array` display_html_attributes display_html_attributes Returns the HTML meta data for the main account page. `\htmlElement` process_attributes process_attributes Processes user input of the primary module page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` display_html_select display_html_select Displays the host/user selection. `\htmlElement` process_select process_select Processes user input of the host/user selection page. <p>It checks if all input values are correct and updates the associated LDAP attributes.</p> `array` getButtonStatus getButtonStatus Controls if the module button the account page is visible and activated. `string` build_uploadAccounts build_uploadAccounts In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` getMailList getMailList Returns a list of existing email addresses. `array`
Manages the hosts to which a user may login.

modules

Roland Gruber

\baseModule
hostObject
\hostObject
Manages the hosts to which a user may login.

modules

__construct
__construct
Creates a new hostObject object.

account type (user, group, host)

string
$scope
get_metaData
get_metaData
Returns meta data that is interpreted by parent class

array with meta data

array

\global\baseModule::get_metaData()

load_Messages
load_Messages
This function fills the error message array with messages
save_attributes
save_attributes
Returns a list of modifications which have to be made to the LDAP account.

list of modifications <br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It may be possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid) <br>"add" are attributes which have to be added to LDAP entry <br>"remove" are attributes which have to be removed from LDAP entry <br>"modify" are attributes which have to been modified in LDAP entry <br>"info" are values with informational value (e.g. to be used later by pre/p

array
display_html_attributes
display_html_attributes
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
process_attributes
Processes user input of the primary module page.
<p>It checks if all input values are correct and updates the associated LDAP attributes.</p>

list of info/error messages

array
build_uploadAccounts
build_uploadAccounts
In this function the LDAP account is built up.

list of hash arrays (name => value) from user input

array

list of IDs for column position (e.g. "posixAccount_uid" => 5)

array

list of hash arrays (name => value) which are later added to LDAP

array

list of selected account modules

array

list of error messages if any

array
$rawAccounts
$ids
$partialAccounts
$selectedModules
get_pdfEntries
get_pdfEntries
Returns the PDF entries for this module.

list of possible PDF entries

array
load_profile
load_profile
Loads the values of an account profile into internal variables.

hash array with profile values (identifier => value)

array
$profile
Simple XML parser.

Michael Duergner

PDF

xmlParser
\xmlParser
Simple XML parser.

Michael Duergner

PDF

$xmlParser XML parser __construct __construct Constructor parse parse Starts the parsing. `String` `array` $filename
This is the parent class of all account types.

types

Roland Gruber

baseType
\baseType
This is the parent class of all account types.

types

$LABEL_CREATE_ANOTHER_ACCOUNT label to create another account $LABEL_BACK_TO_ACCOUNT_LIST label to return to account list __construct __construct Creates a new type object. getAlias getAlias Returns the alias name of this account type. <p>This function must be overwritten by the child classes.</p> `string` getDescription getDescription Returns the description of this account type. <p>This function must be overwritten by the child classes.</p> `string` getListClassName getListClassName Returns the class name for the list object. `string` getDefaultListAttributes getDefaultListAttributes Returns the default attribute list for this account type. <p>This function must be overwritten by the child classes.</p> `string` getListAttributeDescriptions getListAttributeDescriptions Returns a list of attributes which have a translated description. <p>This is used for the head row in the list view.</p> `array` supportsFileUpload supportsFileUpload Returns if entries of this type may be created via file upload. `boolean` getTitleBarTitle getTitleBarTitle Returns the the title text for the title bar on the new/edit page. `\accountContainer` `String` $container getTitleBarSubtitle getTitleBarSubtitle Returns the the title text for the title bar on the new/edit page. `\accountContainer` `String` $container getSuffixList getSuffixList Returns a list of LDAP suffixes for this type. `array` runEditPagePostAction runEditPagePostAction This function is called after the edit page is processed and before the page content is generated. <p>This can be used to run custom handlers after each page processing.</p> `\accountContainer` $container
Checks if the environment fits to run LAM.
<p>This code checks if the PHP version is ok, the required extensions are active and the memory limit is high enough.</p>

Roland Gruber

main

../lib/status.inc
status messages
../lib/config.inc
config
Functions to manage the PDF structures.

Michael Duergner

PDF

config.inc
LAM configuration
ldap.inc
LDAP object
getPDFStructureDefinitions
\getPDFStructureDefinitions
This function will return all available PDF structure definitions for the submitted account scope.

The account scope the PDF structure definitions should be returned.

string

server profile name

string

$scope All available PDF structure definitions for the submitted account scope. Each entry is a string being the filename that may be passed to the createModulePDF() function as second argument.

array
$scope
"user"
$profile
null
loadPDFStructureDefinitions
\loadPDFStructureDefinitions
This function is used to get pdf structure from xml file.
<p>Used in createModulePDF.</p>

The account scope for wich the PDF structure should be returned.

string

Structure name of selected scope wich should be returned.

string

PDF structure

array
$scope
'user'
$pdf_structure
'default'
savePDFStructureDefinitions
\savePDFStructureDefinitions
Saves PDF structure definitions to XML file in format: <name>.<scope>.xml

account type

string

Name of definition

string

"no perms" if access denied or "ok".

string
$scope
$definition
deletePDFStructureDefinition
\deletePDFStructureDefinition
Deletes XML file with PDF structure definitions.

account type

string

Name of definition to delete

string

True if file was deleted or false if a problem occured.

boolean
$scope
$definition
getAvailableLogos
\getAvailableLogos
This function returns an array with all aviliable logo images.

list of logo files

array
copyPdfProfiles
\copyPdfProfiles
Copies PDF profiles to other server profiles.

PDF profile names

array

account scope

String

destinations

array

operation succeeded

boolean
$pdfProfiles
$scope
$dests
array()
This file includes functions to manage the list views.

lists

Roland Gruber

types.inc
Used to get type information.
pdfstruct.inc
Used to get PDF information.
pdf.inc
Used to create PDF files.
../main_header.php
../main_footer.php
lamList
\lamList
Generates the list view.

lists

Roland Gruber

LIST_SIZE_OPTION_NAME
LIST_SIZE_OPTION_NAME
"L_SIZE"
ID for list size config option
VIRTUAL_ATTRIBUTE_PREFIX
VIRTUAL_ATTRIBUTE_PREFIX
'lam_virtual_'
prefix for virtual (non-LDAP) attributes
$type Account type $page 1 current page number $attrArray array() list of LDAP attributes $descArray array() list of attribute descriptions $maxPageEntries 30 maximum count of entries per page $sortColumn sort column name $sortDirection 1 sort direction: 1 for ascending, -1 for descending $suffix LDAP suffix $refresh true refresh page switch $entries LDAP entries $sortMapping sort mapping for entries array(original index => sorted index) $filters array() list of filters (attribute name => filter input) $possibleSuffixes list of possible LDAP suffixes(organizational units) $labels list of account specific labels $configOptions configuration options $tabindex 1 tabindex for GUI elements __construct __construct Constructor `string` `\lamList` $type listReadOptionsFromCookie listReadOptionsFromCookie Reads the list options from the cookie value. showPage showPage Prints the HTML code to display the list view. listBuildFilter listBuildFilter Builds the regular expressions from the filter values. listCreateSortMapping listCreateSortMapping Determines the sort mapping and stores it in $this->sortMapping. <p>The sort mapping is used to display the right rows when the account table is created.</p> `array` $info listDrawNavigationBar listDrawNavigationBar Draws a navigation bar to switch between pages `integer` $count getFilterAsTextForURL getFilterAsTextForURL Returns the filter as text to be used as URL parameter. `String` listPrintTableHeader listPrintTableHeader Prints the attribute and filter row at the account table head canBeFiltered canBeFiltered Returns if the given attribute can be filtered. <p>If filtering is not possible then no filter box will be displayed. By default all attributes can be filtered.</p> `String` `boolean` $attr listPrintTableBody listPrintTableBody Prints the entry list `array` $info listPrintToolLinks listPrintToolLinks Prints the tool image links (e.g. <p>edit and delete) for each account.</p> `array` `String` $account $id listPrintTableCellContent listPrintTableCellContent Prints the content of a cell in the account list for a given LDAP entry and attribute. `array` `string` $entry $attribute listDoPost listDoPost Manages all POST actions (e.g. <p>button pressed) for the account lists.</p> `String` showPDFPage showPDFPage Shows the page where the user may select the PDF options. `String` $id listShowOUSelection listShowOUSelection Prints a combobox with possible sub-DNs. `\htmlGroup` listPrintButtons listPrintButtons Prints the create and delete buttons. `boolean` `int` $createOnly addExtraInputElementsToTopArea addExtraInputElementsToTopArea Can be used by subclasses to add e.g. <p>additional buttons to the top area.</p> `\htmlGroup` `\htmlGroup` $left $right listPrintHeader listPrintHeader Prints the HTML header. listPrintFooter listPrintFooter Prints the HTML footer. listGetAttributeDescriptionList listGetAttributeDescriptionList Returns an hash array containing with all attributes to be shown and their descriptions. <p>Format: array(attribute => description)</p> `array` listGetParams listGetParams Sets some internal parameters. listRefreshData listRefreshData Rereads the entries from LDAP. buildLDAPAttributeFilter buildLDAPAttributeFilter Builds the LDAP filter based on the filter entries in the GUI. `String` forceRefresh forceRefresh Forces a refresh of the LDAP data. <p>Function must be called before $this->refresh option is checked to load new LDAP data (e.g. in listGetParams).</p> getAdditionalLDAPAttributesToRead getAdditionalLDAPAttributesToRead Returns a list of additional LDAP attributes that should be read. <p>This can be used to show additional data even if the user selected other attributes to show in the list.</p> `array` getAdditionalTools getAdditionalTools Returns a list of lamListTool objects to display next to the edit/delete buttons. `\lamListTool[]` listGetAllConfigOptions listGetAllConfigOptions Returns a list of possible configuration options. `array` listPrintConfigurationPage listPrintConfigurationPage Prints the list configuration page. listGetConfigOptionByID listGetConfigOptionByID Returns the configuration option with the given ID. `String` $ID listConfigurationChanged listConfigurationChanged Called when the configuration options changed. listPrintRedirectMessages listPrintRedirectMessages Prints messages when another page (e.g. <p>delete/upload) redirects to the list view.</p>
lamListTool
\lamListTool
Represents a tool which can be included in the account lists.

lists

Roland Gruber

$name tool name $image tool image $target link target __construct __construct Constructor `String` `String` `String` `\lamListTool` $name $image $target getImage getImage Returns the name of the tool image. <p>The image is returned without path (e.g. mytool.png). All images must reside in the graphics folder.</p> `String` getName getName Returns the tool name. <p>This is used for the tool tip.</p> `String` getLinkTarget getLinkTarget Returns the PHP file (relative to 'templates/lists') which will be the target for this tool. <p>The target page will be opened with two GET parameters: DN and type (e.g. user)</p> `String`
lamListOption
\lamListOption
Represents a list configuration option.

lists

Roland Gruber

$ID unique ID $value option value __construct __construct Creates a new config option. `String` `\lamConfigOption` $ID getID getID Returns the option ID. `String` fillFromPostData fillFromPostData Fills the config option from POST data. `array` getValue getValue Returns the option value. <p>The value must not contain "=" and ";".</p> `String` setValue setValue Sets the config option value. <p>The value must not contain "=" and ";".</p> `String` $value getMetaHTML getMetaHTML Returns the meta HTML data to display this option. `\htmlTable`
\lamListOption
lamBooleanListOption
\lamBooleanListOption
Boolean option for list configuration.

lists

Roland Gruber

$name option name __construct __construct Creates a new boolean option. `String` `String` `\lamBooleanListOption` $name $ID isSelected isSelected Returns if this option is selected. `boolean` fillFromPostData fillFromPostData Fills the config option from POST data. `array` getMetaHTML getMetaHTML Returns the meta HTML data to display this option. `\htmlTable`
\lamListOption
lamSelectListOption
\lamSelectListOption
Boolean option for list configuration.

lists

Roland Gruber

$name option name $options possible select options $helpID help ID __construct __construct Creates a new selection list option. `String` `array` `String` `\lamBooleanListOption` $name $options $ID setHelpID setHelpID Sets the help ID. `\Strign` $id fillFromPostData fillFromPostData Fills the config option from POST data. `array` getMetaHTML getMetaHTML Returns the meta HTML data to display this option. `\htmlTable`
Parameter $tabindex could not be found in listPrintButtons()
LDAP Account Manager PDF printing library.
<p>It consists of lamPDF class, the createModulePDF() function that may be called by other pages and furthermore some helper functions.</p>

Michael Duergner

Roland Gruber

PDF

xml_parser.inc
XML functions
pdfstruct.inc
access to PDF configuration files
fpdf.php
PDF generator class
ufpdf.php
Unicode support for FPDF
lamPDF.inc
LAM PDF generator class
LAMPDF_LINEWIDTH
\LAMPDF_LINEWIDTH
190
PDF line width
createModulePDF
\createModulePDF
This function creates the PDF output of one or more accounts.

A numbered array containing all accounts the PDF page should be created for. The entries of the array must be AccountContainer objects.

array

The filename of the structure definition that should be used to create the PDF page. If not submitted the 'default.user' structure definition for the appropriate account type.

string

returns the PDF output as String value instead of writing it to a file

\$returnAsString

PDF file name

String
$accounts
$pdf_structure
"default"
$returnAsString
false
getSectionHeadline
\getSectionHeadline
Creates a section headline.

section name

string

XML code for headline

string
$line
processLine
\processLine
Creates the XML code for an PDF entry.

XML code of PDF entry

string

True if this is the first column

boolean

font name

String

XML codes

array
$line
$first_td
true
$fontName
processFormatTags
\processFormatTags
Formats the XML code.

XML code of PDF entry

string

style commands

string

XML code

array
$line
$style
processAttributes
\processAttributes
Processes width, height and alignment attributes.

attributes

string

XML code

array

XML code

array
$attrs
$return
array()
Replace str_split()

PHP

PHP_Compat

LGPL - http://www.gnu.org/licenses/lgpl.html

2004-2007 Aidan Lister <aidan@php.net>, Arpad Ray <arpad@php.net>

http://php.net/function.str_split

Aidan Lister <aidan@php.net>

$Revision: 3620 $

PHP 5

PHP 4.0.0 (user_error)

php_compat_str_split
\php_compat_str_split
$string
$split_length
1
str_split
\str_split
$string
$split_length
1
No DocBlock was found for function \php_compat_str_split()
No DocBlock was found for function \str_split()
Replace bcpowmod()

PHP

PHP_Compat

LGPL - http://www.gnu.org/licenses/lgpl.html

2004-2007 Aidan Lister <aidan@php.net>, Arpad Ray <arpad@php.net>

http://php.net/function.bcpowmod

Sara Golemon <pollita@php.net>

$Revision: 4105 $

PHP 5.0.0

PHP 4.0.0 (user_error)

php_compat_bcpowmod
\php_compat_bcpowmod
$x
$y
$modulus
$scale
0
bcpowmod
\bcpowmod
$x
$y
$modulus
$scale
0
No DocBlock was found for function \php_compat_bcpowmod()
No DocBlock was found for function \bcpowmod()
Replace array_fill()

PHP

PHP_Compat

http://www.opensource.org/licenses/mit-license.html MIT License

2004-2007 Aidan Lister <aidan@php.net>, Arpad Ray <arpad@php.net>

http://php.net/function.array_fill

Jim Wigginton <terrafrost@php.net>

$Revision: 4105 $

PHP 4.2.0

php_compat_array_fill
\php_compat_array_fill
$start_index
$num
$value
array_fill
\array_fill
$start_index
$num
$value
No DocBlock was found for function \php_compat_array_fill()
No DocBlock was found for function \array_fill()
Pure-PHP implementation of SSHv1.
<p>PHP versions 4 and 5</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Net/SSH1.php');

$ssh = new Net_SSH1('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed'); }

echo $ssh->exec('ls -la'); ?> </code></pre>

<p>Here's another short example:</p>

<pre><code><?php include('Net/SSH1.php');

$ssh = new Net_SSH1('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed'); }

echo $ssh->read('username@username:~$'); $ssh->write("ls -la\n"); echo $ssh->read('username@username:~$'); ?> </code></pre>

<p>More information on the SSHv1 specification can be found by reading {@link http://www.snailbook.com/docs/protocol-1.5.txt protocol-1.5.txt}.</p>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Net

Net_SSH1

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: SSH1.php 4506 2012-05-20 09:53:15Z gruberroland $

http://phpseclib.sourceforge.net

Math/BigInteger.php
Include Math_BigInteger
<p>Used to do RSA encryption.</p>
Crypt/DES.php
Include Crypt_DES
Crypt/TripleDES.php
Include Crypt_TripleDES
Crypt/RC4.php
Include Crypt_RC4
Crypt/Random.php
Include Crypt_Random
NET_SSH1_CIPHER_NONE
\NET_SSH1_CIPHER_NONE
0
No encryption
<p>Not supported.</p>
NET_SSH1_CIPHER_IDEA
\NET_SSH1_CIPHER_IDEA
1
IDEA in CFB mode
<p>Not supported.</p>
NET_SSH1_CIPHER_DES
\NET_SSH1_CIPHER_DES
2
DES in CBC mode
NET_SSH1_CIPHER_3DES
\NET_SSH1_CIPHER_3DES
3
Triple-DES in CBC mode
<p>All implementations are required to support this</p>
NET_SSH1_CIPHER_BROKEN_TSS
\NET_SSH1_CIPHER_BROKEN_TSS
4
TRI's Simple Stream encryption CBC
<p>Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, does define it (see cipher.h), although it doesn't use it (see cipher.c)</p>
NET_SSH1_CIPHER_RC4
\NET_SSH1_CIPHER_RC4
5
RC4
<p>Not supported.</p>

According to the SSH1 specs: "The first 16 bytes of the session key are used as the key for the server to client direction. The remaining 16 bytes are used as the key for the client to server direction. This gives independent 128-bit keys for each direction." This library currently only supports encryption when the same key is being used for both directions. This is because there's only one $crypto object. Two could be added ($encrypt and $decrypt, perhaps).

NET_SSH1_CIPHER_BLOWFISH
\NET_SSH1_CIPHER_BLOWFISH
6
Blowfish
<p>Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, defines it (see cipher.h) and uses it (see cipher.c)</p>
NET_SSH1_AUTH_RHOSTS
\NET_SSH1_AUTH_RHOSTS
1
NET_SSH1_AUTH_RSA
\NET_SSH1_AUTH_RSA
2
pure RSA authentication
NET_SSH1_AUTH_PASSWORD
\NET_SSH1_AUTH_PASSWORD
3
password authentication
<p>This is the only method that is supported by this library.</p>
NET_SSH1_AUTH_RHOSTS_RSA
\NET_SSH1_AUTH_RHOSTS_RSA
4
NET_SSH1_TTY_OP_END
\NET_SSH1_TTY_OP_END
0
NET_SSH1_RESPONSE_TYPE
\NET_SSH1_RESPONSE_TYPE
1
The Response Type

\global\Net_SSH1::_get_binary_packet()

private

NET_SSH1_RESPONSE_DATA
\NET_SSH1_RESPONSE_DATA
2
The Response Data

\global\Net_SSH1::_get_binary_packet()

private

NET_SSH1_MASK_CONSTRUCTOR
\NET_SSH1_MASK_CONSTRUCTOR
1
NET_SSH1_MASK_LOGIN
\NET_SSH1_MASK_LOGIN
2
NET_SSH1_MASK_SHELL
\NET_SSH1_MASK_SHELL
4
NET_SSH1_LOG_SIMPLE
\NET_SSH1_LOG_SIMPLE
1
Returns the message numbers
NET_SSH1_LOG_COMPLEX
\NET_SSH1_LOG_COMPLEX
2
Returns the message content
NET_SSH1_READ_SIMPLE
\NET_SSH1_READ_SIMPLE
1
Returns when a string matching $expect exactly is found
NET_SSH1_READ_REGEX
\NET_SSH1_READ_REGEX
2
Returns when a string matching the regular expression $expect is found
$value
\$value
$key
Net_SSH1
\Net_SSH1
Pure-PHP implementation of SSHv1.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Net_SSH1

$identifier 'SSH-1.5-phpseclib' The SSH identifier `String` `` $fsock The Socket Object `Object` `` $crypto false The cryptography object `Object` `` $bitmap 0 Execution Bitmap <p>The bits that are set represent functions that have been called already. This is used to determine if a requisite function has been successfully executed. If not, an error should be thrown.</p> `Integer` `` $server_key_public_exponent The Server Key Public Exponent <p>Logged for debug purposes</p> `` `String` `` $server_key_public_modulus The Server Key Public Modulus <p>Logged for debug purposes</p> `` `String` `` $host_key_public_exponent The Host Key Public Exponent <p>Logged for debug purposes</p> `` `String` `` $host_key_public_modulus The Host Key Public Modulus <p>Logged for debug purposes</p> `` `String` `` $supported_ciphers array(NET_SSH1_CIPHER_NONE => 'No encryption', NET_SSH1_CIPHER_IDEA => 'IDEA in CFB mode', NET_SSH1_CIPHER_DES => 'DES in CBC mode', NET_SSH1_CIPHER_3DES => 'Triple-DES in CBC mode', NET_SSH1_CIPHER_BROKEN_TSS => 'TRI\'s Simple Stream encryption CBC', NET_SSH1_CIPHER_RC4 => 'RC4', NET_SSH1_CIPHER_BLOWFISH => 'Blowfish') Supported Ciphers <p>Logged for debug purposes</p> `` `Array` `` $supported_authentications array(NET_SSH1_AUTH_RHOSTS => '.rhosts or /etc/hosts.equiv', NET_SSH1_AUTH_RSA => 'pure RSA authentication', NET_SSH1_AUTH_PASSWORD => 'password authentication', NET_SSH1_AUTH_RHOSTS_RSA => '.rhosts with RSA host authentication') Supported Authentications <p>Logged for debug purposes</p> `` `Array` `` $server_identification '' Server Identification `` `String` `` $protocol_flags array() Protocol Flags `` `Array` `` $protocol_flag_log array() Protocol Flag Log `` `Array` `` $message_log array() Message Log `` `Array` `` $interactive_buffer '' Interactive Buffer `` `Array` `` Net_SSH1 Net_SSH1 Default Constructor. <p>Connects to an SSHv1 server</p> `String` `\optional` `\optional` `\optional` `\Net_SSH1` `` $host $port 22 $timeout 10 $cipher NET_SSH1_CIPHER_3DES login login Login `String` `\optional` `Boolean` `` $username $password '' exec exec Executes a command on a non-interactive shell, returns the output, and quits. <p>An SSH1 server will close the connection after a command has been executed on a non-interactive shell. SSH2 servers don't, however, this isn't an SSH2 client. The way this works, on the server, is by initiating a shell with the -s option, as discussed in the following links:</p> <p>{@link http://www.faqs.org/docs/bashman/bashref_65.html http://www.faqs.org/docs/bashman/bashref_65.html} {@link http://www.faqs.org/docs/bashman/bashref_62.html http://www.faqs.org/docs/bashman/bashref_62.html}</p> <p>To execute further commands, a new Net_SSH1 object will need to be created.</p> <p>Returns false on failure and the output, otherwise.</p> `` `` `String` `mixed` `` $cmd $block true _initShell _initShell Creates an interactive shell `` `` `Boolean` `` write write Inputs a command into an interactive shell. `` `String` `Boolean` `` $cmd read read Returns the output of an interactive shell when there's a match for $expect <p>$expect can take the form of a string literal or, if $mode == NET_SSH1_READ_REGEX, a regular expression.</p> `` `String` `Integer` `Boolean` `` $expect $mode NET_SSH1_READ_SIMPLE interactiveWrite interactiveWrite Inputs a command into an interactive shell. `` `String` `Boolean` `` $cmd interactiveRead interactiveRead Returns the output of an interactive shell when no more output is available. <p>Requires PHP 4.3.0 or later due to the use of the stream_select() function. If you see stuff like "00m", you're seeing ANSI escape codes. According to {@link http://support.microsoft.com/kb/101875 How to Enable ANSI.SYS in a Command Window}, "Windows NT does not support ANSI escape sequences in Win32 Console applications", so if you're a Windows user, there's not going to be much recourse.</p> `` `String` `` disconnect disconnect Disconnect `` __destruct __destruct Destructor. <p>Will be called, automatically, if you're supporting just PHP5. If you're supporting PHP4, you'll need to call disconnect().</p> `` _disconnect _disconnect Disconnect `String` `` $msg 'Client Quit' _get_binary_packet _get_binary_packet Gets Binary Packets <p>See 'The Binary Packet Protocol' of protocol-1.5.txt for more info.</p> <p>Also, this function could be improved upon by adding detection for the following exploit: http://www.securiteam.com/securitynews/5LP042K3FY.html</p> `` `Array` `` _send_binary_packet _send_binary_packet Sends Binary Packets <p>Returns true on success, false on failure.</p> `` `String` `Boolean` `` $data _crc _crc Cyclic Redundancy Check (CRC) <p>PHP's crc32 function is implemented slightly differently than the one that SSH v1 uses, so we've reimplemented it. A more detailed discussion of the differences can be found after $crc_lookup_table's initialization.</p> `` `` `String` `Integer` `` $data _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1 _rsa_crypt _rsa_crypt RSA Encrypt <p>Returns mod(pow($m, $e), $n), where $n should be the product of two (large) primes $p and $q and where $e should be a number with the property that gcd($e, ($p - 1) * ($q - 1)) == 1. Could just make anything that calls this call modexp, instead, but I think this makes things clearer, maybe...</p> `` `\Math_BigInteger` `Array` `\Math_BigInteger` `` $m $key _define_array _define_array Define Array <p>Takes any number of arrays whose indices are integers and whose values are strings and defines a bunch of named constants from it, using the value as the name of the constant and the index as the value of the constant. If any of the constants that would be defined already exists, none of the constants will be defined.</p> `Array` `` getLog getLog Returns a log of the packets that have been sent and received. <p>Returns a string if NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX, an array if NET_SSH2_LOGGING == NET_SSH2_LOG_SIMPLE and false if !defined('NET_SSH2_LOGGING')</p> `` `String` _format_log _format_log Formats a log for printing `Array` `Array` `` `String` $message_log $message_number_log getServerKeyPublicExponent getServerKeyPublicExponent Return the server key public exponent <p>Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, the raw bytes. This behavior is similar to PHP's md5() function.</p> `\optional` `String` `` $raw_output false getServerKeyPublicModulus getServerKeyPublicModulus Return the server key public modulus <p>Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, the raw bytes. This behavior is similar to PHP's md5() function.</p> `\optional` `String` `` $raw_output false getHostKeyPublicExponent getHostKeyPublicExponent Return the host key public exponent <p>Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, the raw bytes. This behavior is similar to PHP's md5() function.</p> `\optional` `String` `` $raw_output false getHostKeyPublicModulus getHostKeyPublicModulus Return the host key public modulus <p>Returns, by default, the base-10 representation. If $raw_output is set to true, returns, instead, the raw bytes. This behavior is similar to PHP's md5() function.</p> `\optional` `String` `` $raw_output false getSupportedCiphers getSupportedCiphers Return a list of ciphers supported by SSH1 server. <p>Just because a cipher is supported by an SSH1 server doesn't mean it's supported by this library. If $raw_output is set to true, returns, instead, an array of constants. ie. instead of array('Triple-DES in CBC mode'), you'll get array(NET_SSH1_CIPHER_3DES).</p> `\optional` `Array` `` $raw_output false getSupportedAuthentications getSupportedAuthentications Return a list of authentications supported by SSH1 server. <p>Just because a cipher is supported by an SSH1 server doesn't mean it's supported by this library. If $raw_output is set to true, returns, instead, an array of constants. ie. instead of array('password authentication'), you'll get array(NET_SSH1_AUTH_PASSWORD).</p> `\optional` `Array` `` $raw_output false getServerIdentification getServerIdentification Return the server identification. `String` ``
Argument $block is missing from the Docblock of exec()
Parameter $array could not be found in _define_array()
Pure-PHP implementation of SSHv2.
<p>PHP versions 4 and 5</p>

<p>Here are some examples of how to use this library:</p>

<pre><code><?php include('Net/SSH2.php');

$ssh = new Net_SSH2('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed'); }

echo $ssh->exec('pwd'); echo $ssh->exec('ls -la'); ?> </code></pre>

<pre><code><?php include('Crypt/RSA.php'); include('Net/SSH2.php');

$key = new Crypt_RSA(); //$key->setPassword('whatever'); $key->loadKey(file_get_contents('privatekey'));

$ssh = new Net_SSH2('www.domain.tld'); if (!$ssh->login('username', $key)) { exit('Login Failed'); }

echo $ssh->read('username@username:~$'); $ssh->write("ls -la\n"); echo $ssh->read('username@username:~$'); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Net

Net_SSH2

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: SSH2.php 4119 2011-05-31 16:32:25Z gruberroland $

http://phpseclib.sourceforge.net

Math/BigInteger.php
Include Math_BigInteger
<p>Used to do Diffie-Hellman key exchange and DSA/RSA signature verification.</p>
Crypt/Random.php
Include Crypt_Random
Crypt/Hash.php
Include Crypt_Hash
Crypt/TripleDES.php
Include Crypt_TripleDES
Crypt/RC4.php
Include Crypt_RC4
Crypt/AES.php
Include Crypt_AES
NET_SSH2_MASK_CONSTRUCTOR
\NET_SSH2_MASK_CONSTRUCTOR
1
NET_SSH2_MASK_LOGIN
\NET_SSH2_MASK_LOGIN
2
NET_SSH2_MASK_SHELL
\NET_SSH2_MASK_SHELL
4
NET_SSH2_CHANNEL_EXEC
\NET_SSH2_CHANNEL_EXEC
0
NET_SSH2_CHANNEL_SHELL
\NET_SSH2_CHANNEL_SHELL
1
NET_SSH2_LOG_SIMPLE
\NET_SSH2_LOG_SIMPLE
1
Returns the message numbers
NET_SSH2_LOG_COMPLEX
\NET_SSH2_LOG_COMPLEX
2
Returns the message content
NET_SSH2_READ_SIMPLE
\NET_SSH2_READ_SIMPLE
1
Returns when a string matching $expect exactly is found
NET_SSH2_READ_REGEX
\NET_SSH2_READ_REGEX
2
Returns when a string matching the regular expression $expect is found
$value
\$value
$key
Net_SSH2
\Net_SSH2
Pure-PHP implementation of SSHv2.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Net_SSH2

$identifier 'SSH-2.0-phpseclib_0.2' The SSH identifier `String` `` $fsock The Socket Object `Object` `` $bitmap 0 Execution Bitmap <p>The bits that are set reprsent functions that have been called already. This is used to determine if a requisite function has been successfully executed. If not, an error should be thrown.</p> `Integer` `` $errors array() Error information `` `` `String` `` $server_identifier '' Server Identifier `` `String` `` $kex_algorithms Key Exchange Algorithms `` `Array` `` $server_host_key_algorithms Server Host Key Algorithms `` `Array` `` $encryption_algorithms_client_to_server Encryption Algorithms: Client to Server `` `Array` `` $encryption_algorithms_server_to_client Encryption Algorithms: Server to Client `` `Array` `` $mac_algorithms_client_to_server MAC Algorithms: Client to Server `` `Array` `` $mac_algorithms_server_to_client MAC Algorithms: Server to Client `` `Array` `` $compression_algorithms_client_to_server Compression Algorithms: Client to Server `` `Array` `` $compression_algorithms_server_to_client Compression Algorithms: Server to Client `` `Array` `` $languages_server_to_client Languages: Server to Client `` `Array` `` $languages_client_to_server Languages: Client to Server `` `Array` `` $encrypt_block_size 8 Block Size for Server to Client Encryption <p>"Note that the length of the concatenation of 'packet_length', 'padding_length', 'payload', and 'random padding' MUST be a multiple of the cipher block size or 8, whichever is larger. This constraint MUST be enforced, even when using stream ciphers."</p> <p>-- http://tools.ietf.org/html/rfc4253#section-6</p> `` `` `Integer` `` $decrypt_block_size 8 Block Size for Client to Server Encryption `` `` `Integer` `` $decrypt false Server to Client Encryption Object `` `Object` `` $encrypt false Client to Server Encryption Object `` `Object` `` $hmac_create false Client to Server HMAC Object `` `Object` `` $hmac_check false Server to Client HMAC Object `` `Object` `` $hmac_size false Size of server to client HMAC <p>We need to know how big the HMAC will be for the server to client direction so that we know how many bytes to read. For the client to server side, the HMAC object will make the HMAC as long as it needs to be. All we need to do is append it.</p> `` `Integer` `` $server_public_host_key Server Public Host Key `` `String` `` $session_id false Session identifer <p>"The exchange hash H from the first key exchange is additionally used as the session identifier, which is a unique identifier for this connection."</p> <p>-- http://tools.ietf.org/html/rfc4253#section-7.2</p> `` `String` `` $exchange_hash false Exchange hash <p>The current exchange hash</p> `` `String` `` $message_numbers array() Message Numbers `` `Array` `` $disconnect_reasons array() Disconnection Message 'reason codes' defined in RFC4253 `` `Array` `` $channel_open_failure_reasons array() SSH_MSG_CHANNEL_OPEN_FAILURE 'reason codes', defined in RFC4254 `` `Array` `` $terminal_modes array() Terminal Modes `` `` `Array` `` $channel_extended_data_type_codes array() SSH_MSG_CHANNEL_EXTENDED_DATA's data_type_codes `` `` `Array` `` $send_seq_no 0 Send Sequence Number <p>See 'Section 6.4. Data Integrity' of rfc4253 for more info.</p> `` `Integer` `` $get_seq_no 0 Get Sequence Number <p>See 'Section 6.4. Data Integrity' of rfc4253 for more info.</p> `` `Integer` `` $server_channels array() Server Channels <p>Maps client channels to server channels</p> `` `` `Array` `` $channel_buffers array() Channel Buffers <p>If a client requests a packet from one channel but receives two packets from another those packets should be placed in a buffer</p> `` `` `Array` `` $channel_status array() Channel Status <p>Contains the type of the last sent message</p> `` `Array` `` $packet_size_client_to_server array() Packet Size <p>Maximum packet size indexed by channel</p> `` `Array` `` $message_number_log array() Message Number Log `` `Array` `` $message_log array() Message Log `` `Array` `` $window_size 2147483647 The Window Size <p>Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 4GB)</p> `Integer` `` `` `` $window_size_client_to_server array() Window size <p>Window size indexed by channel</p> `` `Array` `` $signature '' Server signature <p>Verified against $this->session_id</p> `` `String` `` $signature_format '' Server signature format <p>ssh-rsa or ssh-dss.</p> `` `String` `` $interactiveBuffer '' Interactive Buffer `` `Array` `` Net_SSH2 Net_SSH2 Default Constructor. <p>Connects to an SSHv2 server</p> `String` `\optional` `\optional` `\Net_SSH2` `` $host $port 22 $timeout 10 _key_exchange _key_exchange Key Exchange `String` `` $kexinit_payload_server login login Login <p>The $password parameter can be a plaintext password or a Crypt_RSA object.</p> `String` `\optional` `Boolean` `` `` $username $password '' _keyboard_interactive_login _keyboard_interactive_login Login via keyboard-interactive authentication <p>See {@link http://tools.ietf.org/html/rfc4256 RFC4256} for details. This is not a full-featured keyboard-interactive authenticator.</p> `String` `String` `Boolean` `` $username $password _keyboard_interactive_process _keyboard_interactive_process Handle the keyboard-interactive requests / responses. `String` `Boolean` `` _privatekey_login _privatekey_login Login with an RSA private key `String` `\Crypt_RSA` `Boolean` `` `` $username $privatekey exec exec Execute Command <p>If $block is set to false then Net_SSH2::_get_channel_packet(NET_SSH2_CHANNEL_EXEC) will need to be called manually. In all likelihood, this is not a feature you want to be taking advantage of.</p> `String` `\optional` `String` `` $command $block true _initShell _initShell Creates an interactive shell `` `` `Boolean` `` read read Returns the output of an interactive shell <p>Returns when there's a match for $expect, which can take the form of a string literal or, if $mode == NET_SSH2_READ_REGEX, a regular expression.</p> `` `String` `Integer` `String` `` $expect $mode NET_SSH2_READ_SIMPLE write write Inputs a command into an interactive shell. `` `String` `Boolean` `` $cmd disconnect disconnect Disconnect `` __destruct __destruct Destructor. <p>Will be called, automatically, if you're supporting just PHP5. If you're supporting PHP4, you'll need to call disconnect().</p> `` _get_binary_packet _get_binary_packet Gets Binary Packets <p>See '6. Binary Packet Protocol' of rfc4253 for more info.</p> `` `String` `` _filter _filter Filter Binary Packets <p>Because some binary packets need to be ignored...</p> `` `String` `` $payload _get_channel_packet _get_channel_packet Gets channel data <p>Returns the data as a string if it's available and false if not.</p> `` `Mixed` `` $client_channel $skip_extended false _send_binary_packet _send_binary_packet Sends Binary Packets <p>See '6. Binary Packet Protocol' of rfc4253 for more info.</p> `String` `` `Boolean` `` $data _send_channel_packet _send_channel_packet Sends channel data <p>Spans multiple SSH_MSG_CHANNEL_DATAs if appropriate</p> `Integer` `String` `Boolean` `` $client_channel $data _close_channel _close_channel Closes and flushes a channel <p>Net_SSH2 doesn't properly close most channels. For exec() channels are normally closed by the server and for SFTP channels are presumably closed when the client disconnects. This functions is intended for SCP more than anything.</p> `Integer` `Boolean` `` $client_channel _disconnect _disconnect Disconnect `Integer` `Boolean` `` $reason _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1 _define_array _define_array Define Array <p>Takes any number of arrays whose indices are integers and whose values are strings and defines a bunch of named constants from it, using the value as the name of the constant and the index as the value of the constant. If any of the constants that would be defined already exists, none of the constants will be defined.</p> `Array` `` getLog getLog Returns a log of the packets that have been sent and received. <p>Returns a string if NET_SSH2_LOGGING == NET_SSH2_LOG_COMPLEX, an array if NET_SSH2_LOGGING == NET_SSH2_LOG_SIMPLE and false if !defined('NET_SSH2_LOGGING')</p> `` `String` _format_log _format_log Formats a log for printing `Array` `Array` `` `String` $message_log $message_number_log getErrors getErrors Returns all errors `String` `` getLastError getLastError Returns the last error `String` `` getServerIdentification getServerIdentification Return the server identification. `String` `` getKexAlgorithms getKexAlgorithms Return a list of the key exchange algorithms the server supports. `Array` `` getServerHostKeyAlgorithms getServerHostKeyAlgorithms Return a list of the host key (public key) algorithms the server supports. `Array` `` getEncryptionAlgorithmsClient2Server getEncryptionAlgorithmsClient2Server Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client. `Array` `` getEncryptionAlgorithmsServer2Client getEncryptionAlgorithmsServer2Client Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client. `Array` `` getMACAlgorithmsClient2Server getMACAlgorithmsClient2Server Return a list of the MAC algorithms the server supports, when receiving stuff from the client. `Array` `` getMACAlgorithmsServer2Client getMACAlgorithmsServer2Client Return a list of the MAC algorithms the server supports, when sending stuff to the client. `Array` `` getCompressionAlgorithmsClient2Server getCompressionAlgorithmsClient2Server Return a list of the compression algorithms the server supports, when receiving stuff from the client. `Array` `` getCompressionAlgorithmsServer2Client getCompressionAlgorithmsServer2Client Return a list of the compression algorithms the server supports, when sending stuff to the client. `Array` `` getLanguagesServer2Client getLanguagesServer2Client Return a list of the languages the server supports, when sending stuff to the client. `Array` `` getLanguagesClient2Server getLanguagesClient2Server Return a list of the languages the server supports, when receiving stuff from the client. `Array` `` getServerPublicHostKey getServerPublicHostKey Returns the server public host key. <p>Caching this the first time you connect to a server and checking the result on subsequent connections is recommended. Returns false if the server signature is not signed correctly with the public host key.</p> `Mixed` ``
Parameter $responses... could not be found in _keyboard_interactive_process()
Name of argument $privatekey does not match with the DocBlock's name $password in _privatekey_login()
Parameter $password could not be found in _privatekey_login()
Argument $payload is missing from the Docblock of _filter()
Argument $skip_extended is missing from the Docblock of _get_channel_packet()
Parameter $array could not be found in _define_array()
Pure-PHP implementation of SFTP.
<p>PHP versions 4 and 5</p>

<p>Currently only supports SFTPv3, which, according to wikipedia.org, "is the most widely used version, implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access to an SFTPv4/5/6 server.</p>

<p>The API for this library is modeled after the API from PHP's {@link http://php.net/book.ftp FTP extension}.</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Net/SFTP.php');

$sftp = new Net_SFTP('www.domain.tld'); if (!$sftp->login('username', 'password')) { exit('Login Failed'); }

echo $sftp->pwd() . "\r\n"; $sftp->put('filename.ext', 'hello, world!'); print_r($sftp->nlist()); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Net

Net_SFTP

Jim Wigginton <terrafrost@php.net>

MMIX Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

http://phpseclib.sourceforge.net

Net/SSH2.php
Include Net_SSH2
NET_SFTP_LOG_SIMPLE
\NET_SFTP_LOG_SIMPLE
NET_SSH2_LOG_SIMPLE
Returns the message numbers
NET_SFTP_LOG_COMPLEX
\NET_SFTP_LOG_COMPLEX
NET_SSH2_LOG_COMPLEX
Returns the message content
NET_SFTP_CHANNEL
\NET_SFTP_CHANNEL
2
SFTP channel constant
<p>Net_SSH2::exec() uses 0 and Net_SSH2::read() / Net_SSH2::write() use 1.</p>

\global\Net_SSH2::_send_channel_packet()

\global\Net_SSH2::_get_channel_packet()

private

NET_SFTP_LOCAL_FILE
\NET_SFTP_LOCAL_FILE
1
Reads data from a local file.
NET_SFTP_STRING
\NET_SFTP_STRING
2
Reads data from a string.
\Net_SSH2
Net_SFTP
\Net_SFTP
Pure-PHP implementations of SFTP.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Net_SFTP

$packet_types array() Packet Types `` `Array` `` $status_codes array() Status Codes `` `Array` `` $request_id false The Request ID <p>The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support concurrent actions, so it's somewhat academic, here.</p> `Integer` `` `` $packet_type -1 The Packet Type <p>The request ID exists in the off chance that a packet is sent out-of-order. Of course, this library doesn't support concurrent actions, so it's somewhat academic, here.</p> `Integer` `` `` $packet_buffer '' Packet Buffer `String` `` `` $extensions array() Extensions supported by the server `Array` `` `` $version Server SFTP version `Integer` `` `` $pwd false Current working directory `String` `` `` `` $packet_type_log array() Packet Type Log `` `Array` `` $packet_log array() Packet Log `` `Array` `` $sftp_errors array() Error information `` `` `String` `` $fileType 0 File Type `` `Integer` `` Net_SFTP Net_SFTP Default Constructor. <p>Connects to an SFTP server</p> `String` `\optional` `\optional` `\Net_SFTP` `` $host $port 22 $timeout 10 login login Login `String` `\optional` `Boolean` `` $username $password '' pwd pwd Returns the current directory name `Mixed` `` _realpath _realpath Canonicalize the Server-Side Path Name <p>SFTP doesn't provide a mechanism by which the current working directory can be changed, so we'll emulate it. Returns the absolute (canonicalized) path. If $mode is set to NET_SFTP_CONFIRM_DIR (as opposed to NET_SFTP_CONFIRM_NONE, which is what it is set to by default), false is returned if $dir is not a valid directory.</p> `` `String` `\optional` `Mixed` `` $dir chdir chdir Changes the current directory `String` `Boolean` `` $dir nlist nlist Returns a list of files in the given directory `\optional` `Mixed` `` $dir '.' rawlist rawlist Returns a detailed list of files in the given directory `\optional` `Mixed` `` $dir '.' _list _list Reads a list, be it detailed or not, of files in the given directory `\optional` `Mixed` `` $dir $raw true size size Returns the file size, in bytes, or false, on failure <p>Files larger than 4GB will show up as being exactly 4GB.</p> `String` `Mixed` `` $filename stat stat Returns general information about a file. <p>Returns an array on success and false otherwise.</p> `String` `Mixed` `` $filename lstat lstat Returns general information about a file or symbolic link. <p>Returns an array on success and false otherwise.</p> `String` `Mixed` `` $filename _stat _stat Returns general information about a file or symbolic link <p>Determines information without calling Net_SFTP::_realpath(). The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT.</p> `String` `Integer` `Mixed` `` $filename $type _size _size Returns the file size, in bytes, or false, on failure <p>Determines the size without calling Net_SFTP::_realpath()</p> `String` `Mixed` `` $filename chmod chmod Set permissions on a file. <p>Returns the new file permissions on success or FALSE on error.</p> `Integer` `String` `Mixed` `` $mode $filename mkdir mkdir Creates a directory. `String` `Boolean` `` $dir rmdir rmdir Removes a directory. `String` `Boolean` `` $dir put put Uploads a file to the SFTP server. <p>By default, Net_SFTP::put() does not read from the local filesystem. $data is dumped directly into $remote_file. So, for example, if you set $data to 'filename.ext' and then do Net_SFTP::get(), you will get a file, twelve bytes long, containing 'filename.ext' as its contents.</p> <p>Setting $mode to NET_SFTP_LOCAL_FILE will change the above behavior. With NET_SFTP_LOCAL_FILE, $remote_file will contain as many bytes as filename.ext does on your local filesystem. If your filename.ext is 1MB then that is how large $remote_file will be, as well.</p> <p>Currently, only binary mode is supported. As such, if the line endings need to be adjusted, you will need to take care of that, yourself.</p> `String` `String` `\optional` `Boolean` `` `` $remote_file $data $mode NET_SFTP_STRING _read_put_responses _read_put_responses Reads multiple successive SSH_FXP_WRITE responses <p>Sending an SSH_FXP_WRITE packet and immediately reading its response isn't as efficient as blindly sending out $i SSH_FXP_WRITEs, in succession, and then reading $i responses.</p> `Integer` `Boolean` `` $i get get Downloads a file from the SFTP server. <p>Returns a string containing the contents of $remote_file if $local_file is left undefined or a boolean false if the operation was unsuccessful. If $local_file is defined, returns true or false depending on the success of the operation</p> `String` `\optional` `Mixed` `` $remote_file $local_file false delete delete Deletes a file on the SFTP server. `String` `Boolean` `` $path rename rename Renames a file or a directory on the SFTP server `String` `String` `Boolean` `` $oldname $newname _parseAttributes _parseAttributes Parse Attributes <p>See '7. File Attributes' of draft-ietf-secsh-filexfer-13 for more info.</p> `String` `Array` `` $response _parseLongname _parseLongname Parse Longname <p>SFTPv3 doesn't provide any easy way of identifying a file type. You could try to open a file as a directory and see if an error is returned or you could try to parse the SFTPv3-specific longname field of the SSH_FXP_NAME packet. That's what this function does. The result is returned using the {@link http://tools.ietf.org/html/draft-ietf-secsh-filexfer-04#section-5.2 SFTPv4 type constants}.</p> <p>If the longname is in an unrecognized format bool(false) is returned.</p> `String` `Mixed` `` $longname _send_sftp_packet _send_sftp_packet Sends SFTP Packets <p>See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info.</p> `Integer` `String` `` `` `Boolean` `` $type $data _get_sftp_packet _get_sftp_packet Receives SFTP Packets <p>See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info.</p> <p>Incidentally, the number of SSH_MSG_CHANNEL_DATA messages has no bearing on the number of SFTP packets present. There can be one SSH_MSG_CHANNEL_DATA messages containing two SFTP packets or there can be two SSH_MSG_CHANNEL_DATA messages containing one SFTP packet.</p> `` `String` `` getSFTPLog getSFTPLog Returns a log of the packets that have been sent and received. <p>Returns a string if NET_SFTP_LOGGING == NET_SFTP_LOG_COMPLEX, an array if NET_SFTP_LOGGING == NET_SFTP_LOG_SIMPLE and false if !defined('NET_SFTP_LOGGING')</p> `` `String` getSFTPErrors getSFTPErrors Returns all errors `String` `` getLastSFTPError getLastSFTPError Returns the last error `String` `` getSupportedVersions getSupportedVersions Get supported SFTP versions `Array` `` _disconnect _disconnect Disconnect `Integer` `Boolean` `` $reason
Parameter could not be found in _realpath()
Argument $raw is missing from the Docblock of _list()
Pure-PHP arbitrary precision integer arithmetic library.
<p>Supports base-2, base-10, base-16, and base-256 numbers. Uses the GMP or BCMath extensions, if available, and an internal implementation, otherwise.</p>

<p>PHP versions 4 and 5</p>

<p>{@internal (all DocBlock comments regarding implementation - such as the one that follows - refer to the {@link MATH_BIGINTEGER_MODE_INTERNAL MATH_BIGINTEGER_MODE_INTERNAL} mode)</p>

<p>Math_BigInteger uses base-2<strong>26 to perform operations such as multiplication and division and base-2</strong>52 (ie. two base 2<strong>26 digits) to perform addition and subtraction. Because the largest possible value when multiplying two base-2</strong>26 numbers together is a base-2**52 number, double precision floating point numbers - numbers that should be supported on most hardware and whose significand is 53 bits - are used. As a consequence, bitwise operators such as >> and &lt;&lt; cannot be used, nor can the modulo operator %, which only supports integers. Although this fact will slow this library down, the fact that such a high base is being used should more than compensate.</p>

<p>When PHP version 6 is officially released, we'll be able to use 64-bit integers. This should, once again, allow bitwise operators, and will increase the maximum possible base to 2<strong>31 (or 2</strong>62 for addition / subtraction).</p>

<p>Numbers are stored in {@link http://en.wikipedia.org/wiki/Endianness little endian} format. ie. (new Math_BigInteger(pow(2, 26)))->value = array(0, 1)</p>

<p>Useful resources are as follows:</p>

<ul> <li>{@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf Handbook of Applied Cryptography (HAC)}</li> <li>{@link http://math.libtomcrypt.com/files/tommath.pdf Multi-Precision Math (MPM)}</li> <li>Java's BigInteger classes. See /j2se/src/share/classes/java/math in jdk-1_5_0-src-jrl.zip</li> </ul>

<p>Here's an example of how to use this library:</p>

<pre><code><?php include('Math/BigInteger.php');

$a = new Math_BigInteger(2); $b = new Math_BigInteger(3);

$c = $a->add($b);

echo $c->toString(); // outputs 5 ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Math

Math_BigInteger

Jim Wigginton <terrafrost@php.net>

MMVI Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: BigInteger.php 4105 2011-05-19 18:02:11Z gruberroland $

http://pear.php.net/package/Math_BigInteger

MATH_BIGINTEGER_MONTGOMERY
\MATH_BIGINTEGER_MONTGOMERY
0

\global\Math_BigInteger::_montgomery()

\global\Math_BigInteger::_prepMontgomery()

MATH_BIGINTEGER_BARRETT
\MATH_BIGINTEGER_BARRETT
1

\global\Math_BigInteger::_barrett()

MATH_BIGINTEGER_POWEROF2
\MATH_BIGINTEGER_POWEROF2
2

\global\Math_BigInteger::_mod2()

MATH_BIGINTEGER_CLASSIC
\MATH_BIGINTEGER_CLASSIC
3

\global\Math_BigInteger::_remainder()

MATH_BIGINTEGER_NONE
\MATH_BIGINTEGER_NONE
4

\global\Math_BigInteger::__clone()

MATH_BIGINTEGER_VALUE
\MATH_BIGINTEGER_VALUE
0
$result[MATH_BIGINTEGER_VALUE] contains the value.
MATH_BIGINTEGER_SIGN
\MATH_BIGINTEGER_SIGN
1
$result[MATH_BIGINTEGER_SIGN] contains the sign.
MATH_BIGINTEGER_VARIABLE
\MATH_BIGINTEGER_VARIABLE
0
Cache constants
<p>$cache[MATH_BIGINTEGER_VARIABLE] tells us whether or not the cached data is still valid.</p>
MATH_BIGINTEGER_DATA
\MATH_BIGINTEGER_DATA
1
$cache[MATH_BIGINTEGER_DATA] contains the cached data.
MATH_BIGINTEGER_MODE_INTERNAL
\MATH_BIGINTEGER_MODE_INTERNAL
1
To use the pure-PHP implementation
MATH_BIGINTEGER_MODE_BCMATH
\MATH_BIGINTEGER_MODE_BCMATH
2
To use the BCMath library
<p>(if enabled; otherwise, the internal implementation will be used)</p>
MATH_BIGINTEGER_MODE_GMP
\MATH_BIGINTEGER_MODE_GMP
3
To use the GMP library
<p>(if present; otherwise, either the BCMath or the internal implementation will be used)</p>
MATH_BIGINTEGER_MAX_DIGIT52
\MATH_BIGINTEGER_MAX_DIGIT52
pow(2, 52)
The largest digit that may be used in addition / subtraction
<p>(we do pow(2, 52) instead of using 4503599627370496, directly, because some PHP installations will truncate 4503599627370496)</p>

private

MATH_BIGINTEGER_KARATSUBA_CUTOFF
\MATH_BIGINTEGER_KARATSUBA_CUTOFF
25
Karatsuba Cutoff
<p>At what point do we switch between Karatsuba multiplication and schoolbook long multiplication?</p>

private

MATH_BIGINTEGER_MODE
\MATH_BIGINTEGER_MODE
MATH_BIGINTEGER_MODE_INTERNAL
Math_BigInteger
\Math_BigInteger
Pure-PHP arbitrary precision integer arithmetic library.
<p>Supports base-2, base-10, base-16, and base-256 numbers.</p>

Jim Wigginton <terrafrost@php.net>

1.0.0RC4

public

Math_BigInteger

$value Holds the BigInteger's value. `Array` `` $is_negative false Holds the BigInteger's magnitude. `Boolean` `` $generator 'mt_rand' Random number generator function `` `` $precision -1 Precision `` `` $bitmask false Precision Bitmask `` `` $hex Mode independant value used for serialization. <p>If the bcmath or gmp extensions are installed $this->value will be a non-serializable resource, hence the need for a variable that'll be serializable regardless of whether or not extensions are being used. Unlike $this->value, however, $this->hex is only calculated when $this->__sleep() is called.</p> `` `` `String` `` Math_BigInteger Math_BigInteger Converts base-2, base-10, base-16, and binary strings (eg. <p>base-256) to BigIntegers.</p> <p>If the second parameter - $base - is negative, then it will be assumed that the number's are encoded using two's compliment. The sole exception to this is -10, which is treated the same as 10 is.</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('0x32', 16); // 50 in base-16 echo $a->toString(); // outputs 50 ?> </code></pre> `\optional` `\optional` `\Math_BigInteger` `` $x 0 $base 10 toBytes toBytes Converts a BigInteger to a byte string (eg. <p>base-256).</p> <p>Negative numbers are saved as positive numbers, unless $twos_compliment is set to true, at which point, they're saved as two's compliment.</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('65'); echo $a->toBytes(); // outputs chr(65) ?> </code></pre> `Boolean` `String` `` `` $twos_compliment false toHex toHex Converts a BigInteger to a hex string (eg. <p>base-16)).</p> <p>Negative numbers are saved as positive numbers, unless $twos_compliment is set to true, at which point, they're saved as two's compliment.</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('65'); echo $a->toHex(); // outputs '41' ?> </code></pre> `Boolean` `String` `` `` $twos_compliment false toBits toBits Converts a BigInteger to a bit string (eg. <p>base-2).</p> <p>Negative numbers are saved as positive numbers, unless $twos_compliment is set to true, at which point, they're saved as two's compliment.</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('65'); echo $a->toBits(); // outputs '1000001' ?> </code></pre> `Boolean` `String` `` `` $twos_compliment false toString toString Converts a BigInteger to a base-10 number. <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('50'); echo $a->toString(); // outputs 50 ?> </code></pre> `String` `` `` copy copy Copy an object <p>PHP5 passes objects by reference while PHP4 passes by value. As such, we need a function to guarantee that all objects are passed by value, when appropriate. More information can be found here:</p> <p>{@link http://php.net/language.oop5.basic#51624}</p> `` `` `\Math_BigInteger` __toString __toString __toString() magic method <p>Will be called, automatically, if you're supporting just PHP5. If you're supporting PHP4, you'll need to call toString().</p> `` `` __clone __clone __clone() magic method <p>Although you can call Math_BigInteger::__toString() directly in PHP5, you cannot call Math_BigInteger::__clone() directly in PHP5. You can in PHP4 since it's not a magic method, but in PHP5, you have to call it by using the PHP5 only syntax of $y = clone $x. As such, if you're trying to write an application that works on both PHP4 and PHP5, call Math_BigInteger::copy(), instead.</p> `` `` `\Math_BigInteger` __sleep __sleep __sleep() magic method <p>Will be called, automatically, when serialize() is called on a Math_BigInteger object.</p> `` `` __wakeup __wakeup __wakeup() magic method <p>Will be called, automatically, when unserialize() is called on a Math_BigInteger object.</p> `` `` add add Adds two BigIntegers. <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('10'); $b = new Math_BigInteger('20'); $c = $a->add($b); echo $c->toString(); // outputs 30 ?> </code></pre> `\Math_BigInteger` `\Math_BigInteger` `` `` $y _add _add Performs addition. `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value $x_negative $y_value $y_negative subtract subtract Subtracts two BigIntegers. <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('10'); $b = new Math_BigInteger('20'); $c = $a->subtract($b); echo $c->toString(); // outputs -10 ?> </code></pre> `\Math_BigInteger` `\Math_BigInteger` `` `` $y _subtract _subtract Performs subtraction. `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value $x_negative $y_value $y_negative multiply multiply Multiplies two BigIntegers <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('10'); $b = new Math_BigInteger('20'); $c = $a->multiply($b); echo $c->toString(); // outputs 200 ?> </code></pre> `\Math_BigInteger` `\Math_BigInteger` `` $x _multiply _multiply Performs multiplication. `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value $x_negative $y_value $y_negative _regularMultiply _regularMultiply Performs long multiplication on two BigIntegers <p>Modeled after 'multiply' in MutableBigInteger.java.</p> `Array` `Array` `Array` `` $x_value $y_value _karatsuba _karatsuba Performs Karatsuba multiplication on two BigIntegers <p>See {@link http://en.wikipedia.org/wiki/Karatsuba_algorithm Karatsuba algorithm} and {@link http://math.libtomcrypt.com/files/tommath.pdf#page=120 MPM 5.2.3}.</p> `Array` `Array` `Array` `` $x_value $y_value _square _square Performs squaring `Array` `Array` `` $x false _baseSquare _baseSquare Performs traditional squaring on two BigIntegers <p>Squaring can be done faster than multiplying a number by itself can be. See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=7 HAC 14.2.4} / {@link http://math.libtomcrypt.com/files/tommath.pdf#page=141 MPM 5.3} for more information.</p> `Array` `Array` `` $value _karatsubaSquare _karatsubaSquare Performs Karatsuba "squaring" on two BigIntegers <p>See {@link http://en.wikipedia.org/wiki/Karatsuba_algorithm Karatsuba algorithm} and {@link http://math.libtomcrypt.com/files/tommath.pdf#page=151 MPM 5.3.4}.</p> `Array` `Array` `` $value divide divide Divides two BigIntegers. <p>Returns an array whose first element contains the quotient and whose second element contains the "common residue". If the remainder would be positive, the "common residue" and the remainder are the same. If the remainder would be negative, the "common residue" is equal to the sum of the remainder and the divisor (basically, the "common residue" is the first positive modulo).</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('10'); $b = new Math_BigInteger('20'); list($quotient, $remainder) = $a->divide($b); echo $quotient->toString(); // outputs 0 echo "\r\n"; echo $remainder->toString(); // outputs 10 ?> </code></pre> `\Math_BigInteger` `Array` `` `` $y _divide_digit _divide_digit Divides a BigInteger by a regular integer <p>abc / x = a00 / x + b0 / x + c / x</p> `Array` `Array` `Array` `` $dividend $divisor modPow modPow Performs modular exponentiation. <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger('10'); $b = new Math_BigInteger('20'); $c = new Math_BigInteger('30'); $c = $a->modPow($b, $c); echo $c->toString(); // outputs 10 ?> </code></pre> `\Math_BigInteger` `\Math_BigInteger` `\Math_BigInteger` `` `` $e $n powMod powMod Performs modular exponentiation. <p>Alias for Math_BigInteger::modPow()</p> `\Math_BigInteger` `\Math_BigInteger` `\Math_BigInteger` `` $e $n _slidingWindow _slidingWindow Sliding Window k-ary Modular Exponentiation <p>Based on {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=27 HAC 14.85} / {@link http://math.libtomcrypt.com/files/tommath.pdf#page=210 MPM 7.7}. In a departure from those algorithims, however, this function performs a modular reduction after every multiplication and squaring operation. As such, this function has the same preconditions that the reductions being used do.</p> `\Math_BigInteger` `\Math_BigInteger` `Integer` `\Math_BigInteger` `` $e $n $mode _reduce _reduce Modular reduction <p>For most $modes this will return the remainder.</p> `` `` `Array` `Array` `Integer` `Array` $x $n $mode _prepareReduce _prepareReduce Modular reduction preperation `` `` `Array` `Array` `Integer` `Array` $x $n $mode _multiplyReduce _multiplyReduce Modular multiply `` `` `Array` `Array` `Array` `Integer` `Array` $x $y $n $mode _squareReduce _squareReduce Modular square `` `` `Array` `Array` `Integer` `Array` $x $n $mode _mod2 _mod2 Modulos for Powers of Two <p>Calculates $x%$n, where $n = 2**$e, for some $e. Since this is basically the same as doing $x &amp; ($n-1), we'll just use this function as a wrapper for doing that.</p> `` `` `` `\Math_BigInteger` $n _barrett _barrett Barrett Modular Reduction <p>See {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=14 HAC 14.3.3} / {@link http://math.libtomcrypt.com/files/tommath.pdf#page=165 MPM 6.2.5} for more information. Modified slightly, so as not to require negative numbers (initially, this script didn't support negative numbers).</p> <p>Employs "folding", as described at {@link http://www.cosic.esat.kuleuven.be/publications/thesis-149.pdf#page=66 thesis-149.pdf#page=66}. To quote from it, "the idea [behind folding] is to find a value x' such that x (mod m) = x' (mod m), with x' being smaller than x."</p> <p>Unfortunately, the "Barrett Reduction with Folding" algorithm described in thesis-149.pdf is not, as written, all that usable on account of (1) its not using reasonable radix points as discussed in {@link http://math.libtomcrypt.com/files/tommath.pdf#page=162 MPM 6.2.2} and (2) the fact that, even with reasonable radix points, it only works when there are an even number of digits in the denominator. The reason for (2) is that (x >> 1) + (x >> 1) != x / 2 + x / 2. If x is even, they're the same, but if x is odd, they're not. See the in-line comments for details.</p> `` `` `Array` `Array` `Array` $n $m _regularBarrett _regularBarrett (Regular) Barrett Modular Reduction <p>For numbers with more than four digits Math_BigInteger::_barrett() is faster. The difference between that and this is that this function does not fold the denominator into a smaller form.</p> `` `` `Array` `Array` `Array` $x $n _multiplyLower _multiplyLower Performs long multiplication up to $stop digits <p>If you're going to be doing array_slice($product->value, 0, $stop), some cycles can be saved.</p> `` `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value $x_negative $y_value $y_negative $stop _montgomery _montgomery Montgomery Modular Reduction <p>($x->_prepMontgomery($n))->_montgomery($n) yields $x % $n. {@link http://math.libtomcrypt.com/files/tommath.pdf#page=170 MPM 6.3} provides insights on how this can be improved upon (basically, by using the comba method). gcd($n, 2) must be equal to one for this function to work correctly.</p> `` `` `` `Array` `Array` `Array` $x $n _montgomeryMultiply _montgomeryMultiply Montgomery Multiply <p>Interleaves the montgomery reduction and long multiplication algorithms together as described in {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=13 HAC 14.36}</p> `` `` `` `Array` `Array` `Array` `Array` $x $y $m _prepMontgomery _prepMontgomery Prepare a number for use in Montgomery Modular Reductions `` `` `` `Array` `Array` `Array` $x $n _modInverse67108864 _modInverse67108864 Modular Inverse of a number mod 2**26 (eg. <p>67108864)</p> <p>Based off of the bnpInvDigit function implemented and justified in the following URL:</p> <p>{@link http://www-cs-students.stanford.edu/~tjw/jsbn/jsbn.js}</p> <p>The following URL provides more info:</p> <p>{@link http://groups.google.com/group/sci.crypt/msg/7a137205c1be7d85}</p> <p>As for why we do all the bitmasking... strange things can happen when converting from floats to ints. For instance, on some computers, var_dump((int) -4294967297) yields int(-1) and on others, it yields int(-2147483648). To avoid problems stemming from this, we use bitmasks to guarantee that ints aren't auto-converted to floats. The outermost bitmask is present because without it, there's no guarantee that the "residue" returned would be the so-called "common residue". We use fmod, in the last step, because the maximum possible $x is 26 bits and the maximum $result is 16 bits. Thus, we have to be able to handle up to 40 bits, which only 64-bit floating points will support.</p> <p>Thanks to Pedro Gimeno Fortea for input!</p> `` `` `Array` `Integer` $x modInverse modInverse Calculates modular inverses. <p>Say you have (30 mod 17 * x mod 17) mod 17 == 1. x can be found using modular inverses.</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger(30); $b = new Math_BigInteger(17); $c = $a->modInverse($b); echo $c->toString(); // outputs 4 echo "\r\n"; $d = $a->multiply($c); list(, $d) = $d->divide($b); echo $d; // outputs 1 (as per the definition of modular inverse) ?> </code></pre> `\Math_BigInteger` `mixed` `` `` $n extendedGCD extendedGCD $n gcd gcd Calculates the greatest common divisor <p>Say you have 693 and 609. The GCD is 21.</p> <p>Here's an example:</p> <pre><code><?php include('Math/BigInteger.php'); $a = new Math_BigInteger(693); $b = new Math_BigInteger(609); $gcd = a->extendedGCD($b); echo $gcd->toString() . "\r\n"; // outputs 21 ?> </code></pre> `\Math_BigInteger` `\Math_BigInteger` `` $n abs abs Absolute value. `\Math_BigInteger` `` compare compare Compares two numbers. <p>Although one might think !$x->compare($y) means $x != $y, it, in fact, means the opposite. The reason for this is demonstrated thusly:</p> <p>$x > $y: $x->compare($y) > 0 $x &lt; $y: $x->compare($y) &lt; 0 $x == $y: $x->compare($y) == 0</p> <p>Note how the same comparison operator is used. If you want to test for equality, use $x->equals($y).</p> `\Math_BigInteger` `Integer` `` `` `` $y _compare _compare Compares two numbers. `Array` `Boolean` `Array` `Boolean` `Integer` `` `` $x_value $x_negative $y_value $y_negative equals equals Tests the equality of two numbers. <p>If you need to see if one number is greater than or less than another number, use Math_BigInteger::compare()</p> `\Math_BigInteger` `Boolean` `` `` $x setPrecision setPrecision Set Precision <p>Some bitwise operations give different results depending on the precision being used. Examples include left shift, not, and rotates.</p> `\Math_BigInteger` `` `\Math_BigInteger` $bits bitwise_and bitwise_and Logical And `\Math_BigInteger` `` `` `\Math_BigInteger` $x bitwise_or bitwise_or Logical Or `\Math_BigInteger` `` `` `\Math_BigInteger` $x bitwise_xor bitwise_xor Logical Exclusive-Or `\Math_BigInteger` `` `` `\Math_BigInteger` $x bitwise_not bitwise_not Logical Not `` `` `\Math_BigInteger` bitwise_rightShift bitwise_rightShift Logical Right Shift <p>Shifts BigInteger's by $shift bits, effectively dividing by 2**$shift.</p> `Integer` `\Math_BigInteger` `` `` $shift bitwise_leftShift bitwise_leftShift Logical Left Shift <p>Shifts BigInteger's by $shift bits, effectively multiplying by 2**$shift.</p> `Integer` `\Math_BigInteger` `` `` $shift bitwise_leftRotate bitwise_leftRotate Logical Left Rotate <p>Instead of the top x bits being dropped they're appended to the shifted bit string.</p> `Integer` `\Math_BigInteger` `` $shift bitwise_rightRotate bitwise_rightRotate Logical Right Rotate <p>Instead of the bottom x bits being dropped they're prepended to the shifted bit string.</p> `Integer` `\Math_BigInteger` `` $shift setRandomGenerator setRandomGenerator Set random number generator function <p>$generator should be the name of a random generating function whose first parameter is the minimum value and whose second parameter is the maximum value. If this function needs to be seeded, it should be seeded prior to calling Math_BigInteger::random() or Math_BigInteger::randomPrime()</p> <p>If the random generating function is not explicitly set, it'll be assumed to be mt_rand().</p> `` `` `\optional` `` $generator random random Generate a random number `\optional` `\optional` `\Math_BigInteger` `` $min false $max false randomPrime randomPrime Generate a random prime number. <p>If there's not a prime within the given range, false will be returned. If more than $timeout seconds have elapsed, give up and return false.</p> `\optional` `\optional` `\optional` `\Math_BigInteger` `` `` $min false $max false $timeout false _make_odd _make_odd Make the current number odd <p>If the current number is odd it'll be unchanged. If it's even, one will be added to it.</p> `` `` isPrime isPrime Checks a numer to see if it's prime <p>Assuming the $t parameter is not set, this function has an error rate of 2**-80. The main motivation for the $t parameter is distributability. Math_BigInteger::randomPrime() can be distributed accross multiple pageloads on a website instead of just one.</p> `\optional` `Boolean` `` `` $t false _lshift _lshift Logical Left Shift <p>Shifts BigInteger's by $shift bits.</p> `Integer` `` $shift _rshift _rshift Logical Right Shift <p>Shifts BigInteger's by $shift bits.</p> `Integer` `` $shift _normalize _normalize Normalize <p>Removes leading zeros and truncates (if necessary) to maintain the appropriate precision</p> `` `\Math_BigInteger` `` `` $result _trim _trim Trim <p>Removes leading zeros</p> `\Math_BigInteger` `` $value _array_repeat _array_repeat Array Repeat `\$input` `\$multiplier` `Array` `` $input $multiplier _base256_lshift _base256_lshift Logical Left Shift <p>Shifts binary strings $shift bits, essentially multiplying by 2**$shift.</p> `\$x` `\$shift` `String` `` $x $shift _base256_rshift _base256_rshift Logical Right Shift <p>Shifts binary strings $shift bits, essentially dividing by 2**$shift and returning the remainder.</p> `\$x` `\$shift` `String` `` $x $shift _int2bytes _int2bytes Converts 32-bit integers to bytes. `Integer` `String` `` $x _bytes2int _bytes2int Converts bytes to 32-bit integers `String` `Integer` `` $x
Argument $stop is missing from the Docblock of _multiplyLower()
No short description for method extendedGCD()
Argument $n is missing from the Docblock of extendedGCD()
Name of argument $y does not match with the DocBlock's name $x in compare()
Parameter $x could not be found in compare()
Name of argument $bits does not match with the DocBlock's name $x in setPrecision()
Parameter $x could not be found in setPrecision()
Argument $value is missing from the Docblock of _trim()
Pure-PHP PKCS#1 (v2.1) compliant implementation of RSA.
<p>PHP versions 4 and 5</p>

<p>Here's an example of how to encrypt and decrypt text with this library:</p>

<pre><code><?php include('Crypt/RSA.php');

$rsa = new Crypt_RSA(); extract($rsa->createKey());

$plaintext = 'terrafrost';

$rsa->loadKey($privatekey); $ciphertext = $rsa->encrypt($plaintext);

$rsa->loadKey($publickey); echo $rsa->decrypt($ciphertext); ?> </code></pre>

<p>Here's an example of how to create signatures and verify signatures with this library:</p>

<pre><code><?php include('Crypt/RSA.php');

$rsa = new Crypt_RSA(); extract($rsa->createKey());

$plaintext = 'terrafrost';

$rsa->loadKey($privatekey); $signature = $rsa->sign($plaintext);

$rsa->loadKey($publickey); echo $rsa->verify($plaintext, $signature) ? 'verified' : 'unverified'; ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_RSA

Jim Wigginton <terrafrost@php.net>

MMIX Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: RSA.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

Math/BigInteger.php
Include Math_BigInteger
Crypt/Random.php
Include Crypt_Random
Crypt/Hash.php
Include Crypt_Hash
Crypt/TripleDES.php
Crypt/AES.php
Crypt/TripleDES.php
Crypt/TripleDES.php
Crypt/DES.php
Crypt/AES.php
CRYPT_RSA_ENCRYPTION_OAEP
\CRYPT_RSA_ENCRYPTION_OAEP
1
Use {@link http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding Optimal Asymmetric Encryption Padding} (OAEP) for encryption / decryption.
<p>Uses sha1 by default.</p>

\global\Crypt_RSA::setHash()

\global\Crypt_RSA::setMGFHash()

CRYPT_RSA_ENCRYPTION_PKCS1
\CRYPT_RSA_ENCRYPTION_PKCS1
2
Use PKCS#1 padding.
<p>Although CRYPT_RSA_ENCRYPTION_OAEP offers more security, including PKCS#1 padding is necessary for purposes of backwards compatability with protocols (like SSH-1) written before OAEP's introduction.</p>
CRYPT_RSA_SIGNATURE_PSS
\CRYPT_RSA_SIGNATURE_PSS
1
Use the Probabilistic Signature Scheme for signing
<p>Uses sha1 by default.</p>

\global\Crypt_RSA::setSaltLength()

\global\Crypt_RSA::setMGFHash()

CRYPT_RSA_SIGNATURE_PKCS1
\CRYPT_RSA_SIGNATURE_PKCS1
2
Use the PKCS#1 scheme by default.
<p>Although CRYPT_RSA_SIGNATURE_PSS offers more security, including PKCS#1 signing is necessary for purposes of backwards compatability with protocols (like SSH-2) written before PSS's introduction.</p>
CRYPT_RSA_ASN1_INTEGER
\CRYPT_RSA_ASN1_INTEGER
2
ASN1 Integer
CRYPT_RSA_ASN1_SEQUENCE
\CRYPT_RSA_ASN1_SEQUENCE
48
ASN1 Sequence (with the constucted bit set)
CRYPT_RSA_MODE_INTERNAL
\CRYPT_RSA_MODE_INTERNAL
1
To use the pure-PHP implementation
CRYPT_RSA_MODE_OPENSSL
\CRYPT_RSA_MODE_OPENSSL
2
To use the OpenSSL library
<p>(if enabled; otherwise, the internal implementation will be used)</p>
CRYPT_RSA_PRIVATE_FORMAT_PKCS1
\CRYPT_RSA_PRIVATE_FORMAT_PKCS1
0
PKCS#1 formatted private key
<p>Used by OpenSSH</p>
CRYPT_RSA_PRIVATE_FORMAT_PUTTY
\CRYPT_RSA_PRIVATE_FORMAT_PUTTY
1
PuTTY formatted private key
CRYPT_RSA_PRIVATE_FORMAT_XML
\CRYPT_RSA_PRIVATE_FORMAT_XML
2
XML formatted private key
CRYPT_RSA_PUBLIC_FORMAT_RAW
\CRYPT_RSA_PUBLIC_FORMAT_RAW
3
Raw public key
<p>An array containing two Math_BigInteger objects.</p>

<p>The exponent can be indexed with any of the following:</p>

<p>0, e, exponent, publicExponent</p>

<p>The modulus can be indexed with any of the following:</p>

<p>1, n, modulo, modulus</p>
CRYPT_RSA_PUBLIC_FORMAT_PKCS1
\CRYPT_RSA_PUBLIC_FORMAT_PKCS1
4
PKCS#1 formatted public key
CRYPT_RSA_PUBLIC_FORMAT_XML
\CRYPT_RSA_PUBLIC_FORMAT_XML
5
XML formatted public key
CRYPT_RSA_PUBLIC_FORMAT_OPENSSH
\CRYPT_RSA_PUBLIC_FORMAT_OPENSSH
6
OpenSSH formatted public key
<p>Place in $HOME/.ssh/authorized_keys</p>
CRYPT_RSA_MODE
\CRYPT_RSA_MODE
CRYPT_RSA_MODE_INTERNAL
CRYPT_RSA_EXPONENT
\CRYPT_RSA_EXPONENT
'65537'
CRYPT_RSA_COMMENT
\CRYPT_RSA_COMMENT
'phpseclib-generated-key'
CRYPT_RSA_SMALLEST_PRIME
\CRYPT_RSA_SMALLEST_PRIME
4096
Crypt_RSA
\Crypt_RSA
Pure-PHP PKCS#1 compliant implementation of RSA.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_RSA

$zero Precomputed Zero `Array` `` $one Precomputed One `Array` `` $privateKeyFormat CRYPT_RSA_PRIVATE_FORMAT_PKCS1 Private Key Format `Integer` `` $publicKeyFormat CRYPT_RSA_PUBLIC_FORMAT_PKCS1 Public Key Format `Integer` `` $modulus Modulus (ie. <p>n)</p> `\Math_BigInteger` `` $k Modulus length `\Math_BigInteger` `` $exponent Exponent (ie. <p>e or d)</p> `\Math_BigInteger` `` $primes Primes for Chinese Remainder Theorem (ie. <p>p and q)</p> `Array` `` $exponents Exponents for Chinese Remainder Theorem (ie. <p>dP and dQ)</p> `Array` `` $coefficients Coefficients for Chinese Remainder Theorem (ie. <p>qInv)</p> `Array` `` $hashName Hash name `String` `` $hash Hash function `\Crypt_Hash` `` $hLen Length of hash function output `Integer` `` $sLen Length of salt `Integer` `` $mgfHash Hash function for the Mask Generation Function `\Crypt_Hash` `` $mgfHLen Length of MGF hash function output `Integer` `` $encryptionMode CRYPT_RSA_ENCRYPTION_OAEP Encryption mode `Integer` `` $signatureMode CRYPT_RSA_SIGNATURE_PSS Signature mode `Integer` `` $publicExponent false Public Exponent `Mixed` `` $password '' Password `String` `` $components array() Components <p>For use with parsing XML formatted keys. PHP's XML Parser functions use utilized - instead of PHP's DOM functions - because PHP's XML Parser functions work on PHP4 whereas PHP's DOM functions - although surperior - don't.</p> `` `Array` `` $current Current String <p>For use with parsing XML formatted keys.</p> `` `` `Mixed` `` Crypt_RSA Crypt_RSA The constructor <p>If you want to make use of the openssl extension, you'll need to set the mode manually, yourself. The reason Crypt_RSA doesn't do it is because OpenSSL doesn't fail gracefully. openssl_pkey_new(), in particular, requires openssl.cnf be present somewhere and, unfortunately, the only real way to find out is too late.</p> `\Crypt_RSA` `` createKey createKey Create public / private key pair <p>Returns an array with the following three elements: - 'privatekey': The private key. - 'publickey': The public key. - 'partialkey': A partially computed key (if the execution time exceeded $timeout). Will need to be passed back to Crypt_RSA::createKey() as the third parameter for further processing.</p> `` `\optional` `\optional` `\optional` $bits 1024 $timeout false $partial array() _convertPrivateKey _convertPrivateKey Convert a private key to the appropriate format. `` `` `String` `String` $n $e $d $primes $exponents $coefficients _convertPublicKey _convertPublicKey Convert a public key to the appropriate format `` `` `String` `String` $n $e _parseKey _parseKey Break a public or private key down into its constituant components `` `` `` `String` `Integer` `Array` $key $type _start_element_handler _start_element_handler Start Element Handler <p>Called by xml_set_element_handler()</p> `` `Resource` `String` `Array` $parser $name $attribs _stop_element_handler _stop_element_handler Stop Element Handler <p>Called by xml_set_element_handler()</p> `` `Resource` `String` $parser $name _data_handler _data_handler Data Handler <p>Called by xml_set_character_data_handler()</p> `` `Resource` `String` $parser $data loadKey loadKey Loads a public or private key <p>Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed)</p> `` `String` `Integer` $key $type false setPassword setPassword Sets the password <p>Private keys can be encrypted with a password. To unset the password, pass in the empty string or false. Or rather, pass in $password such that empty($password) is true.</p> `` `` `` `String` $password setPublicKey setPublicKey Defines the public key <p>Some private key formats define the public exponent and some don't. Those that don't define it are problematic when used in certain contexts. For example, in SSH-2, RSA authentication works by sending the public key along with a message signed by the private key to the server. The SSH-2 server looks the public key up in an index of public keys and if it's present then proceeds to verify the signature. Problem is, if your private key doesn't include the public exponent this won't work unless you manually add the public exponent.</p> <p>Do note that when a new key is loaded the index will be cleared.</p> <p>Returns true on success, false on failure</p> `` `` `String` `Integer` `Boolean` $key $type CRYPT_RSA_PUBLIC_FORMAT_PKCS1 getPublicKey getPublicKey Returns the public key <p>The public key is only returned under two circumstances - if the private key had the public key embedded within it or if the public key was set via setPublicKey(). If the currently loaded key is supposed to be the public key this function won't return it since this library, for the most part, doesn't distinguish between public and private keys.</p> `` `` `String` `Integer` $type CRYPT_RSA_PUBLIC_FORMAT_PKCS1 _generateMinMax _generateMinMax Generates the smallest and largest numbers requiring $bits bits `` `Integer` `Array` $bits _decodeLength _decodeLength $string _encodeLength _encodeLength $length _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1 setPrivateKeyFormat setPrivateKeyFormat Determines the private key format `` `` `Integer` $format setPublicKeyFormat setPublicKeyFormat Determines the public key format `` `` `Integer` $format setHash setHash Determines which hashing function should be used <p>Used with signature production / verification and (if the encryption mode is CRYPT_RSA_ENCRYPTION_OAEP) encryption and decryption. If $hash isn't supported, sha1 is used.</p> `` `String` $hash setMGFHash setMGFHash Determines which hashing function should be used for the mask generation function <p>The mask generation function is used by CRYPT_RSA_ENCRYPTION_OAEP and CRYPT_RSA_SIGNATURE_PSS and although it's best if Hash and MGFHash are set to the same thing this is not a requirement.</p> `` `String` $hash setSaltLength setSaltLength Determines the salt length <p>To quote from {@link http://tools.ietf.org/html/rfc3447#page-38 RFC3447#page-38}:</p> <p>Typical salt lengths in octets are hLen (the length of the output of the hash function Hash) and 0.</p> `` `Integer` $sLen _random _random Generates a random string x bytes long `` `Integer` `\optional` `String` $bytes $nonzero false _i2osp _i2osp Integer-to-Octet-String primitive <p>See {@link http://tools.ietf.org/html/rfc3447#section-4.1 RFC3447#section-4.1}.</p> `` `\Math_BigInteger` `Integer` `String` $x $xLen _os2ip _os2ip Octet-String-to-Integer primitive <p>See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}.</p> `` `String` `\Math_BigInteger` $x _exponentiate _exponentiate Exponentiate with or without Chinese Remainder Theorem <p>See {@link http://tools.ietf.org/html/rfc3447#section-5.1.1 RFC3447#section-5.1.2}.</p> `` `\Math_BigInteger` `\Math_BigInteger` $x _blind _blind Performs RSA Blinding <p>Protects against timing attacks by employing RSA Blinding. Returns $x->modPow($this->exponents[$i], $this->primes[$i])</p> `` `\Math_BigInteger` `\Math_BigInteger` `Integer` `\Math_BigInteger` $x $r $i _rsaep _rsaep RSAEP <p>See {@link http://tools.ietf.org/html/rfc3447#section-5.1.1 RFC3447#section-5.1.1}.</p> `` `\Math_BigInteger` `\Math_BigInteger` $m _rsadp _rsadp RSADP <p>See {@link http://tools.ietf.org/html/rfc3447#section-5.1.2 RFC3447#section-5.1.2}.</p> `` `\Math_BigInteger` `\Math_BigInteger` $c _rsasp1 _rsasp1 RSASP1 <p>See {@link http://tools.ietf.org/html/rfc3447#section-5.2.1 RFC3447#section-5.2.1}.</p> `` `\Math_BigInteger` `\Math_BigInteger` $m _rsavp1 _rsavp1 RSAVP1 <p>See {@link http://tools.ietf.org/html/rfc3447#section-5.2.2 RFC3447#section-5.2.2}.</p> `` `\Math_BigInteger` `\Math_BigInteger` $s _mgf1 _mgf1 MGF1 <p>See {@link http://tools.ietf.org/html/rfc3447#appendix-B.2.1 RFC3447#appendix-B.2.1}.</p> `` `String` `Integer` `String` $mgfSeed $maskLen _rsaes_oaep_encrypt _rsaes_oaep_encrypt RSAES-OAEP-ENCRYPT <p>See {@link http://tools.ietf.org/html/rfc3447#section-7.1.1 RFC3447#section-7.1.1} and {http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding OAES}.</p> `` `String` `String` `String` $m $l '' _rsaes_oaep_decrypt _rsaes_oaep_decrypt RSAES-OAEP-DECRYPT <p>See {@link http://tools.ietf.org/html/rfc3447#section-7.1.2 RFC3447#section-7.1.2}. The fact that the error messages aren't distinguishable from one another hinders debugging, but, to quote from RFC3447#section-7.1.2:</p> <p>Note. Care must be taken to ensure that an opponent cannot distinguish the different error conditions in Step 3.g, whether by error message or timing, or, more generally, learn partial information about the encoded message EM. Otherwise an opponent may be able to obtain useful information about the decryption of the ciphertext C, leading to a chosen-ciphertext attack such as the one observed by Manger [36].</p> <p>As for $l... to quote from {@link http://tools.ietf.org/html/rfc3447#page-17 RFC3447#page-17}:</p> <p>Both the encryption and the decryption operations of RSAES-OAEP take the value of a label L as input. In this version of PKCS #1, L is the empty string; other uses of the label are outside the scope of this document.</p> `` `String` `String` `String` $c $l '' _rsaes_pkcs1_v1_5_encrypt _rsaes_pkcs1_v1_5_encrypt RSAES-PKCS1-V1_5-ENCRYPT <p>See {@link http://tools.ietf.org/html/rfc3447#section-7.2.1 RFC3447#section-7.2.1}.</p> `` `String` `String` $m _rsaes_pkcs1_v1_5_decrypt _rsaes_pkcs1_v1_5_decrypt RSAES-PKCS1-V1_5-DECRYPT <p>See {@link http://tools.ietf.org/html/rfc3447#section-7.2.2 RFC3447#section-7.2.2}.</p> <p>For compatability purposes, this function departs slightly from the description given in RFC3447. The reason being that RFC2313#section-8.1 (PKCS#1 v1.5) states that ciphertext's encrypted by the private key should have the second byte set to either 0 or 1 and that ciphertext's encrypted by the public key should have the second byte set to 2. In RFC3447 (PKCS#1 v2.1), the second byte is supposed to be 2 regardless of which key is used. for compatability purposes, we'll just check to make sure the second byte is 2 or less. If it is, we'll accept the decrypted string as valid.</p> <p>As a consequence of this, a private key encrypted ciphertext produced with Crypt_RSA may not decrypt with a strictly PKCS#1 v1.5 compliant RSA implementation. Public key encrypted ciphertext's should but not private key encrypted ciphertext's.</p> `` `String` `String` $c _emsa_pss_encode _emsa_pss_encode EMSA-PSS-ENCODE <p>See {@link http://tools.ietf.org/html/rfc3447#section-9.1.1 RFC3447#section-9.1.1}.</p> `` `String` `Integer` $m $emBits _emsa_pss_verify _emsa_pss_verify EMSA-PSS-VERIFY <p>See {@link http://tools.ietf.org/html/rfc3447#section-9.1.2 RFC3447#section-9.1.2}.</p> `` `String` `String` `Integer` `String` $m $em $emBits _rsassa_pss_sign _rsassa_pss_sign RSASSA-PSS-SIGN <p>See {@link http://tools.ietf.org/html/rfc3447#section-8.1.1 RFC3447#section-8.1.1}.</p> `` `String` `String` $m _rsassa_pss_verify _rsassa_pss_verify RSASSA-PSS-VERIFY <p>See {@link http://tools.ietf.org/html/rfc3447#section-8.1.2 RFC3447#section-8.1.2}.</p> `` `String` `String` `String` $m $s _emsa_pkcs1_v1_5_encode _emsa_pkcs1_v1_5_encode EMSA-PKCS1-V1_5-ENCODE <p>See {@link http://tools.ietf.org/html/rfc3447#section-9.2 RFC3447#section-9.2}.</p> `` `String` `Integer` `String` $m $emLen _rsassa_pkcs1_v1_5_sign _rsassa_pkcs1_v1_5_sign RSASSA-PKCS1-V1_5-SIGN <p>See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}.</p> `` `String` `String` $m _rsassa_pkcs1_v1_5_verify _rsassa_pkcs1_v1_5_verify RSASSA-PKCS1-V1_5-VERIFY <p>See {@link http://tools.ietf.org/html/rfc3447#section-8.2.2 RFC3447#section-8.2.2}.</p> `` `String` `String` $m $s setEncryptionMode setEncryptionMode Set Encryption Mode <p>Valid values include CRYPT_RSA_ENCRYPTION_OAEP and CRYPT_RSA_ENCRYPTION_PKCS1.</p> `` `Integer` $mode setSignatureMode setSignatureMode Set Signature Mode <p>Valid values include CRYPT_RSA_SIGNATURE_PSS and CRYPT_RSA_SIGNATURE_PKCS1</p> `` `Integer` $mode encrypt encrypt Encryption <p>Both CRYPT_RSA_ENCRYPTION_OAEP and CRYPT_RSA_ENCRYPTION_PKCS1 both place limits on how long $plaintext can be. If $plaintext exceeds those limits it will be broken up so that it does and the resultant ciphertext's will be concatenated together.</p> `` `` `String` `String` $plaintext decrypt decrypt Decryption `` `` `String` `String` $ciphertext sign sign Create a signature `` `` `String` `String` $message verify verify Verifies a signature `` `` `String` `String` `Boolean` $message $signature
Name of argument $n does not match with the DocBlock's name $RSAPrivateKey in _convertPrivateKey()
Argument $e is missing from the Docblock of _convertPrivateKey()
Argument $d is missing from the Docblock of _convertPrivateKey()
Argument $primes is missing from the Docblock of _convertPrivateKey()
Argument $exponents is missing from the Docblock of _convertPrivateKey()
Argument $coefficients is missing from the Docblock of _convertPrivateKey()
Parameter $RSAPrivateKey could not be found in _convertPrivateKey()
Name of argument $n does not match with the DocBlock's name $RSAPrivateKey in _convertPublicKey()
Argument $e is missing from the Docblock of _convertPublicKey()
Parameter $RSAPrivateKey could not be found in _convertPublicKey()
Name of argument $type does not match with the DocBlock's name $key in getPublicKey()
Parameter $key could not be found in getPublicKey()
No short description for method _decodeLength()
Argument $string is missing from the Docblock of _decodeLength()
No short description for method _encodeLength()
Argument $length is missing from the Docblock of _encodeLength()
Name of argument $sLen does not match with the DocBlock's name $format in setSaltLength()
Parameter $format could not be found in setSaltLength()
Name of argument $maskLen does not match with the DocBlock's name $mgfLen in _mgf1()
Parameter $mgfLen could not be found in _mgf1()
Argument $s is missing from the Docblock of _rsassa_pkcs1_v1_5_verify()
Name of argument $ciphertext does not match with the DocBlock's name $plaintext in decrypt()
Parameter $plaintext could not be found in decrypt()
Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.
<p>Uses hash() or mhash() if available and an internal implementation, otherwise. Currently supports the following:</p>

<p>md2, md5, md5-96, sha1, sha1-96, sha256, sha384, and sha512</p>

<p>If {@link Crypt_Hash::setKey() setKey()} is called, {@link Crypt_Hash::hash() hash()} will return the HMAC as opposed to the hash. If no valid algorithm is provided, sha1 will be used.</p>

<p>PHP versions 4 and 5</p>

<p>{@internal The variable names are the same as those in {@link http://tools.ietf.org/html/rfc2104#section-2 RFC2104}.}}</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/Hash.php');

$hash = new Crypt_Hash('sha1');

$hash->setKey('abcdefg');

echo base64_encode($hash->hash('abcdefg')); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_Hash

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: Hash.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

Math/BigInteger.php
CRYPT_HASH_MODE_INTERNAL
\CRYPT_HASH_MODE_INTERNAL
1
Toggles the internal implementation
CRYPT_HASH_MODE_MHASH
\CRYPT_HASH_MODE_MHASH
2
Toggles the mhash() implementation, which has been deprecated on PHP 5.3.0+.
CRYPT_HASH_MODE_HASH
\CRYPT_HASH_MODE_HASH
3
Toggles the hash() implementation, which works on PHP 5.1.2+.
CRYPT_HASH_MODE
\CRYPT_HASH_MODE
CRYPT_HASH_MODE_INTERNAL
Crypt_Hash
\Crypt_Hash
Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_Hash

$b Byte-length of compression blocks / key (Internal HMAC) `` `Integer` `` $l false Byte-length of hash output (Internal HMAC) `` `Integer` `` $hash Hash Algorithm `` `String` `` $key '' Key `` `String` `` $opad Outer XOR (Internal HMAC) `` `String` `` $ipad Inner XOR (Internal HMAC) `` `String` `` Crypt_Hash Crypt_Hash Default Constructor. `\optional` `\Crypt_Hash` `` $hash 'sha1' setKey setKey Sets the key for HMACs <p>Keys can be of any length.</p> `` `String` $key setHash setHash Sets the hash function. `` `String` $hash hash hash Compute the HMAC. `` `String` `String` $text getLength getLength Returns the hash length (in bytes) `` `Integer` _md5 _md5 Wrapper for MD5 `` `String` $m _sha1 _sha1 Wrapper for SHA1 `` `String` $m _md2 _md2 Pure-PHP implementation of MD2 <p>See {@link http://tools.ietf.org/html/rfc1319 RFC1319}.</p> `` `String` $m _sha256 _sha256 Pure-PHP implementation of SHA256 <p>See {@link http://en.wikipedia.org/wiki/SHA_hash_functions#SHA-256_.28a_SHA-2_variant.29_pseudocode SHA-256 (a SHA-2 variant) pseudocode - Wikipedia}.</p> `` `String` $m _sha512 _sha512 Pure-PHP implementation of SHA384 and SHA512 `` `String` $m _rightRotate _rightRotate Right Rotate `` `Integer` `Integer` `` `Integer` $int $amt _rightShift _rightShift Right Shift `` `Integer` `Integer` `` `Integer` $int $amt _not _not Not `` `Integer` `` `Integer` $int _add _add Add <p>_sha256() adds multiple unsigned 32-bit integers. Since PHP doesn't support unsigned integers and since the possibility of overflow exists, care has to be taken. Math_BigInteger() could be used but this should be faster.</p> `String` `\optional` `String` `` `` _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1
Name of argument $m does not match with the DocBlock's name $text in _md5()
Parameter $text could not be found in _md5()
Name of argument $m does not match with the DocBlock's name $text in _sha1()
Parameter $text could not be found in _sha1()
Name of argument $m does not match with the DocBlock's name $text in _md2()
Parameter $text could not be found in _md2()
Name of argument $m does not match with the DocBlock's name $text in _sha256()
Parameter $text could not be found in _sha256()
Name of argument $m does not match with the DocBlock's name $text in _sha512()
Parameter $text could not be found in _sha512()
Parameter $string could not be found in _add()
Parameter could not be found in _add()
Pure-PHP implementation of Triple DES.
<p>Uses mcrypt, if available, and an internal implementation, otherwise. Operates in the EDE3 mode (encrypt-decrypt-encrypt).</p>

<p>PHP versions 4 and 5</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/TripleDES.php');

$des = new Crypt_TripleDES();

$des->setKey('abcdefghijklmnopqrstuvwx');

$size = 10 * 1024; $plaintext = ''; for ($i = 0; $i < $size; $i++) { $plaintext.= 'a'; }

echo $des->decrypt($des->encrypt($plaintext)); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_TripleDES

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: TripleDES.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

DES.php
Include Crypt_DES
CRYPT_DES_MODE_3CBC
\CRYPT_DES_MODE_3CBC
-2
Encrypt / decrypt using inner chaining
<p>Inner chaining is used by SSH-1 and is generally considered to be less secure then outer chaining (CRYPT_DES_MODE_CBC3).</p>
CRYPT_DES_MODE_CBC3
\CRYPT_DES_MODE_CBC3
CRYPT_DES_MODE_CBC
Encrypt / decrypt using outer chaining
<p>Outer chaining is used by SSH-2 and when the mode is set to CRYPT_DES_MODE_CBC.</p>
CRYPT_DES_MODE
\CRYPT_DES_MODE
CRYPT_DES_MODE_INTERNAL
Crypt_TripleDES
\Crypt_TripleDES
Pure-PHP implementation of Triple DES.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_TerraDES

$key "\0\0\0\0\0\0\0\0" The Three Keys `` `String` `` $mode CRYPT_DES_MODE_CBC The Encryption Mode `` `Integer` `` $continuousBuffer false Continuous Buffer status `` `Boolean` `` $padding true Padding status `` `Boolean` `` $iv "\0\0\0\0\0\0\0\0" The Initialization Vector `` `String` `` $encryptIV "\0\0\0\0\0\0\0\0" A "sliding" Initialization Vector `` `String` `` $decryptIV "\0\0\0\0\0\0\0\0" A "sliding" Initialization Vector `` `String` `` $des The Crypt_DES objects `Array` `` $enmcrypt mcrypt resource for encryption <p>The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.</p> `` `String` `` $demcrypt mcrypt resource for decryption <p>The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.</p> `` `String` `` $enchanged true Does the enmcrypt resource need to be (re)initialized? `` `` `Boolean` `` $dechanged true Does the demcrypt resource need to be (re)initialized? `` `` `Boolean` `` $paddable false Is the mode one that is paddable? `` `Boolean` `` $enbuffer '' Encryption buffer for CTR, OFB and CFB modes `` `String` `` $debuffer '' Decryption buffer for CTR, OFB and CFB modes `` `String` `` $ecb mcrypt resource for CFB mode `` `` `String` `` Crypt_TripleDES Crypt_TripleDES Default Constructor. <p>Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_DES_MODE_ECB or CRYPT_DES_MODE_CBC. If not explictly set, CRYPT_DES_MODE_CBC will be used.</p> `\optional` `\Crypt_TripleDES` `` $mode CRYPT_DES_MODE_CBC setKey setKey Sets the key. <p>Keys can be of any length. Triple DES, itself, can use 128-bit (eg. strlen($key) == 16) or 192-bit (eg. strlen($key) == 24) keys. This function pads and truncates $key as appropriate.</p> <p>DES also requires that every eighth bit be a parity bit, however, we'll ignore that.</p> <p>If the key is not explicitly set, it'll be assumed to be all zero's.</p> `` `String` $key setIV setIV Sets the initialization vector. <p>(optional)</p> <p>SetIV is not required when CRYPT_DES_MODE_ECB is being used. If not explictly set, it'll be assumed to be all zero's.</p> `` `String` $iv _generate_xor _generate_xor Generate CTR XOR encryption key <p>Encrypt the output of this and XOR it against the ciphertext / plaintext to get the plaintext / ciphertext in CTR mode.</p> `` `` `` `Integer` `String` $length $iv encrypt encrypt Encrypts a message. `` `String` $plaintext decrypt decrypt Decrypts a message. `` `String` $ciphertext enableContinuousBuffer enableContinuousBuffer Treat consecutive "packets" as if they are a continuous buffer. <p>Say you have a 16-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs:</p> <pre><code> echo $des->encrypt(substr($plaintext, 0, 8)); echo $des->encrypt(substr($plaintext, 8, 8)); </code></pre> <pre><code> echo $des->encrypt($plaintext); </code></pre> <p>The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following:</p> <pre><code> $des->encrypt(substr($plaintext, 0, 8)); echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code></pre> <pre><code> echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code></pre> <p>With the continuous buffer disabled, these would yield the same output. With it enabled, they yield different outputs. The reason is due to the fact that the initialization vector's change after every encryption / decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.</p> <p>Put another way, when the continuous buffer is enabled, the state of the Crypt_DES() object changes after each encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them), however, they are also less intuitive and more likely to cause you problems.</p> `` `` disableContinuousBuffer disableContinuousBuffer Treat consecutive packets as if they are a discontinuous buffer. <p>The default behavior.</p> `` `` enablePadding enablePadding Pad "packets". <p>DES works by encrypting eight bytes at a time. If you ever need to encrypt or decrypt something that's not a multiple of eight, it becomes necessary to pad the input so that it's length is a multiple of eight.</p> <p>Padding is enabled by default. Sometimes, however, it is undesirable to pad strings. Such is the case in SSH1, where "packets" are padded with random bytes before being encrypted. Unpad these packets and you risk stripping away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is transmitted separately)</p> `` `` disablePadding disablePadding Do not pad packets. `` `` _pad _pad Pads a string <p>Pads a string using the RSA PKCS padding standards so that its length is a multiple of the blocksize (8). 8 - (strlen($text) &amp; 7) bytes are added, each of which is equal to chr(8 - (strlen($text) &amp; 7)</p> <p>If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless and padding will, hence forth, be enabled.</p> `` `` $text _unpad _unpad Unpads a string <p>If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong and false will be returned.</p> `` `` $text _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1
Argument $text is missing from the Docblock of _pad()
Argument $text is missing from the Docblock of _unpad()
Pure-PHP implementation of AES.
<p>Uses mcrypt, if available, and an internal implementation, otherwise.</p>

<p>PHP versions 4 and 5</p>

<p>If {@link Crypt_AES::setKeyLength() setKeyLength()} isn't called, it'll be calculated from {@link Crypt_AES::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits it'll be null-padded to 160-bits and 160 bits will be the key length until {@link Crypt_Rijndael::setKey() setKey()} is called, again, at which point, it'll be recalculated.</p>

<p>Since Crypt_AES extends Crypt_Rijndael, some functions are available to be called that, in the context of AES, don't make a whole lot of sense. {@link Crypt_AES::setBlockLength() setBlockLength()}, for instance. Calling that function, however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one).</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/AES.php');

$aes = new Crypt_AES();

$aes->setKey('abcdefghijklmnop');

$size = 10 * 1024; $plaintext = ''; for ($i = 0; $i < $size; $i++) { $plaintext.= 'a'; }

echo $aes->decrypt($aes->encrypt($plaintext)); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_AES

Jim Wigginton <terrafrost@php.net>

MMVIII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: AES.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

Rijndael.php
Include Crypt_Rijndael
CRYPT_AES_MODE_CTR
\CRYPT_AES_MODE_CTR
-1
Encrypt / decrypt using the Counter mode.
<p>Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.</p>

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29

CRYPT_AES_MODE_ECB
\CRYPT_AES_MODE_ECB
1
Encrypt / decrypt using the Electronic Code Book mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29

CRYPT_AES_MODE_CBC
\CRYPT_AES_MODE_CBC
2
Encrypt / decrypt using the Code Book Chaining mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29

CRYPT_AES_MODE_CFB
\CRYPT_AES_MODE_CFB
3
Encrypt / decrypt using the Cipher Feedback mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29

CRYPT_AES_MODE_OFB
\CRYPT_AES_MODE_OFB
4
Encrypt / decrypt using the Cipher Feedback mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29

CRYPT_AES_MODE_INTERNAL
\CRYPT_AES_MODE_INTERNAL
1
Toggles the internal implementation
CRYPT_AES_MODE_MCRYPT
\CRYPT_AES_MODE_MCRYPT
2
Toggles the mcrypt implementation
CRYPT_AES_MODE
\CRYPT_AES_MODE
CRYPT_AES_MODE_INTERNAL
\Crypt_Rijndael
Crypt_AES
\Crypt_AES
Pure-PHP implementation of AES.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_AES

$enmcrypt mcrypt resource for encryption <p>The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.</p> `` `String` `` $demcrypt mcrypt resource for decryption <p>The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.</p> `` `String` `` $ecb mcrypt resource for CFB mode `` `` `String` `` Crypt_AES Crypt_AES Default Constructor. <p>Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC. If not explictly set, CRYPT_AES_MODE_CBC will be used.</p> `\optional` `\Crypt_AES` `` $mode CRYPT_AES_MODE_CBC setBlockLength setBlockLength Dummy function <p>Since Crypt_AES extends Crypt_Rijndael, this function is, technically, available, but it doesn't do anything.</p> `` `Integer` $length encrypt encrypt Encrypts a message. <p>$plaintext will be padded with up to 16 additional bytes. Other AES implementations may or may not pad in the same manner. Other common approaches to padding and the reasons why it's necessary are discussed in the following URL:</p> <p>{@link http://www.di-mgt.com.au/cryptopad.html http://www.di-mgt.com.au/cryptopad.html}</p> <p>An alternative to padding is to, separately, send the length of the file. This is what SSH, in fact, does. strlen($plaintext) will still need to be a multiple of 16, however, arbitrary values can be added to make it that length.</p> `` `` `String` $plaintext decrypt decrypt Decrypts a message. <p>If strlen($ciphertext) is not a multiple of 16, null bytes will be added to the end of the string until it is.</p> `` `` `String` $ciphertext _mcryptSetup _mcryptSetup Setup mcrypt <p>Validates all the variables.</p> `` _encryptBlock _encryptBlock Encrypts a block <p>Optimized over Crypt_Rijndael's implementation by means of loop unrolling.</p> `` `` `String` `String` $in _decryptBlock _decryptBlock Decrypts a block <p>Optimized over Crypt_Rijndael's implementation by means of loop unrolling.</p> `` `` `String` `String` $in
Pure-PHP implementation of RC4.
<p>Uses mcrypt, if available, and an internal implementation, otherwise.</p>

<p>PHP versions 4 and 5</p>

<p>Useful resources are as follows:</p>

<ul> <li>{@link http://www.mozilla.org/projects/security/pki/nss/draft-kaukonen-cipher-arcfour-03.txt ARCFOUR Algorithm}</li> <li>{@link http://en.wikipedia.org/wiki/RC4 - Wikipedia: RC4}</li> </ul>

<p>RC4 is also known as ARCFOUR or ARC4. The reason is elaborated upon at Wikipedia. This class is named RC4 and not ARCFOUR or ARC4 because RC4 is how it is refered to in the SSH1 specification.</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/RC4.php');

$rc4 = new Crypt_RC4();

$rc4->setKey('abcdefgh');

$size = 10 * 1024; $plaintext = ''; for ($i = 0; $i < $size; $i++) { $plaintext.= 'a'; }

echo $rc4->decrypt($rc4->encrypt($plaintext)); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_RC4

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: RC4.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

CRYPT_RC4_MODE_INTERNAL
\CRYPT_RC4_MODE_INTERNAL
1
Toggles the internal implementation
CRYPT_RC4_MODE_MCRYPT
\CRYPT_RC4_MODE_MCRYPT
2
Toggles the mcrypt implementation
CRYPT_RC4_ENCRYPT
\CRYPT_RC4_ENCRYPT
0
CRYPT_RC4_DECRYPT
\CRYPT_RC4_DECRYPT
1
CRYPT_RC4_MODE
\CRYPT_RC4_MODE
CRYPT_RC4_MODE_INTERNAL
Crypt_RC4
\Crypt_RC4
Pure-PHP implementation of RC4.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_RC4

$key "\0" The Key `` `String` `` $encryptStream false The Key Stream for encryption <p>If CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT, this will be equal to the mcrypt object</p> `` `Array` `` $decryptStream false The Key Stream for decryption <p>If CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT, this will be equal to the mcrypt object</p> `` `Array` `` $encryptIndex 0 The $i and $j indexes for encryption `` `Integer` `` $decryptIndex 0 The $i and $j indexes for decryption `` `Integer` `` $mcrypt array('', '') MCrypt parameters `` `Array` `` $mode The Encryption Algorithm <p>Only used if CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT. Only possible values are MCRYPT_RC4 or MCRYPT_ARCFOUR.</p> `` `Integer` `` $continuousBuffer false Continuous Buffer status `` `Boolean` `` Crypt_RC4 Crypt_RC4 Default Constructor. <p>Determines whether or not the mcrypt extension should be used.</p> `\optional` `\Crypt_RC4` `` setKey setKey Sets the key. <p>Keys can be between 1 and 256 bytes long. If they are longer then 256 bytes, the first 256 bytes will be used. If no key is explicitly set, it'll be assumed to be a single null byte.</p> `` `String` $key setIV setIV Dummy function. <p>Some protocols, such as WEP, prepend an "initialization vector" to the key, effectively creating a new key [1]. If you need to use an initialization vector in this manner, feel free to prepend it to the key, yourself, before calling setKey().</p> <p>[1] WEP's initialization vectors (IV's) are used in a somewhat insecure way. Since, in that protocol, the IV's are relatively easy to predict, an attack described by {@link http://www.drizzle.com/~aboba/IEEE/rc4_ksaproc.pdf Scott Fluhrer, Itsik Mantin, and Adi Shamir} can be used to quickly guess at the rest of the key. The following links elaborate:</p> <p>{@link http://www.rsa.com/rsalabs/node.asp?id=2009 http://www.rsa.com/rsalabs/node.asp?id=2009} {@link http://en.wikipedia.org/wiki/Related_key_attack http://en.wikipedia.org/wiki/Related_key_attack}</p> `String` `` `` $iv setMCrypt setMCrypt Sets MCrypt parameters. <p>(optional)</p> <p>If MCrypt is being used, empty strings will be used, unless otherwise specified.</p> `` `` `\optional` `\optional` $algorithm_directory '' $mode_directory '' encrypt encrypt Encrypts a message. `` `` `String` $plaintext decrypt decrypt Decrypts a message. <p>$this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)). Atleast if the continuous buffer is disabled.</p> `` `` `String` $ciphertext _crypt _crypt Encrypts or decrypts a message. `` `` `` `String` `Integer` $text $mode enableContinuousBuffer enableContinuousBuffer Treat consecutive "packets" as if they are a continuous buffer. <p>Say you have a 16-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs:</p> <pre><code> echo $rc4->encrypt(substr($plaintext, 0, 8)); echo $rc4->encrypt(substr($plaintext, 8, 8)); </code></pre> <pre><code> echo $rc4->encrypt($plaintext); </code></pre> <p>The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following:</p> <pre><code> $rc4->encrypt(substr($plaintext, 0, 8)); echo $rc4->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code></pre> <pre><code> echo $rc4->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code></pre> <p>With the continuous buffer disabled, these would yield the same output. With it enabled, they yield different outputs. The reason is due to the fact that the initialization vector's change after every encryption / decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.</p> <p>Put another way, when the continuous buffer is enabled, the state of the Crypt_DES() object changes after each encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them), however, they are also less intuitive and more likely to cause you problems.</p> `` `` disableContinuousBuffer disableContinuousBuffer Treat consecutive packets as if they are a discontinuous buffer. <p>The default behavior.</p> `` `` enablePadding enablePadding Dummy function. <p>Since RC4 is a stream cipher and not a block cipher, no padding is necessary. The only reason this function is included is so that you can switch between a block cipher and a stream cipher transparently.</p> `` `` disablePadding disablePadding Dummy function. `` `` __destruct __destruct Class destructor. <p>Will be called, automatically, if you're using PHP5. If you're using PHP4, call it yourself. Only really needs to be called if mcrypt is being used.</p> ``
Parameter could not be found in Crypt_RC4()
Pure-PHP implementation of DES.
<p>Uses mcrypt, if available, and an internal implementation, otherwise.</p>

<p>PHP versions 4 and 5</p>

<p>Useful resources are as follows:</p>

<ul> <li>{@link http://en.wikipedia.org/wiki/DES_supplementary_material Wikipedia: DES supplementary material}</li> <li>{@link http://www.itl.nist.gov/fipspubs/fip46-2.htm FIPS 46-2 - (DES), Data Encryption Standard}</li> <li>{@link http://www.cs.eku.edu/faculty/styer/460/Encrypt/JS-DES.html JavaScript DES Example}</li> </ul>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/DES.php');

$des = new Crypt_DES();

$des->setKey('abcdefgh');

$size = 10 * 1024; $plaintext = ''; for ($i = 0; $i < $size; $i++) { $plaintext.= 'a'; }

echo $des->decrypt($des->encrypt($plaintext)); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_DES

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: DES.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

CRYPT_DES_ENCRYPT
\CRYPT_DES_ENCRYPT
0
Contains array_reverse($keys[CRYPT_DES_DECRYPT])
CRYPT_DES_DECRYPT
\CRYPT_DES_DECRYPT
1
Contains array_reverse($keys[CRYPT_DES_ENCRYPT])
CRYPT_DES_MODE_CTR
\CRYPT_DES_MODE_CTR
-1
Encrypt / decrypt using the Counter mode.
<p>Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.</p>

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29

CRYPT_DES_MODE_ECB
\CRYPT_DES_MODE_ECB
1
Encrypt / decrypt using the Electronic Code Book mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29

CRYPT_DES_MODE_CBC
\CRYPT_DES_MODE_CBC
2
Encrypt / decrypt using the Code Book Chaining mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29

CRYPT_DES_MODE_CFB
\CRYPT_DES_MODE_CFB
3
Encrypt / decrypt using the Cipher Feedback mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29

CRYPT_DES_MODE_OFB
\CRYPT_DES_MODE_OFB
4
Encrypt / decrypt using the Cipher Feedback mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29

CRYPT_DES_MODE_INTERNAL
\CRYPT_DES_MODE_INTERNAL
1
Toggles the internal implementation
CRYPT_DES_MODE_MCRYPT
\CRYPT_DES_MODE_MCRYPT
2
Toggles the mcrypt implementation
CRYPT_DES_MODE
\CRYPT_DES_MODE
CRYPT_DES_MODE_INTERNAL
Crypt_DES
\Crypt_DES
Pure-PHP implementation of DES.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_DES

$keys "\0\0\0\0\0\0\0\0" The Key Schedule `` `Array` `` $mode The Encryption Mode `` `Integer` `` $continuousBuffer false Continuous Buffer status `` `Boolean` `` $padding true Padding status `` `Boolean` `` $iv "\0\0\0\0\0\0\0\0" The Initialization Vector `` `String` `` $encryptIV "\0\0\0\0\0\0\0\0" A "sliding" Initialization Vector `` `String` `` $decryptIV "\0\0\0\0\0\0\0\0" A "sliding" Initialization Vector `` `String` `` $enmcrypt mcrypt resource for encryption <p>The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.</p> `` `String` `` $demcrypt mcrypt resource for decryption <p>The mcrypt resource can be recreated every time something needs to be created or it can be created just once. Since mcrypt operates in continuous mode, by default, it'll need to be recreated when in non-continuous mode.</p> `` `String` `` $enchanged true Does the enmcrypt resource need to be (re)initialized? `` `` `Boolean` `` $dechanged true Does the demcrypt resource need to be (re)initialized? `` `` `Boolean` `` $paddable false Is the mode one that is paddable? `` `Boolean` `` $enbuffer '' Encryption buffer for CTR, OFB and CFB modes `` `String` `` $debuffer '' Decryption buffer for CTR, OFB and CFB modes `` `String` `` $ecb mcrypt resource for CFB mode `` `` `String` `` Crypt_DES Crypt_DES Default Constructor. <p>Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_DES_MODE_ECB or CRYPT_DES_MODE_CBC. If not explictly set, CRYPT_DES_MODE_CBC will be used.</p> `\optional` `\Crypt_DES` `` $mode CRYPT_MODE_DES_CBC setKey setKey Sets the key. <p>Keys can be of any length. DES, itself, uses 64-bit keys (eg. strlen($key) == 8), however, we only use the first eight, if $key has more then eight characters in it, and pad $key with the null byte if it is less then eight characters long.</p> <p>DES also requires that every eighth bit be a parity bit, however, we'll ignore that.</p> <p>If the key is not explicitly set, it'll be assumed to be all zero's.</p> `` `String` $key setIV setIV Sets the initialization vector. <p>(optional)</p> <p>SetIV is not required when CRYPT_DES_MODE_ECB is being used. If not explictly set, it'll be assumed to be all zero's.</p> `` `String` $iv _generate_xor _generate_xor Generate CTR XOR encryption key <p>Encrypt the output of this and XOR it against the ciphertext / plaintext to get the plaintext / ciphertext in CTR mode.</p> `` `` `` `Integer` `String` $length $iv encrypt encrypt Encrypts a message. <p>$plaintext will be padded with up to 8 additional bytes. Other DES implementations may or may not pad in the same manner. Other common approaches to padding and the reasons why it's necessary are discussed in the following URL:</p> <p>{@link http://www.di-mgt.com.au/cryptopad.html http://www.di-mgt.com.au/cryptopad.html}</p> <p>An alternative to padding is to, separately, send the length of the file. This is what SSH, in fact, does. strlen($plaintext) will still need to be a multiple of 8, however, arbitrary values can be added to make it that length.</p> `` `` `String` $plaintext decrypt decrypt Decrypts a message. <p>If strlen($ciphertext) is not a multiple of 8, null bytes will be added to the end of the string until it is.</p> `` `` `String` $ciphertext enableContinuousBuffer enableContinuousBuffer Treat consecutive "packets" as if they are a continuous buffer. <p>Say you have a 16-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs:</p> <pre><code> echo $des->encrypt(substr($plaintext, 0, 8)); echo $des->encrypt(substr($plaintext, 8, 8)); </code></pre> <pre><code> echo $des->encrypt($plaintext); </code></pre> <p>The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following:</p> <pre><code> $des->encrypt(substr($plaintext, 0, 8)); echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code></pre> <pre><code> echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code></pre> <p>With the continuous buffer disabled, these would yield the same output. With it enabled, they yield different outputs. The reason is due to the fact that the initialization vector's change after every encryption / decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.</p> <p>Put another way, when the continuous buffer is enabled, the state of the Crypt_DES() object changes after each encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them), however, they are also less intuitive and more likely to cause you problems.</p> `` `` disableContinuousBuffer disableContinuousBuffer Treat consecutive packets as if they are a discontinuous buffer. <p>The default behavior.</p> `` `` enablePadding enablePadding Pad "packets". <p>DES works by encrypting eight bytes at a time. If you ever need to encrypt or decrypt something that's not a multiple of eight, it becomes necessary to pad the input so that it's length is a multiple of eight.</p> <p>Padding is enabled by default. Sometimes, however, it is undesirable to pad strings. Such is the case in SSH1, where "packets" are padded with random bytes before being encrypted. Unpad these packets and you risk stripping away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is transmitted separately)</p> `` `` disablePadding disablePadding Do not pad packets. `` `` _pad _pad Pads a string <p>Pads a string using the RSA PKCS padding standards so that its length is a multiple of the blocksize (8). 8 - (strlen($text) &amp; 7) bytes are added, each of which is equal to chr(8 - (strlen($text) &amp; 7)</p> <p>If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless and padding will, hence forth, be enabled.</p> `` `` $text _unpad _unpad Unpads a string <p>If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong and false will be returned.</p> `` `` $text _processBlock _processBlock Encrypts or decrypts a 64-bit block <p>$mode should be either CRYPT_DES_ENCRYPT or CRYPT_DES_DECRYPT. See {@link http://en.wikipedia.org/wiki/Image:Feistel.png Feistel.png} to get a general idea of what this function does.</p> `` `String` `Integer` `String` $block $mode _prepareKey _prepareKey Creates the key schedule. `` `String` `Array` $key _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1
Argument $text is missing from the Docblock of _pad()
Argument $text is missing from the Docblock of _unpad()
Random Number Generator
<p>PHP versions 4 and 5</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/Random.php');

echo crypt_random(); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_Random

Jim Wigginton <terrafrost@php.net>

MMVII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: Random.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

crypt_random
\crypt_random
Generate a random value.
<p>On 32-bit machines, the largest distance that can exist between $min and $max is 2**31. If $min and $max are farther apart than that then the last ($max - range) numbers.</p>

<p>Depending on how this is being used, it may be worth while to write a replacement. For example, a PHP-based web app that stores its data in an SQL database can collect more entropy than this function can.</p>

Integer $min

\optional

Integer $max

\optional
Integer

public

$min
0
$max
2147483647
Pure-PHP implementation of Rijndael.
<p>Does not use mcrypt, even when available, for reasons that are explained below.</p>

<p>PHP versions 4 and 5</p>

<p>If {@link Crypt_Rijndael::setBlockLength() setBlockLength()} isn't called, it'll be assumed to be 128 bits. If {@link Crypt_Rijndael::setKeyLength() setKeyLength()} isn't called, it'll be calculated from {@link Crypt_Rijndael::setKey() setKey()}. ie. if the key is 128-bits, the key length will be 128-bits. If it's 136-bits it'll be null-padded to 160-bits and 160 bits will be the key length until {@link Crypt_Rijndael::setKey() setKey()} is called, again, at which point, it'll be recalculated.</p>

<p>Not all Rijndael implementations may support 160-bits or 224-bits as the block length / key length. mcrypt, for example, does not. AES, itself, only supports block lengths of 128 and key lengths of 128, 192, and 256. {@link http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf#page=10 Rijndael-ammended.pdf#page=10} defines the algorithm for block lengths of 192 and 256 but not for block lengths / key lengths of 160 and 224. Indeed, 160 and 224 are first defined as valid key / block lengths in {@link http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf#page=44 Rijndael-ammended.pdf#page=44}: Extensions: Other block and Cipher Key lengths.</p>

<p>{@internal The variable names are the same as those in {@link http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf#page=10 fips-197.pdf#page=10}.}}</p>

<p>Here's a short example of how to use this library:</p>

<pre><code><?php include('Crypt/Rijndael.php');

$rijndael = new Crypt_Rijndael();

$rijndael->setKey('abcdefghijklmnop');

$size = 10 * 1024; $plaintext = ''; for ($i = 0; $i < $size; $i++) { $plaintext.= 'a'; }

echo $rijndael->decrypt($rijndael->encrypt($plaintext)); ?> </code></pre>

<p>LICENSE: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

Crypt

Crypt_Rijndael

Jim Wigginton <terrafrost@php.net>

MMVIII Jim Wigginton

http://www.opensource.org/licenses/mit-license.html MIT License

$Id: Rijndael.php 4105 2011-05-19 18:02:11Z gruberroland $

http://phpseclib.sourceforge.net

CRYPT_RIJNDAEL_MODE_CTR
\CRYPT_RIJNDAEL_MODE_CTR
-1
Encrypt / decrypt using the Counter mode.
<p>Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.</p>

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29

CRYPT_RIJNDAEL_MODE_ECB
\CRYPT_RIJNDAEL_MODE_ECB
1
Encrypt / decrypt using the Electronic Code Book mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29

CRYPT_RIJNDAEL_MODE_CBC
\CRYPT_RIJNDAEL_MODE_CBC
2
Encrypt / decrypt using the Code Book Chaining mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher-block_chaining_.28CBC.29

CRYPT_RIJNDAEL_MODE_CFB
\CRYPT_RIJNDAEL_MODE_CFB
3
Encrypt / decrypt using the Cipher Feedback mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Cipher_feedback_.28CFB.29

CRYPT_RIJNDAEL_MODE_OFB
\CRYPT_RIJNDAEL_MODE_OFB
4
Encrypt / decrypt using the Cipher Feedback mode.

http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Output_feedback_.28OFB.29

CRYPT_RIJNDAEL_MODE_INTERNAL
\CRYPT_RIJNDAEL_MODE_INTERNAL
1
Toggles the internal implementation
CRYPT_RIJNDAEL_MODE_MCRYPT
\CRYPT_RIJNDAEL_MODE_MCRYPT
2
Toggles the mcrypt implementation
Crypt_Rijndael
\Crypt_Rijndael
Pure-PHP implementation of Rijndael.

Jim Wigginton <terrafrost@php.net>

0.1.0

public

Crypt_Rijndael

$mode The Encryption Mode `` `Integer` `` $key "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" The Key `` `String` `` $iv '' The Initialization Vector `` `String` `` $encryptIV '' A "sliding" Initialization Vector `` `String` `` $decryptIV '' A "sliding" Initialization Vector `` `String` `` $continuousBuffer false Continuous Buffer status `` `Boolean` `` $padding true Padding status `` `Boolean` `` $changed true Does the key schedule need to be (re)calculated? `` `` `` `Boolean` `` $explicit_key_length false Has the key length explicitly been set or should it be derived from the key, itself? `` `Boolean` `` $w The Key Schedule `` `Array` `` $dw The Inverse Key Schedule `` `Array` `` $block_size 16 The Block Length `` `Integer` `` `` $Nb 4 The Block Length divided by 32 `` `Integer` `` `` $key_size 16 The Key Length `` `Integer` `` `` $Nk 4 The Key Length divided by 32 `` `Integer` `` `` $Nr The Number of Rounds `Integer` `` `` $c Shift offsets `Array` `` $t0 Precomputed mixColumns table `` `Array` `` $t1 Precomputed mixColumns table `` `Array` `` $t2 Precomputed mixColumns table `` `Array` `` $t3 Precomputed mixColumns table `` `Array` `` $dt0 Precomputed invMixColumns table `` `Array` `` $dt1 Precomputed invMixColumns table `` `Array` `` $dt2 Precomputed invMixColumns table `` `Array` `` $dt3 Precomputed invMixColumns table `` `Array` `` $paddable false Is the mode one that is paddable? `` `Boolean` `` $enbuffer array('encrypted' => '', 'xor' => '') Encryption buffer for CTR, OFB and CFB modes `` `String` `` $debuffer array('ciphertext' => '') Decryption buffer for CTR, OFB and CFB modes `` `String` `` Crypt_Rijndael Crypt_Rijndael Default Constructor. <p>Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_RIJNDAEL_MODE_ECB or CRYPT_RIJNDAEL_MODE_CBC. If not explictly set, CRYPT_RIJNDAEL_MODE_CBC will be used.</p> `\optional` `\Crypt_Rijndael` `` $mode CRYPT_RIJNDAEL_MODE_CBC setKey setKey Sets the key. <p>Keys can be of any length. Rijndael, itself, requires the use of a key that's between 128-bits and 256-bits long and whose length is a multiple of 32. If the key is less than 256-bits and the key length isn't set, we round the length up to the closest valid key length, padding $key with null bytes. If the key is more than 256-bits, we trim the excess bits.</p> <p>If the key is not explicitly set, it'll be assumed to be all null bytes.</p> `` `String` $key setIV setIV Sets the initialization vector. <p>(optional)</p> <p>SetIV is not required when CRYPT_RIJNDAEL_MODE_ECB is being used. If not explictly set, it'll be assumed to be all zero's.</p> `` `String` $iv setKeyLength setKeyLength Sets the key length <p>Valid key lengths are 128, 160, 192, 224, and 256. If the length is less than 128, it will be rounded up to 128. If the length is greater then 128 and invalid, it will be rounded down to the closest valid amount.</p> `` `Integer` $length setBlockLength setBlockLength Sets the block length <p>Valid block lengths are 128, 160, 192, 224, and 256. If the length is less than 128, it will be rounded up to 128. If the length is greater then 128 and invalid, it will be rounded down to the closest valid amount.</p> `` `Integer` $length _generate_xor _generate_xor Generate CTR XOR encryption key <p>Encrypt the output of this and XOR it against the ciphertext / plaintext to get the plaintext / ciphertext in CTR mode.</p> `` `` `` `Integer` `String` $length $iv encrypt encrypt Encrypts a message. <p>$plaintext will be padded with additional bytes such that it's length is a multiple of the block size. Other Rjindael implementations may or may not pad in the same manner. Other common approaches to padding and the reasons why it's necessary are discussed in the following URL:</p> <p>{@link http://www.di-mgt.com.au/cryptopad.html http://www.di-mgt.com.au/cryptopad.html}</p> <p>An alternative to padding is to, separately, send the length of the file. This is what SSH, in fact, does. strlen($plaintext) will still need to be a multiple of 8, however, arbitrary values can be added to make it that length.</p> `` `` `String` $plaintext decrypt decrypt Decrypts a message. <p>If strlen($ciphertext) is not a multiple of the block size, null bytes will be added to the end of the string until it is.</p> `` `` `String` $ciphertext _encryptBlock _encryptBlock Encrypts a block `` `String` `String` $in _decryptBlock _decryptBlock Decrypts a block `` `String` `String` $in _setup _setup Setup Rijndael <p>Validates all the variables and calculates $Nr - the number of rounds that need to be performed - and $w - the key key schedule.</p> `` _subWord _subWord Performs S-Box substitutions `` $word _invSubWord _invSubWord Performs inverse S-Box substitutions `` $word enablePadding enablePadding Pad "packets". <p>Rijndael works by encrypting between sixteen and thirty-two bytes at a time, provided that number is also a multiple of four. If you ever need to encrypt or decrypt something that isn't of the proper length, it becomes necessary to pad the input so that it is of the proper length.</p> <p>Padding is enabled by default. Sometimes, however, it is undesirable to pad strings. Such is the case in SSH, where "packets" are padded with random bytes before being encrypted. Unpad these packets and you risk stripping away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is transmitted separately)</p> `` `` disablePadding disablePadding Do not pad packets. `` `` _pad _pad Pads a string <p>Pads a string using the RSA PKCS padding standards so that its length is a multiple of the blocksize. $block_size - (strlen($text) % $block_size) bytes are added, each of which is equal to chr($block_size - (strlen($text) % $block_size)</p> <p>If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless and padding will, hence forth, be enabled.</p> `` `` $text _unpad _unpad Unpads a string. <p>If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong and false will be returned.</p> `` `` $text enableContinuousBuffer enableContinuousBuffer Treat consecutive "packets" as if they are a continuous buffer. <p>Say you have a 32-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs:</p> <pre><code> echo $rijndael->encrypt(substr($plaintext, 0, 16)); echo $rijndael->encrypt(substr($plaintext, 16, 16)); </code></pre> <pre><code> echo $rijndael->encrypt($plaintext); </code></pre> <p>The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following:</p> <pre><code> $rijndael->encrypt(substr($plaintext, 0, 16)); echo $rijndael->decrypt($des->encrypt(substr($plaintext, 16, 16))); </code></pre> <pre><code> echo $rijndael->decrypt($des->encrypt(substr($plaintext, 16, 16))); </code></pre> <p>With the continuous buffer disabled, these would yield the same output. With it enabled, they yield different outputs. The reason is due to the fact that the initialization vector's change after every encryption / decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.</p> <p>Put another way, when the continuous buffer is enabled, the state of the Crypt_Rijndael() object changes after each encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them), however, they are also less intuitive and more likely to cause you problems.</p> `` `` disableContinuousBuffer disableContinuousBuffer Treat consecutive packets as if they are a discontinuous buffer. <p>The default behavior.</p> `` `` _string_shift _string_shift String Shift <p>Inspired by array_shift</p> `String` `\optional` `String` `` $string $index 1
Argument $word is missing from the Docblock of _subWord()
Argument $word is missing from the Docblock of _invSubWord()
Argument $text is missing from the Docblock of _pad()
Argument $text is missing from the Docblock of _unpad()
Interface between modules and other parts of LAM.

modules

Tilo Lutz

Michael Duergner

Roland Gruber

account.inc
some helper functions
baseModule.inc
parent class of account modules
ldap.inc
access to LDAP server
lamdaemon.inc
lamdaemon functions
security.inc
security functions
html.inc
meta HTML classes
../main_header.php
../main_footer.php
getModuleAlias
\getModuleAlias
Returns the alias name of a module

the module name

string

the account type ("user", "group", "host")

string

alias name

string
$name
$scope
is_base_module
\is_base_module
Returns true if the module is a base module

the module name

string

the account type ("user", "group", "host")

string

true if base module

boolean
$name
$scope
get_ldap_filter
\get_ldap_filter
Returns the LDAP filter used by the account lists

the account type ("user", "group", "host")

string

LDAP filter

string
$scope
getRDNAttributes
\getRDNAttributes
Returns a list of LDAP attributes which can be used to form the RDN.
<p>The list is already sorted by the priority given by the nodules.</p>

account type (user, group, host)

string

return only RDN attributes of these modules

array

list of LDAP attributes

array
$scope
$selectedModules
null
getModulesDependencies
\getModulesDependencies
Returns a hash array (module name => dependencies) of all module dependencies
<p>"dependencies" contains an array with two sub arrays: depends, conflicts <br>The elements of "depends" are either module names or an array of module names (OR-case). <br>The elements of conflicts are module names.</p>

the account type (user, group, host)

string

dependencies

array
$scope
check_module_depends
\check_module_depends
Checks if there are missing dependencies between modules.

selected module names

array

module dependencies

array

false if no misssing dependency was found, otherwise an array of array(selected module, depending module) if missing dependencies were found

mixed
$selected
$deps
check_module_conflicts
\check_module_conflicts
Checks if there are conflicts between modules

selected module names

array

module dependencies

array

false if no conflict was found, otherwise an array of array(selected module, conflicting module) if conflicts were found

boolean
$selected
$deps
getAvailableModules
\getAvailableModules
Returns an array with all available user module names

account type (user, group, host)

string

module must support LAM admin interface (default: false)

boolean

list of possible modules

array
$scope
$mustSupportAdminInterface
false
getProfileOptions
\getProfileOptions
Returns the elements for the profile page.

account type (user, group, host)

string

profile elements

array
$scope
checkProfileOptions
\checkProfileOptions
Checks if the profile options are valid

account type (user, group, host)

string

hash array containing all options (name => array(...))

array

list of error messages

array
$scope
$options
getConfigOptions
\getConfigOptions
Returns a hash array (module name => elements) of all module options for the configuration page.

hash array (module name => array(account types))

array

configuration options

array
$scopes
checkConfigOptions
\checkConfigOptions
Checks if the configuration options are valid

hash array (module name => array(account types))

array

hash array containing all options (name => array(...))

array

list of error messages

array
$scopes
$options
getHelp
\getHelp
Returns a help entry from an account module.

module name

string

help identifier

string

account type

string

help entry

array
$module
$helpID
$scope
''
getAvailablePDFFields
\getAvailablePDFFields
Returns a list of available PDF entries.

account type (user, group, host)

string

PDF entries (field ID => field label)

array
$scope
getUploadColumns
\getUploadColumns
Returns an array containing all input columns for the file upload.
<p>Syntax: <br> array( <br> string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>) <br> string: description, // short descriptive name <br> string: help, // help ID <br> string: example, // example value <br> boolean: required // true, if user must set a value for this column <br> )</p>

account type

string

selected account modules

array

column list

array
$scope
$selectedModules
buildUploadAccounts
\buildUploadAccounts
This function builds the LDAP accounts for the file upload.
<p>If there are problems status messages will be printed automatically.</p>

account type

string

array containing one account in each element

array

array(<column_name> => <column number>)

array

selected account modules

array

array including accounts or false if there were errors

mixed
$scope
$data
$ids
$selectedModules
doUploadPreActions
\doUploadPreActions
Runs any actions that need to be done before an LDAP entry is created.

account type

String

list of selected account modules

array

LDAP attributes of this entry (attributes are provided as reference, handle modifications of $attributes with care)

array

array which contains status messages. Each entry is an array containing the status message parameters.

array
$scope
$selectedModules
$attributes
doUploadPostActions
\doUploadPostActions
This function executes one post upload action.

account type

string

array containing one account in each element

array

array(<column_name> => <column number>)

array

list of accounts which were not created successfully

array

list of selected account modules

array

list of LDAP entries

array

current status <br> array ( <br> 'status' => 'finished' | 'inProgress' <br> 'module' => <name of active module> <br> 'progress' => 0..100 <br> 'errors' => array (<array of parameters for StatusMessage>) <br> )

array
$scope
$data
$ids
$failed
$selectedModules
$accounts
getRequiredExtensions
\getRequiredExtensions
Returns true if the module is a base module

required extensions

array
parseHtml
\parseHtml
Takes a list of meta-HTML elements and prints the equivalent HTML output.
<p>The modules are not allowed to display HTML code directly but return meta HTML code. This allows to have a common design for all module pages.</p>

Name of account module

string

htmlElement or array of htmlElement elements

mixed

List of values which override the defaults in $input (name => value)

array

If true then no buttons will be displayed

boolean

Start value of tabulator index for input fields

integer

Account type

string

List of input field names and their type (name => type)

array
$module
$input
$values
$restricted
$tabindex
$scope
lamCompareDescriptiveOptions
\lamCompareDescriptiveOptions
Helper function to sort descriptive options in parseHTML().
<p>It compares the second entries of two arrays.</p>

first array

array

second array

array

compare result

integer
$a
$b
printHelpLink
\printHelpLink
Prints a LAM help link.

help entry

array

help number

String

module name

String

account scope

String
$entry
$number
$module
''
$scope
''
passwordService \passwordService This interface needs to be implemented by all account modules which manage passwords. <p>It allows LAM to provide central password changes.</p> `` managesPasswordAttributes managesPasswordAttributes This method specifies if a module manages password attributes. <p>The module alias will then appear as option in the GUI. <br>If the module only wants to get notified about password changes then return false.</p> `boolean` supportsForcePasswordChange supportsForcePasswordChange Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested passwordChangeRequested This function is called whenever the password should be changed. <p>Account modules must change their password attributes only if the modules list contains their module name.</p> `String` `array` `boolean` `array` $password $modules $forcePasswordChange accountContainer \accountContainer This class includes all modules and attributes of an account. `` $attributes Array of all used attributes Syntax is attribute => array ( objectClass => MUST or MAY, . <p>..)</p> $type This variale stores the account type. <p>Currently "user", "group" and "host" are supported.</p> $module This is an array with all module objects $dnSuffix DN suffix of the account $dn_orig DN of account when it was loaded $rdn RDN attribute of this account $finalDN DN of saved account $attributes_orig original LDAP attributes when account was loaded from LDAP $order Module order $base Name of accountContainer variable in session $current_page 0 This variable stores the page number of the currently displayed page $subpage This variable is set to the pagename of a subpage if it should be displayed $isNewAccount True if this is a newly created account $lastLoadedProfile '' name of last loaded account profile $cachedOUs null cache for existing OUs $titleBarTitle null main title in title bar $titleBarSubtitle null subtitle in title bar $sendPasswordViaMail null send password via mail $sendPasswordViaMailAlternateAddress null send password via mail to this alternate address __construct __construct Constructor `string` `string` $type $base getAccountModule getAccountModule Returns the account module with the given class name `string` `\baseModule` $name getAccountModules getAccountModules Returns the included account modules. `array` get_type get_type Returns the accout type of this object (e.g. <p>user, group, host).</p> `string` continue_main continue_main This function is called when the user clicks on any button on the account pages. <p>It prints the HTML code of each account page.</p> printModuleContent printModuleContent Prints the content part provided by the current module. `array` `boolean` $result $stopProcessing printPasswordPromt printPasswordPromt Prints the input fields of the central password service. setNewPassword setNewPassword Sets the new password in all selected account modules. `array` $input printCommonControls printCommonControls Prints common controls like the save button and the ou selection. `int` $tabindex showSetPasswordButton showSetPasswordButton Returns if the page should show a button to set the password. `boolean` printPageHeader printPageHeader Prints the header of the account pages. printPageFooter printPageFooter Prints the footer of the account pages. printSuccessPage printSuccessPage Prints the HTML code to notify the user about the successful saving. `array` $messages loadProfileIfRequested loadProfileIfRequested Checks if the user requested to load a profile. `boolean` printModuleTabs printModuleTabs Prints the HTML code of the module tabs. save_module_attributes save_module_attributes This function checks which LDAP attributes have changed while the account was edited. `array` `array` `array` $attributes $orig load_account load_account Loads an LDAP account with the given DN. `string` `array` `array` $dn $infoAttributes array() fixLDAPAttributes fixLDAPAttributes Fixes spelling errors in the attribute names. `array` `array` `array` $attributes $modules new_account new_account This function will prepare the object for a new account. save_account save_account This function will save an account to the LDAP database. `array` get_pdfEntries get_pdfEntries Returns a list of possible PDF entries for this account. `\list` sortModules sortModules Sorts the module buttons for the account page. getRDN getRDN Returns the RDN part of a given DN. `String` `String` $dn getParentDN getParentDN Returns the parent DN of a given DN. `String` `String` $dn getOUs getOUs Returns a list of OUs that exist for this account type. `array` __sleep __sleep Encrypts sensitive data before storing in session. `array` __wakeup __wakeup Decrypts sensitive data after accountContainer was loaded from session.
This class provides functions to calculate Samba NT and LM hashes.
<p>The code is a conversion from createntlm.pl (Benjamin Kuit) and smbdes.c/md4.c (Andrew Tridgell).</p>

Roland Gruber

modules

smbHash
\smbHash
Calculates NT and LM hashes.
<p>The important functions are lmhash($password) and nthash($password).</p>

modules

$perm1 array(57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4) $perm2 array(14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32) $perm3 array(58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7) $perm4 array(32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1) $perm5 array(16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10, 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25) $perm6 array(40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31, 38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29, 36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27, 34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25) $sc array(1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1) $sbox array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7), array(0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8), array(4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0), array(15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13)), array(array(15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10), array(3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5), array(0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15), array(13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9)), array(array(10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8), array(13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1), array(13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7), array(1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12)), array(array(7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15), array(13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9), array(10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4), array(3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14)), array(array(2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9), array(14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6), array(4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14), array(11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3)), array(array(12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11), array(10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8), array(9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6), array(4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13)), array(array(4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1), array(13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6), array(1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2), array(6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12)), array(array(13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7), array(1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2), array(7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8), array(2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11))) x x Fixes too large numbers $i lshift lshift `integer` `array` `array` $count $data permute permute `array` `array` `array` $in $p $n mxor mxor `array` `array` `array` $in1 $in2 doHash doHash `array` `array` `boolean` `array` $in $key $forw str_to_key str_to_key str_to_key `string` `string` $str smb_hash smb_hash smb_hash `\unknown_type` `\unknown_type` `\unknown_type` `\unknown` $in $key $forw E_P16 E_P16 E_P16 `\unknown_type` `\unknown` $in lmhash lmhash Calculates the LM hash of a given password. `string` `string` $password "" nthash nthash Calculates the NT hash of a given password. `string` `string` $password "" unsigned_shift_r unsigned_shift_r Unsigned shift operation for 32bit values. <p>PHP 4 only supports signed shifts by default.</p> $a $b
No DocBlock was found for property $perm1
No DocBlock was found for property $perm2
No DocBlock was found for property $perm3
No DocBlock was found for property $perm4
No DocBlock was found for property $perm5
No DocBlock was found for property $perm6
No DocBlock was found for property $sc
No DocBlock was found for property $sbox
Argument $i is missing from the Docblock of x()
No short description for method lshift()
No short description for method permute()
Argument $n is missing from the Docblock of permute()
No short description for method mxor()
No short description for method doHash()
Argument $a is missing from the Docblock of unsigned_shift_r()
Argument $b is missing from the Docblock of unsigned_shift_r()
This file includes functions to perform several security checks on each page load.

lib

Roland Gruber

config.inc
configuration options
ldap.inc
ldap connection
startSecureSession
\startSecureSession
Starts a session and checks the environment.
<p>The script is stopped if one of the checks fail (timeout redirection may be overriden).</p>

redirect user to login page

boolean

true if all ok, false if session expired

boolean
$redirectToLogin
true
checkClientIP
\checkClientIP
Checks if the client's IP address is on the list of allowed IPs.
<p>The script is stopped if the host is not valid.</p>
logoffAndBackToLoginPage
\logoffAndBackToLoginPage
Logs off the user and displays the login page.
logNewMessage
\logNewMessage
Puts a new message in the log file.

log level (LOG_DEBUG, LOG_NOTICE, LOG_WARNING, LOG_ERR)

string

log message

string
$level
$message
checkIfWriteAccessIsAllowed
\checkIfWriteAccessIsAllowed
Checks if write access to LDAP is allowed.

true, if allowed

boolean
checkIfPasswordChangeIsAllowed
\checkIfPasswordChangeIsAllowed
Checks if passwords may be changed.

true, if allowed

boolean
checkIfNewEntriesAreAllowed
\checkIfNewEntriesAreAllowed
Checks if it is allowed to create new LDAP entries of the given type.
<p>This also checks if general write access is enabled.</p>

account type (e.g. 'user')

String

true, if new entries are allowed

boolean
$scope
checkIfDeleteEntriesIsAllowed
\checkIfDeleteEntriesIsAllowed
Checks if it is allowed to delete LDAP entries of the given type.

account type (e.g. 'user')

String

true, if entries may be deleted

boolean
$scope
checkPasswordStrength
\checkPasswordStrength
Checks if the password fulfills the password policies.

password

string

true if ok, string with error message if not valid

mixed
$password
checkIfToolIsActive
\checkIfToolIsActive
Checks if the given tool is active.
<p>Otherwise, an error message is logged and the execution is stopped (die()).</p>

tool class name (e.g. toolFileUpload)

String
$tool
This is the parent class for all account modules.
<p>It implements the complete module interface and uses meta-data provided by the account modules for its functions.</p>

modules

Roland Gruber

\baseModule

baseModule
\baseModule
Parent class of all account modules.
<p>It implements the complete module interface and uses meta-data provided by the account modules for its functions.<br> <br> <b>Location and naming of modules</b><br> All LAM modules are placed in lib/modules/ and are named "<class name>.inc". E.g. if you create a new module and its class name is "qmail" then the filename would be "qmail.inc". The class name of a module must contain only a-z, A-Z, 0-9, -, and _.<br> <br> You can avoid to override many functions by using {@link get_metaData()}.<br> <br> All module classes should extend the baseModule class.</p>

modules

Roland Gruber

$meta includes all meta data provided by the sub class $scope the account type of this module (user, group, host) $moduleSettings configuration settings of all modules $selfServiceSettings self service settings of all modules $base name of parent accountContainer ($_SESSION[$base]) $attributes contains all ldap attributes which should be written $orig contains all ldap attributes which are loaded from ldap $messages contains all error messages of a module $autoAddObjectClasses if true, managed object classes are added when an account is created or loaded (default: true) __construct __construct Creates a new base module class `string` $scope load_Messages load_Messages This function fills the $messages variable with output messages from this module. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.</p> init init Initializes the module after it became part of an {@link accountContainer} <p>Calling this method requires the existence of an enclosing {@link accountContainer}.</p> `string` $base load_attributes load_attributes This function loads the LDAP attributes when an account should be loaded. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> By default this method loads the object classes and accounts which are specified in {@link getManagedObjectClasses()} and {@link getManagedAttributes()}.</p> `array` $attributes get_metaData get_metaData This function provides meta data which is interpreted by baseModule. <p>Only subclasses will return real data.<br> <br> The aim of the meta data is to reduce the number of functions in the subclasses. All major data is centralized in one place.<br> <br> The returned array contains a list of key-value pairs for the different functions.<br></p> <ul> <li><b>{@link can_manage()}</b><br> <br> <b>Key:</b> account_types<br> <b>Value:</b> array of account types<br> <br> <b>Example:</b> "account_types" => array("user", "host") <br><br> </li> <li><b>{@link is_base_module()}</b><br> <br> <b>Key:</b> is_base<br> <b>Value:</b> boolean<br> <br> <b>Example:</b> "is_base" => true <br><br> </li> <li><b>{@link get_ldap_filter()}</b><br> <br> <b>Key:</b> ldap_filter<br> <b>Value:</b> array of filters<br> <br> <b>Example:</b> "ldap_filter" => array('or' => 'objectClass=posixAccount', 'and' => '(!(uid=*$))') <br><br> </li> <li><b>{@link getManagedObjectClasses()}</b><br> <br> <b>Key:</b> objectClasses<br> <b>Value:</b> array of object classes<br> <br> <b>Example:</b> "objectClasses" => array('posixAccount') <br><br> </li> <li><b>{@link getLDAPAliases()}</b><br> <br> <b>Key:</b> LDAPaliases<br> <b>Value:</b> array of aliases<br> <br> <b>Example:</b> "LDAPaliases" => array('commonName' => 'cn') <br><br> </li> <li><b>{@link get_RDNAttributes()}</b><br> <br> <b>Key:</b> RDN<br> <b>Value:</b> array of RDNs<br> <br> <b>Example:</b> "RDN" => array('uid' => 'normal', 'cn' => 'low') <br><br> </li> <li><b>{@link get_dependencies()}</b><br> <br> <b>Key:</b> dependencies<br> <b>Value:</b> array of dependencies<br> <br> <b>Example:</b> "dependencies" => array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" => array("exim")) <br><br> </li> <li><b>{@link get_profileOptions()}</b><br> <br> <b>Key:</b> profile_options<br> <b>Value:</b> array of profile options<br> <br> The syntax for the value array is the same as for the return value of get_profileOptions(). <br><br> </li> <li><b>{@link check_profileOptions()}</b><br> <br> <b>Key:</b> profile_checks<br> <b>Value:</b> array of checks (array("optionName" => array()))<br> <br> The "optionName" keys of the value array are the names of the option identifiers.<br> Each array element is an array itself containing these values: <ul> <li><b>type:</b> determines how to check input<br> Possible values: <ul> <li><b>regex:</b> check with regular expression from regex variable, case sensitive</li> <li><b>regex_i:</b> check with regular expression from regex variable, case insensitive</li> <li><b>int_greater:</b> integer value of cmp_name1 must be greater than the integer value from the option cmp_name2</li> <li><b>int_greaterOrEqual:</b> integer value of cmp_name1 must be greater or equal than the integer value from the option cmp_name2</li> </ul> </li> <li><b>error_message:</b> message that is displayed if input value was syntactically incorrect<br> error_message is an array to build StatusMessages (message type, message head, message text, additional variables) <li><b>regex:</b> regular expression string (only if type is regex/regex_i)</li> <li><b>cmp_name1:</b> name of first input variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)</li> <li><b>cmp_name2:</b> name of second input variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)</li> <li><b>required:</b> true or false, if this input field must be filled set to true (optional) <li><b>required_message:</b> message that is displayed if no input value was given (only if required == true)<br> required_message is an array to build StatusMessages (message type, message head, message text, additional variables) </li> </ul> <br><br> </li> <li><b>{@link load_profile()}</b><br> <br> <b>Key:</b> profile_mappings<br> <b>Value:</b> array('profile_identifier1' => 'LDAP_attribute1', 'profile_identifier2' => 'LDAP_attribute2')<br> <br> The mapped values are stored directly in $this->attributes. <br> <b>Example:</b> "profile_mappings" => array('inetOrgPerson_title' => 'title') <br><br> </li> <li><b>{@link get_configOptions()}</b><br> <br> <b>Key:</b> config_options<br> <b>Value:</b> array('user' => array, 'host' => array, 'all' => array)<br> <br> The values from 'all' are always returned, the other values only if they are inside the $scopes array.<br> The syntax for sub arrays is the same as for the return value of {@link get_configOptions()}. <br><br> </li> <li><b>{@link check_configOptions()}</b><br> <br> <b>Key:</b> config_checks<br> <b>Value:</b> array('user' => array, 'host' => 'array', 'all' => array)<br> <br> The values from 'all' are always used for checking, the other values only if they are inside the $scopes array. The syntax for sub arrays is the same as for {@link check_configOptions()}. <br><br> </li> <li><b>{@link get_uploadColumns()}</b><br> <br> <b>Key:</b> upload_columns<br> <b>Value:</b> array<br> <br> The syntax for array is the same as for the return value of {@link get_uploadColumns()}. <br><br> </li> <li><b>{@link get_uploadPreDepends()}</b><br> <br> <b>Key:</b> upload_preDepends<br> <b>Value:</b> array<br> <br> The syntax for array is the same as for the return value of {@link get_uploadPreDepends()}. <br><br> </li> <li><b>{@link getRequiredExtensions()}</b><br> <br> <b>Key:</b> extensions<br> <b>Value:</b> array of extension names<br> <br> <b>Example:</b> "extensions" => array('hash') <br><br> </li> <li><b>{@link get_help()}</b><br> <br> <b>Key:</b> help<br> <b>Value:</b> hashtable of help entries<br> <br> The hashtable is an array which maps help IDs to help entries.<br> <br> <b>Example:</b> 'help' => array('myEntry' => array('Headline' => 'This is the head line', 'Text' => 'Help content')) <br><br> </li> <li><b>{@link getSelfServiceSearchAttributes()}</b><br> <br> <b>Key:</b> selfServiceSearchAttributes<br> <b>Value:</b> array of attribute names<br> <br> <b>Example:</b> "selfServiceSearchAttributes" => array('uid') <br><br> </li> <li><b>{@link getSelfServiceFields()}</b><br> <br> <b>Key:</b> selfServiceFieldSettings<br> <b>Value:</b> array of self service fields<br> <br> <b>Example:</b> "selfServiceFieldSettings" => array('pwd' => 'Password') <br><br> </li> </ul> <p><b>Example:</b> return array("is_base" => true);</p> `array` get_scope get_scope Returns the account type of this module (user, group, host) `string` can_manage can_manage Returns true if this module can manage accounts of the current type, otherwise false. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `boolean` `` is_base_module is_base_module Returns true if your module is a base module and otherwise false. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> Every account type needs exactly one base module. A base module manages a structural object class. E.g. the inetOrgPerson module is a base module since its object class is structural.</p> `boolean` `` get_ldap_filter get_ldap_filter Returns an LDAP filter for the account lists <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> Returns an array('or' => '...', 'and' => '...') that is used to build the LDAP filter. Usually, this is used to filter object classes. All "or" filter parts of the base modules are combined with OR and then combined with the "and" parts.<br> The resulting LDAP filter will look like this: (&amp;(|(OR1)(OR2)(OR3))(AND1)(AND2)(AND3))<br> <br> <b>Example:</b> return array('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))')</p> `string` `` get_alias get_alias Returns an alias name for the module. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> This function returns a more descriptive string than the class name. Alias names are used for the buttons on the account pages and the module selection in the configuration wizard.<br> Please take care that your alias name is not too long. It may contain any character but should not include parts that may be interpreted by the browser (e.g. '&lt;' or '>'). If you use different aliases dependent on the account type please make sure that there is a general alias for unknown types.</p> `string` `` get_RDNAttributes get_RDNAttributes Returns a hash array containing a list of possible LDAP attributes that can be used to form the RDN (Relative Distinguished Name). <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The returned elements have this form: <attribute> => <priority> <br> <attribute> is the name of the LDAP attribute <br> <priority> defines the priority of the attribute (can be "low", "normal", "high")<br> <br> <b>Example:</b> return array('uid' => 'normal', 'cn' => 'low')</p> `array` `` get_dependencies get_dependencies This function returns a list with all depending and conflicting modules. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The return value is an array with two sub arrays, "depends" and "conflicts". All values of the conflict array are string values with module names. All values of the depends array are either string values with module names or arrays which include only string values with module names.<br> If an element of the depends array is itself an array, this means that your module depends on one of these modules.<br> <br> <b>Example:</b> return array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" => array("exim"))</p> `array` `` get_profileOptions get_profileOptions This function defines what attributes will be used in the account profiles and their appearance in the profile editor. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The return value is an object implementing htmlElement.<br> The field name are used as keywords to load and save profiles. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.</p> `\htmlElement` `` `` check_profileOptions check_profileOptions Checks input values of account profiles. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> $options is an hash array (option name => value) that contains the user input. The option values are all arrays containing one or more elements.<br> If the input data is invalid the return value is an array that contains arrays to build StatusMessages (message type, message head, message text). If no errors occured the function returns an empty array.</p> `array` `array` `` $options load_profile load_profile This function loads the values from an account profile to the module's internal data structures. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `array` `` $profile get_configOptions get_configOptions Returns a list of configuration options. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The field names are used as keywords to load and save settings. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.</p> `array` `array` `mixed` `` `` $scopes $allScopes check_configOptions check_configOptions Checks input values of module settings. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> If the input data is invalid the return value is an array that contains subarrays to build StatusMessages ('message type', 'message head', 'message text'). <br>If no errors occured the function returns an empty array.</p> `array` `array` `array` `` $scopes $options get_pdfFields get_pdfFields Returns a hashtable with all entries that may be printed out in the PDF. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> This method must be overwritten in case that there are non static values to be returned. The $this->meta['PDF_fields'] array may be used for static content.<br> <br> <b>Format of returned hashtable:</b><br> <br> This function uses XML formatted commands to define the PDF output. Each part in the PDF document is surrounded by "<block>" and "</block>".<br> Inside the <block> tags there are different ways to format the output:</p> <ul> <li><b>simple line with attribute name and value:</b> <block><key><b>attribute name</b></key><value><b>attribute value</b></value></block></li> <li><b>table:</b> <block><key><b>attribute name</b></key><tr><td><b>value</b><td><td><b>value</b><td></tr></block><block><tr><td><b>value</b></td><td><b>value</b><td></tr></block></li> </ul> <p><b>Special commands:</b></p> <ul> <li><b>Alignment in <td>:</b> You can specify the alignment in <td> tags with align=(L|R|C) (e.g. <td align=\"L\">)</li> <li><b>Cell width:</b> <td> allows an attribute "width" to set the cell width (e.g. <td width=20%> or <td width=30>).</li> <li><b>Line breaks:</b> Line breaks can be specified by adding a <<br>> tag. The new line will start at the left border of the PDF document.</li> </ul> <p><br> <b>Examples:</b><br> <br> <b>Simple name+value lines:</b><br><br> In most cases you will just want to display a single line per attribute with its name and value.<br> <br> 'myAttribute' => '<block><key>AttrName</key><value>12345</value></block>'<br> <br> This will give the following PDF output:<br> <br> <b>Attribute name:</b> 12345<br> <br> <br> <b>Multiline values:</b><br><br> Sometimes you have multivalued attributes where it is not applicable to write all values in one line but where you want to list your values one below the other or show a table. This can be done by using the <td> tag.<br> <br> This example only uses one column but you can just use more <td> tags per <block> tag to display more columns.<br> <br> 'myAttribute' => '<block><key>AttrName</key><tr><td align=\"L\">123</td></tr></block><block><tr><td align=\"L\">456</td></tr></block><block><tr><td align=\"L\">789</td></tr></block>'</p> `array` `` get_pdfEntries get_pdfEntries Returns the PDF entries for this module. `array` addSimplePDFField addSimplePDFField Adds a simple PDF entry to the given array. `array` `String` `String` `String` `String` $result $name $label $attrName null $delimiter ', ' get_uploadColumns get_uploadColumns Returns an array containing all input columns for the file upload. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> This funtion returns an array which contains subarrays which represent an upload column. <b>Syntax of column arrays:</b> <br> <br> array( <br> string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>) <br> string: description, // short descriptive name <br> string: help, // help ID <br> string: example, // example value <br> string: values, // possible input values (optional) <br> string: default, // default value (optional) <br> boolean: required // true, if user must set a value for this column <br> boolean: unique // true if all values of this column must be different values (optional, default: "false") <br> )</p> `array` `array` `` $selectedModules get_uploadPreDepends get_uploadPreDepends Returns a list of module names which must be processed in building the account befor this module. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The named modules may not be active, LAM will check this automatically.</p> `array` `` build_uploadAccounts build_uploadAccounts In this function the LDAP accounts are built. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> Returns an array which contains subarrays to generate StatusMessages if any errors occured.</p> `array` `array` `array` `array` `array` $rawAccounts $ids $partialAccounts $selectedModules get_help get_help This function returns the help entry array for a specific help id. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The result is an hashtable with the following keys:<br></p> <ul> <li><b>Headline (required)</b><br> The headline of this help entry. Can consist of any alpha-numeric characters. No HTML/CSS elements are allowed.</li> <li><b>Text (required)</b><br> The text of the help entry which may contain any alpha-numeric characters.</li> <li><b>SeeAlso (optional)</b><br> A reference to anonther related web site. It must be an array containing a field called "text" with the link text that should be displayed and a field called "link" which is the link target.</li> </ul> <p><br> <b>Example:</b><br> <br> array('Headline' => 'This is the head line', 'Text' => 'Help content', 'SeeAlso' => array('text' => 'LAM homepage', 'link' => 'http://www.ldap-account-manager.org/'))</p> `string` `array` `` $id module_ready module_ready This function is used to check if this module page can be displayed. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> Your module might depend on input of other modules. This function determines if the user can change to your module page or not. The return value is true if your module accepts input, otherwise false.<br> This method's return value defaults to true.</p> `boolean` module_complete module_complete This function is used to check if all settings for this module have been made. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> This function tells LAM if it can create/modify the LDAP account. If your module needs any additional input then set this to false. The user will be notified that your module needs more input.<br> This method's return value defaults to true.</p> `boolean` getButtonStatus getButtonStatus Controls if the module button the account page is visible and activated. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> <b>Possible return values:</b></p> <ul> <li><b>enabled:</b> button is visible and active</li> <li><b>disabled:</b> button is visible and deactivated (greyed)</li> <li><b>hidden:</b> no button will be shown</li> </ul> `string` doUploadPreActions doUploadPreActions Runs any actions that need to be done before an LDAP entry is created. `array` `array` $attributes doUploadPostActions doUploadPostActions This function is responsible to do additional tasks after the account has been created in LDAP (e.g. <p>modifying group memberships, adding Quota etc..).</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> This function is called as long as the returned status is 'finished'. Please make sure that one function call lasts no longer than 3-4 seconds. Otherwise the upload may fail because the time limit is exceeded. You should not make more than one LDAP operation in each call.</p> `array` `array` `array` `array` `array` `array` $data $ids $failed $temp $accounts save_attributes save_attributes Returns a list of modifications which have to be made to the LDAP account. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br></p> <p><br>This function returns an array with 3 entries: <br>array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... ) <br>DN is the DN to change. It is possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid)<br> <br><b>"add"</b> are attributes which have to be added to the LDAP entry <br><b>"remove"</b> are attributes which have to be removed from the LDAP entry <br><b>"modify"</b> are attributes which have to be modified in the LDAP entry <br><b>"notchanged"</b> are attributes which stay unchanged <br><b>"info"</b> values with informational value (e.g. to be used later by pre/postModify actions) <br> <br>This builds the required comands from $this-attributes and $this->orig.</p> `array` preModifyActions preModifyActions Allows the module to run commands before the LDAP entry is changed or created. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> The modification is aborted if an error message is returned.</p> `boolean` `array` `array` $newAccount $attributes postModifyActions postModifyActions Allows the module to run commands after the LDAP entry is changed or created. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.</p> `boolean` `array` `array` $newAccount $attributes preDeleteActions preDeleteActions Allows the module to run commands before the LDAP entry is deleted. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br></p> `array` postDeleteActions postDeleteActions Allows the module to run commands after the LDAP entry is deleted. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.</p> `array` delete_attributes delete_attributes This function returns an array with the same syntax as save_attributes(). <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> It allows additional LDAP changes when an account is deleted.</p> `\List` display_html_delete display_html_delete This function creates meta HTML code which will be displayed when an account should be deleted. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> This can be used to interact with the user, e.g. should the home directory be deleted? The output of all modules is displayed on a single page.</p> `\htmlElement` `` process_attributes process_attributes This function processes user input. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> It checks the user input and saves changes in the module's data structures.<br> <br> <b>Example:</b> return array(array('ERROR', 'Invalid input!', 'This is not allowed here.'));</p> `array` display_html_attributes display_html_attributes This function creates meta HTML code to display the module page. <p>Calling this method requires the existence of an enclosing {@link accountContainer}.</p> `\htmlElement` `` addSimpleInputTextField addSimpleInputTextField Adds a simple text input field to the given htmlTable. <p>The field name will be the same as the attribute name. There must also be a help entry with the attribute name as ID. A new line will also be added after this entry so multiple calls will show the fields one below the other.</p> `\htmlTable` `String` `String` `boolean` `integer` `boolean` $container $attrName $label $required false $length null $isTextArea false addMultiValueInputTextField addMultiValueInputTextField Adds a text input field that may contain multiple values to the given htmlTable. <p>The field name will be the same as the attribute name plus a counting number (e.g. street_0). The last field will be followed by a button to add a new value. This is named add_{attribute name} (e.g. add_street). There must be a help entry with the attribute name as ID. A new line will also be added after this entry so multiple calls will show the fields one below the other.</p> `\htmlTable` `String` `String` `boolean` `integer` $container $attrName $label $required false $length null processMultiValueInputTextField processMultiValueInputTextField Validates a multi-value text field. <p>The input fields must be created with function addMultiValueInputTextField(). If validation is used then there must exist a message named [{attribute name}][0] (e.g. $this->messages['street'][0]).</p> `String` `array` `String` $attrName $errors $validationID null addSimpleSelfServiceTextField addSimpleSelfServiceTextField Adds a simple text input field for the self service. <p>The field name will be the same as the class name plus "_" plus attribute name (e.g. posixAccount_cn).</p> `array` `String` `String` `array` `array` `array` `boolean` `boolean` $container $name $label $fields $attributes $readOnlyFields $required false $isTextArea false checkSimpleSelfServiceTextField checkSimpleSelfServiceTextField Checks the input value of a self service text field. <p>The field name must be the same as the class name plus "_" plus attribute name (e.g. posixAccount_cn). If validation is used then there must exist a message named [{attribute name}][0] (e.g. $this->messages['street'][0]).</p> `array` `String` `array` `string` `array` `String` $container $name $attributes $fields $readOnlyFields $validationID null getManagedObjectClasses getManagedObjectClasses Returns a list of managed object classes for this module. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> This is used to fix spelling errors in LDAP-Entries (e.g. if "posixACCOUNT" is read instead of "posixAccount" from LDAP).<br> <br> <b>Example:</b> return array('posixAccount')</p> `array` `` getLDAPAliases getLDAPAliases Returns a list of aliases for LDAP attributes. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> All alias attributes will be renamed to the given attribute names.</p> `array` `` getManagedAttributes getManagedAttributes Returns a list of LDAP attributes which are managed by this module. <p>All attribute names will be renamed to match the given spelling.</p> `array` `` getRequiredExtensions getRequiredExtensions This function returns a list of PHP extensions (e.g. <p>hash) which are needed by this module.</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `array` `` getSelfServiceSearchAttributes getSelfServiceSearchAttributes This function returns a list of possible LDAP attributes (e.g. <p>uid, cn, ...) which can be used to search for LDAP objects.</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `array` `` getSelfServiceFields getSelfServiceFields Returns a list of possible input fields and their descriptions. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> <b>Format:</b> array(<field identifier> => <field description>)</p> `array` `` canSelfServiceFieldBeReadOnly canSelfServiceFieldBeReadOnly Returns if a given self service field can be set in read-only mode. `String` `\selfServiceProfile` $fieldID $profile getSelfServiceOptions getSelfServiceOptions Returns the meta HTML code for each input field. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> It is not possible to display help links.</p> `array` `array` `boolean` `array` `array` `` $fields $attributes $passwordChangeOnly $readOnlyFields checkSelfServiceOptions checkSelfServiceOptions Checks if all input values are correct and returns the LDAP attributes which should be changed. <p><br>Return values: <br>messages: array of parameters to create status messages <br>add: array of attributes to add <br>del: array of attributes to remove <br>mod: array of attributes to modify <br>info: array of values with informational value (e.g. to be used later by pre/postModify actions)</p> <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.</p> `string` `array` `boolean` `array` `array` $fields $attributes $passwordChangeOnly $readOnlyFields getSelfServiceSettings getSelfServiceSettings Returns a list of self service configuration settings. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> The name attributes are used as keywords to load and save settings. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.</p> `\selfServiceProfile` `\htmlElement` `` `` $profile checkSelfServiceSettings checkSelfServiceSettings Checks if the self service settings are valid. <p>Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> If the input data is invalid the return value is an array that contains arrays to build StatusMessages (message type, message head, message text). If no errors occured the function returns an empty array.</p> `array` `\selfServiceProfile` `array` $options $profile preModifySelfService preModifySelfService Allows the module to run commands before the LDAP entry is changed or created. <p>An error message should be printed if the function returns false.</p> `array` `boolean` $attributes postModifySelfService postModifySelfService Allows the module to run commands after the LDAP entry is changed or created. `array` `boolean` $attributes getLinkToSpecialSelfServicePage getLinkToSpecialSelfServicePage This allows modules to create a link to a module specific page for the self service. <p>The link is shown on the login page of the self service. You can use this to provide e.g. a page to reset passwords.</p> `array` `String` $settings displaySpecialSelfServicePage displaySpecialSelfServicePage This function creates meta HTML code to display the module specific page for the self service. `\selfServiceProfile` `\htmlElement` `` $profile getAccountContainer getAccountContainer Returns the {@link accountContainer} object. `\accountContainer` `` getAttributes getAttributes Returns the LDAP attributes which are managed in this module. `array` getOriginalAttributes getOriginalAttributes Returns the LDAP attributes which are managed in this module (with unchanged values). `array` getIcon getIcon Returns the path to the module icon. <p>The path must be releative to graphics (e.g. key.png). You can also set $this->meta['icon']. The preferred size is 32x32px.</p> `\unknown` `` handleAjaxRequest handleAjaxRequest Manages AJAX requests. <p>This function may be called with or without an account container.</p> supportsAdminInterface supportsAdminInterface Specifies if this module supports the LAM admin interface. <p>The LAM admin interface are the pages that allow to manage e.g. users and groups. In contrast there is also the LAM self service interface. Most modules support the admin interface.</p> `boolean` isBooleanConfigOptionSet isBooleanConfigOptionSet Returns if the given configuration option is set. <p>This function returns false if the configuration options cannot be read.</p> `String` `boolean` $optionName
workarounds for PDF parser, remove when migrated to other PDF library
workaround for UFPDF, remove when migrated to other PDF library
LDAP Account Manager status messages.

Michael Duergner

lib

StatusMessage
\StatusMessage
This function prints a short status message.
<p>It can be used to print INFO, WARN and ERROR messages at the moment.</p>

<p>The headline and text may be formated with special tags: <br> <br><b>{bold}, {endbold}:</b> All text between these tags is printed bold. <br><b>{color=#123456}, {endcolor}:</b> All text between these tags is printed in the given color. <br><b>{link=http://nodomain.org}, {endlink}:</b> A link with the given target is created. The link text is the text between the tags.</p>

The type of the message to be printed. It must be one of the following types: 'INFO', 'WARN' or 'ERROR'. <br> Every other type will lead to an error message indicating an invalid message type.

string

The headline of the status message. <br> It may be formatted with special color/link/bold tags.

string

The text of the status message. <br> It may be formatted with special color/link/bold tags. This parameter is optional.

string

The variables that are used to replace the spacers (%s) in the submitted text. This parameter is optional.

array

if set to true this function will return the generated HTML code instead of printing it directly (default: false)

boolean

HTML code if $returnOutput is set to true, otherwise null

String
$MessageTyp
$MessageHeadline
$MessageText
''
$MessageVariables
array()
$returnOutput
false
parseMessageString
\parseMessageString
Use the three replace functions on the submitted Text.

private

The text that is used to search for replaceable strings.

string

The processed text.

string
$MessageString
boldText
\boldText
Replace {bold} and {endbold} with <b> and </b> HTML-Tags.

private

The text that is used to search for {bold} and {endbold} tags.

string

The submitted text with {bold} and {endbold} replaced with the appropriate HTML tages <b> and </b>

string
$text
colorText
\colorText
Replace {color=#[HEX-Value]} or {color=[HEX-Value]} and {endcolor} with <font color="#[HEX-Value]"> and </font> HTML-Tags.

private

The text that is used to search for {color} and {endcolor} tags.

string

Input string with HTML-formatted color tags

string
$text
linkText
\linkText
Replace {link=[Link-Target]} and {endlink} with <a href="[Link-Target]" target="_blank"> and </a> HTML-Tags.

private

The text that is used to search for {link} and {endlink} tags.

string

Input string with HTML-formatted link tags

string
$text
This file includes functions to control lamdaemon.

Tilo Lutz

Roland Gruber

Thomas Manninger

modules

Net/SSH2.php
lamdaemon
\lamdaemon
Sends commands to lamdaemon script.

command to execute

array

remote server

string

Output of lamdaemon

array
$command
$server
Classes and functions for fetching and parsing schema from an LDAP server.

lib

The phpLDAPadmin development team

Roland Gruber

SCHEMA_SESSION_CACHE_ENABLED
\SCHEMA_SESSION_CACHE_ENABLED
1
_get_schema_dn
\_get_schema_dn
Helper for _get_raw_schema() which fetches the DN of the schema object in an LDAP server based on a DN.
<p>Entries should set the subSchemaSubEntry attribute pointing to the DN of the server schema. You can specify the DN whose subSchemaSubEntry you wish to retrieve of specify an empty string to fetch the subScehamSubEntry from the Root DSE.</p>

The DN (may be null) which houses the subschemaSubEntry attribute which this function can use to determine the schema entry's DN.

string

Switch to true to see some nice and copious output. :)

bool

The DN of the entry which houses this LDAP server's schema.

string
$dn
$debug
false
_get_raw_schema
\_get_raw_schema
Fetches the raw schema array for the subschemaSubentry of the server.
<p>Note, this function has grown many hairs to accomodate more LDAP servers. It is needfully complicated as it now supports many popular LDAP servers that don't necessarily expose their schema "the right way".</p>

- A string indicating which type of schema to fetch. Five valid values: 'objectclasses', 'attributetypes', 'ldapsyntaxes', 'matchingruleuse', or 'matchingrules'. Case insensitive.

\$schema_to_fetch

(optional) This paremeter is the DN of the entry whose schema you would like to fetch. Entries have the option of specifying their own subschemaSubentry that points to the DN of the system schema entry which applies to this attribute. If unspecified, this will try to retrieve the schema from the RootDSE subschemaSubentry. Failing that, we use some commonly known schema DNs. Default value is the Root DSE DN (zero-length string)

\$dn

array of strings of this form: Array ( [0] => "( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' DESC 'Pool ... [1] => "( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' DESC 'Sa ... etc.

\an
$schema_to_fetch
$dn
''
get_schema_objectclasses
\get_schema_objectclasses
Gets an associative array of ObjectClass objects for the specified server.
<p>Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object.</p>

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

string

An array of ObjectClass objects.

array

\global\ObjectClass

\global\get_schema_objectclass

$dn
null
$use_cache
true
get_schema_objectclass
\get_schema_objectclass
Gets a single ObjectClass object specified by name.

The name of the objectClass to fetch.

string

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

string

The specified ObjectClass object or false on error.

\ObjectClass

\global\ObjectClass

\global\get_schema_objectclasses

$oclass_name
$dn
null
$use_cache
true
get_schema_attribute
\get_schema_attribute
Gets a single AttributeType object specified by name.

The name of the AttributeType to fetch.

string

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

string

The specified AttributeType object or false on error.

\AttributeType

\global\AttributeType

\global\get_schema_attributes

$attr_name
$dn
null
$use_cache
true
get_schema_attributes
\get_schema_attributes
Gets an associative array of AttributeType objects for the specified server.
<p>Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object.</p>

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

string

An array of AttributeType objects.

array
$dn
null
$use_cache
true
add_aliases_to_attrs
\add_aliases_to_attrs
For each attribute that has multiple names, this function adds unique entries to the attrs array for those names.
<p>Ie, attributeType has name 'gn' and 'givenName'. This function will create a unique entry for 'gn' and 'givenName'.</p>
$attrs
add_sup_to_attrs
\add_sup_to_attrs
Adds inherited values to each attributeType specified by the SUP directive.
<p>Supports infinite levels of inheritance. Bug 856832: require a second paramter that has all attributes indexed by OID</p>
$attrs
$attrs_oid
get_schema_matching_rules
\get_schema_matching_rules
Returns an array of MatchingRule objects for the specified server.
<p>The key of each entry is the OID of the matching rule.</p>
$dn
null
$use_cache
true
get_schema_syntaxes
\get_schema_syntaxes
Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions.
<p>The key of each entry is the OID of the Syntax.</p>
$dn
null
$use_cache
true
cached_schema_available
\cached_schema_available
Returns true if the schema for $schema_type has been cached and is availble.
<p>$schema_type may be one of (lowercase) the following: objectclasses attributetypes ldapsyntaxes matchingrules matchingruleuse Note that _get_raw_schema() takes a similar parameter.</p>
$schema_type
get_cached_schema
\get_cached_schema
Returns the cached array of schemaitem objects for the specified $schema_type.
<p>For list of valid $schema_type values, see above schema_cache_available(). Note that internally, this function utilizes a two-layer cache, one in memory using a static variable for multiple calls within the same page load, and one in a session for multiple calls within the same user session (spanning multiple page loads).</p>

<p>Returns an array of SchemaItem objects on success or false on failure.</p>
$schema_type
set_cached_schema
\set_cached_schema
Caches the specified $schema_type.
<p>$schema_items should be an array of SchemaItem instances (ie, an array of ObjectClass, AttributeType, LDAPSyntax, MatchingRuleUse, or MatchingRule objects.</p>

<p>Returns true on success of false on failure.</p>
$schema_type
$schema_items
set_schema_cache_unavailable
\set_schema_cache_unavailable
Sets the schema entry for the server_id to be "unavailable" so that we realize that we tried to get the schema but could not, so quit trying next time to fetch it from the server.
SchemaItem
\SchemaItem
Generic parent class for all schema items.
<p>A schema item is an ObjectClass, an AttributeBype, a MatchingRule, or a Syntax. All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.</p>

lib

$oid The OID of this schema item. $description The description of this schema item. initVars initVars Initialize class members to default values. SchemaItem SchemaItem Default constructor. setOID setOID $new_oid setDescription setDescription $new_desc getOID getOID getDescription getDescription
\SchemaItem
ObjectClass
\ObjectClass
Represents an LDAP objectClass

lib

$name This objectClass' name, ie "inetOrgPerson" $sup_classes array of objectClass names from which this objectClass inherits $type one of STRUCTURAL, ABSTRACT, or AUXILIARY $must_attrs arrays of attribute names that this objectClass requires $may_attrs arrays of attribute names that this objectClass allows, but does not require $is_obsolete boolean value indicating whether this objectClass is obsolete $children_objectclasses array of objectClasses which inherit from this one (must be set at runtime explicitly by the caller) initVars initVars Initialize the class' member variables ObjectClass ObjectClass Creates a new ObjectClass object given a raw LDAP objectClass string. $raw_ldap_schema_string getMustAttrs getMustAttrs Gets an array of AttributeType objects that entries of this ObjectClass must define. <p>This differs from getMustAttrNames in that it returns an array of AttributeType objects</p> `array` `array` `` `` `` $oclasses NULL getMayAttrs getMayAttrs Gets an array of AttributeType objects that entries of this ObjectClass may define. <p>This differs from getMayAttrNames in that it returns an array of AttributeType objects</p> `array` `array` `` `` `` `` $oclasses NULL getMustAttrNames getMustAttrNames Gets an array of attribute names (strings) that entries of this ObjectClass must define. <p>This differs from getMustAttrs in that it returns an array of strings rather than array of AttributeType objects</p> `array` `array` `` `` `` $oclasses null getMayAttrNames getMayAttrNames Gets an array of attribute names (strings) that entries of this ObjectClass must define. <p>This differs from getMayAttrs in that it returns an array of strings rather than array of AttributeType objects</p> `array` `array` `` `` `` $oclasses null addChildObjectClass addChildObjectClass Adds an objectClass to the list of objectClasses that inherit from this objectClass. `String` `bool` $object_class_name getChildObjectClasses getChildObjectClasses Returns the array of objectClass names which inherit from this objectClass. `Array` getName getName Gets the name of this objectClass (ie, "inetOrgPerson") `string` getSupClasses getSupClasses Gets the objectClass names from which this objectClass inherits. `array` getType getType Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY. getIsObsolete getIsObsolete Gets whether this objectClass is flagged as obsolete by the LDAP server. addMustAttrs addMustAttrs Adds the specified array of attributes to this objectClass' list of MUST attributes. <p>The resulting array of must attributes will contain unique members.</p> `array` $new_must_attrs addMayAttrs addMayAttrs Behaves identically to addMustAttrs, but it operates on the MAY attributes of this objectClass. `array` $new_may_attrs
ObjectClassAttribute
\ObjectClassAttribute
A simple class for representing AttributeTypes used only by the ObjectClass class.
<p>Users should never instantiate this class. It represents an attribute internal to an ObjectClass. If PHP supported inner-classes and variable permissions, this would be interior to class ObjectClass and flagged private. The reason this class is used and not the "real" class AttributeType is because this class supports the notion of a "source" objectClass, meaning that it keeps track of which objectClass originally specified it. This class is therefore used by the class ObjectClass to determine inheritance.</p>

lib

$name This Attribute's name $source This Attribute's root ObjectClassAttribute ObjectClassAttribute Creates a new ObjectClassAttribute with specified name and source objectClass. `string` `string` $name $source getName getName Gets this attribute's name getSource getSource Gets the name of the ObjectClass which originally specified this attribute.
\SchemaItem
AttributeType
\AttributeType
Represents an LDAP AttributeType

lib

$name The name of this attributeType $is_obsolete string: the description $sup_attribute The attribute from which this attribute inherits (if any) $equality The equality rule used $ordering The ordering of the attributeType $sub_str Boolean: supports substring matching? $syntax The full syntax string, ie 1.2.3.4{16} $is_single_value boolean: is single valued only? $is_collective boolean: is collective? $is_no_user_modification boolean: can use modify? $usage The usage string set by the LDAP schema $aliases An array of alias attribute names, strings $max_length The max number of characters this attribute can be $type A string description of the syntax type (taken from the LDAPSyntaxes) $used_in_object_classes An array of objectClasses which use this attributeType (must be set by caller) $required_by_object_classes array() A list of object class names that require this attribute type. initVars initVars Initialize the class' member variables AttributeType AttributeType Creates a new AttributeType objcet from a raw LDAP AttributeType string. $raw_ldap_attr_string getName getName Gets this attribute's name `string` getIsObsolete getIsObsolete Gets whether this attribute has been flagged as obsolete by the LDAP server `bool` getUsage getUsage Gets this attribute's usage string as defined by the LDAP server `string` getSupAttribute getSupAttribute Gets this attribute's parent attribute (if any). <p>If this attribute does not inherit from another attribute, null is returned.</p> `string` getEquality getEquality Gets this attribute's equality string `string` getOrdering getOrdering Gets this attribute's ordering specification. `string` getSubstr getSubstr Gets this attribute's substring matching specification `string` getAliases getAliases Gets the names of attributes that are an alias for this attribute (if any). `array` isAliasFor isAliasFor Returns whether the specified attribute is an alias for this one (based on this attribute's alias list). `string` `bool` $attr_name getSyntaxString getSyntaxString Gets this attribute's raw syntax string (ie: "1.2.3.4{16}"). `string` getSyntaxOID getSyntaxOID Gets this attribute's syntax OID. <p>Differs from getSyntaxString() in that this function only returns the actual OID with any length specification removed. Ie, if the syntax string is "1.2.3.4{16}", this function only retruns "1.2.3.4".</p> `string` getMaxLength getMaxLength Gets this attribute's the maximum length. <p>If no maximum is defined by the LDAP server, null is returned.</p> `int` getIsSingleValue getIsSingleValue Gets whether this attribute is single-valued. <p>If this attribute only supports single values, true is returned. If this attribute supports multiple values, false is returned.</p> `bool` setIsSingleValue setIsSingleValue Sets whether this attribute is single-valued. `bool` $is_single_value getIsCollective getIsCollective Gets whether this attribute is collective. `bool` getIsNoUserModification getIsNoUserModification Gets whether this attribute is not modifiable by users. `bool` getType getType Gets this attribute's type `string` removeAlias removeAlias Removes an attribute name from this attribute's alias array. `string` `bool` $remove_alias_name addAlias addAlias Adds an attribute name to the alias array. `string` $new_alias_name setName setName Sets this attriute's name. `string` $new_name setSupAttribute setSupAttribute Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits). `string` $new_sup_attr setAliases setAliases Sets this attribute's list of aliases. `array` $new_aliases setType setType Sets this attribute's type. `string` $new_type addUsedInObjectClass addUsedInObjectClass Adds an objectClass name to this attribute's list of "used in" objectClasses, that is the list of objectClasses which provide this attribute. `string` $object_class_name getUsedInObjectClasses getUsedInObjectClasses Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute. `array` addRequiredByObjectClass addRequiredByObjectClass Adds an objectClass name to this attribute's list of "required by" objectClasses, that is the list of objectClasses which must have this attribute. `string` $object_class_name getRequiredByObjectClasses getRequiredByObjectClasses Gets the list of "required by" objectClasses, that is the list of objectClasses which provide must have attribute. `array`
\SchemaItem
Syntax
\Syntax
Represents an LDAP Syntax

lib

initVars
initVars
Initializes the class' member variables
Syntax
Syntax
Creates a new Syntax object from a raw LDAP syntax string.
$raw_ldap_syntax_string
\SchemaItem
MatchingRule
\MatchingRule
Represents an LDAP MatchingRule

lib

$name This rule's name $syntax This rule's syntax OID $is_obsolete Boolean value indicating whether this MatchingRule is obsolete $used_by_attrs An array of attribute names who use this MatchingRule initVars initVars Initialize the class' member variables MatchingRule MatchingRule Creates a new MatchingRule object from a raw LDAP MatchingRule string. $raw_ldap_matching_rule_string setUsedByAttrs setUsedByAttrs Sets the list of used_by_attrs to the array specified by $attrs; `array` $attrs addUsedByAttr addUsedByAttr Adds an attribute name to the list of attributes who use this MatchingRule `true` $new_attr_name getName getName Gets this MatchingRule's name. `string` getIsObsolete getIsObsolete Gets whether this MatchingRule is flagged as obsolete by the LDAP server. `bool` getUsedByAttrs getUsedByAttrs Gets an array of attribute names (strings) which use this MatchingRule `array`
\SchemaItem
MatchingRuleUse
\MatchingRuleUse
Represents an LDAP schema matchingRuleUse entry

lib

$name The name of the MathingRule this applies to $used_by_attrs An array of attributeType names who make use of the mathingRule identified by $this->oid and $this->name initVars initVars Initialize the class' member variables MatchingRuleUse MatchingRuleUse $raw_matching_rule_use_string getName getName Gets this MatchingRuleUse's name `string` getUsedByAttrs getUsedByAttrs Gets an array of attribute names (strings) which use this MatchingRuleUse object. `array`
Argument $use_cache is missing from the Docblock of \get_schema_objectclasses()
Argument $use_cache is missing from the Docblock of \get_schema_objectclass()
Name of argument $attr_name does not match with the DocBlock's name $oclass_name in \get_schema_attribute()
Argument $use_cache is missing from the Docblock of \get_schema_attribute()
Parameter $oclass_name could not be found in \get_schema_attribute()
Argument $use_cache is missing from the Docblock of \get_schema_attributes()
Argument $attrs is missing from the Docblock of \add_aliases_to_attrs()
Argument $attrs is missing from the Docblock of \add_sup_to_attrs()
Argument $attrs_oid is missing from the Docblock of \add_sup_to_attrs()
Argument $dn is missing from the Docblock of \get_schema_matching_rules()
Argument $use_cache is missing from the Docblock of \get_schema_matching_rules()
Argument $dn is missing from the Docblock of \get_schema_syntaxes()
Argument $use_cache is missing from the Docblock of \get_schema_syntaxes()
Argument $schema_type is missing from the Docblock of \cached_schema_available()
Argument $schema_type is missing from the Docblock of \get_cached_schema()
Argument $schema_type is missing from the Docblock of \set_cached_schema()
Argument $schema_items is missing from the Docblock of \set_cached_schema()
No DocBlock was found for method setOID()
No DocBlock was found for method setDescription()
No DocBlock was found for method getOID()
No DocBlock was found for method getDescription()
Argument $raw_ldap_schema_string is missing from the Docblock of ObjectClass()
Argument $raw_ldap_attr_string is missing from the Docblock of AttributeType()
Argument $raw_ldap_syntax_string is missing from the Docblock of Syntax()
Argument $raw_ldap_matching_rule_string is missing from the Docblock of MatchingRule()
Argument $new_attr_name is missing from the Docblock of addUsedByAttr()
No DocBlock was found for method MatchingRuleUse()
LDAP Account Manager help entries.

Michael Duergner

Roland Gruber

Help

../../lib/config.inc
access to configuration options
No page-level DocBlock was found in file templates/lib/141_jquery-validationEngine-lang.php
Manages all AJAX requests.

Roland Gruber

tools

../../lib/security.inc
security functions
lamAjax
\lamAjax
Manages all AJAX requests.
handleRequest
handleRequest
Manages an AJAX request.
managePasswordChange
managePasswordChange
Manages a password change request on the edit account page.

input parameters

array
$input
Provides a container around the tree view frameset.

Roland Gruber

lists

tree

../../lib/security.inc
security functions
../../lib/config.inc
access to configuration options
../main_header.php
../main_footer.php
Provides a list of LAM tests.

Roland Gruber

tools

../lib/security.inc
security functions
../lib/config.inc
access to configuration options
main_header.php
main_footer.php
This file shows the list views.

lists

Roland Gruber

../../lib/security.inc
security functions
../../lib/types.inc
Used to get type information.
../../lib/config.inc
Access to configuration options
This page will redirect to account/edit.php if the given user is valid.
<p>It is called from listgroups.php via the memberUID links.</p>

lists

Roland Gruber

../../lib/security.inc
security functions
../../lib/ldap.inc
Needed to find DNs of users
../../lib/status.inc
Used to display error messages
../main_header.php
../main_footer.php
search_username
\search_username
Searches LDAP for a specific user name (uid attribute) and returns its DN entry

user name

string

DN

string
$name
This page will redirect to delete.php if the given user is valid.
<p>It is called from the list views via the delete links.</p>

lists

Roland Gruber

../../lib/security.inc
security functions
../../lib/ldap.inc
Needed to find DNs of users
../../lib/status.inc
Used to display error messages
../main_header.php
../main_footer.php
Tests the lamdaemon script.

Roland Gruber

tools

../../lib/security.inc
security functions
../../lib/config.inc
access to configuration options
../../lib/modules.inc
account modules
../../lib/schema.inc
LDAP schema
../main_header.php
../main_footer.php
checkSchemaForModule
\checkSchemaForModule
Checks if the object classes and attributes for this module are available.

module name

String

type (user, group, ...)

String

error message or null

String
$name
$type
getRecursiveAttributesFromObjectClass
\getRecursiveAttributesFromObjectClass
Returns the names of all attributes which are managed by the given object class and its parents.

object class

\ObjectClass

list of attribute names

array
$oClass
Provides a list of LAM tests.

Roland Gruber

tools

../../lib/security.inc
security functions
../../lib/config.inc
access to configuration options
../main_header.php
../main_footer.php
Tests the lamdaemon script.

Roland Gruber

Thomas Manninger

tools

../../lib/security.inc
security functions
../../lib/config.inc
access to configuration options
../main_header.php
../main_footer.php
Net/SSH2.php
lamTestLamdaemon
\lamTestLamdaemon
Runs a test case of lamdaemon.

test command

string

specifies if test should be run

boolean

SSH connection

\connection

describing text

string

container for HTML output

\htmlTable

true, if errors occured

boolean
$command
$stopTest
$handle
$testText
$container
lamRunLamdaemonTestSuite
\lamRunLamdaemonTestSuite
Runs all tests for a given server.

server ID

String

server name

String

true, if Quotas should be checked

boolean

container for HTML output

\htmlTable
$serverName
$serverTitle
$testQuota
$container
lamTestConnectSSH
\lamTestConnectSSH
Connects to the given SSH server.

server name (e.g. localhost or localhost,1234)

String

handle

object
$server
This is an editor for organizational units.

Roland Gruber

tools

../lib/security.inc
security functions
../lib/config.inc
access to configuration data
../lib/ldap.inc
access LDAP server
../lib/status.inc
used to print status messages
main_header.php
main_footer.php
main_header.php
main_footer.php
display_main
\display_main
Displays the main page of the OU editor

info message

String

error message

String
$message
$error
Provides a list of tools like file upload or profile editor.

Roland Gruber

tools

../lib/security.inc
security functions
../lib/config.inc
access to configuration options
../lib/tools.inc
tool definitions
main_header.php
main_footer.php
This is the main window.
<p>The user and group lists will be shown in this frameset.</p>

main

Roland Gruber

../lib/config.inc
config object
Login form of LDAP Account Manager.

Michael Duergner

Roland Gruber

main

../lib/status.inc
status messages
../lib/checkEnvironment.inc
check environment
../lib/security.inc
security functions
../lib/selfService.inc
self service functions
../lib/config.inc
access to configuration options
../lib/upgrade.inc
Upgrade functions
../lib/ldap.inc
display_LoginPage
\display_LoginPage
Displays the login window.

current active configuration

object
$config_object
Creates LDAP accounts for file upload.

Roland Gruber

tools

../lib/security.inc
security functions
../lib/config.inc
access to configuration
../lib/ldap.inc
LDAP handle
../lib/status.inc
status messages
../lib/modules.inc
account modules
../lib/pdf.inc
PDF
main_header.php
main_footer.php
Start page of file upload

Roland Gruber

tools

../lib/security.inc
security functions
../lib/config.inc
access to configuration
../lib/status.inc
status messages
../lib/modules.inc
account modules
../lib/pdfstruct.inc
Used to get PDF information.
main_header.php
main_footer.php
main_footer.php
showMainPage
\showMainPage
Displays the acount type specific main page of the upload.

account type

string

list of selected account modules

array
$scope
$selectedModules
Configuration profile management.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/status.inc
Used to print status messages
Manages the main configuration options.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/status.inc
Used to print status messages
mainlogin.php
confmodules lets the user select the account modules

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/modules.inc
Access to module lists
conflogin.php
go back to login if password is invalid
config_showAccountModules
\config_showAccountModules
Displays the module selection boxes and checks if dependencies are fulfilled.

account type

string

title for module selection (e.g. "User modules")

string

meta HTML container

\htmlTable
$scope
$title
$container
checkInput
\checkInput
Checks user input and saves the entered settings.

list of errors

array
End page of configuration.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/modules.inc
access to module settings
conflogin.php
go back to login if password is empty
conflogin.php
go back to login if password is invalid
Displays links to all configuration pages.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
Main page of configuration

configuration

Roland Gruber

Thomas Manninger

../../lib/config.inc
Access to config functions
../../lib/modules.inc
access to module settings
../../lib/tools.inc
access to tools
checkInput
\checkInput
Checks user input and saves the entered settings.

list of errors

array
Here the user can edit the module settings.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/types.inc
Access to account types
conflogin.php
go back to login if password is invalid
checkInput
\checkInput
Checks user input and saves the entered settings.

list of errors

array
Here the user can select the account types.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/types.inc
Access to account types
conflogin.php
go back to login if password is invalid
checkInput
\checkInput
Checks user input and saves the entered settings.

list of errors

array
Login page to change the preferences.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/status.inc
Used to print status messages
Login page to change the main preferences.

configuration

Roland Gruber

../../lib/config.inc
Access to config functions
../../lib/status.inc
Used to print status messages
No page-level DocBlock was found in file templates/main_footer.php
Displays the account detail page.

modules

Tilo Lutz

Roland Gruber

../../lib/security.inc
security functions
../../lib/config.inc
configuration options
../../lib/profiles.inc
functions to load and save profiles
../../lib/status.inc
Return error-message
../../lib/pdf.inc
Return a pdf-file
../../lib/modules.inc
module functions
../main_header.php
../main_footer.php
Head part of page which includes links to lists etc.

main

Roland Gruber

tool definitions
Displays the LDAP schema of the server

tools

David Smith

Roland Gruber

../../lib/security.inc
security functions
../../lib/ldap.inc
access to LDAP server
../../lib/config.inc
access to configuration options
../../lib/schema.inc
schema functions
../main_header.php
../main_footer.php
Displays the main page of the PDF editor where the user can select the displayed entries.

Michael Duergner

Roland Gruber

PDF

../../lib/security.inc
security functions
../../lib/pdfstruct.inc
access to PDF configuration files
../../lib/ldap.inc
LDAP object
../../lib/config.inc
LAM configuration
../../lib/modules.inc
module functions
../../lib/xml_parser.inc
XML functions
../main_header.php
../main_footer.php
translateFieldIDToName
\translateFieldIDToName
Translates a given field ID (e.g.
<p>inetOrgPerson_givenName) to its descriptive name.</p>

field ID

String

account type

String
$id
$scope
This is the main window of the pdf structure editor.

Michael Duergner

Roland Gruber

PDF

../../lib/security.inc
security functions
../../lib/pdfstruct.inc
access to PDF configuration files
../../lib/ldap.inc
LDAP object
../../lib/config.inc
for language settings
../../lib/modules.inc
module functions
../main_header.php
../main_footer.php
Used to delete accounts from LDAP tree.

Tilo Lutz

Roland Gruber

main

../lib/security.inc
security functions
../lib/account.inc
account functions
../lib/config.inc
current configuration options
../lib/status.inc
message displaying
../lib/ldap.inc
LDAP connection
../lib/lamdaemon.inc
lamdaemon interface
../lib/modules.inc
module interface
main_header.php
main_footer.php
main_header.php
main_footer.php
getChildCount
\getChildCount
Returns the number of child entries of a DN.

DN of parent

string

number of childs

\interger
$dn
deleteDN
\deleteDN
Deletes a DN and all child entries.

DN to delete

string

error messages

array
$dn
Manages creating/changing of profiles.

profiles

Roland Gruber

../../lib/security.inc
security functions
../../lib/profiles.inc
helper functions for profiles
../../lib/ldap.inc
access to LDAP server
../../lib/config.inc
access to configuration options
../../lib/modules.inc
access to account modules
../../lib/status.inc
Used to display status messages
../main_header.php
../main_footer.php
This is the main window of the profile editor.

profiles

Roland Gruber

../../lib/security.inc
security functions
../../lib/profiles.inc
helper functions for profiles
../../lib/ldap.inc
access to LDAP server
../../lib/config.inc
access to configuration options
../main_header.php
../main_footer.php

The phpLDAPadmin development team

phpLDAPadmin

\PageRender
QueryRender
\QueryRender
QueryRender class

phpLDAPadmin

Templates

need to add paging

accept
accept
Intialise and Render the QueryRender
getTemplates
getTemplates
Get our templates applicable for this object
haveDefaultTemplate
haveDefaultTemplate
Are default queries enabled?
drawTemplateChoice
drawTemplateChoice
visitStart
visitStart
visitEnd
visitEnd
drawSubTitle
drawSubTitle
$subtitle
null
getAFattrs
getAFattrs
getAjaxRef
getAjaxRef
$dn
drawBaseTabs
drawBaseTabs
drawResultsTable
drawResultsTable
$base
$results
No short description for file templates/3rdParty/pla/lib/QueryRender.php
No DocBlock was found for method drawTemplateChoice()
No DocBlock was found for method visitStart()
No DocBlock was found for method visitEnd()
No DocBlock was found for method drawSubTitle()
No DocBlock was found for method getAFattrs()
No DocBlock was found for method getAjaxRef()
No DocBlock was found for method drawBaseTabs()
No DocBlock was found for method drawResultsTable()
Classes and functions for fetching and parsing schema from an LDAP server.

The phpLDAPadmin development team

phpLDAPadmin

SchemaItem
\SchemaItem
Generic parent class for all schema items.
<p>A schema item is an ObjectClass, an AttributeBype, a MatchingRule, or a Syntax. All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.</p>

phpLDAPadmin

Schema

$name null $oid null $description null $is_obsolete false setOID setOID $oid setDescription setDescription $desc getOID getOID getDescription getDescription getIsObsolete getIsObsolete Gets whether this objectClass is flagged as obsolete by the LDAP server. getName getName Return the objects name. <p>param boolean $lower Return the name in lower case (default)</p> `string` $lower true
\SchemaItem
ObjectClass
\ObjectClass
Represents an LDAP objectClass

phpLDAPadmin

Schema

$server_id null $sup_classes array() $type $must_attrs array() $may_attrs array() $force_may array() $children_objectclasses array() $hierarchy array() __construct __construct Creates a new ObjectClass object given a raw LDAP objectClass string. $class $server parseList parseList Parse an LDAP schema list $i $strings $attrs getParents getParents This will return all our parent ObjectClass Objects getMustAttrs getMustAttrs Gets an array of AttributeType objects that entries of this ObjectClass must define. <p>This differs from getMustAttrNames in that it returns an array of AttributeType objects</p> `array` `array` `` `` `` $parents false getMayAttrs getMayAttrs Gets an array of AttributeType objects that entries of this ObjectClass may define. <p>This differs from getMayAttrNames in that it returns an array of AttributeType objects</p> `array` `array` `` `` `` `` $parents false getForceMayAttrs getForceMayAttrs getMustAttrNames getMustAttrNames Gets an array of attribute names (strings) that entries of this ObjectClass must define. <p>This differs from getMustAttrs in that it returns an array of strings rather than array of AttributeType objects</p> `array` `array` `` `` `` $parents false getMayAttrNames getMayAttrNames Gets an array of attribute names (strings) that entries of this ObjectClass must define. <p>This differs from getMayAttrs in that it returns an array of strings rather than array of AttributeType objects</p> `array` `array` `` `` `` $parents false addChildObjectClass addChildObjectClass Adds an objectClass to the list of objectClasses that inherit from this objectClass. `String` `boolean` $name getChildObjectClasses getChildObjectClasses Returns the array of objectClass names which inherit from this objectClass. `Array` getSupClasses getSupClasses Gets the objectClass names from which this objectClass inherits. `array` isRelated isRelated Return if this objectClass is related to $oclass `array` $oclass getType getType Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY. addMustAttrs addMustAttrs Adds the specified array of attributes to this objectClass' list of MUST attributes. <p>The resulting array of must attributes will contain unique members.</p> `array` $attr addMayAttrs addMayAttrs Behaves identically to addMustAttrs, but it operates on the MAY attributes of this objectClass. `array` $attr isForceMay isForceMay Determine if an array is listed in the force_may attrs $attr isStructural isStructural
ObjectClass_ObjectClassAttribute
\ObjectClass_ObjectClassAttribute
A simple class for representing AttributeTypes used only by the ObjectClass class.
<p>Users should never instantiate this class. It represents an attribute internal to an ObjectClass. If PHP supported inner-classes and variable permissions, this would be interior to class ObjectClass and flagged private. The reason this class is used and not the "real" class AttributeType is because this class supports the notion of a "source" objectClass, meaning that it keeps track of which objectClass originally specified it. This class is therefore used by the class ObjectClass to determine inheritance.</p>

phpLDAPadmin

Schema

$name $source __construct __construct Creates a new ObjectClass_ObjectClassAttribute with specified name and source objectClass. `string` `string` $name $source getName getName $lower true getSource getSource
\SchemaItem
AttributeType
\AttributeType
Represents an LDAP AttributeType

phpLDAPadmin

Schema

$sup_attribute null $equality null $ordering null $sub_str null $syntax null $syntax_oid null $is_single_value false $is_collective false $is_no_user_modification false $usage null $aliases array() $max_length null $type null $used_in_object_classes array() $required_by_object_classes array() $forced_as_may false __construct __construct Creates a new AttributeType object from a raw LDAP AttributeType string. $attr getUsage getUsage Gets this attribute's usage string as defined by the LDAP server `string` getSupAttribute getSupAttribute Gets this attribute's parent attribute (if any). <p>If this attribute does not inherit from another attribute, null is returned.</p> `string` getEquality getEquality Gets this attribute's equality string `string` getOrdering getOrdering Gets this attribute's ordering specification. `string` getSubstr getSubstr Gets this attribute's substring matching specification `string` getAliases getAliases Gets the names of attributes that are an alias for this attribute (if any). `array` isAliasFor isAliasFor Returns whether the specified attribute is an alias for this one (based on this attribute's alias list). `string` `boolean` $attr_name getSyntaxString getSyntaxString Gets this attribute's raw syntax string (ie: "1.2.3.4{16}"). `string` getSyntaxOID getSyntaxOID Gets this attribute's syntax OID. <p>Differs from getSyntaxString() in that this function only returns the actual OID with any length specification removed. Ie, if the syntax string is "1.2.3.4{16}", this function only retruns "1.2.3.4".</p> `string` getMaxLength getMaxLength Gets this attribute's the maximum length. <p>If no maximum is defined by the LDAP server, null is returned.</p> `int` getIsSingleValue getIsSingleValue Gets whether this attribute is single-valued. <p>If this attribute only supports single values, true is returned. If this attribute supports multiple values, false is returned.</p> `boolean` setIsSingleValue setIsSingleValue Sets whether this attribute is single-valued. `boolean` $is getIsCollective getIsCollective Gets whether this attribute is collective. `boolean` getIsNoUserModification getIsNoUserModification Gets whether this attribute is not modifiable by users. `boolean` getType getType Gets this attribute's type `string` removeAlias removeAlias Removes an attribute name from this attribute's alias array. `string` `boolean` $remove_alias_name addAlias addAlias Adds an attribute name to the alias array. `string` $alias setName setName Sets this attriute's name. `string` $name setSupAttribute setSupAttribute Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits). `string` $attr setAliases setAliases Sets this attribute's list of aliases. `array` $aliases setType setType Sets this attribute's type. `string` $type addUsedInObjectClass addUsedInObjectClass Adds an objectClass name to this attribute's list of "used in" objectClasses, that is the list of objectClasses which provide this attribute. `string` $name getUsedInObjectClasses getUsedInObjectClasses Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute. `array` addRequiredByObjectClass addRequiredByObjectClass Adds an objectClass name to this attribute's list of "required by" objectClasses, that is the list of objectClasses which must have this attribute. `string` $name getRequiredByObjectClasses getRequiredByObjectClasses Gets the list of "required by" objectClasses, that is the list of objectClasses which provide must have attribute. `array` setForceMay setForceMay This function will mark this attribute as a forced MAY attribute isForceMay isForceMay
\SchemaItem
Syntax
\Syntax
Represents an LDAP Syntax

phpLDAPadmin

Schema

__construct
__construct
Creates a new Syntax object from a raw LDAP syntax string.
$class
\SchemaItem
MatchingRule
\MatchingRule
Represents an LDAP MatchingRule

phpLDAPadmin

Schema

$syntax null $used_by_attrs array() __construct __construct Creates a new MatchingRule object from a raw LDAP MatchingRule string. $strings setUsedByAttrs setUsedByAttrs Sets the list of used_by_attrs to the array specified by $attrs; `array` $attrs addUsedByAttr addUsedByAttr Adds an attribute name to the list of attributes who use this MatchingRule `true` $attr getUsedByAttrs getUsedByAttrs Gets an array of attribute names (strings) which use this MatchingRule `array`
\SchemaItem
MatchingRuleUse
\MatchingRuleUse
Represents an LDAP schema matchingRuleUse entry

phpLDAPadmin

Schema

$used_by_attrs array() __construct __construct $strings getUsedByAttrs getUsedByAttrs Gets an array of attribute names (strings) which use this MatchingRuleUse object. `array`
No DocBlock was found for property $name
No DocBlock was found for property $oid
No DocBlock was found for property $description
No DocBlock was found for property $is_obsolete
No DocBlock was found for method setOID()
No DocBlock was found for method setDescription()
No DocBlock was found for method getOID()
No DocBlock was found for method getDescription()
Argument $lower is missing from the Docblock of getName()
No DocBlock was found for property $server_id
No DocBlock was found for property $sup_classes
No DocBlock was found for property $type
No DocBlock was found for property $must_attrs
No DocBlock was found for property $may_attrs
No DocBlock was found for property $force_may
No DocBlock was found for property $children_objectclasses
No DocBlock was found for property $hierarchy
Argument $class is missing from the Docblock of __construct()
Argument $server is missing from the Docblock of __construct()
Argument $i is missing from the Docblock of parseList()
Argument $strings is missing from the Docblock of parseList()
Argument $attrs is missing from the Docblock of parseList()
No DocBlock was found for method getForceMayAttrs()
Argument $attr is missing from the Docblock of isForceMay()
No DocBlock was found for method isStructural()
No DocBlock was found for property $name
No DocBlock was found for property $source
No DocBlock was found for method getName()
No DocBlock was found for method getSource()
No DocBlock was found for property $sup_attribute
No DocBlock was found for property $equality
No DocBlock was found for property $ordering
No DocBlock was found for property $sub_str
No DocBlock was found for property $syntax
No DocBlock was found for property $syntax_oid
No DocBlock was found for property $is_single_value
No DocBlock was found for property $is_collective
No DocBlock was found for property $is_no_user_modification
No DocBlock was found for property $usage
No DocBlock was found for property $aliases
No DocBlock was found for property $max_length
No DocBlock was found for property $type
No DocBlock was found for property $used_in_object_classes
No DocBlock was found for property $required_by_object_classes
No DocBlock was found for property $forced_as_may
Argument $attr is missing from the Docblock of __construct()
No DocBlock was found for method isForceMay()
Argument $class is missing from the Docblock of __construct()
No DocBlock was found for property $syntax
No DocBlock was found for property $used_by_attrs
Argument $strings is missing from the Docblock of __construct()
Argument $attr is missing from the Docblock of addUsedByAttr()
No DocBlock was found for property $used_by_attrs
No DocBlock was found for method __construct()
Allows to create new attributes

The phpLDAPadmin development team

phpLDAPadmin

AttributeFactory
\AttributeFactory
AttributeFactory Class

phpLDAPadmin

Templates

newAttribute
newAttribute
$name
$values
$server_id
$source
null
newJpegAttribute
newJpegAttribute
$name
$values
$server_id
$source
newBinaryAttribute
newBinaryAttribute
$name
$values
$server_id
$source
newPasswordAttribute
newPasswordAttribute
$name
$values
$server_id
$source
newSambaPasswordAttribute
newSambaPasswordAttribute
$name
$values
$server_id
$source
newRandomPasswordAttribute
newRandomPasswordAttribute
$name
$values
$server_id
$source
newShadowAttribute
newShadowAttribute
$name
$values
$server_id
$source
newSelectionAttribute
newSelectionAttribute
$name
$values
$server_id
$source
newMultiLineAttribute
newMultiLineAttribute
$name
$values
$server_id
$source
newDateAttribute
newDateAttribute
$name
$values
$server_id
$source
newObjectClassAttribute
newObjectClassAttribute
$name
$values
$server_id
$source
newDnAttribute
newDnAttribute
$name
$values
$server_id
$source
newGidAttribute
newGidAttribute
$name
$values
$server_id
$source
No DocBlock was found for method newAttribute()
No DocBlock was found for method newJpegAttribute()
No DocBlock was found for method newBinaryAttribute()
No DocBlock was found for method newPasswordAttribute()
No DocBlock was found for method newSambaPasswordAttribute()
No DocBlock was found for method newRandomPasswordAttribute()
No DocBlock was found for method newShadowAttribute()
No DocBlock was found for method newSelectionAttribute()
No DocBlock was found for method newMultiLineAttribute()
No DocBlock was found for method newDateAttribute()
No DocBlock was found for method newObjectClassAttribute()
No DocBlock was found for method newDnAttribute()
No DocBlock was found for method newGidAttribute()
Classes and functions for the template engines.

The phpLDAPadmin development team

phpLDAPadmin

DEBUGTMP
\DEBUGTMP
0
DEBUGTMPSUB
\DEBUGTMPSUB
0
Visitor
\Visitor
Abstract Visitor class

phpLDAPadmin

Templates

$server_id __call __call $method $args getServerID getServerID Return the LDAP server ID `int` getServer getServer Return this LDAP Server object `object`
No DocBlock was found for property $server_id
No DocBlock was found for method __call()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
PasswordAttribute
\PasswordAttribute
Represents an attribute whose values are passwords

phpLDAPadmin

Templates

Classes and functions for manipulating XML templates.

The phpLDAPadmin development team

phpLDAPadmin

xml2array
\xml2array
XML Parser
<p>This will read our XML file and convert it into variables for us to parse.</p>

phpLDAPadmin

XML

$stack array() $stack_ref $arrOutput array() $resParser $strXmlData push_pos push_pos $pos pop_pos pop_pos parseXML parseXML $strInputXML $filename tagOpen tagOpen $parser $name $attrs tagData tagData $parser $tagData tagClosed tagClosed $parser $name cleanXML cleanXML This function will parse an XML array and make a normal array. `array` $details
No DocBlock was found for property $stack
No DocBlock was found for property $stack_ref
No DocBlock was found for property $arrOutput
No DocBlock was found for property $resParser
No DocBlock was found for property $strXmlData
No DocBlock was found for method push_pos()
No DocBlock was found for method pop_pos()
No DocBlock was found for method parseXML()
No DocBlock was found for method tagOpen()
No DocBlock was found for method tagData()
No DocBlock was found for method tagClosed()
Argument $details is missing from the Docblock of cleanXML()
Page Rendering Functions

The phpLDAPadmin development team

phpLDAPadmin

IMGDIR
\IMGDIR
'images/default'
CSSDIR
\CSSDIR
'css/default'
page
\page
This class controls the final output to the browser.

phpLDAPadmin

Page

$_pageheader $_head $_app $_default __construct __construct $index null head_add head_add $html pageheader_print pageheader_print head_print head_print control_print control_print tree tree block_add block_add $side $object block_print block_print $side sysmsg sysmsg body body $raw false footer_print footer_print show show Only show a particular page frame - used by an AJAX call $frame $compress false $raw false display display $filter array() setsysmsg setsysmsg $data
block
\block
This class draws a block.

phpLDAPadmin

Page

$title $body $foot setTitle setTitle $html setBody setBody $html setFooter setFooter $html draw draw $side $raw false
No DocBlock was found for property $_pageheader
No DocBlock was found for property $_head
No DocBlock was found for property $_app
No DocBlock was found for property $_default
No DocBlock was found for method __construct()
No DocBlock was found for method head_add()
No DocBlock was found for method pageheader_print()
No DocBlock was found for method head_print()
No DocBlock was found for method control_print()
No DocBlock was found for method tree()
No DocBlock was found for method block_add()
No DocBlock was found for method block_print()
No DocBlock was found for method sysmsg()
No DocBlock was found for method body()
No DocBlock was found for method footer_print()
Argument $frame is missing from the Docblock of show()
Argument $compress is missing from the Docblock of show()
Argument $raw is missing from the Docblock of show()
No DocBlock was found for method display()
No DocBlock was found for method setsysmsg()
No DocBlock was found for property $title
No DocBlock was found for property $body
No DocBlock was found for property $foot
No DocBlock was found for method setTitle()
No DocBlock was found for method setBody()
No DocBlock was found for method setFooter()
No DocBlock was found for method draw()
Classes and functions for the template engine.
<p>Templates are either: + Creating or Editing, (a Container or DN passed to the object) + A predefined template, or a default template (template ID passed to the object)</p>

<p>The template object will know which attributes are mandatory (MUST attributes) and which attributes are optional (MAY attributes). It will also contain a list of optional attributes. These are attributes that the schema will allow data for (they are MAY attributes), but the template has not included a definition for them.</p>

<p>The template object will be invalidated if it does contain the necessary items (objectClass, MUST attributes, etc) to make a successful LDAP update.</p>

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplate
Template
\Template
Template Class

phpLDAPadmin

Templates

RDN attributes should be treated as MUST attributes even though the schema marks them as MAY

RDN attributes need to be checked that are included in the schema, otherwise mark it is invalid

askcontainer is no longer used?

$visible true $invalid false $invalid_admin false $invalid_reason $structural_oclass array() $description '' $readonly false $dn $container $noleaf false $regexp $title $icon $rdn __construct __construct $server_id $name null $filename null $type null $id null __clone __clone storeTemplate storeTemplate Main processing to store the template. `\xmldata` $xmldata hasDefaultTemplate hasDefaultTemplate Is default templates enabled? This will disable the default template from the engine. `boolean` readTemplates readTemplates Return the templates of type (creation/modification) `\$string` `array` $type accept accept This function will perform the following intialisation steps: + If a DN is set, query the ldap and load the object + Read our $_REQUEST variable and set the values After this action, the template should self describe as to whether it is an update, create or delete. <p>(OLD values are IGNORED, we will have got them when we build this object from the LDAP server DN.)</p> $makeVisible false setDN setDN Set the DN for this template, if we are editing entries `\dn` $dn setRDNAttributes setRDNAttributes Set the RDN attributes Given an RDN, mark the attributes as RDN attributes. <p>If there is no defined attribute, then the remaining RDNs will be returned.</p> `` `\RDN` $rdn getDN getDN Display the DN for this template entry. <p>If the DN is not set (creating a new entry), then a generated DN will be produced, taken from the RDN and the CONTAINER details.</p> `\dn` getDNEncode getDNEncode $url true setContainer setContainer Set the container for this template, if we are creating entries `\dn` `` $container getContainer getContainer Get the DN of the container for this entry `\dn` getContainerEncode getContainerEncode $url true copy copy Copy a DN $template $rdn $asnew false getAttrbyLdapType getAttrbyLdapType Get Attributes by LDAP type This function will return a list of attributes by LDAP type (MUST,MAY). `array` $type isAttrType isAttrType Return true if this is a MUST,MAY attribute $attr $type getRDNObjects getRDNObjects Return the attributes that comprise the RDN. `array` getRDNAttrs getRDNAttrs Get all the RDNs for this template, in RDN order. `array` getRDN getRDN Return the RDN for this template. <p>If the DN is already defined, then the RDN will be calculated from it. If the DN is not set, then the RDN will be calcuated from the template attribute definitions</p> `\rdn` getRDNAttributeName getRDNAttributeName Return the attribute name part of the RDN getContext getContext Determine the type of template this is isVisible isVisible Test if the template is visible `boolean` setVisible setVisible setInvisible setInvisible getRegExp getRegExp isReadOnly isReadOnly Test if this template has been marked as a read-only template getAttributes getAttributes Get the attribute entries `boolean` `array` $optional false getAttributesShown getAttributesShown Return a list of attributes that should be shown getAttributesInternal getAttributesInternal Return a list of the internal attributes getObjectClasses getObjectClasses Return the objectclasses defined in this template `array` getIcon getIcon Get template icon getDescription getDescription Return the template description `string` setInvalid setInvalid Set a template as invalid `string` $msg $admin false isInValid isInValid Get the template validity or the reason it is invalid `string` isAdminDisabled isAdminDisabled setMinValueCount setMinValueCount Set the minimum number of values for an attribute `object` `` $attr $value setAttrLDAPtype setAttrLDAPtype Set the LDAP type property for an attribute `object` `string` $attr $value OnChangeAdd OnChangeAdd OnChangeAdd javascript processing $origin $value rebuildTemplateAttrs rebuildTemplateAttrs This functions main purpose is to discover our MUST attributes based on objectclass definitions in the template file and to discover which of the objectclasses are STRUCTURAL - without one, creating an entry will just product an LDAP error. getLDAPadd getLDAPadd Return an array, that can be passed to ldap_add(). <p>Attributes with empty values will be excluded.</p> $attrsOnly false getLDAPmodify getLDAPmodify Return an array, that can be passed to ldap_mod_replace(). <p>Only attributes that have changed their value will be returned.</p> <p>This function will cache its results, so that it can be called with count() to see if there are changes, and if they are, the 2nd call will just return the results</p> `boolean` $attrsOnly false $index 0 getForceDeleteAttrs getForceDeleteAttrs Get the attributes that are marked as force delete We'll cache this result in the event of multiple calls. getAvailAttrs getAvailAttrs Get available attributes isNoLeaf isNoLeaf
No DocBlock was found for property $visible
No DocBlock was found for property $invalid
No DocBlock was found for property $invalid_admin
No DocBlock was found for property $invalid_reason
No DocBlock was found for property $structural_oclass
No DocBlock was found for property $description
No DocBlock was found for property $readonly
No DocBlock was found for property $dn
No DocBlock was found for property $container
No DocBlock was found for property $noleaf
No DocBlock was found for property $regexp
No DocBlock was found for property $title
No DocBlock was found for property $icon
No DocBlock was found for property $rdn
No DocBlock was found for method __construct()
No DocBlock was found for method __clone()
Argument $makeVisible is missing from the Docblock of accept()
No DocBlock was found for method getDNEncode()
No DocBlock was found for method getContainerEncode()
Argument $template is missing from the Docblock of copy()
Argument $rdn is missing from the Docblock of copy()
Argument $asnew is missing from the Docblock of copy()
Argument $type is missing from the Docblock of getAttrbyLdapType()
Argument $attr is missing from the Docblock of isAttrType()
Argument $type is missing from the Docblock of isAttrType()
No DocBlock was found for method setVisible()
No DocBlock was found for method setInvisible()
No DocBlock was found for method getRegExp()
Argument $admin is missing from the Docblock of setInvalid()
No DocBlock was found for method isAdminDisabled()
Argument $origin is missing from the Docblock of OnChangeAdd()
Argument $value is missing from the Docblock of OnChangeAdd()
Argument $attrsOnly is missing from the Docblock of getLDAPadd()
Argument $index is missing from the Docblock of getLDAPmodify()
No DocBlock was found for method isNoLeaf()
A collection of common generic functions used throughout the application.

The phpLDAPadmin development team

phpLDAPadmin

HTDOCDIR
\HTDOCDIR
sprintf('%s/', realpath(LIBDIR . '../htdocs/'))
LANGDIR
\LANGDIR
sprintf('%s/', realpath(LIBDIR . '../locale/'))
CONFDIR
\CONFDIR
sprintf('%s/', realpath(LIBDIR . '../config'))
QUERYDIR
\QUERYDIR
sprintf('%s/', realpath(LIBDIR . '../queries/'))
TMPLDIR
\TMPLDIR
sprintf('%s/', realpath(LIBDIR . '../templates/'))
DOCDIR
\DOCDIR
sprintf('%s/', realpath(LIBDIR . '../doc/'))
HOOKSDIR
\HOOKSDIR
sprintf('%s/', realpath(LIBDIR . '../hooks/'))
JSDIR
\JSDIR
'js/'
__autoload
\__autoload
Loads class definition
$className
array_stripslashes
\array_stripslashes
Strips all slashes from the specified array in place (pass by ref).

The array to strip slashes from, typically one of $_GET, $_POST, or $_COOKIE.

Array
$array
_
\_
$msg
app_error_handler
\app_error_handler
Custom error handling function.
<p>When a PHP error occurs, PHP will call this function rather than printing the typical PHP error string. This provides the application the ability to format an error message so that it looks better. Optionally, it can present a link so that a user can search/submit bugs. This function is not to be called directly. It is exclusively for the use of PHP internally. If this function is called by PHP from within a context where error handling has been disabled (ie, from within a function called with "@" prepended), then this function does nothing.</p>

The PHP error number that occurred (ie, E_ERROR, E_WARNING, E_PARSE, etc).

int

The PHP error string provided (ie, "Warning index "foo" is undefined)

string

The file in which the PHP error ocurred.

string

The line number on which the PHP error ocurred

int

\global\set_error_handler

$errno
$errstr
$file
$lineno
app_name
\app_name
Returns the application name.
app_version
\app_version
Returns the application version currently running.
<p>The version is read from the file named VERSION.</p>

The current version as read from the VERSION file.

string
auto_lang
\auto_lang
This function will convert the browser two character language into the default 5 character language, where the country portion should NOT be assumed to be upper case characters of the first two characters.
$lang
check_config
\check_config
Makes sure that the config file is properly setup.
$config_file
cmd_control_pane
\cmd_control_pane
Commands available in the control_panel of the page
array
$type
debug_dump
\debug_dump
This function dumps the $variable for debugging purposes

Variable to dump

string array

Whether to stop execution or not.

boolean
$variable
$die
false
$onlydebugaddr
false
debug_dump_backtrace
\debug_dump_backtrace
This function generates a backtrace

Whether to stop execution or not.

boolean
$msg
'Calling BackTrace'
$die
false
debug_sysmsg
\debug_sysmsg
Send a debug as a sys message
$msg
debug_log
\debug_log
Debug Logging
<p>The global debug level is turned on in your configuration file by setting:</p>

<pre><code>$config->custom->debug['level'] = 255; </code></pre>

<p>together with atleast one output direction (currently file and syslog are supported).</p>

<pre><code>$config->custom->debug['file'] = '/tmp/app_debug.log'; $config->custom->debug['syslog'] = true; </code></pre>

<p>The debug level is turned into binary, then if the message levels bit is on the message will be sent to the debug log. (Thus setting your debug level to 255, all bits on, will results in all messages being printed.)</p>

<p>The message level bits are defined here. 0( 1) = Entry/Return results from function calls. 1( 2) = Configuration Processing 2( 4) = Template Processing 3( 8) = Schema Processing 4( 16) = LDAP Server Communication 5( 32) = Tree Processing 7( 64) = Other non generic messages 8(128) = Page Processing 9(256) = Hooks Processing</p>

Message to send to syslog

string

Log bit number for this message.

int

\global\syslog.php

$msg
$level
$indent
error
\error
Display an error message in the system message panel of the page.
$msg
$type
'note'
$redirect
null
$fatal
false
$backtrace
false
get_request
\get_request
Return the result of a form variable, with optional default

form GET/REQUEST/SESSION/POST variable value or its default

\The
$attr
$type
'POST'
$die
false
$default
null
system_message
\system_message
Record a system message.
<p>This function can be used as an alternative to generate a system message, if page hasnt yet been defined.</p>
$msg
$redirect
null
blowfish_encrypt
\blowfish_encrypt
Encryption using blowfish algorithm

Original data

string

The secret

string

The encrypted result

string

lem9 (taken from the phpMyAdmin source)

$data
$secret
null
blowfish_decrypt
\blowfish_decrypt
Decryption using blowfish algorithm

Encrypted data

string

The secret

string

Original data

string

lem9 (taken from the phpMyAdmin source)

$encdata
$secret
null
full_str_pad
\full_str_pad
String padding

Input string

string

Length of the result

integer

The filling string

string

Padding mode

integer

The padded string

string
$input
$pad_length
$pad_string
''
$pad_type
0
get_cached_item
\get_cached_item
Returns the cached array of LDAP resources.
<p>Note that internally, this function utilizes a two-layer cache, one in memory using a static variable for multiple calls within the same page load, and one in a session for multiple calls within the same user session (spanning multiple page loads).</p>

the cached attributed requested, or null if there is nothing cached..

\Returns
$index
$item
$subitem
'null'
set_cached_item
\set_cached_item
Caches the specified $item for the specified $index.
<p>Returns true on success of false on failure.</p>
$index
$item
$subitem
'null'
$data
del_cached_item
\del_cached_item
Deletes the cache for a specified $item for the specified $index
$index
$item
$subitem
'null'
set_cookie
\set_cookie
Utility wrapper for setting cookies, which takes into consideration application configuration values.
<p>On success, true is returned. On failure, false is returned.</p>

The name of the cookie to set.

string

The value of the cookie to set.

string

(optional) The duration in seconds of this cookie. If unspecified, $cookie_time is used from config.php

int

(optional) The directory value of this cookie (see php.net/setcookie)

string
boolean
$name
$val
$expire
null
$dir
null
get_custom_file
\get_custom_file
Get a customized file for a server We don't need any caching, because it's done by PHP

The ID of the server

int

The requested filename

string

The customized filename, if exists, or the standard one

string
$index
$filename
$path
masort
\masort
Sort a multi dimensional array.

Multi demension array passed by reference

array

Comma delimited string of sort keys.

string

Whether to reverse sort.

boolean

Sorted multi demension array.

array
$data
$sortby
$rev
0
isCompress
\isCompress
Is compression enabled for output
obfuscate_password_display
\obfuscate_password_display
Fetches whether the user has configured phpLDAPadmin to obfuscate passwords with "*********" when displaying them.
<p>This is configured in config.php thus:</p>

<pre><code> $config->custom->appearance['obfuscate_password_display'] = true; </code></pre>

<p>Or if it is OK to show encrypted passwords but not clear text passwords</p>

<pre><code> $config->custom->appearance['show_clear_password'] = false; </code></pre>

Password encoding type

string
boolean
$enc
null
pretty_print_dn
\pretty_print_dn
Returns an HTML-beautified version of a DN.
<p>Internally, this function makes use of pla_explode_dn() to break the the DN into its components. It then glues them back together with "pretty" HTML. The returned HTML is NOT to be used as a real DN, but simply displayed.</p>

The DN to pretty-print.

string
string
$dn
is_dn_string
\is_dn_string
Given a string, this function returns true if the string has the format of a DN (ie, looks like "cn=Foo,dc=example,dc=com").
<p>Returns false otherwise. The purpose of this function is so that developers can examine a string and know if it looks like a DN, and draw a hyperlink as needed.</p>

<p>(See unit_test.php for test cases)</p>

The attribute to examine for "DNness"

string
boolean
$str
is_mail_string
\is_mail_string
Get whether a string looks like an email address (user@example.com).

The string to analyze.

string

Returns true if the specified string looks like an email address or false otherwise.

boolean
$str
is_url_string
\is_url_string
Get whether a string looks like a web URL (http://www.example.com/)

The string to analyze.

string

Returns true if the specified string looks like a web URL or false otherwise.

boolean
$str
pla_compare_dns
\pla_compare_dns
Compares 2 DNs.
<p>If they are equivelant, returns 0, otherwise, returns their sorting order (similar to strcmp()): Returns &lt; 0 if dn1 is less than dn2. Returns > 0 if dn1 is greater than dn2.</p>

<p>The comparison is performed starting with the top-most element of the DN. Thus, the following list:</p>

<pre><code> ou=people,dc=example,dc=com cn=Admin,ou=People,dc=example,dc=com cn=Joe,ou=people,dc=example,dc=com dc=example,dc=com cn=Fred,ou=people,dc=example,dc=org cn=Dave,ou=people,dc=example,dc=org </code></pre>

<p>Will be sorted thus using usort( $list, "pla_compare_dns" ):</p>

<pre><code> dc=com dc=example,dc=com ou=people,dc=example,dc=com cn=Admin,ou=People,dc=example,dc=com cn=Joe,ou=people,dc=example,dc=com cn=Dave,ou=people,dc=example,dc=org cn=Fred,ou=people,dc=example,dc=org </code></pre>

The first of two DNs to compare

string

The second of two DNs to compare

string
int
$dn1
$dn2
get_next_number
\get_next_number
For LDAP servers with auto_number enabled, this function will get the next available number using the host's preferred mechanism (pool or search).
<p>This is configured in config.php by server:</p>

<pre><code> $servers->setValue('auto_number','enable',true|false); </code></pre>

<p>The available mechanisms are: pool: The pool mechanism uses a user-configured entry in the LDAP server to store the last used "number". This mechanism simply fetches and increments and returns that value.</p>

<p>search: The search mechanism will search the LDAP server that has the attribute set. It will then find the smallest value and "fills in the gaps" by incrementing the smallest attribute until an unused value is found.</p>

<p>NOTE: Both mechanisms do NOT prevent race conditions or toe-stomping, so care must be taken when actually creating the entry to check that the number returned here has not been used in the mean time. Note that the two different mechanisms may (will!) return different values as they use different algorithms to arrive at their result. Do not be alarmed if (when!) this is the case.</p>

<p>See config.php.example for more notes on the two mechanisms.</p>

Base to start the search from

string

Attribute to query

string

Increment the result (for pool searches)

boolean

LDAP filter to use (for pool searches)

string
int
$base
$attr
$increment
false
$filter
false
$startmin
null
get_icon
\get_icon
Given a DN and server ID, this function reads the DN's objectClasses and determines which icon best represents the entry.
<p>The results of this query are cached in a session variable so it is not run every time the tree browser changes, just when exposing new DNs that were not displayed previously. That means we can afford a little bit of inefficiency here in favor of coolness. :)</p>

<p>This function returns a string like "country.png". All icon files are assumed to be contained in the /images/ directory of phpLDAPadmin.</p>

<p>Developers are encouraged to add new icons to the images directory and modify this function as needed to suit their types of LDAP entries. If the modifications are general to an LDAP audience, the phpLDAPadmin team will gladly accept them as a patch.</p>

The DN of the entry whose icon you wish to fetch.

string
string
$server_id
$dn
$object_classes
array()
expand_dn_with_base
\expand_dn_with_base
Appends a servers base to a "sub" dn or returns the base.

The baseDN to be added if the DN is relative

string

The DN to be made absolute

string

Returns null if both base is null and sub_dn is null or empty

string null
$base
$sub_dn
random_salt
\random_salt
Used to generate a random salt for crypt-style passwords.
<p>Salt strings are used to make pre-built hash cracking dictionaries difficult to use as the hash algorithm uses not only the user's password but also a randomly generated string. The string is stored as the first N characters of the hash for reference of hashing algorithms later.</p>

The length of the salt string to generate.

int

The generated salt string.

string
$length
get_rdn
\get_rdn
Given a DN string, this returns the 'RDN' portion of the string.
<p>For example. given 'cn=Manager,dc=example,dc=com', this function returns 'cn=Manager' (it is really the exact opposite of ds_ldap::getContainer()).</p>

The DN whose RDN to return.

string

If true, include attributes in the RDN string. See http://php.net/ldap_explode_dn for details

boolean

The RDN

string
$dn
$include_attrs
0
$decode
false
rdn_explode
\rdn_explode
Split an RDN into its attributes
$rdn
pla_verbose_error
\pla_verbose_error
Given an LDAP error number, returns a verbose description of the error.
<p>This function parses ldap_error_codes.txt and looks up the specified ldap error number, and returns the verbose message defined in that file.</p>

<pre><code> Array ( [title] => "Invalid Credentials" [description] => "An invalid username and/or password was supplied to the LDAP server." ) </code></pre>

The hex error number (ie, "0x42") of the LDAP error of interest.

string

An associative array contianing the error title and description like so:

array
$key
support_oid_to_text
\support_oid_to_text
Given an LDAP OID number, returns a verbose description of the OID.
<p>This function parses ldap_supported_oids.txt and looks up the specified OID, and returns the verbose message defined in that file.</p>

<pre><code> Array ( [title] => All Operational Attribute [ref] => RFC 3673 [desc] => An LDAP extension which clients may use to request the return of all operational attributes. ) </code></pre>

The OID number (ie, "1.3.6.1.4.1.4203.1.5.1") of the OID of interest.

string

An associative array contianing the OID title and description like so:

array
$key
ldap_error_msg
\ldap_error_msg
Print an LDAP error message
$msg
$errnum
draw_jpeg_photo
\draw_jpeg_photo
Draw the jpegPhoto image(s) for an entry wrapped in HTML.
<p>Many options are available to specify how the images are to be displayed.</p>

<p>Usage Examples:</p>

<pre><code> draw_jpeg_photo(0,'cn=Bob,ou=People,dc=example,dc=com',"jpegPhoto",0,true,array('img_opts'=>"border: 1px; width: 150px")); draw_jpeg_photo(1,'cn=Fred,ou=People,dc=example,dc=com',null,1); </code></pre>

The Server to get the image from.

object

The DN of the entry that contains the jpeg attribute you want to draw.

string

The name of the attribute containing the jpeg data (usually 'jpegPhoto').

string

Index of the attribute to draw

int

If true, draws a button beneath the image titled 'Delete' allowing the user to delete the jpeg attribute by calling JavaScript function deleteAttribute() provided in the default modification template.

boolean

Specifies optional image and CSS style attributes for the table tag. Supported keys are fixed_width, fixed_height, img_opts.

array
$server
$dn
$attr_name
'jpegphoto'
$index
$draw_delete_buttons
false
$options
array()
password_types
\password_types
Return the list of available password types

Dynamically work this list out so we only present hashes that we can encrypt

password_hash
\password_hash
Hashes a password and returns the hash based on the specified enc_type.

The password to hash in clear text.

string

Standard LDAP encryption type which must be one of crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.

string

The hashed password.

string
$password_clear
$enc_type
password_check
\password_check
Given a clear-text password and a hash, this function determines if the clear-text password is the password that was used to generate the hash.
<p>This is handy to verify a user's password when all that is given is the hash and a "guess".</p>

The hash.

String

The password in clear text to test.

String

True if the clear password matches the hash, and false otherwise.

Boolean
$cryptedpassword
$plainpassword
$attribute
'userpassword'
get_enc_type
\get_enc_type
Detects password encryption type
<p>Returns crypto string listed in braces. If it is 'crypt' password, returns crypto detected in password hash. Function should detect md5crypt, blowfish and extended DES crypt. If function fails to detect encryption type, it returns NULL.</p>

Hashed password

string
string
$user_password
draw_chooser_link
\draw_chooser_link
Draws an HTML browse button which, when clicked, pops up a DN chooser dialog.

The name of the form element to which this chooser dialog will publish the user's choice. The form element must be a member of a form with the "name" or "id" attribute set in the form tag, and the element must also define "name" or "id" for JavaScript to uniquely identify it. Example $form_element values may include "creation_form.container" or "edit_form.member_uid". See /templates/modification/default.php for example usage.

string

(optional) If true, the function draws the localized text "choose" to the right of the button.

boolean
$form
$element
$include_choose_text
true
$rdn
'none'
pla_explode_dn
\pla_explode_dn
Explode a DN into an array of its RDN parts.
<p>NOTE: When a multivalue RDN is passed to ldap_explode_dn, the results returns with 'value + value';</p>

<pre><code> Array ( [0] => uid=ppratt [1] => ou=People [2] => dc=example [3] => dc=com ) </code></pre>

The DN to explode.

string

(optional) Whether to include attribute names (see http://php.net/ldap_explode_dn for details)

int

An array of RDN parts of this format:

array
$dn
$with_attributes
0
dn_escape
\dn_escape
Parse a DN and escape any special characters
$dn
dn_unescape
\dn_unescape
Parse a DN and unescape any special characters
$dn
get_href
\get_href
Fetches the URL for the specified item.
<p>This is a convenience function for fetching project HREFs (like bugs)</p>

One of "open_bugs", "add_bug", "donate", or "add_rfe" (rfe = request for enhancement)

string

The URL to the requested item.

string
$type
$extra_info
''
utime
\utime
Returns the current time as a double (including micro-seconds).

The current time in seconds since the beginning of the UNIX epoch (Midnight Jan. 1, 1970)

double
array_to_query_string
\array_to_query_string
Converts an array to a query-string with the option to exclude certain variables from the returned query string.
<p>This is convenient if callers want to convert the current GET query string or POST array into a string and replace certain variables with their own.</p>

The associate array to convert whose form is such that the keys are the names of the variables and the values are said variables' values like this: <code> Array ( [server_id] = 0, [dn] = "dc=example,dc=com", [attr] = "sn" ) </code> This will produce a string like this: "server_id=0&dn=dc=example,dc=com&attr=sn"

array

(optional) An array of variables to exclude in the resulting string

array

The string created from the array.

string
$array
$exclude_vars
array()
pla_reverse_dn
\pla_reverse_dn
Reverses a DN such that the top-level RDN is first and the bottom-level RDN is last For example: <code> cn=Brigham,ou=People,dc=example,dc=com </code> Becomes: <code> dc=com,dc=example,ou=People,cn=Brigham </code> This makes it possible to sort lists of DNs such that they are grouped by container.

The DN to reverse

string

The reversed DN

string

\global\pla_compare_dns

\global\pla_explode_dns

$dn
sortAttrs
\sortAttrs
Attribute sorting
$a
$b
arrayLower
\arrayLower
Reads an array and returns the array values back in lower case

The array to convert the values to lowercase.

array

array Array with values converted to lowercase.

$array
draw_formatted_dn
\draw_formatted_dn
Gets a DN string using the user-configured tree_display_format string to format it.
$server
$entry
server_select_list
\server_select_list
Server html select list
$selected
null
$logged_on
false
$name
'index'
$isVisible
true
$js
null
littleEndian
\littleEndian
Converts a little-endian hex-number to one, that 'hexdec' can convert
$hex
binSIDtoText
\binSIDtoText
$binsid
return_ldap_hash
\return_ldap_hash
Query LDAP and return a hash.

The base DN to use.

string

LDAP Query filter.

string

LDAP attribute to use as key.

string

Attributes to use as values.

array

Specify false to not sort results by DN or true to have the returned array sorted by DN (uses ksort) or an array of attribute names to sort by attribute values

boolean

Array of values keyed by $key.

array
$base
$filter
$key
$attrs
$sort
true
password_generate
\password_generate
This function returns a string automatically generated based on the criteria defined in the array $criteria in config.php
a_array_rand
\a_array_rand
This function returns an array of $num_req values randomly picked from the $input array

Array of values

array

Number of values in returned array

integer

The padded string

string
$input
$num_req
random_junk
\random_junk
This is for Opera.
<p>By putting "random junk" in the query string, it thinks that it does not have a cached version of the page, and will thus fetch the page rather than display the cached version</p>
htmlid
\htmlid
Returns a HTML id that can be used in the URL after the #.

The DN to pretty-print.

string
string
$sid
$dn
isAjaxEnabled
\isAjaxEnabled
Is PLA configured for AJAX display
Argument $className is missing from the Docblock of \__autoload()
No DocBlock was found for function \_()
Argument $lang is missing from the Docblock of \auto_lang()
Argument $config_file is missing from the Docblock of \check_config()
Argument $type is missing from the Docblock of \cmd_control_pane()
Argument $onlydebugaddr is missing from the Docblock of \debug_dump()
Argument $die is missing from the Docblock of \debug_dump_backtrace()
Argument $msg is missing from the Docblock of \debug_sysmsg()
Argument $indent is missing from the Docblock of \debug_log()
Argument $msg is missing from the Docblock of \error()
Argument $type is missing from the Docblock of \error()
Argument $redirect is missing from the Docblock of \error()
Argument $fatal is missing from the Docblock of \error()
Argument $backtrace is missing from the Docblock of \error()
Argument $attr is missing from the Docblock of \get_request()
Argument $type is missing from the Docblock of \get_request()
Argument $die is missing from the Docblock of \get_request()
Argument $default is missing from the Docblock of \get_request()
Argument $msg is missing from the Docblock of \system_message()
Argument $redirect is missing from the Docblock of \system_message()
Argument $index is missing from the Docblock of \get_cached_item()
Argument $item is missing from the Docblock of \get_cached_item()
Argument $subitem is missing from the Docblock of \get_cached_item()
Argument $index is missing from the Docblock of \set_cached_item()
Argument $item is missing from the Docblock of \set_cached_item()
Argument $subitem is missing from the Docblock of \set_cached_item()
Argument $data is missing from the Docblock of \set_cached_item()
Argument $index is missing from the Docblock of \del_cached_item()
Argument $item is missing from the Docblock of \del_cached_item()
Argument $subitem is missing from the Docblock of \del_cached_item()
Argument $path is missing from the Docblock of \get_custom_file()
Argument $startmin is missing from the Docblock of \get_next_number()
Argument $dn is missing from the Docblock of \get_icon()
Argument $object_classes is missing from the Docblock of \get_icon()
Argument $decode is missing from the Docblock of \get_rdn()
Argument $rdn is missing from the Docblock of \rdn_explode()
Argument $msg is missing from the Docblock of \ldap_error_msg()
Argument $errnum is missing from the Docblock of \ldap_error_msg()
Argument $attribute is missing from the Docblock of \password_check()
Argument $include_choose_text is missing from the Docblock of \draw_chooser_link()
Argument $rdn is missing from the Docblock of \draw_chooser_link()
Argument $dn is missing from the Docblock of \dn_escape()
Argument $dn is missing from the Docblock of \dn_unescape()
Argument $extra_info is missing from the Docblock of \get_href()
Argument $a is missing from the Docblock of \sortAttrs()
Argument $b is missing from the Docblock of \sortAttrs()
Argument $server is missing from the Docblock of \draw_formatted_dn()
Argument $entry is missing from the Docblock of \draw_formatted_dn()
Argument $selected is missing from the Docblock of \server_select_list()
Argument $logged_on is missing from the Docblock of \server_select_list()
Argument $name is missing from the Docblock of \server_select_list()
Argument $isVisible is missing from the Docblock of \server_select_list()
Argument $js is missing from the Docblock of \server_select_list()
Argument $hex is missing from the Docblock of \littleEndian()
No DocBlock was found for function \binSIDtoText()
Argument $dn is missing from the Docblock of \htmlid()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
ShadowAttribute
\ShadowAttribute
Represents a shadow date attribute

phpLDAPadmin

Templates

$shadow_before_today_attrs array('shadowLastChange', 'shadowMin') $shadow_after_today_attrs array('shadowMax', 'shadowExpire', 'shadowWarning', 'shadowInactive')
No DocBlock was found for property $shadow_before_today_attrs
No DocBlock was found for property $shadow_after_today_attrs
Functions related to hooks management.
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>

<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>

<p>You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>

Benjamin Drieu <benjamin.drieu@fr.alcove.com> and Alc�?ve

phpLDAPadmin

sort_array_by_priority
\sort_array_by_priority
Compares two arrays by numerically comparing their 'prority' value.
<p>Standard `cmp-like' function.</p>

First element to compare.

\a

Second element to compare.

\b

if priority of first element is smaller than second element priority. 1 otherwise.

\-1
$a
$b
run_hook
\run_hook
Runs procedures attached to a hook.

Name of hook to run.

\hook_name

Array of optional arguments set by phpldapadmin. It is normally in a form known by call_user_func_array() : <pre>[ 'server_id' => 0, 'dn' => 'uid=epoussa,ou=tech,o=corp,o=fr' ]</pre>

\args

if all procedures returned true, false otherwise.

true
$hook_name
$args
add_hook
\add_hook
Adds a procedure to a hook for later execution.

Name of the hook.

\hook_name

Name of the php function called upon hook trigger.

\hook_function

Numeric priority. Lowest means procedure will be executed before.

\priority

Name of the php rollback function called upon failure.

\rollback_function
$hook_name
$hook_function
$priority
0
$rollback_function
null
remove_hook
\remove_hook
Removes a procedure from a hook, based on a filter.

Name of the hook.

\hook_name

Numeric priority. If set, all procedures of that priority will be removed.

\priority

Name of the procedure function. If set, all procedures that call this function will be removed.

\hook_function

Name of the php rollback function called upon failure. If set, all procedures that call this function as a rollback will be removed.

\rollback_function
$hook_name
$hook_function
$priority
$rollback_function
clear_hooks
\clear_hooks
Removes all procedures from a hook.

Name of hook to clear.

\hook_name
$hook_name
Functions related to syslog logging.
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>

<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>

<p>You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>

Benjamin Drieu <benjamin.drieu@fr.alcove.com> and Alcôve

phpLDAPadmin

syslog_msg
\syslog_msg
Verify that syslog logging is activated in the config via the debug->syslog variable and does a call to the syslog() function is it is true.

Syslog emergency.

\emergency

String to log.

\log_string
$emergency
$log_string
syslog_err
\syslog_err
Issue an error message via syslog.

Log message to send to syslog.

\log_string

on success.

true
$log_string
syslog_warning
\syslog_warning
Issue a warning message via syslog.

Log message to send to syslog.

\log_string

on success.

true
$log_string
syslog_notice
\syslog_notice
Issue a notice message via syslog.

Log message to send to syslog.

\log_string

on success.

true
$log_string
syslog_debug
\syslog_debug
Issue a debug message via syslog, only if $log_level is set to 'debug' from the config file.

Log message to send to syslog.

\log_string

on success or if debug log is not activated.

true
$log_string
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\PasswordAttribute
RandomPasswordAttribute
\RandomPasswordAttribute
Represents an attribute whose values are random passwords

phpLDAPadmin

Templates

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\BinaryAttribute
JpegAttribute
\JpegAttribute
Represents an attribute whose values are jpeg pictures

phpLDAPadmin

Templates

Classes and functions for searching the LDAP server
<p>These classes and functions will read our XML search files, for defined search reports.</p>

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplates
Queries
\Queries
Query Class
<p>This class will store all our pre-defined search definitions.</p>

phpLDAPadmin

Queries

Classes and functions for XML based templates.

The phpLDAPadmin development team

phpLDAPadmin

xmlTemplates
\xmlTemplates
XML Templates Class

phpLDAPadmin

Templates

$server_id $templates array() __construct __construct $server_id getClassVars getClassVars This will return our custom class variables, used by the parent to create objects. getTemplates getTemplates Return a list of templates by their type This function should return a sorted list, as the array is built sorted. `string` `boolean` `array` $type null $container null $disabled false getTemplate getTemplate Return a template by its ID `string` `object` $templateid getTemplateFiles getTemplateFiles Get a list of template filenames.
xmlTemplate
\xmlTemplate
XML Template Class

phpLDAPadmin

Templates

$server_id $id $name $type $readtime $filename $attributes array() __construct __construct $server_id $name null $filename null $type null $id null getAttrID getAttrID Get an attribute ID `string` `int` $attr getFileName getFileName Get the Template filename. getID getID Return the template by ID getName getName Return the template name `boolean` $lower true getReadTime getReadTime Get the Template read time. getServer getServer Return this LDAP Server object `object` getServerID getServerID Return the LDAP server ID `int` isType isType Test if a template is of a type `boolean` $type getType getType Return the template type getTitle getTitle Get template title addAttribute addAttribute Add another attribute to this template `int` $name $value $source null getAttributeNames getAttributeNames Get the attribute names `array` getAttribute getAttribute Get a specific Attribute `string` `object` $name isAdminDisabled isAdminDisabled May be overloaded in other classes
No DocBlock was found for property $server_id
No DocBlock was found for property $templates
No DocBlock was found for method __construct()
Argument $disabled is missing from the Docblock of getTemplates()
No DocBlock was found for property $server_id
No DocBlock was found for property $id
No DocBlock was found for property $name
No DocBlock was found for property $type
No DocBlock was found for property $readtime
No DocBlock was found for property $filename
No DocBlock was found for property $attributes
No DocBlock was found for method __construct()
Argument $type is missing from the Docblock of isType()
Argument $name is missing from the Docblock of addAttribute()
Argument $value is missing from the Docblock of addAttribute()
Argument $source is missing from the Docblock of addAttribute()
Classes and functions for communication of Data Stores

The phpLDAPadmin development team

phpLDAPadmin

\myldap
ldap_pla
\ldap_pla
This abstract class provides variables and methods for LDAP datastores for use by PLA.

phpLDAPadmin

DataStore

$force_may array() __construct __construct $index __get __get $key isShowCreateEnabled isShowCreateEnabled Gets whether the admin has configured phpLDAPadmin to show the "Create New" link in the tree viewer. <pre><code>$servers->setValue('appearance','show_create',true|false); </code></pre> <p>If NOT set, then default to show the Create New item. If IS set, then return the value (it should be true or false).</p> <p>The entry creation command must be available.</p> <pre><code>$config->custom->commands['script'] = array('create' => true); </code></pre> `boolean` isAnonBindAllowed isAnonBindAllowed Fetch whether the user has configured a certain server login to be non anonymous <pre><code>$servers->setValue('login','anon_bind',true|false); </code></pre> `boolean` isBranchRenameEnabled isBranchRenameEnabled Returns true if the user has configured the specified server to enable branch (non-leaf) renames. <p>This is configured in config.php thus:</p> <pre><code>$servers->setValue('server','branch_rename',true|false); </code></pre> `boolean` isMultiLineAttr isMultiLineAttr Determines if an attribute's value can contain multiple lines. <p>Attributes that fall in this multi-line category may be configured in config.php. Hence, this function accesses the global variable $_SESSION[APPCONFIG]->custom->appearance['multi_line_attributes'];</p> <p>Usage example:</p> <pre><code>if ($ldapserver->isMultiLineAttr('postalAddress')) echo '<textarea name="postalAddress"></textarea>'; else echo '<input name="postalAddress" type="text">'; </code></pre> `string` `string` `boolean` $attr_name $val null isAttrTest isAttrTest Returns true if the specified attribute is configured according to the test enabled in config.php `string` `array` `\dn` `boolean` $attr $attrs $except_dn isAttrReadOnly isAttrReadOnly Returns true if the specified attribute is configured as read only in config.php. <p>Attributes are configured as read-only in config.php thus:</p> <pre><code>$config->custom->appearance['readonly_attrs'] = array('objectClass'); </code></pre> `string` `boolean` $attr isAttrHidden isAttrHidden Returns true if the specified attribute is configured as hidden in config.php. <p>Attributes are configured as hidden in config.php thus:</p> <pre><code>$config->custom->appearance['hide_attrs'] = array('objectClass'); </code></pre> `string` `boolean` $attr add add Add objects $dn $entry_array $method null delete delete Delete objects $dn $method null rename rename Rename objects $dn $new_rdn $container $deleteoldrdn $method null modify modify Modify objects $dn $attrs $method null isAttrUnique isAttrUnique Returns true if the specified attribute is configured as unique in config.php. <p>Attributes are configured as hidden in config.php thus:</p> <pre><code>$servers->setValue('unique','attrs',array('mail','uid','uidNumber')); </code></pre> `string` `boolean` $attr checkUniqueAttrs checkUniqueAttrs This function will check whether the value for an attribute being changed is already assigned to another DN. <p>Returns the bad value, or null if all values are OK</p> `\dn` `string` `string array` $dn $attrs isSessionValid isSessionValid Check if the session timeout has occured for this LDAP server.
No DocBlock was found for property $force_may
No DocBlock was found for method __construct()
No DocBlock was found for method __get()
Argument $dn is missing from the Docblock of add()
Argument $entry_array is missing from the Docblock of add()
Argument $method is missing from the Docblock of add()
Argument $dn is missing from the Docblock of delete()
Argument $method is missing from the Docblock of delete()
Argument $dn is missing from the Docblock of rename()
Argument $new_rdn is missing from the Docblock of rename()
Argument $container is missing from the Docblock of rename()
Argument $deleteoldrdn is missing from the Docblock of rename()
Argument $method is missing from the Docblock of rename()
Argument $dn is missing from the Docblock of modify()
Argument $attrs is missing from the Docblock of modify()
Argument $method is missing from the Docblock of modify()
Parameter could not be found in checkUniqueAttrs()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
BinaryAttribute
\BinaryAttribute
Represents an attribute whose values are binary

phpLDAPadmin

Templates

$filepaths $filenames __construct __construct $name $values $server_id $source null getFileNames getFileNames getFileName getFileName $i addFileName addFileName $name $i -1 getFilePaths getFilePaths getFilePath getFilePath $i addFilePath addFilePath $path $i -1
No DocBlock was found for property $filepaths
No DocBlock was found for property $filenames
No DocBlock was found for method __construct()
No DocBlock was found for method getFileNames()
No DocBlock was found for method getFileName()
No DocBlock was found for method addFileName()
No DocBlock was found for method getFilePaths()
No DocBlock was found for method getFilePath()
No DocBlock was found for method addFilePath()
Configuration processing and defaults.

The phpLDAPadmin development team

phpLDAPadmin

Add validation of set variables to enforce limits or particular values.

REQUIRED_PHP_VERSION
\REQUIRED_PHP_VERSION
'5.0.0'
The minimum version of PHP required to run phpLDAPadmin.
Config
\Config
The config class contains all our configuration settings for a session.
<p>An instance of this class should be stored in $_SESSION to maintain state, and to avoid rebuilding/rereading it at the state of each page output.</p>

phpLDAPadmin

Tree

$custom $default $servers array() $hooks array() __construct __construct getConfigArray getConfigArray Access the configuration, taking into account the defaults and the customisations $usecache true getValue getValue Get a configuration value. $key $index $fatal true untested untested Return the untested config items CheckCustom CheckCustom Function to check and warn about any unusual defined variables. getCommandList getCommandList Get a list of available commands. isCommandAvailable isCommandAvailable Simple ACL to see if commands can be run $index 'cmd' configDefinition configDefinition $key $index $config getFriendlyAttrs getFriendlyAttrs Return the friendly attributes names getFriendlyName getFriendlyName This function will return the friendly name of an attribute, if it exists. <p>If the friendly name doesnt exist, the attribute name will be returned.</p> `` `string` $attr haveFriendlyName haveFriendlyName This function will return true if a friendly name exists for an attribute. <p>If the friendly name doesnt exist, it will return false.</p> `` `boolean` $attr getFriendlyHTML getFriendlyHTML This function will return the <ancronym> html for a friendly name attribute. `` `string` $attr setServers setServers $servers getServer getServer $index null getServerList getServerList Return a list of our servers `boolean` $visible true
No DocBlock was found for property $custom
No DocBlock was found for property $default
No DocBlock was found for property $servers
No DocBlock was found for property $hooks
No DocBlock was found for method __construct()
Argument $usecache is missing from the Docblock of getConfigArray()
Argument $key is missing from the Docblock of getValue()
Argument $index is missing from the Docblock of getValue()
Argument $fatal is missing from the Docblock of getValue()
Argument $index is missing from the Docblock of isCommandAvailable()
No DocBlock was found for method configDefinition()
No DocBlock was found for method setServers()
No DocBlock was found for method getServer()
Classes and functions for the query engine.

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplate
Query
\Query
Query Class

phpLDAPadmin

Queries

$description '' $results array() storeTemplate storeTemplate Main processing to store the template. `\xmldata` $xmldata accept accept Accept will run the query and store the results in results() setDN setDN This is temporary to get around objects that use a DN for rendering, for example jpegPhoto $dn getDN getDN This is temporary to get around objects that use a DN for rendering, for example jpegPhoto getDNEncode getDNEncode $url true getAttrSortOrder getAttrSortOrder getAttrDisplayOrder getAttrDisplayOrder isVisible isVisible Test if the template is visible `boolean` getDescription getDescription
No DocBlock was found for property $description
No DocBlock was found for property $results
Argument $dn is missing from the Docblock of setDN()
No DocBlock was found for method getDNEncode()
No DocBlock was found for method getAttrSortOrder()
No DocBlock was found for method getAttrDisplayOrder()
No DocBlock was found for method getDescription()
The Cipher_blowfish:: class implements the Cipher interface enryption data using the Blowfish algorithm.
<p>$Horde: horde/lib/Cipher/blowfish.php,v 1.2.2.3 2003/01/03 13:23:22 jan Exp $</p>

<p>Copyright 2002-2003 Mike Cochrane <a href="m&#97;&#105;&#108;&#116;&#111;&#58;&#109;&#105;&#x6b;&#x65;&#x40;&#x67;&#x72;&#x61;&#x66;to&#110;&#104;&#97;&#108;&#108;&#46;&#99;&#x6f;&#x2e;&#x6e;&#x7a;">&#109;&#105;&#x6b;&#x65;&#x40;&#x67;&#x72;&#x61;&#x66;to&#110;&#104;&#97;&#108;&#108;&#46;&#99;&#x6f;&#x2e;&#x6e;&#x7a;</a></p>

<p>See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.</p>

Mike Cochrane <mike@graftonhall.co.nz>

$Revision: 4149 $

Horde 2.2

horde.cipher

Horde_Cipher_blowfish
\Horde_Cipher_blowfish

horde.cipher

$p array(608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731) $s1 array(3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946) $s2 array(1266315497, 3048417604, 3681880366, 3289982499, 2909710000, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055) $s3 array(3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504) $s4 array(976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409000, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462) $_rounds 16 Cipher_blowfish Cipher_blowfish $params null setKey setKey Set the key to be used for en/decryption `String` $key getBlockSize getBlockSize Return the size of the blocks that this cipher needs `Integer` encryptBlock encryptBlock Encrypt a block on data. `String` `\optional` `String` $block $key null _encryptBlock _encryptBlock Encrypt a block on data. `String` `String` `String` $L $R decryptBlock decryptBlock Decrypt a block on data. `String` `\optional` `String` $block $key null _formatKey _formatKey Converts a text key into an array. `array` $key
No short description for class \Horde_Cipher_blowfish
No DocBlock was found for property $p
No DocBlock was found for property $s1
No DocBlock was found for property $s2
No DocBlock was found for property $s3
No DocBlock was found for property $s4
No DocBlock was found for property $_rounds
No DocBlock was found for method Cipher_blowfish()
Argument $key is missing from the Docblock of _formatKey()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
DateAttribute
\DateAttribute
Represents an attribute whose values are dates

phpLDAPadmin

Templates

Classes and functions for communication of Data Stores

The phpLDAPadmin development team

phpLDAPadmin

DS
\DS
This abstract class provides the basic variables and methods.

phpLDAPadmin

DataStore

$index $default $custom $type __construct __construct $index connect connect This will make the connection to the datasource $method $debug false login login Login to the datastore method: default = anon, connect to ds using bind_id not auth_id. <p>method: 'user', connect with auth_id method: '<freetext>', any custom extra connection to ds.</p> $user null $pass null $method null query query Query the datasource $query $method $index null $debug false getErrorMessage getErrorMessage Return error details from previous operation getErrorNum getErrorNum setDefaults setDefaults Functions that set and verify object configuration details $defaults isDefaultKey isDefaultKey $key isDefaultSetting isDefaultSetting $key $setting getValue getValue Return a configuration value $key $setting $fatal true setValue setValue Set a configuration value $key $setting $value untested untested Return the untested config items getName getName Get the name of this datastore getAuthType getAuthType Return the authentication type for this object getLogin getLogin Get the login name of the user logged into this datastore's connection method If this returns null, we are not logged in. <p>If this returns '', we are logged in with anonymous</p> $method null setLogin setLogin Set the login details of the user logged into this datastore's connection method $user $pass $method null getPassword getPassword Get the login password of the user logged into this datastore's connection method $method null isLoggedIn isLoggedIn Return if this datastore's connection method has been logged into $method null logout logout Logout of this datastore's connection method $method null isVisible isVisible Functions that return the condition of the datasource isReadOnly isReadOnly getIndex getIndex getMethod getMethod Work out which connection method to use. <p>If a method is passed, then it will be passed back. If no method is passed, then we'll check to see if the user is logged in. If they are, then 'user' is used, otherwise 'anon' is used.</p> `int` `string` $method null isSessionValid isSessionValid This method should be overridden in application specific ds files inactivityTime inactivityTime Return the time left in seconds until this connection times out. <p>If there is not timeout, this function will return null.</p>
Datastore
\Datastore
The list of database sources

phpLDAPadmin

DataStore

$index $objects array() $default __construct __construct newServer newServer Create a new database object $type setValue setValue Set values for a database object. $key $setting $value getServerList getServerList Get a list of all the configured servers. `boolean` `array` $isVisible true Instance Instance Return an object Instance of a configured database. `int` `object` $index null InstanceName InstanceName Return an object Instance of a configured database. `string` `object` $name null InstanceId InstanceId Return an object Instance of a configured database. `string` `object` $id null
No DocBlock was found for property $index
No DocBlock was found for property $default
No DocBlock was found for property $custom
No DocBlock was found for property $type
No DocBlock was found for method __construct()
Argument $method is missing from the Docblock of connect()
Argument $debug is missing from the Docblock of connect()
Argument $user is missing from the Docblock of login()
Argument $pass is missing from the Docblock of login()
Argument $method is missing from the Docblock of login()
Argument $query is missing from the Docblock of query()
Argument $method is missing from the Docblock of query()
Argument $index is missing from the Docblock of query()
Argument $debug is missing from the Docblock of query()
No DocBlock was found for method getErrorNum()
Argument $defaults is missing from the Docblock of setDefaults()
No DocBlock was found for method isDefaultKey()
No DocBlock was found for method isDefaultSetting()
Argument $key is missing from the Docblock of getValue()
Argument $setting is missing from the Docblock of getValue()
Argument $fatal is missing from the Docblock of getValue()
Argument $key is missing from the Docblock of setValue()
Argument $setting is missing from the Docblock of setValue()
Argument $value is missing from the Docblock of setValue()
Argument $method is missing from the Docblock of getLogin()
Argument $user is missing from the Docblock of setLogin()
Argument $pass is missing from the Docblock of setLogin()
Argument $method is missing from the Docblock of setLogin()
Argument $method is missing from the Docblock of getPassword()
Argument $method is missing from the Docblock of isLoggedIn()
Argument $method is missing from the Docblock of logout()
No DocBlock was found for method isReadOnly()
No DocBlock was found for method getIndex()
No DocBlock was found for property $index
No DocBlock was found for property $objects
No DocBlock was found for property $default
No DocBlock was found for method __construct()
Argument $type is missing from the Docblock of newServer()
Argument $key is missing from the Docblock of setValue()
Argument $setting is missing from the Docblock of setValue()
Argument $value is missing from the Docblock of setValue()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
ObjectClassAttribute
\ObjectClassAttribute
Represents an 'objectClass' attribute

phpLDAPadmin

Templates

This class provides functions to calculate Samba NT and LM hashes.
<p>The code is a conversion from createntlm.pl (Benjamin Kuit) and smbdes.c/md4.c (Andrew Tridgell).</p>

Roland Gruber

lam

smbHash
\smbHash
Calculates NT and LM hashes.
<p>The important functions are lmhash($password) and nthash($password).</p>

lam

$perm1 array(57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4) $perm2 array(14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32) $perm3 array(58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7) $perm4 array(32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17, 16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25, 24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32, 1) $perm5 array(16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10, 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25) $perm6 array(40, 8, 48, 16, 56, 24, 64, 32, 39, 7, 47, 15, 55, 23, 63, 31, 38, 6, 46, 14, 54, 22, 62, 30, 37, 5, 45, 13, 53, 21, 61, 29, 36, 4, 44, 12, 52, 20, 60, 28, 35, 3, 43, 11, 51, 19, 59, 27, 34, 2, 42, 10, 50, 18, 58, 26, 33, 1, 41, 9, 49, 17, 57, 25) $sc array(1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1) $sbox array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7), array(0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8), array(4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0), array(15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13)), array(array(15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10), array(3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5), array(0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15), array(13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9)), array(array(10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8), array(13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1), array(13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7), array(1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12)), array(array(7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15), array(13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9), array(10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4), array(3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14)), array(array(2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9), array(14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6), array(4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14), array(11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3)), array(array(12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11), array(10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8), array(9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6), array(4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13)), array(array(4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1), array(13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6), array(1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2), array(6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12)), array(array(13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7), array(1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2), array(7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8), array(2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11))) x x Fixes too large numbers $i lshift lshift `integer` `array` `array` $count $data permute permute `array` `array` `array` $in $p $n mxor mxor `array` `array` `array` $in1 $in2 doHash doHash `array` `array` `boolean` `array` $in $key $forw str_to_key str_to_key str_to_key `string` `string` $str smb_hash smb_hash smb_hash `\unknown_type` `\unknown_type` `\unknown_type` `\unknown` $in $key $forw E_P16 E_P16 E_P16 `\unknown_type` `\unknown` $in lmhash lmhash Calculates the LM hash of a given password. `string` `string` $password "" nthash nthash Calculates the NT hash of a given password. `string` `string` $password "" unsigned_shift_r unsigned_shift_r Unsigned shift operation for 32bit values. <p>PHP 4 only supports signed shifts by default.</p> $a $b
No DocBlock was found for property $perm1
No DocBlock was found for property $perm2
No DocBlock was found for property $perm3
No DocBlock was found for property $perm4
No DocBlock was found for property $perm5
No DocBlock was found for property $perm6
No DocBlock was found for property $sc
No DocBlock was found for property $sbox
Argument $i is missing from the Docblock of x()
No short description for method lshift()
No short description for method permute()
Argument $n is missing from the Docblock of permute()
No short description for method mxor()
No short description for method doHash()
Argument $a is missing from the Docblock of unsigned_shift_r()
Argument $b is missing from the Docblock of unsigned_shift_r()
Classes and functions for importing data to LDAP
<p>These classes provide differnet import formats.</p>

The phpLDAPadmin development team

phpLDAPadmin

\import.php

Importer
\Importer
Importer Class
<p>This class serves as a top level importer class, which will return the correct Import class.</p>

phpLDAPadmin

Import

$server_id $template_id $template __construct __construct $server_id $template_id types types accept accept getTemplate getTemplate
Import
\Import
Import Class
<p>This abstract classes provides all the common methods and variables for the custom import classes.</p>

phpLDAPadmin

Import

$server_id null $input null $source array() __construct __construct $server_id accept accept getSource getSource $attr LDAPimport LDAPimport
\Import
ImportLDIF
\ImportLDIF
Import entries from LDIF
<p>The LDIF spec is described by RFC2849 http://www.ietf.org/rfc/rfc2849.txt</p>

phpLDAPadmin

Import

$_currentLineNumber 0 $_currentLine '' $template $error array() getType getType getTemplate getTemplate getServer getServer readEntry readEntry getAttrValue getAttrValue Get the Attribute and Decoded Value $line nextLines nextLines Get the lines of the next entry `\The` hasMoreEntries hasMoreEntries Private method to check if there is more entries in the input. `boolean` nextLine nextLine Helper method to switch to the next line isCommentLine isCommentLine Check if it's a comment line. `boolean` isWrappedLine isWrappedLine Check if it's a wrapped line. `boolean` isBlankLine isBlankLine Check if is the current line is a blank line. `boolean` eof eof Returns true if we reached the end of the input. `boolean` error error $msg $data getAttributeValue getAttributeValue Method to retrieve the attribute value of a ldif line, and get the base 64 decoded value if it is encoded $value getAddDetails getAddDetails Build the attributes array when the change type is add. $lines getModifyDetails getModifyDetails Build the attributes array for the entry when the change type is modify $lines getModRDNAttributes getModRDNAttributes Build the attributes for the entry when the change type is modrdn $lines
No DocBlock was found for property $server_id
No DocBlock was found for property $template_id
No DocBlock was found for property $template
No DocBlock was found for method __construct()
No DocBlock was found for method types()
No DocBlock was found for method accept()
No DocBlock was found for method getTemplate()
No DocBlock was found for property $server_id
No DocBlock was found for property $input
No DocBlock was found for property $source
No DocBlock was found for method __construct()
No DocBlock was found for method accept()
No DocBlock was found for method getSource()
No DocBlock was found for method LDAPimport()
No DocBlock was found for property $_currentLineNumber
No DocBlock was found for property $_currentLine
No DocBlock was found for property $template
No DocBlock was found for property $error
No DocBlock was found for method getType()
No DocBlock was found for method getTemplate()
No DocBlock was found for method getServer()
No DocBlock was found for method readEntry()
Argument $line is missing from the Docblock of getAttrValue()
No DocBlock was found for method error()
Argument $value is missing from the Docblock of getAttributeValue()
Argument $lines is missing from the Docblock of getAddDetails()
Argument $lines is missing from the Docblock of getModifyDetails()
Argument $lines is missing from the Docblock of getModRDNAttributes()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

Attribute
\Attribute
Represents an attribute of a template.

phpLDAPadmin

Templates

$name $source $oldvalues array() $values array() $min_value_count -1 $max_value_count -1 $internal false $modified false $forcedelete false $visible false $forcehide false $readonly false $ldaptype null $type '' $unique false $display '' $icon '' $hint '' $helper array() $helpervalue array() $onchange array() $spacer false $verify false $size 0 $maxlength 0 $cols 0 $rows 0 $page 1 $order 255 $ordersort 255 $rdn false $aliases array() $autovalue array() $postvalue array() __construct __construct $name $values $server_id $source null getName getName Return the name of the attribute. `boolean` `boolean` `string` $lower true $real false getValues getValues getOldValues getOldValues getValueCount getValueCount getSource getSource autoValue autoValue Autovalue is called after the attribute is initialised, and thus the values from the ldap server will be set. $new_val initValue initValue $new_val clearValue clearValue setOldValue setOldValue $val setValue setValue $new_val addValue addValue $new_val $i -1 delValue delValue $i -1 getValue getValue $i getOldValue getOldValue $i getMinValueCount getMinValueCount setMinValueCount setMinValueCount $min getMaxValueCount getMaxValueCount setMaxValueCount setMaxValueCount $max haveMoreValues haveMoreValues justModified justModified hasBeenModified hasBeenModified isForceDelete isForceDelete setForceDelete setForceDelete isInternal isInternal setInternal setInternal isRequired isRequired isMay isMay setType setType $type getType getType setLDAPtype setLDAPtype $type getLDAPtype getLDAPtype setProperties setProperties $properties setRequired setRequired setOptional setOptional isReadOnly isReadOnly setReadOnly setReadOnly isMultiple isMultiple isVisible isVisible hide hide show show haveFriendlyName haveFriendlyName getFriendlyName getFriendlyName setDescription setDescription $description getDescription getDescription setIcon setIcon $icon getIcon getIcon getHint getHint setHint setHint $hint getMaxLength getMaxLength setMaxLength setMaxLength $maxlength getSize getSize setSize setSize $size getSpacer getSpacer getPage getPage setPage setPage $page getOnChange getOnChange getHelper getHelper getHelperValue getHelperValue getVerify getVerify setRDN setRDN $rdn isRDN isRDN Return if this attribute is an RDN attribute `boolean` setLDAPdetails setLDAPdetails Capture all the LDAP details we are interested in `\sattr` $sattr getAliases getAliases Return a list of aliases for this Attribute (as defined by the schema) This list will be lowercase. getAutoValue getAutoValue getPostValue getPostValue setPostValue setPostValue $postvalue setXML setXML $values getRemovedValues getRemovedValues Display the values removed in an attribute. getAddedValues getAddedValues Display the values removed in an attribute. real_attr_name real_attr_name Prunes off anything after the ";" in an attr name. <p>This is useful for attributes that may have ";binary" appended to their names. With real_attr_name(), you can more easily fetch these attributes' schema with their "real" attribute name.</p> `string` `string` needJS needJS Does this attribute need supporting JS $type null
No DocBlock was found for property $name
No DocBlock was found for property $source
No DocBlock was found for property $oldvalues
No DocBlock was found for property $values
No DocBlock was found for property $min_value_count
No DocBlock was found for property $max_value_count
No DocBlock was found for property $internal
No DocBlock was found for property $modified
No DocBlock was found for property $forcedelete
No DocBlock was found for property $visible
No DocBlock was found for property $forcehide
No DocBlock was found for property $readonly
No DocBlock was found for property $ldaptype
No DocBlock was found for property $type
No DocBlock was found for property $unique
No DocBlock was found for property $display
No DocBlock was found for property $icon
No DocBlock was found for property $hint
No DocBlock was found for property $helper
No DocBlock was found for property $helpervalue
No DocBlock was found for property $onchange
No DocBlock was found for property $spacer
No DocBlock was found for property $verify
No DocBlock was found for property $size
No DocBlock was found for property $maxlength
No DocBlock was found for property $cols
No DocBlock was found for property $rows
No DocBlock was found for property $page
No DocBlock was found for property $order
No DocBlock was found for property $ordersort
No DocBlock was found for property $rdn
No DocBlock was found for property $aliases
No DocBlock was found for property $autovalue
No DocBlock was found for property $postvalue
No DocBlock was found for method __construct()
No DocBlock was found for method getValues()
No DocBlock was found for method getOldValues()
No DocBlock was found for method getValueCount()
No DocBlock was found for method getSource()
Argument $new_val is missing from the Docblock of autoValue()
No DocBlock was found for method initValue()
No DocBlock was found for method clearValue()
No DocBlock was found for method setOldValue()
No DocBlock was found for method setValue()
No DocBlock was found for method addValue()
No DocBlock was found for method delValue()
No DocBlock was found for method getValue()
No DocBlock was found for method getOldValue()
No DocBlock was found for method getMinValueCount()
No DocBlock was found for method setMinValueCount()
No DocBlock was found for method getMaxValueCount()
No DocBlock was found for method setMaxValueCount()
No DocBlock was found for method haveMoreValues()
No DocBlock was found for method justModified()
No DocBlock was found for method hasBeenModified()
No DocBlock was found for method isForceDelete()
No DocBlock was found for method setForceDelete()
No DocBlock was found for method isInternal()
No DocBlock was found for method setInternal()
No DocBlock was found for method isRequired()
No DocBlock was found for method isMay()
No DocBlock was found for method setType()
No DocBlock was found for method getType()
No DocBlock was found for method setLDAPtype()
No DocBlock was found for method getLDAPtype()
No DocBlock was found for method setProperties()
No DocBlock was found for method setRequired()
No DocBlock was found for method setOptional()
No DocBlock was found for method isReadOnly()
No DocBlock was found for method setReadOnly()
No DocBlock was found for method isMultiple()
No DocBlock was found for method isVisible()
No DocBlock was found for method hide()
No DocBlock was found for method show()
No DocBlock was found for method haveFriendlyName()
No DocBlock was found for method getFriendlyName()
No DocBlock was found for method setDescription()
No DocBlock was found for method getDescription()
No DocBlock was found for method setIcon()
No DocBlock was found for method getIcon()
No DocBlock was found for method getHint()
No DocBlock was found for method setHint()
No DocBlock was found for method getMaxLength()
No DocBlock was found for method setMaxLength()
No DocBlock was found for method getSize()
No DocBlock was found for method setSize()
No DocBlock was found for method getSpacer()
No DocBlock was found for method getPage()
No DocBlock was found for method setPage()
No DocBlock was found for method getOnChange()
No DocBlock was found for method getHelper()
No DocBlock was found for method getHelperValue()
No DocBlock was found for method getVerify()
No DocBlock was found for method setRDN()
No DocBlock was found for method getAutoValue()
No DocBlock was found for method getPostValue()
No DocBlock was found for method setPostValue()
No DocBlock was found for method setXML()
Parameter $attr_name could not be found in real_attr_name()
Argument $type is missing from the Docblock of needJS()
MHASH_MD5
\MHASH_MD5
'md5'
MHASH_SHA1
\MHASH_SHA1
'sha1'
MHASH_RIPEMD160
\MHASH_RIPEMD160
'rmd160'
openssl_hash
\openssl_hash
$openssl_hash_id
$password_clear
mhash
\mhash
$hash_id
$password_clear
mhash_keygen_s2k
\mhash_keygen_s2k
$hash_id
$password_clear
$salt
$bytes
No page-level DocBlock was found in file templates/3rdParty/pla/lib/emuhash_functions.php
No DocBlock was found for function \openssl_hash()
No DocBlock was found for function \mhash()
No DocBlock was found for function \mhash_keygen_s2k()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
MultiLineAttribute
\MultiLineAttribute
Represents a attribute whose values are multiline text

phpLDAPadmin

Templates

$rows 0 $cols 0 getRows getRows setRows setRows $rows getCols getCols setCols setCols $cols
No DocBlock was found for property $rows
No DocBlock was found for property $cols
No DocBlock was found for method getRows()
No DocBlock was found for method setRows()
No DocBlock was found for method getCols()
No DocBlock was found for method setCols()
Classes and functions for the LDAP tree.

The phpLDAPadmin development team

phpLDAPadmin

Tree
\Tree
Abstract class which represents the LDAP tree view ; the draw() method must be implemented by subclasses

phpLDAPadmin

Tree

\global\HTMLTree

$server_id null $entries array() draw draw Displays the LDAP tree __construct __construct $server_id getInstance getInstance Create an instance of the tree - this is used when we call this class directly Tree::getInstance($index) `object` $server_id getServerID getServerID Get the Server ID for this tree `int` getServer getServer Get the server Object for this tree `object` getBaseEntries getBaseEntries Get the entries that are BaseDN entries. `array` indexDN indexDN This function will take the DN, convert it to lowercase and strip unnessary commas. <p>This result will be used as the index for the tree object. Any display of a DN should use the object->dn entry, not the index. The reason we need to do this is because: uid=User A,ou=People,c=AU and uid=User B, ou=PeOpLe, c=au are infact in the same branch, but PLA will show them inconsistently.</p> `\dn` `\dn` $dn getEntry getEntry Get a tree entry `\dn` `object` $dn addEntry addEntry Add an entry in the tree view ; the entry is added in the children array of its parent `\dn` `string` $dn delEntry delEntry Delete an entry from the tree view ; the entry is deleted from the children array of its parent `\dn` $dn renameEntry renameEntry Rename an entry in the tree `\dn` `\dn` $dnOLD $dnNEW readChildren readChildren Read the children of a tree entry `\dn` `boolean` $dn $nolimit false readChildrenNumber readChildrenNumber Return the number of children an entry has. <p>Optionally autoread the child entry.</p> `\dn` `boolean` $dn $nolimit false
No DocBlock was found for property $server_id
No DocBlock was found for property $entries
No DocBlock was found for method __construct()
Argument $server_id is missing from the Docblock of getInstance()
A collection of functions to handle sessions.

The phpLDAPadmin development team

phpLDAPadmin

Session

../../../../lib/security.inc
../../../../lib/config.inc
../../../../lib/ldap.inc
app_session_start
\app_session_start
The only function which should be called by a user

\global\common.php

\global\APP_SESSION_ID

Returns true if the session was started the first time

boolean
Classes and functions for the LDAP tree.

The phpLDAPadmin development team

phpLDAPadmin

TreeItem
\TreeItem
Represents an item in the tree.

phpLDAPadmin

Tree

$dn $server_id $objectclasses array() $base_entry false $children array() $icon $leaf false $open false $size_limited true $template null $childsort true $reading_children false __construct __construct $server_id $dn getDN getDN Get the DN of this tree item. `\DN` getDNEncode getDNEncode getRDN getRDN Get the RDN of this tree items DN. `\RDN` setBase setBase Set this item as a LDAP base DN item. isBaseDN isBaseDN Return if this item is a base DN item. setObjectClasses setObjectClasses $oc getObjectClasses getObjectClasses isInLDAP isInLDAP getChildren getChildren Returns null if the children have never be defined or an array of the dn of the children readingChildren readingChildren $bool isChildSorted isChildSorted Do the children require resorting childSorted childSorted Mark the children as sorted addChild addChild Add a child to this DN entry. `\DN` $dn delChild delChild Delete a child from this DN entry. `\DN` $dn rename rename Rename this DN. `\DN` $dn isOpened isOpened Return if this item has been opened. close close Mark this node as closed. open open Opens the node ; the children of the node must have been defined setLeaf setLeaf Mark this node as a leaf. isLeaf isLeaf Return if this node is a leaf. getIcon getIcon Returns the path of the icon file used to represent this node ; If the icon hasnt been set, it will call get_icon() setSizeLimited setSizeLimited Mark this node as a size limited (it wont have all its children). unsetSizeLimited unsetSizeLimited Clear the size limited flag. isSizeLimited isSizeLimited Return if this node has hit an LDAP size limit (and thus doesnt have all its children). setTemplate setTemplate $template getTemplate getTemplate
No DocBlock was found for property $dn
No DocBlock was found for property $server_id
No DocBlock was found for property $objectclasses
No DocBlock was found for property $base_entry
No DocBlock was found for property $children
No DocBlock was found for property $icon
No DocBlock was found for property $leaf
No DocBlock was found for property $open
No DocBlock was found for property $size_limited
No DocBlock was found for property $template
No DocBlock was found for property $childsort
No DocBlock was found for property $reading_children
No DocBlock was found for method __construct()
No DocBlock was found for method getDNEncode()
No DocBlock was found for method setObjectClasses()
No DocBlock was found for method getObjectClasses()
No DocBlock was found for method isInLDAP()
No DocBlock was found for method readingChildren()
No DocBlock was found for method setTemplate()
No DocBlock was found for method getTemplate()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
SelectionAttribute
\SelectionAttribute
Represents an attribute whose values are in a predefined list

phpLDAPadmin

Templates

$selection array() $multiple $default __construct __construct $name $values $server_id $source null addOption addOption $value $description addValue addValue $new_val $i -1 getOptionCount getOptionCount getSelection getSelection autoValue autoValue $value getDefault getDefault isMultiple isMultiple setMultiple setMultiple
No DocBlock was found for property $selection
No DocBlock was found for property $multiple
No DocBlock was found for property $default
No DocBlock was found for method __construct()
No DocBlock was found for method addOption()
No DocBlock was found for method addValue()
No DocBlock was found for method getOptionCount()
No DocBlock was found for method getSelection()
No DocBlock was found for method autoValue()
No DocBlock was found for method getDefault()
No DocBlock was found for method isMultiple()
No DocBlock was found for method setMultiple()
Classes and functions for the template engine.
<p>These classes and functions will read our XML template files, as well as query the LDAP server and build a template object that can be used for user input.</p>

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplates
Templates
\Templates
Templates Class
<p>This class will store all our templates.</p>

phpLDAPadmin

Templates

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
DnAttribute
\DnAttribute
Represents an attribute whose values are DNs

phpLDAPadmin

Templates

Classes and functions for the LDAP tree.

The phpLDAPadmin development team

phpLDAPadmin

\HTMLTree
AJAXTree
\AJAXTree
This class implements an AJAX based tree.

phpLDAPadmin

Tree

\global\HTMLTree

draw_item
draw_item
Draw a node of the tree

The Base DN to draw

\dn

a string of 0 and 1 ; $level == "000101" will draw " | |<node>"

string

is the first child entry, which is normally the "Create New Entry" option

boolean

is the last child entry, which is normally the "Create New Entry" option

boolean
$item
$level
$first_child
true
$last_child
true
draw_children
draw_children
Expand and draw a child entry, when it is clicked on.
<p>This is using AJAX just to render this section of the tree.</p>
$parent_entry
$code
get_indentation
get_indentation
Return the indentation before a node

a string of 0 and 1 ; $code == "000101" will return " | |"

\$code
$code
draw_javascript
draw_javascript
Draw the javascript to support the tree.
create_before_child
create_before_child
Draw the "Create New Entry" item before the children.
$entry
$level
create_after_child
create_after_child
Draw the "Create New Entry" item after the children.
$entry
$level
draw_create_new_entry
draw_create_new_entry
Draw the "Create New Entry" item.
$entry
$level
$img
listOpenItems
listOpenItems
List the items in the tree that are open

List of open nodes

array
Argument $parent_entry is missing from the Docblock of draw_children()
Argument $code is missing from the Docblock of draw_children()
Argument $entry is missing from the Docblock of create_before_child()
Argument $level is missing from the Docblock of create_before_child()
Argument $entry is missing from the Docblock of create_after_child()
Argument $level is missing from the Docblock of create_after_child()
Argument $entry is missing from the Docblock of draw_create_new_entry()
Argument $level is missing from the Docblock of draw_create_new_entry()
Argument $img is missing from the Docblock of draw_create_new_entry()
This class will render the creation or editing of an LDAP entry.

The phpLDAPadmin development team

phpLDAPadmin

\PageRender
TemplateRender
\TemplateRender
TemplateRender class

phpLDAPadmin

Templates

$pagelast accept accept Initialise and Render the TemplateRender $norender false getDefaultAttribute getDefaultAttribute $attribute $container $type getMode getMode Set the mode of the TemplateRender Applicable modes are "create" or "edit" getModeContainer getModeContainer Return the container for this mode haveDefaultTemplate haveDefaultTemplate Is the default template enabled? drawTemplateChoice drawTemplateChoice Present a list of available templates for creating and editing LDAP entries visitStart visitStart This function will setup our template object (read LDAP for current values, read $_REQUEST for new values, etc) so that it can be rendered. visitEnd visitEnd drawHeader drawHeader PAGE DRAWING METHODS * drawTitle drawTitle $title null drawSubTitle drawSubTitle $subtitle null drawMenu drawMenu PAGE ENTRY MENU * getMenuItem getMenuItem PAGE ENTRY MENU ITEMS * $i getDeleteAttributeMessage getDeleteAttributeMessage getModifiedAttributesMessage getModifiedAttributesMessage $modified_attributes getReadOnlyMessage getReadOnlyMessage getViewSchemaMessage getViewSchemaMessage getMenuItemRefresh getMenuItemRefresh PAGE ENTRY MENU ITEMS DETAILS * getMenuItemSwitchTemplate getMenuItemSwitchTemplate getMenuItemExportBase getMenuItemExportBase getMenuItemMove getMenuItemMove getMenuItemInternalAttributes getMenuItemInternalAttributes getMenuItemDelete getMenuItemDelete getMenuItemRename getMenuItemRename getMenuItemCompare getMenuItemCompare getMenuItemCreate getMenuItemCreate getMenuItemAddAttribute getMenuItemAddAttribute getMenuItemShowChildren getMenuItemShowChildren $children_count getMenuItemExportSub getMenuItemExportSub drawRDNChooser drawRDNChooser RDN Chooser drawContainerChooser drawContainerChooser Container Chooser $default_container drawObjectClassChooser drawObjectClassChooser Object Class Chooser drawInternalAttributes drawInternalAttributes INTERNAL ATTRIBUTES * drawInternalAttribute drawInternalAttribute $attribute drawFormStart drawFormStart FORM METHODS * drawForm drawForm $nosubmit false drawFormEnd drawFormEnd drawFormSubmitButton drawFormSubmitButton drawStepTitle drawStepTitle STEP FORM METHODS * $page drawStepFormStart drawStepFormStart $page drawStepForm drawStepForm $page drawStepFormEnd drawStepFormEnd drawStepFormSubmitButton drawStepFormSubmitButton $page drawStepFormDefaultAttributes drawStepFormDefaultAttributes Given our known objectClass in the template, this will render the required MAY and optional MUST attributes drawShownAttributes drawShownAttributes DRAW ATTRIBUTES * drawJavascript drawJavascript DRAW PAGE JAVACRIPT drawTemplateJavascript drawTemplateJavascript Javascript Functions drawTitleAttribute drawTitleAttribute ATTRIBUTE TITLE * $attribute drawStartValueLineAttribute drawStartValueLineAttribute ATTRIBUTE LINE * $attribute drawEndValueLineAttribute drawEndValueLineAttribute $attribute drawTemplateAttribute drawTemplateAttribute $attribute drawTemplateValuesAttribute drawTemplateValuesAttribute $attribute drawIconAttribute drawIconAttribute DRAW ICONS FOR ATTRIBUTES VALUES * $attribute $val drawDnValueIconAttribute drawDnValueIconAttribute $attribute $val drawMailValueIconAttribute drawMailValueIconAttribute $attribute $val drawUrlValueIconAttribute drawUrlValueIconAttribute $attribute $val drawJavascriptAttribute drawJavascriptAttribute javacript $attribute getFocusJavascriptAttribute getFocusJavascriptAttribute $attribute $component getBlurJavascriptAttribute getBlurJavascriptAttribute $attribute $component drawFocusJavascriptAttribute drawFocusJavascriptAttribute $attribute $component drawBlurJavascriptAttribute drawBlurJavascriptAttribute $attribute $component drawFillJavascriptAttribute drawFillJavascriptAttribute $attribute $component_id $component_value drawValidateJavascriptAttribute drawValidateJavascriptAttribute $attribute $component $silence $var_valid drawMenuAttribute drawMenuAttribute ATTRIBUTE MENU * $attribute getMenuItemAttribute getMenuItemAttribute $attribute $action getAddValueMenuItemAttribute getAddValueMenuItemAttribute $attribute getAddValueMenuItemObjectClassAttribute getAddValueMenuItemObjectClassAttribute $attribute getModifyMemberMenuItemAttribute getModifyMemberMenuItemAttribute $attribute getRenameMenuItemAttribute getRenameMenuItemAttribute $attribute drawValueAttribute drawValueAttribute values * $attribute $i drawHelperAttribute drawHelperAttribute $attribute $i drawRequiredSymbolAttribute drawRequiredSymbolAttribute $attribute drawJavascriptBinaryAttribute drawJavascriptBinaryAttribute $attribute drawJavaScriptDateAttribute drawJavaScriptDateAttribute DATE ATTRIBUTE RENDERING * $attribute drawSelectorPopupDateAttribute drawSelectorPopupDateAttribute Draws an HTML date selector button which, when clicked, pops up a date selector dialog. $attribute $i drawIconDnAttribute drawIconDnAttribute DN ATTRIBUTES * $attribute $val drawIconObjectClassAttribute drawIconObjectClassAttribute OBJECT CLASS ATTRIBUTE * $attribute $val drawJavascriptPasswordAttribute drawJavascriptPasswordAttribute PASSWORD ATTRIBUTES * $attribute drawCheckLinkPasswordAttribute drawCheckLinkPasswordAttribute $attribute $component_id drawJavascriptRandomPasswordAttribute drawJavascriptRandomPasswordAttribute This will draw the javascript that displays to the user the random password generated `` $attribute drawDefaultHelperPasswordAttribute drawDefaultHelperPasswordAttribute $attribute $i drawDefaultHelperSambaPasswordAttribute drawDefaultHelperSambaPasswordAttribute $attribute $i drawIconSelectionAttribute drawIconSelectionAttribute SELECTION ATTRIBUTE RENDERING * $attribute $val getMenuItemSelectionAttribute getMenuItemSelectionAttribute $attribute $i
No DocBlock was found for property $pagelast
Argument $norender is missing from the Docblock of accept()
No DocBlock was found for method getDefaultAttribute()
No DocBlock was found for method visitEnd()
No DocBlock was found for method drawTitle()
No DocBlock was found for method drawSubTitle()
Argument $i is missing from the Docblock of getMenuItem()
No DocBlock was found for method getDeleteAttributeMessage()
No DocBlock was found for method getModifiedAttributesMessage()
No DocBlock was found for method getReadOnlyMessage()
No DocBlock was found for method getViewSchemaMessage()
No DocBlock was found for method getMenuItemSwitchTemplate()
No DocBlock was found for method getMenuItemExportBase()
No DocBlock was found for method getMenuItemMove()
No DocBlock was found for method getMenuItemInternalAttributes()
No DocBlock was found for method getMenuItemDelete()
No DocBlock was found for method getMenuItemRename()
No DocBlock was found for method getMenuItemCompare()
No DocBlock was found for method getMenuItemCreate()
No DocBlock was found for method getMenuItemAddAttribute()
No DocBlock was found for method getMenuItemShowChildren()
No DocBlock was found for method getMenuItemExportSub()
Argument $default_container is missing from the Docblock of drawContainerChooser()
No DocBlock was found for method drawInternalAttribute()
No DocBlock was found for method drawForm()
No DocBlock was found for method drawFormEnd()
No DocBlock was found for method drawFormSubmitButton()
Argument $page is missing from the Docblock of drawStepTitle()
No DocBlock was found for method drawStepFormStart()
No DocBlock was found for method drawStepForm()
No DocBlock was found for method drawStepFormEnd()
No DocBlock was found for method drawStepFormSubmitButton()
Argument $attribute is missing from the Docblock of drawTitleAttribute()
Argument $attribute is missing from the Docblock of drawStartValueLineAttribute()
No DocBlock was found for method drawEndValueLineAttribute()
No DocBlock was found for method drawTemplateAttribute()
No DocBlock was found for method drawTemplateValuesAttribute()
Argument $attribute is missing from the Docblock of drawIconAttribute()
Argument $val is missing from the Docblock of drawIconAttribute()
No DocBlock was found for method drawDnValueIconAttribute()
No DocBlock was found for method drawMailValueIconAttribute()
No DocBlock was found for method drawUrlValueIconAttribute()
Argument $attribute is missing from the Docblock of drawJavascriptAttribute()
No DocBlock was found for method getFocusJavascriptAttribute()
No DocBlock was found for method getBlurJavascriptAttribute()
No DocBlock was found for method drawFocusJavascriptAttribute()
No DocBlock was found for method drawBlurJavascriptAttribute()
No DocBlock was found for method drawFillJavascriptAttribute()
No DocBlock was found for method drawValidateJavascriptAttribute()
Argument $attribute is missing from the Docblock of drawMenuAttribute()
No DocBlock was found for method getMenuItemAttribute()
No DocBlock was found for method getAddValueMenuItemAttribute()
No DocBlock was found for method getAddValueMenuItemObjectClassAttribute()
No DocBlock was found for method getModifyMemberMenuItemAttribute()
No DocBlock was found for method getRenameMenuItemAttribute()
Argument $attribute is missing from the Docblock of drawValueAttribute()
Argument $i is missing from the Docblock of drawValueAttribute()
No DocBlock was found for method drawHelperAttribute()
No DocBlock was found for method drawRequiredSymbolAttribute()
No DocBlock was found for method drawJavascriptBinaryAttribute()
Argument $attribute is missing from the Docblock of drawJavaScriptDateAttribute()
Argument $attribute is missing from the Docblock of drawSelectorPopupDateAttribute()
Argument $i is missing from the Docblock of drawSelectorPopupDateAttribute()
Argument $attribute is missing from the Docblock of drawIconDnAttribute()
Argument $val is missing from the Docblock of drawIconDnAttribute()
Argument $attribute is missing from the Docblock of drawIconObjectClassAttribute()
Argument $val is missing from the Docblock of drawIconObjectClassAttribute()
Argument $attribute is missing from the Docblock of drawJavascriptPasswordAttribute()
No DocBlock was found for method drawCheckLinkPasswordAttribute()
Argument $attribute is missing from the Docblock of drawJavascriptRandomPasswordAttribute()
No DocBlock was found for method drawDefaultHelperPasswordAttribute()
No DocBlock was found for method drawDefaultHelperSambaPasswordAttribute()
Argument $attribute is missing from the Docblock of drawIconSelectionAttribute()
Argument $val is missing from the Docblock of drawIconSelectionAttribute()
No DocBlock was found for method getMenuItemSelectionAttribute()
Classes and functions for communication of Data Stores

The phpLDAPadmin development team

phpLDAPadmin

\DS
myldap
\myldap
This abstract class provides the basic variables and methods for LDAP datastores

phpLDAPadmin

DataStore

$noconnect false $_schema_entries null $_schemaDN null $force_may array() __construct __construct $index connect connect Connect and Bind to the Database `string` `resource null` $method $debug false $new false login login Login to the database with the application user/password `boolean` $user null $pass null $method null $new false query query Perform a query to the Database `string` `string` `string` `boolean` `array null` $query $method $index null $debug false getErrorMessage getErrorMessage Get the last error string `string` $method null getErrorNum getErrorNum Get the last error number `string` $method null getLoginID getLoginID Get a user ID `string` $user $method null getLoginBaseDN getLoginBaseDN Return the login base DNs If no login base DNs are defined, then the LDAP server Base DNs are used. getLoginClass getLoginClass Return the login classes that a user must have to login isAnonBindAllowed isAnonBindAllowed Return if anonymous bind is allowed in the configuration isTLSEnabled isTLSEnabled Fetches whether TLS has been configured for use with a certain server. <p>Users may configure phpLDAPadmin to use TLS in config,php thus:</p> <pre><code>$servers->setValue('server','tls',true|false); </code></pre> `boolean` startTLS startTLS If TLS is configured, then start it $resource isSASLEnabled isSASLEnabled Fetches whether SASL has been configured for use with a certain server. <p>Users may configure phpLDAPadmin to use SASL in config,php thus:</p> <pre><code>$servers->setValue('server','sasl',true|false); </code></pre> `boolean` startSASL startSASL If SASL is configured, then start it To be able to use SASL, PHP should have been compliled with --with-ldap-sasl=DIR `` $resource $method isProxyEnabled isProxyEnabled Fetches whether PROXY AUTH has been configured for use with a certain server. <p>Users may configure phpLDAPadmin to use PROXY AUTH in config,php thus:</p> <pre><code>$servers->setValue('login','auth_type','proxy'); </code></pre> `boolean` startProxy startProxy If PROXY AUTH is configured, then start it $resource $method modify modify Modify attributes of a DN $dn $attrs $method null getBaseDN getBaseDN Gets the root DN of the specified LDAPServer, or null if it can't find it (ie, the server won't give it to us, or it isnt specified in the configuration file). <p>Tested with OpenLDAP 2.0, Netscape iPlanet, and Novell eDirectory 8.7 (nldap.com) Please report any and all bugs!!</p> <p>Please note: On FC systems, it seems that php_ldap uses /etc/openldap/ldap.conf in the search base if it is blank - so edit that file and comment out the BASE line.</p> `string` `array` `` $method null dnExists dnExists Gets whether an entry exists based on its DN. <p>If the entry exists, returns true. Otherwise returns false.</p> `string` `string` `boolean` $dn $method null getContainerTop getContainerTop Given a DN string, this returns the top container portion of the string. `string` `string` $dn getContainerPath getContainerPath Given a DN string and a path like syntax, this returns the parent container portion of the string. `string` `string` `string` $dn $path '..' getContainer getContainer Given a DN string, this returns the parent container portion of the string. <p>For example. given 'cn=Manager,dc=example,dc=com', this function returns 'dc=example,dc=com'.</p> `string` `string` $dn getContainerContents getContainerContents Gets a list of child entries for an entry. <p>Given a DN, this function fetches the list of DNs of child entries one level beneath the parent. For example, for the following tree:</p> <pre><code>dc=example,dc=com ou=People cn=Dave cn=Fred cn=Joe ou=More People cn=Mark cn=Bob </code></pre> <p>Calling</p> <pre><code>getContainerContents("ou=people,dc=example,dc=com")</code></pre> <p>would return the following list:</p> <pre><code>cn=Dave cn=Fred cn=Joe ou=More People </code></pre> `string` `string` `int` `string` `\constant` `array` $dn $method null $size_limit 0 $filter '(objectClass=*)' $deref LDAP_DEREF_NEVER explodeDN explodeDN Explode a DN into an array of its RDN parts. `string` `int` `array` $dn $with_attributes 0 escapeDN escapeDN Parse a DN and escape any special characters $dn unescapeDN unescapeDN Parse a DN and unescape any special characters $dn getRootDSE getRootDSE $method null getSchemaDN getSchemaDN This function will query the ldap server and request the subSchemaSubEntry which should be the Schema DN. <p>If we cant connect to the LDAP server, we'll return false. If we can connect but cant get the entry, then we'll return null.</p> `string` `\dn` `array false` $method null $dn '' getRawSchema getRawSchema Fetches the raw schema array for the subschemaSubentry of the server. <p>Note, this function has grown many hairs to accomodate more LDAP servers. It is needfully complicated as it now supports many popular LDAP servers that don't necessarily expose their schema "the right way".</p> <p>Please note: On FC systems, it seems that php_ldap uses /etc/openldap/ldap.conf in the search base if it is blank - so edit that file and comment out the BASE line.</p> `string` `string` `\dn` `array` $method $schema_to_fetch $dn '' getSchemaObjectClass getSchemaObjectClass Gets a single ObjectClass object specified by name. `string` `string` `\ObjectClass` `` `` $oclass_name $method null $dn '' getSchemaAttribute getSchemaAttribute Gets a single AttributeType object specified by name. `string` `string` `\AttributeType` `` `` $attr_name $method null $dn '' SchemaObjectClasses SchemaObjectClasses Gets an associative array of ObjectClass objects for the specified server. <p>Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object.</p> `string` `array` `` `` $method null $dn '' SchemaAttributes SchemaAttributes Gets an associative array of AttributeType objects for the specified server. <p>Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object.</p> `string` `array` $method null $dn '' MatchingRules MatchingRules Returns an array of MatchingRule objects for the specified server. <p>The key of each entry is the OID of the matching rule.</p> $method null $dn '' SchemaSyntaxes SchemaSyntaxes Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions. <p>The key of each entry is the OID of the Syntax.</p> $method null $dn '' isForceMay isForceMay This function determines if the specified attribute is contained in the force_may list as configured in config.php. `boolean` $attr_name getDNAttrValue getDNAttrValue Much like getDNAttrValues(), but only returns the values for one attribute of an object. <p>Example calls:</p> <pre><code>print_r(getDNAttrValue('cn=Bob,ou=people,dc=example,dc=com','sn')); Array ( [0] => Smith ) print_r(getDNAttrValue('cn=Bob,ou=people,dc=example,dc=com','objectClass')); Array ( [0] => top [1] => person ) </code></pre> `string` `string` `string` `\constant` `array` `` `` $dn $attr $method null $deref LDAP_DEREF_NEVER getDNAttrValues getDNAttrValues Gets the attributes/values of an entry. <p>Returns an associative array whose keys are attribute value names and whose values are arrays of values for said attribute.</p> <p>Optionally, callers may specify true for the parameter $lower_case_attr_names to force all keys in the associate array (attribute names) to be lower case.</p> <p>Example of its usage:</p> <pre><code>print_r(getDNAttrValues('cn=Bob,ou=pepole,dc=example,dc=com') Array ( [objectClass] => Array ( [0] => person [1] => top ) [cn] => Array ( [0] => Bob ) [sn] => Array ( [0] => Jones ) [dn] => Array ( [0] => cn=Bob,ou=pepole,dc=example,dc=com ) ) </code></pre> `string` `string` `\constant` `array` `` `` $dn $method null $deref LDAP_DEREF_NEVER $attrs array('*', '+') isDNAttr isDNAttr Returns true if the attribute specified is required to take as input a DN. <p>Some examples include 'distinguishedName', 'member' and 'uniqueMember'.</p> `string` `boolean` $attr_name $method null isJpegPhoto isJpegPhoto Used to determine if the specified attribute is indeed a jpegPhoto. <p>If the specified attribute is one that houses jpeg data, true is returned. Otherwise this function returns false.</p> `string` `boolean` `` $attr_name isAttrBoolean isAttrBoolean Given an attribute name and server ID number, this function returns whether the attrbiute contains boolean data. <p>This is useful for developers who wish to display the contents of a boolean attribute with a drop-down.</p> `string` `boolean` $attr_name isAttrBinary isAttrBinary Given an attribute name and server ID number, this function returns whether the attribute may contain binary data. <p>This is useful for developers who wish to display the contents of an arbitrary attribute but don't want to dump binary data on the page.</p> `string` `boolean` `` $attr_name userIsMember userIsMember This function will test if a user is a member of a group. <p>Inputs:</p> `string` `\dn` `bool` $user $group userIsAllowedLogin userIsAllowedLogin This function will determine if the user is allowed to login based on a filter $dn
No DocBlock was found for property $noconnect
No DocBlock was found for property $_schema_entries
No DocBlock was found for property $_schemaDN
No DocBlock was found for property $force_may
No DocBlock was found for method __construct()
Argument $debug is missing from the Docblock of connect()
Argument $new is missing from the Docblock of connect()
Argument $user is missing from the Docblock of login()
Argument $pass is missing from the Docblock of login()
Argument $method is missing from the Docblock of login()
Argument $new is missing from the Docblock of login()
Argument $method is missing from the Docblock of getLoginID()
Argument $resource is missing from the Docblock of startTLS()
Argument $resource is missing from the Docblock of startSASL()
Argument $method is missing from the Docblock of startSASL()
Argument $resource is missing from the Docblock of startProxy()
Argument $method is missing from the Docblock of startProxy()
Argument $dn is missing from the Docblock of modify()
Argument $attrs is missing from the Docblock of modify()
Argument $method is missing from the Docblock of modify()
Argument $dn is missing from the Docblock of escapeDN()
Argument $dn is missing from the Docblock of unescapeDN()
No DocBlock was found for method getRootDSE()
Name of argument $method does not match with the DocBlock's name $dn in getSchemaObjectClass()
Argument $dn is missing from the Docblock of getSchemaObjectClass()
Name of argument $attr_name does not match with the DocBlock's name $oclass_name in getSchemaAttribute()
Name of argument $method does not match with the DocBlock's name $dn in getSchemaAttribute()
Argument $dn is missing from the Docblock of getSchemaAttribute()
Parameter $oclass_name could not be found in getSchemaAttribute()
Name of argument $method does not match with the DocBlock's name $dn in SchemaObjectClasses()
Argument $dn is missing from the Docblock of SchemaObjectClasses()
Name of argument $method does not match with the DocBlock's name $dn in SchemaAttributes()
Argument $dn is missing from the Docblock of SchemaAttributes()
Argument $method is missing from the Docblock of MatchingRules()
Argument $dn is missing from the Docblock of MatchingRules()
Argument $method is missing from the Docblock of SchemaSyntaxes()
Argument $dn is missing from the Docblock of SchemaSyntaxes()
Argument $attr_name is missing from the Docblock of isForceMay()
Argument $attrs is missing from the Docblock of getDNAttrValues()
Argument $method is missing from the Docblock of isDNAttr()
Argument $dn is missing from the Docblock of userIsAllowedLogin()
Contains code to be executed at the top of each application page.
<p>include this file at the top of every PHP file.</p>

<p>This file will "pre-initialise" an application environment so that any PHP file will have a consistent environment with other application PHP files.</p>

<p>This code WILL NOT check that all required functions are usable/readable, etc. This process has been moved to index.php (which really is only called once when a browser hits the application for the first time).</p>

<p>The list of ADDITIONAL function files is now defined in functions.php.</p>

The phpLDAPadmin development team

phpLDAPadmin

APPCONFIG
\APPCONFIG
'plaConfig'
LIBDIR
\LIBDIR
'../lib/'
E_STRICT
\E_STRICT
2048
CSSDIR
\CSSDIR
sprintf('css/%s', $app['theme'])
IMGDIR
\IMGDIR
sprintf('images/%s', $app['theme'])
DEBUG_ENABLED
\DEBUG_ENABLED
0
stopwatch
\stopwatch
No DocBlock was found for function \stopwatch()
This class will render the editing of multiple LDAP entries.

The phpLDAPadmin development team

phpLDAPadmin

\TemplateRender
MassRender
\MassRender
TemplateRender class

phpLDAPadmin

Templates

drawMassFormReadWriteValueAttribute
drawMassFormReadWriteValueAttribute
$attribute
$i
$j
drawMassFormReadWriteValueBinaryAttribute
drawMassFormReadWriteValueBinaryAttribute
$attribute
$i
$j
drawMassFormReadWriteValueJpegAttribute
drawMassFormReadWriteValueJpegAttribute
$attribute
$i
$j
No DocBlock was found for method drawMassFormReadWriteValueAttribute()
No DocBlock was found for method drawMassFormReadWriteValueBinaryAttribute()
No DocBlock was found for method drawMassFormReadWriteValueJpegAttribute()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
GidAttribute
\GidAttribute
Represents a 'gidNumber' attribute

phpLDAPadmin

Templates

The phpLDAPadmin development team

phpLDAPadmin

\Visitor
PageRender
\PageRender
PageRender class

phpLDAPadmin

Templates

$template_id $template null $dn $container $page __construct __construct $server_id $template_id visitAttribute visitAttribute Dummy method. <p>..</p> getTemplates getTemplates Get our templates applicable for this object getTemplate getTemplate getTemplateID getTemplateID accept accept Initialise the PageRender drawTitle drawTitle $title 'Title' drawSubTitle drawSubTitle $subtitle null setDN setDN $dn setContainer setContainer $dn getMode getMode May be overloaded in other classes getModeContainer getModeContainer getPostAttribute getPostAttribute Process our <post> arguments from the templates $attribute $i getTemplateChoice getTemplateChoice This function is invoked if we dont know which template we should be using. `string` drawNameAttribute drawNameAttribute DRAW ATTRIBUTE NAME * $attribute drawNotesAttribute drawNotesAttribute ATTRIBUTE NOTES $attribute getNoteAliasAttribute getNoteAliasAttribute $attribute getNoteRequiredAttribute getNoteRequiredAttribute $attribute getNoteRDNAttribute getNoteRDNAttribute $attribute getNoteHintAttribute getNoteHintAttribute $attribute getNoteROAttribute getNoteROAttribute $attribute drawHiddenAttributes drawHiddenAttributes Draw all hidden attributes drawHiddenValueAttribute drawHiddenValueAttribute Draw specific hidden attribute $attribute $i drawOldValuesAttribute drawOldValuesAttribute DRAW DISPLAYED OLD VALUES * $attribute drawOldValueAttribute drawOldValueAttribute $attribute $i drawCurrentValuesAttribute drawCurrentValuesAttribute DRAW DISPLAYED CURRENT VALUES * $attribute drawCurrentValueAttribute drawCurrentValueAttribute Draw the current specific value of an attribute $attribute $i drawFormValueAttribute drawFormValueAttribute Draw a input value for an attribute - used in a form. $attribute $i drawFormReadOnlyValueAttribute drawFormReadOnlyValueAttribute $attribute $i drawFormReadWriteValueAttribute drawFormReadWriteValueAttribute $attribute $i drawHiddenValueBinaryAttribute drawHiddenValueBinaryAttribute Draw specific hidden binary attribute $attribute $i drawOldValueBinaryAttribute drawOldValueBinaryAttribute $attribute $i drawCurrentValueBinaryAttribute drawCurrentValueBinaryAttribute $attribute $i drawFormReadOnlyValueBinaryAttribute drawFormReadOnlyValueBinaryAttribute $attribute $i drawFormReadWriteValueBinaryAttribute drawFormReadWriteValueBinaryAttribute $attribute $i drawFormReadWriteValueDateAttribute drawFormReadWriteValueDateAttribute $attribute $i drawFormReadWriteValueDnAttribute drawFormReadWriteValueDnAttribute $attribute $i drawFormReadWriteValueGidAttribute drawFormReadWriteValueGidAttribute $attribute $i drawOldValueJpegAttribute drawOldValueJpegAttribute Draw a Jpeg Attribute $attribute $i drawCurrentValueJpegAttribute drawCurrentValueJpegAttribute Draw a Jpeg Attribute $attribute $i drawFormReadOnlyValueJpegAttribute drawFormReadOnlyValueJpegAttribute $attribute $i drawFormReadOnlyValueMultiLineAttribute drawFormReadOnlyValueMultiLineAttribute $attribute $i drawFormReadWriteValueMultiLineAttribute drawFormReadWriteValueMultiLineAttribute $attribute $i drawFormValueObjectClassAttribute drawFormValueObjectClassAttribute $attribute $i getAutoPostPasswordAttribute getAutoPostPasswordAttribute $attribute $i drawOldValuePasswordAttribute drawOldValuePasswordAttribute $attribute $i drawCurrentValuePasswordAttribute drawCurrentValuePasswordAttribute $attribute $i drawFormReadOnlyValuePasswordAttribute drawFormReadOnlyValuePasswordAttribute $attribute $i drawFormReadWriteValuePasswordAttribute drawFormReadWriteValuePasswordAttribute $attribute $i drawFormReadWriteValueSelectionAttribute drawFormReadWriteValueSelectionAttribute $attribute $i shadow_date shadow_date Takes a shadow* attribute and returns the date as an integer. `array` `string` $attribute drawShadowDateShadowAttribute drawShadowDateShadowAttribute $attribute drawFormReadOnlyValueShadowAttribute drawFormReadOnlyValueShadowAttribute $attribute $i drawFormReadWriteValueShadowAttribute drawFormReadWriteValueShadowAttribute $attribute $i
No short description for file templates/3rdParty/pla/lib/PageRender.php
No DocBlock was found for property $template_id
No DocBlock was found for property $template
No DocBlock was found for property $dn
No DocBlock was found for property $container
No DocBlock was found for property $page
No DocBlock was found for method __construct()
No DocBlock was found for method getTemplate()
No DocBlock was found for method getTemplateID()
No DocBlock was found for method drawTitle()
No DocBlock was found for method drawSubTitle()
No DocBlock was found for method setDN()
No DocBlock was found for method setContainer()
No DocBlock was found for method getModeContainer()
Argument $attribute is missing from the Docblock of getPostAttribute()
Argument $i is missing from the Docblock of getPostAttribute()
Argument $attribute is missing from the Docblock of drawNameAttribute()
Argument $attribute is missing from the Docblock of drawNotesAttribute()
No DocBlock was found for method getNoteAliasAttribute()
No DocBlock was found for method getNoteRequiredAttribute()
No DocBlock was found for method getNoteRDNAttribute()
No DocBlock was found for method getNoteHintAttribute()
No DocBlock was found for method getNoteROAttribute()
Argument $attribute is missing from the Docblock of drawHiddenValueAttribute()
Argument $i is missing from the Docblock of drawHiddenValueAttribute()
Argument $attribute is missing from the Docblock of drawOldValuesAttribute()
No DocBlock was found for method drawOldValueAttribute()
Argument $attribute is missing from the Docblock of drawCurrentValuesAttribute()
Argument $attribute is missing from the Docblock of drawCurrentValueAttribute()
Argument $i is missing from the Docblock of drawCurrentValueAttribute()
Argument $attribute is missing from the Docblock of drawFormValueAttribute()
Argument $i is missing from the Docblock of drawFormValueAttribute()
No DocBlock was found for method drawFormReadOnlyValueAttribute()
No DocBlock was found for method drawFormReadWriteValueAttribute()
Argument $attribute is missing from the Docblock of drawHiddenValueBinaryAttribute()
Argument $i is missing from the Docblock of drawHiddenValueBinaryAttribute()
No DocBlock was found for method drawOldValueBinaryAttribute()
No DocBlock was found for method drawCurrentValueBinaryAttribute()
No DocBlock was found for method drawFormReadOnlyValueBinaryAttribute()
No DocBlock was found for method drawFormReadWriteValueBinaryAttribute()
No DocBlock was found for method drawFormReadWriteValueDateAttribute()
No DocBlock was found for method drawFormReadWriteValueDnAttribute()
No DocBlock was found for method drawFormReadWriteValueGidAttribute()
Argument $attribute is missing from the Docblock of drawOldValueJpegAttribute()
Argument $i is missing from the Docblock of drawOldValueJpegAttribute()
Argument $attribute is missing from the Docblock of drawCurrentValueJpegAttribute()
Argument $i is missing from the Docblock of drawCurrentValueJpegAttribute()
No DocBlock was found for method drawFormReadOnlyValueJpegAttribute()
No DocBlock was found for method drawFormReadOnlyValueMultiLineAttribute()
No DocBlock was found for method drawFormReadWriteValueMultiLineAttribute()
No DocBlock was found for method drawFormValueObjectClassAttribute()
No DocBlock was found for method getAutoPostPasswordAttribute()
No DocBlock was found for method drawOldValuePasswordAttribute()
No DocBlock was found for method drawCurrentValuePasswordAttribute()
No DocBlock was found for method drawFormReadOnlyValuePasswordAttribute()
No DocBlock was found for method drawFormReadWriteValuePasswordAttribute()
No DocBlock was found for method drawFormReadWriteValueSelectionAttribute()
Parameter could not be found in shadow_date()
No DocBlock was found for method drawShadowDateShadowAttribute()
No DocBlock was found for method drawFormReadOnlyValueShadowAttribute()
No DocBlock was found for method drawFormReadWriteValueShadowAttribute()
Classes and functions for export data from LDAP
<p>These classes provide differnet export formats.</p>

The phpLDAPadmin development team

phpLDAPadmin

\export.php

Exporter
\Exporter
Exporter Class
<p>This class serves as a top level exporter class, which will return the correct Export class.</p>

phpLDAPadmin

Export

$server_id $template_id $template __construct __construct $server_id $template_id types types accept accept getTemplate getTemplate
Export
\Export
Export Class
<p>This abstract classes provides all the common methods and variables for the custom export classes.</p>

phpLDAPadmin

Export

$br $compress $results $resultsdata $items 0 getServer getServer Return this LDAP Server object `object` getServerID getServerID Return the LDAP server ID `int` accept accept isCompressed isCompressed getHeader getHeader isSafeAscii isSafeAscii Helper method to check if the attribute value should be base 64 encoded. `\The` `boolean` $str
\Export
ExportCSV
\ExportCSV
Export entries to CSV

phpLDAPadmin

Export

$separator ',' $qualifier '"' $multivalue_separator ' | ' $escapeCode '"' getType getType export export LdapEscape LdapEscape Function to escape data, where the qualifier happens to also be in the data. $var
\Export
ExportDSML
\ExportDSML
Export entries to DSML v.1

phpLDAPadmin

Export

getType
getType
export
export
Export entries to DSML format
\Export
ExportLDIF
\ExportLDIF
Export from LDAP using an LDIF format

phpLDAPadmin

Export

$line_length 76 getType getType export export Export entries to LDIF format multiLineDisplay multiLineDisplay Helper method to wrap ldif lines `\The` $str
\Export
ExportVCARD
\ExportVCARD
Export entries to VCARD v2.1

phpLDAPadmin

Export

$mapping array('cn' => 'FN', 'title' => 'TITLE', 'homephone' => 'TEL;HOME', 'mobile' => 'TEL;CELL', 'mail' => 'EMAIL;Internet', 'labeleduri' => 'URL', 'o' => 'ORG', 'audio' => 'SOUND', 'facsmiletelephoneNumber' => 'TEL;WORK;HOME;VOICE;FAX', 'jpegphoto' => 'PHOTO;ENCODING=BASE64', 'businesscategory' => 'ROLE', 'description' => 'NOTE') $deliveryAddress array('postofficebox', 'street', 'l', 'st', 'postalcode', 'c') getType getType export export Export entries to VCARD format
No DocBlock was found for property $server_id
No DocBlock was found for property $template_id
No DocBlock was found for property $template
No DocBlock was found for method __construct()
No DocBlock was found for method types()
No DocBlock was found for method accept()
No DocBlock was found for method getTemplate()
No DocBlock was found for property $br
No DocBlock was found for property $compress
No DocBlock was found for property $results
No DocBlock was found for property $resultsdata
No DocBlock was found for property $items
No DocBlock was found for method accept()
No DocBlock was found for method isCompressed()
No DocBlock was found for method getHeader()
No DocBlock was found for property $separator
No DocBlock was found for property $qualifier
No DocBlock was found for property $multivalue_separator
No DocBlock was found for property $escapeCode
No DocBlock was found for method getType()
No DocBlock was found for method export()
Argument $var is missing from the Docblock of LdapEscape()
No DocBlock was found for method getType()
No DocBlock was found for property $line_length
No DocBlock was found for method getType()
No DocBlock was found for property $mapping
No DocBlock was found for property $deliveryAddress
No DocBlock was found for method getType()
Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\PasswordAttribute
SambaPasswordAttribute
\SambaPasswordAttribute
Represents an attribute whose values are SAMBA passwords

phpLDAPadmin

Templates

Classes and functions for the LDAP tree.

The phpLDAPadmin development team

phpLDAPadmin

\Tree
HTMLTree
\HTMLTree
This class implements a straight HTML tree - no AJAX rendering is used.

phpLDAPadmin

Tree

\global\AJAXTree

$javascript '' draw draw Displays the tree in HTML `boolean` $onlytree false draw_server_name draw_server_name Draw the server name draw_menu draw_menu Draw the tree menu options get_menu_item get_menu_item Get the HTML for each tree menu option $item get_logout_menu_item get_logout_menu_item draw_logged_in_user draw_logged_in_user Draw the Logged in User draw_item draw_item Recursively descend on the given dn and draw the tree in html `\dn` `int` $item $level get_formatted_dn get_formatted_dn $entry $level draw_create_link draw_create_link Print the HTML to show the "create new entry here". `\dn` `int` `\dn` $rdn $level $encoded_dn draw_login_link draw_login_link Draw login link draw_javascript draw_javascript If there is javascript, draw it getDepth getDepth Work out how deep the "opened" tree is.
No DocBlock was found for property $javascript
Argument $item is missing from the Docblock of get_menu_item()
No DocBlock was found for method get_logout_menu_item()
Name of argument $item does not match with the DocBlock's name $dn in draw_item()
Parameter $dn could not be found in draw_item()
No DocBlock was found for method get_formatted_dn()
../lib/common.php
No page-level DocBlock was found in file templates/3rdParty/pla/tools/unserialize.php
No page-level DocBlock was found in file templates/3rdParty/pla/config/config.php
Updates or deletes a value from a specified attribute for a specified dn.

phpLDAPadmin

Page

\update_confirm.php

./common.php
Query render engine.

phpLDAPadmin

Page

The phpLDAPadmin development team

./common.php
Displays a form to allow the user to modify group members.

phpLDAPadmin

Page

./common.php
Compares two DN entries side by side.

phpLDAPadmin

Page

./common.php
Displays a form to allow the user to enter a new value to add to the existing list of values for a multi-valued attribute.

phpLDAPadmin

Page

./common.php
Compares two DN entries side by side.
<p>This is the entry form to determine which DN to compare this DN with.</p>

phpLDAPadmin

Page

./common.php
Check the password used by an entry.

phpLDAPadmin

Page

./common.php
This page will allow the adding of additional ObjectClasses to an item.
<ul> <li>If the ObjectClass to be added requires additional MUST attributes to be defined, then they will be prompted for.</li> <li>If the ObjectClass doesnt need any additional MUST attributes, then it will be silently added to the object.</li> </ul>

phpLDAPadmin

Page

./common.php
Main command page for phpLDAPadmin This script will handle bulk updates.

phpLDAPadmin

Page

./common.php
Template render engine.

phpLDAPadmin

Page

The phpLDAPadmin development team

./common.php
The template engine has the following responsibilities: If we are passed a DN, then we are editing an existing entry If we are not passed a DN, then we are passed a container (and creating a new entry in that container)
<p>In both cases, we are optionally passed a template ID. If we have a template ID, then we'll render the creation/editing using that template If we are not passed a template ID, then we'll either: Present a list of available templates, Present the default template, because there are non available (due to hidden,regexp or non-existant) Present the only template, if there is only one.</p>

<p>Creating and editing entries use two objects: A template object which describes how the template should be rendered (and what values should asked for, etc) A page object, which is responsible for actually sending out the HTML to the browser.</p>

<p>So: we init a new TemplateRender object we init a new Template object set the DN or container on the template object If setting the DN, this in turn should read the "old values" from the LDAP server If we are not on the first page (ie: 2nd, 3rd, 4th step, etc), we should accept the post values that we have obtained thus far</p>

<p>Finally submit the update to "update_confirm", or the create to "create", when complete.</p>
Takes the results of clicking "Save" in template_engine.php and determines which attributes need to be updated (ie, which ones actually changed).
<p>Then, we present a confirmation table to the user outlining the changes they are about to make. That form submits directly to update.php, which makes the change.</p>

phpLDAPadmin

Page

\update.php

./common.php
getMustAttrs
\getMustAttrs
$oclasses
No DocBlock was found for function \getMustAttrs()
Creates a new object in LDAP.

phpLDAPadmin

Page

./common.php
Copies a given object to create a new one.

phpLDAPadmin

Page

./common.php
Deletes an attribute from an entry with NO confirmation.

phpLDAPadmin

Page

./common.php
This script deletes the session variable 'tree', which will result in re-querying the LDAP server to grab the contents of all LDAP entries starting from the base.

phpLDAPadmin

Page

./common.php
Download a binary value attribute to the user.
<p>A server ID, DN and Attribute must be provided in the GET attributes. Optionally an index, type and filename can be supplied.</p>

phpLDAPadmin

Page

./common.php
This script will display the contents of the jpegPhoto attribute to the browser.
<p>A server ID and DN must be provided in the GET attributes. Optionally an attr name, index, type and filename can be supplied.</p>

phpLDAPadmin

Page

./common.php
Imports an LDIF file to the specified LDAP server.

phpLDAPadmin

Page

./common.php
display_pla_parse_error
\display_pla_parse_error
$request
No DocBlock was found for function \display_pla_parse_error()
Copies a given object to create a new one.

phpLDAPadmin

Page

./common.php
r_copy_dn
\r_copy_dn
$serverSRC
$serverDST
$snapshottree
$dnSRC
$dnDST
$remove
copy_dn
\copy_dn
$serverSRC
$serverDST
$dnSRC
$dnDST
$remove
build_tree
\build_tree
$server
$dn
$buildtree
No DocBlock was found for function \r_copy_dn()
No DocBlock was found for function \copy_dn()
No DocBlock was found for function \build_tree()
Displays a form for adding an attribute/value to an LDAP entry.

phpLDAPadmin

Page

./common.php
Displays a last chance confirmation form to delete a DN.

phpLDAPadmin

Page

./common.php
phpLDAPadmin Start Page

phpLDAPadmin

Page

./cmd.php
APPCONFIG
\APPCONFIG
'plaConfig'
We will perform some sanity checking here, since this file is normally loaded first when users first access the application.
LIBDIR
\LIBDIR
sprintf('%s/', realpath('../lib/'))
Displays a form for renaming an LDAP entry.

phpLDAPadmin

Page

./common.php
Displays a form to allow the user to upload and import an LDIF file.

phpLDAPadmin

Page

./common.php
Main command page for phpLDAPadmin Enable mass editing of Attribute values from a list of DNs.

phpLDAPadmin

Page

./common.php
This script alters the session variable 'tree', collapsing it at the dn specified in the query string.
<p>Note: this script is equal and opposite to expand.php</p>

phpLDAPadmin

Tree

\expand.php

./common.php
This script alters the session variable 'tree', expanding it at the dn specified in the query string.
<p>Note: this script is equal and opposite to collapse.php</p>

phpLDAPadmin

Tree

\collapse.php

./common.php
Draw a portion of the LDAP tree.

phpLDAPadmin

Tree

Deletes a DN and presents a "job's done" message.

phpLDAPadmin

Page

./common.php
Creates a new object in LDAP.

phpLDAPadmin

Page

./common.php
Performs the export of data from the LDAP server

phpLDAPadmin

Page

./common.php
Renames a DN to a different name.

phpLDAPadmin

Page

./common.php
Recursively deletes the specified DN and all of its children

phpLDAPadmin

Page

./common.php
pla_rdelete
\pla_rdelete
$server
$dn
No DocBlock was found for function \pla_rdelete()
Displays a last chance confirmation form to delete a DN.

phpLDAPadmin

Page

./common.php
This script provides a convienent method to call the proper common.php

phpLDAPadmin

LIBDIR
\LIBDIR
sprintf('%s/', realpath('../lib/'))
Display a selection (popup window) to pick a DN.

phpLDAPadmin

Page

./common.php
Export entries from the LDAP server.

phpLDAPadmin

Page

./common.php
get_line_end_format
\get_line_end_format
Helper function for fetching the line end format.

'win', 'unix', or 'mac' based on the user's browser..

String
get_user_agent_string
\get_user_agent_string
Gets the USER_AGENT string from the $_SERVER array, all in lower case in an E_NOTICE safe manner.

The user agent string as reported by the browser.

string false
is_browser
\is_browser
Determine the OS for the browser
$type
Argument $type is missing from the Docblock of \is_browser()
Main command page for phpLDAPadmin All pages are rendered through this script.

phpLDAPadmin

Page

./common.php

phpLDAPadmin

No short description for file templates/3rdParty/pla/index.php
User is logged off from LDAP server, session is destroyed.

main

Roland Gruber

../lib/security.inc
security functions
../lib/status.inc
Used to display status messages
../lib/ldap.inc
LDAP settings are deleted at logout
Creates main suffixes if they are missing.

Roland Gruber

main

../lib/security.inc
security functions
../lib/config.inc
access to configuration settings
../lib/ldap.inc
LDAP access
../lib/status.inc
status messages
main_header.php
main_footer.php
main_footer.php
main_footer.php
main_header.php
main_footer.php
Creates the accounts by parsing the uploaded file.

Roland Gruber

tools

../lib/security.inc
security functions
../lib/config.inc
access to configuration
../lib/status.inc
status messages
../lib/modules.inc
account modules
main_header.php
main_footer.php
massPrintBackButton
\massPrintBackButton
Prints a back button to the page where the user enters a file to upload.

account type (e.g. user)

String

selected modules for upload

array

table container

\htmlTable
$scope
$selectedModules
$container
LDAP Account Manager help page.

Michael Duergner

Roland Gruber

Help

../lib/ldap.inc
LDAP connection
../lib/config.inc
configuration
../lib/status.inc
status messages
../help/help.inc
help data
../lib/modules.inc
echoHTMLHead
\echoHTMLHead
Print HTML header of the help page.
echoHTMLFoot
\echoHTMLFoot
Print HTML footer of the help page.
displayHelp
\displayHelp
Print help site for a specific help number.

The help entry that is to be displayed.

array

The help variables that are used to replace the spacer in the help text.

array
$helpEntry
$helpVariables
todo
fixme