📄 vote.asp
字号:
<%Response.Expires=0
Dim class1,username,myself,add,begin_end,ok,okname,isbegin
class1=Session("class")
if class1="" then Response.Write "没有权限" : Response.end
myself=Session("usernickname")
username=Request.Form("username")
username=server.HTMLEncode(username)
add=Request.Form("add")
begin_end=Request.Form("begin_end")
ok=Request.Form("ok")
okname=Request.Form("okname")
%>
<!--#include file="conn.asp"-->
<%
Set rs = Conn.Execute( "select name from ticket where name='#Begin#'" )
IF not rs.eof then
isbegin="#Begin#"
Else
isbegin="#End#"
End if
rs.close
IF ok="添加候选人" then
Set rs = Conn.Execute( "Insert Into ticket(name) Values('"&okname&"')" )
rs.close
End if
IF ok="删除候选人" then
Set rs = Conn.Execute( "Delete * from ticket where name='"&okname&"'" )
rs.close
End if
IF begin_end="开始投票" and isbegin="#End#" then
username=""
Set rs = Conn.Execute( "update ticket set name='#Begin#' where name='#Begin#' or name='#End#'" )
rs.close
End if
IF begin_end="终止投票" and isbegin="#Begin#" then
username=""
Set rs = Conn.Execute( "update ticket set name='#End#' where name='#Begin#' or name='#End#'" )
rs.close
End if
%>
<html>
<head>
<title></title>
<style type="text/css">
<!--
body {font-size : 10.5pt;}
td {font-size : 10.5pt;}
input {font-size : 10.5pt;}
-->
</style>
</head>
<body topmargin="2" leftmargin="8" bgcolor="#FFFFFF">
<%
if len(username)>10 then
Response.Write "<title>出错提示 - 柠檬树聊天室</title>"
Response.write "<body bgcolor=#FFFFFF><br><br><br><br><br><p align='center'>出错提示:<font color=#FF0000>名字太长,一定是输错了</font></p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
IF username="" then%>
<form method="POST" action="vote.asp">
<br>
<table width="100%" border="1" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="1" bgcolor="E0E0E0" align="center">
<tr align="center">
<td width="100%" height="20" bgcolor="#CCFFCC" colspan="4"><font
color="#FF0000">网友投票</font>
<%IF class1>9 then%>
[<a href="clearcount.asp">网友投票次数置0</a>]
<%End if%></td>
</tr>
<tr>
<td width="100%" height="20" bgcolor="#F0F0F0" colspan="4"><p><%=Application("tpp")%></p></td>
</tr>
<%IF class1>9 then%>
<tr><td colspan="4">候选人:<input type="text" name="username" size="12" maxlength="12"><input
type="submit" value="添加候选人" name="add" style="background-color: FFCCFF"><input
type="submit" value="删除候选人" name="add" style="background-color: FFCCFF"><input
type="submit" value="开始投票" name="begin_end" style="background-color: FFCCFF"><input
type="submit" value="终止投票" name="begin_end" style="background-color: FFCCFF"></td></tr>
<%End IF%>
<tr bgcolor="#FfFfFf" align="center"><td colspan="4"><font color=red>
<%IF isbegin="#Begin#" then%>
投票进行中
<%Else%>
投票结束
<%End if%>
</font></td></tr>
<tr>
<td width="8%" bgcolor="#F0F0F0" align="center"><font color=#cf0000>序号</font></td>
<td width="17%" bgcolor="#F0F0F0"><font color=#cf0000>候选人</font></td>
<td width="60%" bgcolor="#F0F0F0"><font color=#cf0000>得票</font></td>
<td width="15%" align="center"><font color=#cf0000>投票</font></td>
</tr>
<%
Set rs = Conn.Execute( "select * from ticket where name<>'#Begin#' and name<>'#End#' order by numbert DESC" )
Dim counton
counton=1
Do while Not rs.EOF
imgwidth=5*rs("numbert")
%>
<tr>
<td height="26" bgcolor="#F0F0F0" align="center"><%=counton%></td>
<td height="26" bgcolor="#F0F0F0"><font color=blue><%=rs("name")%></font></td>
<td height="26" bgcolor="#F0F0F0"><img src="../Images/ticket.gif" height=20 width=<%=imgwidth%>></img><%=rs("numbert")%></td>
<td height="26" align="center">
<%IF isbegin="#Begin#" then%>
<a href="addticket.asp?name=<%=rs("name")%>">投他一票</a>
<%Else%>
投他一票
<%End if%>
</td>
</tr>
<%rs.MoveNext
counton=counton+1
Loop
rs.Close
%>
</table>
</form>
<%Else
Set rs = Conn.Execute( "select * from Chatuser where username='"&username&"'" )
if rs.eof then
Response.Write "<title>出错提示 - 柠檬树聊天室</title>"
Response.write "<body bgcolor=#DBEEB5><br><br><br><br><br><p align='center'>出错提示:<font color=#FF0000>"&username&"</font> 找不到,一定是输错了</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
%>
<form method="POST" action="vote.asp">
<br><br><br><br>
<table border="1" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF" align="center" bgcolor="F0F0F0" cellpadding="4">
<tr align="center">
<td>
<table border="0" cellpadding="3">
<tr>
<td>用 户 名:</td>
<td><font color=red><%=rs("username")%></font></td>
<td>等 级:</td>
<td><font color=red><%=rs("grade")%></font></td>
</tr>
<tr>
<td>次 数:</td>
<td><font color=red><%=rs("times")%></font></td>
<td>月积分:</td>
<td><font color=red><%=rs("month_score")%></font></td>
</tr>
<tr>
<td>累积分数:</td>
<td><font color=red><%=rs("grade")%></font></td>
<td colspan="2"> </td>
</tr>
<tr>
<td>注册时间:</td>
<td colspan="3"><font color=red><%=rs("first_t")%></font></td>
</tr>
<tr>
<td>最后时间:</td>
<td colspan="3"><font color=red><%=rs("last_t")%></font></td>
</tr>
<tr>
<td>地 址:</td>
<td colspan="3"><font color=red><%=rs("url")%></font></td>
</tr>
<tr>
<td>个人简介:</td>
<td colspan="3"><font color=red><%=rs("memo")%></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td></tr>
<tr><td>
<input type="submit" value="<%=add%>" name="ok" style="background-color: FFCCFF">
<input type="hidden" name="okname" value="<%=username%>">
</td></tr>
</table>
</form>
<%rs.close
End if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -