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

📄 showvote.asp

📁 不错的asp论坛,大家可以看看啊和呵呵.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="INC/config.asp"-->
<!--#include file="mdb.asp"-->
<!--#include file="INC/format.asp"-->
<%
dim itemid,founderr,errmsg,itemname
founderr=false
errmsg=""

if request.querystring("vt_id")="" then
  founderr=true
  errmsg=errmsg+"<br>"+"<li>你必须指定投票的主题!"
else
  if not isInteger(request.querystring("vt_id")) then
    founderr=true
    errmsg=errmsg+"<br>"+"<li>非法的投票主题的id参数。"
  else
    vtid=cint(request.querystring("vt_id"))
  end if
end if

if founderr then
  call diserror()
  response.end
else
%>
<HTML>
<HEAD>
<title><%=webname%></title>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META name="keywords" content="如影相随,http://ryxs.126x.com,,这个世界本来就是一个空间,我在寻找着我的第七感觉……">
<meta name="description" content="如影相随,http://ryxs.126x.com,,这个世界本来就是一个空间,我在寻找着我的第七感觉……">
<style type="text/css">
A{TEXT-DECORATION: none}
A:link {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:visited {COLOR: #666666; FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:active {FONT-FAMILY: 宋体; TEXT-DECORATION: none}
A:hover {BORDER-BOTTOM: 1px dotted; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-WIDTH: 1px; COLOR: #ff6600; TEXT-DECORATION: none}
BODY {
FONT-SIZE: 12px;
COLOR: #666666;
FONT-FAMILY:  宋体;
background-color: #ffffff; 
SCROLLBAR-FACE-COLOR: #e8e7 #000000; 
SCROLLBAR-SHADOW-COLOR: #000000; 
SCROLLBAR-3DLIGHT-COLOR: #cccccc; 
SCROLLBAR-ARROW-COLOR: #ff6600; 
SCROLLBAR-TRACK-COLOR: #EFEFEF; 
SCROLLBAR-DARKSHADOW-COLOR: #b2b2b2; 
SCROLLBAR-BASE-COLOR: #ffffff
}
TABLE {BORDER-COLLAPSE: collapse; FONT-FAMILY: 宋体; FONT-SIZE: 9pt}
.button{height:18px;width:50px;background:#f6f6f9 url(img/ButtonBg.gif); border:solid 1px #5589AA;color: #ffffff ;FONT-SIZE: 9pt}
.lanyu{border:solid 1px #5589AA;color: #ffffff ; font-size: 12px;}
.font {  filter: DropShadow(Color=#cccccc, OffX=2, OffY=1, Positive=2); text-decoration: none; font-size: 9pt}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- 
//***********默认设置定义.*********************
tPopWait=0;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  font-family: <%=fontfamily%>; background-color: #333333; color:#030303;border: 1px #ffffff solid; font-size: <%=fontsize%>; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 3px; padding-bottom: 1px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
function showPopupText(){
var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
        if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
	if(o.dypop!=sPop) {
			sPop=o.dypop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);	
			if(sPop==null || sPop=="") {
				dypopLayer.innerHTML="";
				dypopLayer.style.filter="Alpha()";
				dypopLayer.filters.Alpha.opacity=0;	
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="cPopText";
				curShow=setTimeout("showIt()",tPopWait);
			}
	}
}

function showIt(){
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		dypopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) {
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
		}
		else {
			dypopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0) {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
}
document.onmouseover=showPopupText;
// -->
</SCRIPT>
</HEAD>
<BODY leftMargin=0 topMargin=10 MARGINHEIGHT="0" MARGINWIDTH="0">
<noscript><iframe src=*.htm></iframe></noscript>
<table width="98%" border="0" cellpadding="10" cellspacing="1" bgcolor="#000000" align="center">
  <tr> 
    <td colspan="2" bgcolor="#E8E8E8" align="center" width="100%">
      <font color="#008000"><b>
      投票结果</b></font></td>
  </tr>
<%
openadmin
sql="select vt_name from votetopic where vt_id="&vtid
set rs=conn.execute(sql)
%>
  <tr> 
    <td colspan="2" align="center" bgcolor="#000000" width="100%"><%=rs("vt_name")%></td>
  </tr>
  <%sql="select * from voteitem where vt_id="&vtid
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
totalvote=0
rs2.movefirst
do while not rs2.eof
totalvote=totalvote+rs2("item_count")
rs2.movenext
loop
rs2.movefirst
do while not rs2.eof
%>
  <tr bgcolor="#000000"> 
    <td width="20%" align="center"><%=rs2("item_name")%></td>
    <td width="80%"><img src="img/votebar.gif" width="<%= FormatNumber((rs2("item_count")/totalvote*300),4) %>" height="14" title="<%=rs2("item_count")%>票"></td>
  </tr>
  <%rs2.movenext
loop
if rs2.eof and rs2.bof then%>
  <tr> 
    <td colspan="2" align="center" bgcolor="#000000" width="706">当前没有投票选项!</td>
  </tr>
  <%end if
rs2.close
set rs2=nothing%>
  <tr> 
    <td height="30" colspan="2" align="center" bgcolor="#000000" class="chinese" width="706"><%if request.cookies("npw")("voted")<>"yes" then%>您尚未投票!<%else%>您已经投过票了<%end if%>。总计票数<span class="newshead"><%=totalvote%></span>票
    </td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#000000" class="chinese" align="center" width="706">[<a href="javascript:window.close()">关闭窗口</a>]</td>
  </tr>
</table>
</body></html>
<%
end if
%>

⌨️ 快捷键说明

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