Exemple #1
0
     aExit(1);
 }
 $mod_user = $user;
 $user_id = Filter::input('user_id', 'post', 'int');
 if ($user_id and $user->lvl() >= 15) {
     tokenTool('check');
     $mod_user = new User($user_id);
     if (!$mod_user->id()) {
         aExit(2, lng('USER_NOT_EXIST'));
     }
     $group = Filter::input('new_group', 'post', 'int', true);
     $money = Filter::input('new_money', 'post', 'int');
     $gender = Filter::input('new_gender', 'post', 'int', true);
     $mail = Filter::input('new_email', 'post', 'mail');
     if ($group !== false) {
         if ($mod_user->changeGroup($group)) {
             $rcodes[] = 1;
         }
     }
     if ($money) {
         if ($mod_user->addMoney($money)) {
             $rcodes[] = 1;
         }
     }
     if ($gender !== false) {
         $gender = !$gender ? 0 : 1;
         if ($mod_user->changeGender($gender)) {
             $rcodes[] = 1;
         }
     }
     if ($mail) {
Exemple #2
0
                $message .= lng('INCORRECT_LEN') . '. (' . lng('EMAIL') . ')';
                break;
            default:
                $modifed = false;
                break;
        }
        if ($modifed) {
            $message .= "<br />";
        }
    }
    aExit(2, $message);
}
if ($input['method'] == 2) {
    $tmp_user = new User($input['id']);
    if ($tmp_user->id() and !strcmp($tmp_user->getVerificationStr(), $input['verificate'])) {
        $tmp_user->changeGroup(1);
    }
    exit(View::ShowStaticPage('mail_verification_ok.html', 'other/'));
}
RefreshBans();
$female = $input['female'] ? 1 : 0;
if (!CanAccess()) {
    aExit(11, lng('IP_BANNED'));
}
if (empty($input['login']) || empty($input['pass']) || empty($input['repass'])) {
    aExit(1, lng('INCOMPLETE_FORM'));
}
if (!preg_match("/^[a-zA-Z0-9_-]+\$/", $input['login'])) {
    $rcodes[] = 2;
}
if (!preg_match("/^[a-zA-Z0-9_-]+\$/", $input['pass'])) {