Example #1
0
$strCurrentUrl .= "&size={$arrRequest['size']}";
$strCurrentUrl .= !empty($_REQUEST['searchKeyWrod']) ? "&searchKeyWrod={$_REQUEST['searchKeyWrod']}" : '';
$strCurrentUrl .= !empty($_REQUEST['searchType']) ? "&searchType={$_REQUEST['searchType']}" : '';
$strCurrentUrl .= !empty($_REQUEST['areamain']) ? "&areamain={$_REQUEST['areamain']}" : '';
$strCurrentUrl .= !empty($_REQUEST['areasecond']) ? "&areasecond={$_REQUEST['areasecond']}" : '';
$strCurrentUrl .= !empty($_REQUEST['areathird']) ? "&areathird={$_REQUEST['areathird']}" : '';
$strCurrentUrl .= !empty($_REQUEST['fittingstatu']) ? "&fittingstatu={$_REQUEST['fittingstatu']}" : '';
$strCurrentUrl .= !empty($_REQUEST['housetype']) ? "&housetype={$_REQUEST['housetype']}" : '';
$strCurrentUrl .= !empty($_REQUEST['roomnumber']) ? "&roomnumber={$_REQUEST['roomnumber']}" : '';
$strCurrentUrl .= !empty($_REQUEST['lowestprice']) ? "&lowestprice={$_REQUEST['lowestprice']}" : '';
$strCurrentUrl .= !empty($_REQUEST['selltime']) ? "&selltime={$_REQUEST['selltime']}" : '';
$strCurrentUrl .= !empty($_REQUEST['entertime']) ? "&entertime={$_REQUEST['entertime']}" : '';
$strCurrentUrl .= isset($_REQUEST['isdiscounts']) ? "&isdiscounts={$_REQUEST['isdiscounts']}" : '';
// 分页
$params = array('total_rows' => $countRow, 'method' => 'html', 'parameter' => "{$strCurrentUrl}", 'now_page' => $arrRequest['page'], 'list_rows' => $arrRequest['size']);
$page = new Core_Lib_Page($params);
// D($params,12);
//  	 var_dump($page->show(2));
// D($arrRequest);
// D($_REQUEST)
// D($arrUserList);
// exit();
?>
  <!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title><?php 
echo HTML_PAGE_TITLE;
?>
</title>
Example #2
0
             $t = 'IP';
             break;
         case 5:
             $t = 'Comment';
             break;
         default:
             goto endlabel;
     }
     $r_value = DB::real_escape_string(str_replace('*', '%', str_replace('?', '_', $_GET['contents'])));
     $list_query = DB::fetch_all("SELECT * FROM `" . DCRM_CON_PREFIX . "UDID` WHERE `" . $t . "` LIKE '%" . $r_value . "%' ORDER BY `ID` DESC LIMIT " . (string) $page_a . ",10");
     $page_c = show_table($list_query);
     $q_info = DB::query("SELECT count(*) FROM `" . DCRM_CON_PREFIX . "UDID` WHERE `" . $t . "` LIKE '%" . $r_value . "%'");
     $info = DB::fetch_row($q_info);
     $totalnum = (int) $info[0];
     $params = array('total_rows' => $totalnum, 'method' => 'html', 'parameter' => 'center.php?action=search&contents=' . $_GET['contents'] . '&type=' . $_GET['type'] . '&page=%page', 'now_page' => $page, 'list_rows' => 10);
     $page = new Core_Lib_Page($params);
     echo '<div class="page">' . $page->show(2) . '</div>';
 } elseif (!empty($_GET['action']) and $_GET['action'] == "edit") {
     // 添加与编辑UDID
     if (!isset($_GET['add'])) {
         // 获取编辑信息
         if (isset($_GET['id']) && is_numeric($_GET['id'])) {
             $request_id = (int) $_GET['id'];
             if ($request_id < 1) {
                 _e('Illegal request!');
                 goto endlabel;
             }
         } else {
             _e('Illegal request!');
             goto endlabel;
         }
Example #3
0
function display($keyword, $page, $cl)
{
    global $memcache;
    $response = "";
    if ($keyword) {
        $cl->SetLimits(($page - 1) * 10, 10);
        $res = $cl->Query($keyword, "*");
        //"*"表示在所有索引里面同时搜索,"索引名称(例如test或者test,test2)"则表示搜索指定的
        $connection = NULL;
        $response .= "<div id='Content'>";
        if (!array_key_exists('matches', $res)) {
            $response .= 'No Result.';
        } else {
            $response .= "<div id='result_count'>找到约" . $res['total_found'] . "条结果(用时 " . $res['time'] . " 秒)</div>";
            foreach ($res['matches'] as $ids) {
                if (!($row = $memcache->get($ids['id']))) {
                    if ($memcache->getResultCode() == Memcached::RES_NOTSTORED || $memcache->getResultCode() == Memcached::RES_NOTFOUND) {
                        $row = queryContent($connection, $ids['id']);
                        $memcache->set($ids['id'], $row);
                    } else {
                        die("memcache error:" . $memcache->getResultCode());
                    }
                }
                $response .= <<<EOT
\t\t\t\t<script>
\t\t\t\t\$('#search_bar').removeClass('firstshow');
\t\t\t\t</script>
\t\t\t\t<div class='iP dropdown'>
\t\t\t\t<div class='mM'>
\t\t\t\t\t<div class='dF'>
\t\t\t\t\t\t<span role='button' class='sF' tabindex='0' title='{$row['Name']}'>
\t\t\t\t\t\t\t{$row['Name']}
\t\t\t\t\t\t</span>
\t\t\t\t\t</div>
\t\t\t\t\t<div class='tA'>
\t\t\t\t\t\t<div class='Pa'>
\t\t\t\t\t\t\t热度:<span>{$row['Rank']}</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class='Gg'>
\t\t\t\t\t\t\t更新时间:<span>{$row['Updatetime']}</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class='fK'>
\t\t\t\t\t\t\t<a href="#" class="button ddb"><span class="label">Files</span><span class="toggle"></span></a>
\t\t\t\t\t\t\t<a id="{$ids['id']}" class="button magnet" title="磁力链接"><span class="icon icon185"></span></a>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div> <!--mM-->
\t\t\t\t<div class='Su'>
\t\t\t\t\t<div class="dropdown-slider">
\t\t\t\t\t\t{$row['Description']}
\t\t\t\t\t</div> <!-- /.dropdown-slider -->
\t\t\t\t</div><!--Su-->
\t\t\t</div><!--iP-->
EOT;
            }
            // the pages
            $response .= "<div class='page'>";
            $params = array('total_rows' => $res['total_found'], 'method' => 'ajax', 'ajax_func_name' => 'goToPage', 'now_page' => $page, 'list_rows' => 10);
            $page = new Core_Lib_Page($params);
            $response .= $page->show(1);
            $response .= "</div>";
        }
        $response .= "</div><!--class Content-->";
    }
    return $response;
}