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

📄 vote_edit.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com  All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407 
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail  :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com  
'演示站点:http://test.kesion.com 
'郑重声明:
'    ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Vote_Main
KSCls.Execute()
Set KSCls = Nothing

Class Vote_Main
        Private KSCMS
		Private Sub Class_Initialize()
		  Set KSCMS=New CommonCls
		End Sub
        Private Sub Class_Terminate()
		 Call KSCMS.CloseConn()
		 Set KSCMS=Nothing
		End Sub


		Public Sub Execute()

			If Not KSCMS.ReturnPowerResult(0, "KMCT10006") Then
			  Response.Write ("<script>parent.frames['BottomFrame'].location.href='javascript:history.back();';</script>")
			  Call KSCMS.ReturnErr(1, "")
			End If

			Response.Write "<html>"
			Response.Write "<head>"
			Response.Write "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
			Response.Write "<title>调查管理-修改主题</title>"
			Response.Write "<link href=""../Inc/Admin_Style.CSS"" rel=""stylesheet"" type=""text/css"">"
		    Response.Write "<script src=""../JS/Common.js"" language=""JavaScript""></script>"
  			Response.Write "</head>"
			Response.Write "<body scroll=no topmargin=""0"" leftmargin=""0"" onselectstart=""return false;"">"

			Response.Write "  <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
			Response.Write "        <tr>"
			Response.Write "          <td width=""44%"" height=""25"" class=""sort"">"
			Response.Write "          <div align=""center""><strong>修 改 调 查 主 题</strong></div></td>"
			Response.Write "        </tr>"
			Response.Write "      </table>"
			
			dim ID,Title,AddDate,NewestTF
			dim rs,sql
			ID=KSCMS.G("Voteid")   
			Title=trim(KSCMS.G("Title"))
			AddDate=trim(KSCMS.G("AddDate"))
			if AddDate="" then AddDate=now()
			NewestTF=trim(KSCMS.G("NewestTF"))
			if NewestTF="" Then NewestTF=0
			if NewestTF=1 then
				conn.execute "Update KS_Vote set NewestTF=0 where NewestTF=1"
			end if
			dim i
			if ID="" then
				Response.Redirect "Vote_Main.asp"
			end if
			sql="select * from KS_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(KSCMS.G("select"&i))<>"" then
							rs("select"&i)=trim(KSCMS.G("select"&i))
							if KSCMS.G("answer"&i)="" then
								rs("answer"&i)=0
							else
								rs("answer"&i)=clng(KSCMS.G("answer"&i))
							end if
						else
							rs("select"&i)=""
							rs("answer"&i)=0
						end if
					next
					rs("AddDate")=AddDate
					rs("VoteType")=KSCMS.G("VoteType")
					if NewestTF="" then NewestTF=0
					rs("NewestTF")=NewestTF
					rs.update
					Response.Write ("<script>alert('调查主题修改成功!');location.href='Vote_Main.asp?Page=" & KSCMS.G("Page") & "';parent.frames['BottomFrame'].location.href='../split.asp?ButtonSymbol=VoteList&OpStr=常规管理 >> <font color=red>站内调查管理</font>';</script>")
				end if
				%>
			<BR>
			<table cellpadding="2" cellspacing="1" border="0" width="690" align="center" class="a2">
				<tr class="a4">
					<td align="center">
				  <br>
						<form method="POST" name="voteform" action="Vote_edit.asp?page=<%=KSCMS.G("Page")%>">
					<table width="624" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" Class="border">
					  <tr> 
									<td width="15%" height="25" align="right" bgcolor="#EEF8FE">主题名称:</td>
						<td width="85%" height="25" colspan="3" bgcolor="#EEF8FE"><input name="Title" type="text" value="<%=Trim(rs("Title"))%>" size="40">
						如:你对本站的哪些栏目较感兴趣!</td>
					  </tr>
								<% for i=1 to 8%>
								<tr> 
								  <td height="25" align="right" bgcolor="#EEF8FE">选项<%=i%>:</td>
									<td height="25" bgcolor="#EEF8FE"><input name="select<%=i%>" type="text" value="<%=Trim(rs("select"& i))%>" size="36">					  </td>
									<td height="25" align="right" bgcolor="#EEF8FE">票数</td>
								  <td width="80" height="25" bgcolor="#EEF8FE"><input name="answer<%=i%>" type="text" value="<%=Trim(rs("answer"&i))%>" size="5">
								  票</td>
								</tr>
								<%next%>
								<tr> 
									<td height="25" align="right" bgcolor="#EEF8FE">调查类型:</td>
									<td height="25" colspan="3" bgcolor="#EEF8FE"><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>
									  <input name="NewestTF" type="checkbox" id="NewestTF" value="1" <% if rs("NewestTF")=1 then Response.Write "checked"%> />
			设为最新调查</td>
								</tr>
								
								<tr>
									<td height="25" colspan=4 align=center bgcolor="#EEF8FE"> <BR>
										<input name="VoteID" type="hidden" id="VoteID" value="<%=rs("ID")%>"> 
								 <span style="color:red">备注:最多可以为每个主题设定八个调查选项,不到八个选项的可留空!</span></td>
</td>
								</tr>
						  </table>
						</form>
					</td>
				</tr>
			</table>
			<BR>
			<script>
		 function CheckForm()
		 { var form=document.voteform;
		  if (form.Title.value=='')
		   {
			 alert('请输入调查主题!');
			  form.Title.focus();
			 return false;
		   }
		  document.voteform.submit();
		 }
		</script>
			<%
			end if
			rs.close
			set rs=nothing
			conn.close
			set conn=nothing
			%>
<%End Sub
End Class
%>

⌨️ 快捷键说明

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