⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pollcand.asp

📁 聊天室源码呵呵你好用~~~~~~2.0版本
💻 ASP
字号:
<%@ LANGUAGE=VBScript%>
<%Server.ScriptTimeout=1000
Response.Expires=0
if Session("a_c_user_name")="" then
 Response.write "<b>[操作失败]</b><p>您尚未登录(或已经超时退出),不能进行此操作!"
 Response.end
end if
if Session("a_c_user_level")<10 then
 Response.Write "<b>[操作失败]</b><p>您没有管理候选人的权限!"
 Response.End
end if
Set fs=CreateObject("Scripting.FileSystemObject")
pollfile=Server.Mappath("pollending.asp")
Set thisfile = fs.OpenTextFile(pollfile,1,False)
Dim poll()
count=0
do while not thisfile.AtEndOfStream
 thisline=thisfile.Readline
 Redim preserve poll(count)
 poll(count)=thisline
 count=count+1
loop
thisfile.close
set thisfile=nothing
set fs=nothing
hxrs=int((count-6)/2)%><html>
<head>
<title>候选人管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type='text/css'>
<!--
.p9 {line-height: 150%; font-size: 9pt;}
.p12 {line-height: 150%; font-size: 12pt;}
body {line-height: 150%;font-size : 12pt;}
td {line-height: 135%;font-size : 10.5pt;}
A  {text-decoration: none;}
A:Hover  {text-decoration : none;}
a:visited {  color: #0000FF}
-->
</style>
<script language="JavaScript">
function del(name){
document.forms[1].delname.value=name
document.forms[1].delname.focus()
}
function load()
{var name=navigator.appName
var vers=navigator.appVersion
if(name=="Netscape")
{window.location.reload()
}else
{history.go(0)
}}</script>
</head>
<body bgcolor="FFFFFF">
<h1 align="center"><font color="0099FF">【候选人管理】</font></h1>
<hr noshade size="1" color=009900>
<p><b>[功能说明]</b></p>
<p>添加或删除候选人。(共有候选人:<font color=red><%=hxrs%></font> 位;已投票:<font color=red><%=poll(4)%></font> 
票)<a href="javascript:load()">【刷新】</a><a href="javascript:history.go(-1)">【返回】</a></p>
<table border="1" align="center" cellpadding="4" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" bgcolor="#E0E0E0" width="80%">
<tr bgcolor="#0099FF" align="center"> 
<td><font color="#FFFFFF">序号</font></td>
<td><font color="#FFFFFF">候选人</font></td>
<td><font color="#FFFFFF">得票数</font></td>
<td><font color="#FFFFFF">得票率</font></td>
<td><font color="#FFFFFF">删除</font></td>
</tr>
<%for i=6 to count-1 step 2%>
<tr align="center"> 
<td><%=(i-4)/2%></td>
<td><%=poll(i)%></td>
<td><%=poll(i+1)%></td>
<td><%if poll(4)=0 then
Response.write "0%"
else
Response.write int(poll(i+1)*100/poll(4))&"%"
end if%></td>
<td><a href=javascript:del("<%=poll(i)%>")>删除</a></td>
</tr>
<%next%>
</table>
<hr noshade size="1" color=009900>
<form method="post" action="pollcandadd.asp">
<div align="center"> 添加候选人: 
<input type="text" name="addname" maxlength="10" size="10" style="font-size:12pt">
<input type="submit" name="add" value="添加" style="font-size:12pt">
<input type="reset" value="重写" style="font-size:12pt">
</div>
</form>
<form method="post" action="pollcanddel.asp">
<div align="center"> 删除候选人: 
<input type="text" name="delname" maxlength="10" size="10" style="font-size:12pt">
<input type="submit" name="del" value="删除" style="font-size:12pt">
<input type="reset" value="重写" style="font-size:12pt">
</div>
</form>
<hr noshade size="1" color=009900>
<div align="center" class="p9"><script src="use.asp"></script> <script src="sn.asp"></script><br><script src="copyright.asp"></script></div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -