<%@page import="com.util.Info"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




<!DOCTYPE html>
<html lang="zh-cn">

<jsp:include page="/admin/head.jsp"></jsp:include>

 <#if '${domain}'=='users'>
    <%--验证添加--%>
    <script type="text/javascript" src="js/regist.js"></script>
 </#if>
   <#if '${domain}'=='category'>
    <%--验证--%>
    <script type="text/javascript" src="js/type.js"></script>
   </#if>

<body>
<div class="panel admin-panel">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>增加内容</strong></div>
    <div class="body-content">
        <form method="post" class="form-x" action="add${Domain}.do" enctype="multipart/form-data" >
            <#list fieldList as field>
                <#if field.nameHump!="pubtime" && field.nameHump!="*id"&& field.nameHump!="img"&& field.nameHump!="uname"&& field.nameHump!="tel"
                && field.nameHump!="sex"&& field.nameHump!="note"&& field.nameHump!="pwd"&&field.nameHump!="id"&&field.nameHump!="fid"&&field.nameHump!="bid">
                <div class="form-group">
                    <div class="label">
                        <label>${field.nameCn}：</label>
                    </div>
                    <div class="field">
                        <input type="text" class="input"  name="${field.nameHump}"  id="${field.nameHump}Txt" placeholder="请输入${field.nameCn}"  />
                        <div id='${field.nameHump}Check' class="tips"></div>
                    </div>
                </div>
                </#if>
                <#if field.nameHump=="uname">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <input type="text" class="input" name="${field.nameHump}"  id="${field.nameHump}Txt"  placeholder="请输入${field.nameCn}"  onblur="return checkName()"  />
                      <div class="tips"></div>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="fid">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <select name="${field.nameHump}" class="input">
                          <c:forEach items="${r"${"}flist${r"}"}" var="t">
                              <option value="${r"${"}t.id${r"}"}">${r"${"}t.name${r"}"}</option>
                          </c:forEach>
                      </select>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="tid">
              <div class="form-group">
                  <div class="label">
                      <label>${field.nameCn}：</label>
                  </div>
                  <div class="field">
                      <select name="${field.nameHump}" class="input">
                          <c:forEach items="${r"${"}tlist${r"}"}" var="t">
                              <option value="${r"${"}t.id${r"}"}">${r"${"}t.name${r"}"}</option>
                          </c:forEach>
                      </select>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="bid">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <select name="${field.nameHump}" class="input">
                          <c:forEach items="${r"${"}blist${r"}"}" var="t">
                              <option value="${r"${"}t.id${r"}"}">${r"${"}t.name${r"}"}</option>
                          </c:forEach>
                      </select>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="tel">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <input type="text" class="input" name="${field.nameHump}"  id="${field.nameHump}Txt"  placeholder="请输入${field.nameCn}"  onblur="return checkTel()"  />
                      <div class="tips"></div>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="img">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <input type="file" class="input" name="file"   />
                      <div class="tips"></div>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="pwd">
               <div class="form-group">
                   <div class="label">
                       <label>*密码：</label>
                   </div>
                   <div class="field">
                       <input type="password" class="input"   id="${field.nameHump}Txt"   onblur="return checkPwd()"/>
                       <div id='prompt_pwd'  class="tips"></div>
                   </div>
               </div>
            <div class="form-group">
                <div class="label">
                    <label>*确认密码：</label>
                </div>
                <div class="field">
                    <input type="password" class="input" name="pwd" id="${field.nameHump}TxtConfirm"  onblur="return checkpwdc()"/>
                    <div id='prompt_confirmpwd' class="tips"></div>
                </div>
            </div>
                </#if>
                <#if field.nameHump=="sex">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <input name="sex"   type="radio" id="radio" value="男" checked="checked" />
                      男
                      <input type="radio"   name="sex" id="radio2" value="女" />
                      女
                      <div class="tips"></div>
                  </div>
              </div>
                </#if>
                <#if field.nameHump=="note">
              <div class="form-group">
                   <div class="label">
                       <label>${field.nameCn}：</label>
                   </div>
                  <div class="field">
                      <textarea class="form-control" id="note" rows="5" style="width: 680px;" name="${field.nameHump}"></textarea>
                      <div class="tips"></div>
                  </div>
              </div>
                </#if>
            </#list>
            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button class="button bg-main icon-check-square-o" type="submit" onclick="return check()"> 提交</button>
                </div>
            </div>
        </form>
    </div>
</div>

</body>
</html>


