📄 vote.asp
字号:
<%@ Language=VBScript %>
<%if not session("user_session_id")=Session.SessionID then%>
<SCRIPT LANGUAGE=javascript>
parent.window.location.href="default.asp"
</SCRIPT>
<%end if%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title>校友录-投票系统</title>
<LINK href="style/style.css" type=text/css rel=stylesheet>
<style TYPE="text/css">
<!--
.popcomments
{
position : absolute; width:130;
visibility : hidden;
border: 1 solid #000001
}
.in
{
BORDER-RIGHT: rgb(127,127,127) 1px solid;
BORDER-TOP: rgb(127,127,127) 1px solid;
FONT-SIZE: 9pt;
BORDER-LEFT: rgb(127,127,127) 1px solid;
BORDER-BOTTOM: rgb(127,127,127) 1px solid;
BACKGROUND-COLOR: #ffffff
}
//-->
</style>
</HEAD>
<%
Dim sname
sname=session("ecid")
if sname="" then
%>
<script>
window.alert ("您还没有登陆,请回主页登陆!")
window.location.href="default.asp"
</script>
<%end if%>
<script language="JavaScript">
function popup(message,w)
{
var content ="<TABLE width="+w+" BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR='#FFFFE8'><TR><TD><FONT COLOR=#000000>"+message+"</FONT></TD></TR></TABLE>";
document.all("commentsboard").innerHTML = content;
commentsboard.style.visibility = "visible";
}
function closeboard()
{
commentsboard.style.visibility = "hidden";
}
function currentXY(e)
{
var x = event.x+document.body.scrollLeft;
var y = event.y+document.body.scrollTop;
commentsboard.style.left = x - 55;
commentsboard.style.top = y+25;
}
function openScript(url, width, height){
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}
</script>
<BODY leftMargin=0 topMargin=0>
<DIV ID="commentsboard" CLASS="popcomments"> </DIV>
<!--#include file="inc/TOP.ASP" -->
<%
sql="select vote.id,title,content,voteuser,votetime,clicknum,forumnum,lastedforumuser,lastedforumcontent,lastedforumtime,ec.sname from vote,ec where ec.studentid=vote.voteuser order by vote.lastedforumtime desc"
set voterst=Server.CreateObject ("ADODB.Recordset")
voterst.Open sql,session("cn"),1
if not voterst.eof then
const pagesize=12
voterst.PageSize =pagesize
curpage=Request("curpage")
if len(curpage)>8 then curpage=voterst.PageCount
if curpage="" or not isnumeric(curpage) Then
curpage="1"
End if
curpage=Cint(curpage)
if curpage>voterst.PageCount Then curpage=voterst.PageCount
if curpage<1 then curpage=1
voterst.AbsolutePage =curpage
end if
%>
<table width=750 border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td valign=top width=100>
</td>
<td width="516" align="center" valign=top><font size="4"><b><br>
校友录投票系统</b></font>
<form action="vote.ASP">
<table width="501" border="0" cellspacing="0" cellpadding="0" height="12">
<tr>
<td width="95" height="12" align="center"><font size="2">
<a href="javascript:;"
onclick="javascript:openScript('newvote.asp',400,400)">
发布新调查投票</a></font></td>
<td width="406" height="12">共<b><font color="#FF0000">
<%=voterst.PageCount%></font></b>页,当前第<b><font color="#FF0000">
<%=curpage%></font></b>页,每页<b><font color="#FF0000"><%=pagesize%>条
</font></b>
<%if curpage<>1 then %>
<a href=vote.asp?curpage=1>首页</a>
<%else%>
首页
<%end if%>
<%if curpage>1 Then%>
<a href=vote.asp?curpage=<%=curpage-1%>>上页</a>
<%else%>
上页
<%end if%>
<%if curpage<voterst.PageCount Then%>
<a href=vote.asp?curpage=<%=curpage+1%>>下页</a>
<%else%>
下页
<%end if%>
<%if curpage<>voterst.PageCount Then%>
<a href=vote.asp?curpage=<%=voterst.PageCount %>>尾页</a>
<%else%>
尾页
<%end if%>
转到
<input name="curpage" type="text" id="curpage"
value="<%=curpage%>" size="2" maxlength="3" class=in>
页 </td>
</tr>
</table>
</form>
<table width="95%" border="0" cellspacing="1" cellpadding="2" class="tableBorder1">
<tr align="center">
<th width="18">ID</th>
<th width="172">投票标题</th>
<th width="34">人气</th>
<th width="45">发布人</th>
<th width="119">发布时间</th>
<th width="65">最后更新</th>
</tr>
<%
if voterst.eof Then
Response.write "<tr><td colspan=6 align=center>目前没有调查投票!</td></tr>"
else
dim strpopup
i=1
while not voterst.eof and i<=pagesize
if isnull(voterst("lastedforumcontent")) Then
strpopup="目前还没有人为该调查问卷留言!"
else
strpopup="最后留言"&voterst("lastedforumuser")&":"&voterst("lastedforumcontent")&"<br>留言时间"&voterst("lastedforumtime")
end if
%>
<tr align="center">
<td width="18" class="TableBody1" height="18"><b><%=i%></b></td>
<td width="172" class="TableBody1" height="18">
<a href="showvote.asp?id=<%=voterst("id")%>"
ONMOUSEOVER="popup('<%=strpopup%>',250)" ONMOUSEOUT="closeboard()"
onmousemove="currentXY();"><%=voterst("title")%></a></td>
<td width="34" class="TableBody1" height="18">
<b><%=voterst("forumnum")%></b>/<b><%=voterst("clicknum")%></b></td>
<td width="45" class="TableBody1" height="18">
<a href="javascript:;"
onclick="javascript:openScript('profile.asp?name=<%=voterst("voteuser")%>',420,320)">
<%=voterst("sname")%></a></td>
<td width="119" class="TableBody1" height="18"><%=voterst("votetime")%></td>
<td width="65" class="TableBody1" height="18">
<font class="good" ONMOUSEOVER="popup('时间:<%=voterst("lastedforumtime")%>',200)"
ONMOUSEOUT="closeboard()" onmousemove="currentXY();">
<%=voterst("lastedforumuser")%></font></td>
</tr>
<%
voterst.MoveNext
i=i+1
wend
end if
voterst.Close()
set voters=nothing
%>
</table>
</td>
</tr>
</table>
<br>
<hr width=700 size=1 noshade color=green>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -