当前位置:数据库 > SQLServer >>

聊天室php&mysql(一)

//第一个页面  name="index1.php(做为现在的主流开发语言)"


<?

include "../signup/MySQL(和PHP搭配之最佳组合).php(做为现在的主流开发语言)";
$time1=time();
//$userid=983530409;
echo $n;


if($n==1){
$userid=time();
$nick="g".$userid;
$last_time=$userid;
$sql="insert into chat_user (userid,id,last_time) values ($userid,$nick,$last_time)";
MySQL(和PHP搭配之最佳组合)_query($sql)or die(MySQL(和PHP搭配之最佳组合)_error());

$sql="insert into chat_user_list (userid,id,last_time) values ($userid,$nick,$last_time)";
MySQL(和PHP搭配之最佳组合)_query($sql)or die(MySQL(和PHP搭配之最佳组合)_error());


echo"<FONT SIZE=6 COLOR=#FF0066><B>LOADING ........</B></FONT>";
echo "<script language=JavaScript> window.open(index1.php(做为现在的主流开发语言)?userid=".$userid.",chat,易做图=no,directories=no,menubar=no,width=800,height=570,left=0,top=0,status=0);";

echo" window.close() </script>";

}

if($n==983530409)
{

$sql="select userid,易做图,passwd from user where id=$n";
$result=MySQL(和PHP搭配之最佳组合)_query($sql);
$row=MySQL(和PHP搭配之最佳组合)_fetch_array($result);
$nick=$row["userid"];
$passwd=$row["passwd"];
$易做图=$row["易做图"];

$sql="insert into chat_user (userid,passwd,易做图,last_time,id)values($n,$passwd,$易做图,$time1,$nick)";
MySQL(和PHP搭配之最佳组合)_query($sql)or die(MySQL(和PHP搭配之最佳组合)_error());




echo"<FONT SIZE=6 COLOR=#FF0066><B>LOADING ........</B></FONT>";
echo "<script language=JavaScript> window.open(index1.php(做为现在的主流开发语言)?userid=".$n.",chat,易做图=no,directories=no,menubar=no,width=800,height=570,left=0,top=0,status=0);";

echo" window.close(); </script>";
}


?>
<html>
<head>
<title>::: FEIT聊天室 :::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<frameset cols="*,132" frameborder="NO" border="0" framespacing="0" rows="*">  
  <frameset rows="*,111" frameborder="NO" border="0" framespacing="0" cols="*">  
    <frame name="top" src="index.php(做为现在的主流开发语言)?userid=<? echo $userid?>" scrolling="AUTO">
    <frame name="bottom" scrolling="NO" noresize src="frame3.php(做为现在的主流开发语言)?userid=<? echo $userid ?>">
  </frameset>
  <frameset rows="*,110" frameborder="NO" border="0" framespacing="0">  
    <frame name="right" scrolling="AUTO" noresize src="frame2.php(做为现在的主流开发语言)?userid=<? echo $userid?>">
    <frame name="bottomFrame" scrolling="NO" noresize src="frame4.php(做为现在的主流开发语言)">
  </frameset>
</frameset>
<noframes>  
<body bgcolor="#FFFFFF" text="#000000">
<p>很抱歉!这是一个分帧页面,但由于你的浏览器不支持,所以不能浏览! </p>
补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,