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

📄 room.asp

📁 聊天室
💻 ASP
字号:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #000000;
	font-weight: bold;
}
-->
</style>
</HEAD>
<BODY>

<span class="style1">当前的聊天信息如下:&nbsp;</span><b><i><font size="4" face="隶书" color="#FF0000"><br>
</font></i></b>

<%
	dim mysql,howmanyrooms,howmanyuesrs
	
	set myrecord=server.CreateObject ("ADODB.Recordset")
	mysql="select * from RoomInfo"
	myrecord.Open mysql,"DSN=ChatRoom",1,3
	
	
	'并不是所有的数据库都支持recordcount属性的
	'但access是支持的,但是我们必须把游标移动到最后,才能得到准确的记录数据
	
%>

<div align="center">
  <center>
  <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#5A8BCE">
    <tr bgcolor="#E6F7FF">
      <td width="15%" align="center">房间号</td>
      <td width="25%" align="center">房间名</td>
      <td width="25%" align="center">话题</td>
      <td width="20%" align="center">当前人数</td>
      <td width="15%" align="center">是否上锁</td>
    </tr>
<%
	do while not myrecord.EOF 
	howmanyusers=howmanyusers+int(myrecord("HowManyUsers"))
%>

	<tr bgcolor="#FFFFFF">
      <td width="15%" align="center"><b><font>
      <% =myrecord("RoomID") %></font></b></td>
      <td width="25%" align="center"><b><font>
      <% =myrecord("RoomName") %></font></b></td>
      <td width="25%" align="center"><b><font>
      <% =myrecord("Topic") %></font></b></td>
      <td width="20%" align="center"><b><font>
      <% =myrecord("HowManyUsers") %></font></b></td>
      <td width="15%" align="center"><b><font>
      <% =myrecord("IfLocked") %></font></b></td>
	</tr>


  
  


<%
	myrecord.MoveNext 
	loop
	
	howmanyrooms=myrecord.RecordCount 

%>
</table>
<P align="center"><font color="#000000">当前共有聊天成员:
  <% =howmanyusers %>
  人<br>
当前共有聊天房间:
<% =howmanyrooms %>
间</font></P>


<p align="center"><a href="default.asp">返回</a></p>


</BODY>
</HTML>

⌨️ 快捷键说明

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