<?php defined('IN_YUNYECMS') or exit('No permission.'); ?><!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $seo["title"] ;?></title>
  <meta name="keywords" content="<?php echo $seo["keywords"] ;?>" />
  <meta name="description" content="<?php echo $seo["description"] ;?>" /> <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Font Awesome -->
  <link href="<?php echo YUNYECMS_PUBLIC;?>plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" />
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/fontawesome-free/css/all.min.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/iCheck/all.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/AdminLTE.min.css">
  <script src="<?php echo YUNYECMS_UI;?>mui/js/mui.min.js"></script>
  <link href="<?php echo YUNYECMS_UI;?>mui/css/mui.min.css" rel="stylesheet" />
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/common.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/member.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/iCheck/square/blue.css">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body class="hold-transition register-page" style="background: #ffffff;">
  <div class="register-box" style="background: #ffffff; padding-top: 0px; padding-bottom: 0px;">
    <div class="register-logo" style=" padding-bottom: 10px;">
      <a href="<?php echo ROOT;?>"><b><img src="<?php echo $lang["logo"] ;?>" style="width: 50%;"></b></a>
    </div>
    <div class="register-box-body">
      <div class="reg-tabs yunye_tab">
        <div id="sign_type" class="mui-segmented-control mui-segmented-control mui-segmented-control-inverted mb-15">
          <span class="mui-control-item mui-active">
            手机
          </span>
          <span class="mui-control-item">
            邮箱
          </span>
          <span class="mui-control-item">
            用户名
          </span>
        </div>
        <div>
          <form name=userinfoform class="form-horizontal" method="post" action="">
            <div class="form-group" id="reg_phone_box">
              <div class="input-group  input-group-lg btn-flat">
                <div class="input-group-prepend">
                  <span class="input-group-text"><i class="icon-screen-smartphone"></i></span>
                </div>
                <input type="text" name="reg_phone" class="form-control btn-flat" id="reg_phone"
                  onfocus="ThisOnfocus('reg_phone')" maxlength="11" onblur="ThisOnblur('reg_phone')"
                  onkeyup="ThisOnkeyup('reg_phone')" vdata="0" placeholder="手机号码">
              </div>
              <div class="col-sm-12">
                <span class="text-red" id="reg_phone_mes"></span>
              </div>
            </div>
            <div class="form-group" id="reg_email_box">
              <div class="input-group  input-group-lg btn-flat">
                <div class="input-group-prepend">
                  <span class="input-group-text"><i class="icon-envelope-letter"></i></span>
                </div>
                <input type="text" name="reg_email" class="form-control btn-flat" id="reg_email"
                  onfocus="ThisOnfocus('reg_email')" onblur="ThisOnblur('reg_email')" onkeyup="ThisOnkeyup('reg_email')"
                  vdata="0" placeholder="请输入邮箱">
              </div>
              <div class="col-sm-12">
                <span class="text-red" id="reg_email_mes"></span>
              </div>
            </div>
            <div class="form-group" id="reg_username_box">
              <div class="input-group  input-group-lg btn-flat">
                <div class="input-group-prepend">
                  <span class="input-group-text"><i class="icon-user"></i></span>
                </div>
                <input type="text" name="reg_username" class="form-control btn-flat" id="reg_username"
                  onfocus="ThisOnfocus('reg_username')" maxlength="32" onblur="ThisOnblur('reg_username')"
                  onkeyup="ThisOnkeyup('reg_username')" vdata="0" placeholder="请输入用户名">
              </div>
              <div class="col-sm-12">
                <span class="text-red" id="reg_username_mes"></span>
              </div>
            </div>
            <div class="form-group" id="reg_yzm_box">
              <div class="input-group input-group-lg ">
                <div class="input-group-prepend">
                  <span class="input-group-text"><i class="fa fa-qrcode"></i></span>
                </div>
                <input type="text" class="form-control" name="reg_yzm" id="reg_yzm" vdata="0"
                  onfocus="ThisOnfocus('reg_yzm')" onblur="ThisOnblur('reg_yzm')" placeholder="验证码">
                <span class="input-group-append">
                  <button id="ButtonCode" class="btn btn-info btn-flat" type="button">
                    获取验证码 </button>
                </span>
              </div>
              <div class="col-sm-12">
              </div>
            </div>
            <div class="form-group row">
              <div class="input-group  input-group-lg">
                <div class="input-group-prepend">
                  <span class="input-group-text"><i class="fa fa-lock"></i></span>
                </div>
                <input name="reg_password" class="form-control" type="password" id="reg_password"
                  onfocus="ThisOnfocus('reg_password')" maxlength="20" onblur="ThisOnblur('reg_password')"
                  onkeyup="ThisOnkeyup('reg_password')" vdata="0" maxlength="20" placeholder="登录密码">
              </div>
              <div class="col-sm-12">
                <span class="text-red" id="reg_password_mes"></span>
              </div>
            </div>
            <div class="form-group row">
              <div class="input-group  input-group-lg">
                <div class="input-group-prepend">
                  <span class="input-group-text"><i class="fa fa-lock"></i></span>
                </div>
                <input name="reg_pswqueren" class="form-control" type="password" id="reg_pswqueren" vdata="0"
                  onfocus="ThisOnfocus('reg_pswqueren')" maxlength="20" onblur="ThisOnblur('reg_pswqueren')"
                  onkeyup="ThisOnkeyup('reg_pswqueren')" maxlength="20" placeholder="请再次输入登录密码">
              </div>
              <div class="col-sm-12">
                <span class="text-red" id="reg_pswqueren_mes"></span>
              </div>
            </div>
            <div class="form-group row">
              <div class="mui-input-row mui-checkbox mui-left">
                <input name="agreement" id="agreement" value="1" type="checkbox" checked="checked">
                <span id="user_agreement" class="labeltext"><?php echo $lang["sitename"] ;?>注册协议</span>
              </div>
            </div>
            <div class="form-group row">
              <div class="col-md-12">
                <div class="row">
                  <input type="hidden" name="tid" id="tid" value="<?php echo $tid;?>">
                  <input type="hidden" name="safecode" id="safecode" value="<?php echo $token;?>">
                  <input type="hidden" name="smstype" id="smstype" value="1">
                  <input type="hidden" name="regtype" id="regtype" value="1">
                  <input type="hidden" name="posturl" id="posturl" value="<?php echo url('member/sendsms/getcode');?>">
                  <input type="hidden" name="postEmailUrl" id="postEmailUrl"
                    value="<?php echo url('member/sendsms/getEmailCode');?>">
                  <button type="button" class="btn btn-primary btn-block btn-flat  btn-lg"
                    style="font-size: 18px; width: 100%;" id="btnRegister" onclick="return GoRegister()">
                    注册</button>
                </div>
              </div>
            </div>
          </form>
          <div class="text-center mt-20" style="color:#007aff;"> <a href="<?php echo url('/login');?>"
              class="text-center">已有帐号？去登录</a> &nbsp;&nbsp; | &nbsp;&nbsp; <a href="<?php echo url('/findpwd');?>"
              class="text-center">忘记密码?</a></div>
        </div>
        <!-- /.tab-content -->
      </div>
    </div>
    <!-- /.form-box -->
  </div>
  <!-- /.register-box -->
  <!-- jQuery 2.2.3 -->
  <script src="<?php echo YUNYECMS_UI;?>/plugins/jQuery/jquery-3.6.1.min.js"></script>
  <!-- Bootstrap 3.3.6 -->
  <script src="<?php echo YUNYECMS_UI;?>bootstrap/js/bootstrap.min.js"></script>
  <script src="<?php echo YUNYECMS_UI;?>dist/js/admin.js"></script>
  <script src="<?php echo YUNYECMS_UI;?>dist/js/yunyecms_main.js"></script>
  <!-- iCheck -->
  <script src="<?php echo YUNYECMS_UI;?>/plugins/iCheck/icheck.min.js"></script>
  <script src="<?php echo YUNYECMS_PUBLIC;?>member/js/register/index.js?202110" type="text/javascript"></script>
  <link href="<?php echo YUNYECMS_PUBLIC;?>member/css/reg.css" rel="stylesheet" type="text/css" />
  <script>
    $(function () {
      //iCheck for checkbox and radio inputs
      $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
      });
      //Red color scheme for iCheck
      $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
        checkboxClass: 'icheckbox_minimal-red',
        radioClass: 'iradio_minimal-red'
      });
      //Flat red color scheme for iCheck
      $('input[type="checkbox"].flat-blue, input[type="radio"].flat-blue').iCheck({
        checkboxClass: 'icheckbox_flat-blue',
        radioClass: 'iradio_flat-blue'
      });
    });
  </script>
  <script>
    $(function () {
      var reg_phone;
      var reg_email;
      var regtype = $("#regtype").val();
      var smstype = $("#smstype").val();
      var posturl = $("#posturl").val();
      var postEmailUrl = $("#postEmailUrl").val();
      $("#ButtonCode").click(function () {
        reg_phone = $("#reg_phone").val();
        reg_email = $("#reg_email").val();
        regtype = $("#regtype").val();
        posturl = $("#posturl").val();
        if (regtype == '1') {
          GetCode(reg_phone, smstype, posturl);
        } else if (regtype == '2') {
          GetEmailCode(reg_email, smstype, postEmailUrl);
        }
      });
      var obj_phone = $("#reg_phone_box");
      var obj_email = $("#reg_email_box");
      var obj_username = $("#reg_username_box");
      var obj_yzm = $("#reg_yzm_box");
      obj_username.hide();
      obj_email.hide();
      $("#sign_type").children(":first").click(function () {
        obj_phone.show();
        obj_username.hide();
        obj_email.hide();
        obj_yzm.show();
        $("#regtype").val(1)
      });
      $("#sign_type").children().eq(1).click(function () {
        obj_phone.hide();
        obj_username.hide();
        obj_email.show();
        obj_yzm.show();
        $("#regtype").val(2)
      });
      $("#sign_type").children().eq(2).click(function () {
        obj_phone.hide();
        obj_username.show();
        obj_email.hide();
        obj_yzm.hide();
        $("#regtype").val(3)
      });
    });
    $("#agreement").change(function () {
      var value = this.checked ? "true" : "false";
      if (value == "false") {
        mui.toast("您必须同意我们的用户协议才可以注册", { type: 'div' });
        $("#btnRegister").attr("disabled", true);
      } else {
        $("#btnRegister").attr("disabled", false);
      }
    });
    $("#user_agreement").click(function () {
      var agreement_url = "<?php echo url('member/member/agreement');?>";
      openDialogByIframe("用户注册协议", agreement_url);
    });
  </script>
  <style>
    * {
      touch-action: none;
    }
  </style>
</body>

</html>