<%@ page contentType="text/html;charset=GBK" %>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="conn" scope="page" class="download.conn"/>
<%
  if( session.getAttribute("login") == null )  {
%>
      <jsp:forward page="login.jsp"/>
<%
  }
%>     
<%!
	ResultSet rs = null;
	String id = "";
	String sql = "";
%>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	<Link rel="stylesheet" type="text/css" href="style.css">
	<title>修改软件信息</title>
</head>
<body>
<%
id = request.getParameter("id");
sql = "select * from download where id=" + id;
rs = conn.executeQuery( sql );
if(rs.next()) {
%> 
<form method="POST" action="savemodify.jsp?id=<%=id%>">
  <div align="center"><center>
      <table border="1" cellspacing="0" width="96%"  bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
        <tr bgcolor="#000099"> 
          <td width="100%" height="29"> 
            <p align="center"><font size="3" color="#FFFFFF">修改软件信息</font> 
          </td>
    </tr>
    <tr align="center">
      <td width="100%">
            <table border="0" cellspacing="1" width="100%">
              <tr> 
                <td width="19%" align="right" height="30" bgcolor="#CCCCCC"><b>文件名称：</b></td>
                <td width="92%" height="30" bgcolor="#CCCCCC"> 
                  <input type="text" name="txtfilename" size="60"
          class="smallinput" maxlength="100" value="<%=rs.getString("filename")%>">
                </td>
              </tr>
              <tr> 
                <td width="19%" align="right" height="30" bgcolor="#CCCCCC"><b>显示名称：</b></td>
                <td width="92%" height="30" bgcolor="#CCCCCC"> 
                  <input type="text" name="txtshowname" size="60"
          class="smallinput" maxlength="100" value="<%=rs.getString("showname")%>">
                </td>
              </tr>
              <tr> 
                <td width="19%" align="right" height="30" bgcolor="#CCCCCC"><b>软件类型：</b></td>
                <td width="92%" height="30" bgcolor="#CCCCCC"> 
                  <input type="text" name="typename" size="60"
          class="smallinput" maxlength="100" value="<%=rs.getString("typename")%>">
                </td>
              </tr>
              <tr> 
                <td width="19%" align="right" height="30" bgcolor="#CCCCCC"><b>软件大小：</b></td>
                <td width="92%" height="30" bgcolor="#CCCCCC"> 
                  <input type="text" name="size" size="12"
          class="smallinput" maxlength="100" value="<%=rs.getInt("size")%>">
                  KB</td>
              </tr>
              <tr> 
                <td width="19%" align="right" height="30" bgcolor="#CCCCCC"><b>星级评定：</b></td>
                <td width="92%" height="30" bgcolor="#CCCCCC"> 
                  <input type="text" name="hot" size="60"
          class="smallinput" maxlength="100" value="<%=rs.getString("hot")%>">
                </td>
              </tr>
              <tr> 
                <td width="19%" align="right" height="30" bgcolor="#CCCCCC"><b>运行环境：</b></td>
                <td width="92%" height="30" bgcolor="#CCCCCC"> 
                  <input type="text" name="face" size="60"
          class="smallinput" maxlength="100" value="<%=rs.getString("face")%>">
                </td>
              </tr>
              <tr> 
                <td width="19%" align="right" valign="top" bgcolor="#CCCCCC" height="166"><b>软件简介：</b></td>
                <td width="92%" bgcolor="#CCCCCC" height="166"> 
                  <textarea rows="6" name="txtnote" cols="60" class="smallarea">
<%=rs.getString("softnote")%>
</textarea>
                </td>
              </tr>
            </table>
      </td>
    </tr>
  </table>
  </center></div><div align="center"><center><p><input type="submit" value=" 保 存 "
  name="cmdok" class="buttonface"> &nbsp; <input type="reset" value=" 重 填"
  name="cmdcancel" class="buttonface"> </p>
  </center></div>
</form>
<%
}
else {
 out.println("错误：找不到该软件！");
}
rs.close();
%> 
</body>
</html>
