聊天室phpamp;amp;amp;mysql(二)

//此页面为php3.php ? include signup/mysql.inc; switch($part){ case 1
:$table=bbs_php;break; case 2 :$table=bbs_mysql;break; case 3
:$table=bbs_html;break; case 4 :$table=bbs_js; } //echo $part; ? html
head titlexiaoyang/title meta content=text/html; charset=gb2312 script
language=JavaScript1.2 src=js/menu_comment.js/script script
language=JavaScript1.2 src=js/fw_menu.js/script 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 body bgcolor=#FFFFFF
text=#000000 div id=Layer1 style=position:absolute; left:31px; top:1px;
width:560px; height:46px; z-index:10 script
language=JavaScript1.2fwLoadMenus();/script/div div id=Layer2
style=position:absolute; left:27px; top:41px; width:600px; height:15px;
z-index:2 hr color=#ff9999 /div div id=Layer3 style=position:absolute;
left:73px; top:10px; width:2px; height:330px; z-index:3;
background-color: #ff9999; layer-background-color: #ff9999; border:
1px none #000000/div div id=Layer4 style=position:absolute; left:560px;
top:10px; width:2px; height:330px; z-index:4; background-color:
#ff9999; layer-background-color: #ff9999; border: 1px none
#000000/div div id=Layer5 style=position:absolute; left:86px; top:58px;
width:464px; height:273px; z-index:5table width=100% border=0
cellspacing=1 cellpadding=0 height=20 trtd width=10%div align=centerfont
color=#CC33CC size=2人气/font/div /td td width=38%div align=centerfont
color=#CC33CC size=2文章题目/font/div /td td width=26%div
align=centerfont size=2 color=#CC33CC作者/font/div /td td width=26%div
align=centerfont color=#CC33CC size=2日期/font/div /td /tr ?$sql=select
* from .$table. order by row DESC; $result=mysql_query($sql)or
die(mysql_error()); $row1=mysql_num_rows($result);
$row_max_page=12;//分页计算 $page=ceil($row1/$row_max_page);
$left_row=$row1-$p*$row_max_page; $pre_left_row=$left_澳门新浦京8455com ,row+12;
$start_row=$left_row+$row_max_page+1; if($left_row=0) {
$start_row=$pre_left_row+1; $left_row=0; } $sql=select * from
.$table. where row’$start_row’ and row’$left_row’ order by row DESC;
$result=mysql_query($sql)or die(mysql_error());
while($row=mysql_fetch_array($result)){ static $i=0; $i++; if($i%2)
$color=CCCCFF; else $color=FFCCFF; echo tr;echo td width=10%
bgcolor=#.$color. ; echo div font size=2
color=#3333FF.$row[number]./font/div; echo /td; echo td width=38%
bgcolor=#.$color. ; echo div font size=2
color=#3333FFahref=’look.php?id=.$row[id].&&table=.$table.’.$row[title]./a/font/div;
echo /td; echo td width=26% bgcolor=#.$color. ; echo div font size=2
color=#3333FF.$row[userid]./font/div; echo /td; echo td width=26%
bgcolor=#.$color. ; echo div font size=2
color=#3333FF.$row[date1]./font/div; echo /td/tr; } echo/table;echo
BRdiv tabletrtdFONT SIZE=2 ; for($i=1;$i=$page;$i++) { echo a
href=’.$PHP_SELF.?p=.$i.&&table=.$table.'[.$i.]/a; } ? /FONT/td/tr
/table/div /div div id=Layer6 style=position:absolute; left:409px;
top:29px; width:118px; height:17px; z-index:6/div div id=Layer7
style=position:absolute; left:451px; top:28px; width:65px; height:12px;
z-index:8a href=say.php?table=?echo $table ;? target=_self
onMouseOver=window.status=”;return truefont size=2
color=#FF33FF我要发言/font/a/div p/p p/p /body /html

第三个页面 name=frame3.php ? include ../signup/mysql.php; //echo
$userid; //echo $private; if($p)$p=1; else $p=0;
if(($action=ok)and($p)){ $sql=select userid,id from chat_user_list
where userid=’$userid’; $result=mysql_query($sql);
$roww=mysql_fetch_array($result); $userrr=$roww[id]; $sql=select
userid,id from chat_user_list where id=’$object’;
$result=mysql_query($sql); if($row1=mysql_fetch_array($result))
$object=$row1[userid]; else { $object=大家; $k=1;}$select=select row
from user_message order by row DESC; $result=mysql_query($select)or
die( false fgfg); $rowlist=mysql_fetch_array($result)or die(false
fgs); $max_row=$rowlist[row]; $row=$max_row+1; $time1=date(G:i);
$sql=INSERT INTO user_message
(userid,object,message,status,action1,color,row,time1)
values(‘$userid’,’$object’,’$message’,’$private’,’$action1′,’$color’,’$row’,’$time1′);
mysql_query($sql)or die(mysql_error()); if($k){$object=大家;
$private=0;} else $object=$row1[id]; } ? html head titleinput
table/title meta content=text/html; charset=gb2312 SCRIPT
LANGUAGE=JavaScript !– function user(user){
document.form1.object.value=user; } function changnick(){
window.open(changnick.php?userid=?echo $userid
;?,changnick,toolbar=no,directories=no,menubar=no,width=800,height=570,width=340,height=220,status=0);
} //– /SCRIPT /head body bgcolor=#6699FF text=#000000 div id=Layer1
style=position:absolute; left:125px; top:4px; width:498px; height:79px;
z-index:1form name=form1 method=post align=center action=? echo
$PHP_SELF; ??action=ok p font color=#6699ff./fontinput type=text
name=object size=10 value=?echo $object? input type=hidden name=userid
value=?echo $userid ? 说input type=hidden name=p value=1 input type=text
name=message size=30 input type=submit name=ok value=发送 /p p font
color=#6699FF./fontselect name=action1 option selected
value=说说话/option option value=悄悄地悄悄/option option
value=兴高采烈地高兴 /option option value=微微笑着微笑 /option option
value=哈!哈!哈!地笑着大笑叁声 /option option value=笑嘻嘻嘻笑 /option
option value=奸笑着奸笑 /option option value=毛手毛脚地毛手毛脚 /option
option value=嘟着嘴嘟嘴 /option option value=快要哭着快要哭 /option
option value=拳打脚踢地拳打脚踢 /option option value=不怀好意地不怀好意
/option option value=遗憾地遗憾 /option option
value=瞪大了眼睛,很讶异地讶异 /option option value=幸福地幸福 /option
option value=翻箱倒柜地翻箱倒柜 /option option value=悲伤地悲伤 /option
option value=淫淫笑着淫淫笑 /option option value=流着口水流口水 /option
option value=正气凛然地正气凛然 /option option value=生气地生气 /option
option value=大声地大声 /option option value=傻乎乎地傻乎乎 /option
option value=一付很满足的样子很满足 /option option
value=手足无措地手足无措 /option option value=很无辜地无辜 /option
option value=喃喃自语地喃喃自语 /option option value=恶狠狠地瞪着眼瞪眼
/option option value=快要吐地想吐 /option option
value=感到不舒服地不舒服 /option option value=无精打采地无精打采 /option
option value=依依不舍地依依不舍 /option option value=吐着白沫地白沫
/option option value=掩饰不住狂喜的心情狂喜 /option option
value=笑呵呵一拱手拱手 /option option value=很有礼貌地作了一揖作揖
/option option value=咳!慨叹万千慨叹 /option option value=深深地鞠躬致歉
/option option value=望着窗外细雨淅淅,不由得双眼朦胧地伤感 /option
option value=含泪要哭含泪 /option option value=想到伤心处,泪流如注大哭
/option option value=抱头放声大哭痛哭 /option option
value=好怕怕呀…害怕 /option option value=感到很是奇特奇特 /option
option value=眯着小眼睛道眯眼 /option option
value=咯咯一笑,很大方的大方 /option option value=脸上泛起了红晕,脸红
/option option value=气愤地嚷道生气 /option option value=提高嗓门大声
/option option value=运足气一声断喝断喝 /option option
value=一脸的迷茫迷茫 /option option value=无奈地耸耸肩耸肩 /option
option value=使劲敲敲自己脑门拍脑 /option option
value=看着别人谈笑,无聊的很无聊 /option option value=顾作沉思状沉思
/option option value=一付无辜的样子无辜 /option option
value=不舒服地不适 /option /select 颜色? $blue=蓝;
$black=黑;$red=红;$yellow=黄;$zi=紫;$green=绿;$qing=青;
if($color==#0000FF)$color1=$blue; if($color==#000000)$color1=$black;
if($color==#FF0000)$color1=$red; if($color==#FFFF00)$color1=$yellow;
if($color==#800080)$color1=$zi; if($color==#008000)$color1=$green;
if($color==#00CC00)$color1=$qing; ? select name=color option selected
value=?echo $color ;? ?echo $color1; ?/option option
value=#0000FF蓝/option option value=#000000黑/option option
value=#FF0000红/option option value=#FFFF00黄/option option
value=#800080紫/option option value=#008000绿/option option
value=#00CC00青/option /select 私聊input type=checkbox name=private
value=1 ? if ($private)echo checked ; ? /p /form /div div id=Layer2
style=position:absolute; left:34px; top:6px; width:85px; height:24px;
z-index:2?echo $userrr ;? /div div id=Layer3 style=position:absolute;
left:68px; top:47px; width:79px; height:25px; z-index:3动作表情/div div
id=Layer4 style=position:absolute; left:412px; top:49px; width:73px;
height:24px; z-index:4a href=javascript:changnick()改名/a/div div
id=Layer5 style=position:absolute; left:508px; top:48px; width:80px;
height:26px; z-index:5a
href=javascript:parent.window.close()离开聊天室/a/div div id=Layer6
style=position:absolute; left:116px; top:6px; width:32px; height:20px;
z-index:6对/div div id=Layer7 style=position:absolute; left:108px;
top:82px; width:427px; height:19px; z-index:7div align=centerfont
color=#FF00002001 @版权所有 a
href=mailto:xiaoyanglg@263.netFEIT男孩工作室/a/font/div /div /div /body
/html

//第二页面 name=frame2.php ? include ../signup/mysql.php;
header(Expires: Sun, 28 Dec 1997 09:32:45 GMT); header(Cache-Control:
no-cache, must-revalidate); header(Pragma: no-cache);
header(Content-Type: text/html; charset=${Charset});
$current_time=time(); $delete_time=$current_time-40; $sql=delete from
chat_user where last_time.$delete_time; mysql_query($sql)or die(
false again); $sql=update chat_user set last_time=’$current_time’
where userid=’$userid’; mysql_query($sql) or die(false); $sql=select
userid from chat_user; $result=mysql_query($sql)or die(fallse);
$online=mysql_num_rows($result); ? html head titleuser list/title meta
content=text/html; charset=gb2312 meta content=30; url=? echo
$PHP_SELF; ??userid=?echo $userid? /head body bgcolor=#6699FF
text=#000000 div id=Layer1 style=position:absolute; left:9px; top:37px;
width:94px; height:21px; z-index:1div align=centerfont
color=#FF9999b在线人数/b/font/div /div div id=Layer2
style=position:absolute; left:14px; top:96px; width:105px; height:276px;
z-index:2pifont size=2 color=#FF9999 ?$sql=select userid,id,sex from
chat_user; $result=mysql_query($sql)or die(fallse);
while($row=mysql_fetch_array($result)){ $user=$row[‘userid’];
$user=a href=’.$PHP_SELF.?userid=.$userid.’
onCLick=parent.bottom.user(‘.$row[id].’).$row[id]; echo
$user./a(.$row[sex].)br; } ? /font/i/p p/p /div div id=Layer3
style=position:absolute; left:20px; top:62px; width:74px; height:11px;
z-index:3div align=centerfont size=2 color=#FF9999(?echo $online
;?人)/font/div /div p/p p/p /body /html

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图