?? send_get_info.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('對不起,數(shù)據(jù)傳送出錯,將關閉窗口!');")
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>信息成功發(fā)送!</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>歡迎使用快狗</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("不能發(fā)送空信息!");
form.info.focus();
return(false);
}
if (form.info.value.length>100)
{
alert("發(fā)送信息太長,不能超過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="發(fā) 送 [S]";
form.info.readOnly=false;
form.info.style.background="#ffffff";
form.info.value="";
sendfunction=1;
}
else
{
if (form.info.value=="")
alert("不能發(fā)送空信息!");
else if (form.info.value.length>100)
alert("發(fā)送信息太長,不能超過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">
<p align="center">
<%
application.lock
onlinesite=application("onlinesite")
sitesums=ubound(onlinesite)
linkstr="歡迎光臨 "
if not isempty(application("adinfo")) then
linkstr=application("adinfo")&linkstr
end if
if sitesums<=8 then
for i=0 to sitesums
if onlinesite(i)<>"" then
msg=split(onlinesite(i),"$",-1)
if YesSite(msg(2))=0 then
linkstr=linkstr&"<a href="&msg(1)&" target=_blank><font color=#0000ff>"&server.htmlencode(msg(2))&"</font></a> "
end if
end if
next
else
randomize
for i=0 to 8
if onlinesite(i)<>"" then
siteinfo=onlinesite(Int((sitesums - 0 ) * Rnd + 0))
msg=split(siteinfo,"$",-1)
if YesSite(msg(2))=0 then
linkstr=linkstr&"<a href="&msg(1)&" target=_blank><font color=#0000ff>"&msg(2)&"</font></a> "
else
i=i-1
end if
end if
next
end if
application.unlock
%>
<marquee scrolldelay="150" align="middle"><%=linkstr%>網(wǎng)站!</marquee>
</p>
</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>發(fā)信息
<%else%>
<b><%=name%></b>在<b><%=getsitename(getsiteid)%></b>給您發(fā)來信息
<%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="發(fā) 送 [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%>
<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 + -