📄 newvote.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>
<script>
function checkform(){
if(document.frm.title.value=="")
{
alert("请完成该填写的项目!");
document.frm.title.focus();
return false;
}
if(document.frm.content.value=="")
{
alert("请完成该填写的项目!");
document.frm.content.focus();
return false;
}
if(document.frm.item1.value=="")
{
alert("请完成该填写的项目!");
document.frm.item1.focus();
return false;
}
if(document.frm.item2.value=="")
{
alert("请完成该填写的项目!");
document.frm.item2.focus();
return false;
}
document.frm.submit();
}
</script>
</HEAD>
<%sname=session("ecid")
IF Request.QueryString ("action")="add" Then
dim votetitle,votecontent,voteitem1,voteitem2,voteitem3,voteitem4
function sort(data)
sort=Replace(data,"'","''")
end function
votetitle=Sort(Trim(Request.Form ("title")))
votecontent=Sort(Trim(Request.Form ("content")))
voteitem1=Sort(Trim(Request.Form ("item1")))
voteitem2=Sort(Trim(Request.Form ("item2")))
voteitem3=Sort(Trim(Request.Form ("item3")))
voteitem4=Sort(Trim(Request.Form ("item4")))
sql="insert into vote (title,content,item1,item2,item3,item4,voteuser,votetime,lastedforumtime,lastedforumuser) values('"
sql=sql&votetitle&"','"&votecontent&"','"&voteitem1&"','"&voteitem2&"','"&voteitem3&"','"&voteitem4&"','"&sname
sql=sql&"','"&now()&"','"&now()&"','"&Request.Cookies ("sname")&"')"
session("cn").execute (sql)
Response.Write "<script>"&vbcrlf
Response.Write "alert('你已经成功的发布了一个调查问卷!');"&vbcrlf
Response.Write "opener.location.reload();"&vbcrlf
Response.Write "window.close();"&vbcrlf
Response.Write "opener.focus();"&vbcrlf
Response.Write "</script>"&vbcrlf
Response.End
End If
%>
<BODY>
<form name="frm" method="post" action="newvote.asp?action=add" onsubmit="return checkform()">
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">调查投票</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="27%"> </td>
<td width="17%"> </td>
<td width="39%"> </td>
<td width="17%"> </td>
</tr>
<tr>
<td width="27%">调查标题</td>
<td colspan="2">
<input name="title" maxlength="22" class=in>
</td>
<td width="17%"><font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="27%">调查说明</td>
<td colspan="2">
<input name="content" maxlength="50" class=in>
</td>
<td width="17%"><font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="27%">调查答案选项一</td>
<td colspan="2">
<input name="item1" maxlength="20" class=in>
</td>
<td width="17%"><font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="27%">调查答案选项二</td>
<td colspan="2">
<input name="item2" maxlength="20" class=in>
</td>
<td width="17%"><font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="27%">调查答案选项三</td>
<td colspan="2">
<input name="item3" maxlength="20" class=in>
</td>
<td width="17%"></td>
</tr>
<tr>
<td width="27%">调查答案选项四</td>
<td colspan="2">
<input name="item4" maxlength="20" class=in>
</td>
<td width="17%"></td>
</tr>
<tr>
<td width="27%"> </td>
<td width="17%">
<input type="button" name="Submit" class=in
value="提交" onclick="javascript:checkform()">
</td>
<td width="39%">
<input type="button" name="Submit2" class=in
value="关闭" onclick="javascript:window.close();">
</td>
<td width="17%"> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<P> </P>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -