diff --git a/htdocs/add_attr_form.php b/htdocs/add_attr_form.php
deleted file mode 100644
index 7f72841..0000000
--- a/htdocs/add_attr_form.php
+++ /dev/null
@@ -1,185 +0,0 @@
-dnExists($request['dn']))
- error(sprintf(_('The entry (%s) does not exist.'),$request['dn']),'error','index.php');
-
-$request['page'] = new TemplateRender($app['server']->getIndex(),get_request('template','REQUEST',false,null));
-$request['page']->setDN($request['dn']);
-$request['page']->accept(true);
-$request['template'] = $request['page']->getTemplate();
-
-# Render the form
-if (get_request('meth','REQUEST') != 'ajax') {
- $request['page']->drawTitle(sprintf('%s %s',_('Add new attribute'),get_rdn($request['dn'])));
- $request['page']->drawSubTitle();
-
- echo '
';
- 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')) {
- $attr = array();
- $attr['avail'] = array();
- $attr['binary'] = array();
-
- foreach ($request['template']->getAvailAttrs() as $attribute)
- if ($app['server']->isAttrBinary($attribute->getName()))
- array_push($attr['binary'],$attribute);
- else
- array_push($attr['avail'],$attribute);
-
- if (count($attr['avail']) > 0) {
- echo '
';
- echo _('Add new attribute');
- echo '
';
- echo '
';
-
- echo '
';
-
- } else {
- echo '
';
- printf('
(%s)',_('no new attributes available for this entry'));
- }
-
- if (count($attr['binary']) > 0) {
- echo '
';
- echo _('Add new binary attribute');
- echo '
';
- echo '
';
-
- echo '';
- echo '
';
-
- } else {
- echo '
';
- printf('
(%s)',_('no new binary attributes available for this entry'));
- }
-
- } else {
- echo '
';
-
- $request['page']->drawFormStart();
- printf('
',$app['server']->getIndex());
- printf('
',htmlspecialchars($request['dn']));
-
- echo '
';
-
- foreach ($request['template']->getAvailAttrs() as $attribute)
- $request['page']->draw('Template',$attribute);
-
- $request['page']->drawFormSubmitButton();
- echo '
';
-
- $request['page']->drawFormEnd();
- }
-
- } else {
- printf('
(%s)',_('no new attributes available for this entry'));
- }
-
- echo '
';
-
-# The ajax addition (it is going into an existing TemplateRendered page
-} else {
- # Put our DIV there for the callback
- echo '';
-
-# cn=Monitor
-printf('%s |
',_('LDAP Server'));
-printf('');
-
-echo '';
-printf('%s | ',$results[$attrs['monitorcontext'][0]]['monitoredinfo'][0]);
-echo ' ';
-
-echo ' |
';
-
-foreach (array(
- 'cn=Backends,cn=Monitor' => 'cn=Backend %s,%s',
- 'cn=Overlays,cn=Monitor' => 'cn=Overlay %s,%s'
- ) as $dn => $child) {
-
- if (isset($results[$dn]['description'])) {
- $description = implode(' ',$results[$dn]['description']);
-
- $description = preg_replace('/"/','\'',$description);
- } else {
- $description = '';
- }
-
- printf('%s |
',$description,$dn);
- echo '';
- echo '';
- echo '';
-
- $attrs = array(
- 'monitorruntimeconfig',
- 'supportedcontrol'
- );
-
- echo '';
- printf('%s | %s | ',_('Type'),'namingContext');
-
- foreach ($attrs as $attr)
- printf('%s | ',$attr);
-
- echo ' ';
-
- $counter = 0;
- foreach ($results[$dn]['monitoredinfo'] as $index => $backend) {
- printf('',$counter++%2==0?'even':'odd');
- printf('%s | ',$backend);
-
- $key = sprintf($child,$index,$dn);
-
- echo '';
- if (isset($results[$key]['seealso'])) {
- $seealso = is_array($results[$key]['seealso']) ? $results[$key]['seealso'] : array($results[$key]['seealso']);
-
- foreach ($seealso as $db)
- if (isset($results[$db]['namingcontexts']))
- printf('%s ',
- isset($results[$db]['labeleduri']) ? implode(' ',$results[$db]['labeleduri']) : _('Internal'),
- implode(' ',$results[$db]['namingcontexts']));
- else
- printf('%s ',implode(' ',$results[$db]['monitoredinfo']));
-
- } else {
- echo ' ';
- }
- echo ' | ';
-
- foreach ($attrs as $attr) {
- echo '';
- if (isset($results[$key][$attr])) {
- if (! is_array($results[$key][$attr]))
- $sc = array($results[$key][$attr]);
- else
- $sc = $results[$key][$attr];
-
- if (strcasecmp('supportedcontrol',$attr) == 0)
- foreach ($sc as $control) {
- $oidtotext = support_oid_to_text($control);
-
- printf('%s ',
- $control,$oidtotext['title']);
- }
-
- else
- printf('%s ',implode(' ',$sc));
-
- } else {
- echo ' ';
- }
-
- echo ' | ';
- }
- echo ' ';
- }
-
- echo ' | ';
- echo ' ';
- echo ' |
';
-}
-
-# cn=Connections,cn=Monitor
-printf('%s |
',$results['cn=Connections,cn=Monitor']['description'][0],_('LDAP Connections'));
-printf('');
-echo '';
-echo '';
-
-printf('%s | %s | ',
- _('Total Connections'),$results['cn=Total,cn=Connections,cn=Monitor']['monitorcounter'][0]);
-printf('%s | %s | ',
- _('Current Connections'),$results['cn=Current,cn=Connections,cn=Monitor']['monitorcounter'][0]);
-
-# Look for some connections
-foreach ($results as $key => $value) {
- if (preg_match('/^cn=Connection.*,cn=Connections,cn=Monitor$/',$key)) {
- echo '';
- printf('%s | ',$results[$key]['cn'][0]);
-
- echo '';
- echo '';
-
- $counter = 0;
- foreach (array(
- 'monitorconnectionactivitytime',
- 'monitorconnectionauthzdn',
- 'monitorconnectionget',
- 'monitorconnectionlistener',
- 'monitorconnectionlocaladdress',
- 'monitorconnectionmask',
- 'monitorconnectionnumber',
- 'monitorconnectionopscompleted',
- 'monitorconnectionopsexecuting',
- 'monitorconnectionopspending',
- 'monitorconnectionopsreceived',
- 'monitorconnectionpeeraddress',
- 'monitorconnectionpeerdomain',
- 'monitorconnectionprotocol',
- 'monitorconnectionread',
- 'monitorconnectionstarttime',
- 'monitorconnectionwrite'
- ) as $metric) {
-
- printf('',$counter++%2==0?'even':'odd');
-
- printf('%s | %s | ',
- $metric,isset($results[$key][$metric]) ? $results[$key][$metric][0] : ' ');
- echo ' ';
- }
-
- echo ' ';
- echo ' | ';
- echo ' ';
- }
-}
-
-echo ' | ';
-echo ' ';
-echo ' |
';
-
-foreach (array(
- 'cn=Listeners,cn=Monitor',
- 'cn=Log,cn=Monitor',
- 'cn=Operations,cn=Monitor',
- 'cn=SASL,cn=Monitor',
- 'cn=TLS,cn=Monitor',
- 'cn=Statistics,cn=Monitor',
- 'cn=Threads,cn=Monitor',
- 'cn=Time,cn=Monitor',
- 'cn=Waiters,cn=Monitor'
- ) as $dn ) {
-
- $description = implode(' ',$results[$dn]['description']);
- $description = preg_replace('/"/','\'',$description);
-
- printf('%s |
',$description,$dn);
- echo '';
- echo '';
- echo '';
-
- if (isset($results[$dn]['monitoropinitiated']))
- printf('%s | %s | ',
- 'monitorOpInitiated',$results[$dn]['monitoropinitiated'][0]);
- if (isset($results[$dn]['monitoropcompleted']))
- printf('%s | %s | ',
- 'monitorOpCompleted',$results[$dn]['monitoropcompleted'][0]);
- if (isset($results[$dn]['monitoredinfo']))
- printf('%s | %s | ',
- 'monitoredInfo',$results[$dn]['monitoredinfo'][0]);
-
- # Look for some connecitons
- foreach ($results as $key => $value) {
- if (preg_match('/^.*,'.$dn.'$/',$key)) {
- echo '';
- printf('%s | ',$results[$key]['cn'][0]);
-
- echo '';
- echo '';
-
- foreach (array(
- 'labeleduri',
- 'monitorconnectionlocaladdress',
- 'monitoredinfo',
- 'monitorcounter',
- 'monitoropinitiated',
- 'monitoropcompleted',
- 'monitortimestamp'
- ) as $metric) {
-
- if (isset($results[$key][$metric])) {
- printf('',$counter++%2==0?'even':'odd');
-
- printf('%s | %s | ',
- $metric,$results[$key][$metric][0]);
-
- echo ' ';
- }
- }
-
- echo ' ';
- echo ' | ';
- echo ' ';
- }
- }
- echo ' | ';
- echo ' ';
- echo ' |
';
-}
-
-echo '
';
-?>
diff --git a/lib/AttributeFactory.php b/lib/AttributeFactory.php
deleted file mode 100644
index f52e939..0000000
--- a/lib/AttributeFactory.php
+++ /dev/null
@@ -1,148 +0,0 @@
-getValue('appearance','hide_template_warning'))
- system_message(array(
- 'title'=>sprintf('%s [