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

📄 index1.php

📁 1.上传所有文件到你的空间。 2.把数据库文件FORUM.sql导入数据库。 3.修改config.php 和 data文件夹属性为0777。 4.后台管理地址:/admin/login.php
💻 PHP
字号:
<?php
	session_start();
	require "fun.php";
	require "articlelib.php";
	require "header.php";
	require "config.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

	$text_search = intval($_GET['fll']);
	if (empty($nowpage))
	{
		$nowpage = 1;
	}
	$style_search="fl";
	//返回查到的结果
	if ($text_search != "")
	{
		$result = search_forum($style_search, $text_search);
	}
	if (!empty($result))
	{
		//查到的文章数
		$total = mysql_num_rows($result);
		$search_row = $page1;
		//文章的页数
		$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><?=$sys_site_name?></title>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="admin/template/css.css" rel="stylesheet" type="text/css" />

<!--
.STYLE4 {font-size: 16px}
.STYLE5 {color: #000000}
-->
    </style>
</head>
<body bgColor="#FFFFFF">
	<form name="search" method="post" action="search.php">

		<input type="hidden" name="fll" value="<? print $fll;?>">
		<input type="hidden" name="nowpage" value="<? print $nowpage;?>">
		<table width="100%" border="0">

<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 $fll;?>">
			<?php
				if (is_array($info))
				{
			?>
					<tr>
				<table border=0 cellSpacing=1 width="100%">
				<tbody>
					<tr bgColor="#aeaeae">
<th align="left">
  <div align="center">序号  </div></th>
<th align="left">
  <div align="center">分类  </div></th>
						<th align="left">
                          <div align="center">标题/简介/种子          </div></th>
<th align="left">
  <div align="center">作者  </div></th>
<th align="left">
  <div align="center">下载次数  </div></th>
<th align="left">
  <div align="center">发布日期  </div></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 (file_exists("$sys_data_dir/fl/$fl.php"))
{
	$sort_data=file("$sys_data_dir/fl/$fl.php");
	$songer_num=count($sort_data);
	$sort_info=explode("|",$sort_data[$songer_num-1]);


}
else
{
	echo "分类不存在!可能已经删除,请联系站长!";
}
					?>
<TR bgColor='#CCCCFF'>
<TD width='4%'><div align="center"><span class="STYLE3">
  <?=$num;?>
</span> </div></TD>
<TD width='10%'>
 <div align="center"><span class="STYLE3">
<?=$sort_info[0];?></span></div></TD>
<TD width='50%'>
<span class="STYLE3">
<a onMouseOut="hideTip()" onMouseOver="showTip('<?=$msg;?>')" target="_blank" href='info.php?id=<? print $id;?>'><? print $title;?></A></span></TD>
<TD width='9%'>
<div align="center"><span class="STYLE3">
<?=$writer;?></span></div></TD>
<TD width='5%'>
<div align="center"><span class="STYLE3">
<?=$num_click;?>
</span></div></TD>
<TD width='12%'>
<div align="center">
<?=$importtime;?></div></TD>
</TR>	<?php
						}
						//调用分页格式
						print pri_page("index1", $fll, $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>

<?php
	db_close();
require "footer.php";
?>

⌨️ 快捷键说明

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