📄 editnews.jsp
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page language="java" import="java.util.*,hymn.web.*" %>
<%@ page errorPage="../error.jsp" %>
<%
Admin.chkLogin(session,request.getParameter("typeid")+"_edit");
News news = new News();
String news_id=request.getParameter("news_id");
int id=Integer.parseInt(news_id);
News listnews=news.loadnews(id);
Cata cata=new Cata();
Vector catalist = new Vector();
catalist = cata.listfcodecata();
Cata cataall= (Cata)catalist.elementAt(0);
%>
<html>
<head>
<title>添加资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" type="text/css" href="../images/style.css">
<script language=javascript>
function openwin(){ window.open("lanmu.jsp","","toolbar=0,location=0,status=0,menubar=0,resizable=0,scrollbars=1,top=100,left=150,width=400,height=250");
}
function isValid(form){
if(myform.news_title.value==""){
alert("标题不能为空!");
form.elements(0).focus();
return false;
}
else if(myform.content.value==""){
alert("内容不能为空!");
return false;
}
else {
return true;
}
}
</script>
</head>
<body onload="document.myform.doc_html.value=document.form2.content.value">
<div id="Layer1" style="position:absolute; left:583; top:508; width:1; height:1; z-index:1; visibility: hidden">
<form name="form2" method="post" action="">
<textarea name="content" id="content" rows="1" cols="1"><%=listnews.getnews_content()%></textarea>
</form>
</div>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%" bgcolor="#f2f8ff">
<tr>
<td width="15" class="td4"> </td>
<td width="725" colspan="2" align="center" class="td5"><font color="#0099FF"><b>修改资料<br>
</b></font> <hr align="center"> <font color="#0099FF"><b><br>
</b></font></td>
<td width="20" class="td6"> </td>
</tr>
<tr>
<td width="100%" colspan="4" class="td7" align="center"><form name="myform" method="post" action="editnewsok.jsp?pagenum=<%=request.getParameter("pagenum")%>" onsubmit="document.myform.content.value=document.myform.doc_html.value;return isValid(this);">
<input name="conten" type="hidden" id="conten" value="">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="99%">
<tr>
<td width="9%">栏目:</td>
<td width="91%" colspan="2">
<SELECT NAME="typeid">
<%for(int i=0;i<catalist.size();i++){
cataall=(Cata)catalist.elementAt(i);
%>
<option value="<%=cataall.getcata_code()%>" <%if(cataall.getcata_code().equals(listnews.getnews_typeid())){%>selected<%}%>><%=cataall.getcata_description()%></option>
<%}%>
</SELECT>
<font color="red">*</font></td>
</tr>
<tr>
<td width="9%">标题:</td>
<td width="91%" colspan="2"> <input name="news_title" type="text" id="news_title" size="50" value="<%=listnews.getnews_title()%>">
<font color="red">*</font></td>
</tr>
<tr>
<td width="9%">内容:</td>
<td width="91%" colspan="2"><INPUT TYPE="hidden" name="content"></td>
</tr>
<tr>
<td width="100%" colspan="3"> <OBJECT id=doc_html style="LEFT: 0px; TOP: 0px" data=editor.htm width=96%
height=322 type=text/x-scriptlet VIEWASTEXT>
</OBJECT> </td>
</tr>
<tr>
<td width="9%">上传:</td>
<td width="91%" colspan="2" bgcolor="#f2f8ff"> <iframe src="upfile.jsp" name="upfile" width="100%" height="20" align="left" scrolling="no" frameborder="0" class="unnamed1">此页使用了内帧,需更高版本的浏览器支持。</iframe></td>
</tr>
<tr>
<td width="9%">作者:</td>
<td width="91%" colspan="2"> <input name="author" type="text" id="zuozhe" size="50" value="<%=listnews.getnews_author()%>"></td>
</tr>
<tr>
<td width="9%">出处:</td>
<td width="91%" colspan="2"> <input name="writefrom" type="text" id="sour" size="50" value="<%=listnews.getnews_writefrom()%>"></td>
</tr>
<tr>
<td width="100%" colspan="3" align="center"> </td>
</tr>
<tr>
<td width="9%">
<INPUT TYPE="hidden" name="news_id" value="<%=news_id%>">
<INPUT TYPE="hidden" name="fpath" value="<%=listnews.getnews_pic()%>"></td>
<td width="45%" align="center"><input name="" type="submit" value="提交"> </td>
<td width="46%" align="center"><input name="" type="reset" value="重置"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -