Ejemplo n.º 1
0
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();
Ejemplo n.º 2
0
    $template->replace('LOGIN', '{LANG_LOGIN}');
    $template->replace('REGISTER', '{LANG_REGISTER}');
}
$usersearch = new jforg_usersearch();
$content = '<form action="{LINK_SEARCH}" method="post"><input value="' . $_POST['search'] . '" name="search" type="text" />&nbsp;<input class="submit" name="submit" type="submit" value="{LANG_SEARCH}" /></form>';
$max_per_search = 5;
if (isset($_POST['search'])) {
    if (preg_match('/.{3,}/', $_POST['search'])) {
        $array = $usersearch->search_all($_POST['search']);
        $result_counter = 0;
        $number = $usersearch->get_number_of();
        $content = $content . "<br /><br /><b>{$number} {LANG_MATCHES_FOR} " . $_POST['search'] . "</b><ol>";
        foreach ($array as $row) {
            $id = $row['id'];
            $nick = $user->get_nick($id);
            $details_match = $template->format_userdetails($row, 5, $_POST['search']);
            $content = $content . "<li><b><a href=\"{$id}-{$nick}.htm\">{$nick}</a></b><br />{$details_match}";
        }
    } else {
        $content = $content . "<br /><br /><b><em>{LANG_3CHAR}</em></b><br /><br />";
    }
}
$content = $content . "</ol>";
$template->replace('LOGIN', '{LANG_LOGIN}');
$template->replace('REGISTER', '{LANG_REGISTER}');
$template->replace('LINK_GERMAN', '/de/mitglieder/suche.htm');
$template->replace('LINK_ENGLISH', '/en/members/search.htm');
$template->replace('META_TITLE', '{LANG_SEARCH}');
$template->replace('FULLPAGE_HEADER', '{LANG_SEARCH}');
$template->replace('FULLPAGE_TEXT', $content);
$template->translate($language);