diff --git a/htdocs/add_attr_form.php b/htdocs/add_attr_form.php index 565b0b7..763349e 100644 --- a/htdocs/add_attr_form.php +++ b/htdocs/add_attr_form.php @@ -29,7 +29,7 @@ if (get_request('meth','REQUEST') != 'ajax') { $request['page']->drawTitle(sprintf('%s %s',_('Add new attribute'),get_rdn($request['dn']))); $request['page']->drawSubTitle(); - echo '
'; + 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')) { @@ -50,6 +50,7 @@ if (get_request('meth','REQUEST') != 'ajax') { echo '
'; echo '
'; + echo '
'; if ($_SESSION[APPCONFIG]->getValue('confirm','update')) echo ''; @@ -75,6 +76,7 @@ if (get_request('meth','REQUEST') != 'ajax') { echo ''; printf('',_('Add')); + echo '
'; echo '
'; } else { @@ -90,6 +92,7 @@ if (get_request('meth','REQUEST') != 'ajax') { echo ''; echo '
'; + echo '
'; if ($_SESSION[APPCONFIG]->getValue('confirm','update')) echo ''; @@ -124,6 +127,7 @@ if (get_request('meth','REQUEST') != 'ajax') { else printf('
%s: %s
',_('Maximum file size'),ini_get('upload_max_filesize')); + echo '
'; echo '
'; } else { @@ -138,7 +142,7 @@ if (get_request('meth','REQUEST') != 'ajax') { printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); - echo ''; + echo '
'; foreach ($request['template']->getAvailAttrs() as $attribute) $request['page']->draw('Template',$attribute); @@ -153,7 +157,7 @@ if (get_request('meth','REQUEST') != 'ajax') { printf('(%s)',_('no new attributes available for this entry')); } - echo ''; + echo ''; # The ajax addition (it is going into an existing TemplateRendered page } else { @@ -161,10 +165,10 @@ if (get_request('meth','REQUEST') != 'ajax') { echo '
'; printf('%s',_('Add Attribute')); echo '
'; - echo '
'; + echo '
'; echo '
'; - printf('', 'ADDATTR',$app['server']->getIndex(),rawurlencode(get_request('dn','REQUEST')),_('Please Wait')); printf('','',''); diff --git a/htdocs/add_oclass_form.php b/htdocs/add_oclass_form.php index 9bfef6d..9330ce1 100644 --- a/htdocs/add_oclass_form.php +++ b/htdocs/add_oclass_form.php @@ -60,7 +60,7 @@ if (count($ldap['attrs']['need']) > 0) { $request['page']->drawTitle(sprintf('%s %s',_('Add new objectClass to'),get_rdn($request['dn']))); $request['page']->drawSubTitle(); - echo '
'; + echo '
'; printf('%s: %s %s %s %s', _('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 '

'; - echo '
'; + echo ''; + echo '
'; if ($_SESSION[APPCONFIG]->getValue('confirm','update')) echo ''; @@ -78,27 +79,25 @@ if (count($ldap['attrs']['need']) > 0) { printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); + echo '
'; - echo ''; + echo '
'; printf('',_('New Required Attributes')); $counter = 0; - foreach ($request['template']->getAttribute('objectclass')->getValues() as $value) { - echo ''; - } + echo ''; foreach ($ldap['attrs']['need'] as $count => $attr) $request['page']->draw('Template',$attr); echo '
%s
'; + echo '
'; + foreach ($request['template']->getAttribute('objectclass')->getValues() as $value) $request['page']->draw('HiddenValue',$request['template']->getAttribute('objectclass'),$counter++); - echo '
'; - echo '
'; - - printf('
',_('Add ObjectClass and Attributes')); + printf('

',_('Add ObjectClass and Attributes')); echo '
'; - echo '
'; + echo ''; # There are no other required attributes, so we just need to add the objectclass to the DN. } else { diff --git a/htdocs/add_value_form.php b/htdocs/add_value_form.php index 33e39bd..2100f6a 100644 --- a/htdocs/add_value_form.php +++ b/htdocs/add_value_form.php @@ -38,11 +38,13 @@ if (get_request('meth','REQUEST') != 'ajax') { $request['page']->drawSubTitle(); if (! strcasecmp($request['attr'],'objectclass')) { - echo '
'; + echo ''; + echo '
'; echo ''; } else { - echo ''; + echo ''; + echo '
'; if ($_SESSION[APPCONFIG]->getValue('confirm','update')) echo ''; else @@ -51,9 +53,9 @@ if (get_request('meth','REQUEST') != 'ajax') { printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); + echo '
'; - echo '
'; - echo ''; + echo '
'; echo ''; $request['attribute'] = $request['template']->getAttribute($request['attr']); @@ -66,7 +68,7 @@ if (get_request('meth','REQUEST') != 'ajax') { echo '
'; # Display current attribute values - echo '
'; + echo '
'; for ($i=0;$i<$request['count'];$i++) { if ($i > 0) echo '
'; @@ -97,9 +99,9 @@ if (get_request('meth','REQUEST') != 'ajax') { unset($socs[strtolower($oclass)]); # Draw objectClass selection - echo ''; + echo '
'; echo ''; if ($_SESSION[APPCONFIG]->getValue('appearance','show_hints')) - printf('', + printf('', IMGDIR,_('Note: You may be required to enter new attributes that these objectClass(es) require')); echo '
'; - echo ''; 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 '

Hint%s

Hint%s
'; - echo ''; echo ''; } else { # Draw a blank field - echo ''; echo ''; -printf('', +printf('', htmlspecialchars(_('Proceed >>'))); echo '
'; + echo ''; echo '
'; $request['page']->draw('FormValue',$request['attribute'],$request['count']); echo '
'; @@ -148,7 +149,6 @@ if (get_request('meth','REQUEST') != 'ajax') { echo '
'; - echo ''; echo ''; } @@ -158,7 +158,7 @@ if (get_request('meth','REQUEST') != 'ajax') { $attribute = $request['template']->getAttribute($request['attr']); $attribute->show(); - echo ''; + echo '
'; $request['page']->draw('Template',$attribute); $request['page']->draw('Javascript',$attribute); echo '
'; diff --git a/htdocs/cmd.php b/htdocs/cmd.php index 1af1ee8..34f3848 100644 --- a/htdocs/cmd.php +++ b/htdocs/cmd.php @@ -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 ''; } diff --git a/htdocs/compare.php b/htdocs/compare.php index 5d54dca..47a80db 100644 --- a/htdocs/compare.php +++ b/htdocs/compare.php @@ -43,32 +43,34 @@ $request['pageSRC']->drawTitle(_('Comparing the following DNs')); echo '
'; -echo ''; +echo '
'; echo ''; $href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s', $ldap['SRC']->getIndex(),rawurlencode($request['dnSRC'])); -printf('', +printf('', _('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('', +printf('', _('Server'),$ldap['DST']->getName(),_('Distinguished Name'), htmlspecialchars($href),$request['dnDST']); echo ''; echo ''; -echo ''; echo ''; @@ -110,13 +112,13 @@ foreach ($attrs_all as $attr) { echo ''; else { - echo ''; } } else { - echo ''; + echo ''; } break; @@ -132,12 +134,12 @@ foreach ($attrs_all as $attr) { echo ''; } - echo ''; } else { - echo ''; + echo ''; } break; @@ -154,31 +156,30 @@ foreach ($attrs_all as $attr) { echo ''; foreach (array('src','dst') as $side) { + echo ''; } echo ''; diff --git a/htdocs/compare_form.php b/htdocs/compare_form.php index 45ac25e..56962bd 100644 --- a/htdocs/compare_form.php +++ b/htdocs/compare_form.php @@ -28,25 +28,28 @@ $request['page']->accept(); $request['page']->drawTitle(sprintf('%s %s',_('Compare another DN with'),get_rdn($request['dn']))); $request['page']->drawSubTitle(); -printf('',JSDIR); -echo '
'; +printf('',JSDIR); +echo '
'; printf('%s %s %s
',_('Compare'),get_rdn($request['dn']),_('with ')); +echo '
'; -echo '
'; +echo ''; +echo '
'; echo ''; printf('',$app['server']->getIndex()); printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); +echo '
'; echo "\n"; -echo '
%s: %s
%s: %s
%s: %s
%s: %s
%s: %s
%s: %s
%s: %s
%s: %s
'; -echo '
'; +echo '
'; +echo ''; +echo '
'; printf('',$app['server']->getIndex()); printf('',$ldap['DST']->getIndex()); printf('',$ldap['SRC']->getIndex()); printf('',htmlspecialchars($request['dnDST'])); printf('',htmlspecialchars($request['dnSRC'])); printf('',_('Switch Entry')); +echo '
'; echo ''; echo '
 '; + echo ''; $request['pageSRC']->draw('Notes',$attributeSRC); echo '  '; + echo ''; $request['pageDST']->draw('Notes',$attributeDST); echo '  
'; + echo ''; + echo ' '; break; case 'dst': - echo ''; + echo ' '; break; } + + echo ''; + echo '
'; + switch ($side) { case 'src': - echo ''; if ($attributeSRC && count($attributeSRC->getValues())) $request['pageSRC']->draw('CurrentValues',$attributeSRC); else - echo ''; - - echo '
 
'; - if ($attributeDST && count($attributeDST->getValues())) $request['pageDST']->draw('CurrentValues',$attributeDST); else - echo ''; - - echo '
 
'; +echo '
'; echo ''; printf('', _('Compare this DN with another'),_('Destination DN')); echo ''; echo ''; echo "\n"; @@ -54,10 +57,9 @@ echo "\n"; printf('',_('Destination Server'),server_select_list($app['server']->getIndex(),true,'server_id_dst')); echo "\n"; -printf('',_('Compare')); +printf('',_('Compare')); echo "\n"; echo '
%s:'; echo ''; -draw_chooser_link('compare_form.dn_dst','true',''); +draw_chooser_link('compare_form','dn_dst','true',''); echo '
%s:%s
'; echo ''; -echo ''; ?> diff --git a/htdocs/copy_form.php b/htdocs/copy_form.php index 858a9ce..749b78e 100644 --- a/htdocs/copy_form.php +++ b/htdocs/copy_form.php @@ -27,25 +27,28 @@ $request['page']->accept(); $request['page']->drawTitle(sprintf('%s %s',_('Copy'),get_rdn($request['dn']))); $request['page']->drawSubTitle(); -printf('',JSDIR); -echo '
'; +printf('',JSDIR); +echo '
'; printf('%s %s %s:

',_('Copy'),get_rdn($request['dn']),_('to a new object')); +echo '
'; -echo '
'; +echo ''; +echo '
'; echo ''; printf('',$app['server']->getIndex()); printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); +echo '
'; echo "\n"; -echo ''; +echo '
'; echo ''; printf('', _('The full DN of the new entry to be created when copying the source entry'),_('Destination DN')); echo ''; echo ''; echo "\n"; @@ -59,7 +62,7 @@ $request['children'] = $app['server']->getContainerContents($request['dn']); if (count($request['children']) > 0) { echo ''; printf('',_('Recursive copy')); - echo '',_('Recursively copy all children of this object as well.')); echo ''; echo "\n"; @@ -83,19 +86,18 @@ if (count($request['children']) > 0) { } echo "\n"; -printf('',_('Copy ')); +printf('',_('Copy ')); echo "\n"; echo '
%s:'; printf('',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 '
:'; + echo ''; printf('(%s)
'; echo '
'; if ($_SESSION[APPCONFIG]->getValue('appearance','show_hints')) - printf('Light%s', + printf('
Light%s
', IMGDIR,_('Hint: Copying between different servers only works if there are no schema violations')); -echo '
'; # Draw the javascrpt to enable/disable the filter field if this may be a recursive copy if (count($request['children']) > 0) - printf('',JSDIR); + printf('',JSDIR); ?> diff --git a/htdocs/create_confirm.php b/htdocs/create_confirm.php index 9732166..cfff1f9 100644 --- a/htdocs/create_confirm.php +++ b/htdocs/create_confirm.php @@ -54,12 +54,14 @@ $request['page']->drawSubTitle(sprintf('%s: %s   %s: %s # Confirm the creation if (count($request['template']->getLDAPadd(true))) { - echo '
'; + echo '
'; echo _('Do you want to create this entry?'); echo '

'; + echo '
'; echo "\n\n"; echo '
'; + echo '
'; echo ''; printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['template']->getContainer())); @@ -69,8 +71,9 @@ if (count($request['template']->getLDAPadd(true))) { echo "\n"; $request['page']->drawHiddenAttributes(); + echo '
'; - echo ''; + echo '
'; echo "\n"; printf('', @@ -78,7 +81,7 @@ if (count($request['template']->getLDAPadd(true))) { echo "\n\n"; $counter = 0; - printf('',$counter%2 ? 'even' : 'odd',$request['template']->getDN()); + printf('',$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 '
%s%s%s
%s
%s
'; + echo '
'; echo '
'; printf('',_('Commit')); printf('',_('Cancel')); + echo '
'; echo '
'; echo '
'; - echo '
'; - } else { - echo '
'; + echo '
'; echo _('You made no changes'); $href = sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s', $app['server']->getIndex(),rawurlencode($request['dn'])); printf(' %s.',htmlspecialchars($href),_('Go back')); - echo '
'; + echo ''; } ?> diff --git a/htdocs/delete_form.php b/htdocs/delete_form.php index 13a15f5..ecffa9b 100644 --- a/htdocs/delete_form.php +++ b/htdocs/delete_form.php @@ -46,43 +46,43 @@ if (count($request['children'])) { $query['deref'] = LDAP_DEREF_NEVER; $request['search'] = $app['server']->query($query,null); - echo ''; + echo '
'; echo ''; - echo ''; - echo ''; + echo ''; - printf('', + printf('', 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 ''; + echo ''; - printf('', + printf('', _('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 ''; - echo ''; + echo ''; - echo ''; + echo ''; echo ''; echo "\n"; @@ -101,19 +101,19 @@ if (count($request['children'])) { echo "\n"; } else { - echo '
'; + echo ''; printf(_('This entry is the root of a sub-tree containing %s entries.'),count($request['search'])); printf(' (%s)', $search['href'],_('view entries')); echo '
 
 
%s
%s
 
 
%s
%s
'; + echo '
'; echo '
'; echo ''; printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); printf('',sprintf(_('Delete all %s objects'),count($request['search']))); echo '
'; - echo '
'; + echo '
'; echo '
'; echo ''; printf('',$app['server']->getIndex()); printf('',htmlspecialchars($request['dn'])); printf('',_('Cancel')); echo '
'; - echo '
'; + echo '
'; - printf('',_('Are you sure you want to permanently delete this object?')); - echo ''; + printf('',_('Are you sure you want to permanently delete this object?')); + echo ''; - printf('',_('Server'),$app['server']->getName()); - printf('', + printf('',_('Server'),$app['server']->getName()); + printf('', _('Distinguished Name'),_('DN'),$request['dn']); - echo ''; + echo ''; echo "\n"; echo ''; - echo ''; - echo ''; + echo ''; + echo ''; echo ''; echo '
%s
 
%s
 
%s:%s
%s%s
%s:%s
%s%s
 
 
'; + echo '
'; echo '
'; echo ''; printf('',$app['server']->getIndex()); @@ -121,8 +121,8 @@ if (count($request['children'])) { printf('',_('Delete')); echo '
'; - echo '
'; + echo '
'; echo '
'; echo ''; @@ -131,7 +131,7 @@ if (count($request['children'])) { printf('',_('Cancel')); echo '
'; - echo '
'; echo "\n"; diff --git a/htdocs/entry_chooser.php b/htdocs/entry_chooser.php index 266ea42..1ca8795 100644 --- a/htdocs/entry_chooser.php +++ b/htdocs/entry_chooser.php @@ -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 '
'; +echo ''; echo ''; -echo ''; /** * Helper function for fetching the line end format. diff --git a/htdocs/import_form.php b/htdocs/import_form.php index 7faf98c..9c6bbbb 100644 --- a/htdocs/import_form.php +++ b/htdocs/import_form.php @@ -19,14 +19,15 @@ $request['page'] = new PageRender($app['server']->getIndex(),get_request('templa $request['page']->drawTitle(sprintf('%s',_('Import'))); $request['page']->drawSubTitle(sprintf('%s: %s',_('Server'),$app['server']->getName())); -echo '
'; echo '
'; +echo '
'; printf('',$app['server']->getIndex()); echo ''; +echo '
'; -echo ''; +echo '
'; -echo ''; +echo ''; echo ''; printf('',_('Select an LDIF file')); echo ''; printf('',_('Maximum file size'),ini_get('upload_max_filesize')); -echo ''; +echo ''; printf('',_('Or paste your LDIF here')); -echo ''; -echo ''; +echo ''; +echo ''; printf('', _("Don't stop on errors")); printf('',_('Proceed >>')); echo '
 
 
%s'; @@ -35,14 +36,13 @@ echo '
 %s %s
 
 
%s
 
 
 %s
 
'; echo '
'; -echo '
'; ?> diff --git a/htdocs/js/dnChooserPopup.js b/htdocs/js/dnChooserPopup.js index fd4d204..d95b48a 100644 --- a/htdocs/js/dnChooserPopup.js +++ b/htdocs/js/dnChooserPopup.js @@ -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; } diff --git a/htdocs/js/modify_member.js b/htdocs/js/modify_member.js index e7fd34d..a601ccb 100644 --- a/htdocs/js/modify_member.js +++ b/htdocs/js/modify_member.js @@ -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. diff --git a/htdocs/login_form.php b/htdocs/login_form.php index b0916ec..ae70ded 100644 --- a/htdocs/login_form.php +++ b/htdocs/login_form.php @@ -17,13 +17,11 @@ echo '
'; # Check for a secure connection if (! isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on') { - echo '
'; - echo ''; + echo '
'; printf('%s: %s.', _('You are not using \'https\'. Web browser will transmit login information in clear text.'), _('Warning'),_('This web connection is unencrypted')); - echo ''; - echo '
'; + echo ''; echo '
'; } @@ -54,15 +52,17 @@ if ($app['server']->getAuthType() == 'http') { # HTML Login Form } else { - echo '
'; + echo ''; + echo '
'; echo ''; printf('',$app['server']->getIndex()); if (get_request('redirect','GET',false,false)) printf('',rawurlencode(get_request('redirect','GET'))); - echo '
'; - echo ''; + echo ''; + + echo '
'; printf('', $app['server']->getValue('login','auth_text') ? $app['server']->getValue('login','auth_text') : @@ -71,28 +71,27 @@ if ($app['server']->getAuthType() == 'http') { printf('', $app['server']->getValue('login','attr',false) == 'dn' ? $app['server']->getValue('login','bind_id') : ''); - echo ''; + echo ''; printf('',_('Password')); echo ''; - echo ''; + echo ''; # If Anon bind allowed, then disable the form if the user choose to bind anonymously. if ($app['server']->isAnonBindAllowed()) printf('', _('Anonymous')); - printf('', + printf('', _('Authenticate')); echo '
%s:
 
 
%s:
 
 
%s
'; - echo '
'; echo ''; echo '
'; - echo ''; + echo ''; if ($app['server']->isAnonBindAllowed()) - printf('',JSDIR); + printf('',JSDIR); } ?> diff --git a/htdocs/mass_delete.php b/htdocs/mass_delete.php index 5c56ef2..4f91ae4 100644 --- a/htdocs/mass_delete.php +++ b/htdocs/mass_delete.php @@ -46,27 +46,27 @@ printf('

%s: %s

',_('Server'),$app['server']->get echo "\n"; echo '
'; -echo ''; +echo '
'; if (count($request['parent']) == 1) - printf('',_('Are you sure you want to permanently delete this object?')); + printf('',_('Are you sure you want to permanently delete this object?')); else - printf('',_('Are you sure you want to permanently delete these objects?')); + printf('',_('Are you sure you want to permanently delete these objects?')); -echo ''; -printf('',_('Server'),$app['server']->getName()); +echo ''; +printf('',_('Server'),$app['server']->getName()); foreach ($request['parent'] as $dn) - printf('', + printf('', _('Distinguished Name'),_('DN'),$dn); -echo ''; +echo ''; $request['delete'] = $request['parent']; if (count($request['children'])) { - printf('',_('Permanently delete all children also?')); - echo ''; + printf('',_('Permanently delete all children also?')); + echo ''; # 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 ''; - echo ''; - printf('', + printf('', 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 ''; + echo ''; - printf('', + printf('', _('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 ''; + echo ''; echo "\n"; - printf('',_('List of entries to be deleted:')); - echo ''; + printf('',_('List of entries to be deleted:')); + echo ''; $i = 0; - echo ''; echo "\n"; - echo ''; + echo ''; } echo ''; -echo ''; -echo '
%s
%s
%s
%s
 
%s:%s
 
%s:%s
%s%s
%s%s
 
 
%s
 
%s
 
'; + echo ''; printf(_('This request also includes %s children entries.'),count($request['children'])); echo '
%s
%s
 
 
%s
%s
 
 
%s
 
%s
 
'; + echo '
'; printf('
 
 
'; +echo '
'; echo '
'; echo ''; printf('',$app['server']->getIndex()); @@ -128,7 +128,7 @@ printf('',sprintf(_('Delete all %s objects'),c echo '
'; echo '
'; +echo '
'; echo '
'; echo ''; diff --git a/htdocs/mass_edit.php b/htdocs/mass_edit.php index beb2b5b..1ea7001 100644 --- a/htdocs/mass_edit.php +++ b/htdocs/mass_edit.php @@ -64,13 +64,16 @@ $request['page'][0]->drawTitle(_('Bulk edit the following DNs')); $request['page'][0]->drawSubTitle(sprintf('%s: %s',_('Server'),$app['server']->getName())); echo ''; +echo '
'; echo ''; printf('',$app['server']->getIndex()); foreach ($request['page'] as $j => $page) printf('',$j,$page->getTemplate()->getDN()); -echo ''; +echo ''; + +echo '
'; echo ''; echo ''; @@ -122,7 +125,9 @@ foreach ($request['page'] as $j => $page) { } echo '
DN
'; +echo '
'; echo '
'; printf('',_('Update Values')); +echo '
'; echo ''; ?> diff --git a/htdocs/mass_update.php b/htdocs/mass_update.php index 0d489e8..8a9dd01 100644 --- a/htdocs/mass_update.php +++ b/htdocs/mass_update.php @@ -71,12 +71,12 @@ if (count($request['update'])) { foreach ($request['update'] as $j => $page) printf('',$j,$page->getTemplate()->getDN()); - echo ''; + echo '
'; echo '
'; echo '
'; - echo ''; + echo '
'; echo ''; @@ -87,15 +87,15 @@ if (count($request['update'])) { foreach ($request['update'] as $index => $page) { $template = $page->getTemplate(); - echo '
'; printf(_('There will be %s updates done with this mass update'),sprintf('%s',count($request['update']))); echo '
'; + echo '
'; echo ''; printf('',IMGDIR,get_icon($app['server']->getIndex(),$template->getDN())); - printf('', + printf('', $app['server']->getIndex(),rawurlencode(dn_unescape($template->getDN())),htmlspecialchars(get_rdn($template->getDN()))); echo ''; - printf('', + printf('', htmlspecialchars(dn_unescape($template->getDN())),_('Old Value')); foreach ($template->getLDAPmodify(true,$index) as $attribute) { diff --git a/htdocs/modify_member_form.php b/htdocs/modify_member_form.php index d436e4f..33708be 100644 --- a/htdocs/modify_member_form.php +++ b/htdocs/modify_member_form.php @@ -79,12 +79,13 @@ usort($possible_members,'pla_compare_dns'); echo '
'; echo '
'; -printf('',JSDIR); -echo ''; +echo ''; +echo '
'; if ($_SESSION[APPCONFIG]->getValue('confirm','update')) echo ''; else echo ''; +echo '
'; echo '
icon%s%s
 dn%s%s
 dn%s%s
'; @@ -96,20 +97,20 @@ echo ''; # Generate select box from all possible members echo ''; echo ''; # Generate select box from all current members echo ''; @@ -119,11 +120,11 @@ echo ''; # Show buttons which move users from left to right and vice versa echo ''; echo ''; echo ''; echo ''; @@ -149,10 +150,10 @@ printf('',htmlspecialcha echo ''; # Submit values to update_confirm.php and when clicked, run addSelected -printf('',_('Save changes'),$request['attr']); +printf('',_('Save changes'),$request['attr']); echo ''; echo '
'; -echo ''; foreach ($possible_members as $possible) - printf('',$possible); + printf('',htmlspecialchars($possible)); echo ''; echo ''; -echo ''; foreach ($current_members as $current) - printf('',$current); + printf('',htmlspecialchars($current)); echo ''; echo '
'; -printf(' ', +printf(' ', _('Add selected'),_('Add all')); echo ''; -printf(' ', +printf(' ', _('Remove selected'),('Remove all')); echo '
'; echo ''; -echo ''; +printf('',JSDIR); ?> diff --git a/htdocs/monitor.php b/htdocs/monitor.php index a3afa4f..51ac392 100644 --- a/htdocs/monitor.php +++ b/htdocs/monitor.php @@ -28,13 +28,13 @@ if (! isset($attrs['monitorcontext']) || ! count($results)) printf('

%s%s

',_('Monitor info for: '),$app['server']->getName()); printf('

%s

',_('Server reports the following information about itself')); -echo ''; +echo '
'; # cn=Monitor -printf('',_('LDAP Server')); +printf('',_('LDAP Server')); printf('',$description,$dn); + printf('',$description,$dn); echo '
%s
%s
'); -echo ''; +echo '
'; printf('',$results[$attrs['monitorcontext'][0]]['monitoredinfo'][0]); echo '
%s
'; @@ -53,10 +53,10 @@ foreach (array( $description = ''; } - printf('
%s
%s
'; echo '
'; - echo ''; + echo '
'; $attrs = array( 'monitorruntimeconfig', @@ -64,10 +64,10 @@ foreach (array( ); echo ''; - printf('',_('Type'),'namingContext'); + printf('',_('Type'),'namingContext'); foreach ($attrs as $attr) - printf('',$attr); + printf('',$attr); echo ''; @@ -129,14 +129,14 @@ foreach (array( } # cn=Connections,cn=Monitor -printf('',$results['cn=Connections,cn=Monitor']['description'],_('LDAP Connections')); +printf('',$results['cn=Connections,cn=Monitor']['description'],_('LDAP Connections')); printf('
%s%s%s%s%s%s
%s
%s
'); echo '
'; -echo ''; +echo '
'; -printf('', +printf('', _('Total Connections'),$results['cn=Total,cn=Connections,cn=Monitor']['monitorcounter']); -printf('', +printf('', _('Current Connections'),$results['cn=Current,cn=Connections,cn=Monitor']['monitorcounter']); # Look for some connections @@ -146,7 +146,7 @@ foreach ($results as $key => $value) { printf('',$results[$key]['cn'][0]); echo '
%s%s
%s%s
%s%s
%s%s
%s'; - echo ''; + echo '
'; $counter = 0; foreach (array( @@ -171,7 +171,7 @@ foreach ($results as $key => $value) { printf('',$counter++%2==0?'even':'odd'); - printf('', + printf('', $metric,isset($results[$key][$metric]) ? $results[$key][$metric][0] : ' '); echo ''; } @@ -201,29 +201,29 @@ foreach (array( $description = implode(' ',$results[$dn]['description']); $description = preg_replace('/"/','\'',$description); - printf('',$description,$dn); + printf('',$description,$dn); echo '
%s%s%s%s
%s
%s
'; echo '
'; - echo ''; + echo '
'; if (isset($results[$dn]['monitoropinitiated'])) - printf('', + printf('', 'monitorOpInitiated',$results[$dn]['monitoropinitiated'][0]); if (isset($results[$dn]['monitoropcompleted'])) - printf('', + printf('', 'monitorOpCompleted',$results[$dn]['monitoropcompleted'][0]); if (isset($results[$dn]['monitoredinfo'])) - printf('', + printf('', 'monitoredInfo',$results[$dn]['monitoredinfo'][0]); # Look for some connecitons foreach ($results as $key => $value) { if (preg_match('/^.*,'.$dn.'$/',$key)) { echo ''; - printf('',$results[$key]['cn'][0]); + printf('',$results[$key]['cn'][0]); - echo '
%s%s
%s%s
%s%s
%s%s
%s%s
%s%s
%s%s'; - echo ''; + echo '
'; + echo ''; foreach (array( 'labeleduri', @@ -238,7 +238,7 @@ foreach (array( if (isset($results[$key][$metric])) { printf('',$counter++%2==0?'even':'odd'); - printf('', + printf('', $metric,$results[$key][$metric][0]); echo ''; diff --git a/htdocs/password_checker.php b/htdocs/password_checker.php index 26e4fd4..5ca2b68 100644 --- a/htdocs/password_checker.php +++ b/htdocs/password_checker.php @@ -31,7 +31,7 @@ printf('

%s

',_('Password Checker Tool')); echo ''; echo ''; -echo '
%s%s%s%s
'; +echo '
'; echo ''; printf('',_('Compare')); diff --git a/htdocs/schema.php b/htdocs/schema.php index 3f7e771..aa4a749 100644 --- a/htdocs/schema.php +++ b/htdocs/schema.php @@ -28,7 +28,7 @@ if (! is_null($entry['value'])) { $entry['value'] = strtolower($entry['value']); } -$schema_error_str = sprintf('%s %s.

%s
  • %s
  • %s
  • %s
  • %s
', +$schema_error_str = sprintf('%s %s.

%s
  • %s
  • %s
  • %s
  • %s
', _('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 '
'; -echo '
'; +echo '
'; $counter = 0; foreach ($entry['schema_types'] as $item => $value) { @@ -57,22 +57,21 @@ foreach ($entry['schema_types'] as $item => $value) { } else { if (isAjaxEnabled()) - printf('%s', + printf('%s', htmlspecialchars($entry['href'][$item]),htmlspecialchars($entry['href'][$item]),$value,$value,$value); else printf('%s',htmlspecialchars($entry['href'][$item]),_($value)); } } -echo '
'; +echo ''; echo '
'; switch($entry['view']) { case 'syntaxes': $highlight_oid = get_request('highlight_oid','GET',false,false); - echo '
'; - echo '
%s
'; + echo '
'; printf('',_('Syntax OID'),_('Description')); $counter = 1; @@ -96,7 +95,6 @@ switch($entry['view']) { } echo '
%s%s
'; - echo ''; break; case 'attributes': @@ -125,32 +123,34 @@ switch($entry['view']) { printf('%s:',_('Jump to an attribute type')); echo ''; + echo '
'; echo ''; printf('',$entry['view']); printf('',$app['server']->getIndex()); if (isAjaxEnabled()) { drawJSItems($sattrs); - echo ''; } else - echo ''; echo ''; foreach ($sattrs as $name => $attr) printf('', - $name,$name == $entry['value'] ? 'selected ': '',$attr->getName(false)); + $name,$name == $entry['value'] ? 'selected="selected" ': '',$attr->getName(false)); echo ''; if (isAjaxEnabled()) - printf('',_('Go')); + printf('',_('Go')); else printf('',_('Go')); + echo '
'; echo ''; echo '
'; 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('
',$attr->getName()); - echo ''; - printf('', + echo '
%s
'; + printf('', $attr->getName(),$attr->getName(false)); $counter = 0; @@ -167,7 +167,7 @@ switch($entry['view']) { foreach ($entry['attr_types'] as $item => $value) { printf('',++$counter%2 ? 'odd' : 'even'); - printf('',$value); + printf('',$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('%s', + printf('%s', $href,strtolower($attr->getSupAttribute()),$attr->getSupAttribute()); else printf('%s',$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('%s', + printf('%s', $href,$href,_('Matching Rules'),$attr->getEquality(),$attr->getEquality()); else printf('%s',$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('%s (%s)', + printf('%s (%s)', $href,$href,_('Syntaxes'),'',$attr->getType(),$attr->getSyntaxOID()); else printf('%s (%s)',$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('%s', + printf('%s', $href,strtolower($alias),$alias); else printf('%s',$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('%s ', + printf('%s ', $href,$href,_('ObjectClasses'),strtolower($objectclass),$objectclass); else printf('%s ',$href,$objectclass); @@ -340,33 +340,35 @@ switch($entry['view']) { printf('%s
',_('Jump to a matching rule')); echo ''; + echo '
'; echo ''; printf('',$app['server']->getIndex()); echo ''; if (isAjaxEnabled()) { drawJSItems($schema_matching_rules); - echo ''; } else - echo ''; echo ''; foreach ($schema_matching_rules as $rule) printf('', $rule->getName(), - ($rule->getName() == $entry['value'] ? 'selected': ''), + ($rule->getName() == $entry['value'] ? 'selected="selected"': ''), $rule->getName(false)); echo ''; if (isAjaxEnabled()) - printf('',_('Go')); + printf('',_('Go')); else printf('',_('Go')); + echo '
'; echo ''; echo '
'; - echo '
%s
%s%s
'; + echo '
'; printf('', _('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 '
%s%s%s
'; if (count($rule->getUsedByAttrs()) == 0) { - printf('
(%s)


',_('none')); + printf('
(%s)


',_('none')); } else { - echo ''; } @@ -420,7 +420,7 @@ class HTMLTree extends Tree { $href['edit'] = htmlspecialchars(sprintf('cmd.php?cmd=template_engine&server_id=%s&dn=%s',$server->getIndex(),$dnENCODE)); echo ''; - printf('',$level+2); + printf('',$level+2); # Is this node expanded? (deciding whether to draw "+" or "-") if ($entry->isOpened()) @@ -437,7 +437,7 @@ class HTMLTree extends Tree { printf('', $href['edit'],$server->getIndex(),preg_replace('/=/','_',base64_encode($item)),IMGDIR,$entry->getIcon()); - printf(''; - printf('',$level+3); + printf('',$level+3); printf('',$href,IMGDIR,_('new')); printf('', $this->getDepth()+3-$level,$href,_('Create a new entry in'),$rdn,_('Create new entry here')); @@ -525,8 +525,8 @@ class HTMLTree extends Tree { echo ''; - printf('',$this->getDepth()+3); - printf('',$this->getDepth()+3); + printf('',$this->getDepth()+3); + printf('',$this->getDepth()+3); } /** diff --git a/lib/MassRender.php b/lib/MassRender.php index c9510f9..f0bf67e 100644 --- a/lib/MassRender.php +++ b/lib/MassRender.php @@ -25,8 +25,8 @@ class MassRender extends TemplateRender { $j,htmlspecialchars($attribute->getName()),$i, $j,htmlspecialchars($attribute->getName()),$i, htmlspecialchars($val), - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); diff --git a/lib/PageRender.php b/lib/PageRender.php index fe63abd..a17d1e0 100644 --- a/lib/PageRender.php +++ b/lib/PageRender.php @@ -558,7 +558,7 @@ class PageRender extends Visitor { if (DEBUGTMP) printf('%s
',__METHOD__); if (DEBUGTMPSUB) printf(' [%s]',__METHOD__); - echo $attribute->getValue($i); + echo htmlspecialchars($attribute->getValue($i)); } /** @@ -588,7 +588,7 @@ class PageRender extends Visitor { $val = $attribute->getValue($i); - printf('', + printf('', htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()),$i,htmlspecialchars($val)); } @@ -598,14 +598,14 @@ class PageRender extends Visitor { $val = $attribute->getValue($i); if ($attribute->getHelper() || $attribute->getVerify()) - echo '
'; + echo '
'; echo '
'; + echo '
'; echo ''; printf('',$app['server']->getIndex()); echo ''; @@ -413,10 +416,11 @@ switch($entry['view']) { echo '
'; if (isAjaxEnabled()) - printf('', + printf('', _('Go'),$app['server']->getIndex(),_('Attributes'),$rule->getName()); else printf('',_('Go')); + echo '
'; echo '
'; echo '
'; } @@ -436,33 +440,35 @@ switch($entry['view']) { printf('%s:',_('Jump to an objectClass')); echo '
'; + echo '
'; echo ''; printf('',$entry['view']); printf('',$app['server']->getIndex()); if (isAjaxEnabled()) { drawJSItems($socs); - echo ''; } else - echo ''; echo ''; foreach ($socs as $name => $oclass) printf('', - $name,$name == $entry['value'] ? 'selected ': '',$oclass->getName(false)); + $name,$name == $entry['value'] ? 'selected="selected" ': '',$oclass->getName(false)); echo ''; if (isAjaxEnabled()) - printf('',_('Go')); + printf('',_('Go')); else printf('',_('Go')); + echo '
'; echo '
'; echo '
'; 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('
',$oclass->getName()); - echo ''; - printf('',$name,$oclass->getName(false)); - printf('',_('OID'),$oclass->getOID()); + echo '
%s
%s: %s
'; + printf('',$name,$oclass->getName(false)); + printf('',_('OID'),$oclass->getOID()); if ($oclass->getDescription()) - printf('',_('Description'),$oclass->getDescription()); + printf('',_('Description'),$oclass->getDescription()); - printf('',_('Type'),$oclass->getType()); + printf('',_('Type'),$oclass->getType()); if ($oclass->getIsObsolete()) - printf('',_('This objectClass is obsolete.')); + printf('',_('This objectClass is obsolete.')); - printf(''; - printf(''; - printf('', + printf('', _('Required Attributes'),_('Optional Attributes')); echo ''; @@ -540,7 +546,7 @@ switch($entry['view']) { echo '
  • '; $href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['attributes'],$attr->getName())); if (isAjaxEnabled()) - printf('%s', + printf('%s', $href,$href,_('Attributes'),$attr->getName(),$attr->getName(false)); else printf('%s',$href,$attr->getName(false)); @@ -550,7 +556,7 @@ switch($entry['view']) { $href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($attr->getSource()))); printf('(%s ',_('Inherited from')); if (isAjaxEnabled()) - printf('%s', + printf('%s', $href,_('Jump to this objectClass definition'),strtolower($attr->getSource()),$attr->getSource()); else printf('%s',$href,$attr->getSource()); @@ -573,7 +579,7 @@ switch($entry['view']) { echo '
  • '; $href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['attributes'],$attr->getName())); if (isAjaxEnabled()) - printf('%s', + printf('%s', $href,$href,_('Attributes'),$attr->getName(),$attr->getName(false)); else printf('%s',$href,$attr->getName(false)); @@ -583,7 +589,7 @@ switch($entry['view']) { $href = htmlspecialchars(sprintf('%s&viewvalue=%s',$entry['href']['objectclasses'],strtolower($attr->getSource()))); printf('(%s ',_('Inherited from')); if (isAjaxEnabled()) - printf('%s', + printf('%s', $href,_('Jump to this objectClass definition'),strtolower($attr->getSource()),$attr->getSource()); else printf('%s',$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 '',JSDIR); - printf('',JSDIR); + printf('',JSDIR); + printf('',JSDIR); } /** @@ -266,9 +266,9 @@ class AJAXTree extends HTMLTree { $href = sprintf('cmd=template_engine&server_id=%s&container=%s',$this->getServerID(),rawurlencode($entry->getDN())); $output .= $this->get_indentation($level); - $output .= sprintf('--',$img); + $output .= sprintf('--',$img); $output .= sprintf('',htmlspecialchars($href),$entry->getDN()); - $output .= sprintf('->',IMGDIR); + $output .= sprintf('->',IMGDIR); $output .= ''; $output .= ' '; diff --git a/lib/HTMLTree.php b/lib/HTMLTree.php index 5918f01..d42147a 100644 --- a/lib/HTMLTree.php +++ b/lib/HTMLTree.php @@ -30,7 +30,7 @@ class HTMLTree extends Tree { $server = $this->getServer(); - echo '
  • %s
    %s: %s
    %s: %s
    %s: %s
    %s: %s
    %s: %s
    %s
    %s
    %s: ',_('Inherits from')); + printf('
    %s: ',_('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('%s', + printf('%s', $href,strtolower($object_class),$object_class); else printf('%s', @@ -501,11 +507,11 @@ switch($entry['view']) { } echo '
    %s: ',_('Parent to')); + printf('
    %s: ',_('Parent to')); if (strcasecmp($oclass->getName(),'top') == 0) { $href = htmlspecialchars($entry['href']['objectclasses']); if (isAjaxEnabled()) - printf('all', + printf('all', $href); else printf('(all)',$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('%s', + printf('%s', $href,_('Jump to this objectClass definition'),strtolower($object_class),$object_class); else printf('%s',$href,_('Jump to this objectClass definition'),$object_class); @@ -527,7 +533,7 @@ switch($entry['view']) { } echo '
     %s%s 
     %s%s 
    '; + echo '
    '; if (! $onlytree) $this->draw_server_name(); @@ -60,7 +60,7 @@ class HTMLTree extends Tree { $server->getIndex()); } - echo '
    '; + echo '
    '; if (! count($this->getBaseEntries())) { # We didnt get any baseDN entries in our tree? @@ -90,13 +90,13 @@ class HTMLTree extends Tree { printf('', IMGDIR,$this->getDepth()+3-3,pretty_print_dn($base->getDN())); - $this->javascript .= sprintf('
    ',$javascript_id); + $this->javascript .= sprintf('',$javascript_id); $this->javascript .= sprintf('',$server->getIndex()); $this->javascript .= sprintf('',htmlspecialchars($server->getContainer($base->getDN()))); $this->javascript .= sprintf('',get_rdn($base->getDN())); $this->javascript .= sprintf(''); - printf('
    ', + printf('', $this->getDepth()+3-3,_('This base entry does not exist.'),$javascript_id,_('Create it?')); echo '
    %s
    %s%s
    %s%s
    '; @@ -163,7 +163,7 @@ class HTMLTree extends Tree { if (! is_null($server->inactivityTime())) { $m = sprintf(_('Inactivity will log you off at %s'), strftime('%H:%M',$server->inactivityTime())); - printf(' %s',IMGDIR,$m,'Timeout'); + printf(' %s',IMGDIR,$m,'Timeout'); } echo '
    img',$this->getDepth()+3-$level); + printf('',$this->getDepth()+3-$level); printf('%s',$href['edit'],$this->get_formatted_dn($entry,$level)); if ($child_count) @@ -493,7 +493,7 @@ class HTMLTree extends Tree { $href = htmlspecialchars(sprintf('cmd.php?cmd=template_engine&server_id=%s&container=%s',$this->getServerID(),$encoded_dn)); echo '
    %s
     
     
     
     
    '; + echo '
    '; printf('', htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, htmlspecialchars($val), - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); @@ -689,8 +689,8 @@ class PageRender extends Visitor { printf('
    ', htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '', ($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : ''); } @@ -705,8 +705,8 @@ class PageRender extends Visitor { printf(' ', $attribute->getName(),$i, htmlspecialchars($attribute->getName()),$i,htmlspecialchars($val), - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); @@ -727,13 +727,13 @@ class PageRender extends Visitor { printf(' ', $input_name,$id,htmlspecialchars($val), - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : '', ($attribute->getMaxLength() > 0) ? 'maxlength="'.$attribute->getMaxLength().'"' : ''); # Draw a link for popping up the entry browser if this is the type of attribute that houses DNs. - draw_chooser_link(sprintf('entry_form.%s',$id),false); + draw_chooser_link('entry_form',$id,false); echo ''; if ($attribute->getHelper()) { @@ -837,9 +837,9 @@ class PageRender extends Visitor { $val = $attribute->getValue($i); - printf('', - ($attribute->getRows() > 0) ? 'rows="'.$attribute->getRows().'"' : '', - ($attribute->getCols() > 0) ? 'cols="'.$attribute->getCols().'"' : '', + printf('', + ($attribute->getRows() > 0) ? $attribute->getRows() : 5, + ($attribute->getCols() > 0) ? $attribute->getCols() : 100, htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, $val); @@ -850,13 +850,13 @@ class PageRender extends Visitor { $val = $attribute->getValue($i); - printf('', - ($attribute->getRows() > 0) ? 'rows="'.$attribute->getRows().'"' : '', - ($attribute->getCols() > 0) ? 'cols="'.$attribute->getCols().'"' : '', + printf('', + ($attribute->getRows() > 0) ? $attribute->getRows() : 5, + ($attribute->getCols() > 0) ? $attribute->getCols() : 100, htmlspecialchars($attribute->getName()),$i, htmlspecialchars($attribute->getName()),$i, - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', $val); } @@ -937,7 +937,7 @@ class PageRender extends Visitor { $obfuscate_password = obfuscate_password_display($enc_type); - printf('
    ', + printf('
    ', ($obfuscate_password ? 'password' : 'text'), htmlspecialchars($attribute->getName()),$i,htmlspecialchars($attribute->getName()), $i,htmlspecialchars($val),($attribute->getSize() > 0) ? 'size="'.$attribute->getSize().'"' : ''); @@ -969,8 +969,8 @@ class PageRender extends Visitor { ($obfuscate_password ? 'password' : 'text'), htmlspecialchars($attribute->getName()),$i,$id, htmlspecialchars($val), - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', ($attribute->getSize() > 0) ? sprintf('size="%s"',$attribute->getSize()) : '', ($attribute->getMaxLength() > 0) ? sprintf('maxlength="%s"',$attribute->getMaxLength()) : ''); @@ -1016,24 +1016,24 @@ class PageRender extends Visitor { if (($attribute->getSize() > 0) && ($attribute->getSize() < $attribute->getOptionCount())) { - printf('', htmlspecialchars($attribute->getName()),$attribute->getSize()); foreach ($attribute->getSelection() as $value => $description) { if (in_array($value,$vals)) $selected[$value] = true; - printf('', + printf('', htmlspecialchars($attribute->getName()),$j++, $value,htmlspecialchars($attribute->getName()),htmlspecialchars($attribute->getName()), - isset($selected[$value]) ? 'selected' : '',$description); + isset($selected[$value]) ? 'selected="selected"' : '',$description); echo "\n"; } foreach ($vals as $val) { if (! isset($selected[$val])) - printf('', + printf('', htmlspecialchars($attribute->getName()),$j++, $val,htmlspecialchars($attribute->getName()), htmlspecialchars($attribute->getName()),$val); @@ -1044,7 +1044,7 @@ class PageRender extends Visitor { echo ''; } else { - echo ''; + echo '
    '; foreach ($attribute->getSelection() as $value => $description) { if (in_array($value,$vals)) @@ -1053,19 +1053,19 @@ class PageRender extends Visitor { printf('', htmlspecialchars($attribute->getName()),$j++, htmlspecialchars($attribute->getName()),$value, - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', - isset($selected[$value]) ? 'checked' : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', + isset($selected[$value]) ? 'checked="checked"' : '', $description); } foreach ($vals as $val) if (! isset($selected[$val])) - printf('', + printf('', htmlspecialchars($attribute->getName()),$j++, htmlspecialchars($attribute->getName()),$val, - $attribute->needJS('focus') ? sprintf('onFocus="focus_%s(this);" ',$attribute->getName()) : '', - $attribute->needJS('blur') ? sprintf('onBlur="blur_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('focus') ? sprintf('onfocus="focus_%s(this);" ',$attribute->getName()) : '', + $attribute->needJS('blur') ? sprintf('onblur="blur_%s(this);" ',$attribute->getName()) : '', $val); echo '
     %s
     %s
     %s
    '; @@ -1091,12 +1091,12 @@ class PageRender extends Visitor { printf(''; printf('',$server->getIndex()); + echo ''; - echo ''; - echo ''; + echo '
     
    '; + echo ''; $templates = $this->getTemplates(); @@ -101,21 +102,22 @@ class QueryRender extends PageRender { foreach ($templates->getTemplates() as $template) printf('', $template->getID(), - ($this->template_id == $template->getID() ? 'selected' : ''), + ($this->template_id == $template->getID() ? 'selected="selected"' : ''), $template->getDescription()); echo ''; echo ''; echo ''; } + echo ''; printf('',_('The format to show the query results'),_('Display Format')); echo ''; @@ -135,17 +137,17 @@ class QueryRender extends PageRender { echo ''; - echo '
     
    %s'; echo ''; echo '
    '; + echo ''; printf('
    ','block'); echo '
    '; echo '
    '; printf('%s',_('Custom Query')); - echo ''; + echo '
    '; printf('',_('Base DN')); printf(''; echo ''; @@ -202,11 +204,10 @@ class QueryRender extends PageRender { echo ''; echo ''; - printf('',_('Search')); + printf('',_('Search')); echo '
    %s',count($baseDNs) == 1 ? $baseDNs[0] : ''); - draw_chooser_link('advanced_search_form.base'); + draw_chooser_link('advanced_search_form','base'); echo '


    '; echo ''; - echo ''; } private function visitStart() { @@ -248,7 +249,7 @@ class QueryRender extends PageRender { printf('
    ', $this->getAjaxRef($base), ($show == $this->getAjaxRef($base) ? 'block' : 'none')); - echo ''; + echo '
    '; echo '
    '; echo '
    '; echo '
    '; @@ -266,12 +267,12 @@ class QueryRender extends PageRender { # Temporarily set our DN, for rendering that leverages our DN (eg: JpegPhoto) $this->template->setDN($dndetails['dn']); - echo ''; + echo '
    '; echo ''; printf('',IMGDIR,get_icon($server->getIndex(),$dndetails['dn'])); - printf('', + printf('', $server->getIndex(),rawurlencode(dn_unescape($dndetails['dn'])),htmlspecialchars(get_rdn($dndetails['dn']))); echo ''; @@ -323,12 +324,15 @@ class QueryRender extends PageRender { } printf('',$counter); + echo '
    '; printf('',$server->getIndex()); foreach ($this->template->resultsdata[$base]['attrs'] as $attr) printf('',$attr); - echo '
    icon%s%s
    '; + echo ''; + + echo '
    '; echo ''; echo ''; @@ -352,7 +356,7 @@ class QueryRender extends PageRender { # Temporarily set our DN, for rendering that leverages our DN (eg: JpegPhoto) $this->template->setDN($dndetails['dn']); - printf('', + printf('', $j%2 ? 'even' : 'odd',$j,$j); # Is mass action enabled. @@ -401,8 +405,8 @@ class QueryRender extends PageRender { if ($_SESSION[APPCONFIG]->getValue('mass','enabled')) { printf('',++$j%2 ? 'odd' : 'even'); printf('',$counter); - printf('
    ',2+count(explode(',',$ado))); - echo '',2+count(explode(',',$ado))); + echo ''; + echo '
    '; echo ''; $counter = 0; foreach ($this->template->results as $base => $results) { @@ -503,7 +507,7 @@ class QueryRender extends PageRender { private function drawResultsTable($base,$results) { $server = $this->getServer(); - echo '
    '; + echo '
    '; echo ''; printf('',_('Entries found'), diff --git a/lib/TemplateRender.php b/lib/TemplateRender.php index 3cd6477..e300037 100644 --- a/lib/TemplateRender.php +++ b/lib/TemplateRender.php @@ -498,17 +498,21 @@ class TemplateRender extends PageRender { $avail_templates = $this->getTemplates(); $templates = $avail_templates->getTemplates($this->getMode(),$this->getModeContainer()); - printf('

    %s

    ',$msg); + printf('

    %s

    ',$msg); $href_parms = array_to_query_string($_GET,array('meth')); - printf('',htmlspecialchars($href_parms)); + printf('',htmlspecialchars($href_parms)); echo "\n\n"; - foreach ($_POST as $p => $v) - printf('',$p,$v); - echo "\n\n"; + if (count($_POST)) { + echo '
    '; + foreach ($_POST as $p => $v) + printf('',$p,$v); + echo '
    '; + echo "\n\n"; + } - echo '
    %s: %s

    (%s %s)
    '; + echo '
    '; echo ''; printf('',_('Templates')); echo '', htmlspecialchars($details->getID()),htmlspecialchars($details->getID()),htmlspecialchars($href_parms),$details->getID(),_('Retrieving DN')); else - printf('', + printf('', htmlspecialchars($details->getID()),htmlspecialchars($details->getID())); } @@ -552,7 +556,7 @@ class TemplateRender extends PageRender { htmlspecialchars($details->getID())); if ($isInValid) - printf('',_($isInValid)); + printf('',htmlspecialchars($details->getID()),_($isInValid)); echo _($details->getTitle()); @@ -579,7 +583,7 @@ class TemplateRender extends PageRender { printf('', htmlspecialchars($href_parms),'none',_('Retrieving DN')); else - echo ''; + echo ''; printf('',IMGDIR); printf('',_('Default')); @@ -640,7 +644,7 @@ class TemplateRender extends PageRender { } else { # Draw internal attributes if (get_request('show_internal_attrs','REQUEST')) { - echo '
    %s:'; @@ -542,7 +546,7 @@ class TemplateRender extends PageRender { printf('
    '; + echo '
    '; $this->drawInternalAttributes(); echo '

    '; echo "\n"; @@ -700,7 +704,7 @@ class TemplateRender extends PageRender { case 'creation': $subtitle = sprintf('%s: %s   %s: %s', _('Server'),$this->getServer()->getName(), - _('Container'),$this->container); + _('Container'),htmlspecialchars($this->container)); if ($this->template_id) { $subtitle .= '
    '; @@ -714,7 +718,7 @@ class TemplateRender extends PageRender { case 'modification': $subtitle = sprintf('%s: %s   %s: %s', _('Server'),$this->getServer()->getName(), - _('Distinguished Name'),$this->dn); + _('Distinguished Name'),htmlspecialchars($this->dn)); if ($this->template_id) { $subtitle .= '
    '; @@ -737,7 +741,7 @@ class TemplateRender extends PageRender { # We only have a menu for editing entries. if ($this->template->getContext() == 'edit') { - echo ''; + echo ''; echo ''; $menuitem_number = 0; @@ -767,7 +771,7 @@ class TemplateRender extends PageRender { if ($ms) { if (($menuitem_number % 2) == 1) { $menuitem_number++; - echo ''; + echo ''; $endofrow = false; $start = false; } @@ -792,7 +796,7 @@ class TemplateRender extends PageRender { } elseif ($ms) { if (($menuitem_number % 2) == 1) { $menuitem_number++; - echo ''; + echo ''; $endofrow = false; $start = false; } @@ -1249,7 +1253,7 @@ class TemplateRender extends PageRender { if (! count($this->template->getRDNAttrs())) { printf('','RDN'); - echo ''; + echo ''; } else { echo ''; printf('',_('Container')); printf(''; echo ''; } @@ -1303,7 +1307,7 @@ class TemplateRender extends PageRender { echo ''; printf('',_('ObjectClasses')); - echo '',_('Update Object')); + printf('',_('Update Object')); } /** STEP FORM METHODS **/ @@ -1412,7 +1422,7 @@ class TemplateRender extends PageRender { # The default template only uses 2 pages $this->pagelast = 2; - echo '

    '; + echo '

    '; printf('%s: ',sprintf(_('Step %s of %s'),$page,$this->pagelast)); if ($page == 1) @@ -1420,10 +1430,10 @@ class TemplateRender extends PageRender { else echo _('Specify attributes and values'); - echo '

    '; + echo ''; } elseif ($this->template->getDescription()) - printf('

    %s (%s)

    ', + printf('

    %s (%s)

    ', _($this->template->getDescription()), sprintf(_('Step %s of %s'),$page,$this->pagelast)); } @@ -1432,10 +1442,11 @@ class TemplateRender extends PageRender { if (DEBUGTMP) printf('%s
    ',__METHOD__); if (($this->template->isType('default') && $this->template->getContext() == 'create' && $page == 1) || $page < $this->pagelast) { - echo ''; + echo ''; } else { - echo ''; + echo ''; + echo '
    '; if ($_SESSION[APPCONFIG]->getValue('confirm','create')) echo ''; @@ -1454,15 +1465,18 @@ class TemplateRender extends PageRender { $this->drawHiddenAttributes(); if ($this->template->isType('default') && $page == 1) { - echo '
    '; + echo ''; + + echo '
    '; $this->drawContainerChooser($this->template->getContainer()); $this->drawObjectClassChooser(); } else { printf('',htmlspecialchars($this->template->getContainer())); + echo ''; - echo '
    '; + echo '
    '; $this->drawRDNChooser(); @@ -1490,7 +1504,7 @@ class TemplateRender extends PageRender { if ($page < $this->pagelast) printf('',_('Proceed >>')); else - printf('',_('Create Object')); + printf('',_('Create Object')); echo ''; } @@ -1522,7 +1536,7 @@ class TemplateRender extends PageRender { $this->draw('Template',$attribute); else - printf('',_('none')); + printf('',_('none')); printf('',_('Optional Attributes')); if (count($attrs['optional'])) @@ -1530,7 +1544,7 @@ class TemplateRender extends PageRender { $this->draw('Template',$attribute); else - printf('',_('none')); + printf('',_('none')); echo "\n"; } @@ -1556,14 +1570,14 @@ class TemplateRender extends PageRender { printf('',__METHOD__); echo "\n"; - printf('',JSDIR); - printf('',JSDIR); - printf('',JSDIR); + printf('',JSDIR); + printf('',JSDIR); + printf('',JSDIR); echo "\n"; printf('',__METHOD__); echo ' -'."\n"; + echo ''."\n"; printf('',__METHOD__); echo "\n"; } @@ -1633,7 +1647,7 @@ function validateForm(silence) { printf('',__METHOD__); echo ' -'; @@ -2224,9 +2238,9 @@ function deleteAttribute(attrName,friendlyName,i) # This JS may have been rendered by multiple Date attributes if (! $drawn) { - printf('',JSDIR); - printf('',JSDIR); - printf('',JSDIR); + printf('',JSDIR); + printf('',JSDIR); + printf('',JSDIR); $drawn = true; } @@ -2240,10 +2254,10 @@ function deleteAttribute(attrName,friendlyName,i) $config['format'] = $config['date'][$attribute->getName()]; for ($i=0;$i<=$attribute->getValueCount();$i++) { - printf('',$attribute->getName(),$i,$config['format']); + printf('',$attribute->getName(),$i,$config['format']); if (in_array_ignore_case($attribute->getName(),array_keys($config['time'])) && ($config['time'][$attribute->getName()])) - printf('',$attribute->getName(),$i,'true'); + printf('',$attribute->getName(),$i,'true'); echo "\n"; } @@ -2256,7 +2270,7 @@ function deleteAttribute(attrName,friendlyName,i) * Draws an HTML date selector button which, when clicked, pops up a date selector dialog. */ protected function drawSelectorPopupDateAttribute($attribute,$i) { - printf('Calendar', + printf('Calendar', $attribute->getName(),$i,_('Click to popup a dialog to select a date graphically'),IMGDIR,$attribute->getName(),$i); } @@ -2299,7 +2313,7 @@ function deleteAttribute(attrName,friendlyName,i) # Add the javascript so we can call check password later. echo ' -',JSDIR); - printf('',JSDIR); + printf('',JSDIR); + printf('',JSDIR); echo "\n"; } @@ -146,8 +144,8 @@ class page { echo ''; - echo '
     
    (%s)
    (%s)
    %s
    (%s)
    (%s)
    '; - printf('',get_href('sf'),$this->_app['logo']); + echo '
    '; + printf('',get_href('sf'),$this->_app['logo']); echo '
    '; $empty = true; @@ -175,7 +173,7 @@ class page { if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) debug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs); - echo ''; + echo '
    '; echo '
    '; $empty = true; @@ -210,7 +208,7 @@ class page { $this->index = min(array_keys($_SESSION[APPCONFIG]->getServerList())); if (count($_SESSION[APPCONFIG]->getServerList()) > 1) { - echo ''; + echo ''; echo ''; @@ -273,7 +271,7 @@ class page { } if (isset($details['title'])) - printf('', + printf('', $icon,$details['type'],$details['title']); if (isset($details['body'])) @@ -317,10 +315,10 @@ class page { if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) debug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs); - printf('', + printf('', isCompress() ? '[C]' : ' ', app_version(), - get_href('logo') ? sprintf('SourceForge.net Logo',get_href('sf'),get_href('logo')) : ' '); + get_href('logo') ? sprintf('SourceForge.net Logo',get_href('sf'),get_href('logo')) : ' '); } /** @@ -382,14 +380,14 @@ class page { # Page Header echo ''; echo "\n"; - echo '
    '; printf('%s:
    %s',_('Server Select'), server_select_list($this->index,false,'index',true,sprintf("onchange=\"tree_unhide('index',%s)\"",$this->index))); @@ -245,7 +243,7 @@ class page { if (! isset($this->_block[$side])) return; - printf('
    ',$side); + printf('',$side); foreach ($this->_block[$side] as $object) echo $object->draw($side); echo '
    %s%s
    %s%s
    %s
    %s
    %s
    %s
    %s
    %s
    '; + echo '
    '; if ($display['HEAD']) $this->head_print(); # Control Line if ($display['CONTROL']) { - echo ''; @@ -400,15 +398,15 @@ class page { echo ''; if ($display['TREE']) { - echo ''; } - echo '
    '; + echo '
    '; echo '
    '; $this->control_print(); echo '
    '; - printf('',_('Hide/Unhide the tree'),IMGDIR); + echo ''; + printf('',_('Hide/Unhide the tree'),IMGDIR); echo '
    '; $this->tree(); echo '
    '; echo '
    '; + echo ''; echo '
    '; echo "\n"; $this->body();