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

📄 edit.asp

📁 视频源代码 视频源代码
💻 ASP
字号:
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>易影中国 >> 系统管理 >> 编辑源代码</title>
<style>
body{margin:0px;scrollbar-face-color:buttonface;scrollbar-highlight-color:buttonface;scrollbar-shadow-color:buttonface;scrollbar-3dlight-color:buttonhighlight;scrollbar-arrow-color:#797979;scrollbar-track-color:#EEEEEE;scrollbar-darkshadow-color:buttonshadow}
body,a,table,div,span,td,th,input,select{font:9pt;font-family: "宋体", Verdana, Arial, Helvetica, sans-serif;}
.text{border:1 solid buttonface;background-color:buttonhighlight}
.button{height:18;border:1 ridge buttonhighlight;background-color:buttonface}
#do{background-color:ffffff;color:FF8000;text-align:center;width:8pt;height:8pt;corsur:hand}
#box{width:9pt;height:9pt;}
</style>
<body onSelectStart="event.returnValue=false;" onConTextMenu="event.returnValue=false">
<%if Session("admin")="" then%>
<table border=0 cellPadding=0 cellSpacing=0 height="100%" width="100%">
  <tbody>
  <tr><td align=middle>

<table border="0" cellpadding="3" cellspacing="2" width="200" align="center" bgcolor="EAEAEA">
  <form name="form" method="post" action="default.asp">
  <tr><th bgcolor="AAAAAA" colspan="2">管 理 员 登 陆</td></tr>
  <tr><td>用户名</td><td><input class="text" type="text" name="adminname"></td></tr>
  <tr><td>口 令</td><td><input class="text" type="Password" name="adminpass"></td></tr>
  <tr><td></td><td align="center">
    <input class="button" type="submit" value="登 陆">
    <input class="button" type="reset" value="取 消">
  </td></tr>
  </form>
</table>
<br><br><br>
<table>
  <tr><td>
<b>本软件声明:</b><br><br>
  ·本软件本身不含攻击性及违反当地法规、国家法律和国际法律的资料。<br><br>
  ·凡使用本软件必须遵守有关法律,自觉约束使用行为。<br><br>
  ·不能使用本软件进行他人服务器破坏活动。<br><br>
  ·未经资料所有人允许,不能使用本软件进行资料复制、修改或删除行为。<br><br>
  ·非法使用本软件进行破坏行为、非法行为及违反法律行为,都与本软件作者无关。<br><br>
  </td></tr>
  <tr><td height="50" align=right>
Copyright &copy; 2001~2002 <a href="http://www.zwcity.com" style="color:0000FF">ZWCITY.COM</a> 易影中国. All rights reserved.
  </td></tr>
</table>

  </td></tr>
</table>
<%Response.end
  end if

  ON ERROR RESUME NEXT

  Server.ScriptTimeout = 9999999

  Function IsObjInstalled(strClassString)
    On Error Resume Next
    IsObjInstalled = False
    Err = 0
    Dim xTestObj
    Set xTestObj = Server.CreateObject(strClassString)
    If 0 = Err Then IsObjInstalled = True
    Set xTestObj = Nothing
    Err = 0
  End Function

  Function htmlencode(str)
    dim result
    dim l
    if isNULL(str) then 
      htmlencode=""
      exit function
    end if
    l=len(str)
    result=""
    dim i
    for i = 1 to l
      select case mid(str,i,1)
        case "<":result=result+"&lt;"
        case ">":result=result+"&gt;"
        case chr(34):result=result+"&quot;"
        case "&":result=result+"&amp;"
        case else:result=result+mid(str,i,1)
      end select
    next 
    htmlencode=result
  End Function

  if not IsObjInstalled("Scripting.FileSystemObject") then
    response.write "您使用的服务器不支持FSO!"
    response.end
  end if

Set fso = CreateObject("Scripting.FileSystemObject")

filepath=Replace(Replace(Request("path"),"\\","\"),"%20"," ")
if filepath="" then
  response.write "请指定修改的文件!"
  response.end
end if

if request("op")="save" then
  Set f = fso.CreateTextFile(filepath)
  f.WriteLine Request("content")
  f.close 
  Set f = nothing
  Set f = fso.GetFile(filepath)
  f.attributes = CCur(Request("readonly"))+CCur(Request("write"))+CCur(Request("system"))+CCur(Request("hidden"))
  Set f = nothing
end if

if fso.FileExists(filepath)=true then
  Set f = fso.OpenTextFile(filepath)
  content=htmlencode(f.readall)
  f.Close
  Set f = nothing
  Set f = fso.GetFile(filepath)
  attrib=f.Attributes
  Set f = nothing
end if

Set fso = nothing
%>
<table cellpadding="0" cellspacing="1" width="100%" height="100%" bgcolor="F5F5F5">
  <tr><td height="20" bgcolor="DADADA" onclick="parent.hiddenmenu();">&nbsp;<b>修改文件</td></tr>
<form method="POST" action="edit.asp?op=save" autocomplete="off">
  <tr><td height="20"><input class="text" type="text" name="path" value="<%=filepath%>" style="width:100%"></td></tr>
  <tr><td><textarea class="text" name="content" style="width:100%;height:100%"><%=content%></textarea></td></tr>
  <tr><td height="20" align=right>
<script>
var Attrib='<%=attrib%>';
html=  '    <table cellpadding="0" cellspacing="0" width="100%">'+
       '    <tr><td><input id="box" type="checkbox" name="readonly" value="1"';
  if (Attrib==1 || Attrib==3 || Attrib==5 || Attrib==7 || Attrib==33|| Attrib==35|| Attrib==37|| Attrib==39) html+=' checked';
  html+='></td><td>只读&nbsp;</td><td><input id="box" type="checkbox" name="hidden" value="2"';
  if (Attrib==2 || Attrib==3 || Attrib==6 || Attrib==7 || Attrib==34|| Attrib==35|| Attrib==38|| Attrib==39) html+=' checked';
  html+='></td><td>隐含&nbsp;</td><td><td><input id="box" type="checkbox" name="write" value="32"';
  if (Attrib==32|| Attrib==33|| Attrib==34|| Attrib==35|| Attrib==36|| Attrib==37|| Attrib==38|| Attrib==39) html+=' checked';
  html+='></td><td>存档&nbsp;</td><td><input id="box" type="checkbox" name="system" value="4"';
  if (Attrib==4 || Attrib==5 || Attrib==6 || Attrib==7 || Attrib==36|| Attrib==37|| Attrib==38|| Attrib==39) html+=' checked';
  html+='></td><td>系统&nbsp;</td><td><td align=right><input class="button" type="submit" value=" 提 交 "></td></tr>'+
       '    </table>';
document.write(html);
</script>
  </td></tr>
</form>
</table>
</body>
</html>

⌨️ 快捷键说明

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