RELEASE 0.9.7
This commit is contained in:
29
templates/alias.xml
Normal file
29
templates/alias.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!--This template doesnt work needs modification to the Engine.-->
|
||||
<template>
|
||||
<title>ldap_alias</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail_alias.png</icon>
|
||||
<description>New LDAP Alias</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>aliasedObjectName</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="alias"></objectClass>
|
||||
<objectClass id="extensibleObject"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="aliasedObjectName">
|
||||
<display>Alias To</display>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
<helper>
|
||||
<display></display>
|
||||
<location>side</location>
|
||||
<value>=php.DrawChooserLink(aliasedObjectName,0)</value>
|
||||
</helper>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
111
templates/courierMailAccount.xml
Normal file
111
templates/courierMailAccount.xml
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<title>courier_mail_account</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail_account.png</icon>
|
||||
<description>New Courier Mail Account</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>0</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="inetOrgPerson"></objectClass>
|
||||
<objectClass id="courierMailAccount"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="uid">
|
||||
<display>t_uid</display>
|
||||
<icon>images/uid.png</icon>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<onchange>autoFill:homeDirectory,/home/users/%uid%</onchange>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="mail">
|
||||
<display>t_email</display>
|
||||
<icon>images/mail.png</icon>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="mailbox">
|
||||
<display>Mailbox</display>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
<spacer>1</spacer>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="sn">
|
||||
<display>t_last_name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
|
||||
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="cn">
|
||||
<display>Common Name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<order>5</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="uidNumber">
|
||||
<icon>images/terminal.png</icon>
|
||||
<display>t_uid_number</display>
|
||||
<description></description>
|
||||
<hint>t_auto_det</hint>
|
||||
<default></default>
|
||||
<presubmit>=php.GetNextNumber(/,uid)</presubmit>
|
||||
<order>6</order>
|
||||
<page>1</page>
|
||||
<hidden>0</hidden>
|
||||
</attribute>
|
||||
<attribute id="gidNumber">
|
||||
<display>t_gid_number</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</default>
|
||||
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
|
||||
<order>7</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="homeDirectory">
|
||||
<display>t_home_dir</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>8</order>
|
||||
<page>1</page>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="userPassword">
|
||||
<display>t_password</display>
|
||||
<icon>images/lock.png</icon>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default></default>
|
||||
<order>9</order>
|
||||
<page>1</page>
|
||||
<type>password</type>
|
||||
<verify>1</verify>
|
||||
<helper>
|
||||
<id>enc</id>
|
||||
<display>t_encryption</display>
|
||||
<location>side</location>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<value>clear</value>
|
||||
<value>md5</value>
|
||||
</helper>
|
||||
<post>=php.Password(%enc%,%userPassword%)</post>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
||||
|
38
templates/courierMailAlias.xml
Normal file
38
templates/courierMailAlias.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<title>courier_mail_alias</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail_alias.png</icon>
|
||||
<description>New Courier Mail Alias</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>0</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="inetOrgPerson"></objectClass>
|
||||
<objectClass id="courierMailAlias"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="cn">
|
||||
<display>t_common_name</display>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sn">
|
||||
<display>t_last_name</display>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="mail">
|
||||
<display>t_email</display>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="maildrop">
|
||||
<display>Maildrop</display>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/custom.php,v 1.37 2004/10/24 23:51:51 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/custom.php,v 1.41 2005/09/25 04:48:21 wurley Exp $
|
||||
|
||||
// Common to all templates
|
||||
$rdn = isset( $_POST['rdn'] ) ? $_POST['rdn'] : null;
|
||||
$container = $_POST['container'];
|
||||
$server_id = $_POST['server_id'];
|
||||
$ldapserver = $ldapservers->Instance($server_id);
|
||||
|
||||
// Unique to this template
|
||||
$step = isset( $_POST['step'] ) ? $_POST['step'] : 1;
|
||||
@@ -14,7 +15,7 @@ have_auth_info( $server_id ) or pla_error( $lang['not_enough_login_info'] );
|
||||
|
||||
if( $step == 1 )
|
||||
{
|
||||
$oclasses = get_schema_objectClasses( $server_id );
|
||||
$oclasses = get_schema_objectClasses( $ldapserver );
|
||||
if( ! $oclasses || ! is_array( $oclasses ) )
|
||||
pla_error( "Unable to retrieve the schema from your LDAP server. Cannot continue with creation." );
|
||||
?>
|
||||
@@ -77,7 +78,7 @@ if( $step == 2 )
|
||||
strlen( trim( $rdn ) ) != 0 or
|
||||
pla_error( $lang['rdn_field_blank'] );
|
||||
|
||||
strlen( trim( $container ) ) == 0 or dn_exists( $server_id, $container ) or
|
||||
strlen( trim( $container ) ) == 0 or dn_exists( $ldapserver, $container ) or
|
||||
pla_error( sprintf( $lang['container_does_not_exist'], htmlspecialchars( $container ) ) );
|
||||
|
||||
$friendly_attrs = process_friendly_attr_table();
|
||||
@@ -87,11 +88,11 @@ if( $step == 2 )
|
||||
$dn = trim( $container ) ? $rdn . ',' . $container : $rdn;
|
||||
|
||||
// incrementally build up the all_attrs and required_attrs arrays
|
||||
$schema_oclasses = get_schema_objectclasses( $server_id );
|
||||
$schema_oclasses = get_schema_objectclasses( $ldapserver );
|
||||
$required_attrs = array();
|
||||
$all_attrs = array();
|
||||
foreach( $oclasses as $oclass_name ) {
|
||||
$oclass = get_schema_objectclass( $server_id, $oclass_name );
|
||||
$oclass = get_schema_objectclass( $ldapserver, $oclass_name );
|
||||
if( $oclass ) {
|
||||
$required_attrs = array_merge( $required_attrs,
|
||||
$oclass->getMustAttrNames( $schema_oclasses ) );
|
||||
@@ -103,8 +104,8 @@ if( $step == 2 )
|
||||
|
||||
$required_attrs = array_unique( $required_attrs );
|
||||
$all_attrs = array_unique( $all_attrs );
|
||||
remove_aliases( $required_attrs, $server_id );
|
||||
remove_aliases( $all_attrs, $server_id );
|
||||
remove_aliases( $required_attrs, $ldapserver );
|
||||
remove_aliases( $all_attrs, $ldapserver );
|
||||
sort( $required_attrs );
|
||||
sort( $all_attrs );
|
||||
|
||||
@@ -128,7 +129,7 @@ if( $step == 2 )
|
||||
// remove binary attributes and add them to the binary_attrs array
|
||||
$binary_attrs = array();
|
||||
foreach( $all_attrs as $i => $attr_name ) {
|
||||
if( is_attr_binary( $server_id, $attr_name ) ) {
|
||||
if( is_attr_binary( $ldapserver, $attr_name ) ) {
|
||||
unset( $all_attrs[ $i ] );
|
||||
$binary_attrs[] = $attr_name;
|
||||
}
|
||||
@@ -183,7 +184,7 @@ if( $step == 2 )
|
||||
|
||||
?></b></td></tr>
|
||||
<tr>
|
||||
<td class="val"><input type="<?php echo (is_attr_binary( $server_id, $attr ) ? "file" : "text"); ?>"
|
||||
<td class="val"><input type="<?php echo (is_attr_binary( $ldapserver, $attr ) ? "file" : "text"); ?>"
|
||||
name="required_attrs[<?php echo htmlspecialchars($attr); ?>]"
|
||||
value="<?php echo ($attr == $rdn_attr ? htmlspecialchars($rdn_value) : '') ?>" size="40" />
|
||||
</tr>
|
||||
@@ -272,7 +273,7 @@ function get_binary_attr_select_html( $binary_attrs, $friendly_attrs, $highlight
|
||||
* Removes attributes from the array that are aliases for eachother
|
||||
* (just removes the second instance of the aliased attr)
|
||||
*/
|
||||
function remove_aliases( &$attribute_list, $server_id )
|
||||
function remove_aliases( &$attribute_list, $ldapserver )
|
||||
{
|
||||
// remove aliases from the attribute_list array
|
||||
for( $i=0; $i<count( $attribute_list ); $i++ ) {
|
||||
@@ -286,7 +287,7 @@ function remove_aliases( &$attribute_list, $server_id )
|
||||
continue;
|
||||
$attr_name2 = $attribute_list[ $k ];
|
||||
//echo "Comparing $attr_name1 and $attr_name2<br>";
|
||||
$attr1 = get_schema_attribute( $server_id, $attr_name1 );
|
||||
$attr1 = get_schema_attribute( $ldapserver, $attr_name1 );
|
||||
if( null == $attr1 )
|
||||
continue;
|
||||
if( $attr1->isAliasFor( $attr_name2 ) ) {
|
||||
@@ -298,4 +299,3 @@ function remove_aliases( &$attribute_list, $server_id )
|
||||
$attribute_list = array_values( $attribute_list );
|
||||
}
|
||||
?>
|
||||
|
||||
|
@@ -59,7 +59,7 @@ have_auth_info( $server_id ) or pla_error( "Not enough information to login to s
|
||||
$attribute_name = $attribute_parts[1];
|
||||
$alias_slashed = str_replace(',', '\,', $alias);
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_dns_entry.php,v 1.9 2004/10/24 23:51:51 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_dns_entry.php,v 1.10 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
// Common to all templates
|
||||
$container = $_POST['container'];
|
||||
@@ -56,7 +56,7 @@ if( isset($_POST['step']) )
|
||||
$container = trim( $_POST['container'] );
|
||||
$associateddomain = trim( $_POST['associateddomain'] );
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
?>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_nt_machine.php,v 1.13 2004/12/16 22:59:50 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_nt_machine.php,v 1.14 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
|
||||
// Common to all templates
|
||||
@@ -21,7 +21,7 @@ $default_home_dir = '/dev/null';
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
if( get_schema_objectclass( $server_id, 'sambaAccount' ) == null )
|
||||
if( get_schema_objectclass( $ldapserver, 'sambaAccount' ) == null )
|
||||
pla_error( "Your LDAP server does not have schema support for the sambaAccount objectClass. Cannot continue." );
|
||||
|
||||
?>
|
||||
@@ -87,7 +87,7 @@ if( get_schema_objectclass( $server_id, 'sambaAccount' ) == null )
|
||||
$machine_name = trim( $_POST['machine_name'] );
|
||||
$uid_number = trim( $_POST['uid_number'] );
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
?>
|
||||
|
@@ -174,10 +174,10 @@ if ( !$verify ) {
|
||||
$reg_zip = trim( $_POST['reg_zip'] );
|
||||
$container = trim( $_POST['container'] );
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
dn_exists( $server_id, $occupant ) or
|
||||
dn_exists( $ldapserver, $occupant ) or
|
||||
pla_error( "The occupant you specified (" . htmlspecialchars( $occupant ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
0 != strlen( $or_name ) or
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_ou_template.php,v 1.11 2004/10/24 23:51:51 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_ou_template.php,v 1.12 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
// Common to all templates
|
||||
$container = $_POST['container'];
|
||||
@@ -48,7 +48,7 @@ have_auth_info( $server_id ) or pla_error( "Not enough information to login to s
|
||||
$ou_name = trim( $_POST['ou_name'] );
|
||||
$container = trim( $_POST['container'] );
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_posix_group_template.php,v 1.9 2004/10/24 23:51:51 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_posix_group_template.php,v 1.10 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
// Common to all templates
|
||||
$container = $_POST['container'];
|
||||
@@ -75,7 +75,7 @@ have_auth_info( $server_id ) or pla_error( "Not enough information to login to s
|
||||
if( '' != trim( $uid ) && ! in_array( $uid, $member_uids ) )
|
||||
$member_uids[] = $uid;
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -56,7 +56,7 @@ have_auth_info( $server_id ) or pla_error( "Not enough information to login to s
|
||||
$mail = trim( $_POST['mail'] );
|
||||
$maildrop = trim( $_POST['maildrop'] );
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_security_object_template.php,v 1.4 2004/10/24 23:51:51 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_security_object_template.php,v 1.5 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
// customize this to your needs
|
||||
$default_container = "ou=server";
|
||||
@@ -137,7 +137,7 @@ function autoFillHomeDir( form )
|
||||
/* Critical assertions */
|
||||
$password1 == $password2 or
|
||||
pla_error( "Your passwords don't match. Please go back and try again." );
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smb3_nt_machine.php,v 1.7 2004/12/16 22:59:50 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smb3_nt_machine.php,v 1.8 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
// Common to all templates
|
||||
$container = $_POST['container'];
|
||||
@@ -21,7 +21,7 @@ $default_home_dir = '/dev/null';
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
if( get_schema_objectclass( $server_id, 'sambaSamAccount' ) == null )
|
||||
if( get_schema_objectclass( $ldapserver, 'sambaSamAccount' ) == null )
|
||||
pla_error( "Your LDAP server does not have schema support for the sambaSamAccount objectClass. Cannot continue." );
|
||||
|
||||
?>
|
||||
@@ -111,7 +111,7 @@ if( get_schema_objectclass( $server_id, 'sambaSamAccount' ) == null )
|
||||
$samba3_domain_sid = trim( $_POST['samba3_domain_sid'] );
|
||||
$samba3_computer_rid = trim( $_POST['samba3_rid'] );
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
?>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smb3_user_template.php,v 1.23 2004/12/16 22:59:50 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smb3_user_template.php,v 1.25 2005/09/23 13:43:55 wurley Exp $
|
||||
|
||||
$samba3_domains = get_samba3_domains();
|
||||
|
||||
@@ -15,7 +15,7 @@ if( isset($_POST['step']) )
|
||||
$step = $_POST['step'];
|
||||
|
||||
//check if the sambaSamAccount objectClass is availaible
|
||||
if( get_schema_objectclass( $server_id, 'sambaSamAccount' ) == null )
|
||||
if( get_schema_objectclass( $ldapserver, 'sambaSamAccount' ) == null )
|
||||
pla_error( "Your LDAP server does not have schema support for the sambaSamAccount objectClass. Cannot continue." );
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
@@ -85,7 +85,7 @@ function autoFillSambaGroupRID( form ){
|
||||
|
||||
if( isset( $samba_base_groups ) )
|
||||
$base_dn = $samba_base_groups;
|
||||
$posix_groups = get_posix_groups( $server_id , $base_dn );
|
||||
$posix_groups = get_posix_groups( $ldapserver , $base_dn );
|
||||
?>
|
||||
|
||||
<form action="creation_template.php" method="post" id="user_form" name="user_form">
|
||||
@@ -99,7 +99,7 @@ function autoFillSambaGroupRID( form ){
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="heading">UID Number:</td>
|
||||
<?php $next_uid_number = get_next_uid_number( $server_id ); ?>
|
||||
<?php $next_uid_number = get_next_uid_number( $ldapserver ); ?>
|
||||
<td><input type="text" name="uid_number" value="<?php echo $next_uid_number; ?>" onChange="autoFillSambaRID(this.form)" />
|
||||
<?php if( false !== $next_uid_number ) echo "<small>(automatically determined)</small>"; ?>
|
||||
</td>
|
||||
@@ -232,7 +232,7 @@ function autoFillSambaGroupRID( form ){
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<?php $posix_groups_found = ( is_array( $posix_groups )?1:0 );?>
|
||||
<?php $posix_groups_found = ( count( $posix_groups )>0?1:0 );?>
|
||||
<td class="heading"><?php echo $posix_groups_found?"Unix Group":"GID Number"?>:</td>
|
||||
<td>
|
||||
<?php if( $posix_groups_found ){?>
|
||||
@@ -355,7 +355,7 @@ function autoFillSambaGroupRID( form ){
|
||||
pla_error( "You cannot leave the UID number blank. Please go back and try again." );
|
||||
is_numeric( $uid_number ) or
|
||||
pla_error( "You can only enter numeric values for the UID number field. Please go back and try again." );
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smbgroup_template.php,v 1.13 2004/12/16 22:59:50 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smbgroup_template.php,v 1.14 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
// Common to all templates
|
||||
$rdn = isset( $_POST['rdn'] ) ? $_POST['rdn'] : null;
|
||||
@@ -19,7 +19,7 @@ if( isset($_POST['step']) )
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." );
|
||||
|
||||
if( get_schema_objectclass( $server_id, 'sambaGroupMapping' ) == null )
|
||||
if( get_schema_objectclass( $ldapserver, 'sambaGroupMapping' ) == null )
|
||||
pla_error( "Your LDAP server does not have schema support for the sambaGroupMapping objectClass. Cannot continue." );
|
||||
|
||||
?>
|
||||
@@ -200,7 +200,7 @@ function autoFillSambaGroupRID( form ){
|
||||
if( '' != trim( $uid ) && ! in_array( $uid, $member_uids ) )
|
||||
$member_uids[] = $uid;
|
||||
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smbuser_template.php,v 1.17 2004/12/16 22:59:50 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_smbuser_template.php,v 1.18 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
$default_container = "ou=Users";
|
||||
$default_home = "/home";
|
||||
@@ -12,7 +12,7 @@
|
||||
$step = $_POST['step'];
|
||||
|
||||
//check if the sambaSamAccount objectClass is availaible
|
||||
if( get_schema_objectclass( $server_id, 'sambaAccount' ) == null )
|
||||
if( get_schema_objectclass( $ldapserver, 'sambaAccount' ) == null )
|
||||
pla_error( "Your LDAP server does not have schema support for the sambaAccount objectClass. Cannot continue." );
|
||||
|
||||
check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) );
|
||||
@@ -198,7 +198,7 @@
|
||||
pla_error( "You cannot leave the UID number blank. Please go back and try again." );
|
||||
is_numeric( $uid_number ) or
|
||||
pla_error( "You can only enter numeric values for the UID number field. Please go back and try again." );
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( "The container you specified (" . htmlspecialchars( $container ) . ") does not exist. " .
|
||||
"Please go back and try again." );
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_user_template.php,v 1.25 2004/12/20 14:12:33 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/creation/new_user_template.php,v 1.26 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
/*
|
||||
* TODO Add a check: If the server is configured to use auto_uid_numbers AND the
|
||||
@@ -199,7 +199,7 @@ function autoFillHomeDir( form )
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="heading"><?php echo $lang['t_uid_number']; ?>:</td>
|
||||
<?php $next_uid_number = ( auto_uid_numbers_enabled( $server_id ) ? get_next_uid_number( $server_id ) : false ); ?>
|
||||
<?php $next_uid_number = ( auto_uid_numbers_enabled( $server_id ) ? get_next_uid_number( $ldapserver ) : false ); ?>
|
||||
<td><input type="text" name="uid_number" value="<?php echo $next_uid_number ?>" />
|
||||
<?php if( false !== $next_uid_number ) echo "<small>" . $lang['t_auto_det'] . "</small>"; ?>
|
||||
</td>
|
||||
@@ -210,7 +210,7 @@ function autoFillHomeDir( form )
|
||||
$base_dn = null;
|
||||
if( isset( $base_posix_groups ) )
|
||||
$base_dn = $base_posix_groups;
|
||||
$posix_groups = get_posix_groups( $server_id, $base_dn );
|
||||
$posix_groups = get_posix_groups( $ldapserver, $base_dn );
|
||||
$posix_groups_found = ( count( $posix_groups ) ? true : false ); ?>
|
||||
<td class="heading"><?php echo $posix_groups_found ? $lang['t_group'] : $lang['t_gid_number'] ?>:</td>
|
||||
<td>
|
||||
@@ -263,7 +263,7 @@ function autoFillHomeDir( form )
|
||||
pla_error( sprintf( $lang['t_err_field_num'], $lang['t_uid_number'] ) );
|
||||
is_numeric( $gid_number ) or
|
||||
pla_error( sprintf( $lang['t_err_field_num'], $lang['t_gid_number'] ) );
|
||||
dn_exists( $server_id, $container ) or
|
||||
dn_exists( $ldapserver, $container ) or
|
||||
pla_error( sprintf( $lang['t_err_bad_container'], htmlspecialchars( $container ) ) );
|
||||
|
||||
$password = password_hash( $password1, $encryption );
|
||||
|
29
templates/dNSDomain.xml
Normal file
29
templates/dNSDomain.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<title>dns_entry</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/dc.png</icon>
|
||||
<description>New DNS Entry</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>dc</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="dnsDomain"></objectClass>
|
||||
<objectClass id="domainRelatedObject"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="domainComponent">
|
||||
<display>DC Name</display>
|
||||
<description>Domain Component</description>
|
||||
<override>dc</override>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="associatedDomain">
|
||||
<display>Associated Domain</display>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
38
templates/example.xml
Normal file
38
templates/example.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<title>Example entry</title>
|
||||
<icon>images/star.png</icon>
|
||||
<description>This is the description</description>
|
||||
<rdn>o</rdn>
|
||||
<regexp>^$</regexp>
|
||||
<visible>0</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="organization"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="attribute1">
|
||||
<display>Attribute 1</display>
|
||||
<description>This is the attribute description</description>
|
||||
<default></default>
|
||||
<hint>This is an example</hint>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
<icon>images/user.png</icon>
|
||||
</attribute>
|
||||
<attribute id="attribute2">
|
||||
<display>Attribute 2</display>
|
||||
<description>This is the attribute description</description>
|
||||
<default></default>
|
||||
<order>2</order>
|
||||
<page>2</page>
|
||||
</attribute>
|
||||
<attribute id="attribute3">
|
||||
<display>Attribute 3</display>
|
||||
<description>This is the attribute description</description>
|
||||
<default></default>
|
||||
<order>1</order>
|
||||
<page>2</page>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
109
templates/inetOrgPerson.xml
Normal file
109
templates/inetOrgPerson.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<title>address_book_inet</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/user.png</icon>
|
||||
<description>t_new_address</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="inetOrgPerson"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="givenName">
|
||||
<display>t_first_name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon>images/uid.png</icon>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sn">
|
||||
<display>t_last_name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="cn">
|
||||
<display>Common Name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="o">
|
||||
<display>t_organization</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="street">
|
||||
<display>t_street</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
<icon>images/mail.png</icon>
|
||||
</attribute>
|
||||
<attribute id="l">
|
||||
<display>t_city</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>5</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="st">
|
||||
<display>t_state</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>6</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="postalCode">
|
||||
<display>t_postal_code</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>7</order>
|
||||
<page>1</page>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="telephoneNumber">
|
||||
<display>t_work_phone</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>8</order>
|
||||
<page>1</page>
|
||||
<icon>images/phone.png</icon>
|
||||
</attribute>
|
||||
<attribute id="facsimileTelephoneNumber">
|
||||
<display>t_fax</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>9</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="mobile">
|
||||
<display>t_mobile</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>9</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="mail">
|
||||
<display>t_email</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>10</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
115
templates/kolabPerson.xml
Normal file
115
templates/kolabPerson.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<title>kolab_user</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/user.png</icon>
|
||||
<description>t_new_address</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="inetOrgPerson"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="givenName">
|
||||
<display>t_first_name</display>
|
||||
<icon>images/uid.png</icon>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<order>1</order>
|
||||
</attribute>
|
||||
<attribute id="sn">
|
||||
<display>t_last_name</display>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<order>2</order>
|
||||
</attribute>
|
||||
<attribute id="cn">
|
||||
<display>Common Name</display>
|
||||
<order>3</order>
|
||||
</attribute>
|
||||
<attribute id="mail">
|
||||
<display>t_email</display>
|
||||
<order>4</order>
|
||||
</attribute>
|
||||
<attribute id="userPassword">
|
||||
<display>t_password</display>
|
||||
<icon>images/lock.png</icon>
|
||||
<order>5</order>
|
||||
<spacer>1</spacer>
|
||||
<type>password</type>
|
||||
<verify>1</verify>
|
||||
<helper>
|
||||
<id>enc</id>
|
||||
<display>t_encryption</display>
|
||||
<location>side</location>
|
||||
<value>clear</value>
|
||||
<value>md5</value>
|
||||
</helper>
|
||||
<post>=php.Password(%enc%,%userPassword%)</post>
|
||||
</attribute>
|
||||
|
||||
<attribute id="title">
|
||||
<display>Title</display>
|
||||
<order>6</order>
|
||||
<icon>images/ou.png</icon>
|
||||
</attribute>
|
||||
<attribute id="alias">
|
||||
<display>Alias</display>
|
||||
<order>7</order>
|
||||
</attribute>
|
||||
<attribute id="o">
|
||||
<display>t_organization</display>
|
||||
<order>8</order>
|
||||
</attribute>
|
||||
<attribute id="ou">
|
||||
<display>organizational_unit</display>
|
||||
<order>9</order>
|
||||
</attribute>
|
||||
<attribute id="roomNumber">
|
||||
<display>Room Number</display>
|
||||
<order>10</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
|
||||
<attribute id="street">
|
||||
<display>t_address</display>
|
||||
<order>11</order>
|
||||
<icon>images/mail.png</icon>
|
||||
</attribute>
|
||||
<attribute id="postOfficeBox">
|
||||
<display>Post Box</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="l">
|
||||
<display>t_city</display>
|
||||
<order>13</order>
|
||||
</attribute>
|
||||
<attribute id="st">
|
||||
<display>t_state</display>
|
||||
<order>14</order>
|
||||
</attribute>
|
||||
<attribute id="postalCode">
|
||||
<display>t_postal_code</display>
|
||||
<order>15</order>
|
||||
</attribute>
|
||||
<attribute id="c">
|
||||
<display>Country</display>
|
||||
<order>16</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="telephoneNumber">
|
||||
<display>t_work_phone</display>
|
||||
<order>17</order>
|
||||
<icon>images/phone.png</icon>
|
||||
</attribute>
|
||||
<attribute id="facsimileTelephoneNumber">
|
||||
<display>t_fax</display>
|
||||
<order>18</order>
|
||||
</attribute>
|
||||
<attribute id="mobile">
|
||||
<display>t_mobile</display>
|
||||
<order>19</order>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/modification/default.php,v 1.70 2004/12/20 14:12:33 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/modification/default.php,v 1.84 2005/09/25 04:48:21 wurley Exp $
|
||||
|
||||
|
||||
/*
|
||||
@@ -15,11 +15,16 @@
|
||||
|
||||
/** If an entry has more children than this, stop searching and display this amount with a '+' */
|
||||
$max_children = 100;
|
||||
$today = date('U');
|
||||
$shadow_before_today_attrs = arrayLower(array('shadowLastChange','shadowMin'));
|
||||
$shadow_after_today_attrs = arrayLower(array('shadowMax','shadowExpire','shadowWarning','shadowInactive'));
|
||||
$shadow_format_attrs = array_merge($shadow_before_today_attrs, $shadow_after_today_attrs);
|
||||
|
||||
isset( $dn ) or $dn = isset( $_GET['dn'] ) ? $_GET['dn'] : null;
|
||||
$encoded_dn = rawurlencode( $dn );
|
||||
$modified_attrs = isset( $_GET['modified_attrs'] ) ? $_GET['modified_attrs'] : false;
|
||||
isset( $server_id ) or $server_id = $_GET['server_id'];
|
||||
$ldapserver = $ldapservers->Instance($server_id);
|
||||
$show_internal_attrs = isset( $_GET['show_internal_attrs'] ) ? true : false;
|
||||
if( null != $dn ) {
|
||||
$rdn = pla_explode_dn( $dn );
|
||||
@@ -33,18 +38,18 @@ if( null != $dn ) {
|
||||
|
||||
check_server_id( $server_id ) or pla_error( $lang['bad_server_id'] . htmlspecialchars( $server_id ) );
|
||||
have_auth_info( $server_id ) or pla_error( $lang['not_enough_login_info'] );
|
||||
pla_ldap_connect( $server_id ) or pla_error( $lang['could_not_connect'] );
|
||||
//pla_ldap_connect( $server_id ) or pla_error( $lang['could_not_connect'] );
|
||||
$friendly_attrs = process_friendly_attr_table();
|
||||
if( ! isset( $attrs ) )
|
||||
$attrs = get_object_attrs( $server_id, $dn, false, get_view_deref_setting() );
|
||||
$attrs = get_object_attrs( $ldapserver, $dn, false, get_view_deref_setting() );
|
||||
|
||||
pla_ldap_connect( $server_id ) or pla_error( $lang['could_not_connect'] );
|
||||
$system_attrs = get_entry_system_attrs( $server_id, $dn, get_view_deref_setting() );
|
||||
dn_exists( $server_id, $dn ) or pla_error( sprintf( $lang['no_such_entry'], pretty_print_dn( $dn ) ) );
|
||||
//pla_ldap_connect( $server_id ) or pla_error( $lang['could_not_connect'] );
|
||||
//$system_attrs = get_entry_system_attrs( $ldapserver, $dn, get_view_deref_setting() ); NEVER USED?
|
||||
dn_exists( $ldapserver, $dn ) or pla_error( sprintf( $lang['no_such_entry'], pretty_print_dn( $dn ) ) );
|
||||
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
|
||||
include 'header.php'; ?>
|
||||
include './header.php'; ?>
|
||||
<body>
|
||||
|
||||
<h3 class="title"><?php echo htmlspecialchars( ( $rdn ) ); ?></h3>
|
||||
@@ -91,6 +96,10 @@ include 'header.php'; ?>
|
||||
<td colspan="3"><span class="hint"><?php echo $lang['delete_hint']; ?></span></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/compare.png" /></td>
|
||||
<td><a href="<?php echo "compare_form.php?server_id=$server_id&dn=$encoded_dn"; ?>"><?php echo $lang['compare_with']; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/star.png" /></td>
|
||||
<td><a href="<?php echo "create_form.php?server_id=$server_id&container=$encoded_dn"; ?>"><?php echo $lang['create_a_child_entry']; ?></a></td>
|
||||
@@ -101,7 +110,7 @@ include 'header.php'; ?>
|
||||
|
||||
|
||||
<?php flush(); ?>
|
||||
<?php $children = get_container_contents( $server_id, $dn, $max_children, '(objectClass=*)', get_view_deref_setting() );
|
||||
<?php $children = get_container_contents( $ldapserver, $dn, $max_children, '(objectClass=*)', get_view_deref_setting() );
|
||||
|
||||
if( ($children_count = count( $children ) ) > 0 ) {
|
||||
if( $children_count == $max_children )
|
||||
@@ -164,7 +173,7 @@ if( ($children_count = count( $children ) ) > 0 ) {
|
||||
<?php
|
||||
if( $show_internal_attrs ) {
|
||||
$counter = 0;
|
||||
foreach( get_entry_system_attrs( $server_id, $dn ) as $attr => $vals ) {
|
||||
foreach( get_entry_system_attrs( $ldapserver, $dn ) as $attr => $vals ) {
|
||||
$counter++;
|
||||
$schema_href = "schema.php?server_id=$server_id&view=attributes&viewvalue=" . real_attr_name($attr);
|
||||
?>
|
||||
@@ -176,7 +185,7 @@ if( $show_internal_attrs ) {
|
||||
<tr>
|
||||
<td class="val">
|
||||
<?php
|
||||
if( is_attr_binary( $server_id, $attr ) ) {
|
||||
if( is_attr_binary( $ldapserver, $attr ) ) {
|
||||
$href = "download_binary_attr.php?server_id=$server_id&dn=$encoded_dn&attr=$attr";
|
||||
?>
|
||||
<small>
|
||||
@@ -228,7 +237,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
|
||||
flush();
|
||||
|
||||
$schema_attr = get_schema_attribute( $server_id, $attr, $dn );
|
||||
$schema_attr = get_schema_attribute( $ldapserver, $attr, $dn );
|
||||
if( $schema_attr )
|
||||
$attr_syntax = $schema_attr->getSyntaxOID();
|
||||
else
|
||||
@@ -238,7 +247,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
continue;
|
||||
|
||||
// has the config.php specified that this attribute is to be hidden or shown?
|
||||
if( is_attr_hidden( $server_id, $attr))
|
||||
if( is_attr_hidden( $ldapserver, $attr))
|
||||
continue;
|
||||
|
||||
// Setup the $attr_note, which will be displayed to the right of the attr name (if any)
|
||||
@@ -257,12 +266,26 @@ foreach( $attrs as $attr => $vals ) {
|
||||
$required_by = '';
|
||||
if( $schema_attr )
|
||||
foreach( $schema_attr->getRequiredByObjectClasses() as $required )
|
||||
if( in_array( strtolower( $required ), arrayLower( $attrs['objectClass'] ) ) )
|
||||
if( isset($attrs['objectClass']) && in_array( strtolower( $required ), arrayLower( $attrs['objectClass'] ) ) )
|
||||
$required_by .= $required . ' ';
|
||||
|
||||
// It seems that some LDAP servers (Domino) returns attributes in lower case?
|
||||
elseif( isset($attrs['objectclass']) && in_array( strtolower( $required ), arrayLower( $attrs['objectclass'] ) ) )
|
||||
$required_by .= $required . ' ';
|
||||
|
||||
if( $required_by ) {
|
||||
if( trim( $attr_note ) )
|
||||
$attr_note .= ', ';
|
||||
$attr_note .= "<acronym title=\"" . sprintf( $lang['required_for'], $required_by ) . "\">" . $lang['required'] . "</acronym> ";
|
||||
|
||||
$attr_note .= "<acronym title=\"" . sprintf( $lang['required_for'], $required_by ) . "\">" . $lang['required'] . "</acronym> ";
|
||||
}
|
||||
|
||||
// is this attribute required because its the RDN
|
||||
if (preg_match("/^${attr}=/",$rdn)) {
|
||||
if( trim( $attr_note ) )
|
||||
$attr_note .= ', ';
|
||||
|
||||
$attr_note .= " <acronym title=\"" . $lang['required_by_entry'] . "\">" . 'rdn' . "</acronym> ";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -288,7 +311,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
</td>
|
||||
<td class="attr_note">
|
||||
<sup><small><?php echo $attr_note; ?></small></sup>
|
||||
<?php if( is_attr_read_only( $server_id, $attr ) ) { ?>
|
||||
<?php if( is_attr_read_only( $ldapserver, $attr ) ) { ?>
|
||||
<small>(<acronym title="<?php echo $lang['read_only_tooltip']; ?>"><?php echo $lang['read_only']; ?></acronym>)</small>
|
||||
<?php } ?>
|
||||
</td>
|
||||
@@ -306,14 +329,14 @@ foreach( $attrs as $attr => $vals ) {
|
||||
/*
|
||||
* Is this attribute a jpegPhoto?
|
||||
*/
|
||||
if( is_jpeg_photo( $server_id, $attr ) ) {
|
||||
if( is_jpeg_photo( $ldapserver, $attr ) ) {
|
||||
|
||||
// Don't draw the delete buttons if there is more than one jpegPhoto
|
||||
// (phpLDAPadmin can't handle this case yet)
|
||||
if( is_server_read_only( $server_id ) || is_attr_read_only( $server_id, $attr ) )
|
||||
draw_jpeg_photos( $server_id, $dn, $attr, false );
|
||||
if( $ldapserver->isReadOnly() || is_attr_read_only( $ldapserver, $attr ) )
|
||||
draw_jpeg_photos( $ldapserver, $dn, $attr, false );
|
||||
else
|
||||
draw_jpeg_photos( $server_id, $dn, $attr, true );
|
||||
draw_jpeg_photos( $ldapserver, $dn, $attr, true );
|
||||
|
||||
// proceed to the next attribute
|
||||
echo "</td></tr>\n";
|
||||
@@ -326,12 +349,18 @@ foreach( $attrs as $attr => $vals ) {
|
||||
/*
|
||||
* Is this attribute binary?
|
||||
*/
|
||||
if( is_attr_binary( $server_id, $attr ) ) {
|
||||
if( is_attr_binary( $ldapserver, $attr ) ) {
|
||||
|
||||
|
||||
$href = "download_binary_attr.php?server_id=$server_id&dn=$encoded_dn&attr=$attr";
|
||||
?>
|
||||
|
||||
<small>
|
||||
<?php echo $lang['binary_value']; ?><br />
|
||||
<?php echo $lang['binary_value']; ?>
|
||||
<?php if (! strcasecmp( $attr, 'objectSid' ) ) {
|
||||
printf(' (%s)',binSIDtoText($vals[0]));
|
||||
} ?>
|
||||
<br />
|
||||
<?php if( count( $vals ) > 1 ) { for( $i=1; $i<=count($vals); $i++ ) { ?>
|
||||
<a href="<?php echo $href . "&value_num=$i"; ?>"><img
|
||||
src="images/save.png" /> <?php echo $lang['download_value']; ?>(<?php echo $i; ?>)</a><br />
|
||||
@@ -339,7 +368,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
<a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo $lang['download_value']; ?></a><br />
|
||||
<?php } ?>
|
||||
|
||||
<?php if( ! is_server_read_only( $server_id ) && ! is_attr_read_only( $server_id, $attr ) ) { ?>
|
||||
<?php if( ! is_server_read_only( $server_id ) && ! is_attr_read_only( $ldapserver, $attr ) ) { ?>
|
||||
<a href="javascript:deleteAttribute( '<?php echo $attr; ?>' );"
|
||||
style="color:red;"><img src="images/trash.png" /> <?php echo $lang['delete_attribute']; ?></a>
|
||||
<?php } ?>
|
||||
@@ -349,6 +378,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
if( $is_modified_attr )
|
||||
echo '<tr class="updated_attr"><td class="bottom" colspan="2"></td></tr>';
|
||||
continue;
|
||||
@@ -359,27 +389,59 @@ foreach( $attrs as $attr => $vals ) {
|
||||
* Note: at this point, the attribute must be text-based (not binary or jpeg)
|
||||
*/
|
||||
|
||||
// If we this is the userPassword attribute, add the javascript so we can call check password later.
|
||||
if (! strcasecmp( $attr, 'userPassword' ) ) {
|
||||
$user_password = $vals[0]; ?>
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function passwordComparePopup()
|
||||
{
|
||||
mywindow = open( 'password_checker.php', 'myname', 'resizable=no,width=450,height=200,scrollbars=1' );
|
||||
mywindow.location.href = 'password_checker.php?hash=<?php echo base64_encode($user_password); ?>&base64=true';
|
||||
if( mywindow.opener == null )
|
||||
mywindow.opener = self;
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
<?php }
|
||||
|
||||
/*
|
||||
* If this server is in read-only mode or this attribute is configured as read_only,
|
||||
* simply draw the attribute values and continue.
|
||||
*/
|
||||
if( is_server_read_only( $server_id ) || is_attr_read_only( $server_id, $attr ) ) {
|
||||
if( is_server_read_only( $server_id ) || is_attr_read_only( $ldapserver, $attr ) || (preg_match("/^${attr}=/",$rdn)) ) {
|
||||
if( is_array( $vals ) ) {
|
||||
foreach( $vals as $i => $val ) {
|
||||
if( trim( $val ) == "" )
|
||||
echo "<span style=\"color:red\">[" . $lang['empty'] . "]</span><br />\n";
|
||||
elseif( 0 == strcasecmp( $attr, 'userPassword' ) && obfuscate_password_display() )
|
||||
echo preg_replace( '/./', '*', $val ) . "<br />";
|
||||
else
|
||||
|
||||
elseif( in_array(strtolower($attr), $shadow_format_attrs) ) {
|
||||
$shadow_date = shadow_date( $attrs, $attr);
|
||||
echo htmlspecialchars($val)." ";
|
||||
echo "<small>";
|
||||
if( ($today < $shadow_date) && in_array(strtolower($attr), $shadow_before_today_attrs) )
|
||||
echo '<span style="color:red">'.htmlspecialchars("(".strftime(get_date_format(),$shadow_date).")").'</span>';
|
||||
elseif( $today > $shadow_date && in_array(strtolower($attr), $shadow_after_today_attrs) )
|
||||
echo '<span style="color:red">'.htmlspecialchars("(".strftime(get_date_format(),$shadow_date).")").'</span>';
|
||||
else
|
||||
echo htmlspecialchars("(".strftime(get_date_format(),shadow_date( $attrs, $attr)).")");
|
||||
echo "</small>";
|
||||
} else
|
||||
echo htmlspecialchars( $val ) . "<br />";
|
||||
}
|
||||
} else {
|
||||
if( 0 == strcasecmp( $attr, 'userPassword' ) && obfuscate_password_display() )
|
||||
echo preg_replace( '/./', '*', $vals ) . "<br />";
|
||||
else
|
||||
echo $vals . "<br />";
|
||||
}
|
||||
echo $vals . "<br />"; ?>
|
||||
|
||||
|
||||
<?php }
|
||||
if (! strcasecmp( $attr, 'userPassword' ) ) {?>
|
||||
<small><a href="javascript:passwordComparePopup()"><?php echo $lang['t_check_pass']; ?></a></small>
|
||||
<?php }
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
if( $is_modified_attr )
|
||||
@@ -390,7 +452,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
/*
|
||||
* Is this a userPassword attribute?
|
||||
*/
|
||||
if( 0 == strcasecmp( $attr, 'userpassword' ) ) {
|
||||
if( 0 == strcasecmp( $attr, 'userpassword' ) ) {
|
||||
$user_password = $vals[0];
|
||||
$enc_type = get_enc_type( $user_password );
|
||||
|
||||
@@ -422,30 +484,10 @@ foreach( $attrs as $attr => $vals ) {
|
||||
name="new_values[userpassword]"
|
||||
value="<?php echo htmlspecialchars( $user_password ); ?>" />
|
||||
|
||||
<select name="enc_type">
|
||||
<option>clear</option>
|
||||
<option<?php echo $enc_type=='crypt'?' selected="true"':''; ?>>crypt</option>
|
||||
<option<?php echo $enc_type=='md5'?' selected="true"':''; ?>>md5</option>
|
||||
<option<?php echo $enc_type=='smd5'?' selected="true"':''; ?>>smd5</option>
|
||||
<option<?php echo $enc_type=='md5crypt'?' selected="true"':''; ?>>md5crypt</option>
|
||||
<option<?php echo $enc_type=='blowfish'?' selected="true"':''; ?>>blowfish</option>
|
||||
<option<?php echo $enc_type=='sha'?' selected="true"':''; ?>>sha</option>
|
||||
<option<?php echo $enc_type=='ssha'?' selected="true"':''; ?>>ssha</option>
|
||||
</select>
|
||||
<?php echo enc_type_select_list($enc_type); ?>
|
||||
|
||||
<br />
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
function passwordComparePopup()
|
||||
{
|
||||
mywindow = open( 'password_checker.php', 'myname', 'resizable=no,width=450,height=200,scrollbars=1' );
|
||||
mywindow.location.href = 'password_checker.php?hash=<?php echo base64_encode($user_password); ?>&base64=true';
|
||||
if( mywindow.opener == null )
|
||||
mywindow.opener = self;
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
<small><a href="javascript:passwordComparePopup()"><?php echo $lang['t_check_pass']; ?></a></small>
|
||||
|
||||
</td></tr>
|
||||
@@ -454,12 +496,12 @@ foreach( $attrs as $attr => $vals ) {
|
||||
if( $is_modified_attr )
|
||||
echo '<tr class="updated_attr"><td class="bottom" colspan="2"></td></tr>';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Is this a boolean attribute?
|
||||
*/
|
||||
if( is_attr_boolean( $server_id, $attr) ) {
|
||||
if( is_attr_boolean( $ldapserver, $attr) ) {
|
||||
$val = $vals[0];
|
||||
?>
|
||||
|
||||
@@ -515,7 +557,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
href="schema.php?server_id=<?php echo $server_id; ?>&view=objectClasses&viewvalue=<?php echo htmlspecialchars( $val ); ?>"><img
|
||||
src="images/info.png" /></a>
|
||||
<?php
|
||||
$schema_object = get_schema_objectclass( $server_id, $val);
|
||||
$schema_object = get_schema_objectclass( $ldapserver, $val);
|
||||
if ($schema_object->type == 'structural') {
|
||||
echo "$val <small>(<acronym title=\"" .
|
||||
sprintf( $lang['structural_object_class_cannot_remove'] ) . "\">" .
|
||||
@@ -532,7 +574,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
|
||||
?>
|
||||
|
||||
<?php if( is_dn_string( $val ) || is_dn_attr( $server_id, $attr ) ) { ?>
|
||||
<?php if( is_dn_string( $val ) || is_dn_attr( $ldapserver, $attr ) ) { ?>
|
||||
<a
|
||||
title="<?php echo sprintf( $lang['go_to_dn'], htmlspecialchars($val) ); ?>"
|
||||
href="edit.php?server_id=<?php echo $server_id; ?>&dn=<?php echo rawurlencode($val); ?>"><img
|
||||
@@ -568,15 +610,15 @@ foreach( $attrs as $attr => $vals ) {
|
||||
<?php
|
||||
// draw a link for popping up the entry browser if this is the type of attribute
|
||||
// that houses DNs.
|
||||
if( is_dn_attr( $server_id, $attr ) )
|
||||
if( is_dn_attr( $ldapserver, $attr ) )
|
||||
draw_chooser_link( "edit_form.$input_id", false );
|
||||
|
||||
// If this is a gidNumber on a non-PosixGroup entry, lookup its name and description for convenience
|
||||
if( 0 == strcasecmp( $attr, 'gidNumber' ) &&
|
||||
! in_array_ignore_case( 'posixGroup', get_object_attr( $server_id, $dn, 'objectClass' ) ) ) {
|
||||
! in_array_ignore_case( 'posixGroup', get_object_attr( $ldapserver, $dn, 'objectClass' ) ) ) {
|
||||
$gid_number = $val;
|
||||
$search_group_filter = "(&(objectClass=posixGroup)(gidNumber=$val))";
|
||||
$group = pla_ldap_search( $server_id, $search_group_filter, null, array( 'dn', 'description' ) );
|
||||
$group = pla_ldap_search( $ldapserver, $search_group_filter, null, array( 'dn', 'description' ) );
|
||||
if( count( $group ) > 0 ) {
|
||||
echo "<br />";
|
||||
$group = array_pop( $group );
|
||||
@@ -590,9 +632,22 @@ foreach( $attrs as $attr => $vals ) {
|
||||
if( $description ) echo " (" . htmlspecialchars( $description ) . ")";
|
||||
echo "</small>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
// Show the dates for all the shadow attributes.
|
||||
if( in_array(strtolower($attr), $shadow_format_attrs) ) {
|
||||
if( ( $shadow_date = shadow_date( $attrs, $attr) ) !== false ) {
|
||||
echo "<br />";
|
||||
echo "<small>";
|
||||
if( ($today < $shadow_date) && in_array(strtolower($attr), $shadow_before_today_attrs) )
|
||||
echo '<span style="color:red">'.htmlspecialchars(strftime(get_date_format(),$shadow_date)).'</span>';
|
||||
elseif( $today > $shadow_date && in_array(strtolower($attr), $shadow_after_today_attrs) )
|
||||
echo '<span style="color:red">'.htmlspecialchars(strftime(get_date_format(),$shadow_date)).'</span>';
|
||||
else
|
||||
echo htmlspecialchars(strftime(get_date_format(),$shadow_date));
|
||||
echo "</small>";
|
||||
}
|
||||
} ?>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -602,7 +657,7 @@ foreach( $attrs as $attr => $vals ) {
|
||||
/* Draw the "add value" link under the list of values for this attributes */
|
||||
|
||||
if( ! is_server_read_only( $server_id ) &&
|
||||
( $schema_attr = get_schema_attribute( $server_id, $attr, $dn ) ) &&
|
||||
( $schema_attr = get_schema_attribute( $ldapserver, $attr, $dn ) ) &&
|
||||
! $schema_attr->getIsSingleValue() )
|
||||
{
|
||||
$add_href = "add_value_form.php?server_id=$server_id&" .
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/modification/group_of_names.php,v 1.7 2004/10/14 04:07:14 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/modification/group_of_names.php,v 1.9 2005/03/05 06:27:08 wurley Exp $
|
||||
|
||||
|
||||
/*
|
||||
@@ -13,13 +13,13 @@
|
||||
* they were changed by the last operation
|
||||
*/
|
||||
|
||||
include 'header.php';
|
||||
$members = get_object_attr( $server_id, $dn, 'uniqueMember' );
|
||||
include './header.php';
|
||||
$members = get_object_attr( $ldapserver, $dn, 'uniqueMember' );
|
||||
$unique = true;
|
||||
$attr_name = 'uniqueMember';
|
||||
if( null == $members ) {
|
||||
$attr_name = 'member';
|
||||
$members = get_object_attr( $server_id, $dn, 'member' );
|
||||
$members = get_object_attr( $ldapserver, $dn, 'member' );
|
||||
$unique = false;
|
||||
}
|
||||
$rdn = get_rdn( $dn );
|
||||
@@ -92,9 +92,9 @@ if( ! is_array( $members ) || 0 == count( $members ) ) {
|
||||
echo htmlspecialchars( $member ) . "</a>";
|
||||
echo " <small>(<a style=\"color:red\" href=\"javascript:remove_member( '" . htmlspecialchars( $member ) . "' );\" title=\"Remove this DN from the list\">remove</a>)</small>";
|
||||
|
||||
$member_cn = get_object_attr( $server_id, $member, 'cn' );
|
||||
$member_cn = get_object_attr( $ldapserver, $member, 'cn' );
|
||||
$member_cn = @$member_cn[0];
|
||||
$member_sn = get_object_attr( $server_id, $member, 'sn' );
|
||||
$member_sn = get_object_attr( $ldapserver, $member, 'sn' );
|
||||
$member_sn = @$member_sn[0];
|
||||
echo '<small>';
|
||||
// Don't display the SN if it is a subset of the CN
|
||||
@@ -102,7 +102,7 @@ if( ! is_array( $members ) || 0 == count( $members ) ) {
|
||||
$member_sn = ' ';
|
||||
if( $member_sn && $member_cn )
|
||||
echo '<br /> Name: ' . htmlspecialchars( $member_cn . ' ' . $member_sn );
|
||||
$object_classes = get_object_attr( $server_id, $member, 'objectClass' );
|
||||
$object_classes = get_object_attr( $ldapserver, $member, 'objectClass' );
|
||||
if( is_array( $object_classes ) )
|
||||
echo '<br /> objectClasses: ' . implode( ', ', $object_classes );
|
||||
echo '</small>';
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* @author The phpLDAPadmin development team
|
||||
**/
|
||||
|
||||
include 'header.php';
|
||||
include './header.php';
|
||||
$rdn = get_rdn( $dn );
|
||||
$sambaAccount = explode( '=', $rdn, 2 );
|
||||
$sambaAccountRdn = $sambaAccount[1];
|
||||
$attrs = get_object_attrs( $server_id, $dn, false, get_view_deref_setting());
|
||||
$attrs = get_object_attrs( $ldapserver, $dn, false, get_view_deref_setting());
|
||||
?>
|
||||
<body>
|
||||
<h3 class="title"><?php echo $lang['samba_account'] . ': '; ?> <b><?php echo htmlspecialchars( $sambaAccountRdn ); ?></b></h3>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/modification/user.php,v 1.4 2004/03/19 20:13:10 i18phpldapadmin Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/modification/user.php,v 1.5 2005/02/26 12:33:49 wurley Exp $
|
||||
|
||||
|
||||
/*
|
||||
@@ -19,7 +19,7 @@ $encoded_dn = rawurlencode( $dn );
|
||||
|
||||
$server_name = $servers[$server_id]['name'];
|
||||
|
||||
include 'header.php';
|
||||
include './header.php';
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
139
templates/mozillaOrgPerson.xml
Normal file
139
templates/mozillaOrgPerson.xml
Normal file
@@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<title>address_book_moz</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/user.png</icon>
|
||||
<description>t_new_address</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="inetOrgPerson"></objectClass>
|
||||
<objectClass id="mozillaOrgPerson"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="givenName">
|
||||
<display>t_first_name</display>
|
||||
<icon>images/uid.png</icon>
|
||||
<onchange>autoFill:cn,%sn% %givenName%</onchange>
|
||||
<order>1</order>
|
||||
</attribute>
|
||||
<attribute id="sn">
|
||||
<display>t_last_name</display>
|
||||
<onchange>autoFill:cn,%sn% %givenName%</onchange>
|
||||
<order>2</order>
|
||||
</attribute>
|
||||
<attribute id="cn">
|
||||
<display>Common Name</display>
|
||||
<order>3</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaNickName">
|
||||
<display>mozillaNickname</display>
|
||||
<order>4</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="mail">
|
||||
<display>t_email</display>
|
||||
<order>5</order>
|
||||
<icon>images/phone.png</icon>
|
||||
</attribute>
|
||||
<attribute id="mozillaSecondEmail">
|
||||
<display>Second email</display>
|
||||
<order>6</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="telephoneNumber">
|
||||
<display>t_work_phone</display>
|
||||
<order>7</order>
|
||||
<icon>images/phone.png</icon>
|
||||
</attribute>
|
||||
<attribute id="homePhone">
|
||||
<display>Home</display>
|
||||
<order>8</order>
|
||||
</attribute>
|
||||
<attribute id="facsimileTelephoneNumber">
|
||||
<display>Fax</display>
|
||||
<order>9</order>
|
||||
</attribute>
|
||||
<attribute id="pager">
|
||||
<display>Page</display>
|
||||
<order>10</order>
|
||||
</attribute>
|
||||
<attribute id="mobile">
|
||||
<display>Mobile</display>
|
||||
<order>11</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="homePostalAddress">
|
||||
<display>Address</display>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaHomePostalAddress2">
|
||||
<display>Address 2</display>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaHomeLocalityName">
|
||||
<display>City</display>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaHomeState">
|
||||
<display>State</display>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaHomePostalCode">
|
||||
<display>ZIP</display>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaHomeCountryName">
|
||||
<display>Country</display>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaHomeUrl">
|
||||
<display>Web page</display>
|
||||
<order>11</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="title">
|
||||
<display>Title</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="ou">
|
||||
<display>Department</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="o">
|
||||
<display>Organization</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="postalAddress">
|
||||
<display>Address</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaPostalAddress2">
|
||||
<display>Address 2</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="l">
|
||||
<display>City</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="st">
|
||||
<display>State/Province</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="postalCode">
|
||||
<display>ZIP</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="c">
|
||||
<display>Country</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
<attribute id="mozillaWorkUrl">
|
||||
<display>Web page</display>
|
||||
<order>12</order>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
77
templates/organizationalRole.xml
Normal file
77
templates/organizationalRole.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<title>organizational_role</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/o.png</icon>
|
||||
<description>New Organisational Role</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="organizationalRole"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="cn">
|
||||
<display>Role CN</display>
|
||||
<order>1</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="telephoneNumber">
|
||||
<display>t_work_phone</display>
|
||||
<order>2</order>
|
||||
<icon>images/phone.png</icon>
|
||||
</attribute>
|
||||
<attribute id="facsimileTelephoneNumber">
|
||||
<display>t_fax</display>
|
||||
<order>3</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
|
||||
<attribute id="description">
|
||||
<display>Comments</display>
|
||||
<order>4</order>
|
||||
<icon>images/light.png</icon>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
|
||||
<attribute id="roleOccupant">
|
||||
<display>Occupant</display>
|
||||
<order>5</order>
|
||||
<icon>images/object.png</icon>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
|
||||
<attribute id="street">
|
||||
<display>Street Address</display>
|
||||
<order>6</order>
|
||||
<icon>images/mail.png</icon>
|
||||
</attribute>
|
||||
<attribute id="l">
|
||||
<display>t_city</display>
|
||||
<order>7</order>
|
||||
</attribute>
|
||||
<attribute id="st">
|
||||
<display>t_state</display>
|
||||
<order>8</order>
|
||||
</attribute>
|
||||
<attribute id="postalCode">
|
||||
<display>t_postal_code</display>
|
||||
<order>9</order>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
|
||||
<attribute id="postalAddress">
|
||||
<display>Postal Address</display>
|
||||
<order>10</order>
|
||||
<icon>images/mail.png</icon>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="registeredAddress">
|
||||
<display>Registered Address</display>
|
||||
<icon>images/mail.png</icon>
|
||||
<order>11</order>
|
||||
</attribute>
|
||||
|
||||
</attributes>
|
||||
</template>
|
23
templates/ou.xml
Normal file
23
templates/ou.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<title>organizational_unit</title>
|
||||
<!-- <regexp>^o=.*,</regexp> -->
|
||||
<icon>images/ou.png</icon>
|
||||
<description>new_organizational_unit</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>ou</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="organizationalUnit"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="ou">
|
||||
<display>organizational_unit</display>
|
||||
<description>organizational_unit</description>
|
||||
<hint>don't include "ou="</hint>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
111
templates/posixAccount.xml
Normal file
111
templates/posixAccount.xml
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<title>user_account</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/user.png</icon>
|
||||
<description>t_new_user_account</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="inetOrgPerson"></objectClass>
|
||||
<objectClass id="posixAccount"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="givenName">
|
||||
<display>t_first_name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon>images/uid.png</icon>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sn">
|
||||
<display>t_last_name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<onchange>autoFill:cn,%givenName% %sn%</onchange>
|
||||
<onchange>autoFill:uid,%gidNumber|0-0/T%-%givenName|0-1/l%%sn/l%</onchange>
|
||||
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="cn">
|
||||
<display>Common Name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="uid">
|
||||
<display>t_uid</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="homeDirectory">
|
||||
<display>t_home_dir</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>8</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="uidNumber">
|
||||
<icon>images/terminal.png</icon>
|
||||
<display>t_uid_number</display>
|
||||
<description></description>
|
||||
<hint>t_auto_det</hint>
|
||||
<default></default>
|
||||
<presubmit>=php.GetNextNumber(/,uid)</presubmit>
|
||||
<order>6</order>
|
||||
<page>1</page>
|
||||
<hidden>0</hidden>
|
||||
</attribute>
|
||||
<attribute id="gidNumber">
|
||||
<display>t_gid_number</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default>=php.PickList(/,(objectClass=posixGroup),gidNumber,%cn%)</default>
|
||||
<onchange>autoFill:homeDirectory,/home/users/%gidNumber|0-0/T%/%uid|3-%</onchange>
|
||||
<order>7</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="loginShell">
|
||||
<display>t_login_shell</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default>=php.PickList(/,(objectClass=posixAccount),loginShell,%loginShell%)</default>
|
||||
<order>9</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="userPassword">
|
||||
<display>t_password</display>
|
||||
<icon>images/lock.png</icon>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default></default>
|
||||
<order>5</order>
|
||||
<page>1</page>
|
||||
<spacer>1</spacer>
|
||||
<type>password</type>
|
||||
<verify>1</verify>
|
||||
<helper>
|
||||
<id>enc</id>
|
||||
<display>t_encryption</display>
|
||||
<location>side</location>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<value>clear</value>
|
||||
<value>md5</value>
|
||||
</helper>
|
||||
<post>=php.Password(%enc%,%userPassword%)</post>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
48
templates/posixGroup.xml
Normal file
48
templates/posixGroup.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<title>posix_group</title>
|
||||
<!-- <regexp>^ou=.*,</regexp> -->
|
||||
<icon>images/ou.png</icon>
|
||||
<description>t_new_posixgroup</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>cn</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="posixGroup"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="cn">
|
||||
<display>t_group</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon></icon>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="gidNumber">
|
||||
<display>t_gid_number</display>
|
||||
<description></description>
|
||||
<hint>t_auto_det</hint>
|
||||
<presubmit>=php.GetNextNumber(/,gid)</presubmit>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
<hidden>0</hidden>
|
||||
<spacer>1</spacer>
|
||||
</attribute>
|
||||
<attribute id="memberUid">
|
||||
<display>users</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
<hidden>0</hidden>
|
||||
<array>10</array>
|
||||
<helper>
|
||||
<display></display>
|
||||
<location>side</location>
|
||||
<!-- <value>=php.DrawChooserLink(memberUid,0)</value> -->
|
||||
</helper>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
44
templates/sendmailMTAAliasObject.xml
Normal file
44
templates/sendmailMTAAliasObject.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<title>sendmail_alias</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail.png</icon>
|
||||
<description>New Sendmail Alias</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>sendmailMTACluster</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="sendmailMTAAliasObject"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="sendmailMTACluster">
|
||||
<display>Sendmail Cluster Name</display>
|
||||
<icon>images/object.png</icon>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAHost">
|
||||
<display>Sendmail Hostname</display>
|
||||
<hint>Leave Blank</hint>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAKey">
|
||||
<display>Email alias</display>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAAliasValue">
|
||||
<display>Recipient Addresses</display>
|
||||
<type>textarea</type>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAAliasGrouping">
|
||||
<default>aliases</default>
|
||||
<hidden>1</hidden>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
38
templates/sendmailMTAClass.xml
Normal file
38
templates/sendmailMTAClass.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<title>sendmail_domain</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail.png</icon>
|
||||
<description>New Sendmail Domain</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>sendmailMTACluster</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="sendmailMTAClass"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="sendmailMTACluster">
|
||||
<display>Sendmail Cluster Name</display>
|
||||
<icon>images/object.png</icon>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAHost">
|
||||
<display>Sendmail Hostname</display>
|
||||
<hint>Leave Blank</hint>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAClassValue">
|
||||
<display>Email domain</display>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAClassName">
|
||||
<default>w</default>
|
||||
<hidden>1</hidden>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
22
templates/sendmailMTACluster.xml
Normal file
22
templates/sendmailMTACluster.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<title>sendmail_cluster</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail.png</icon>
|
||||
<description>New Sendmail Cluster</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>sendmailMTACluster</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="sendmailMTA"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="sendmailMTACluster">
|
||||
<display>Alias To</display>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
46
templates/sendmailMTAMapObject.xml
Normal file
46
templates/sendmailMTAMapObject.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<!--This template doesnt work needs modification to the Engine.-->
|
||||
<template>
|
||||
<title>sendmail_relays</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail.png</icon>
|
||||
<description>New Sendmail Relays</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>sendmailMTACluster</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="sendmailMTAClass"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="sendmailMTACluster">
|
||||
<display>Sendmail Cluster Name</display>
|
||||
<icon>images/object.png</icon>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAHost">
|
||||
<display>Sendmail Hostname</display>
|
||||
<hint>Leave Blank</hint>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAKey">
|
||||
<display>Host/Network/Address</display>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
<default></default>
|
||||
<default>RELAY: Allow host/network/address to relay</default>
|
||||
<default>OK: Accept local mail but disallow relay</default>
|
||||
<default>REJECT: Reject messages</default>
|
||||
<default>DISCARD: Discard messages</default>
|
||||
<default>SKIP: Apply default action to messages</default>
|
||||
<default>ERROR: Reject message with custom error</default>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAMapName">
|
||||
<default>access</default>
|
||||
<hidden>1</hidden>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
38
templates/sendmailVirtualDomain.xml
Normal file
38
templates/sendmailVirtualDomain.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<title>sendmail_domain</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail.png</icon>
|
||||
<description>New Sendmail Domain</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>sendmailMTACluster</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="sendmailMTAClass"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="sendmailMTACluster">
|
||||
<display>Sendmail Cluster Name</display>
|
||||
<icon>images/object.png</icon>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAHost">
|
||||
<display>Sendmail Hostname</display>
|
||||
<hint>Leave Blank</hint>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAClassValue">
|
||||
<display>Email domain</display>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAClassName">
|
||||
<default>VirtHost</default>
|
||||
<hidden>1</hidden>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
46
templates/sendmailVirtualUser.xml
Normal file
46
templates/sendmailVirtualUser.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<title>sendmail_virt_users</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/mail.png</icon>
|
||||
<description>New Sendmail Virtual User</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>sendmailMTAMapObject</rdn>
|
||||
<visible>1</visible>
|
||||
<invalid>1</invalid>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="sendmailMTAMapObject"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="sendmailMTACluster">
|
||||
<display>Sendmail Cluster Name</display>
|
||||
<icon>images/object.png</icon>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAHost">
|
||||
<display>Sendmail Hostname</display>
|
||||
<hint>Leave Blank</hint>
|
||||
<order>2</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAKey">
|
||||
<display>Email alias</display>
|
||||
<hint>use @example.com to map entire domain</hint>
|
||||
<order>3</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAMapValue">
|
||||
<display>Recipient Addresses</display>
|
||||
<hint>use %1 to map user name port of address</hint>
|
||||
<type>textarea</type>
|
||||
<order>4</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="sendmailMTAMapName">
|
||||
<default>virtuser</default>
|
||||
<hidden>1</hidden>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
48
templates/simpleSecurityObject.xml
Normal file
48
templates/simpleSecurityObject.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<title>simple_sec_object</title>
|
||||
<!--<regexp>^ou=People,o=.*,</regexp>-->
|
||||
<icon>images/user.png</icon>
|
||||
<description>New Simple Security Object</description>
|
||||
<askcontainer>1</askcontainer>
|
||||
<rdn>userid</rdn>
|
||||
<visible>1</visible>
|
||||
|
||||
<objectClasses>
|
||||
<objectClass id="account"></objectClass>
|
||||
<objectClass id="simpleSecurityObject"></objectClass>
|
||||
</objectClasses>
|
||||
|
||||
<attributes>
|
||||
<attribute id="userid">
|
||||
<display>t_user_name</display>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<icon>images/uid.png</icon>
|
||||
<spacer>1</spacer>
|
||||
<order>1</order>
|
||||
<page>1</page>
|
||||
</attribute>
|
||||
<attribute id="userPassword">
|
||||
<display>t_password</display>
|
||||
<icon>images/lock.png</icon>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default></default>
|
||||
<order>5</order>
|
||||
<page>1</page>
|
||||
<type>password</type>
|
||||
<verify>1</verify>
|
||||
<helper>
|
||||
<id>enc</id>
|
||||
<display>t_encryption</display>
|
||||
<location>side</location>
|
||||
<description></description>
|
||||
<hint></hint>
|
||||
<default>md5</default>
|
||||
<value>clear</value>
|
||||
<value>md5</value>
|
||||
</helper>
|
||||
<post>=php.Password(%enc%,%userPassword%)</post>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</template>
|
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/template_config.php,v 1.31 2004/12/20 14:12:32 uugdave Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/template_config.php,v 1.34 2005/03/05 06:27:07 wurley Exp $
|
||||
|
||||
/**
|
||||
* template_config.php
|
||||
* -------------------
|
||||
* General configuration file for templates.
|
||||
*
|
||||
* File Map:
|
||||
* 1 - Generic templates configuration
|
||||
* 2 - Samba template configuration
|
||||
* 3 - method used in template and other files
|
||||
*
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
|
||||
/*######################################################################################
|
||||
## Templates for entry creation ##
|
||||
## ---------------------------- ##
|
||||
@@ -27,7 +27,7 @@
|
||||
$templates = array();
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['user_account'], // 'User Account (posixAccount)',
|
||||
array( 'desc' => $lang['user_account'], // 'User Account (posixAccount)',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_user_template.php' );
|
||||
// You can use the 'regexp' directive to restrict where
|
||||
@@ -36,122 +36,122 @@ $templates[] =
|
||||
//'regexp' => '^ou=People,dc=.*,dc=.*$'
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['address_book_inet'], // 'Address Book Entry (inetOrgPerson)',
|
||||
array( 'desc' => $lang['address_book_inet'], // 'Address Book Entry (inetOrgPerson)',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_address_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['address_book_moz'], // 'Address Book Entry (mozillaOrgPerson)',
|
||||
array( 'desc' => $lang['address_book_moz'], // 'Address Book Entry (mozillaOrgPerson)',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_mozillaOrgPerson_template.php' );
|
||||
'handler' => 'new_mozillaOrgPerson_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['kolab_user'], // 'Kolab User Entry',
|
||||
array( 'desc' => $lang['kolab_user'], // 'Kolab User Entry',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_kolab_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['organizational_unit'], // 'Organizational Unit',
|
||||
array( 'desc' => $lang['organizational_unit'], // 'Organizational Unit',
|
||||
'icon' => 'images/ou.png',
|
||||
'handler' => 'new_ou_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['organizational_role'], // 'Organizational Role',
|
||||
array( 'desc' => $lang['organizational_role'], // 'Organizational Role',
|
||||
'icon' => 'images/o.png',
|
||||
'handler' => 'new_organizationalRole.php' );
|
||||
'handler' => 'new_organizationalRole.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['posix_group'], // 'Posix Group',
|
||||
array( 'desc' => $lang['posix_group'], // 'Posix Group',
|
||||
'icon' => 'images/ou.png',
|
||||
'handler' => 'new_posix_group_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['samba_machine'], // 'Samba NT Machine',
|
||||
array( 'desc' => $lang['samba_machine'], // 'Samba NT Machine',
|
||||
'icon' => 'images/nt_machine.png',
|
||||
'handler' => 'new_nt_machine.php' );
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['samba3_machine'], // 'Samba 3 NT Machine',
|
||||
array( 'desc' => $lang['samba3_machine'], // 'Samba 3 NT Machine',
|
||||
'icon' => 'images/nt_machine.png',
|
||||
'handler' => 'new_smb3_nt_machine.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['samba3_user'], // 'Samba 3 User',
|
||||
array( 'desc' => $lang['samba3_user'], // 'Samba 3 User',
|
||||
'icon' => 'images/nt_user.png',
|
||||
'handler' => 'new_smb3_user_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['samba_user'], // 'Samba User',
|
||||
array( 'desc' => $lang['samba_user'], // 'Samba User',
|
||||
'icon' => 'images/nt_user.png',
|
||||
'handler' => 'new_smbuser_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['samba3_group'], // 'Samba 3 Group Mapping',
|
||||
array( 'desc' => $lang['samba3_group'], // 'Samba 3 Group Mapping',
|
||||
'icon' => 'images/ou.png',
|
||||
'handler' => 'new_smbgroup_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['dns_entry'], // 'DNS Entry',
|
||||
array( 'desc' => $lang['dns_entry'], // 'DNS Entry',
|
||||
'icon' => 'images/dc.png',
|
||||
'handler' => 'new_dns_entry.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['simple_sec_object'], // 'Simple Security Object',
|
||||
array( 'desc' => $lang['simple_sec_object'], // 'Simple Security Object',
|
||||
'icon' => 'images/user.png',
|
||||
'handler' => 'new_security_object_template.php' );
|
||||
'handler' => 'new_security_object_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['courier_mail_account'], // 'Courier Mail Account',
|
||||
array( 'desc' => $lang['courier_mail_account'], // 'Courier Mail Account',
|
||||
'icon' => 'images/mail_account.png',
|
||||
'handler' => 'new_postfix_account_template.php' );
|
||||
'handler' => 'new_postfix_account_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['courier_mail_alias'], // 'Courier Mail Alias',
|
||||
array( 'desc' => $lang['courier_mail_alias'], // 'Courier Mail Alias',
|
||||
'icon' => 'images/mail_alias.png',
|
||||
'handler' => 'new_postfix_alias_template.php' );
|
||||
'handler' => 'new_postfix_alias_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['ldap_alias'], // 'LDAP Alias',
|
||||
array( 'desc' => $lang['ldap_alias'], // 'LDAP Alias',
|
||||
'icon' => 'images/go.png',
|
||||
'handler' => 'new_alias_template.php' );
|
||||
'handler' => 'new_alias_template.php' );
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['sendmail_cluster'], // 'Sendmail Cluster',
|
||||
array( 'desc' => $lang['sendmail_cluster'], // 'Sendmail Cluster',
|
||||
'icon' => 'images/mail.png',
|
||||
'handler' => 'new_sendmail_cluster_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['sendmail_domain'], // 'Sendmail Domain',
|
||||
array( 'desc' => $lang['sendmail_domain'], // 'Sendmail Domain',
|
||||
'icon' => 'images/mail.png',
|
||||
'handler' => 'new_sendmail_domain_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['sendmail_alias'], // 'Sendmail Alias',
|
||||
array( 'desc' => $lang['sendmail_alias'], // 'Sendmail Alias',
|
||||
'icon' => 'images/mail.png',
|
||||
'handler' => 'new_sendmail_alias_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['sendmail_virt_dom'], // 'Sendmail Virtual Domain',
|
||||
array( 'desc' => $lang['sendmail_virt_dom'], // 'Sendmail Virtual Domain',
|
||||
'icon' => 'images/mail.png',
|
||||
'handler' => 'new_sendmail_virthost_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['sendmail_virt_users'], // 'Sendmail Virtual Users',
|
||||
array( 'desc' => $lang['sendmail_virt_users'], // 'Sendmail Virtual Users',
|
||||
'icon' => 'images/mail.png',
|
||||
'handler' => 'new_sendmail_virtuser_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['sendmail_relays'], // 'Sendmail Relays',
|
||||
array( 'desc' => $lang['sendmail_relays'], // 'Sendmail Relays',
|
||||
'icon' => 'images/mail.png',
|
||||
'handler' => 'new_sendmail_relay_template.php' );
|
||||
|
||||
$templates[] =
|
||||
array( 'desc' => $lang['custom'], // 'Custom',
|
||||
array( 'desc' => $lang['custom'], // 'Custom',
|
||||
'icon' => 'images/object.png',
|
||||
'handler' => 'custom.php' );
|
||||
'handler' => 'custom.php' );
|
||||
|
||||
/*#####################################################################################
|
||||
## POSIX GROUP TEMPLATE CONFIGURATION ##
|
||||
## ---------------------------------- ##
|
||||
## ##
|
||||
## ##
|
||||
#####################################################################################*/
|
||||
|
||||
// uncomment to set the base dn of posix groups
|
||||
@@ -159,15 +159,13 @@ $templates[] =
|
||||
//$base_posix_groups="ou=People,dc=example,dc=com";
|
||||
|
||||
|
||||
|
||||
|
||||
/*######################################################################################
|
||||
## SAMBA TEMPLATE CONFIGURATION ##
|
||||
## ---------------------------- ##
|
||||
## ##
|
||||
## In order to use the samba templates, you might edit the following properties: ##
|
||||
## In order to use the samba templates, you might edit the following properties: ##
|
||||
## 1 - $mkntpwdCommand : the path to the mkntpwd utility provided with/by Samba. ##
|
||||
## 2 - $samba3_domains : the domain name and the domain sid. ##
|
||||
## 2 - $samba3_domains : the domain name and the domain sid. ##
|
||||
## ##
|
||||
######################################################################################*/
|
||||
|
||||
@@ -175,151 +173,162 @@ $templates[] =
|
||||
$mkntpwdCommand = "/usr/local/bin/mkntpwd";
|
||||
|
||||
// Default domains definition (Customize)
|
||||
// (use `net getlocalsid` on samba server)
|
||||
// (use `net getlocalsid` on samba server)
|
||||
$samba3_domains = array();
|
||||
$samba3_domains[] =
|
||||
array( 'name' => $lang['samba_domain_name'], // 'My Samba domain Name',
|
||||
'sid' => 'S-1-5-21-4147564533-719371898-3834029857' );
|
||||
array(
|
||||
'name' => $lang['samba_domain_name'], // 'My Samba domain Name',
|
||||
'sid' => 'S-1-5-21-4147564533-719371898-3834029857'
|
||||
);
|
||||
|
||||
// The base dn of samba group. (CUSTOMIZE)
|
||||
//$samba_base_groups = "ou=Groups,ou=samba,dc=example,dc=org";
|
||||
|
||||
|
||||
//Definition of built-in local groups
|
||||
$built_in_local_groups = array( "S-1-5-32-544" => $lang['administrators'], // "Administrators",
|
||||
"S-1-5-32-545" => $lang['users'], // "Users",
|
||||
"S-1-5-32-546" => $lang['guests'], // "Guests",
|
||||
"S-1-5-32-547" => $lang['power_users'], // "Power Users",
|
||||
"S-1-5-32-548" => $lang['account_ops'], // "Account Operators",
|
||||
"S-1-5-32-549" => $lang['server_ops'], // "Server Operators",
|
||||
"S-1-5-32-550" => $lang['print_ops'], // "Print Operators",
|
||||
"S-1-5-32-551" => $lang['backup_ops'], // "backup Operators",
|
||||
"S-1-5-32-552" => $lang['replicator'] ); // "Replicator" );
|
||||
$built_in_local_groups = array(
|
||||
"S-1-5-32-544" => $lang['administrators'], // Administrators
|
||||
"S-1-5-32-545" => $lang['users'], // Users
|
||||
"S-1-5-32-546" => $lang['guests'], // Guests
|
||||
"S-1-5-32-547" => $lang['power_users'], // Power Users
|
||||
"S-1-5-32-548" => $lang['account_ops'], // Account Operators
|
||||
"S-1-5-32-549" => $lang['server_ops'], // Server Operators
|
||||
"S-1-5-32-550" => $lang['print_ops'], // Print Operators
|
||||
"S-1-5-32-551" => $lang['backup_ops'], // backup Operators
|
||||
"S-1-5-32-552" => $lang['replicator'] // Replicator
|
||||
);
|
||||
|
||||
|
||||
/*######################################################################################
|
||||
## Methods used in/by templates ##
|
||||
## ---------------------------- ##
|
||||
## Methods used in/by templates ##
|
||||
## ---------------------------- ##
|
||||
######################################################################################*/
|
||||
|
||||
/*
|
||||
* Returns the name of the template to use based on the DN and
|
||||
* objectClasses of an entry. If no specific modification
|
||||
* template is available, simply return 'default'. The caller
|
||||
* should append '.php' and prepend 'templates/modification/'
|
||||
/**
|
||||
* Return the name of the template to be used based on the object being edited.
|
||||
*
|
||||
* Returns the name of the template to use based on the DN and objectClasses of
|
||||
* an entry. If no specific modification template is available, simply return
|
||||
* 'default'. The caller should append '.php' and prepend 'templates/modification/'
|
||||
* to the returned string to get the file name.
|
||||
*
|
||||
* @param object $ldapserver Server Object the entry is in.
|
||||
* @param dn $dn Entry we will need a template for.
|
||||
*/
|
||||
|
||||
function get_template( $server_id, $dn )
|
||||
{
|
||||
// fetch and lowercase all the objectClasses in an array
|
||||
$object_classes = get_object_attr( $server_id, $dn, 'objectClass', true );
|
||||
function get_template( $ldapserver, $dn ) {
|
||||
// fetch and lowercase all the objectClasses in an array
|
||||
$object_classes = get_object_attr( $ldapserver, $dn, 'objectClass', true );
|
||||
|
||||
if( $object_classes === null || $object_classes === false)
|
||||
return 'default';
|
||||
if( $object_classes === null || $object_classes === false)
|
||||
return 'default';
|
||||
|
||||
foreach( $object_classes as $i => $class )
|
||||
$object_classes[$i] = strtolower( $class );
|
||||
foreach( $object_classes as $i => $class )
|
||||
$object_classes[$i] = strtolower( $class );
|
||||
|
||||
$rdn = get_rdn( $dn );
|
||||
if( in_array( 'groupofnames', $object_classes ) ||
|
||||
in_array( 'groupofuniquenames', $object_classes ) )
|
||||
return 'group_of_names';
|
||||
/*
|
||||
if( in_array( 'person', $object_classes ) &&
|
||||
in_array( 'posixaccount', $object_classes ) )
|
||||
return 'user';
|
||||
*/
|
||||
// TODO: Write other templates and criteria therefor
|
||||
// else if ...
|
||||
// return 'some other template';
|
||||
// else if ...
|
||||
// return 'some other template';
|
||||
// etc.
|
||||
$rdn = get_rdn( $dn );
|
||||
|
||||
return 'default';
|
||||
if( in_array( 'groupofnames', $object_classes ) ||
|
||||
in_array( 'groupofuniquenames', $object_classes ) )
|
||||
return 'group_of_names';
|
||||
|
||||
/*
|
||||
if( in_array( 'person', $object_classes ) &&
|
||||
in_array( 'posixaccount', $object_classes ) )
|
||||
return 'user';
|
||||
*/
|
||||
// TODO: Write other templates and criteria therefor
|
||||
// else if ...
|
||||
// return 'some other template';
|
||||
// else if ...
|
||||
// return 'some other template';
|
||||
// etc.
|
||||
|
||||
return 'default';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the domains info
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
function get_samba3_domains(){
|
||||
global $samba3_domains;
|
||||
|
||||
// do the search for the sambadomainname object here
|
||||
// In the meantime, just return the domains defined in this config file
|
||||
check_samba_setting();
|
||||
return $samba3_domains;
|
||||
}
|
||||
global $samba3_domains;
|
||||
|
||||
// do the search for the sambadomainname object here
|
||||
// In the meantime, just return the domains defined in this config file
|
||||
check_samba_setting();
|
||||
return $samba3_domains;
|
||||
}
|
||||
|
||||
/**
|
||||
* Utily class to get the samba passwords.
|
||||
* @package phpLDAPadmin
|
||||
*/
|
||||
|
||||
class MkntPasswdUtil{
|
||||
|
||||
var $clearPassword = NULL;
|
||||
var $sambaPassword ;
|
||||
|
||||
var $clearPassword = NULL;
|
||||
var $sambaPassword ;
|
||||
function MkntPasswdUtil(){
|
||||
$sambaPassword = array("sambaLMPassword" => NULL,
|
||||
"sambaNTPassword" => NULL);
|
||||
}
|
||||
|
||||
function createSambaPasswords($password){
|
||||
global $mkntpwdCommand, $lang;
|
||||
$this->clearPassword = $password;
|
||||
file_exists ( $mkntpwdCommand ) && is_executable ( $mkntpwdCommand ) or pla_error( $lang['unable_smb_passwords'] );
|
||||
$sambaPassCommand = $mkntpwdCommand . " " . $password;
|
||||
if($sambaPassCommandOutput = shell_exec($sambaPassCommand)){
|
||||
$this->sambaPassword['sambaLMPassword'] = trim( substr( $sambaPassCommandOutput , 0 , strPos( $sambaPassCommandOutput,':' ) ) );
|
||||
$this->sambaPassword['sambaNTPassword'] = trim( substr( $sambaPassCommandOutput, strPos( $sambaPassCommandOutput ,':' ) +1 ) );
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function MkntPasswdUtil(){
|
||||
$sambaPassword = array(
|
||||
"sambaLMPassword" => NULL,
|
||||
"sambaNTPassword" => NULL
|
||||
);
|
||||
}
|
||||
|
||||
function getSambaLMPassword(){
|
||||
return $this->sambaPassword['sambaLMPassword'];
|
||||
}
|
||||
function createSambaPasswords($password){
|
||||
global $mkntpwdCommand, $lang;
|
||||
|
||||
function getSambaNTPassword(){
|
||||
return $this->sambaPassword['sambaNTPassword'];
|
||||
}
|
||||
|
||||
function getSambaClearPassword(){
|
||||
return $this->clearPassword;
|
||||
}
|
||||
|
||||
function valueOf($key){
|
||||
return $this->sambaPassword[$key];
|
||||
}
|
||||
$this->clearPassword = $password;
|
||||
|
||||
file_exists ( $mkntpwdCommand ) && is_executable ( $mkntpwdCommand ) or pla_error( $lang['unable_smb_passwords'] );
|
||||
$sambaPassCommand = $mkntpwdCommand . " " . $password;
|
||||
|
||||
if($sambaPassCommandOutput = shell_exec($sambaPassCommand)){
|
||||
$this->sambaPassword['sambaLMPassword'] = trim( substr( $sambaPassCommandOutput , 0 , strPos( $sambaPassCommandOutput,':' ) ) );
|
||||
$this->sambaPassword['sambaNTPassword'] = trim( substr( $sambaPassCommandOutput, strPos( $sambaPassCommandOutput ,':' ) +1 ) );
|
||||
return true;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function getSambaLMPassword(){
|
||||
return $this->sambaPassword['sambaLMPassword'];
|
||||
}
|
||||
|
||||
function getSambaNTPassword(){
|
||||
return $this->sambaPassword['sambaNTPassword'];
|
||||
}
|
||||
|
||||
function getSambaClearPassword(){
|
||||
return $this->clearPassword;
|
||||
}
|
||||
|
||||
function valueOf($key){
|
||||
return $this->sambaPassword[$key];
|
||||
}
|
||||
}
|
||||
|
||||
function check_samba_setting(){
|
||||
global $samba3_domains;
|
||||
|
||||
// check if the samba3_domains exist and is a array
|
||||
( isset($samba3_domains ) && is_array( $samba3_domains ) ) or pla_error($lang['err_smb_conf']);
|
||||
//"Error: You have an error in your samba confguration.");
|
||||
|
||||
// no definition for the samba domain
|
||||
if(empty($samba3_domains))
|
||||
pla_error($lang['err_smb_no_name_sid']);
|
||||
// "Error: A name and a sid for your samba domain need to be provided.");
|
||||
else{
|
||||
// check if there is name or a sid declared for each domains
|
||||
foreach($samba3_domains as $samba3_domain){
|
||||
isset($samba3_domain['name']) or pla_error($lang['err_smb_no_name']); // "Error: No name provided for samba domain.");
|
||||
isset($samba3_domain['sid']) or pla_error($lang['err_smb_no_sid']); // "Error: No sid provided for samba domain.");
|
||||
}
|
||||
}
|
||||
}
|
||||
global $samba3_domains;
|
||||
|
||||
// check if the samba3_domains exist and is a array
|
||||
( isset($samba3_domains ) && is_array( $samba3_domains ) ) or pla_error($lang['err_smb_conf']);
|
||||
|
||||
// no definition for the samba domain
|
||||
if(empty($samba3_domains))
|
||||
pla_error($lang['err_smb_no_name_sid']);
|
||||
|
||||
else {
|
||||
// check if there is name or a sid declared for each domains
|
||||
foreach ($samba3_domains as $samba3_domain) {
|
||||
isset($samba3_domain['name']) or pla_error($lang['err_smb_no_name']);
|
||||
isset($samba3_domain['sid']) or pla_error($lang['err_smb_no_sid']);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
212
templates/template_header.php
Normal file
212
templates/template_header.php
Normal file
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/templates/template_header.php,v 1.6 2005/09/04 18:41:34 wurley Exp $
|
||||
|
||||
/**
|
||||
* Header page for engine.
|
||||
* @package phpLDAPadmin
|
||||
* @author The phpLDAPadmin development team
|
||||
*/
|
||||
|
||||
include './header.php';
|
||||
|
||||
$time = gettimeofday();
|
||||
$random_junk = md5(strtotime('now').$time['usec']);
|
||||
$url_base = sprintf('server_id=%s&dn=%s',$ldapserver->server_id,$encoded_dn);
|
||||
|
||||
$export_href_base = sprintf('export_form.php?%s&scope=%s',$url_base,'base');
|
||||
$export_href_sub = sprintf('export_form.php?%s&scope=%s',$url_base,'sub');
|
||||
$refresh_href = sprintf('edit.php?%s&random=%s',$url_base,$random_junk);
|
||||
$copy_href = sprintf('copy_form.php?%s',$url_base);
|
||||
$intattr_href = sprintf('edit.php?%s&show_internal_attrs=true',$url_base);
|
||||
$delete_href = sprintf('delete_form.php?%s',$url_base);
|
||||
$rename_href = sprintf('rename_form.php?%s',$url_base);
|
||||
$compare_href = sprintf('compare_form.php?%s',$url_base);
|
||||
$create_href = sprintf('create_form.php?server_id=%s&container=%s',$ldapserver->server_id,$encoded_dn);
|
||||
$addattr_href = sprintf('add_attr_form.php?%s',$url_base);
|
||||
?>
|
||||
|
||||
<body>
|
||||
|
||||
<?php if ($dn) { ?>
|
||||
<h3 class="title"><?php echo htmlspecialchars($rdn); ?></h3>
|
||||
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $ldapserver->name; ?></b> <?php echo $lang['distinguished_name'];?>: <b><?php echo htmlspecialchars( ( $dn ) ); ?></b></h3>
|
||||
|
||||
<table class="edit_dn_menu">
|
||||
<tr>
|
||||
<td class="icon"><img src="images/refresh.png" /></td>
|
||||
<td><a href="<?php echo $refresh_href; ?>" title="<?php echo $lang['refresh_this_entry']; ?>"><?php echo $lang['refresh_entry']; ?></a></td>
|
||||
<td class="icon"><img src="images/save.png" /></td>
|
||||
<td><a href="<?php echo $export_href_base; ?>" title="<?php echo $lang['export_tooltip']; ?>"><?php echo $lang['export']; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="icon"><img src="images/cut.png" /></td>
|
||||
<td><a href="<?php echo $copy_href; ?>" title="<?php echo $lang['copy_this_entry_tooltip']; ?>"><?php echo $lang['copy_this_entry']; ?></a></td>
|
||||
|
||||
<?php if ($show_internal_attrs) { ?>
|
||||
<td class="icon"><img src="images/tools-no.png" /></td>
|
||||
<td><a href="<?php echo $refresh_href; ?>"><?php echo $lang['hide_internal_attrs']; ?></a></td>
|
||||
|
||||
<?php } else { ?>
|
||||
<td class="icon"><img src="images/tools.png" /></td>
|
||||
<td><a href="<?php echo $intattr_href; ?>"><?php echo $lang['show_internal_attrs']; ?></a></td>
|
||||
<?php } ?>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php if (! $ldapserver->isReadOnly()) { ?>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/trash.png" /></td>
|
||||
<td><a style="color: red" href="<?php echo $delete_href; ?>" title="<?php echo $lang['delete_this_entry_tooltip']; ?>"><?php echo $lang['delete_this_entry']; ?></a></td>
|
||||
<td class="icon"><img src="images/rename.png" /></td>
|
||||
<td><a href="<?php echo $rename_href; ?>"><?php echo $lang['rename']; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($config->GetValue('appearance','show_hints')) { ?>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/light.png" /></td>
|
||||
<td colspan="3"><span class="hint"><?php echo $lang['delete_hint']; ?></span></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<td class="icon"><img src="images/compare.png" /></td>
|
||||
<td><a href="<?php echo $compare_href; ?>"><?php echo $lang['compare_with']; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="icon"><img src="images/star.png" /></td>
|
||||
<td><a href="<?php echo $create_href; ?>"><?php echo $lang['create_a_child_entry']; ?></a></td>
|
||||
<td class="icon"><img src="images/add.png" /></td>
|
||||
<td><a href="<?php echo $addattr_href; ?>"><?php echo $lang['add_new_attribute']; ?></a></td>
|
||||
</tr>
|
||||
<?php }
|
||||
|
||||
flush();
|
||||
$children = get_container_contents($ldapserver,$dn,$max_children,'(objectClass=*)',$config->GetValue('deref','view'));
|
||||
|
||||
if (($children_count = count($children)) > 0) {
|
||||
if ($children_count == $max_children)
|
||||
$children_count = $children_count.'+';
|
||||
|
||||
$child_href = sprintf('search.php?server_id=%s&search=true&filter=%s&base_dn=%s&form=advanced&scope=one',
|
||||
$ldapserver->server_id,rawurlencode('objectClass=*'),$encoded_dn);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="icon"><img src="images/children.png" /></td>
|
||||
<td><a href="<?php echo $child_href; ?>"><?php if( $children_count == 1 ) echo $lang['view_one_child']; else echo sprintf( $lang['view_children'], $children_count ); ?></a></td>
|
||||
<td class="icon"><img src="images/save.png" /></td>
|
||||
<td><a href="<?php echo $export_href_sub; ?>" title="<?php echo $lang['export_subtree_tooltip']; ?>"><?php echo $lang['export_subtree']; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config->GetValue('appearance','show_hints')) { ?>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/light.png" /></td>
|
||||
<td colspan="3"><span class="hint"><?php echo $lang['attr_schema_hint']; ?></span></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($ldapserver->isReadOnly()) { ?>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/light.png" /></td>
|
||||
<td><?php echo $lang['viewing_read_only']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($modified_attrs) { ?>
|
||||
<tr>
|
||||
<td class="icon"><img src="images/light.png" /></td>
|
||||
|
||||
<?php if (count($modified_attrs) > 1) { ?>
|
||||
<td colspan="3"><?php echo sprintf($lang['attrs_modified'],implode(', ',$modified_attrs)); ?></td>
|
||||
|
||||
<?php } else { ?>
|
||||
<td colspan="3"><?php echo sprintf($lang['attr_modified'],implode('',$modified_attrs)); ?></td>
|
||||
<?php } ?>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php flush(); ?>
|
||||
|
||||
<br />
|
||||
<table class="edit_dn">
|
||||
|
||||
<?php if ($show_internal_attrs) {
|
||||
$counter = 0;
|
||||
|
||||
foreach (get_entry_system_attrs($ldapserver,$dn) as $attr => $vals) {
|
||||
$counter++;
|
||||
$schema_href = sprintf('schema.php?server_id=%s&view=attributes&viewvalue=%s',
|
||||
$ldapserver->server_id,real_attr_name($attr));
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="attr"><b><a title="<?php echo sprintf( $lang['attr_name_tooltip'], $attr ); ?>" href="<?php echo $schema_href; ?>"><?php echo htmlspecialchars( $attr ); ?></b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="val">
|
||||
|
||||
<?php if (is_attr_binary($ldapserver,$attr)) {
|
||||
$href = "download_binary_attr.php?server_id=$server_id&dn=$encoded_dn&attr=$attr";
|
||||
?>
|
||||
|
||||
<small>
|
||||
<?php echo $lang['binary_value']; ?><br />
|
||||
<?php if (count($vals) > 1) {
|
||||
for ($i = 1; $i <= count($vals); $i++) { ?>
|
||||
|
||||
<a href="<?php sprintf('%s&value_num=%s',$href,$i); ?>"><img src="images/save.png" /> <?php echo $lang['download_value']; ?>(<?php echo $i; ?>)</a>
|
||||
<br />
|
||||
|
||||
<?php
|
||||
}
|
||||
} else { ?>
|
||||
<a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo $lang['download_value']; ?></a><br />
|
||||
<?php }
|
||||
|
||||
} else {
|
||||
|
||||
foreach ($vals as $v) {
|
||||
echo htmlspecialchars($v);
|
||||
echo "<br />\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($counter == 0)
|
||||
echo "<tr><td colspan=\"2\">(" . $lang['no_internal_attributes'] . ")</td></tr>\n";
|
||||
}
|
||||
|
||||
flush(); ?>
|
||||
|
||||
<!-- Table of attributes/values to edit -->
|
||||
|
||||
<?php if (! $ldapserver->isReadOnly()) { ?>
|
||||
<form action="update_confirm.php" method="post" name="edit_form">
|
||||
<input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
|
||||
<input type="hidden" name="dn" value="<?php echo $dn; ?>" />
|
||||
<?php }
|
||||
|
||||
} else {
|
||||
|
||||
?>
|
||||
|
||||
<h3 class="title"><?php echo $lang['createf_create_object']; ?></h3>
|
||||
<h3 class="subtitle"><?php echo $lang['server']; ?>: <b><?php echo $ldapserver->name; ?></b> <?php echo $lang['using_template'];?>: <b><?php echo htmlspecialchars($_REQUEST['template']); ?></b></h3>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user