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

<p>account type</p>

string

<p>server profile name</p>

string

profile names

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

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

string

<p>account type</p>

string

hash array (attribute =&gt; value)

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

<p>hash array (attribute => value)</p>

array

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

string

<p>account type</p>

string

true, if saving succeeded

boolean
$attributes
array
$profile
string
$scope
string
delAccountProfile
\delAccountProfile()
Deletes an account profile

<p>name of profile (Without .<scope> extension)</p>

string

<p>account type</p>

string

true if profile was deleted

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

<p>account profile names</p>

array

<p>account scope</p>

String

<p>destinations</p>

array

operation succeeded

boolean
$accountProfiles
array
$scope
String
$dests
array()
array

ldap.inc provides basic functions to connect to the OpenLDAP server.

LDAP

Roland Gruber

convertHex2bin
\convertHex2bin()
Converts a HEX string to a binary value

<p>HEX string</p>

string

result binary

\binary
$value
string
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 __construct \Ldap::__construct() Creates a new LDAP object. `object` $config object connect \Ldap::connect() Connects to the server using the given username and password `string` `string` `boolean` `mixed` $user string $passwd string $allowAnonymous false boolean close \Ldap::close() Closes connection to server server \Ldap::server() Returns the LDAP connection handle `object` __sleep \Ldap::__sleep() Closes connection to LDAP server before serialization __wakeup \Ldap::__wakeup() Reconnects to LDAP server when deserialized encrypt \Ldap::encrypt() Encrypts a string `string` `string` `object` $data string $prefix '' string decrypt \Ldap::decrypt() Decrypts a string `object` `string` `string` $data object $prefix '' string encrypt_login \Ldap::encrypt_login() Encrypts username and password `string` `string` $username string $password string decrypt_login \Ldap::decrypt_login() Decrypts username and password `array` destroy \Ldap::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
\toolServerInformation::getName()
Returns the name of the tool.

name

string
getDescription
\toolServerInformation::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolServerInformation::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolServerInformation::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolServerInformation::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolServerInformation::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolServerInformation::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolServerInformation::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
\toolFileUpload::getName()
Returns the name of the tool.

name

string
getDescription
\toolFileUpload::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolFileUpload::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolFileUpload::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolFileUpload::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolFileUpload::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolFileUpload::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolFileUpload::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
\toolPDFEditor::getName()
Returns the name of the tool.

name

string
getDescription
\toolPDFEditor::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolPDFEditor::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolPDFEditor::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolPDFEditor::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolPDFEditor::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolPDFEditor::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolPDFEditor::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
\toolOUEditor::getName()
Returns the name of the tool.

name

string
getDescription
\toolOUEditor::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolOUEditor::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolOUEditor::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolOUEditor::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolOUEditor::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolOUEditor::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolOUEditor::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
\toolProfileEditor::getName()
Returns the name of the tool.

name

string
getDescription
\toolProfileEditor::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolProfileEditor::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolProfileEditor::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolProfileEditor::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolProfileEditor::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolProfileEditor::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolProfileEditor::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
\toolTests::getName()
Returns the name of the tool.

name

string
getDescription
\toolTests::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolTests::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolTests::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolTests::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolTests::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolTests::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolTests::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
\toolSchemaBrowser::getName()
Returns the name of the tool.

name

string
getDescription
\toolSchemaBrowser::getDescription()
returns a description text for the tool.

description

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

link

string
getRequiresWriteAccess
\toolSchemaBrowser::getRequiresWriteAccess()
Returns if the tool requires write access to LDAP.

true if write access is needed

boolean
getRequiresPasswordChangeRights
\toolSchemaBrowser::getRequiresPasswordChangeRights()
Returns if the tool requires password change rights.

true if password change rights are needed

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

image URL

string
getPosition
\toolSchemaBrowser::getPosition()
Returns the prefered position of this tool on the tools page.
The position may be between 0 and 1000. 0 is the top position.

prefered position

int
getSubTools
\toolSchemaBrowser::getSubTools()
Returns a list of sub tools or an empty array.

list of subtools (LAMTool)

array
isVisible
\toolSchemaBrowser::isVisible()
Returns if the tool is visible in the menu.

visible

boolean
isHideable
\toolSchemaBrowser::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
\asteriskExt::__construct()
Constructs a new domain type object.
getAlias
\asteriskExt::getAlias()
Returns the alias name of this account type.

alias name

string
getDescription
\asteriskExt::getDescription()
Returns the description of this account type.

description

string
getListClassName
\asteriskExt::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\asteriskExt::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\asteriskExt::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\asteriskExt::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Pozdnyak Pavel

__construct
\lamAsteriskExtList::__construct()
Constructor

<p>account type</p>

string

list object

\lamList
$type
string
listGetParams
\lamAsteriskExtList::listGetParams()
Forces the list view to show only specific attributes.
listRefreshData
\lamAsteriskExtList::listRefreshData()
Groups the extensions.
(non-PHPdoc)
normalizeLdapOutput
\lamAsteriskExtList::normalizeLdapOutput()
Groups the extensions.

<p>extension entries</p>

array
$entries
array

The account type for mail aliases.

types

Roland Gruber

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

types

__construct
\mailAlias::__construct()
Constructs a new alias type object.
getAlias
\mailAlias::getAlias()
Returns the alias name of this account type.

alias name

string
getDescription
\mailAlias::getDescription()
Returns the description of this account type.

description

string
getListClassName
\mailAlias::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\mailAlias::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\mailAlias::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\mailAlias::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Roland Gruber

__construct
\lamMailAliasList::__construct()
Constructor

<p>account type</p>

string

list object

\lamList
$type
string

The account type for host accounts (e.g. Samba).

types

Roland Gruber

\baseType
host
\host
The account type for host accounts (e.g. Samba).

types

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

alias name

string
getDescription
\host::getDescription()
Returns the description of this account type.

description

string
getListClassName
\host::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\host::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\host::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\host::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

String
$container
\accountContainer
getTitleBarSubtitle
\host::getTitleBarSubtitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Roland Gruber

__construct
\lamHostList::__construct()
Constructor

<p>account type</p>

string

list object

\lamList
$type
string

The account type for Samba domains.

types

Roland Gruber

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

types

__construct
\smbDomain::__construct()
Constructs a new domain type object.
getAlias
\smbDomain::getAlias()
Returns the alias name of this account type.

alias name

string
getDescription
\smbDomain::getDescription()
Returns the description of this account type.

description

string
getListClassName
\smbDomain::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\smbDomain::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\smbDomain::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\smbDomain::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

String
$container
\accountContainer
getTitleBarSubtitle
\smbDomain::getTitleBarSubtitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Roland Gruber

__construct
\lamSmbDomainList::__construct()
Constructor

<p>account type</p>

string

list object

\lamList
$type
string

The account type for group accounts (e.g. Unix and Samba).

types

Roland Gruber

Ludek Finstrle

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

types

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

alias name

string
getDescription
\group::getDescription()
Returns the description of this account type.

description

string
getListClassName
\group::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\group::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\group::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\group::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

String
$container
\accountContainer
getTitleBarSubtitle
\group::getTitleBarSubtitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Roland Gruber

TRANS_PRIMARY_OPTION_NAME
\lamGroupList::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 \lamGroupList::__construct() Constructor `string` `\lamList` $type string listGetParams \lamGroupList::listGetParams() Sets some internal parameters. listPrintTableCellContent \lamGroupList::listPrintTableCellContent() Prints the content of a cell in the account list for a given LDAP entry and attribute. `array` `string` $entry array $attribute string listRefreshData \lamGroupList::listRefreshData() Rereads the entries from LDAP. groupRefreshPrimary \lamGroupList::groupRefreshPrimary() Refreshes the primary group members list. listGetAllConfigOptions \lamGroupList::listGetAllConfigOptions() Returns a list of possible configuration options. `array` listConfigurationChanged \lamGroupList::listConfigurationChanged() Called when the configuration options changed.

The account type for user accounts (e.g. Unix, Samba and Kolab).

types

Roland Gruber

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

types

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

alias name

string
getDescription
\user::getDescription()
Returns the description of this account type.

description

string
getListClassName
\user::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\user::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\user::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\user::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

String
$container
\accountContainer
getTitleBarSubtitle
\user::getTitleBarSubtitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

<p>account container</p>

\accountContainer

HTML code for icon

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

<p>Unix part is active</p>

boolean

<p>Unix part is locked</p>

boolean

<p>Samba part is active</p>

boolean

<p>Samba part is locked</p>

boolean

<p>PPolicy part is active</p>

boolean

<p>PPolicy part is locked</p>

boolean

<p>Windows part is active</p>

boolean

<p>Windows part is locked</p>

boolean
$unixAvailable
boolean
$unixLocked
boolean
$sambaAvailable
boolean
$sambaLocked
boolean
$ppolicyAvailable
boolean
$ppolicyLocked
boolean
$windowsAvailable
boolean
$windowsLocked
boolean
runEditPagePostAction
\user::runEditPagePostAction()
This function is called after the edit page is processed and before the page content is generated.
This can be used to run custom handlers after each page processing.

<p>account container</p>

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

lists

Roland Gruber

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

The account type for DHCP

types

Thomas Manninger

\baseType
dhcp
\dhcp
The account type for DHCP

types

__construct
\dhcp::__construct()
Constructs a new DHCP type object.
getAlias
\dhcp::getAlias()
Returns the alias name of this account type.

alias name

string
getDescription
\dhcp::getDescription()
Returns the description of this account type.

description

string
getListClassName
\dhcp::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\dhcp::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\dhcp::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\dhcp::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

String
$container
\accountContainer
getTitleBarSubtitle
\dhcp::getTitleBarSubtitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Thomas Manninger

__construct
\lamDHCPList::__construct()
Constructor

<p>account type</p>

string

list object

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

<p>LDAP attributes</p>

array

<p>attribute name</p>

string
$entry
array
$attribute
string
addExtraInputElementsToTopArea
\lamDHCPList::addExtraInputElementsToTopArea()
Add DCP main settings button.

<p>left part</p>

\htmlGroup

<p>right part</p>

\htmlGroup
$left
\htmlGroup
$right
\htmlGroup
listDoPost
\lamDHCPList::listDoPost()
Manages all POST actions (e.g. button pressed) for the account lists.

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
\netgroup::__construct()
Constructs a new group type object.
getAlias
\netgroup::getAlias()
Returns the alias name of this account type.

alias name

string
getDescription
\netgroup::getDescription()
Returns the description of this account type.

description

string
getListClassName
\netgroup::getListClassName()
Returns the class name for the list object.

class name

string
getDefaultListAttributes
\netgroup::getDefaultListAttributes()
Returns the default attribute list for this account type.

attribute list

string
getListAttributeDescriptions
\netgroup::getListAttributeDescriptions()
Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

list of descriptions

array
getTitleBarTitle
\netgroup::getTitleBarTitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

String
$container
\accountContainer
getTitleBarSubtitle
\netgroup::getTitleBarSubtitle()
Returns the the title text for the title bar on the new/edit page.

<p>account container</p>

\accountContainer

title text

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

lists

Roland Gruber

__construct
\lamNetgroupList::__construct()
Constructor

<p>account type</p>

string

list object

\lamList
$type
string

This provides several helper function for the account modules.

Tilo Lutz

Roland Gruber

lib

array_delete
\array_delete()
This function will return all values from $array without values of $values.

<p>list of values which should be removed</p>

array

<p>list of original values</p>

array

list of remaining values

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

<p>search string</p>

String

<p>array</p>

array
$needle
String
$haystack
array
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.

<p>is an array of Samba flags (e.g. X or D)</p>

array

Samba flag string

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

<p>password original password</p>

string

password hash

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

<p>password original password</p>

string

password hash

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

<p>the password string</p>

string

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

boolean

<p>password hash type (CRYPT, CRYPT-SHA512, SHA, SSHA, MD5, SMD5, PLAIN)</p>

string

the password hash

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

hash types

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

<p>salt length</p>

int

the salt string

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

<p>hash value to enable</p>

string

enabled password hash

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

<p>hash value to disable</p>

string

disabled hash value

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

<p>password value</p>

String

can be locked

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

<p>password hash to check</p>

string

true if the password is marked as enabled

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

password

String
checkPasswordHash
\checkPasswordHash()
Checks if the given password mathes the crypto hash.

<p>type hash type (must be one of getSupportedHashTypes())</p>

String

<p>password hash value</p>

\unknown_type

<p>plain text password to check</p>

\unknown_type
$type
$hash
\unknown_type
$password
\unknown_type
search_domains
\search_domains()
Returns an array with all Samba 3 domain entries under the given suffix

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

\handle

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

String

list of samba3domain objects

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

<p>value to check</p>

string

<p>pattern name</p>

string

true if matches, otherwise false

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

<p>DN</p>

String

escaped DN

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

<p>attribute name (may be null)</p>

String

<p>attribute value</p>

String

<p>object class (may be null)</p>

String

<p>list of attributes to return</p>

array

<p>account types</p>

array

list of found entries

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

<p>list of attributes to return</p>

array

<p>account types</p>

array

<p>get only attributes but no values (default: false)</p>

boolean

list of found entries

array
$filter
String
$attributes
array
$scopes
array
$attrsOnly
false
boolean
searchLDAP
\searchLDAP()
Runs an LDAP search.

<p>LDAP suffix</p>

String

<p>filter</p>

String

<p>list of attributes to return</p>

array

list of found entries

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

<p>DN</p>

String

<p>list of attributes to fetch</p>

array

<p>LDAP handle (optional for admin interface pages)</p>

\handle

attributes or null if not found

array
$dn
String
$attributes
array('dn')
array
$handle
null
\handle
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.
This will remove all 'count' entries and also all numeric array keys.

<p>LDAP entries in format $entries[entry number][attribute name][attribute values]</p>

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

<p>DN</p>

String

transformed DN

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

<p>first argument to compare</p>

string

<p>second argument to compare</p>

string

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

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

<p>LDAP time value</p>

String

formated time

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

<p>text to obfuscate</p>

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

<p>text to deobfuscate</p>

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

<p>text to check</p>

String

obfuscated or not

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

<p>DN</p>

String

RDN attribute name

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

<p>DN</p>

String

RDN attribute value

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

<p>DN</p>

String

DN suffix

String
$dn
String
sendPasswordMail
\sendPasswordMail()
Sends the password mail.

<p>new password</p>

String

<p>LDAP attributes of user</p>

array

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

String

list of arrays that can be used to create status messages

array
$pwd
String
$user
array
$recipient
null
String
createEMailHeaders
\createEMailHeaders()
Generates the email header text for the given parameters.

<p>FROM address</p>

String

<p>mail is formatted as HTML or plain text</p>

boolean

<p>reply-to address (optional)</p>

String
$from
String
$isHTML
boolean
$replyTo
null
String
base64EncodeForEMail
\base64EncodeForEMail()
Returns a base64 encoded string of the given values in a fomat that is used in emails.

<p>value to encode</p>

String

base64 encoded value

String
$value
String
getRandomNumber
\getRandomNumber()
Returns a random number.

random number

int
getLDAPSSLCertificate
\getLDAPSSLCertificate()
Connects to the LDAP server and extracts the certificates.

<p>server name</p>

String

<p>server port</p>

String

false on error and certificate if extracted successfully

mixed
$server
String
$port
String
getExtendedLDAPErrorMessage
\getExtendedLDAPErrorMessage()
Returns the extended LDAP error message if any.

<p>LDAP server handle</p>

\handle

error message

String
$server
\handle
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.
This improves performance if the same module does not need to be created multiple times (calling get_metaData() each time).

Roland Gruber

$cache array() module cache ("name:scope" => module) getModule \moduleCache::getModule() Returns a new/cached module with the given name and scope. `String` `String` $name String $scope String

Interface between modules and other parts of LAM.

metaHTML

Roland Gruber

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

metaHTML

ALIGN_TOP
\htmlElement::ALIGN_TOP
0
align to top
ALIGN_LEFT
\htmlElement::ALIGN_LEFT
1
align to left
ALIGN_RIGHT
\htmlElement::ALIGN_RIGHT
2
align to right
ALIGN_BOTTOM
\htmlElement::ALIGN_BOTTOM
3
align to bottom
ALIGN_CENTER
\htmlElement::ALIGN_CENTER
4
align to center
VALIDATE_NUMERIC
\htmlElement::VALIDATE_NUMERIC
'numeric'
validation rule to allow only numbers ([0-9]+)
VALIDATE_NUMERIC_WITH_NEGATIVE
\htmlElement::VALIDATE_NUMERIC_WITH_NEGATIVE
'numericWithNegative'
validation rule to allow positive/negative 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 \htmlElement::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string getAlignmentString \htmlElement::getAlignmentString() Returns the HTML attributes for the alignment. `String` getColspanString \htmlElement::getColspanString() Returns the HTML attribute for the colspan. `String` getRowspanString \htmlElement::getRowspanString() Returns the HTML attribute for the rowspan. `String` setCSSClasses \htmlElement::setCSSClasses() Adds CSS classes to this element. `array` $classes array setTableCellCSSClasses \htmlElement::setTableCellCSSClasses() Adds CSS classes to the surrounding table cell for this element. `array` $classes array getTableCellCSSClasses \htmlElement::getTableCellCSSClasses() Returns the CSS classes of the surrounding table cell for this element. `array`
\htmlElement
htmlTable
\htmlTable
Structures elements using a table.
This is used to build HTML code by using objects.

metaHTML

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

metaHTML

$cells table cells __construct \htmlTableRow::__construct() Constructor `array` `` $cells array generateHTML \htmlTableRow::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlInputField
\htmlInputField
A standard input field.
This is used to build HTML code by using objects.

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 $title null title attribute __construct \htmlInputField::__construct() Constructor `String` `String` `String` $fieldName String $fieldValue null String $fieldSize null String generateHTML \htmlInputField::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setFieldMaxLength \htmlInputField::setFieldMaxLength() Sets the maximum field length. `int` $fieldMaxLength int setFieldSize \htmlInputField::setFieldSize() Sets the field size. `int` $fieldSize int setIsPassword \htmlInputField::setIsPassword() Specifies if this is a password field. `boolean` $isPassword boolean setIsEnabled \htmlInputField::setIsEnabled() Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled boolean setObfuscate \htmlInputField::setObfuscate() Specifies if the value should be saved in obfuscated form (e.g. self service profile). `boolean` $obfuscate boolean setTransient \htmlInputField::setTransient() Specifies that the value should not be automatically saved when used in self service or server profile (default: false). `boolean` $transient boolean setRequired \htmlInputField::setRequired() Specifies if the input field is required. `boolean` $required boolean setValidationRule \htmlInputField::setValidationRule() Specifies the validation rule (e.g. htmlElement::VALIDATE_NUMERIC) for this field. This rule is checked on client side when the input field looses focus. `boolean` $rule boolean enableAutocompletion \htmlInputField::enableAutocompletion() Enables autocompletion for this input field. `array` `int` `boolean` `String` `String` $values array $minLength 1 int $multiValue false boolean $multiSeparatorExp ',\s*' $multiSeparator ', ' String setOnKeyPress \htmlInputField::setOnKeyPress() Sets the JavaScript for the onKeyPress event. `String` $onKeyPress String showCalendar \htmlInputField::showCalendar() Shows a calendar when the field is selected. `String` $format String setTitle \htmlInputField::setTitle() Sets the title for the input field. `String` $title String
\htmlInputField
htmlTableExtendedInputField
\htmlTableExtendedInputField
An extended input field that combines label, input field and help.
This is used to build HTML code by using objects.

metaHTML

$label Descriptive label $helpID help ID __construct \htmlTableExtendedInputField::__construct() Constructor `String` `String` `String` `String` $label String $fieldName String $fieldValue null String $helpID null String generateHTML \htmlTableExtendedInputField::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlHelpLink
\htmlHelpLink
Renders a help link.
This is used to build HTML code by using objects.

metaHTML

$helpID help ID $module module name if it should be forced $scope account type if it should be forced __construct \htmlHelpLink::__construct() Constructor `String` `String` `String` $helpID String $module null String $scope null String generateHTML \htmlHelpLink::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlButton
\htmlButton
Simple button.
This is used to build HTML code by using objects.

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 \htmlButton::__construct() Constructor. `String` `String` `String` $name String $value String $isImageButton false String generateHTML \htmlButton::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setTitle \htmlButton::setTitle() Sets the button title (tooltip). `String` $title String setIsEnabled \htmlButton::setIsEnabled() Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled boolean setIconClass \htmlButton::setIconClass() Sets an additional icon for a text button. The icon class is a CSS class that specifies the icon image (e.g. "deleteButton" in layout.css). `String` $iconClass String setOnClick \htmlButton::setOnClick() Sets the onclick event code. This makes this button a simple button that does not submit a form. `String` $onClick String
\htmlButton
htmlAccountPageButton
\htmlAccountPageButton
Prints a button for the account pages.
This is used to build HTML code by using objects.

metaHTML

__construct
\htmlAccountPageButton::__construct()
Constructor

<p>module name which renders next page</p>

String

<p>name of next page</p>

String

<p>identifier for button</p>

String

<p>button text or image (16x16px, relative to graphics folder)</p>

String

<p>image or text button (default text)</p>

String
$targetModule
String
$targetPage
String
$identifier
String
$value
String
$isImageButton
false
String
\htmlElement
htmlSelect
\htmlSelect
Represents a select box.
This is used to build HTML code by using objects.

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 \htmlSelect::__construct() Constructor. <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); `String` `array` `array` `int` $name String $elements array $selectedElements array() array $size 1 int generateHTML \htmlSelect::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string printOptionsHTML \htmlSelect::printOptionsHTML() Prints the HTML code of the option tags. `array` $elements array setHasDescriptiveElements \htmlSelect::setHasDescriptiveElements() Specifies if the elements are just a simple list or an assoziative array (default: simple list). `boolean` $hasDescriptiveElements boolean setContainsOptgroups \htmlSelect::setContainsOptgroups() Specifies if the elements are divided into optgroups. `boolean` $containsOptgroups boolean setMultiSelect \htmlSelect::setMultiSelect() Specifies if multi-selection is enabled (default: disabled). `boolean` $multiSelect boolean setSortElements \htmlSelect::setSortElements() Specifies if the elemets should be sorted (default: sort). `boolean` $sortElements boolean setRightToLeftTextDirection \htmlSelect::setRightToLeftTextDirection() Specifies if the text direction should be set to right to left. `boolean` $rightToLeftTextDirection boolean setIsEnabled \htmlSelect::setIsEnabled() Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled boolean setWidth \htmlSelect::setWidth() Specifies the width of this selection box. `String` $width String setTransformSingleSelect \htmlSelect::setTransformSingleSelect() Specifies if select boxes that contain only a single element should be transformed to a simple text field. `boolean` $transformSingleSelect boolean setOnchangeEvent \htmlSelect::setOnchangeEvent() Sets the JavaScript code for the onchange event. `String` $onchangeEvent String setTransient \htmlSelect::setTransient() Specifies that the value should not be automatically saved when used in self service or server profile (default: false). `boolean` $transient boolean setTableRowsToHide \htmlSelect::setTableRowsToHide() This will hide the given table rows when the select is changed to the specified value. 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')) `array` $tableRowsToHide array setTableRowsToShow \htmlSelect::setTableRowsToShow() This will show the given table rows when the select is changed to the specified value. 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')) `array` $tableRowsToShow array printCodeForShowHideTableRows \htmlSelect::printCodeForShowHideTableRows() Creates the JavaScript code to hide/show table rows based on the select value. `String` $onChange String
\htmlSelect
htmlTableExtendedSelect
\htmlTableExtendedSelect
Select with label and help link.
This is used to build HTML code by using objects.

metaHTML

$label descriptive label $helpID help ID __construct \htmlTableExtendedSelect::__construct() Constructor. `String` `array` `array` `String` `String` `int` $name String $elements array $selectedElements array $label String $helpID null String $size 1 int generateHTML \htmlTableExtendedSelect::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlRadio
\htmlRadio
Represents a radio selection.
This is used to build HTML code by using objects.

metaHTML

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

metaHTML

$label descriptive label $helpID help ID __construct \htmlTableExtendedRadio::__construct() Constructor. `String` `String` `array` `String` `String` $label String $name String $elements array $selectedElement null String $helpID null String generateHTML \htmlTableExtendedRadio::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlOutputText
\htmlOutputText
Prints the text and escapes contained HTML code by default.
This is used to build HTML code by using objects.

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 \htmlOutputText::__construct() Constructor. `String` `boolean` $string String $escapeHTML true boolean generateHTML \htmlOutputText::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setIsBold \htmlOutputText::setIsBold() Specifies if the whole text should be printed in bold. `boolean` $isBold boolean setMarkAsRequired \htmlOutputText::setMarkAsRequired() Adds a marker that indicates a required field. `boolean` $markAsRequired boolean setNoWrap \htmlOutputText::setNoWrap() Specifies if word wrap is allowed for this text. `boolean` $noWrap boolean
\htmlElement
htmlInputCheckbox
\htmlInputCheckbox
Prints the HTML code for a checkbox.
This is used to build HTML code by using objects.

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 \htmlInputCheckbox::__construct() Constructor. `String` `boolean` $name String $checked boolean generateHTML \htmlInputCheckbox::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setIsEnabled \htmlInputCheckbox::setIsEnabled() Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled boolean setTableRowsToHide \htmlInputCheckbox::setTableRowsToHide() This will hide the given table rows when the checkbox is checked. 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. `array` $tableRowsToHide array setTableRowsToShow \htmlInputCheckbox::setTableRowsToShow() This will show the given table rows when the checkbox is checked. 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. `array` $tableRowsToShow array setTransient \htmlInputCheckbox::setTransient() Specifies that the value should not be automatically saved when used in self service or server profile (default: false). `boolean` $transient boolean
\htmlInputCheckbox
htmlTableExtendedInputCheckbox
\htmlTableExtendedInputCheckbox
Checkbox with descriptive label and help link.
This is used to build HTML code by using objects.

metaHTML

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

metaHTML

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

metaHTML

$label descriptive label $helpID help ID __construct \htmlTableExtendedInputFileUpload::__construct() Constructor. `String` `String` `String` $name String $label String $helpID null String generateHTML \htmlTableExtendedInputFileUpload::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlInputTextarea
\htmlInputTextarea
Prints the HTML code for a textarea.
This is used to build HTML code by using objects.

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 \htmlInputTextarea::__construct() Constructor. `String` `String` `int` `int` $name String $value String $colCount int $rowCount int generateHTML \htmlInputTextarea::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setIsEnabled \htmlInputTextarea::setIsEnabled() Specifies if this component is enabled and accepts user modification. `boolean` $isEnabled boolean setIsRichEdit \htmlInputTextarea::setIsRichEdit() Specifies if the textarea should be displayed whith a WYSIWYG editor. <br>This requires that the page which displays the textarea also includes the ckeditor JS. <br>Rich editing is disabled by default. `boolean` $richEdit boolean
\htmlInputTextarea
htmlTableExtendedInputTextarea
\htmlTableExtendedInputTextarea
Text area with label and help link.
This is used to build HTML code by using objects.

metaHTML

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

metaHTML

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

metaHTML

$width width of spacer in px $height height of spacer in px __construct \htmlSpacer::__construct() Constructor. `String` `String` $width String $height String generateHTML \htmlSpacer::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlStatusMessage
\htmlStatusMessage
Prints a status message (e.g. error message).
This is used to build HTML code by using objects.

metaHTML

$type message type (e.g. ERROR) $title message title $text message text $params message parameters __construct \htmlStatusMessage::__construct() Constructor. `String` `String` `String` `array` $type String $title String $text null String $params null array generateHTML \htmlStatusMessage::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlFieldset
\htmlFieldset
Generates a fieldset.
This is used to build HTML code by using objects.

metaHTML

$content fieldset content $label null descriptive label $labelImage null label image __construct \htmlFieldset::__construct() Constructor. `\htmlElement` `String` `String` $content \htmlElement $label null String $labelImage null String generateHTML \htmlFieldset::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlTitle
\htmlTitle
Generates a title line. This is used for page titles.
This is used to build HTML code by using objects.

metaHTML

$label null descriptive label __construct \htmlTitle::__construct() Constructor. `String` $label String generateHTML \htmlTitle::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlSubTitle
\htmlSubTitle
Generates a subtitle line. This is used to group multiple fields.
This is used to build HTML code by using objects.

metaHTML

$label null descriptive label $image null optional image $id null optional ID for this element (e.g. to use for JavaScript) __construct \htmlSubTitle::__construct() Constructor. `String` `String` `String` $label String $image null String $id null String generateHTML \htmlSubTitle::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlHiddenInput
\htmlHiddenInput
Generates a hidden input field.
This is used to build HTML code by using objects.

metaHTML

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

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 \htmlLink::__construct() Constructor. `String` `String` `String` `boolean` $text String $target String $image null String $showAsButton false boolean generateHTML \htmlLink::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setTitle \htmlLink::setTitle() Sets the link title. `String` $title String setTargetWindow \htmlLink::setTargetWindow() Sets the target window (e.g. _blank). `String` $window String setOnClick \htmlLink::setOnClick() Sets the onClick event. `String` $event String
\htmlElement
htmlGroup
\htmlGroup
Groups multiple htmlElements.
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.

metaHTML

$subelements array() link text generateHTML \htmlGroup::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string addElement \htmlGroup::addElement() Adds a subelement. `\htmlElement` $sub \htmlElement
\htmlElement
htmlHorizontalLine
\htmlHorizontalLine
Prints a horizontal line.
This is used to build HTML code by using objects.

metaHTML

generateHTML
\htmlHorizontalLine::generateHTML()
Prints the HTML code for this element.

<p>Name of account module</p>

string

<p>List of meta-HTML elements</p>

array

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

array

<p>If true then no buttons will be displayed</p>

boolean

<p>Start value of tabulator index for input fields</p>

integer

<p>Account type</p>

string

List of input field names and their type (name =&gt; type)

array
$module
string
$input
array
$values
array
$restricted
boolean
$tabindex
integer
$scope
string
\htmlElement
htmlDiv
\htmlDiv
Creates a simple DIV element.
This is used to build HTML code by using objects.

metaHTML

$id null unique ID $content null htmlElement that generates inner content __construct \htmlDiv::__construct() Constructor. `String` `\htmlElement` `array` $id String $content \htmlElement generateHTML \htmlDiv::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlJavaScript
\htmlJavaScript
Creates a JavaScript element.
This is used to build HTML code by using objects.

metaHTML

$content null htmlElement that generates inner content __construct \htmlJavaScript::__construct() Constructor. `String` $content String generateHTML \htmlJavaScript::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string
\htmlElement
htmlEqualWidth
\htmlEqualWidth
Sets all given elements to the same width.
This is used to build HTML code by using objects.

metaHTML

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

metaHTML

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

metaHTML

$elements array() list of elements $id '' HTML ID $elementWidth '' element width $onUpdate null on update event __construct \htmlSortableList::__construct() Constructor. `array` `String` `String` $elements array $id $elementWidth '250px' String generateHTML \htmlSortableList::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string setOnUpdate \htmlSortableList::setOnUpdate() Sets the JS code that is executed when the element order was changed. 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. `String` $onUpdate String
\htmlElement
htmlAccordion
\htmlAccordion
Creates a list of content elements in accordion style.
HTML special characters must be escaped before providing to htmlAccordion.
$id null $elements null $openInitial '1' $collapsible false __construct \htmlAccordion::__construct() Constructor. `String` `array` `String` `boolean` $id String $elements array $openInitial '0' String $collapsible false boolean generateHTML \htmlAccordion::generateHTML() Prints the HTML code for this element. `string` `array` `array` `boolean` `integer` `string` `array` $module string $input array $values array $restricted boolean $tabindex integer $scope string

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.

<p>directory</p>

String

list of files/directories with wrong permission

array
$dir
String
containsFiles
\containsFiles()
Checks if the given directory contains files.
This is used to check if config files need to be migrated.

<p>directory path</p>

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

<p>server profiles</p>

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

<p>server profiles</p>

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

<ul> <li>source path to file or directory</li> </ul>

string

<ul> <li>destination path to file or directory</li> </ul>

string

<ul> <li>server profiles (used to avoid copying of newly created folders)</li> </ul>

array

<p>copy only files that start with the given filter</p>

string

<p>overwrite existing files</p>

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

<ul> <li>path to file or directory</li> </ul>

string

<ul> <li>server profiles (used to avoid copying of newly created folders)</li> </ul>

array
$src
string
$profiles
array

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

This file is the interface to the different account types.

types

Roland Gruber

getTypes
\getTypes()
Returns a list of available account types.

list of types

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

<p>type name</p>

string

type alias

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

<p>type name</p>

string

type description

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

<p>account type</p>

string

class name

string
$type
string
getDefaultListAttributes
\getDefaultListAttributes()
Returns the default attribute list for an account type.
It is used as default value for the configuration editor.

<p>account type</p>

string

attribute list

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

<p>account type</p>

string

list of descriptions

array
$type
string

Interface between modules and self service pages.
This file also includes the self service profile class and helper functions.

selfService

Roland Gruber

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.

<p>account type</p>

string

attributes

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

<p>account type</p>

string

settings

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

<p>account type</p>

string

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

array

<p>LDAP attributes (attribute names in lower case)</p>

array

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

boolean

<p>list of read-only fields</p>

array

meta HTML code (array(&lt;moduleName&gt; =&gt; htmlTableRow))

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

<p>account type</p>

string

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

string

<p>LDAP attributes</p>

array

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

boolean

<p>list of read-only fields</p>

array

messages and LDAP commands (array(&#039;messages&#039; =&gt; array(), &#039;add&#039; =&gt; array(), &#039;del&#039; =&gt; array(), &#039;mod&#039; =&gt; array()))

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

profile names (array(&lt;account type&gt; =&gt; array(&lt;profile1&gt;, &lt;profile2&gt;, ...)))

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

<p>profile name</p>

string

<p>account type</p>

string

true if file was readable

\selfServiceProfile
$name
string
$scope
string
saveSelfServiceProfile
\saveSelfServiceProfile()
Saves a self service profile.
File is created, if needed

<p>name of the account profile</p>

string

<p>account type</p>

string

<p>self service profile</p>

\selfServiceProfile

true, if saving succeeded

boolean
$name
string
$scope
string
$profile
\selfServiceProfile
isSelfServiceProfileWritable
\isSelfServiceProfileWritable()
Checks if a service profile is writable.

<p>profile name</p>

string

<p>account type</p>

string

true if file is writable

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

<p>account type</p>

string

<p>currently edited profile</p>

\selfServiceProfile

configuration options

array
$scope
string
$profile
\selfServiceProfile
checkSelfServiceSettings
\checkSelfServiceSettings()
Checks if the self service settings are valid

<p>account type</p>

string

<p>hash array containing all options (name => array(...))</p>

array

<p>profile</p>

\selfServiceProfile

list of error messages

array
$scope
string
$options
array
$profile
\selfServiceProfile
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 \selfServiceProfile::__construct() Constructor `\selfServiceProfile`

LDAP Account Manager PDF printing library. It consists of lamPDF class, the createModulePDF() function that may be called by other pages and furthermore some helper functions.

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 \lamPDF::__construct() Creates a new lamPDF object. `array` `String` $page_definitions array() array $fontName String header \lamPDF::header() Creates the PDF page header. footer \lamPDF::footer() Creates the PDF page footer.

This file includes functions to manage the configuration files.

configuration

Roland Gruber

Thomas Manninger

setSSLCaCert
\setSSLCaCert()
Sets the environment variables for custom SSL CA certificates.
setlanguage
\setlanguage()
Sets language settings for automatic translation
checkChmod
\checkChmod()
Checks whether a specific flag in the rights string is set.

<p>read,write or execute</p>

<p>owner,group or other</p>

<p>the chmod rights</p>

if the chmod $right for $target were set

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

profile names

array
deleteConfigProfile
\deleteConfigProfile()
Deletes the given server profile.

<p>profile name</p>

String

null if success or error message if failed

String
$name
String
LAMVersion
\LAMVersion()
Returns the version number of this LAM installation.
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).

version number

string
metaRefresh
\metaRefresh()
Prints a meta refresh page

<p>the URL of the target page</p>

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

<p>account type (e.g. user)</p>

String

is hidden

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

configuration

ACCESS_ALL
\LAMConfig::ACCESS_ALL
100
ACCESS_PASSWORD_CHANGE
\LAMConfig::ACCESS_PASSWORD_CHANGE
20
ACCESS_READ_ONLY
\LAMConfig::ACCESS_READ_ONLY
0
SAVE_OK
\LAMConfig::SAVE_OK
0
SAVE_FAIL
\LAMConfig::SAVE_FAIL
1
LOGIN_LIST
\LAMConfig::LOGIN_LIST
'list'
LOGIN_SEARCH
\LAMConfig::LOGIN_SEARCH
'search'
LINE_SEPARATOR
\LAMConfig::LINE_SEPARATOR
'+::+'
line separator
$ServerURL Server address (e.g. ldap://127.0.0.1:389) $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 This is used for managing quota and home directories. optional setting, may not be defined $scriptRights '750' The rights for the home directory $scriptServer Servers where lamdaemon script is executed This is used for managing quota and home directories. optional setting, may not be defined $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 \LAMConfig::__construct() Loads preferences from config file `String` $file String reload \LAMConfig::reload() Reloads preferences from config file `boolean` save \LAMConfig::save() Saves preferences to config file getName \LAMConfig::getName() Returns the name of the config file `String` isWritable \LAMConfig::isWritable() Returns if the file can be written on the filesystem. `boolean` getPath \LAMConfig::getPath() Returns the path to the config file. `string` get_ServerURL \LAMConfig::get_ServerURL() Returns the server address as string `string` set_ServerURL \LAMConfig::set_ServerURL() Sets the server address `string` `boolean` $value string getUseTLS \LAMConfig::getUseTLS() Returns if TLS is activated. `String` setUseTLS \LAMConfig::setUseTLS() Sets if TLS is activated. `String` `boolean` $useTLS get_Admins \LAMConfig::get_Admins() Returns an array of string with all admin names `array` get_Adminstring \LAMConfig::get_Adminstring() Returns all admin users seperated by semicolons `string` set_Adminstring \LAMConfig::set_Adminstring() Sets the admin string `string` `boolean` $value string check_Passwd \LAMConfig::check_Passwd() Checks if the given password matches. `String` `boolean` $password String set_Passwd \LAMConfig::set_Passwd() Sets the preferences wizard password `string` `boolean` $value string hashPassword \LAMConfig::hashPassword() Returns the hashed password. `String` `String` `String` $password String $salt String get_Suffix \LAMConfig::get_Suffix() Returns the LDAP suffix for the given account type `string` `string` $scope string set_Suffix \LAMConfig::set_Suffix() Sets the LDAP suffix where accounts are saved `string` `string` `boolean` $scope string $value string get_listAttributes \LAMConfig::get_listAttributes() Returns the list of attributes to show in user list `string` `string` $scope string set_listAttributes \LAMConfig::set_listAttributes() Sets the list of attributes to show in user list `string` `string` `boolean` $value string $scope string get_defaultLanguage \LAMConfig::get_defaultLanguage() Returns the default language string `string` set_defaultLanguage \LAMConfig::set_defaultLanguage() Sets the default language string `string` `boolean` $value string get_scriptPath \LAMConfig::get_scriptPath() Returns the path to the external script `string` set_scriptPath \LAMConfig::set_scriptPath() Sets the path to the external script `string` `boolean` $value string get_scriptServers \LAMConfig::get_scriptServers() Returns the servers of the external script as a Array `string` set_scriptServers \LAMConfig::set_scriptServers() Sets the servers of the external script `string` `boolean` $value string get_scriptRights \LAMConfig::get_scriptRights() Returns the chmod value for new home directories. `string` set_scriptRights \LAMConfig::set_scriptRights() Sets the rights for the home directory. `string` `boolean` $chmod string get_cacheTimeout \LAMConfig::get_cacheTimeout() Returns the LDAP cache timeout in minutes `integer` get_cacheTimeoutSec \LAMConfig::get_cacheTimeoutSec() Returns the LDAP cache timeout in seconds `integer` set_cacheTimeout \LAMConfig::set_cacheTimeout() Sets the LDAP cache timeout in minutes (0,1,2,5,10,15) `integer` `boolean` $value integer get_searchLimit \LAMConfig::get_searchLimit() Returns the LDAP search limit. `integer` set_searchLimit \LAMConfig::set_searchLimit() Sets the LDAP search limit. `integer` `boolean` $value integer get_AccountModules \LAMConfig::get_AccountModules() Returns an array of all selected account modules `string` `array` $scope string set_AccountModules \LAMConfig::set_AccountModules() Sets the selected account modules `array` `string` `boolean` $modules array $scope string set_moduleSettings \LAMConfig::set_moduleSettings() Sets the settings for the account modules. `array` `boolean` $settings array get_moduleSettings \LAMConfig::get_moduleSettings() Returns a list of saved module settings `array` get_ActiveTypes \LAMConfig::get_ActiveTypes() Returns a list of active account types. `array` set_ActiveTypes \LAMConfig::set_ActiveTypes() Sets the list of active types. `array` $types set_typeSettings \LAMConfig::set_typeSettings() Sets the settings for the account types. `array` `boolean` $settings array get_typeSettings \LAMConfig::get_typeSettings() Returns a list of saved type settings `array` getToolSettings \LAMConfig::getToolSettings() Returns the tool settings. `array` setToolSettings \LAMConfig::setToolSettings() Sets the tool settings. `array` `boolean` $toolSettings array getAccessLevel \LAMConfig::getAccessLevel() Returns the access level for this profile. `int` setAccessLevel \LAMConfig::setAccessLevel() Sets the access level for this profile. `int` $level int getLoginMethod \LAMConfig::getLoginMethod() Returns the login method. `String` `` `` setLoginMethod \LAMConfig::setLoginMethod() Sets the login method. `String` $loginMethod String getLoginSearchFilter \LAMConfig::getLoginSearchFilter() Returns the login search filter. `String` setLoginSearchFilter \LAMConfig::setLoginSearchFilter() Sets the login search filter. `String` $loginSearchFilter String getLoginSearchSuffix \LAMConfig::getLoginSearchSuffix() Returns the login search suffix. `String` setLoginSearchSuffix \LAMConfig::setLoginSearchSuffix() Sets the login search suffix. `String` $loginSearchSuffix String setLoginSearchDN \LAMConfig::setLoginSearchDN() Sets the DN for the login search bind user. `String` `boolean` $loginSearchDN String getLoginSearchDN \LAMConfig::getLoginSearchDN() Returns the DN for the login search bind user. `String` setLoginSearchPassword \LAMConfig::setLoginSearchPassword() Sets the password for the login search bind user. `String` $loginSearchPassword String getLoginSearchPassword \LAMConfig::getLoginSearchPassword() Returns the password for the login search bind user. `String` getHttpAuthentication \LAMConfig::getHttpAuthentication() Returns if HTTP authentication should be used. `String` setHttpAuthentication \LAMConfig::setHttpAuthentication() Specifies if HTTP authentication should be used. `String` $httpAuthentication String getLamProMailFrom \LAMConfig::getLamProMailFrom() Returns the sender address for password reset mails. `String` setLamProMailFrom \LAMConfig::setLamProMailFrom() Sets the sender address for password reset mails. `String` `boolean` $lamProMailFrom String getLamProMailReplyTo \LAMConfig::getLamProMailReplyTo() Returns the reply-to address for password reset mails. `String` setLamProMailReplyTo \LAMConfig::setLamProMailReplyTo() Sets the reply-to address for password reset mails. `String` `boolean` $lamProMailReplyTo String getLamProMailSubject \LAMConfig::getLamProMailSubject() Returns the subject for password reset mails. `String` setLamProMailSubject \LAMConfig::setLamProMailSubject() Sets the subject for password reset mails. `String` $lamProMailSubject String getLamProMailIsHTML \LAMConfig::getLamProMailIsHTML() Returns if the password reset mail content should be treated as HTML. `boolean` setLamProMailIsHTML \LAMConfig::setLamProMailIsHTML() Sets if the password reset mail content should be treated as HTML. `boolean` $lamProMailIsHTML boolean getLamProMailText \LAMConfig::getLamProMailText() Returns the mail body for password reset mails. `String` setLamProMailText \LAMConfig::setLamProMailText() Sets the mail body for password reset mails. `String` $lamProMailText String
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, "/. ..":file, "NONE":none) $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 $uploadedSSLCaCert null uploaded SSL certificate that is stored to disk on save() $delSSLCaCert false SSL certificate should be deleted on save() $settings array("password", "default", "sessionTimeout", "logLevel", "logDestination", "allowedHosts", "passwordMinLength", "passwordMinUpper", "passwordMinLower", "passwordMinNumeric", "passwordMinClasses", "passwordMinSymbol") list of data fields to save in config file __construct \LAMCfgMain::__construct() Loads preferences from config file reload \LAMCfgMain::reload() Reloads preferences from config file config.cfg `boolean` save \LAMCfgMain::save() Saves preferences to config file config.cfg setPassword \LAMCfgMain::setPassword() Sets a new config password. `String` $password String checkPassword \LAMCfgMain::checkPassword() Checks if the given password matches. `String` `boolean` $password String hashPassword \LAMCfgMain::hashPassword() Returns the hashed password. `String` `String` `String` $password String $salt String isWritable \LAMCfgMain::isWritable() Returns if the configuration file is writable. `boolean` isConfigFileExisting \LAMCfgMain::isConfigFileExisting() Returns if the configuration file is existing. `boolean` getSSLCaCertPath \LAMCfgMain::getSSLCaCertPath() Returns the path to the SSL CA certificate file that overrides the system certificates. `String` getInternalSSLCaCertFileName \LAMCfgMain::getInternalSSLCaCertFileName() Returns the file name that will be used internally to store the CA file. `String` uploadSSLCaCert \LAMCfgMain::uploadSSLCaCert() Uploads a new SSL CA cert. `String` `mixed` $cert String getSSLCaCertTempFileName \LAMCfgMain::getSSLCaCertTempFileName() Returns the name of a temporary file in tmp that contains the SSL certificate. The file contains either the stored data in serverCerts or the uploaded data. `String` deleteSSLCaCert \LAMCfgMain::deleteSSLCaCert() Marks a single or all SSL CA certificate files for deletion. The changes take effect on save(). `int` $index null int getSSLCaCertificates \LAMCfgMain::getSSLCaCertificates() Returns a list of all CA certificates. `array` getSSLCaCertificateContent \LAMCfgMain::getSSLCaCertificateContent() Returns the content of the certificate file or uploaded data. `String` splitSSLCaCertificateContent \LAMCfgMain::splitSSLCaCertificateContent() Splits the certificate content into single PEM data chunks. `String` `array` $content String

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

UFPDF
\UFPDF::UFPDF()
$orientation
'P'
$unit
'mm'
$format
'A4'
GetStringWidth
\UFPDF::GetStringWidth()
$s
AddFont
\UFPDF::AddFont()
$family
$style
''
$file
''
Text
\UFPDF::Text()
$x
$y
$txt
AcceptPageBreak
\UFPDF::AcceptPageBreak()
Cell
\UFPDF::Cell()
$w
$h
0
$txt
''
$border
0
$ln
0
$align
'J'
$fill
0
$link
''
MultiCell
\UFPDF::MultiCell()
$w
$h
$txt
$border
0
$align
'J'
$fill
0
Write
\UFPDF::Write()
$h
$txt
$link
''
AliasNbPages
\UFPDF::AliasNbPages()
$alias
'{nb}'
_puttruetypeunicode
\UFPDF::_puttruetypeunicode()
$font
_dounderlineU
\UFPDF::_dounderlineU()
$x
$y
$width
$txt
_textstring
\UFPDF::_textstring()
$s
_escapetext
\UFPDF::_escapetext()
$s
_putinfo
\UFPDF::_putinfo()
_putpages
\UFPDF::_putpages()
utf8_to_utf16be
\UFPDF::utf8_to_utf16be()
$txt
$bom
true
code2utf
\UFPDF::code2utf()
$num
strlen
\UFPDF::strlen()
$s
utf8_substr
\UFPDF::utf8_substr()
$str
$start
utf8_to_codepoints
\UFPDF::utf8_to_codepoints()
$txt

Manages Kolab group accounts.

modules

Roland Gruber

\baseModule
kolabGroup
\kolabGroup
Manages Kolab group accounts.
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.

modules

$mailCache null cache for mail attribute $mailHostCache null cache for mailHost values __construct \kolabGroup::__construct() Creates a new kolabGroup object. `string` $scope string get_metaData \kolabGroup::get_metaData() Returns meta data that is interpreted by parent class `array` `` load_Messages \kolabGroup::load_Messages() This function fills the $messages variable with output messages from this module. display_html_attributes \kolabGroup::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` process_attributes \kolabGroup::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_delete \kolabGroup::display_html_delete() This function will create the meta HTML code to show a page to mark an account for deletion. `\htmlElement` process_delete \kolabGroup::process_delete() Write variables into object and do some regex checks save_attributes \kolabGroup::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` load_profile \kolabGroup::load_profile() Loads the values of an account profile into internal variables. `array` $profile array build_uploadAccounts \kolabGroup::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array get_pdfEntries \kolabGroup::get_pdfEntries() Returns a list of PDF entries manageMail \kolabGroup::manageMail() Returns if the mail attribute should be managed. `boolean` loadMailCache \kolabGroup::loadMailCache() Loads the list of email addresses into the cache. loadMailHostCache \kolabGroup::loadMailHostCache() Loads the list of mail hosts into the cache.

Manages the Asterisk extension of user accounts.

modules

Pavel Pozdnyak

Roland Gruber

\baseModule
\passwordService
asteriskAccount
\asteriskAccount
Manages the Asterisk extension of user accounts.
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.

modules

ASTERISK_DEFAULT_REALM
\asteriskAccount::ASTERISK_DEFAULT_REALM
"asterisk"
__construct
\asteriskAccount::__construct()
Creates a new asteriskAccount object.

<p>account type (user, group, host)</p>

string
$scope
string
get_metaData
\asteriskAccount::get_metaData()
Returns meta data that is interpreted by parent class.

array with meta data

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

HTML meta data

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

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
get_pdfEntries
\asteriskAccount::get_pdfEntries()
Returns a list of PDF entries
build_uploadAccounts
\asteriskAccount::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
managesPasswordAttributes
\asteriskAccount::managesPasswordAttributes()
This method specifies if a module manages password attributes.

true if this module manages password attributes

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

force password change supported

boolean
passwordChangeRequested
\asteriskAccount::passwordChangeRequested()
This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name.

<p>new password</p>

String

<p>list of modules for which the password should be changed</p>

<p>force the user to change his password at next login</p>

boolean

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

array
$password
String
$modules
mixed
$forcePasswordChange
boolean
buildPasswordString
\asteriskAccount::buildPasswordString()
Builds the password string for the password attribute.

<p>LDAP attributes</p>

array

<p>module configuration settings</p>

array

<p>password</p>

String

value for password attribute

String
$attributes
array
$moduleSettings
array
$password
String
hashPassword
\asteriskAccount::hashPassword()
Hashes a password value to Asterisk format.

<p>password</p>

String

hash

String
$password
String
checkSelfServiceOptions
\asteriskAccount::checkSelfServiceOptions()
Checks if all input values are correct and returns the LDAP attributes which should be changed.
<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)

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

<p>input fields</p>

string

<p>LDAP attributes</p>

array

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

boolean

<p>list of read-only fields</p>

array

