assign('styles', explode(':', KU_MENUSTYLES)); $tpl_links = ''; if (!$manage_class->ValidateSession(true)) { $tpl_links .= '
  • ' . _gettext('Home') . '
  • ' . "\n"; $tpl_links .= '
  • ' . ucfirst(_gettext('log in')) . '
  • '; } else { $manage_postpassword = md5_encrypt($_SESSION['manageusername'], KU_RANDOMSEED); $tpl_links .= _gettext('Welcome') . ', ' . $_SESSION['manageusername'] . ''; if ($_SESSION['manageusername'] == 'admin') { $salt = $tc_db->GetOne("SELECT `salt` FROM " . KU_DBPREFIX . "staff WHERE `username` = " . $tc_db->qstr($_SESSION['manageusername'])); if($_SESSION['managepassword'] == md5('admin'.$salt)) $tpl_links .= '
    ' . _gettext('NOTICE: You are using the default administrator account. Anyone can log in to this account, so a second administrator account needs to be created. Create another, log in to it, and delete this one.') . ''; } $tpl_links .= '
    ' . _gettext('Staff rights') . ': '; if ($manage_class->CurrentUserIsAdministrator()) { $tpl_links .= _gettext('Administrator'); } elseif ($manage_class->CurrentUserIsModerator()) { $tpl_links .= _gettext('Moderator'); } else { $tpl_links .= _gettext('Janitor'); } $tpl_links .= ""; $tpl_links .= '
  • ' . _gettext('Home') . '
  • ' . "\n"; $tpl_links .= '
  • '._gettext('Log out').'
  • '._gettext('Show Posting Password').'
  • '; // Home $tpl_links .= section_html(_gettext('Home'), 'home') . ''; // Administration if ($manage_class->CurrentUserIsAdministrator()) { $tpl_links .= section_html(_gettext('Site Administration'), 'siteadministration') . '' . section_html(_gettext('Boards Administration'), 'boardsadministration') . ''; /*$tpl_links .= section_html(_gettext('Modules'), 'modules') . '';*/ } // Boards $tpl_links .= section_html(_gettext('Boards'), 'boards') . ''; // Moderation if ($manage_class->CurrentUserIsAdministrator() || $manage_class->CurrentUserIsModerator()) { $open_reports = $tc_db->GetAll("SELECT HIGH_PRIORITY COUNT(*) FROM `" . KU_DBPREFIX . "reports` WHERE `cleared` = '0'"); $tpl_links .= section_html(_gettext('Moderation'), 'moderation') . ''; } if ($manage_class->CurrentUserIsModerator() ) { $tpl_links .= section_html(_gettext('Moderating Boards'), 'mboards', false) . '"; } } elseif ($manage_class->CurrentUserIsAdministrator()) { $tpl_links .= section_html(_gettext('All Boards'), 'mboards', false) . '"; } } function section_html($section, $abbreviation, $show=true) { return '

    ' . ($show ? '−' : '+') . ' ' . $section . '

    '; } $dwoo_data->assign('links', $tpl_links); $dwoo->output(KU_TEMPLATEDIR . '/manage_menu.tpl', $dwoo_data); ?>