Example #1
0
     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;
     if ($_FILES['Filedata' . $num]['name'] != "") {
         $_POST['photo' . $i] = $objWebInit->uploadInfoImage($_FILES['Filedata' . $num], $num, $_POST['csize' . $i]);
         unset($_POST['csize' . $i]);
     }
     unset($_POST['savefilename' . $i]);
 }
 //生日转换
 $_POST['birthday'] = date('Y-m-d', strtotime($_POST['year'] . '-' . $_POST['month'] . '-' . $_POST['day']));
 unset($_POST['year']);
 unset($_POST['month']);
 unset($_POST['day']);
 //会员信息密码处理
 if (!empty($arrGWeb['user_pass_type'])) {
     $_POST['password'] = check::strEncryption($_POST['password'], $arrGWeb['jamstr']);
 }
 $objWebInit->saveInfo($_POST, 0);
 check::WindowLocation('./index.php', '1');