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

📄 vote_add.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 Title,VoteTime,Action,NewestTF
			dim rs,sql
			Title=trim(request.form("Title"))
			VoteTime=trim(request.form("VoteTime"))
			if VoteTime="" then VoteTime=now()
			Action=trim(request("Action"))
			NewestTF=trim(request("NewestTF"))
			
			dim i
			if Title<>"" then
				sql="select top 1 * from KS_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("AddDate")=VoteTime
				rs("VoteType")=request("VoteType")
				rs("UserName")=Request.Cookies(KSCMS.SiteSn)("AdminName")
				if NewestTF="" then NewestTF=0
				if NewestTF=1 then conn.execute "Update KS_Vote set NewestTF=0 where NewestTF=1"
				rs("NewestTF")=NewestTF
				rs.update
				rs.close
				set rs=nothing
				call CloseConn()
				Response.Redirect "Vote_Main.asp"
			end if
			%>

			<BR>
			<table cellpadding="2" cellspacing="1" border="0" width="690" align="center" class="a2">
				
				<tr>
					<td align="center">
				  <br>
						<form method="POST" name="voteform" action="Vote_Add.asp">
					<table width="624" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" Class="border">
					  <tr> 
						<td width="101" height="26" align="right" bgcolor="#EEF8FE">主题名称:</td>
						<td colspan="3" bgcolor="#EEF8FE">
						<input name="Title" type="text" size="40" maxlength="50">
						如:你对本站的哪些栏目较感兴趣!</td>
					  </tr>
			<% for i=1 to 8%>
								<tr> 
						<td height="25" align="right" bgcolor="#EEF8FE">选项<%=i%>:</td>
						<td width="303" bgcolor="#EEF8FE">
								  <input type="text" name="select<%=i%>" size="36"></td>
						<td width="80" align="right" bgcolor="#EEF8FE">初始票数:</td>
						<td width="135" bgcolor="#EEF8FE">
								  <input name="answer<%=i%>" type="text" value="0" size="5">
								  票</td>
								</tr>
			<%next%>
							  <tr> 
						<td height="25" align="right" bgcolor="#EEF8FE">调查类型:</td>
						<td colspan="3" bgcolor="#EEF8FE">
									<select name="VoteType" id="VoteType">
										<option value="Single" selected>单选</option>
										<option value="Multi">多选</option>
								</select>
									<input name="NewestTF" type="checkbox" id="NewestTF" value="1" checked />
设为最新调查</td>
					  </tr>
								
								<tr> 
						<td height="25" colspan=4 align=center bgcolor="#EEF8FE"><BR>
						  <span style="color:red">备注:最多可以为每个主题设定八个调查选项,不到八个选项的可留空!</span></td>
								</tr>
						  </table>
						</form>
					</td>
				</tr>
</table>
<script>
 function CheckForm()
 { var form=document.voteform;
  if (form.Title.value=='')
   {
     alert('请输入调查主题!');
	  form.Title.focus();
	 return false;
   }
  document.voteform.submit();
 }
</script>
			<BR>
<%End Sub
End Class
%>

⌨️ 快捷键说明

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