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

📄 surveystatiscont.asp

📁 东旭网络问卷调查系统 v2.4 很好用的大家试试看
💻 ASP
字号:
<!--#include file="../Include/Config.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../Js/Func.js" language="javascript" type="text/javascript"></script>
<link rel="stylesheet" href="../Css/Admin.css" type="text/css" />
</head>
<body>
<!--startprint-->
<%
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,1
if rs.eof then
call ShowAlert("参数错误","") 
end if
Survey_name=rs(0)
Survey_content=rs(1)
Survey_hits=rs(2)
Survey_usehits=rs(3)
rs.close
response.Write("<title>问卷---"&Survey_name&" 统计结果</title>")
response.Write("<table width=""100%"" align=""center"" cellpadding=""0"" cellspacing=""0"" id=""Survey_title"" class=""table"">")
response.Write("<tr><th colspan=""3"">")
response.Write("<div class=""Survey_title""><span class=""large"">"&Survey_name&"</span></div>")
response.Write("</th></tr>")
if not Survey_content="" then
Survey_question=split(Survey_content,",")
Survey_question_length=ubound(Survey_question)
for i=0 to Survey_question_length
response.Write("<tr>")
response.Write("<td colspan=""3"">")
response.Write((i+1)&"、")
sql="select Question_content,Question_answer,Question_result,Question_type from [Question] where Question_id="&Survey_question(i)
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write("题目已经被删除")
exit for
end if
response.Write(rs(0))
response.Write("</td>")
response.Write("</tr>")
if rs(1)<>"" and rs(2)<>"" or  rs(3)="5" then
dim Question_answer:Question_answer=split(rs(1),"&")
dim Question_result:Question_result=split(rs(2),",")
if ubound(Question_answer)<>ubound(Question_result) then '判断问题数和结果数是否一致,否则系统出错
call ShowAlert("系统出错","") 
end if
  select case rs(3)
   case "1","2"
  'response.Write("re"&ubound(Question_result))
   'response.end()   
  for j=0 to ubound(Question_answer)
   if not Survey_usehits=0 then
   persent=round(Question_result(j)/Survey_usehits,4)
   else
   persent=0
   end if
   response.Write("<tr>")
   response.Write("<td>")
   response.Write(Question_answer(j)&":")
   response.Write("</td>")
   response.Write("<td>")
   response.Write("<img src=""../Images/blue.gif"" width="&persent*100&" height=""20"">")
   response.Write("</td>")
   response.Write("<td>")
   response.Write(Question_result(j)&"/"&Survey_usehits&"&nbsp;&nbsp;"&persent*100&"%")
   response.Write("</td>")
   response.Write("</tr>")
  next
   case "3","4"
  for j=0 to ubound(Question_answer)
   if not Survey_usehits=0 then
   persent=round(Question_result(j)/Survey_usehits,4)
   else
   persent=0
   end if
   if j=ubound(Question_answer) then
   response.Write("<tr>")
   response.Write("<td>")
   response.Write(Question_answer(j)&":")
   response.Write("</td>")
   response.Write("<td>")
   response.Write("<img src=""../Images/blue.gif"" width="&persent*100&" height=""20"">")
   response.Write("</td>")
   response.Write("<td>")
   response.Write(Question_result(j)&"/"&Survey_usehits&"&nbsp;&nbsp;"&persent*100&"%&nbsp;&nbsp;")
   response.Write("<a href=""ShowText.asp?Question_id="&Survey_question(i)&""" target=""_blank"">查看具体</a>")
   response.Write("</td>")
   response.Write("</tr>")
   else
   response.Write("<tr>")
   response.Write("<td>")
   response.Write(Question_answer(j)&":")
   response.Write("</td>")
   response.Write("<td>")
   response.Write("<img src=""../Images/blue.gif"" width="&persent*100&" height=""20"">")
   response.Write("</td>")
   response.Write("<td>")
   response.Write(Question_result(j)&"/"&Survey_usehits&"&nbsp;&nbsp;"&persent*100&"%")
   response.Write("</td>")
   response.Write("</tr>")
   end if
  next
   case "5"
   response.Write("<tr>")
   response.Write("<td>")
   response.Write("&nbsp;")
   response.Write("</td>")
   response.Write("<td>&nbsp;</td>")
   response.Write("<td><a href=""ShowText.asp?Question_id="&Survey_question(i)&""" target=""_blank"">查看具体</a></td>")
   response.Write("</tr>")
   response.Write("")
  end select 
  
else
   response.Write("<tr>")
   response.Write("<td>")
   response.Write("暂时没有选项")
   response.Write("</td>")
   response.Write("<td>&nbsp;</td>")
   response.Write("<td>&nbsp;</td>")
   response.Write("</tr>")
end if  
rs.close
next
end if
   response.Write("<tr>")
   response.Write("<td>")
   response.Write("&nbsp;</td>")
   response.Write("<td>")
   response.Write("<div id=""button"">")
   response.Write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name=""button1"" type=""button"" value=""打印统计"" onClick=""preview();"">")
   response.Write("<input name=""button2"" type=""button"" value=""关闭窗口"" onClick=""window.close();"">")
   response.Write("</div>")
   response.Write("</td>")
   response.Write("<td>&nbsp;</td>")
   response.Write("</tr>")
response.Write("</table>")
%>
<!--endprint-->
</body>
</html>

⌨️ 快捷键说明

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