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

📄 type_update.jsp

📁 一个做得非常好的电子政务系统
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ include file="/share/page/page_request.jsp"%>
<%@ page import="com.ijipin.flow.*" %>
<%
    ////////////////////////////列表页面所必须有的公共变量
    final String strSkin  = "../../" + userInfor_session.getPFLJ();  //皮肤路径
    final String strLevel = Type.strLevel;  //本页所在的层次
    final String strLink  = Type.strLink_update;    //本页的地址
    final String strLink_action = Type.strLink_action;
    final String strLink_back = Type.strLink_list;
    final int iModuleID= Type.iModuleID;
    //////////////iSecond_barid
    //设置查询参数
    String sTable     = "";
    String sField     = "";
    String sCondition = "";

    int iSpace = Message.SPACE;  //空格的宽度
    String sWidth = Message.WIDTH;  //第一个td的百分比宽度

    //新建一个连接
    DataConn dataConn = new DataConn();
    Statement stmt = null;
    ResultSet rs = null;
    DataList dataList = null;


    //是否可以写,如果为false,必须要取消所有的按牛
    boolean canWrite = true;
    if (strACTION.equals("VIEW")) {
        canWrite = false;
    }

    ////////////////获得事物类别
    SWLB SWLBclass = new SWLB(dataConn);
    String strSWLB = "";
    strSWLB = SWLBclass.getSWLB(iSecond_barid);
%>
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Message.COMPANY_NAME%></title>
<link href="<%=strSkin%>css.css" rel="stylesheet" type="text/css">
</head>
<%
try {
    stmt = dataConn.getConnection().createStatement();
    dataList = new DataList(stmt);

    String str_value = "";   //临时变量,放字段的值
    String str_field = "";   //字段的名称
    String str_type  = "";   //字段类型
    String key_field = "";   //关键字
    String key_value = "0";   //关键字的值
    int    iFieldCount = 0;  //字段数量
%>
<%@ include file="/share/property/update_property.jsp" %>
<% if (hasEditor) {%>
<script language = "vbscript">
    sub LoadContent
        window_onresize
        dim surl
        surl="http://<%=strServer_session%>:<%=strPort_session%><%=rootPath_session%>/share/editor/load.jsp?key=<%=key_value%>&module=<%=iModuleID%>"
        tbContentElement.LoadURL(sURL)
    end sub
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="vbscript:LoadContent">
<% } else {%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<% } %>

<%@ include file="/share/page/share_bar_top.jsp"%>
<!--  工具条上 2004-04-28 -->
<%@ include file="/share/property/update_tool_top.jsp" %>
<!--  数据区 2004-04-28 -->
<table border="0"  cellspacing="0" cellpadding="0" width="100%" align="center">
  <form name="form" method="post" action="<%=strLink_action%>" onsubmit="javaScript:return check_validate(this);" ENCTYPE="multipart/form-data">
    <%@ include file="/share/page/page_hidden.jsp" %>
<!--隐藏的-->
    <input type="hidden" name="SWLB" value="<%=strSWLB%>">
<%
    iterField = field.getList().iterator();
    iFieldCount = 0;
    while (iterField != null && iterField.hasNext()) {
        fieldInfor = (FieldInfor)iterField.next();
        if (fieldInfor.getZDGZ() != null) {
            str_value = valueRule.getValue(fieldInfor.getZDGZ());
        }

        if (!value_str[iFieldCount].equals("")) {
            str_value = value_str[iFieldCount];
        }
        if ( 2 == fieldInfor.getZDBJ()) {
            if (5 != fieldInfor.getZDBJKJ()) {
%>
    <input type="hidden" name="<%=fieldInfor.getZDMC()%>" value="<%=str_value%>">
<%
            } else {
%>
    <input type="hidden" name="<%=fieldInfor.getZDMC()%>">
<%
            }
        }
        iFieldCount ++;
    }
%>
<%
    iFieldCount = 0;
    iterField = field.getList().iterator();
    while (iterField != null && iterField.hasNext()) {
        fieldInfor = (FieldInfor)iterField.next();
        if (fieldInfor.getZDGZ() != null) {
            str_value = valueRule.getValue(fieldInfor.getZDGZ());
        }
        if (!value_str[iFieldCount].equals("")) {
            str_value = value_str[iFieldCount];
        }
        iFieldCount ++;
        //////列表
        if ( 2 == fieldInfor.getZDBJ() || 3 == fieldInfor.getZDBJ()) {
            continue;
        }
%>
  <tr>
    <td width="<%=sWidth%>" align="right" valign="top"><%=fieldInfor.getZDSM()%></td><td width="<%=iSpace%>">&nbsp;</td>
    <td>
<%
        if ( 0 == fieldInfor.getZDBJKJ()) {
%>
      <input type="text" class="tex3" name="<%=fieldInfor.getZDMC()%>" value="<%=str_value%>" <%if(!canWrite) {%>readonly<%}%>
          <% if (fieldInfor.getZDLX().equals("nvarchar")) {%> maxlength="<%=fieldInfor.getZDCD()%>" <%}%> >
<%
            continue;
        }
        if ( 1 == fieldInfor.getZDBJKJ()) {
%>
      <textarea rows="5" class="drpdwn2" name="<%=fieldInfor.getZDMC()%>" <%if(!canWrite) {%>readonly<%}%>><%=str_value%></textarea>
<%
            continue;
        }
        if ( 2 == fieldInfor.getZDBJKJ()) {
            /////////找关联
            selectTable = fieldInfor.getZDGLBM();
            selectField = fieldInfor.getZDGLZD();
            selectName  = fieldInfor.getZDGLMC();
%>
      <select class="search"  name="<%=fieldInfor.getZDMC()%>" <%if(!canWrite) {%>readonly<%}%>>
<%
      //////////////选择的放进iterList
      rs = dataList.getResultSet(selectTable, selectField + "," + selectName, relateCond);
      while (rs.next()) {
%>
        <option value="<%=Convert.toUnicode(rs.getString(1))%>"><%=Convert.toUnicode(rs.getString(2))%></option>
<%
    }
%>
      </select>
<%
            continue;
        }
        if ( 3 == fieldInfor.getZDBJKJ()) {
%>
      <input type="text" class="tex1" name="<%=fieldInfor.getZDMC()%>" value="<%=str_value%>"  maxlength=10>
      <a href="javascript:void(0)" onclick="gfPop.fPopCalendar(eval(document.form.<%=fieldInfor.getZDMC()%>));return false;" HIDEFOCUS>
       <img name="popcal" align="absbottom" src="<%=strLevel%>share/calendar/calbtn.gif" width="34" height="22" border="0" alt="">
      </a>

<%
            continue;
        }
%>
    </td>
  </tr>
<%
    if (true) {
        return;
    }

    }
%>
<!--附件-->
<%
    if (hasAnnex) {

%>
  <Script Language="VbScript" src="<%=strLevel%>share/js/upload.vbs"></Script>
  <tr>
    <td colspan=3>
      <table border="0" align="center"  id=tabfj name=tabfj cellspacing="0">
        <tr>
          <td width="100%" valign="top"><b>&nbsp;&nbsp;附件</b></td>
          <td><input type=button class="sbttn" value=增加附件 name="bAddFJ" id="bAddFj" onclick="vbscript:doAddFJ" <%if(!canWrite) {%>disabled<%}%>></td>
        </tr>
<%
        int iLcount=0;
        Annex annex = new Annex(moduleInfor_session.getSXFJ(),dataConn);
        AnnexInfor annexInfor = null;
        Iterator iterAnnex =  annex.getList("FJWZ="+key_value).iterator();
        while (iterAnnex != null && iterAnnex.hasNext()) {
            annexInfor = (AnnexInfor)iterAnnex.next();
%>
        <tr id=tryy<%=iLcount%> class=InputFrameLine>
            <input type=hidden id=yyfjmc<%=iLcount%> name=edit_FJID<%=iLcount%>  class=tex1 value="<%=annexInfor.getFJID()%>">
            <td width="100%">&nbsp;&nbsp;&nbsp;&nbsp;<a target=_blank href="<%=strLevel%><%=annexInfor.getFJDZ()%>"><%=annexInfor.getFJBT()%></a></td>
            <td><input type=button id=bscfj name=bscfj class="sbttn"  value='删除附件' onclick='vbscript:doscfj1(<%=iLcount%>)' <%if(!canWrite) {%>disabled<%}%>></td>
        </tr>
<%
            iLcount =  iLcount + 1 ;
        }
%>
        <input type="hidden"  name="count"  value="0">
        <input type="hidden"  name="edit_count"  value="<%=iLcount%>">
        <input type="hidden" name="delete_FJID" value="">
      </table>
    </td>
  </tr>
<%
    }
%>
<!--管理-->
<%
    if (hasManager) {
        //需要的参数,已选择的人员,需要share/js/util.js
        manager = new Manager(moduleInfor_session.getSXGL(),dataConn);
        String strYGID_USER = manager.getYGIDS(Integer.parseInt(key_value));
%>
  <tr>
    <td width="<%=sWidth%>" align="right" valign="top">管理人员</td><td width="<%=iSpace%>">&nbsp;</td>
    <td><%@ include file="/share/select/user_mult.jsp"%></td>
  </tr>
<%
    }
%>


  </form>
<!--编辑器-->
<%
    if (hasEditor) {
%>
  <tr>
    <td colspan="3" align="left"><%@ include file="/share/editor/edit.jsp"%><br></td>
  </tr>
<%
    }
%>
</table>
<!--  工具条下 2004-04-28 -->
<%@ include file="/share/property/update_tool_bottom.jsp" %>
<%@ include file="/share/page/page_form.jsp" %>
<%@ include file="/share/property/update_script.jsp" %>
</body>
<%
}
catch(Exception e) {
}
finally {
    if (stmt != null) {
        stmt.close();
    }
    if (dataConn != null) {
        dataConn.close();
    }
}
%>
</html>

⌨️ 快捷键说明

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