HTML Validation work
This commit is contained in:
@@ -29,7 +29,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Add new attribute'),get_rdn($request['dn'])));
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
if (count($request['template']->getAvailAttrs())) {
|
||||
# If we have more than the configured entries, we'll separate our input to the old ways.
|
||||
if (count($request['template']->getAvailAttrs()) > $_SESSION[APPCONFIG]->getValue('appearance','max_add_attrs')) {
|
||||
@@ -50,6 +50,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
echo '<br />';
|
||||
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<div>';
|
||||
|
||||
if ($_SESSION[APPCONFIG]->getValue('confirm','update'))
|
||||
echo '<input type="hidden" name="cmd" value="update_confirm" />';
|
||||
@@ -75,6 +76,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
|
||||
echo '<input type="text" name="single_item_value" size="20" />';
|
||||
printf('<input type="submit" name="submit" value="%s" class="update_dn" />',_('Add'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
@@ -90,6 +92,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
|
||||
echo '<!-- Form to add a new BINARY attribute to this entry -->';
|
||||
echo '<form action="cmd.php" method="post" enctype="multipart/form-data">';
|
||||
echo '<div>';
|
||||
|
||||
if ($_SESSION[APPCONFIG]->getValue('confirm','update'))
|
||||
echo '<input type="hidden" name="cmd" value="update_confirm" />';
|
||||
@@ -124,6 +127,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
else
|
||||
printf('<br /><small><b>%s: %s</b></small><br />',_('Maximum file size'),ini_get('upload_max_filesize'));
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
@@ -138,7 +142,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($request['dn']));
|
||||
|
||||
echo '<table class="entry" cellspacing="0" align="center" border=0>';
|
||||
echo '<table class="entry" cellspacing="0" align="center" border="0">';
|
||||
|
||||
foreach ($request['template']->getAvailAttrs() as $attribute)
|
||||
$request['page']->draw('Template',$attribute);
|
||||
@@ -153,7 +157,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
printf('<small>(%s)</small>',_('no new attributes available for this entry'));
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
|
||||
# The ajax addition (it is going into an existing TemplateRendered page
|
||||
} else {
|
||||
@@ -161,10 +165,10 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
echo '<fieldset>';
|
||||
printf('<legend>%s</legend>',_('Add Attribute'));
|
||||
echo '<div id="ajADDATTR">';
|
||||
echo '<table class="entry" cellspacing="0" align="center" border=0>';
|
||||
echo '<table class="entry" cellspacing="0" align="center" border="0">';
|
||||
echo '<td valign="top" align="center">';
|
||||
|
||||
printf('<select name="attr" onChange="ajDISPLAY(\'%s\',\'cmd=add_value_form&server_id=%s&dn=%s&meth=ajax&attr=\'+this.value,\'%s\',\'append\');">',
|
||||
printf('<select name="attr" onchange="ajDISPLAY(\'%s\',\'cmd=add_value_form&server_id=%s&dn=%s&attr=\'+this.value,\'%s\',\'append\');">',
|
||||
'ADDATTR',$app['server']->getIndex(),rawurlencode(get_request('dn','REQUEST')),_('Please Wait'));
|
||||
|
||||
printf('<option value="%s">%s</option>','','');
|
||||
|
@@ -60,7 +60,7 @@ if (count($ldap['attrs']['need']) > 0) {
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Add new objectClass to'),get_rdn($request['dn'])));
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center">';
|
||||
printf('<small><b>%s: </b>%s <b>%s</b> %s %s</small>',
|
||||
_('Instructions'),
|
||||
_('In order to add these objectClass(es) to this entry, you must specify'),
|
||||
@@ -69,7 +69,8 @@ if (count($ldap['attrs']['need']) > 0) {
|
||||
|
||||
echo '<br /><br />';
|
||||
|
||||
echo '<form action="cmd.php" method="post" name="entry_form">';
|
||||
echo '<form action="cmd.php" method="post" id="entry_form">';
|
||||
echo '<div>';
|
||||
|
||||
if ($_SESSION[APPCONFIG]->getValue('confirm','update'))
|
||||
echo '<input type="hidden" name="cmd" value="update_confirm" />';
|
||||
@@ -78,27 +79,25 @@ if (count($ldap['attrs']['need']) > 0) {
|
||||
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($request['dn']));
|
||||
echo '</div>';
|
||||
|
||||
echo '<table class="entry" cellspacing="0">';
|
||||
echo '<table class="entry" cellspacing="0" border="0" style="margin-left: auto; margin-right: auto;">';
|
||||
printf('<tr><th colspan="2">%s</th></tr>',_('New Required Attributes'));
|
||||
|
||||
$counter = 0;
|
||||
foreach ($request['template']->getAttribute('objectclass')->getValues() as $value) {
|
||||
echo '<tr><td colspan=2>';
|
||||
echo '<tr><td colspan="2">';
|
||||
foreach ($request['template']->getAttribute('objectclass')->getValues() as $value)
|
||||
$request['page']->draw('HiddenValue',$request['template']->getAttribute('objectclass'),$counter++);
|
||||
echo '</td></tr>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
|
||||
foreach ($ldap['attrs']['need'] as $count => $attr)
|
||||
$request['page']->draw('Template',$attr);
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '<br />';
|
||||
|
||||
printf('<center><input type="submit" value="%s" /></center>',_('Add ObjectClass and Attributes'));
|
||||
printf('<div style="text-align: center;"><br /><input type="submit" value="%s" /></div>',_('Add ObjectClass and Attributes'));
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
|
||||
# There are no other required attributes, so we just need to add the objectclass to the DN.
|
||||
} else {
|
||||
|
@@ -38,11 +38,13 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
if (! strcasecmp($request['attr'],'objectclass')) {
|
||||
echo '<form action="cmd.php" method="post" class="new_value" name="entry_form">';
|
||||
echo '<form action="cmd.php" method="post" class="new_value" id="entry_form">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="add_oclass_form" />';
|
||||
|
||||
} else {
|
||||
echo '<form action="cmd.php" method="post" class="new_value" name="entry_form" enctype="multipart/form-data" onSubmit="return submitForm(this)">';
|
||||
echo '<form action="cmd.php" method="post" class="new_value" id="entry_form" enctype="multipart/form-data" onsubmit="return submitForm(this)">';
|
||||
echo '<div>';
|
||||
if ($_SESSION[APPCONFIG]->getValue('confirm','update'))
|
||||
echo '<input type="hidden" name="cmd" value="update_confirm" />';
|
||||
else
|
||||
@@ -51,9 +53,9 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($request['dn']));
|
||||
echo '</div>';
|
||||
|
||||
echo '<center>';
|
||||
echo '<table class="forminput" border=0>';
|
||||
echo '<table class="forminput" border="0" style="margin-left: auto; margin-right: auto;">';
|
||||
echo '<tr>';
|
||||
|
||||
$request['attribute'] = $request['template']->getAttribute($request['attr']);
|
||||
@@ -66,7 +68,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
echo '<td>';
|
||||
|
||||
# Display current attribute values
|
||||
echo '<table border=0><tr><td>';
|
||||
echo '<table border="0"><tr><td>';
|
||||
for ($i=0;$i<$request['count'];$i++) {
|
||||
if ($i > 0)
|
||||
echo '<br/>';
|
||||
@@ -97,9 +99,9 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
unset($socs[strtolower($oclass)]);
|
||||
|
||||
# Draw objectClass selection
|
||||
echo '<table border=0>';
|
||||
echo '<table border="0">';
|
||||
echo '<tr><td>';
|
||||
echo '<select name="new_values[objectclass][]" multiple="true" size="15">';
|
||||
echo '<select name="new_values[objectclass][]" multiple="multiple" size="15">';
|
||||
foreach ($socs as $name => $oclass) {
|
||||
# Exclude any structural ones, that are not in the heirachy, as they'll only generate an LDAP_OBJECT_CLASS_VIOLATION
|
||||
if (($oclass->getType() == 'structural') && ! $oclass->isRelated($request['attribute']->getValues()))
|
||||
@@ -117,16 +119,15 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
echo '</tr>';
|
||||
|
||||
if ($_SESSION[APPCONFIG]->getValue('appearance','show_hints'))
|
||||
printf('<tr><td colspan=2><small><br /><img src="%s/light.png" alt="Hint" /><span class="hint">%s</span></small></td></tr>',
|
||||
printf('<tr><td colspan="2"><small><br /><img src="%s/light.png" alt="Hint" /><span class="hint">%s</span></small></td></tr>',
|
||||
IMGDIR,_('Note: You may be required to enter new attributes that these objectClass(es) require'));
|
||||
|
||||
echo '</table>';
|
||||
echo '</center>';
|
||||
echo '</form>';
|
||||
|
||||
} else {
|
||||
# Draw a blank field
|
||||
echo '<table border=0><tr><td>';
|
||||
echo '<table border="0"><tr><td>';
|
||||
$request['page']->draw('FormValue',$request['attribute'],$request['count']);
|
||||
echo '</td></tr><tr><td>';
|
||||
|
||||
@@ -148,7 +149,6 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '</center>';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ if (get_request('meth','REQUEST') != 'ajax') {
|
||||
$attribute = $request['template']->getAttribute($request['attr']);
|
||||
$attribute->show();
|
||||
|
||||
echo '<table class="entry" cellspacing="0" align="center" border=0>';
|
||||
echo '<table class="entry" cellspacing="0" align="center" border="0">';
|
||||
$request['page']->draw('Template',$attribute);
|
||||
$request['page']->draw('Javascript',$attribute);
|
||||
echo '</table>';
|
||||
|
@@ -65,7 +65,7 @@ if ($app['script_cmd'])
|
||||
# Refresh a frame - this is so that one frame can trigger another frame to be refreshed.
|
||||
if (isAjaxEnabled() && get_request('refresh','REQUEST') && get_request('refresh','REQUEST') != get_request('frame','REQUEST')) {
|
||||
echo '<script type="text/javascript" language="javascript">';
|
||||
printf("ajDISPLAY('%s','cmd=refresh&server_id=%s&meth=ajax&noheader=%s','%s');",
|
||||
printf("ajDISPLAY('%s','cmd=refresh&server_id=%s&noheader=%s','%s');",
|
||||
get_request('refresh','REQUEST'),$app['server']->getIndex(),get_request('noheader','REQUEST',false,0),_('Auto refresh'));
|
||||
echo '</script>';
|
||||
}
|
||||
|
@@ -43,32 +43,34 @@ $request['pageSRC']->drawTitle(_('Comparing the following DNs'));
|
||||
|
||||
echo '<br/>';
|
||||
|
||||
echo '<table class="entry" width=100% border=0>';
|
||||
echo '<table class="entry" width="100%" border="0">';
|
||||
echo '<tr class="heading">';
|
||||
|
||||
$href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',
|
||||
$ldap['SRC']->getIndex(),rawurlencode($request['dnSRC']));
|
||||
printf('<td colspan=2 width=40%%>%s: <b>%s</b><br />%s: <b><a href="%s">%s</a></b></td>',
|
||||
printf('<td colspan="2" style="width: 40%%;">%s: <b>%s</b><br />%s: <b><a href="%s">%s</a></b></td>',
|
||||
_('Server'),$ldap['SRC']->getName(),_('Distinguished Name'),
|
||||
htmlspecialchars($href),$request['dnSRC']);
|
||||
|
||||
$href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',
|
||||
$ldap['DST']->getIndex(),rawurlencode($request['dnDST']));
|
||||
printf('<td colspan=2 width=40%%>%s: <b>%s</b><br />%s: <b><a href="%s">%s</a></b></td>',
|
||||
printf('<td colspan="2" style="width: 40%%;">%s: <b>%s</b><br />%s: <b><a href="%s">%s</a></b></td>',
|
||||
_('Server'),$ldap['DST']->getName(),_('Distinguished Name'),
|
||||
htmlspecialchars($href),$request['dnDST']);
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td colspan=4 align=right>';
|
||||
echo '<form action="cmd.php?cmd=compare" method="post" name="compare_form">';
|
||||
echo '<td colspan="4" style="text-align: right;">';
|
||||
echo '<form action="cmd.php?cmd=compare" method="post">';
|
||||
echo '<div>';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="server_id_src" value="%s" />',$ldap['DST']->getIndex());
|
||||
printf('<input type="hidden" name="server_id_dst" value="%s" />',$ldap['SRC']->getIndex());
|
||||
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($request['dnDST']));
|
||||
printf('<input type="hidden" name="dn_dst" value="%s" />',htmlspecialchars($request['dnSRC']));
|
||||
printf('<input type="submit" value="%s" />',_('Switch Entry'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
@@ -110,13 +112,13 @@ foreach ($attrs_all as $attr) {
|
||||
echo '<td class="title"> </td>';
|
||||
|
||||
else {
|
||||
echo '<td class="note" align="right">';
|
||||
echo '<td class="note" style="text-align: right;">';
|
||||
$request['pageSRC']->draw('Notes',$attributeSRC);
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
} else {
|
||||
echo '<td colspan=2> </td>';
|
||||
echo '<td colspan="2"> </td>';
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -132,12 +134,12 @@ foreach ($attrs_all as $attr) {
|
||||
echo '</td>';
|
||||
}
|
||||
|
||||
echo '<td class="note" align="right">';
|
||||
echo '<td class="note" style="text-align: right;">';
|
||||
$request['pageDST']->draw('Notes',$attributeDST);
|
||||
echo '</td>';
|
||||
|
||||
} else {
|
||||
echo '<td colspan=2> </td>';
|
||||
echo '<td colspan="2"> </td>';
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -154,31 +156,30 @@ foreach ($attrs_all as $attr) {
|
||||
echo '<tr>';
|
||||
|
||||
foreach (array('src','dst') as $side) {
|
||||
echo '<td class="value" colspan="2"><table border="0">';
|
||||
echo '<tr><td>';
|
||||
|
||||
switch ($side) {
|
||||
case 'src':
|
||||
echo '<td class="value" colspan=2><table border=0>';
|
||||
|
||||
if ($attributeSRC && count($attributeSRC->getValues()))
|
||||
$request['pageSRC']->draw('CurrentValues',$attributeSRC);
|
||||
else
|
||||
echo '<tr><td> </td></tr>';
|
||||
|
||||
echo '</table></td>';
|
||||
echo ' ';
|
||||
|
||||
break;
|
||||
|
||||
case 'dst':
|
||||
echo '<td class="value" colspan=2><table>';
|
||||
|
||||
if ($attributeDST && count($attributeDST->getValues()))
|
||||
$request['pageDST']->draw('CurrentValues',$attributeDST);
|
||||
else
|
||||
echo '<tr><td> </td></tr>';
|
||||
|
||||
echo '</table></td>';
|
||||
echo ' ';
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
echo '</td></tr>';
|
||||
echo '</table></td>';
|
||||
}
|
||||
|
||||
echo '</tr>';
|
||||
|
@@ -28,25 +28,28 @@ $request['page']->accept();
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Compare another DN with'),get_rdn($request['dn'])));
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
|
||||
echo '<center>';
|
||||
printf('<script type="text/javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
|
||||
echo '<div style="text-align: center;">';
|
||||
printf('%s <b>%s</b> %s<br />',_('Compare'),get_rdn($request['dn']),_('with '));
|
||||
echo '</div>';
|
||||
|
||||
echo '<form action="cmd.php" method="post" name="compare_form">';
|
||||
echo '<form action="cmd.php" method="post" id="compare_form">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="compare" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="server_id_src" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($request['dn']));
|
||||
echo '</div>';
|
||||
echo "\n";
|
||||
|
||||
echo '<table style="border-spacing: 10px">';
|
||||
echo '<table border="0" style="border-spacing: 10px; margin-left: auto; margin-right: auto;">';
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',
|
||||
_('Compare this DN with another'),_('Destination DN'));
|
||||
echo '<td>';
|
||||
echo '<input type="text" name="dn_dst" size="45" value="" />';
|
||||
draw_chooser_link('compare_form.dn_dst','true','');
|
||||
draw_chooser_link('compare_form','dn_dst','true','');
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
@@ -54,10 +57,9 @@ echo "\n";
|
||||
printf('<tr><td>%s:</td><td>%s</td></tr>',_('Destination Server'),server_select_list($app['server']->getIndex(),true,'server_id_dst'));
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Compare'));
|
||||
printf('<tr><td colspan="2" style="text-align: center;"><input type="submit" value="%s" /></td></tr>',_('Compare'));
|
||||
echo "\n";
|
||||
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
?>
|
||||
|
@@ -27,25 +27,28 @@ $request['page']->accept();
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b>',_('Copy'),get_rdn($request['dn'])));
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
|
||||
echo '<center>';
|
||||
printf('<script type="text/javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
|
||||
echo '<div style="text-align: center;">';
|
||||
printf('%s <b>%s</b> %s:<br /><br />',_('Copy'),get_rdn($request['dn']),_('to a new object'));
|
||||
echo '</div>';
|
||||
|
||||
echo '<form action="cmd.php" method="post" name="copy_form">';
|
||||
echo '<form action="cmd.php" method="post" id="copy_form">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="copy" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="server_id_src" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($request['dn']));
|
||||
echo '</div>';
|
||||
echo "\n";
|
||||
|
||||
echo '<table style="border-spacing: 10px">';
|
||||
echo '<table border="0" style="border-spacing: 10px; margin-left: auto; margin-right: auto;">';
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td><acronym title="%s">%s</acronym>:</td>',
|
||||
_('The full DN of the new entry to be created when copying the source entry'),_('Destination DN'));
|
||||
echo '<td>';
|
||||
printf('<input type="text" name="dn_dst" size="45" value="%s" />',htmlspecialchars($request['dn']));
|
||||
draw_chooser_link('copy_form.dn_dst','true',get_rdn($request['dn']));
|
||||
draw_chooser_link('copy_form','dn_dst','true',get_rdn($request['dn']));
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
@@ -59,7 +62,7 @@ $request['children'] = $app['server']->getContainerContents($request['dn']);
|
||||
if (count($request['children']) > 0) {
|
||||
echo '<tr>';
|
||||
printf('<td><label for="recursive">%s</label>:</td>',_('Recursive copy'));
|
||||
echo '<td><input type="checkbox" id="recursive" name="recursive" onClick="copy_field_toggle(this)" />';
|
||||
echo '<td><input type="checkbox" id="recursive" name="recursive" onclick="copy_field_toggle(this)" />';
|
||||
printf('<small>(%s)</small></td>',_('Recursively copy all children of this object as well.'));
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
@@ -83,19 +86,18 @@ if (count($request['children']) > 0) {
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Copy '));
|
||||
printf('<tr><td colspan="2" style="text-align: center;"><input type="submit" value="%s" /></td></tr>',_('Copy '));
|
||||
echo "\n";
|
||||
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
|
||||
if ($_SESSION[APPCONFIG]->getValue('appearance','show_hints'))
|
||||
printf('<small><img src="%s/light.png" alt="Light" /><span class="hint">%s</span></small>',
|
||||
printf('<div style="text-align: center;"><small><img src="%s/light.png" alt="Light" /><span class="hint">%s</span></small></div>',
|
||||
IMGDIR,_('Hint: Copying between different servers only works if there are no schema violations'));
|
||||
|
||||
echo '</center>';
|
||||
|
||||
# Draw the javascrpt to enable/disable the filter field if this may be a recursive copy
|
||||
if (count($request['children']) > 0)
|
||||
printf('<script type="text/javascript" language="javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
|
||||
printf('<script type="text/javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
|
||||
?>
|
||||
|
@@ -54,12 +54,14 @@ $request['page']->drawSubTitle(sprintf('%s: <b>%s</b> %s: <b>%s
|
||||
|
||||
# Confirm the creation
|
||||
if (count($request['template']->getLDAPadd(true))) {
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
echo _('Do you want to create this entry?');
|
||||
echo '<br /><br />';
|
||||
echo '</div>';
|
||||
|
||||
echo "\n\n";
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="create" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($request['template']->getContainer()));
|
||||
@@ -69,8 +71,9 @@ if (count($request['template']->getLDAPadd(true))) {
|
||||
echo "\n";
|
||||
|
||||
$request['page']->drawHiddenAttributes();
|
||||
echo '</div>';
|
||||
|
||||
echo '<table class="result_table">';
|
||||
echo '<table class="result_table" style="margin-left: auto; margin-right: auto;">';
|
||||
echo "\n";
|
||||
|
||||
printf('<tr class="heading"><td>%s</td><td>%s</td><td>%s</td></tr>',
|
||||
@@ -78,7 +81,7 @@ if (count($request['template']->getLDAPadd(true))) {
|
||||
echo "\n\n";
|
||||
|
||||
$counter = 0;
|
||||
printf('<tr class="%s"><td colspan=3><center><b>%s</b></center></td><tr>',$counter%2 ? 'even' : 'odd',$request['template']->getDN());
|
||||
printf('<tr class="%s"><td colspan="3" style="text-align: center;"><b>%s</b></td></tr>',$counter%2 ? 'even' : 'odd',$request['template']->getDN());
|
||||
|
||||
foreach ($request['template']->getLDAPadd(true) as $attribute) {
|
||||
$counter++;
|
||||
@@ -106,21 +109,21 @@ if (count($request['template']->getLDAPadd(true))) {
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '<div style="text-align: center;">';
|
||||
echo '<br />';
|
||||
printf('<input type="submit" value="%s" />',_('Commit'));
|
||||
printf('<input type="submit" name="cancel" value="%s" />',_('Cancel'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
|
||||
echo '</center>';
|
||||
|
||||
} else {
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
echo _('You made no changes');
|
||||
$href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',
|
||||
$app['server']->getIndex(),rawurlencode($request['dn']));
|
||||
|
||||
printf(' <a href="%s">%s</a>.',htmlspecialchars($href),_('Go back'));
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
@@ -46,43 +46,43 @@ if (count($request['children'])) {
|
||||
$query['deref'] = LDAP_DEREF_NEVER;
|
||||
$request['search'] = $app['server']->query($query,null);
|
||||
|
||||
echo '<table class="forminput" border=0>';
|
||||
echo '<table class="forminput" border="0">';
|
||||
echo '<tr>';
|
||||
echo '<td colspan=2>';
|
||||
echo '<td colspan="2">';
|
||||
printf(_('This entry is the root of a sub-tree containing %s entries.'),count($request['search']));
|
||||
printf(' <small>(<a href="%s">%s</a>)</small>',
|
||||
$search['href'],_('view entries'));
|
||||
echo '</td></tr>';
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
|
||||
printf('<tr><td colspan=2>%s</td></tr>',
|
||||
printf('<tr><td colspan="2">%s</td></tr>',
|
||||
sprintf(_('phpLDAPadmin can recursively delete this entry and all %s of its children. See below for a list of all the entries that this action will delete. Do you want to do this?'),count($request['search'])));
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
|
||||
printf('<tr><td colspan=2><small>%s</small></td></tr>',
|
||||
printf('<tr><td colspan="2"><small>%s</small></td></tr>',
|
||||
_('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.'));
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td width=50%><center>';
|
||||
echo '<td style="width: 50%; text-align: center;">';
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="rdelete" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($request['dn']));
|
||||
printf('<input type="submit" value="%s" />',sprintf(_('Delete all %s objects'),count($request['search'])));
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td width=50%><center>';
|
||||
echo '<td style="width: 50%; text-align: center;">';
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<input type="hidden" name="cmd" value="template_engine" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($request['dn']));
|
||||
printf('<input type="submit" name="submit" value="%s" />',_('Cancel'));
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo "\n";
|
||||
|
||||
@@ -101,19 +101,19 @@ if (count($request['children'])) {
|
||||
echo "\n";
|
||||
|
||||
} else {
|
||||
echo '<table class="forminput" border=0>';
|
||||
echo '<table class="forminput" border="0">';
|
||||
|
||||
printf('<tr><td colspan=4>%s</td></tr>',_('Are you sure you want to permanently delete this object?'));
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
printf('<tr><td colspan="4">%s</td></tr>',_('Are you sure you want to permanently delete this object?'));
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
|
||||
printf('<tr><td width=10%%>%s:</td><td colspan=3 width=75%%><b>%s</b></td></tr>',_('Server'),$app['server']->getName());
|
||||
printf('<tr><td width=10%%><acronym title="%s">%s</acronym></td><td colspan=3 width=75%%><b>%s</b></td></tr>',
|
||||
printf('<tr><td style="width: 10%%;">%s:</td><td colspan="3" style="width: 75%%;"><b>%s</b></td></tr>',_('Server'),$app['server']->getName());
|
||||
printf('<tr><td style="width: 10%%;"><acronym title="%s">%s</acronym></td><td colspan="3" style="width: 75%%;"><b>%s</b></td></tr>',
|
||||
_('Distinguished Name'),_('DN'),$request['dn']);
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
echo "\n";
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td colspan=2 width=50%><center>';
|
||||
echo '<td colspan="2" style="width: 50%; text-align: center;">';
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="delete" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
@@ -121,8 +121,8 @@ if (count($request['children'])) {
|
||||
printf('<input type="submit" name="submit" value="%s" />',_('Delete'));
|
||||
echo '</form>';
|
||||
|
||||
echo '</center></td>';
|
||||
echo '<td colspan=2 width=50%><center>';
|
||||
echo '</td>';
|
||||
echo '<td colspan="2" style="width: 50%; text-align: center;">';
|
||||
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<input type="hidden" name="cmd" value="template_engine" />';
|
||||
@@ -131,7 +131,7 @@ if (count($request['children'])) {
|
||||
printf('<input type="submit" name="submit" value="%s" />',_('Cancel'));
|
||||
echo '</form>';
|
||||
|
||||
echo '</center></td>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo "\n";
|
||||
|
@@ -15,24 +15,26 @@ $www['page'] = new page();
|
||||
|
||||
$request = array();
|
||||
$request['container'] = get_request('container','GET');
|
||||
$request['element'] = get_request('form_element','GET');
|
||||
$request['form'] = get_request('form','GET');
|
||||
$request['element'] = get_request('element','GET');
|
||||
$request['rdn'] = get_request('rdn','GET');
|
||||
|
||||
echo '<div class="popup">';
|
||||
printf('<h3 class="subtitle">%s</h3>',_('Entry Chooser'));
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">';
|
||||
echo '<script type="text/javascript">';
|
||||
echo ' function returnDN(dn) {';
|
||||
printf(' opener.document.%s.value = dn;',$request['element']);
|
||||
echo ' close();';
|
||||
printf(" eval ('o = opener.document.getElementById(\"%s\").%s;');",$request['form'],$request['element']);
|
||||
echo ' o.value = dn;';
|
||||
echo ' close();';
|
||||
echo ' }';
|
||||
echo '</script>';
|
||||
|
||||
echo '<table class="forminput" width=100% border=0>';
|
||||
echo '<table class="forminput" width="100%" border="0">';
|
||||
if ($request['container']) {
|
||||
printf('<tr><td class="heading" colspan=3>%s:</td><td>%s</td></tr>',_('Server'),$app['server']->getName());
|
||||
printf('<tr><td class="heading" colspan=3>%s:</td><td>%s</td></tr>',_('Looking in'),$request['container']);
|
||||
echo '<tr><td class="blank" colspan=4> </td></tr>';
|
||||
printf('<tr><td class="heading" colspan="3">%s:</td><td>%s</td></tr>',_('Server'),$app['server']->getName());
|
||||
printf('<tr><td class="heading" colspan="3">%s:</td><td>%s</td></tr>',_('Looking in'),$request['container']);
|
||||
echo '<tr><td class="blank" colspan="4"> </td></tr>';
|
||||
}
|
||||
|
||||
# Has the user already begun to descend into a specific server tree?
|
||||
@@ -47,36 +49,36 @@ if (isset($app['server']) && ! is_null($request['container'])) {
|
||||
|
||||
if (! pla_compare_dns($request['container'],$base)) {
|
||||
$parent_container = false;
|
||||
$href['up'] = sprintf('entry_chooser.php?form_element=%s&rdn=%s',$request['element'],rawurlencode($request['rdn']));
|
||||
$href['up'] = sprintf('entry_chooser.php?form=%s&element=%s&rdn=%s',$request['form'],$request['element'],rawurlencode($request['rdn']));
|
||||
break;
|
||||
|
||||
} else {
|
||||
$parent_container = $app['server']->getContainer($request['container']);
|
||||
$href['up'] = sprintf('entry_chooser.php?form_element=%s&rdn=%s&server_id=%s&container=%s',
|
||||
$request['element'],$request['rdn'],$app['server']->getIndex(),rawurlencode($parent_container));
|
||||
$href['up'] = sprintf('entry_chooser.php?form=%s&element=%s&rdn=%s&server_id=%s&container=%s',
|
||||
$request['form'],$request['element'],$request['rdn'],$app['server']->getIndex(),rawurlencode($parent_container));
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="blank"> </td>';
|
||||
printf('<td class="icon"><a href="%s"><img src="%s/up.png" alt="Up" /></a></td>',$href['up'],IMGDIR);
|
||||
printf('<td colspan=2><a href="%s">%s...</a></td>',$href['up'],_('Back Up'));
|
||||
printf('<td colspan="2"><a href="%s">%s...</a></td>',$href['up'],_('Back Up'));
|
||||
echo '</tr>';
|
||||
|
||||
if (! count($request['children']))
|
||||
printf('<td class="blank" colspan=2> </td><td colspan=2">(%s)</td>',_('no entries'));
|
||||
printf('<td class="blank" colspan="2"> </td><td colspan="2">(%s)</td>',_('no entries'));
|
||||
|
||||
else
|
||||
foreach ($request['children'] as $dn) {
|
||||
$href['return'] = sprintf("javascript:returnDN('%s%s')",($request['rdn'] ? sprintf('%s,',$request['rdn']) : ''),rawurlencode($dn));
|
||||
$href['expand'] = sprintf('entry_chooser.php?server_id=%s&form_element=%s&rdn=%s&container=%s',
|
||||
$app['server']->getIndex(),$request['element'],$request['rdn'],rawurlencode($dn));
|
||||
$href['expand'] = sprintf('entry_chooser.php?server_id=%s&form=%s&element=%s&rdn=%s&container=%s',
|
||||
$app['server']->getIndex(),$request['form'],$request['element'],$request['rdn'],rawurlencode($dn));
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="blank"> </td>';
|
||||
printf('<td class="icon"><a href="%s"><img src="%s/plus.png" alt="Plus" /></a></td>',$href['expand'],IMGDIR);
|
||||
|
||||
printf('<td colspan=2><a href="%s">%s</a></td>',$href['return'],$dn);
|
||||
printf('<td colspan="2"><a href="%s">%s</a></td>',$href['return'],$dn);
|
||||
echo '</tr>';
|
||||
echo "\n\n";
|
||||
}
|
||||
@@ -85,24 +87,24 @@ if (isset($app['server']) && ! is_null($request['container'])) {
|
||||
} else {
|
||||
foreach ($_SESSION[APPCONFIG]->getServerList() as $index => $server) {
|
||||
if ($server->isLoggedIn(null)) {
|
||||
printf('<tr><td class="heading" colspan=3>%s:</td><td class="heading">%s</td></tr>',_('Server'),$server->getName());
|
||||
printf('<tr><td class="heading" colspan="3">%s:</td><td class="heading">%s</td></tr>',_('Server'),$server->getName());
|
||||
foreach ($server->getBaseDN() as $dn) {
|
||||
if (! $dn) {
|
||||
printf('<tr><td class="blank"> </td><td colspan=3>(%s)</td></tr>',_('Could not determine base DN'));
|
||||
printf('<tr><td class="blank"> </td><td colspan="3">(%s)</td></tr>',_('Could not determine base DN'));
|
||||
|
||||
} else {
|
||||
$href['return'] = sprintf("javascript:returnDN('%s%s')",($request['rdn'] ? sprintf('%s,',$request['rdn']) : ''),rawurlencode($dn));
|
||||
$href['expand'] = htmlspecialchars(sprintf('entry_chooser.php?server_id=%s&form_element=%s&rdn=%s&container=%s',
|
||||
$server->getIndex(),$request['element'],$request['rdn'],rawurlencode($dn)));
|
||||
$href['expand'] = htmlspecialchars(sprintf('entry_chooser.php?server_id=%s&form=%s&element=%s&rdn=%s&container=%s',
|
||||
$server->getIndex(),$request['form'],$request['element'],$request['rdn'],rawurlencode($dn)));
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="blank"> </td>';
|
||||
printf('<td colspan=2 class="icon"><a href="%s"><img src="%s/plus.png" alt="Plus" /></a></td>',$href['expand'],IMGDIR);
|
||||
printf('<td colspan=2><a href="%s">%s</a></td>',$href['return'],$dn);
|
||||
printf('<td colspan="2" class="icon"><a href="%s"><img src="%s/plus.png" alt="Plus" /></a></td>',$href['expand'],IMGDIR);
|
||||
printf('<td colspan="2"><a href="%s">%s</a></td>',$href['return'],$dn);
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr><td class="blank" colspan=4> </td></tr>';
|
||||
echo '<tr><td class="blank" colspan="4"> </td></tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -36,16 +36,16 @@ $available_scopes = array(
|
||||
$request['page'] = new PageRender($app['server']->getIndex(),get_request('template','REQUEST',false,'none'));
|
||||
$request['page']->drawTitle(sprintf('<b>%s</b>',_('Export')));
|
||||
|
||||
printf('<script type="text/javascript" language="javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
|
||||
printf('<script type="text/javascript" language="javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
|
||||
printf('<script type="text/javascript" src="%sdnChooserPopup.js"></script>',JSDIR);
|
||||
printf('<script type="text/javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
|
||||
|
||||
echo '<br />';
|
||||
echo '<center>';
|
||||
echo '<form name="export_form" action="cmd.php" method="post">';
|
||||
echo '<form id="export_form" action="cmd.php" method="post">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="export" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
|
||||
echo '<table class="forminput">';
|
||||
echo '<table class="forminput" style="margin-left: auto; margin-right: auto;">';
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
|
||||
@@ -59,7 +59,7 @@ echo '<tr>';
|
||||
printf('<td style="white-space:nowrap">%s</td>',_('Base DN'));
|
||||
echo '<td><span style="white-space: nowrap;">';
|
||||
printf('<input type="text" name="dn" id="dn" style="width:230px" value="%s" /> ',htmlspecialchars($request['dn']));
|
||||
draw_chooser_link('export_form.dn');
|
||||
draw_chooser_link('export_form','dn');
|
||||
echo '</span></td>';
|
||||
echo '</tr>';
|
||||
|
||||
@@ -70,7 +70,7 @@ echo '<td>';
|
||||
|
||||
foreach ($available_scopes as $id => $desc)
|
||||
printf('<input type="radio" name="scope" value="%s" id="%s"%s /><label for="%s">%s</label><br />',
|
||||
htmlspecialchars($id),$id,($id == $request['scope']) ? 'checked="true"' : '',
|
||||
htmlspecialchars($id),$id,($id == $request['scope']) ? 'checked="checked"' : '',
|
||||
htmlspecialchars($id),$desc);
|
||||
|
||||
echo '</td>';
|
||||
@@ -84,12 +84,12 @@ printf('<tr><td>%s</td><td><input type="text" name="attributes" style="width:300
|
||||
_('Show Attributtes'),htmlspecialchars($request['attr']));
|
||||
|
||||
printf('<tr><td> </td><td><input type="checkbox" name="sys_attr" id="sys_attr" %s/> <label for="sys_attr">%s</label></td></tr>',
|
||||
$request['sys_attr'] ? 'checked="true" ' : '',_('Include system attributes'));
|
||||
$request['sys_attr'] ? 'checked="checked" ' : '',_('Include system attributes'));
|
||||
|
||||
printf('<tr><td> </td><td><input type="checkbox" id="save_as_file" name="save_as_file" onclick="export_field_toggle(this)" /> <label for="save_as_file">%s</label></td></tr>',
|
||||
_('Save as file'));
|
||||
|
||||
printf('<tr><td> </td><td><input type="checkbox" id="compress" name="compress" disabled /> <label for="compress">%s</label></td></tr>',
|
||||
printf('<tr><td> </td><td><input type="checkbox" id="compress" name="compress" disabled="disabled" /> <label for="compress">%s</label></td></tr>',
|
||||
_('Compress'));
|
||||
|
||||
echo '</table>';
|
||||
@@ -109,9 +109,9 @@ printf('<legend>%s</legend>',_('Export format'));
|
||||
|
||||
foreach (Exporter::types() as $index => $exporter) {
|
||||
printf('<input type="radio" name="exporter_id" id="exporter_id_%s" value="%s"%s/>',
|
||||
htmlspecialchars($exporter['type']),htmlspecialchars($exporter['type']),($exporter['type'] === $request['exporter_id']) ? ' checked="true"' : '');
|
||||
htmlspecialchars($exporter['type']),htmlspecialchars($exporter['type']),($exporter['type'] === $request['exporter_id']) ? ' checked="checked"' : '');
|
||||
|
||||
printf('<label for="%s">%s</label><br />',
|
||||
printf('<label for="exporter_id_%s">%s</label><br />',
|
||||
htmlspecialchars($exporter['type']),$exporter['type']);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ echo '<fieldset style="height: 100px">';
|
||||
printf('<legend>%s</legend>',_('Line ends'));
|
||||
foreach ($available_formats as $id => $desc)
|
||||
printf('<input type="radio" name="format" value="%s" id="%s"%s /><label for="%s">%s</label><br />',
|
||||
htmlspecialchars($id),htmlspecialchars($id),($request['format']==$id) ? ' checked="true"' : '',
|
||||
htmlspecialchars($id),htmlspecialchars($id),($request['format']==$id) ? ' checked="checked"' : '',
|
||||
htmlspecialchars($id),$desc);
|
||||
|
||||
echo '</fieldset>';
|
||||
@@ -134,13 +134,13 @@ echo '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
printf('<tr><td colspan="2"><center><input type="submit" name="target" value="%s" /></center></td></tr>',
|
||||
printf('<tr><td colspan="2" style="text-align: center;"><input type="submit" name="target" value="%s" /></td></tr>',
|
||||
htmlspecialchars(_('Proceed >>')));
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
|
||||
/**
|
||||
* Helper function for fetching the line end format.
|
||||
|
@@ -19,14 +19,15 @@ $request['page'] = new PageRender($app['server']->getIndex(),get_request('templa
|
||||
$request['page']->drawTitle(sprintf('<b>%s</b>',_('Import')));
|
||||
$request['page']->drawSubTitle(sprintf('%s: <b>%s</b>',_('Server'),$app['server']->getName()));
|
||||
|
||||
echo '<center>';
|
||||
echo '<form action="cmd.php" method="post" class="new_value" enctype="multipart/form-data">';
|
||||
echo '<div>';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
echo '<input type="hidden" name="cmd" value="import" />';
|
||||
echo '</div>';
|
||||
|
||||
echo '<table class="forminput" border=0>';
|
||||
echo '<table class="forminput" border="0" style="margin-left: auto; margin-right: auto;">';
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
echo '<tr>';
|
||||
printf('<td>%s</td>',_('Select an LDIF file'));
|
||||
echo '<td>';
|
||||
@@ -35,14 +36,13 @@ echo '</td></tr>';
|
||||
|
||||
printf('<tr><td> </td><td class="small"><b>%s %s</b></td></tr>',_('Maximum file size'),ini_get('upload_max_filesize'));
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
printf('<tr><td>%s</td></tr>',_('Or paste your LDIF here'));
|
||||
echo '<tr><td colspan=2><textarea name="ldif" rows="20" cols="100"></textarea></td></tr>';
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"><textarea name="ldif" rows="20" cols="100"></textarea></td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
printf('<tr><td> </td><td class="small"><input type="checkbox" name="continuous_mode" value="1" />%s</td></tr>',
|
||||
_("Don't stop on errors"));
|
||||
printf('<tr><td> </td><td><input type="submit" value="%s" /></td></tr>',_('Proceed >>'));
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
echo '</center>';
|
||||
?>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
function dnChooserPopup(form_element,rdn)
|
||||
function dnChooserPopup(form,element,rdn)
|
||||
{
|
||||
mywindow=open('entry_chooser.php','myname','resizable=no,width=600,height=370,scrollbars=1');
|
||||
mywindow.location.href = 'entry_chooser.php?form_element=' + form_element + '&rdn=' + rdn;
|
||||
mywindow.location.href = 'entry_chooser.php?form=' + form + '&element=' + element + '&rdn=' + rdn;
|
||||
if (mywindow.opener == null) mywindow.opener = self;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
var m1 = document.member.notmembers;
|
||||
var m2 = document.member.members;
|
||||
var m1 = document.getElementById('member').notmembers;
|
||||
var m2 = document.getElementById('member').members;
|
||||
|
||||
/* This function generates hidden input array from new group members
|
||||
* when submit button is pressed.
|
||||
|
@@ -17,13 +17,11 @@ echo '<br />';
|
||||
|
||||
# Check for a secure connection
|
||||
if (! isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on') {
|
||||
echo '<center>';
|
||||
echo '<span style="color:red">';
|
||||
echo '<div style="text-align: center; color:red">';
|
||||
printf('<acronym title="%s"><b>%s: %s.</b></acronym>',
|
||||
_('You are not using \'https\'. Web browser will transmit login information in clear text.'),
|
||||
_('Warning'),_('This web connection is unencrypted'));
|
||||
echo '</span>';
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<br />';
|
||||
}
|
||||
@@ -54,15 +52,17 @@ if ($app['server']->getAuthType() == 'http') {
|
||||
|
||||
# HTML Login Form
|
||||
} else {
|
||||
echo '<form action="cmd.php" method="post" name="login_form">';
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="login" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
|
||||
if (get_request('redirect','GET',false,false))
|
||||
printf('<input type="hidden" name="redirect" value="%s" />',rawurlencode(get_request('redirect','GET')));
|
||||
|
||||
echo '<center>';
|
||||
echo '<table class="forminput">';
|
||||
echo '</div>';
|
||||
|
||||
echo '<table class="forminput" style="margin-left: auto; margin-right: auto;">';
|
||||
|
||||
printf('<tr><td><b>%s:</b></td></tr>',
|
||||
$app['server']->getValue('login','auth_text') ? $app['server']->getValue('login','auth_text') :
|
||||
@@ -71,28 +71,27 @@ if ($app['server']->getAuthType() == 'http') {
|
||||
printf('<tr><td><input type="text" id="login" name="login" size="40" value="%s" /></td></tr>',
|
||||
$app['server']->getValue('login','attr',false) == 'dn' ? $app['server']->getValue('login','bind_id') : '');
|
||||
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
printf('<tr><td><b>%s:</b></td></tr>',_('Password'));
|
||||
echo '<tr><td><input type="password" id="password" size="40" value="" name="login_pass" /></td></tr>';
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
|
||||
# If Anon bind allowed, then disable the form if the user choose to bind anonymously.
|
||||
if ($app['server']->isAnonBindAllowed())
|
||||
printf('<tr><td colspan="2"><small><b>%s</b></small> <input type="checkbox" name="anonymous_bind" onclick="form_field_toggle_enable(this,[\'login\',\'password\'],\'login\')" id="anonymous_bind_checkbox" /></td></tr>',
|
||||
_('Anonymous'));
|
||||
|
||||
printf('<tr><td colspan="2"><center><input type="submit" name="submit" value="%s" /></center></td></tr>',
|
||||
printf('<tr><td colspan="2" style="text-align: center;"><input type="submit" name="submit" value="%s" /></td></tr>',
|
||||
_('Authenticate'));
|
||||
|
||||
echo '</table>';
|
||||
echo '</center>';
|
||||
echo '</form>';
|
||||
|
||||
echo '<br/>';
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">document.getElementById("login").focus()</script>';
|
||||
echo '<script type="text/javascript">document.getElementById("login").focus()</script>';
|
||||
|
||||
if ($app['server']->isAnonBindAllowed())
|
||||
printf('<script type="text/javascript" language="javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
|
||||
printf('<script type="text/javascript" src="%sform_field_toggle_enable.js"></script>',JSDIR);
|
||||
}
|
||||
?>
|
||||
|
@@ -46,27 +46,27 @@ printf('<h3 class="subtitle">%s: <b>%s</b></h3>',_('Server'),$app['server']->get
|
||||
echo "\n";
|
||||
|
||||
echo '<center>';
|
||||
echo '<table class="forminput" border=0>';
|
||||
echo '<table class="forminput" border="0">';
|
||||
|
||||
if (count($request['parent']) == 1)
|
||||
printf('<tr><td colspan=4><b>%s</b></td></tr>',_('Are you sure you want to permanently delete this object?'));
|
||||
printf('<tr><td colspan="4"><b>%s</b></td></tr>',_('Are you sure you want to permanently delete this object?'));
|
||||
else
|
||||
printf('<tr><td colspan=4><b>%s</b></td></tr>',_('Are you sure you want to permanently delete these objects?'));
|
||||
printf('<tr><td colspan="4"><b>%s</b></td></tr>',_('Are you sure you want to permanently delete these objects?'));
|
||||
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
printf('<tr><td width=10%%>%s:</td><td colspan=3 width=75%%><b>%s</b></td></tr>',_('Server'),$app['server']->getName());
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
printf('<tr><td style="width: 10%%;">%s:</td><td colspan="3" style="width: 75%%;"><b>%s</b></td></tr>',_('Server'),$app['server']->getName());
|
||||
|
||||
foreach ($request['parent'] as $dn)
|
||||
printf('<tr><td width=10%%><acronym title="%s">%s</acronym></td><td colspan=3 width=75%%><b>%s</b></td></tr>',
|
||||
printf('<tr><td style="width: 10%%;"><acronym title="%s">%s</acronym></td><td colspan="3" style="width: 75%%;"><b>%s</b></td></tr>',
|
||||
_('Distinguished Name'),_('DN'),$dn);
|
||||
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
|
||||
$request['delete'] = $request['parent'];
|
||||
|
||||
if (count($request['children'])) {
|
||||
printf('<tr><td colspan=4><b>%s</b></td></tr>',_('Permanently delete all children also?'));
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
printf('<tr><td colspan="4"><b>%s</b></td></tr>',_('Permanently delete all children also?'));
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
|
||||
# We need to see if the children have children
|
||||
$query = array();
|
||||
@@ -85,28 +85,28 @@ if (count($request['children'])) {
|
||||
array_push($request['delete'],$value['dn']);
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td colspan=4>';
|
||||
echo '<td colspan="4">';
|
||||
printf(_('This request also includes %s children entries.'),count($request['children']));
|
||||
echo '</td></tr>';
|
||||
|
||||
printf('<tr><td colspan=4>%s</td></tr>',
|
||||
printf('<tr><td colspan="4">%s</td></tr>',
|
||||
sprintf(_('phpLDAPadmin can also recursively delete all %s of the child entries. See below for a list of all the entries that this action will delete. Do you want to do this?'),count($request['children'])));
|
||||
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
|
||||
printf('<tr><td colspan=4><small>%s</small></td></tr>',
|
||||
printf('<tr><td colspan="4"><small>%s</small></td></tr>',
|
||||
_('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.'));
|
||||
echo "\n";
|
||||
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
|
||||
echo "\n";
|
||||
|
||||
printf('<tr><td colspan=4><center><b>%s</b></center></td></tr>',_('List of entries to be deleted:'));
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
printf('<tr><td colspan="4"><center><b>%s</b></center></td></tr>',_('List of entries to be deleted:'));
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
|
||||
$i = 0;
|
||||
echo '<tr><td colspan=4><center>';
|
||||
echo '<tr><td colspan="4"><center>';
|
||||
printf('<select size="%s" multiple disabled style="background:white; color:black;width:500px" >',min(10,count($request['delete'])));
|
||||
foreach ($request['delete'] as $key => $value)
|
||||
printf('<option>%s. %s</option>',++$i,htmlspecialchars(dn_unescape($value)));
|
||||
@@ -114,11 +114,11 @@ if (count($request['children'])) {
|
||||
echo '</center></td></tr>';
|
||||
echo "\n";
|
||||
|
||||
echo '<tr><td colspan=4> </td></tr>';
|
||||
echo '<tr><td colspan="4"> </td></tr>';
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td width=50% colspan=2><center>';
|
||||
echo '<td colspan="2" style="width: 50%; text-align: center;">';
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<input type="hidden" name="cmd" value="rdelete" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
@@ -128,7 +128,7 @@ printf('<input type="submit" value="%s" />',sprintf(_('Delete all %s objects'),c
|
||||
echo '</form>';
|
||||
echo '</center></td>';
|
||||
|
||||
echo '<td colspan=2 width=50%><center>';
|
||||
echo '<td colspan="2" style="width: 50%; text-align: center;">';
|
||||
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<input type="hidden" name="cmd" value="template_engine" />';
|
||||
|
@@ -64,13 +64,16 @@ $request['page'][0]->drawTitle(_('Bulk edit the following DNs'));
|
||||
$request['page'][0]->drawSubTitle(sprintf('%s: <b>%s</b>',_('Server'),$app['server']->getName()));
|
||||
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="mass_update" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
|
||||
foreach ($request['page'] as $j => $page)
|
||||
printf('<input type="hidden" name="dn[%s]" value="%s" />',$j,$page->getTemplate()->getDN());
|
||||
|
||||
echo '<table class="result_table" border=0>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<table class="result_table" border="0">';
|
||||
echo '<tr class="heading">';
|
||||
echo '<td>DN</td>';
|
||||
|
||||
@@ -122,7 +125,9 @@ foreach ($request['page'] as $j => $page) {
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
echo '<div>';
|
||||
echo '<br/>';
|
||||
printf('<input type="submit" id="save_button" name="submit" value="%s" />',_('Update Values'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
?>
|
||||
|
@@ -71,12 +71,12 @@ if (count($request['update'])) {
|
||||
foreach ($request['update'] as $j => $page)
|
||||
printf('<input type="hidden" name="dn[%s]" value="%s" />',$j,$page->getTemplate()->getDN());
|
||||
|
||||
echo '<table class="result_box" width=100% border=1>';
|
||||
echo '<table class="result_box" width="100%" border="1">';
|
||||
echo '<tr><td>';
|
||||
|
||||
echo '<br/>';
|
||||
|
||||
echo '<table class="result" border=0>';
|
||||
echo '<table class="result" border="0">';
|
||||
echo '<tr><td>';
|
||||
printf(_('There will be %s updates done with this mass update'),sprintf('<b>%s</b>',count($request['update'])));
|
||||
echo '</td></tr>';
|
||||
@@ -87,15 +87,15 @@ if (count($request['update'])) {
|
||||
foreach ($request['update'] as $index => $page) {
|
||||
$template = $page->getTemplate();
|
||||
|
||||
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($app['server']->getIndex(),$template->getDN()));
|
||||
|
||||
printf('<td colspan=3><a href="cmd.php?cmd=template_engine&server_id=%s&dn=%s">%s</a></td>',
|
||||
printf('<td colspan="3"><a href="cmd.php?cmd=template_engine&server_id=%s&dn=%s">%s</a></td>',
|
||||
$app['server']->getIndex(),rawurlencode(dn_unescape($template->getDN())),htmlspecialchars(get_rdn($template->getDN())));
|
||||
echo '</tr>';
|
||||
|
||||
printf('<tr class="list_item"><td class="blank"> </td><td class="heading">dn</td><td class="value" width="45%%">%s</td><td class="value" width="45%%"><b>%s</b></td></tr>',
|
||||
printf('<tr class="list_item"><td class="blank"> </td><td class="heading">dn</td><td class="value" style="width: 45%%;">%s</td><td class="value" style="width: 45%%;"><b>%s</b></td></tr>',
|
||||
htmlspecialchars(dn_unescape($template->getDN())),_('Old Value'));
|
||||
|
||||
foreach ($template->getLDAPmodify(true,$index) as $attribute) {
|
||||
|
@@ -79,12 +79,13 @@ usort($possible_members,'pla_compare_dns');
|
||||
echo '<br />';
|
||||
echo '<br />';
|
||||
|
||||
printf('<script type="text/javascript" language="javascript" src="%smodify_member.js"></script>',JSDIR);
|
||||
echo '<form action="cmd.php" method="post" class="add_value" name="member">';
|
||||
echo '<form action="cmd.php" method="post" class="add_value" id="member">';
|
||||
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>';
|
||||
|
||||
echo '<table class="modify_members">';
|
||||
|
||||
@@ -96,20 +97,20 @@ echo '</tr>';
|
||||
# Generate select box from all possible members
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
echo '<select name="notmembers" size="10" multiple>';
|
||||
echo '<select name="notmembers" size="10" multiple="multiple">';
|
||||
|
||||
foreach ($possible_members as $possible)
|
||||
printf('<option>%s</option>',$possible);
|
||||
printf('<option>%s</option>',htmlspecialchars($possible));
|
||||
|
||||
echo '</select>';
|
||||
echo '</td>';
|
||||
|
||||
# Generate select box from all current members
|
||||
echo '<td>';
|
||||
echo '<select name="members" size="10" multiple>';
|
||||
echo '<select name="members" size="10" multiple="multiple">';
|
||||
|
||||
foreach ($current_members as $current)
|
||||
printf('<option>%s</option>',$current);
|
||||
printf('<option>%s</option>',htmlspecialchars($current));
|
||||
|
||||
echo '</select>';
|
||||
echo '</td>';
|
||||
@@ -119,11 +120,11 @@ echo '</tr>';
|
||||
# Show buttons which move users from left to right and vice versa
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
printf('<input type="button" onClick="one2two()" value="%s >>" /> <input type="button" onClick="all2two()" value="%s >>" />',
|
||||
printf('<input type="button" onclick="one2two()" value="%s >>" /> <input type="button" onclick="all2two()" value="%s >>" />',
|
||||
_('Add selected'),_('Add all'));
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
printf('<input type="button" onClick="two2one()" value="<< %s" /> <input type="button" onClick="all2one()" value="<< %s" />',
|
||||
printf('<input type="button" onclick="two2one()" value="<< %s" /> <input type="button" onclick="all2one()" value="<< %s" />',
|
||||
_('Remove selected'),('Remove all'));
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
@@ -149,10 +150,10 @@ printf('<input type="hidden" name="new_values[%s][]" value="" />',htmlspecialcha
|
||||
echo '</div>';
|
||||
|
||||
# Submit values to update_confirm.php and when clicked, run addSelected
|
||||
printf('<input type="submit" name="save" value="%s" onClick="update_new_values(\'%s\')" />',_('Save changes'),$request['attr']);
|
||||
printf('<input type="submit" name="save" value="%s" onclick="update_new_values(\'%s\')" />',_('Save changes'),$request['attr']);
|
||||
echo '</td></tr>';
|
||||
|
||||
echo '</table>';
|
||||
echo '</form>';
|
||||
echo '</body></html>';
|
||||
printf('<script type="text/javascript" src="%smodify_member.js"></script>',JSDIR);
|
||||
?>
|
||||
|
@@ -28,13 +28,13 @@ if (! isset($attrs['monitorcontext']) || ! count($results))
|
||||
printf('<h3 class="title">%s%s</h3>',_('Monitor info for: '),$app['server']->getName());
|
||||
printf('<h3 class="subtitle">%s</h3>',_('Server reports the following information about itself'));
|
||||
|
||||
echo '<table class="result" border=0>';
|
||||
echo '<table class="result" border="0">';
|
||||
|
||||
# cn=Monitor
|
||||
printf('<tr class="list_item"><td class="heading" rowspan=2>%s</td></tr>',_('LDAP Server'));
|
||||
printf('<tr class="list_item"><td class="heading" rowspan="2">%s</td></tr>',_('LDAP Server'));
|
||||
printf('<tr class="list_item"><td class="value">');
|
||||
|
||||
echo '<table class="result" border=0>';
|
||||
echo '<table class="result" border="0">';
|
||||
printf('<tr><td>%s</td></tr>',$results[$attrs['monitorcontext'][0]]['monitoredinfo'][0]);
|
||||
echo '</table>';
|
||||
|
||||
@@ -53,10 +53,10 @@ foreach (array(
|
||||
$description = '';
|
||||
}
|
||||
|
||||
printf('<tr class="list_item"><td class="heading" rowspan=2><acronym title="%s">%s</acronym></td></tr>',$description,$dn);
|
||||
printf('<tr class="list_item"><td class="heading" rowspan="2"><acronym title="%s">%s</acronym></td></tr>',$description,$dn);
|
||||
echo '<tr class="list_item"><td class="value">';
|
||||
echo '<table class="result"><tr><td>';
|
||||
echo '<table class="result_table" border=0 width="100%">';
|
||||
echo '<table class="result_table" border="0" width="100%">';
|
||||
|
||||
$attrs = array(
|
||||
'monitorruntimeconfig',
|
||||
@@ -64,10 +64,10 @@ foreach (array(
|
||||
);
|
||||
|
||||
echo '<tr class="highlight">';
|
||||
printf('<td width="10%%">%s</td><td width="20%%">%s</td>',_('Type'),'namingContext');
|
||||
printf('<td style="width: 10%%;">%s</td><td style="width: 20%%;">%s</td>',_('Type'),'namingContext');
|
||||
|
||||
foreach ($attrs as $attr)
|
||||
printf('<td width="20%%">%s</td>',$attr);
|
||||
printf('<td style="width: 20%%;">%s</td>',$attr);
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
@@ -129,14 +129,14 @@ foreach (array(
|
||||
}
|
||||
|
||||
# cn=Connections,cn=Monitor
|
||||
printf('<tr class="list_item"><td class="heading" rowspan=2><acronym title="%s">%s</acronym></td></tr>',$results['cn=Connections,cn=Monitor']['description'],_('LDAP Connections'));
|
||||
printf('<tr class="list_item"><td class="heading" rowspan="2"><acronym title="%s">%s</acronym></td></tr>',$results['cn=Connections,cn=Monitor']['description'],_('LDAP Connections'));
|
||||
printf('<tr class="list_item"><td class="value">');
|
||||
echo '<table class="result"><tr><td>';
|
||||
echo '<table class="result_table" border=0 width="100%">';
|
||||
echo '<table class="result_table" border="0" width="100%">';
|
||||
|
||||
printf('<tr class="highlight"><td class="20%%">%s</td><td class="value" width="80%%">%s</td></tr>',
|
||||
printf('<tr class="highlight"><td class="20%%">%s</td><td class="value" style="width: 80%%;">%s</td></tr>',
|
||||
_('Total Connections'),$results['cn=Total,cn=Connections,cn=Monitor']['monitorcounter']);
|
||||
printf('<tr class="highlight"><td class="20%%">%s</td><td class="value" width="80%%">%s</td></tr>',
|
||||
printf('<tr class="highlight"><td class="20%%">%s</td><td class="value" style="width: 80%%;">%s</td></tr>',
|
||||
_('Current Connections'),$results['cn=Current,cn=Connections,cn=Monitor']['monitorcounter']);
|
||||
|
||||
# Look for some connections
|
||||
@@ -146,7 +146,7 @@ foreach ($results as $key => $value) {
|
||||
printf('<td>%s</td>',$results[$key]['cn'][0]);
|
||||
|
||||
echo '<td class="value">';
|
||||
echo '<table class="result_table" border=0 width="100%">';
|
||||
echo '<table class="result_table" border="0" width="100%">';
|
||||
|
||||
$counter = 0;
|
||||
foreach (array(
|
||||
@@ -171,7 +171,7 @@ foreach ($results as $key => $value) {
|
||||
|
||||
printf('<tr class="%s">',$counter++%2==0?'even':'odd');
|
||||
|
||||
printf('<td class="title" width="35%%">%s</td><td width="65%%">%s</td>',
|
||||
printf('<td class="title" style="width: 35%%;">%s</td><td style="width: 65%%;">%s</td>',
|
||||
$metric,isset($results[$key][$metric]) ? $results[$key][$metric][0] : ' ');
|
||||
echo '</tr>';
|
||||
}
|
||||
@@ -201,29 +201,29 @@ foreach (array(
|
||||
$description = implode(' ',$results[$dn]['description']);
|
||||
$description = preg_replace('/"/','\'',$description);
|
||||
|
||||
printf('<tr class="list_item"><td class="heading" rowspan=2><acronym title="%s">%s</acronym></td></tr>',$description,$dn);
|
||||
printf('<tr class="list_item"><td class="heading" rowspan="2"><acronym title="%s">%s</acronym></td></tr>',$description,$dn);
|
||||
echo '<tr class="list_item"><td class="value">';
|
||||
echo '<table class="result"><tr><td>';
|
||||
echo '<table class="result_table" border=0 width="100%">';
|
||||
echo '<table class="result_table" border="0" width="100%">';
|
||||
|
||||
if (isset($results[$dn]['monitoropinitiated']))
|
||||
printf('<tr class="highlight"><td width="20%%">%s</td><td class="value" width="80%%">%s</td></tr>',
|
||||
printf('<tr class="highlight"><td style="width: 20%%;">%s</td><td class="value" style="width: 80%%;">%s</td></tr>',
|
||||
'monitorOpInitiated',$results[$dn]['monitoropinitiated'][0]);
|
||||
if (isset($results[$dn]['monitoropcompleted']))
|
||||
printf('<tr class="highlight"><td width="20%%">%s</td><td class="value" width="80%%">%s</td></tr>',
|
||||
printf('<tr class="highlight"><td style="width: 20%%;">%s</td><td class="value" style="width: 80%%;">%s</td></tr>',
|
||||
'monitorOpCompleted',$results[$dn]['monitoropcompleted'][0]);
|
||||
if (isset($results[$dn]['monitoredinfo']))
|
||||
printf('<tr class="highlight"><td width="20%%">%s</td><td class="value" width="80%%">%s</td></tr>',
|
||||
printf('<tr class="highlight"><td style="width: 20%%;">%s</td><td class="value" style="width: 80%%;">%s</td></tr>',
|
||||
'monitoredInfo',$results[$dn]['monitoredinfo'][0]);
|
||||
|
||||
# Look for some connecitons
|
||||
foreach ($results as $key => $value) {
|
||||
if (preg_match('/^.*,'.$dn.'$/',$key)) {
|
||||
echo '<tr class="highlight">';
|
||||
printf('<td width="20%%">%s</td>',$results[$key]['cn'][0]);
|
||||
printf('<td style="width: 20%%;">%s</td>',$results[$key]['cn'][0]);
|
||||
|
||||
echo '<td class="value" width="80%">';
|
||||
echo '<table class="result_table" border=0 width="100%">';
|
||||
echo '<td class="value" style="width: 80%;">';
|
||||
echo '<table class="result_table" border="0" width="100%">';
|
||||
|
||||
foreach (array(
|
||||
'labeleduri',
|
||||
@@ -238,7 +238,7 @@ foreach (array(
|
||||
if (isset($results[$key][$metric])) {
|
||||
printf('<tr class="%s">',$counter++%2==0?'even':'odd');
|
||||
|
||||
printf('<td class="title" width="35%%">%s</td><td width="65%%">%s</td>',
|
||||
printf('<td class="title" style="width: 35%%;">%s</td><td style="width: 65%%;">%s</td>',
|
||||
$metric,$results[$key][$metric][0]);
|
||||
|
||||
echo '</tr>';
|
||||
|
@@ -31,7 +31,7 @@ printf('<h3 class="subtitle">%s</h3>',_('Password Checker Tool'));
|
||||
echo '<form action="password_checker.php" method="post">';
|
||||
echo '<input type="hidden" name="action" value="compare" />';
|
||||
|
||||
echo '<table class="forminput" width=100% border=0>';
|
||||
echo '<table class="forminput" width="100%" border="0">';
|
||||
|
||||
echo '<tr>';
|
||||
printf('<td class="heading">%s</td>',_('Compare'));
|
||||
|
@@ -28,7 +28,7 @@ if (! is_null($entry['value'])) {
|
||||
$entry['value'] = strtolower($entry['value']);
|
||||
}
|
||||
|
||||
$schema_error_str = sprintf('%s <b>%s</b>.<br /><br /></center>%s<ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>',
|
||||
$schema_error_str = sprintf('%s <b>%s</b>.<br /><br /></div>%s<ul><li>%s</li><li>%s</li><li>%s</li><li>%s</li></ul>',
|
||||
_('Could not retrieve schema from'),$app['server']->getName(),
|
||||
_('This could happen for several reasons, the most probable of which are:'),_('The server does not fully support the LDAP protocol.'),
|
||||
_('Your version of PHP does not correctly perform the query.'),_('phpLDAPadmin doesn\'t know how to fetch the schema for your server.'),
|
||||
@@ -43,7 +43,7 @@ $entry['schema_types'] = array(
|
||||
'matching_rules'=>_('Matching Rules'));
|
||||
|
||||
echo '<br />';
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
|
||||
$counter = 0;
|
||||
foreach ($entry['schema_types'] as $item => $value) {
|
||||
@@ -57,22 +57,21 @@ foreach ($entry['schema_types'] as $item => $value) {
|
||||
|
||||
} else {
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajDISPLAY(\'BODY\',\'%s\',\'Loading %s\');" title="Loading %s">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajDISPLAY(\'BODY\',\'%s\',\'Loading %s\');" title="Loading %s">%s</a>',
|
||||
htmlspecialchars($entry['href'][$item]),htmlspecialchars($entry['href'][$item]),$value,$value,$value);
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',htmlspecialchars($entry['href'][$item]),_($value));
|
||||
}
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
echo '<br />';
|
||||
|
||||
switch($entry['view']) {
|
||||
case 'syntaxes':
|
||||
$highlight_oid = get_request('highlight_oid','GET',false,false);
|
||||
|
||||
echo '<center>';
|
||||
echo '<table class="result_table" border=0>';
|
||||
echo '<table class="result_table" border="0" style="margin-left: auto; margin-right: auto;">';
|
||||
printf('<tr class="heading"><td>%s</td><td>%s</td></tr>',_('Syntax OID'),_('Description'));
|
||||
|
||||
$counter = 1;
|
||||
@@ -96,7 +95,6 @@ switch($entry['view']) {
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
echo '</center>';
|
||||
break;
|
||||
|
||||
case 'attributes':
|
||||
@@ -125,32 +123,34 @@ switch($entry['view']) {
|
||||
|
||||
printf('<small>%s:</small>',_('Jump to an attribute type'));
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="schema" />';
|
||||
printf('<input type="hidden" name="view" value="%s" />',$entry['view']);
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
|
||||
if (isAjaxEnabled()) {
|
||||
drawJSItems($sattrs);
|
||||
echo '<select name="viewvalue" onChange="ajSHOWSCHEMA(\'attributes\',\'at\')" id="attributes">';
|
||||
echo '<select name="viewvalue" onchange="ajSHOWSCHEMA(\'attributes\',\'at\')" id="attributes">';
|
||||
} else
|
||||
echo '<select name="viewvalue" onChange="submit()">';
|
||||
echo '<select name="viewvalue" onchange="submit()">';
|
||||
|
||||
echo '<option value=""> - all -</option>';
|
||||
foreach ($sattrs as $name => $attr)
|
||||
printf('<option value="%s" %s>%s</option>',
|
||||
$name,$name == $entry['value'] ? 'selected ': '',$attr->getName(false));
|
||||
$name,$name == $entry['value'] ? 'selected="selected" ': '',$attr->getName(false));
|
||||
echo '</select>';
|
||||
|
||||
if (isAjaxEnabled())
|
||||
printf('<input type="button" value="%s" onClick="ajSHOWSCHEMA(\'attributes\',\'at\')"/>',_('Go'));
|
||||
printf('<input type="button" value="%s" onclick="ajSHOWSCHEMA(\'attributes\',\'at\')"/>',_('Go'));
|
||||
else
|
||||
printf('<input type="submit" value="%s" />',_('Go'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
|
||||
foreach ($sattrs as $attr) {
|
||||
if (isAjaxEnabled() || (is_null($entry['value']) || ! strcasecmp($entry['value'],$attr->getName()))) {
|
||||
if (! is_null($entry['value']) && strcasecmp($entry['value'],$attr->getName()))
|
||||
if (isAjaxEnabled() || (is_null($entry['value']) || ! trim($entry['value']) || $entry['value']==$attr->getName())) {
|
||||
if ((! is_null($entry['value']) && $entry['value']==$attr->getName()) || ! trim($entry['value']))
|
||||
$entry['viewed'] = true;
|
||||
|
||||
if (isAjaxEnabled() && $entry['value'])
|
||||
@@ -158,8 +158,8 @@ switch($entry['view']) {
|
||||
else
|
||||
printf('<div id="at%s">',$attr->getName());
|
||||
|
||||
echo '<table class="result_table" width=100% border=0>';
|
||||
printf('<tr class="heading"><td colspan=2><a name="%s">%s</a></td></tr>',
|
||||
echo '<table class="result_table" width="100%" border="0">';
|
||||
printf('<tr class="heading"><td colspan="2"><a name="%s">%s</a></td></tr>',
|
||||
$attr->getName(),$attr->getName(false));
|
||||
|
||||
$counter = 0;
|
||||
@@ -167,7 +167,7 @@ switch($entry['view']) {
|
||||
foreach ($entry['attr_types'] as $item => $value) {
|
||||
|
||||
printf('<tr class="%s">',++$counter%2 ? 'odd' : 'even');
|
||||
printf('<td class="title" width=30%%>%s</td>',$value);
|
||||
printf('<td class="title" style="width: 30%%;">%s</td>',$value);
|
||||
|
||||
switch ($item) {
|
||||
case 'desc':
|
||||
@@ -195,7 +195,7 @@ switch($entry['view']) {
|
||||
else {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['attributes'],strtolower($attr->getSupAttribute())));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajSHOWSCHEMA(\'attributes\',\'at\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajSHOWSCHEMA(\'attributes\',\'at\',\'%s\');">%s</a>',
|
||||
$href,strtolower($attr->getSupAttribute()),$attr->getSupAttribute());
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$attr->getSupAttribute());
|
||||
@@ -213,7 +213,7 @@ switch($entry['view']) {
|
||||
else {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['matching_rules'],$attr->getEquality()));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a>',
|
||||
$href,$href,_('Matching Rules'),$attr->getEquality(),$attr->getEquality());
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$attr->getEquality());
|
||||
@@ -241,7 +241,7 @@ switch($entry['view']) {
|
||||
} else {
|
||||
$href = htmlspecialchars(sprintf('%s&highlight_oid=%s',$entry['href']['syntaxes'],$attr->getSyntaxOID()));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s (%s)</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s (%s)</a>',
|
||||
$href,$href,_('Syntaxes'),'',$attr->getType(),$attr->getSyntaxOID());
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s (%s)</a>',$href,$attr->getType(),$attr->getSyntaxOID());
|
||||
@@ -289,7 +289,7 @@ switch($entry['view']) {
|
||||
foreach ($attr->getAliases() as $alias) {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['attributes'],strtolower($alias)));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajSHOWSCHEMA(\'attributes\',\'at\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajSHOWSCHEMA(\'attributes\',\'at\',\'%s\');">%s</a>',
|
||||
$href,strtolower($alias),$alias);
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$alias);
|
||||
@@ -308,7 +308,7 @@ switch($entry['view']) {
|
||||
foreach ($attr->getUsedInObjectClasses() as $objectclass) {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($objectclass)));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a> ',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a> ',
|
||||
$href,$href,_('ObjectClasses'),strtolower($objectclass),$objectclass);
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a> ',$href,$objectclass);
|
||||
@@ -340,33 +340,35 @@ switch($entry['view']) {
|
||||
printf('<small>%s</small><br />',_('Jump to a matching rule'));
|
||||
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="schema" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
echo '<input type="hidden" name="view" value="matching_rules" />';
|
||||
|
||||
if (isAjaxEnabled()) {
|
||||
drawJSItems($schema_matching_rules);
|
||||
echo '<select name="viewvalue" onChange="ajSHOWSCHEMA(\'matchingrules\',\'mr\')" id="matchingrules">';
|
||||
echo '<select name="viewvalue" onchange="ajSHOWSCHEMA(\'matchingrules\',\'mr\')" id="matchingrules">';
|
||||
} else
|
||||
echo '<select name="viewvalue" onChange="submit()">';
|
||||
echo '<select name="viewvalue" onchange="submit()">';
|
||||
|
||||
echo '<option value=""> - all -</option>';
|
||||
foreach ($schema_matching_rules as $rule)
|
||||
printf('<option value="%s" %s>%s</option>',
|
||||
$rule->getName(),
|
||||
($rule->getName() == $entry['value'] ? 'selected': ''),
|
||||
($rule->getName() == $entry['value'] ? 'selected="selected"': ''),
|
||||
$rule->getName(false));
|
||||
|
||||
echo '</select>';
|
||||
|
||||
if (isAjaxEnabled())
|
||||
printf('<input type="button" value="%s" onClick="ajSHOWSCHEMA(\'matchingrules\',\'mr\')"/>',_('Go'));
|
||||
printf('<input type="button" value="%s" onclick="ajSHOWSCHEMA(\'matchingrules\',\'mr\')"/>',_('Go'));
|
||||
else
|
||||
printf('<input type="submit" value="%s" />',_('Go'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
|
||||
echo '<table class="result_table" width=100% border=0>';
|
||||
echo '<table class="result_table" width="100%" border="0">';
|
||||
printf('<tr class="heading"><td>%s</td><td>%s</td><td>%s</td></tr>',
|
||||
_('Matching Rule OID'),_('Name'),_('Used by Attributes'));
|
||||
|
||||
@@ -377,8 +379,8 @@ switch($entry['view']) {
|
||||
$oid = $rule->getOID();
|
||||
$desc = $rule->getName(false);
|
||||
|
||||
if (isAjaxEnabled() || (is_null($entry['value']) || ! strcasecmp($entry['value'],$rule->getName()))) {
|
||||
if (! is_null($entry['value']) && strcasecmp($entry['value'],$rule->getName()))
|
||||
if (isAjaxEnabled() || (is_null($entry['value']) || ! trim($entry['value']) || $entry['value']==$rule->getName())) {
|
||||
if ((! is_null($entry['value']) && $entry['value']==$rule->getName()) || ! trim($entry['value']))
|
||||
$entry['viewed'] = true;
|
||||
|
||||
if (null != $rule->getDescription())
|
||||
@@ -398,11 +400,12 @@ switch($entry['view']) {
|
||||
echo '<td>';
|
||||
|
||||
if (count($rule->getUsedByAttrs()) == 0) {
|
||||
printf('<center>(%s)</center><br /><br />',_('none'));
|
||||
printf('<div style="text-align: center;">(%s)</div><br /><br />',_('none'));
|
||||
|
||||
} else {
|
||||
echo '<table width=100% border=0><tr><td>';
|
||||
echo '<table width="100%" border="0"><tr><td>';
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="schema" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
echo '<input type="hidden" name="view" value="attributes" />';
|
||||
@@ -413,10 +416,11 @@ switch($entry['view']) {
|
||||
echo '</select><br />';
|
||||
|
||||
if (isAjaxEnabled())
|
||||
printf('<input type="button" value="%s" onClick="return ajJUMP(\'cmd=schema&view=attributes&server_id=%s\',\'%s\',\'%s\',\'vv\');"/>',
|
||||
printf('<input type="button" value="%s" onclick="return ajJUMP(\'cmd=schema&view=attributes&server_id=%s\',\'%s\',\'%s\',\'vv\');"/>',
|
||||
_('Go'),$app['server']->getIndex(),_('Attributes'),$rule->getName());
|
||||
else
|
||||
printf('<input type="submit" value="%s" />',_('Go'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '</td></tr></table>';
|
||||
}
|
||||
@@ -436,33 +440,35 @@ switch($entry['view']) {
|
||||
printf('<small>%s:</small>',_('Jump to an objectClass'));
|
||||
|
||||
echo '<form action="cmd.php" method="get">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="schema" />';
|
||||
printf('<input type="hidden" name="view" value="%s" />',$entry['view']);
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
|
||||
if (isAjaxEnabled()) {
|
||||
drawJSItems($socs);
|
||||
echo '<select name="viewvalue" onChange="ajSHOWSCHEMA(\'objectclasses\',\'oc\')" id="objectclasses">';
|
||||
echo '<select name="viewvalue" onchange="ajSHOWSCHEMA(\'objectclasses\',\'oc\')" id="objectclasses">';
|
||||
} else
|
||||
echo '<select name="viewvalue" onChange="submit()">';
|
||||
echo '<select name="viewvalue" onchange="submit()">';
|
||||
|
||||
echo '<option value=""> - all - </option>';
|
||||
foreach ($socs as $name => $oclass)
|
||||
printf('<option value="%s" %s>%s</option>',
|
||||
$name,$name == $entry['value'] ? 'selected ': '',$oclass->getName(false));
|
||||
$name,$name == $entry['value'] ? 'selected="selected" ': '',$oclass->getName(false));
|
||||
|
||||
echo '</select>';
|
||||
|
||||
if (isAjaxEnabled())
|
||||
printf('<input type="button" value="%s" onClick="ajSHOWSCHEMA(\'objectclasses\',\'oc\')"/>',_('Go'));
|
||||
printf('<input type="button" value="%s" onclick="ajSHOWSCHEMA(\'objectclasses\',\'oc\')"/>',_('Go'));
|
||||
else
|
||||
printf('<input type="submit" value="%s" />',_('Go'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
|
||||
foreach ($socs as $name => $oclass) {
|
||||
if (isAjaxEnabled() || (is_null($entry['value']) || ! strcasecmp($entry['value'],$oclass->getName()))) {
|
||||
if (! is_null($entry['value']) && strcasecmp($entry['value'],$oclass->getName()))
|
||||
if (isAjaxEnabled() || (is_null($entry['value']) || ! trim($entry['value']) || $entry['value']==$oclass->getName())) {
|
||||
if ((! is_null($entry['value']) && $entry['value']==$oclass->getName()) || ! trim($entry['value']))
|
||||
$entry['viewed'] = true;
|
||||
|
||||
if (isAjaxEnabled() && $entry['value'])
|
||||
@@ -470,19 +476,19 @@ switch($entry['view']) {
|
||||
else
|
||||
printf('<div id="oc%s">',$oclass->getName());
|
||||
|
||||
echo '<table class="result_table" width=100% border=0>';
|
||||
printf('<tr class="heading"><td colspan=4><a name="%s">%s</a></td></tr>',$name,$oclass->getName(false));
|
||||
printf('<tr class="odd"><td colspan=4>%s: <b>%s</b></td></tr>',_('OID'),$oclass->getOID());
|
||||
echo '<table class="result_table" width="100%" border="0">';
|
||||
printf('<tr class="heading"><td colspan="4"><a name="%s">%s</a></td></tr>',$name,$oclass->getName(false));
|
||||
printf('<tr class="odd"><td colspan="4">%s: <b>%s</b></td></tr>',_('OID'),$oclass->getOID());
|
||||
|
||||
if ($oclass->getDescription())
|
||||
printf('<tr class="odd"><td colspan=4>%s: <b>%s</b></td></tr>',_('Description'),$oclass->getDescription());
|
||||
printf('<tr class="odd"><td colspan="4">%s: <b>%s</b></td></tr>',_('Description'),$oclass->getDescription());
|
||||
|
||||
printf('<tr class="odd"><td colspan=4>%s: <b>%s</b></td></tr>',_('Type'),$oclass->getType());
|
||||
printf('<tr class="odd"><td colspan="4">%s: <b>%s</b></td></tr>',_('Type'),$oclass->getType());
|
||||
|
||||
if ($oclass->getIsObsolete())
|
||||
printf('<tr class="odd"><td colspan=4>%s</td></tr>',_('This objectClass is obsolete.'));
|
||||
printf('<tr class="odd"><td colspan="4">%s</td></tr>',_('This objectClass is obsolete.'));
|
||||
|
||||
printf('<tr class="odd"><td colspan=4>%s: <b>',_('Inherits from'));
|
||||
printf('<tr class="odd"><td colspan="4">%s: <b>',_('Inherits from'));
|
||||
if (count($oclass->getSupClasses()) == 0)
|
||||
printf('(%s)',_('none'));
|
||||
|
||||
@@ -490,7 +496,7 @@ switch($entry['view']) {
|
||||
foreach ($oclass->getSupClasses() as $i => $object_class) {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($object_class)));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
$href,strtolower($object_class),$object_class);
|
||||
else
|
||||
printf('<a href="cmd.php?%s&viewvalue=%s" title="%s">%s</a>',
|
||||
@@ -501,11 +507,11 @@ switch($entry['view']) {
|
||||
}
|
||||
echo '</b></td></tr>';
|
||||
|
||||
printf('<tr class="odd"><td colspan=4>%s: <b>',_('Parent to'));
|
||||
printf('<tr class="odd"><td colspan="4">%s: <b>',_('Parent to'));
|
||||
if (strcasecmp($oclass->getName(),'top') == 0) {
|
||||
$href = htmlspecialchars($entry['href']['objectclasses']);
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'\');">all</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'\');">all</a>',
|
||||
$href);
|
||||
else
|
||||
printf('(<a href="cmd.php?%s">all</a>)',$href);
|
||||
@@ -517,7 +523,7 @@ switch($entry['view']) {
|
||||
foreach ($oclass->getChildObjectClasses() as $i => $object_class) {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($object_class)));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" title="%s" onClick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" title="%s" onclick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
$href,_('Jump to this objectClass definition'),strtolower($object_class),$object_class);
|
||||
else
|
||||
printf('<a href="cmd.php?%s" title="%s">%s</a>',$href,_('Jump to this objectClass definition'),$object_class);
|
||||
@@ -527,7 +533,7 @@ switch($entry['view']) {
|
||||
}
|
||||
echo '</b></td></tr>';
|
||||
|
||||
printf('<tr class="even"><td class="blank" rowspan=2 width=5%%> </td><td width=45%%><b>%s</b></td><td width=45%%><b>%s</b></td><td class="blank" rowspan=2 width=5%%> </td></tr>',
|
||||
printf('<tr class="even"><td class="blank" rowspan="2" style="width: 5%%;"> </td><td style="width: 45%%;"><b>%s</b></td><td style="width: 45%%;"><b>%s</b></td><td class="blank" rowspan="2" style="width: 5%%;"> </td></tr>',
|
||||
_('Required Attributes'),_('Optional Attributes'));
|
||||
|
||||
echo '<tr class="odd">';
|
||||
@@ -540,7 +546,7 @@ switch($entry['view']) {
|
||||
echo '<li>';
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['attributes'],$attr->getName()));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a>',
|
||||
$href,$href,_('Attributes'),$attr->getName(),$attr->getName(false));
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$attr->getName(false));
|
||||
@@ -550,7 +556,7 @@ switch($entry['view']) {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($attr->getSource())));
|
||||
printf('<small>(%s ',_('Inherited from'));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" title="%s" onClick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" title="%s" onclick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
$href,_('Jump to this objectClass definition'),strtolower($attr->getSource()),$attr->getSource());
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$attr->getSource());
|
||||
@@ -573,7 +579,7 @@ switch($entry['view']) {
|
||||
echo '<li>';
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['attributes'],$attr->getName()));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" onClick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" onclick="return ajJUMP(\'%s\',\'%s\',\'%s\');">%s</a>',
|
||||
$href,$href,_('Attributes'),$attr->getName(),$attr->getName(false));
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$attr->getName(false));
|
||||
@@ -583,7 +589,7 @@ switch($entry['view']) {
|
||||
$href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($attr->getSource())));
|
||||
printf('<small>(%s ',_('Inherited from'));
|
||||
if (isAjaxEnabled())
|
||||
printf('<a href="cmd.php?%s" title="%s" onClick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
printf('<a href="cmd.php?%s" title="%s" onclick="return ajSHOWSCHEMA(\'objectclasses\',\'oc\',\'%s\');">%s</a>',
|
||||
$href,_('Jump to this objectClass definition'),strtolower($attr->getSource()),$attr->getSource());
|
||||
else
|
||||
printf('<a href="cmd.php?%s">%s</a>',$href,$attr->getSource());
|
||||
@@ -615,7 +621,7 @@ if (! is_null($entry['value']) && ! $entry['viewed'])
|
||||
error(sprintf(_('No such schema item: "%s"'),$entry['value']),'error','index.php');
|
||||
|
||||
function drawJSItems($object) {
|
||||
echo '<script type="text/javascript" language="javascript">'."\n";
|
||||
echo '<script type="text/javascript">'."\n";
|
||||
|
||||
echo "
|
||||
function items() {
|
||||
|
@@ -18,16 +18,16 @@ printf('<h3 class="subtitle">%s</h3>',_('Server reports the following informatio
|
||||
|
||||
if (! count($attrs)) {
|
||||
echo '<br /><br />';
|
||||
printf('<center>%s</center>',_('This server has nothing to report.'));
|
||||
printf('<div style="text-align: center;">%s</div>',_('This server has nothing to report.'));
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<table class="result" border=0>';
|
||||
echo '<table class="result" border="0">';
|
||||
foreach ($attrs as $key => $values) {
|
||||
if ($key == 'dn')
|
||||
continue;
|
||||
|
||||
echo '<tr class="list_item"><td class="heading" rowspan=2>';
|
||||
echo '<tr class="list_item"><td class="heading" rowspan="2">';
|
||||
|
||||
$sattr = $app['server']->getSchemaAttribute($key);
|
||||
|
||||
@@ -42,7 +42,7 @@ foreach ($attrs as $key => $values) {
|
||||
echo '</td></tr>';
|
||||
|
||||
echo '<tr class="list_item"><td class="blank"> </td><td class="value">';
|
||||
echo '<table class="result" border=0>';
|
||||
echo '<table class="result" border="0">';
|
||||
|
||||
if (is_array($values))
|
||||
foreach ($values as $value) {
|
||||
@@ -50,7 +50,7 @@ foreach ($attrs as $key => $values) {
|
||||
print '<tr>';
|
||||
|
||||
if (preg_match('/^[0-9]+\.[0-9]+/',$value)) {
|
||||
printf('<td width=5%% rowspan=2 style="vertical-align: top"><img src="%s/rfc.png" title="%s" alt="%s"/></td>',
|
||||
printf('<td rowspan="2" style="width: 5%%; vertical-align: top"><img src="%s/rfc.png" title="%s" alt="%s"/></td>',
|
||||
IMGDIR,$value,htmlspecialchars($value));
|
||||
|
||||
if ($oidtext = support_oid_to_text($value))
|
||||
@@ -64,7 +64,7 @@ foreach ($attrs as $key => $values) {
|
||||
printf('<td><small>%s</small></td>',$value);
|
||||
|
||||
} else {
|
||||
printf('<td rowspan=2 colspan=2>%s</td>',$value);
|
||||
printf('<td rowspan="2" colspan="2">%s</td>',$value);
|
||||
}
|
||||
|
||||
print '</tr>';
|
||||
@@ -75,11 +75,11 @@ foreach ($attrs as $key => $values) {
|
||||
echo '<tr><td> </td></tr>';
|
||||
|
||||
if ($oidtext)
|
||||
echo '<tr><td colspan=2> </td></tr>';
|
||||
echo '<tr><td colspan="2"> </td></tr>';
|
||||
}
|
||||
|
||||
else
|
||||
printf('<tr><td colspan=2>%s </td></tr>',$values);
|
||||
printf('<tr><td colspan="2">%s </td></tr>',$values);
|
||||
|
||||
|
||||
echo '</table>';
|
||||
|
@@ -32,20 +32,23 @@ $request['page']->drawSubTitle();
|
||||
|
||||
# Confirm the updates
|
||||
if (count($request['template']->getLDAPmodify(true))) {
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
echo _('Do you want to make these changes?');
|
||||
echo '<br /><br />';
|
||||
echo '</div>';
|
||||
|
||||
echo "\n\n";
|
||||
echo '<form action="cmd.php" method="post">';
|
||||
echo '<div>';
|
||||
echo '<input type="hidden" name="cmd" value="update" />';
|
||||
printf('<input type="hidden" name="server_id" value="%s" />',$app['server']->getIndex());
|
||||
printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($request['dn']));
|
||||
echo "\n";
|
||||
|
||||
$request['page']->drawHiddenAttributes();
|
||||
echo '</div>';
|
||||
|
||||
echo '<table class="result_table">';
|
||||
echo '<table class="result_table" style="margin-left: auto; margin-right: auto;">';
|
||||
echo "\n";
|
||||
|
||||
printf('<tr class="heading"><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',
|
||||
@@ -182,9 +185,11 @@ if (count($request['template']->getLDAPmodify(true))) {
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '<div style="text-align: center;">';
|
||||
echo '<br />';
|
||||
printf('<input type="submit" value="%s" />',_('Commit'));
|
||||
printf('<input type="submit" name="cancel" value="%s" />',_('Cancel'));
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo '<br />';
|
||||
|
||||
@@ -206,16 +211,14 @@ if (count($request['template']->getLDAPmodify(true))) {
|
||||
echo '</b></td></tr></table>';
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
|
||||
} else {
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
echo _('You made no changes');
|
||||
$href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',
|
||||
$app['server']->getIndex(),rawurlencode($request['dn']));
|
||||
|
||||
printf(' <a href="%s">%s</a>.',htmlspecialchars($href),_('Go back'));
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
function getMustAttrs($oclasses) {
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
require './common.php';
|
||||
|
||||
echo '<center>';
|
||||
echo '<div style="text-align: center;">';
|
||||
echo '<br /><br />';
|
||||
printf('<img src="%s/logo.png" title="%s" alt="%s" />',IMGDIR,_('phpLDAPadmin logo'),_('phpLDAPadmin logo'));
|
||||
echo '<br /><br />';
|
||||
@@ -19,11 +19,11 @@ echo _('Use the menu to the left to navigate');
|
||||
echo '<br /><br />';
|
||||
|
||||
if ($_SESSION[APPCONFIG]->isCommandAvailable('cmd','oslinks')) {
|
||||
printf('<a href="%s" target="_blank">%s</a>',get_href('credits'),_('Credits'));
|
||||
printf(' | <a href="%s" target="_blank">%s</a>',get_href('documentation'),_('Documentation'));
|
||||
printf(' | <a href="%s" target="_blank">%s</a>',get_href('donate'),_('Donate'));
|
||||
printf('<a href="%s" onclick="target=\'_blank\';">%s</a>',get_href('credits'),_('Credits'));
|
||||
printf(' | <a href="%s" onclick="target=\'_blank\';">%s</a>',get_href('documentation'),_('Documentation'));
|
||||
printf(' | <a href="%s" onclick="target=\'_blank\';">%s</a>',get_href('donate'),_('Donate'));
|
||||
echo '<br /><br />';
|
||||
}
|
||||
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
?>
|
||||
|
Reference in New Issue
Block a user