📄 newsmodify.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<%@page import = "java.util.*"%>
<%@page import = "model.newspress.hibernate.*"%>
<%
request.setCharacterEncoding("gb2312");
Newspress newspress = (Newspress)session.getAttribute("newspress");
%>
<%@ include file="..\taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>NEWS ONLINE</title>
</head>
<body>
<form name="form1" method="post" action="/EMIS/newsmodify.do?id=<%=newspress.getId()%>">
<html:errors/>
<table width="543" height="326" border="0" align="center">
<tr bgcolor="#DFDFFF">
<td height="21" colspan="2"><div align="center">新闻管理--修改</div></td>
</tr>
<tr bgcolor="#FFFFCA">
<td width="97" height="20"><div align="right"><span class="TitleColor">标题</span></div></td>
<td width="436"><div align="left"><span class="TitleColor">
<input name="title" type="text" id="title" value="<%=newspress.getTitle()%>" maxlength="100">
</span></div></td>
</tr>
<tr bgcolor="#FFFFCA">
<td height="18"><div align="right"><span class="TitleColor">作者</span></div></td>
<td><div align="left"><span class="TitleColor">
<input name="author" type="text" id="author" value="<%=newspress.getAuthor()%>" maxlength="100">
</span></div></td>
</tr>
<tr bgcolor="#FFFFCA">
<td height="23"><div align="right"><span class="TitleColor">时间</span></div></td>
<td><div align="left"><span class="TitleColor">
<select name="year" id="year">
<%
String[] year = {
"2011", "2010", "2009",
"2008", "2007", "2006",
"2005", "2004", "2003",
"2002", "2001", "2000",
"1999", "1998", "1997",
"1996", "1995", "1994",
"1993", "1992", "1991",
};
String y = newspress.getPresstime().substring(0, 4);
for (int i=0; i<year.length; i++) {
if (year[i].equals(y)) {
%>
<option value=<%=year[i]%> selected><%=year[i]%></option>
<%
} else {
%>
<option value=<%=year[i]%>><%=year[i]%></option>
<%
}
}
%>
</select>
年
<select name="month">
<%
String[] month = {
"01", "02", "03",
"04", "05", "06",
"07", "08", "09",
"10", "11", "12"
};
String m = newspress.getPresstime().substring(4, 6);
for (int i=0; i<month.length; i++) {
if (month[i].equals(m)) {
%>
<option value=<%=month[i]%> selected><%=month[i]%></option>
<%
} else {
%>
<option value=<%=month[i]%>><%=month[i]%></option>
<%
}
}
%>
</select>
月
<select name="day" id="day">
<%
String[] day = {
"01", "02", "03",
"04", "05", "06",
"07", "08", "09",
"10", "11", "12",
"13", "14", "15",
"16", "17", "18",
"19", "20", "21",
"22", "23", "24",
"25", "26", "27",
"28", "29", "30",
"31"
};
String d = newspress.getPresstime().substring(6, 8);
for (int i=0; i<day.length; i++) {
if (day[i].equals(d)) {
%>
<option value=<%=day[i]%> selected><%=day[i]%></option>
<%
} else {
%>
<option value=<%=day[i]%>><%=day[i]%></option>
<%
}
}
%>
</select>
日 </span></div></td>
</tr>
<tr bgcolor="#FFFFCA">
<td height="23"><div align="right"><span class="TitleColor">类型</span></div></td>
<td><div align="left"><span class="TitleColor">
<select name="typeId" id="typeId">
<%
String[] type = {
"热点新闻", "行业知识", "企业通知"
};
String typename = newspress.getNewstype().getName();
for (int i=0; i<type.length; i++) {
if (typename.equals(type[i])) {
%>
<option value=<%=i+1%> selected><%=type[i]%></option>
<%
} else {
%>
<option value=<%=i+1%>><%=type[i]%></option>
<%
}
}
%>
</select>
</span></div></td>
</tr>
<tr bgcolor="#FFFFCA">
<td height="91"><div align="right">内容</div></td>
<td><div align="left">
<textarea name="content" cols="60" rows="5" id="content"><%=newspress.getContent()%></textarea>
</div></td>
</tr>
<tr bgcolor="#FFFFCA">
<td height="57"><div align="right">备注</div></td>
<td><div align="left">
<textarea name="remarks" cols="50" rows="3" id="remarks"><%=newspress.getRemarks()%></textarea>
</div></td>
</tr>
<tr bgcolor="#DFDFFF">
<td height="23" colspan="2"><div align="center">
<input type="submit" name="Submit" value="修改">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -