polltime.asp

来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 73 行

ASP
73
字号
<%@ 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%><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: 150%;font-size : 12pt;}
A  {text-decoration: none;}
A:Hover  {text-decoration : none;}
a:visited {  color: #0000FF}
-->
</style>
</head>
<body bgcolor="FFFFFF">
<h1 align="center"><font color="0099FF">【更改投票起止时间】</font></h1>
<hr noshade size="1" color=009900>
<p><b>[功能说明]</b></p>
<p>本功能用于设置允许投票的时间段。格式为“年-月-日 时:分:秒”,例:“2000-02-17 08:00:00”(全部为半角字符)。</p>
<table border="0" align="center" bgcolor="#E0E0E0" cellpadding="4">
<form method="post" action="polltimeok.asp">
<tr> 
<td>开始投票时间:</td>
<td>
<input type="text" name="begintime" maxlength="19" size="19" style="font-size:12pt" value="<%=poll(1)%>">
</td>
</tr>
<tr> 
<td>终止投票时间:</td>
<td>
<input type="text" name="endtime" maxlength="19" size="19" style="font-size:12pt" value="<%=poll(2)%>">
</td>
</tr>
<tr>
<td align="right">选择操作:</td>
<td align="center"> 
<input type="submit" name="Submit" value="更改" style="font-size:12pt">
<input type="button" value="放弃" style="font-size:12pt" onclick=javascript:history.go(-1)>
</td>
</tr>
</form>
</table>
<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 + =
减小字号Ctrl + -
显示快捷键?