You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
4.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ page language="java" import="java.util.*" contentType="text/html;charset=gb2312"%>
<%@ page language="java" import="com.fredck.FCKeditor.*" %>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK" %>
<jsp:useBean id="sn" scope="page" class="com.bean.SystemBean" />
<jsp:useBean id="newsb" scope="page" class="com.bean.NewsBean" />
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String dir=sn.getDir();
%>
<HTML><HEAD><TITLE>后台操作区</TITLE>
<LINK href="<%=basePath %><%=dir %>/images/Admin_Style.css" type=text/css rel=stylesheet>
<LINK href="<%=basePath %><%=dir %>/images/style.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="<%=path %>FCKeditor/fckeditor.js"></script>
<STYLE type=text/css>
BODY {
MARGIN-LEFT: 0px; BACKGROUND-COLOR: #ffffff
}
.STYLE1 {color: #ECE9D8}
</STYLE>
</HEAD>
<script type="text/javascript">
function sub()
{
if(document.form1.title.value.replace(/\s+$|^\s+/g,"").length<=0)
{
alert("请输入标题!");
document.form1.title.focus();
return false;
}
form1.submit();
}
</script>
<%
String message = (String)request.getAttribute("message");
if(message == null){
message = "";
}
if (!message.trim().equals("")){
out.println("<script language='javascript'>");
out.println("alert('"+message+"');");
out.println("</script>");
}
request.removeAttribute("message");
%>
<%
String username=(String)session.getAttribute("user");
if(username==null){
response.sendRedirect(path+"/error.jsp");
}
else{
String method=request.getParameter("method");
String title="";
String content="";
String id="";
if(method.equals("upNews")){
id=request.getParameter("id");
List newsList=newsb.getOneNews(Integer.parseInt(id));
title=newsList.get(1).toString();
content=newsList.get(3).toString();
}
%>
<BODY onload="document.form1.infoContent.value=document.form1.content.value" >
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align="left" vAlign=top ><form name="form1" action="<%=basePath %>NewsServlet" method="post" >
<table width='100%' cellspacing='1' cellpadding='3' bgcolor='#CCCCCC' class="tablewidth">
<tr class="head">
<td colspan="2">
<%
if(method.trim().equals("addNews")){
%>
添加 内容不能超过5000个字符
<%}else{%>
修改 内容不能超过5000个字符
<%} %>
</td>
</tr>
<tr bgcolor='#FFFFFF'> <input type="hidden" name="method" value="<%=method %>"> <input type="hidden" name="id" value="<%=id %>">
<td width='30%'><div align="right">信息标题:</div></td>
<td ><input name="title" type="text" id="title" size="40" maxlength="100" value="<%=title %>"></td>
</tr>
<tr bgcolor='#FFFFFF'>
<td width='30%'>
<div align="right">信息分类: </div>
</td>
<td bgcolor='#FFFFFF' ><select name=fenlei>
<option value="景点介绍">景点介绍</option>
<option value="酒店信息">酒店信息</option>
<option value="旅行社">旅行社</option>
</select></td>
</tr>
<tr bgcolor='#FFFFFF' align=center>
<td colspan="2" valign="top"><TEXTAREA style="display:none" NAME="content" ROWS="20" COLS="70"><%=content %></TEXTAREA>
<FCK:editor id="infoContent" basePath="/wsdc/FCKeditor/"
width="600"
height="400"
skinPath="/wsdc/FCKeditor/editor/skins/silver/"
defaultLanguage="zh-cn"
tabSpaces="8"
imageBrowserURL="/wsdc/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
linkBrowserURL="/wsdc/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
flashBrowserURL="/wsdc/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
imageUploadURL="/wsdc/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
linkUploadURL="/wsdc/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
flashUploadURL="/wsdc/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
</FCK:editor>
</td>
</tr>
<tr bgcolor='#FFFFFF'>
<td colspan="2" align="center">
<input class=mmcinb type='button' name='button' value='提交数据' onclick='sub()'>
</td>
</tr>
</table></form>
</TD>
</TR>
</TBODY>
</TABLE>
</BODY>
<%} %>
</HTML>