📄 voteadd.asp
字号:
<!--#include file = include.asp-->
<!--#include file = CheckPurview.asp-->
<%
'==========================================
'
'
'
'
'
'==========================================
'
'此程序作用:增加投票
'程序创建时间:13:36 2003-04-01
'程序完成时间:13:36 2003-04-01
'最后修改时间:13:36 2003-04-01
'==========================================
if request.form("action")="add" then
set rs=conn.execute("select VoteClassID from VoteClass where Title='"&request.form("title")&"'")
if not rs.eof then Call Warn("标题不能重复"):response.end
x=false
for i=1 to request.form("VoteOper").count
if request.form("VoteOper")(i) <>"" then
x=true
end if
next
if x=false then Call Warn("最少输入一个选项"):response.end
set rs=server.createobject("adodb.recordset")
sql="select title,type,AddDate from VoteClass"
rs.open sql,conn,3,3
rs.addnew
rs("title")=request.form("title")
rs("type")=request.form("type")
rs("Adddate")=now()
rs.update
rs.close
set rs=nothing
set rs=conn.execute("select VoteClassID from VoteClass where Title='"&request.form("title")&"'")
VoteClassID=rs("VoteClassID")
rs.close
set rs=nothing
for i=1 to request.form("VoteOper").count
if request.form("VoteOper")(i) <>"" then
conn.execute("insert into vote (VoteOper,VoteClassID,count) values ('"&request.form("VoteOper")(i)&"','"&VoteClassID&"',0)")
end if
next
Call Warn("添加成功")
response.redirect"Votemanage.asp"
end if
%>
<body background="images/BLogo.gif">
<p> </p>
<p> </p>
<form name=form method=post action"" onsubmit="return CheckVote()">
<table width="353" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
<tr>
<td width="351" height="16" valign="middle" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >
<!--#include file = topMenu.htm-->
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >
<p>标题:
<input type="text" name="Title">
</p></td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >方式:
<input type="radio" name="type" value="radio" checked>
单选
<input type="radio" name="type" value="checkbox">
多选</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项:
<input type="text" name="VoteOper">
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >
<input type="submit" name="Submit" value=" 添 加 ">
<input type="hidden" name="action" value="add">
<input type="reset" name="Submit2" value=" 还 原 ">
</td>
</tr>
</table>
</form>
</body>
</html>
<%Sub Warn(depict)%>
<script luanage=javascript>
history.back()
alert("<%=depict%>")
</script>
<%end Sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -