?? chat1.asp
字號:
<%
Response.Buffer=True
if session("netname")="" then
response.redirect "index.asp"
end if
%>
<%
if Application("chat_line")="" then
Dim sd_init(50)
for i=1 to 48
sd_init(i)=0
next
sd_init(49)=1
sd_init(50)="數組初化成功!"
Application("chat_sd")=sd_init
Application("chat_line")=1
Application("onlinelist")=""
end if
'if not isarray(session("dv_user")) then
'dim dv_user(3)
'dv_user(0)=session("netname")
'dv_user(1)=Application("chat_line")
'dv_user(2)=now()
'dv_user(3)=0
'session("dv_user")=dv_user
'else
'dv_user=session("dv_user")
'end if
if Instr(LCase(Application("onlinelist")),LCase(dv_user(0)&" "))=0 then
Application.lock
Application("onlinelist")=Application("onlinelist")&dv_user(0)&" "
Application.UnLock
if dv_user(3)=0 then
Application.lock
sd=Application("chat_sd")
line=int(Application("chat_line"))
Application("chat_line")=line+1
Dim newsd(50)
j=1
for i=3 to 50 step 2
newsd(j)=sd(i)
newsd(j+1)=sd(i+1)
j=j+2
next
newsd(49)=line+1
newsd(50)="parent.getmsg('"&dv_user(0)&"','大家','對','【公告】<a href=javascript:parent.seluser(\'"&dv_user(0)&"\'); target=f2>"&dv_user(0)&"</a>如風一樣飄進了毒愛聊天室!<bgsound src=type.wav loop=1>','2','AA00CC','AA00CC','0','"&time()&"'); "
Application("chat_sd")=newsd
Application.UnLock
end if
'dv_user(1)=Application("chat_line")
dv_user(3)=1
session("dv_user")=dv_user
end if
ph = Request.ServerVariables("SCRIPT_NAME")
ph = Left(ph, Len(ph) - 8)
%>
<html>
<head>
<title>毒愛聊天室</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript>
var username='<%=session("dv_user")(0)%>';
var autoScroll=1;
var lheight=140;
var fsize=10.5;
var bgcolor='#99ccff';
var chatimage='1';
var tbclu='true'
var ph = "<%=ph%>";
var masklist=' ';
function modifyname(str)
{
username=str;
}
function getname(){return username;}
function listmask(){f6.location.href='mask.asp?masklist='+masklist;}
function mask(un){if(masklist.indexOf(' '+un+' ')==-1){masklist=masklist+un+' ';}else{var regexp=eval('/ '+un+' /gi');masklist=masklist.replace(regexp,' ');}}
function getmasklist(){return(masklist);}
function cbg(){return bgcolor;}
function cbi(){ return ph + chatimage;}
function scrollit(){if(!parent.f2.document.af.as.checked){autoScroll=0;}else{autoScroll=1;parent.f1.autoscrollnow();parent.f0.autoscrollnow();}
}
function getuser(){return username;}
function seluser(str){parent.f2.document.af.towho.value=str;parent.f2.document.af.msg.focus();}
function write()
{
parent.f0.document.open();
parent.f0.document.writeln("<html><head><title>分屏顯示</title><meta http-equiv=Content-Type content=\"text/html; charset=gb2312\">");
parent.f0.document.writeln("<style type=text/css>.p{font-size:20pt}.l{line-height:" + lheight + "%}.t{color:Fshowmsg0FF;font-size:9pt;}body{font-family:\"宋體\";font-size:" + fsize + "pt;line-height:" + lheight + "%}INPUT{BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 9pt; BORDER-BOTTOM-WIDTH: 1px; BACKGROUND-COLOR: #efefef; BORDER-RIGHT-WIDTH: 1px}A{text-decoration:none}div{background:#fdf5e6;line-height:" + lheight + "%}td{font-family:\"宋體\";font-size:" + fsize + "pt;}A:Hover{text-decoration:underline}A:visited{color:blue}</style></head>");
parent.f0.document.writeln("<body topmargin=3 bgcolor=#eeeeee>");
parent.f0.document.writeln("<\script>function autoscrollnow(){this.scroll(0,65000);}<\/script>");
parent.f0.document.writeln("<span class=l><font color=red>【系統提示】</font>歡迎【"+username+"】光臨毒愛聊天室!</span><br>祝你談的開心,聊的愉快!<br>");
parent.f1.document.open();
parent.f1.document.writeln("<html><head><title>分屏顯示</title><meta http-equiv=Content-Type content=\"text/html; charset=gb2312\">");
parent.f1.document.writeln("<style type=text/css>.p{font-size:20pt}.l{line-height:" + lheight + "%}.t{color:Fshowmsg0FF;font-size:9pt;}body{font-family:\"宋體\";font-size:" + fsize + "pt;line-height:" + lheight + "%}INPUT{BORDER-TOP-WIDTH: 1px; BORDER-LEFT-WIDTH: 1px; FONT-SIZE: 9pt; BORDER-BOTTOM-WIDTH: 1px; BACKGROUND-COLOR: #efefef; BORDER-RIGHT-WIDTH: 1px}A{text-decoration:none}div{background:#fdf5e6;line-height:" + lheight + "%}td{font-family:\"宋體\";font-size:" + fsize + "pt;}A:Hover{text-decoration:underline}A:visited{color:blue}</style></head>");
parent.f1.document.writeln("<body topmargin=3 bgcolor=#eeeeee>");
parent.f1.document.writeln("<\script>function autoscrollnow(){this.scroll(0,65000);}<\/script>");
parent.f1.document.writeln("<span class=l><font color=red>【系統提示】</font>歡迎【"+username+"】光臨毒愛聊天室!</span><br>");
}
function getmsg(str1,str2,str3,str4,str5,str6,str7,str8,str9,str10)
{
if(masklist.indexOf(' '+str1+' ')!=-1 && str2==username){return false}
if (str1==username)
{var zj="【<a href=javascript:parent.seluser('"+str1+"'); target=f2><font color="+str6+">我</font></a>】";}
else
{var zj="<a href=javascript:parent.seluser('"+str1+"'); target=f2><font color="+str6+">"+str1+"</font></a>";}
if (str2==username)
{var br="【<a href=javascript:parent.seluser('"+str2+"'); target=f2><font color="+str6+">我</font></a>】";}
else
{var br="<a href=javascript:parent.seluser('"+str2+"'); target=f2><font color="+str6+">"+str2+"</font></a>";}
msg=zj+str3+br+"說:<font color="+str7+">"+str4+"</font>"
//私聊
if (str8=='1'){msg="<font color=red>〖私聊〗</font>"+zj+str3+br+"說:<font color="+str7+">"+str4+"</font>";}else{saystr=zj+str2+br+"說:<font color="+str7+">"+str4+"</font>";}
if (str10=='1'){msg="<span class=l><font color=red>【系統提示】</font><font color="+str7+">"+str4+"</font></span>";}
//動作
if (str5=='2') {
msg=str4
}
else
{
if (str5=='1'){for(th=1;th<4;th++){if(str1 == username){str4 = str4.replace("##", zj );}else{str4 = str4.replace("##", zj);}
if(str2 == username){str4 = str4.replace("%%", "<a href=javascript:parent.seluser('"+str2+"'); target=_parent><font color=red>【" + str2 + "】</font></a>");}else{str4 = str4.replace("%%", "<a href=javascript:parent.seluser('"+str2+"'); target=_parent><font color=FF0099>" + str2 + "</font></a>");}}
msg="<font color=008800>【動作】</font>"+zj+"<font color="+str7+">"+str4+"</font>";}
}
if (str8=='1' & (str1!=username && str2!=username)){return false}
if (str2==username)(msg=msg+"<bgsound src=type.wav loop=1>")
msg=msg+"<font color=red size=1pt>("+str9+")</font><br>"
if ((tbclu=='true') && (str1==username || str2==username))
{parent.f1.document.writeln(msg)
if (autoScroll==1) {parent.f1.autoscrollnow();}
}
else
{parent.f0.document.writeln(msg)
if (autoScroll==1) {parent.f0.autoscrollnow();}
}
}
//分屏
function tbclutch()
{
if (tbclu=='true') {
this.msgfrm.rows="*,0";tbclu='false';
}
else
{
this.msgfrm.rows="1*,1*";tbclu='true';
}
this.f2.document.af.msg.focus();
}
</script>
</head>
<frameset cols="*,148" border="0" framespacing="0" >
<frameset rows="*,70,0,0" cols="*" border="0" framespacing="0">
<frameset rows="*,*" border="0" framespacing="0" name="msgfrm">
<frame src="about:blank" name="f0">
<frame src="about:blank" name="f1">
</frameset>
<frame src="f2.asp" name="f2" noresize scrolling="NO">
<frame src="about:blank" name="f3" noresize frameborder="NO" scrolling="NO">
<frame src="getmsg.asp" name="f4" noresize frameborder="NO" scrolling="NO">
</frameset>
<frameset rows="0,*,70,0" cols="*" border="0" framespacing="0">
<frame src="f5.asp" name="f5" noresize frameborder="NO" scrolling="NO">
<frame src="about:blank" name="f6" noresize>
<frame src="f7.asp" name="f7" noresize scrolling="NO">
<frame src="about:blank" name="f8" noresize frameborder="NO" scrolling="NO">
</frameset>
</frameset>
<noframes><body bgcolor="#FFFFFF" text="#000000">
</body></noframes>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -