📄 init.php
字号:
<script language="javascript">
var autoScrollOn=1;
var scrollOnFunction;
var scrollOffFunction;
function scrollWindow()
{
if(autoScrollOn==1)
{
parent.output.scroll(0,65000);
parent.hasme.scroll(0,65000);
setTimeout('scrollWindow()',200);
}
}
function scrollOn()
{
autoScrollOn=1;
scrollWindow();
}
function scrollOff()
{
autoScrollOn=0;
}
function StartUp()
{
parent.output.onblur=scrollOnFunction;
parent.hasme.onblur=scrollOnFunction;
parent.output.onfocus=scrollOffFunction;
parent.hasme.onfocus=scrollOffFunction;
scrollWindow();
}
scrollOnFunction=new Function('scrollOn()');
scrollOffFunction=new Function('scrollOff()');
StartUp();
function init_output()
{
parent.output.document.writeln("<font color=blue>系统环境检查通过! ... </font><br>");
parent.output.document.writeln("<font color=blue>程序初始化成功! ...</font><br>");
parent.output.document.writeln("<font color=blue>欢迎进入聊天室!</font><br>");
parent.output.document.writeln("<script>parent.flush.document.location.href='index.php?action=flush';<\/script>");
parent.output.document.writeln("<!-- -- -- -- -- -- -- -- ------ -- -- -- -- -- -- !-->");
parent.output.document.writeln("<!-- -- -- -- -- -- message - start -- -- -- -- -- !-->");
parent.output.document.writeln("<!-- -- -- -- -- -- -- -- ------ -- -- -- -- -- -- !-->");
}
function init_hasme()
{
parent.hasme.document.writeln("<link rel=\"stylesheet\" href=\"index.files/chat.css\" type=\"text/css\">");
parent.hasme.document.writeln("<!-- -- -- -- -- -- -- -- ------ -- -- -- -- -- -- !-->");
parent.hasme.document.writeln("<!-- -- -- -- -- -- message - start -- -- -- -- -- !-->");
parent.hasme.document.writeln("<!-- -- -- -- -- -- -- -- ------ -- -- -- -- -- -- !-->");
}
init_output();
init_hasme();
function b_or_s_font(fsize)
{
parent.output.document.body.style.fontSize=fsize;
parent.hasme.document.body.style.fontSize=fsize;
if(parent.document.input.ms.value=="s") parent.document.input.message.focus();
else parent.document.input.message2.focus();
}
function filter(todo)
{
talkto=parent.document.obj.obj_name.value;
if((talkto == "<?echo$username?>" || talkto == "") && todo!="seefilter" && todo!="noallfilter")
return alert("屏蔽与解屏蔽对象不能为 空 或 [自己]");
if(todo=="filter" && talkto!="")
{
if(parent.document.input.filtername.value.indexOf("|"+talkto+"|") >= 0)
return alert("您已经屏蔽了此人 "+talkto);
parent.document.input.filtername.value=parent.document.input.filtername.value+"|"+talkto+"|";
alert("你屏蔽人员的列表中有:\n\n "+parent.document.input.filtername.value);
}
else if(todo=="nofilter" && talkto!="")
{
if(parent.document.input.filtername.value.indexOf("|"+talkto+"|") == -1)
return alert("您屏蔽的人没有此人 "+talkto);
parent.document.input.filtername.value=parent.document.input.filtername.value.replace("|"+talkto+"|","");
alert("你屏蔽人员的列表中有:\n\n "+parent.document.input.filtername.value);
}
else if(todo=="noallfilter")
{
parent.document.input.filtername.value="";
parent.document.input.priname.value="";
alert("解除所有成功");
}
else if(todo=="seefilter")
{
alert("你屏蔽人员的列表中有:\n\n "+parent.document.input.filtername.value);
}
if(parent.document.input.ms.value=="s") parent.document.input.message.focus();
else parent.document.input.message2.focus();
}
function addpri(todo)
{
talkto=parent.document.obj.obj_name.value;
if((talkto == "<?echo$username?>" || talkto == "") && todo!="seepri")
return alert("对象不能为 空 或 [自己] ");
if(todo=="addpri" && talkto!="")
{
if(parent.document.input.priname.value.indexOf("|"+talkto+"|") >= 0)
return alert("您已经加入了此人 "+talkto);
parent.document.input.priname.value=parent.document.input.priname.value+"|"+talkto+"|";
alert("你的密谈列表中有:\n\n "+parent.document.input.priname.value);
}
else if(todo=="nopri" && talkto!="")
{
if(parent.document.input.priname.value.indexOf("|"+talkto+"|") == -1)
return alert("您的密谈列表中没有此人 "+talkto);
parent.document.input.priname.value=parent.document.input.priname.value.replace("|"+talkto+"|","");
alert("你的密谈列表中有:\n\n "+parent.document.input.priname.value);
}
else if(todo=="seepri")
{
alert("你已加入密谈对象有:\n\n "+parent.document.input.priname.value);
}
if(parent.document.input.ms.value=="s") parent.document.input.message.focus();
else parent.document.input.message2.focus();
}
function reflush()
{
parent.flush.location.href="index.php?action=flush&last="+parent.document.input.last.value;
}
function cs(name)
{
if(name==parent.document.input.user.value)
return ;
parent.document.input.obj.value=name;
parent.document.obj.obj_name.value=name;
if(parent.document.input.ms.value=="s") parent.document.input.message.focus();
else parent.document.input.message2.focus();
}
function msgsubmit()
{
parent.document.images.emots.src="emot/0.gif";
parent.document.input.message.value="";
parent.document.input.message2.value="";
parent.document.input.emot.value="emot/0.gif";
parent.document.input.act.selectedIndex="default";
parent.document.input.obj.value="";
parent.document.obj.obj_name.value="";
if(parent.document.input.ms.value=="s") parent.document.input.message.focus();
else parent.document.input.message2.focus();
parent.document.input.timer.value="5";
parent.set_timer();
}
function display_my_message(message,pri)
{
if(pri=="" || pri=="open")
parent.output.document.writeln(message);
if(pri=="private")
parent.hasme.document.writeln(message);
}
function display_message(sender,target,message,last,pri,priname_list)
{
parent.document.input.last.value=last;
username=parent.document.input.user.value;
if(sender==username)
return;
if(parent.document.input.filtername.value.indexOf(sender)>=0)
return;
if(pri=="" || pri=="open")
parent.output.document.writeln(message);
if(pri=="private")
if(priname_list.indexOf(username)>=0)
parent.hasme.document.writeln(message);
}
function system_message(tag,message,last,which)
{
username=parent.document.input.user.value;
parent.document.input.last.value=last;
if(tag=="kick" && which==username)
top.location.href="index.php?action=escape";
if(tag=="enter" || tag=="exit" || tag=="kick")
parent.online.location.reload();
parent.output.document.writeln(message)
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -