RELEASE 0.9.8.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/common.php,v 1.76.2.6 2005/12/30 02:32:41 wurley Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/common.php,v 1.76.2.7 2006/04/29 06:31:27 wurley Exp $
|
||||
|
||||
/**
|
||||
* Contains code to be executed at the top of each phpLDAPadmin page.
|
||||
@@ -53,9 +53,6 @@ ob_end_clean();
|
||||
# We are now ready for error reporting.
|
||||
# Turn on all notices and warnings. This helps us write cleaner code (we hope at least)
|
||||
if (phpversion() >= '5') {
|
||||
# Work-around to get PLA to work in PHP5
|
||||
ini_set('zend.ze1_compatibility_mode',1);
|
||||
|
||||
# E_DEBUG is PHP5 specific and prevents warnings about using 'var' to declare class members
|
||||
error_reporting(E_DEBUG);
|
||||
} else
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
$Id: createlm.php,v 1.2 2005/10/23 01:05:41 wurley Exp $
|
||||
$Id: createlm.php,v 1.2.2.1 2006/04/29 07:31:08 wurley Exp $
|
||||
|
||||
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
||||
Copyright (C) 2004 Roland Gruber
|
||||
@@ -133,6 +133,14 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
array( 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8),
|
||||
array( 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11)));
|
||||
|
||||
/**
|
||||
* Fixes too large numbers
|
||||
*/
|
||||
function x($i) {
|
||||
if ($i < 0) return 4294967296 - $i;
|
||||
else return $i;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer count
|
||||
* @param array $data
|
||||
@@ -335,7 +343,11 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
# Support functions
|
||||
# Ported from SAMBA/source/lib/md4.c:F,G and H respectfully
|
||||
function F($X, $Y, $Z) {
|
||||
return ($X&$Y) | ((~$X)&$Z);
|
||||
$ret = (($X&$Y) | ((~((int)$X))&$Z));
|
||||
if ($this->x($ret) > 4294967296) {
|
||||
$ret = (2*4294967296) - $this->x($ret);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function G($X, $Y, $Z) {
|
||||
@@ -468,6 +480,9 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
$sum[1] &= 0xffff;
|
||||
$sum[0] &= 0xffff;
|
||||
$ret = ($sum[0]<<16) | $sum[1];
|
||||
if ($this->x($ret) > 4294967296) {
|
||||
$ret = (2*4294967296) - $this->x($ret);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -493,7 +508,14 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
# Renamed to prevent clash with SAMBA/source/libsmb/smbdes.c:lshift
|
||||
function md4lshift($x, $s) {
|
||||
$x &= 0xFFFFFFFF;
|
||||
return ((($x<<$s)&0xFFFFFFFF) | $this->unsigned_shift_r($x, (32-$s)));
|
||||
if ($this->x($x) > 4294967296) {
|
||||
$x = (2*4294967296) - $this->x($x);
|
||||
}
|
||||
$ret = ((($x<<$s)&0xFFFFFFFF) | $this->unsigned_shift_r($x, (32-$s)));
|
||||
if ($this->x($ret) > 4294967296) {
|
||||
$ret = (2*4294967296) - $this->x($ret);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/functions.php,v 1.283.2.33 2006/03/13 23:13:43 wurley Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/functions.php,v 1.283.2.36 2006/05/07 05:25:56 wurley Exp $
|
||||
|
||||
/**
|
||||
* A collection of functions used throughout phpLDAPadmin.
|
||||
@@ -86,7 +86,7 @@ function pretty_print_dn( $dn ) {
|
||||
debug_log('pretty_print_dn(): Entered with (%s)',1,$dn);
|
||||
|
||||
if (! is_dn_string($dn))
|
||||
pla_error(sprintf(_('DN %s is not an LDAP distinguished name.'),$dn));
|
||||
pla_error(sprintf(_('DN "%s" is not an LDAP distinguished name.'),htmlspecialchars($dn)));
|
||||
|
||||
$dn = pla_explode_dn( $dn );
|
||||
foreach( $dn as $i => $element ) {
|
||||
@@ -1015,7 +1015,7 @@ function pla_error( $msg, $ldap_err_msg=null, $ldap_err_no=-1, $fatal=true ) {
|
||||
|
||||
?>
|
||||
<center>
|
||||
<table class="error"><tr><td class="img"><img src="images/warning.png" /></td>
|
||||
<table class="error"><tr><td class="img"><img src="images/warning.png" alt="Warning" /></td>
|
||||
<td><center><h2><?php echo _('Error');?></h2></center>
|
||||
<?php echo $msg; ?>
|
||||
<br />
|
||||
@@ -1121,7 +1121,7 @@ function pla_error_handler( $errno, $errstr, $file, $lineno ) {
|
||||
|
||||
$errstr = preg_replace("/\s+/"," ",$errstr);
|
||||
if( $errno == E_NOTICE ) {
|
||||
echo sprintf(_('<center><table class=\'notice\'><tr><td colspan=\'2\'><center><img src=\'images/warning.png\' height=\'12\' width=\'13\' />
|
||||
echo sprintf(_('<center><table class=\'notice\'><tr><td colspan=\'2\'><center><img src=\'images/warning.png\' height=\'12\' width=\'13\' alt="Warning" />
|
||||
<b>You found a non-fatal phpLDAPadmin bug!</b></td></tr><tr><td>Error:</td><td><b>%s</b> (<b>%s</b>)</td></tr><tr><td>File:</td>
|
||||
<td><b>%s</b> line <b>%s</b>, caller <b>%s</b></td></tr><tr><td>Versions:</td><td>PLA: <b>%s</b>, PHP: <b>%s</b>, SAPI: <b>%s</b>
|
||||
</td></tr><tr><td>Web server:</td><td><b>%s</b></td></tr>
|
||||
@@ -1265,7 +1265,7 @@ function draw_jpeg_photos($ldapserver,$dn,$attr_name='jpegPhoto',$draw_delete_bu
|
||||
$img_height = $height;
|
||||
}
|
||||
|
||||
printf('<img %s%s%s src="view_jpeg_photo.php?file=%s" /><br />',
|
||||
printf('<img %s%s%s src="view_jpeg_photo.php?file=%s" alt="Photo" /><br />',
|
||||
($fixed_width ? '' : 'width="'.$img_width.'" '),
|
||||
($fixed_height ? '' : 'height="'.$img_height.'"'),
|
||||
($img_html_attrs ? $img_html_attrs : ''),basename($jpeg_filename));
|
||||
@@ -1640,7 +1640,7 @@ function draw_chooser_link( $form_element, $include_choose_text=true, $rdn="none
|
||||
|
||||
$title = _('Click to popup a dialog to select an entry (DN) graphically');
|
||||
|
||||
printf('<a href="%s" title="%s"><img class="chooser" src="images/find.png" /></a>',$href,$title);
|
||||
printf('<a href="%s" title="%s"><img class="chooser" src="images/find.png" alt="Find" /></a>',$href,$title);
|
||||
if ($include_choose_text)
|
||||
printf('<span class="x-small"><a href="%s" title="%s">%s</a></span>',$href,$title,_('browse'));
|
||||
}
|
||||
@@ -1662,6 +1662,8 @@ function draw_chooser_link( $form_element, $include_choose_text=true, $rdn="none
|
||||
* </code>
|
||||
*/
|
||||
function pla_explode_dn($dn,$with_attributes=0) {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('pla_explode_dn(): Entered with (%s,%s)',1,$dn,$with_attributes);
|
||||
$dn = addcslashes(dn_escape($dn),'<>');
|
||||
|
||||
# split the dn
|
||||
@@ -1686,6 +1688,8 @@ function pla_explode_dn($dn,$with_attributes=0) {
|
||||
* Parse a DN and escape any special characters
|
||||
*/
|
||||
function dn_escape($dn) {
|
||||
$olddn = $dn;
|
||||
|
||||
# Check if the RDN has a comma and escape it.
|
||||
while (preg_match('/([^\\\\]),(\s*[^=]*\s*),/',$dn))
|
||||
$dn = preg_replace('/([^\\\\]),(\s*[^=]*\s*),/','$1\\\\2C$2,',$dn);
|
||||
@@ -1693,7 +1697,7 @@ function dn_escape($dn) {
|
||||
$dn = preg_replace('/([^\\\\]),(\s*[^=]*\s*)([^,])$/','$1\\\\2C$2$3',$dn);
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('dn_escape(): Entered with (%s), Returning (%s)',1,$dn,$dn);
|
||||
debug_log('dn_escape(): Entered with (%s), Returning (%s)',1,$olddn,$dn);
|
||||
|
||||
return $dn;
|
||||
}
|
||||
@@ -2800,7 +2804,7 @@ function draw_date_selector_link( $attr ) {
|
||||
|
||||
$href = "javascript:dateSelector('$attr');";
|
||||
$title = _('Click to popup a dialog to select a date graphically');
|
||||
printf('<a href="%s" title="%s"><img class="chooser" src="images/calendar.png" id="f_trigger_%s" style="cursor: pointer;" /></a>',$href,$title,$attr);
|
||||
printf('<a href="%s" title="%s"><img class="chooser" src="images/calendar.png" id="f_trigger_%s" style="cursor: pointer;" alt="Calendar" /></a>',$href,$title,$attr);
|
||||
}
|
||||
|
||||
function no_expire_header() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/server_functions.php,v 1.34.2.28 2006/02/25 14:08:54 wurley Exp $ */
|
||||
/* $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/server_functions.php,v 1.34.2.29 2006/05/07 05:25:56 wurley Exp $ */
|
||||
|
||||
/**
|
||||
* Classes and functions for LDAP server configuration and capability
|
||||
@@ -2250,7 +2250,7 @@ class LDAPserver {
|
||||
*/
|
||||
function getLoggedInPass() {
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('%s:getLoggedInPass(): Entered with ()',17,get_class($this));
|
||||
debug_log('%s::getLoggedInPass(): Entered with ()',17,get_class($this));
|
||||
|
||||
if (! $this->auth_type)
|
||||
return false;
|
||||
@@ -2303,6 +2303,9 @@ class LDAPserver {
|
||||
# Set default return
|
||||
$return = false;
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('%s::getLoggedInDN(): auth_type is [%s]',66,get_class($this),$this->auth_type);
|
||||
|
||||
if ($this->auth_type) {
|
||||
switch ($this->auth_type) {
|
||||
case 'cookie':
|
||||
@@ -2335,7 +2338,7 @@ class LDAPserver {
|
||||
}
|
||||
|
||||
if (DEBUG_ENABLED)
|
||||
debug_log('%s:getLoggedInDN(): Entered with (), Returning (%s)',17,get_class($this),$return);
|
||||
debug_log('%s::getLoggedInDN(): Entered with (), Returning (%s)',17,get_class($this),$return);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/template_functions.php,v 1.29.2.18 2006/02/25 12:14:17 wurley Exp $ */
|
||||
/* $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/template_functions.php,v 1.29.2.19 2006/04/27 12:33:17 wurley Exp $ */
|
||||
|
||||
/**
|
||||
* Classes and functions for the template engine.ation and capability
|
||||
@@ -464,7 +464,7 @@ class Templates {
|
||||
U: Make the result upper case.
|
||||
*/
|
||||
case 'autoFill' :
|
||||
list($attr,$string) = split(',',$arg);
|
||||
list($attr,$string) = preg_split('(([^,]+),(.*))',$arg,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
||||
preg_match_all('/%(\w+)(\|[0-9]*-[0-9]*)?(\/[klTU]+)?%/U',$string,$matchall);
|
||||
//print"<PRE>";print_r($matchall); //0 = highlevel match, 1 = attr, 2 = subst, 3 = mod
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/tree_functions.php,v 1.20.2.19 2006/01/02 13:30:34 wurley Exp $
|
||||
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/tree_functions.php,v 1.20.2.21 2006/05/07 05:25:56 wurley Exp $
|
||||
|
||||
/**
|
||||
* @package phpLDAPadmin
|
||||
@@ -89,7 +89,9 @@ function draw_server_tree() {
|
||||
$logged_in_dn_array = explode(',',$logged_in_branch);
|
||||
}
|
||||
|
||||
$logged_in_dn_array[] = $ldapserver->getDNBase($logged_in_dn);
|
||||
$bases = $ldapserver->getDNBase($logged_in_dn);
|
||||
if (is_array($bases) && count($bases))
|
||||
$logged_in_dn_array[] = $bases;
|
||||
|
||||
$rdn = $logged_in_dn;
|
||||
|
||||
@@ -190,9 +192,6 @@ function draw_server_tree() {
|
||||
|
||||
$icon = isset($tree['browser'][$base_dn]['icon']) ? $tree['browser'][$base_dn]['icon'] : get_icon($ldapserver,$base_dn);
|
||||
|
||||
# Shall we draw the "mass-delete" checkbox?
|
||||
if ($ldapserver->isMassDeleteEnabled())
|
||||
printf('<td><input type="checkbox" name="mass_delete[%s]" /></td>',htmlspecialchars($base_dn));
|
||||
|
||||
if ($config->GetValue('appearance','tree_plm')) {
|
||||
$tree_plm .= sprintf(".|%s|%s|%s|%s|%s|%s\n",
|
||||
@@ -200,6 +199,11 @@ function draw_server_tree() {
|
||||
|
||||
} else {
|
||||
echo '<tr>';
|
||||
|
||||
# Shall we draw the "mass-delete" checkbox?
|
||||
if ($ldapserver->isMassDeleteEnabled())
|
||||
printf('<td><input type="checkbox" name="mass_delete[%s]" /></td>',htmlspecialchars($base_dn));
|
||||
|
||||
printf('<td class="expander"><a href="%s"><img src="%s" alt="%s" /></a></td>',$expand_href,$expand_img,$expand_alt);
|
||||
printf('<td class="icon"><a href="%s" target="right_frame"><img src="images/%s" alt="img" /></a></td>',$edit_href,$icon);
|
||||
printf('<td class="rdn" colspan="98"><nobr><a href="%s" target="right_frame">%s</a>',$edit_href,pretty_print_dn($base_dn));
|
||||
|
Reference in New Issue
Block a user