<%--
  Created by IntelliJ IDEA.
  User: Jzdsh
  Date: 2019/4/2
  Time: 17:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
        window.UEDITOR_SERVER_URL = '${pageContext.request.contextPath}';
    </script>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/admin/manage/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/admin/manage/Hui-iconfont/1.0.7/iconfont.css"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/admin/manage/icheck/icheck.css"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/skin/default/skin.css"
          id="skin"/>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/admin/manage/h-ui.admin/css/style.css"/>

    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/admin/manage/js/jquery.min.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/admin/manage/js/jquery.validate.min.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/admin/manage/js/validate-methods.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/admin/manage/js/messages_zh.min.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/admin/manage/js/WdatePicker.js"></script>

    <title>后台管理</title>
</head>
<script type="application/javascript">
    function checkUser() {
        var phone = $("#uphone").val();
        if (!(/^1(3|4|5|7|8)\d{9}$/.test(phone))) {
            alert("手机号码有误，请重填");
            return false;
        }
        var emil = $("#uemil").val();
        var re = /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
        if (!re.test(emil)) {
            alert("邮箱格式有误，请重填");
            return false;
        }
        return true;
    }

</script>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 转盘格
    <span class="c-gray en">&gt;</span> 修改
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <h4>用户添加</h4>
    <form method="post" enctype="multipart/form-data"
          class="form form-horizontal"
          id="form-admin-add" onsubmit="return checkUser();"
          action="${pageContext.request.contextPath}/userEditSuccess.html">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>用户号码：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" name="uphone" value="" id="uphone">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red"></span></label>
            <%--<div class="formControls col-xs-8 col-sm-9">--%>
            <%--<span class="c-red">*说明：如果奖品个数为零表示该奖品是无限数量的，投放个数为零，表示无数量限制</span>--%>
            <%--</div>--%>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>用户邮箱：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" name="uemil" id="uemil">
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                <input class="btn btn-primary radius" type="submit" value="提交">
            </div>
        </div>
    </form>
</div>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/manage/icheck/icheck.css"/>
<script type="text/javascript"
        src="${pageContext.request.contextPath}/static/admin/manage/icheck/jquery.icheck.min.js"></script>

<!-- 百度文本编辑器   js -->
<%--<script type="text/javascript">--%>

<%--$(function () {--%>
<%--var s = 0;--%>
<%--$("#form-admin-add").validate({--%>
<%--rules: {--%>
<%--title: {--%>
<%--required: true,--%>
<%--},--%>
<%--jifen: {--%>
<%--required: true,--%>
<%--digits: true,--%>
<%--},--%>
<%--num: {--%>
<%--required: true,--%>
<%--digits: true,--%>
<%--max: 100,--%>
<%--},--%>
<%--tou: {--%>
<%--required: true,--%>
<%--digits: true,--%>
<%--max: s,--%>
<%--},--%>
<%--},--%>
<%--onkeyup: false,--%>
<%--focusCleanup: true,--%>
<%--success: "valid",--%>
<%--submitHandler: function (form) {--%>
<%--$(form).ajaxSubmit();--%>
<%--var index = parent.layer.getFrameIndex(window.name);--%>
<%--parent.$('.btn-refresh').click();--%>
<%--parent.layer.close(index);--%>
<%--}--%>
<%--});--%>
<%--});--%>
<%--</script>--%>
</body>
</html>