📄 hcview.asp
字号:
<!--#include file="config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="head.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Sitename%>-花花草草-校花展示页</title>
<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<%sitehead
id=clng(request("id"))
if id="" or id<1 then ShowError("访问选手不存在")%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="291" valign="top">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td width="86%" height="25"> <img src="skins/1/xb3.gif"> 当前位置:<a href="index.asp">首页</a> >> <a href="?id=<%=id%>">花草展示页</a></td>
<td width="14%"><a href="hcjoin.asp">报名参加</a></td>
</tr>
</table>
<br>
<%Select Case request("type2")
Case "add":
call add
Case "hua":
Call hua
Case "dan":
Call dan
Case Else:
call show
End Select
sub show
rs.open "select top 1 * from [user] where id="&id&" and ishc=1",conn,1,1
If Rs.eof and Rs.bof Then
Response.Write("<tr><td>该选手资料不存在</td></tr>")
else
realname=rs("realname")%>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="2" class="border">
<tr>
<td width="71%" height="20" bgcolor="#FFCFCE"> <b><%=rs("realname")%> ID:<%=rs("id")%></b></td>
<td width="29%" bgcolor="#FFCFCE"><b>鲜花:<%=rs("hccount")%> 鸡蛋:<%=rs("jdcount")%></b></td>
</tr>
<tr>
<td colspan="2"><table width="98%" border="0" align="center" cellpadding="4" cellspacing="0" bgcolor="#FFFBF7" class="border">
<tr>
<td width="35%" height="250"><div align="center"><A href="<%=rs("userphoto")%>" target=_blank><img src="<%=rs("userphoto")%>" width="210" height="230" border="0" class="picborder"></a></div></td>
<td width="46%" valign="top"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25"><b>姓名:<a href="datum.asp?userid=<%=rs("id")%>" target=_blank><%=rs("realname")%></a></b></td>
<td><b>性别:<%=rs("sex")%></b></td>
</tr>
<tr>
<td height="20"><b>生日:<%=rs("birthday")%></b></td>
<td><b>生属:<%=rs("shengxiao")%></b></td>
</tr>
<tr>
<td height="25"><b>血型:<%=rs("blood")%></b></td>
<td><b>参选:<%=rs("hcdate")%></b></td>
</tr>
<tr>
<td height="25" colspan="2"><b>座佑铭:<%=rs("sign")%></b></td>
</tr>
<tr>
<td height="25" colspan="2"><b>自我介绍:</b></td>
</tr>
<tr>
<td colspan="2"> <%=left(rs("zwzs"),250)%></td>
</tr>
</table></td>
<td width="19%" valign="top" bgcolor="#FFCFCE"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25"> </td>
</tr>
<tr>
<td height="80"><div align="center"><a href="?type2=hua&id=<%=id%>"><img src="skins/1/but_xh.gif" alt="赠送鲜花" width="148" height="32" border="0"></a><br>
<a href="xianhua.asp?id=<%=id%>" target="_blank">查看赠送列表</a> </div></td>
</tr>
<tr>
<td height="80"><div align="center"><a href="?type2=dan&id=<%=id%>"><img src="skins/1/but_fd.gif" alt="扔鸡蛋" width="148" height="32" border="0"></a><br>
<a href="jd.asp" target="_blank">被扔鸡蛋排行榜</a></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<%
end if
rs.close%>
<br>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="2" class="border">
<tr>
<td width="81%" height="20" bgcolor="#FFCFCE"> <b><%=realname%> 的图片</b></td>
<td width="19%" bgcolor="#FFCFCE"><a href="hcphoto.asp?id=<%=id%>">More...</a></td>
</tr>
<tr>
<td height="150" colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr height="150"><%
rs.open "select top 8 id,pic,title from photo where userid="&id&" and ishc=1 order by lastupdatetime desc,id desc",conn,1,1
If Rs.eof Then
Response.Write("<td height=20>暂无照片</td>")
else
i=0
do while not rs.eof%>
<td><table width="160" height="120" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td><div align="center"><a href='photoview.asp?id=<%=rs(0)%>' target="_blank"><img src="upphoto/<%=rs(1)%>" width="150" height="110" border="0" alt="<%=rs(2)%>"></a></div></td>
</tr>
</table>
</td>
<%i=i+1
if i=4 then response.write "</tr><tr height=150>"
rs.movenext
loop
end if
rs.close%></tr>
</table></td>
</tr>
</table>
<br>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="2" class="border">
<tr>
<td height="20" colspan="2" bgcolor="#FFCFCE"> <b>对 <%=realname%> 的评价</b></td>
</tr>
<tr>
<td width="53%" height="240" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="border">
<tr bgcolor="#FFFBF7">
<td width="21%" height="20"><div align="center">评价者</div></td>
<td width="79%"><div align="center">评价标题</div></td>
</tr>
<%rs.open "select top 10 * from [hcpj] where hcid="&id&" order by id desc",conn,1,1
if rs.eof then
response.write "<tr><td height=20>暂无评价</td></tr>"
else
do while not rs.eof%>
<tr>
<td height="20">
<div align="center">[<A href="datum.asp?userid=<%=rs("userid")%>" target="_blank"><%=obj.getname(rs("userid"),1,SiteDatabase)%></a>]</div></td>
<td><A href="hcpjview.asp?id=<%=id%>#<%=rs("id")%>"><%=left(rs("title"),22)%></a></td>
</tr>
<%rs.movenext
loop
end if
rs.close:set rs=nothing
closeconn%>
</table></td>
<td width="47%"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFBF7" class="border">
<form name="form1" method="post" action="?type2=add&id=<%=id%>"><tr>
<td width="20%" height="20">评价者:<a name="addhf"></a></td>
<td width="80%"> <%=session("xyluser")%>
</td>
</tr>
<tr>
<td height="20">评价标题:</td>
<td><input name="ptitle" type="text" class="formtext3" id="ptitle" maxlength="30"></td>
</tr>
<tr>
<td valign="top">评价内容:</td>
<td><textarea name="pcontent" cols="35" rows="12" class="border" id="pcontent"></textarea></td>
</tr>
<tr>
<td> </td>
<td><%if session("xyluser")<>"" then%><input name="Submit" type="submit" class="bottom" value="提交"><%end if%></td>
</tr>
</form>
</table></td>
</tr>
</table>
<%end sub
sub add
ptitle=obj.HtmlEncode(request.form("ptitle"))
pcontent=obj.HtmlEncode(request.form("pcontent"))
if ptitle="" or pcontent="" then ShowError("标题和内容不可为空")
if session("xyluserid")="" then ShowError("请先登录")
rs.open "select * from [hcpj] where 2=1",conn,1,3
rs.addnew
rs("title")=ptitle
rs("content")=pcontent
rs("userid")=session("xyluserid")
rs("hcid")=id
rs.update
rs.close:set rs=nothing
closeconn
a=obj.gourl(" 本页面将在3秒后自动返回展示页,可以继续选择以下操作:<br><br> 返回<A href='xh.asp'>[学校校花]</a><br><br> 返回<A href='xc.asp'>[学校校草]</a><br><br> 到<A href='hcview.asp?id="&id&"'>[该花展示页]</a>","hcview.asp?id="&id&"")
end sub
sub hua
if session("xyluserid")="" then ShowError("请先登录")
if session("xyluserid")=id then ShowError("不可以为自己赠送鲜花")
rs.open "select sitemoney from [user] where id="&session("xyluserid")&"",conn,1,3
if rs(0)<10 then ShowError("你的积分不够买一朵鲜花")
Set rs2 = Server.CreateObject("Adodb.Recordset")
rs2.open "select * from [hc] where userid="&id&" and formuserid="&session("xyluserid")&"",conn,1,3
if rs2.eof then
rs2.addnew
rs2("userid")=id
rs2("formuserid")=session("xyluserid")
rs2("votes")=0
rs2.update
rs2.close:set rs2=nothing
else
rs.close
rs2.close:set rs2=nothing
ShowError("你已向该选手赠送过鲜花了,谢谢你的支持")
end if
rs(0)=rs(0)-10
rs.update
rs.close
rs.open "update user set hccount=hccount+1 where id="&id&"",conn,1,3
set rs=nothing
closeconn
a=obj.gourl(" 本页面将在3秒后自动返回展示页,可以继续选择以下操作:<br><br> 返回<A href='xh.asp'>[学校校花]</a><br><br> 返回<A href='xc.asp'>[学校校草]</a><br><br> 到<A href='hcview.asp?id="&id&"'>[该花展示页]</a>","hcview.asp?id="&id&"")
end sub
sub dan
if session("xyluserid")="" then ShowError("请先登录")
if session("xyluserid")=id then ShowError("不可以为自己扔鸡蛋")
rs.open "select sitemoney from [user] where id="&session("xyluserid")&"",conn,1,3
if rs(0)<10 then ShowError("你的积分不够买一只鸡蛋")
rs(0)=rs(0)-10
rs.update
rs.close
rs.open "select * from [hc] where 2=1",conn,1,3
rs.addnew
rs("userid")=id
rs("formuserid")=session("xyluserid")
rs("votes")=1
rs.update
rs.close
rs.open "update user set jdcount=jdcount+1 where id="&id&"",conn,1,3
set rs=nothing
closeconn
a=obj.gourl(" 本页面将在3秒后自动返回展示页,可以继续选择以下操作:<br><br> 返回<A href='xh.asp'>[学校校花]</a><br><br> 返回<A href='xc.asp'>[学校校草]</a><br><br> 到<A href='hcview.asp?id="&id&"'>[该花展示页]</a>","hcview.asp?id="&id&"")
end sub%>
</td></tr>
</table>
<%sitebottom%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -