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

📄 clearstatis.asp

📁 东旭网络问卷调查系统 v2.4 很好用的大家试试看
💻 ASP
字号:
<!--#include file="../Include/Config.asp"-->
<%
'----------------------------------------------------------
'页面功能:问卷清零执行文件。
'最后修改时间:2007-12-04 19时2分
'作者:legal http://www.ilegal.cn
'备注:
'----------------------------------------------------------
dim sql,Survey_id
Survey_id=request.QueryString("Survey_id")
Call CheckNum(Survey_id)
sql="select Survey_name,Survey_content,Survey_hits,Survey_usehits from [Survey] where Survey_id="&Survey_id
rs.open sql,conn,1,3
if rs.eof then
call ShowAlert("参数错误","../index.asp") 
end if
Survey_content=rs(1)
application.Lock()
rs("Survey_usehits")=0
rs("Survey_hits")=0
rs.update
application.unLock()
rs.close

if not Survey_content="" then
Survey_question=split(Survey_content,",")
for i=0 to ubound(Survey_question)
'----------------------------------------------------------
'清空数据库中关于该问卷下自定义文本的存储
'----------------------------------------------------------
sql="delete from [Text] where Text_belong="&Survey_question(i)
application.Lock()
conn.execute(sql)
application.UnLock()
'----------------------------------------------------------
'清空数据库问卷所有题目的已有结果
'----------------------------------------------------------
sql="select Question_answer,Question_result from [Question] where Question_id="&Survey_question(i)
rs.open sql,conn,1,3
if rs.eof or rs.bof then
else
  if not rs("Question_answer")="" then
    Question_answer=split(rs("Question_answer"),"&")
	for j=0 to ubound(Question_answer)
	  if Question_result="" then
	     Question_result="0"
	  else
	     Question_result=Question_result&",0"	 
	  end if	 
	next
  application.Lock()	
  rs("Question_result")=Question_result
  rs.update
  application.UnLock()
  end if
end if
rs.close
Question_result=""
next
end if
call ShowAlert("清零成功","SurveyStatis.asp") 
%>

⌨️ 快捷键说明

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