db="bchat.mdb"
connStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db)
'假如你的办事器采取较老版本Access驱动,请用上面毗连办法
'connStr="driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath(db)
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open connStr
Set rs=Server.CreateObject("ADODB.RecordSet")
serverIP=Request.ServerVariables("LOCAL_ADDR")
sql="SELECT * FROM room ORDER BY bPort"
rs.Open sql,conn,1,1
If rs.EOF Then
rs.Close
Set rs=Nothing
conn.Close
Set conn=Nothing
Response.Write "数据库中还没有纪录呢!"
Response.End
End If
If Application("Bchat_Status")<>"running" Then
Call StartBchat()
rs.MoveFirst
End If
%>
<html>
<head>
<title>语音聊天室</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
var wwwhost="<%=Request.ServerVariables("SERVER_NAME")%>";
function go(pport){
if(validname(document.form1.elements[0])){
document['form1'].action='http://'+wwwhost+':'+pport+'/';
launchchat();
document['form1'].method='post';
document.form1.submit();
}
}
function validname(str1)
{
var s,i,j;
if (str1.value.length <1) {
alert("请输出您的台甫,名字不克不及为空!");
str1.focus();
return false;
}
return true;
}
var focusok=false;
if (navigator.appName == "Netscape") {
focusok=true;
}
vers = navigator.appVersion;
if (navigator.appName == "Microsoft Internet Explorer") {
pos = vers.lastIndexOf('.');
vers = vers.substring(pos-1,vers.length);
}
proper_version = parseFloat(vers);