📄 input.asp
字号:
<!--#INCLUDE FILE="inc_config.asp"-->
<!--#INCLUDE FILE="inc_dbconn.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}
.normal { <%=m_button%> ; font-size: 9pt}
.over { <%=m_buttonover%> ; font-size: 9pt}
.down { <%=m_buttondown%> ; 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='content.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 session("userlevel")<9 then%>
function click() {
if (event.button==2) {
var char_=navigator.appName
if(char_=="Netscape"){
window.parent.resizeTo(3,1)
window.parent.moveTo(100,30)
}
else{
window.parent.resizeTo(4,1)
window.parent.moveTo(100,30)
}
alert("请不要按右键,现在请在任务栏最大化聊天室的窗口,谢谢");
}
}
document.onmousedown=click
<%end if%>
if (self==top)
{top.location="index.htm";}
//-->
</script>
</head>
<body bgcolor="<%=m_bg2%>" text="<%=m_text2%>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="left">
<form method="POST" name="formtalk" target="frm_content" action="content.asp<%if r_refresh="down" then%>#dian<%end if%>" onsubmit="return(checksays(this));">
<tr>
<td height="1" colspan="3" bgcolor="#8C001A"></td>
</tr>
<tr>
<td height="7" colspan="3"></td>
</tr>
<tr>
<td align="right" valign="top" width="10%">
<div align="left">
<table width="50%" border="1" align="right" bordercolor="#ffffff" bgcolor="#ffffff">
<tr>
<td bordercolor="#000000" bgcolor="#ffff00" align="center">
<div align="center">
<SCRIPT language=JavaScript>
<!--
function defaul_home()
{
this.home.style.behavior='url(#default#homepage)';this.home.setHomePage('http://www.nbjoe.com');
}
function openmusicbox()
{ window.open("http://www.nbjoe.com/musicbox/musicbox.htm","musicbox","width=500,height=150,status=no"); }
//-->
</SCRIPT>
<a href="javascript:openmusicbox()"> <font color="#000000">在<br>
线<br>
听<br>
歌</font></a> </div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -