Пример #1
0
$email = $_POST['email'];
$email = addslashes(strtolower($email));
$passwd = $_POST['passwd'];
$name = addslashes($_POST['name']);
$repasswd = $_POST['repasswd'];
$code = addslashes($_POST['code']);
$role = 'user';
$question = addslashes($_POST['question']);
$answer = addslashes($_POST['answer']);
if (isset($_POST['inviter'])) {
    $inviter = addslashes($_POST['inviter']);
} else {
    $inviter = 0;
}
$c = new \Ss\User\UserCheck();
$code = new \Ss\User\InviteCode($code);
if (!$code->IsCodeOk()) {
    $a['msg'] = "邀请码无效";
} elseif (!$c->IsEmailLegal($email)) {
    $a['msg'] = "邮箱无效";
} elseif ($c->IsEmailUsed($email)) {
    $a['msg'] = "邮箱已被使用";
} elseif ($repasswd != $passwd) {
    $a['msg'] = "两次密码输入不符";
} elseif (strlen($passwd) < 8) {
    $a['msg'] = "密码太短";
} elseif (strlen($name) < 5) {
    $a['msg'] = "用户名太短";
} elseif ($c->IsUsernameUsed($name)) {
    $a['msg'] = "用户名已经被使用";
} elseif (empty($question)) {
Пример #2
0
<?php

require_once 'lib/config.php';
include_once 'header.php';
$c = new Ss\User\InviteCode();
?>
<body>
<div class="container">
    <?php 
include_once 'nav.php';
?>

    <div class="jumbotron">
        <p class="lead"> 邀请码实时刷新</p>
        <p>如遇到无邀请码请找已经注册的用户获取。</p>
    </div>

    <div class="row marketing">
        <h2 class="sub-header">邀请码</h2>
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                <tr>
                    <th>###</th>
                    <th>邀请码</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody>
                <?php 
$datas = $c->get_code_array(0, 21);
Пример #3
0
<?php

//引入配置文件
require_once '../lib/config.php';
require_once '_check.php';
$sub = $_POST['code_sub'];
$type = $_POST['code_type'];
$num = $_POST['code_num'];
$c = new \Ss\User\InviteCode();
$c->AddCode($sub, $type, $num);
echo ' <script>alert("添加成功!")</script> ';
echo " <script>window.location='invite.php';</script> ";
Пример #4
0
<?php

require_once '../lib/config.php';
$email = $_POST['email'];
$email = strtolower($email);
$passwd = $_POST['passwd'];
$name = $_POST['name'];
$repasswd = $_POST['repasswd'];
$agree = $_POST['agree'];
$code = $_POST['code'];
$node = $_POST['node'];
$c = new \Ss\User\UserCheck();
$code = new \Ss\User\InviteCode($code);
$count = (new \Ss\User\Ssh())->getCount();
if ($count <= 0) {
    $a['msg'] = "注册名额已满";
} elseif ($invite_necessary) {
    if (!$code->IsCodeOk()) {
        $a['msg'] = "邀请码无效";
    }
} elseif (!$c->IsEmailLegal($email)) {
    $a['msg'] = "邮箱无效";
} elseif ($c->IsEmailUsed($email)) {
    $a['msg'] = "邮箱已被使用";
} elseif ($repasswd != $passwd) {
    $a['msg'] = "两次密码输入不符";
} elseif (strlen($passwd) < 6) {
    $a['msg'] = "密码太短";
} elseif (strlen($name) < 4) {
    $a['msg'] = "用户名太短";
} elseif ($c->IsUsernameUsed($name)) {
Пример #5
0
<?php

require_once '../lib/config.php';
$email = $_POST['email'];
$email = strtolower($email);
$passwd = $_POST['passwd'];
$name = $_POST['name'];
$repasswd = $_POST['repasswd'];
$code = $_POST['code'];
$c = new \Ss\User\UserCheck();
$code = new \Ss\User\InviteCode($code);
if ($user_need_invite == 1 and !$code->IsCodeOk()) {
    $a['msg'] = "邀请码无效";
} elseif (!$c->IsEmailLegal($email)) {
    $a['msg'] = "邮箱无效";
} elseif ($c->IsEmailUsed($email)) {
    $a['msg'] = "邮箱已被使用";
} elseif ($repasswd != $passwd) {
    $a['msg'] = "两次密码输入不符";
} elseif (strlen($passwd) < 8) {
    $a['msg'] = "密码太短";
} elseif (strlen($name) < 7) {
    $a['msg'] = "用户名太短";
} elseif ($c->IsUsernameUsed($name)) {
    $a['msg'] = "用户名已经被使用";
} else {
    // get value
    if ($user_need_invite == 1) {
        $ref_by = $code->GetCodeUser();
    } else {
        $ref_by = 0;