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

📄 votemodify.asp

📁 很好的企业网站管理系统!可以适应各种不同的小型企业!
💻 ASP
字号:

<html>
<head>
<title>投票管理 -晓宇听幽 网站内容管理系统</title>
<meta copy="程序制作:xoyu(QQ:5964887)www.xoyu.com">
<link rel="stylesheet" href="admin.css" type="text/css">
<%Admin="InfoInsert"%>
<!--#include file="check.asp"-->
<!--#include file="mdb_path_vote.asp"-->
<%
'#################################################################
'#  晓宇听幽网站内容管理系统(xoYu CMS)
'# 
'#  版权所有: 晓宇听幽工作室
'#
'#  制作人  :  xoyu(晓宇)            
'#           
'#  主页地址: http://www.xoYu.com	    晓宇听幽工作室
'#  论坛地址: http://www.xoYu.com/bbs/	晓宇听幽讨论区
'#
'#【版权声明】
'#################################################################
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓!
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'#################################################################
'# 程序名称:晓宇听幽网站内容管理系统·网站内容管理系统
'# 英文名称:xoYu News 2004 Professional For xoYu CMS
'# 程序创建时间:2003-7-10
'# 程序完成时间:2003-9-11
'# 最后修改时间:2003-11-15
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作
'# 如有任何问题请到我们的论坛(http://www.xoyu.com/bbs/)告诉我们。 
'#################################################################
  if request.form("action")="Modify" then
	x=false
	for i=1 to request.form("VoteOper").count
      if  request.form("VoteOper")(i) <>"" then 
        x=true
	  end if
	next
	if x=false then Call Warn("最少输入一个选项"):response.end
    set rs=server.createobject("adodb.recordset")
	sql="select title,type,AddDate from VoteClass where VoteClassID="&request.querystring("VoteClassID")
	rs.open sql,conn,3,3
      rs("title")=request.form("title")
	  rs("type")=request.form("type")
	  rs("Adddate")=now()
	rs.update
	rs.close
	set rs=nothing
    set rs=conn.execute("select VoteClassID from VoteClass where Title='"&request.form("title")&"'")
    VoteClassID=rs("VoteClassID")
	rs.close
	set rs=nothing
	for i=1 to request.form("ID").count
      if  request.form("VoteOper")(i) <>"" then 
	  conn.execute("Update Vote set VoteOper='"&request.form("VoteOper")(i)&"' where ID="&request.form("ID")(i))
	  conn.execute("Update Vote set Count='"&request.form("Count")(i)&"' where ID="&request.form("ID")(i))
	  else
	  conn.execute("delete from Vote where ID="&request.form("ID")(i))
	  end if
	next
	for i=1 to request.form("VoteOper1").count
      if  request.form("VoteOper1")(i) <>"" then 
	  conn.execute("insert into vote (VoteOper,VoteClassID,count) values ('"&request.form("VoteOper1")(i)&"','"&request.querystring("VoteClassID")&"','"&request.form("Count1")(i)&"')")
	  end if
	next
	Call Warn("添加成功")
	response.redirect"Votemanage.asp"
  end if

  if request.querystring("VoteClassID")="" then response.redirect"Votemanage.asp"
  set rs=server.createobject("adodb.recordset")
  sql="select title,type from VoteClass where VoteClassID="&request.querystring("VoteClassID")
  rs.open sql,conn,1,1

  set rs1=server.createobject("adodb.recordset")
  sql1="select VoteOper,Count,ID from Vote where VoteClassID="&request.querystring("VoteClassID")
  rs1.open sql1,conn,1,1
%>
<body background="images/BLogo.gif">
<form name=form method=post action"" onsubmit="return CheckVote()">  
<table width="380" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
  <tr> 
    <th height="25" align="center" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; > 
      <p>修改投票</p></th>
  </tr>
  <tr> 
    <td height="25" align="center" class=forumrow onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; > 
      <p>标题: 
        <input type="text" name="Title" value=<%=rs("Title")%> size="20">
      </p></td>
  </tr>
  <tr>
    <td height="25" align="center" class=forumrow onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >方式: 
      <input type="radio" name="type" value="radio" <%if rs("type")="radio" then response.write"checked"%>>
      单选 
      <input type="radio" name="type" value="checkbox" <%if rs("type")="checkbox" then response.write"checked"%>>
      多选</td>
  </tr>
<%while not rs1.eof%>
  <tr> 
    <td height="25" align="center" class=forumrow onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项: 
      <input type="text" name="VoteOper" value="<%=rs1("VoteOper")%>" size="20">
	  <input type="hidden" name="ID" value="<%=rs1("ID")%>">票数:<input type="text" size=3 name="Count" value="<%=rs1("Count")%>">
    </td>
  </tr>
<%rs1.movenext:wend%>
<%for i=1 to 8-rs1.recordcount%>
  <tr> 
    <td height="25" align="center" class=forumrow onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; >选项: 
      <input type="text" name="VoteOper1" size="20">票数:<input type="text" size=3 name="Count1" value="0">
    </td>
  </tr>
<%next%>
  <tr> 
    <th height="25" align="center" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; > 
      <input type="submit" name="Submit" value=" 修 改 " onclick="return modify()"> 
	  <input type="hidden" name="action" value="Modify">
	  <input type="reset" name="Submit2" value=" 还 原 " onclick="return reset1()"> 
    </th>
  </tr>
</table>
</form>
</body>
</html>
<%Sub Warn(depict)%>
    <script luanage=javascript>
      history.back()
      alert("<%=depict%>")
    </script>
<%end Sub%>

⌨️ 快捷键说明

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