<%--
  Created by IntelliJ IDEA.
  User: mc
  Date: 2021/1/15
  Time: 10:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.util.*" %>
<%@ page import="com.censoft.common.db.ConnectionFactory" %>
<%@ page import="com.censoft.common.base.Pub" %>
<%
    ConnectionFactory cf = new ConnectionFactory();
    Pub pub = new Pub();
    Connection conn = null;
    Vector v_list = null;
	Vector v_list_1 = null;
    String zd_e_name = pub.trimNull(request.getParameter("zd_e_name"));
    String value = pub.trimNull(request.getParameter("value"));
    value=java.net.URLDecoder.decode(value,"UTF-8");
    String name_id = pub.trimNull(request.getParameter("name_id"));
	String reg_id = pub.trimNull(request.getParameter("reg_id"));
    List list_s = new ArrayList();
    Hashtable ht=null;
	String first_name="请选择";
	String col_name_all="";
    try {
        StringBuffer sb = new StringBuffer();
        sb.append("select * from zb_mx order by add_time desc");
        conn = com.censoft.db.DBUtil.getConnection();
        v_list = cf.doQuery(conn, sb.toString(),null, list_s.toArray());
        if (v_list == null) {
            out.println("查询出错" + cf.getMsg());
            return;
        }
%>
    <select class="input-text" name="<%=name_id%>" id="<%=name_id%>" >
        <option value=""><%=first_name%></option>
        <%
            if(v_list!=null && v_list.size()>0){
                for(int i=0;i<v_list.size();i++){
                    ht=(Hashtable)v_list.get(i);
                    String col_name=pub.trimNull((String)ht.get("name"));
                    String day=pub.trimNull((String)ht.get("day"));
                    String id=pub.trimNull((String)ht.get("id"));
        %>
        <option value="<%=id%>_<%=day%>"><%=col_name%></option>
        <%
                }
            }
        %>
    </select>
<%
    } catch (Exception e) {
        out.println("查询异常" + e);
        return;
    } finally {
        if (conn != null) {
            try {
                conn.close();
            } catch (Exception e) {
            }
        }
    }
%>
