<?
require("config.php");
$filename = "talkdata.dbf";
if(!file_exists("useronline.dbf")){fclose(fopen("useronline.dbf","w"));}
if(!file_exists("register.php")){fclose(fopen("register.php","w"));}
if($action == "")login("");
if(eregi(" +|<+|>+| +|+|\"+|\'+|\.+|\:+|=+|-+|\/+|\*+|\?+|\|+|\&+|[\$+]|\(+|\)+|[\\+]",$name)) login("您的名字中含有非法字符(不能有<font size=2> 空格 < > & “ ‘ . = -</font>等)!请检查!");
if(eregi(" +|<+|>+| +|+|\"+|\'+|\.+|\:+|=+|-+|\/+|\*+|\?+|\|+|\&+|[\$+]|\(+|\)+|[\\+]",$pass)) login("您的密码中含有非法字符(不能有<font size=2> 空格 < > & “ ‘ . = -</font>等)!请检查!");
if(strlen($name) > 14) login("您的名字太长,不能大于14个字符!");
if(strlen($pass) > 12) login("您的密码太长,不能大于12个字符!");
if(!$name) login("名字不能为空,也不能大于14个字符!");
if(!$pass) login("密码不能为空,也不能大于12个字符!");
checkkick();
$newuser = 1;
$register=file("register.php");
for($i=0;$i<count($register);$i++){
$tempregister = split("&&",$register[$i],99);
if($name == $tempregister[0]){
$newuser = 0;
if(md5($pass) == $tempregister[1]){
include("user/$name.php");
setmyvalue("ip",$REMOTE_ADDR,"IP");
break;
}else {login("$name,您输入的密码错了!");}
}
}
if($newuser == 1){
$level = 1;
$exp = 10000;
$talkmax =0;
$tometalkmax= 0;
$entertime = 0;
$age = "未知";
$sex = $sex;
$city = "未知";
$job = "未知";
$email = "未知";
$homepage = "未知";
mt_srand(time());
if($sex=="男"){
$photo=mt_rand(1,36);
$goodbye = "从聊天室走了出来,依依不舍地开着宝马车离开了!";
$welcome = "开着宝马飞奔而来!是个帅哥呵,大家欢迎呀!";
}else{
$photo=mt_rand(37,66);
$goodbye = "甩了甩头发,悠悠转身走了出去,聊天室里留下一阵清香久久不散!";
$welcome = "坐着花车款款而来!有一个美媚来了,大家快欢迎呀!";
}
$ip =$REMOTE_ADDR;
$hasmsg = 0;
$main = "000000";
$online = "66CC66";
$send = "66CC66";
$sendsayscolor="0";
$fh=fopen("user/$name.php","w");
fputs($fh,"<?\r\n");
fputs($fh,"\$photo=$photo;\t\t//头像\r\n");
fputs($fh,"\$level=1;\t\t//等级\r\n");
fputs($fh,"\$exp= 10000;\t\t//金钱\r\n");
fputs($fh,"\$talkmax= 0;\t\t//经验\r\n");
fputs($fh,"\$tometalkmax= 0;\t\t//魅力\r\n");
fputs($fh,"\$defend= 1;\t\t//威望\r\n");
fputs($fh,"\$health= 100;\t\t//体力\r\n");
fputs($fh,"\$entertime= 0;\t//进城次数\r\n");
fputs($fh,"\$age= '未知';\t\t//年龄\r\n");
fputs($fh,"\$sex= $sex;\t\t//性别\r\n");
fputs($fh,"\$city= '未知';\t\t//城市\r\n");
fputs($fh,"\$job= '未知';\t\t//职业\r\n");
fputs($fh,"\$email= '未知';\t\t//电子邮件\r\n");
fputs($fh,"\$homepage= '未知';\t\t//主页\r\n");
fputs($fh,"\$ip= '$ip';\t\t//IP\r\n");
fputs($fh,"\$hasmsg= '$hasmsg';\t\t//是否有新留言\r\n");
fputs($fh,"\$welcome= '$welcome';\t\t//欢迎语\r\n");
fputs($fh,"\$goodbye= '$goodbye';\t\t//退出语\r\n");
fputs($fh,"\$main= '000000';\t\t//说话窗口背景色\r\n");
fputs($fh,"\$online= '66CC66';\t\t//在线窗口背景色\r\n");
fputs($fh,"\$send= '66CC66';\t\t//发言窗口背景色\r\n");
fputs($fh,"\$sendsayscolor= '0';\t\t//说话颜色\r\n");
fputs($fh,"\$gift= '';\t\t//礼品\r\n");
for($i=1;$i<=10;$i++){
fputs($fh,"\$notepad_$i= \"欢迎大家注册商业版SumoChat聊天室程序以获得更强的功能及更完善的升级服务。E-mail:ttigerpage@263.net 0778-2251616 莫宗虎 \";\t\t//便签 $i 内容\r\n");
}
fputs($fh,"?>\r\n");
fclose($fh);
$handle = fopen("register.php","a");
fputs($handle,"$name&&".md5($pass)."&&$level&&$pass&&$sex&&\r\n");
fclose($handle);
}
$updatesign = 0;
$useronline = file("useronline.dbf");
for($i=0;$i<count($useronline);$i++){
$usertemp=split("&&",chop($useronline[$i]),99);
if($name == $usertemp[0]){
$updatesign = 1;
break;}
}
$useronlinehandle = fopen("useronline.dbf","a");
if(!$updatesign)fputs($useronlinehandle,"$name&&$level&&".md5($pass)."&&".date("U")."&&$sex&&$photo&&\r\n");
fclose($useronlinehandle);
if($sex=="女")$sexcolor="ff00ff";
$message = "<font color=red>◇聊天室◇<big><b>公告※</b></big>:</font><!--&&open&&open&&--><a href=javascript:top.cs('$name')><img src='images/face/$photo.gif' height=32 width=32 border=0><font color=$sexcolor>$name</font></a> $welcome <font color=gray size=1>".date("m月d日 H:i")."</font><script>parent.add('$name','$photo','$sex');parent.write1();<\/script><br>";
while(file_exists("talkdata.tmp")){usleep(100000);}
fclose(fopen("talkdata.tmp","w"));
$talkmessage = file($filename);
$number = chop($talkmessage[0]);
$talkhandle = fopen($filename,"w");
$number++;
$filehandle = fopen("msg".($number%10).".php","w");
fputs($filehandle,$message);
fclose($filehandle);
fputs($talkhandle,$number);
fclose($talkhandle);
unlink("talkdata.tmp");
$number--;
$entertime++;
setmyvalue("entertime",$entertime,"进入次数");
print("<html><head><title>Sumo聊天室</title>\n");
?>
<script>
var list;
var count;
var ser=0;
var timerID=null;
var timerRunning=false;
var b_or_s="width=16 height=16";
var isdiv=true;
parent.name="sumochat";
function stop(){
if(timerRunning)clearTimeout(timerID);
timerRunning=false;
}
function start(){
stop();
write1();
}
function to_bs(tobs){
b_or_s=tobs;
}
function tocomeon(){
top.flush.location.href="messageflush.php?name=<?echo$name?>&last="+top.sumod.document.inputform.last.value;
}
function b_or_s_font(fsize){
top.sumou.document.body.style.fontSize=fsize;
top.hasme.document.body.style.fontSize=fsize;
}
function filter(todo){
talkto=top.sumod.document.inputform.talkto.value;
if((talkto == "大家" || talkto == "<?echo$name?>") && todo!="seefilter" && todo!="noallfilter")return alert("屏蔽与解屏蔽对象不能为 [大家] 也不能为 [自己]");
if(todo=="filter"){
if(top.sumod.document.inputform.filtername.value.indexOf("|"+talkto+"|") >= 0)return alert("您已经屏蔽了此人 "+talkto);
top.sumod.document.inputform.filtername.value=top.sumod.document.inputform.filtername.value+"|"+talkto+"|";
alert("你屏蔽人员的列表中有:\n\n "+top.sumod.document.inputform.filtername.value);
}else if(todo=="nofilter"){
if(top.sumod.document.inputform.filtername.value.indexOf("|"+talkto+"|") == -1)return alert("您屏蔽的人没有此人 "+talkto);
top.sumod.document.inputform.filtername.value=top.sumod.document.inputform.filtername.value.replace("|"+talkto+"|","");
alert("你屏蔽人员的列表中有:\n\n "+top.sumod.document.inputform.filtername.value);
}else if(todo=="noallfilter"){
top.sumod.document.inputform.filtername.value="";
alert("解除所有成功");
}else if(todo=="seefilter"){
alert("你屏蔽人员的列表中有:\n\n "+top.sumod.document.inputform.filtername.value);
}
}
function divscreen(){
if(isdiv==false){
top.sumof.guan();
parent.fs.rows="23,*,150";
parent.fs.frameSpacing=1;
this.sumod.document.inputform.isdiv.value="on";
isdiv=true;
}else{
top.sumof.guan();
parent.fs.rows="23,*,0";
parent.fs.frameSpacing=0;
this.sumod.document.inputform.isdiv.value="off";
isdiv=false;
}
this.sumod.document.inputform.msg.focus();
}
function write1(){
if(top.sumor.document==null)return;
top.sumor.document.open();
top.sumor.document.writeln("<html><head>");
top.sumor.document.writeln("<style type=text/css>");
top.sumor.document.writeln("<!--");
top.sumor.document.writeln(".p9 { font-size: 9pt}");
top.sumor.document.writeln("body { font-size: 9pt}");
top.sumor.document.writeln("a:visited {color: #0000FF; text-decoration: none}");
top.sumor.document.writeln("a:link { color: #0000FF; text-decoration: none}");
top.sumor.document.writeln("a:hover { color: #FF0000}");
top.sumor.document.writeln("-->");
top.sumor.document.writeln("</style>");
top.sumor.document.writeln("<script>");
top.sumor.document.writeln("function click\(\)\{");
top.sumor.document.writeln("return false;}");
top.sumor.document.writeln("document.oncontextmenu=click;");
top.sumor.document.writeln("<\/script>");
top.sumor.document.writeln("</head><body <? if($online !="66CC66")print("bgcolor=$online")
没有合适的资源?快使用搜索试试~ 我知道了~
强大的文本型数据库PHP聊天室
共264个文件
gif:158个
jpg:49个
php:45个
4星 · 超过85%的资源 需积分: 50 220 下载量 148 浏览量
2001-07-03
00:00:00
上传
评论 1
收藏 347B RAR 举报
温馨提示
1、密码使用DES算法加密,无法逆向破解,使聊天更安全。 2、自动跟踪私聊状态,自动切换和对象是否私聊。 3、自定义头像功能。 4、滚屏方式。使用PHP中先进的流技术,使得显示流畅,达到实时聊天的效果。 5、方便实用的便签。(可随时让您记下聊友的信息等,以后随时可以查看) 6、内置简洁的论坛,方便大家交流。 7、功能强大的个性设置(进入欢迎语,各个窗口的背景与说话颜色)。不用每次进入时设置。 8、可购买和互相赠送礼品与送金钱。 9、多种个人属性设置(经验、魅力、体力、威望、等级、金钱等)设置合理。 10、公式:经验>1000=魅力+30、魅力>1000=体力+30、体力>1000=威望+30、威望>1000=等级+1 每发言一句,经验+1,在聊天室里体力-1 别人向你发言一句,魅力+1 定时开帮会,人气最高三人刚分别:威望+30,金钱+30000、威望+20,金钱+20000、威望+10,金钱+10000 (注:此功能还没有与网友们一起拟定) 在聊天室里每半分钟,金钱+1、在聊天室里体力恢复2点 11、可自定义动作(以 // 开头, 可替换成对方,如输入://知道不是很笨的了。不能连续使用,如: %,且替换次数有限;也可以在现有的动作后面加上一个以上空格后再接上您的话)。 12、飞鸽传书功能,直接与对方联系(但只能用一般格式,不能有动作表情命令等)。 13、可分屏显示,聊天更轻松。 14、自动防断线,也可手工断线重连(使用[辅助功能]),断线后不用退出聊天室。 15、大众聊天室功能(密谈,屏蔽,表情,动作,贴图,且表情与动作分为非善意与善意)。 16、使用文本数据库,穷人有福了。
资源推荐
资源详情
资源评论
收起资源包目录
强大的文本型数据库PHP聊天室 (264个子文件)
emote.dbf 14KB
gift.dbf 2KB
talkdata.dbf 4B
kickuser.dbf 0B
stopuser.dbf 0B
kickbook.dbf 0B
importment.dbf 0B
stopbook.dbf 0B
useronline.dbf 0B
buygril.gif 7KB
21.gif 4KB
bgoutspace.gif 3KB
mainbg.gif 3KB
chat_r1_c1.gif 1KB
dizhen.gif 1KB
4.gif 1KB
75.gif 1KB
48.gif 1KB
76.gif 1KB
74.gif 1KB
73.gif 1KB
52.gif 849B
29.gif 816B
1.gif 810B
59.gif 759B
55.gif 757B
56.gif 736B
30.gif 736B
5.gif 734B
21.gif 714B
26.gif 695B
41.gif 675B
53.gif 668B
101.gif 659B
98.gif 640B
7.gif 637B
95.gif 624B
94.gif 606B
51.gif 605B
99.gif 605B
3.gif 601B
33.gif 596B
97.gif 583B
60.gif 583B
50.gif 567B
49.gif 564B
93.gif 562B
96.gif 557B
chat_r3_c1.gif 553B
35.gif 540B
46.gif 540B
18.gif 534B
66.gif 533B
44.gif 532B
8.gif 530B
38.gif 522B
61.gif 518B
45.gif 517B
15.gif 504B
25.gif 504B
37.gif 502B
12.gif 502B
100.gif 499B
78.gif 499B
2.gif 494B
90.gif 493B
chat_r7_c1.gif 490B
43.gif 489B
34.gif 487B
24.gif 486B
13.gif 485B
57.gif 484B
32.gif 482B
10.gif 480B
28.gif 479B
58.gif 477B
54.gif 477B
17.gif 476B
31.gif 475B
22.gif 472B
63.gif 468B
6.gif 466B
92.gif 461B
23.gif 458B
39.gif 456B
36.gif 454B
10.gif 454B
72.gif 451B
88.gif 446B
40.gif 444B
67.gif 443B
62.gif 443B
11.gif 436B
14.gif 434B
19.gif 426B
64.gif 426B
42.gif 421B
20.gif 420B
16.gif 417B
9.gif 415B
共 264 条
- 1
- 2
- 3
普通网友
- 粉丝: 882
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页