基于用户的新闻系统!之十一
管理员更改新闻文件!
文件名:newsedit2.jsp
<%@ page contentType="text/html;charset=GBK" %>
<%@ include file=
"inc.jsp" %>
<%!
String id =
"";
String title =
"";
String content =
"";
String keyw =
"";
String author =
"";
%>
<link rel=
"stylesheet" type="text/css" href="news.css"]
<%
// 下面主要是为了进行显示
if(request.getParameter(
"id") != null) {
id = request.getParameter(
"id");
sql=
"select * from new_sz where id=" + request.getParameter("id");
rs=apple.select(sql);
if(rs.next()) {
title = rs.getString(
"title");
content = rs.getString(
"content");
keyw = rs.getString(
"keyw");
author = rs.getString(
"author");
rs.close();
%>
<form name=form1 method=
"post" action="savenews.jsp"]
<input value=
"<%=id%>" type=hidden name=id>
<p align=
"center">标 题:<INPUT size=95 name=title value=<%=title%>></p>
<p align=
"center">内 容:<TEXTAREA cols=73 name=content rows=15><%=content%></TEXTAREA></p>
<p align=
"center">关键字:<INPUT size=25 name=keyw value=<%=keyw%>>
 作者:
 <INPUT size=25 name=author value=<%=author%>> 
<p align=
"center">
<INPUT class=buttonface type=submit value=
" 确 定 "]
<INPUT class=buttonface type=reset value=
" 清 除 "]</p>
</form>
<%
} else {
out.println(
"<hr>");
out.println(
"<center>非法的id号!</center>");
out.println(
"<hr>");
}
}
%>
</BODY>
</HTML>

lunzi   2004-12-04 21:25:44 评论:0   阅读:1182   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2004-2010 powered by YuLog