SESSION_START();
if ($user->login($_SESSION['nick'], $_SESSION['passwd'])) {
    $template->replace('LOGIN', '{LANG_LOGOUT}');
    $template->replace('REGISTER', '{LANG_OPTIONS}');
    $template->replace('LINK_LOGIN', '{LINK_LOGOUT}');
    $template->replace('LINK_REGISTER', '{LINK_OPTIONS}');
} else {
    $template->replace('LOGIN', '{LANG_LOGIN}');
    $template->replace('REGISTER', '{LANG_REGISTER}');
}
$max_per_search = 5;
$usersearch = new jforg_usersearch();
$content = '<br /><form action="{LINK_SEARCH}" method="post"><input name="search" type="text" />&nbsp;<input class="submit" name="submit" type="submit" value="{LANG_SEARCH}" /></form>';
$content = $content . '<br /><br /><b>{LANG_LAST_MEMBERS}</b><ol>';
$array = $usersearch->search_last(5);
foreach ($array as $row) {
    $details_match = $template->format_userdetails($user->get_details($row['id']));
    $content = $content . '<li><b><a href="' . $row['id'] . '-' . $row['nick'] . '.htm">' . $row['nick'] . '</a></b><br />' . $details_match . '</li>';
}
$content = $content . '</ol>';
$content .= $template->generate_cloud($language);
$template->replace('LOGIN', '{LANG_LOGIN}');
$template->replace('REGISTER', '{LANG_REGISTER}');
$template->replace('LINK_GERMAN', '/de/mitglieder/');
$template->replace('LINK_ENGLISH', '/en/members/');
$template->replace('META_TITLE', '{LANG_MEMBERS}');
$template->replace('FULLPAGE_HEADER', '{LANG_MEMBERS}');
$template->replace('FULLPAGE_TEXT', $content);
$template->translate($language);
include 'includes/links.php';
$template->write();
$user = new jforg_user();
$template = new jforg_template();
$template->set_path('design');
$template->set_frame('fullpage', 'green');
$template->hover_on('green');
SESSION_START();
if ($user->login($_SESSION['nick'], $_SESSION['passwd'])) {
    $template->replace('LOGIN', '{LANG_LOGOUT}');
    $template->replace('REGISTER', '{LANG_OPTIONS}');
    $template->replace('LINK_LOGIN', '{LINK_LOGOUT}');
    $template->replace('LINK_REGISTER', '{LINK_OPTIONS}');
} else {
    $template->replace('LOGIN', '{LANG_LOGIN}');
    $template->replace('REGISTER', '{LANG_REGISTER}');
}
$user_details = $user->get_details($user_id);
if ($language == "de") {
    $link = "mitglieder";
}
if ($language == "en") {
    $link = "members";
}
$content = '<a href="/' . $language . '/' . $link . '/' . $user_id . '-' . $user->get_nick($user_id) . '.htm">{LANG_SHOW_USER_PAGE_OF} ' . $user->get_nick($user_id) . '</a><br /><br />';
$content = $content . str_replace("\n", "<br />", $user_details['PUBLICKEY']);
$template->replace('FULLPAGE_TEXT', $content);
$template->replace('FULLPAGE_HEADER', '{LANG_PUBLICKEY_OF} ' . $user->get_nick($user_id));
$template->replace('META_TITLE', '{LANG_PUBLICKEY_OF} ' . $user->get_nick($user_id));
$template->replace('LINK_GERMAN', '/de/publickeys/' . $user_id . '-' . $user->get_nick($user_id) . '.htm');
$template->replace('LINK_ENGLISH', '/en/publickeys/' . $user_id . '-' . $user->get_nick($user_id) . '.htm');
$template->translate($language);
include 'includes/links.php';