$newuser->useradd($mainarr['mname'], $mainarr['password'], $mainarr['email'], $mchid); $mid = $newuser->info['mid']; $c_upload->closure(1, $mid, 'members'); $mid || message('memregisterfail', M_REFERER); if ($autocheck == 2) { $confirmid = random(6); $confirmstr = "{$timestamp}\t2\t{$confirmid}"; $subarr['confirmstr'] = $confirmstr; } foreach (array('main', 'sub', 'custom') as $var) { foreach (${$var . 'arr'} as $k => $v) { $newuser->updatefield($k, $v, $var); } } $newuser->autoinit(); $newuser->updatedb(); unset($newuser); cms_spread(empty($_REQUEST['uid']) ? '' : stripslashes($_REQUEST['uid']), 1); if ($autocheck == 1) { msetcookie('userauth', authcode("{$md5_password}\t{$mid}", 'ENCODE')); if ($enable_pptout && !empty($pptout_file) && !empty($pptout_url)) { $action = 'login'; $username = $mname; include M_ROOT . './include/pptout/' . $pptout_file . '.php'; header('location:' . $url); exit; } } elseif ($autocheck == 2) { mailto($email, 'member_active_subject', 'member_active_content', array('mid' => $mid, 'mname' => $mname, 'url' => "{$cms_abs}tools/memactive.php?action=emailactive&mid={$mid}&id={$confirmid}")); } if (!$forward || preg_match('/\\bregister.php(\\?|#|$)/i', $forward)) {
if ($arr = multi_val_arr($a_field->newvalue, $v)) { foreach ($arr as $x => $y) { $actuser->updatefield($k . '_' . $x, $y, $v['tbl']); } } } } unset($a_field); if ($enable_uc && $actuser->info['password'] != $minfosnew['password']) { require_once M_ROOT . './include/ucenter/config.inc.php'; require_once M_ROOT . './uc_client/client.php'; if (1 != uc_user_edit($actuser->info['mname'], '', $minfosnew['password'], '', 1)) { amessage('mempassmodfai'); } } $actuser->updatedb(); $c_upload->closure(1, $mid, 'members'); $c_upload->saveuptotal(1); adminlog(lang('detail_edit_member')); amessage('membermodifyfinish', M_REFERER); } } elseif ($action == 'grouptype' && $mid) { if (!submitcheck('bmemberdetail')) { $a_field = new cls_field(); $submitstr = ''; tabheader(lang('usergroup_msg') . ' : [' . $mchannel['cname'] . ']' . $actuser->info['mname'], 'memberdetail', "?entry=member&action=grouptype&mid={$mid}", 4, 1, 1); foreach ($grouptypes as $gtid => $grouptype) { if ($grouptype['mode'] < 2 && !in_array($mchid, explode(',', $grouptype['mchids'])) && ($backamember || $gtid != 2)) { $actuser->info['grouptype' . $gtid . 'date'] = !$actuser->info['grouptype' . $gtid . 'date'] ? '' : date('Y-m-d', $actuser->info['grouptype' . $gtid . 'date']); $ugidsarr = array('0' => lang('release_usergroup')) + ugidsarr($grouptype['gtid'], $mchid); echo "<tr class=\"txt\">\n" . "<td class=\"txtL w15B\">{$grouptype['cname']}</td>\n" . "<td class=\"txtL w35B\"><select style=\"vertical-align: middle;\" name=\"minfosnew[grouptype" . $gtid . "]\">" . makeoption($ugidsarr, $actuser->info['grouptype' . $gtid]) . "</select></td>\n" . "<td class=\"txtL w15B\">" . lang('enddate') . "</td>\n" . "<td class=\"txtL w35B\"><input type=\"text\" size=\"20\" id=\"minfosnew[grouptype" . $gtid . "date]\" name=\"minfosnew[grouptype" . $gtid . "date]\" value=\"" . $actuser->info['grouptype' . $gtid . 'date'] . "\" onclick=\"ShowCalendar(this.id);\"></td>\n" . "</tr>";
$c_upload = new cls_upload(); $a_field = new cls_field(); foreach ($values as $k => $v) { $a_field->init(); $a_field->field = read_cache('mfield', $user->info['mchid'], $k); if ($curuser->pmbypmids('field', $a_field->field['pmid'])) { $a_field->deal('memcertnew'); if (!empty($a_field->error)) { $c_upload->rollback(); message($a_field->error, M_REFERER); } $user->updatefield($k, $a_field->newvalue, $a_field->field['tbl']); $certdata['flags'][$k] = 1; } } $user->updatedb(); $db->query("UPDATE {$tblprefix}mcrecords SET checktime='{$timestamp}',certdata='" . addslashes(serialize($certdata)) . "' WHERE crid='{$crid}'"); amessage('memcert_check_finish', axaction(6, "?entry={$entry}")); } break; case 'memcerts': //类别管理 if (!submitcheck('bmemcertedit')) { tabheader(lang('memcert_admin') . " >> <a href=\"?entry={$entry}&action=add\">" . lang('memcert_add') . '</a>', 'memcert_admin', "?entry={$entry}&action={$action}"); trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" onclick=\"checkall(this.form, 'selectid', 'chkall')\">", array(lang('ID'), 'txtL'), array(lang('title'), 'txtL'), lang('memcert_level'), lang('detail'))); $query = $db->query("SELECT mcid,title,level FROM {$tblprefix}memcerts ORDER BY level DESC"); while ($row = $db->fetch_array($query)) { echo "<tr class=\"txtC\">" . "<td class=\"txtC w40\"><input class=\"checkbox\" type=\"checkbox\" name=\"selectid[]\" value=\"{$row['mcid']}\"></td>\n" . "<td class=\"txtL w60\">{$row['mcid']}</td>\n" . "<td class=\"txtL\"><input type=\"text\" size=\"40\" name=\"memcertnew[{$row['mcid']}][title]\" value=\"{$row['title']}\"></td>\n" . "<td class=\"txtC w80\"><input type=\"text\" size=\"5\" name=\"memcertnew[{$row['mcid']}][level]\" value=\"{$row['level']}\"></td>\n" . "<td class=\"txtC w40\"><a href=\"?entry={$entry}&action=detail&mcid={$row['mcid']}\" onclick=\"return floatwin('open_memcert_detail',this)\">" . lang('setting') . "</a></td>\n" . "</tr>\n"; } tabfooter(); tabheader(lang('operate_item'));