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

📄 vote_add.asp

📁 ①后台增加了基本设置功能
💻 ASP
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><%@language=vbscript codepage=936 %>
<!--#include file="Manage_Manage.asp"-->
<!--#include file="Conndb.asp"-->
<!--#include file="Inc/popedom.asp"-->
<%
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
Call CheckManageUser(Global_VoteAdd)
	sql="select top 1 * from 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 "Vote_Manage.asp"
end if
%>
<link href="Inc/Tzstudent_Com.css" rel="stylesheet" type="text/css">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"><br>
      <strong>添 加 调 查</strong><br>
<form method="POST" action="Vote_Add.asp">
        <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#DEDFDE" Class="border">
          <tr bgcolor="#FFFFFF" class="tdbg"> 
            <td width="83" height="22" align="right" bgcolor="#F7f7f7">主题:</td>
            <td colspan="3">
<input name="Title" type="text" size="45" maxlength="50"></td>
    </tr>
    <%
	for i=1 to 8%>
    <tr bgcolor="#FFFFFF" class="tdbg"> 
            <td height="22" align="right" bgcolor="#F7f7f7">选项<%=i%>:</td>
            <td width="289">
<input type="text" name="select<%=i%>" size="36"> 
      </td>
            <td width="53" align="right" bgcolor="#F7F7F7">票数:</td>
            <td width="80">
<input type="text" name="answer<%=i%>" size="5"></td>
    </tr>
    <%next%>
    <tr bgcolor="#FFFFFF" class="tdbg"> 
            <td height="22" align="right" bgcolor="#F7f7f7">调查类型:</td>
            <td colspan="3">
<select name="VoteType" id="VoteType">
          <option value="Single" selected>单选</option>
          <option value="Multi">多选</option>
        </select></td>
    </tr>
    <tr bgcolor="#FFFFFF" class="tdbg">
            <td height="22" align="right">&nbsp;</td>
            <td colspan="3">
<input name="IsSelected" type="checkbox" id="IsSelected" value="True" checked>
        设为最新调查</td>
    </tr>
    <tr bgcolor="#FFFFFF" class="tdbg"> 
            <td height="25" colspan=4 align=center> 
              <input name="Submit" type="submit" id="Submit" value=" 添 加 "> 
        &nbsp; <input  name="Reset2" type="reset" id="Reset2" value=" 清 除 "> </td>
    </tr>
  </table>
</form>       </strong></p>
      </td>
  </tr>
</table>

⌨️ 快捷键说明

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