clubFileEdit.jsp
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:2k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. <%@ page language="java" contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="../GVinc/gvInclude.jsp" %>
  3. <%@ include file="clubMasterPass.jsp" %>
  4. <jsp:useBean id="fo" scope="page" class="com.gamvan.tools.FileOperate" />
  5. <% 
  6. //权限判断共享代码
  7. boolean ispass = false;
  8. //ArrayEdit ae = new ArrayEdit();
  9. ispass = ae.txtsArray(gvcmgTxt,20,"|");
  10. if(!ispass){
  11. out.print(prtCenter2("您无权进行此项操作!","",2));
  12. out.close();
  13. }
  14. int type = 0;
  15. type = TypeChange.stringToInt(request.getParameter("type"));
  16. String fileContent = "";
  17. String filePathAndName=request.getRealPath("");
  18. if(type==2){
  19. filePathAndName += "\club\GVscriptInc\links.js";  //绝对路径
  20. }else if(type==1){
  21. filePathAndName += "\club\GVscriptInc\toplogo.js";  //绝对路径
  22. }else if(type==3){
  23. filePathAndName += "\club\GVscriptInc\topBar.js";  //绝对路径
  24. }
  25. else{
  26. filePathAndName += "\club\GVscriptInc\toplogo.js";  //绝对路径
  27. }
  28. if(request.getMethod().equals("POST")){
  29. fileContent = request.getParameter("fileContent");
  30. fo.createFile(filePathAndName,clubgb.gb(fileContent.toString()),"UTF-8");
  31. out.print(prtCenter2(filePathAndName+"<br><br>更新成功!","./clubFileEdit.jsp?type="+type+"",1));
  32. out.close();
  33. if(true)return;
  34. }
  35. fileContent = fo.readTxt(filePathAndName,"UTF-8");
  36. fileContent = fileContent.replaceAll("&","&amp;");
  37. %>
  38. <html>
  39. <head>
  40. <title>社区管理</title>
  41. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  42. <link href="css.css" rel="stylesheet" type="text/css">
  43. </head>
  44. <body>
  45. <table width="99%"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
  46.   <tr>
  47.     <td align="center"><strong>社区随机广告管理</strong></td>
  48.   </tr>
  49. </table>
  50. <table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#DDDDDD">
  51. <form name="Gforms" method="post" action="">
  52.   <tr>
  53.     <td width="100" bgcolor="#f6f6f6"><strong>文件内容</strong></td>
  54.     <td width="620" bgcolor="#f6f6f6">
  55. <textarea name="fileContent" cols="80" rows="20" id="fileContent">
  56. <%=fileContent%>
  57. </textarea>      </td>
  58.   </tr>
  59.   <tr>
  60.     <td bgcolor="#f6f6f6">&nbsp;</td>
  61.     <td bgcolor="#f6f6f6"><input name="gvSubmit" type="submit" id="gvSubmit" value="提交"></td>
  62.   </tr>
  63.   </form>
  64. </table>
  65. </body>
  66. </html>