messages and attributes (array(&#039;messages&#039; =&gt; array(), &#039;add&#039; =&gt; array(&#039;mail&#039; =&gt; array(&#039;test@test.com&#039;)), &#039;del&#039; =&gt; array(), &#039;mod&#039; =&gt; array(), &#039;info&#039; =&gt; array()))

array
$fields
string
$attributes
array
$passwordChangeOnly
boolean
$readOnlyFields
array

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.
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.

modules

get_metaData
\account::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
\account::load_Messages()
This function fills the message array.
module_complete
\account::module_complete()
This functions returns true if all needed settings are done.

true if LDAP operation can be done

boolean
getButtonStatus
\account::getButtonStatus()
Controls if the module button the account page is visible and activated.

status (&quot;enabled&quot;, &quot;disabled&quot;, &quot;hidden&quot;)

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

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
process_attributes
\account::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
display_html_attributes
\account::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
get_pdfEntries
\account::get_pdfEntries()
Returns the PDF entries for this module.

list of possible PDF entries

array
get_uploadColumns
\account::get_uploadColumns()
Returns an array containing all input columns for the file upload.
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</p>

array

column list

array
$selectedModules
array
build_uploadAccounts
\account::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array

Provides MAC addresses for hosts.

modules

Roland Gruber

\baseModule
ieee802device
\ieee802device
Provides MAC addresses for hosts.
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.

modules

get_metaData
\ieee802device::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

HTML meta data

\htmlElement
process_attributes
\ieee802device::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\ieee802device::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\ieee802device::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.
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.

modules

__construct
\puppetClient::__construct()
Creates a new authorizedServiceObject object.

<p>account type (user, group, host)</p>

string
$scope
string
get_metaData
\puppetClient::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
display_html_attributes
\puppetClient::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\puppetClient::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\puppetClient::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\puppetClient::get_pdfEntries()
Returns the PDF entries for this module.

list of possible PDF entries

array
get_profileOptions
\puppetClient::get_profileOptions()
This function defines what attributes will be used in the account profiles and their appearance in the profile editor.
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.

meta HTML object

\htmlElement
load_profile
\puppetClient::load_profile()
Loads the values of an account profile into internal variables.

<p>hash array with profile values (identifier => value)</p>

array
$profile
array
getPossibleParentNodes
\puppetClient::getPossibleParentNodes()
Reurns a list of valid parent nodes for this node.

parent nodes (e.g. array(&#039;node1&#039;, &#039;node2&#039;))

array

Manages Windows AD (e.g. Samba 4) hosts.

modules

Roland Gruber

\baseModule
windowsHost
\windowsHost
Manages Windows AD (e.g. Samba 4) hosts.
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.

modules

get_metaData
\windowsHost::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
\windowsHost::load_Messages()
This function fills the $messages variable with output messages from this module.
display_html_attributes
\windowsHost::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\windowsHost::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
display_html_managedBy
\windowsHost::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
\windowsHost::process_managedBy()
Processes user input of the members page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\windowsHost::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\windowsHost::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.
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.

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 \posixGroup::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array delete_attributes \posixGroup::delete_attributes() Checks if the group which should be deleted is still used as primary group. `\List` display_html_attributes \posixGroup::display_html_attributes() Returns the HTML meta data for the main account page. `array` `` display_html_user \posixGroup::display_html_user() Displays selections to add or remove users from current group. `array` get_metaData \posixGroup::get_metaData() Returns meta data that is interpreted by parent class `array` get_configOptions \posixGroup::get_configOptions() Returns a list of elements for the configuration. `array` `array` `array` $scopes array $allScopes array get_pdfEntries \posixGroup::get_pdfEntries() Returns the PDF entries for this module. `array` init \posixGroup::init() This functin will be called when the module will be loaded `String` $base String load_Messages \posixGroup::load_Messages() This function fills the $messages variable with output messages from this module. module_complete \posixGroup::module_complete() This functions is used to check if all settings for this module have been made. `boolean` getButtonStatus \posixGroup::getButtonStatus() Controls if the module button the account page is visible and activated. `string` process_attributes \posixGroup::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` process_user \posixGroup::process_user() Processes user input of the user selection page. It checks if all input values are correct and updates the associated LDAP attributes. `array` save_attributes \posixGroup::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` load_profile \posixGroup::load_profile() Loads the values of an account profile into internal variables. `array` $profile array check_configOptions \posixGroup::check_configOptions() Checks input values of module settings. 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. `array` `array` `array` `` $scopes array $options array getNextGIDs \posixGroup::getNextGIDs() Returns one or more free GID numbers. `integer` `array` `mixed` $count integer $errors array getNextSambaPoolGIDs \posixGroup::getNextSambaPoolGIDs() Gets the free GID numbers from an Samba pool entry in LDAP. `integer` `array` `mixed` $count integer $errors array managesPasswordAttributes \posixGroup::managesPasswordAttributes() This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange \posixGroup::supportsForcePasswordChange() Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested \posixGroup::passwordChangeRequested() This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name. `String` `` `boolean` `array` `` $password String $modules mixed $forcePasswordChange boolean getGIDs \posixGroup::getGIDs() Returns a list of existing GID numbers. `array` getUsers \posixGroup::getUsers() Returns a list of existing users and their GID numbers and cn. `array` groupNameExists \posixGroup::groupNameExists() Checks if the given group name already exists in LDAP. `String` `boolean` $groupName String getGroupNames \posixGroup::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.

<p>IP address</p>

String

<p>IP must be a subnet</p>

boolean
$ip
String
$subnet
false
boolean
\baseModule
dhcp_settings
\dhcp_settings
Manages DHCP entries.
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.

modules

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

Manages the eduPerson extension for user accounts.

modules

Roland Gruber

\baseModule
eduPerson
\eduPerson
Manages the eduPerson extension for user accounts.
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.

modules

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

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 \quota::load_Messages() this functin fills the error message array with messages get_metaData \quota::get_metaData() Returns meta data that is interpreted by parent class `array` `` initQuotas \quota::initQuotas() Initializes the quota values. getCn \quota::getCn() Gets the cn from the Unix group module. `String` module_ready \quota::module_ready() This function is used to check if this module page can be displayed. It returns false if a module depends on data from other modules which was not yet entered. `boolean` postModifyActions \quota::postModifyActions() Quotas are set in postmodify. `` `boolean` `array` `array` $newAccount boolean $attributes array preDeleteActions \quota::preDeleteActions() Allows the module to run commands before the LDAP entry is deleted. `array` process_attributes \quota::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_attributes \quota::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` replaceSpecialChars \quota::replaceSpecialChars() Replaces special characters in HTML name values. `string` `string` $input string get_profileOptions \quota::get_profileOptions() Returns a list of elements for the account profiles. `\htmlElement` check_profileOptions \quota::check_profileOptions() Checks input values of account profiles. `array` `array` $options array load_profile \quota::load_profile() Loads the values of an account profile into internal variables. `array` $profile array get_pdfEntries \quota::get_pdfEntries() Returns the PDF entries for this module. `array` get_uploadColumns \quota::get_uploadColumns() Returns an array containing all input columns for the file upload. 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> ) `array` `array` $selectedModules array doUploadPostActions \quota::doUploadPostActions() This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data array $ids array $failed array $temp array $accounts array

Manages Samba 3 accounts for users and hosts.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
\passwordService
sambaSamAccount
\sambaSamAccount
Manages the object class "sambaSamAccount" for users and hosts.
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.

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 \sambaSamAccount::__construct() Creates a new sambaSamAccount object. `string` $scope string load_Messages \sambaSamAccount::load_Messages() this functin fills the error message array with messages get_metaData \sambaSamAccount::get_metaData() Returns meta data that is interpreted by parent class `array` `` init \sambaSamAccount::init() Initializes the module after it became part of an accountContainer `string` $base string module_ready \sambaSamAccount::module_ready() This function is used to check if this module page can be displayed. It returns false if a module depends on data from other modules which was not yet entered. `boolean` module_complete \sambaSamAccount::module_complete() This function is used to check if all settings for this module have been made. `` `boolean` load_attributes \sambaSamAccount::load_attributes() This function loads the LDAP attributes for this module. `array` $attr array save_attributes \sambaSamAccount::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` process_attributes \sambaSamAccount::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` process_sambaUserWorkstations \sambaSamAccount::process_sambaUserWorkstations() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` process_logonHours \sambaSamAccount::process_logonHours() Processes user input of the logon hours page. It checks if all input values are correct and updates the associated LDAP attributes. `array` process_time \sambaSamAccount::process_time() Processes user input of the time selection page. `array` process_terminalServer \sambaSamAccount::process_terminalServer() Processes user input of the terminal server page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_attributes \sambaSamAccount::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` display_html_sambaUserWorkstations \sambaSamAccount::display_html_sambaUserWorkstations() This function will create the HTML page to edit the allowed workstations. `\htmlElement` display_html_logonHours \sambaSamAccount::display_html_logonHours() This function will create the HTML page to edit logon hours. `\htmlElement` display_html_time \sambaSamAccount::display_html_time() This function will create the meta HTML code to show a page to change time values. `\htmlElement` display_html_terminalServer \sambaSamAccount::display_html_terminalServer() This function will create the HTML page to edit the terminal server options. `\htmlElement` display_html_profilePath \sambaSamAccount::display_html_profilePath() Displays manage profile path page. `\htmlElement` process_profilePath \sambaSamAccount::process_profilePath() Processes user input of the profile path check page. It checks if all input values are correct and updates the associated LDAP attributes. `array` get_profileOptions \sambaSamAccount::get_profileOptions() Returns a list of elements for the account profiles. `\htmlElement` load_profile \sambaSamAccount::load_profile() Loads the values of an account profile into internal variables. `array` $profile array get_pdfEntries \sambaSamAccount::get_pdfEntries() Returns the PDF entries for this module. `array` build_uploadAccounts \sambaSamAccount::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array getSelfServiceOptions \sambaSamAccount::getSelfServiceOptions() Returns the meta HTML code for each input field. format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links. `array` `array` `boolean` `array` `array` $fields array $attributes array $passwordChangeOnly boolean $readOnlyFields array checkSelfServiceOptions \sambaSamAccount::checkSelfServiceOptions() Checks if all input values are correct and returns the LDAP attributes which should be changed. <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) Calling this method does not require the existence of an enclosing {@link accountContainer}. `string` `array` `boolean` `array` `array` $fields string $attributes array $passwordChangeOnly boolean $readOnlyFields array managesPasswordAttributes \sambaSamAccount::managesPasswordAttributes() This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange \sambaSamAccount::supportsForcePasswordChange() Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested \sambaSamAccount::passwordChangeRequested() This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name. `String` `` `boolean` `array` `` $password String $modules mixed $forcePasswordChange boolean getGroupName \sambaSamAccount::getGroupName() Returns the group name of the group with the given group ID. `String` `String` $groupID String getPasswordMustChangeTime \sambaSamAccount::getPasswordMustChangeTime() Returns the time when the user needs to change his password. `array` `String` $domains array $selectedDomain String getPasswordCanChangeTime \sambaSamAccount::getPasswordCanChangeTime() Returns the time when the user can change his password. `array` `String` $domains array $selectedDomain String getHostList \sambaSamAccount::getHostList() Returns a list of existing hosts. `array` getGroupSIDList \sambaSamAccount::getGroupSIDList() Returns a list of existing hosts. `array` getDomains \sambaSamAccount::getDomains() Returns a list of existing Samba 3 domains. `array` setExpirationDate \sambaSamAccount::setExpirationDate() Sets the expiration date of this account. If all parameters are null the expiration date will be removed. `String` `String` `String` $year String $month String $day String isExtensionEnabled \sambaSamAccount::isExtensionEnabled() Returns if the Samba extension is enabled. `boolean` isDeactivated \sambaSamAccount::isDeactivated() Returns if the Samba part of the current account is deactivated. `boolean` deactivate \sambaSamAccount::deactivate() Deactivates this account. activate \sambaSamAccount::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.
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.

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 __construct \posixAccount::__construct() Creates a new windowsPosixGroup object. `string` $scope string load_Messages \posixAccount::load_Messages() This function fills the error message array with messages. get_metaData \posixAccount::get_metaData() Returns meta data that is interpreted by parent class `array` `` init \posixAccount::init() Initializes the module after it became part of an accountContainer `string` $base string module_complete \posixAccount::module_complete() This functions is used to check if all settings for this module have been made. `boolean` load_attributes \posixAccount::load_attributes() This function loads all needed LDAP attributes. `array` $attr array save_attributes \posixAccount::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` postModifyActions \posixAccount::postModifyActions() Runs the postmodify actions. `` `boolean` `array` `array` $newAccount boolean $attributes array delete_attributes \posixAccount::delete_attributes() Additional LDAP operations on delete. `\List` preDeleteActions \posixAccount::preDeleteActions() Allows the module to run commands before the LDAP entry is deleted. `array` process_attributes \posixAccount::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` checkASCII \posixAccount::checkASCII() Checks if an attribute contains only ASCII charaters and replaces invalid characters. `string` `string` $attribute string process_group \posixAccount::process_group() Processes user input of the group selection page. It checks if all input values are correct and updates the associated LDAP attributes. `array` process_homedir \posixAccount::process_homedir() Processes user input of the homedir check page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_attributes \posixAccount::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` display_html_delete \posixAccount::display_html_delete() Displays the delete homedir option for the delete page. `\htmlElement` display_html_group \posixAccount::display_html_group() Displays the group selection. `\htmlElement` display_html_homedir \posixAccount::display_html_homedir() Displays the delete homedir option for the homedir page. `\htmlElement` get_profileOptions \posixAccount::get_profileOptions() Returns a list of elements for the account profiles. `\profile` load_profile \posixAccount::load_profile() Loads the values of an account profile into internal variables. `array` $profile array get_pdfEntries \posixAccount::get_pdfEntries() Returns the PDF entries for this module. `array` check_configOptions \posixAccount::check_configOptions() Checks input values of module settings. `array` `array` `array` $scopes array $options array build_uploadAccounts \posixAccount::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array doUploadPostActions \posixAccount::doUploadPostActions() This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data array $ids array $failed array $temp array $accounts array getNextUIDs \posixAccount::getNextUIDs() Returns one or more free UID numbers. `integer` `array` `mixed` $count integer $errors array getNextSambaPoolUIDs \posixAccount::getNextSambaPoolUIDs() Gets the free UID numbers from an Samba pool entry in LDAP. `integer` `array` `mixed` $count integer $errors array getSelfServiceOptions \posixAccount::getSelfServiceOptions() Returns the meta HTML code for each input field. format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links. `array` `array` `boolean` `array` `array` $fields array $attributes array $passwordChangeOnly boolean $readOnlyFields array checkSelfServiceOptions \posixAccount::checkSelfServiceOptions() Checks if all input values are correct and returns the LDAP attributes which should be changed. <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) Calling this method does not require the existence of an enclosing {@link accountContainer}. `string` `array` `boolean` `array` `array` $fields string $attributes array $passwordChangeOnly boolean $readOnlyFields array managesPasswordAttributes \posixAccount::managesPasswordAttributes() This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange \posixAccount::supportsForcePasswordChange() Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested \posixAccount::passwordChangeRequested() This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name. `String` `` `boolean` `array` `` $password String $modules mixed $forcePasswordChange boolean getGID \posixAccount::getGID() Returns the group ID of the given group. `String` `String` $groupname String getGroupName \posixAccount::getGroupName() Returns the group name of the group with the given group ID. `String` `String` $groupID String getGroupDN \posixAccount::getGroupDN() Returns the group DN of the given group. `String` `String` $groupname String findGroups \posixAccount::findGroups() Finds all existing LDAP groups. `array` findGroupOfNames \posixAccount::findGroupOfNames() Finds all existing LDAP group of names. `array` getUIDs \posixAccount::getUIDs() Returns a list of existing UID numbers. `array` userNameExists \posixAccount::userNameExists() Checks if the given user name already exists in LDAP. `String` `boolean` $userName String getUserNames \posixAccount::getUserNames() Returns a list of all user names in LDAP. `array` areGroupOfNamesActive \posixAccount::areGroupOfNamesActive() Returns if LAM manages group of names entries. `boolean` getUserNameSuggestion \posixAccount::getUserNameSuggestion() Returns a suggestion for the user name. By deafult this wil be the first character of the first name plus the last name. `array` `String` $attrs array isLockable \posixAccount::isLockable() Returns if this account can be locked. This is the case if a hashed password is set ("{" at the beginning). isLocked \posixAccount::isLocked() Returns if the Unix part of the current account is locked. `boolean` lock \posixAccount::lock() Locks the user password of this account. unlock \posixAccount::unlock() Unlocks the user password of this account. removeFromUnixGroups \posixAccount::removeFromUnixGroups() Removes all Unix group memberships from this user. removeFromGONGroups \posixAccount::removeFromGONGroups() Removes all group of names memberships from this user. getNextUserName \posixAccount::getNextUserName() Returns the next possible user name based on the given one. 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. `String` `String` $userName String getShells \posixAccount::getShells() Returns the list of possible login shells. `array` manageCn \posixAccount::manageCn() Returns if the cn attribute should be managed. If Windows modules are active then cn will not be managed. `boolean` isOptional \posixAccount::isOptional() Returns if the Unix part can be added and removed. `boolean` getPasswordAttrName \posixAccount::getPasswordAttrName() Returns the password attribute. Usually, this is userPassword. If Windows modules are active this is unixUserPassword. `boolean` getHomedirAttrName \posixAccount::getHomedirAttrName() Returns the home directory attribute. Usually, this is homeDirectory. If Windows modules are active this is unixHomeDirectory. `boolean`

Manages Windows AD (e.g. Samba 4) users.

modules

Roland Gruber

\baseModule
\passwordService
windowsUser
\windowsUser
Manages Windows AD (e.g. Samba 4) users.
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.

modules

DEFAULT_ACCOUNT_CONTROL
\windowsUser::DEFAULT_ACCOUNT_CONTROL
512
initial account flags
AC_PWD_NEVER_EXPIRES
\windowsUser::AC_PWD_NEVER_EXPIRES
65536
password never expires
AC_SMARTCARD_REQUIRED
\windowsUser::AC_SMARTCARD_REQUIRED
262144
login requires smartcard
AC_ACCOUNT_DISABLED
\windowsUser::AC_ACCOUNT_DISABLED
2
account is disabled
AC_LOCKED_OUT
\windowsUser::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 \windowsUser::get_metaData() Returns meta data that is interpreted by parent class `array` `` init \windowsUser::init() Initializes the module after it became part of an accountContainer `string` $base string load_Messages \windowsUser::load_Messages() This function fills the $messages variable with output messages from this module. load_attributes \windowsUser::load_attributes() This function loads all needed LDAP attributes. `array` $attr array save_attributes \windowsUser::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` display_html_attributes \windowsUser::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` process_attributes \windowsUser::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_group \windowsUser::display_html_group() Displays the group selection. `\htmlElement` process_group \windowsUser::process_group() Processes user input of the group selection page. It checks if all input values are correct and updates the associated LDAP attributes. `array` postModifyActions \windowsUser::postModifyActions() Runs the postmodify actions. `` `boolean` `array` `array` $newAccount boolean $attributes array build_uploadAccounts \windowsUser::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array doUploadPostActions \windowsUser::doUploadPostActions() This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data array $ids array $failed array $temp array $accounts array get_pdfEntries \windowsUser::get_pdfEntries() Returns a list of PDF entries get_profileOptions \windowsUser::get_profileOptions() Returns a list of elements for the account profiles. `\htmlElement` load_profile \windowsUser::load_profile() Loads the values of an account profile into internal variables. `array` $profile array getSelfServiceOptions \windowsUser::getSelfServiceOptions() Returns the meta HTML code for each input field. format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links. `array` `array` `boolean` `array` `array` $fields array $attributes array $passwordChangeOnly boolean $readOnlyFields array checkSelfServiceOptions \windowsUser::checkSelfServiceOptions() Checks if all input values are correct and returns the LDAP attributes which should be changed. <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) Calling this method does not require the existence of an enclosing {@link accountContainer}. `string` `array` `boolean` `array` `array` $fields string $attributes array $passwordChangeOnly boolean $readOnlyFields array setSelfServicePassword \windowsUser::setSelfServicePassword() Sets the user password in self service. Since the change requires the old password we need to run ldapmodify for this task. Enter description here ... `array` `array` $return array $attributes array managesPasswordAttributes \windowsUser::managesPasswordAttributes() This method specifies if a module manages password attributes. 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. `boolean` supportsForcePasswordChange \windowsUser::supportsForcePasswordChange() Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested \windowsUser::passwordChangeRequested() This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name. `String` `array` `boolean` `array` $password String $modules array $forcePasswordChange boolean pwdAttributeValue \windowsUser::pwdAttributeValue() Creates the LDAP password value. `String` $password String isDeactivated \windowsUser::isDeactivated() Returns if the account is currently deactivated. `array` `boolean` $attrs array setIsDeactivated \windowsUser::setIsDeactivated() Sets if the account is currently deactivated. `boolean` `array` $deactivated boolean $attrs null array isLockedOut \windowsUser::isLockedOut() Returns if the account is currently locked out. `array` `boolean` $attrs array unlock \windowsUser::unlock() Unlocks the account. `array` $attrs array isSmartCardRequired \windowsUser::isSmartCardRequired() Returns if the account requires a smartcard to login. `array` `boolean` $attrs array setIsSmartCardRequired \windowsUser::setIsSmartCardRequired() Sets if the account requires a smartcard to login. `array` `boolean` $attrs array $requireCard boolean isNeverExpiring \windowsUser::isNeverExpiring() Returns if the account never expires. `array` `boolean` $attrs array setIsNeverExpiring \windowsUser::setIsNeverExpiring() Sets if the account never expires. `array` `boolean` $attrs array $neverExpires boolean findGroups \windowsUser::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.
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.

modules

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

Manages DHCP ranges for DHCP server.

modules

Thomas Manninger

Roland Gruber

\baseModule
range
\range
Manages DHCP ranges for DHCP server.
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.

modules

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

Manages DDNS entries.

modules

Thomas Manninger

Roland Gruber

\baseModule
ddns
\ddns
Manages DDNS entries.
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.

modules

$ddns array() standard DDNS settings get_metaData \ddns::get_metaData() Returns meta data that is interpreted by parent class. `array` load_Messages \ddns::load_Messages() This function fills the message array. module_complete \ddns::module_complete() This functions returns true if all needed settings are done. `boolean` save_attributes \ddns::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` check_if_ddns_is_enable \ddns::check_if_ddns_is_enable() This function check if ddns is enable. process_attributes \ddns::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` process_attributes_mainSettings \ddns::process_attributes_mainSettings() Process for mainsettings process_attributes_account \ddns::process_attributes_account() Process for account display_html_attributes \ddns::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` get_pdfEntries \ddns::get_pdfEntries() Returns the PDF entries for this module. `array` getDNSServer \ddns::getDNSServer() Returns the IP of the DNS server. `String` getZoneNames \ddns::getZoneNames() Returns the zone names. `array` isDynDNSActivated \ddns::isDynDNSActivated() Returns if DDNS is activated. `boolean` setDynDNSActivated \ddns::setDynDNSActivated() Sets if DDNS is activated. `boolean` $activated boolean addFixIPs \ddns::addFixIPs() Returns if fixed IPs are added to DDNS. `boolean` setFixIPs \ddns::setFixIPs() Sets if client updates are ignored. `boolean` $add boolean isIgnoreClientUpdates \ddns::isIgnoreClientUpdates() Returns if client updates are ignored. `boolean` setIgnoreClientUpdates \ddns::setIgnoreClientUpdates() Sets if client updates are ignored. `boolean` $ignore boolean getUpdateKey \ddns::getUpdateKey() Returns the key for DNS updates. `String` setUpdateKey \ddns::setUpdateKey() Sets the key for DNS updates. `String` $key String load_attributes \ddns::load_attributes() This function loads the LDAP attributes when an account should be loaded. 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()}. `array` $attributes array build_uploadAccounts \ddns::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array

Manages Samba 3 accounts for groups.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
sambaGroupMapping
\sambaGroupMapping
Manages the object class "sambaGroupMapping" for groups.
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.

modules

$rids Array of well known RIDs $sambaGroupTypes Array of sambaGroupTypes $cachedDomainList null cache for domain list $sidCache null cache for existing Samba entries (array(dn => cn)) __construct \sambaGroupMapping::__construct() Creates a new module for Samba 3 groups. `string` $scope string get_metaData \sambaGroupMapping::get_metaData() Returns meta data that is interpreted by parent class `array` `` getGID \sambaGroupMapping::getGID() Gets the GID number from the Unix group module. `String` getCn \sambaGroupMapping::getCn() Gets the cn from the Unix group module. `String` get_uploadColumns \sambaGroupMapping::get_uploadColumns() Returns an array containing all input columns for the file upload. 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> ) `array` `array` `` $selectedModules array build_uploadAccounts \sambaGroupMapping::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array display_html_attributes \sambaGroupMapping::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` display_html_members \sambaGroupMapping::display_html_members() This function will create the meta HTML code to show a page to add members. `\htmlElement` process_members \sambaGroupMapping::process_members() Processes user input of the members page. It checks if all input values are correct and updates the associated LDAP attributes. `array` get_pdfEntries \sambaGroupMapping::get_pdfEntries() Returns the PDF entries for this module. `array` get_profileOptions \sambaGroupMapping::get_profileOptions() Returns a list of elements for the account profiles. `\htmlElement` load_profile \sambaGroupMapping::load_profile() Loads the values of an account profile into internal variables. `array` $profile array load_Messages \sambaGroupMapping::load_Messages() this functin fills the error message array with messages module_ready \sambaGroupMapping::module_ready() This function is used to check if this module page can be displayed. It returns false if a module depends on data from other modules which was not yet entered. `boolean` module_complete \sambaGroupMapping::module_complete() This function is used to check if all settings for this module have been made. `` `boolean` process_attributes \sambaGroupMapping::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` save_attributes \sambaGroupMapping::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` getDomains \sambaGroupMapping::getDomains() Returns a list of existing Samba 3 domains. `array` loadSIDCache \sambaGroupMapping::loadSIDCache() Loads the list of Samba accounts into the cache.

Manages Unix shadow accounts for users.

modules

Tilo Lutz

Roland Gruber

Michael Duergner

\baseModule
\passwordService
shadowAccount
\shadowAccount
Manages the object class "shadowAccount" for users.
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.

modules

__construct
\shadowAccount::__construct()
Creates a new shadowAccount object.

<p>account type (user, group, host)</p>

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

array with meta data

array
save_attributes
\shadowAccount::save_attributes()
Returns a list of modifications which have to be made to the LDAP account.

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
process_attributes
\shadowAccount::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
display_html_attributes
\shadowAccount::display_html_attributes()
This function will create the meta HTML code to show a page with all attributes.

meta HTML code

array
process_expire
\shadowAccount::process_expire()
Processes user input of the expiration page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
display_html_expire
\shadowAccount::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
\shadowAccount::get_pdfEntries()
Returns the PDF entries for this module.

list of possible PDF entries

array
build_uploadAccounts
\shadowAccount::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
load_profile
\shadowAccount::load_profile()
Loads the values of an account profile into internal variables.

<p>hash array with profile values (identifier => value)</p>

array
$profile
array
managesPasswordAttributes
\shadowAccount::managesPasswordAttributes()
This method specifies if a module manages password attributes.

true if this module manages password attributes

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

force password change supported

boolean
passwordChangeRequested
\shadowAccount::passwordChangeRequested()
This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name.

<p>new password</p>

String

<p>list of modules for which the password should be changed</p>

<p>force the user to change his password at next login</p>

boolean

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

array
$password
String
$modules
mixed
$forcePasswordChange
boolean
setExpirationDate
\shadowAccount::setExpirationDate()
Sets the expiration date of this account.
If all parameters are null the expiration date will be removed.

<p>year (e.g. 2040)</p>

String

<p>month (e.g. 8)</p>

String

<p>day (e.g. 27)</p>

String
$year
String
$month
String
$day
String

Manages SSH public keys.

modules

Roland Gruber

Andrew Dibble &lt;adibble@mobitv.com&gt;

\baseModule
ldapPublicKey
\ldapPublicKey
Manages SSH public keys.
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.

modules

SESS_KEY_LIST
\ldapPublicKey::SESS_KEY_LIST
'ldapPublicKey_keyList'
session variable for existing keys in self service
get_metaData
\ldapPublicKey::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
\ldapPublicKey::load_Messages()
This function fills the message array.
display_html_attributes
\ldapPublicKey::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\ldapPublicKey::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\ldapPublicKey::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

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

<p>list of active fields</p>

array

<p>attributes of LDAP account</p>

array

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

boolean

<p>list of read-only fields</p>

array

list of meta HTML elements (field name =&gt; htmlTableRow)

array
$fields
array
$attributes
array
$passwordChangeOnly
boolean
$readOnlyFields
array
getSelfServiceKeys
\ldapPublicKey::getSelfServiceKeys()
Returns the meta HTML code to display the key area.
This also includes the file upload.

key content

\htmlTable
getSelfServiceKeysJSBlock
\ldapPublicKey::getSelfServiceKeysJSBlock()
Returns the Java Script functions to manage the keys.

JS block

\htmlJavaScript
checkSelfServiceOptions
\ldapPublicKey::checkSelfServiceOptions()
Checks if all input values are correct and returns the LDAP attributes which should be changed.
<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)

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

<p>input fields</p>

string

<p>LDAP attributes</p>

array

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

boolean

<p>list of read-only fields</p>

array

messages and attributes (array(&#039;messages&#039; =&gt; array(), &#039;add&#039; =&gt; array(&#039;mail&#039; =&gt; array(&#039;test@test.com&#039;)), &#039;del&#039; =&gt; array(), &#039;mod&#039; =&gt; array(), &#039;info&#039; =&gt; array()))

array
$fields
string
$attributes
array
$passwordChangeOnly
boolean
$readOnlyFields
array
handleAjaxRequest
\ldapPublicKey::handleAjaxRequest()
Manages AJAX requests.
This function may be called with or without an account container.
ajaxUpload
\ldapPublicKey::ajaxUpload()
Handles an AJAX file upload and prints the JSON result.
ajaxDeleteSelfServiceKey
\ldapPublicKey::ajaxDeleteSelfServiceKey()
Manages the deletion of a key.

<p>JSON data</p>

array
$data
array
invalidAjaxRequest
\ldapPublicKey::invalidAjaxRequest()
Invalid AJAX request received.

<p>error message</p>

String
$message
null
String

Manages Unix groups in Windows LDAP schema.

modules

Roland Gruber

\posixGroup
windowsPosixGroup
\windowsPosixGroup
Manages Unix groups in Windows LDAP schema.
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.

modules

__construct
\windowsPosixGroup::__construct()
Creates a new windowsPosixGroup object.

<p>account type (user, group, host)</p>

string
$scope
string
get_metaData
\windowsPosixGroup::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

array
getButtonStatus
\windowsPosixGroup::getButtonStatus()
Controls if the module button the account page is visible and activated.

status (&quot;enabled&quot;, &quot;disabled&quot;, &quot;hidden&quot;)

string
module_complete
\windowsPosixGroup::module_complete()
This functions is used to check if all settings for this module have been made.

true, if settings are complete

boolean

Manages entries based on the object class nisNetgroup.

modules

Roland Gruber

\baseModule
nisnetgroup
\nisnetgroup
Manages entries based on the object class nisNetgroup.
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.

modules

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

Manages Samba 3 domain entries.

modules

Roland Gruber

\baseModule
sambaDomain
\sambaDomain
Manages Samba 3 domain entries.
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.

modules

get_metaData
\sambaDomain::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

HTML meta data

\htmlElement
process_attributes
\sambaDomain::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\sambaDomain::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\sambaDomain::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. name and address).
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.

modules

SESS_CERTIFICATES_LIST
\inetOrgPerson::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 \inetOrgPerson::load_Messages() This function fills the message array. get_metaData \inetOrgPerson::get_metaData() Returns meta data that is interpreted by parent class `array` `` module_complete \inetOrgPerson::module_complete() This functions return true if all needed settings are done. `boolean` getButtonStatus \inetOrgPerson::getButtonStatus() Controls if the module button the account page is visible and activated. `string` save_attributes \inetOrgPerson::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` process_attributes \inetOrgPerson::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_attributes \inetOrgPerson::display_html_attributes() Returns the HTML meta data for the main account page. `array` process_photo \inetOrgPerson::process_photo() Sets a new photo. display_html_photo \inetOrgPerson::display_html_photo() Displays the photo upload page. `array` display_html_manager \inetOrgPerson::display_html_manager() This function will create the meta HTML code to show a page to change the manager attribute. `\htmlElement` process_manager \inetOrgPerson::process_manager() Processes user input of the manager page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_userCertificate \inetOrgPerson::display_html_userCertificate() Displays the certificate upload page. `array` process_userCertificate \inetOrgPerson::process_userCertificate() Sets a new certificate or deletes old ones. get_pdfEntries \inetOrgPerson::get_pdfEntries() Returns the PDF entries for this module. `array` load_profile \inetOrgPerson::load_profile() Loads the values of an account profile into internal variables. `array` $profile array check_profileOptions \inetOrgPerson::check_profileOptions() Checks input values of account profiles. `array` `array` $options array get_uploadColumns \inetOrgPerson::get_uploadColumns() Returns an array containing all input columns for the file upload. 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> ) `array` `array` $selectedModules array build_uploadAccounts \inetOrgPerson::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array doUploadPostActions \inetOrgPerson::doUploadPostActions() This function executes one post upload action. `array` `array` `array` `array` `array` `array` $data array $ids array $failed array $temp array $accounts array getSelfServiceOptions \inetOrgPerson::getSelfServiceOptions() Returns the meta HTML code for each input field. format: array(<field1> => array(<META HTML>), ...) It is not possible to display help links. `array` `array` `boolean` `array` `array` $fields array $attributes array $passwordChangeOnly boolean $readOnlyFields array getSelfServiceUserCertificates \inetOrgPerson::getSelfServiceUserCertificates() Returns the meta HTML code to display the certificate area. This also includes the file upload. `\htmlTable` getSelfServiceUserCertificatesJSBlock \inetOrgPerson::getSelfServiceUserCertificatesJSBlock() Returns the Java Script functions to manage the certificates. `\htmlJavaScript` checkSelfServiceOptions \inetOrgPerson::checkSelfServiceOptions() Checks if all input values are correct and returns the LDAP attributes which should be changed. <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) Calling this method does not require the existence of an enclosing {@link accountContainer}. `string` `array` `boolean` `array` `array` $fields string $attributes array $passwordChangeOnly boolean $readOnlyFields array handleAjaxRequest \inetOrgPerson::handleAjaxRequest() Manages AJAX requests. This function may be called with or without an account container. ajaxUpload \inetOrgPerson::ajaxUpload() Handles an AJAX file upload and prints the JSON result. ajaxDeleteSelfServiceUserCertificate \inetOrgPerson::ajaxDeleteSelfServiceUserCertificate() Manages the deletion of a certificate. `array` $data array invalidAjaxRequest \inetOrgPerson::invalidAjaxRequest() Invalid AJAX request received. `String` $message null String managesPasswordAttributes \inetOrgPerson::managesPasswordAttributes() This method specifies if a module manages password attributes. `` `boolean` supportsForcePasswordChange \inetOrgPerson::supportsForcePasswordChange() Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested \inetOrgPerson::passwordChangeRequested() This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name. `String` `` `boolean` `array` `` $password String $modules mixed $forcePasswordChange boolean getManagers \inetOrgPerson::getManagers() Returns a list of possible managers. `array` initCache \inetOrgPerson::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.
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.

modules

get_metaData
\systemQuotas::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

array
load_Messages
\systemQuotas::load_Messages()
This function fills the $messages variable with output messages from this module.
display_html_attributes
\systemQuotas::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\systemQuotas::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
checkQuota
\systemQuotas::checkQuota()
Checks if the quota parameters are valid.

<p>mountpoint</p>

String

<p>soft block limit</p>

int

<p>hard block limit</p>

int

<p>soft inode limit</p>

int

<p>hard inode limit</p>

int

<p>position is upload table</p>

boolean

array where error messages are returned

array
$path
String
$softBlock
int
$hardBlock
int
$softInode
int
$hardInode
int
$uploadIndex
null
boolean
check_profileOptions
\systemQuotas::check_profileOptions()
Checks input values of account profiles.

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

array

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

array
$options
array
load_profile
\systemQuotas::load_profile()
Loads the values of an account profile into internal variables.

<p>hash array with profile values (identifier => value)</p>

array
$profile
array
build_uploadAccounts
\systemQuotas::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\systemQuotas::get_pdfEntries()
Returns a list of PDF entries

Manages FreeRadius accounts.

modules

Roland Gruber

\baseModule
freeRadius
\freeRadius
Manages FreeRadius accounts.
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.

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 \freeRadius::__construct() Creates a new freeRadius object. `string` $scope string get_metaData \freeRadius::get_metaData() Returns meta data that is interpreted by parent class `array` `` load_Messages \freeRadius::load_Messages() This function fills the error message array with messages display_html_attributes \freeRadius::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` process_attributes \freeRadius::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_expiration \freeRadius::display_html_expiration() This function will create the meta HTML code to show a page to change the expiration date. `\htmlElement` process_expiration \freeRadius::process_expiration() Processes user input of the time selection page. `array` build_uploadAccounts \freeRadius::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array get_pdfEntries \freeRadius::get_pdfEntries() Returns the PDF entries for this module. `array` check_profileOptions \freeRadius::check_profileOptions() Checks input values of account profiles. `array` `array` $options array load_profile \freeRadius::load_profile() Loads the values of an account profile into internal variables. `array` $profile array formatExpirationDate \freeRadius::formatExpirationDate() Formats the expiration date attribute. `String` $date String

Manages Asterisk extensions.

modules

Pavel Pozdniak

Roland Gruber

\baseModule
asteriskExtension
\asteriskExtension
Manages Asterisk extensions.
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.

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 \asteriskExtension::get_metaData() Returns meta data that is interpreted by parent class `array` load_Messages \asteriskExtension::load_Messages() This function fills the error message array with messages display_html_attributes \asteriskExtension::display_html_attributes() This function will create the meta HTML code to show a page with all attributes. `\htmlElement` render_exten_owners_set_controls \asteriskExtension::render_exten_owners_set_controls() This function prints management elements to manipulate owners of an extension. `\htmlTable` $renderContainer load_extension_parts \asteriskExtension::load_extension_parts() Loads all related extension entries. `String` $extension String render_extensions_by_priority \asteriskExtension::render_extensions_by_priority() Generates the meta HTML for the rules. `String` `\htmlTable` $extension String $renderContainer \htmlTable render_extension \asteriskExtension::render_extension() Generates the meta HTML for a single rule. `array` `int` `\htmlTable` $extensLine array $placeInList int $renderContainer \htmlTable array_sort \asteriskExtension::array_sort() Sorts an array of arrays by the given key. `array` `String` `String` $array array $on String $order 'SORT_ASC' String display_html_user \asteriskExtension::display_html_user() Displays a list of possible owners of this extension. `\htmlElement` process_user \asteriskExtension::process_user() Processes user input of the user selection page. It checks if all input values are correct and updates the associated LDAP attributes. `array` isMoveToNewSuffix \asteriskExtension::isMoveToNewSuffix() Returns if the extension was moved to another OU. `boolean` isExtensionOwnerSet \asteriskExtension::isExtensionOwnerSet() Returns true if at least one owner is set and false otherwise `boolean` process_attributes \asteriskExtension::process_attributes() Writes variables into object and does some regex checks. `array` processExtensionRows \asteriskExtension::processExtensionRows() Processes the rule data. `String` `String` `array` $extensionName String $extensionContext String setDefaultExtensionOwner \asteriskExtension::setDefaultExtensionOwner() Set extension owner as current logged in user. getDefaultExtensionOwner \asteriskExtension::getDefaultExtensionOwner() Returns the default extension owner. `String` processSingleExtension \asteriskExtension::processSingleExtension() Fills the fileds of a single extension row. In Asterisk it would only be an extension name,a priority,an application, but LDAP spicific add to processing context field. `array` `String` `String` `int` `int` $extRow array $extensionName String $extensionContext String $entryCounter int $extensionPriorityCntr int processPriorityChange \asteriskExtension::processPriorityChange() Reorders the rules if the user clicked on a move button. isThisExtensionPresented \asteriskExtension::isThisExtensionPresented() Search by extension name and retun true if fields with this extension name exists and false otherwise. Equal extension names are allowed in different OUs. `String` `boolean` $extension String generateNextExtensionName \asteriskExtension::generateNextExtensionName() This function searches in the base subtree and finds all extensions names within. 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. `String` get_pdfEntries \asteriskExtension::get_pdfEntries() Returns a list of PDF entries build_uploadAccounts \asteriskExtension::build_uploadAccounts() In this function the LDAP account is built up. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array moveExtentionToNewSuffix \asteriskExtension::moveExtentionToNewSuffix() Get list of all applications for given extension and move it into new suffix. `array` `array` $rowOrig array save_attributes \asteriskExtension::save_attributes() Returns a list of modifications which have to be made to the LDAP account. Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> <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. `array` postDeleteActions \asteriskExtension::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.
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.

modules

get_metaData
\generalInformation::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

array
display_html_attributes
\generalInformation::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\generalInformation::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

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 \sambaMungedDial::strhex() strhex $string hexstr \sambaMungedDial::hexstr() hexstr $hex endian \sambaMungedDial::endian() endian $src genTime \sambaMungedDial::genTime() genTime $minutes readTime \sambaMungedDial::readTime() readTime $time to8bit \sambaMungedDial::to8bit() to8bit $string is_samba_path \sambaMungedDial::is_samba_path() Checks if this is a valid Samba path. $path encode_munged \sambaMungedDial::encode_munged() Encode full MungedDial-String $params munge \sambaMungedDial::munge() Setup parameter given by paramName to MungedDial-Format $paramName $paramValue $isString decode_munged \sambaMungedDial::decode_munged() Takes a base64-encoded MungedDial-String and returns an array of included parameters and values $munge load \sambaMungedDial::load() function takes a base64-encoded sambaMungedDial $mungedDial getMunged \sambaMungedDial::getMunged() Returns ready-to-run mungedDialString to be filled into ldap getOnDemandFlags \sambaMungedDial::getOnDemandFlags() Returns array of flags, which can be set on-demand with activated java-script getTsLogin \sambaMungedDial::getTsLogin() Gets Terminal-Server-Login value: enabled/disabled setTsLogin \sambaMungedDial::setTsLogin() Sets Terminal-Server-Login value: enabled/disabled $checked getBrokenConn \sambaMungedDial::getBrokenConn() gets Broken-Connection value: disconnect/reset setBrokenConn \sambaMungedDial::setBrokenConn() sets Broken-Connection value: disconnect/reset $checked getReConn \sambaMungedDial::getReConn() gets Reconnection value: from any client/from previous client only setReConn \sambaMungedDial::setReConn() sets Reconnection value: from any client/from previous client only $checked getInheritMode \sambaMungedDial::getInheritMode() gets Inherit-config-from-client value: enabled/disabled setInheritMode \sambaMungedDial::setInheritMode() sets Inherit-config-from-client value: enabled/disabled $checked getShadow \sambaMungedDial::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 \sambaMungedDial::setShadow() sets shadow value $checked $value getConnectClientDrives \sambaMungedDial::getConnectClientDrives() gets connect-client-drive-at-logon value: enabled/disabled setConnectClientDrives \sambaMungedDial::setConnectClientDrives() sets connect-client-drive-at-logon value: enabled/disabled $checked getConnectClientPrinters \sambaMungedDial::getConnectClientPrinters() gets connect-client-printers-at-logon value: enabled/disabled setConnectClientPrinters \sambaMungedDial::setConnectClientPrinters() sets connect-client-printers-at-logon value: enabled/disabled $checked getDefaultPrinter \sambaMungedDial::getDefaultPrinter() gets set-client-printer-to-default value: enabled/disabled setDefaultPrinter \sambaMungedDial::setDefaultPrinter() sets set-client-printer-to-default value: enabled/disabled $checked getCtxMaxConnectionTimeF \sambaMungedDial::getCtxMaxConnectionTimeF() SMARTY: gets the checkbox state of "Connection" setCtxMaxConnectionTimeF \sambaMungedDial::setCtxMaxConnectionTimeF() SMARTY: sets the checkbox "Connection" to unchecked $checked getCtxMaxDisconnectionTimeF \sambaMungedDial::getCtxMaxDisconnectionTimeF() SMARTY: gets the checkbox state of "Disconnection" setCtxMaxDisconnectionTimeF \sambaMungedDial::setCtxMaxDisconnectionTimeF() SMARTY: sets the checkbox "Disconnection" to unchecked $checked getCtxMaxIdleTimeF \sambaMungedDial::getCtxMaxIdleTimeF() SMARTY: gets the checkbox state of "Idle" setCtxMaxIdleTimeF \sambaMungedDial::setCtxMaxIdleTimeF() SMARTY: sets the checkbox "Idle" to unchecked $checked

Manages the Asterisk extension of user accounts.

modules

Pavel Pozdnyak

Roland Gruber

\baseModule
\passwordService
asteriskVoicemail
\asteriskVoicemail
Manages the Asterisk extension of user accounts.
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.

modules

__construct
\asteriskVoicemail::__construct()
Creates a new asteriskVoicemail object.

<p>account type (user, group, host)</p>

string
$scope
string
get_metaData
\asteriskVoicemail::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

HTML meta data

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

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
module_complete
\asteriskVoicemail::module_complete()
This functions returns true if all needed settings are done.

true if LDAP operation can be done

boolean
save_attributes
\asteriskVoicemail::save_attributes()
Returns a list of modifications which have to be made to the LDAP account.

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
managesPasswordAttributes
\asteriskVoicemail::managesPasswordAttributes()
This method specifies if a module manages password attributes.

true if this module manages password attributes

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

force password change supported

boolean
passwordChangeRequested
\asteriskVoicemail::passwordChangeRequested()
This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name.

<p>new password</p>

String

<p>list of modules for which the password should be changed</p>

<p>force the user to change his password at next login</p>

boolean

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

array
$password
String
$modules
mixed
$forcePasswordChange
boolean
checkSelfServiceOptions
\asteriskVoicemail::checkSelfServiceOptions()
Checks if all input values are correct and returns the LDAP attributes which should be changed.
<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)

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

<p>input fields</p>

string

<p>LDAP attributes</p>

array

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

boolean

<p>list of read-only fields</p>

array

messages and attributes (array(&#039;messages&#039; =&gt; array(), &#039;add&#039; =&gt; array(&#039;mail&#039; =&gt; array(&#039;test@test.com&#039;)), &#039;del&#039; =&gt; array(), &#039;mod&#039; =&gt; array(), &#039;info&#039; =&gt; array()))

array
$fields
string
$attributes
array
$passwordChangeOnly
boolean
$readOnlyFields
array

Provides mail routing for user accounts.

modules

Roland Gruber

\baseModule
inetLocalMailRecipient
\inetLocalMailRecipient
Provides mail routing for users.
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.

modules

get_metaData
\inetLocalMailRecipient::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

HTML meta data

\htmlElement
process_attributes
\inetLocalMailRecipient::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\inetLocalMailRecipient::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\inetLocalMailRecipient::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.
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.

modules

Pavel Pozdniak

Roland Gruber

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

Manages DHCP host entries.

modules

Thomas Manninger

Roland Gruber

\baseModule
fixed_ip
\fixed_ip
Manages DHCP host entries.
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.

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 \fixed_ip::get_metaData() Returns meta data that is interpreted by parent class `array` `` load_Messages \fixed_ip::load_Messages() This function fills the error message array with messages. getButtonStatus \fixed_ip::getButtonStatus() Controls if the module button the account page is visible and activated. `string` overlapd_ip \fixed_ip::overlapd_ip() Checked, if ips are overlapd. `\ip` `\false,` $ip reset_overlapd_ip \fixed_ip::reset_overlapd_ip() Reset the overlapd_range() function check_mac \fixed_ip::check_mac() Check, if a mac address is invalid `\mac` `\true,` $mac reload_ips \fixed_ip::reload_ips() Adapt the fixed ip with the subnet. `\true,` load_attributes \fixed_ip::load_attributes() This function loads all needed LDAP attributes. `array` $attr array process_attributes \fixed_ip::process_attributes() Processes user input of the primary module page. It checks if all input values are correct and updates the associated LDAP attributes. `array` display_html_attributes \fixed_ip::display_html_attributes() Returns the HTML meta data for the main account page. `\htmlElement` save_attributes \fixed_ip::save_attributes() Returns a list of modifications which have to be made to the LDAP account. `array` postModifyActions \fixed_ip::postModifyActions() This function is overwritten because the fixed IPs are set after the ldap_add command. `` `boolean` `array` `array` $newAccount boolean $attributes array get_pdfEntries \fixed_ip::get_pdfEntries() Returns the PDF entries for this module. `array` extractIP \fixed_ip::extractIP() Extracts the IP from a list of DHCP statements. `array` $dhcpStatements array setIP \fixed_ip::setIP() Sets the IP in a list of DHCP statements. `array` `String` $dhcpStatements array $ip String isActive \fixed_ip::isActive() Returns if this host is active. `array` $dhcpStatements array setActive \fixed_ip::setActive() Sets if this host is active. `array` `boolean` $dhcpStatements array $active boolean

Provides Authorized Service for accounts.

modules

J de Jong

\baseModule
authorizedServiceObject
\authorizedServiceObject
Provides Authorized Service for accounts.
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.

modules

__construct
\authorizedServiceObject::__construct()
Creates a new authorizedServiceObject object.

<p>account type (user, group, host)</p>

string
$scope
string
get_metaData
\authorizedServiceObject::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
display_html_attributes
\authorizedServiceObject::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\authorizedServiceObject::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\authorizedServiceObject::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\authorizedServiceObject::get_pdfEntries()
Returns the PDF entries for this module.

list of possible PDF entries

array
load_profile
\authorizedServiceObject::load_profile()
Loads the values of an account profile into internal variables.

<p>hash array with profile values (identifier => value)</p>

array
$profile
array

Manages Windows AD (e.g. Samba 4) groups.

modules

Roland Gruber

\baseModule
windowsGroup
\windowsGroup
Manages Windows AD (e.g. Samba 4) groups.
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.

modules

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

Provides NIS mail alias management.

modules

Roland Gruber

\baseModule
nisMailAlias
\nisMailAlias
Provides NIS mail alias management.
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.

modules

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

modules

__construct
\hostObject::__construct()
Creates a new hostObject object.

<p>account type (user, group, host)</p>

string
$scope
string
get_metaData
\hostObject::get_metaData()
Returns meta data that is interpreted by parent class

array with meta data

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

list of modifications &lt;br&gt;This function returns an array with 3 entries: &lt;br&gt;array( DN1 (&#039;add&#039; =&gt; array($attr), &#039;remove&#039; =&gt; array($attr), &#039;modify&#039; =&gt; array($attr)), DN2 .... ) &lt;br&gt;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) &lt;br&gt;&quot;add&quot; are attributes which have to be added to LDAP entry &lt;br&gt;&quot;remove&quot; are attributes which have to be removed from LDAP entry &lt;br&gt;&quot;modify&quot; are attributes which have to b

array
display_html_attributes
\hostObject::display_html_attributes()
Returns the HTML meta data for the main account page.

HTML meta data

\htmlElement
process_attributes
\hostObject::process_attributes()
Processes user input of the primary module page.
It checks if all input values are correct and updates the associated LDAP attributes.

list of info/error messages

array
build_uploadAccounts
\hostObject::build_uploadAccounts()
In this function the LDAP account is built up.

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

array

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

array

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

array

<p>list of selected account modules</p>

array

list of error messages if any

array
$rawAccounts
array
$ids
array
$partialAccounts
array
$selectedModules
array
get_pdfEntries
\hostObject::get_pdfEntries()
Returns the PDF entries for this module.

list of possible PDF entries

array
load_profile
\hostObject::load_profile()
Loads the values of an account profile into internal variables.

<p>hash array with profile values (identifier => value)</p>

array
$profile
array

Simple XML parser.

Michael Duergner

PDF

xmlParser
\xmlParser
Simple XML parser.

Michael Duergner

PDF

$xmlParser XML parser __construct \xmlParser::__construct() Constructor parse \xmlParser::parse() Starts the parsing. `String` `array` $filename String

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 \baseType::__construct() Creates a new type object. getAlias \baseType::getAlias() Returns the alias name of this account type. This function must be overwritten by the child classes. `string` getDescription \baseType::getDescription() Returns the description of this account type. This function must be overwritten by the child classes. `string` getListClassName \baseType::getListClassName() Returns the class name for the list object. `string` getDefaultListAttributes \baseType::getDefaultListAttributes() Returns the default attribute list for this account type. This function must be overwritten by the child classes. `string` getListAttributeDescriptions \baseType::getListAttributeDescriptions() Returns a list of attributes which have a translated description. This is used for the head row in the list view. `array` supportsFileUpload \baseType::supportsFileUpload() Returns if entries of this type may be created via file upload. `boolean` getTitleBarTitle \baseType::getTitleBarTitle() Returns the the title text for the title bar on the new/edit page. `\accountContainer` `String` $container \accountContainer getTitleBarSubtitle \baseType::getTitleBarSubtitle() Returns the the title text for the title bar on the new/edit page. `\accountContainer` `String` $container \accountContainer getSuffixList \baseType::getSuffixList() Returns a list of LDAP suffixes for this type. `array` runEditPagePostAction \baseType::runEditPagePostAction() This function is called after the edit page is processed and before the page content is generated. This can be used to run custom handlers after each page processing. `\accountContainer` $container \accountContainer

Checks if the environment fits to run LAM.
This code checks if the PHP version is ok, the required extensions are active and the memory limit is high enough.

Roland Gruber

main

Functions to manage the PDF structures.

Michael Duergner

PDF

getPDFStructureDefinitions
\getPDFStructureDefinitions()
This function will return all available PDF structure definitions for the submitted account scope.

<p>The account scope the PDF structure definitions should be returned.</p>

string

<p>server profile name</p>

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"
string
$profile
null
string
loadPDFStructureDefinitions
\loadPDFStructureDefinitions()
This function is used to get pdf structure from xml file.
Used in createModulePDF.

<p>The account scope for wich the PDF structure should be returned.</p>

string

<p>Structure name of selected scope wich should be returned.</p>

string

PDF structure

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

<p>account type</p>

string

<p>Name of definition</p>

string

&quot;no perms&quot; if access denied or &quot;ok&quot;.

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

<p>account type</p>

string

<p>Name of definition to delete</p>

string

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

boolean
$scope
string
$definition
string
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.

<p>PDF profile names</p>

array

<p>account scope</p>

String

<p>destinations</p>

array

operation succeeded

boolean
$pdfProfiles
array
$scope
String
$dests
array()
array

This file includes functions to manage the list views.

lists

Roland Gruber

lamList
\lamList
Generates the list view.

lists

Roland Gruber

LIST_SIZE_OPTION_NAME
\lamList::LIST_SIZE_OPTION_NAME
"L_SIZE"
ID for list size config option
VIRTUAL_ATTRIBUTE_PREFIX
\lamList::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 \lamList::__construct() Constructor `string` `\lamList` $type string listReadOptionsFromCookie \lamList::listReadOptionsFromCookie() Reads the list options from the cookie value. showPage \lamList::showPage() Prints the HTML code to display the list view. listBuildFilter \lamList::listBuildFilter() Builds the regular expressions from the filter values. listCreateSortMapping \lamList::listCreateSortMapping() Determines the sort mapping and stores it in $this->sortMapping. The sort mapping is used to display the right rows when the account table is created. `array` $info array listDrawNavigationBar \lamList::listDrawNavigationBar() Draws a navigation bar to switch between pages `integer` $count integer getFilterAsTextForURL \lamList::getFilterAsTextForURL() Returns the filter as text to be used as URL parameter. `String` listPrintTableHeader \lamList::listPrintTableHeader() Prints the attribute and filter row at the account table head canBeFiltered \lamList::canBeFiltered() Returns if the given attribute can be filtered. If filtering is not possible then no filter box will be displayed. By default all attributes can be filtered. `String` `boolean` $attr String listPrintTableBody \lamList::listPrintTableBody() Prints the entry list `array` $info array listPrintToolLinks \lamList::listPrintToolLinks() Prints the tool image links (e.g. edit and delete) for each account. `array` `String` $account array $id String listPrintTableCellContent \lamList::listPrintTableCellContent() Prints the content of a cell in the account list for a given LDAP entry and attribute. `array` `string` $entry array $attribute string listDoPost \lamList::listDoPost() Manages all POST actions (e.g. button pressed) for the account lists. `String` showPDFPage \lamList::showPDFPage() Shows the page where the user may select the PDF options. `String` $id String listShowOUSelection \lamList::listShowOUSelection() Prints a combobox with possible sub-DNs. `\htmlGroup` listPrintButtons \lamList::listPrintButtons() Prints the create and delete buttons. `boolean` `int` $createOnly boolean addExtraInputElementsToTopArea \lamList::addExtraInputElementsToTopArea() Can be used by subclasses to add e.g. additional buttons to the top area. `\htmlGroup` `\htmlGroup` $left \htmlGroup $right \htmlGroup listPrintHeader \lamList::listPrintHeader() Prints the HTML header. listPrintFooter \lamList::listPrintFooter() Prints the HTML footer. listGetAttributeDescriptionList \lamList::listGetAttributeDescriptionList() Returns an hash array containing with all attributes to be shown and their descriptions. Format: array(attribute => description) `array` listGetParams \lamList::listGetParams() Sets some internal parameters. listRefreshData \lamList::listRefreshData() Rereads the entries from LDAP. buildLDAPAttributeFilter \lamList::buildLDAPAttributeFilter() Builds the LDAP filter based on the filter entries in the GUI. `String` forceRefresh \lamList::forceRefresh() Forces a refresh of the LDAP data. Function must be called before $this->refresh option is checked to load new LDAP data (e.g. in listGetParams). getAdditionalLDAPAttributesToRead \lamList::getAdditionalLDAPAttributesToRead() Returns a list of additional LDAP attributes that should be read. This can be used to show additional data even if the user selected other attributes to show in the list. `array` getAdditionalTools \lamList::getAdditionalTools() Returns a list of lamListTool objects to display next to the edit/delete buttons. `\lamListTool[]` listGetAllConfigOptions \lamList::listGetAllConfigOptions() Returns a list of possible configuration options. `array` listPrintConfigurationPage \lamList::listPrintConfigurationPage() Prints the list configuration page. listGetConfigOptionByID \lamList::listGetConfigOptionByID() Returns the configuration option with the given ID. `String` $ID String listConfigurationChanged \lamList::listConfigurationChanged() Called when the configuration options changed. listPrintRedirectMessages \lamList::listPrintRedirectMessages() Prints messages when another page (e.g. delete/upload) redirects to the list view.
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 \lamListTool::__construct() Constructor `String` `String` `String` `\lamListTool` $name String $image String $target String getImage \lamListTool::getImage() Returns the name of the tool image. The image is returned without path (e.g. mytool.png). All images must reside in the graphics folder. `String` getName \lamListTool::getName() Returns the tool name. This is used for the tool tip. `String` getLinkTarget \lamListTool::getLinkTarget() Returns the PHP file (relative to 'templates/lists') which will be the target for this tool. The target page will be opened with two GET parameters: DN and type (e.g. user) `String`
lamListOption
\lamListOption
Represents a list configuration option.

lists

Roland Gruber

$ID unique ID $value option value __construct \lamListOption::__construct() Creates a new config option. `String` `\lamConfigOption` $ID String getID \lamListOption::getID() Returns the option ID. `String` fillFromPostData \lamListOption::fillFromPostData() Fills the config option from POST data. `array` getValue \lamListOption::getValue() Returns the option value. The value must not contain "=" and ";". `String` setValue \lamListOption::setValue() Sets the config option value. The value must not contain "=" and ";". `String` $value String getMetaHTML \lamListOption::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 \lamBooleanListOption::__construct() Creates a new boolean option. `String` `String` `\lamBooleanListOption` $name String $ID String isSelected \lamBooleanListOption::isSelected() Returns if this option is selected. `boolean` fillFromPostData \lamBooleanListOption::fillFromPostData() Fills the config option from POST data. `array` getMetaHTML \lamBooleanListOption::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 \lamSelectListOption::__construct() Creates a new selection list option. `String` `array` `String` `\lamBooleanListOption` $name String $options array $ID String setHelpID \lamSelectListOption::setHelpID() Sets the help ID. `\Strign` $id \Strign fillFromPostData \lamSelectListOption::fillFromPostData() Fills the config option from POST data. `array` getMetaHTML \lamSelectListOption::getMetaHTML() Returns the meta HTML data to display this option. `\htmlTable`

LDAP Account Manager PDF printing library. It consists of lamPDF class, the createModulePDF() function that may be called by other pages and furthermore some helper functions.

Michael Duergner

Roland Gruber

PDF

LAMPDF_LINEWIDTH
\\LAMPDF_LINEWIDTH
190
PDF line width
createModulePDF
\createModulePDF()
This function creates the PDF output of one or more accounts.

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

array

<p>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.</p>

string

<p>returns the PDF output as String value instead of writing it to a file</p>

PDF file name

String
$accounts
array
$pdf_structure
"default"
string
$returnAsString
false
mixed
getSectionHeadline
\getSectionHeadline()
Creates a section headline.

<p>section name</p>

string

XML code for headline

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

<p>XML code of PDF entry</p>

string

<p>True if this is the first column</p>

boolean

<p>font name</p>

String

XML codes

array
$line
string
$first_td
true
boolean
$fontName
String
processFormatTags
\processFormatTags()
Formats the XML code.

<p>XML code of PDF entry</p>

string

<p>style commands</p>

string

XML code

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

<p>attributes</p>

string

<p>XML code</p>

array

XML code

array
$attrs
string
$return
array()
array

Replace str_split()

PHP

PHP_Compat

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

2004-2007 Aidan Lister &lt;aidan@php.net&gt;, Arpad Ray &lt;arpad@php.net&gt;

http://php.net/function.str_split

Aidan Lister &lt;aidan@php.net&gt;

$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

Replace bcpowmod()

PHP

PHP_Compat

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

2004-2007 Aidan Lister &lt;aidan@php.net&gt;, Arpad Ray &lt;arpad@php.net&gt;

http://php.net/function.bcpowmod

Sara Golemon &lt;pollita@php.net&gt;

$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

Replace array_fill()

PHP

PHP_Compat

MIT License

2004-2007 Aidan Lister &lt;aidan@php.net&gt;, Arpad Ray &lt;arpad@php.net&gt;

http://php.net/function.array_fill

Jim Wigginton &lt;terrafrost@php.net&gt;

$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

Pure-PHP implementation of SSHv1.
PHP versions 4 and 5

Here's a short example of how to use this library: <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>

Here's another short example: <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>

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}.

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:

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

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.

Net

Net_SSH1

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

MIT License

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

http://phpseclib.sourceforge.net

NET_SSH1_CIPHER_NONE
\\NET_SSH1_CIPHER_NONE
0
No encryption
Not supported.
NET_SSH1_CIPHER_IDEA
\\NET_SSH1_CIPHER_IDEA
1
IDEA in CFB mode
Not supported.
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
All implementations are required to support this
NET_SSH1_CIPHER_BROKEN_TSS
\\NET_SSH1_CIPHER_BROKEN_TSS
4
TRI's Simple Stream encryption CBC
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)
NET_SSH1_CIPHER_BLOWFISH
\\NET_SSH1_CIPHER_BLOWFISH
6
Blowfish
Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, defines it (see cipher.h) and uses it (see cipher.c)
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
This is the only method that is supported by this library.
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

private

NET_SSH1_RESPONSE_DATA
\\NET_SSH1_RESPONSE_DATA
2
The Response Data

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 &lt;terrafrost@php.net&gt;

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 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. `Integer` `` $server_key_public_exponent The Server Key Public Exponent Logged for debug purposes `` `String` `` $server_key_public_modulus The Server Key Public Modulus Logged for debug purposes `` `String` `` $host_key_public_exponent The Host Key Public Exponent Logged for debug purposes `` `String` `` $host_key_public_modulus The Host Key Public Modulus Logged for debug purposes `` `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 Logged for debug purposes `` `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 Logged for debug purposes `` `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::Net_SSH1() Default Constructor. Connects to an SSHv1 server `String` `\optional` `\optional` `\optional` `\Net_SSH1` `` $host String $port 22 $timeout 10 $cipher NET_SSH1_CIPHER_3DES login \Net_SSH1::login() Login `String` `\optional` `Boolean` `` $username String $password '' exec \Net_SSH1::exec() Executes a command on a non-interactive shell, returns the output, and quits. 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: {@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} To execute further commands, a new Net_SSH1 object will need to be created. Returns false on failure and the output, otherwise. `` `` `String` `mixed` `` $cmd String $block true _initShell \Net_SSH1::_initShell() Creates an interactive shell `` `` `Boolean` `` write \Net_SSH1::write() Inputs a command into an interactive shell. `` `String` `Boolean` `` $cmd String read \Net_SSH1::read() Returns the output of an interactive shell when there's a match for $expect $expect can take the form of a string literal or, if $mode == NET_SSH1_READ_REGEX, a regular expression. `` `String` `Integer` `Boolean` `` $expect String $mode NET_SSH1_READ_SIMPLE Integer interactiveWrite \Net_SSH1::interactiveWrite() Inputs a command into an interactive shell. `` `String` `Boolean` `` $cmd String interactiveRead \Net_SSH1::interactiveRead() Returns the output of an interactive shell when no more output is available. 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. `` `String` `` disconnect \Net_SSH1::disconnect() Disconnect `` __destruct \Net_SSH1::__destruct() Destructor. Will be called, automatically, if you're supporting just PHP5. If you're supporting PHP4, you'll need to call disconnect(). `` _disconnect \Net_SSH1::_disconnect() Disconnect `String` `` $msg 'Client Quit' String _get_binary_packet \Net_SSH1::_get_binary_packet() Gets Binary Packets See 'The Binary Packet Protocol' of protocol-1.5.txt for more info. Also, this function could be improved upon by adding detection for the following exploit: http://www.securiteam.com/securitynews/5LP042K3FY.html `` `Array` `` _send_binary_packet \Net_SSH1::_send_binary_packet() Sends Binary Packets Returns true on success, false on failure. `` `String` `Boolean` `` $data String _crc \Net_SSH1::_crc() Cyclic Redundancy Check (CRC) 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. `` `` `String` `Integer` `` $data String _string_shift \Net_SSH1::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1 _rsa_crypt \Net_SSH1::_rsa_crypt() RSA Encrypt 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... `` `\Math_BigInteger` `Array` `\Math_BigInteger` `` $m \Math_BigInteger $key Array _define_array \Net_SSH1::_define_array() Define Array 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. `Array` `` getLog \Net_SSH1::getLog() Returns a log of the packets that have been sent and received. 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') `` `String` _format_log \Net_SSH1::_format_log() Formats a log for printing `Array` `Array` `` `String` $message_log Array $message_number_log Array getServerKeyPublicExponent \Net_SSH1::getServerKeyPublicExponent() Return the server key public exponent 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. `\optional` `String` `` $raw_output false getServerKeyPublicModulus \Net_SSH1::getServerKeyPublicModulus() Return the server key public modulus 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. `\optional` `String` `` $raw_output false getHostKeyPublicExponent \Net_SSH1::getHostKeyPublicExponent() Return the host key public exponent 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. `\optional` `String` `` $raw_output false getHostKeyPublicModulus \Net_SSH1::getHostKeyPublicModulus() Return the host key public modulus 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. `\optional` `String` `` $raw_output false getSupportedCiphers \Net_SSH1::getSupportedCiphers() Return a list of ciphers supported by SSH1 server. 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). `\optional` `Array` `` $raw_output false getSupportedAuthentications \Net_SSH1::getSupportedAuthentications() Return a list of authentications supported by SSH1 server. 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). `\optional` `Array` `` $raw_output false getServerIdentification \Net_SSH1::getServerIdentification() Return the server identification. `String` ``

Pure-PHP implementation of SSHv2.
PHP versions 4 and 5

Here are some examples of how to use this library: <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>

<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>

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:

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

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.

Net

Net_SSH2

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

MIT License

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

http://phpseclib.sourceforge.net

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 &lt;terrafrost@php.net&gt;

public

Net_SSH2

$identifier 'SSH-2.0-phpseclib_0.2' The SSH identifier `String` `` $fsock The Socket Object `Object` `` $bitmap 0 Execution Bitmap 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. `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 "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." -- http://tools.ietf.org/html/rfc4253#section-6 `` `` `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 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. `` `Integer` `` $server_public_host_key Server Public Host Key `` `String` `` $session_id false Session identifer "The exchange hash H from the first key exchange is additionally used as the session identifier, which is a unique identifier for this connection." -- http://tools.ietf.org/html/rfc4253#section-7.2 `` `String` `` $exchange_hash false Exchange hash The current exchange hash `` `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 See 'Section 6.4. Data Integrity' of rfc4253 for more info. `` `Integer` `` $get_seq_no 0 Get Sequence Number See 'Section 6.4. Data Integrity' of rfc4253 for more info. `` `Integer` `` $server_channels array() Server Channels Maps client channels to server channels `` `` `Array` `` $channel_buffers array() Channel Buffers If a client requests a packet from one channel but receives two packets from another those packets should be placed in a buffer `` `` `Array` `` $channel_status array() Channel Status Contains the type of the last sent message `` `Array` `` $packet_size_client_to_server array() Packet Size Maximum packet size indexed by channel `` `Array` `` $message_number_log array() Message Number Log `` `Array` `` $message_log array() Message Log `` `Array` `` $window_size 2147483647 The Window Size Bytes the other party can send before it must wait for the window to be adjusted (0x7FFFFFFF = 4GB) `Integer` `` `` `` $window_size_client_to_server array() Window size Window size indexed by channel `` `Array` `` $signature '' Server signature Verified against $this->session_id `` `String` `` $signature_format '' Server signature format ssh-rsa or ssh-dss. `` `String` `` $interactiveBuffer '' Interactive Buffer `` `Array` `` Net_SSH2 \Net_SSH2::Net_SSH2() Default Constructor. Connects to an SSHv2 server `String` `\optional` `\optional` `\Net_SSH2` `` $host String $port 22 $timeout 10 _key_exchange \Net_SSH2::_key_exchange() Key Exchange `String` `` $kexinit_payload_server String _keyboard_interactive_login \Net_SSH2::_keyboard_interactive_login() Login via keyboard-interactive authentication See {@link http://tools.ietf.org/html/rfc4256 RFC4256} for details. This is not a full-featured keyboard-interactive authenticator. `String` `String` `Boolean` `` $username String $password String _keyboard_interactive_process \Net_SSH2::_keyboard_interactive_process() Handle the keyboard-interactive requests / responses. `String` `Boolean` `` exec \Net_SSH2::exec() Execute Command 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. `String` `\optional` `String` `` $command String $block true _initShell \Net_SSH2::_initShell() Creates an interactive shell `` `` `Boolean` `` read \Net_SSH2::read() Returns the output of an interactive shell 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. `` `String` `Integer` `String` `` $expect String $mode NET_SSH2_READ_SIMPLE Integer write \Net_SSH2::write() Inputs a command into an interactive shell. `` `String` `Boolean` `` $cmd String disconnect \Net_SSH2::disconnect() Disconnect `` __destruct \Net_SSH2::__destruct() Destructor. Will be called, automatically, if you're supporting just PHP5. If you're supporting PHP4, you'll need to call disconnect(). `` _get_binary_packet \Net_SSH2::_get_binary_packet() Gets Binary Packets See '6. Binary Packet Protocol' of rfc4253 for more info. `` `String` `` _filter \Net_SSH2::_filter() Filter Binary Packets Because some binary packets need to be ignored... `` `String` `` $payload _get_channel_packet \Net_SSH2::_get_channel_packet() Gets channel data Returns the data as a string if it's available and false if not. `` `Mixed` `` $client_channel mixed $skip_extended false _send_binary_packet \Net_SSH2::_send_binary_packet() Sends Binary Packets See '6. Binary Packet Protocol' of rfc4253 for more info. `String` `` `Boolean` `` $data String _send_channel_packet \Net_SSH2::_send_channel_packet() Sends channel data Spans multiple SSH_MSG_CHANNEL_DATAs if appropriate `Integer` `String` `Boolean` `` $client_channel Integer $data String _close_channel \Net_SSH2::_close_channel() Closes and flushes a channel 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. `Integer` `Boolean` `` $client_channel Integer _disconnect \Net_SSH2::_disconnect() Disconnect `Integer` `Boolean` `` $reason Integer _string_shift \Net_SSH2::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1 _define_array \Net_SSH2::_define_array() Define Array 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. `Array` `` getLog \Net_SSH2::getLog() Returns a log of the packets that have been sent and received. 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') `` `String` _format_log \Net_SSH2::_format_log() Formats a log for printing `Array` `Array` `` `String` $message_log Array $message_number_log Array getErrors \Net_SSH2::getErrors() Returns all errors `String` `` getLastError \Net_SSH2::getLastError() Returns the last error `String` `` getServerIdentification \Net_SSH2::getServerIdentification() Return the server identification. `String` `` getKexAlgorithms \Net_SSH2::getKexAlgorithms() Return a list of the key exchange algorithms the server supports. `Array` `` getServerHostKeyAlgorithms \Net_SSH2::getServerHostKeyAlgorithms() Return a list of the host key (public key) algorithms the server supports. `Array` `` getEncryptionAlgorithmsClient2Server \Net_SSH2::getEncryptionAlgorithmsClient2Server() Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client. `Array` `` getEncryptionAlgorithmsServer2Client \Net_SSH2::getEncryptionAlgorithmsServer2Client() Return a list of the (symmetric key) encryption algorithms the server supports, when sending stuff to the client. `Array` `` getMACAlgorithmsClient2Server \Net_SSH2::getMACAlgorithmsClient2Server() Return a list of the MAC algorithms the server supports, when receiving stuff from the client. `Array` `` getMACAlgorithmsServer2Client \Net_SSH2::getMACAlgorithmsServer2Client() Return a list of the MAC algorithms the server supports, when sending stuff to the client. `Array` `` getCompressionAlgorithmsClient2Server \Net_SSH2::getCompressionAlgorithmsClient2Server() Return a list of the compression algorithms the server supports, when receiving stuff from the client. `Array` `` getCompressionAlgorithmsServer2Client \Net_SSH2::getCompressionAlgorithmsServer2Client() Return a list of the compression algorithms the server supports, when sending stuff to the client. `Array` `` getLanguagesServer2Client \Net_SSH2::getLanguagesServer2Client() Return a list of the languages the server supports, when sending stuff to the client. `Array` `` getLanguagesClient2Server \Net_SSH2::getLanguagesClient2Server() Return a list of the languages the server supports, when receiving stuff from the client. `Array` `` getServerPublicHostKey \Net_SSH2::getServerPublicHostKey() Returns the server public host key. 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. `Mixed` ``

Pure-PHP implementation of SFTP.
PHP versions 4 and 5

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.

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

Here's a short example of how to use this library: <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>

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:

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

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.

Net

Net_SFTP

Jim Wigginton &lt;terrafrost@php.net&gt;

MMIX Jim Wigginton

MIT License

http://phpseclib.sourceforge.net

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
Net_SSH2::exec() uses 0 and Net_SSH2::read() / Net_SSH2::write() use 1.

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 &lt;terrafrost@php.net&gt;

public

Net_SFTP

$packet_types array() Packet Types `` `Array` `` $status_codes array() Status Codes `` `Array` `` $request_id false The Request ID 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. `Integer` `` `` $packet_type -1 The Packet Type 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. `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::Net_SFTP() Default Constructor. Connects to an SFTP server `String` `\optional` `\optional` `\Net_SFTP` `` $host String $port 22 $timeout 10 login \Net_SFTP::login() Login `String` `\optional` `Boolean` `` $username String $password '' pwd \Net_SFTP::pwd() Returns the current directory name `Mixed` `` _realpath \Net_SFTP::_realpath() Canonicalize the Server-Side Path Name 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. `` `String` `\optional` `Mixed` `` $dir String chdir \Net_SFTP::chdir() Changes the current directory `String` `Boolean` `` $dir String nlist \Net_SFTP::nlist() Returns a list of files in the given directory `\optional` `Mixed` `` $dir '.' rawlist \Net_SFTP::rawlist() Returns a detailed list of files in the given directory `\optional` `Mixed` `` $dir '.' _list \Net_SFTP::_list() Reads a list, be it detailed or not, of files in the given directory `\optional` `Mixed` `` $dir $raw true size \Net_SFTP::size() Returns the file size, in bytes, or false, on failure Files larger than 4GB will show up as being exactly 4GB. `String` `Mixed` `` $filename String stat \Net_SFTP::stat() Returns general information about a file. Returns an array on success and false otherwise. `String` `Mixed` `` $filename String lstat \Net_SFTP::lstat() Returns general information about a file or symbolic link. Returns an array on success and false otherwise. `String` `Mixed` `` $filename String _stat \Net_SFTP::_stat() Returns general information about a file or symbolic link Determines information without calling Net_SFTP::_realpath(). The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT. `String` `Integer` `Mixed` `` $filename String $type Integer _size \Net_SFTP::_size() Returns the file size, in bytes, or false, on failure Determines the size without calling Net_SFTP::_realpath() `String` `Mixed` `` $filename String chmod \Net_SFTP::chmod() Set permissions on a file. Returns the new file permissions on success or FALSE on error. `Integer` `String` `Mixed` `` $mode Integer $filename String mkdir \Net_SFTP::mkdir() Creates a directory. `String` `Boolean` `` $dir String rmdir \Net_SFTP::rmdir() Removes a directory. `String` `Boolean` `` $dir String _read_put_responses \Net_SFTP::_read_put_responses() Reads multiple successive SSH_FXP_WRITE responses 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. `Integer` `Boolean` `` $i Integer get \Net_SFTP::get() Downloads a file from the SFTP server. 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 `String` `\optional` `Mixed` `` $remote_file String $local_file false delete \Net_SFTP::delete() Deletes a file on the SFTP server. `String` `Boolean` `` $path String rename \Net_SFTP::rename() Renames a file or a directory on the SFTP server `String` `String` `Boolean` `` $oldname String $newname String _parseAttributes \Net_SFTP::_parseAttributes() Parse Attributes See '7. File Attributes' of draft-ietf-secsh-filexfer-13 for more info. `String` `Array` `` $response String _parseLongname \Net_SFTP::_parseLongname() Parse Longname 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}. If the longname is in an unrecognized format bool(false) is returned. `String` `Mixed` `` $longname String _send_sftp_packet \Net_SFTP::_send_sftp_packet() Sends SFTP Packets See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info. `Integer` `String` `` `` `Boolean` `` $type Integer $data String _get_sftp_packet \Net_SFTP::_get_sftp_packet() Receives SFTP Packets See '6. General Packet Format' of draft-ietf-secsh-filexfer-13 for more info. 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. `` `String` `` getSFTPLog \Net_SFTP::getSFTPLog() Returns a log of the packets that have been sent and received. 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') `` `String` getSFTPErrors \Net_SFTP::getSFTPErrors() Returns all errors `String` `` getLastSFTPError \Net_SFTP::getLastSFTPError() Returns the last error `String` `` getSupportedVersions \Net_SFTP::getSupportedVersions() Get supported SFTP versions `Array` `` _disconnect \Net_SFTP::_disconnect() Disconnect `Integer` `Boolean` `` $reason Integer

Pure-PHP arbitrary precision integer arithmetic library.
Supports base-2, base-10, base-16, and base-256 numbers. Uses the GMP or BCMath extensions, if available, and an internal implementation, otherwise.

PHP versions 4 and 5

{@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)

Math_BigInteger uses base-2**26 to perform operations such as multiplication and division and base-2**52 (ie. two base 2**26 digits) to perform addition and subtraction. Because the largest possible value when multiplying two base-2**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 << 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.

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**31 (or 2**62 for addition / subtraction).

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)

Useful resources are as follows:

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

Here's an example of how to use this library: <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>

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:

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

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.

Math

Math_BigInteger

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVI Jim Wigginton

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
MATH_BIGINTEGER_BARRETT
\\MATH_BIGINTEGER_BARRETT
1
MATH_BIGINTEGER_POWEROF2
\\MATH_BIGINTEGER_POWEROF2
2
MATH_BIGINTEGER_CLASSIC
\\MATH_BIGINTEGER_CLASSIC
3
MATH_BIGINTEGER_NONE
\\MATH_BIGINTEGER_NONE
4
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
$cache[MATH_BIGINTEGER_VARIABLE] tells us whether or not the cached data is still valid.
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
(if enabled; otherwise, the internal implementation will be used)
MATH_BIGINTEGER_MODE_GMP
\\MATH_BIGINTEGER_MODE_GMP
3
To use the GMP library
(if present; otherwise, either the BCMath or the internal implementation will be used)
MATH_BIGINTEGER_MAX_DIGIT52
\\MATH_BIGINTEGER_MAX_DIGIT52
pow(2, 52)
The largest digit that may be used in addition / subtraction
(we do pow(2, 52) instead of using 4503599627370496, directly, because some PHP installations will truncate 4503599627370496)

private

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

private

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

Jim Wigginton &lt;terrafrost@php.net&gt;

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. 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. `` `` `String` `` Math_BigInteger \Math_BigInteger::Math_BigInteger() Converts base-2, base-10, base-16, and binary strings (eg. base-256) to BigIntegers. 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. Here's an example: <code> <?php include('Math/BigInteger.php'); $a = new Math_BigInteger('0x32', 16); // 50 in base-16 echo $a->toString(); // outputs 50 ?> </code> `\optional` `\optional` `\Math_BigInteger` `` $x 0 \optional $base 10 copy \Math_BigInteger::copy() Copy an object 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: {@link http://php.net/language.oop5.basic#51624} `` `` `\Math_BigInteger` __clone \Math_BigInteger::__clone() __clone() magic method 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. `` `` `\Math_BigInteger` __sleep \Math_BigInteger::__sleep() __sleep() magic method Will be called, automatically, when serialize() is called on a Math_BigInteger object. `` `` __wakeup \Math_BigInteger::__wakeup() __wakeup() magic method Will be called, automatically, when unserialize() is called on a Math_BigInteger object. `` `` _add \Math_BigInteger::_add() Performs addition. `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value Array $x_negative Boolean $y_value Array $y_negative Boolean _subtract \Math_BigInteger::_subtract() Performs subtraction. `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value Array $x_negative Boolean $y_value Array $y_negative Boolean multiply \Math_BigInteger::multiply() Multiplies two BigIntegers Here's an example: <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> `\Math_BigInteger` `\Math_BigInteger` `` $x \Math_BigInteger _multiply \Math_BigInteger::_multiply() Performs multiplication. `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value Array $x_negative Boolean $y_value Array $y_negative Boolean _regularMultiply \Math_BigInteger::_regularMultiply() Performs long multiplication on two BigIntegers Modeled after 'multiply' in MutableBigInteger.java. `Array` `Array` `Array` `` $x_value Array $y_value Array _karatsuba \Math_BigInteger::_karatsuba() Performs Karatsuba multiplication on two BigIntegers 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}. `Array` `Array` `Array` `` $x_value Array $y_value Array _square \Math_BigInteger::_square() Performs squaring `Array` `Array` `` $x false Array _baseSquare \Math_BigInteger::_baseSquare() Performs traditional squaring on two BigIntegers 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. `Array` `Array` `` $value Array _karatsubaSquare \Math_BigInteger::_karatsubaSquare() Performs Karatsuba "squaring" on two BigIntegers 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}. `Array` `Array` `` $value Array _divide_digit \Math_BigInteger::_divide_digit() Divides a BigInteger by a regular integer abc / x = a00 / x + b0 / x + c / x `Array` `Array` `Array` `` $dividend Array $divisor Array powMod \Math_BigInteger::powMod() Performs modular exponentiation. Alias for Math_BigInteger::modPow() `\Math_BigInteger` `\Math_BigInteger` `\Math_BigInteger` `` $e \Math_BigInteger $n \Math_BigInteger _slidingWindow \Math_BigInteger::_slidingWindow() Sliding Window k-ary Modular Exponentiation 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. `\Math_BigInteger` `\Math_BigInteger` `Integer` `\Math_BigInteger` `` $e \Math_BigInteger $n \Math_BigInteger $mode Integer _reduce \Math_BigInteger::_reduce() Modular reduction For most $modes this will return the remainder. `` `` `Array` `Array` `Integer` `Array` $x Array $n Array $mode Integer _prepareReduce \Math_BigInteger::_prepareReduce() Modular reduction preperation `` `` `Array` `Array` `Integer` `Array` $x Array $n Array $mode Integer _multiplyReduce \Math_BigInteger::_multiplyReduce() Modular multiply `` `` `Array` `Array` `Array` `Integer` `Array` $x Array $y Array $n Array $mode Integer _squareReduce \Math_BigInteger::_squareReduce() Modular square `` `` `Array` `Array` `Integer` `Array` $x Array $n Array $mode Integer _mod2 \Math_BigInteger::_mod2() Modulos for Powers of Two Calculates $x%$n, where $n = 2**$e, for some $e. Since this is basically the same as doing $x & ($n-1), we'll just use this function as a wrapper for doing that. `` `` `\Math_BigInteger` `\Math_BigInteger` $n _barrett \Math_BigInteger::_barrett() Barrett Modular Reduction 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). 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." 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. `` `` `Array` `Array` `Array` $n Array $m Array _regularBarrett \Math_BigInteger::_regularBarrett() (Regular) Barrett Modular Reduction 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. `` `` `Array` `Array` `Array` $x Array $n Array _multiplyLower \Math_BigInteger::_multiplyLower() Performs long multiplication up to $stop digits If you're going to be doing array_slice($product->value, 0, $stop), some cycles can be saved. `` `Array` `Boolean` `Array` `Boolean` `Array` `` $x_value Array $x_negative Boolean $y_value Array $y_negative Boolean $stop _montgomery \Math_BigInteger::_montgomery() Montgomery Modular Reduction ($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. `` `` `` `Array` `Array` `Array` $x Array $n Array _montgomeryMultiply \Math_BigInteger::_montgomeryMultiply() Montgomery Multiply 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} `` `` `` `Array` `Array` `Array` `Array` $x Array $y Array $m Array _prepMontgomery \Math_BigInteger::_prepMontgomery() Prepare a number for use in Montgomery Modular Reductions `` `` `` `Array` `Array` `Array` $x Array $n Array _modInverse67108864 \Math_BigInteger::_modInverse67108864() Modular Inverse of a number mod 2**26 (eg. 67108864) Based off of the bnpInvDigit function implemented and justified in the following URL: {@link http://www-cs-students.stanford.edu/~tjw/jsbn/jsbn.js} The following URL provides more info: {@link http://groups.google.com/group/sci.crypt/msg/7a137205c1be7d85} 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. Thanks to Pedro Gimeno Fortea for input! `` `` `Array` `Integer` $x Array extendedGCD \Math_BigInteger::extendedGCD() $n gcd \Math_BigInteger::gcd() Calculates the greatest common divisor Say you have 693 and 609. The GCD is 21. Here's an example: <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> `\Math_BigInteger` `\Math_BigInteger` `` $n \Math_BigInteger abs \Math_BigInteger::abs() Absolute value. `\Math_BigInteger` `` _compare \Math_BigInteger::_compare() Compares two numbers. `Array` `Boolean` `Array` `Boolean` `Integer` `` `` $x_value Array $x_negative Boolean $y_value Array $y_negative Boolean equals \Math_BigInteger::equals() Tests the equality of two numbers. If you need to see if one number is greater than or less than another number, use Math_BigInteger::compare() `\Math_BigInteger` `Boolean` `` `` $x \Math_BigInteger setPrecision \Math_BigInteger::setPrecision() Set Precision Some bitwise operations give different results depending on the precision being used. Examples include left shift, not, and rotates. `\Math_BigInteger` `` `\Math_BigInteger` $bits bitwise_leftRotate \Math_BigInteger::bitwise_leftRotate() Logical Left Rotate Instead of the top x bits being dropped they're appended to the shifted bit string. `Integer` `\Math_BigInteger` `` $shift Integer bitwise_rightRotate \Math_BigInteger::bitwise_rightRotate() Logical Right Rotate Instead of the bottom x bits being dropped they're prepended to the shifted bit string. `Integer` `\Math_BigInteger` `` $shift Integer setRandomGenerator \Math_BigInteger::setRandomGenerator() Set random number generator function $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() If the random generating function is not explicitly set, it'll be assumed to be mt_rand(). `` `` `\optional` `` $generator random \Math_BigInteger::random() Generate a random number `\optional` `\optional` `\Math_BigInteger` `` $min false $max false _make_odd \Math_BigInteger::_make_odd() Make the current number odd If the current number is odd it'll be unchanged. If it's even, one will be added to it. `` `` _lshift \Math_BigInteger::_lshift() Logical Left Shift Shifts BigInteger's by $shift bits. `Integer` `` $shift Integer _rshift \Math_BigInteger::_rshift() Logical Right Shift Shifts BigInteger's by $shift bits. `Integer` `` $shift Integer _normalize \Math_BigInteger::_normalize() Normalize Removes leading zeros and truncates (if necessary) to maintain the appropriate precision `\Math_BigInteger` `\Math_BigInteger` `` `` $result _trim \Math_BigInteger::_trim() Trim Removes leading zeros `\Math_BigInteger` `` $value _array_repeat \Math_BigInteger::_array_repeat() Array Repeat `` `` `Array` `` $input mixed $multiplier mixed _base256_lshift \Math_BigInteger::_base256_lshift() Logical Left Shift Shifts binary strings $shift bits, essentially multiplying by 2**$shift. `` `` `String` `` $x mixed $shift mixed _base256_rshift \Math_BigInteger::_base256_rshift() Logical Right Shift Shifts binary strings $shift bits, essentially dividing by 2**$shift and returning the remainder. `` `` `String` `` $x mixed $shift mixed _int2bytes \Math_BigInteger::_int2bytes() Converts 32-bit integers to bytes. `Integer` `String` `` $x Integer _bytes2int \Math_BigInteger::_bytes2int() Converts bytes to 32-bit integers `String` `Integer` `` $x String

Pure-PHP PKCS#1 (v2.1) compliant implementation of RSA.
PHP versions 4 and 5

Here's an example of how to encrypt and decrypt text with this library: <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>

Here's an example of how to create signatures and verify signatures with this library: <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>

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:

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

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.

Crypt

Crypt_RSA

Jim Wigginton &lt;terrafrost@php.net&gt;

MMIX Jim Wigginton

MIT License

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

http://phpseclib.sourceforge.net

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.
Uses sha1 by default.
CRYPT_RSA_ENCRYPTION_PKCS1
\\CRYPT_RSA_ENCRYPTION_PKCS1
2
Use PKCS#1 padding.
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.
CRYPT_RSA_SIGNATURE_PSS
\\CRYPT_RSA_SIGNATURE_PSS
1
Use the Probabilistic Signature Scheme for signing
Uses sha1 by default.
CRYPT_RSA_SIGNATURE_PKCS1
\\CRYPT_RSA_SIGNATURE_PKCS1
2
Use the PKCS#1 scheme by default.
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.
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
(if enabled; otherwise, the internal implementation will be used)
CRYPT_RSA_PRIVATE_FORMAT_PKCS1
\\CRYPT_RSA_PRIVATE_FORMAT_PKCS1
0
PKCS#1 formatted private key
Used by OpenSSH
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
An array containing two Math_BigInteger objects.

The exponent can be indexed with any of the following:

0, e, exponent, publicExponent

The modulus can be indexed with any of the following:

1, n, modulo, modulus
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
Place in $HOME/.ssh/authorized_keys
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 &lt;terrafrost@php.net&gt;

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. n) `\Math_BigInteger` `` $k Modulus length `\Math_BigInteger` `` $exponent Exponent (ie. e or d) `\Math_BigInteger` `` $primes Primes for Chinese Remainder Theorem (ie. p and q) `Array` `` $exponents Exponents for Chinese Remainder Theorem (ie. dP and dQ) `Array` `` $coefficients Coefficients for Chinese Remainder Theorem (ie. qInv) `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 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. `` `Array` `` $current Current String For use with parsing XML formatted keys. `` `` `Mixed` `` Crypt_RSA \Crypt_RSA::Crypt_RSA() The constructor 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. `\Crypt_RSA` `` createKey \Crypt_RSA::createKey() Create public / private key pair 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. `` `\optional` `\optional` `\optional` $bits 1024 $timeout false $partial array() _convertPrivateKey \Crypt_RSA::_convertPrivateKey() Convert a private key to the appropriate format. `` `` `String` `String` $n $e $d $primes $exponents $coefficients _convertPublicKey \Crypt_RSA::_convertPublicKey() Convert a public key to the appropriate format `` `` `String` `String` $n $e _parseKey \Crypt_RSA::_parseKey() Break a public or private key down into its constituant components `` `` `` `String` `Integer` `Array` $key String $type Integer _start_element_handler \Crypt_RSA::_start_element_handler() Start Element Handler Called by xml_set_element_handler() `` `Resource` `String` `Array` $parser Resource $name String $attribs Array _stop_element_handler \Crypt_RSA::_stop_element_handler() Stop Element Handler Called by xml_set_element_handler() `` `Resource` `String` $parser Resource $name String _data_handler \Crypt_RSA::_data_handler() Data Handler Called by xml_set_character_data_handler() `` `Resource` `String` $parser Resource $data String loadKey \Crypt_RSA::loadKey() Loads a public or private key Returns true on success and false on failure (ie. an incorrect password was provided or the key was malformed) `` `String` `Integer` $key String $type false Integer setPassword \Crypt_RSA::setPassword() Sets the password 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. `` `` `` `String` $password String setPublicKey \Crypt_RSA::setPublicKey() Defines the public key 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. Do note that when a new key is loaded the index will be cleared. Returns true on success, false on failure `` `` `String` `Integer` `Boolean` $key String $type CRYPT_RSA_PUBLIC_FORMAT_PKCS1 Integer getPublicKey \Crypt_RSA::getPublicKey() Returns the public key 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. `` `` `String` `Integer` $type CRYPT_RSA_PUBLIC_FORMAT_PKCS1 Integer _generateMinMax \Crypt_RSA::_generateMinMax() Generates the smallest and largest numbers requiring $bits bits `` `Integer` `Array` $bits Integer _decodeLength \Crypt_RSA::_decodeLength() $string _encodeLength \Crypt_RSA::_encodeLength() $length _string_shift \Crypt_RSA::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1 setPrivateKeyFormat \Crypt_RSA::setPrivateKeyFormat() Determines the private key format `` `` `Integer` $format Integer setPublicKeyFormat \Crypt_RSA::setPublicKeyFormat() Determines the public key format `` `` `Integer` $format Integer setHash \Crypt_RSA::setHash() Determines which hashing function should be used 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. `` `String` $hash String setMGFHash \Crypt_RSA::setMGFHash() Determines which hashing function should be used for the mask generation function 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. `` `String` $hash String setSaltLength \Crypt_RSA::setSaltLength() Determines the salt length To quote from {@link http://tools.ietf.org/html/rfc3447#page-38 RFC3447#page-38}: Typical salt lengths in octets are hLen (the length of the output of the hash function Hash) and 0. `` `Integer` $sLen _random \Crypt_RSA::_random() Generates a random string x bytes long `` `Integer` `\optional` `String` $bytes Integer $nonzero false _i2osp \Crypt_RSA::_i2osp() Integer-to-Octet-String primitive See {@link http://tools.ietf.org/html/rfc3447#section-4.1 RFC3447#section-4.1}. `` `\Math_BigInteger` `Integer` `String` $x \Math_BigInteger $xLen Integer _os2ip \Crypt_RSA::_os2ip() Octet-String-to-Integer primitive See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}. `` `String` `\Math_BigInteger` $x String _exponentiate \Crypt_RSA::_exponentiate() Exponentiate with or without Chinese Remainder Theorem See {@link http://tools.ietf.org/html/rfc3447#section-5.1.1 RFC3447#section-5.1.2}. `` `\Math_BigInteger` `\Math_BigInteger` $x \Math_BigInteger _blind \Crypt_RSA::_blind() Performs RSA Blinding Protects against timing attacks by employing RSA Blinding. Returns $x->modPow($this->exponents[$i], $this->primes[$i]) `` `\Math_BigInteger` `\Math_BigInteger` `Integer` `\Math_BigInteger` $x \Math_BigInteger $r \Math_BigInteger $i Integer _rsaep \Crypt_RSA::_rsaep() RSAEP See {@link http://tools.ietf.org/html/rfc3447#section-5.1.1 RFC3447#section-5.1.1}. `` `\Math_BigInteger` `\Math_BigInteger` $m \Math_BigInteger _rsadp \Crypt_RSA::_rsadp() RSADP See {@link http://tools.ietf.org/html/rfc3447#section-5.1.2 RFC3447#section-5.1.2}. `` `\Math_BigInteger` `\Math_BigInteger` $c \Math_BigInteger _rsasp1 \Crypt_RSA::_rsasp1() RSASP1 See {@link http://tools.ietf.org/html/rfc3447#section-5.2.1 RFC3447#section-5.2.1}. `` `\Math_BigInteger` `\Math_BigInteger` $m \Math_BigInteger _rsavp1 \Crypt_RSA::_rsavp1() RSAVP1 See {@link http://tools.ietf.org/html/rfc3447#section-5.2.2 RFC3447#section-5.2.2}. `` `\Math_BigInteger` `\Math_BigInteger` $s \Math_BigInteger _mgf1 \Crypt_RSA::_mgf1() MGF1 See {@link http://tools.ietf.org/html/rfc3447#appendix-B.2.1 RFC3447#appendix-B.2.1}. `` `String` `Integer` `String` $mgfSeed String $maskLen _rsaes_oaep_encrypt \Crypt_RSA::_rsaes_oaep_encrypt() RSAES-OAEP-ENCRYPT 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}. `` `String` `String` `String` $m String $l '' String _rsaes_oaep_decrypt \Crypt_RSA::_rsaes_oaep_decrypt() RSAES-OAEP-DECRYPT 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: 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]. As for $l... to quote from {@link http://tools.ietf.org/html/rfc3447#page-17 RFC3447#page-17}: 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. `` `String` `String` `String` $c String $l '' String _rsaes_pkcs1_v1_5_encrypt \Crypt_RSA::_rsaes_pkcs1_v1_5_encrypt() RSAES-PKCS1-V1_5-ENCRYPT See {@link http://tools.ietf.org/html/rfc3447#section-7.2.1 RFC3447#section-7.2.1}. `` `String` `String` $m String _rsaes_pkcs1_v1_5_decrypt \Crypt_RSA::_rsaes_pkcs1_v1_5_decrypt() RSAES-PKCS1-V1_5-DECRYPT See {@link http://tools.ietf.org/html/rfc3447#section-7.2.2 RFC3447#section-7.2.2}. 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. 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. `` `String` `String` $c String _emsa_pss_encode \Crypt_RSA::_emsa_pss_encode() EMSA-PSS-ENCODE See {@link http://tools.ietf.org/html/rfc3447#section-9.1.1 RFC3447#section-9.1.1}. `` `String` `Integer` $m String $emBits Integer _emsa_pss_verify \Crypt_RSA::_emsa_pss_verify() EMSA-PSS-VERIFY See {@link http://tools.ietf.org/html/rfc3447#section-9.1.2 RFC3447#section-9.1.2}. `` `String` `String` `Integer` `String` $m String $em String $emBits Integer _rsassa_pss_sign \Crypt_RSA::_rsassa_pss_sign() RSASSA-PSS-SIGN See {@link http://tools.ietf.org/html/rfc3447#section-8.1.1 RFC3447#section-8.1.1}. `` `String` `String` $m String _rsassa_pss_verify \Crypt_RSA::_rsassa_pss_verify() RSASSA-PSS-VERIFY See {@link http://tools.ietf.org/html/rfc3447#section-8.1.2 RFC3447#section-8.1.2}. `` `String` `String` `String` $m String $s String _emsa_pkcs1_v1_5_encode \Crypt_RSA::_emsa_pkcs1_v1_5_encode() EMSA-PKCS1-V1_5-ENCODE See {@link http://tools.ietf.org/html/rfc3447#section-9.2 RFC3447#section-9.2}. `` `String` `Integer` `String` $m String $emLen Integer _rsassa_pkcs1_v1_5_sign \Crypt_RSA::_rsassa_pkcs1_v1_5_sign() RSASSA-PKCS1-V1_5-SIGN See {@link http://tools.ietf.org/html/rfc3447#section-8.2.1 RFC3447#section-8.2.1}. `` `String` `String` $m String _rsassa_pkcs1_v1_5_verify \Crypt_RSA::_rsassa_pkcs1_v1_5_verify() RSASSA-PKCS1-V1_5-VERIFY See {@link http://tools.ietf.org/html/rfc3447#section-8.2.2 RFC3447#section-8.2.2}. `` `String` `String` $m String $s setEncryptionMode \Crypt_RSA::setEncryptionMode() Set Encryption Mode Valid values include CRYPT_RSA_ENCRYPTION_OAEP and CRYPT_RSA_ENCRYPTION_PKCS1. `` `Integer` $mode Integer setSignatureMode \Crypt_RSA::setSignatureMode() Set Signature Mode Valid values include CRYPT_RSA_SIGNATURE_PSS and CRYPT_RSA_SIGNATURE_PKCS1 `` `Integer` $mode Integer encrypt \Crypt_RSA::encrypt() Encryption 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. `` `` `String` `String` $plaintext String decrypt \Crypt_RSA::decrypt() Decryption `` `` `String` `String` $ciphertext sign \Crypt_RSA::sign() Create a signature `` `` `String` `String` $message String verify \Crypt_RSA::verify() Verifies a signature `` `` `String` `String` `Boolean` $message String $signature String

Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.
Uses hash() or mhash() if available and an internal implementation, otherwise. Currently supports the following:

md2, md5, md5-96, sha1, sha1-96, sha256, sha384, and sha512

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.

PHP versions 4 and 5

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

Here's a short example of how to use this library: <code> <?php include('Crypt/Hash.php');

$hash = new Crypt_Hash('sha1');

$hash->setKey('abcdefg');

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

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:

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

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.

Crypt

Crypt_Hash

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

MIT License

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

http://phpseclib.sourceforge.net

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 &lt;terrafrost@php.net&gt;

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::Crypt_Hash() Default Constructor. `\optional` `\Crypt_Hash` `` $hash 'sha1' setKey \Crypt_Hash::setKey() Sets the key for HMACs Keys can be of any length. `` `String` $key String setHash \Crypt_Hash::setHash() Sets the hash function. `` `String` $hash String hash \Crypt_Hash::hash() Compute the HMAC. `` `String` `String` $text String getLength \Crypt_Hash::getLength() Returns the hash length (in bytes) `` `Integer` _md5 \Crypt_Hash::_md5() Wrapper for MD5 `` `String` $m _sha1 \Crypt_Hash::_sha1() Wrapper for SHA1 `` `String` $m _md2 \Crypt_Hash::_md2() Pure-PHP implementation of MD2 See {@link http://tools.ietf.org/html/rfc1319 RFC1319}. `` `String` $m _sha256 \Crypt_Hash::_sha256() Pure-PHP implementation of SHA256 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}. `` `String` $m _sha512 \Crypt_Hash::_sha512() Pure-PHP implementation of SHA384 and SHA512 `` `String` $m _rightRotate \Crypt_Hash::_rightRotate() Right Rotate `` `Integer` `Integer` `` `Integer` $int Integer $amt Integer _rightShift \Crypt_Hash::_rightShift() Right Shift `` `Integer` `Integer` `` `Integer` $int Integer $amt Integer _not \Crypt_Hash::_not() Not `` `Integer` `` `Integer` $int Integer _add \Crypt_Hash::_add() Add _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. `String` `\optional` `String` `` `` _string_shift \Crypt_Hash::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1

Pure-PHP implementation of Triple DES.
Uses mcrypt, if available, and an internal implementation, otherwise. Operates in the EDE3 mode (encrypt-decrypt-encrypt).

PHP versions 4 and 5

Here's a short example of how to use this library: <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>

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:

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

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.

Crypt

Crypt_TripleDES

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

MIT License

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

http://phpseclib.sourceforge.net

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

Jim Wigginton &lt;terrafrost@php.net&gt;

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 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. `` `String` `` $demcrypt mcrypt resource for decryption 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. `` `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::Crypt_TripleDES() Default Constructor. 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. `\optional` `\Crypt_TripleDES` `` $mode CRYPT_DES_MODE_CBC setKey \Crypt_TripleDES::setKey() Sets the key. 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. DES also requires that every eighth bit be a parity bit, however, we'll ignore that. If the key is not explicitly set, it'll be assumed to be all zero's. `` `String` $key String setIV \Crypt_TripleDES::setIV() Sets the initialization vector. (optional) 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. `` `String` $iv String _generate_xor \Crypt_TripleDES::_generate_xor() Generate CTR XOR encryption key Encrypt the output of this and XOR it against the ciphertext / plaintext to get the plaintext / ciphertext in CTR mode. `` `` `` `Integer` `String` $length Integer $iv String encrypt \Crypt_TripleDES::encrypt() Encrypts a message. `` `String` $plaintext String decrypt \Crypt_TripleDES::decrypt() Decrypts a message. `` `String` $ciphertext String enableContinuousBuffer \Crypt_TripleDES::enableContinuousBuffer() Treat consecutive "packets" as if they are a continuous buffer. Say you have a 16-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs: <code> echo $des->encrypt(substr($plaintext, 0, 8)); echo $des->encrypt(substr($plaintext, 8, 8)); </code> <code> echo $des->encrypt($plaintext); </code> The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following: <code> $des->encrypt(substr($plaintext, 0, 8)); echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code> <code> echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code> 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. 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. `` `` disableContinuousBuffer \Crypt_TripleDES::disableContinuousBuffer() Treat consecutive packets as if they are a discontinuous buffer. The default behavior. `` `` enablePadding \Crypt_TripleDES::enablePadding() Pad "packets". 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. 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) `` `` disablePadding \Crypt_TripleDES::disablePadding() Do not pad packets. `` `` _pad \Crypt_TripleDES::_pad() Pads a string Pads a string using the RSA PKCS padding standards so that its length is a multiple of the blocksize (8). 8 - (strlen($text) & 7) bytes are added, each of which is equal to chr(8 - (strlen($text) & 7) 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. `` `` $text _unpad \Crypt_TripleDES::_unpad() Unpads a string 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. `` `` $text _string_shift \Crypt_TripleDES::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1

Pure-PHP implementation of AES.
Uses mcrypt, if available, and an internal implementation, otherwise.

PHP versions 4 and 5

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.

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).

Here's a short example of how to use this library: <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>

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:

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

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.

Crypt

Crypt_AES

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVIII Jim Wigginton

MIT License

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

http://phpseclib.sourceforge.net

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

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 &lt;terrafrost@php.net&gt;

public

Crypt_AES

$enmcrypt mcrypt resource for encryption 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. `` `String` `` $demcrypt mcrypt resource for decryption 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. `` `String` `` $ecb mcrypt resource for CFB mode `` `` `String` `` Crypt_AES \Crypt_AES::Crypt_AES() Default Constructor. 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. `\optional` `\Crypt_AES` `` $mode CRYPT_AES_MODE_CBC setBlockLength \Crypt_AES::setBlockLength() Dummy function Since Crypt_AES extends Crypt_Rijndael, this function is, technically, available, but it doesn't do anything. `` `Integer` $length Integer encrypt \Crypt_AES::encrypt() Encrypts a message. $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: {@link http://www.di-mgt.com.au/cryptopad.html http://www.di-mgt.com.au/cryptopad.html} 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. `` `` `String` $plaintext String decrypt \Crypt_AES::decrypt() Decrypts a message. If strlen($ciphertext) is not a multiple of 16, null bytes will be added to the end of the string until it is. `` `` `String` $ciphertext String _mcryptSetup \Crypt_AES::_mcryptSetup() Setup mcrypt Validates all the variables. `` _encryptBlock \Crypt_AES::_encryptBlock() Encrypts a block Optimized over Crypt_Rijndael's implementation by means of loop unrolling. `` `` `String` `String` $in String _decryptBlock \Crypt_AES::_decryptBlock() Decrypts a block Optimized over Crypt_Rijndael's implementation by means of loop unrolling. `` `` `String` `String` $in String

Pure-PHP implementation of RC4.
Uses mcrypt, if available, and an internal implementation, otherwise.

PHP versions 4 and 5

Useful resources are as follows:

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

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.

Here's a short example of how to use this library: <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>

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:

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

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.

Crypt

Crypt_RC4

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

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 &lt;terrafrost@php.net&gt;

public

Crypt_RC4

$key "\0" The Key `` `String` `` $encryptStream false The Key Stream for encryption If CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT, this will be equal to the mcrypt object `` `Array` `` $decryptStream false The Key Stream for decryption If CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT, this will be equal to the mcrypt object `` `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 Only used if CRYPT_RC4_MODE == CRYPT_RC4_MODE_MCRYPT. Only possible values are MCRYPT_RC4 or MCRYPT_ARCFOUR. `` `Integer` `` $continuousBuffer false Continuous Buffer status `` `Boolean` `` Crypt_RC4 \Crypt_RC4::Crypt_RC4() Default Constructor. Determines whether or not the mcrypt extension should be used. `\optional` `\Crypt_RC4` `` setKey \Crypt_RC4::setKey() Sets the key. 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. `` `String` $key String setIV \Crypt_RC4::setIV() Dummy function. 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(). [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: {@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} `String` `` `` $iv String setMCrypt \Crypt_RC4::setMCrypt() Sets MCrypt parameters. (optional) If MCrypt is being used, empty strings will be used, unless otherwise specified. `` `` `\optional` `\optional` $algorithm_directory '' $mode_directory '' encrypt \Crypt_RC4::encrypt() Encrypts a message. `` `` `String` $plaintext String decrypt \Crypt_RC4::decrypt() Decrypts a message. $this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)). Atleast if the continuous buffer is disabled. `` `` `String` $ciphertext String _crypt \Crypt_RC4::_crypt() Encrypts or decrypts a message. `` `` `` `String` `Integer` $text String $mode Integer enableContinuousBuffer \Crypt_RC4::enableContinuousBuffer() Treat consecutive "packets" as if they are a continuous buffer. Say you have a 16-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs: <code> echo $rc4->encrypt(substr($plaintext, 0, 8)); echo $rc4->encrypt(substr($plaintext, 8, 8)); </code> <code> echo $rc4->encrypt($plaintext); </code> The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following: <code> $rc4->encrypt(substr($plaintext, 0, 8)); echo $rc4->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code> <code> echo $rc4->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code> 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. 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. `` `` disableContinuousBuffer \Crypt_RC4::disableContinuousBuffer() Treat consecutive packets as if they are a discontinuous buffer. The default behavior. `` `` enablePadding \Crypt_RC4::enablePadding() Dummy function. 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. `` `` disablePadding \Crypt_RC4::disablePadding() Dummy function. `` `` __destruct \Crypt_RC4::__destruct() Class destructor. 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. `` _closeMCrypt \Crypt_RC4::_closeMCrypt() Properly close the MCrypt objects. ``

Pure-PHP implementation of DES.
Uses mcrypt, if available, and an internal implementation, otherwise.

PHP versions 4 and 5

Useful resources are as follows:

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

Here's a short example of how to use this library: <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>

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:

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

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.

Crypt

Crypt_DES

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

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.
Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

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 &lt;terrafrost@php.net&gt;

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 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. `` `String` `` $demcrypt mcrypt resource for decryption 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. `` `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::Crypt_DES() Default Constructor. 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. `\optional` `\Crypt_DES` `` $mode CRYPT_MODE_DES_CBC setKey \Crypt_DES::setKey() Sets the key. 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. DES also requires that every eighth bit be a parity bit, however, we'll ignore that. If the key is not explicitly set, it'll be assumed to be all zero's. `` `String` $key String setIV \Crypt_DES::setIV() Sets the initialization vector. (optional) 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. `` `String` $iv String _generate_xor \Crypt_DES::_generate_xor() Generate CTR XOR encryption key Encrypt the output of this and XOR it against the ciphertext / plaintext to get the plaintext / ciphertext in CTR mode. `` `` `` `Integer` `String` $length Integer $iv String encrypt \Crypt_DES::encrypt() Encrypts a message. $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: {@link http://www.di-mgt.com.au/cryptopad.html http://www.di-mgt.com.au/cryptopad.html} 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. `` `` `String` $plaintext String decrypt \Crypt_DES::decrypt() Decrypts a message. If strlen($ciphertext) is not a multiple of 8, null bytes will be added to the end of the string until it is. `` `` `String` $ciphertext String enableContinuousBuffer \Crypt_DES::enableContinuousBuffer() Treat consecutive "packets" as if they are a continuous buffer. Say you have a 16-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs: <code> echo $des->encrypt(substr($plaintext, 0, 8)); echo $des->encrypt(substr($plaintext, 8, 8)); </code> <code> echo $des->encrypt($plaintext); </code> The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following: <code> $des->encrypt(substr($plaintext, 0, 8)); echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code> <code> echo $des->decrypt($des->encrypt(substr($plaintext, 8, 8))); </code> 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. 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. `` `` disableContinuousBuffer \Crypt_DES::disableContinuousBuffer() Treat consecutive packets as if they are a discontinuous buffer. The default behavior. `` `` enablePadding \Crypt_DES::enablePadding() Pad "packets". 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. 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) `` `` disablePadding \Crypt_DES::disablePadding() Do not pad packets. `` `` _pad \Crypt_DES::_pad() Pads a string Pads a string using the RSA PKCS padding standards so that its length is a multiple of the blocksize (8). 8 - (strlen($text) & 7) bytes are added, each of which is equal to chr(8 - (strlen($text) & 7) 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. `` `` $text _unpad \Crypt_DES::_unpad() Unpads a string 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. `` `` $text _processBlock \Crypt_DES::_processBlock() Encrypts or decrypts a 64-bit block $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. `` `String` `Integer` `String` $block String $mode Integer _prepareKey \Crypt_DES::_prepareKey() Creates the key schedule. `` `String` `Array` $key String _string_shift \Crypt_DES::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1

Random Number Generator
PHP versions 4 and 5

Here's a short example of how to use this library: <code> <?php include('Crypt/Random.php');

echo crypt_random(); ?> </code>

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:

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

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.

Crypt

Crypt_Random

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVII Jim Wigginton

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.
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.

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</p>

\optional

<p>Integer $max</p>

\optional
Integer

public

$min
0
$max
2147483647

Pure-PHP implementation of Rijndael.
Does not use mcrypt, even when available, for reasons that are explained below.

PHP versions 4 and 5

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.

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.

{@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}.}}

Here's a short example of how to use this library: <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>

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:

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

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.

Crypt

Crypt_Rijndael

Jim Wigginton &lt;terrafrost@php.net&gt;

