C::t('common_member_profile')->update($member['uid'], array('bio' => $biohtmlnew));
            C::t('common_member_field_forum')->update($member['uid'], array('sightml' => $sightmlnew));
        }
        acpmsg('members_edit_succeed', "{$cpscript}?mod=modcp&action={$_GET['action']}&op={$op}");
    } elseif ($member) {
        require_once libfile('function/editor');
        $bio = explode("\t\t\t", $member['bio']);
        $member['bio'] = html2bbcode($bio[0]);
        $member['biotrade'] = !empty($bio[1]) ? html2bbcode($bio[1]) : '';
        $member['signature'] = html2bbcode($member['sightml']);
        $username = !empty($_GET['username']) ? $member['username'] : '';
    }
} elseif ($op == 'ban' && ($_G['group']['allowbanuser'] || $_G['group']['allowbanvisituser'])) {
    $_GET['uid'] = isset($_GET['uid']) ? intval($_GET['uid']) : '';
    $_GET['username'] = isset($_GET['username']) ? trim($_GET['username']) : '';
    $member = loadmember($_GET['uid'], $_GET['username'], $error);
    $usernameenc = $member ? rawurlencode($member['username']) : '';
    include_once libfile('function/member');
    $clist = crime('getactionlist', $member['uid']);
    if ($member['type'] == 'system' && in_array($member['groupid'], array(1, 2, 3, 6, 7, 8)) || $member['type'] == 'special') {
        acpmsg('modcp_member_ban_illegal');
    }
    if ($member && submitcheck('bansubmit') && !$error) {
        $setarr = array();
        $reason = dhtmlspecialchars(trim($_GET['reason']));
        if (!$reason && ($_G['group']['reasonpm'] == 1 || $_G['group']['reasonpm'] == 3)) {
            acpmsg('admin_reason_invalid');
        }
        if ($_GET['bannew'] == 4 || $_GET['bannew'] == 5) {
            if ($_GET['bannew'] == 4 && !$_G['group']['allowbanuser'] || $_GET['bannew'] == 5 && !$_G['group']['allowbanvisituser']) {
                acpmsg('admin_nopermission');
Esempio n. 2
0
            DB::query("UPDATE " . DB::table('common_member_profile') . " SET bio='{$biohtmlnew}' WHERE uid='{$member['uid']}'");
            DB::query("UPDATE " . DB::table('common_member_field_forum') . " SET sightml='{$sightmlnew}' WHERE uid='{$member['uid']}'");
        }
        acpmsg('members_edit_succeed', "{$cpscript}?mod=modcp&action={$_G['gp_action']}&op={$op}");
    } elseif ($member) {
        require_once libfile('function/editor');
        $bio = explode("\t\t\t", $member['bio']);
        $member['bio'] = html2bbcode($bio[0]);
        $member['biotrade'] = !empty($bio[1]) ? html2bbcode($bio[1]) : '';
        $member['signature'] = html2bbcode($member['sightml']);
        $username = !empty($_G['gp_username']) ? $member['username'] : '';
    }
} elseif ($op == 'ban' && $_G['group']['allowbanuser']) {
    $_G['gp_uid'] = isset($_G['gp_uid']) ? intval($_G['gp_uid']) : '';
    $_G['gp_username'] = isset($_G['gp_username']) ? trim($_G['gp_username']) : '';
    $member = loadmember($_G['gp_uid'], $_G['gp_username'], $error);
    $usernameenc = $member ? rawurlencode($member['username']) : '';
    if ($member && submitcheck('bansubmit') && !$error) {
        $sql = 'uid=uid';
        $reason = trim($_G['gp_reason']);
        if (!$reason && ($_G['group']['reasonpm'] == 1 || $_G['group']['reasonpm'] == 3)) {
            acpmsg('admin_reason_invalid');
        }
        if ($_G['gp_bannew'] == 4 || $_G['gp_bannew'] == 5) {
            $groupidnew = $_G['gp_bannew'];
            $banexpirynew = !empty($_G['gp_banexpirynew']) ? TIMESTAMP + $_G['gp_banexpirynew'] * 86400 : 0;
            $banexpirynew = $banexpirynew > TIMESTAMP ? $banexpirynew : 0;
            if ($banexpirynew) {
                $member['groupterms'] = $member['groupterms'] && is_array($member['groupterms']) ? $member['groupterms'] : array();
                $member['groupterms']['main'] = array('time' => $banexpirynew, 'adminid' => $member['adminid'], 'groupid' => $member['groupid']);
                $member['groupterms']['ext'][$groupidnew] = $banexpirynew;
Esempio n. 3
0
		acpmsg('members_edit_succeed', "$cpscript?action=$action&op=$op");

	} elseif($member) {

		require_once DISCUZ_ROOT.'./include/editor.func.php';
		$bio = explode("\t\t\t", $member['bio']);
		$member['bio'] = html2bbcode($bio[0]);
		$member['biotrade'] = html2bbcode($bio[1]);
		$member['signature'] = html2bbcode($member['sightml']);
		$username = !empty($username) ? $member['username'] : '';

	}

} elseif($op == 'ban' && $allowbanuser) {

	$member = loadmember($uid, $username, $error);
	$usernameenc = rawurlencode($member['username']);
	
	if($member && submitcheck('bansubmit') && !$error) {
		$sql = 'uid=uid';
		$reason = trim($reason);
		if(!$reason && ($reasonpm == 1 || $reasonpm == 3)) {
			acpmsg('admin_reason_invalid');
		}

		if($bannew == 4 || $bannew == 5) {
			$groupidnew = $bannew;
			$banexpirynew = !empty($banexpirynew) ? $timestamp + $banexpirynew * 86400 : 0;
			$banexpirynew = $banexpirynew > $timestamp ? $banexpirynew : 0;
			if($banexpirynew) {
				$member['groupterms'] = $member['groupterms'] && is_array($member['groupterms']) ? $member['groupterms'] : array();