📄 default.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--#include file="PPConn.asp" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>记事本 - <%=WebSiteName%></title>
<meta name="Keywords" content="爬爬思特工作室|http://www.papasite.net">
<meta name="Description" content="爬爬思特记事本 Ver2.0">
<link href="PPImages/NoteBook.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%Dim Action,User,PPNB,PPNBUser,UserID
Action=Request.QueryString("Action")
QString=Lcase(Request.ServerVariables("QUERY_STRING"))
If Instr(QString,"action=")=0 and Instr(QString,"userid=")=0 Then PPNBUser=QString
User=Request.Cookies("PPNB")("User")&""
If User<>"" Then
PPNB=Split(User,"|")
PPNBUser=PPNB(0)
ElseIf PPNBUser<>"" Then
If IsNumeric(PPNBUser) Then
SQL="Select * From [PPNBUser] Where [ID]="&PPNBUser
Else
SQL="Select * From [PPNBUser] Where [NBUserName]='"&PPNBUser&"'"
End If
Set Rs=PPConn.Execute(SQL)
If Rs.bof or Rs.eof Then
Response.Write(PPWrite("没有该用户名/ID",""))
Response.End()
Else
PPNBUser=Rs("ID")
End If
End If
If Action="" or Action="List" or Action="Read" Then%>
<script language="javascript" src="http://is.qq.com/js/addportal.js"></script>
<script language="javascript" src="PPImages/AJAX.js"></script>
<div id="Table1"><div id="Table2">
<div id="Header">
<div id="HeaderLeft"><%=WebSiteName%></div>
<div id="HeaderRight"><form action="?" method="get" onsubmit="if (this.UserID.value==''){return false;}">用户名/ID:<input name="Action" type="hidden" value="List" /><input name="UserID" type="text" class="inputID" value="<%=PPNBUser%>" /> <input class="inputSubmit" type="submit" value="进入我的记事本" /> <a href="?">返回首页</a></form></div>
<div class="clear"></div>
</div>
<div id="HtmlBody">
<div id="LeftBody">
<%If Action<>"List" Then
ID=Request.QueryString("ID")
If ID<>"" Then
If User="" Then
Sql="Select * From [PPNoteBook] Where IsHide=0 and ID="&ID
Else
Sql="Select * From [PPNoteBook] Where (IsHide=0 or [UserID]="&PPNB(0)&") and ID="&ID
End If
Set Rs=PPConn.Execute(SQL)
If Rs.bof or Rs.eof Then
Response.Write(PPWrite("没有该信息",""))
Response.End()
Else
Title=Rs("Title")
Content=Rs("Content")
IsHide=Rs("IsHide")
End If
Else
End If
%>
<form action="?Action=Save&ID=<%=ID%>" method="post" onsubmit="return FormSaveCheck(this)" id="SaveForm">
<div class="Content"> 标题:<input name="Title" type="text" class="inputTitle" value="<%=Title%>" /></div><div class="Fenge"></div>
<div class="Content"><textarea name="Content" onkeydown="CtrlEnter()"><%=Content%></textarea></div><div class="Fenge"></div>
<div class="Title"><h5>写 标 题 (支持 Ctrl+Enter 快捷操作)<span id="NoteTips">记事无需登录...</span></h5></div><div class="Fenge"></div>
<div id="Button"><input name="FromURL" type="hidden" value="<%=Request.ServerVariables("HTTP_REFERER")%>" />时间:<%=Mid(Date(),6,5)&" "&Hour(Now())&":"&Minute(Now())%> <input name="IsHide" type="radio" value="0"<%If IsHide<>1 Then Response.Write(" checked=""checked""")%> />公开 <input name="IsHide" type="radio" value="1"<%If IsHide=1 Then Response.Write(" checked=""checked""")%> />私密 用户名/ID:<input name="UserID" type="text" class="inputID" value="<%=PPNBUser%>" /> <input class="inputSubmit" type="submit" name="submit" id="submitSave" value="保 存" /> <input class="inputSubmitMail" type="submit" name="submit" id="submitMail" value="发送到邮箱" onclick="submitMailClick()" /></div>
</form>
<%Else%>
<div class="Content"> 标题:<input name="Title" type="text" class="inputTitle" /></div>
<div class="Fenge"></div>
<div class="Content">
<%
If User="" Then
UserID=Request.QueryString("UserID")
Sql="Select [PPNoteBook].*,[PPNBUser].[NBUserName] From [PPNoteBook],[PPNBUser] Where [PPNoteBook].[IsHide]=0 and "
If IsNumeric(UserID) Then
Sql=Sql&" [PPNoteBook].[UserID]="&UserID
Else
Sql=Sql&" [PPNBUser].[NBUserName]='"&UserID&"' and [PPNBUser].ID=[PPNoteBook].[UserID]"
End If
Else
q=Request.QueryString("q")
Sql="Select * From [PPNoteBook] Where [UserID]="&PPNB(0)&" and (([Title] like '%"&q&"%') or ([Content] like '%"&q&"%'))"
End If
Sql=Sql&" order by [PPNoteBook].ID desc"
Rs=PPRows(Sql)
Response.Write(PPList(Rs,20,"<div class=""Item"">· <a href=""?Action=Read&ID=$/1/$"">$/3/$ ($/6/$)</a> <a href=""?Action=IsHide&ID=$/1/$"" title=""隐藏/关闭""><img src=""PPImages/Hide$/5/$.Jpg"" /></a> <a href=""?Action=Delete&ID=$/1/$"" title=""删除""><img src=""PPImages/delete.gif"" onclick=""return DelAlert()"" /></a></div>"))
Response.Write("<div>"&PPPage(Rs,20)&"</div>")
%>
</div>
<div class="Fenge"></div>
<%End If%>
</div>
<div id="RightBody">
<div class="Title"><h5><a href="javascript:;" onclick="Tabs('Login')" id="aLogin" class="Tabs">登录中心</a><a href="javascript:;" onclick="Tabs('Reg')" id="aReg" class="Tab">还没注册</a></h5></div>
<div class="Content" id="Login">
<%If User="" Then%>
<form action="?Action=Login" method="post">账号或ID:<input name="UserName" type="text" class="inputID" value="<%=PPNBUser%>" /><br />登录密码:<input name="Password" type="password" class="inputID" style="margin-left:2px" /><br /> <input class="inputSubmit" type="submit" value="登 录" /></form>
<%Else%>
<form action="?Action=Change" method="post" onsubmit="return ChangeFormCheck(this)">通行ID号:<%=PPNB(0)%><br />用 户 名:<%=PPNB(1)%><br />电子邮箱:<input name="Email" type="text" class="inputID" value="<%=PPNB(2)%>" style="width:125px" /><br />登录密码:<input name="Password" type="password" class="inputID" /><br /><span class="Dot" id="ChangeTips"></span> <input class="inputSubmit" type="submit" value="修 改" /> <input class="inputSubmit" type="button" onclick="javascript:window.location.href='?Action=Logout'" value="退 出" /></form>
<%End If%>
</div>
<div class="Content" id="Reg" style="display:none"><form action="?Action=Reg" method="post" onsubmit="return RegFormCheck(this)"><center><strong>用 户 注 册 ...</strong></center>用 户 名:<input name="UserName" id="UserName" type="text" class="inputID" onblur="RegUserCheck()" /><span class="Dot">*</span><br />登录密码:<input name="Password" type="password" class="inputID" /><span class="Dot">*</span><br />重复密码:<input name="RePassword" type="password" class="inputID" /><span class="Dot">*</span><br />电子邮箱:<input name="Email" type="text" class="inputID" /><span class="Dot">*</span><br /><span class="Dot" id="RegTips"></span> <input class="inputSubmit" type="submit" value="注 册" /></form></div>
<div class="Fenge"><%=PPsite()%></div>
<%If User="" Then%>
<div class="Title"><h5>找回用户名/密码</h5></div>
<div class="Content" id="ForgotPwd"><form action="?Action=GetPassword" method="post"><input name="Email" type="text" class="inputID" value=" 您注册时填写的邮箱" onclick="javascript:if(value==' 您注册时填写的邮箱'){value='';}" onblur="javascript:if(value==''){value=' 您注册时填写的邮箱';}" /> <input class="inputSubmit" type="submit" value="提 交" /><br />密码将发送到您注册时填写的邮箱</form></div>
<div class="Fenge"></div>
<%Else%>
<div class="Title"><h5>信息搜索</h5></div>
<div class="Content"><form action="?" method="get" onsubmit="if (this.q.value==''){return false;}"> <input name="Action" type="hidden" value="List" />关键字 <input name="q" type="text" class="inputID" /> <input class="inputSubmit" type="submit" value="搜 索" /></form></div>
<div class="Fenge"></div>
<%End If%>
<div class="Title"><h5>版权声明</h5></div>
<div class="Content"><%=WebSiteName%><br />
Powered by <a title="爬爬思特工作室" href="Http://www.papasite.net" target="_blank">Papasite.Net</a></div>
<div class="Fenge"></div>
</div>
<div class="clear"></div>
</div>
</div></div>
<%End If
If Action="Save" Then
ID=Request.QueryString("ID")
UserID=Request.Form("UserID")
Title=Request.Form("Title")
Content=Request.Form("Content")
IsHide=Request.Form("IsHide")
IsValidEmail=False
Set regEx = New RegExp
regEx.Pattern="[\w\-\.]+@[A-Za-z0-9]+\.(([A-Za-z0-9]{2,4})|([A-Za-z0-9]{2,4}\.[A-Za-z]{2,4})|([A-Za-z0-9]{2,4}\.[A-Za-z0-9]{2,4}\.[A-Za-z]{2,4}))$"
IsValidEmail = regEx.Test(Trim(Title))
Set Rs=Nothing
If UserID<>"" Then
If IsNumeric(UserID) Then
SQL="Select * From [PPNBUser] Where [ID]="&UserID
Else
SQL="Select * From [PPNBUser] Where [NBUserName]='"&UserID&"'"
End If
Set Rs=PPConn.Execute(SQL)
If Rs.bof or Rs.eof Then
Response.Write(PPWrite("没有该“用户名/ID”",""))
Response.End()
Else
Tomail=Rs("Email")
MyName=Rs("NBUserName")
MyMail=Rs("Email")
End If
If IsValidEmail Then
Tomail=Title
Title=Rs("NBUserName")&"给您发来的邮件"
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -