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

📄 vote_list.asp

📁 这是我根据动网新闻核心自行设计的校园新闻系统
💻 ASP
字号:
<!-- #include file="../inc/const.asp" -->
<%
pagename="votelist"
pageadmin=1
%>

<!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/function.asp" -->
<!-- #include file="../inc/vote_function.asp" -->
<!-- #include file="../inc/sql.asp" -->
<!-- #include file="../inc/config.asp" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link rel="stylesheet" href="../Inc/styles.css" type="text/css">
</head>
<form method="POST" action="Vote_Save.asp?action=add">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" id="table1">
	<tr>
		<td width="15" height="18">
		</td>
		<td class="heading1" height="18"><span lang="zh-cn">投票调查列表</span></td>
	</tr>
	<tr>
		<td height="16" width="15"></td>
		<td class="body" height="16">这里列出了所有的投票调查项目,并且可以对这些项目进行修改删除等操作.<br>
		每个投票调查只列出<%=admin_votelist_votesize%>项选择,如果要查看更多的选项请点击标题.</td>
	</tr>
	<tr>
		<td height="16" width="15"></td>
		<td class="body" height="16"></td>
	</tr>
	<tr>
		<td height="17" width="15"></td>
		<td class="body" height="17">
		<table width="98%" border="0" cellspacing="0" cellpadding="0" class="bevel1" id="table2">
			<tr>
				<td>&nbsp;&nbsp;投票调查列表</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td height="17" width="15"></td>
		<td class="body" height="17">
		</td>
	</tr>
	<tr>
	
		<td height="17" width="15"></td>
		<td class="body" height="17">
		<table border="1" width="98%" id="table3" cellspacing="0" cellpadding="0" style="border-collapse: collapse" class="bevel2" height="40">
			<tr>
			<td align="center" class="body" height="25" width=50 bgcolor="#C0C0C0">
				<font size="2">ID</font></td>
				<td align="center" class="body" height="25" bgcolor="#C0C0C0">
				<font size="2">投票项目</font></td>
				<td width="100" align="center" class="body" height="25" bgcolor="#C0C0C0">
				<font size="2">修改</font></td>
				<td width="100" align="center" class="body" height="25" bgcolor="#C0C0C0">
				<font size="2">删除</font></td>
			</tr>
			<%
			sql="SELECT votetitle, (select sum(votecount) from vote_details where voteid=vote_vote.id) AS votecount, id,(select count(id) from vote_vote) as totalcount,style FROM Vote_Vote where userid='"&userid&"' ORDER BY id DESC"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,3,1
			dim votetitle,votetotalcount,voteid,style
			'***********************************分页
			count=admin_votelist_pagesize
			if count<=0 then
				count=admin_votelist_pagesize
			end if
			if not rs.eof then
				rs.pagesize=count
				pagecount=rs.pagecount
				if request("pageid")="" then
					nowpage=1
				else
					nowpage=int(request("pageid"))
				end if
				if nowpage>=rs.pagecount then
					nowpage=rs.pagecount
				elseif nowpage<=1 then
					nowpage=1
				end if
				rs.absolutepage=nowpage
			else
				pagecount=1
				nowpage=1
			end if
			a=1
			do while not rs.eof and a<=count
				votetitle=rs(0)
				votetotalcount=rs(1)
				voteid=rs(2)
				totalcount=rs(3)
				style=rs(4)
				if style="radio" then
					style="单选"
				elseif style="checkbox" then
					style="多选"
				end if				
				%>
				<tr bgcolor=<%=settrbg(a)%>>
				<td align="center" class="body" height="20" width=50>
					<font size="2"><%=voteid%></font></td>
					<td align="center" class="body" height="20">
					<table border="0" class=body cellpadding="0" style="border-collapse: collapse" width="98%" id="table4">
						<tr>
							<td height="16" width="57%"><b>&nbsp;标题[<%=style%>]&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;<a class=bodylink href="javascript:windowopen('../show/showvotedetails1.asp?voteid=<%=voteid%>','',<%=window_width%>,<%=window_height%>)"><b><%=votetitle%></b></a> (<font color=<%=admin_votelist_votecountcolor%>><%=votetotalcount%></font>)</b></td>
						</tr>
						<%
						rsssql="SELECT votedetail, votecount, cstr(cint((votecount/iif((select sum(votecount) from vote_details where voteid="&voteid&")=0,1,(select sum(votecount) from vote_details where voteid="&voteid&")))*10000)/100)+'%' AS precount FROM Vote_Details WHERE voteid="&voteid&""
						set rss=conn.execute(rsssql)
						n=1
						do while not rss.eof and n<=admin_votelist_votesize%>
							<tr>
								<td height="10" width="57%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;选择项<%=n%>&nbsp;&nbsp;:&nbsp;&nbsp;<%=rss(0)%> &nbsp;&nbsp;(<font color=<%=admin_votelist_votecountcolor%>><%=rss(1)%></font>&nbsp;,&nbsp;<font color=<%=admin_votelist_votecountpercolor%>><%=rss(2)%></font>)</td>
							</tr>
						<%
						n=n+1
						rss.movenext
						loop
						if not rss.eof then
							%>
							<tr>
							<td height="15">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class=err>......还有更多得选项请点击标题查看</font></td>
							</tr>
							<%
						end if		
						rss.close
						set rss=nothing
						%>
					</table>
					</td>
					<td width="100" align="center" class="body" height="20">
					<a href="Mod_Vote.asp?id=<%=voteid%>">
					<img border="0" src="../Pic/modify.gif" width="20" height="20"></a></td>
					<td width="100" align="center" class="body" height="20">
					<a href="vote_save.asp?action=del&id=<%=voteid%>">
					<img border="0" src="../Pic/delete.gif" width="20" height="20"></a></td>
				</tr>
			<%
			a=a+1
			rs.movenext
			loop
			rs.close
			set rs=nothing
			call connclose%>
			</table>
		</td>
		
	</tr>
	<tr>
		<td height="17" width="15"></td>
		<td class="body" height="17">
		</td>
	</tr>
	<tr>
		<td height="17" width="15"></td>
		<td class="body" height="17">
		<%
pagecount=int(pagecount)		
response.write "<table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'><tr><td class='body' align=center>"
if nowpage>1 then
	response.write "<a href='vote_list.asp?pageid="&nowpage-1&"'><<上一页</a>&nbsp;&nbsp;"
end if
if nowpage<pagecount then
	response.write "&nbsp;&nbsp;<a href='vote_list.asp?pageid="&nowpage+1&"'>下一页>></a>"
end if
response.write "&nbsp;&nbsp;总共有投票调查<font color=red>"&totalcount&"</font>个"
response.write "&nbsp;&nbsp;页数:<font color=red>"&nowpage&"</font>/"&pagecount
response.write "</tr></td></table>"
response.write "</table>"		
		%>
		</td>
	</tr>
</table>
</form>
<script>
function windowopen(wurl,wname,wwidth,wheight)
{
window.open(wurl,wname,"width="+wwidth+",height="+wheight+",resizable=1,scrollbars=1")
}
</script>

⌨️ 快捷键说明

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