MMVIII Jim Wigginton

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.
Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

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 &lt;terrafrost@php.net&gt;

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` `` $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::Crypt_Rijndael() Default Constructor. 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. `\optional` `\Crypt_Rijndael` `` $mode CRYPT_RIJNDAEL_MODE_CBC setKey \Crypt_Rijndael::setKey() Sets the key. 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. If the key is not explicitly set, it'll be assumed to be all null bytes. `` `String` $key String setIV \Crypt_Rijndael::setIV() Sets the initialization vector. (optional) 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. `` `String` $iv String setKeyLength \Crypt_Rijndael::setKeyLength() Sets the key length 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. `` `Integer` $length Integer setBlockLength \Crypt_Rijndael::setBlockLength() Sets the block length 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. `` `Integer` $length Integer _generate_xor \Crypt_Rijndael::_generate_xor() Generate CTR XOR encryption key Encrypt the output of this and XOR it against the ciphertext / plaintext to get the plaintext / ciphertext in CTR mode. `` `` `` `Integer` `String` $length Integer $iv String encrypt \Crypt_Rijndael::encrypt() Encrypts a message. $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: {@link http://www.di-mgt.com.au/cryptopad.html http://www.di-mgt.com.au/cryptopad.html} 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. `` `` `String` $plaintext String decrypt \Crypt_Rijndael::decrypt() Decrypts a message. 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. `` `` `String` $ciphertext String _encryptBlock \Crypt_Rijndael::_encryptBlock() Encrypts a block `` `String` `String` $in String _decryptBlock \Crypt_Rijndael::_decryptBlock() Decrypts a block `` `String` `String` $in String _setup \Crypt_Rijndael::_setup() Setup Rijndael Validates all the variables and calculates $Nr - the number of rounds that need to be performed - and $w - the key key schedule. `` _subWord \Crypt_Rijndael::_subWord() Performs S-Box substitutions `` $word _invSubWord \Crypt_Rijndael::_invSubWord() Performs inverse S-Box substitutions `` $word enablePadding \Crypt_Rijndael::enablePadding() Pad "packets". 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. 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) `` `` disablePadding \Crypt_Rijndael::disablePadding() Do not pad packets. `` `` _pad \Crypt_Rijndael::_pad() Pads a string 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) 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. `` `` $text _unpad \Crypt_Rijndael::_unpad() Unpads a string. 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. `` `` $text enableContinuousBuffer \Crypt_Rijndael::enableContinuousBuffer() Treat consecutive "packets" as if they are a continuous buffer. Say you have a 32-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs: <code> echo $rijndael->encrypt(substr($plaintext, 0, 16)); echo $rijndael->encrypt(substr($plaintext, 16, 16)); </code> <code> echo $rijndael->encrypt($plaintext); </code> The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following: <code> $rijndael->encrypt(substr($plaintext, 0, 16)); echo $rijndael->decrypt($des->encrypt(substr($plaintext, 16, 16))); </code> <code> echo $rijndael->decrypt($des->encrypt(substr($plaintext, 16, 16))); </code> 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. 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. `` `` disableContinuousBuffer \Crypt_Rijndael::disableContinuousBuffer() Treat consecutive packets as if they are a discontinuous buffer. The default behavior. `` `` _string_shift \Crypt_Rijndael::_string_shift() String Shift Inspired by array_shift `String` `\optional` `String` `` $string String $index 1

Interface between modules and other parts of LAM.

modules

Tilo Lutz

Michael Duergner

Roland Gruber

getModuleAlias
\getModuleAlias()
Returns the alias name of a module

<p>the module name</p>

string

<p>the account type ("user", "group", "host")</p>

string

alias name

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

<p>the module name</p>

string

<p>the account type ("user", "group", "host")</p>

string

true if base module

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

<p>the account type ("user", "group", "host")</p>

string

LDAP filter

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

<p>account type (user, group, host)</p>

string

<p>return only RDN attributes of these modules</p>

array

list of LDAP attributes

array
$scope
string
$selectedModules
null
array
getModulesDependencies
\getModulesDependencies()
Returns a hash array (module name => dependencies) of all module dependencies
"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)</p>

string

dependencies

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

<p>selected module names</p>

array

<p>module dependencies</p>

array

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

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

<p>selected module names</p>

array

<p>module dependencies</p>

array

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

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

<p>account type (user, group, host)</p>

string

<p>module must support LAM admin interface (default: false)</p>

boolean

list of possible modules

array
$scope
string
$mustSupportAdminInterface
false
boolean
getProfileOptions
\getProfileOptions()
Returns the elements for the profile page.

<p>account type (user, group, host)</p>

string

profile elements

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

<p>account type (user, group, host)</p>

string

<p>hash array containing all options (name => array(...))</p>

array

list of error messages

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

<p>hash array (module name => array(account types))</p>

array

configuration options

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

<p>hash array (module name => array(account types))</p>

array

<p>hash array containing all options (name => array(...))</p>

array

list of error messages

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

<p>module name</p>

string

<p>help identifier</p>

string

<p>account type</p>

string

help entry

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

<p>account type (user, group, host)</p>

string

PDF entries (field ID =&gt; field label)

array
$scope
string
getUploadColumns
\getUploadColumns()
Returns an array containing all input columns for the file upload.
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</p>

string

<p>selected account modules</p>

array

column list

array
$scope
string
$selectedModules
array
buildUploadAccounts
\buildUploadAccounts()
This function builds the LDAP accounts for the file upload.
If there are problems status messages will be printed automatically.

<p>account type</p>

string

<p>array containing one account in each element</p>

array

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

array

<p>selected account modules</p>

array

array including accounts or false if there were errors

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

<p>account type</p>

String

<p>list of selected account modules</p>

array

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

array

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

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

<p>account type</p>

string

<p>array containing one account in each element</p>

array

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

array

<p>list of accounts which were not created successfully</p>

array

<p>list of selected account modules</p>

array

<p>list of LDAP entries</p>

array

current status &lt;br&gt; array ( &lt;br&gt; &#039;status&#039; =&gt; &#039;finished&#039; | &#039;inProgress&#039; &lt;br&gt; &#039;module&#039; =&gt; &lt;name of active module&gt; &lt;br&gt; &#039;progress&#039; =&gt; 0..100 &lt;br&gt; &#039;errors&#039; =&gt; array (&lt;array of parameters for StatusMessage&gt;) &lt;br&gt; )

array
$scope
string
$data
array
$ids
array
$failed
array
$selectedModules
array
$accounts
array
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.
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</p>

string

<p>htmlElement or array of htmlElement elements</p>

mixed

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

array

<p>If true then no buttons will be displayed</p>

boolean

<p>Start value of tabulator index for input fields</p>

integer

<p>Account type</p>

string

List of input field names and their type (name =&gt; type)

array
$module
string
$input
mixed
$values
array
$restricted
boolean
$tabindex
integer
$scope
string
lamCompareDescriptiveOptions
\lamCompareDescriptiveOptions()
Helper function to sort descriptive options in parseHTML().
It compares the second entries of two arrays.

<p>first array</p>

array

<p>second array</p>

array

compare result

integer
$a
array
$b
array
printHelpLink
\printHelpLink()
Prints a LAM help link.

<p>help entry</p>

array

<p>help number</p>

String

<p>module name</p>

String

<p>account scope</p>

String
$entry
array
$number
String
$module
''
String
$scope
''
String
passwordService \passwordService This interface needs to be implemented by all account modules which manage passwords. It allows LAM to provide central password changes. `` managesPasswordAttributes \passwordService::managesPasswordAttributes() This method specifies if a module manages password attributes. 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. `boolean` supportsForcePasswordChange \passwordService::supportsForcePasswordChange() Specifies if this module supports to force that a user must change his password on next login. `boolean` passwordChangeRequested \passwordService::passwordChangeRequested() This function is called whenever the password should be changed. Account modules must change their password attributes only if the modules list contains their module name. `String` `array` `boolean` `array` $password String $modules array $forcePasswordChange boolean 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, . ..) $type This variale stores the account type. Currently "user", "group" and "host" are supported. $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 \accountContainer::__construct() Constructor `string` `string` $type string $base string getAccountModule \accountContainer::getAccountModule() Returns the account module with the given class name `string` `\baseModule` $name string getAccountModules \accountContainer::getAccountModules() Returns the included account modules. `array` get_type \accountContainer::get_type() Returns the accout type of this object (e.g. user, group, host). `string` continue_main \accountContainer::continue_main() This function is called when the user clicks on any button on the account pages. It prints the HTML code of each account page. printModuleContent \accountContainer::printModuleContent() Prints the content part provided by the current module. `array` `boolean` $result array $stopProcessing boolean printPasswordPromt \accountContainer::printPasswordPromt() Prints the input fields of the central password service. setNewPassword \accountContainer::setNewPassword() Sets the new password in all selected account modules. `array` $input array printCommonControls \accountContainer::printCommonControls() Prints common controls like the save button and the ou selection. `int` $tabindex int showSetPasswordButton \accountContainer::showSetPasswordButton() Returns if the page should show a button to set the password. `boolean` printPageHeader \accountContainer::printPageHeader() Prints the header of the account pages. printPageFooter \accountContainer::printPageFooter() Prints the footer of the account pages. printSuccessPage \accountContainer::printSuccessPage() Prints the HTML code to notify the user about the successful saving. `array` $messages array loadProfileIfRequested \accountContainer::loadProfileIfRequested() Checks if the user requested to load a profile. `boolean` printModuleTabs \accountContainer::printModuleTabs() Prints the HTML code of the module tabs. save_module_attributes \accountContainer::save_module_attributes() This function checks which LDAP attributes have changed while the account was edited. `array` `array` `array` $attributes array $orig array load_account \accountContainer::load_account() Loads an LDAP account with the given DN. `string` `array` `array` $dn string $infoAttributes array() array fixLDAPAttributes \accountContainer::fixLDAPAttributes() Fixes spelling errors in the attribute names. `array` `array` `array` $attributes array $modules array new_account \accountContainer::new_account() This function will prepare the object for a new account. save_account \accountContainer::save_account() This function will save an account to the LDAP database. `array` get_pdfEntries \accountContainer::get_pdfEntries() Returns a list of possible PDF entries for this account. `\list` sortModules \accountContainer::sortModules() Sorts the module buttons for the account page. getRDN \accountContainer::getRDN() Returns the RDN part of a given DN. `String` `String` $dn String getParentDN \accountContainer::getParentDN() Returns the parent DN of a given DN. `String` `String` $dn String getOUs \accountContainer::getOUs() Returns a list of OUs that exist for this account type. `array` __sleep \accountContainer::__sleep() Encrypts sensitive data before storing in session. `array` __wakeup \accountContainer::__wakeup() Decrypts sensitive data after accountContainer was loaded from session.

This class provides functions to calculate Samba NT and LM hashes.
The code is a conversion from createntlm.pl (Benjamin Kuit) and smbdes.c/md4.c (Andrew Tridgell).

Roland Gruber

modules

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

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 \smbHash::x() Fixes too large numbers $i lshift \smbHash::lshift() `integer` `array` `array` $count $data array permute \smbHash::permute() `array` `array` `array` $in $p $n mxor \smbHash::mxor() `array` `array` `array` $in1 array $in2 array doHash \smbHash::doHash() `array` `array` `boolean` `array` $in array $key array $forw boolean str_to_key \smbHash::str_to_key() str_to_key `string` `string` $str string smb_hash \smbHash::smb_hash() smb_hash `\unknown_type` `\unknown_type` `\unknown_type` `\unknown` $in \unknown_type $key \unknown_type $forw \unknown_type E_P16 \smbHash::E_P16() E_P16 `\unknown_type` `\unknown` $in \unknown_type lmhash \smbHash::lmhash() Calculates the LM hash of a given password. `string` `string` $password "" string nthash \smbHash::nthash() Calculates the NT hash of a given password. `string` `string` $password "" string unsigned_shift_r \smbHash::unsigned_shift_r() Unsigned shift operation for 32bit values. PHP 4 only supports signed shifts by default. $a $b

This file includes functions to perform several security checks on each page load.

lib

Roland Gruber

startSecureSession
\startSecureSession()
Starts a session and checks the environment.
The script is stopped if one of the checks fail (timeout redirection may be overriden).

<p>redirect user to login page (default: true)</p>

boolean

<p>init verification data like session ID and client IP (default: false)</p>

boolean

true if all ok, false if session expired

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

<p>log level (LOG_DEBUG, LOG_NOTICE, LOG_WARNING, LOG_ERR)</p>

string

<p>log message</p>

string
$level
string
$message
string
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.
This also checks if general write access is enabled.

<p>account type (e.g. 'user')</p>

String

true, if new entries are allowed

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

<p>account type (e.g. 'user')</p>

String

true, if entries may be deleted

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

<p>password</p>

string

true if ok, string with error message if not valid

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

<p>tool class name (e.g. toolFileUpload)</p>

String
$tool
String

This is the parent class for all account modules.
It implements the complete module interface and uses meta-data provided by the account modules for its functions.

modules

Roland Gruber

baseModule
\baseModule
Parent class of all account modules.
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.

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 \baseModule::__construct() Creates a new base module class `string` $scope string load_Messages \baseModule::load_Messages() This function fills the $messages variable with output messages from this module. Calling this method requires the existence of an enclosing {@link accountContainer}. init \baseModule::init() Initializes the module after it became part of an {@link accountContainer} Calling this method requires the existence of an enclosing {@link accountContainer}. `string` $base string load_attributes \baseModule::load_attributes() This function loads the LDAP attributes when an account should be loaded. 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()}. `array` $attributes array get_metaData \baseModule::get_metaData() This function provides meta data which is interpreted by baseModule. 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> <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> <b>Example:</b> return array("is_base" => true); `array` get_scope \baseModule::get_scope() Returns the account type of this module (user, group, host) `string` can_manage \baseModule::can_manage() Returns true if this module can manage accounts of the current type, otherwise false. Calling this method does not require the existence of an enclosing {@link accountContainer}. `boolean` `` is_base_module \baseModule::is_base_module() Returns true if your module is a base module and otherwise false. 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. `boolean` `` get_ldap_filter \baseModule::get_ldap_filter() Returns an LDAP filter for the account lists 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: (&(|(OR1)(OR2)(OR3))(AND1)(AND2)(AND3))<br> <br> <b>Example:</b> return array('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))') `string` `` get_alias \baseModule::get_alias() Returns an alias name for the module. 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. '<' or '>'). If you use different aliases dependent on the account type please make sure that there is a general alias for unknown types. `string` `` get_RDNAttributes \baseModule::get_RDNAttributes() Returns a hash array containing a list of possible LDAP attributes that can be used to form the RDN (Relative Distinguished Name). 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') `array` `` get_dependencies \baseModule::get_dependencies() This function returns a list with all depending and conflicting modules. 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")) `array` `` get_profileOptions \baseModule::get_profileOptions() This function defines what attributes will be used in the account profiles and their appearance in the profile editor. 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. `\htmlElement` `` `` check_profileOptions \baseModule::check_profileOptions() Checks input values of account profiles. 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. `array` `array` `` $options array load_profile \baseModule::load_profile() This function loads the values from an account profile to the module's internal data structures. Calling this method does not require the existence of an enclosing {@link accountContainer}. `array` `` $profile array get_configOptions \baseModule::get_configOptions() Returns a list of configuration options. 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. `array` `array` `mixed` `` `` $scopes array $allScopes array check_configOptions \baseModule::check_configOptions() Checks input values of module settings. 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. `array` `array` `array` `` $scopes array $options array get_pdfFields \baseModule::get_pdfFields() Returns a hashtable with all entries that may be printed out in the PDF. 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: <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> <b>Special commands:</b> <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> <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>' `array` `` get_pdfEntries \baseModule::get_pdfEntries() Returns the PDF entries for this module. `array` addSimplePDFField \baseModule::addSimplePDFField() Adds a simple PDF entry to the given array. `array` `String` `String` `String` `String` $result array $name String $label String $attrName null String $delimiter ', ' String get_uploadColumns \baseModule::get_uploadColumns() Returns an array containing all input columns for the file upload. 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> ) `array` `array` `` $selectedModules array get_uploadPreDepends \baseModule::get_uploadPreDepends() Returns a list of module names which must be processed in building the account befor this module. 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. `array` `` build_uploadAccounts \baseModule::build_uploadAccounts() In this function the LDAP accounts are built. 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. `array` `array` `array` `array` `array` $rawAccounts array $ids array $partialAccounts array $selectedModules array get_help \baseModule::get_help() This function returns the help entry array for a specific help id. 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> <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> <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/')) `string` `array` `` $id string module_ready \baseModule::module_ready() This function is used to check if this module page can be displayed. 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. `boolean` module_complete \baseModule::module_complete() This function is used to check if all settings for this module have been made. 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. `boolean` getButtonStatus \baseModule::getButtonStatus() Controls if the module button the account page is visible and activated. Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> <b>Possible return values:</b> <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 \baseModule::doUploadPreActions() Runs any actions that need to be done before an LDAP entry is created. `array` `array` $attributes array doUploadPostActions \baseModule::doUploadPostActions() This function is responsible to do additional tasks after the account has been created in LDAP (e.g. modifying group memberships, adding Quota etc. .). 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. `array` `array` `array` `array` `array` `array` $data array $ids array $failed array $temp array $accounts array save_attributes \baseModule::save_attributes() Returns a list of modifications which have to be made to the LDAP account. Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> <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. `array` preModifyActions \baseModule::preModifyActions() Allows the module to run commands before the LDAP entry is changed or created. Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> The modification is aborted if an error message is returned. `boolean` `array` `array` $newAccount boolean $attributes array postModifyActions \baseModule::postModifyActions() Allows the module to run commands after the LDAP entry is changed or created. Calling this method requires the existence of an enclosing {@link accountContainer}. `boolean` `array` `array` $newAccount boolean $attributes array preDeleteActions \baseModule::preDeleteActions() Allows the module to run commands before the LDAP entry is deleted. Calling this method requires the existence of an enclosing {@link accountContainer}.<br> `array` postDeleteActions \baseModule::postDeleteActions() Allows the module to run commands after the LDAP entry is deleted. Calling this method requires the existence of an enclosing {@link accountContainer}. `array` delete_attributes \baseModule::delete_attributes() This function returns an array with the same syntax as save_attributes(). Calling this method requires the existence of an enclosing {@link accountContainer}.<br> <br> It allows additional LDAP changes when an account is deleted. `\List` display_html_delete \baseModule::display_html_delete() This function creates meta HTML code which will be displayed when an account should be deleted. 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. `\htmlElement` `` process_attributes \baseModule::process_attributes() This function processes user input. 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.')); `array` display_html_attributes \baseModule::display_html_attributes() This function creates meta HTML code to display the module page. Calling this method requires the existence of an enclosing {@link accountContainer}. `\htmlElement` `` addSimpleInputTextField \baseModule::addSimpleInputTextField() Adds a simple text input field to the given htmlTable. 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. `\htmlTable` `String` `String` `boolean` `integer` `boolean` $container \htmlTable $attrName String $label String $required false boolean $length null integer $isTextArea false boolean addMultiValueInputTextField \baseModule::addMultiValueInputTextField() Adds a text input field that may contain multiple values to the given htmlTable. 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. `\htmlTable` `String` `String` `boolean` `integer` `boolean` $container \htmlTable $attrName String $label String $required false boolean $length null integer $isTextArea false boolean processMultiValueInputTextField \baseModule::processMultiValueInputTextField() Validates a multi-value text field. 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]). `String` `array` `String` $attrName String $errors array $validationID null String addSimpleSelfServiceTextField \baseModule::addSimpleSelfServiceTextField() Adds a simple text input field for the self service. The field name will be the same as the class name plus "_" plus attribute name (e.g. posixAccount_cn). `array` `String` `String` `array` `array` `array` `boolean` `boolean` $container array $name String $label String $fields array $attributes array $readOnlyFields array $required false boolean $isTextArea false boolean checkSimpleSelfServiceTextField \baseModule::checkSimpleSelfServiceTextField() Checks the input value of a self service text field. 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]). `array` `String` `array` `string` `array` `String` $container array $name String $attributes array $fields string $readOnlyFields array $validationID null String getManagedObjectClasses \baseModule::getManagedObjectClasses() Returns a list of managed object classes for this module. 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') `array` `` getLDAPAliases \baseModule::getLDAPAliases() Returns a list of aliases for LDAP attributes. 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. `array` `` getManagedAttributes \baseModule::getManagedAttributes() Returns a list of LDAP attributes which are managed by this module. All attribute names will be renamed to match the given spelling. `array` `` getRequiredExtensions \baseModule::getRequiredExtensions() This function returns a list of PHP extensions (e.g. hash) which are needed by this module. Calling this method does not require the existence of an enclosing {@link accountContainer}. `array` `` getSelfServiceSearchAttributes \baseModule::getSelfServiceSearchAttributes() This function returns a list of possible LDAP attributes (e.g. uid, cn, . ..) which can be used to search for LDAP objects. Calling this method does not require the existence of an enclosing {@link accountContainer}. `array` `` getSelfServiceFields \baseModule::getSelfServiceFields() Returns a list of possible input fields and their descriptions. Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> <b>Format:</b> array(<field identifier> => <field description>) `array` `` canSelfServiceFieldBeReadOnly \baseModule::canSelfServiceFieldBeReadOnly() Returns if a given self service field can be set in read-only mode. `String` `\selfServiceProfile` $fieldID String $profile \selfServiceProfile getSelfServiceOptions \baseModule::getSelfServiceOptions() Returns the meta HTML code for each input field. Calling this method does not require the existence of an enclosing {@link accountContainer}.<br> <br> It is not possible to display help links. `array` `array` `boolean` `array` `array` `` $fields array $attributes array $passwordChangeOnly boolean $readOnlyFields array checkSelfServiceOptions \baseModule::checkSelfServiceOptions() Checks if all input values are correct and returns the LDAP attributes which should be changed. <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) Calling this method does not require the existence of an enclosing {@link accountContainer}. `string` `array` `boolean` `array` `array` $fields string $attributes array $passwordChangeOnly boolean $readOnlyFields array getSelfServiceSettings \baseModule::getSelfServiceSettings() Returns a list of self service configuration settings. 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. `\selfServiceProfile` `\htmlElement` `` `` $profile \selfServiceProfile checkSelfServiceSettings \baseModule::checkSelfServiceSettings() Checks if the self service settings are valid. 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. `array` `\selfServiceProfile` `array` $options array $profile \selfServiceProfile preModifySelfService \baseModule::preModifySelfService() Allows the module to run commands before the LDAP entry is changed or created. An error message should be printed if the function returns false. `boolean` `array` `boolean` $newAccount boolean $attributes array postModifySelfService \baseModule::postModifySelfService() Allows the module to run commands after the LDAP entry is changed or created. `boolean` `array` `boolean` $newAccount boolean $attributes array getLinkToSpecialSelfServicePage \baseModule::getLinkToSpecialSelfServicePage() This allows modules to create a link to a module specific page for the self service. 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. `array` `String` $settings array displaySpecialSelfServicePage \baseModule::displaySpecialSelfServicePage() This function creates meta HTML code to display the module specific page for the self service. `\selfServiceProfile` `\htmlElement` `` $profile \selfServiceProfile getAccountContainer \baseModule::getAccountContainer() Returns the {@link accountContainer} object. `\accountContainer` `` getAttributes \baseModule::getAttributes() Returns the LDAP attributes which are managed in this module. `array` getOriginalAttributes \baseModule::getOriginalAttributes() Returns the LDAP attributes which are managed in this module (with unchanged values). `array` getIcon \baseModule::getIcon() Returns the path to the module icon. The path must be releative to graphics (e.g. key.png). You can also set $this->meta['icon']. The preferred size is 32x32px. `\unknown` `` handleAjaxRequest \baseModule::handleAjaxRequest() Manages AJAX requests. This function may be called with or without an account container. supportsAdminInterface \baseModule::supportsAdminInterface() Specifies if this module supports the LAM admin interface. 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. `boolean` isBooleanConfigOptionSet \baseModule::isBooleanConfigOptionSet() Returns if the given configuration option is set. This function returns false if the configuration options cannot be read. `String` `boolean` $optionName String
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. It can be used to print INFO, WARN and ERROR messages at the moment.
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.</p>

string

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

string

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

string

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

array

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

boolean

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

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

private

<p>The text that is used to search for replaceable strings.</p>

string

The processed text.

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

private

<p>The text that is used to search for {bold} and {endbold} tags.</p>

string

The submitted text with {bold} and {endbold} replaced with the appropriate HTML tages &lt;b&gt; and &lt;/b&gt;

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

private

<p>The text that is used to search for {color} and {endcolor} tags.</p>

string

Input string with HTML-formatted color tags

string
$text
string
linkText
\linkText()
Replace {link=[Link-Target]} and {endlink} with <a href="[Link-Target]" target="_blank"> and </a> HTML-Tags.

private

<p>The text that is used to search for {link} and {endlink} tags.</p>

string

Input string with HTML-formatted link tags

string
$text
string

This file includes functions to control lamdaemon.

Tilo Lutz

Roland Gruber

Thomas Manninger

modules

lamdaemon
\lamdaemon()
Sends commands to lamdaemon script.

<p>command to execute</p>

array

<p>remote server</p>

string

Output of lamdaemon

array
$command
array
$server
string

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. 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.</p>

string

<p>Switch to true to see some nice and copious output. :)</p>

bool

The DN of the entry which houses this LDAP server&#039;s schema.

string
$dn
string
$debug
false
bool
_get_raw_schema
\_get_raw_schema()
Fetches the raw schema array for the subschemaSubentry of the server. 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".

<ul> <li>A string indicating which type of schema to fetch. Five valid values: 'objectclasses', 'attributetypes', 'ldapsyntaxes', 'matchingruleuse', or 'matchingrules'. Case insensitive.</li> </ul>

<p>(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)</p>

array of strings of this form: Array ( [0] =&gt; &quot;( 1.3.6.1.4.1.7165.1.2.2.4 NAME &#039;gidPool&#039; DESC &#039;Pool ... [1] =&gt; &quot;( 1.3.6.1.4.1.7165.2.2.3 NAME &#039;sambaAccount&#039; DESC &#039;Sa ... etc.

\an
$schema_to_fetch
mixed
$dn
''
mixed
get_schema_objectclasses
\get_schema_objectclasses()
Gets an associative array of ObjectClass objects for the specified server. 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).</p>

string

An array of ObjectClass objects.

array
$dn
null
string
$use_cache
true
get_schema_objectclass
\get_schema_objectclass()
Gets a single ObjectClass object specified by name.

<p>The name of the objectClass to fetch.</p>

string

<p>(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).</p>

string

The specified ObjectClass object or false on error.

\ObjectClass
$oclass_name
string
$dn
null
string
$use_cache
true
get_schema_attribute
\get_schema_attribute()
Gets a single AttributeType object specified by name.

<p>The name of the AttributeType to fetch.</p>

string

<p>(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).</p>

string

The specified AttributeType object or false on error.

\AttributeType
$attr_name
$dn
null
string
$use_cache
true
get_schema_attributes
\get_schema_attributes()
Gets an associative array of AttributeType objects for the specified server. 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).</p>

string

An array of AttributeType objects.

array
$dn
null
string
$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. Ie, attributeType has name 'gn' and 'givenName'.
This function will create a unique entry for 'gn' and 'givenName'.
$attrs
add_sup_to_attrs
\add_sup_to_attrs()
Adds inherited values to each attributeType specified by the SUP directive.
Supports infinite levels of inheritance. Bug 856832: require a second paramter that has all attributes indexed by OID
$attrs
$attrs_oid
get_schema_matching_rules
\get_schema_matching_rules()
Returns an array of MatchingRule objects for the specified server.
The key of each entry is the OID of the matching rule.
$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. The key of each entry is the OID of the Syntax.
$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. $schema_type may be one of (lowercase) the following: objectclasses attributetypes ldapsyntaxes matchingrules matchingruleuse Note that _get_raw_schema() takes a similar parameter.
$schema_type
get_cached_schema
\get_cached_schema()
Returns the cached array of schemaitem objects for the specified $schema_type. 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).
Returns an array of SchemaItem objects on success or false on failure.
$schema_type
set_cached_schema
\set_cached_schema()
Caches the specified $schema_type.
$schema_items should be an array of SchemaItem instances (ie, an array of ObjectClass, AttributeType, LDAPSyntax, MatchingRuleUse, or MatchingRule objects.

Returns true on success of false on failure.
$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. 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.

lib

$oid The OID of this schema item. $description The description of this schema item. initVars \SchemaItem::initVars() Initialize class members to default values. SchemaItem \SchemaItem::SchemaItem() Default constructor. setOID \SchemaItem::setOID() $new_oid setDescription \SchemaItem::setDescription() $new_desc getOID \SchemaItem::getOID() getDescription \SchemaItem::getDescription()
\SchemaItem
ObjectClass
\ObjectClass
Represents an LDAP objectClass
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

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 \ObjectClass::initVars() Initialize the class' member variables ObjectClass \ObjectClass::ObjectClass() Creates a new ObjectClass object given a raw LDAP objectClass string. $raw_ldap_schema_string getMustAttrs \ObjectClass::getMustAttrs() Gets an array of AttributeType objects that entries of this ObjectClass must define. This differs from getMustAttrNames in that it returns an array of AttributeType objects `array` `array` `` `` `` $oclasses NULL array getMayAttrs \ObjectClass::getMayAttrs() Gets an array of AttributeType objects that entries of this ObjectClass may define. This differs from getMayAttrNames in that it returns an array of AttributeType objects `array` `array` `` `` `` `` $oclasses NULL array getMustAttrNames \ObjectClass::getMustAttrNames() Gets an array of attribute names (strings) that entries of this ObjectClass must define. This differs from getMustAttrs in that it returns an array of strings rather than array of AttributeType objects `array` `array` `` `` `` $oclasses null array getMayAttrNames \ObjectClass::getMayAttrNames() Gets an array of attribute names (strings) that entries of this ObjectClass must define. This differs from getMayAttrs in that it returns an array of strings rather than array of AttributeType objects `array` `array` `` `` `` $oclasses null array addChildObjectClass \ObjectClass::addChildObjectClass() Adds an objectClass to the list of objectClasses that inherit from this objectClass. `String` `bool` $object_class_name String getChildObjectClasses \ObjectClass::getChildObjectClasses() Returns the array of objectClass names which inherit from this objectClass. `Array` getName \ObjectClass::getName() Gets the name of this objectClass (ie, "inetOrgPerson") `string` getSupClasses \ObjectClass::getSupClasses() Gets the objectClass names from which this objectClass inherits. `array` getType \ObjectClass::getType() Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY. getIsObsolete \ObjectClass::getIsObsolete() Gets whether this objectClass is flagged as obsolete by the LDAP server. addMustAttrs \ObjectClass::addMustAttrs() Adds the specified array of attributes to this objectClass' list of MUST attributes. The resulting array of must attributes will contain unique members. `array` $new_must_attrs array addMayAttrs \ObjectClass::addMayAttrs() Behaves identically to addMustAttrs, but it operates on the MAY attributes of this objectClass. `array` $new_may_attrs array
ObjectClassAttribute
\ObjectClassAttribute
A simple class for representing AttributeTypes used only by the ObjectClass class.
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.

lib

$name This Attribute's name $source This Attribute's root ObjectClassAttribute \ObjectClassAttribute::ObjectClassAttribute() Creates a new ObjectClassAttribute with specified name and source objectClass. `string` `string` $name string $source string getName \ObjectClassAttribute::getName() Gets this attribute's name getSource \ObjectClassAttribute::getSource() Gets the name of the ObjectClass which originally specified this attribute.
\SchemaItem
AttributeType
\AttributeType
Represents an LDAP AttributeType
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

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 \AttributeType::initVars() Initialize the class' member variables AttributeType \AttributeType::AttributeType() Creates a new AttributeType objcet from a raw LDAP AttributeType string. $raw_ldap_attr_string getName \AttributeType::getName() Gets this attribute's name `string` getIsObsolete \AttributeType::getIsObsolete() Gets whether this attribute has been flagged as obsolete by the LDAP server `bool` getUsage \AttributeType::getUsage() Gets this attribute's usage string as defined by the LDAP server `string` getSupAttribute \AttributeType::getSupAttribute() Gets this attribute's parent attribute (if any). If this attribute does not inherit from another attribute, null is returned. `string` getEquality \AttributeType::getEquality() Gets this attribute's equality string `string` getOrdering \AttributeType::getOrdering() Gets this attribute's ordering specification. `string` getSubstr \AttributeType::getSubstr() Gets this attribute's substring matching specification `string` getAliases \AttributeType::getAliases() Gets the names of attributes that are an alias for this attribute (if any). `array` isAliasFor \AttributeType::isAliasFor() Returns whether the specified attribute is an alias for this one (based on this attribute's alias list). `string` `bool` $attr_name string getSyntaxString \AttributeType::getSyntaxString() Gets this attribute's raw syntax string (ie: "1.2.3.4{16}"). `string` getSyntaxOID \AttributeType::getSyntaxOID() Gets this attribute's syntax OID. 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". `string` getMaxLength \AttributeType::getMaxLength() Gets this attribute's the maximum length. If no maximum is defined by the LDAP server, null is returned. `int` getIsSingleValue \AttributeType::getIsSingleValue() Gets whether this attribute is single-valued. If this attribute only supports single values, true is returned. If this attribute supports multiple values, false is returned. `bool` setIsSingleValue \AttributeType::setIsSingleValue() Sets whether this attribute is single-valued. `bool` $is_single_value bool getIsCollective \AttributeType::getIsCollective() Gets whether this attribute is collective. `bool` getIsNoUserModification \AttributeType::getIsNoUserModification() Gets whether this attribute is not modifiable by users. `bool` getType \AttributeType::getType() Gets this attribute's type `string` removeAlias \AttributeType::removeAlias() Removes an attribute name from this attribute's alias array. `string` `bool` $remove_alias_name string addAlias \AttributeType::addAlias() Adds an attribute name to the alias array. `string` $new_alias_name string setName \AttributeType::setName() Sets this attriute's name. `string` $new_name string setSupAttribute \AttributeType::setSupAttribute() Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits). `string` $new_sup_attr string setAliases \AttributeType::setAliases() Sets this attribute's list of aliases. `array` $new_aliases array setType \AttributeType::setType() Sets this attribute's type. `string` $new_type string addUsedInObjectClass \AttributeType::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 string getUsedInObjectClasses \AttributeType::getUsedInObjectClasses() Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute. `array` addRequiredByObjectClass \AttributeType::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 string getRequiredByObjectClasses \AttributeType::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
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

lib

initVars
\Syntax::initVars()
Initializes the class' member variables
Syntax
\Syntax::Syntax()
Creates a new Syntax object from a raw LDAP syntax string.
$raw_ldap_syntax_string
\SchemaItem
MatchingRule
\MatchingRule
Represents an LDAP MatchingRule
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

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 \MatchingRule::initVars() Initialize the class' member variables MatchingRule \MatchingRule::MatchingRule() Creates a new MatchingRule object from a raw LDAP MatchingRule string. $raw_ldap_matching_rule_string setUsedByAttrs \MatchingRule::setUsedByAttrs() Sets the list of used_by_attrs to the array specified by $attrs; `array` $attrs array addUsedByAttr \MatchingRule::addUsedByAttr() Adds an attribute name to the list of attributes who use this MatchingRule `true` $new_attr_name getName \MatchingRule::getName() Gets this MatchingRule's name. `string` getIsObsolete \MatchingRule::getIsObsolete() Gets whether this MatchingRule is flagged as obsolete by the LDAP server. `bool` getUsedByAttrs \MatchingRule::getUsedByAttrs() Gets an array of attribute names (strings) which use this MatchingRule `array`
\SchemaItem
MatchingRuleUse
\MatchingRuleUse
Represents an LDAP schema matchingRuleUse entry
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

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 \MatchingRuleUse::initVars() Initialize the class' member variables MatchingRuleUse \MatchingRuleUse::MatchingRuleUse() $raw_matching_rule_use_string getName \MatchingRuleUse::getName() Gets this MatchingRuleUse's name `string` getUsedByAttrs \MatchingRuleUse::getUsedByAttrs() Gets an array of attribute names (strings) which use this MatchingRuleUse object. `array`

LDAP Account Manager help entries.

Michael Duergner

Roland Gruber

Help

No summary was found for this file

Manages all AJAX requests.

Roland Gruber

tools

lamAjax
\lamAjax
Manages all AJAX requests.
handleRequest
\lamAjax::handleRequest()
Manages an AJAX request.
managePasswordChange
\lamAjax::managePasswordChange()
Manages a password change request on the edit account page.

<p>input parameters</p>

array
$input
array

Provides a container around the tree view frameset.

Roland Gruber

lists

tree

Provides a list of LAM tests.

Roland Gruber

tools

This file shows the list views.

lists

Roland Gruber

This page will redirect to account/edit.php if the given user is valid.
It is called from listgroups.php via the memberUID links.

lists

Roland Gruber

search_username
\search_username()
Searches LDAP for a specific user name (uid attribute) and returns its DN entry

<p>user name</p>

string

DN

string
$name
string

This page will redirect to delete.php if the given user is valid.
It is called from the list views via the delete links.

lists

Roland Gruber

Tests the lamdaemon script.

Roland Gruber

tools

checkSchemaForModule
\checkSchemaForModule()
Checks if the object classes and attributes for this module are available.

<p>module name</p>

String

<p>type (user, group, ...)</p>

String

error message or null

String
$name
String
$type
String
getRecursiveAttributesFromObjectClass
\getRecursiveAttributesFromObjectClass()
Returns the names of all attributes which are managed by the given object class and its parents.

<p>object class</p>

\ObjectClass

list of attribute names

array
$oClass
\ObjectClass

Provides a list of LAM tests.

Roland Gruber

tools

Tests the lamdaemon script.

Roland Gruber

Thomas Manninger

tools

lamTestLamdaemon
\lamTestLamdaemon()
Runs a test case of lamdaemon.

<p>test command</p>

string

<p>specifies if test should be run</p>

boolean

<p>SSH connection</p>

\connection

<p>describing text</p>

string

<p>container for HTML output</p>

\htmlTable

true, if errors occured

boolean
$command
string
$stopTest
boolean
$handle
\connection
$testText
string
$container
\htmlTable
lamRunLamdaemonTestSuite
\lamRunLamdaemonTestSuite()
Runs all tests for a given server.

<p>server ID</p>

String

<p>server name</p>

String

<p>true, if Quotas should be checked</p>

boolean

<p>container for HTML output</p>

\htmlTable
$serverName
String
$serverTitle
String
$testQuota
boolean
$container
\htmlTable
lamTestConnectSSH
\lamTestConnectSSH()
Connects to the given SSH server.

<p>server name (e.g. localhost or localhost,1234)</p>

String

handle

object
$server
String

This is an editor for organizational units.

Roland Gruber

tools

display_main
\display_main()
Displays the main page of the OU editor

<p>info message</p>

String

<p>error message</p>

String
$message
String
$error
String

Provides a list of tools like file upload or profile editor.

Roland Gruber

tools

This is the main window. The user and group lists will be shown in this frameset.

main

Roland Gruber

Login form of LDAP Account Manager.

Michael Duergner

Roland Gruber

main

display_LoginPage
\display_LoginPage()
Displays the login window.

<p>current active configuration</p>

object
$config_object
object

Creates LDAP accounts for file upload.

Roland Gruber

tools

Start page of file upload

Roland Gruber

tools

showMainPage
\showMainPage()
Displays the acount type specific main page of the upload.

<p>account type</p>

string

<p>list of selected account modules</p>

array
$scope
string
$selectedModules
array

Configuration profile management.

configuration

Roland Gruber

Manages the main configuration options.

configuration

Roland Gruber

formatSSLTimestamp
\formatSSLTimestamp()
Formats an LDAP time string (e.g. from createTimestamp).

<p>LDAP time value</p>

String

formated time

String
$time
String

confmodules lets the user select the account modules

configuration

Roland Gruber

config_showAccountModules
\config_showAccountModules()
Displays the module selection boxes and checks if dependencies are fulfilled.

<p>account type</p>

string

<p>title for module selection (e.g. "User modules")</p>

string

<p>meta HTML container</p>

\htmlTable
$scope
string
$title
string
$container
\htmlTable
checkInput
\checkInput()
Checks user input and saves the entered settings.

list of errors

array

End page of configuration.

configuration

Roland Gruber

Displays links to all configuration pages.

configuration

Roland Gruber

Main page of configuration

configuration

Roland Gruber

Thomas Manninger

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

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

checkInput
\checkInput()
Checks user input and saves the entered settings.

list of errors

array

Login page to change the preferences.

configuration

Roland Gruber

Login page to change the main preferences.

configuration

Roland Gruber

No summary was found for this file

Displays the account detail page.

modules

Tilo Lutz

Roland Gruber

Head part of page which includes links to lists etc.

main

Roland Gruber

Displays the LDAP schema of the server

tools

David Smith

Roland Gruber

Displays the main page of the PDF editor where the user can select the displayed entries.

Michael Duergner

Roland Gruber

PDF

translateFieldIDToName
\translateFieldIDToName()
Translates a given field ID (e.g. inetOrgPerson_givenName) to its descriptive name.

<p>field ID</p>

String

<p>account type</p>

String
$id
String
$scope
String

This is the main window of the pdf structure editor.

Michael Duergner

Roland Gruber

PDF

Used to delete accounts from LDAP tree.

Tilo Lutz

Roland Gruber

main

getChildCount
\getChildCount()
Returns the number of child entries of a DN.

<p>DN of parent</p>

string

number of childs

\interger
$dn
string
deleteDN
\deleteDN()
Deletes a DN and all child entries.

<p>DN to delete</p>

string

error messages

array
$dn
string

Manages creating/changing of profiles.

profiles

Roland Gruber

This is the main window of the profile editor.

profiles

Roland Gruber

The phpLDAPadmin development team

phpLDAPadmin

\PageRender
QueryRender
\QueryRender
QueryRender class

phpLDAPadmin

Templates

need to add paging

accept
\QueryRender::accept()
Intialise and Render the QueryRender
getTemplates
\QueryRender::getTemplates()
Get our templates applicable for this object
haveDefaultTemplate
\QueryRender::haveDefaultTemplate()
Are default queries enabled?
drawTemplateChoice
\QueryRender::drawTemplateChoice()
visitStart
\QueryRender::visitStart()
visitEnd
\QueryRender::visitEnd()
drawSubTitle
\QueryRender::drawSubTitle()
$subtitle
null
getAFattrs
\QueryRender::getAFattrs()
getAjaxRef
\QueryRender::getAjaxRef()
$dn
drawBaseTabs
\QueryRender::drawBaseTabs()
drawResultsTable
\QueryRender::drawResultsTable()
$base
$results
No summary was found for this file
No summary for method drawTemplateChoice()
No summary for method visitStart()
No summary for method visitEnd()
No summary for method drawSubTitle()
No summary for method getAFattrs()
No summary for method getAjaxRef()
No summary for method drawBaseTabs()
No summary 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. 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.

phpLDAPadmin

Schema

$name null $oid null $description null $is_obsolete false setOID \SchemaItem::setOID() $oid setDescription \SchemaItem::setDescription() $desc getOID \SchemaItem::getOID() getDescription \SchemaItem::getDescription() getIsObsolete \SchemaItem::getIsObsolete() Gets whether this objectClass is flagged as obsolete by the LDAP server. getName \SchemaItem::getName() Return the objects name. param boolean $lower Return the name in lower case (default) `string` $lower true
\SchemaItem
ObjectClass
\ObjectClass
Represents an LDAP objectClass
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

phpLDAPadmin

Schema

$server_id null $sup_classes array() $type $must_attrs array() $may_attrs array() $force_may array() $children_objectclasses array() $hierarchy array() __construct \ObjectClass::__construct() Creates a new ObjectClass object given a raw LDAP objectClass string. $class $server parseList \ObjectClass::parseList() Parse an LDAP schema list $i $strings $attrs getParents \ObjectClass::getParents() This will return all our parent ObjectClass Objects getMustAttrs \ObjectClass::getMustAttrs() Gets an array of AttributeType objects that entries of this ObjectClass must define. This differs from getMustAttrNames in that it returns an array of AttributeType objects `array` `array` `` `` `` $parents false array getMayAttrs \ObjectClass::getMayAttrs() Gets an array of AttributeType objects that entries of this ObjectClass may define. This differs from getMayAttrNames in that it returns an array of AttributeType objects `array` `array` `` `` `` `` $parents false array getForceMayAttrs \ObjectClass::getForceMayAttrs() getMustAttrNames \ObjectClass::getMustAttrNames() Gets an array of attribute names (strings) that entries of this ObjectClass must define. This differs from getMustAttrs in that it returns an array of strings rather than array of AttributeType objects `array` `array` `` `` `` $parents false array getMayAttrNames \ObjectClass::getMayAttrNames() Gets an array of attribute names (strings) that entries of this ObjectClass must define. This differs from getMayAttrs in that it returns an array of strings rather than array of AttributeType objects `array` `array` `` `` `` $parents false array addChildObjectClass \ObjectClass::addChildObjectClass() Adds an objectClass to the list of objectClasses that inherit from this objectClass. `String` `boolean` $name String getChildObjectClasses \ObjectClass::getChildObjectClasses() Returns the array of objectClass names which inherit from this objectClass. `Array` getSupClasses \ObjectClass::getSupClasses() Gets the objectClass names from which this objectClass inherits. `array` isRelated \ObjectClass::isRelated() Return if this objectClass is related to $oclass `array` $oclass getType \ObjectClass::getType() Gets the type of this objectClass: STRUCTURAL, ABSTRACT, or AUXILIARY. addMustAttrs \ObjectClass::addMustAttrs() Adds the specified array of attributes to this objectClass' list of MUST attributes. The resulting array of must attributes will contain unique members. `array` $attr array addMayAttrs \ObjectClass::addMayAttrs() Behaves identically to addMustAttrs, but it operates on the MAY attributes of this objectClass. `array` $attr array isForceMay \ObjectClass::isForceMay() Determine if an array is listed in the force_may attrs $attr isStructural \ObjectClass::isStructural()
ObjectClass_ObjectClassAttribute
\ObjectClass_ObjectClassAttribute
A simple class for representing AttributeTypes used only by the ObjectClass class.
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.

phpLDAPadmin

Schema

$name $source __construct \ObjectClass_ObjectClassAttribute::__construct() Creates a new ObjectClass_ObjectClassAttribute with specified name and source objectClass. `string` `string` $name string $source string getName \ObjectClass_ObjectClassAttribute::getName() $lower true getSource \ObjectClass_ObjectClassAttribute::getSource()
\SchemaItem
AttributeType
\AttributeType
Represents an LDAP AttributeType
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

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 \AttributeType::__construct() Creates a new AttributeType object from a raw LDAP AttributeType string. $attr getUsage \AttributeType::getUsage() Gets this attribute's usage string as defined by the LDAP server `string` getSupAttribute \AttributeType::getSupAttribute() Gets this attribute's parent attribute (if any). If this attribute does not inherit from another attribute, null is returned. `string` getEquality \AttributeType::getEquality() Gets this attribute's equality string `string` getOrdering \AttributeType::getOrdering() Gets this attribute's ordering specification. `string` getSubstr \AttributeType::getSubstr() Gets this attribute's substring matching specification `string` getAliases \AttributeType::getAliases() Gets the names of attributes that are an alias for this attribute (if any). `array` isAliasFor \AttributeType::isAliasFor() Returns whether the specified attribute is an alias for this one (based on this attribute's alias list). `string` `boolean` $attr_name string getSyntaxString \AttributeType::getSyntaxString() Gets this attribute's raw syntax string (ie: "1.2.3.4{16}"). `string` getSyntaxOID \AttributeType::getSyntaxOID() Gets this attribute's syntax OID. 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". `string` getMaxLength \AttributeType::getMaxLength() Gets this attribute's the maximum length. If no maximum is defined by the LDAP server, null is returned. `int` getIsSingleValue \AttributeType::getIsSingleValue() Gets whether this attribute is single-valued. If this attribute only supports single values, true is returned. If this attribute supports multiple values, false is returned. `boolean` setIsSingleValue \AttributeType::setIsSingleValue() Sets whether this attribute is single-valued. `boolean` $is boolean getIsCollective \AttributeType::getIsCollective() Gets whether this attribute is collective. `boolean` getIsNoUserModification \AttributeType::getIsNoUserModification() Gets whether this attribute is not modifiable by users. `boolean` getType \AttributeType::getType() Gets this attribute's type `string` removeAlias \AttributeType::removeAlias() Removes an attribute name from this attribute's alias array. `string` `boolean` $remove_alias_name string addAlias \AttributeType::addAlias() Adds an attribute name to the alias array. `string` $alias string setName \AttributeType::setName() Sets this attriute's name. `string` $name string setSupAttribute \AttributeType::setSupAttribute() Sets this attriute's SUP attribute (ie, the attribute from which this attribute inherits). `string` $attr string setAliases \AttributeType::setAliases() Sets this attribute's list of aliases. `array` $aliases array setType \AttributeType::setType() Sets this attribute's type. `string` $type string addUsedInObjectClass \AttributeType::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 string getUsedInObjectClasses \AttributeType::getUsedInObjectClasses() Gets the list of "used in" objectClasses, that is the list of objectClasses which provide this attribute. `array` addRequiredByObjectClass \AttributeType::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 string getRequiredByObjectClasses \AttributeType::getRequiredByObjectClasses() Gets the list of "required by" objectClasses, that is the list of objectClasses which provide must have attribute. `array` setForceMay \AttributeType::setForceMay() This function will mark this attribute as a forced MAY attribute isForceMay \AttributeType::isForceMay()
\SchemaItem
Syntax
\Syntax
Represents an LDAP 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.

phpLDAPadmin

Schema

__construct
\Syntax::__construct()
Creates a new Syntax object from a raw LDAP syntax string.
$class
\SchemaItem
MatchingRule
\MatchingRule
Represents an LDAP MatchingRule
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

phpLDAPadmin

Schema

$syntax null $used_by_attrs array() __construct \MatchingRule::__construct() Creates a new MatchingRule object from a raw LDAP MatchingRule string. $strings setUsedByAttrs \MatchingRule::setUsedByAttrs() Sets the list of used_by_attrs to the array specified by $attrs; `array` $attrs array addUsedByAttr \MatchingRule::addUsedByAttr() Adds an attribute name to the list of attributes who use this MatchingRule `true` $attr getUsedByAttrs \MatchingRule::getUsedByAttrs() Gets an array of attribute names (strings) which use this MatchingRule `array`
\SchemaItem
MatchingRuleUse
\MatchingRuleUse
Represents an LDAP schema matchingRuleUse entry
All schema items have at least two things in common: An OID and a description. This class provides an implementation for these two data.

phpLDAPadmin

Schema

$used_by_attrs array() __construct \MatchingRuleUse::__construct() $strings getUsedByAttrs \MatchingRuleUse::getUsedByAttrs() Gets an array of attribute names (strings) which use this MatchingRuleUse object. `array`

Allows to create new attributes

The phpLDAPadmin development team

phpLDAPadmin

AttributeFactory
\AttributeFactory
AttributeFactory Class

phpLDAPadmin

Templates

newAttribute
\AttributeFactory::newAttribute()
$name
$values
$server_id
$source
null
newJpegAttribute
\AttributeFactory::newJpegAttribute()
$name
$values
$server_id
$source
newBinaryAttribute
\AttributeFactory::newBinaryAttribute()
$name
$values
$server_id
$source
newPasswordAttribute
\AttributeFactory::newPasswordAttribute()
$name
$values
$server_id
$source
newSambaPasswordAttribute
\AttributeFactory::newSambaPasswordAttribute()
$name
$values
$server_id
$source
newRandomPasswordAttribute
\AttributeFactory::newRandomPasswordAttribute()
$name
$values
$server_id
$source
newShadowAttribute
\AttributeFactory::newShadowAttribute()
$name
$values
$server_id
$source
newSelectionAttribute
\AttributeFactory::newSelectionAttribute()
$name
$values
$server_id
$source
newMultiLineAttribute
\AttributeFactory::newMultiLineAttribute()
$name
$values
$server_id
$source
newDateAttribute
\AttributeFactory::newDateAttribute()
$name
$values
$server_id
$source
newObjectClassAttribute
\AttributeFactory::newObjectClassAttribute()
$name
$values
$server_id
$source
newDnAttribute
\AttributeFactory::newDnAttribute()
$name
$values
$server_id
$source
newGidAttribute
\AttributeFactory::newGidAttribute()
$name
$values
$server_id
$source

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 \Visitor::__call() $method $args getServerID \Visitor::getServerID() Return the LDAP server ID `int` getServer \Visitor::getServer() Return this LDAP Server object `object`

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
PasswordAttribute
\PasswordAttribute
Represents an attribute whose values are passwords

phpLDAPadmin

Templates

    eJx1j00OgkAMhfdziq5Z6AWMYHTpghguUJkqRJiZTDtoYry7hYDGhdv2/Xxvk4cmmHWWGchg3yEzMaCzcEmultY7houPIA2BUB86FAJy19bRSh2jqcAkjUoqlWjW8bAr0fatA0sDdT705ES92E/igPUNr79KfazNwnCiEInVM2IAisT2nLT03ngmGLBLI2DUBGW9+2h54fgTDQWn8/Kr5g08ddbjXijnoN2nix5CzjJ8L0/zMvnWvAF+lmRM

Classes and functions for manipulating XML templates.

The phpLDAPadmin development team

phpLDAPadmin

xml2array
\xml2array
XML Parser
This will read our XML file and convert it into variables for us to parse.

phpLDAPadmin

XML

$stack array() $stack_ref $arrOutput array() $resParser $strXmlData push_pos \xml2array::push_pos() $pos pop_pos \xml2array::pop_pos() parseXML \xml2array::parseXML() $strInputXML $filename tagOpen \xml2array::tagOpen() $parser $name $attrs tagData \xml2array::tagData() $parser $tagData tagClosed \xml2array::tagClosed() $parser $name cleanXML \xml2array::cleanXML() This function will parse an XML array and make a normal array. `array` $details

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 \page::__construct() $index null head_add \page::head_add() $html pageheader_print \page::pageheader_print() head_print \page::head_print() control_print \page::control_print() tree \page::tree() block_add \page::block_add() $side $object block_print \page::block_print() $side sysmsg \page::sysmsg() body \page::body() $raw false footer_print \page::footer_print() show \page::show() Only show a particular page frame - used by an AJAX call $frame $compress false $raw false display \page::display() $filter array() setsysmsg \page::setsysmsg() $data
block
\block
This class draws a block.

phpLDAPadmin

Page

$title $body $foot setTitle \block::setTitle() $html setBody \block::setBody() $html setFooter \block::setFooter() $html draw \block::draw() $side $raw false

Classes and functions for the template engine.
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)

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.

The template object will be invalidated if it does contain the necessary items (objectClass, MUST attributes, etc) to make a successful LDAP update.

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 \Template::__construct() $server_id $name null $filename null $type null $id null __clone \Template::__clone() storeTemplate \Template::storeTemplate() Main processing to store the template. `\xmldata` $xmldata hasDefaultTemplate \Template::hasDefaultTemplate() Is default templates enabled? This will disable the default template from the engine. `boolean` readTemplates \Template::readTemplates() Return the templates of type (creation/modification) `` `array` $type accept \Template::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. (OLD values are IGNORED, we will have got them when we build this object from the LDAP server DN.) $makeVisible false setDN \Template::setDN() Set the DN for this template, if we are editing entries `\dn` $dn setRDNAttributes \Template::setRDNAttributes() Set the RDN attributes Given an RDN, mark the attributes as RDN attributes. If there is no defined attribute, then the remaining RDNs will be returned. `\RDN` `\RDN` $rdn getDN \Template::getDN() Display the DN for this template entry. 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. `\dn` getDNEncode \Template::getDNEncode() $url true setContainer \Template::setContainer() Set the container for this template, if we are creating entries `\dn` `` $container getContainer \Template::getContainer() Get the DN of the container for this entry `\dn` getContainerEncode \Template::getContainerEncode() $url true copy \Template::copy() Copy a DN $template $rdn $asnew false getAttrbyLdapType \Template::getAttrbyLdapType() Get Attributes by LDAP type This function will return a list of attributes by LDAP type (MUST,MAY). `array` $type isAttrType \Template::isAttrType() Return true if this is a MUST,MAY attribute $attr $type getRDNObjects \Template::getRDNObjects() Return the attributes that comprise the RDN. `array` getRDNAttrs \Template::getRDNAttrs() Get all the RDNs for this template, in RDN order. `array` getRDN \Template::getRDN() Return the RDN for this template. 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 `\rdn` getRDNAttributeName \Template::getRDNAttributeName() Return the attribute name part of the RDN getContext \Template::getContext() Determine the type of template this is isVisible \Template::isVisible() Test if the template is visible `boolean` setVisible \Template::setVisible() setInvisible \Template::setInvisible() getRegExp \Template::getRegExp() isReadOnly \Template::isReadOnly() Test if this template has been marked as a read-only template getAttributes \Template::getAttributes() Get the attribute entries `boolean` `array` $optional false getAttributesShown \Template::getAttributesShown() Return a list of attributes that should be shown getAttributesInternal \Template::getAttributesInternal() Return a list of the internal attributes getObjectClasses \Template::getObjectClasses() Return the objectclasses defined in this template `array` getIcon \Template::getIcon() Get template icon getDescription \Template::getDescription() Return the template description `string` setInvalid \Template::setInvalid() Set a template as invalid `string` $msg $admin false isInValid \Template::isInValid() Get the template validity or the reason it is invalid `string` isAdminDisabled \Template::isAdminDisabled() setMinValueCount \Template::setMinValueCount() Set the minimum number of values for an attribute `object` `int` $attr $value setAttrLDAPtype \Template::setAttrLDAPtype() Set the LDAP type property for an attribute `object` `string` $attr $value OnChangeAdd \Template::OnChangeAdd() OnChangeAdd javascript processing $origin $value rebuildTemplateAttrs \Template::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 \Template::getLDAPadd() Return an array, that can be passed to ldap_add(). Attributes with empty values will be excluded. $attrsOnly false getLDAPmodify \Template::getLDAPmodify() Return an array, that can be passed to ldap_mod_replace(). Only attributes that have changed their value will be returned. 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 `boolean` $attrsOnly false $index 0 getForceDeleteAttrs \Template::getForceDeleteAttrs() Get the attributes that are marked as force delete We'll cache this result in the event of multiple calls. getAvailAttrs \Template::getAvailAttrs() Get available attributes isNoLeaf \Template::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).

<p>The array to strip slashes from, typically one of $_GET, $_POST, or $_COOKIE.</p>

Array
$array
_
\_()
$msg
app_error_handler
\app_error_handler()
Custom error handling function.
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).</p>

int

<p>The PHP error string provided (ie, "Warning index "foo" is undefined)</p>

string

<p>The file in which the PHP error ocurred.</p>

string

<p>The line number on which the PHP error ocurred</p>

int
$errno
$errstr
$file
$lineno
app_name
\app_name()
Returns the application name.
app_version
\app_version()
Returns the application version currently running. The version is read from the file named VERSION.

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

<p>Variable to dump</p>

string array

<p>Whether to stop execution or not.</p>

boolean
$variable
$die
false
$onlydebugaddr
false
debug_dump_backtrace
\debug_dump_backtrace()
This function generates a backtrace

<p>Whether to stop execution or not.</p>

boolean
$msg
'Calling BackTrace'
$die
false
debug_sysmsg
\debug_sysmsg()
Send a debug as a sys message
$msg
debug_log
\debug_log()
Debug Logging
The global debug level is turned on in your configuration file by setting: <code> $config->custom->debug['level'] = 255; </code> together with atleast one output direction (currently file and syslog are supported). <code> $config->custom->debug['file'] = '/tmp/app_debug.log'; $config->custom->debug['syslog'] = true; </code>

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.)

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</p>

string

<p>Log bit number for this message.</p>

int
$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.
This function can be used as an alternative to generate a system message, if page hasnt yet been defined.
$msg
$redirect
null
blowfish_encrypt
\blowfish_encrypt()
Encryption using blowfish algorithm

<p>Original data</p>

string

<p>The secret</p>

string

The encrypted result

string

lem9 (taken from the phpMyAdmin source)

$data
$secret
null
blowfish_decrypt
\blowfish_decrypt()
Decryption using blowfish algorithm

<p>Encrypted data</p>

string

<p>The secret</p>

string

Original data

string

lem9 (taken from the phpMyAdmin source)

$encdata
$secret
null
full_str_pad
\full_str_pad()
String padding

<p>Input string</p>

string

<p>Length of the result</p>

integer

<p>The filling string</p>

string

<p>Padding mode</p>

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.
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).

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.
Returns true on success of false on failure.
$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. On success, true is returned. On failure, false is returned.

<p>The name of the cookie to set.</p>

string

<p>The value of the cookie to set.</p>

string

<p>(optional) The duration in seconds of this cookie. If unspecified, $cookie_time is used from config.php</p>

int

<p>(optional) The directory value of this cookie (see php.net/setcookie)</p>

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

<p>The ID of the server</p>

int

<p>The requested filename</p>

string

The customized filename, if exists, or the standard one

string
$index
$filename
$path
masort
\masort()
Sort a multi dimensional array.

<p>Multi demension array passed by reference</p>

array

<p>Comma delimited string of sort keys.</p>

string

<p>Whether to reverse sort.</p>

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.
This is configured in config.php thus: <code> $config->custom->appearance['obfuscate_password_display'] = true; </code>

Or if it is OK to show encrypted passwords but not clear text passwords <code> $config->custom->appearance['show_clear_password'] = false; </code>

<p>Password encoding type</p>

string
boolean
$enc
null
pretty_print_dn
\pretty_print_dn()
Returns an HTML-beautified version of a DN.
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.</p>

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"). 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.

(See unit_test.php for test cases)

<p>The attribute to examine for "DNness"</p>

string
boolean
$str
is_mail_string
\is_mail_string()
Get whether a string looks like an email address (user@example.com).

<p>The string to analyze.</p>

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/)

<p>The string to analyze.</p>

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. If they are equivelant, returns 0, otherwise, returns their sorting order (similar to strcmp()): Returns < 0 if dn1 is less than dn2.
Returns > 0 if dn1 is greater than dn2.

The comparison is performed starting with the top-most element of the DN. Thus, the following list: <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> Will be sorted thus using usort( $list, "pla_compare_dns" ): <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>

<p>The first of two DNs to compare</p>

string

<p>The second of two DNs to compare</p>

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).
This is configured in config.php by server:

<code> $servers->setValue('auto_number','enable',true|false); </code>

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.

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.

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.

See config.php.example for more notes on the two mechanisms.

<p>Base to start the search from</p>

string

<p>Attribute to query</p>

string

<p>Increment the result (for pool searches)</p>

boolean

<p>LDAP filter to use (for pool searches)</p>

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. 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. :)
This function returns a string like "country.png". All icon files are assumed to be contained in the /images/ directory of phpLDAPadmin.

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.</p>

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.

<p>The baseDN to be added if the DN is relative</p>

string

<p>The DN to be made absolute</p>

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. 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.</p>

int

The generated salt string.

string
$length
get_rdn
\get_rdn()
Given a DN string, this returns the 'RDN' portion of the string.
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.</p>

string

<p>If true, include attributes in the RDN string. See http://php.net/ldap_explode_dn for details</p>

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.
This function parses ldap_error_codes.txt and looks up the specified ldap error number, and returns the verbose message defined in that file.

<code> Array ( [title] => "Invalid Credentials" [description] => "An invalid username and/or password was supplied to the LDAP server." ) </code>

<p>The hex error number (ie, "0x42") of the LDAP error of interest.</p>

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.
This function parses ldap_supported_oids.txt and looks up the specified OID, and returns the verbose message defined in that file.

<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>

<p>The OID number (ie, "1.3.6.1.4.1.4203.1.5.1") of the OID of interest.</p>

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. Many options are available to specify how the images are to be displayed.
Usage Examples: <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>

<p>The Server to get the image from.</p>

object

<p>The DN of the entry that contains the jpeg attribute you want to draw.</p>

string

<p>The name of the attribute containing the jpeg data (usually 'jpegPhoto').</p>

string

<p>Index of the attribute to draw</p>

int

<p>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.</p>

boolean

<p>Specifies optional image and CSS style attributes for the table tag. Supported keys are fixed_width, fixed_height, img_opts.</p>

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

pla_password_hash
\pla_password_hash()
Hashes a password and returns the hash based on the specified enc_type.

<p>The password to hash in clear text.</p>

string

<p>Standard LDAP encryption type which must be one of crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.</p>

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. This is handy to verify a user's password when all that is given is the hash and a "guess".

<p>The hash.</p>

String

<p>The password in clear text to test.</p>

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
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</p>

string
string
$user_password
draw_chooser_link
\draw_chooser_link()
Draws an HTML browse button which, when clicked, pops up a DN chooser dialog.

<p>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.</p>

string

<p>(optional) If true, the function draws the localized text "choose" to the right of the button.</p>

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.
NOTE: When a multivalue RDN is passed to ldap_explode_dn, the results returns with 'value + value';

<code> Array ( [0] => uid=ppratt [1] => ou=People [2] => dc=example [3] => dc=com ) </code>

<p>The DN to explode.</p>

string

<p>(optional) Whether to include attribute names (see http://php.net/ldap_explode_dn for details)</p>

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
convertHexStringToCharCallback
\convertHexStringToCharCallback()
Converts a hex encoded string like \12 to the corresponding character.

<p>preg_replace_callback: matching hex string array</p>

array

character

String
$hex
array
get_href
\get_href()
Fetches the URL for the specified item. 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)</p>

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. 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"</p>

array

<p>(optional) An array of variables to exclude in the resulting string</p>

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.

<p>The DN to reverse</p>

string

The reversed DN

string
$dn
sortAttrs
\sortAttrs()
Attribute sorting
$a
$b
arrayLower
\arrayLower()
Reads an array and returns the array values back in lower case

<p>The array to convert the values to lowercase.</p>

array

array Array with values converted to lowercase.

$array
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.

<p>The base DN to use.</p>

string

<p>LDAP Query filter.</p>

string

<p>LDAP attribute to use as key.</p>

string

<p>Attributes to use as values.</p>

array

<p>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</p>

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

<p>Array of values</p>

array

<p>Number of values in returned array</p>

integer

The padded string

string
$input
$num_req
random_junk
\random_junk()
This is for Opera. 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
htmlid
\htmlid()
Returns a HTML id that can be used in the URL after the #.

<p>The DN to pretty-print.</p>

string
string
$sid
$dn
isAjaxEnabled
\isAjaxEnabled()
Is PLA configured for AJAX display

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')

    eJx9kc1OwzAQhM/4KfaAFIgQfQB+2qrlgNRKCCpxjDbxJrGabCx7U1Ih3h0nbVohBEfvznwztu+ntrRqEscKYlhU6D15QNaQt5yJadhD3jiQkkCothUKAXFhmG6DozfNsJUySDZBElir5fwFdW0YNO2oamxNLMGL9SC2mG2x+KkMi4kaO7ySdeSDJ9QAX6JuPkD3qSjiTNoKjbl/oGDm23TcbY6d/ZCR9feDtwE6H3FAnRBrD+fJp7qwbVqZDC4PDZKUwitQIo3GfdI38fAA6Bzur6KDZIVeFiVyQdHNcbQ2HF3f/WJhLuT+Q62xOzGeOmvcGfmOjg0Xp/MzY/ilHfU5X2r6qL4BNdedqA==

Functions related to hooks management.
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.

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.

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

Benjamin Drieu &lt;benjamin.drieu@fr.alcove.com&gt; and Alc�?ve

phpLDAPadmin

sort_array_by_priority
\sort_array_by_priority()
Compares two arrays by numerically comparing their 'prority' value. Standard `cmp-like' function.

