'Macintosh', 'unix' => 'UNIX (Linux, BSD)', 'win' => 'Windows' ); $available_scopes = array( 'base' => _('Base (base dn only)'), 'one' => _('One (one level beneath base)'), 'sub' => _('Sub (entire subtree)') ); $request['page'] = new PageRender($app['server']->getIndex(),get_request('template','REQUEST',false,'none')); $request['page']->drawTitle(sprintf('%s',_('Export'))); printf('',JSDIR); printf('',JSDIR); echo '
'; echo '
'; echo '
'; echo ''; printf('',$app['server']->getIndex()); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; printf('', htmlspecialchars(_('Proceed >>'))); echo '
'; echo '
'; printf('%s',_('Export')); echo ''; printf('',_('Server'),$app['server']->getName()); echo ''; printf('',_('Base DN')); echo ''; echo ''; echo ''; printf('',_('Search Scope')); echo ''; echo ''; printf('', _('Search Filter'),htmlspecialchars($request['filter'])); printf('', _('Show Attributes'),htmlspecialchars($request['attr'])); printf('', $request['sys_attr'] ? 'checked="checked" ' : '',_('Include system attributes')); printf('', _('Save as file')); printf('', _('Compress')); echo '
%s%s
%s'; printf(' ',htmlspecialchars($request['dn'])); draw_chooser_link('export_form','dn'); echo '
%s'; foreach ($available_scopes as $id => $desc) printf('
', htmlspecialchars($id),$id,($id == $request['scope']) ? 'checked="checked"' : '', htmlspecialchars($id),$desc); echo '
%s
%s
 
 
 
'; echo '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo '
'; echo '
'; printf('%s',_('Export format')); foreach (Exporter::types() as $index => $exporter) { printf('', htmlspecialchars($exporter['type']),htmlspecialchars($exporter['type']),($exporter['type'] === $request['exporter_id']) ? ' checked="checked"' : ''); printf('
', htmlspecialchars($exporter['type']),$exporter['type']); } echo '
'; echo '
'; echo '
'; printf('%s',_('Line ends')); foreach ($available_formats as $id => $desc) printf('
', htmlspecialchars($id),htmlspecialchars($id),($request['format']==$id) ? ' checked="checked"' : '', htmlspecialchars($id),$desc); echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; /** * Helper function for fetching the line end format. * * @return String 'win', 'unix', or 'mac' based on the user's browser.. */ function get_line_end_format() { if (is_browser('win')) return 'win'; elseif (is_browser('unix')) return 'unix'; elseif (is_browser('mac')) return 'mac'; else return 'unix'; } /** * Gets the USER_AGENT string from the $_SERVER array, all in lower case in * an E_NOTICE safe manner. * * @return string|false The user agent string as reported by the browser. */ function get_user_agent_string() { if (isset($_SERVER['HTTP_USER_AGENT'])) return strtolower($_SERVER['HTTP_USER_AGENT']); else return ''; } /** * Determine the OS for the browser */ function is_browser($type) { $agents = array(); $agents['unix'] = array( 'sunos','sunos 4','sunos 5', 'i86', 'irix','irix 5','irix 6','irix6', 'hp-ux','09.','10.', 'aix','aix 1','aix 2','aix 3','aix 4', 'inux', 'sco', 'unix_sv','unix_system_v','ncr','reliant','dec','osf1', 'dec_alpha','alphaserver','ultrix','alphastation', 'sinix', 'freebsd','bsd', 'x11','vax','openvms' ); $agents['win'] = array( 'win','win95','windows 95', 'win16','windows 3.1','windows 16-bit','windows','win31','win16','winme', 'win2k','winxp', 'win98','windows 98','win9x', 'winnt','windows nt','win32', '32bit' ); $agents['mac'] = array( 'mac','68000','ppc','powerpc' ); if (isset($agents[$type])) return in_array(get_user_agent_string(),$agents[$type]); else return false; } ?>