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

📄 search.php

📁 有意思的程序 1.你传所有文件到你的空间。 2.把数据库文件导入数据库。 3.修改lib.php里的数据库资料。 4.修改files文件夹属性为0777。 5.修改index.php的内容。
💻 PHP
字号:
<SCRIPT language=JavaScript>
<!--
var bV = parseInt(navigator.appVersion);
var NN4 = document.layers ? true : false;
var IE4 = document.all && bV >= 4 ? true : false;
var downloadID = 0;
var downloadHash = '';
var showClickprogress = 100;

function goPage(pagenum)
{
	document.MainForm.page.value = pagenum;
	document.MainForm.submit();
	return false;
}
function Sort(type)
{
	document.MainForm.sorttype.value = type;
	document.MainForm.submit();
}
function SubmitForm()
{
	document.MainForm.page.value = 1;
	document.MainForm.submit();
}
function showTip(msg)
{
	var obj = 'TipBox';
	if (showClickprogress < 100) return;

	if (typeof(hideTimeOut) != 'undefined') clearTimeout(hideTimeOut);
	if (NN4)
	{
		if (document.layers[obj].visibility != 'visible')
		{
			with (document[obj].document)
			{
				open();
				write('<layer id=TipBox bgColor=#ffffee style="width: 700px; border: 1px solid #000000" onMouseover="keepTip()" onMousewheel="keepTip()" onMouseout="hideTip()">' +msg+ '</layer>');
				close();
			}
			var objp = document.layers.TipBox;
			objp.moveTo(100, e.y + 6);
		}
		document.layers[obj].visibility = 'visible';
	}
	else if(IE4)
	{
		if (document.all[obj].style.visibility != 'visible')
		{
			document.all[obj].innerHTML = msg;
			var y = event.y;
			var objp = document.all.TipBox.style;
			var yy = document.body.scrollTop + y + 6;
			objp.pixelLeft = 100;
			objp.pixelTop = yy;
		}
		document.all[obj].style.visibility = 'visible';
	}
}
function keepTip()
{
	var obj = 'TipBox';
	if (showClickprogress < 100) return;

	if (typeof(hideTimeOut) != 'undefined') clearTimeout(hideTimeOut);
	if (NN4)
		document.layers[obj].visibility = 'visible';
	else if(IE4)
		document.all[obj].style.visibility = 'visible';
}
function hideTip()
{
	hideTimeOut = setTimeout('delayHide()', 5); //窗口消失时间,为方便用户浏览,建议设置越小越好,原:300
}
function delayHide()
{
	var obj = 'TipBox';

  	if (NN4)
	{
		if (document.layers[obj] != null)
			document.layers[obj].visibility = 'hidden';
	}
	else if(IE4)
		document.all[obj].style.visibility = 'hidden';
	if (typeof(hideTimeOut) != 'undefined') clearTimeout(hideTimeOut);
}
function setReload()
{
	window.location.reload();
}
function showDetail(info_hash)
{
	var url = info_hash == '' ? 'viewgraph.php' : 'detail.php?info_hash=' + info_hash;
	window.open(url, 'detailview', 'scrollbars=yes, width=500, height=300');
}
function GetTorrent()
{
	torrentdir = Math.floor(downloadID / 2000);
	document.location.href = 'torrents/'+torrentdir+'/'+downloadHash+'.torrent';
}
function displayClickAD()
{
	showClickprogress = 0;
	ClickADref = document.all.ClickAD;

	var scroll_top = document.body.scrollTop;
	var docwidth = document.body.clientWidth;
	var docheight = document.body.clientHeight;
	var ClickADwidth = ClickADref.offsetWidth;
	var ClickADheight = ClickADref.offsetHeight;
	ClickADref.style.left = docwidth / 2 - ClickADwidth / 2;
	ClickADref.style.top = scroll_top + docheight / 2 - ClickADheight / 2;

	ClickADscroll = setInterval('staticClickADbox()', 50);
	ProgressBar = setInterval('controlledhideClickAD()', 400);
	ClickADref.style.visibility = "visible";
}
function staticClickADbox()
{
	var scroll_top = document.body.scrollTop;
	var docheight = document.body.clientHeight;
	var ClickADheight = ClickADref.offsetHeight;
	ClickADref.style.top = scroll_top + docheight / 2 - ClickADheight / 2;
}
function hideClickADbox()
{
	ClickADref.style.visibility = 'hidden';
	if (typeof(ClickADscroll) != 'undefined') clearInterval(ClickADscroll);
	if (typeof(ProgressBar) != 'undefined') clearInterval(ProgressBar);
	document.all.Progress.innerHTML = '<table align=left><tr><td height=5></td></tr></table>';
	GetTorrent();
}
function controlledhideClickAD()
{
	showClickprogress += 10;
	document.all.Progress.innerHTML = '<table width=' + showClickprogress + '% align=left bgColor=green><tr><td height=5></td></tr></table>';
	if (showClickprogress > 100) hideClickADbox();
}
function DownLoad(id, hash)
{
	downloadID = id;
	downloadHash = hash;
	hideTip();
	IE4 ? displayClickAD() : GetTorrent();
}

var showPopStep = 10;
var popOpacity = 94; //原:80
var sPop = '';
var tFadeOut = 'yes'; //原:yes

function showPopupText(popText)
{
	if (!IE4) return;

	var o = event.srcElement;
	var MouseX = event.x;
	var MouseY = event.y;

	if (popText != sPop)
	{
		sPop = popText;
		clearTimeout(tFadeOut);

		if (sPop == null || sPop == '')
		{
			document.all.popLayer.innerHTML = '';
			document.all.popLayer.style.filter = "Alpha()";
			document.all.popLayer.filters.Alpha.opacity = 0;	
		}
		else
		{
			document.all.popLayer.innerHTML = sPop;
			document.all.popLayer.style.filter = "Alpha(Opacity=0)";
			var popWidth = document.all.popLayer.clientWidth;
			var popHeight = document.all.popLayer.clientHeight;
			document.all.popLayer.style.left = MouseX + popWidth > document.body.clientWidth - 5 ? document.body.clientWidth - popWidth - 5 : MouseX;
			document.all.popLayer.style.top = MouseY + document.body.scrollTop;
			fadeOut();
		}
	}
}
function fadeOut()
{
	if (popLayer.filters.Alpha.opacity < popOpacity)
	{
		popLayer.filters.Alpha.opacity += showPopStep;
		tFadeOut = setTimeout('fadeOut()', 1000); //窗口淡出时间设置 原:30
	}
}
-->
</SCRIPT>
<SCRIPT language=JavaScript>
<!--
if (IE4)
{
	//document.write('<div id=popLayer style="position:absolute; z-index:101" class=cPopText></div>');
	document.write('<div id=ClickAD style="width: 700px; position: absolute; visibility: hidden; padding: 5px 5px 5px 5px; background-Color: #ffffee; filter: alpha(Opacity=94); border: 0px solid #000000; z-index: 100"><table cellPadding=0 cellSpacing=0 border=0 width=100% style="table-layout: fixed" align=center><tr><td style="word-wrap: break-word"><a href=http://www.lwcrystal.com target=_blank><img src=/ad/ad4.jpg border=0></a></td></tr></table><div id=Progress align=center><table align=left><tr><td height=5></td></tr></table></div></div>');
	document.write('<div id=TipBox style="width: 700px; position: absolute; visibility: hidden; padding: 5px 5px 5px 5px; background-Color: #ffffee; filter: alpha(Opacity=94); border: 0px solid #000000; z-index: 99" onMouseover="keepTip()" onMousewheel="keepTip()" onMouseout="hideTip()"></div>');
}
else if (NN4)
{
	document.write('<div id=TipBox style="position: absolute; visibility: hidden; background-Color: #ffffee; filter: alpha(Opacity=94); border: 0px solid #000000; z-index: 99"></div>');
	setTimeout('window.onResize=setReload', 500);
}
-->
</SCRIPT>

<?php
	//search.php 在article子目录中
	require "articlelib.php";
  $style_search=$_POST['style_search'];
  $text_search=$_POST['new_name'];
	if (empty($nowpage))
	{
		$nowpage = 1;
	}
	//返回查到的结果
	if ($text_search != "")
	{
		$result = search_forum($style_search, $text_search);
	}
	if (!empty($result))
	{
		//查到的文章数
		$total = mysql_num_rows($result);
		$search_row = 20;
		//文章的页数
		$num_page = ceil($total/$search_row);
		$ressearch = search_forum($style_search, $text_search);
		//数用数组存储所有的结果,也可以在前面采用sql中的limit方法,得到一定范围的结果
		while ($searticle = mysql_fetch_array($ressearch))
		{
			$info[] = $searticle;
		}
		$begin = ($nowpage-1)*$search_row;
		$end = $nowpage*$search_row;
		if ($begin <= 0)
		{
			$begin = 0;
		}
		if ($end >= $total)
		{
			$end = $total;
		}
	}
