📄 input.asp
字号:
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="conn.asp"-->
<%if session("user")<>"" then%>
<html>
<head>
<title>聊天输入区</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body { font-size: 9pt;border: 0; margin: 0px}
td { font-size: 9pt}
select { font-size: 9pt}
-->
</style>
<script Language="JavaScript">
<!--
var conti=0;
var contit=0;
var max=20;
var whamsg=new Array(20+1);
var base=0;
var p=0;
var j;
var tt=0;
for (j=0;j<=max+1;j++)
whamsg[j]='';
function addOne(what){
if (base<max+1) {
whamsg[base]=what;
base++;
} else {
for (i=0;i<max;i++)
whamsg[i]=whamsg[i+1];
whamsg[i]=what;
}
p=base;
}
function goPrev(theForm){
if (p>0) p--;
theForm.saystemp.value=whamsg[p]
theForm.saystemp.focus();
}
function goNext(theForm){
if (p<base) p++;
theForm.saystemp.value=whamsg[p]
theForm.saystemp.focus();
}
function htmlstyle(list)
{ var listText;
var n;
if((list.selectedIndex != -1)&&(list.selectedIndex != 0))
{
listText = list.options[list.selectedIndex].value;
n=listText.indexOf('?');
if(document.forms.formtalk.saystemp.value){
if(n>=0) document.forms.formtalk.saystemp.value=listText.substring(0,n)+document.forms.formtalk.saystemp.value+listText.substring(n+1,listText.length);
}else{
document.forms.formtalk.saystemp.value=listText.substring(0,n)+' '+listText.substring(n+1,listText.length);
}
}
}
function bs() { document.forms.formtalk.saystemp.style.color = document.forms.formtalk.addwordcolor.value;
document.forms.formtalk.saystemp.focus();
}
function receiver(list)
{ var listText='';
if((list.selectedIndex != -1)&&(list.selectedIndex != 0))
{ listText = list.options[list.selectedIndex].value; }
document.forms.formtalk.saystemp.value=listText;
}
function reld () {
parent.frm_content.location.href='msg.asp<%if r_refresh="down" then%>#dian<%end if%>';
}
function checksays(theForm) {
if ((document.forms.formtalk.towho.options[document.forms[0].towho.selectedIndex].value.length !=0) && (document.forms.formtalk.says.value==document.forms.formtalk.saystemp.value) && (document.forms.formtalk.towho.options[document.forms[0].towho.selectedIndex].value==document.forms.formtalk.towho1.value)) {
<%if session("userlevel")<9 then%>
alert('好罗嗦啊,请不要对'+document.forms.formtalk.towho.options[document.forms[0].towho.selectedIndex].value+'总说这一句呀!');
return false;
<%else%>
return true;
<%end if%> }
if (checkempty(document.forms.formtalk.saystemp.value)==false) {
alert('请输入发言');
return false;
}
Today = new Date();
var NowHour = Today.getHours();
var NowMinute = Today.getMinutes();
var NowSecond = Today.getSeconds();
var continuum = (NowHour*3600)+(NowMinute*60)+NowSecond;
if((continuum-conti)>1)
{ conti=continuum;}
else if(contit<4){contit++;alert('说话太快');return false;}
else {conti=0; contit=0; return true;}
document.forms.formtalk.job.value='says';
var hua=document.forms.formtalk.saystemp.value;
var dongzuo=hua.substring(0,1);
if(dongzuo=="//") {
var s1=hua.indexOf(" ");
var s2=s1+1;
var dongzuo1=hua.substring(0,s1);
var s3=hua.length;
var un =hua.substring(s2,hua.length);
if ((checkempty(un)==true) && (s1!=-1)) {
hua=dongzuo1;
document.forms[0].towho.options[document.forms[0].towho.selectedIndex].text=un;
document.forms[0].towho.options[document.forms[0].towho.selectedIndex].value=un;
}
if(hua=="//ver") {alert('Info Chat 3.0'); return false;}
else if(hua=="//") {alert('//后紧跟指令符'); return false;}
document.forms.formtalk.saystemp.value=hua;
document.forms.formtalk.job.value="action";
}
document.forms.formtalk.saysnoc.value++;
document.forms.formtalk.says.value=document.forms.formtalk.saystemp.value;
document.forms.formtalk.towho1.value=document.forms.formtalk.towho.options[document.forms[0].towho.selectedIndex].value;
addOne(theForm.saystemp.value);
if (document.forms.formtalk.autocls.checked==true) {
document.forms.formtalk.saystemp.value='';
}
self.status='发言已送出';
return true;
}
function checkempty(txtval){
if (txtval.length==0)
return false;
var i=0;
while (i<txtval.length) {
if (txtval.substring(i,i+1) != '')
return true;
i=i+1;
}
return false;
}
if (self==top)
{top.location="index.asp";}
//-->
</script>
<base target="frm_msg">
</head>
<body bgcolor="#33CCFF" text="#FFD324">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<form method="POST" name="formtalk" target="frm_msg" action="msg.asp<%if r_refresh="down" then%>#dian<%end if%>" onsubmit="return(checksays(this));">
<tr>
<td height=8></td>
<td height=8></td>
</tr>
<tr>
<td height=100% width =100> </td>
<td align="left" valign="top" width="100%">
<table>
<tr>
<td align="left" valign="top">
<input type=hidden name="job" value="says">
<input type=hidden name="says" value="">
<input type=hidden name="towho1" value="">
<input type=hidden name="lastno" value="">
<input type=hidden name="saysnoc" value="0">
<input type=hidden name="filteruser" value="">
<font color="#000000">你对</font><select name="towho" onChange="bs();">
<option value="大家" selected>大家
<% for i=1 to 100
if application("user"&i) <> "" then %>
<option value="<%=application("user"&i)%>"><%=application("user"&i)%>
<% end if
next %>
</select><font color="#000000">说</font>
<input type="text" name="saystemp" id="saystemp" size="40" maxlength="100">
<input type="submit" name="sub" value="送出" onclick="bs();">
<input type="reset" value="清除" onclick="bs();">
</td>
</tr>
<tr height=8>
<td></td>
</tr>
<tr>
<td>
<font color="#8888FF">
<select name="addwordcolor" id="addwordcolor" onChange="bs();" size="1">
<option style="color: #000000" value="#000000" selected>黑</option>
<option style="color: #000088" value="000088">蓝</option>
<option style="color: #00a010" value="00a010">绿</option>
<option style="color: #333333" value="333333">灰</option>
<option style="color: #50b000" value="50b000">青</option>
<option style="color: #aa00cc" value="aa00cc">紫</option>
<option style="color: #ff0000" value="ff0000">红</option>
</select>
<input type="checkbox" name="autocls" value="yes" checked onClick="document.forms.formtalk.autocls.blur(); bs();">
<font color="#000000">自动清除</font>
<input type="checkbox" name="towhoway" value="yes" onClick="document.forms.formtalk.towhoway.blur(); bs();">
<font color="#000000">私聊 </font>
<input type="checkbox" name="DivDis" value="yes" onClick="">
<font color="#000000">分屏</font> <!--分屏功能没有实现 -->
<%if session("userlevel")=9 then%>
<input type="button" value="踢人/Ip" onclick="javascript:window.open('kill.asp','踢人','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=250,height=250')">
<%end if%> </td>
</tr>
</table>
</td>
</tr>
</form>
</table> </body>
</html>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -