eWebEditor.jsp
上传用户:sdtxjx
上传日期:2022-07-09
资源大小:2937k
文件大小:6k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=GBK" %>
  2. <%@ page import="net.fiyu.edit.EditWebhelper,net.fiyu.edit.EditBean"%>
  3. <%@ include file="admin/Session.jsp"%>
  4. <%
  5. String  sContentID,
  6.          sStyleID,
  7.          sFullScreen,
  8.          sStyleName,
  9.                sStyleDir,
  10.              sStyleCSS,
  11.                sStyleUploadDir,
  12.                nStateFlag,
  13.                sDetectFromWord,
  14.                sInitMode,
  15.                sBaseUrl,
  16.                sVersion,
  17.                sReleaseDate,
  18. sAutoRemote,
  19.                sToolBar;
  20. EditWebhelper web = new EditWebhelper();
  21. //初始化处理bean
  22. web.filename = config.getServletContext().getRealPath("/")+"WEB-INF/style.xml";
  23. web.filename2 = config.getServletContext().getRealPath("/")+"WEB-INF/button.xml";
  24. web.getInstance();
  25. //初始化输出bean
  26. EditBean bean = web.InitPara();
  27. sVersion = bean.getSVersion();
  28. sReleaseDate = bean.getSReleaseDate();
  29. sStyleName = bean.getSStyleName();
  30. sStyleDir = bean.getSStyleDir();
  31. sStyleUploadDir = bean.getSStyleUploadDir();
  32. sInitMode = bean.getSInitMode();
  33. sDetectFromWord = bean.getSDetectFromWord();
  34. sBaseUrl = bean.getSBaseUrl();
  35. sAutoRemote = bean.getSAutoRemote();
  36. sToolBar = bean.getSToolBar();
  37. nStateFlag = bean.getNStateFlag();
  38. //设置颜色样式
  39. sStyleCSS = request.getParameter("style");
  40.                 if (sStyleCSS == null)
  41.                  sStyleCSS = "CoolBlue";
  42.                 else
  43.                 sStyleCSS = request.getParameter("style").trim();
  44.                 //设置全屏幕选项
  45.                 sFullScreen = request.getParameter("fullscreen");
  46.                 if (sFullScreen == null)
  47.                  sFullScreen = "0";
  48.                 else
  49.                 sFullScreen = request.getParameter("fullscreen").trim();
  50.                 //设置内容选项
  51.                 sContentID = request.getParameter("id");
  52.                 if (sContentID == null)
  53.                  sContentID = "content1";
  54.                 else
  55.                 sContentID = request.getParameter("id").trim();
  56.                 //设置样式
  57.                 sStyleName = request.getParameter("style");
  58.                 if (sStyleName == null)
  59.                  sStyleName = "CoolBlue";
  60.                 else
  61.                 sStyleName = request.getParameter("style").trim();
  62.  %>
  63. <html>
  64. <head>
  65. <title>eWebEditor - eWebSoft在线文本编辑器</title>
  66. <meta http-equiv="Content-Type" content="text/html; charset=GBK">
  67. <link href="css/<%=sStyleCSS%>/Editor.css" type="text/css" rel="stylesheet">
  68. <Script Language=Javascript>
  69. var sPath = document.location.pathname;
  70. sPath = sPath.substr(0, sPath.length-14);
  71. var sLinkFieldName = "<%=sContentID%>" ;
  72. // 全局设置对象
  73. var config = new Object() ;
  74. config.Version = "<%=sVersion%>" ;
  75. config.ReleaseDate = "<%=sReleaseDate%>" ;
  76. config.StyleName = "<%=sStyleName%>";
  77. config.StyleEditorHeader = "<head><link href=""+sPath+"css/<%=sStyleCSS%>/EditorArea.css" type="text/css" rel="stylesheet"></head><body MONOSPACE>" ;
  78. config.StyleMenuHeader = "<head><link href=""+sPath+"css/<%=sStyleCSS%>/MenuArea.css" type="text/css" rel="stylesheet"></head><body scroll="no" onConTextMenu="event.returnValue=false;">";
  79. config.StyleDir = "<%=sStyleDir%>";
  80. config.StyleUploadDir = "<%=sStyleUploadDir%>";
  81. config.InitMode = "<%=sInitMode%>";
  82. config.AutoDetectPasteFromWord = <%=sDetectFromWord%>;
  83. config.BaseUrl = <%=sBaseUrl%>;
  84. config.AutoRemote = <%=sAutoRemote%>;
  85. </Script>
  86. <Script Language=Javascript src="include/editor.js"></Script>
  87. <Script Language=Javascript src="include/table.js"></Script>
  88. <Script Language=Javascript src="include/menu.js"></Script>
  89. <script language="javascript" event="onerror(msg, url, line)" for="window">
  90. //return true ;  // 隐藏错误
  91. </script>
  92. </head>
  93. <body SCROLLING=no onConTextMenu="event.returnValue=false;" onfocus="VerifyFocus()">
  94. <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>
  95. <tr><td>
  96. <%=sToolBar%>
  97. </td></tr>
  98. <tr><td height='100%'>
  99. <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>
  100. <tr><td height='100%'>
  101. <input type="hidden" ID="ContentEdit" value="">
  102. <input type="hidden" ID="ContentLoad" value="">
  103. <input type="hidden" ID="ContentFlag" value="0">
  104. <iframe class="Composition" ID="eWebEditor" MARGINHEIGHT="1" MARGINWIDTH="1" width="100%" height="100%" scrolling="yes">
  105. </iframe>
  106. </td></tr>
  107. </table>
  108. </td></tr>
  109. <% if(nStateFlag.equals("1")){ %>
  110. <tr><td height=25>
  111. <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%" class=StatusBar height=25>
  112. <TR valign=middle>
  113. <td>
  114. <table border=0 cellpadding=0 cellspacing=0 height=20>
  115. <tr>
  116. <td width=10></td>
  117. <td class=StatusBarBtnOff id=eWebEditor_CODE onclick="setMode('CODE')"><img border=0 src="buttonimage/<%=sStyleDir%>/modecode.gif" width=50 height=15 align=absmiddle></td>
  118. <td width=5></td>
  119. <td class=StatusBarBtnOff id=eWebEditor_EDIT onclick="setMode('EDIT')"><img border=0 src="buttonimage/<%=sStyleDir%>/modeedit.gif" width=50 height=15 align=absmiddle></td>
  120. <td width=5></td>
  121. <td class=StatusBarBtnOff id=eWebEditor_VIEW onclick="setMode('VIEW')"><img border=0 src="buttonimage/<%=sStyleDir%>/modepreview.gif" width=50 height=15 align=absmiddle></td>
  122. </tr>
  123. </table>
  124. </td>
  125. <td align=right>
  126. <table border=0 cellpadding=0 cellspacing=0 height=20>
  127. <tr>
  128. <td style="cursor:pointer;" onclick="sizeChange(300)"><img border=0 SRC="buttonimage/<%=sStyleDir%>/sizeplus.gif" width=20 height=20 alt="增高编辑区"></td>
  129. <td width=5></td>
  130. <td style="cursor:pointer;" onclick="sizeChange(-300)"><img border=0 SRC="buttonimage/<%=sStyleDir%>/sizeminus.gif" width=20 height=20 alt="减小编辑区"></td>
  131. <td width=40></td>
  132. </tr>
  133. </table>
  134. </td>
  135. </TR>
  136. </Table>
  137. </td></tr>
  138. <% } %>
  139. </table>
  140. <div id="eWebEditor_Temp_HTML" style="VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px"></div>
  141. <form id="eWebEditor_UploadForm" action="upload.jsp?action=remote&type=remote&style=<%=sStyleName%>" method="post" target="eWebEditor_UploadTarget">
  142. <input type="hidden" name="eWebEditor_UploadText">
  143. </form>
  144. <iframe name="eWebEditor_UploadTarget" width=0 height=0></iframe>
  145. <div id=divProcessing style="width:200px;height:30px;position:absolute;display:none">
  146. <table border=0 cellpadding=0 cellspacing=1 bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor=#3A6EA5><marquee align="middle" behavior="alternate" scrollamount="5" style="font-size:9pt"><font color=#FFFFFF>...远程文件收集中...请等待...</font></marquee></td></tr></table>
  147. </div>
  148. </body>
  149. </html>