?>

<html>
<head>
	<title>种子搜索</title>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	<? article_style(); ?>
</head>
<tr>
				<td height="34">
					<table width="100%" border="0">
<form method=post action="search.php" name="form5">
						<tr>
							<td width="20%">查询方式
								<select name="style_search">
									<option value="title" selected>标题</option>
									<option value="writer">作者</option>
									<option value="content">内容</option>
									<option value="time">时间</option>
								</select>
							</td>
							
							<td width="30%">关键词
								<input type=text name="new_name">
							</td>
							
							<td width="10%">
								<input type=submit value="种子搜索"><br>
							</td>
							
							<td width="24%">
								<div align="right">
									<A  href="javascript:window.external.addFavorite('http://mmok.sexxxcity.org','成人BT发布站')">加入收藏</A>
								</div>
							</td>
							
							<td width="24%">
								<div align="center">
									<a href="http://mmok.sexxxcity.org/bt/1.php">
										发布种子
									</a>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>

<body bgColor="#FFFFFF">
	<form name="search" method="post" action="search.php">
		<input type="hidden" name="nowpage" value="<? print $nowpage;?>">
		<input type="hidden" name="style_search" value="<? print $style_search;?>">
		<input type="hidden" name="text_search" value="<? print $text_search;?>">
		<table width="70%" border="0" align="center">
			<?php
				if (is_array($info))
				{
			?>
					<tr>
				<table border=0 cellSpacing=1 width="100%">
				<tbody>
					<tr bgColor="#aeaeae">
						<th align="left">
							<font size="2">
								序号
							</font>
						</th>
						<th align="left">
							<font size="2">
								分类
							</font>
						</th>
						<th align="left">
							<font size="2">
								主题/简介/种子
							</font>
						</th>
						<th align="left">
							<font size="2">
								作者
							</font>
						</th>
						<th align="left">
							<font size="2">
								下载次数
							</font>
						</th>
						<th align="left">
							<font size="2">
								发布日期
							</font>
						</th>
					</tr>

					<?php

						for ($i=$begin; $i<$end; $i++)
						{	$num = $i+1;				
						$msg = $info[$i]["content"];
						$id = $info[$i]["id"];
						$title = $info[$i]["title"];
						$writer = $info[$i]["writer"];
						$size_article = $info[$i]["size_article"];
						$num_click = $info[$i]["click"];
						$importtime = $info[$i]["importtime"];
						$adda= $info[$i]["adda"];
						$fl= $info[$i]["fl"];

							if ($i%2)
							{
								print "<tr bgColor='#def7e7'>";
							}
							else
							{
								print "<tr bgColor='#95caff'>";
							}
					?>
							<TR bgColor='#CCCCFF'>
<TD width='5%'>
<FONT color='#000000'><?=$num;?></FONT>
</TD>
<TD width='6%'>
<FONT color='#000000'><?=$fl;?></FONT>
</TD>
<TD width='44%'>
<a onMouseOut="hideTip()" onMouseOver="showTip('<?=$msg;?>')" target="_blank" href='info.php?id=<? print $id;?>'><? print $title;?></A></TD>
<TD width='15%'>
	<FONT color='#000000'>
<FONT color='#000000'><?=$writer;?></FONT>
</FONT>
</TD>
<TD width='5%'>
<FONT color='#000000'><?=$num_click;?></FONT>	
</TD>
<TD width='15%'>
<FONT color='#000000'><?=$importtime;?></FONT>	
</TD>				
</TR>						
					<?php
						}
						//调用分页格式
						print pri_page("search", $nowpage, $num_page);
				}
				else
				{
					print "<tr>";
					print "<td width='100%'>";
					print "<div align='center'>";
					$msg = "查询结果为空!";
					print $msg;
					print "</div>";
					print "</td>";
					print "</tr>";
				}
			?>
		</table>
	</form>
</body>
</html>
<script src='http://s116.cnzz.com/stat.php?id=458108&web_id=458108&online=1&show=line' language='JavaScript' charset='gb2312'></script>
<?php
	db_close();
?>

⌨️ 快捷键说明

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