📄 viewphoto.asp
字号:
Case "show":
Call show
Case Else:
call show
End Select
end if
sub show
sql="update photo set dianji=dianji+1 where picid=" &picid& ""
conn.execute (sql)
Set rs = Server.CreateObject("ADODB.recordset")
sql="select photo.*,user.username,user.name,user.money,user.userlogins from photo,user where photo.type2=3 and photo.picid=" &picid& " and photo.username=user.username"
rs.open sql,conn,1,1
IF rs.eof then%>
不存在标号为<%=picid%>的学校相片,该相片可能已经被删除或者还没有通过验证<br>
<a href="photo.asp">返回学校相册</a>
<%exit sub
end if%>
<table width="100%" border="0">
<tr bgcolor="#6699FF">
<td width="31%" background="image/b.gif"><span class="样式1" style="color: #CC3300"> 标题:<%=rs("title")%></span></td>
<td width="59%" background="image/b.gif"><span class="样式1"> <span style="color: #CC3300">人气:</span><%=rs("liuyanshu")%>/<%=rs("dianji")%> <span style="color: #CC3300"> <a href="?pe=del&ad=<%=rs("picid")%>&use=<%=rs("username")%>" onClick="return confirm('这个操作将删除这张照片和下面的回复,你确认吗?')">删除</a> <a href="mail.asp?type2=add&uer=<%=rs("Username")%>">发短信</a></span> </span></td>
<td width="10%" background="image/b.gif"><span class="样式1" style="color: #CC3300"> 楼主 </span></td>
</tr>
</table>
<TABLE width="100%" border=1 cellPadding=1 cellSpacing=0 bordercolor="#CCCCFF">
<TBODY>
<TR><script>
function newimg(imgurl) {
newwin=window.open('about:blank','','top=10');
newwin.document.write('<body leftmargin=0 topmargin=0><img id=img1 src='+imgurl+' onload="self.resizeTo(this.offsetWidth+10,this.offsetHeight+15);">');
}
</script><SCRIPT language=JavaScript1.2>
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=20
}
</SCRIPT>
<TD width="33%" height=20><div align="center"><a href=# onclick="newimg('upphoto/<%=rs("pic")%>')"><img src="upphoto/<%=rs("pic")%>" onmouseout="makevisible(this,1)" onmouseover="makevisible(this,0)" style="FILTER: alpha(opacity=20)" border="0" onload="javascript:if(this.width>570) this.width=570" title="点击打开实际大小的图片"></a><br>
</div></TD>
</TR></TBODY></TABLE>
<table width="100%" border="0">
<tr bgcolor="#6699FF">
<td width="24%" bgcolor="#F9F1DB" style="color: #CC3300"><a href="datum.asp?username=<%=rs("Username")%>"><span class="样式1" style="color: #CC3300">作者:<%=rs("name")%></span></a><br>
<span class="样式1"><span style="color: #CC3300">登录:<%=rs("userlogins")%><br>
金钱:</span><%=rs("money")%></span></td>
<td width="76%" bgcolor="#F9F1DB"><span class="样式1" style="color: #CC3300">照片介绍:<%=rs("remark")%><br>
照片上传于:<%=rs("pubtime")%></span></td>
</tr>
</table>
<table width="100%" border="0">
<%rs.close
set rs=nothing
Set rs = Server.CreateObject("ADODB.recordset")
sql="select user.*,photo2.* from user,photo2 where photo2.picid=" &picid& " and photo2.username=user.username order by pubtime asc"
rs.open sql,conn,1,1
i=2
do while not rs.eof%>
<tr bgcolor="#99CCFF">
<td width="110" rowspan="2" bgcolor="#F9F1DB"><div align="center"><a href="datum.asp?username=<%=rs("Username")%>"><%=showuserpic(rs("userface"),rs("width"),rs("height"))%></a><br>
作者:<%=rs("name")%><br>
登录:<%=rs("userlogins")%><br>
金钱:<%=rs("money")%></div></td>
<td height="12" background="image/b.gif"><span style="color: #CC3300"> 发表于:<%=rs("pubtime")%> </span></td>
<td height="12" background="image/b.gif"><a href="?pe=del2&ad=<%=rs("id")%>&picid=<%=rs("picid")%>" onClick="return confirm('这个操作将删除该回复,你确认吗?')">删除</a> <a href="mail.asp?type2=add&uer=<%=rs("Username")%>">发短信</a> </td>
<td height="12" background="image/b.gif"><span style="color: #CC3300">第<%=i%>楼 </span></td>
</tr>
<tr>
<td height="130" colspan="3" valign="top"><%Response.Write BadWords_Deal(UBBCode(rs("content"),2))%>
<br>
</td>
</tr>
<%i=i+1
rs.movenext
loop %>
</table>
<table width="100%" border="0">
<tr bgcolor="#3399FF">
<td width="30%" background="image/b.gif"><span class="样式1" style="color: #CC3300">照片回复:</span></td>
<td width="70%" background="image/b.gif"><span class="样式1" style="color: #CC3300">在下面输入你对照片的回复啊</span></td>
</tr>
<tr valign="top">
<td> 注意: <br>
帖子内容不要超过2000; <br>
UBB代码 不支持 <br>
(Ctrl+Enter提交) </td>
<td><form action="?pe=hf&picid=<%=picid%>" method="post" name="form1" class="样式4">
<textarea name="content" cols="50" rows="5"></textarea><br>
<input name="提交" type="submit" value="提交"> <input name="重填" type="reset" value="重填"> </form></td>
</tr>
</table>
<%rs.close
set rs=nothing
end sub
sub del
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from photo where picid="&ad&""
rs.open sql,conn,1,1
picimgname=rs("pic")
rs.close
set rs=nothing
If Request("queren")<>"true" Then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from photo where picid="&ad&""
rs.open sql,conn,1,1
If rs("username")<>username and session("sitejob")<>3 Then
Response.Write("呵呵,想删别人的照片?NO,NO,你还不够资格!")
Response.Write("<br>")
Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>返回</font></a>")
else
Response.Redirect "viewphoto.asp?pe=del&ad="&ad&"&queren=true&use='" &use& "'"
rs.close
set rs=nothing
end if
else
conn.Execute ("delete from photo2 where picid="&ad&"")
conn.Execute ("delete from photo where picid="&ad&"")
sql="insert into dellog(username,pic,deltime)values('"
sql=sql&username&"','"&picimgname&"','"&now()&"')"
conn.execute (sql)
asql="update user set piccount=piccount-1 where username=" &use& ""
conn.execute (asql)
%>
删除相片成功<br>
<a href="photo.asp"><font size=4>返回相册</font></a>
<%
end if
end sub
sub del2
set rs=conn.execute ("select * from photo2 where id=" &ad& " and username='"&Session("wzname")&"'")
IF session("sitejob")<>3 and rs.eof then
Response.Write("呵呵,想删别人留言?NO,NO,你还不够资格!")
Response.Write("<br>")
Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>返回</font></a>")
else
Set rs = Server.CreateObject("ADODB.Recordset")
sql="delete from photo2 where id="&ad& ""
rs.open sql,conn,1,3
asql="update photo set liuyanshu=liuyanshu-1 where picid=" &picid& ""
conn.execute (asql)%>
删除回复成功<br>
<a href="?picid=<%=picid%>">回刚才的照片</a>
<br><a href="photo.asp">回学校相册</a>
<%end if
rs.close
set rs=nothing
end sub
sub hf
dim content,pubtime,id
If session("wzname")="" then%>
回复相册留言出错,您还没有登录,<br>
请先<a href="index.asp">登录</a>再发布留言!
<%exit sub
end if
pubtime=now()
content=Trim(Request.Form("Content"))
if content="" or isnull(content) Then%>
回复相册留言出错,请输入留言内容!<br>
<a href='javascript:history.go(-1)'><font size=3>返回</font></a>
<%exit sub
end if
content=Replace(content,"'","''")
sql="insert into photo2(username,content,picid,pubtime)values('"
sql=sql&username&"','"&content&"','"&picid&"','"&pubtime&"')"
conn.execute (sql)
sql="update photo set liuyanshu=liuyanshu+1,LastUpdateTime='"&now()&"' where picid="&picid
conn.execute (sql)%>
恭喜你,回复学校相册留言成功!<br>
<a href='?picid=<%=picid%>'>点这里浏览你刚才回复的学校相册留言</a><br>
<a href="photo.asp">回学校相册</a><br>
网页将在5秒后返回刚才回复的相片
<%Response.write "<meta http-equiv=""refresh"" content='5;URL=?picid="&picid&"'>"
end sub%>
</DIV>
<TR>
<TD colSpan=2>
</TBODY>
</TABLE>
</TD></TR></TBODY></TABLE></TD></TR></TABLE></TD>
</TR></TBODY></TABLE>
<!--#include file="bottom.asp"--></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -