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

📄 netvoteinfo.asp

📁 又一套oa 系统,供大家使用学习,更多的源代码正在上传中,好的程序应该大家共同使用
💻 ASP
📖 第 1 页 / 共 2 页
字号:
  choice = 0
  Do until rs.EOF
    choice = choice + 1
	response.Write "<tr bgcolor='#FFFFFF'><td align='center' width='22%'><div align='right'>调查选项"&choice&":</div></td><td align='left' width='78%'>"&rs("WS_AnswerTitle")&"</td></tr>"
	rs.MoveNext
  Loop
response.Write "<tr bgcolor='#FFFFFF'><td align='center' width='22%'><div align='right'>调查选项"&choice + 1&":</div></td><td width='78%'><input name='content' type='text' size='20' maxlength='50'></td></tr><tr bgcolor='#FFFFFF'><td align='center' width='22%'><div align='right'>设 置:</div></td><td width='78%'><input type='radio' name='G' value='T' checked class='radio' id='T'><label for='T'>添加下一个</label> <input type='radio' name='G' value='F' class='radio' id='F'><label for='F'>提交后返回</label></td></tr><tr bgcolor='#FFFFFF'><td colspan='2' align='center'><input type='hidden' name='pid' value='"&pid&"'> <input name='submit' type='submit' value='提 交'></td></tr></form></table>"
case "editoption"
 aid =Request("aid"):pid =Request.QueryString("pid")
if pid="" or isnull(pid) or not isnumeric(pid) or aid="" or isnull(aid) or not isnumeric(aid) then  HX_GoBack "参数错误!","" 
set rs=WS_S.HX_SetRSD("p.WS_QuestionTitle, p.WS_QuestionStartDate, p.WS_QuestionEndDate, a.WS_AnswerTitle","HX_VoteQuestion p, HX_VoteAnswer a"," WHERE p.WS_VQID = a.WS_VQID AND p.WS_VQID = " & pid & " AND a.WS_VOID = " & aid)
if rs.recordcount<=0 then HX_GoBack "参数错误!",""
response.Write "<table width='100%' border='0' align='center' cellpadding='5' cellspacing='1' bgcolor='#A1BBE0'><form action='?action=editoptionsave' method='post'><tr ><td colspan='2' ><img src='../HXIMAGES/netvote/poll.gif' width='13' height='15' align='absmiddle' vspace='2' hspace='2'><font color='#FF0000'>调查主题:</font>"&rs("WS_QuestionTitle")&"</td></tr><tr bgcolor='#FFFFFF'><td width='21%' align='center'>开始时间:</td><td width='79%'>"&rs("WS_QuestionStartDate")&"</td></tr><tr bgcolor='#FFFFFF'><td width='21%' align='center'>结束时间:</td><td width='79%'>"&rs("WS_QuestionEndDate")&"</td></tr><tr bgcolor='#FFFFFF'><td align='center'>调查选项"&Request.QueryString("option")&": </td><td><input name='content' type='text' value='"&rs("WS_AnswerTitle")&"' size='20' maxlength='50'></td></tr><tr bgcolor='#FFFFFF'><td colspan='2' align='center'><input type='hidden' name='aid' value='"&aid&"'><input type='hidden' name='pid' value='"&pid&"'><input name='action' type='submit' id='action' value='更新选项'></td></tr></form></table>"
case "manage"
  response.Write "<table width='100%' border='0' align='center' cellpadding='5' cellspacing='1' bgcolor='#A1BBE0'><tr><td width='6%' align='center' >状态</td><td width='48%' >调查主题</td><td width='8%' align='center' >投票数</td><td width='14%' align='center' >开始时间</td><td width='14%' align='center' >结束时间</td></tr>"
  set rs=WS_S.HX_SetRSD("",Tablename," Order By WS_QuestionStartDate,WS_QuestionEndDate DESC")
  If rs.recordcount>0 Then
	do until rs.eof
	startime=rs("WS_QuestionStartDate")
	endtime=rs("WS_QuestionEndDate")
	response.Write "<tr bgcolor='#FFFFFF'><td width='6%' align='center'><img src='../HXIMAGES/netvote/"
	if rs("WS_QuestionActive") then response.write "poll" else response.write "poll1"
	response.Write ".gif' width='13' height='15'></td><td width='48%'><a href='netvoteinfo.asp?WS_QuestionID="&rs("WS_VQID")&"'>"&rs("WS_QuestionTitle")&"</a></td><td width='8%' align='center'>"&rs("WS_QuestionVote")&"</td><td width='14%' align='center'>"&startime&"</td><td width='14%' align='center'>"&endtime&"</td></tr>"
	rs.MoveNext
   loop
  Else
	response.write "<tr bgcolor=""#FFFFFF""><td colspan=""6"">暂无调查</td></tr>"	
 End IF
response.Write "</table>"
case else 
    WS_QuestionID=request("WS_QuestionID")
	if WS_QuestionID<>"" and isnumeric(WS_QuestionID) then  Orderby=Orderby&" and WS_VQID="&WS_QuestionID
	set rs=WS_S.HX_SetRSD("WS_VQID,WS_QuestionTitle,WS_QuestionVote",Tablename,Orderby)
    if rs.recordcount>0 then
	N_Quest = rs("WS_QuestionTitle")
	WS_QuestionID = Cint(rs("WS_VQID"))
	if session("poll" & WS_QuestionID)<>"" and isnumeric(session("poll" & WS_QuestionID)) then
	PollNum = Cint(session("poll" & WS_QuestionID))
	end if
	sql = "SELECT * FROM HX_VoteAnswer WHERE WS_VQID=" & WS_QuestionID
	Set ars = Server.CreateObject("ADODB.Recordset")
	ars.Open sql, Conn, 1, 1
	C=ars.recordcount
	ReDim A_Count(c)
		i=65
		p_total=0
		For N=1 to C
			A_Count(N)=ars("WS_VoteCount")
			WS_Void = ars("WS_Void")
			WS_AnswerTitle = ars("WS_AnswerTitle")
			p_total=p_total+A_Count(N)
        	Content1=Content1 & "[" & chr(i) & "]<input type=""radio"" name=""poll"" checked class=""radio"" id="&chr(i)&" value=""" & WS_Void & """><label for="&chr(i)&">"
        	Content1=Content1 & WS_AnswerTitle & "</label><br>"
		ars.MoveNext
		i=i+1
		Next
	ars.Close
	Set ars = Nothing	
	i=65
	For N=1 to C
		if A_Count(N) = 0 then
			p_percent = 0
		Else
			p_percent = (A_Count(N)/p_total) * 100
		End If		
		Content20=Content20 & "<tr><td align=""right"" valign=""bottom"">[" & chr(i) & "]</td></tr>"
	 	Content21=Content21 & "<tr><td valign=""bottom""><img src=""../HXimages/netvote/p1.gif"" width=""" & p_percent & """ height=""8"">&nbsp; <font color=""#7C96B8"">" & FormatNumber(p_percent,2) & "%&nbsp;[" & A_Count(N) & "人]</font></td></tr>"

		Content30=Content30 & "<td width=""40"" valign=""bottom"" align=""center""><font color=""#7C96B8"">" & FormatNumber(p_percent,2) & "%</font><br><img src=""../HXimages/netvote/p2.gif"" width=""8"" height=""" & p_percent & """ vspace=""1""></td>"
		Content31=Content31 & "<td width=""40"" align=""center"">[" & chr(i) & "]</td>"
		i=i+1
	Next
response.Write "<table width='100%' border='0' align='center' cellpadding='5' cellspacing='1' bgcolor='#A1BBE0'><form action='?action=sendvote' method='post'><input type='hidden' name='WS_QuestionID' value='"&WS_QuestionID&"'><input type='hidden' name='N_Question' value='"&N_Quest&"'><tr><td colspan='2' class=td4>当前调查项目</td></tr><tr bgcolor='#F2F2F2'><td width='49%'><font color='#000000'>主题:"&N_Quest&"</font></td><td width='51%'><font color='#000000'>[调查结果显示]</font><input type='radio' name='list' onclick=""L1.style.display='inline';L2.style.display='none';"" checked class='radio' style='background-color:#F1F1F1; '>横向显示   <input type='radio' name='list' onclick=""L2.style.display='inline';L1.style.display='none';"" class='radio' style='background-color:#F1F1F1; '>纵向显示</td></tr><tr><td width='49%' bgcolor='#FFFFFF' valign='top'>"&Content1&"</td><td width='51%' bgcolor='#FFFFFF'><table width='100%' ><tr><td width='48%' class='small' id='L1' height='120'><table width='100%' border='0' cellspacing='0' cellpadding='1'><tr><td valign='bottom' width='22'><table width='100%' border='0' cellspacing='0' cellpadding='0' height='120'><tr><td align='right' valign='bottom' height='18'>&nbsp;</td></tr>"&Content20 &"<tr><td height='18'>&nbsp; </td></tr></table></td><td class='L1' valign='bottom'><table width='100%' border='0' cellspacing='0' cellpadding='0' height='120'><tr><td valign='bottom' height='18'>&nbsp;</td></tr>"&Content21&"<tr><td height='18'>&nbsp; </td></tr></table></td></tr></table></td><td width='52%' class='small' valign='bottom' id='L2' style='display:none;'><table border='0' cellspacing='0' cellpadding='0' class='L2'><tr><td valign='bottom' align='center' height='120' width='19'></td>"&Content30 &"<td valign='bottom' align='center' height='120' width='20'></td></tr></table><table border='0' cellspacing='0' cellpadding='0' align='left'><tr><td valign='bottom' align='center'  width='19' height='18'></td>"&Content31&"</tr></table></td></tr></table></td></tr><tr bgcolor='#F2F2F2'><td width='49%' bgcolor='#F2F2F2' valign='bottom' height='2'> <input type='submit' value=' 提 交 ' "
If PollNum = WS_QuestionID then response.write "disabled"
 response.write "> <input type='reset' name='Submit3' value=' 重 选 '></td><td width='51%' height='2'>总投票数: "&p_total&"</td></tr></form></table>"
 sql = "Select WS_VQID,WS_QuestionTitle,WS_QuestionStartDate,WS_QuestionVote,WS_QuestionActive FROM HX_VoteQuestion WHERE WS_QuestionStartDate <= #" & Date() & "# AND WS_QuestionEndDate >= #" & Date() & "# and WS_VQID <> " & WS_QuestionID
 Set rs = Server.CreateObject("ADODB.Recordset")
 rs.Open sql, Conn, 1, 1
 response.write "<br><table width='100%' border='0' align='center' cellpadding='5' cellspacing='1' bgcolor='#A1BBE0'><tr><td height='21' colspan='4'><font color='#000000'>其他调查项目</font></td></tr>"
 if rs.recordcount<=0 then 
   response.write "<tr><td colspan='4' align='center' bgcolor='#FFFFFF'>没有其他调查项目了</td></tr>"
 else
  response.write "<tr bgcolor=f1f1f1><td width='5%'>&nbsp;</td><td width='51%' height='20' >调查主题</td><td width='15%' align='center'>参加人数</td><td width='29%'>开始日期</td></tr>"
   do until rs.eof
    response.write "<tr><td width='5%' bgcolor='#FFFFFF' align='center'><img src='../HXIMAGES/netvote/"
	if rs("WS_QuestionActive") then response.write "poll" else response.write "poll1"
	response.write ".gif' width='13' height='15'></td><td width='51%' bgcolor='#FFFFFF'><a href='netvoteinfo.asp?WS_QuestionID="&rs("WS_VQID")&"'>"&rs("WS_QuestionTitle")&"</a></td><td width='15%' bgcolor='#FFFFFF' align='center'>"&rs("WS_QuestionVote")&"</td><td width='29%' bgcolor='#FFFFFF'>["&rs("WS_QuestionStartDate")&"]</td></tr>"
  rs.MoveNext
  loop
end if
 response.write "</table>"
else
 response.write "对不起,暂无调查项目"   
end if
end select	 	 
response.write "</td></tr><tr bgcolor='#f1f1f1'><td height='24' align=right><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td width='76%'>图示说明: <img src='../HXIMAGES/netvote/poll.gif' width='13' height='15' align=absmiddle>正在进行的调查项目  <img src='../HXIMAGES/netvote/poll1.gif' width='13' height='15' align=absmiddle>其他调查项目&nbsp;</td><td width='24%' align=right><a href='netvoteinfo.asp?action=manage'>调查管理</a>&nbsp;&nbsp; <a href='netvoteinfo.asp?action=addvote'>添加调查</a>&nbsp;</td></tr></table></td></tr></table></td></tr></table>"  
%>

⌨️ 快捷键说明

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