$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)) { $forward = 'index.php'; }
<?php if (empty($_GET['uid'])) { ?> var s = document.getElementsByTagName('SCRIPT'), x = document.createElement('SCRIPT'), u = location.href.match(/\buid=[^&]*/i);if(u){s = s[s.length -1].src;x.type = 'text/javascript';x.src = s + (s.indexOf('?') < 0 ? '?' : '&') + u[0] + '&url=' + encodeURIComponent(location.href) + '&referrer=' + encodeURIComponent(document.referrer);document.getElementsByTagName('HEAD')[0].appendChild(x);} <?php } else { include_once dirname(dirname(__FILE__)) . '/include/general.inc.php'; include_once M_ROOT . '/include/common.fun.php'; cms_spread(stripslashes($uid)); echo "'<script type=\"text/javascript\">location.href='{$cms_abs}';</script>'"; }