📄 chat12.txt
字号:
请支持我们站点以网养网,点击我们的广告,谢谢大家!
我自己写的聊天室源代码(十_3)
--------------------------------------------------------------------------------
【1_apple】 于 00-4-28 14:45:54 加贴在 Joy ASP ↑:
for i = 1 to my_point
if i = my_point then
session("ss_oldpoint") = my_point - 1
if session("ss_oldpoint") < 1 then
session("ss_oldpoint") = 50
end if
sc_xx = 1
exit for
end if
j = j+1
'建立语句
my_message1(j)=""
'分清说话类别
'标志位:1踢人,2禁止说话,3禁止浏览,4公开话,5悄悄话,6动作,7进入,8退出
select case my_message(i,5)
case "1"
'踢人
my_message1(j) = "<font color='#008000'>系统消息(踢人):</font>"
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
case "2"
'禁止说话
my_message1(j) = "<font color='#008000'>系统消息(禁止说话):</font>"
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
case "3"
'禁止浏览
my_message1(j) = "<font color='#008000'>系统消息(禁止浏览):</font>"
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
case "4"
'公开话
'源
my_message1(j) = "<strong>" + my_message(i,1) + "</strong>"
'表情
my_message1(j) = my_message1(j) + "<font color='#FF00FF'><small>" + my_message(i,4) + "</small></font>,"
my_message1(j) = my_message1(j) + "<font color='#FF0000'><small>" + "对" + "</small></font>"
'目标
my_message1(j) = my_message1(j) + "<strong>" + my_message(i,2) + "</strong>"
my_message1(j) = my_message1(j) + "<font color='#008000'>" + "说:" + "</font>"
'内容
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
'时间
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
case "5"
'悄悄话
'源
if (trim(session("ss_name")) = trim(my_message(i,2))) or (trim(session("ss_name")) = trim(my_message(i,1))) then
my_message1(j) = "<strong>" + my_message(i,1) + "</strong>"
'表情
my_message1(j) = my_message1(j) + "<font color='#FF00FF'><small>" + my_message(i,4) + "</small></font>,"
my_message1(j) = my_message1(j) + "<font color='#FF0000'><small>" + "悄悄对" + "</small></font>"
'目标
my_message1(j) = my_message1(j) + "<strong>" + my_message(i,2) + "</strong>"
my_message1(j) = my_message1(j) + "<font color='#008000'>" + "说:" + "</font>"
'内容
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
'时间
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
end if
case "6"
'动作
my_message1(j) = "<font color='#008000'><strong>" + my_message(i,1) + "</strong></font>:"
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
case "7"
'进入
my_message1(j) = "<font color='#008000'>系统消息(" + my_message(i,1) + "进入聊天室):</font>"
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
case "8"
'退出
my_message1(j) = "<font color='#008000'>系统消息(" + my_message(i,1) + "离开聊天室):</font>"
my_message1(j) = my_message1(j) + my_message(i,6) + my_message(i,3)
my_message1(j) = my_message1(j) + "[<small>" + my_message(i,7) + "</small>]" + "</font>"
end select
next
end if
my_usernum = application("ap_usernum")
if my_usernum <> session("ss_usernum") then
session("ss_usernum") = my_usernum%>
<script
language="JavaScript"><!--
parent.topright.location.href = "online.asp";
// --></script>
<% end if
case 3
'禁止浏览
select case request.form("b1")
case "提交"
if trim(request.form("what1")) <> "" then
'内容/动作
sc_what = replace(trim(request.form("what1")),"<","<")
'颜色
sc_color = "<font color='" + trim(request.form("color")) + "'>"
session("ss_color") = trim(request.form("color"))
'sc_1 = session("ss_color")
'源
sc_who1 = session("ss_name")
'目的
sc_who2 = replace(trim(request.form("who")),"<","<")
session("ss_who") = sc_who2
'标志
if request.form("c1") = "ON" then
sc_flag = "5"
session("ss_qq") = "5"
else
sc_flag = "4"
session("ss_qq") = "4"
end if
sc_bq = replace(trim(request.form("bq")),"<","<")
if sc_ff = 1 then
application.lock
sc_message = application("ap_message")
sc_point = application("ap_point")
if sc_point > 50 then
sc_point = 1
end if
if request.form("acction") = "0" then
sc_message(sc_point,1) = sc_who1
sc_message(sc_point,2) = sc_who2
sc_message(sc_point,3) = sc_what
sc_message(sc_point,4) = sc_bq
sc_message(sc_point,5) = sc_flag
sc_message(sc_point,6) = sc_color
sc_ttt = now
if hour(sc_ttt) < 10 then
sc_message(sc_point,7) = "0" + cstr(hour(sc_ttt)) + ":"
else
sc_message(sc_point,7) = "" + cstr(hour(sc_ttt)) + ":"
end if
if minute(sc_ttt) < 10 then
sc_message(sc_point,7) = sc_message(sc_point,7) + "0" + cstr(minute(sc_ttt)) + ":"
else
sc_message(sc_point,7) = sc_message(sc_point,7) + cstr(minute(sc_ttt)) + ":"
end if
else
sc_message(sc_point,1) = sc_who1
sc_message(sc_point,2) = sc_who2
sc_message(sc_point,3) = sc_what
sc_message(sc_point,4) = sc_bq
sc_message(sc_point,5) = "6"
sc_message(sc_point,6) = sc_color
sc_ttt = now
if hour(sc_ttt) < 10 then
sc_message(sc_point,7) = "0" + cstr(hour(sc_ttt)) + ":"
else
sc_message(sc_point,7) = "" + cstr(hour(sc_ttt)) + ":"
end if
if minute(sc_ttt) < 10 then
sc_message(sc_point,7) = sc_message(sc_point,7) + "0" + cstr(minute(sc_ttt)) + ":"
else
sc_message(sc_point,7) = sc_message(sc_point,7) + cstr(minute(sc_ttt)) + ":"
end if
end if
if second(sc_ttt) < 10 then
sc_message(sc_point,7) = sc_message(sc_point,7) + "0" + cstr(second(sc_ttt))
else
sc_message(sc_point,7) = sc_message(sc_point,7) + cstr(second(sc_ttt))
end if
sc_point = sc_point + 1
if sc_point > 50 then
sc_point = 1
end if
application("ap_message") = sc_message
application("ap_point") = sc_point
application.unlock
else
session("ss_nowflag") = 0
end if
end if
case "踢人"
if trim(request.form("who")) <> "所有人" then
if isnumeric(request.form("time1")) then
sc_who = session("ss_name")
sc_who1 = trim(request.form("who"))
sc_time = cstr(now)
sc_time1 = cstr(dateadd("n",cint(request.form("time1")),now))
sc_ss = "1"
sc_long = trim(cstr(request.form("time1")))
application.lock
sc_userout = application("ap_userout")
sc_point = application("ap_point")
sc_message = application("ap_message")
for i = 1 to 30
if trim(sc_userout(i,1)) = "" then
sc_userout(i,1) = sc_who
sc_userout(i,2) = sc_who1
sc_userout(i,3) = sc_ss
sc_userout(i,4) = sc_time
sc_userout(i,5) = sc_time1
sc_userout(i,6) = sc_long
if sc_point > 50 then
sc_point = 1
end if
sc_message(sc_point,1) = sc_who
sc_message(sc_point,2) = "所有人"
sc_message(sc_point,3) = "<strong>" + sc_who + "</strong> 将 <strong>" + sc_who1 + "</strong> 踢出聊天室!"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -