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

📄 send_get_info.asp

📁 红金羚v1.5办公自动化软件是基于大型数据库系统开发的应用系统
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="function.asp"-->
<%
on error resume next
id=Request("id")
name=request("name")
sitename=request("sitename")
sendflag=request("sendflag")
getsiteid=request("siteid")
if id="" or name="" or sendflag="" or sitename="" or getsiteid="" then
	Response.Write("<script language='javascript'>")
	Response.Write("alert('对不起,数据传送出错,将关闭窗口!');")
	Response.Write("window.close();")
	Response.Write("</script>")
	Response.End
end if
if isempty(session("username")) or session("username")="" then
		application.lock
		application("online")=application("online")+1
		if application("online")>1000 then
			application("online")=1
		end if
		application.unlock
		session("username")="访客"&application("online")
end if
if find_online_user(session("siteid"))=0 then
	call write_online_user(session("siteid"),1)
	response.write("<script language=""javascript"">")
	response.write("opener.parent.refflag.value=1;")
	response.write("</script>")
end if
if sendflag="0" then
	info=trim(request.querystring("info"))
end if
sendinfo=trim(Request.Form("info"))
if sendinfo<>"" then
	application.lock
	writestr=id&"$"&session.sessionID&"$"&session("siteid")&"$"&name&"$"&sendinfo&"$"&now()&"|"
	application("info")=application("info")&writestr
	onlineuser=application("onlineuser"&session("siteid"))
	nowtime=now()
	for i=0 to ubound(onlineuser)
			if left(onlineuser(i),instr(onlineuser(i),"$"))=cstr(session.sessionid)&"$" then
				number=instrrev(onlineuser(i),"$")
				frontstr=left(onlineuser(i),number-1)
				number1=instrrev(frontstr,"$")
				frontstr=left(frontstr,number1)
				backstr=right(onlineuser(i),len(onlineuser(i))-number)
				onlineuser(i)=frontstr&nowtime&"$"&backstr
				exit for
			end if
	next
	application("onlineuser"&session("siteid"))=onlineuser
	if session("manager")="1" then
		onlinemanager=application("onlinemanager")
		for i=0 to ubound(onlinemanager)
				if 	left(onlinemanager(i),instr(onlinemanager(i),"$"))=cstr(session.sessionid)&"$" then
					number=instrrev(onlinemanager(i),"$")
					frontstr=left(onlinemanager(i),number-1)
					number1=instrrev(frontstr,"$")
					frontstr=left(frontstr,number1)
					backstr=right(onlinemanager(i),len(onlinemanager(i))-number)
					onlinemanager(i)=frontstr&nowtime&"$"&backstr
					exit for
				end if
		next
		application("onlinemanager")=onlinemanager
	end if
	application.unlock
	Response.Write("<p align=center><font color=#ff0000>信息成功发送!</font></p>")
	Response.Write("<script language=javascript>")
	response.write("setTimeout('window.close();',1000);")
	Response.Write("</script>")
	Response.End
end if
%>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>红孩儿Office 办公自动化系统专业版通信工具</title>
<link rel="stylesheet" type="text/css" href="style.css">
<SCRIPT LANGUAGE=javascript FOR=document EVENT=onkeyup>
<!--
 document_onkeyup();
//-->
</SCRIPT>
<script language="javascript">
<%
if sendflag="1" then
%>
function document_onkeyup() {
if ((event.altKey==true && event.keyCode==83) || (event.ctrlKey==true && event.keyCode==13))
	{	
		if (check_form())
		document.form.submit();
	}
else if (event.altKey==true && event.keyCode==67)
	window.close();
}

function check_form()
{
	if (form.info.value=="")
		{
			alert("不能发送空信息!");
			form.info.focus();
			return(false);
		}
	if (form.info.value.length>100)
		{
			alert("发送信息太长,不能超过100个汉字!");
			form.info.focus();
			return(false);
		}
	if (form.info.value.indexOf("$")!=-1 || form.info.value.indexOf("|")!=-1 )
		{
			alert("信息中不能含有$,|字符!");
			form.info.focus();
			return(false);
		}
	form.send.disabled=true;
	window.moveTo(1100,700);
	return(true);
}
<%
else
%>
var sendfunction;
sendfunction=0;
function document_onkeyup() {
if ((event.altKey==true && event.keyCode==83) || (event.ctrlKey==true && event.keyCode==13))
	{	
		change_function();
	}
else if (event.altKey==true && event.keyCode==67)
	window.close();

}
function change_function()
{
	if (sendfunction==0)
		{
			form.send.value="发 送 [S]";
			form.info.readOnly=false;
			form.info.style.background="#ffffff";
			form.info.value="";	
			sendfunction=1;
		}
	else
		{
			if (form.info.value=="")
				alert("不能发送空信息!");
			else if (form.info.value.length>100)
				alert("发送信息太长,不能超过100个汉字!");
			else if (form.info.value.indexOf("$")!=-1 || form.info.value.indexOf("|")!=-1 )
				alert("信息中不能含有$,|字符!");
			else
				{
					form.send.disabled=true;
					window.moveTo(1100,700);
					document.form.submit();
				}
		}
	
}
<%
end if
%>
</script>
</head>
<body  leftmargin="1" topmargin="1">
<%if sendflag="1" then%>
<form method="post" action="send_get_info.asp?id=<%=id%>&siteid=<%=getsiteid%>&name=<%=session("username")%>&sitename=<%=sitename%>&sendflag=0" onsubmit="return check_form()" name="form">
<%
else
%>
<form method="post" action="send_get_info.asp?id=<%=id%>&siteid=<%=getsiteid%>&name=<%=session("username")%>&sitename=<%=sitename%>&sendflag=0" onsubmit="" name="form">
<%end if%>
  <div align="center">
    <table border="1" width="324" height="99" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#ffffff" bgcolor="#eeeeee">
      <tr>
        <td width="340" height="26" background="../qqpic/line1.jpg">
<div align="center">
  <table border="1" width="97%" cellpadding="0" cellspacing="0" height="19">
    <tr>
      <td width="100%" height="17" bordercolorlight="#ffffff" bordercolordark="#000000">
</td>
    </tr>
  </table>
</div>
</td>
      </tr>
      <tr>
        <td width="340" height="25" title align="middle">
          <p align="center"><img src="../qqpic/message.gif" WIDTH="16" HEIGHT="16">
		  <%
		  if sendflag="1" then
		  %>
		  <b><%=session("username")%></b>在<b><%=sitename%></b>发信息
		  <%else%>
		  <b><%=name%></b>在<b><%=getsitename(getsiteid)%></b>给您发来信息
		  <%end if%>
		  </p>
        </td>
      </tr>
      <tr>
        <td width="340" height="25">
          <p align="center">
			<%if sendflag="1" then%>
			<textarea cols="47" name="info" rows="7"></textarea>
			<%else%>
			<textarea cols="47" name="info" rows="7" readonly style="background:#eeeeee"><%=info%></textarea>
			<%end if%>			
          </p>
        </td>
      </tr>
      <tr>
        <td width="349" height="25">
          <p align="center">
          <%if sendflag="1" then%>
			<input type="submit" value="发 送 [S]" name="send" height="20" style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; HEIGHT: 20px">
          <%else%>
			<input type="button" value="回 复 [S]" name="send" height="20" onclick="change_function()" style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; HEIGHT: 20px">
          <%end if%>
		  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  <input type="button" value="关 闭 [C]" onclick="window.close()" name="close" height="20" style="FONT-FAMILY: 宋体; FONT-SIZE: 9pt; HEIGHT: 20px"> 
          </p>
          </td>   
      </tr>   
    </table>   
  </div>   
</form>   
</body>   
   
</html>

⌨️ 快捷键说明

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