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

📄 votemodify.asp

📁 BOB人才招聘系统
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<!--#include file="Admin.asp"-->
<!--#include file="Conndb.asp"-->
<%
dim ID,Title,VoteTime,IsSelected
dim rs,sql
ID=request("id")
Title=trim(request.form("Title"))
VoteTime=trim(request.form("VoteTime"))
if VoteTime="" then VoteTime=now()
IsSelected=trim(request("IsSelected"))
if IsSelected="True" then
	conn.execute "Update Vote set IsSelected=False where IsSelected=True"
end if
dim i
if ID="" then
	Response.Redirect "VoteManage.asp"
end if
sql="select * from Vote where ID="&Cint(ID)
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if not rs.eof then
	if Title<>"" then
		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
			else
				rs("select"&i)=""
				rs("answer"&i)=0
			end if
		next
		rs("VoteTime")=VoteTime
		rs("VoteType")=request("VoteType")
		if IsSelected="" then IsSelected=false
		rs("IsSelected")=IsSelected
		rs.update
		rs.close
		set rs=nothing
		call CloseConn()
		Response.Redirect "VoteManage.asp"
	end if
%>
<!-- #include file="Head.asp" -->
<table width="100%" height="93%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="180" align="center" valign="top"><!-- #include file="left.asp" --></td>
    <td align="center" valign="top">
        <br>
      <table border="0" cellpadding="0" cellspacing="0"  class=tableBorder>
        <tr>
          <td  background=images/top_bg.gif height="25"><div align="center" style="color: #ffffFF; font-weight: bold;"><strong>修改调查</strong></div></td>
	 </tr>
	 <tr><td>
<form method="POST" action="VoteModify.asp">
      <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#f1f3f5">
    <tr> 
      <td width="15%" height="30" align="right">主题:</td>
      <td width="85%" colspan="3"><input name="Title" type="text" value="<%=rs("Title")%>" size="52"></td>
    </tr>
    <%
for i=1 to 8%>
    <tr> 
      <td height="30" align="right">选项<%=i%>:</td>
      <td><input name="select<%=i%>" type="text" value="<%=rs("select"& i)%>" size="36"> 
      </td>
      <td align="right">票数:</td>
      <td width="80"><input name="answer<%=i%>" type="text" value="<%=rs("answer"&i)%>" size="5"></td>
    </tr>
    <%next%>
    <tr> 
      <td align="right" height="30">调查类型:</td>
      <td colspan="3"><select name="VoteType" id="VoteType">
          <option value="Single" <% if rs("VoteType")="Single" then %> selected <% end if%>>单选</option>
          <option value="Multi" <% if rs("VoteType")="Multi" then %> selected <% end if%>>多选</option>
        </select></td>
    </tr>
    <tr>
      <td align="right" height="30">&nbsp;</td>
      <td colspan="3"><input name="IsSelected" type="checkbox" id="IsSelected" value="True" <% if rs("IsSelected")=true then response.write "checked"%>>
        设为最新调查</td>
    </tr>
    <tr> 
      <td height="35" colspan=4 align=center><input name="ID" type="hidden" id="ID" value="<%=rs("ID")%>"> 
        <input name="Submit" type="submit" id="Submit" value="保存修改结果"> </td>
    </tr>
  </table>
</form></td></tr></table> 
    </td>
  </tr>
</table>
<!-- #include file="Foot.asp" -->
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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