| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- if (!defined('IN_MYMPS')) {
- exit('Forbidden');
- }
- if (submit_check('password_submit')) {
- if (empty($curuserpwd)) {
- write_msg('', '?m=password&error=48');
- }
- if (md5($curuserpwd) != $row['userpwd']) {
- write_msg('', '?m=password&error=47');
- }
- if (!empty($userpwd) && $userpwd != $reuserpwd) {
- write_msg('', '?m=password&error=20');
- }
- if (PASSPORT_TYPE == 'phpwind') {
- require MYMPS_ROOT . '/pw_client/uc_client.php';
- $pw_user = uc_user_get($s_uid);
- $result = uc_user_edit($pw_user['uid'], $pw_user['username'], '', md5($userpwd), '');
- if ($result == 1) {
- }
- else if ($result == -3) {
- write_msg('', '?m=password&error=21');
- }
- else if ($result == -4) {
- write_msg('', '?m=password&error=23');
- }
- else if ($result == -2) {
- write_msg('', '?m=password&error=24');
- }
- else if ($result == -1) {
- write_msg('', '?m=password&error=24');
- }
- else {
- write_msg('', '?m=password&error=26');
- }
- }
- else if (PASSPORT_TYPE == 'ucenter') {
- require MYMPS_ROOT . '/uc_client/client.php';
- $result = uc_user_edit($s_uid, $userpwd, $userpwd, $email, 1);
- if ($result == 1) {
- }
- else if ($result == -4) {
- write_msg('', '?m=password&error=21');
- }
- else if ($result == -5) {
- write_msg('', '?m=password&error=22');
- }
- else if ($result == -6) {
- write_msg('', '?m=password&error=23');
- }
- else if ($result == -8) {
- write_msg('', '?m=password&error=24');
- }
- else if ($result == -1) {
- write_msg('', '?m=password&error=25');
- }
- else {
- write_msg('', '?m=password&error=26');
- }
- }
- if (!empty($userpwd)) {
- $sql = 'UPDATE `' . $db_mymps . 'member` SET userpwd=\'' . md5($userpwd) . ('\' WHERE userid = \'' . $s_uid . '\'');
- }
- else {
- write_msg('', '?m=password&error=13');
- }
- $db->query($sql);
- write_msg('', '?m=password&success=8');
- }
- else {
- $location = location();
- include mymps_tpl('password');
- }
- ?>
|