예제 #1
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($type == 'pc') {
    getDbUpdate($table['s_site'], "layout='" . $layout . "/main.php'", 'uid=' . $s);
    getWindow(RW(0), 'PC모드 대표 레이아웃으로 적용되었습니다.', '', '', '');
    exit;
} else {
    getDbUpdate($table['s_site'], "m_layout='" . $layout . "/main.php'", 'uid=' . $s);
    getLink('', '', '모바일웹 대표레이아웃으로 적용되었습니다.  \\n\\n모바일기기나 에뮬레이터로 확인하세요.', '');
}
예제 #2
0
                $UT = getDbData($table[$cyncArr['data'][0] . 'xtra'], 'parent=' . $AT['uid'], '*');
                if (!strpos('_' . $UT['down'], '[' . $my['uid'] . ']') && !strpos('_' . $_SESSION['module_' . $cyncArr['data'][0] . '_dncheck'], '[' . $AT['uid'] . ']')) {
                    if ($confirm == 'Y' && $my['point'] >= $B['var']['point3']) {
                        if (!$my['admin'] && $my['uid'] != $AT['mbruid']) {
                            getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $my['uid'] . "','0','-" . $B['var']['point3'] . "','다운로드(" . getStrCut($AT['subject'], 15, '') . ")','" . $date['totime'] . "'");
                            getDbUpdate($table['s_mbrdata'], 'point=point-' . $B['var']['point3'] . ',usepoint=usepoint+' . $B['var']['point3'], 'memberuid=' . $my['uid']);
                            if (!$UT['parent']) {
                                getDbInsert($table[$cyncArr['data'][0] . 'xtra'], 'parent,site,bbs,down', "'" . $AT['uid'] . "','" . $s . "','" . $AT['bbs'] . "','[" . $my['uid'] . "]'");
                            } else {
                                getDbUpdate($table[$cyncArr['data'][0] . 'xtra'], "down='" . $UT['down'] . "[" . $my['uid'] . "]'", 'parent=' . $AT['uid']);
                            }
                        }
                        $_SESSION['module_' . $cyncArr['data'][0] . '_dncheck'] = $_SESSION['module_' . $cyncArr['data'][0] . '_dncheck'] . '[' . $AT['uid'] . ']';
                        getLink('', '', '결제되었습니다. 다운로드 받으세요.', 'close');
                    } else {
                        getWindow($g['s'] . '/?iframe=Y&r=' . $r . '&m=' . $cyncArr['data'][0] . '&bid=' . $AT['bbsid'] . '&mod=down&dfile=' . $uid . '&uid=' . $AT['uid'], '', 'width=550px,height=350px,status=yes,toolbar=no,scrollbars=no', $_SERVER['HTTP_REFERER'] . '#attach', '');
                        exit;
                    }
                }
            }
        }
        $cyncQue = $fdexp[1] . '=' . $fdexp[1] . '+1';
        getDbUpdate($cyncArr['data'][3], $cyncQue, $fdexp[0] . '=' . $cyncArr['data'][1]);
    }
    getDbUpdate($table['s_upload'], 'down=down+1', 'uid=' . $R['uid']);
    getDbUpdate($table['s_numinfo'], 'download=download+1', "date='" . $date['today'] . "' and site=" . $s);
}
header("Content-Type: application/octet-stream");
header("Content-Length: " . $filesize);
header('Content-Disposition: attachment; filename="' . $filename . '"');
header("Cache-Control: private, must-revalidate");