HTML Validation work

This commit is contained in:
Deon George
2010-02-25 02:03:10 +11:00
parent 1b55c84f06
commit f713afc8d1
33 changed files with 515 additions and 476 deletions

View File

@@ -97,21 +97,21 @@ class AJAXTree extends HTMLTree {
echo $this->get_indentation($code);
if (! $child_count)
printf('<img align="top" border="0" class="imgs" id="jt%snode" src="%s/%s" alt="--" />',$node_id,IMGDIR,$imgs['tree'][$nb]);
printf('<img id="jt%snode" src="%s/%s" alt="--" class="imgs" style="border: 0px; vertical-align:text-top;" />',$node_id,IMGDIR,$imgs['tree'][$nb]);
else {
printf('<a href="#" onclick="return opencloseTreeNode(\'%s\',\'%s\',\'%s\');">',$node_id,$parms['openclose'],IMGDIR);
if ($entry->isOpened())
printf('<img align="top" border="0" class="imgs" id="jt%snode" src="%s/%s" alt="+-" />',$node_id,IMGDIR,$imgs['collapse'][$nb]);
printf('<img id="jt%snode" src="%s/%s" alt="+-" class="imgs" style="border: 0px; vertical-align:text-top;" />',$node_id,IMGDIR,$imgs['collapse'][$nb]);
else
printf('<img align="top" border="0" class="imgs" id="jt%snode" src="%s/%s" alt="+-" />',$node_id,IMGDIR,$imgs['expand'][$nb]);
printf('<img id="jt%snode" src="%s/%s" alt="+-" class="imgs" style="border: 0px; vertical-align:text-top;" />',$node_id,IMGDIR,$imgs['expand'][$nb]);
echo '</a>';
}
printf('<a href="%s" onclick="return ajDISPLAY(\'BODY\',\'%s\',\'%s\');" title="%s" >',$href,$parms['edit'],_('Retrieving DN'),htmlspecialchars($item));
printf('<span class="dnicon"><img align="top" border="0" class="imgs" id="jt%sfolder" src="%s/%s" alt="->" /></span>',$node_id,IMGDIR,$entry->getIcon($server));
printf('<span class="dnicon"><img id="jt%sfolder" src="%s/%s" alt="->" class="imgs" style="border: 0px; vertical-align:text-top;" /></span>',$node_id,IMGDIR,$entry->getIcon($server));
echo '</a>';
echo '&nbsp;';
@@ -192,11 +192,11 @@ class AJAXTree extends HTMLTree {
for ($i=0; $i<strlen($code); $i++) {
switch ($code[$i]) {
case '0':
$indent .= sprintf('<img align="top" border="0" class="imgs" src="%s/tree_space.png" alt=" " />',IMGDIR);
$indent .= sprintf('<img src="%s/tree_space.png" alt=" " class="imgs" style="border: 0px; vertical-align:text-top;" />',IMGDIR);
break;
case '1':
$indent .= sprintf('<img align="top" border="0" class="imgs" src="%s/tree_vertline.png" alt="| " />',IMGDIR);
$indent .= sprintf('<img src="%s/tree_vertline.png" alt="| " class="imgs" style="border: 0px; vertical-align:text-top;" />',IMGDIR);
break;
}
}
@@ -211,8 +211,8 @@ class AJAXTree extends HTMLTree {
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',33,0,__FILE__,__LINE__,__METHOD__,$fargs);
printf('<script type="text/javascript" language="javascript" src="%slayersmenu-browser_detection.js"></script>',JSDIR);
printf('<script type="text/javascript" language="javascript" src="%sajax_tree.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%slayersmenu-browser_detection.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sajax_tree.js"></script>',JSDIR);
}
/**
@@ -266,9 +266,9 @@ class AJAXTree extends HTMLTree {
$href = sprintf('cmd=template_engine&server_id=%s&container=%s',$this->getServerID(),rawurlencode($entry->getDN()));
$output .= $this->get_indentation($level);
$output .= sprintf('<img align="top" border="0" class="imgs" src="%s" alt="--" />',$img);
$output .= sprintf('<img src="%s" alt="--" class="imgs" style="border: 0px; vertical-align:text-top;" />',$img);
$output .= sprintf('<a href="%s" title="%s">',htmlspecialchars($href),$entry->getDN());
$output .= sprintf('<img align="top" border="0" class="imgs" src="%s/create.png" alt="->" />',IMGDIR);
$output .= sprintf('<img src="%s/create.png" alt="->" class="imgs" style="border: 0px; vertical-align:text-top;" />',IMGDIR);
$output .= '</a>';
$output .= '&nbsp;';

View File

@@ -30,7 +30,7 @@ class HTMLTree extends Tree {
$server = $this->getServer();
echo '<table class="tree" border=0>';
echo '<table class="tree" border="0">';
if (! $onlytree)
$this->draw_server_name();
@@ -60,7 +60,7 @@ class HTMLTree extends Tree {
$server->getIndex());
}
echo '<table class="tree" border=0>';
echo '<table class="tree" border="0">';
if (! count($this->getBaseEntries())) {
# We didnt get any baseDN entries in our tree?
@@ -90,13 +90,13 @@ class HTMLTree extends Tree {
printf('<tr><td class="spacer"></td><td class="spacer"></td><td><img src="%s/unknown.png" /></td><td colspan="%s">%s</td></tr>',
IMGDIR,$this->getDepth()+3-3,pretty_print_dn($base->getDN()));
$this->javascript .= sprintf('<form name="create_base_form_%s" method="post" action="cmd.php?cmd=template_engine">',$javascript_id);
$this->javascript .= sprintf('<form id="create_base_form_%s" method="post" action="cmd.php?cmd=template_engine">',$javascript_id);
$this->javascript .= sprintf('<input type="hidden" name="server_id" value="%s" />',$server->getIndex());
$this->javascript .= sprintf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($server->getContainer($base->getDN())));
$this->javascript .= sprintf('<input type="hidden" name="rdn" value="%s" />',get_rdn($base->getDN()));
$this->javascript .= sprintf('</form>');
printf('<tr><td class="spacer"></td><td class="spacer"></td><td class="spacer"></td><td colspan="%s"><small>%s<a href="javascript:document.create_base_form_%s.submit()">%s</a></small></td></tr>',
printf('<tr><td class="spacer"></td><td class="spacer"></td><td class="spacer"></td><td colspan="%s"><small>%s<a href="javascript:document.getElementById(\'create_base_form_%s\').submit()">%s</a></small></td></tr>',
$this->getDepth()+3-3,_('This base entry does not exist.'),$javascript_id,_('Create it?'));
echo '</table>';
@@ -163,7 +163,7 @@ class HTMLTree extends Tree {
if (! is_null($server->inactivityTime())) {
$m = sprintf(_('Inactivity will log you off at %s'),
strftime('%H:%M',$server->inactivityTime()));
printf(' <img width=14 height=14 src="%s/timeout.png" title="%s" alt="%s"/>',IMGDIR,$m,'Timeout');
printf(' <img width="14" height="14" src="%s/timeout.png" title="%s" alt="%s"/>',IMGDIR,$m,'Timeout');
}
echo '</td></tr>';
}
@@ -420,7 +420,7 @@ class HTMLTree extends Tree {
$href['edit'] = htmlspecialchars(sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',$server->getIndex(),$dnENCODE));
echo '<tr class="option">';
printf('<td class="spacer" colspan=%s></td>',$level+2);
printf('<td class="spacer" colspan="%s"></td>',$level+2);
# Is this node expanded? (deciding whether to draw "+" or "-")
if ($entry->isOpened())
@@ -437,7 +437,7 @@ class HTMLTree extends Tree {
printf('<td class="icon"><a href="%s" id="node_%s_%s"><img src="%s/%s" alt="img" /></a></td>',
$href['edit'],$server->getIndex(),preg_replace('/=/','_',base64_encode($item)),IMGDIR,$entry->getIcon());
printf('<td class="phplm" width=100%% colspan="%s"><span style="white-space: nowrap;">',$this->getDepth()+3-$level);
printf('<td class="phplm" colspan="%s" style="width: 100%%;"><span style="white-space: nowrap;">',$this->getDepth()+3-$level);
printf('<a href="%s">%s</a>',$href['edit'],$this->get_formatted_dn($entry,$level));
if ($child_count)
@@ -493,7 +493,7 @@ class HTMLTree extends Tree {
$href = htmlspecialchars(sprintf('cmd.php?cmd=template_engine&server_id=%s&container=%s',$this->getServerID(),$encoded_dn));
echo '<tr>';
printf('<td class="spacer" colspan=%s></td>',$level+3);
printf('<td class="spacer" colspan="%s"></td>',$level+3);
printf('<td class="icon"><a href="%s"><img src="%s/create.png" alt="%s" /></a></td>',$href,IMGDIR,_('new'));
printf('<td class="link" colspan="%s"><a href="%s" title="%s %s">%s</a></td>',
$this->getDepth()+3-$level,$href,_('Create a new entry in'),$rdn,_('Create new entry here'));
@@ -525,8 +525,8 @@ class HTMLTree extends Tree {
echo '</tr>';
printf('<tr><td class="blank" colspan="%s">&nbsp;</td>',$this->getDepth()+3);
printf('<tr><td class="blank" colspan="%s">&nbsp;</td>',$this->getDepth()+3);
printf('<tr><td class="blank" colspan="%s">&nbsp;</td></tr>',$this->getDepth()+3);
printf('<tr><td class="blank" colspan="%s">&nbsp;</td></tr>',$this->getDepth()+3);
}
/**

View File

@@ -25,8 +25,8 @@ class MassRender extends TemplateRender {
$j,htmlspecialchars($attribute->getName()),$i,
$j,htmlspecialchars($attribute->getName()),$i,
htmlspecialchars($val),
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');

View File

@@ -558,7 +558,7 @@ class PageRender extends Visitor {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
if (DEBUGTMPSUB) printf(' <small>[%s]</small>',__METHOD__);
echo $attribute->getValue($i);
echo htmlspecialchars($attribute->getValue($i));
}
/**
@@ -588,7 +588,7 @@ class PageRender extends Visitor {
$val = $attribute->getValue($i);
printf('<input type="text" class="roval" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" readonly />',
printf('<input type="text" class="roval" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" readonly="readonly" />',
htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()),$i,htmlspecialchars($val));
}
@@ -598,14 +598,14 @@ class PageRender extends Visitor {
$val = $attribute->getValue($i);
if ($attribute->getHelper() || $attribute->getVerify())
echo '<table cellspacing="0" cellpadding="0" border=1><tr><td valign="top">';
echo '<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top">';
printf('<input type="text" class="value" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" %s%s %s %s/>',
htmlspecialchars($attribute->getName()),$i,
htmlspecialchars($attribute->getName()),$i,
htmlspecialchars($val),
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
@@ -689,8 +689,8 @@ class PageRender extends Visitor {
printf('<input type="file" class="value" name="new_values[%s][%s]" id="new_values_%s_%s" value="" %s%s %s %s/><br />',
htmlspecialchars($attribute->getName()),$i,
htmlspecialchars($attribute->getName()),$i,
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '',
($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : '');
}
@@ -705,8 +705,8 @@ class PageRender extends Visitor {
printf('<input type="text" class="value" id="new_values_%s_%s" name="new_values[%s][%s]" value="%s" %s%s %s %s/>&nbsp;',
$attribute->getName(),$i,
htmlspecialchars($attribute->getName()),$i,htmlspecialchars($val),
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
@@ -727,13 +727,13 @@ class PageRender extends Visitor {
printf('<span style="white-space: nowrap;"><input type="text" class="value" name="%s" id="%s" value="%s" %s%s %s %s/>&nbsp;',
$input_name,$id,htmlspecialchars($val),
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '',
($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : '');
# Draw a link for popping up the entry browser if this is the type of attribute that houses DNs.
draw_chooser_link(sprintf('entry_form.%s',$id),false);
draw_chooser_link('entry_form',$id,false);
echo '</span>';
if ($attribute->getHelper()) {
@@ -837,9 +837,9 @@ class PageRender extends Visitor {
$val = $attribute->getValue($i);
printf('<textarea class="roval" %s %s name="new_values[%s][%s]" id="new_values_%s_%s" readonly>%s</textarea>',
($attribute->getRows() > 0) ? 'rows="'.$attribute->getRows().'"' : '',
($attribute->getCols() > 0) ? 'cols="'.$attribute->getCols().'"' : '',
printf('<textarea class="roval" rows="%s" cols="%s" name="new_values[%s][%s]" id="new_values_%s_%s" readonly="readonly">%s</textarea>',
($attribute->getRows() > 0) ? $attribute->getRows() : 5,
($attribute->getCols() > 0) ? $attribute->getCols() : 100,
htmlspecialchars($attribute->getName()),$i,
htmlspecialchars($attribute->getName()),$i,
$val);
@@ -850,13 +850,13 @@ class PageRender extends Visitor {
$val = $attribute->getValue($i);
printf('<textarea class="value" %s %s name="new_values[%s][%s]" id="new_values_%s_%s" %s%s>%s</textarea>',
($attribute->getRows() > 0) ? 'rows="'.$attribute->getRows().'"' : '',
($attribute->getCols() > 0) ? 'cols="'.$attribute->getCols().'"' : '',
printf('<textarea class="value" rows="%s" cols="%s" name="new_values[%s][%s]" id="new_values_%s_%s" %s%s>%s</textarea>',
($attribute->getRows() > 0) ? $attribute->getRows() : 5,
($attribute->getCols() > 0) ? $attribute->getCols() : 100,
htmlspecialchars($attribute->getName()),$i,
htmlspecialchars($attribute->getName()),$i,
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
$val);
}
@@ -937,7 +937,7 @@ class PageRender extends Visitor {
$obfuscate_password = obfuscate_password_display($enc_type);
printf('<input type="%s" class="roval" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" %s readonly /><br />',
printf('<input type="%s" class="roval" name="new_values[%s][%s]" id="new_values_%s_%s" value="%s" %s readonly="readonly" /><br />',
($obfuscate_password ? 'password' : 'text'),
htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()),
$i,htmlspecialchars($val),($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '');
@@ -969,8 +969,8 @@ class PageRender extends Visitor {
($obfuscate_password ? 'password' : 'text'),
htmlspecialchars($attribute->getName()),$i,$id,
htmlspecialchars($val),
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '',
($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : '');
@@ -1016,24 +1016,24 @@ class PageRender extends Visitor {
if (($attribute->getSize() > 0) && ($attribute->getSize() < $attribute->getOptionCount())) {
printf('<select name="new_values[%s][]" size="%s" multiple>',
printf('<select name="new_values[%s][]" size="%s" multiple="multiple">',
htmlspecialchars($attribute->getName()),$attribute->getSize());
foreach ($attribute->getSelection() as $value => $description) {
if (in_array($value,$vals))
$selected[$value] = true;
printf('<option id="new_values_%s_%s" value="%s" onMouseDown="focus_%s(this);" onClick="blur_%s(this);" %s>%s</option>',
printf('<option id="new_values_%s_%s" value="%s" onmouseDown="focus_%s(this);" onclick="blur_%s(this);" %s>%s</option>',
htmlspecialchars($attribute->getName()),$j++,
$value,htmlspecialchars($attribute->getName()),htmlspecialchars($attribute->getName()),
isset($selected[$value]) ? 'selected' : '',$description);
isset($selected[$value]) ? 'selected="selected"' : '',$description);
echo "\n";
}
foreach ($vals as $val) {
if (! isset($selected[$val]))
printf('<option id="new_values_%s_%s" value="%s" onMouseDown="focus_%s(this);" onClick="blur_%s(this);" selected>%s</option>',
printf('<option id="new_values_%s_%s" value="%s" onmousedown="focus_%s(this);" onclick="blur_%s(this);" selected="selected">%s</option>',
htmlspecialchars($attribute->getName()),$j++,
$val,htmlspecialchars($attribute->getName()),
htmlspecialchars($attribute->getName()),$val);
@@ -1044,7 +1044,7 @@ class PageRender extends Visitor {
echo '</select>';
} else {
echo '<table cellspacing="0" cellpadding="0" border=0>';
echo '<table cellspacing="0" cellpadding="0" border="0">';
foreach ($attribute->getSelection() as $value => $description) {
if (in_array($value,$vals))
@@ -1053,19 +1053,19 @@ class PageRender extends Visitor {
printf('<tr><td><input type="checkbox" id="new_values_%s_%s" name="new_values[%s][]" value="%s" %s%s %s/></td><td><span style="white-space: nowrap;">&nbsp;%s</span></td></tr>',
htmlspecialchars($attribute->getName()),$j++,
htmlspecialchars($attribute->getName()),$value,
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
isset($selected[$value]) ? 'checked' : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
isset($selected[$value]) ? 'checked="checked"' : '',
$description);
}
foreach ($vals as $val)
if (! isset($selected[$val]))
printf('<tr><td><input type="checkbox" id="new_values_%s_%s" name="new_values[%s][]" value="%s" %s%s checked/></td><td><span style="white-space: nowrap;">&nbsp;%s</span></td></tr>',
printf('<tr><td><input type="checkbox" id="new_values_%s_%s" name="new_values[%s][]" value="%s" %s%s checked="checked"/></td><td><span style="white-space: nowrap;">&nbsp;%s</span></td></tr>',
htmlspecialchars($attribute->getName()),$j++,
htmlspecialchars($attribute->getName()),$val,
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '',
$val);
echo '</table>';
@@ -1091,12 +1091,12 @@ class PageRender extends Visitor {
printf('<select name="new_values[%s][]" id="new_values_%s_%s" %s%s>',
htmlspecialchars($attribute->getName()),
htmlspecialchars($attribute->getName()),$i,
$attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '');
$attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '',
$attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '');
foreach ($attribute->getSelection() as $value => $description) {
printf('<option value="%s" %s>%s</option>',$value,
($value == $val) ? 'selected' : '',$description);
($value == $val) ? 'selected="selected"' : '',$description);
if ($value == $val)
$found = true;
@@ -1108,7 +1108,7 @@ class PageRender extends Visitor {
}
if (!$found) {
printf('<option value="%s" selected>%s</option>',$val,$val == '' ? '&nbsp;' : $val);
printf('<option value="%s" selected="selected">%s</option>',$val,$val == '' ? '&nbsp;' : $val);
if ($val == '')
$empty_value = true;
echo "\n";

View File

@@ -79,14 +79,15 @@ class QueryRender extends PageRender {
$baseDNs = $server->getBaseDN();
echo '<center>';
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
echo '<form action="cmd.php" name="advanced_search_form">';
printf('<script type="text/javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
echo '<form action="cmd.php" id="advanced_search_form">';
echo '<div>';
echo '<input type="hidden" name="cmd" value="query_engine" />';
printf('<input type="hidden" name="server_id" value="%s" />',$server->getIndex());
echo '</div>';
echo '<table class="forminput" border=0>';
echo '<tr><td colspan=2>&nbsp;</td></tr>';
echo '<table class="forminput" border="0" style="margin-left: auto; margin-right: auto;">';
echo '<tr><td colspan="2">&nbsp;</td></tr>';
$templates = $this->getTemplates();
@@ -101,21 +102,22 @@ class QueryRender extends PageRender {
foreach ($templates->getTemplates() as $template)
printf('<option value="%s" %s>%s</option>',
$template->getID(),
($this->template_id == $template->getID() ? 'selected' : ''),
($this->template_id == $template->getID() ? 'selected="selected"' : ''),
$template->getDescription());
echo '</select>';
echo '</td>';
echo '</tr>';
}
echo '<tr>';
printf('<td><acronym title="%s">%s</acronym></td>',_('The format to show the query results'),_('Display Format'));
echo '<td>';
echo '<select name="format" style="width: 200px">';
printf('<option value="list" %s>%s</option>',
$_SESSION[APPCONFIG]->getValue('search','display') == 'list' ? 'selected' : '',_('list'));
$_SESSION[APPCONFIG]->getValue('search','display') == 'list' ? 'selected="selected"' : '',_('list'));
printf('<option value="table" %s>%s</option>',
$_SESSION[APPCONFIG]->getValue('search','display') == 'table' ? 'selected' : '',_('table'));
$_SESSION[APPCONFIG]->getValue('search','display') == 'table' ? 'selected="selected"' : '',_('table'));
echo '</select>';
echo '</td>';
@@ -135,17 +137,17 @@ class QueryRender extends PageRender {
echo '<tr>';
echo '<td colspan=2>';
echo '<td colspan="2">';
printf('<div id="customquery" style="display: %s">','block');
echo '<br/>';
echo '<fieldset>';
printf('<legend>%s</legend>',_('Custom Query'));
echo '<table border=0></tr>';
echo '<table border="0"><tr>';
printf('<td>%s</td>',_('Base DN'));
printf('<td><input type="text" name="base" value="%s" style="width: 200px" id="base" />',count($baseDNs) == 1 ? $baseDNs[0] : '');
draw_chooser_link('advanced_search_form.base');
draw_chooser_link('advanced_search_form','base');
echo '</td>';
echo '</tr>';
@@ -202,11 +204,10 @@ class QueryRender extends PageRender {
echo '</td>';
echo '</tr>';
printf('<tr><td colspan="2"><br /><center><input type="submit" name="search" value="%s" /></center></td></tr>',_('Search'));
printf('<tr><td colspan="2" style="text-align: center;"><br /><input type="submit" name="search" value="%s" /></td></tr>',_('Search'));
echo '</table>';
echo '</form>';
echo '</center>';
}
private function visitStart() {
@@ -248,7 +249,7 @@ class QueryRender extends PageRender {
printf('<div id="DN%s" style="display: %s">',
$this->getAjaxRef($base), ($show == $this->getAjaxRef($base) ? 'block' : 'none'));
echo '<table class="result_box" border=0 width=100%>';
echo '<table class="result_box" border="0" width="100%">';
echo '<tr><td>';
echo '<br/>';
echo '<br/>';
@@ -266,12 +267,12 @@ class QueryRender extends PageRender {
# Temporarily set our DN, for rendering that leverages our DN (eg: JpegPhoto)
$this->template->setDN($dndetails['dn']);
echo '<table class="result" border=0>';
echo '<table class="result" border="0">';
echo '<tr class="list_title">';
printf('<td class="icon"><img src="%s/%s" alt="icon" /></td>',IMGDIR,get_icon($server->getIndex(),$dndetails['dn']));
printf('<td colspan=2><a href="cmd.php?cmd=template_engine&amp;server_id=%s&amp;dn=%s">%s</a></td>',
printf('<td colspan="2"><a href="cmd.php?cmd=template_engine&amp;server_id=%s&amp;dn=%s">%s</a></td>',
$server->getIndex(),rawurlencode(dn_unescape($dndetails['dn'])),htmlspecialchars(get_rdn($dndetails['dn'])));
echo '</tr>';
@@ -323,12 +324,15 @@ class QueryRender extends PageRender {
}
printf('<form action="cmd.php" method="post" id="massform_%s">',$counter);
echo '<div>';
printf('<input type="hidden" name="server_id" value="%s" />',$server->getIndex());
foreach ($this->template->resultsdata[$base]['attrs'] as $attr)
printf('<input type="hidden" name="attrs[]" value="%s" />',$attr);
echo '<table class="result_table" border=0>';
echo '</div>';
echo '<table class="result_table" border="0">';
echo '<thead class="fixheader">';
echo '<tr class="heading">';
@@ -352,7 +356,7 @@ class QueryRender extends PageRender {
# Temporarily set our DN, for rendering that leverages our DN (eg: JpegPhoto)
$this->template->setDN($dndetails['dn']);
printf('<tr class="%s" id="tr_ma_%s" onClick="var cb=document.getElementById(\'ma_%s\'); cb.checked=!cb.checked;">',
printf('<tr class="%s" id="tr_ma_%s" onclick="var cb=document.getElementById(\'ma_%s\'); cb.checked=!cb.checked;">',
$j%2 ? 'even' : 'odd',$j,$j);
# Is mass action enabled.
@@ -401,8 +405,8 @@ class QueryRender extends PageRender {
if ($_SESSION[APPCONFIG]->getValue('mass','enabled')) {
printf('<tr class="%s">',++$j%2 ? 'odd' : 'even');
printf('<td><input type="checkbox" name="allbox" value="1" onclick="CheckAll(1,\'massform_\',%s);" /></td>',$counter);
printf('<td colspan=%s>',2+count(explode(',',$ado)));
echo '<select name="cmd" onChange="if (this.value) submit();" style="font-size: 12px">';
printf('<td colspan="%s">',2+count(explode(',',$ado)));
echo '<select name="cmd" onchange="if (this.value) submit();" style="font-size: 12px">';
foreach ($mass_actions as $action => $display)
printf('<option value="%s">%s</option>',$display,$action);
@@ -430,7 +434,7 @@ class QueryRender extends PageRender {
}
if (get_request('format','REQUEST',false,'table') == 'table')
printf('<script type="text/javascript" language="javascript" src="%sCheckAll.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sCheckAll.js"></script>',JSDIR);
}
public function drawSubTitle($subtitle=null) {
@@ -472,7 +476,7 @@ class QueryRender extends PageRender {
private function drawBaseTabs() {
# Setup the Javascript to show/hide our DIVs.
echo '<script type="text/javascript" language="javascript">';
echo '<script type="text/javascript">';
echo 'function items() {';
echo 'var $items = new Array();';
$counter = 0;
@@ -482,7 +486,7 @@ class QueryRender extends PageRender {
echo '}</script>';
echo "\n\n";
echo '<table class="result_table" border=0>';
echo '<table class="result_table" border="0">';
echo '<tr>';
$counter = 0;
foreach ($this->template->results as $base => $results) {
@@ -503,7 +507,7 @@ class QueryRender extends PageRender {
private function drawResultsTable($base,$results) {
$server = $this->getServer();
echo '<table class="result" border=0>';
echo '<table class="result" border="0">';
echo '<tr>';
printf('<td>%s: <b>%s</b><br/><br/><div class="execution_time">(%s %s)</div></td>',_('Entries found'),

View File

@@ -498,17 +498,21 @@ class TemplateRender extends PageRender {
$avail_templates = $this->getTemplates();
$templates = $avail_templates->getTemplates($this->getMode(),$this->getModeContainer());
printf('<center><h3>%s</h3></center>',$msg);
printf('<h3 style="text-align: center;">%s</h3>',$msg);
$href_parms = array_to_query_string($_GET,array('meth'));
printf('<form name="template_choice_form" action="cmd.php?%s" method="post">',htmlspecialchars($href_parms));
printf('<form id="template_choice_form" action="cmd.php?%s" method="post">',htmlspecialchars($href_parms));
echo "\n\n";
foreach ($_POST as $p => $v)
printf('<input type="hidden" name="%s" value="%s">',$p,$v);
echo "\n\n";
if (count($_POST)) {
echo '<div>';
foreach ($_POST as $p => $v)
printf('<input type="hidden" name="%s" value="%s" />',$p,$v);
echo '</div>';
echo "\n\n";
}
echo '<table class="forminput" width="100%" border=0>';
echo '<table class="forminput" width="100%" border="0">';
echo '<tr>';
printf('<td class="heading" style="vertical-align: top">%s:</td>',_('Templates'));
echo '<td>';
@@ -542,7 +546,7 @@ class TemplateRender extends PageRender {
printf('<td><input type="radio" name="template" value="%s" id="%s" onclick="return ajDISPLAY(\'BODY\',\'%s&amp;template=%s\',\'%s\');" /></td>',
htmlspecialchars($details->getID()),htmlspecialchars($details->getID()),htmlspecialchars($href_parms),$details->getID(),_('Retrieving DN'));
else
printf('<td><input type="radio" name="template" value="%s" id="%s" onclick="document.forms.template_choice_form.submit()" /></td>',
printf('<td><input type="radio" name="template" value="%s" id="%s" onclick="document.getElementById(\'template_choice_form\').submit()" /></td>',
htmlspecialchars($details->getID()),htmlspecialchars($details->getID()));
}
@@ -552,7 +556,7 @@ class TemplateRender extends PageRender {
htmlspecialchars($details->getID()));
if ($isInValid)
printf('<span style="color: gray"><acronym title="%s">',_($isInValid));
printf('<span id="%s" style="color: gray"><acronym title="%s">',htmlspecialchars($details->getID()),_($isInValid));
echo _($details->getTitle());
@@ -579,7 +583,7 @@ class TemplateRender extends PageRender {
printf('<td><input type="radio" name="template" value="none" id="none" onclick="return ajDISPLAY(\'BODY\',\'%s&amp;template=%s\',\'%s\');" /></td>',
htmlspecialchars($href_parms),'none',_('Retrieving DN'));
else
echo '<td><input type="radio" name="template" value="none" id="none" onclick="document.forms.template_choice_form.submit()" /></td>';
echo '<td><input type="radio" name="template" value="none" id="none" onclick="document.getElementById(\'template_choice_form\').submit()" /></td>';
printf('<td class="icon"><label for="none"><img src="%s/ldap-default.png" alt="" /></label></td>',IMGDIR);
printf('<td class="label"><label for="none">%s</label></td>',_('Default'));
@@ -640,7 +644,7 @@ class TemplateRender extends PageRender {
} else {
# Draw internal attributes
if (get_request('show_internal_attrs','REQUEST')) {
echo '<table class="entry" cellspacing="0" align="center" border=0>';
echo '<table class="entry" cellspacing="0" border="0" style="margin-left: auto; margin-right: auto;">';
$this->drawInternalAttributes();
echo '</table><br/>';
echo "\n";
@@ -700,7 +704,7 @@ class TemplateRender extends PageRender {
case 'creation':
$subtitle = sprintf('%s: <b>%s</b>&nbsp;&nbsp;&nbsp;%s: <b>%s</b>',
_('Server'),$this->getServer()->getName(),
_('Container'),$this->container);
_('Container'),htmlspecialchars($this->container));
if ($this->template_id) {
$subtitle .= '<br />';
@@ -714,7 +718,7 @@ class TemplateRender extends PageRender {
case 'modification':
$subtitle = sprintf('%s: <b>%s</b>&nbsp;&nbsp;&nbsp;%s: <b>%s</b>',
_('Server'),$this->getServer()->getName(),
_('Distinguished Name'),$this->dn);
_('Distinguished Name'),htmlspecialchars($this->dn));
if ($this->template_id) {
$subtitle .= '<br />';
@@ -737,7 +741,7 @@ class TemplateRender extends PageRender {
# We only have a menu for editing entries.
if ($this->template->getContext() == 'edit') {
echo '<table class="menu" width="100%" border=0>';
echo '<table class="menu" width="100%" border="0">';
echo '<tr>';
$menuitem_number = 0;
@@ -767,7 +771,7 @@ class TemplateRender extends PageRender {
if ($ms) {
if (($menuitem_number % 2) == 1) {
$menuitem_number++;
echo '<td colspan=2>&nbsp;</td>';
echo '<td colspan="2">&nbsp;</td>';
$endofrow = false;
$start = false;
}
@@ -792,7 +796,7 @@ class TemplateRender extends PageRender {
} elseif ($ms) {
if (($menuitem_number % 2) == 1) {
$menuitem_number++;
echo '<td colspan=2>&nbsp;</td>';
echo '<td colspan="2">&nbsp;</td>';
$endofrow = false;
$start = false;
}
@@ -1249,7 +1253,7 @@ class TemplateRender extends PageRender {
if (! count($this->template->getRDNAttrs())) {
printf('<tr><th colspan="2">%s</th></tr>','RDN');
echo '<tr><td class="value" colspan="2"><center><select name="rdn_attribute[]" id="rdn_attribute">';
echo '<tr><td class="value" colspan="2" style="text-align: center;"><select name="rdn_attribute[]" id="rdn_attribute" />';
printf('<option value="">%s</option>',_('select the rdn attribute'));
if ($_SESSION[APPCONFIG]->getValue('appearance','rdn_all_attrs'))
@@ -1267,7 +1271,7 @@ class TemplateRender extends PageRender {
}
}
echo '</select></center></td></tr>';
echo '</select></td></tr>';
} else {
echo '<tr><td colspan="2">';
@@ -1286,7 +1290,7 @@ class TemplateRender extends PageRender {
echo '<tr>';
printf('<td class="heading">%s</td>',_('Container'));
printf('<td><input type="text" name="container" size="40" value="%s" />',htmlspecialchars($default_container));
draw_chooser_link('entry_form.container');
draw_chooser_link('entry_form','container');
echo '</td>';
echo '</tr>';
}
@@ -1303,7 +1307,7 @@ class TemplateRender extends PageRender {
echo '<tr>';
printf('<td class="heading">%s</td>',_('ObjectClasses'));
echo '<td><select name="new_values[objectclass][]" multiple="true" size="15">';
echo '<td><select name="new_values[objectclass][]" multiple="multiple" size="15">';
foreach ($socs as $name => $oclass) {
if (! strcasecmp('top',$name))
@@ -1346,29 +1350,35 @@ class TemplateRender extends PageRender {
/** FORM METHODS **/
public function drawFormStart() {
echo '<form action="cmd.php" method="post" enctype="multipart/form-data" name="entry_form" onSubmit="return submitForm(this)">';
echo '<form action="cmd.php" method="post" enctype="multipart/form-data" id="entry_form" onsubmit="return submitForm(this)">';
echo '<div>';
if ($_SESSION[APPCONFIG]->getValue('confirm','update'))
echo '<input type="hidden" name="cmd" value="update_confirm" />';
else
echo '<input type="hidden" name="cmd" value="update" />';
echo '</div>';
}
protected function drawForm() {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
echo '<div>';
printf('<input type="hidden" name="server_id" value="%s" />',$this->getServerID());
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($this->template->getDN()));
printf('<input type="hidden" name="template" value="%s" />',$this->template->getID());
echo '</div>';
echo '<table class="entry" cellspacing="0" align="center" border=0>';
echo '<table class="entry" cellspacing="0" border="0" style="margin-left: auto; margin-right: auto;">';
$this->drawShownAttributes();
$this->drawFormSubmitButton();
echo '</table>';
echo '<div>&nbsp;';
$this->drawHiddenAttributes();
echo '</div>';
}
public function drawFormEnd() {
@@ -1382,11 +1392,11 @@ class TemplateRender extends PageRender {
# For debugging, show the template object.
if (! $_SESSION[APPCONFIG]->getValue('appearance','hide_debug_info') && get_request('debug','GET')) {
echo "\n\n";
printf('<img src="%s/plus.png" alt="Plus" onClick="if (document.getElementById(\'DEBUGtemplate\').style.display == \'none\') { document.getElementById(\'DEBUGtemplate\').style.display = \'block\' } else { document.getElementById(\'DEBUGtemplate\').style.display = \'none\' };"/>',IMGDIR);
printf('<img src="%s/plus.png" alt="Plus" onclick="if (document.getElementById(\'DEBUGtemplate\').style.display == \'none\') { document.getElementById(\'DEBUGtemplate\').style.display = \'block\' } else { document.getElementById(\'DEBUGtemplate\').style.display = \'none\' };"/>',IMGDIR);
echo '<div id="DEBUGtemplate" style="display: none">';
echo '<fieldset>';
printf('<legend>DEBUG: %s</legend>',$this->template->getDescription());
echo '<textarea cols=120 rows=20>';
echo '<textarea cols="120" rows="20">';
debug_dump($this);
echo '</textarea>';
echo '</fieldset>';
@@ -1398,7 +1408,7 @@ class TemplateRender extends PageRender {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
if (! $this->template->isReadOnly())
printf('<tr><td colspan=2><center><input type="submit" id="create_button" name="submit" value="%s" /></center></td></tr>',_('Update Object'));
printf('<tr><td colspan="2" style="text-align: center;"><input type="submit" id="create_button" name="submit" value="%s" /></td></tr>',_('Update Object'));
}
/** STEP FORM METHODS **/
@@ -1412,7 +1422,7 @@ class TemplateRender extends PageRender {
# The default template only uses 2 pages
$this->pagelast = 2;
echo '<center><h4>';
echo '<h4 style="text-align: center;">';
printf('%s: ',sprintf(_('Step %s of %s'),$page,$this->pagelast));
if ($page == 1)
@@ -1420,10 +1430,10 @@ class TemplateRender extends PageRender {
else
echo _('Specify attributes and values');
echo '</h4></center>';
echo '</h4>';
} elseif ($this->template->getDescription())
printf('<center><h4>%s (%s)</h4></center>',
printf('<h4 style="text-align: center;">%s (%s)</h4>',
_($this->template->getDescription()),
sprintf(_('Step %s of %s'),$page,$this->pagelast));
}
@@ -1432,10 +1442,11 @@ class TemplateRender extends PageRender {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
if (($this->template->isType('default') && $this->template->getContext() == 'create' && $page == 1) || $page < $this->pagelast) {
echo '<form action="cmd.php?cmd=template_engine" method="post" enctype="multipart/form-data" name="entry_form" onSubmit="return submitForm(this)">';
echo '<form action="cmd.php?cmd=template_engine" method="post" enctype="multipart/form-data" id="entry_form" onsubmit="return submitForm(this)">';
} else {
echo '<form action="cmd.php" method="post" enctype="multipart/form-data" name="entry_form" onSubmit="return submitForm(this)">';
echo '<form action="cmd.php" method="post" enctype="multipart/form-data" id="entry_form" onsubmit="return submitForm(this)">';
echo '<div>';
if ($_SESSION[APPCONFIG]->getValue('confirm','create'))
echo '<input type="hidden" name="cmd" value="create_confirm" />';
@@ -1454,15 +1465,18 @@ class TemplateRender extends PageRender {
$this->drawHiddenAttributes();
if ($this->template->isType('default') && $page == 1) {
echo '<table class="forminput" align="center" border=0>';
echo '</div>';
echo '<table class="forminput" border="0" style="margin-left: auto; margin-right: auto;">';
$this->drawContainerChooser($this->template->getContainer());
$this->drawObjectClassChooser();
} else {
printf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($this->template->getContainer()));
echo '</div>';
echo '<table class="entry" cellspacing="0" align="center" border=0>';
echo '<table class="entry" cellspacing="0" border="0" style="margin-left: auto; margin-right: auto;">';
$this->drawRDNChooser();
@@ -1490,7 +1504,7 @@ class TemplateRender extends PageRender {
if ($page < $this->pagelast)
printf('<td>&nbsp;</td><td><input type="submit" id="create_button" value="%s" /></td>',_('Proceed &gt;&gt;'));
else
printf('<td><center><input type="submit" id="create_button" name="submit" value="%s"/></center></td>',_('Create Object'));
printf('<td style="text-align: center;"><input type="submit" id="create_button" name="submit" value="%s" /></td>',_('Create Object'));
echo '</tr>';
}
@@ -1522,7 +1536,7 @@ class TemplateRender extends PageRender {
$this->draw('Template',$attribute);
else
printf('<tr class="noinput"><td colspan="2"><center>(%s)</center></td></tr>',_('none'));
printf('<tr class="noinput"><td colspan="2" style="text-align: center;">(%s)</td></tr>',_('none'));
printf('<tr><th colspan="2">%s</th></tr>',_('Optional Attributes'));
if (count($attrs['optional']))
@@ -1530,7 +1544,7 @@ class TemplateRender extends PageRender {
$this->draw('Template',$attribute);
else
printf('<tr class="noinput"><td colspan="2"><center>(%s)</center></td></tr>',_('none'));
printf('<tr class="noinput"><td colspan="2" style="text-align: center;">(%s)</td></tr>',_('none'));
echo "\n";
}
@@ -1556,14 +1570,14 @@ class TemplateRender extends PageRender {
printf('<!-- START: %s -->',__METHOD__);
echo "\n";
printf('<script type="text/javascript" language="javascript" src="%sTemplateRender.js"></script>',JSDIR);
printf('<script type="text/javascript" language="javascript" src="%stoAscii.js"></script>',JSDIR);
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sTemplateRender.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%stoAscii.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
echo "\n";
printf('<!-- START: MAIN FORM VALIDATION: %s -->',__METHOD__);
echo '
<script type="text/javascript" language="javascript">
<script type="text/javascript">
function validateForm(silence) {
var i = 0;
var valid = true;
@@ -1598,7 +1612,7 @@ function validateForm(silence) {
# For DateAttributes, we need to set some defaults for the js_calendar.
echo '<!-- START: GLOBAL SETTINGS FOR THE js_calendar -->'."\n";
echo '<script type="text/javascript" language="javascript">'."\n";
echo '<script type="text/javascript">'."\n";
echo 'var defaults = new Array();'."\n";
printf('var default_date_format = "%s";',$_SESSION[APPCONFIG]->getValue('appearance','date'));
echo "\n";
@@ -1609,7 +1623,7 @@ function validateForm(silence) {
foreach ($this->template->getAttributesShown() as $attribute)
$this->draw('Javascript',$attribute);
echo '<script type="text/javascript" language="javascript">validateForm(true);</script>'."\n";
echo '<script type="text/javascript">validateForm(true);</script>'."\n";
printf('<!-- END: %s -->',__METHOD__);
echo "\n";
}
@@ -1633,7 +1647,7 @@ function validateForm(silence) {
printf('<!-- START: %s -->',__METHOD__);
echo '
<script type="text/javascript" language="javascript">
<script type="text/javascript">
var attrTrace;
function fill(id,value) {
attrTrace = new Array();
@@ -1718,7 +1732,7 @@ function fillRec(id,value) {
else
echo '<tr>';
echo '<td class="value" colspan=2>';
echo '<td class="value" colspan="2">';
}
protected function drawEndValueLineAttribute($attribute) {
@@ -1784,7 +1798,7 @@ function fillRec(id,value) {
else {
if ($icon = $attribute->getIcon())
printf('<img src="%s" alt="Icon" align="top" />&nbsp;',$icon);
printf('<img src="%s" alt="Icon" style="float: right;" />&nbsp;',$icon);
}
}
@@ -1792,7 +1806,7 @@ function fillRec(id,value) {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
if (strlen($val) <= 0)
printf('<img src="%s/ldap-alias.png" alt="Go" align="top" />&nbsp;',IMGDIR);
printf('<img src="%s/ldap-alias.png" alt="Go" style="float: right;" />&nbsp;',IMGDIR);
elseif ($this->getServer()->dnExists($val))
printf('<a href="cmd.php?cmd=template_engine&amp;server_id=%s&amp;dn=%s" title="%s %s"><img src="%s/ldap-alias.png" alt="Go" /></a>&nbsp;',
$this->getServerID(),rawurlencode($val),_('Go to'),$val,IMGDIR);
@@ -1803,7 +1817,7 @@ function fillRec(id,value) {
protected function drawMailValueIconAttribute($attribute,$val) {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
$img = sprintf('<img src="%s/mail.png" alt="%s" align="top" />',IMGDIR,_('Mail'));
$img = sprintf('<img src="%s/mail.png" alt="%s" style="float: right;" />',IMGDIR,_('Mail'));
if (strlen($val) <= 0)
echo $img;
else
@@ -1814,13 +1828,13 @@ function fillRec(id,value) {
protected function drawUrlValueIconAttribute($attribute,$val) {
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
$img = sprintf('<img src="%s/ldap-dc.png" alt="%s" align="top" />',IMGDIR,_('URL'));
$img = sprintf('<img src="%s/ldap-dc.png" alt="%s" style="float: right;" />',IMGDIR,_('URL'));
$url = explode(' +',$val,2);
if (strlen($val) <= 0)
echo $img;
else
printf('<a href="%s" target="new">%s</a>',htmlspecialchars($url[0]),$img);
printf('<a href="%s" onclick="target=\'new\';">%s</a>',htmlspecialchars($url[0]),$img);
echo '&nbsp;';
}
@@ -1838,7 +1852,7 @@ function fillRec(id,value) {
printf('<!-- START: ATTRIBUTE %s (%s)-->',__METHOD__,$attribute->getName());
echo "\n";
echo '<script type="text/javascript" language="javascript">'."\n";
echo '<script type="text/javascript">'."\n";
echo '// focus'."\n";
if ($attribute->needJS('focus')) {
@@ -1936,7 +1950,7 @@ function fillRec(id,value) {
$item = '';
echo '<table class="entry" border=0><tr><td width=25>&nbsp;</td>';
echo '<table class="entry" border="0"><tr><td style="width: 25px;">&nbsp;</td>';
echo '<td>';
foreach (array('add','modify','rename') as $action)
if ($item = $this->get('MenuItem',$attribute,$action))
@@ -2048,7 +2062,7 @@ function fillRec(id,value) {
$val = $attribute->getValue($i);
if ($attribute->isVisible()) {
echo '<table cellspacing="0" cellpadding="0" width="100%" border=0><tr><td class="icon" width=25>';
echo '<table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td class="icon" style="width: 25px;">';
$this->draw('Icon',$attribute,$val);
echo '</td>';
@@ -2063,7 +2077,7 @@ function fillRec(id,value) {
if ($attribute->isVisible()) {
echo '</td>';
echo '<td valign="top" align="right">';
echo '<td valign="top" style="text-align: right;">';
$this->draw('RequiredSymbol',$attribute);
echo '</td></tr></table>';
}
@@ -2129,14 +2143,14 @@ function fillRec(id,value) {
$id,htmlspecialchars($attribute->getName()),$i);
foreach ($vals as $v) {
printf('<option value="%s" %s>%s</option>',$v,($v == $default) ? 'selected' : '',$v);
printf('<option value="%s" %s>%s</option>',$v,($v == $default) ? 'selected="selected"' : '',$v);
if ($v == $default)
$found = true;
}
if (! $found)
printf('<option value="%s" selected>%s</option>',$default,$default ? $default : '&nbsp;');
printf('<option value="%s" selected="selected">%s</option>',$default,$default ? $default : '&nbsp;');
echo '</select>';
@@ -2185,7 +2199,7 @@ function fillRec(id,value) {
echo "\n";
echo '<!-- This form is submitted by JavaScript when the user clicks "Delete attribute" on a binary attribute -->';
echo '<form name="delete_attribute_form" action="cmd.php?cmd=delete_attr" method="post">';
echo '<form id="delete_attribute_form" action="cmd.php?cmd=delete_attr" method="post">';
printf('<input type="hidden" name="server_id" value="%s" />',$this->getServerID());
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($this->template->getDN()));
printf('<input type="hidden" name="template" value="%s" />',$this->template->getID());
@@ -2194,13 +2208,13 @@ function fillRec(id,value) {
echo '</form>';
echo '
<script type="text/javascript" language="javascript">
<script type="text/javascript">
function deleteAttribute(attrName,friendlyName,i)
{
if (confirm("'._('Really delete value from attribute').' \'" + friendlyName + "\'?")) {
document.delete_attribute_form.attr.value = attrName;
document.delete_attribute_form.index.value = i;
document.delete_attribute_form.submit();
document.getElementById(\'delete_attribute_form\'.attr.value = attrName;
document.getElementById(\'delete_attribute_form\'.index.value = i;
document.getElementById(\'delete_attribute_form\'.submit();
}
}
</script>';
@@ -2224,9 +2238,9 @@ function deleteAttribute(attrName,friendlyName,i)
# This JS may have been rendered by multiple Date attributes
if (! $drawn) {
printf('<script type="text/javascript" language="javascript" src="%sjscalendar/lang/calendar-en.js"></script>',JSDIR);
printf('<script type="text/javascript" language="javascript" src="%sjscalendar/calendar-setup.js"></script>',JSDIR);
printf('<script type="text/javascript" language="javascript" src="%sdate_selector.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sjscalendar/lang/calendar-en.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sjscalendar/calendar-setup.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sdate_selector.js"></script>',JSDIR);
$drawn = true;
}
@@ -2240,10 +2254,10 @@ function deleteAttribute(attrName,friendlyName,i)
$config['format'] = $config['date'][$attribute->getName()];
for ($i=0;$i<=$attribute->getValueCount();$i++) {
printf('<script type="text/javascript" language="javascript">defaults[\'new_values_%s_%s\'] = \'%s\';</script>',$attribute->getName(),$i,$config['format']);
printf('<script type="text/javascript">defaults[\'new_values_%s_%s\'] = \'%s\';</script>',$attribute->getName(),$i,$config['format']);
if (in_array_ignore_case($attribute->getName(),array_keys($config['time'])) && ($config['time'][$attribute->getName()]))
printf('<script type="text/javascript" language="javascript">defaults[\'f_time_%s_%s\'] = \'%s\';</script>',$attribute->getName(),$i,'true');
printf('<script type="text/javascript">defaults[\'f_time_%s_%s\'] = \'%s\';</script>',$attribute->getName(),$i,'true');
echo "\n";
}
@@ -2256,7 +2270,7 @@ function deleteAttribute(attrName,friendlyName,i)
* Draws an HTML date selector button which, when clicked, pops up a date selector dialog.
*/
protected function drawSelectorPopupDateAttribute($attribute,$i) {
printf('<a href="javascript:dateSelector(\'%s_%s\');" title="%s"><img class="chooser" src="%s/calendar.png" id="f_trigger_%s_%s" style="cursor: pointer;" alt="Calendar" /></a>',
printf('<a href="javascript:dateSelector(\'%s_%s\');" title="%s"><img src="%s/calendar.png" alt="Calendar" class="chooser" id="f_trigger_%s_%s" style="cursor: pointer;" /></a>',
$attribute->getName(),$i,_('Click to popup a dialog to select a date graphically'),IMGDIR,$attribute->getName(),$i);
}
@@ -2299,7 +2313,7 @@ function deleteAttribute(attrName,friendlyName,i)
# Add the javascript so we can call check password later.
echo '
<script type="text/javascript" language="javascript">
<script type="text/javascript">
function passwordComparePopup(component_id) {
mywindow = open(\'password_checker.php\',\'myname\',\'resizable=no,width=500,height=200,scrollbars=1\');
mywindow.location.href = \'password_checker.php?componentid=\'+component_id;
@@ -2337,7 +2351,7 @@ function deleteAttribute(attrName,friendlyName,i)
$pwd = str_replace("'","\\'",$pwd);
printf("\n<!-- %s -->\n",__METHOD__);
echo '<script type="text/javascript" language="javascript">'."\n";
echo '<script type="text/javascript">'."\n";
echo 'var i = 0;'."\n";
printf('var component = document.getElementById(\'new_values_%s_\'+i);',$attribute->getName());
echo "\n";
@@ -2368,14 +2382,14 @@ function deleteAttribute(attrName,friendlyName,i)
$default = $this->getServer()->getValue('appearance','password_hash');
if (! $attribute->getPostValue())
printf('<input type="hidden" name="post_value[%s][]" value="%s"/>',$attribute->getName(),$i);
printf('<input type="hidden" name="post_value[%s][]" value="%s" />',$attribute->getName(),$i);
printf('<select name="%s[%s][%s]" id="%s_%s_%s">',
$id,htmlspecialchars($attribute->getName()),$i,
$id,htmlspecialchars($attribute->getName()),$i);
foreach (password_types() as $v => $display)
printf('<option value="%s" %s>%s</option>',$v,($v == $default) ? 'selected' : '',$display);
printf('<option value="%s" %s>%s</option>',$v,($v == $default) ? 'selected="selected"' : '',$display);
echo '</select>';
}
@@ -2384,7 +2398,7 @@ function deleteAttribute(attrName,friendlyName,i)
$id = 'enc';
if (! $attribute->getPostValue())
printf('<input type="hidden" name="post_value[%s][]" value="%s"/>',$attribute->getName(),$i);
printf('<input type="hidden" name="post_value[%s][]" value="%s" />',$attribute->getName(),$i);
switch ($attribute->getName()) {
case 'sambalmpassword' : $enc = 'lm'; break;
@@ -2394,7 +2408,7 @@ function deleteAttribute(attrName,friendlyName,i)
return '';
}
printf('<input type="hidden" name="%s[%s][%s]" id="%s_%s_%s" value="%s">',
printf('<input type="hidden" name="%s[%s][%s]" id="%s_%s_%s" value="%s" />',
$id,htmlspecialchars($attribute->getName()),$i,
$id,htmlspecialchars($attribute->getName()),$i,$enc);
}

View File

@@ -167,7 +167,7 @@ function app_error_handler($errno,$errstr,$file,$lineno) {
$body .= sprintf('<tr><td>Web server:</td><td><b>%s</b></td></tr>',isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'SCRIPT');
if (function_exists('get_href'))
$body .= sprintf('<tr><td colspan="2"><a href="%s" target="_blank"><center>%s.</center></a></td></tr>',
$body .= sprintf('<tr><td colspan="2"><a href="%s" onclick="target=\'_blank\';"><center>%s.</center></a></td></tr>',
get_href('search_bug',"&summary_keyword=".rawurlencode($errstr)),
_('Please check and see if this bug has been reported'));
$body .= '</table>';
@@ -375,31 +375,31 @@ function cmd_control_pane($type) {
'forum'=>array(
'title'=>_('Forum'),
'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true,
'link'=>sprintf('href="%s" title="%s" target="_blank"',get_href('forum'),_('Forum')),
'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('forum'),_('Forum')),
'image'=>sprintf('<img src="%s/forum-big.png" alt="%s" />',IMGDIR,_('Forum'))),
'feature'=>array(
'title'=>_('Request feature'),
'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true,
'link'=>sprintf('href="%s" title="%s" target="_blank"',get_href('add_rfe'),_('Request feature')),
'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('add_rfe'),_('Request feature')),
'image'=>sprintf('<img src="%s/request-feature-big.png" alt="%s" />',IMGDIR,_('Request feature'))),
'bug'=>array(
'title'=>_('Report a bug'),
'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true,
'link'=>sprintf('href="%s" title="%s" target="_blank"',get_href('add_bug'),_('Report a bug')),
'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('add_bug'),_('Report a bug')),
'image'=>sprintf('<img src="%s/bug-big.png" alt="%s" />',IMGDIR,_('Report a bug'))),
'donation'=>array(
'title'=>_('Donate'),
'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true,
'link'=>sprintf('href="%s" title="%s" target="_blank"',get_href('donate'),_('Donate')),
'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('donate'),_('Donate')),
'image'=>sprintf('<img src="%s/smile-big.png" alt="%s" />',IMGDIR,_('Donate'))),
'help'=>array(
'title'=>_('Help'),
'enable'=>isset($_SESSION[APPCONFIG]) ? $_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks') : true,
'link'=>sprintf('href="%s" title="%s" target="_blank"',get_href('documentation'),_('Help')),
'link'=>sprintf('href="%s" title="%s" onclick="target=\'_blank\';"',get_href('documentation'),_('Help')),
'image'=>sprintf('<img src="%s/help-big.png" alt="%s" />',IMGDIR,_('Help')))
);
@@ -615,7 +615,7 @@ function error($msg,$type='note',$redirect=null,$fatal=false,$backtrace=false) {
$display = strlen(serialize($line['args'])) < 50 ? htmlspecialchars(serialize($line['args'])) : htmlspecialchars(substr(serialize($line['args']),0,50)).'...<TRUNCATED>';
$_SESSION['backtrace'][$error]['args'] = $line['args'];
if (file_exists(LIBDIR.'../tools/unserialize.php'))
$body .= sprintf('&nbsp;(<a href="%s?index=%s" target="backtrace">%s</a>)',
$body .= sprintf('&nbsp;(<a href="%s?index=%s" onclick="target=\'backtrace\';">%s</a>)',
'../tools/unserialize.php',$error,$display);
else
$body .= sprintf('&nbsp;(%s)',$display);
@@ -1919,7 +1919,7 @@ function support_oid_to_text($key) {
if ($oid_id) {
$CACHE[$oid_id]['title'] = isset($entry[4]) ? $entry[4] : null;
$CACHE[$oid_id]['ref'] = isset($entry[6]) ? $entry[6] : null;
$desc = isset($entry[8]) ? $entry[8] : sprintf('<acryonym title="%s"><small>%s</small></acryonym>',$unknown['desc'],$unknown['title']);
$desc = isset($entry[8]) ? $entry[8] : sprintf('<acronym title="%s">%s</acronym>',$unknown['desc'],$unknown['title']);
$CACHE[$oid_id]['desc'] = preg_replace('/\s+/',' ',$desc);
}
}
@@ -1931,7 +1931,7 @@ function support_oid_to_text($key) {
return array(
'title'=>$key,
'ref'=>null,
'desc'=>sprintf('<acryonym title="%s"><small>%s</small></acryonym>',$unknown['desc'],$unknown['title']));
'desc'=>sprintf('<acronym title="%s">%s</acronym>',$unknown['desc'],$unknown['title']));
}
/**
@@ -1941,7 +1941,7 @@ function ldap_error_msg($msg,$errnum) {
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
$body = '<table border=0>';
$body = '<table border="0">';
$errnum = ('0x'.str_pad(dechex($errnum),2,0,STR_PAD_LEFT));
$verbose_error = pla_verbose_error($errnum);
@@ -2386,15 +2386,11 @@ function get_enc_type($user_password) {
* "edit_form.member_uid". See /templates/modification/default.php for example usage.
* @param boolean (optional) If true, the function draws the localized text "choose" to the right of the button.
*/
function draw_chooser_link($form_element,$include_choose_text=true,$rdn='none') {
function draw_chooser_link($form,$element,$include_choose_text=true,$rdn='none') {
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
if ($rdn == 'none')
$href = sprintf("javascript:dnChooserPopup('%s','');",$form_element);
else
$href = sprintf("javascript:dnChooserPopup('%s','%s');",$form_element,$rdn);
$href = sprintf("javascript:dnChooserPopup('%s','%s','%s');",$form,$element,$rdn == 'none' ? '' : rawurlencode($rdn));
$title = _('Click to popup a dialog to select an entry (DN) graphically');
printf('<a href="%s" title="%s"><img class="chooser" src="%s/find.png" alt="Find" /></a>',$href,$title,IMGDIR);
@@ -2795,7 +2791,7 @@ function server_select_list($selected=null,$logged_on=false,$name='index',$isVis
$count++;
$server_menu_html .= sprintf('<option value="%s" %s>%s</option>',
$server->getIndex(),($server->getIndex() == $selected ? 'selected' : ''),$server->getName());
$server->getIndex(),($server->getIndex() == $selected ? 'selected="selected"' : ''),$server->getName());
# We will set this variable, in case there is only 1 hit.
$selected_server = $server;

View File

@@ -79,12 +79,10 @@ class page {
ob_start();
# Initial Values
$this->_pageheader[] .= '<?xml version="1.0" encoding="utf-8"?>'."\n";
$this->_pageheader[] .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"'."\n";
$this->_pageheader[] .= '"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">'."\n";
$this->_pageheader[] .= "\n";
$this->_pageheader[] .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="auto" lang="auto" dir="ltr">'."\n";
$this->_pageheader[] .= "\n";
#$this->_pageheader[] .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"';
#$this->_pageheader[] .= '"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">'."\n";
$this->_pageheader[] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
$this->_pageheader[] .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="auto">'."\n";
}
/* Add to the HTML Header */
@@ -121,8 +119,8 @@ class page {
if (defined('JSDIR')) {
printf('<link type="text/css" rel="stylesheet" media="all" href="%sjscalendar/calendar-blue.css" title="blue" />',JSDIR);
echo "\n";
printf('<script type="text/javascript" language="javascript" src="%sajax_functions.js"></script>',JSDIR);
printf('<script type="text/javascript" language="javascript" src="%sjscalendar/calendar.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sajax_functions.js"></script>',JSDIR);
printf('<script type="text/javascript" src="%sjscalendar/calendar.js"></script>',JSDIR);
echo "\n";
}
@@ -146,8 +144,8 @@ class page {
echo '<tr class="pagehead">';
echo '<td colspan=3><div id="ajHEAD"><table width=100% border=0><tr>';
printf('<td align="left"><a href="%s" target="_blank"><img src="%s" alt="Logo" class="logo" /></a></td>',get_href('sf'),$this->_app['logo']);
echo '<td colspan="3"><div id="ajHEAD"><table width="100%" border="0"><tr>';
printf('<td style="text-align: left;"><a href="%s" onclick="target=\'_blank\';"><img src="%s" alt="Logo" class="logo" /></a></td>',get_href('sf'),$this->_app['logo']);
echo '<td class="imagetop">';
$empty = true;
@@ -175,7 +173,7 @@ class page {
if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);
echo '<table class="control" width=100% border=0>';
echo '<table class="control" width="100%" border="0">';
echo '<tr><td>';
$empty = true;
@@ -210,7 +208,7 @@ class page {
$this->index = min(array_keys($_SESSION[APPCONFIG]->getServerList()));
if (count($_SESSION[APPCONFIG]->getServerList()) > 1) {
echo '<form name="server_select" action="cmd.php" method="post">';
echo '<form id="server_select" action="cmd.php" method="post">';
echo '<table class="server_select"><tr><td>';
printf('%s:<br />%s',_('Server Select'),
server_select_list($this->index,false,'index',true,sprintf("onchange=\"tree_unhide('index',%s)\"",$this->index)));
@@ -245,7 +243,7 @@ class page {
if (! isset($this->_block[$side]))
return;
printf('<td class="%s" colspan=2>',$side);
printf('<td class="%s" colspan="2">',$side);
foreach ($this->_block[$side] as $object)
echo $object->draw($side);
echo '</td>';
@@ -273,7 +271,7 @@ class page {
}
if (isset($details['title']))
printf('<tr><td class="icon" rowspan=2 align="right"><img src="%s" alt="%s" /></td><td class="head" align="right">%s</td></tr>',
printf('<tr><td class="icon" rowspan="2"><img src="%s" alt="%s" /></td><td class="head">%s</td></tr>',
$icon,$details['type'],$details['title']);
if (isset($details['body']))
@@ -317,10 +315,10 @@ class page {
if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
debug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);
printf('<tr class="foot"><td><small>%s</small></td><td colspan=2><div id="ajFOOT">%s</div>%s</td></tr>',
printf('<tr class="foot"><td><small>%s</small></td><td colspan="2"><div id="ajFOOT">%s</div>%s</td></tr>',
isCompress() ? '[C]' : '&nbsp;',
app_version(),
get_href('logo') ? sprintf('<a href="%s"><img src="%s" border="0" alt="SourceForge.net Logo" /></a>',get_href('sf'),get_href('logo')) : '&nbsp;');
get_href('logo') ? sprintf('<a href="%s"><img src="%s" alt="SourceForge.net Logo" style="border: 0px;" /></a>',get_href('sf'),get_href('logo')) : '&nbsp;');
}
/**
@@ -382,14 +380,14 @@ class page {
# Page Header
echo '<body>';
echo "\n";
echo '<table class="page" border=0 width=100%>';
echo '<table class="page" border="0" width="100%">';
if ($display['HEAD'])
$this->head_print();
# Control Line
if ($display['CONTROL']) {
echo '<tr class="control"><td colspan=3>';
echo '<tr class="control"><td colspan="3">';
echo '<div id="ajCONTROL">';
$this->control_print();
echo '</div></td></tr>';
@@ -400,15 +398,15 @@ class page {
echo '<tr>';
if ($display['TREE']) {
echo '<td class="tree" colspan=2>';
printf('<acronym title="%s"><img src="%s/plus.png" align="right" onClick="if (document.getElementById(\'ajTREE\').style.display == \'none\') { document.getElementById(\'ajTREE\').style.display = \'block\' } else { document.getElementById(\'ajTREE\').style.display = \'none\' };"/></acronym>',_('Hide/Unhide the tree'),IMGDIR);
echo '<td class="tree" colspan="2">';
printf('<acronym title="%s"><img src="%s/plus.png" alt="" style="float: right;" onclick="if (document.getElementById(\'ajTREE\').style.display == \'none\') { document.getElementById(\'ajTREE\').style.display = \'block\' } else { document.getElementById(\'ajTREE\').style.display = \'none\' };"/></acronym>',_('Hide/Unhide the tree'),IMGDIR);
echo '<div id="ajTREE">';
$this->tree();
echo '</div>';
echo '</td>';
}
echo '<td class="body" width=80%>';
echo '<td class="body" style="width: 80%;">';
echo '<div id="ajBODY">';
echo "\n";
$this->body();