',$counter%2 ? 'even' : 'odd');
printf('%s | ',$attribute->getFriendlyName());
# Show OLD Values
echo '';
if (! $attribute->getOldValues())
printf('[%s]',_('attribute doesnt exist'));
foreach ($attribute->getOldValues() as $key => $value) {
# For multiple values, we'll highlight the changed ones
if ((count($attribute->getOldValues()) > 5) && in_array($value,$attribute->getRemovedValues()) && count($attribute->getValues()))
echo '';
$request['page']->draw('OldValue',$attribute,$key);
# For multiple values, close the highlighting
if ((count($attribute->getOldValues()) > 5) && in_array($value,$attribute->getRemovedValues()) && count($attribute->getValues()))
echo '';
echo ' ';
}
echo ' | ';
# Show NEW Values
echo '';
if (! $attribute->getValueCount() || $attribute->isForceDelete())
printf('[%s]',_('attribute deleted'));
foreach ($attribute->getValues() as $key => $value) {
# For multiple values, we'll highlight the changed ones
if ((count($attribute->getValues()) > 5) && in_array($value,$attribute->getAddedValues()))
echo '';
$request['page']->draw('CurrentValue',$attribute,$key);
# For multiple values, close the highlighting
if ((count($attribute->getValues()) > 5) && in_array($value,$attribute->getAddedValues()))
echo '';
echo ' ';
}
echo ' | ';
# Show SKIP Option
$input_disabled = '';
$input_onclick = '';
if ($attribute->isForceDelete() || in_array($attribute->getName(),$mustattrs))
$input_disabled = 'disabled="disabled"';
if ($attribute->getName() == 'objectclass') {
$input_onclick = '';
if (count($request['template']->getForceDeleteAttrs()) > 0) {
$input_onclick = 'onclick="if (this.checked) {';
foreach ($request['template']->getForceDeleteAttrs() as $ad_name) {
$input_onclick .= sprintf("document.getElementById('skip_array_%s').disabled = false;",$ad_name->getName());
$input_onclick .= sprintf("document.getElementById('skip_array_%s').checked = true;",$ad_name->getName());
$input_onclick .= "\n";
}
$input_onclick .= '} else {';
foreach ($request['template']->getForceDeleteAttrs() as $ad_name) {
$input_onclick .= sprintf("document.getElementById('skip_array_%s').checked = false;",$ad_name->getName());
$input_onclick .= sprintf("document.getElementById('skip_array_%s').disabled = true;",$ad_name->getName());
$input_onclick .= "\n";
}
$input_onclick .= '};';
}
if ($input_onclick)
$input_onclick .= 'if (this.checked) {';
else
$input_onclick = 'onclick="if (this.checked) {';
foreach ($request['template']->getLDAPmodify(true) as $skipattr) {
if (! $skipattr->getOldValues()) {
if (! in_array($skipattr->getName(),$mustattrs))
$input_onclick .= sprintf("document.getElementById('skip_array_%s').disabled = true;",$skipattr->getName());
$input_onclick .= sprintf("document.getElementById('skip_array_%s').checked = true;",$skipattr->getName());
$input_onclick .= "\n";
}
}
$input_onclick .= '} else {';
foreach ($request['template']->getLDAPmodify(true) as $skipattr) {
if (! $skipattr->getOldValues()) {
if (! in_array($skipattr->getName(),$mustattrs))
$input_onclick .= sprintf("document.getElementById('skip_array_%s').disabled = false;",$skipattr->getName());
$input_onclick .= sprintf("document.getElementById('skip_array_%s').checked = false;",$skipattr->getName());
$input_onclick .= "\n";
}
}
$input_onclick .= '};"';
}
printf(' | ',
htmlspecialchars($attribute->getName()),htmlspecialchars($attribute->getName()),$input_disabled,$input_onclick);
echo '
';
echo "\n\n";
}
echo '