⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 input.asp

📁 基于asp的 班级同学录主页源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#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://jxauclass.yeah.net');
}

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>
</td>
</tr>
</table>
</div>
</td>
<td align="right" valign="top" width="100%">
<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="">
<%
my_conn.close
set my_conn=nothing
%>
<select onchange="bs();">
<option value="" selected>您的资料</option>
<option value="">积分:<%=session("oldrate")%></option>
<option value="">等级:<%=session("userlevel")%></option>
<option value="">
<% if session("userlevel")>7 then response.write "管理员" %>
</option>
</select>
<input type="text" name="saystemp" id="saystemp" size="40" maxlength="100">
<input type="image" src="message.gif" name="sub" onclick="bs();">
&nbsp; <br>
<input type="image" src="refresh.gif" onClick="confirm('刷新功能可以在谈话区长时间不动或者\n谈话内容太多影响机器速度的时候使用,\n刷一下就会正常了。');reld();bs();" name="button">
<%if session("userlevel")>3 then%>
<input type="button" value="/指令集" class="normal" onMouseOver="this.className='over';" onMouseDown="this.className='down';" onMouseOut="this.className='normal';" onClick="alert('右边将会显示动作列表!');top.frm_onlineuser.location.href='listfunction.asp'">
<%end if%>
<%if session("userlevel")>6 then%>
<select name="htmlit" onChange="htmlstyle(this);bs();">
<option value="" selected>HTML格式
<option value="<font size=4 face=楷体_GB2312>?</font>">楷体4号
<option value="<font size=5 face=楷体_GB2312>?</font>">楷体5号
<option value="<font size=6 face=楷体_GB2312>?</font>">楷体6号
<option value="<font size=4 face=宋体>?</font>">宋体4号
<option value="<font size=5 face=宋体>?</font>">宋体5号
<option value="<font size=6 face=宋体>?</font>">宋体6号
<option value="<i>?</i>">字体倾斜
<option value="<b>?</b>">字体加粗
<option value="<img src=?>">图片
<option value="<marquee>?</marquee>">对象移动
</select>
<%end if%>
<select name="addwordcolor" id="addwordcolor" onChange="bs();">
<%
randomize
displaycolor=int(rnd(1)*5)
%>
<option style="color: #000000" value="#000000">绝对黑色</option>
<option style="color: #000088" value="000088">深蓝忧郁</option>
<option style="color: #0000ff" value="0000ff">草原之蓝</option>
<option style="color: #008800" value="008800">橄榄树绿</option>
<option style="color: #008888" value="008888">灰蓝种族</option>
<option style="color: #0088ff" value="0088ff">海洋之蓝</option>
<%if displaycolor=1 then%>
<option style="color: #00a010" value="00a010" selected>绿色回忆</option>
<%else%>
<option style="color: #00a010" value="00a010">绿色回忆</option>
<%end if%>
<option style="color: #1100ff" value="1100ff">蓝色月光</option>
<option style="color: #111111" value="111111">夜幕低垂</option>
<option style="color: #333333" value="333333">灰色轨迹</option>
<option style="color: #50b000" value="50b000">春草青青</option>
<%if displaycolor=2 then%>
<option style="color: #880000" value="880000" selected>暗夜兴奋</option>
<%else%>
<option style="color: #880000" value="880000">暗夜兴奋</option>
<%end if%>
<option style="color: #8800ff" value="8800ff">发亮蓝紫</option>
<option style="color: #888800" value="888800">卡其制服</option>
<option style="color: #888888" value="888888">伦敦灰雾</option>
<option style="color: #8888ff" value="8888ff">兴份过蓝</option>
<%if displaycolor=3 then%>
<option style="color: #aa00cc" value="aa00cc" selected>紫的拘谨</option>
<%else%>
<option style="color: #aa00cc" value="aa00cc">紫的拘谨</option>
<%end if%>
<option style="color: #aaaa00" value="aaaa00">流金岁月</option>
<option style="color: #ccaa00" value="ccaa00">卡布其诺</option>
<option style="color: #ff0000" value="ff0000">正宗喜红</option>
<%if displaycolor=4 then%>
<option style="color: #ff0088" value="ff0088" selected>爱的暗示</option>
<%else%>
<option style="color: #ff0088" value="ff0088">爱的暗示</option>
<%end if%>
<option style="color: #ff00ff" value="ff00ff">红的发紫</option>
<option style="color: #ff8800" value="ff8800">黄金岁月</option>
<option style="color: #ff0005" value="ff0005">红袍飘飘</option>
<option style="color: #ff88ff" value="ff88ff">紫金绣帖</option>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -