Example #1
0
         if ($uid == -2) {
             exit('passport');
         }
     }
     if ($post['regid'] == 5) {
         $post['company'] = $post['truename'];
     }
     $post['groupid'] = $need_check ? 4 : $post['regid'];
     $post['content'] = $post['introduce'] = $post['thumb'] = $post['banner'] = $post['catid'] = $post['catids'] = '';
     $post['edittime'] = 0;
     $inviter = get_cookie('inviter');
     $post['inviter'] = $inviter ? decrypt($inviter, DT_KEY . 'INVITER') : '';
     check_name($post['inviter']) or $post['inviter'] = '';
     require DT_ROOT . '/module/member/member.class.php';
     $do = new member();
     if ($do->add($post)) {
         $note = timetodate($DT_TIME, 5) . '|system|' . $L['register_note'];
         $db->query("UPDATE {$DT_PRE}member SET note='{$note}' WHERE userid='{$do->userid}'");
         $_SESSION['m_name'] = $post['username'];
         $_SESSION['m_pass'] = $post['password'];
         exit('ok');
     } else {
         echo $do->errmsg;
         if (DT_CHARSET != 'UTF-8') {
             toutf8();
         }
         exit;
     }
     break;
 default:
     $back_link = 'login.php';
Example #2
0
 case 'add':
     if ($submit) {
         $member['groupid'] = $member['regid'];
         if ($member['groupid'] == 5) {
             $member['company'] = $member['truename'];
         }
         $member['passport'] = $member['passport'] ? $member['passport'] : $member['username'];
         $member['edittime'] = $member['edittime'] ? $DT_TIME : 0;
         $member['inviter'] = $member['username'];
         if ($MFD) {
             fields_check($post_fields, $MFD);
         }
         if ($CFD) {
             fields_check($post_fields, $CFD);
         }
         if ($do->add($member)) {
             if ($MFD) {
                 fields_update($post_fields, $do->table_member, $do->userid, 'userid', $MFD);
             }
             if ($CFD) {
                 fields_update($post_fields, $do->table_company, $do->userid, 'userid', $CFD);
             }
             if ($MOD['welcome_sms'] && $DT['sms'] && is_mobile($member['mobile'])) {
                 $message = lang('sms->wel_reg', array($member['truename'], $DT['sitename'], $member['username'], $member['password']));
                 $message = strip_sms($message);
                 send_sms($member['mobile'], $message);
             }
             if ($MOD['welcome_message'] || $MOD['welcome_email']) {
                 $post = $member;
                 $username = $member['username'];
                 $email = $member['email'];