<!--#include file=gdibn.inc-->
<%
Server.ScriptTimeOut=120
dim id
on error resume next 
	id=request("id")
	if id="" then
	id=0
	end if
	if id=4 then
	url="http://www.skycn.net/new/wz.html"
	else
	url="http://www.skycn.net/new/0"&id&".html"
	end if
	set myCache=new cache
	myCache.name=id
	if myCache.valid then
	newcode = myCache.value
	else	
	newcode=getHTTPPage(url)
	end if	
	if err.number=0 then
	topcodearr=split(newcode,"<tr><td align='left'>")
	for i=1 to ubound(topcodearr)
	over=Instr(topcodearr(i),"</td></tr>")
	topcodearr(i)=mid(topcodearr(i),1,over-1)
	topcodearr(i)=replace(topcodearr(i),"../soft/","soft.asp?id=")
	topcodearr(i)=replace(topcodearr(i),"../article/","article.asp?id=")
	topcodearr(i)=replace(topcodearr(i),".html","")
	next
	start=Instr(newcode,"<td>[")
	over=Instr(newcode,"<center><table width=""760"">")
	listcode=mid(newcode,start,over-start)
	listcodearr=split(listcode,"<font color")
	for i=1 to ubound(listcodearr)
	over=Instr(listcodearr(i),"</tr>")+5
	listcodearr(i)=mid(listcodearr(i),1,over-1)
	listcodearr(i)=replace(listcodearr(i),"</a>]","]")
	listcodearr(i)=replace(listcodearr(i),"../soft/","soft.asp?id=")
	listcodearr(i)=replace(listcodearr(i),"../article/","article.asp?id=")
	listcodearr(i)=replace(listcodearr(i),".html","")
	list=list&"<tr bgcolor=#f5f5f5><td>[<font color"&listcodearr(i)
	next
	Erase listcodearr
	else 
		wscript.echo err.description 
	end if
	myCache.makeEmpty()
	set myCache=nothing
%>
<HTML>
<HEAD>
<TITLE>软件下载 - 延安生活信息网 - 最新更新</TITLE>
<!--#include file="head.asp"-->
<TABLE width=776 border=0 align="center" cellPadding=3 cellSpacing=0 
borderColorLight=#000000 borderColorDark=#ffffff>
  <TBODY>
    <TR align=middle bgColor=#e6ebf0>
      <TD height="100" align="center" vAlign=top bgcolor="#e6ebf0"><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
          <TR>
            <TD height="29">&nbsp;您现在的位置是：下载特区-&gt; 最新更新</TD>
          </TR>
        </TBODY>
      </TABLE>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="214">
            <tr valign="top">
              <td width="179" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="28" background="images/toolbar_bg.gif"><table width="70%" border="0" cellspacing="0" cellpadding="0" height="22">
                        <tr>
                          <td width="49"><div align="center"><img src="images/icon.gif" width="11" height="14"></div></td>
                          <td width="99"><font color="#FFFFFF"><b><font color="#FF0000">本周下载</font></b></font></td>
                        </tr>
                    </table></td>
                  </tr>
                </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="210"><table width="100%" border="0" cellspacing="2" cellpadding="0">
                          <tr>
                            <td width="173"><%=topcodearr(1)%></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="28" background="images/toolbar_bg.gif"><table width="70%" border="0" cellspacing="0" cellpadding="0" height="22">
                          <tr>
                            <td width="49"><div align="center"><img src="images/icon.gif" width="11" height="14"></div></td>
                            <td width="150"><font color="#FFFFFF"><b><font color="#FF0000">国外下载</font></b></font></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="210"><table width="100%" border="0" cellspacing="2" cellpadding="0">
                          <tr>
                            <td width="173"><%=topcodearr(2)%></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="28" background="images/toolbar_bg.gif"><table width="70%" border="0" cellspacing="0" cellpadding="0" height="22">
                          <tr>
                            <td width="49"><div align="center"><img src="images/icon.gif" width="11" height="14"></div></td>
                            <td width="150"><font color="#FFFFFF"><b><font color="#FF0000">汉化下载</font></b></font></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="210"><table width="100%" border="0" cellspacing="2" cellpadding="0">
                          <tr>
                            <td width="173"><%=topcodearr(3)%></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="28" background="images/toolbar_bg.gif"><table width="70%" border="0" cellspacing="0" cellpadding="0" height="22">
                          <tr>
                            <td width="49"><div align="center"><img src="images/icon.gif" width="11" height="14"></div></td>
                            <td width="150"><font color="#FFFFFF"><b><font color="#FF0000">累计下载</font></b></font></td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="210"><table width="100%" border="0" cellspacing="2" cellpadding="0">
                          <tr>
                            <td width="173"><%=topcodearr(4)%></td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
              <td width="585"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
                  <tr>
                    <td width="1" bgcolor="#666666"></td>
                    <td valign="top"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class=2b>
                        <tr bgcolor="#CCCCCC">
                          <td height="1" colspan="2"></td>
                        </tr>
                        <tr>
                          <td height="2" colspan="2"></td>
                        </tr>
                        <tr>
                          <form name="form1" method="post" action="search.asp">
                            <td width="113" height="22" bgcolor="#eeeeee"><img src="images/zxgg.gif" width="113" height="22"></td>
                            <td bgcolor="#eeeeee" width="432"><input type="text" name="ss_name" size="16" maxlength="40">
                                <select name="sor" >
                                  <option value="00" >全部软件</option>
                                  <option value="01">国产软件</option>
                                  <option value="02">国外软件</option>
                                  <option value="03">汉化补丁</option>
                                  <option value="wz" >软件资讯</option>
                                </select>
                                <input type="submit" name="Submit" value=" 搜 索 ">
                            </td>
                          </form>
                        </tr>
                        <tr>
                          <td height="3" colspan="2" bgcolor="#CCCCCC"></td>
                        </tr>
                      </table>
                        <table width="99%" border=0 align="center" cellpadding=4 cellspacing=1 bgcolor="#CCCCCC" id="TbSoftList">
                          <tr align="center" bgcolor="#F5F5F5">
                            <td width="340" bgcolor="#F6F6F6"><%
if id=4 then
response.write "文章标题"
else
response.write "软件名称"
end if
%>
                            </td>
                            <td nowrap width="94"><%
if id=4 then
response.write "作者"
else
response.write "整理日期"
end if
%>
                            </td>
                            <td nowrap width="90"><%
if id=4 then
response.write "整理日期"
else
response.write "软件大小"
end if
%>
                            </td>
                          </tr>
                          <%=list%>
                      </table></td>
                  </tr>
              </table></td>
            </tr>
        </table></TD>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="foot.asp"-->
</BODY>
</HTML>
<%
	  function getHTTPPage(url) 
		on error resume next 
		dim http 
		set http=Server.createobject("Microsoft.XMLHTTP") 
		Http.open "GET",url,false 
		Http.send() 
		if Http.readystate<>4 then
			exit function 
		end if 
		getHTTPPage=bytes2BSTR(Http.responseBody) 
		set http=nothing
		if err.number<>0 then err.Clear  
	end function 
	Function bytes2BSTR(vIn) 
		dim strReturn 
		dim i1,ThisCharCode,NextCharCode 
		strReturn = "" 
		For i1 = 1 To LenB(vIn) 
			ThisCharCode = AscB(MidB(vIn,i1,1)) 
			If ThisCharCode < &H80 Then 
				strReturn = strReturn & Chr(ThisCharCode) 
			Else 
				NextCharCode = AscB(MidB(vIn,i1+1,1)) 
				strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) 
				i1 = i1 + 1 
			End If 
		Next 
		bytes2BSTR = strReturn 
	End Function 
%>