<p>First element to compare.</p>

\a

<p>Second element to compare.</p>

\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.

<p>Name of hook to run.</p>

\hook_name

<p>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></p>

\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.

<p>Name of the hook.</p>

\hook_name

<p>Name of the php function called upon hook trigger.</p>

\hook_function

<p>Numeric priority. Lowest means procedure will be executed before.</p>

\priority

<p>Name of the php rollback function called upon failure.</p>

\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.

<p>Name of the hook.</p>

\hook_name

<p>Numeric priority. If set, all procedures of that priority will be removed.</p>

\priority

<p>Name of the procedure function. If set, all procedures that call this function will be removed.</p>

\hook_function

<p>Name of the php rollback function called upon failure. If set, all procedures that call this function as a rollback will be removed.</p>

\rollback_function
$hook_name
$hook_function
$priority
$rollback_function
clear_hooks
\clear_hooks()
Removes all procedures from a hook.

<p>Name of hook to clear.</p>

\hook_name
$hook_name

Functions related to syslog logging.
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.

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.

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

Benjamin Drieu &lt;benjamin.drieu@fr.alcove.com&gt; 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.

<p>Syslog emergency.</p>

\emergency

<p>String to log.</p>

\log_string
$emergency
$log_string
syslog_err
\syslog_err()
Issue an error message via syslog.

<p>Log message to send to syslog.</p>

\log_string

on success.

true
$log_string
syslog_warning
\syslog_warning()
Issue a warning message via syslog.

<p>Log message to send to syslog.</p>

\log_string

on success.

true
$log_string
syslog_notice
\syslog_notice()
Issue a notice message via syslog.

<p>Log message to send to syslog.</p>

\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.

<p>Log message to send to syslog.</p>

\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

    eJx1j0kKwkAQRfd9ilpnoRcQB3TpQsQLlOnKgOmBrupEEO9uJRhBxPWf3l9tYhPNsigMFLDvkJkY0Fuosi+lDZ6hCgmkIRBysUMhIF+3nhaaGENbzNKo5aIW7Toedie0rvVgqacuREdeNItuMkcsb1h/O1VYmpnhTDERa2bEABRJ7TXr6NAEJuixyyNgIkhKGRxERR5Csjzj/FmALefrrF3eV3iaLsfbcJ76Tu+63WeY7kLeMvwqD/M0m7V5AUZ2bKE=

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

    eJx1jzkOwkAMRfs5hesUcAHEXiEKhLiASUwykDijsYdFiLvjIAKioLXf30aTUAU3zDIHGSxqFCEB5AIOiXP1LQsc2ghaESg1oUYlIC4908AUnWiKSStDdoaY13o522DReIaCzlS3oSFW02LzggPmJyx/SXsMXd9hSyGSmKarAaga/T5Z6KVqheCMdeoKRoJjoBKCzzUZ33f5Yw9TSfv+t3vvkFdu3m2GlZnNPll0VeJCYO4Z4+17v7uHm4zdE9PyZjM=

Classes and functions for searching the LDAP server
These classes and functions will read our XML search files, for defined search reports.

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplates
Queries
\Queries
Query Class
This class will store all our pre-defined search definitions.

phpLDAPadmin

Queries

    eJx1j81OAzEMhO95Cp9XQF8A0SI4FgmkHriazWw3In+ys6UI8e5k/yohwS3xeDzf3G5zn82maQw19OBZFUocLXVDbItLUalLQgqWtnfxSKUH7R/vn+tITpBqG52HHgpq//R/OO9JwJbSIPT6tF+uUec89Gq6b9G5CDueWkRBTlL0ZgnY8VD6uliDqBKPBGyDi9V5gk85IBYq4DAtZ27f+fh7swobszZ9GSCfc99LA6dzgRlYSxIQ19dInQXXC+MKOH3dVPEC+U8u7XR4W7Ux2kEnnDlvmRDOBdEqnYM/IGTPpQ6/zLfZ3pkfTjKLKQ==

Classes and functions for XML based templates.

The phpLDAPadmin development team

phpLDAPadmin

xmlTemplates
\xmlTemplates
XML Templates Class

phpLDAPadmin

Templates

$server_id $templates array() __construct \xmlTemplates::__construct() $server_id getClassVars \xmlTemplates::getClassVars() This will return our custom class variables, used by the parent to create objects. getTemplates \xmlTemplates::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 \xmlTemplates::getTemplate() Return a template by its ID `string` `object` $templateid getTemplateFiles \xmlTemplates::getTemplateFiles() Get a list of template filenames.
xmlTemplate
\xmlTemplate
XML Template Class

phpLDAPadmin

Templates

$server_id $id $name $type $readtime $filename $attributes array() __construct \xmlTemplate::__construct() $server_id $name null $filename null $type null $id null getAttrID \xmlTemplate::getAttrID() Get an attribute ID `string` `int` $attr getFileName \xmlTemplate::getFileName() Get the Template filename. getID \xmlTemplate::getID() Return the template by ID getName \xmlTemplate::getName() Return the template name `boolean` $lower true getReadTime \xmlTemplate::getReadTime() Get the Template read time. getServer \xmlTemplate::getServer() Return this LDAP Server object `object` getServerID \xmlTemplate::getServerID() Return the LDAP server ID `int` isType \xmlTemplate::isType() Test if a template is of a type `boolean` $type getType \xmlTemplate::getType() Return the template type getTitle \xmlTemplate::getTitle() Get template title addAttribute \xmlTemplate::addAttribute() Add another attribute to this template `int` $name $value $source null getAttributeNames \xmlTemplate::getAttributeNames() Get the attribute names `array` getAttribute \xmlTemplate::getAttribute() Get a specific Attribute `string` `object` $name isAdminDisabled \xmlTemplate::isAdminDisabled() May be overloaded in other classes

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 \ldap_pla::__construct() $index __get \ldap_pla::__get() $key isShowCreateEnabled \ldap_pla::isShowCreateEnabled() Gets whether the admin has configured phpLDAPadmin to show the "Create New" link in the tree viewer. <code> $servers->setValue('appearance','show_create',true|false); </code> If NOT set, then default to show the Create New item. If IS set, then return the value (it should be true or false). The entry creation command must be available. <code> $config->custom->commands['script'] = array('create' => true); </code> `boolean` isAnonBindAllowed \ldap_pla::isAnonBindAllowed() Fetch whether the user has configured a certain server login to be non anonymous <code> $servers->setValue('login','anon_bind',true|false); </code> `boolean` isBranchRenameEnabled \ldap_pla::isBranchRenameEnabled() Returns true if the user has configured the specified server to enable branch (non-leaf) renames. This is configured in config.php thus: <code> $servers->setValue('server','branch_rename',true|false); </code> `boolean` isMultiLineAttr \ldap_pla::isMultiLineAttr() Determines if an attribute's value can contain multiple lines. 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']; Usage example: <code> if ($ldapserver->isMultiLineAttr('postalAddress')) echo '<textarea name="postalAddress"></textarea>'; else echo '<input name="postalAddress" type="text">'; </code> `string` `string` `boolean` $attr_name $val null isAttrTest \ldap_pla::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 \ldap_pla::isAttrReadOnly() Returns true if the specified attribute is configured as read only in config.php. Attributes are configured as read-only in config.php thus: <code> $config->custom->appearance['readonly_attrs'] = array('objectClass'); </code> `string` `boolean` $attr isAttrHidden \ldap_pla::isAttrHidden() Returns true if the specified attribute is configured as hidden in config.php. Attributes are configured as hidden in config.php thus: <code> $config->custom->appearance['hide_attrs'] = array('objectClass'); </code> `string` `boolean` $attr add \ldap_pla::add() Add objects $dn $entry_array $method null delete \ldap_pla::delete() Delete objects $dn $method null rename \ldap_pla::rename() Rename objects $dn $new_rdn $container $deleteoldrdn $method null modify \ldap_pla::modify() Modify objects $dn $attrs $method null isAttrUnique \ldap_pla::isAttrUnique() Returns true if the specified attribute is configured as unique in config.php. Attributes are configured as hidden in config.php thus: <code> $servers->setValue('unique','attrs',array('mail','uid','uidNumber')); </code> `string` `boolean` $attr string checkUniqueAttrs \ldap_pla::checkUniqueAttrs() This function will check whether the value for an attribute being changed is already assigned to another DN. Returns the bad value, or null if all values are OK `\dn` `string` `string array` $dn $attrs isSessionValid \ldap_pla::isSessionValid() Check if the session timeout has occured for this LDAP server.

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 \BinaryAttribute::__construct() $name $values $server_id $source null getFileNames \BinaryAttribute::getFileNames() getFileName \BinaryAttribute::getFileName() $i addFileName \BinaryAttribute::addFileName() $name $i -1 getFilePaths \BinaryAttribute::getFilePaths() getFilePath \BinaryAttribute::getFilePath() $i addFilePath \BinaryAttribute::addFilePath() $path $i -1

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.
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.

phpLDAPadmin

Tree

$custom $default $servers array() $hooks array() __construct \Config::__construct() getConfigArray \Config::getConfigArray() Access the configuration, taking into account the defaults and the customisations $usecache true getValue \Config::getValue() Get a configuration value. $key $index $fatal true untested \Config::untested() Return the untested config items CheckCustom \Config::CheckCustom() Function to check and warn about any unusual defined variables. getCommandList \Config::getCommandList() Get a list of available commands. isCommandAvailable \Config::isCommandAvailable() Simple ACL to see if commands can be run $index 'cmd' configDefinition \Config::configDefinition() $key $index $config getFriendlyAttrs \Config::getFriendlyAttrs() Return the friendly attributes names getFriendlyName \Config::getFriendlyName() This function will return the friendly name of an attribute, if it exists. If the friendly name doesnt exist, the attribute name will be returned. `\attribute` `string` $attr haveFriendlyName \Config::haveFriendlyName() This function will return true if a friendly name exists for an attribute. If the friendly name doesnt exist, it will return false. `\attribute` `boolean` $attr getFriendlyHTML \Config::getFriendlyHTML() This function will return the <ancronym> html for a friendly name attribute. `\attribute` `string` $attr setServers \Config::setServers() $servers getServer \Config::getServer() $index null getServerList \Config::getServerList() Return a list of our servers `boolean` $visible true boolean

Classes and functions for the query engine.

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplate
Query
\Query
Query Class

phpLDAPadmin

Queries

$description '' $results array() storeTemplate \Query::storeTemplate() Main processing to store the template. `\xmldata` $xmldata accept \Query::accept() Accept will run the query and store the results in results() setDN \Query::setDN() This is temporary to get around objects that use a DN for rendering, for example jpegPhoto $dn getDN \Query::getDN() This is temporary to get around objects that use a DN for rendering, for example jpegPhoto getDNEncode \Query::getDNEncode() $url true getAttrSortOrder \Query::getAttrSortOrder() getAttrDisplayOrder \Query::getAttrDisplayOrder() isVisible \Query::isVisible() Test if the template is visible `boolean` getDescription \Query::getDescription()

The Cipher_blowfish:: class implements the Cipher interface enryption data using the Blowfish algorithm.
$Horde: horde/lib/Cipher/blowfish.php,v 1.2.2.3 2003/01/03 13:23:22 jan Exp $

Copyright 2002-2003 Mike Cochrane <mike@graftonhall.co.nz>

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Mike Cochrane &lt;mike@graftonhall.co.nz&gt;

$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 \Horde_Cipher_blowfish::Cipher_blowfish() $params null setKey \Horde_Cipher_blowfish::setKey() Set the key to be used for en/decryption `String` $key String getBlockSize \Horde_Cipher_blowfish::getBlockSize() Return the size of the blocks that this cipher needs `Integer` encryptBlock \Horde_Cipher_blowfish::encryptBlock() Encrypt a block on data. `String` `\optional` `String` $block String $key null _encryptBlock \Horde_Cipher_blowfish::_encryptBlock() Encrypt a block on data. `String` `String` `String` $L String $R String decryptBlock \Horde_Cipher_blowfish::decryptBlock() Decrypt a block on data. `String` `\optional` `String` $block String $key null _formatKey \Horde_Cipher_blowfish::_formatKey() Converts a text key into an array. `array` $key

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
DateAttribute
\DateAttribute
Represents an attribute whose values are dates

phpLDAPadmin

Templates

    eJx1j0sOgkAMhvdziq5ZyAWMQGTpwhguUJjyiDBMaAdNjHe3ENG4cNn2f3zdJ771Jo4iAxEce2QmBnQW6uAq6UbHUI8TSEsgNPgehYBc0znaqWMxpRikVUmhEs065dkZ7dA5sDRTP/qBnKgXh1Xssbpi86vUQ2w2hgv5iVg9CwagyNSVQUtv7cgEM/ZhAZwIrKLwxvAnFlIO5XYr3vy89lXLr5DrnH066C7kLMN38zBPkxzMCyK4YKI=

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 \DS::__construct() $index connect \DS::connect() This will make the connection to the datasource $method $debug false login \DS::login() Login to the datastore method: default = anon, connect to ds using bind_id not auth_id. method: 'user', connect with auth_id method: '<freetext>', any custom extra connection to ds. $user null $pass null $method null query \DS::query() Query the datasource $query $method $index null $debug false getErrorMessage \DS::getErrorMessage() Return error details from previous operation getErrorNum \DS::getErrorNum() setDefaults \DS::setDefaults() Functions that set and verify object configuration details $defaults isDefaultKey \DS::isDefaultKey() $key isDefaultSetting \DS::isDefaultSetting() $key $setting getValue \DS::getValue() Return a configuration value $key $setting $fatal true setValue \DS::setValue() Set a configuration value $key $setting $value untested \DS::untested() Return the untested config items getName \DS::getName() Get the name of this datastore getAuthType \DS::getAuthType() Return the authentication type for this object getLogin \DS::getLogin() Get the login name of the user logged into this datastore's connection method If this returns null, we are not logged in. If this returns '', we are logged in with anonymous $method null setLogin \DS::setLogin() Set the login details of the user logged into this datastore's connection method $user $pass $method null getPassword \DS::getPassword() Get the login password of the user logged into this datastore's connection method $method null isLoggedIn \DS::isLoggedIn() Return if this datastore's connection method has been logged into $method null logout \DS::logout() Logout of this datastore's connection method $method null isVisible \DS::isVisible() Functions that return the condition of the datasource isReadOnly \DS::isReadOnly() getIndex \DS::getIndex() getMethod \DS::getMethod() Work out which connection method to use. 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. `int` `string` $method null isSessionValid \DS::isSessionValid() This method should be overridden in application specific ds files inactivityTime \DS::inactivityTime() Return the time left in seconds until this connection times out. If there is not timeout, this function will return null.
Datastore
\Datastore
The list of database sources

phpLDAPadmin

DataStore

$index $objects array() $default __construct \Datastore::__construct() newServer \Datastore::newServer() Create a new database object $type setValue \Datastore::setValue() Set values for a database object. $key $setting $value getServerList \Datastore::getServerList() Get a list of all the configured servers. `boolean` `array` $isVisible true Instance \Datastore::Instance() Return an object Instance of a configured database. `int` `object` $index null InstanceName \Datastore::InstanceName() Return an object Instance of a configured database. `string` `object` $name null InstanceId \Datastore::InstanceId() Return an object Instance of a configured database. `string` `object` $id null

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
ObjectClassAttribute
\ObjectClassAttribute
Represents an 'objectClass' attribute

phpLDAPadmin

Templates

    eJx1jkEOgjAQRfc9xexMWMgFjEB0aaIxXGBoB6hC29CpMTHe3UJsiAu38/9783eF653Is0xABocBvScPaBS0wUjW1nho7QTcEzCNbkAmINNpQ9tIzFCJgftYqWMluk7H6oJq1AYUPWiwbiTDkcVxKTuUd+x+mzHIRdpwJTeRj8w8Aza2uZHkZdgGkHnSTWBKr//YoPShSVn9ne2XN3I2wXm1VskJ9GQyysN6eYm3KPbiAxojX80=

This class provides functions to calculate Samba NT and LM hashes.
The code is a conversion from createntlm.pl (Benjamin Kuit) and smbdes.c/md4.c (Andrew Tridgell).

Roland Gruber

lam

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

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 \smbHash::x() Fixes too large numbers $i lshift \smbHash::lshift() `integer` `array` `array` $count $data array permute \smbHash::permute() `array` `array` `array` $in $p $n mxor \smbHash::mxor() `array` `array` `array` $in1 array $in2 array doHash \smbHash::doHash() `array` `array` `boolean` `array` $in array $key array $forw boolean str_to_key \smbHash::str_to_key() str_to_key `string` `string` $str string smb_hash \smbHash::smb_hash() smb_hash `\unknown_type` `\unknown_type` `\unknown_type` `\unknown` $in \unknown_type $key \unknown_type $forw \unknown_type E_P16 \smbHash::E_P16() E_P16 `\unknown_type` `\unknown` $in \unknown_type lmhash \smbHash::lmhash() Calculates the LM hash of a given password. `string` `string` $password "" string nthash \smbHash::nthash() Calculates the NT hash of a given password. `string` `string` $password "" string unsigned_shift_r \smbHash::unsigned_shift_r() Unsigned shift operation for 32bit values. PHP 4 only supports signed shifts by default. $a $b

Classes and functions for importing data to LDAP
These classes provide differnet import formats.

The phpLDAPadmin development team

phpLDAPadmin

and import_form.php

Importer
\Importer
Importer Class
This class serves as a top level importer class, which will return the correct Import class.

phpLDAPadmin

Import

$server_id $template_id $template __construct \Importer::__construct() $server_id $template_id types \Importer::types() accept \Importer::accept() getTemplate \Importer::getTemplate()
Import
\Import
Import Class
This abstract classes provides all the common methods and variables for the custom import classes.

phpLDAPadmin

Import

$server_id null $input null $source array() __construct \Import::__construct() $server_id accept \Import::accept() getSource \Import::getSource() $attr LDAPimport \Import::LDAPimport()
\Import
ImportLDIF
\ImportLDIF
Import entries from LDIF
The LDIF spec is described by RFC2849 http://www.ietf.org/rfc/rfc2849.txt

phpLDAPadmin

Import

$_currentLineNumber 0 $_currentLine '' $template $error array() getType \ImportLDIF::getType() getTemplate \ImportLDIF::getTemplate() getServer \ImportLDIF::getServer() readEntry \ImportLDIF::readEntry() getAttrValue \ImportLDIF::getAttrValue() Get the Attribute and Decoded Value $line nextLines \ImportLDIF::nextLines() Get the lines of the next entry `\The` hasMoreEntries \ImportLDIF::hasMoreEntries() Private method to check if there is more entries in the input. `boolean` nextLine \ImportLDIF::nextLine() Helper method to switch to the next line isCommentLine \ImportLDIF::isCommentLine() Check if it's a comment line. `boolean` isWrappedLine \ImportLDIF::isWrappedLine() Check if it's a wrapped line. `boolean` isBlankLine \ImportLDIF::isBlankLine() Check if is the current line is a blank line. `boolean` eof \ImportLDIF::eof() Returns true if we reached the end of the input. `boolean` error \ImportLDIF::error() $msg $data getAttributeValue \ImportLDIF::getAttributeValue() Method to retrieve the attribute value of a ldif line, and get the base 64 decoded value if it is encoded $value getAddDetails \ImportLDIF::getAddDetails() Build the attributes array when the change type is add. $lines getModifyDetails \ImportLDIF::getModifyDetails() Build the attributes array for the entry when the change type is modify $lines getModRDNAttributes \ImportLDIF::getModRDNAttributes() Build the attributes for the entry when the change type is modrdn $lines

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 \Attribute::__construct() $name $values $server_id $source null getName \Attribute::getName() Return the name of the attribute. `boolean` `boolean` `string` $lower true boolean $real false boolean getValues \Attribute::getValues() getOldValues \Attribute::getOldValues() getValueCount \Attribute::getValueCount() getSource \Attribute::getSource() autoValue \Attribute::autoValue() Autovalue is called after the attribute is initialised, and thus the values from the ldap server will be set. $new_val initValue \Attribute::initValue() $new_val clearValue \Attribute::clearValue() setOldValue \Attribute::setOldValue() $val setValue \Attribute::setValue() $new_val addValue \Attribute::addValue() $new_val $i -1 delValue \Attribute::delValue() $i -1 getValue \Attribute::getValue() $i getOldValue \Attribute::getOldValue() $i getMinValueCount \Attribute::getMinValueCount() setMinValueCount \Attribute::setMinValueCount() $min getMaxValueCount \Attribute::getMaxValueCount() setMaxValueCount \Attribute::setMaxValueCount() $max haveMoreValues \Attribute::haveMoreValues() justModified \Attribute::justModified() hasBeenModified \Attribute::hasBeenModified() isForceDelete \Attribute::isForceDelete() setForceDelete \Attribute::setForceDelete() isInternal \Attribute::isInternal() setInternal \Attribute::setInternal() isRequired \Attribute::isRequired() isMay \Attribute::isMay() setType \Attribute::setType() $type getType \Attribute::getType() setLDAPtype \Attribute::setLDAPtype() $type getLDAPtype \Attribute::getLDAPtype() setProperties \Attribute::setProperties() $properties setRequired \Attribute::setRequired() setOptional \Attribute::setOptional() isReadOnly \Attribute::isReadOnly() setReadOnly \Attribute::setReadOnly() isMultiple \Attribute::isMultiple() isVisible \Attribute::isVisible() hide \Attribute::hide() show \Attribute::show() haveFriendlyName \Attribute::haveFriendlyName() getFriendlyName \Attribute::getFriendlyName() setDescription \Attribute::setDescription() $description getDescription \Attribute::getDescription() setIcon \Attribute::setIcon() $icon getIcon \Attribute::getIcon() getHint \Attribute::getHint() setHint \Attribute::setHint() $hint getMaxLength \Attribute::getMaxLength() setMaxLength \Attribute::setMaxLength() $maxlength getSize \Attribute::getSize() setSize \Attribute::setSize() $size getSpacer \Attribute::getSpacer() getPage \Attribute::getPage() setPage \Attribute::setPage() $page getOnChange \Attribute::getOnChange() getHelper \Attribute::getHelper() getHelperValue \Attribute::getHelperValue() getVerify \Attribute::getVerify() setRDN \Attribute::setRDN() $rdn isRDN \Attribute::isRDN() Return if this attribute is an RDN attribute `boolean` setLDAPdetails \Attribute::setLDAPdetails() Capture all the LDAP details we are interested in `\sattr` $sattr getAliases \Attribute::getAliases() Return a list of aliases for this Attribute (as defined by the schema) This list will be lowercase. getAutoValue \Attribute::getAutoValue() getPostValue \Attribute::getPostValue() setPostValue \Attribute::setPostValue() $postvalue setXML \Attribute::setXML() $values getRemovedValues \Attribute::getRemovedValues() Display the values removed in an attribute. getAddedValues \Attribute::getAddedValues() Display the values removed in an attribute. real_attr_name \Attribute::real_attr_name() Prunes off anything after the ";" in an attr name. 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. `string` `string` needJS \Attribute::needJS() Does this attribute need supporting JS $type null

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 summary was found for this file
No summary for function \openssl_hash()
No summary for function \mhash()
No summary 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 \MultiLineAttribute::getRows() setRows \MultiLineAttribute::setRows() $rows getCols \MultiLineAttribute::getCols() setCols \MultiLineAttribute::setCols() $cols

    eJx9kMtOwzAQRdf1V8wiC4gEZQ/0obIsEqr6A04yTaw6tmWPWyTUf2cckkCklu14zj13/LJ0jRPzPBeQw0bLEDCANBUcoilJWRPgYD1Qg0DYOi0JAU2tDD4ykaCVjNTwyp5XOGv7tv6QVasMVHhCbV2LhpiVbbfsZHmU9XSTH+Zi6LBD5zEwwzVAEnlVRHaeGxsQTlLH1M8jtFGT0tyDsz9p6HIjHlYhFsPbvr8jdN4y3QzvKW3LaevRyKloqgC/ky8xc94SloQVZN6eA7zC0/NkWlrdT3kcC63K8SehRtoxdHefkmYeKXoDGTUqPCxSGiddrmChxzrjD/sHYln2D8zODVe66kxdbzs7rLtn4uwPzEb4IpYL8Q3Kab14

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

AJAXTree

$server_id null $entries array() draw \Tree::draw() Displays the LDAP tree __construct \Tree::__construct() $server_id getInstance \Tree::getInstance() Create an instance of the tree - this is used when we call this class directly Tree::getInstance($index) `object` $server_id getServerID \Tree::getServerID() Get the Server ID for this tree `int` getServer \Tree::getServer() Get the server Object for this tree `object` getBaseEntries \Tree::getBaseEntries() Get the entries that are BaseDN entries. `array` indexDN \Tree::indexDN() This function will take the DN, convert it to lowercase and strip unnessary commas. 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. `\dn` `\dn` $dn getEntry \Tree::getEntry() Get a tree entry `\dn` `object` $dn addEntry \Tree::addEntry() Add an entry in the tree view ; the entry is added in the children array of its parent `\dn` `string` $dn string delEntry \Tree::delEntry() Delete an entry from the tree view ; the entry is deleted from the children array of its parent `\dn` $dn renameEntry \Tree::renameEntry() Rename an entry in the tree `\dn` `\dn` $dnOLD $dnNEW readChildren \Tree::readChildren() Read the children of a tree entry `\dn` `boolean` $dn $nolimit false readChildrenNumber \Tree::readChildrenNumber() Return the number of children an entry has. Optionally autoread the child entry. `\dn` `boolean` $dn $nolimit false

A collection of functions to handle sessions.

The phpLDAPadmin development team

phpLDAPadmin

Session

app_session_start
\app_session_start()
The only function which should be called by a user

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 \TreeItem::__construct() $server_id $dn getDN \TreeItem::getDN() Get the DN of this tree item. `\DN` getDNEncode \TreeItem::getDNEncode() getRDN \TreeItem::getRDN() Get the RDN of this tree items DN. `\RDN` setBase \TreeItem::setBase() Set this item as a LDAP base DN item. isBaseDN \TreeItem::isBaseDN() Return if this item is a base DN item. setObjectClasses \TreeItem::setObjectClasses() $oc getObjectClasses \TreeItem::getObjectClasses() isInLDAP \TreeItem::isInLDAP() getChildren \TreeItem::getChildren() Returns null if the children have never be defined or an array of the dn of the children readingChildren \TreeItem::readingChildren() $bool isChildSorted \TreeItem::isChildSorted() Do the children require resorting childSorted \TreeItem::childSorted() Mark the children as sorted addChild \TreeItem::addChild() Add a child to this DN entry. `\DN` $dn delChild \TreeItem::delChild() Delete a child from this DN entry. `\DN` $dn rename \TreeItem::rename() Rename this DN. `\DN` $dn isOpened \TreeItem::isOpened() Return if this item has been opened. close \TreeItem::close() Mark this node as closed. open \TreeItem::open() Opens the node ; the children of the node must have been defined setLeaf \TreeItem::setLeaf() Mark this node as a leaf. isLeaf \TreeItem::isLeaf() Return if this node is a leaf. getIcon \TreeItem::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 \TreeItem::setSizeLimited() Mark this node as a size limited (it wont have all its children). unsetSizeLimited \TreeItem::unsetSizeLimited() Clear the size limited flag. isSizeLimited \TreeItem::isSizeLimited() Return if this node has hit an LDAP size limit (and thus doesnt have all its children). setTemplate \TreeItem::setTemplate() $template getTemplate \TreeItem::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 \SelectionAttribute::__construct() $name $values $server_id $source null addOption \SelectionAttribute::addOption() $value $description addValue \SelectionAttribute::addValue() $new_val $i -1 getOptionCount \SelectionAttribute::getOptionCount() getSelection \SelectionAttribute::getSelection() autoValue \SelectionAttribute::autoValue() $value getDefault \SelectionAttribute::getDefault() isMultiple \SelectionAttribute::isMultiple() setMultiple \SelectionAttribute::setMultiple()

Classes and functions for the template engine.
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.

The phpLDAPadmin development team

phpLDAPadmin

\xmlTemplates
Templates
\Templates
Templates Class
This class will store all our templates.

phpLDAPadmin

Templates

    eJx1UMtOwzAQvPsr9hxV9AcQLYJjkTj0wHUTTxqDYxuv3RYh/h0nIYmQ4LbandfO7S50QW2rSlFFD5ZFIMROU5tdk4x3Qq2PlDpQQh8sJxDcyTjcFMZAOnYQUPMn9WKspQjW5HOkl6fDKtIaC9kQFxAKiGXQes+IH6PZ4fH+mQTxjDhq1tlYTbzyff2KJhUsJ2rYUQ3KAj2mLUMc5IwLOc0595xTV44lL5WfBwPWvXGkcYb1oYcrcuB+BAdu3vj0G1kOWzV3dfwJIlNrSxlGpi6m3yX5COIyDQXM4WXJ9I8N7SXX821xGv0n8dUd1wSnha69XZef6kvt7tQ3NmadJA==

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
DnAttribute
\DnAttribute
Represents an attribute whose values are DNs

phpLDAPadmin

Templates

    eJx1j0sOgkAMhvdziq5ZyAWMQGRpjDFcoEARIpTJtIMmxrs7ENG4cNv/9XWb2NaaOIoMRLDvUYQEkGtoPFfajSzQjA60JVAabI9KQHzpmDYhMYdS9NoGSxEsoeuQZyesh46hpon60Q7EGrI4LGaL1RUvv84gxGZlOJN1JCEzYwCquq70YfTWjkIwYe9nQEeQH2Ul+FMKqfhy1Yo3vSxr1fwp5Jx9+umuxLXA9/IwT5PszAt2qF7K

