Exemple #1
0
 }
 if (empty($_POST['user_id'])) {
     check::AlertExit("用户ID不能为空!", -1);
 }
 if (empty($_POST['nick_name'])) {
     check::AlertExit("用户昵称不能为空!", -1);
 }
 //如果两次密码不一致,说明,需要更新密码
 if ($_POST['password'] != $_POST['oldpassword']) {
     if (!empty($arrGWeb['user_pass_type'])) {
         $_POST['password'] = check::strEncryption($_POST['password'], $arrGWeb['jamstr']);
     }
 }
 unset($_POST['oldpassword']);
 if ($_POST['user_name'] != $_POST['olduser_name']) {
     $arr = $objWebInit->getUserWhere(" Where user_name='" . $_POST['user_name'] . "'");
     if (!empty($arr)) {
         check::AlertExit($_POST['user_name'] . ", 该用户名已被占用", -1);
     }
 }
 unset($_POST['olduser_name']);
 //生日转换
 $_POST['birthday'] = date('Y-m-d', strtotime($_POST['year'] . '-' . $_POST['month'] . '-' . $_POST['day']));
 unset($_POST['year']);
 unset($_POST['month']);
 unset($_POST['day']);
 //$arrInfo = array_merge($arrInfo,$_POST);
 // 不能修改 用户名称、用户密码、电子邮件
 //unset($_POST['email']);
 //unset($_POST['user_name']);
 //unset($_POST['password']);
Exemple #2
0
    check::AlertExit('对不起,您没有写权限', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!check::CheckUser($_POST['user_name'])) {
        check::AlertExit("输入的用户名必须是4-21字符之间的数字、字母,或7个中文!", -1);
    }
    if (!check::CheckPassword($_POST['password'])) {
        check::AlertExit("输入的密码必须是4-21字符之间的数字、字母!", -1);
    }
    if (!check::CheckEmailAddr($_POST['email'])) {
        check::AlertExit("输入的email必须是合法的email!", -1);
    }
    if (!check::CheckMobilePhone($_POST['mobile'])) {
        check::AlertExit("输入的手机必须是合法的手机号码!", -1);
    }
    $arr = $objWebInit->getUserWhere(" Where user_name='" . $_POST['user_name'] . "'");
    if (!empty($arr)) {
        check::AlertExit($_POST['user_name'] . ", 该用户名已被占用", -1);
    }
    $arr = $objWebInit->getUserWhere(" Where email='" . $_POST['email'] . "'");
    if (!empty($arr)) {
        check::AlertExit($_POST['email'] . ", 该email已被占用", -1);
    }
    $arr = $objWebInit->getUserWhere(" Where mobile='" . $_POST['mobile'] . "'");
    if (!empty($arr)) {
        check::AlertExit($_POST['mobile'] . ", 该手机已被占用", -1);
    }
    $_POST['user_ip'] = check::getIP();
    //图片上传
    for ($i = 0; $i < count($_FILES); $i++) {
        $num = $i;