<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="collection.asp"-->
<!--#include file="Config.asp"-->
<%
Server.ScriptTimeOut = 18000
dim types,p
  types = Request.QueryString("type")
  key = Request.QueryString("key")
  page = Request.QueryString("p")
  if page = "" then page = "1"
%>
<script type="text/javascript">
function index(p)
{
        var page = p?p:1;
        window.location = '?p=' + page + '&type=' + '<%=types%>' + '&key=' + '<%=key%>';
}
function gopage()
{
	var pInput = document.getElementById('pInput').value;
	index(pInput);
}
function splitAuthor(author)
{
	var authors = author.split(",");
	var str="";
	for (var i=0;i<authors.length;i++)
	{
		str += '<a href="<%=Xwsy_sWebUrl%>list.asp?type=author&key='+authors[i]+'" target="_blank" class="fclblack">'+authors[i]+"</a> ";
	}
	return str;
}
</script>

<%

dim Xurl,Encoding
	
        Xurl = Trim("http://bookapp.book.qq.com/cgi-bin/lz_index?p=" & page & "&type=" & types & "&key=" & key & "")    '目标网站网页地址
		'--获取远程列表网页源代码
		HTTPHtmlCode = Myxwsy.TempTrim (Myxwsy.Gethtmldata(Xurl,Encoding))
		if HTTPHtmlCode = "" then
		   OutErrors ("获取远程信息出错！请确定你的远程列表URL输入无误。")
		end if
		'--获取作品列表
        xwsybook1 = Myxwsy.TempTrim (Myxwsy.CutFixed(HTTPHtmlCode,"daohang/wssk.htm","<div style=""width:910px;margin:5px auto;"">"))
		xwsybook1 = Myxwsy.TempTrim (Myxwsy.CutFixed(xwsybook1,"<table width=""910"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">","<table width=""910"" height=""30"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""tablebd1"">"))
		if xwsybook1 = "" then
		   OutErrors ("获取远程列表出错！请确定你的远程列表开始和结束代码输入无误。")
		end if
		sTitle = Myxwsy.TempTrim (Myxwsy.CutFixed(HTTPHtmlCode,"<title>","_"))
		xwsybook1 = Replace(xwsybook1,"/index.shtml","")
		xwsybook1 = Replace(xwsybook1,"a href=""http://book.qq.com/s/book/","a href=""reads.asp?bookid=")
		xwsybook1 = Replace(xwsybook1,"http://bookapp.book.qq.com/cgi-bin/lz_index?type=author&key=","list.asp?type=author&key=")
		xwsybook1 = Replace(xwsybook1,"http://bookapp.book.qq.com/cgi-bin/lz_index?type=press&key=","list.asp?type=press&key=")
		xwsybook1 = Replace(xwsybook1,"http://bookapp.book.qq.com/cgi-bin/lz_index?type=sort&key=","list.asp?type=sort&key=")
		
		xwsybook2 = Myxwsy.TempTrim (Myxwsy.CutFixed(HTTPHtmlCode,"<table width=""910"" height=""30"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""tablebd1"">","<div style=""width:910px;margin:5px auto;"">"))


%>
<!--#include file="top.asp"-->
<div class="leftshad"><div class="rightshad">
	<div class="maincol">
<%
        response.write ("<table><tr>")
		response.write (xwsybook1)
		response.write ("<table width=""910"" height=""30"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""tablebd1"">")
		response.write (xwsybook2)
'		response.End
%>
	</div>
</div></div>
<div class="leftshad">
  <div class="rightshad">
    <div class="maincol"></div>
  </div>
</div>
<!--#include file="end.asp"-->