editnews.jsp
上传用户:szlmxq
上传日期:2014-01-31
资源大小:740k
文件大小:2k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ include file="conn.jsp"%>
  3. <%
  4. if(session.getAttribute("admin_name")==null){
  5. ;}else{
  6. %>
  7. <%
  8. int news_id=Integer.parseInt(request.getParameter("news_id"));
  9. sql="select * from news where news_id="+news_id+"";
  10. rs=mdb.executeQuery(sql);
  11. rs.next();
  12. %><head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  14. <link href=../css.css rel=STYLESHEET type=text/css>
  15. </head>
  16. <table width="500" border="0" cellspacing="0" cellpadding="0" align="center" height="100">
  17.   <tr> 
  18.     <td height="175"> 
  19.       <form name="form1" method="post" action="editnewsok.jsp?news_id=<%=news_id%>">
  20.         <table border="1" width="100%" cellspacing="0" bordercolor="#C0C0C0" style="border-collapse: collapse" cellpadding="0">
  21.           <tr bgcolor="#FFFFFF"> 
  22.             <td colspan="2"> 标题
  23. <input type="text" name="news_title" size="60" class=input value="<%=rs.getString("news_title")%>">
  24.             </td>
  25.           </tr>
  26.           <tr bgcolor="#FFFFFF"> 
  27.             <td colspan="2"> <font color="#FF0000">新闻内容</font></td>
  28.           </tr>
  29.           <tr bgcolor="#FFFFFF"> 
  30.             <td valign="top" colspan="2"> 
  31.               <textarea rows="15" name="news_content" cols="70" class=input><%=rs.getString("news_content")%></textarea>
  32.             </td>
  33.           </tr>
  34.           <tr bgcolor="#FFFFFF"> 
  35.             <td colspan="2">&nbsp; </td>
  36.           </tr>
  37.           <tr bgcolor="#FFFFFF" align="center"> 
  38.             <td colspan="2"> 
  39.               <input type="submit" name="Submit" value="修改">
  40.             </td>
  41.           </tr>
  42.         </table>
  43.       </form>
  44.     </td>
  45.   </tr>
  46. </table>
  47. <%
  48. mdb.Close();}%>