示例#1
0
    if (!$row['po_id']) {
        continue;
    }
    if ($row['po_point'] < 0) {
        $mb_id = $row['mb_id'];
        $po_point = abs($row['po_point']);
        if ($row['po_rel_table'] == '@expire') {
            delete_expire_point($mb_id, $po_point);
        } else {
            delete_use_point($mb_id, $po_point);
        }
    } else {
        if ($row['po_use_point'] > 0) {
            insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
        }
    }
    // 포인트 내역삭제
    $sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
    sql_query($sql);
    // po_mb_point에 반영
    $sql = " update {$g5['point_table']}\n                set po_mb_point = po_mb_point - '{$row['po_point']}'\n                where mb_id = '{$_POST['mb_id'][$k]}'\n                  and po_id > '{$_POST['po_id'][$k]}' ";
    sql_query($sql);
    // 포인트 UPDATE
    $sum_point = get_point_sum($_POST['mb_id'][$k]);
    $sql = " update {$g5['member_table']} set mb_point = '{$sum_point}' where mb_id = '{$_POST['mb_id'][$k]}' ";
    sql_query($sql);
    // XP UPDATE
    $point = $row['po_point'] * -1;
    update_xp($row['mb_id'], $point, $row['po_content'], $row['po_rel_table'], $row['po_rel_action']);
}
goto_url('./point_list.php?' . $qstr);
示例#2
0
if ($mb['mb_leave_date'] && $mb['mb_leave_date'] <= date("Ymd", G5_SERVER_TIME)) {
    $date = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/", "\\1년 \\2월 \\3일", $mb['mb_leave_date']);
    alert('탈퇴한 아이디이므로 접근하실 수 없습니다.\\n탈퇴일 : ' . $date);
}
if ($config['cf_use_email_certify'] && !preg_match("/[1-9]/", $mb['mb_email_certify'])) {
    $ckey = md5($mb['mb_ip'] . $mb['mb_datetime']);
    confirm("{$mb['mb_email']} 메일로 메일인증을 받으셔야 로그인 가능합니다. 다른 메일주소로 변경하여 인증하시려면 취소를 클릭하시기 바랍니다.", G5_URL, G5_BBS_URL . '/register_email.php?mb_id=' . $mb_id . '&ckey=' . $ckey);
}
@(include_once $member_skin_path . '/login_check.skin.php');
// 회원아이디 세션 생성
set_session('ss_mb_id', $mb['mb_id']);
// FLASH XSS 공격에 대응하기 위하여 회원의 고유키를 생성해 놓는다. 관리자에서 검사함 - 110106
set_session('ss_mb_key', md5($mb['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']));
// 포인트 체크
if ($config['cf_use_point']) {
    $sum_point = get_point_sum($mb['mb_id']);
    $sql = " update {$g5['member_table']} set mb_point = '{$sum_point}' where mb_id = '{$mb['mb_id']}' ";
    sql_query($sql);
}
// 3.26
// 아이디 쿠키에 한달간 저장
if ($auto_login) {
    // 3.27
    // 자동로그인 ---------------------------
    // 쿠키 한달간 저장
    $key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']);
    set_cookie('ck_mb_id', $mb['mb_id'], 86400 * 31);
    set_cookie('ck_auto', $key, 86400 * 31);
    // 자동로그인 end ---------------------------
} else {
    set_cookie('ck_mb_id', '', 0);
示例#3
0
function delete_point($mb_id, $rel_table, $rel_id, $rel_action)
{
    global $g5;
    $result = false;
    if ($rel_table || $rel_id || $rel_action) {
        // 포인트 내역정보
        $sql = " select * from {$g5['point_table']}\n                    where mb_id = '{$mb_id}'\n                      and po_rel_table = '{$rel_table}'\n                      and po_rel_id = '{$rel_id}'\n                      and po_rel_action = '{$rel_action}' ";
        $row = sql_fetch($sql);
        if ($row['po_point'] < 0) {
            $mb_id = $row['mb_id'];
            $po_point = abs($row['po_point']);
            delete_use_point($mb_id, $po_point);
        } else {
            if ($row['po_use_point'] > 0) {
                insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
            }
        }
        $result = sql_query(" delete from {$g5['point_table']}\n                     where mb_id = '{$mb_id}'\n                       and po_rel_table = '{$rel_table}'\n                       and po_rel_id = '{$rel_id}'\n                       and po_rel_action = '{$rel_action}' ", false);
        // po_mb_point에 반영
        $sql = " update {$g5['point_table']}\n                    set po_mb_point = po_mb_point - '{$row['po_point']}'\n                    where mb_id = '{$mb_id}'\n                      and po_id > '{$row['po_id']}' ";
        sql_query($sql);
        // 포인트 내역의 합을 구하고
        $sum_point = get_point_sum($mb_id);
        // 포인트 UPDATE
        $sql = " update {$g5['member_table']} set mb_point = '{$sum_point}' where mb_id = '{$mb_id}' ";
        $result = sql_query($sql);
    }
    return $result;
}