Пример #1
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
login();
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require MD_ROOT . '/member.class.php';
require DT_ROOT . '/include/post.func.php';
$do = new member();
$do->userid = $_userid;
$user = $do->get_one();
$MFD = cache_read('fields-member.php');
$CFD = cache_read('fields-company.php');
isset($post_fields) or $post_fields = array();
if ($MFD || $CFD) {
    require DT_ROOT . '/include/fields.func.php';
}
$group_editor = $MG['editor'];
in_array($group_editor, array('Default', 'Destoon', 'Simple', 'Basic')) or $group_editor = 'Destoon';
$tab = isset($tab) ? intval($tab) : 0;
if ($submit) {
    if ($post['password'] && $user['password'] != md5(md5($post['oldpassword']))) {
        message($L['error_password']);
    }
    if ($post['payword'] && $user['payword'] != md5(md5($post['oldpayword']))) {
        message($L['error_payword']);
    }
    $post['groupid'] = $user['groupid'];
    $post['email'] = $user['email'];
    $post['passport'] = $user['passport'];
    $post['company'] = $user['company'];
    $post['domain'] = $user['domain'];
Пример #2
0
    case 'mobilecode':
        $value = trim($value);
        if (!preg_match("/[0-9]{6}/", $value)) {
            exit('&nbsp;');
        }
        $session = new dsession();
        if ($_SESSION['mobile_code'] != md5($_SESSION['mobile'] . '|' . $value)) {
            exit('&nbsp;');
        }
        break;
    case 'company':
        if (!$value) {
            exit($L['member_company_null']);
        }
        if (!$do->is_company($value)) {
            exit($L['member_company_reg']);
        }
        if ($do->company_exists($value)) {
            exit($L['member_company_reg']);
        }
        break;
    case 'get_company':
        $user = $do->get_one($value);
        if ($user) {
            echo '<a href="' . $user['linkurl'] . '" target="_blank" class="t">' . $user['company'] . '</a>' . ($user['vip'] ? ' <img src="' . DT_SKIN . 'image/vip.gif" align="absmiddle"/> <img src="' . DT_SKIN . 'image/vip_' . $user['vip'] . '.gif" align="absmiddle"/>' : '');
        } else {
            echo '1';
        }
        exit;
        break;
}
Пример #3
0
                 if ($MOD['welcome_email'] && $DT['mail_type'] != 'close') {
                     send_mail($email, $title, $content);
                 }
             }
             dmsg('添加成功', $forward);
         } else {
             msg($do->errmsg);
         }
     } else {
         include tpl('member_add', $module);
     }
     break;
 case 'edit':
     $userid or msg();
     $do->userid = $userid;
     $user = $do->get_one();
     if (!$_founder && $userid != $_userid && $user['groupid'] == 1) {
         msg('您无权修改其他管理员资料');
     }
     if ($submit) {
         if ($userid == $_userid && $member['password']) {
             msg('系统检查到您要修改密码,正在进入密码修改界面...', '?action=password', 3);
         }
         $member['passport'] = $user['passport'];
         $member['edittime'] = $member['edittime'] ? $DT_TIME : 0;
         $member['validtime'] = $member['validtime'] ? strtotime($member['validtime']) : 0;
         if ($userid == 1 || $userid == $CFG['founderid']) {
             $member['groupid'] = 1;
         }
         if ($MFD) {
             fields_check($post_fields, $MFD);