$MUploadResult = $UploadAvatar->Resize(48, 'upload/avatar/middle/' . $CurUserID . '.png', 90); $SUploadResult = $UploadAvatar->Resize(24, 'upload/avatar/small/' . $CurUserID . '.png', 90); if ($LUploadResult && $MUploadResult && $SUploadResult) { $UploadAvatarMessage = $Lang['Avatar_Upload_Success']; } else { $UploadAvatarMessage = $Lang['Avatar_Upload_Failure']; } } else { $UploadAvatarMessage = $Lang['Avatar_Is_Oversize']; } break; case 'UpdateUserInfo': $CurUserInfo['UserSex'] = intval(Request('POST', 'UserSex', 0)); $CurUserInfo['UserMail'] = IsEmail(Request('POST', 'UserMail', $CurUserInfo['UserMail'])) ? Request('POST', 'UserMail', $CurUserInfo['UserMail']) : $CurUserInfo['UserMail']; $CurUserInfo['UserHomepage'] = CharCV(Request('POST', 'UserHomepage', $CurUserInfo['UserHomepage'])); $CurUserInfo['UserIntro'] = CharCV(Request('POST', 'UserIntro', $CurUserInfo['UserIntro'])); $UpdateUserInfoResult = UpdateUserInfo(array('UserSex' => $CurUserInfo['UserSex'], 'UserMail' => $CurUserInfo['UserMail'], 'UserHomepage' => $CurUserInfo['UserHomepage'], 'UserIntro' => $CurUserInfo['UserIntro'])); if ($UpdateUserInfoResult) { $UpdateUserInfoMessage = $Lang['Profile_Modified_Successfully']; } else { $UpdateUserInfoMessage = $Lang['Profile_Do_Not_Modify']; } break; case 'ChangePassword': $OriginalPassword = Request('Post', 'OriginalPassword'); $NewPassword = Request('Post', 'NewPassword'); $NewPassword2 = Request('Post', 'NewPassword2'); if (($OriginalPassword || $DoNotNeedOriginalPassword) && $NewPassword && $NewPassword2) { if ($NewPassword == $NewPassword2) { if (md5(md5($OriginalPassword) . $CurUserInfo['Salt']) === $CurUserInfo['Password'] || $DoNotNeedOriginalPassword) { if ($OriginalPassword != $NewPassword || $DoNotNeedOriginalPassword) {
} else { AlertMsg('404 Not Found', '404 Not Found', 404); } break; //Tag //Tag case 5: $TagInfo = $DB->row("SELECT * FROM " . $Prefix . "tags Where ID=:ID", array("ID" => $ID)); if (!$TagInfo) { AlertMsg('Tag Not Found', 'Tag Not Found'); } switch ($Action) { // 修改标签描述 case 'EditDescription': Auth(3); $Content = CharCV(Request('Post', 'Content', $TagInfo['Description'])); if ($Content == $TagInfo['Description']) { AlertMsg($Lang['Do_Not_Modify'], $Lang['Do_Not_Modify']); } if ($DB->query('UPDATE ' . $Prefix . 'tags SET Description = :Content WHERE ID=:TagID', array('TagID' => $ID, 'Content' => $Content))) { $Message = $Lang['Edited']; } else { AlertMsg($Lang['Failure_Edit'], $Lang['Failure_Edit']); } break; // 修改标签图标 // 修改标签图标 case 'UploadIcon': Auth(3); if ($_FILES['TagIcon']['size'] && $_FILES['TagIcon']['size'] < 1048576) { require __DIR__ . "/includes/ImageResize.class.php";