📄 index.asp
字号:
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 1 * from toupiao order by id desc",db,1,3
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from message order by id desc",db,1,3
maxid=cint(rs("piaosh"))
maxid1=cint(rs("piaosh"))
if maxid1>1000 then
maxid1=cint(rs("piaosh"))/50
end if
i=0
%>
<style>
.star-rating{/*这里是空分层,用来显示空星星*/
list-style:none;
margin: 0px;
padding:0px;
width: 150px;
height: 30px;
position: relative;
background: url(images/star_rating2.gif) top left repeat-x;/*空星星位于背景图片的顶层,将其设为背景并横向平铺*/
}
.star-rating li{/*设置li的浮动属性*/
padding:0px;
margin:0px;
/*\*/
float: left;
/* */
}
.star-rating li a{/*设置a的布局为绝对布局和垂直坐标并隐藏a中文本使其成为空链接*/
display:block;
width:30px;
height: 30px;
text-decoration: none;
text-indent: -9000px;
z-index: 20;
position: absolute;
padding: 0px;
}
.star-rating li a:hover{/*设置a:hover的背景图片为打分星/垂直坐标/left为0,注意垂直坐标一定要小于a的垂直坐标*/
background: url(images/star_rating2.gif) left center;
z-index: 2;
left: 0px;
}
/*以下5个class用来设置5个链接的位置和hover的宽度*/
.star-rating a.one-star{
left: 0px;
}
.star-rating a.one-star:hover{
width:30px;
}
.star-rating a.two-stars{
left:30px;
}
.star-rating a.two-stars:hover{
width: 60px;
}
.star-rating a.three-stars{
left: 60px;
}
.star-rating a.three-stars:hover{
width: 90px;
}
.star-rating a.four-stars{
left: 90px;
}
.star-rating a.four-stars:hover{
width: 120px;
}
.star-rating a.five-stars{
left: 120px;
}
.star-rating a.five-stars:hover{
width: 150px;
}
.ft1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 9pt;
line-height: 20px;
}
</style>
<%
response.write ("<style>")
response.write (".star-rating li.current-rating{background: url(images/star_rating2.gif) left bottom;position: absolute;height: 30px;width:"&maxid1&"px;display: block;text-indent: -9000px;z-index: 1;}")
response.write ("</style>")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>投票测试。感谢大家!</title>
<link href="images/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="http://www.szrgb.net/text/toupiao/images/mm.gif" width="127" height="168"></td>
</tr>
<tr>
<td height="23" style=" font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px">这个美女漂亮吗?<br>
现在得票《<%=maxid%>》票</td>
</tr>
<tr>
<td><ul class="star-rating">
<li class="current-rating">--</li>
<li><a href="writepiao.asp?add=1" title="我加1分" class="one-star">1</a></li>
<li><a href="writepiao.asp?add=2" title="我加2分" class="two-stars">2</a></li>
<li><a href="writepiao.asp?add=3" title="我加3分" class="three-stars">3</a></li>
<li><a href="writepiao.asp?add=4" title="我加4分" class="four-stars">4</a></li>
<li><a href="writepiao.asp?add=5" title="我加5分" class="five-stars">5</a></li>
</ul></td>
</tr>
<tr><td align="center" style=" font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px"><strong><font color=#336699>我要投一票</font></strong></td>
</tr>
</table>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="683" height="25" bgcolor="f2f2f2" style=" font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px">感谢大家,感谢《
Satellite 》同志的相关教程:<a href="http://bbs.blueidea.com/thread-2677604-1-1.html" target="_blank">http://bbs.blueidea.com/thread-2677604-1-1.html</a></td>
<td width="93" bgcolor="f2f2f2" style=" font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:20px"><a title="我要说二句儿" href="#1"><font color=#336699>我要顶一下</font></a></td>
</tr>
<tr>
<td height="25" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<%if not rs1.bof and not rs1eof then %>
<%
do while not rs1.eof%>
<%if i=0 then
i=1
%>
<tr bgcolor="#FFFFFF" class="ft1">
<td width="20%" height="25" align="center" valign="top">网友:<%=rs1("peoplename")%></td>
<td width="80%" valign="top"><% title1=rs1("peopleconnet")
if trim(title1)<>"" then
title1=Replace(title1,chr(32)," ")
title1=Replace(title1,chr(13)&chr(10),"<br>")
end if %>
<%=title1%></td>
</tr>
<%else
i=0
%>
<tr bgcolor="#F2F2F2" class="ft1">
<td height="25" align="center" valign="top">网友:<%=rs1("peoplename")%></td>
<td width="80%" valign="top"><% title1=rs1("peopleconnet")
if trim(title1)<>"" then
title1=Replace(title1,chr(32)," ")
title1=Replace(title1,chr(13)&chr(10),"<br>")
end if %>
<%=title1%></td>
</tr>
<%end if%>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
end if
%>
</table></td>
</tr>
</table>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><hr></td>
</tr>
</table>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
<form action="writemes.asp" method="post"><tr bgcolor="#FF9900" class="ft1">
<td width="26%" height="25" align="right">我得大名:</td>
<td height="30" colspan="2"><input name="peoplename" id="peoplename" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" size="50"> <a name="1"></a></td>
</tr>
<tr bgcolor="#EEFAFF" class="ft1">
<td width="26%" height="25" align="right">我要讲:</td>
<td height="25" colspan="2"><textarea name="peopleconnet" cols="50" rows="8" id="peopleconnet"></textarea></td>
</tr>
<tr bgcolor="#EEFAFF" class="ft1">
<td width="26%" height="25" align="right"> </td>
<td width="42%" height="25"> </td>
<td width="32%"> </td>
</tr>
<tr bgcolor="#EEFAFF" class="ft1">
<td width="26%" height="25" align="right"> </td>
<td height="25" align="center"><input type="submit" name="Submit" value="提交发言">
<input type="reset" name="Submit2" value="重置内容"></td>
<td height="25"> </td>
</tr>
<tr bgcolor="#EEFAFF" class="ft1">
<td width="26%" height="25" align="right"> </td>
<td height="25">注:请文明用语 <a href="http://www.szrgb.net/szrgb/bbs/bugao.htm" target="_blank"><font color="#0066CC">相关法政 </font></a></td>
<td height="25"> </td>
</tr></form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -