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

📄 hover_vote_add.asp

📁 后台默认管理账号密码:admin 后台主要功能如下:一、系统管理:管理员管理
💻 ASP
字号:
<!--#include file="toptable.asp"-->
<%
'=================================
'   良精科技企业管理系统
'   QQ在线客服:65961930 82993936
'   咨询定购Tel:010-81991660
'      asp3721@hotmail.com 
'        www.liangjing.net
'  copyright(c)2001-2008 HoverCms 2007特别版
'=================================
%>
<%
dim Title,VoteTime,Action,IsSelected
dim rs,sql
Title=trim(request.form("Title"))
VoteTime=trim(request.form("VoteTime"))
if VoteTime="" then VoteTime=now()
Action=trim(request("Action"))
IsSelected=trim(request("IsSelected"))

dim i
if Title<>"" then
	sql="select top 1 * from Hover_Vote"
	Set rs= Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,3
	rs.addnew
	rs("Title")=Title
	for i=1 to 8
		if trim(request("select"&i))<>"" then
			rs("select"&i)=trim(request("select"&i))
			if request("answer"&i)="" then
				rs("answer"&i)=0
			else
				rs("answer"&i)=clng(request("answer"&i))
			end if
		end if
	next
	rs("VoteTime")=VoteTime
	rs("VoteType")=request("VoteType")
	if IsSelected="" then IsSelected=false
	if IsSelected="True" then conn.execute "Update Vote set IsSelected=False where IsSelected=True"
	rs("IsSelected")=IsSelected
	rs.update
	rs.close
	set rs=nothing
	call CloseConn()
	Response.Redirect "Hover_Vote.asp"
end if
%>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="3" cellspacing="1" border="0" width="97%" align="center" class="tableBorder">
			<form method="POST" action="Hover_Vote_Add.asp">
	<tr>
		<td class="title" height="25" colspan=4  align="center"><strong>添 加 调 查</strong></td>
	</tr>
	<tr>
		<td class="title2" height="25" colspan=4  align="center"> </td>
	</tr>
          <tr class="tdbg"> 
            <td width="346" align="right" bgcolor="#C0C0C0" class="table">主题:</td>
            <td colspan="3" bgcolor="#E3E3E3" class="table">
			<input name="Title" type="text" size="50" maxlength="50"></td>
		  </tr>
<% for i=1 to 8%>
					<tr class="tdbg"> 
            <td align="right" bgcolor="#C0C0C0" class="table">选项<%=i%>:</td>
            <td width="216" bgcolor="#E3E3E3" class="table">
					  <input type="text" name="select<%=i%>" size="36"></td>
            <td width="26" align="center" bgcolor="#E3E3E3" class="table">票数</td>
            <td width="368" bgcolor="#E3E3E3" class="table">
					  <input type="text" name="answer<%=i%>" size="5"></td>
					</tr>
<%next%>
				  <tr class="tdbg"> 
            <td align="right" bgcolor="#C0C0C0" class="table">调查类型:</td>
            <td colspan="3" bgcolor="#E3E3E3" class="table">
						<select name="VoteType" id="VoteType">
							<option value="Single" selected>单选</option>
							<option value="Multi">多选</option>
					</select></td>
		  </tr>
					<tr class="tdbg">
            <td align="right" bgcolor="#C0C0C0" class="table">&nbsp;</td>
            <td colspan="3" bgcolor="#E3E3E3" class="table">
							<input name="IsSelected" type="checkbox" id="IsSelected" value="True" checked>
					  设为最新调查</td>
					</tr>
					<tr class="tdbg"> 
            <td colspan=4 align=center class="table"><input name="Submit" type="submit" class="btn"  id="Submit" value=" 添 加 "> 
					  &nbsp; <input  name="Reset2" type="reset" class="btn"   id="Reset2" value=" 清 除 "> </td>
					</tr>

</form></table>
<BR>
<%htmlend%>

⌨️ 快捷键说明

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