当前位置: 首页>>代码示例>>PHP>>正文


PHP search::filterInput方法代码示例

本文整理汇总了PHP中search::filterInput方法的典型用法代码示例。如果您正苦于以下问题:PHP search::filterInput方法的具体用法?PHP search::filterInput怎么用?PHP search::filterInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在search的用法示例。


在下文中一共展示了search::filterInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search

		</div>';
}
libHTML::pagebreak();
$search = new search('Profile');
$profilePager = new PagerGames('profile.php', $total);
$profilePager->addArgs('userID=' . $UserProfile->id);
if (isset($_REQUEST['advanced']) && $User->type['User']) {
    print '<a name="search"></a>';
    print '<h3>' . l_t('Search %s\'s games:', $UserProfile->username) . ' (<a href="profile.php?page=1&amp;userID=' . $UserProfile->id . '#top" class="light">' . l_t('Close') . '</a>)</h3>';
    $profilePager->addArgs('advanced=on');
    $searched = false;
    if (isset($_REQUEST['search'])) {
        libAuth::resourceLimiter('profile game search', 5);
        $searched = true;
        $_SESSION['search-profile.php'] = $_REQUEST['search'];
        $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);
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:profile.php

示例2: printAndFindTab

    print '</div>';
    return $tab;
}
$tab = printAndFindTab();
$search = new search($tab);
if ($tab != 'My games' && $tab != 'Search') {
    $Pager = new PagerGames('gamelistings.php', $Misc->{'Games' . $tab});
} else {
    $Pager = new PagerGames('gamelistings.php');
}
$Pager->addArgs('gamelistType=' . $tab);
if ($tab == 'Search' or isset($_REQUEST['searchOn']) or isset($_REQUEST['search'])) {
    $Pager->addArgs('searchOn=on');
    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">';
开发者ID:Yoyoyozo,项目名称:webDiplomacy,代码行数:31,代码来源:gamelistings.php


注:本文中的search::filterInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。