热门文章 | 热门软件| 热门源码 | 热门电影 | 知识库 | 联系我们
软件 源码 教程 影视 健康 招聘
  HTML | JavaScript | ASP | PHP | JSP | NET | VB | VC | VF | Windows | Linux | Mysql | Mssql | Oracle | Struts 
当前位置: 创世纪计算机资源网 -> 文章频道 ->web开发 
站内搜索:
利用uploadbean实现上传(1)
作者:大灰狼 来源:创世纪计算机资源网 整理日期:2007-3-27
<%@ page language="java" import="java.util.*" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.fredck.FCKeditor.*" %>
<%@ page import="com.lineteam.hibernate.news.entity.*" %>
<%@ page import="com.lineteam.hibernate.DAO.*"%>
<%@ taglib uri="/WEB-INF/fckeditor.tld" prefix="fck" %>

<html>
<head>
<title>图片添加</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
<script type="text/javascript" src="../FCKeditor/fckeditor.js"></script>
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="white">
<%
ISearch search=Search.getInstance();
String hql="from PicType n order by n.id desc";
List list=search.search(hql);
Iterator it=list.iterator();
%>
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
     <div id="list2">
<table width="700" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<tbody>
<form action="upphoto.jsp" enctype="multipart/form-data" method="post" name="form1">
<tr>
    <td height="42" colspan="3" align="center" bgcolor="#E7E7E7" class="title">图片添加</td>
</tr>
<tr>
<td height="33" align="center" bgcolor="#FFFFFF">图片分类:</td>
<td align="left" bgcolor="#FFFFFF">

<select name="pictype">
<%
     while(it.hasNext())
     {
     PicType pictype=(PicType)it.next();
     %>
     <option value="<%=pictype.getId()%>"><%=pictype.getTypeName()%></option>
     <%
     }
     %>
</select>
</td>
<td align="left" bgcolor="#FFFFFF" ><span class="redsign">* </span>请选择图片分类</td>
</tr>
<tr>
<td width="20%" height="33" align="center" bgcolor="#FFFFFF">图片标题:</td>
<td width="51%" align="left" bgcolor="#FFFFFF"><input name="title" type="text" size="50" id="title"></td>
<td width="29%" align="left" bgcolor="#FFFFFF" >可选,如果有新闻则为必填项</td>
</tr>
<tr>
<td height="33" align="center" bgcolor="#FFFFFF">上传图片:</td>
<td align="left" bgcolor="#FFFFFF" class="selelist"><input name="upfile" type="file" size="38"></td>
<td align="left" bgcolor="#FFFFFF" class="redsign"><span class="redsign">*</span> 请选择上传的图片</td>
</tr>


<tr>
<td align="center" bgcolor="#FFFFFF">文章内容:</td>
<td height="520" colspan="2" align="left" valign="middle" bgcolor="#FFFFFF">
    <fck:editor id="content" basePath="/edu/FCKeditor/" width="580" height="520" skinPath="/edu/FCKeditor/editor/skins/silver/"
toolbarSet = "Default">
</fck:editor></td>
</tr>
<tr>
<td height="40" colspan="3" align="center" bgcolor="#FFFFFF">
    <input type="submit" name="savenew" value="保存图片"> 
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</tbody>
</table>
</div>
</td>
</tr>
</table>
<br>

</body>
</html>


[1]  [2]  
相关文章