基于用户的新闻系统!之九
管理员管理新闻文件!
文件名:newsedit.jsp.jsp
<%@page contentType="text/html;charset=gb2312" %>
<%@include file=
"inc.jsp"%>
<%
String uID=(String)session.getAttribute(
"uID1");
if (uID.equals(
"mimi"))
{%>
<link rel=stylesheet href=
"images/grass.css" type="text/css"]
<Script language=
"JavaScript"]
//打开新窗口函数NewsWindow
function NewsWindow(id)
{
window.open('newswind.jsp?id='+id,'infoWin', 'height=400,width=600,scrollbars=yes,resizable=yes');
}
</Script>
<body >
[div id=container><!-- ============================================================ --><!-- Begin topBanner -->
[div id=logo><IMG height=60 src=
"images/showimage.jpg" width=780>[/div]<!-- End topBanner --><!-- ============================================================ -->
[div id=center>
[div class=content><!-- ============================================================ --><!-- Begin panel3 Body -->
[div class=postTitle>

<%

out.println(
" <MARQUEE behavior=alternate scrollAmount=3 width='100%'><font color=#ffffff size=3>"+uID+"[/font>");
out.println(
"</font></MARQUEE>");

%> [/div]
[div class=postText>
<%

sql=
"select * from new_sz order by id desc ";
rs=apple.select(sql);
%>
<html>
<head>
<title>留言测试</title>
</head>
<body>
<table border=0 align='center' width='80%'>
<tr>
<td>编号</td>
<td>主题</td>
<td>作者</td>
<td>时间</td>
<td>编辑</td>
<td>删除</td>
</tr>
<%
while(rs.next() )
{
%>
<tr>
<td><%=rs.getString(
"id")%></td>
<td>
<a href=
"javascript:NewsWindow(<%=rs.getInt("ID")%>)"]<u>
<%String title=rs.getString(
"title");
title=new String(title.getBytes(
"ISO-8859-1"),"GB2312" );
%><%=title%></u></td>
<td><%String author=rs.getString(
"author");
author=new String(author.getBytes(
"ISO-8859-1"),"GB2312" );
%><%=author%>
</td>
<td>
<%=rs.getString(
"Date")%>
</td>
<td>
<a href=newsedit2.jsp?id=<%=rs.getInt(
"ID")%>>编辑[/url]
</td>
<td>
<a href=delete.jsp?id=<%=rs.getInt(
"ID")%>>del[/url]

</td>
</tr>
<%
}


}
else
out.println(
":( 没有权限!!");
apple. closeConn();
%>
</table>

[/div]


<!-- End panel3
-->[/div][/div]<!-- ============================================================ -->
[div id=right>
[div class=sidebar>
<H2>导航 </H2>

<!-- End panel2 --><!-- ============================================================ --></LI>[/div][/div]<!-- ============================================================ --><!-- Begin footer -->
[div id=powered> 2004, 卓达经济管理学院 [/div]<!-- End footer --><!-- ============================================================ -->[/div]</BODY></HTML>
lunzi   2004-12-04 21:21:19 评论:0   阅读:1080   引用:0

发表评论>>

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

姓名:

主题:

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

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

Copyright@2004-2010 powered by YuLog