Exemple #1
0
        $search->filterInput($_SESSION['search-profile.php']);
    } elseif (isset($_REQUEST['page']) && isset($_SESSION['search-profile.php'])) {
        $searched = true;
        $search->filterInput($_SESSION['search-profile.php']);
    }
    print '<div style="margin:30px">';
    print '<form action="profile.php?userID=' . $UserProfile->id . '&advanced=on#top" method="post">';
    print '<input type="hidden" name="page" value="1" />';
    $search->formHTML();
    print '</form>';
    print '<p><a href="profile.php?page=1&amp;userID=' . $UserProfile->id . '#top" class="light">' . l_t('Close search') . '</a></p>';
    print '</div>';
    if ($searched) {
        print '<div class="hr"></div>';
        print $profilePager->pagerBar('top', '<h3>' . l_t('Results:') . '</h3>');
        $gameCount = $search->printGamesList($profilePager);
        if ($gameCount == 0) {
            print '<p class="notice">';
            if ($profilePager->currentPage > 1) {
                print l_t('No more games found for the given search parameters.');
            } else {
                print l_t('No games found for the given search parameters, try broadening your search.');
            }
            print '</p>';
            print '<div class="hr"></div>';
        }
    }
} else {
    $searched = true;
    if (isset($_SESSION['search-profile.php'])) {
        unset($_SESSION['search-profile.php']);
    if (isset($_REQUEST['search'])) {
        $_SESSION['search-gamelistings.php'] = $_REQUEST['search'];
        $search->filterInput($_REQUEST['search']);
    } elseif (isset($_SESSION['search-gamelistings.php'])) {
        $search->filterInput($_SESSION['search-gamelistings.php']);
    }
    print '<div style="margin:30px">';
    print '<form action="gamelistings.php?gamelistType=' . $tab . '&amp;page=1#top" method="post">';
    $search->formHTML();
    print '</form>';
    print '<p><a href="gamelistings.php?page=1" class="light">' . l_t('Close search') . '</a></p>';
    print '</div>';
    libHTML::pagebreak();
    print $Pager->pagerBar('top', '<h4>' . l_t('Results:') . '</h4>');
    print '<div class="hr"></div>';
    $gameCount = $search->printGamesList($Pager);
    if ($gameCount == 0) {
        print '<p class="notice">';
        if ($Pager->currentPage > 1) {
            print l_t('The set of returned games has finished; use the search tab to find specific games.');
        } else {
            print l_t('No games found for the given search parameters, try broadening your search.');
        }
        print '</p>';
    }
} else {
    libHTML::pagebreak();
    print $Pager->pagerBar('top');
    print '<div class="hr"></div>';
    $gameCount = $search->printGamesList($Pager);
    if ($gameCount == 0) {