📄 doc_fck_abstract.jsp
字号:
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="cn.js.fan.security.*"%>
<%@ page import="cn.js.fan.util.*"%>
<%@ page import="cn.js.fan.web.*"%>
<%@ page import="cn.js.fan.module.cms.*"%>
<%@ page import="cn.js.fan.module.pvg.Privilege"%>
<%@ page import="java.util.Calendar" %>
<%@ taglib uri="/WEB-INF/tlds/LabelTag.tld" prefix="lt" %>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="common.css" rel="stylesheet" type="text/css">
<link href="admin/default.css" rel="stylesheet" type="text/css">
<%
String correct_result = SkinUtil.LoadString(request,"info_op_success");
%>
<script>
function addform_submit() {
addform.content.value = oFCKeditor.Value;
}
function ClearAll(){
oFCKeditor.Value = " ";
}
function SubmitWithFile(){
var htmlcode = FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true );
if (htmlcode=="")
htmlcode = " ";
addform.webedit.Clear();
addform.webedit.AddField("id", addform.id.value);
addform.webedit.SetHtmlCode(htmlcode);
addform.webedit.UploadArticle();
if (addform.webedit.ReturnMessage == "<%=correct_result%>")
doAfter(true);
else
doAfter(false);
}
function SubmitWithoutFile(){
var htmlcode = FCKeditorAPI.GetInstance('FCKeditor1').GetXHTML( true );
if (htmlcode=="")
htmlcode = " ";
addform.webedit.Clear();
addform.webedit.UploadMode = 0;
addform.webedit.AddField("isuploadfile", "false");
addform.webedit.AddField("id", addform.id.value);
addform.webedit.SetHtmlCode(htmlcode);
addform.webedit.UploadArticle();
if (addform.webedit.ReturnMessage == "<%=correct_result%>")
doAfter(true);
else
doAfter(false);
}
function doAfter(isSucceed) {
if (isSucceed) {
alert("<%=correct_result%>");
window.location.reload(true);
}
else {
alert(addform.webedit.ReturnMessage);
}
}
</script>
<jsp:useBean id="strutil" scope="page" class="cn.js.fan.util.StrUtil"/>
<jsp:useBean id="docmanager" scope="page" class="cn.js.fan.module.cms.DocumentMgr"/>
<%
int id = 0;
Document doc = null;
String op = ParamUtil.get(request, "op");
id = ParamUtil.getInt(request, "id");
Privilege privilege = new Privilege();
doc = docmanager.getDocument(request, id, privilege);
LeafPriv lp = new LeafPriv(doc.getDirCode());
if (!lp.canUserModify(privilege.getUser(request))) {
out.print(StrUtil.makeErrMsg(privilege.MSG_INVALID));
return;
}
%>
<title><%=doc.getTitle()%></title>
<style type="text/css">
<!--
td { font-family: "Arial", "Helvetica", "sans-serif"; font-size: 14px; font-style: normal; line-height: 150%; font-weight: normal}
-->
</style>
<script type="text/javascript" src="FCKeditor/fckeditor.js"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<TABLE width="98%" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<TR valign="top" bgcolor="#FFFFFF">
<TD height="430" colspan="2" style="background-attachment: fixed; background-image: url(images/bg_bottom.jpg); background-repeat: no-repeat">
<form name="addform" action="/doc_abstract_do.jsp" method="post" onSubmit="return addform_submit()">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=head>
<lt:Label res="res.label.doc_abstract" key="abstract"/> <a href="fckwebedit.jsp?op=edit&id=<%=doc.getID()%>&dir_code=<%=StrUtil.UrlEncode(doc.getDirCode())%>"><lt:Label res="res.label.doc_abstract" key="return"/></a></TD>
</TR>
</TBODY>
</TABLE>
<table border="0" cellspacing="1" width="100%" cellpadding="0" align="center">
<tr align="center" bgcolor="#F2F2F2">
<td height="20" colspan=3 align=center><b><%=doc.getTitle()%></b>
<input type="hidden" name=id value="<%=doc.getID()%>">
</td>
</tr>
<tr align="center">
<td colspan="3" valign="top" bgcolor="#F2F2F2" class="unnamed2">
<textarea id="content" name="content" style="display:none">
</textarea>
<pre id="idTemporary" name="idTemporary" style="display:none">
<%=strutil.getNullString(doc.getSummary())%>
</pre>
<script type="text/javascript">
<!--
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = 'FCKeditor/' ;
oFCKeditor.Value = document.getElementById("idTemporary").innerHTML;
oFCKeditor.Height = 400 ;
oFCKeditor.Create() ;
//-->
</script>
</td>
</tr>
<tr>
<td width="13%" align="right" bgcolor="#FFFFFF"><lt:Label res="res.label.doc_abstract" key="notice"/></td>
<td width="87%" colspan="2" bgcolor="#FFFFFF">
<lt:Label res="res.label.doc_abstract" key="enter_can_be_used"/>Shift+Enter </td>
</tr>
<tr>
<td height="25" colspan=3 align="center" bgcolor="#FFFFFF"><table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF"><%
Calendar cal = Calendar.getInstance();
String year = "" + (cal.get(cal.YEAR));
String month = "" + (cal.get(cal.MONTH) + 1);
String filepath = "upfile/webeditimg/" + year + "/" + month;
%>
<object classid="CLSID:DE757F80-F499-48D5-BF39-90BC8BA54D8C" codebase="<%=request.getContextPath()%>/activex/webedit.cab#version=4,0,1,1" width=400 height=173 align="middle" id="webedit">
<param name="Encode" value="utf-8">
<param name="MaxSize" value="<%=Global.MaxSize%>">
<!--上传字节-->
<param name="ForeColor" value="(0,255,0)">
<param name="BgColor" value="(0,0,0)">
<param name="ForeColorBar" value="(255,255,255)">
<param name="BgColorBar" value="(0,0,255)">
<param name="ForeColorBarPre" value="(0,0,0)">
<param name="BgColorBarPre" value="(200,200,200)">
<param name="FilePath" value="<%=filepath%>">
<!--上传后的文件需放在服务器上的路径-->
<param name="Server" value="<%=request.getServerName()%>">
<param name="Port" value="<%=request.getServerPort()%>">
<param name="VirtualPath" value="<%=Global.virtualPath%>">
<param name="PostScript" value="<%=Global.virtualPath%>/doc_abstract_do.jsp">
<param name="InternetFlag" value="<%=Global.internetFlag%>">
</object></td>
</tr>
</table></td>
</tr>
<tr>
<td height="32" colspan=3 align=center bgcolor="#FFFFFF">
<input name="Submit" type="button" class="singleboarder" value=" <%=SkinUtil.LoadString(request,"commit")%> " onClick="return SubmitWithFile()">
<input name="Submit" type="button" class="singleboarder" value=" <%=SkinUtil.LoadString(request,"res.label.doc_abstract","submmit_not_upload_file")%> " onClick="return SubmitWithoutFile()"> (<%=SkinUtil.LoadString(request,"res.label.doc_abstract","abstract_donot_support_upload_attach")%>)</td>
</tr>
</table>
</form>
<br></TD>
</TR>
</TABLE>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -