基于用户的新闻系统!之七
登陆后发表新闻的文件!发布新闻文件之一
文件名:newsadd.jsp.jsp

<LINK href="news/css/gbook.css" rel=stylesheet>
<%@page contentType=
"text/html;charset=gb2312" %>
<%@ include file=
"inc.jsp"%>
<%
String uID=(String)session.getAttribute(
"uID1");
if(uID==null){
out.println(
"<center>您还没有<a href='logins.jsp'>登录[/url]或者您已经超时!<center>");
response.sendRedirect(
"login.jsp");
}
else
{
%>
<link rel=stylesheet href=
"images/grass.css" type="text/css"]
<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>[/url]<%
if (uID!=null ){
out.println(
":)"+uID+"您可以留言!");
}
else{
out.println(
"对不起,您还没有<a href=logins.jsp>登录[/url]!还不能留言!!");
}
%> [/div]
[div class=postText>
<form method=
"post" name="rcchok1" action="insnews.jsp" onsubmit="javascript:return Juge(this);"]
<SCRIPT language=JavaScript>
function Juge(theForm)
{
if (theForm.content.value ==
"")
{
alert(
"请尊重自己的话语权");
theForm.content.focus();
return (false);
}
if (theForm.content.value.length <3)
{
alert(
"你写的内容太短!");
theForm.content.focus();
return (false);
}
}
</script>
<font color=
"#3333FF">标题:</font>
<input type=
"text" name="title"]<br>
<font color=
"#3333FF">关键字: </font>
<input type=
"text" name="keyw" size="20"]<br>
<input type=
"hidden" name="author" size="21" value="<%=uID%>"]
<font color=
"#3333FF">内容:</font>
<textarea name=
"content" cols="50" rows="9"]</textarea>
<input type=
"submit" name="submit" value="提交"]
<input type=
"reset" name="reset" value="重写"]
<BR>
</form>[/div]
<!-- End panel3
-->[/div][/div]<!-- ============================================================ -->
[div id=right>
[div class=sidebar>
<H2>导航 </H2>
<!-- GuestBook -->
<H2>留言薄 </H2>


<!-- End panel2 --><!-- ============================================================ --></LI>[/div][/div]<!-- ============================================================ --><!-- Begin footer -->
[div id=powered>2004, 卓达经济管理学院 [/div]<!-- End footer --><!-- ============================================================ -->[/div]<%}%>
</BODY></HTML>


lunzi   2004-12-04 21:12:32 评论:0   阅读:3701   引用:0

发表评论>>

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

姓名:

主题:

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

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

Copyright@2004-2010 powered by YuLog