Example #1
0
function getCMNTUpfiles($R)
{
    if (!$R['upload']) {
        return array();
    } else {
        global $table, $m;
        $d['upload'] = array();
        $d['upload']['tmp'] = $R['upload'];
        $d['_pload'] = getArrayString($R['upload']);
        foreach ($d['_pload']['data'] as $_val) {
            $U = getUidData($table['s_upload'], $_val);
            if (!$U['uid']) {
                $R['upload'] = str_replace('[' . $_val . ']', '', $R['upload']);
                $d['_pload']['count']--;
            } else {
                $d['upload']['data'][] = $U;
            }
            if (!$U['cync']) {
                $cyncArr = getArrayString($R['cync']);
                $_CYNC = "cync='[" . $m . "][" . $R['uid'] . "][uid,down][" . $table['s_comment'] . "][" . $R['mbruid'] . "][" . $cyncArr['data'][5] . ",CMT:" . $R['uid'] . "#CMT]'";
                getDbUpdate($table['s_upload'], $_CYNC, 'uid=' . $U['uid']);
            }
        }
        if ($R['upload'] != $d['upload']['tmp']) {
            getDbUpdate($table['s_comment'], "upload='" . $R['upload'] . "'", 'uid=' . $R['uid']);
        }
        $d['upload']['count'] = $d['_pload']['count'];
        return $d['upload'];
    }
}
Example #2
0
function DeleteOneline($C, $d, $sync_arr)
{
    global $table, $date;
    $_ONELINE = getDbSelect($table['s_oneline'], 'parent=' . $C['uid'], '*');
    while ($_O = db_fetch_array($_ONELINE)) {
        if ($d['comment']['give_opoint'] && $_O['mbruid']) {
            getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $_O['mbruid'] . "','0','-" . $d['comment']['give_opoint'] . "','한줄의견삭제(" . getStrCut(str_replace('&', ' ', strip_tags($_O['content'])), 15, '') . ")환원','" . $date['totime'] . "'");
            getDbUpdate($table['s_mbrdata'], 'point=point-' . $d['comment']['give_opoint'], 'memberuid=' . $_O['mbruid']);
        }
    }
    getDbDelete($table['s_oneline'], 'parent=' . $C['uid']);
    // 댓글 수량 동기화
    $sync_arr = explode('|', $R['sync']);
    $feed_table = $sync_arr[0];
    $feed_uid = $sync_arr[1];
    getDbUpdate($feed_table, 'oneline=oneline-1', 'uid=' . $feed_uid);
}
Example #3
0
$fdset = array();
$fdset['config'] = array('version', 'themepc', 'pannellink', 'cache_flag', 'smtp_use', 'smtp_host', 'smtp_port', 'smtp_auth', 'smtp_ssl', 'smtp_user', 'smtp_pass', 'ftp_use', 'ftp_type', 'ftp_host', 'ftp_port', 'ftp_pasv', 'ftp_user', 'ftp_pass', 'ftp_rb', 'email', 'smtp', 'ftp', 'uninstall', 'dblclick', 'codeeidt', 'editor', 'syslang', 'sysmail', 'sysmodule');
$fdset['ssl'] = array('http_port', 'ssl_type', 'ssl_port', 'ssl_module', 'ssl_menu', 'ssl_page');
$fdset['security'] = array('secu_tags', 'secu_domain', 'secu_param');
//제거탭 출력 주의 알림
if (!$d['admin']['uninstall'] && $uninstall) {
    $_message = _LANG('a5001', 'admin');
    $_referer = $g['s'] . '/?r=' . $r . '&m=admin&module=admin';
    putNotice($my['uid'], $m, 0, $_message, $_referer, '');
}
if ($act == 'config') {
    if ($d['admin']['syslang'] != $syslang) {
        $RCD = getDbArray($table['s_module'], '', '*', 'gid', 'asc', 0, 1);
        while ($_R = db_fetch_array($RCD)) {
            $new_modulename = $g['path_module'] . $_R['id'] . '/language/' . $syslang . '/name.module.txt';
            getDbUpdate($table['s_module'], "name='" . ($syslang && is_file($new_modulename) ? implode('', file($new_modulename)) : getFolderName($g['path_module'] . $_R['id'])) . "'", "id='" . $_R['id'] . "'");
        }
        $panel_reload = true;
    }
}
foreach ($fdset[$act] as $val) {
    $d['admin'][$val] = str_replace("\n", '<br>', trim(${$val}));
}
$_tmpdfile = $g['dir_module'] . 'var/var.system.php';
$fp = fopen($_tmpdfile, 'w');
fwrite($fp, "<?php\n");
foreach ($d['admin'] as $key => $val) {
    fwrite($fp, "\$d['admin']['" . $key . "'] = \"" . addslashes(stripslashes($val)) . "\";\n");
}
fwrite($fp, "?>");
fclose($fp);
Example #4
0
                            }
                        }
                        $_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");
header("Pragma: no-cache");
header("Expires: 0");
if ($R['url'] == $d['upload']['ftp_urlpath']) {
    $FTP_CONNECT = ftp_connect($d['upload']['ftp_host'], $d['upload']['ftp_port']);
    $FTP_CRESULT = ftp_login($FTP_CONNECT, $d['upload']['ftp_user'], $d['upload']['ftp_pass']);
    if (!$FTP_CONNECT) {
        getLink('', '', 'FTP서버 연결에 문제가 발생했습니다.', '');
    }
    if (!$FTP_CRESULT) {
        getLink('', '', 'FTP서버 아이디나 패스워드가 일치하지 않습니다.', '');
Example #5
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$my['uid']) {
    getLink('', '', '정상적인 접근이 아닙니다.', '');
}
$tmpname = $_FILES['upfile']['tmp_name'];
$realname = $_FILES['upfile']['name'];
$fileExt = strtolower(getExt($realname));
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
$photo = $my['id'] . '.' . $fileExt;
$saveFile = $g['path_var'] . 'simbol/' . $photo;
if (is_uploaded_file($tmpname)) {
    if (!strstr('[gif][jpg][png]', $fileExt)) {
        getLink('', '', 'gif/jpg/png 파일만 등록할 수 있습니다.', '');
    }
    if (is_file($g['path_var'] . 'simbol/' . $my['photo'])) {
        unlink($g['path_var'] . 'simbol/' . $my['photo']);
    }
    include_once $g['path_core'] . 'function/thumb.func.php';
    move_uploaded_file($tmpname, $saveFile);
    ResizeWidthHeight($saveFile, $saveFile, 50, 50);
    @chmod($saveFile, 0707);
    getDbUpdate($table['s_mbrdata'], "photo='" . $photo . "'", 'memberuid=' . $my['uid']);
}
getLink('reload', 'parent.', '', '');
Example #6
0
}
if ($uid) {
    $R = getUidData($table['s_oneline'], $uid);
    if (!$R['uid']) {
        echo '[RESULT:존재하지 않는 한줄의견입니다. :RESULT]';
    }
    if (!$my['admin'] && $my['uid'] != $R['mbruid']) {
        echo '[RESULT:정상적인 접근이 아닙니다.:RESULT]';
    }
    $QVAL = "hidden='{$hidden}',content='{$content}',html='{$html}',d_modify='{$d_regis}',adddata='{$adddata}'";
    getDbUpdate($table['s_oneline'], $QVAL, 'uid=' . $R['uid']);
} else {
    //댓글의 부모글에 한줄의견 수량 추가
    $sync_arr = explode('|', $R['sync']);
    $feed_table = $sync_arr[0];
    $feed_uid = $sync_arr[1];
    getDbUpdate($feed_table, 'oneline=oneline+1', 'uid=' . $feed_uid);
    $maxuid = getDbCnt($table['s_oneline'], 'max(uid)', '');
    $uid = $maxuid ? $maxuid + 1 : 1;
    $QKEY = "uid,site,parent,parentmbr,hidden,name,nic,mbruid,id,content,html,report,point,d_regis,d_modify,ip,agent,adddata";
    $QVAL = "'{$uid}','{$s}','{$parent}','{$parentmbr}','{$hidden}','{$name}','{$nic}','{$mbruid}','{$id}','{$content}','{$html}','{$report}','{$point}','{$d_regis}','{$d_modify}','{$ip}','{$agent}','{$adddata}'";
    getDbInsert($table['s_oneline'], $QKEY, $QVAL);
    getDbUpdate($table['s_comment'], "oneline=oneline+1,d_oneline='" . $d_regis . "'", 'uid=' . $parent);
    getDbUpdate($table['s_numinfo'], 'oneline=oneline+1', "date='" . $date['today'] . "' and site=" . $s);
    if ($point && $my['uid']) {
        getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $my['uid'] . "','0','" . $point . "','한줄의견(" . getStrCut(str_replace('&amp;', ' ', strip_tags($content)), 15, '') . ")포인트','" . $date['totime'] . "'");
        getDbUpdate($table['s_mbrdata'], 'point=point+' . $point, 'memberuid=' . $my['uid']);
    }
}
echo '[RESULT:ok:RESULT]';
exit;
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$i = 0;
foreach ($bookmark_pages as $val) {
    $i++;
    getDbUpdate($table['s_admpage'], 'gid=' . $i, 'uid=' . $val . ' and memberuid=' . $my['uid']);
}
getLink('reload', 'parent.', '', '');
Example #8
0
                }
                ftp_close($FTP_CONNECT);
            } else {
                unlink($g['path_file'] . $R['folder'] . '/' . $R['tmpname']);
                if ($R['type'] == 2) {
                    unlink($g['path_file'] . $R['folder'] . '/' . $R['thumbname']);
                }
            }
        }
        $_type = getuFileType($R['type']);
        if ($R['category'] == -1) {
            getDbUpdate($table['s_uploadcat'], 'r_num=r_num-1', 'mbruid=' . $R['mbruid'] . " and type=" . $_type . " and name='trash'");
        }
        if ($R['category'] == 0) {
            getDbUpdate($table['s_upload'], 'category=-1', 'uid=' . $R['uid']);
            getDbUpdate($table['s_uploadcat'], 'r_num=r_num-1', 'mbruid=' . $R['mbruid'] . " and type=" . $_type . " and name='none'");
        }
        if ($R['category'] > 0) {
            getDbUpdate($table['s_uploadcat'], 'r_num=r_num-1', 'mbruid=' . $R['mbruid'] . ' and type=' . $_type . ' and uid=' . $R['category']);
            getDbUpdate($table['s_upload'], 'category=-1', 'uid=' . $R['uid']);
        }
        if ($R['mbruid']) {
            $_MEMBERS['m' . $R['mbruid']]++;
        }
    }
}
//파일이 삭제된 회원들에게 알림
foreach ($_MEMBERS as $_key => $_val) {
    putNotice(str_replace('m', '', $_key), $m, 0, sprintf(_LANG('a4001', 'mediaset'), $_val), '', '');
}
getLink('reload', 'parent.', '', '');
Example #9
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($my['uid'] != 1) {
    getLink('', '', '권한이 없습니다.', '');
}
getDbUpdate($table['s_mbrdata'], "adm_view='" . $perm . "'", 'memberuid=' . $memberuid);
getLink('reload', 'parent.', '처리되었습니다.', '');
Example #10
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$admin_id = trim($admin_id);
$R = getDbData($table['s_mbrid'], "id='" . $admin_id . "'", '*');
if (!$R['uid']) {
    getLink('', '', '존재하지 않는 회원아이디입니다.', '');
}
$M = getDbData($table['s_mbrdata'], 'memberuid=' . $R['uid'], '*');
if ($M['admin']) {
    getLink('', '', '이미 관리자로 지정된 회원입니다.', '');
}
getDbUpdate($table['s_mbrdata'], "admin=1,adm_view=''", 'memberuid=' . $R['uid']);
$fp = fopen($g['dir_module'] . 'var/users/' . $R['id'] . '.widget.php', 'w');
fwrite($fp, '');
fclose($fp);
@chmod($g['dir_module'] . 'var/users/' . $R['id'] . '.widget.php', 0707);
getLink('reload', 'parent.', '', '');
Example #11
0
}
?>
<div id="_action_layer_"></div>
<div id="_action_layer_popup"></div>
<iframe name="_action_frame_<?php 
echo $m;
?>
" width="0" height="0" frameborder="0" scrolling="no"></iframe>
<script type="text/javascript">
//<![CDATA[
<?php 
if ($m != 'admin' && $iframe != 'Y' && !$g['mobile']) {
    $POPUPS = getDbSelect($table['s_popup'], 'hidden=0', '*');
    while ($POP = db_fetch_array($POPUPS)) {
        if (!$POP['term0'] && ($POP['term1'] > $date['totime'] || $POP['term2'] < $date['totime'])) {
            getDbUpdate($table['s_popup'], 'hidden=1', 'uid=' . $POP['uid']);
            continue;
        }
        $POP['xdispage'] = '_' . $POP['dispage'];
        if (strpos($POP['xdispage'], '[c[' . $_HS['uid'] . ']]')) {
            continue;
        }
        if (!strpos($POP['xdispage'], '[s[' . $_HS['uid'] . ']]') && !strpos($POP['xdispage'], '[m[' . $_HS['uid'] . ']' . $_HM['id'] . ']') && !strpos($POP['xdispage'], '[m[' . $_HS['uid'] . ']' . $_HP['id'] . ']')) {
            continue;
        }
        ?>
//alert(getCookie('popview'));
if (getCookie('popview').indexOf('[<?php 
        echo $POP['uid'];
        ?>
]') == -1)
Example #12
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if ($my['uid']) {
    getDbUpdate($table['s_mbrdata'], 'now_log=0', 'memberuid=' . $my['uid']);
    $_SESSION['mbr_uid'] = '';
    $_SESSION['mbr_logout'] = '1';
}
$referer = $referer ? urldecode($referer) : $_SERVER['HTTP_REFERER'];
$referer = explode('&_admpnl_', $referer);
$referer = $referer[0];
getLink($referer, 'top.', '', '');
Example #13
0
    $marr2 = 0;
    $sms = 1;
    $mailing = 1;
    $smail = 0;
    $point = 0;
    $usepoint = 0;
    $money = 0;
    $cash = 0;
    $num_login = 1;
    $pw_q = '';
    $pw_a = '';
    $now_log = 0;
    $last_log = '';
    $last_pw = $date['totime'];
    $is_paper = 0;
    $d_regis = $date['totime'];
    $sns = '';
    $noticeconf = '';
    $num_notice = 0;
    $addfield = '';
    $_QKEY = "memberuid,site,auth,mygroup,level,comp,admin,adm_view,";
    $_QKEY .= "email,name,nic,grade,photo,home,sex,birth1,birth2,birthtype,tel1,tel2,zip,";
    $_QKEY .= "addr0,addr1,addr2,job,marr1,marr2,sms,mailing,smail,point,usepoint,money,cash,num_login,pw_q,pw_a,now_log,last_log,last_pw,is_paper,d_regis,tmpcode,sns,noticeconf,num_notice,addfield";
    $_QVAL = "'{$memberuid}','{$s}','{$auth}','{$mygroup}','{$level}','{$comp}','{$admin}','{$adm_view}',";
    $_QVAL .= "'{$email}','{$name}','{$nic}','','{$photo}','{$home}','{$sex}','{$birth1}','{$birth2}','{$birthtype}','{$tel1}','{$tel2}','{$zip}',";
    $_QVAL .= "'{$addr0}','{$addr1}','{$addr2}','{$job}','{$marr1}','{$marr2}','{$sms}','{$mailing}','{$smail}','{$point}','{$usepoint}','{$money}','{$cash}','{$num_login}','{$pw_q}','{$pw_a}','{$now_log}','{$last_log}','{$last_pw}','{$is_paper}','{$d_regis}','','{$sns}','{$noticeconf}','{$num_notice}','{$addfield}'";
    getDbInsert($table['s_mbrdata'], $_QKEY, $_QVAL);
    getDbUpdate($table['s_mbrlevel'], 'num=num+1', 'uid=' . $level);
    getDbUpdate($table['s_mbrgroup'], 'num=num+1', 'uid=' . $mygroup);
}
getLink('reload', 'parent.', '', '');
Example #14
0
                ftp_pasv($FTP_CONNECT, true);
            }
            $FILES = getDbArray($table['s_upload'], "tmpcode='" . $sescode . "'", '*', 'uid', 'asc', 0, 0);
            while ($R = db_fetch_array($FILES)) {
                getDbDelete($table['s_upload'], 'uid=' . $R['uid']);
                getDbUpdate($table['s_numinfo'], 'upload=upload-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site']);
                ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $R['folder'] . '/' . $R['tmpname']);
                if ($R['type'] == 2) {
                    ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $R['folder'] . '/' . $R['thumbname']);
                }
            }
            ftp_close($FTP_CONNECT);
        } else {
            $FILES = getDbArray($table['s_upload'], "tmpcode='" . $sescode . "'", '*', 'uid', 'asc', 0, 0);
            while ($R = db_fetch_array($FILES)) {
                getDbDelete($table['s_upload'], 'uid=' . $R['uid']);
                getDbUpdate($table['s_numinfo'], 'upload=upload-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site']);
                unlink($g['path_file'] . $R['folder'] . '/' . $R['tmpname']);
                if ($R['type'] == 2) {
                    unlink($g['path_file'] . $R['folder'] . '/' . $R['thumbname']);
                }
            }
        }
    }
    if ($close == 'Y') {
        $_SESSION['upsescode'] = '';
        getLink('', '', '', 'close');
    } else {
        getLink('reload', 'parent.', '', '');
    }
}
Example #15
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모바일기기나 에뮬레이터로 확인하세요.', '');
}
Example #16
0
        fclose($fp);
        @chmod($mfile . '.widget.php', 0707);
        if (trim($codhead)) {
            $fp = fopen($mfile . '.header.php', 'w');
            fwrite($fp, trim(stripslashes($codhead)));
            fclose($fp);
            @chmod($mfile . '.header.php', 0707);
        }
        if (trim($codfoot)) {
            $fp = fopen($mfile . '.footer.php', 'w');
            fwrite($fp, trim(stripslashes($codfoot)));
            fclose($fp);
            @chmod($mfile . '.footer.php', 0707);
        }
        if ($cachetime) {
            $fp = fopen($mfile . '.txt', 'w');
            fwrite($fp, $cachetime);
            fclose($fp);
            @chmod($mfile . '.txt', 0707);
        }
    }
    if ($parent) {
        getDbUpdate($table['s_menu'], 'isson=1', 'uid=' . $parent);
    }
    db_query("OPTIMIZE TABLE " . $table['s_menu'], $DB_CONNECT);
    if ($backc == 'user') {
        getLink($g['s'] . '/?r=' . $r . '&iframe=' . $iframe . '&system=edit.all&type=menu' . ($parent ? '&cat=' . $parent : ''), 'parent.', '', '');
    } else {
        getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=menu' . ($parent ? '&cat=' . $parent : '') . '&account=' . $account, 'parent.', '', '');
    }
}
Example #17
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($moduleid) {
    getDbUpdate($table['s_module'], "name='" . trim($name) . "',hidden='{$hidden}',mobile='{$mobile}',icon='" . trim($icon) . "',lang='{$modulelang}'", "id='" . $moduleid . "'");
}
getLink('reload', 'parent.', '', '');
Example #18
0
        $_TAG = getDbData($table['s_tag'], 'site=' . $s . " and date='" . $_tagdate . "' and keyword='" . $_t . "'", '*');
        if ($_TAG['uid']) {
            getDbUpdate($table['s_tag'], 'hit=hit+1', 'uid=' . $_TAG['uid']);
        } else {
            getDbInsert($table['s_tag'], 'site,date,keyword,hit', "'" . $s . "','" . $_tagdate . "','" . $_t . "','1'");
        }
    }
}
if ((!$uid || $reply == 'Y') && $snsCallBack && is_file($g['path_module'] . $snsCallBack)) {
    $xcync = "[][][][][][m:" . $m . ",bid:" . $bbsid . ",uid:" . $NOWUID . "]";
    $orignSubject = strip_tags($subject);
    $orignContent = getStrCut($orignSubject, 60, '..');
    $orignUrl = 'http://' . $_SERVER['SERVER_NAME'] . str_replace('./', '/', getCyncUrl($xcync)) . '#CMT';
    include_once $g['path_module'] . $snsCallBack;
    if ($snsSendResult) {
        getDbUpdate($table[$m . 'data'], "sns='" . $snsSendResult . "'", 'uid=' . $LASTUID);
    }
}
include_once $g['dir_module'] . 'theme/_pc/' . $bid . '/_var.php';
// 메일 발송
if ($d['theme']['email_send'] && !$my['admin']) {
    $AD = getDbData($table['s_mbrdata'], "nic='관리자'", '*');
    $email = $AD['email'];
    $to = $AD['name'];
    include_once $g['path_core'] . 'function/email.func.php';
    include_once $g['path_module'] . 'member/var/var.join.php';
    getSendMail($email . '|' . $to, $d['member']['join_email'] . '|' . $_HS['name'], '[' . $_HS['name'] . ']의 [' . $B['name'] . ']게시판에 [' . $name . ']님께서 아래와 같은 내용의 글을 등록하셨습니다. ', $content, 'HTML');
}
$_SESSION['bbsback'] = $backtype;
if ($backtype == 'list') {
    getLink($nlist, 'parent.', '', '');
Example #19
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$my['uid']) {
    getLink('', '', '정상적인 접근이 아닙니다.', '');
}
foreach ($members as $val) {
    $R = getUidData($table['s_friend'], $val);
    if (!$R['rel']) {
        getDbInsert($table['s_friend'], 'rel,my_mbruid,by_mbruid,category,d_regis', "'1','" . $my['uid'] . "','" . $R['my_mbruid'] . "','','" . $date['totime'] . "'");
        getDbUpdate($table['s_friend'], 'rel=1', 'uid=' . $R['uid']);
    }
}
getLink('reload', 'parent.', '', '');
Example #20
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$uid) {
    getLink('', '', _LANG('a0002', 'mediaset'), '');
}
$R = getUidData($table['s_upload'], $uid);
if (!$R['uid']) {
    getLink('', '', _LANG('a0003', 'mediaset'), '');
}
if (!$my['admin'] && $my['uid'] != $R['mbruid']) {
    getLink('', '', _LANG('a0004', 'mediaset'), '');
}
$name = trim($name);
$name = str_replace('.' . $R['ext'], '', $name) . '.' . $R['ext'];
$name = strip_tags($name);
$alt = strip_tags(trim($alt));
$linkurl = trim($linkurl);
$caption = $my['admin'] ? trim($caption) : strip_tags(trim($caption));
$description = $my['admin'] ? trim($description) : strip_tags(trim($description));
if ($R['type'] < 0) {
    $src = trim($src);
} else {
    $src = $R['src'];
}
getDbUpdate($table['s_upload'], "hidden='" . $hidden . "',name='" . $name . "',alt='" . $alt . "',caption='" . $caption . "',description='" . $description . "',src='" . $src . "',linkto='" . $linkto . "',license='" . $license . "',d_update='" . $date['totime'] . "',linkurl='" . $linkurl . "'", 'uid=' . $R['uid']);
getLink('reload', 'parent.', _LANG('a0005', 'mediaset'), '');
Example #21
0
} else {
    $upfileNum = 1;
    $name = _LANG('a5002', 'mediaset');
    $fileExt = 'mp4';
    $mingid = getDbCnt($table['s_upload'], 'min(gid)', '');
    $gid = $mingid ? $mingid - 1 : 100000000;
    $QKEY = "gid,pid,category,hidden,tmpcode,site,mbruid,fileonly,type,ext,fserver,url,folder,name,tmpname,thumbname,size,width,height,alt,caption,description,src,linkto,license,down,d_regis,d_update,sync,linkurl";
    $QVAL = "'{$gid}','{$gid}','{$category}','0','{$tmpcode}','{$s}','{$mbruid}','{$_fileonly}','0','{$fileExt}','0','','','{$name}','','','0','0','0','','','','{$src}','0','0','0','{$d_regis}','','',''";
    getDbInsert($table['s_upload'], $QKEY, $QVAL);
    if ($gid == 100000000) {
        db_query("OPTIMIZE TABLE " . $table['s_upload'], $DB_CONNECT);
    }
}
if ($fileonly != 'Y') {
    if (!getDbRows($table['s_uploadcat'], 'mbruid=' . $my['uid'] . ' and type=2')) {
        getDbInsert($table['s_uploadcat'], 'gid,site,mbruid,type,hidden,users,name,r_num,d_regis,d_update', "'0','" . $s . "','" . $my['uid'] . "','2','0','','none','0','" . $date['totime'] . "',''");
        getDbInsert($table['s_uploadcat'], 'gid,site,mbruid,type,hidden,users,name,r_num,d_regis,d_update', "'1','" . $s . "','" . $my['uid'] . "','2','0','','trash','0','" . $date['totime'] . "',''");
    }
    $_tname = 'uid=' . (int) $category;
    if (!$category) {
        $_tname = "name='none'";
    }
    if ($category == -1) {
        $_tname = "name='trash'";
    }
    getDbUpdate($table['s_uploadcat'], 'r_num=r_num+' . $upfileNum, 'mbruid=' . $my['uid'] . ' and type=2 and ' . $_tname);
}
if ($link == 'Y') {
    getLink('reload', 'parent.', '', '');
}
exit;
Example #22
0
            while ($_O = db_fetch_array($_ONELINE)) {
                getDbUpdate($table['s_numinfo'], 'oneline=oneline-1', "date='" . substr($_O['d_regis'], 0, 8) . "' and site=" . $_O['site']);
                if ($_O['point'] && $_O['mbruid']) {
                    getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $_O['mbruid'] . "','0','-" . $_O['point'] . "','한줄의견삭제(" . getStrCut(str_replace('&amp;', ' ', strip_tags($_O['content'])), 15, '') . ")환원','" . $date['totime'] . "'");
                    getDbUpdate($table['s_mbrdata'], 'point=point-' . $_O['point'], 'memberuid=' . $_O['mbruid']);
                }
            }
            getDbDelete($table['s_oneline'], 'parent=' . $R['uid']);
        }
        getDbDelete($table['s_comment'], 'uid=' . $R['uid']);
        getDbUpdate($table['s_numinfo'], 'comment=comment-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site']);
        if ($R['point'] && $R['mbruid']) {
            getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $R['mbruid'] . "','0','-" . $R['point'] . "','댓글삭제(" . getStrCut($R['subject'], 15, '') . ")환원','" . $date['totime'] . "'");
            getDbUpdate($table['s_mbrdata'], 'point=point-' . $R['point'], 'memberuid=' . $R['mbruid']);
        }
        $backUrl = getLinkFilter($g['s'] . '/?' . ($_HS['usescode'] ? 'r=' . $r . '&amp;' : '') . ($c ? 'c=' . $c : 'm=' . $m), array('skin', 'iframe', 'sort', 'orderby', 'recnum', 'where', 'keyword'));
        getLink($backUrl, 'parent.', '신고건수 누적으로 삭제처리 되었습니다.', $history);
    } else {
        getDbUpdate($table['s_comment'], 'hidden=1', 'uid=' . $R['uid']);
        $backUrl = getLinkFilter($g['s'] . '/?' . ($_HS['usescode'] ? 'r=' . $r . '&amp;' : '') . ($c ? 'c=' . $c : 'm=' . $m), array('skin', 'iframe', 'sort', 'orderby', 'recnum', 'where', 'keyword'));
        getLink($backUrl, 'parent.', '신고건수 누적으로 게시제한처리 되었습니다.', $history);
    }
} else {
    if (!strstr($_SESSION['module_' . $m . '_singo'], '[' . $R['uid'] . ']')) {
        getDbUpdate($table['s_comment'], 'singo=singo+1', 'uid=' . $R['uid']);
        $_SESSION['module_' . $m . '_singo'] .= '[' . $R['uid'] . ']';
        getLink('', '', '신고처리 되었습니다.', '');
    } else {
        getLink('', '', '이미 신고하신 댓글입니다.', '');
    }
}
Example #23
0
    if (!$R['uid']) {
        getLink('', '', '입력하신 정보로 일치하는 회원데이터가 없습니다.', '');
    }
    $M = getDbData($table['s_mbrdata'], 'memberuid=' . $R['uid'], '*');
} else {
    $M = getDbData($table['s_mbrdata'], "email='" . $email . "'", '*');
    if (!$M['email']) {
        getLink('', '', '입력하신 정보로 일치하는 회원데이터가 없습니다.', '');
    }
    $R = getUidData($table['s_mbrid'], $M['memberuid']);
}
if ($M['name'] != $name) {
    getLink('', '', '입력하신 정보로 일치하는 회원데이터가 없습니다.', '');
}
if ($M['tmpcode']) {
    getLink('', '', '이미 회원님의 이메일[' . $M['email'] . ']로   \\n임시 비밀번호를 발송해 드렸습니다.', '');
}
$auth_pw = 'rb' . date('His');
include_once $g['path_core'] . 'function/email.func.php';
$content = implode('', file($g['dir_module'] . 'doc/_pw.txt'));
$content = str_replace('{NAME}', $M['name'], $content);
$content = str_replace('{NICK}', $M['nic'], $content);
$content = str_replace('{ID}', $R['id'], $content);
$content = str_replace('{EMAIL}', $M['email'], $content);
$content .= '<div style="font-weight:bold;font-size:20px;color:#ff0000;">임시 비밀번호 : ' . $auth_pw . '</div>';
$result = getSendMail($M['email'] . '|' . $M['name'], $d['member']['join_email'] . '|' . $_HS['name'], '[' . $_HS['name'] . ']임시 비밀번호가 발급되었습니다.', $content, 'HTML');
if (!$result) {
    getLink('', '', '죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.', '');
}
getDbUpdate($table['s_mbrdata'], "last_pw='" . $date['today'] . "',tmpcode='" . md5($auth_pw) . "'", 'memberuid=' . $M['memberuid']);
getLink('', '', '회원님의 이메일[' . $M['email'] . ']로   \\n임시 비밀번호를 발송해 드렸습니다.', '');
Example #24
0
        require $g['path_core'] . 'opensrc/unzip/ArchiveExtractor.class.php';
        require $g['path_core'] . 'function/dir.func.php';
        $extractor = new ArchiveExtractor();
        $extractor->extractArchive($saveFile, $extPath1);
        unlink($saveFile);
    } else {
        getLink('', '', _LANG('a9002', 'market'), '');
    }
    getLink($g['s'] . '/?r=' . $r . '&iframe=Y&m=admin&module=' . $m . '&front=modal.package&package_step=2&package_folder=' . $realname, 'parent.', '', '');
}
if ($package_step == 2) {
    require $g['path_core'] . 'function/dir.func.php';
    include $g['path_tmp'] . 'app/' . $package_folder . '/_settings/var.php';
    if ($siteuid) {
        $S = getUidData($table['s_site'], $siteuid);
        getDbUpdate($table['s_site'], "layout='" . $d['package']['layout'] . "',m_layout='" . $d['package']['layout_mobile'] . "'", 'uid=' . $S['uid']);
        //기존메뉴삭제
        if ($ACT_DM) {
            $_MENUS = getDbSelect($table['s_menu'], 'site=' . $S['uid'] . ' order by gid asc', '*');
            while ($_M = db_fetch_array($_MENUS)) {
                @unlink($g['path_var'] . 'menu/' . $_M['imghead']);
                @unlink($g['path_var'] . 'menu/' . $_M['imgfoot']);
                getDbDelete($table['s_seo'], 'rel=1 and parent=' . $_M['uid']);
            }
            getDbDelete($table['s_menu'], 'site=' . $S['uid']);
            db_query("OPTIMIZE TABLE " . $table['s_menu'], $DB_CONNECT);
            db_query("OPTIMIZE TABLE " . $table['s_seo'], $DB_CONNECT);
            DirDelete($g['path_page'] . $S['id'] . '-menus');
        }
        //기존페이지삭제
        if ($ACT_DP) {
Example #25
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
foreach ($bbs_members as $val) {
    $R = getUidData($table[$m . 'list'], $val);
    if (!$R['uid']) {
        continue;
    }
    getDbUpdate($table[$m . 'list'], "name='" . trim(${'name_' . $R['uid']}) . "'", 'uid=' . $R['uid']);
}
getLink('reload', 'parent.', '수정되었습니다.', '');
Example #26
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
getDbUpdate($table['sliderdata'], "imgsrc='',url=''", "seq='" . $seq . "' AND sitecode='" . $sitecode . "'");
getLink('reload', 'parent.', '', '');
                //if($U['type']==2) unlink($g['path_file'].$U['folder'].'/'.$U['thumbname']);
                unlink('./modules/bbs/upload/' . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    unlink('./modules/bbs/upload/' . $U['folder'] . '/' . $U['thumbname']);
                }
            }
        }
    }
}
//한줄의견삭제
if ($R['oneline']) {
    $_ONELINE = getDbSelect($table['s_oneline'], 'parent=' . $R['uid'], '*');
    while ($_O = db_fetch_array($_ONELINE)) {
        getDbUpdate($table['s_numinfo'], 'oneline=oneline-1', "date='" . substr($_O['d_regis'], 0, 8) . "' and site=" . $_O['site']);
        if ($_O['point'] && $_O['mbruid']) {
            getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $_O['mbruid'] . "','0','-" . $_O['point'] . "','한줄의견삭제(" . getStrCut(str_replace('&amp;', ' ', strip_tags($_O['content'])), 15, '') . ")환원','" . $date['totime'] . "'");
            getDbUpdate($table['s_mbrdata'], 'point=point-' . $_O['point'], 'memberuid=' . $_O['mbruid']);
        }
    }
    getDbDelete($table['s_oneline'], 'parent=' . $R['uid']);
}
getDbDelete($table['s_comment'], 'uid=' . $R['uid']);
getDbUpdate($table['s_numinfo'], 'comment=comment-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site']);
if ($R['point'] && $R['mbruid']) {
    getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $R['mbruid'] . "','0','-" . $R['point'] . "','댓글삭제(" . getStrCut($R['subject'], 15, '') . ")환원','" . $date['totime'] . "'");
    getDbUpdate($table['s_mbrdata'], 'point=point-' . $R['point'], 'memberuid=' . $R['mbruid']);
}
echo '[RESULT:ok:RESULT]';
?>

Example #28
0
    $fp = fopen($mfile, 'w');
    fwrite($fp, '');
    fclose($fp);
    @chmod($mfile, 0707);
    if ($cachetime) {
        $fp = fopen($g['path_page'] . $id . '.txt', 'w');
        fwrite($fp, $cachetime);
        fclose($fp);
        @chmod($g['path_page'] . $id . '.txt', 0707);
    }
    $QKEY = "pagetype,ismain,mobile,id,category,name,perm_g,perm_l,layout,joint,hit,sosokmenu,d_regis,d_update";
    $QVAL = "'{$pagetype}','{$ismain}','{$mobile}','{$id}','{$category}','{$name}','{$perm_g}','{$perm_l}','{$layout}','{$joint}','{$hit}','{$sosokmenu}','{$d_regis}','{$d_update}'";
    getDbInsert($table['s_page'], $QKEY, $QVAL);
    $lastpage = getDbCnt($table['s_page'], 'max(uid)', '');
    if ($pagetype == 1) {
        $joint = str_replace('cync=Y', 'cync=[' . $m . '][p' . $lastpage . '][,,,][][][mod:' . $id . ']', $joint);
        getDbUpdate($table['s_page'], "joint='{$joint}'", 'uid=' . $lastpage);
    }
    if (!$_HS['startpage'] && $ismain == 1) {
        getDbUpdate($table['s_site'], 'startpage=' . $lastpage, 'uid=' . $s);
    }
    db_query("OPTIMIZE TABLE " . $table['s_page'], $DB_CONNECT);
    if ($backc == 'user') {
        $typeset = array(1 => 'module', 2 => 'widget', 3 => 'source');
        getLink($g['s'] . '/?r=' . $r . '&iframe=' . $iframe . '&system=edit.page&_page=' . $lastpage . '&type=' . $typeset[$pagetype], 'parent.', '', '');
    } elseif ($backc == 'add') {
        getLink($g['s'] . '/?r=' . $r . '&iframe=' . $iframe . '&system=edit.all&type=page', 'parent.', '', '');
    } else {
        getLink('reload', 'parent.', '', '');
    }
}
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
foreach ($oneline_members as $val) {
    $R = getUidData($table['s_oneline'], $val);
    if (!$R['uid']) {
        continue;
    }
    $C = getUidData($table['s_comment'], $R['parent']);
    getDbDelete($table['s_oneline'], 'uid=' . $R['uid']);
    getDbUpdate($table['s_comment'], 'oneline=oneline-1', 'uid=' . $C['uid']);
    getDbUpdate($table['s_numinfo'], 'oneline=oneline-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site']);
    if ($R['point'] && $R['mbruid']) {
        getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $R['mbruid'] . "','0','-" . $R['point'] . "','한줄의견삭제(" . getStrCut(str_replace('&amp;', ' ', strip_tags($R['content'])), 15, '') . ")환원','" . $date['totime'] . "'");
        getDbUpdate($table['s_mbrdata'], 'point=point-' . $R['point'], 'memberuid=' . $R['mbruid']);
    }
    //동기화
    $cyncArr = getArrayString($C['cync']);
    $fdexp = explode(',', $cyncArr['data'][2]);
    if ($fdexp[0] && $fdexp[2] && $cyncArr['data'][3]) {
        getDbUpdate($cyncArr['data'][3], $fdexp[2] . '=' . $fdexp[2] . '-1', $fdexp[0] . '=' . $cyncArr['data'][1]);
    }
}
getLink('reload', 'parent.', '', '');
Example #30
0
     $realname = $_FILES['img' . $imgset[$i]]['name'];
     $fileExt = strtolower(getExt($realname));
     $fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
     $userimg = $R['id'] . '_' . $imgset[$i] . '.' . $fileExt;
     $saveFile = $g['dir_module'] . 'var/files/' . $userimg;
     if (is_uploaded_file($tmpname)) {
         if (!strstr('[gif][jpg][png][swf]', $fileExt)) {
             getLink('', '', '헤더/풋터파일은 gif/jpg/png/swf 파일만 등록할 수 있습니다.', '');
         }
         move_uploaded_file($tmpname, $saveFile);
         @chmod($saveFile, 0707);
         ${'img' . $imgset[$i]} = $userimg;
     }
 }
 $QVAL = "name='{$name}',category='{$category}',imghead='{$imghead}',imgfoot='{$imgfoot}',puthead='{$puthead}',putfoot='{$putfoot}',addinfo='{$addinfo}',writecode='{$writecode}'";
 getDbUpdate($table[$m . 'list'], $QVAL, "id='" . $bid . "'");
 $vfile = $g['dir_module'] . 'var/code/' . $R['id'];
 if (trim($codhead)) {
     $fp = fopen($vfile . '.header.php', 'w');
     fwrite($fp, trim(stripslashes($codhead)));
     fclose($fp);
     @chmod($vfile . '.header.php', 0707);
 } else {
     if (is_file($vfile . '.header.php')) {
         unlink($vfile . '.header.php');
     }
 }
 if (trim($codfoot)) {
     $fp = fopen($vfile . '.footer.php', 'w');
     fwrite($fp, trim(stripslashes($codfoot)));
     fclose($fp);