Classes and functions for the LDAP tree.

The phpLDAPadmin development team

phpLDAPadmin

\HTMLTree
AJAXTree
\AJAXTree
This class implements an AJAX based tree.

phpLDAPadmin

Tree

Tree

draw_item
\AJAXTree::draw_item()
Draw a node of the tree

<p>The Base DN to draw</p>

\dn

<p>a string of 0 and 1 ; $level == "000101" will draw " | |<node>"</p>

string

<p>is the first child entry, which is normally the "Create New Entry" option</p>

boolean

<p>is the last child entry, which is normally the "Create New Entry" option</p>

boolean
$item
$level
string
$first_child
true
boolean
$last_child
true
boolean
draw_children
\AJAXTree::draw_children()
Expand and draw a child entry, when it is clicked on. This is using AJAX just to render this section of the tree.
$parent_entry
$code
get_indentation
\AJAXTree::get_indentation()
Return the indentation before a node

<p>a string of 0 and 1 ; $code == "000101" will return " | |"</p>

$code
mixed
draw_javascript
\AJAXTree::draw_javascript()
Draw the javascript to support the tree.
create_before_child
\AJAXTree::create_before_child()
Draw the "Create New Entry" item before the children.
$entry
$level
create_after_child
\AJAXTree::create_after_child()
Draw the "Create New Entry" item after the children.
$entry
$level
draw_create_new_entry
\AJAXTree::draw_create_new_entry()
Draw the "Create New Entry" item.
$entry
$level
$img
listOpenItems
\AJAXTree::listOpenItems()
List the items in the tree that are open

List of open nodes

array

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 \TemplateRender::accept() Initialise and Render the TemplateRender $norender false getDefaultAttribute \TemplateRender::getDefaultAttribute() $attribute $container $type getMode \TemplateRender::getMode() Set the mode of the TemplateRender Applicable modes are "create" or "edit" getModeContainer \TemplateRender::getModeContainer() Return the container for this mode haveDefaultTemplate \TemplateRender::haveDefaultTemplate() Is the default template enabled? drawTemplateChoice \TemplateRender::drawTemplateChoice() Present a list of available templates for creating and editing LDAP entries visitStart \TemplateRender::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 \TemplateRender::visitEnd() drawHeader \TemplateRender::drawHeader() PAGE DRAWING METHODS * drawTitle \TemplateRender::drawTitle() $title null drawSubTitle \TemplateRender::drawSubTitle() $subtitle null drawMenu \TemplateRender::drawMenu() PAGE ENTRY MENU * getMenuItem \TemplateRender::getMenuItem() PAGE ENTRY MENU ITEMS * $i getDeleteAttributeMessage \TemplateRender::getDeleteAttributeMessage() getModifiedAttributesMessage \TemplateRender::getModifiedAttributesMessage() $modified_attributes getReadOnlyMessage \TemplateRender::getReadOnlyMessage() getViewSchemaMessage \TemplateRender::getViewSchemaMessage() getMenuItemRefresh \TemplateRender::getMenuItemRefresh() PAGE ENTRY MENU ITEMS DETAILS * getMenuItemSwitchTemplate \TemplateRender::getMenuItemSwitchTemplate() getMenuItemExportBase \TemplateRender::getMenuItemExportBase() getMenuItemMove \TemplateRender::getMenuItemMove() getMenuItemInternalAttributes \TemplateRender::getMenuItemInternalAttributes() getMenuItemDelete \TemplateRender::getMenuItemDelete() getMenuItemRename \TemplateRender::getMenuItemRename() getMenuItemCompare \TemplateRender::getMenuItemCompare() getMenuItemCreate \TemplateRender::getMenuItemCreate() getMenuItemAddAttribute \TemplateRender::getMenuItemAddAttribute() getMenuItemShowChildren \TemplateRender::getMenuItemShowChildren() $children_count getMenuItemExportSub \TemplateRender::getMenuItemExportSub() drawRDNChooser \TemplateRender::drawRDNChooser() RDN Chooser drawContainerChooser \TemplateRender::drawContainerChooser() Container Chooser $default_container drawObjectClassChooser \TemplateRender::drawObjectClassChooser() Object Class Chooser drawInternalAttributes \TemplateRender::drawInternalAttributes() INTERNAL ATTRIBUTES * drawInternalAttribute \TemplateRender::drawInternalAttribute() $attribute drawFormStart \TemplateRender::drawFormStart() FORM METHODS * drawForm \TemplateRender::drawForm() $nosubmit false drawFormEnd \TemplateRender::drawFormEnd() drawFormSubmitButton \TemplateRender::drawFormSubmitButton() drawStepTitle \TemplateRender::drawStepTitle() STEP FORM METHODS * $page drawStepFormStart \TemplateRender::drawStepFormStart() $page drawStepForm \TemplateRender::drawStepForm() $page drawStepFormEnd \TemplateRender::drawStepFormEnd() drawStepFormSubmitButton \TemplateRender::drawStepFormSubmitButton() $page drawStepFormDefaultAttributes \TemplateRender::drawStepFormDefaultAttributes() Given our known objectClass in the template, this will render the required MAY and optional MUST attributes drawShownAttributes \TemplateRender::drawShownAttributes() DRAW ATTRIBUTES * drawJavascript \TemplateRender::drawJavascript() DRAW PAGE JAVACRIPT drawTemplateJavascript \TemplateRender::drawTemplateJavascript() Javascript Functions drawTitleAttribute \TemplateRender::drawTitleAttribute() ATTRIBUTE TITLE * $attribute drawStartValueLineAttribute \TemplateRender::drawStartValueLineAttribute() ATTRIBUTE LINE * $attribute drawEndValueLineAttribute \TemplateRender::drawEndValueLineAttribute() $attribute drawTemplateAttribute \TemplateRender::drawTemplateAttribute() $attribute drawTemplateValuesAttribute \TemplateRender::drawTemplateValuesAttribute() $attribute drawIconAttribute \TemplateRender::drawIconAttribute() DRAW ICONS FOR ATTRIBUTES VALUES * $attribute $val drawDnValueIconAttribute \TemplateRender::drawDnValueIconAttribute() $attribute $val drawMailValueIconAttribute \TemplateRender::drawMailValueIconAttribute() $attribute $val drawUrlValueIconAttribute \TemplateRender::drawUrlValueIconAttribute() $attribute $val drawJavascriptAttribute \TemplateRender::drawJavascriptAttribute() javacript $attribute getFocusJavascriptAttribute \TemplateRender::getFocusJavascriptAttribute() $attribute $component getBlurJavascriptAttribute \TemplateRender::getBlurJavascriptAttribute() $attribute $component drawFocusJavascriptAttribute \TemplateRender::drawFocusJavascriptAttribute() $attribute $component drawBlurJavascriptAttribute \TemplateRender::drawBlurJavascriptAttribute() $attribute $component drawFillJavascriptAttribute \TemplateRender::drawFillJavascriptAttribute() $attribute $component_id $component_value drawValidateJavascriptAttribute \TemplateRender::drawValidateJavascriptAttribute() $attribute $component $silence $var_valid drawMenuAttribute \TemplateRender::drawMenuAttribute() ATTRIBUTE MENU * $attribute getMenuItemAttribute \TemplateRender::getMenuItemAttribute() $attribute $action getAddValueMenuItemAttribute \TemplateRender::getAddValueMenuItemAttribute() $attribute getAddValueMenuItemObjectClassAttribute \TemplateRender::getAddValueMenuItemObjectClassAttribute() $attribute getModifyMemberMenuItemAttribute \TemplateRender::getModifyMemberMenuItemAttribute() $attribute getRenameMenuItemAttribute \TemplateRender::getRenameMenuItemAttribute() $attribute drawValueAttribute \TemplateRender::drawValueAttribute() values * $attribute $i drawHelperAttribute \TemplateRender::drawHelperAttribute() $attribute $i drawRequiredSymbolAttribute \TemplateRender::drawRequiredSymbolAttribute() $attribute drawJavascriptBinaryAttribute \TemplateRender::drawJavascriptBinaryAttribute() $attribute drawJavaScriptDateAttribute \TemplateRender::drawJavaScriptDateAttribute() DATE ATTRIBUTE RENDERING * $attribute drawSelectorPopupDateAttribute \TemplateRender::drawSelectorPopupDateAttribute() Draws an HTML date selector button which, when clicked, pops up a date selector dialog. $attribute $i drawIconDnAttribute \TemplateRender::drawIconDnAttribute() DN ATTRIBUTES * $attribute $val drawIconObjectClassAttribute \TemplateRender::drawIconObjectClassAttribute() OBJECT CLASS ATTRIBUTE * $attribute $val drawJavascriptPasswordAttribute \TemplateRender::drawJavascriptPasswordAttribute() PASSWORD ATTRIBUTES * $attribute drawCheckLinkPasswordAttribute \TemplateRender::drawCheckLinkPasswordAttribute() $attribute $component_id drawJavascriptRandomPasswordAttribute \TemplateRender::drawJavascriptRandomPasswordAttribute() This will draw the javascript that displays to the user the random password generated `` $attribute drawDefaultHelperPasswordAttribute \TemplateRender::drawDefaultHelperPasswordAttribute() $attribute $i drawDefaultHelperSambaPasswordAttribute \TemplateRender::drawDefaultHelperSambaPasswordAttribute() $attribute $i drawIconSelectionAttribute \TemplateRender::drawIconSelectionAttribute() SELECTION ATTRIBUTE RENDERING * $attribute $val getMenuItemSelectionAttribute \TemplateRender::getMenuItemSelectionAttribute() $attribute $i

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 \myldap::__construct() $index connect \myldap::connect() Connect and Bind to the Database `string` `resource null` $method $debug false $new false login \myldap::login() Login to the database with the application user/password `boolean` $user null $pass null $method null $new false query \myldap::query() Perform a query to the Database `string` `string` `string` `boolean` `array null` $query $method $index null $debug false getErrorMessage \myldap::getErrorMessage() Get the last error string `string` $method null getErrorNum \myldap::getErrorNum() Get the last error number `string` $method null getLoginID \myldap::getLoginID() Get a user ID `string` $user $method null getLoginBaseDN \myldap::getLoginBaseDN() Return the login base DNs If no login base DNs are defined, then the LDAP server Base DNs are used. getLoginClass \myldap::getLoginClass() Return the login classes that a user must have to login isAnonBindAllowed \myldap::isAnonBindAllowed() Return if anonymous bind is allowed in the configuration isTLSEnabled \myldap::isTLSEnabled() Fetches whether TLS has been configured for use with a certain server. Users may configure phpLDAPadmin to use TLS in config,php thus: <code> $servers->setValue('server','tls',true|false); </code> `boolean` startTLS \myldap::startTLS() If TLS is configured, then start it $resource isSASLEnabled \myldap::isSASLEnabled() Fetches whether SASL has been configured for use with a certain server. Users may configure phpLDAPadmin to use SASL in config,php thus: <code> $servers->setValue('server','sasl',true|false); </code> `boolean` startSASL \myldap::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 \myldap::isProxyEnabled() Fetches whether PROXY AUTH has been configured for use with a certain server. Users may configure phpLDAPadmin to use PROXY AUTH in config,php thus: <code> $servers->setValue('login','auth_type','proxy'); </code> `boolean` startProxy \myldap::startProxy() If PROXY AUTH is configured, then start it $resource $method modify \myldap::modify() Modify attributes of a DN $dn $attrs $method null getBaseDN \myldap::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). Tested with OpenLDAP 2.0, Netscape iPlanet, and Novell eDirectory 8.7 (nldap.com) Please report any and all bugs!! 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. `string` `array` `` $method null dnExists \myldap::dnExists() Gets whether an entry exists based on its DN. If the entry exists, returns true. Otherwise returns false. `string` `string` `boolean` $dn $method null getContainerTop \myldap::getContainerTop() Given a DN string, this returns the top container portion of the string. `string` `string` $dn getContainerPath \myldap::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 \myldap::getContainer() Given a DN string, this returns the parent container portion of the string. For example. given 'cn=Manager,dc=example,dc=com', this function returns 'dc=example,dc=com'. `string` `string` $dn getContainerContents \myldap::getContainerContents() Gets a list of child entries for an entry. Given a DN, this function fetches the list of DNs of child entries one level beneath the parent. For example, for the following tree: <code> dc=example,dc=com ou=People cn=Dave cn=Fred cn=Joe ou=More People cn=Mark cn=Bob </code> Calling <code>getContainerContents("ou=people,dc=example,dc=com")</code> would return the following list: <code> cn=Dave cn=Fred cn=Joe ou=More People </code> `string` `string` `int` `string` `\constant` `array` $dn $method null $size_limit 0 $filter '(objectClass=*)' $deref LDAP_DEREF_NEVER explodeDN \myldap::explodeDN() Explode a DN into an array of its RDN parts. `string` `int` `array` $dn $with_attributes 0 escapeDN \myldap::escapeDN() Parse a DN and escape any special characters $dn getRootDSE \myldap::getRootDSE() $method null getSchemaDN \myldap::getSchemaDN() This function will query the ldap server and request the subSchemaSubEntry which should be the Schema DN. 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. `string` `\dn` `array false` $method null $dn '' getRawSchema \myldap::getRawSchema() Fetches the raw schema array for the subschemaSubentry of the server. 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". 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. `string` `string` `\dn` `array` $method $schema_to_fetch $dn '' getSchemaObjectClass \myldap::getSchemaObjectClass() Gets a single ObjectClass object specified by name. `string` `string` `\ObjectClass` `` `` $oclass_name string $method null $dn '' string getSchemaAttribute \myldap::getSchemaAttribute() Gets a single AttributeType object specified by name. `string` `string` `\AttributeType` `` `` $attr_name $method null $dn '' string SchemaObjectClasses \myldap::SchemaObjectClasses() Gets an associative array of ObjectClass objects for the specified server. Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object. `string` `array` `` `` $method null $dn '' string SchemaAttributes \myldap::SchemaAttributes() Gets an associative array of AttributeType objects for the specified server. Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object. `string` `array` $method null $dn '' string MatchingRules \myldap::MatchingRules() Returns an array of MatchingRule objects for the specified server. The key of each entry is the OID of the matching rule. $method null $dn '' SchemaSyntaxes \myldap::SchemaSyntaxes() Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions. The key of each entry is the OID of the Syntax. $method null $dn '' isForceMay \myldap::isForceMay() This function determines if the specified attribute is contained in the force_may list as configured in config.php. `boolean` $attr_name getDNAttrValue \myldap::getDNAttrValue() Much like getDNAttrValues(), but only returns the values for one attribute of an object. Example calls: <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> `string` `string` `string` `\constant` `array` `` `` $dn $attr $method null $deref LDAP_DEREF_NEVER getDNAttrValues \myldap::getDNAttrValues() Gets the attributes/values of an entry. Returns an associative array whose keys are attribute value names and whose values are arrays of values for said attribute. 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. Example of its usage: <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> `string` `string` `\constant` `array` `` `` $dn $method null $deref LDAP_DEREF_NEVER $attrs array('*', '+') isDNAttr \myldap::isDNAttr() Returns true if the attribute specified is required to take as input a DN. Some examples include 'distinguishedName', 'member' and 'uniqueMember'. `string` `boolean` $attr_name string $method null isJpegPhoto \myldap::isJpegPhoto() Used to determine if the specified attribute is indeed a jpegPhoto. If the specified attribute is one that houses jpeg data, true is returned. Otherwise this function returns false. `string` `boolean` `` $attr_name string isAttrBoolean \myldap::isAttrBoolean() Given an attribute name and server ID number, this function returns whether the attrbiute contains boolean data. This is useful for developers who wish to display the contents of a boolean attribute with a drop-down. `string` `boolean` $attr_name string isAttrBinary \myldap::isAttrBinary() Given an attribute name and server ID number, this function returns whether the attribute may contain binary data. 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. `string` `boolean` `` $attr_name string userIsMember \myldap::userIsMember() This function will test if a user is a member of a group. Inputs: `string` `\dn` `bool` $user string $group \dn userIsAllowedLogin \myldap::userIsAllowedLogin() This function will determine if the user is allowed to login based on a filter $dn

Contains code to be executed at the top of each application page.
include this file at the top of every PHP file.

This file will "pre-initialise" an application environment so that any PHP file will have a consistent environment with other application PHP files.

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).

The list of ADDITIONAL function files is now defined in functions.php.

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()

This class will render the editing of multiple LDAP entries.

The phpLDAPadmin development team

phpLDAPadmin

\TemplateRender
MassRender
\MassRender
TemplateRender class

phpLDAPadmin

Templates

drawMassFormReadWriteValueAttribute
\MassRender::drawMassFormReadWriteValueAttribute()
$attribute
$i
$j
drawMassFormReadWriteValueBinaryAttribute
\MassRender::drawMassFormReadWriteValueBinaryAttribute()
$attribute
$i
$j
drawMassFormReadWriteValueJpegAttribute
\MassRender::drawMassFormReadWriteValueJpegAttribute()
$attribute
$i
$j

Classes and functions for the template engine.

The phpLDAPadmin development team

phpLDAPadmin

\Attribute
GidAttribute
\GidAttribute
Represents a 'gidNumber' attribute

phpLDAPadmin

Templates

    eJx1j8EKwjAQRO/5ir0VerA/ILZFwYuISH9g22zbYJOGZCOC+O+mxSAevO7Mm5ndlna0oshzATnsJ/SePKCR0AfTsZqNh352wCMBk7YTMgGZQRnaRGKBKgw8RksTLTHrdKgvKLUyIOlO02w1GY4s6tVssbvh8OuMQiHShitZRz4ycQZkg5LnoFtyGSCzU21gSr1/oqDyoU1a89ns145u+Q+OStYpC+jBZKSH7+UpXqLciTfmx1tW

The phpLDAPadmin development team

phpLDAPadmin

\Visitor
PageRender
\PageRender
PageRender class

phpLDAPadmin

Templates

$template_id $template null $dn $container $page __construct \PageRender::__construct() $server_id $template_id visitAttribute \PageRender::visitAttribute() Dummy method. .. getTemplates \PageRender::getTemplates() Get our templates applicable for this object getTemplate \PageRender::getTemplate() getTemplateID \PageRender::getTemplateID() accept \PageRender::accept() Initialise the PageRender drawTitle \PageRender::drawTitle() $title 'Title' drawSubTitle \PageRender::drawSubTitle() $subtitle null setDN \PageRender::setDN() $dn setContainer \PageRender::setContainer() $dn getMode \PageRender::getMode() May be overloaded in other classes getModeContainer \PageRender::getModeContainer() getPostAttribute \PageRender::getPostAttribute() Process our <post> arguments from the templates $attribute $i getTemplateChoice \PageRender::getTemplateChoice() This function is invoked if we dont know which template we should be using. `string` drawNameAttribute \PageRender::drawNameAttribute() DRAW ATTRIBUTE NAME * $attribute drawNotesAttribute \PageRender::drawNotesAttribute() ATTRIBUTE NOTES $attribute getNoteAliasAttribute \PageRender::getNoteAliasAttribute() $attribute getNoteRequiredAttribute \PageRender::getNoteRequiredAttribute() $attribute getNoteRDNAttribute \PageRender::getNoteRDNAttribute() $attribute getNoteHintAttribute \PageRender::getNoteHintAttribute() $attribute getNoteROAttribute \PageRender::getNoteROAttribute() $attribute drawHiddenAttributes \PageRender::drawHiddenAttributes() Draw all hidden attributes drawHiddenValueAttribute \PageRender::drawHiddenValueAttribute() Draw specific hidden attribute $attribute $i drawOldValuesAttribute \PageRender::drawOldValuesAttribute() DRAW DISPLAYED OLD VALUES * $attribute drawOldValueAttribute \PageRender::drawOldValueAttribute() $attribute $i drawCurrentValuesAttribute \PageRender::drawCurrentValuesAttribute() DRAW DISPLAYED CURRENT VALUES * $attribute drawCurrentValueAttribute \PageRender::drawCurrentValueAttribute() Draw the current specific value of an attribute $attribute $i drawFormValueAttribute \PageRender::drawFormValueAttribute() Draw a input value for an attribute - used in a form. $attribute $i drawFormReadOnlyValueAttribute \PageRender::drawFormReadOnlyValueAttribute() $attribute $i drawFormReadWriteValueAttribute \PageRender::drawFormReadWriteValueAttribute() $attribute $i drawHiddenValueBinaryAttribute \PageRender::drawHiddenValueBinaryAttribute() Draw specific hidden binary attribute $attribute $i drawOldValueBinaryAttribute \PageRender::drawOldValueBinaryAttribute() $attribute $i drawCurrentValueBinaryAttribute \PageRender::drawCurrentValueBinaryAttribute() $attribute $i drawFormReadOnlyValueBinaryAttribute \PageRender::drawFormReadOnlyValueBinaryAttribute() $attribute $i drawFormReadWriteValueBinaryAttribute \PageRender::drawFormReadWriteValueBinaryAttribute() $attribute $i drawFormReadWriteValueDateAttribute \PageRender::drawFormReadWriteValueDateAttribute() $attribute $i drawFormReadWriteValueDnAttribute \PageRender::drawFormReadWriteValueDnAttribute() $attribute $i drawFormReadWriteValueGidAttribute \PageRender::drawFormReadWriteValueGidAttribute() $attribute $i drawOldValueJpegAttribute \PageRender::drawOldValueJpegAttribute() Draw a Jpeg Attribute $attribute $i drawCurrentValueJpegAttribute \PageRender::drawCurrentValueJpegAttribute() Draw a Jpeg Attribute $attribute $i drawFormReadOnlyValueJpegAttribute \PageRender::drawFormReadOnlyValueJpegAttribute() $attribute $i drawFormReadOnlyValueMultiLineAttribute \PageRender::drawFormReadOnlyValueMultiLineAttribute() $attribute $i drawFormReadWriteValueMultiLineAttribute \PageRender::drawFormReadWriteValueMultiLineAttribute() $attribute $i drawFormValueObjectClassAttribute \PageRender::drawFormValueObjectClassAttribute() $attribute $i getAutoPostPasswordAttribute \PageRender::getAutoPostPasswordAttribute() $attribute $i drawOldValuePasswordAttribute \PageRender::drawOldValuePasswordAttribute() $attribute $i drawCurrentValuePasswordAttribute \PageRender::drawCurrentValuePasswordAttribute() $attribute $i drawFormReadOnlyValuePasswordAttribute \PageRender::drawFormReadOnlyValuePasswordAttribute() $attribute $i drawFormReadWriteValuePasswordAttribute \PageRender::drawFormReadWriteValuePasswordAttribute() $attribute $i drawFormReadWriteValueSelectionAttribute \PageRender::drawFormReadWriteValueSelectionAttribute() $attribute $i shadow_date \PageRender::shadow_date() Takes a shadow* attribute and returns the date as an integer. `array` `string` $attribute drawShadowDateShadowAttribute \PageRender::drawShadowDateShadowAttribute() $attribute drawFormReadOnlyValueShadowAttribute \PageRender::drawFormReadOnlyValueShadowAttribute() $attribute $i drawFormReadWriteValueShadowAttribute \PageRender::drawFormReadWriteValueShadowAttribute() $attribute $i
No summary was found for this file
No summary for property $template_id
No summary for property $template
No summary for property $dn
No summary for property $container
No summary for property $page
No summary for method __construct()
No summary for method getTemplate()
No summary for method getTemplateID()
No summary for method drawTitle()
No summary for method drawSubTitle()
No summary for method setDN()
No summary for method setContainer()
No summary for method getModeContainer()
No summary for method getNoteAliasAttribute()
No summary for method getNoteRequiredAttribute()
No summary for method getNoteRDNAttribute()
No summary for method getNoteHintAttribute()
No summary for method getNoteROAttribute()
No summary for method drawOldValueAttribute()
No summary for method drawFormReadOnlyValueAttribute()
No summary for method drawFormReadWriteValueAttribute()
No summary for method drawOldValueBinaryAttribute()
No summary for method drawCurrentValueBinaryAttribute()
No summary for method drawFormReadOnlyValueBinaryAttribute()
No summary for method drawFormReadWriteValueBinaryAttribute()
No summary for method drawFormReadWriteValueDateAttribute()
No summary for method drawFormReadWriteValueDnAttribute()
No summary for method drawFormReadWriteValueGidAttribute()
No summary for method drawFormReadOnlyValueJpegAttribute()
No summary for method drawFormReadOnlyValueMultiLineAttribute()
No summary for method drawFormReadWriteValueMultiLineAttribute()
No summary for method drawFormValueObjectClassAttribute()
No summary for method getAutoPostPasswordAttribute()
No summary for method drawOldValuePasswordAttribute()
No summary for method drawCurrentValuePasswordAttribute()
No summary for method drawFormReadOnlyValuePasswordAttribute()
No summary for method drawFormReadWriteValuePasswordAttribute()
No summary for method drawFormReadWriteValueSelectionAttribute()
No summary for method drawShadowDateShadowAttribute()
No summary for method drawFormReadOnlyValueShadowAttribute()
No summary for method drawFormReadWriteValueShadowAttribute()

Classes and functions for export data from LDAP
These classes provide differnet export formats.

The phpLDAPadmin development team

phpLDAPadmin

and export_form.php

Exporter
\Exporter
Exporter Class
This class serves as a top level exporter class, which will return the correct Export class.

phpLDAPadmin

Export

$server_id $template_id $template __construct \Exporter::__construct() $server_id $template_id types \Exporter::types() accept \Exporter::accept() getTemplate \Exporter::getTemplate()
Export
\Export
Export Class
This abstract classes provides all the common methods and variables for the custom export classes.

phpLDAPadmin

Export

$br $compress $results $resultsdata $items 0 getServer \Export::getServer() Return this LDAP Server object `object` getServerID \Export::getServerID() Return the LDAP server ID `int` accept \Export::accept() isCompressed \Export::isCompressed() getHeader \Export::getHeader() isSafeAscii \Export::isSafeAscii() Helper method to check if the attribute value should be base 64 encoded. `\The` `boolean` $str
\Export
ExportCSV
\ExportCSV
Export entries to CSV
This abstract classes provides all the common methods and variables for the custom export classes.

phpLDAPadmin

Export

$separator ',' $qualifier '"' $multivalue_separator ' | ' $escapeCode '"' getType \ExportCSV::getType() export \ExportCSV::export() LdapEscape \ExportCSV::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
This abstract classes provides all the common methods and variables for the custom export classes.

phpLDAPadmin

Export

getType
\ExportDSML::getType()
export
\ExportDSML::export()
Export entries to DSML format
\Export
ExportLDIF
\ExportLDIF
Export from LDAP using an LDIF format
This abstract classes provides all the common methods and variables for the custom export classes.

phpLDAPadmin

Export

$line_length 76 getType \ExportLDIF::getType() export \ExportLDIF::export() Export entries to LDIF format multiLineDisplay \ExportLDIF::multiLineDisplay() Helper method to wrap ldif lines `\The` $str
\Export
ExportVCARD
\ExportVCARD
Export entries to VCARD v2.1
This abstract classes provides all the common methods and variables for the custom export classes.

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 \ExportVCARD::getType() export \ExportVCARD::export() Export entries to VCARD format

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

    eJx1j0sOAUEQhvd9ilrPggsIBksSwQVqpouZmH6kqxqJuLsaMRIR6//1/ZNZbKIZF4WBApYdMhMDegvH7Gtpg2c4hgTSEAi52KEQkD+1nkaa6ENzzNKo5aAW7Vqvyi1a13qwdKEuREdeNIvuZY5Yn/H07VRhbAaGHcVErJkeA1AktVXW0WsTmOCCXe4BE8G+3CxKiEp8DcnyQPNnAOacq0E7vJ/wa7nuX8MeXYXbd1v5maWbkLcMv8rdPMxsap4BpWsH

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

Tree

$javascript '' draw \HTMLTree::draw() Displays the tree in HTML `boolean` $onlytree false draw_server_name \HTMLTree::draw_server_name() Draw the server name draw_menu \HTMLTree::draw_menu() Draw the tree menu options get_menu_item \HTMLTree::get_menu_item() Get the HTML for each tree menu option $item get_logout_menu_item \HTMLTree::get_logout_menu_item() draw_logged_in_user \HTMLTree::draw_logged_in_user() Draw the Logged in User draw_item \HTMLTree::draw_item() Recursively descend on the given dn and draw the tree in html `\dn` `int` $item $level int get_formatted_dn \HTMLTree::get_formatted_dn() $entry $level draw_create_link \HTMLTree::draw_create_link() Print the HTML to show the "create new entry here". `\dn` `int` `\dn` $rdn \dn $level int $encoded_dn \dn draw_login_link \HTMLTree::draw_login_link() Draw login link draw_javascript \HTMLTree::draw_javascript() If there is javascript, draw it getDepth \HTMLTree::getDepth() Work out how deep the "opened" tree is.

No summary was found for this file

No summary was found for this file

Updates or deletes a value from a specified attribute for a specified dn.

phpLDAPadmin

Page

Query render engine.

phpLDAPadmin

Page

The phpLDAPadmin development team

    eJxtj81uwjAQhO9+ij0gOYlC8gC0oUVwiMQBUnpCCLnOkkQktvEPLW9fJ6RISL1Yq/lmPbMvc1UrkkYRgQi2DvUNNIoSNaCoGoGJ13v0phg/swrB29fL9w0ru0YMwLivP7bxz6AxZ2upYVc/+6HEK7ZSdSgsWGSdN6dkTPeDxotrNAJNUi67TorEb9PZQ1/ni2VeJPTS9zyenOC2kcKMLjLpfWgsvALTmt2CcPbQ9lT5cvTgmcDv+6XFcGgwYUrtqUF9RU0P06xCm3vwE4SxH4/jB8E9lca0WG0/Vx87Gp9YazAWrm3Df5KmGeMcle1bzDPyC+CfdDk=

Displays a form to allow the user to modify group members.

phpLDAPadmin

Page

Compares two DN entries side by side.

phpLDAPadmin

Page

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

Compares two DN entries side by side.
This is the entry form to determine which DN to compare this DN with.

phpLDAPadmin

Page

Check the password used by an entry.

phpLDAPadmin

Page

This page will allow the adding of additional ObjectClasses to an item.
+ If the ObjectClass to be added requires additional MUST attributes to be defined, then they will be prompted for. + If the ObjectClass doesnt need any additional MUST attributes, then it will be silently added to the object.

phpLDAPadmin

Page

Main command page for phpLDAPadmin This script will handle bulk updates.

phpLDAPadmin

Page

Template render engine.

phpLDAPadmin

Page

The phpLDAPadmin development team

Takes the results of clicking "Save" in template_engine.php and determines which attributes need to be updated (ie, which ones actually changed). 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.

phpLDAPadmin

Page

getMustAttrs
\getMustAttrs()
$oclasses

Creates a new object in LDAP.

phpLDAPadmin

Page

Copies a given object to create a new one.

phpLDAPadmin

Page

Deletes an attribute from an entry with NO confirmation.

phpLDAPadmin

Page

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

Download a binary value attribute to the user.
A server ID, DN and Attribute must be provided in the GET attributes. Optionally an index, type and filename can be supplied.

phpLDAPadmin

Page

This script will display the contents of the jpegPhoto attribute to the browser.
A server ID and DN must be provided in the GET attributes. Optionally an attr name, index, type and filename can be supplied.

phpLDAPadmin

Page

Imports an LDIF file to the specified LDAP server.

phpLDAPadmin

Page

display_pla_parse_error
\display_pla_parse_error()
$request

Copies a given object to create a new one.

phpLDAPadmin

Page

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

Displays a form for adding an attribute/value to an LDAP entry.

phpLDAPadmin

Page

Displays a last chance confirmation form to delete a DN.

phpLDAPadmin

Page

phpLDAPadmin Start Page

phpLDAPadmin

Page

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

Displays a form to allow the user to upload and import an LDIF file.

phpLDAPadmin

Page

Main command page for phpLDAPadmin Enable mass editing of Attribute values from a list of DNs.

phpLDAPadmin

Page

This script alters the session variable 'tree', collapsing it at the dn specified in the query string.
Note: this script is equal and opposite to expand.php

phpLDAPadmin

Tree

    eJyVUcFOIzEMPZOvsEQh02po70DbXQmEkBDi0BtCVUhMJ0smCbEHsX+/zpQF7aXSnpI8P7/n51yuc5fVYjZTMINN5wnIFp8ZTGAsBNwhEBL5FOHdFG+eA4LmgqhbsCkEk8nHHXiuAobHBheBMlr/4tGBjyP2NmD5DcRF2HPhVvp9YjyX6rer3PBtMAFMdJByTuQZgRPgRxZoXofd9/7Ixr6aHYJAd1c/H4zrfRwLNDz/rW1kzj2G+K/EQn2GlksRS18k1nxhU9+nWDn6QqmJBFnCDnlbKUjcaBd1q2+uN7rlMuD0Qk3qLj5Z1tgO3VZG7puJyflRE5Z3LPrpbCX12+jwo5m2+/XVXowsS1nCKDJyrivSiPFX+WxlQyJsBKD/9Wh1HELQ7agvAqpD47A0lOUb+KXRd8kalr8997Wv5l7v5bbeLU/o9NcQX+U8PiHdqqMDfkVWm/pt5cur4z54d2i+mnAqEzk/Jluv1B8eKtNc

This script alters the session variable 'tree', expanding it at the dn specified in the query string.
Note: this script is equal and opposite to collapse.php

phpLDAPadmin

Tree

    eJyVUU1PwzAMPZNfYYmNdFPZ7oxtIDEhJIQ47IbQlDVmDbRJiF0E/x6n40PiMIlTHPv5PT/7fBnrqKbjsYIxrGtHQFVykcE0jImAawRCIhc8vJnkzLZB0JwQdQn4Ho23zu/Ace433OOtB4pYuSeHFpzvc68dpg8gToKeCDbD7wLjmVR/RSXC1840ILQQYgzkGIEDVKFpTCSc5Gn33RfRVC9mhyCp26vLe2Nb5/sCddvv2loG3ecQ/5JM1ZdvCZLIuiTOJtMqtG3wGaNnSg3EzBx2yJsMQeJCW69Lfb1a65JTh6OZGuR1fKEqU9VoNzJ2WwxMjA+aML1h0o+nC6nfeIvvxajcbzD3omdZzBx6kh6zyplChH/Kp4sQ0Rfyp/9KlNp3TaPLnl4IVI3GYiooyiX4qdC3oTIs1z1zuS/bXu7pNs7Oh3Ty3PkXeY+HpEt1dEAvyc1Cu8l4+dXcNs4emi8bHMlE1mF2tlyoTxzs1DA=

Draw a portion of the LDAP tree.

phpLDAPadmin

Tree

Deletes a DN and presents a "job's done" message.

phpLDAPadmin

Page

Creates a new object in LDAP.

phpLDAPadmin

Page

Performs the export of data from the LDAP server

phpLDAPadmin

Page

Renames a DN to a different name.

phpLDAPadmin

Page

Recursively deletes the specified DN and all of its children

phpLDAPadmin

Page

pla_rdelete
\pla_rdelete()
$server
$dn

Displays a last chance confirmation form to delete a DN.

phpLDAPadmin

Page

This script provides a convienent method to call the proper common.php

phpLDAPadmin

LIBDIR
\\LIBDIR
sprintf('%s/', realpath('../lib/'))

    eJxFjsFOwzAQRM/4K5ZD5SSq7A8IogX1UqmHquodGXtTr0jsxTb5/joNgtto5s3svuzYs9BdJ6CDq6cM2SbiApziTA4zGLAxzIQBQ4EJi48OSgRrxhGKxwVkTBWaphjUsgaPsT0b+2VuFfB8OrydjZso1ECL33NV0ADNMzgcKKBr5On4fjheZNuKp9X7s7aZE4UyNHKTtdwmNCOb4huplB7pU9dO24uE3z+U8CMGi7A2lfx/TPZi9yru2xRJpw==

Display a selection (popup window) to pick a DN.

phpLDAPadmin

Page

Export entries from the LDAP server.

phpLDAPadmin

Page

get_line_end_format
\get_line_end_format()
Helper function for fetching the line end format.

&#039;win&#039;, &#039;unix&#039;, or &#039;mac&#039; based on the user&#039;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

Main command page for phpLDAPadmin All pages are rendered through this script.

phpLDAPadmin

Page

phpLDAPadmin

No summary was found for this file

    eJw1jb0KwjAURvf7FBcstHZodhVrwcEhQ1fHmFya0Da35Afs2xsUp++Dc+Bc+s1uIARWD1KGQgUg2hawxdum9KwmwiLI+zAqszpfgAA44JMzRst5MRhJ50C4cw44ygFfO65qdn7CZAltMqyj+OFyA3PqwH5bTS1Zq+TYn/6e84beXSnWxzMYR02Z/gofik40WA==

User is logged off from LDAP server, session is destroyed.

main

Roland Gruber

Creates main suffixes if they are missing.

Roland Gruber

main

Creates the accounts by parsing the uploaded file.

Roland Gruber

tools

massPrintBackButton
\massPrintBackButton()
Prints a back button to the page where the user enters a file to upload.

<p>account type (e.g. user)</p>

String

<p>selected modules for upload</p>

array

<p>table container</p>

\htmlTable
$scope
String
$selectedModules
array
$container
\htmlTable

LDAP Account Manager help page.

Michael Duergner

Roland Gruber

Help

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.

<p>The help entry that is to be displayed.</p>

array

<p>The help variables that are used to replace the spacer in the help text.</p>

array
$helpEntry
$helpVariables