
<!--#include file=artwind.inc-->
<%
	  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 
%>
<%
Server.ScriptTimeOut=120
dim id,softname,softxg
on error resume next 
	id=request("IP_ALBUM_ID")
	page=request("page")
	if page="" then page=1
	url="http://photo.et.21cn.com/starchannel/AlbumShow.php3?IP_ALBUM_ID="&id&"&IP_ALBUM_DISP_PAGENO="&page
	
	set myCache=new cache
	myCache.name="piclist"&id&page
	if myCache.valid then
	listcode = myCache.value
	else
	listcode=getHTTPPage(url)	
	myCache.add listcode,dateadd("d",1,now)
	end if 	
	
	if err.number=0 then
	
	atart=instr(listcode,"类别：")+3
	over=instr(listcode,"</a>　<a")
	
	
	atart=instr(listcode,"<td width="&chr(34)&"251"&chr(34)&">")+16
	over=instr(listcode,"<td width="&chr(34)&"175"&chr(34)&">")-23
	sums=mid(listcode,atart,over-atart)
	atart=instr(listcode,"/共")
	over=instr(listcode,"页</td>")
	sump=mid(listcode,atart,over-atart)
	start=instr(listcode,"<table width="&chr(34)&"100%"&chr(34)&" border="&chr(34)&"0"&chr(34)&" cellspacing="&chr(34)&"2"&chr(34)&" cellpadding="&chr(34)&"5"&chr(34)&">")
	over=InstrRev(listcode,"<td height="&chr(34)&"20"&chr(34)&" bgcolor="&chr(34)&"#E6E6E6"&chr(34)&">")-44
	piclist=mid(listcode,start,over-start)
	piclist=replace(piclist,"http://photo.et.21cn.com/starchannel/PhotoShow.php3?","show.asp?")
    piclist=replace(piclist,"<img border=""0"" src=""","<img border=""0"" src=""images.asp?url=")
	'response.write piclist
	'response.end 
	
	else 
		wscript.echo err.description 
	end if
	
%>
<!--#include file="../menu.asp" -->
<div>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
          <td height="30" bgcolor="#F9B72C">
            <table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="images/047.gif" width="14" height="14"align="absmiddle"></td>
                <td ><a href="index.asp" >写真首页</a> &gt;&gt; </td>
              </tr>
          </table></td>
        </tr>
      </table>
      <%=piclist%>
      <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor=#E6E6E6>
        <tr>
          <td width="215" align="center"><%=sums%></td>
          <td width="282">第 <%=page%> 页 <%=sump%> 页</td>
          <td width="130" align="center"><a href=list.asp?page=<%=page-1%>&IP_ALBUM_ID=<%=id%>>上一页</a> <a href=list.asp?page=<%=page+1%>&IP_ALBUM_ID=<%=id%>>下一页</a></td>
          <form method="POST" action=list.asp?IP_ALBUM_ID=<%=id%>>
            <td width="110">跳到
                <input name="page" type="text" class="input"  style="width:30; height:19">
              页
              <input name="image" type="image" src="images/button_go.gif" align="absmiddle" border="0"></td>
          </form>
        </tr>
    </table></td>
  </tr>
</table>
</div>
<!--#include file="../bottom.asp" -->
