+ $o = '';
+ $o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
+ if(x($_SESSION,'theme'))
+ unset($_SESSION['theme']);
+
+ if(x($a->data,'search'))
+ $search = notags(trim($a->data['search']));
+ else
+ $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
+
+ $tpl = get_markup_template('directory_header.tpl');
+
+ $globaldir = '';
+ $gdirpath = dirname(get_config('system','directory_submit_url'));
+ if(strlen($gdirpath)) {
+ $globaldir = '<ul><li><div id="global-directory-link"><a href="'
+ . $gdirpath . '">' . t('Global Directory') . '</a></div></li></ul>';
+ }
+
+ $admin = '';
+ if(is_site_admin()) {
+ if($everything)
+ $admin = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory' . '">' . t('Normal site view') . '</a></div></li></ul>';
+ else
+ $admin = '<ul><li><div id="directory-admin-link"><a href="' . $a->get_baseurl() . '/directory/all' . '">' . t('View all site entries') . '</a></div></li></ul>';
+ }