<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: showphoto.asp
' Version:3.0
' Date: 2005-8-28
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
response.buffer=true
stats="相册展示"
if not founduser then
	Errmsg=Errmsg+"<br>"+"<li>您还没有<a href=login.asp>登陆</a>，不能浏览相册！"
	Founderr=true
end if
call nav()
if founderr=true then
	call head_var("","")
	call Mslove_error()
else
	call head_var("用户相册","photolist.asp?action=all")
	dim Fid,Photouser
	Fid=checkStr(trim(request("Fid")))'去除特殊字符
	if Fid="" or not isInteger(Fid) then
	errmsg=errmsg+"<br>"+"<li>参数错误。"
	founderr=true
	end if	
Fid=cint(Fid)
if founderr=false then
call main()
else
call Mslove_error()
end if
call activeonline()
call footer()
end if

sub main()
	if split(Reflash,"|")(0)=1 then'防刷新
		  if not Request.ServerVariables("REMOTE_ADDR")=request.cookies("IP"&Fid&"") then
		  response.cookies("IP"&Fid&"")=Request.ServerVariables("REMOTE_ADDR")
		  conn.execute("UPDATE Ms_Upphoto set Hits=Hits+1 WHERE Fid="&Fid&"")
		  end if
		  else
		  conn.execute("UPDATE Ms_Upphoto set Hits=Hits+1 WHERE Fid="&Fid&"")
	end if
dim LorN,filename
	set rs=server.createobject("adodb.recordset")
	sql="select p.username,p.LorN,t.Phototype,p.FileSize,p.Hits,p.AddTime,p.Readme,p.Filename from Ms_Upphoto p inner join Ms_Uphtype t on p.FTypes=t.id where p.Fid="&Fid&""
	rs.Open sql,conn,1,1
if rs.eof and rs.bof then
	response.write"<tr><td class=tablebody1 align=center valign=middle colspan=7>您还没有任何照片。</td></tr>"
else
Photouser=rs("username")
LorN=rs("LorN")
%>
<table width="100%" align=center cellpadding=3 cellspacing=1 class=tableborder1>
  <tr> 
    <th width="703" height="28" align="center"  class=tablebody1>照片展示</th>
  </tr>
  <tr> 
    <td height="112" align="center"  class=tablebody1><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="39" align="center">感谢会员：<%=Photouser%>提供<br>
            --------------------------------------------------------------------------------</td>
        </tr>
        <tr> 
          <td height="52" align="center"><%
		  if LorN=1 then
				response.Write("<img src=showpics.asp?Fid="&Fid&" border=""0"" onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333"">")
				else
				response.Write("<img src="&rs(7)&" border=""0"" onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333"">")
				end if%>
          </td>
        </tr>
        <tr> 
          <td height="32" align="center"> <table width="133" border="0" cellspacing="0" cellpadding="0">
                    <tr align="center"> 
                      <td width="28" height="19"><a href=dispuser.asp?username=<%=Photouser%> target=_blank title=查看<%=Photouser%>资料><img src="Skins/Default/icon_001.gif" width="16" height="16" border="0"></a></td>
                      <td width="28"><a href="photolist.asp?action=userp&username=<%=Photouser%>" target="_blank" title=会员<%=Photouser%>所有照片><img src="Skins/Default/icon_002.gif" width="16" height="16" border="0"></a></td>
                      <td width="28"><a href="favlist.asp?action=addU&favurl=<%=strFileName%>" title="收入收藏夹"><img src="Skins/Default/icon_003.gif" width="16" height="16" border="0"></a></td>
                      <td width="23"><a href="javascript:openScript('messanger.asp?action=new&touser=<%=htmlencode(Photouser)%>',500,400)"><img src="Skins/Default/icon_004.gif" width="16" height="16" border="0"></a></td>
                      <td width="26"><a href="friendlist.asp?action=addF&myFriend=<%=HTMLEncode(Photouser)%>" target="_blank" title=将<%=Photouser%>加入好友><img src="Skins/Default/icon_005.gif" width="16" height="16" border="0"></a></td>
                    </tr>
                  </table></td>
        </tr>
      </table></td>
  </tr>
  <tr valign="top"> 
    <td height="109"  class=tablebody1> <table width="100%" border="0" cellspacing="0" cellpadding="3" class=tableborder2>
        <tr> 
          <td width="24%" height="24" align="right" class=tablebody1>作者：</td>
          <td width="76%"><a href=dispuser.asp?username=<%=Photouser%> target=_blank title=查看<%=Photouser%>的资料><%=Photouser%></a></td>
        </tr>
        <tr> 
          <td height="24" align="right" class=tablebody2>类别：</td>
          <td class=tablebody1><%=rs("Phototype")%></td>
        </tr>
        <tr> 
          <td height="24" align="right" class=tablebody1>大小：</td>
          <td><%=rs("FileSize")%> Byte</td>
        </tr>
        <tr> 
          <td height="24" align="right" class=tablebody2>人气：</td>
          <td class=tablebody1><%=rs("Hits")%> 次</td>
        </tr>
        <tr> 
          <td height="24" align="right" class=tablebody1>创建时间：</td>
          <td><%=rs("AddTime")%></td>
        </tr>
        <tr> 
          <td height="24" align="right" class=tablebody2>图片说明：</td>
          <td class=tablebody1><%=rs("Readme")%></td>
        </tr>
      </table></td>
  </tr>
  <%
  end if
  rs.close
  %>
</table>
<%end sub%>
</body>
</html>