📄 add.asp
字号:
<%
if request("actions")="1" then
title=trim(request("titles"))
if request("current")="1" then
cu=true
else
cu=false
end if
if request("choice")="1" then
choi=false
else
choi=true
end if
if title="" or len(title)>200 then
response.write "<script language='javascript'>alert('主题内容不能为空或大于指定字数!');history.go(-1);</script>"
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from title where id=null"
rs.open sql,connstr,1,3
rs.addnew
rs("title")=title
rs("current")=cu
rs("choice")=choi
rs.update
response.write "<script language='javascript'>alert('主题添加成功!请进入编辑页面添加选项');window.location.href='manage.asp';</script>"
end if
end if
%>
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="63" valign="bottom"><div align="center">添加投票标题:</div></td>
</tr>
</table>
<form name="form1" method="post" action="">
<table width="70%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000">
<tr>
<td width="26%" height="14" bgcolor="#FFF4C8"><div align="center">标题内容</div></td>
<td width="74%" bgcolor="#D7F2FF"><textarea name="titles" cols="30" rows="4" id="titles"></textarea>
小于200字符</td>
</tr>
<tr>
<td width="26%" height="7" bgcolor="#FFF4C8"><div align="center">单选/多选</div></td>
<td bgcolor="#D7F2FF"><input name="choice" type="radio" value="1" checked>
单选
<input type="radio" name="choice" value="2">
多选</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2"><div align="center">
<input name="actions" type="hidden" id="actions" value="1">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置">
</div></td>
</tr>
</table>
</form>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<!--#include file="bottom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -