⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.php

📁 服务饿沃尔沃饿 威尔威尔威尔威尔沃尔沃而我额外而我而 威尔威尔威尔威尔威尔威尔而 威尔
💻 PHP
字号:
<?php
	/*
	+-------------------------------------------
	|
	|   Technology of Wane netware
	|   ========================================
	|   Powered by wan-e.net inc 
	|   (c) 2004 wane.net Power Services
	|   http://www.wan-e.net
	|   ========================================
	|   Web: http://www.wan-e.net
	|
	+-------------------------------------------
	|   Autohr	:	wsfuyibing
	+-------------------------------------------
	*/
	$cache_class	=	$wane_root.'globals/cache/cache_selectc.php';
	$cache_made		=	$wane_root.'globals/cache/cache_selectm.php';
	$cache_searchc	=	$wane_root.'globals/cache/cache_searchc.php';
	$cache_searchm	=	$wane_root.'globals/cache/cache_searchm.php';
	if (!file_exists($cache_class) || !file_exists($cache_made) || !file_exists($cache_searchc) || !file_exists($cache_searchm))
	{
		unset($cache_class,$cache_made,$cache_searchc,$cache_searchm);
		require $wane_root.'globals/class_cache.php';
		$cache=new wanecache;
		$cache->update_cache(array('selectm','selectc','searchm','searchc'));
		echo 'Create cache.<BR>Please refresh the page.';
		exit;
	}
	else
	{
		require $cache_class;
		require $cache_made;
		require $cache_searchc;
		require $cache_searchm;		
		unset($cache_class,$cache_made,$cache_searchc,$cache_searchm);
		eval($function->load_lang('search'));
	}
	
	if (!$RIGHT[SEARCH])
	{
		$function->clickback($LANG_SEARCH[ACCESS_DENIED]);
	}
	elseif ($searchsubmit || $action=='searchresult')
	{
		switch ($pc_type)
		{
			case	'market'	:	$price	=	'price_market'	;	break;
			case	'member'	:	$price	=	'price_member'	;	break;
			case	'vip'		:	$price	=	'price_vip'		;	break;
		}
		$search_extent	=	"where sid > '0'";
		$search_url		=	"index.php?action=searchresult&pc_type=$pc_type";
		if (!$addtime || !is_numeric($addtime) || $addtime<'1')
		{
			$search_extent.="";
		}
		else
		{
			$addtimes=time()-$addtime;
			$search_extent.=" and addtime>'$addtimes'";
			$search_url	.=	"&addtime=$addtime";
		}
		if (!$losetime || !is_numeric($losetime) || $losetime<'1')
		{
			$search_extent.="";
		}
		else
		{
			$losetimes=time()+$losetime;
			$search_extent.=" and losetime>'$losetimes'";
			$search_url	.=	"&losetime=$losetime";
		}
		if (empty($keyword))
		{
			$search_extent.="";
		}
		else
		{
			$search_extent.=" and spname like '%$keyword%'";
			$search_url	.=	"&keyword=".urlencode($keyword);
		}
		if (!$content)
		{
			$search_extent.="";
		}
		else
		{
			$search_extent.=" and spcontext like '%$keyword%'";
			$search_url	.=	"&content=1";
		}
		if (!is_numeric($cid) || $cid<'1')
		{
			$search_extent.="";
		}
		else
		{
			$cidarray	=	'search'.$cid;
			$cids	=	"'".str_replace(",","','",$cache_searchc[$cidarray])."'";
			$search_extent.=" and cid in ($cids)";
			$search_url	.=	"&cid=$cid";
		}
		if (!$mid || !is_numeric($mid) || $mid<'1')
		{
			$search_extent.="";
		}
		else
		{
			$midarray	=	'search'.$mid;
			$mids	=	"'".str_replace(",","','",$cache_searchm[$midarray])."'";
			$search_extent.=" and mid in ($mids)";
			$search_url	.=	"&mid=$mid";
		}
		if ($bid=='1' && is_numeric($bid))
		{
			$search_extent.=" and bid='$bid'";
			$search_url	.=	"&bid=$bid";
		}
		if ($bid=='2' && is_numeric($bid))
		{
			$search_extent.=" and pid='1'";
			$search_url	.=	"&bid=2";
		}
		if (!$pc_start || !is_numeric($pc_start) || $pc_start<0)
		{
			$search_extent.="";
		}
		else
		{
			$search_extent.="and $price > '$pc_start'";
			$search_url	.=	"&pc_start=$pc_start";
		}
		if (!$pc_end || !is_numeric($pc_end) || $pc_end<0)
		{
			$search_extent.="";
		}
		else
		{
			$search_extent.=" and $price < '$pc_end'";
			$search_url	.=	"&pc_end=$pc_end";
		}
		$navigata_extent	=	$bid=='1'	?	$LANG['SPPER']	:	($bid=='2'	?	$LANG['SPTOP']	:	$LANG_SEARCH_RESULT['SEARCH_RESULT']);
		eval($tpl->set_var(array(
			'WEBTITLE'		=>	$function->headtitle('['.$webtitle.'] | '.$LANG['SEARCH']),
			'NAVIGATA'		=>	"<a class='navigata' href='{$default_url}index.php?action=idx'>$webtitle</a>&nbsp;$category_separate&nbsp;<a class='navigata' href='{$default_url}index.php?action=search'>$LANG[SEARCH]</a>&nbsp;$category_separate&nbsp;$navigata_extent"
		)));		
		$page_count	=	array(
			$num_search,"{$tablepre}spinfo",$search_url,$search_extent
		);		
		require $wane_root.'globals/page_count.php';
		$query=$db->query("select * from $page_count[1] $page_count[3] order by sid desc limit $offset,$show_count");
		$numsps=0;
		$tplfiles	=	array('header','searchresult','footer');	
	}
	else
	{
		eval($tpl->set_var(array(
			'WEBTITLE'		=>	$function->headtitle('['.$webtitle.'] | '.$LANG['SEARCH']),
			'NAVIGATA'		=>	"<a class='navigata' href='{$default_url}index.php?action=idx'>$webtitle</a>&nbsp;$category_separate&nbsp;<a class='navigata' href='{$default_url}index.php?action=search'>$LANG[SEARCH]</a>",
			'SELECT_CLASS'	=>	$cache_selectc,
			'SELECT_MADE'	=>	$cache_selectm,
		)));	
		$tplfiles	=	array('header','search','footer');	
	}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -