【JSP开源代码栏目提醒】:网学会员,鉴于大家对JSP开源代码十分关注,论文会员在此为大家搜集整理了“add_pic.jsp”一文,供大家参考学习!
<%@ include file="conn.jsp"%>
<%
if ((session.getValue("admin")==null)){
response.sendRedirect("admin.jsp");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>添加图片</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>
<body>
<div align="center">
<center>
<table border="0" width="400" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method="POST" action="add_pic1.jsp">
<table border="0" width="100%" cellspacing="0" cellpadding="3">
<tr>
<td width="100%" align="right" colspan="2">
<p align="center">添加产品图片</td>
</tr>
<tr>
<td width="37%" align="right">产品名称:</td>
<td width="63%"><input type="text" name="pic_name" size="20"></td>
</tr>
<tr>
<td width="37%" align="right">产品型号:</td>
<td width="63%"><input type="text" name="pic_type" size="20"></td>
</tr>
<tr>
<td width="37%" align="right">产品类型:</td>
<td width="63%"><select size="1" name="pic_class">
<%
String sql="select * from scott.picclass";
ResultSet rs=stmt.executeQuery(
sql);
while(rs.next()) {
%>
<option value=<%=rs.getString("pic_class")%>><%=rs.getString("pic_class")%></option>
<%
}
rs.close();
stmt.close();
conn.close();
%>
</select></td>
</tr>
<tr>
<td width="37%" align="right">产品说明:</td>
<td width="63%"><textarea rows="2" name="pic_text" cols="20"></textarea></td>
</tr>
<tr>
<td width="37%" align="right">小图片网址:</td>
<td width="63%"><input type="text" name="pic_lurl" size="20" value="http://"></td>
</tr>
<tr>
<td width="37%" align="right">大图片网址:</td>
<td width="63%"><input type="text" name="pic_url" size="20" value="http://"></td>
</tr>
<tr>
<td width="100%" align="right" colspan="2">
<p align="right"><input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"></td>
</tr>
</center>
</table>
<center>
<p></p>
</form>
<p></td>
</tr>
</table>
</div>
</body>
</html>