;
$sql="insert chat (username,objectname,action,msg,color) values ("$username","$objectname","NO","$fayan","$yanse")";
mysql_query($sql,$conid);
mysql_close($conid);
}
?>
<!--获取发言信息getmsg.php-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<?PHP
$conid=mysql_pconnect("localhost","yourcount","password");
mysql_select_db("database",$conid);
if(!isset($username))
$username="getmsg";
$dt=time();
$newdate=date("YmdHis",$dt);
$fromdate=date("YmdHis",$dt-6);;
$sql="select username as name,msg,action,objectname ,shijian,color from chat where shijian>="$fromdate"";
$res=mysql_query($sql,$conid);
echo "<meta http-equiv="Refresh" content="6,url=getmsg.php?username=$username" >n";
echo "</head>n";
echo "<script language="JavaScript">n";
echo "<!--n";
echo "var win=parent.frames[0]n";
echo "var doc=win.documentn";
echo "var divlin=doc.body.all("lin")n";
while(list($name,$msg,$action,$objectname,$shijian,$color)=mysql_fetch_row($res))
{
if($objectname!="大家"||$objectname) $object="对 <a href=JavaScript:selectusername('$objectname')>$objectname</a> ";
echo "divlin.innerHTML=divlin.innerHTML+"<font color=$color size=3><a href=JavaScript:selectusername('$name')>$name</a> $object 说: $msg </font><br>"n";
}
echo "win.scrollBy(6000,6000)n";
echo "-->n";
echo "</script>n";
?>
<body bgcolor="#333333">
</body>
</html>
<!--欢迎词getmsg1.php -->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<?PHP
if(!isset($username))
$username="guest";
echo "<meta http-equiv="Refresh" content="6;url=getmsg.php?username=$username" >n";
echo "</head>n";
echo "<script language="JavaScript">n";
echo "<!--hiden";
echo "var win=parent.frames[0]n";
echo "var doc=win.documentn";
echo "var divlin=doc.body.all("lin")n";
echo "divlin.innerHTML= "<font color=blue><b>欢迎 $username 的光临</b></font><br>"n";
echo "-->n";
echo "</script>n";
?>
<body bgcolor="#333333">
</body>
</html>
<!--显示发言list.html-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.lin { font-size: 10pt; color: #FF6633}
-->
</style>
</head>
<body bgcolor="#FFFFFF" >
<center>
<div color=blue>
<font color=white size=6><b>
欢迎光临</b>
</marquee>
</div>
</center>
<div id=lin class="lin"></div>
</body>
<Script language="JavaScript">
<!--
function selectusername(str)
{
var win=parent.frames[3]
var doc=win.document
var form1=doc.body.all("fayanform")
form1.objectname.value=str
}
-->
</script>
</html>
<!--罗列在线人数-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Refresh" content="60">
<style type="text/css">
<!--
.lin { font-size: 10pt; color: #ff0066}
-->
</style>
</head>
<body bgcolor="#33ff00" >
<center class="lin"><b>
在线人数 </b>
<hr>
<?PHP
if(!isset($username))
$username="guest";
$dt=time();
$newdate=date("YmdHis",$dt);
$fromdate=date("YmdHis",$dt-200);
$linkid=mysql_connect("localhost","yourcount","password");
mysql_select_db("yourdatabase",$linkid);
$sql="update chat_getmsg set shijian="$newdate" where username="$username"";
mysql_query($sql,$linkid);
$sql="select username from chat_getmsg where shijian>="$fromdate"";
$res=mysql_query($sql,$linkid);
while(list($username)=mysql_fetch_row($res)){
echo "<a href="JavaScript:selectusername('$username')">$username</a><br>n";
$fromdate=date("YmdHis",$dt-100);
$sql="delete from chat where shijian<="$fromdate"";
mysql_query($sql,$linkid);
mysql_close($linkid);
}
?>
</center>
<Script language="JavaScript">
<!--
function selectusername(str)
{
var win=parent.frames[3]
var doc=win.document
var form1=doc.body.all("fayanform")
form1.objectname.value=str
}
-->
</script>
</body>
</html>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
$sql="insert chat (username,objectname,action,msg,color) values ("$username","$objectname","NO","$fayan","$yanse")";
mysql_query($sql,$conid);
mysql_close($conid);
}
?>
<!--获取发言信息getmsg.php-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<?PHP
$conid=mysql_pconnect("localhost","yourcount","password");
mysql_select_db("database",$conid);
if(!isset($username))
$username="getmsg";
$dt=time();
$newdate=date("YmdHis",$dt);
$fromdate=date("YmdHis",$dt-6);;
$sql="select username as name,msg,action,objectname ,shijian,color from chat where shijian>="$fromdate"";
$res=mysql_query($sql,$conid);
echo "<meta http-equiv="Refresh" content="6,url=getmsg.php?username=$username" >n";
echo "</head>n";
echo "<script language="JavaScript">n";
echo "<!--n";
echo "var win=parent.frames[0]n";
echo "var doc=win.documentn";
echo "var divlin=doc.body.all("lin")n";
while(list($name,$msg,$action,$objectname,$shijian,$color)=mysql_fetch_row($res))
{
if($objectname!="大家"||$objectname) $object="对 <a href=JavaScript:selectusername('$objectname')>$objectname</a> ";
echo "divlin.innerHTML=divlin.innerHTML+"<font color=$color size=3><a href=JavaScript:selectusername('$name')>$name</a> $object 说: $msg </font><br>"n";
}
echo "win.scrollBy(6000,6000)n";
echo "-->n";
echo "</script>n";
?>
<body bgcolor="#333333">
</body>
</html>
<!--欢迎词getmsg1.php -->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<?PHP
if(!isset($username))
$username="guest";
echo "<meta http-equiv="Refresh" content="6;url=getmsg.php?username=$username" >n";
echo "</head>n";
echo "<script language="JavaScript">n";
echo "<!--hiden";
echo "var win=parent.frames[0]n";
echo "var doc=win.documentn";
echo "var divlin=doc.body.all("lin")n";
echo "divlin.innerHTML= "<font color=blue><b>欢迎 $username 的光临</b></font><br>"n";
echo "-->n";
echo "</script>n";
?>
<body bgcolor="#333333">
</body>
</html>
<!--显示发言list.html-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.lin { font-size: 10pt; color: #FF6633}
-->
</style>
</head>
<body bgcolor="#FFFFFF" >
<center>
<div color=blue>
<font color=white size=6><b>
欢迎光临</b>
</marquee>
</div>
</center>
<div id=lin class="lin"></div>
</body>
<Script language="JavaScript">
<!--
function selectusername(str)
{
var win=parent.frames[3]
var doc=win.document
var form1=doc.body.all("fayanform")
form1.objectname.value=str
}
-->
</script>
</html>
<!--罗列在线人数-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Refresh" content="60">
<style type="text/css">
<!--
.lin { font-size: 10pt; color: #ff0066}
-->
</style>
</head>
<body bgcolor="#33ff00" >
<center class="lin"><b>
在线人数 </b>
<hr>
<?PHP
if(!isset($username))
$username="guest";
$dt=time();
$newdate=date("YmdHis",$dt);
$fromdate=date("YmdHis",$dt-200);
$linkid=mysql_connect("localhost","yourcount","password");
mysql_select_db("yourdatabase",$linkid);
$sql="update chat_getmsg set shijian="$newdate" where username="$username"";
mysql_query($sql,$linkid);
$sql="select username from chat_getmsg where shijian>="$fromdate"";
$res=mysql_query($sql,$linkid);
while(list($username)=mysql_fetch_row($res)){
echo "<a href="JavaScript:selectusername('$username')">$username</a><br>n";
$fromdate=date("YmdHis",$dt-100);
$sql="delete from chat where shijian<="$fromdate"";
mysql_query($sql,$linkid);
mysql_close($linkid);
}
?>
</center>
<Script language="JavaScript">
<!--
function selectusername(str)
{
var win=parent.frames[3]
var doc=win.document
var form1=doc.body.all("fayanform")
form1.objectname.value=str
}
-->
</script>
</body>
</html>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】