<!--#include file="../conn.asp"-->
<!--#include file="../admin.asp"-->
<%
call head()
call saycardd("查看相片")
dim tid,id,zc,ids
ID=request.querystring("id")
ids=request.querystring("ids")
tid=request.querystring("tid")
if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM Upfile where id="&id ,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("你查看的相片不存在！<br/>可能已被作者删除<br/><a href=""photo.asp?ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回相册</a><br/>")
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from upfile where id="&id&" and smallstr=1",conn,1,1
response.write("<img src='/bbs/" & rs("files") & "' alt='图'/><br/>")
response.write"<a href='" & rs("files") & "'>下载</a>|"
response.write"<a href='diy.asp?path=" & rs("files") & "&amp;id="&rs("id")&"&amp;ids="&ids&"&amp;TP=1&amp;saytk="&saytk&"&amp;sid="&sid&"'>缩放</a>"
if rs("fid")=myid or keys=1 then
response.write"|<a href='getsave.asp?action=p&amp;ids="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>删除</a>"
if rs("photoview")=0 then
response.write"<br/><a href='getsave.asp?action=pv&amp;ids="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>&gt;设为私藏</a>"
response.write"<br/><a href='getsave.asp?action=save&amp;id="&rs("id")&"&amp;tp=1&amp;pic="&rs("files")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>&gt;设为头相</a>"
else
response.write"<br/><a href='getsave.asp?action=pv&amp;ids="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>&gt;设为公开</a>"
end if
response.write"<br/><a href='sellmo.asp?id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>&gt;&gt;发到论坛</a>"
end if
if rs("photoContent")<>"" then

response.write"<br/>相片说明:"&ubb3(rs("photoContent"))&""
else
response.write"<br/>相片说明:"&ubb3(rs("filesname"))&""
end if
dim cont_file,path_File,cont_file2,path_File2
if myid=0 then
path_File= Server.MapPath("/index.inc")
cont_file="游客看了[url=/bbs/uinfo.asp?id="&rs("fid")&"&sid=@@sid@@]"&rs("username")&"[/url]的[url=/bbs/photoview.asp?id="&rs("id")&"&sid=@@sid@@]相片[/url]"
Call CreatedTextFiles(path_File,cont_file)
else
path_File= Server.MapPath("/index.inc")
cont_file="[url=/bbs/uinfo.asp?id="&myid&"&sid=@@sid@@]"&myni&"[/url]看了[url=/bbs/uinfo.asp?id="&rs("fid")&"&sid=@@sid@@]"&rs("username")&"[/url]的[url=/bbs/photoview.asp?id="&rs("id")&"&sid=@@sid@@]相片[/url]"


path_File2= Server.MapPath("/msg/"&rs("fid")&".txt")
cont_file2="[url=/bbs/uinfo.asp?id="&myid&"&sid=@@sid@@]"&myni&"[/url]关注你的[url=/bbs/photoview.asp?id="&rs("id")&"&sid=@@sid@@]相片[/url]"
Call CreatedTextFiles(path_File,cont_file)
end if
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;saytk="&saytk&"&sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"浏览了"&rs("username")&"的最新(url=/bbs/photoview.asp?id="&rs("id")&"&amp;saytk="&saytk&"&sid=[sid])相片(/url)')")
response.write"<br/>相片人气:"&rs("fileCount")&""

response.write"<br/>上传作者:<a href='/bbs/uinfo.asp?id="&rs("fid")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&rs("username")&"</a><br/>会员ID号:"&rs("fid")&""

response.write"<br/>图片地址:/bbs/"&rs("files")&""

response.write"<br/>贴图代码:(img)/bbs/"&rs("files")&"(/img)"

response.write"<br/><a href='getsave.asp?del2009=del2009&amp;ids="&rs("id")&"&amp;path=/bbs/"&rs("files")&"&amp;pathsmall=/bbs/"&rs("smallfiles")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>删除该相片</a>"

	response.write("<br/>--------<br/><a href=""photolist.asp?ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回相册</a><br/>")

call headsay()
%>