⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 z0.jsp

📁 持久层hibernate技术使用的一个例子
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html>
  <head>
    <link href="/css/base.css" rel="stylesheet" type="text/css">
    <title>
      我的文件
    </title>
    <bean:write name="js" filter="false" />
    <script LANGUAGE='javascript'>
      function setValue(obj) {
        var oA = document.getElementById("tab1").getElementsByTagName("INPUT");

        for (var i = 0; i < oA.length; i++) {
          if (oA[i].type = "checkBox") {
            oA[i].checked = obj.checked;
          }
        }
      }
      function doSubmit1(start) {
        document.U07TFileForm.action = "/U07TFileSearch.do?utf=search&start=" + start;
        document.U07TFileForm.submit();
      }
    </script>
  </head>
  <body>
    <br>
    <table width="80%" border="0" align="center">
      <tr>
        <td height="20">
          <span class="font_title">我的文件</span>
        </td>
      </tr>
    </table>
    <table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#7AA1E6" id="tab1">
      <tr bgcolor="#1E58C8">
        <td align="center">
          <font color="#FFFFFF">
            文件名
          </font>
        </td>
        <td height="20" align="center" width="10%">
          <font color="#FFFFFF">
            大小
          </font>
        </td>
        <td align="center" width="25%">
          <font color="#FFFFFF">
            最后更新时间
          </font>
        </td>
        <td align="center" width="10%">
          <font color="#FFFFFF">
            下载次数
          </font>
        </td>
        <td align="center" width="10%">
          <input type="checkbox" name="checkbox4" value="checkbox" onClick="setValue(this)" class="input-checkbox">
          <font color="#FFFFFF">
            全选
          </font>
        </td>
      </tr>
      <logic:present name="tFileList">
        <logic:iterate id="tf" name="tFileList" property="rs">
          <tr bgcolor="#F1F2EE"  onmouseout="this.bgColor='#F1F2EE';" onmouseover="this.bgColor='#FFFfff';" title="<bean:write name="tf" property="tfIntro" />">
            <td align="center" height="20">
              <a href="/U07TFileSearch.do?utf=download&f_id=<bean:write name="tf" property="tfId" />"><bean:write name="tf" property="tfName" /></a>
            </td>
            <td align="center">
              <bean:write name="tf" property="tfSize" />
              k
            </td>
            <td align="center">
              <bean:write name="tf" property="tfTime" format="yyyy-MM-dd HH:mm:ss" />
            </td>
            <td align="center">
              <bean:write name="tf" property="tfDtimes" />
            </td>
            <td align="center">
              <input type="checkbox" name="tf_id" value="${tf.tfId}" />
            </td>
          </tr>
        </logic:iterate>
      </logic:present>
    </table>
    <logic:present name="tFileList">
      <table width="80%" align="center">
        <tr>
          <td height="20" align="left">
            页数:
            <bean:write name="tFileList" property="currentPage" />
            /
            <bean:write name="tFileList" property="totalPage" />
            页&nbsp;每页:
            <bean:write name="tFileList" property="range" />
            总数:
            <bean:write name="tFileList" property="count" />
          </td>
          <td align="right">
            <bean:write name="tFileList" property="fenye" filter="false" />
          </td>
        </tr>
      </table>
    </logic:present>
    <br>
    <br>
    <table width="80%" border="0" align="center">
      <tr>
        <td align="left" height="20">
          <span class="font_title">上传新文件</span>
        </td>
      </tr>
    </table>
    <table width="80%" border="0" align="center" bgcolor="#7AA1E6" cellspacing="1">
      <html:form action="/U07TFileInsert" enctype="multipart/form-data">
        <html:hidden property="utf" value="insert" />
        <tr bgcolor="#FFFFFF">
          <td align="right" height="20" width="15%">
            一级分类:
          </td>
          <td align="left" height="20">
            <html:select property="tft1.tftId" styleClass="input-select" onchange="tftSearch(document.U07TFileForm.tft1Id.options[document.U07TFileForm.tft1Id.selectedIndex].value)" styleId="tft1Id">
              <html:option value="">
                请选择一级分类
              </html:option>
              <html:options collection="tft1List" property="tftId" labelProperty="tftName" />
            </html:select>
            *
            <html:errors property="tft1.tftId" />
          </td>
          <td align="right" width="15%">
            二级分类:
          </td>
          <td align="left">
            <html:select property="tft2.tft2Id" styleClass="input-select" styleId="tft2Id">
              <html:option value="">
                请选择二级分类
              </html:option>
              <html:options collection="tft2List" property="tft2Id" labelProperty="tft2Name" />
            </html:select>
            *
            <html:errors property="tft2.tft2Id" />
          </td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td align="right" height="20" width="15%">
            选择文件:
          </td>
          <td align="left" height="20" colspan="3">
            <input type="file" name="file" class="input-text">
            *(请小于10k,只能上传图片格式)
            <html:errors property="tFile.file" />
          </td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td align="right" height="20" width="15%">
            描述:
          </td>
          <td align="left" height="20" colspan="3">
            <html:textarea property="tFile.tfIntro" styleClass="input-textarea" cols="60" rows="10" />
            *(请小于5000字符)
            <html:errors property="tFile.tfIntro" />
          </td>
        </tr>
        
        <tr bgcolor="#FFFFFF">
          <td align="center" height="20" colspan="4">
            <html:submit>
              提交
            </html:submit>
            <html:reset>
              重填
            </html:reset>
          </td>
        </tr>
      </html:form>
    </table>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -