?? edit.jsp
字號:
<%@ page language="java" pageEncoding="gbk"%>
<%@ include file="conf.jsp"%>
<%
//文件管理系統 V1.0
//2009-2-17
//woody_2006@163.com
String action = request.getParameter("action");
String file = new String(request.getParameter("file").getBytes("iso-8859-1"),"GBK");
if("update".equals(action))
{
String code = new String(request.getParameter("code").getBytes("iso-8859-1"),"GBK");
FileUtil.deleteFile(file);
FileUtil.createFile(file,code);
out.println(Tool.makeSimpleMsg("文件保存成功!"));
}
String code = FileUtil.readFile2String(file);
String top = "";
if(!Tool.isEmp(file))
{
String[] tmp = file.split("/");
if(tmp.length>1)
{
for(int i=0;i<tmp.length-1;i++)
top += tmp[i]+"/";
}
}
%>
<html>
<head>
<title>文件管理系統 V1.0 by woody_2006@163.com</title>
<link href="skin_1/style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<form action="" target=_self method="post">
<input type=hidden value="<%=file%>" name="file"/>
<input type=hidden value="update" name="action"/>
<br/><p align=center><font size="3"><b>文件管理系統 V1.0</b></font></p>
<table id="tablehovered1" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr>
<th height="25" >
文件編輯器
</th>
</tr>
<tr>
<td width="15%" height="30" class="tablerow2">
文件源代碼
</td>
</tr>
<tr>
<td width="15%" height="30" class="tablerow1" align=center>
<textarea rows="30" cols="155" name="code"><%=code%></textarea>
</td>
</tr>
</table>
<p align=center><input type="submit" value=" 保 存 " class="button"/>
<input type=button onclick="location.href='index.jsp?parent=<%=top%>'" value=" 返 回 " class="button"/></p>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -