📄 editarticleover.jsp
字号:
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="../incoming/common.jsp"%>
<%@ include file="../incoming/connectdb.jsp"%>
<%@ include file="../incoming/codefilter.jsp"%>
<%@ include file="../incoming/check.jsp"%>
<html>
<head>
<meta HTTP-EQUIV=REFRESH CONTENT='4; URL=main.jsp'>
<title><%=title%>管理</title>
<link href="../incoming/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
try{
String newstitle = new String(request.getParameter("newstitle").getBytes("ISO8859_1"),"GBK");
String newsbody = new String(request.getParameter("newsbody").getBytes("ISO8859_1"),"GBK");
int id = Integer.parseInt(request.getParameter("id"));
sql = "UPDATE article SET TITLE=?, BODY=? WHERE ID=?";
PreparedStatement prepstmt = null;
prepstmt=con.prepareStatement(sql);
prepstmt.setBytes(1,newstitle.getBytes("GB2312"));
prepstmt.setBytes(2,(toHtml(newsbody)).getBytes("GB2312"));
prepstmt.setInt(3,id);
prepstmt.executeUpdate();
}
catch(Exception e){
out.println("错误信息:"+e.getMessage());
}
%>
<table width=381 border="1" align=center cellpadding=0 cellspacing=0 bordercolor="#CCCCCC">
<tr height=25>
<td width="391" align=center bgcolor="#999999"><font color=red><B>新闻修改成功</B></font></td>
</tr>
<tr class="text"><td align=center ><BR>
本页面将在<b><span id=last>3</span><a href=javascript:countDown></a></b>秒钟后自动返回管理主页,您可以选择以下操作:<BR>
<BR>
<a href="../index.jsp">返回首页</a><br>
<a href='addarticle.jsp'>继续发布新闻</a> </TD>
</tr>
</table>
<script>
function
countDown(secs){last.innerText=secs;if(--secs>0)setTimeout("countDown("+secs+")",1000);}countDown(3);
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -