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.
93 lines
3.8 KiB
93 lines
3.8 KiB
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
|
|
<%@page import="util.Info"%>
|
|
<%@page import="dao.CommDAO"%>
|
|
<%@page import="util.PageManager"%>
|
|
<%
|
|
String lb="通知公告";
|
|
if("1".equals(request.getParameter("lb"))){
|
|
lb="通知公告";
|
|
}else if("2".equals(request.getParameter("lb"))){
|
|
lb="健身资讯";
|
|
}else if("3".equals(request.getParameter("lb"))){
|
|
lb="饮食健康";
|
|
}else if("4".equals(request.getParameter("lb"))){
|
|
lb="变幻图";
|
|
}
|
|
|
|
|
|
//String lb=new String(request.getParameter("lb").getBytes("8859_1"));
|
|
|
|
HashMap ext = new HashMap();
|
|
//ext.put("issh","否");
|
|
new CommDAO().insert(request,response,"xinwentongzhi",ext,true,false,"xinwentongzhi_add.jsp?lb="+lb);
|
|
%>
|
|
<html>
|
|
<head>
|
|
|
|
<title>新闻通知</title>
|
|
<LINK href="css.css" type=text/css rel=stylesheet>
|
|
<link rel="stylesheet" href="kindeditor_a5/themes/default/default.css" />
|
|
<link rel="stylesheet" href="kindeditor_a5/plugins/code/prettify.css" />
|
|
<script charset="utf-8" src="kindeditor_a5/kindeditor.js"></script>
|
|
<script charset="utf-8" src="kindeditor_a5/lang/zh_CN.js"></script>
|
|
<script charset="utf-8" src="kindeditor_a5/plugins/code/prettify.js"></script>
|
|
<script>
|
|
KindEditor.ready(function(K) {
|
|
var editor1 = K.create('textarea[name="neirong"]', {
|
|
cssPath : 'kindeditor_a5/plugins/code/prettify.css',
|
|
uploadJson : 'kindeditor_a5/jsp/upload_json.jsp',
|
|
fileManagerJson : 'kindeditor_a5/jsp/file_manager_json.jsp',
|
|
allowFileManager : true,
|
|
afterCreate : function() {
|
|
var self = this;
|
|
K.ctrl(document, 13, function() {
|
|
self.sync();
|
|
document.forms['example'].submit();
|
|
});
|
|
K.ctrl(self.edit.doc, 13, function() {
|
|
self.sync();
|
|
document.forms['example'].submit();
|
|
});
|
|
}
|
|
});
|
|
prettyPrint();
|
|
});
|
|
</script>
|
|
|
|
</head>
|
|
<script language="javascript">
|
|
function check()
|
|
{
|
|
if(document.form1.biaoti.value==""){alert("请输入标题");document.form1.biaoti.focus();return false;}if(document.form1.leibie.value==""){alert("请输入类别");document.form1.leibie.focus();return false;}if(document.form1.tianjiaren.value==""){alert("请输入添加人");document.form1.tianjiaren.focus();return false;}if(document.form1.dianjilv.value==""){alert("请输入点击率");document.form1.dianjilv.focus();return false;}
|
|
}
|
|
|
|
</script>
|
|
<%
|
|
|
|
%>
|
|
<body >
|
|
<form action="xinwentongzhi_add.jsp?f=f" method="post" name="f1" onsubmit="return checkform();">
|
|
添加数据:
|
|
<br><br>
|
|
<table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#00FFFF" style="border-collapse:collapse">
|
|
<tr><td>标题:</td><td><input name='biaoti' type='text' id='biaoti' value='' size='50' /> *</td></tr>
|
|
<tr><td>类别:</td>
|
|
<td><input name="leibie" type="text" id="leibie" value="<%=lb%>"> <input name="lb" type="hidden" id="lb" value="<%=lb%>">
|
|
* </td>
|
|
</tr>
|
|
<tr><td>内容:</td><td><textarea name="neirong" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;"></textarea></td></tr>
|
|
<tr><td>添加人:</td><td><input name='tianjiaren' type='text' id='tianjiaren' value='<%=request.getSession().getAttribute("username")%>' /> *</td></tr>
|
|
<tr><td>首页图片:</td><td><input name='shouyetupian' type='text' id='shouyetupian' size='50' value='' /> <input type='button' value='上传' onClick="up('shouyetupian')"/></td></tr>
|
|
<tr><td>点击率:</td><td><input name='dianjilv' type='text' id='dianjilv' value='1' /> *</td></tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td><input type="submit" name="Submit" value="提交" onClick="return check();" />
|
|
<input type="reset" name="Submit2" value="重置" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
</body>
|
|
</html>
|
|
<script type="text/javascript" src="js/popup.js"></script>
|