设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 80|回复: 1
打印 上一主题 下一主题

[求助]如何实现在线QQ功能.

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-20 03:52:29 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
<%
Server.scriptTimeout="10"
connstr="DBQ="+server.mappath("\database\qq.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=Server.CreateObject("ADODB.connection")
conn.open connstr
set rs=server.CreateObject("adodb.recordset")
sql="select top 5 * from biao"
rs.open sql,conn,1,1
adm_qq=rs("qq")
QQ=split(adm_qq,",")
for N=0 to UBound(QQ)
MyQQ=MyQQ+QQ(N)+":"
next
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="lzimages/qq.css" type="text/css">
</head>
<script>
var online= new Array();
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>
<layer id="divStayTopLeft">
<table border="0" width="110" cellspacing="0" cellpadding="0">
<tr><td width="110"><img src=lzimages/QQ_up.jpg width="118" height="69" border=0></td>
</tr>
<script src="http://webpresence.qq.com/getonline?Type=1&<%=Myqq%>"></script>
<% for N=0 to UBound(QQ) %>
<tr><td valign=middle background=lzimages/qq_middle.gif>
<script>
if (online[<%=n%>]==0)
document.write("&nbsp;&nbsp;<img src=lzimages/QQoffline.gif border=0 align=middle><a class='qqb' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=<%=QQ(n)%>&Site=在线咨询&Menu=no' title='客服不在线,请留言'><%=QQ(n)%></a>");
else
document.write("&nbsp;&nbsp;<img src=lzimages/QQonline.gif border=0 align=middle><a class='qqa' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=<%=QQ(n)%>&Site=在线咨询&Menu=no' title='在线即时交谈'><%=QQ(n)%></a>");
[知识问答ωωω.χiuGoo.сom]
</script >
</td></tr>
<%next%>
<tr><td width="110"><img src=lzimages/QQ_down.jpg width="118" height="23" border=0></td>
</tr>
</table>
</layer>
<script type="text/javascript">
var verticalpos="frombottom"
if (!document.layers)
document.write('</div>')
function JSFX_FloatTopDiv()
{
//默认情况显示在屏幕左侧,若要显示在右侧,修改下面的
var startX =885,
startY =320;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</script>
</html>
我想从数据库里读QQ号,这个表中有5个QQ号,请问用个循环怎么把前5条记录读出来,这个循环怎么写,加在代码的哪里?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-20 00:33 , Processed in 0.102030 second(s), 10 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表