Exemple #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'];
    }
}
Exemple #2
0
function DeleteUpfile($R, $d)
{
    global $g, $table;
    $UPFILES = getArrayString($R['upload']);
    foreach ($UPFILES['data'] as $_val) {
        $U = getUidData($table['s_upload'], $_val);
        if ($U['uid']) {
            if ($U['url'] == $d['comment']['ftp_urlpath']) {
                $FTP_CONNECT = ftp_connect($d['comment']['ftp_host'], $d['comment']['ftp_port']);
                $FTP_CRESULT = ftp_login($FTP_CONNECT, $d['comment']['ftp_user'], $d['comment']['ftp_pass']);
                if ($d['comment']['ftp_pasv']) {
                    ftp_pasv($FTP_CONNECT, true);
                }
                if (!$FTP_CONNECT) {
                    getLink('', '', 'FTP서버 연결에 문제가 발생했습니다.', '');
                }
                if (!$FTP_CRESULT) {
                    getLink('', '', 'FTP서버 아이디나 패스워드가 일치하지 않습니다.', '');
                }
                ftp_delete($FTP_CONNECT, $d['comment']['ftp_folder'] . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    ftp_delete($FTP_CONNECT, $d['comment']['ftp_folder'] . $U['folder'] . '/' . $U['thumbname']);
                }
                ftp_close($FTP_CONNECT);
            } else {
                unlink($U['url'] . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    unlink($U['url'] . $U['folder'] . '/' . $U['thumbname']);
                }
            }
            getDbDelete($table['s_upload'], 'uid=' . $U['uid']);
        }
    }
}
Exemple #3
0
function LIB_getUploadImage($upfiles, $d, $content, $ext)
{
    $imgs = getImgs($content, $ext);
    if ($imgs[0]) {
        if (!$upfiles) {
            return $imgs[0];
        }
        $basename = basename($imgs[0]);
        $encname = md5($basename);
        $folder = substr($d, 0, 4) . '/' . substr($d, 4, 2) . '/' . substr($d, 6, 2);
        if (is_file($GLOBALS['g']['path_file'] . $folder . '/' . $encname)) {
            return str_replace($basename, '', $imgs[0]) . $encname;
        }
    }
    if ($upfiles) {
        $upArray = getArrayString($upfiles);
        foreach ($upArray['data'] as $_val) {
            $U = getUidData($GLOBALS['table']['s_upload'], $_val);
            if (!$U['uid']) {
                continue;
            }
            if (strpos('_jpg,gif,png', $U['ext'])) {
                return $U['url'] . $U['folder'] . '/' . $U['thumbname'];
            }
        }
    }
}
Exemple #4
0
function getMenuCodeToSql($table, $cat, $f)
{
    static $sql;
    $R = getUidData($table, $cat);
    if ($R['uid']) {
        $sql .= $f . '=' . $R['uid'] . ' or ';
    }
    if ($R['isson']) {
        $RDATA = getDbSelect($table, 'parent=' . $R['uid'], 'uid');
        while ($C = db_fetch_array($RDATA)) {
            getMenuCodeToSql($table, $C['uid'], $f);
        }
    }
    return substr($sql, 0, strlen($sql) - 4);
}
<?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.', '', '');
Exemple #6
0
				<?php 
        // Resort 게시판 리스트 불러오기
        // == //
        // ==== 수상비행기, 국선지역 혼합 임시처리
        if ($cat == "수상비행기" || $R['category'] == "수상비행기" || $R['category'] == "국내선지역") {
            $resResort = getDbArray($table['bbsdata'], "bbsid='resort' AND (category = '수상비행기' OR category = '국내선지역')", "uid, subject, upload", "uid", "desc", "", "");
        } else {
            if ($R['category'] == "프랄린" || $R['category'] == "마헤" || $R['category'] == "라디그") {
                $resResort = getDbArray($table['bbsdata'], "bbsid='resort' AND (category = '프랄린' OR category = '마헤' OR category = '라디그')", "uid, subject, upload", "uid", "desc", "", "");
            } else {
                if ($_GET[mod] == "login") {
                    $resResort = getDbArray($table['bbsdata'], "bbsid='resort' AND category = '칸쿤'", "uid, subject, upload", "uid", "desc", "", "");
                } else {
                    if (!$uid && $uidX) {
                        $uid = $uidX;
                        $R = getUidData($table[$m . 'data'], $uid);
                    }
                    if ($bid == "resort") {
                        $resResort = getDbArray($table['bbsdata'], "bbsid='resort' AND category = '" . ($cat ? $cat : $R['category']) . "'", "uid, subject, upload", "uid", "desc", "", "");
                    } else {
                        $resResort = getDbArray($table['bbsdata'], "bbsid='resort'", "uid, subject, upload", "uid", "desc", "", "");
                    }
                }
            }
        }
        $rcdCount = mysql_num_rows($resResort);
        $perCol = ceil($rcdCount / 4);
        ?>
				<div class="list">
					<ul class="resort">
					<?php 
<?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.', '', '');
Exemple #8
0
<?php

$recnum = 15;
$catque = $cat ? "category='" . $cat . "'" : '';
$PAGES = getDbArray($table['s_page'], $catque, '*', 'uid', 'asc', $recnum, $p);
$NUM = getDbRows($table['s_page'], $catque);
$TPG = getTotalPage($NUM, $recnum);
if ($uid) {
    $R = getUidData($table['s_page'], $uid);
}
?>


<div id="catebody">
	<div id="category">
		<div class="title">
			<select class="c1" onchange="goHref('<?php 
echo $g['adm_href'];
?>
&amp;cat='+this.value);">
			<option value="">&nbsp;+ 페이지분류</option>
			<option value="">--------------------------------</option>
			<?php 
$_cats = array();
?>
			<?php 
$CATS = db_query("select *,count(*) as cnt from " . $table['s_page'] . " group by category", $DB_CONNECT);
?>
			<?php 
while ($C = db_fetch_array($CATS)) {
    $_cats[] = $C['category'];
Exemple #9
0
	<th scope="col">이름</th>
	<th scope="col">관계</th>
	<th scope="col">그룹</th>
	<th scope="col" class="side2">날짜</th>
	</tr>
	</thead>
	<tbody>

	<?php 
while ($R = db_fetch_array($RCD)) {
    ?>
	<?php 
    $M = getDbData($table['s_mbrdata'], 'memberuid=' . $R[($type == 'follower' ? 'm' : 'b') . 'y_mbruid'], '*');
    ?>
	<?php 
    $M1 = getUidData($table['s_mbrid'], $M['memberuid']);
    ?>
	<tr>
	<td>
	<input type="checkbox" name="members[]" value="<?php 
    echo $R['uid'];
    ?>
" />
	<input type="hidden" id="members_<?php 
    echo $R['uid'];
    ?>
" value="<?php 
    echo $d['member']['login_emailid'] ? $M['email'] : $M1['id'];
    ?>
" />
	</td>
Exemple #10
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$R = getUidData($table['s_site'], $account);
if ($R['uid']) {
    getDbDelete($table['s_start'], 'site=' . $R['uid']);
    getDbDelete($table['s_site'], 'uid=' . $R['uid']);
    $_MENUS = getDbSelect($table['s_menu'], 'site=' . $R['uid'] . ' order by gid asc', '*');
    while ($_M = db_fetch_array($_MENUS)) {
        $_xfile = $g['path_page'] . 'menu/' . sprintf('%05d', $_M['uid']);
        unlink($_xfile . '.php');
        unlink($_xfile . '.widget.php');
        @unlink($_xfile . '.mobile.php');
        @unlink($_xfile . '.css');
        @unlink($_xfile . '.js');
        @unlink($_xfile . '.header.php');
        @unlink($_xfile . '.footer.php');
        @unlink($_xfile . '.txt');
        @unlink($_xfile . '.cache');
        @unlink($_xfile . '.widget.cache');
        @unlink($_xfile . '.mobile.cache');
        @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=' . $R['uid']);
    db_query("OPTIMIZE TABLE " . $table['s_site'], $DB_CONNECT);
    db_query("OPTIMIZE TABLE " . $table['s_menu'], $DB_CONNECT);
    for ($i = 0; $i < $badwordlen; $i++) {
        if (!$badwordarr[$i]) {
            continue;
        }
        if (strstr($content, $badwordarr[$i])) {
            if ($d['comment']['badword_action'] == 1) {
                echo '[RESULT:등록이 제한된 단어를 사용하셨습니다.:RESULT]';
            } else {
                $badescape = strCopy($badwordarr[$i], $d['comment']['badword_escape']);
                $content = str_replace($badwordarr[$i], $badescape, $content);
            }
        }
    }
}
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)', '');
Exemple #12
0
     $name = 'SITE ' . $gid;
     $id = 's' . date('His');
     $QKEY = "gid,id,name,title,titlefix,icon,layout,startpage,m_layout,m_startpage,lang,open,dtd,nametype,timecal,rewrite,buffer,usescode,headercode,footercode";
     $QVAL = "'" . $gid . "','" . $id . "','" . $name . "','{subject} | {site}','0','glyphicon glyphicon-home','" . $d['package']['layout'] . "','0','" . $d['package']['layout_mobile'] . "','0','','1','','nic','0','0','0','1','',''";
     getDbInsert($table['s_site'], $QKEY, $QVAL);
     $LASTUID = getDbCnt($table['s_site'], 'max(uid)', '');
     db_query("OPTIMIZE TABLE " . $table['s_site'], $DB_CONNECT);
     getDbInsert($table['s_seo'], 'rel,parent,title,keywords,description,classification,image_src', "'0','{$LASTUID}','','','','ALL',''");
     $vfile = $g['path_var'] . 'sitephp/' . $LASTUID . '.php';
     $fp = fopen($vfile, 'w');
     fwrite($fp, '');
     fclose($fp);
     @chmod($vfile, 0707);
     @rename($g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $d['package']['siteid'] . '-menus', $g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $id . '-menus');
     @rename($g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $d['package']['siteid'] . '-pages', $g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $id . '-pages');
     $S = getUidData($table['s_site'], $LASTUID);
 }
 //메뉴생성
 if ($ACT_CM) {
     include $g['path_tmp'] . 'app/' . $package_folder . '/_settings/var.menu.php';
     $QKEY = "gid,site,is_child,parent,depth,id,menutype,mobile,hidden,reject,name,target,redirect,joint,perm_g,perm_l,layout,imghead,imgfoot,addattr,num,d_last,addinfo,mediaset";
     foreach ($d['package']['menus'] as $R) {
         $_parent = 0;
         if ($R['parent']) {
             $_PRTUID = getDbData($table['s_menu'], 'site=' . $S['uid'] . " and id='" . $R['parent'] . "'", 'uid');
             $_parent = $_PRTUID['uid'];
         }
         $QVAL = "'" . $R['gid'] . "','" . $S['uid'] . "','" . $R['is_child'] . "','" . $_parent . "','" . $R['depth'] . "','" . $R['id'] . "','" . $R['menutype'] . "','" . $R['mobile'] . "','0','0','" . $R['name'] . "','" . $R['target'] . "','" . $R['redirect'] . "','" . $R['joint'] . "','','0','" . $R['layout'] . "','" . $R['imghead'] . "','" . $R['imgfoot'] . "','" . $R['addattr'] . "','0','','',''";
         getDbInsert($table['s_menu'], $QKEY, $QVAL);
         $lastmenu = getDbCnt($table['s_menu'], 'max(uid)', '');
         getDbInsert($table['s_seo'], 'rel,parent,title,keywords,description,classification,image_src', "'1','{$lastmenu}','','','','ALL',''");
Exemple #13
0
$filename = getUTFtoKR($R['name']);
$filetmpname = getUTFtoKR($R['tmpname']);
if ($R['url'] == $d['upload']['ftp_urlpath']) {
    $filepath = $d['upload']['ftp_urlpath'] . $R['folder'] . '/' . $filetmpname;
    $filesize = $R['size'];
} else {
    $filepath = $g['path_file'] . $R['folder'] . '/' . $filetmpname;
    $filesize = filesize($filepath);
}
if (!strstr($_SERVER['HTTP_REFERER'], 'module=upload')) {
    //동기화
    $cyncArr = getArrayString($R['cync']);
    $fdexp = explode(',', $cyncArr['data'][2]);
    if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
        if ($cyncArr['data'][0] == 'bbs' && $cyncArr['data'][1]) {
            $AT = getUidData($table[$cyncArr['data'][0] . 'data'], $cyncArr['data'][1]);
            include_once $g['path_module'] . $cyncArr['data'][0] . '/var/var.' . $AT['bbsid'] . '.php';
            $B['var'] = $d['bbs'];
            if (!$my['admin'] && $my['uid'] != $AT['mbruid']) {
                if ($B['var']['perm_l_down'] > $my['level'] || strstr($B['var']['perm_g_down'], '[' . $my['sosok'] . ']')) {
                    getLink('', '', '다운로드 권한이 없습니다.', '-1');
                }
            }
            if ($B['var']['point3']) {
                if (!$my['uid']) {
                    getLink('', '', '다운로드 권한이 없습니다.', '-1');
                }
                $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']) {
Exemple #14
0
echo number_format($NUM);
?>
개)</div>
		<div class="xright"><a href="<?php 
echo $g['url_reset'];
?>
">통합검색</a></div>
		<div class="clear"></div>
	</div>


	<div class="postbox">
<?php 
if ($NUM) {
    while ($R = db_fetch_array($RCD)) {
        $B = getUidData($table['bbslist'], $R['bbs']);
        $_link = getPostLink($R);
        ?>

	<div class="sbjbox">
		<a href="<?php 
        echo $_link;
        ?>
" class="subject"><?php 
        echo $R['subject'];
        ?>
</a>
		<a href="<?php 
        echo $_link;
        ?>
" target="_blank"><img src="<?php 
Exemple #15
0
<?php

$POPUPS = getDbArray($table['s_popup'], '', '*', 'uid', 'asc', 0, $p);
$NUM = db_num_rows($POPUPS);
if ($uid) {
    $R = getUidData($table['s_popup'], $uid);
}
if ($R['uid']) {
    $year1 = substr($R['term1'], 0, 4);
    $month1 = substr($R['term1'], 4, 2);
    $day1 = substr($R['term1'], 6, 2);
    $hour1 = substr($R['term1'], 8, 2);
    $min1 = substr($R['term1'], 10, 2);
    $year2 = substr($R['term2'], 0, 4);
    $month2 = substr($R['term2'], 4, 2);
    $day2 = substr($R['term2'], 6, 2);
    $hour2 = substr($R['term2'], 8, 2);
    $min2 = substr($R['term2'], 10, 2);
} else {
    $year1 = substr($date['today'], 0, 4);
    $month1 = substr($date['today'], 4, 2);
    $day1 = substr($date['today'], 6, 2);
    $hour1 = 0;
    $min1 = 0;
    $year2 = substr($date['today'], 0, 4);
    $month2 = substr($date['today'], 4, 2);
    $day2 = substr($date['today'], 6, 2);
    $hour2 = 23;
    $min2 = 59;
    $R['width'] = 400;
    $R['height'] = 400;
 }
 //동기화
 $cyncArr = getArrayString($R['cync']);
 $fdexp = explode(',', $cyncArr['data'][2]);
 if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
     getDbUpdate($cyncArr['data'][3], $fdexp[1] . '=' . $fdexp[1] . '-1', $fdexp[0] . '=' . $cyncArr['data'][1]);
 }
 if ($fdexp[0] && $fdexp[2] && $cyncArr['data'][3]) {
     getDbUpdate($cyncArr['data'][3], $fdexp[2] . '=' . $fdexp[2] . '-' . $R['oneline'], $fdexp[0] . '=' . $cyncArr['data'][1]);
 }
 //첨부파일삭제
 if ($R['upload']) {
     // include_once $g['path_module'].'upload/var/var.php';
     $UPFILES = getArrayString($R['upload']);
     foreach ($UPFILES['data'] as $_val) {
         $U = getUidData($table['bbsupload'], $_val);
         if ($U['uid']) {
             getDbUpdate($table['s_numinfo'], 'upload=upload-1', "date='" . substr($U['d_regis'], 0, 8) . "' and site=" . $U['site']);
             getDbDelete($table['bbsupload'], 'uid=' . $U['uid']);
             if ($U['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서버 아이디나 패스워드가 일치하지 않습니다.', '');
                 }
                 ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $U['folder'] . '/' . $U['tmpname']);
                 if ($U['type'] == 2) {
                     ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $U['folder'] . '/' . $U['thumbname']);
    if (!$R['uid']) {
        getLink('', '', '존재하지 않는 댓글입니다.', '');
    }
    if (!$my['id'] || $my['id'] != $R['id'] && !$my['admin']) {
        if (!$pw) {
            getLink('', '', '정상적인 접근이 아닙니다.', '');
        } else {
            if ($pw != $R['pw']) {
                getLink('', '', '정상적인 접근이 아닙니다.', '');
            }
        }
    }
    $QVAL = "display='{$display}',hidden='{$hidden}',notice='{$notice}',subject='{$subject}',content='{$content}',html='{$html}',d_modify='{$d_regis}',upload='{$upload}',adddata='{$adddata}'";
    getDbUpdate($table['s_comment'], $QVAL, 'uid=' . $R['uid']);
} else {
    $R = getUidData($table[$m . 'data'], $parent);
    getDbUpdate($table[$m . 'data'], "comment=comment+1,d_comment='" . $date['totime'] . "'", 'uid=' . $R['uid']);
    $cync = '[' . $m . '][' . $R['uid'] . '][uid,comment,oneline,d_comment][' . $table[$m . 'data'] . '][' . $R['mbruid'] . '][m:' . $m . ',bid:' . $R['bbsid'] . ',uid:' . $R['uid'] . ']';
    $minuid = getDbCnt($table['s_comment'], 'min(uid)', '');
    $uid = $minuid ? $minuid - 1 : 1000000000;
    $QKEY = "uid,site,parent,parentmbr,display,hidden,notice,name,nic,mbruid,id,pw,subject,content,html,";
    $QKEY .= "hit,down,oneline,score1,score2,report,point,d_regis,d_modify,d_oneline,upload,ip,agent,sync,sns,adddata";
    $QVAL = "'{$uid}','{$s}','" . $m . $R['uid'] . "','{$parentmbr}','{$display}','{$hidden}','{$notice}','{$name}','{$nic}','{$mbruid}','{$id}','{$pw}','{$subject}','{$content}','{$html}',";
    $QVAL .= "'{$hit}','{$down}','{$oneline}','{$score1}','{$score2}','{$report}','{$point}','{$d_regis}','{$d_modify}','{$d_oneline}','{$upload}','{$ip}','{$agent}','{$cync}','','{$adddata}'";
    getDbInsert($table['s_comment'], $QKEY, $QVAL);
    getDbUpdate($table['s_numinfo'], 'comment=comment+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($subject, 15, '') . ")포인트','" . $date['totime'] . "'");
        getDbUpdate($table['s_mbrdata'], 'point=point+' . $point, 'memberuid=' . $my['uid']);
    }
    $_SESSION['xW'] = $uid;
Exemple #18
0
}
checkAdmin(0);
function getuFileType($R)
{
    if ($R['type'] == 2 || $R['type'] == -1) {
        return 1;
    }
    if ($R['type'] == 5 || $R['type'] == 0) {
        return 2;
    }
    return 0;
}
include $g['dir_module'] . 'var/var.php';
$_MEMBERS = array();
foreach ($upfile_members as $val) {
    $R = getUidData($table['s_upload'], $val);
    if ($R['uid']) {
        getDbDelete($table['s_upload'], 'uid=' . $R['uid']);
        if ($R['type'] > 0) {
            if ($R['fserver'] && $R['url'] == $d['mediaset']['ftp_urlpath']) {
                $FTP_CONNECT = ftp_connect($d['mediaset']['ftp_host'], $d['mediaset']['ftp_port']);
                $FTP_CRESULT = ftp_login($FTP_CONNECT, $d['mediaset']['ftp_user'], $d['mediaset']['ftp_pass']);
                if (!$FTP_CONNECT) {
                    continue;
                }
                if (!$FTP_CRESULT) {
                    continue;
                }
                if ($d['mediaset']['ftp_pasv']) {
                    ftp_pasv($FTP_CONNECT, true);
                }
Exemple #19
0
						<th><?php 
echo _LANG('aa017', 'admin');
?>
</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					<?php 
$_P = array();
?>
					<?php 
while ($R = db_fetch_array($RCD)) {
    ?>
					<?php 
    $_R = getUidData($table['s_mbrid'], $R['memberuid']);
    ?>
					<?php 
    if ($R['memberuid'] == $uid) {
        $_P = $R;
    }
    ?>
					<tr>
						<?php 
    if ($R['memberuid'] == 1) {
        ?>
						<td><input type="checkbox" disabled="disabled"></td>
						<?php 
    } else {
        ?>
						<td class="side1"><input type="checkbox" name="mbrmembers[]" value="<?php 
Exemple #20
0
<link rel="stylesheet" href="<?php 
echo $g['url_comment_skin'];
?>
/style.css">
<script type="text/javascript" src="<?php 
echo $g['url_comment_skin'];
?>
/jquery.form.js"></script>   
<!--// 댓글 관련 함수,스타일, js  인클루드 -->
<?php 
$_SESSION['wcode'] = $date['totime'];
$R = getUidData($d['comment']['feed_table'], $_GET['uid']);
$c_sort = $d['comment']['sort'];
$c_orderby = $d['comment']['orderby1'];
$c_recnum = $d['comment']['recnum'];
$c_sort = $d['comment']['sort'];
$cmt_placeholder = $my['uid'] ? '내용을 입력해주세요' : '로그인을 먼저 해주세요';
if ($R['comment'] <= $c_recnum) {
    $btn_next_disabled = 'disabled';
} else {
    $btn_next_disabled = '';
}
?>
<style>
/* 이미지 업로드 버튼 숨기기 */ 
.note-group-select-from-files {
 display: none;
}
</style>
<a name="cmt-write"></a>
<div>
Exemple #21
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'), '');
Exemple #22
0





<?php 
if ($type == 'menu') {
    ?>

<?php 
    include_once $g['path_core'] . 'function/menu.func.php';
    $ISCAT = getDbRows($table['s_menu'], 'site=' . $s);
    $catcode = '';
    if ($cat) {
        $CINFO = getUidData($table['s_menu'], $cat);
        $ctarr = getMenuCodeToPath($table['s_menu'], $cat, 0);
        $ctnum = count($ctarr);
        for ($i = 0; $i < $ctnum; $i++) {
            $CXA[] = $ctarr[$i]['uid'];
        }
    }
    $is_fcategory = $CINFO['uid'] && $vtype != 'sub';
    $is_regismode = !$CINFO['uid'] || $vtype == 'sub';
    if ($is_regismode) {
        $CINFO['menutype'] = '';
        $CINFO['name'] = '';
        $CINFO['joint'] = '';
        $CINFO['redirect'] = '';
        $CINFO['hidden'] = '';
        $CINFO['target'] = '';
<?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.', '수정되었습니다.', '');
Exemple #24
0
 if ($d['comment']['singo_del_act'] == 1) {
     //동기화
     $cyncArr = getArrayString($R['cync']);
     $fdexp = explode(',', $cyncArr['data'][2]);
     if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
         getDbUpdate($cyncArr['data'][3], $fdexp[1] . '=' . $fdexp[1] . '-1', $fdexp[0] . '=' . $cyncArr['data'][1]);
     }
     if ($fdexp[0] && $fdexp[2] && $cyncArr['data'][3]) {
         getDbUpdate($cyncArr['data'][3], $fdexp[2] . '=' . $fdexp[2] . '-' . $R['oneline'], $fdexp[0] . '=' . $cyncArr['data'][1]);
     }
     //첨부파일삭제
     if ($R['upload']) {
         include_once $g['path_module'] . 'upload/var/var.php';
         $UPFILES = getArrayString($R['upload']);
         foreach ($UPFILES['data'] as $_val) {
             $U = getUidData($table['s_upload'], $_val);
             if ($U['uid']) {
                 getDbUpdate($table['s_numinfo'], 'upload=upload-1', "date='" . substr($U['d_regis'], 0, 8) . "' and site=" . $U['site']);
                 getDbDelete($table['s_upload'], 'uid=' . $U['uid']);
                 if ($U['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서버 아이디나 패스워드가 일치하지 않습니다.', '');
                     }
                     ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $U['folder'] . '/' . $U['tmpname']);
                     if ($U['type'] == 2) {
                         ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $U['folder'] . '/' . $U['thumbname']);
Exemple #25
0
         $_tmpexp = explode('?', $_HM['joint']);
         if ($_tmpexp[1]) {
             $_tmparr = explode('&', $_tmpexp[1]);
             foreach ($_tmparr as $_tmpval) {
                 if (!$_tmpval) {
                     continue;
                 }
                 $_tmparr = explode('=', $_tmpval);
                 ${$_tmparr[0]} = $_tmparr[1];
             }
         }
     }
 }
 if (!$c && $m == $g['sys_module']) {
     if (!$mod) {
         $_HP = getUidData($table['s_page'], $g['mobile'] && $_SESSION['pcmode'] != 'Y' ? $_HS['m_startpage'] ? $_HS['m_startpage'] : $_HS['startpage'] : $_HS['startpage']);
     } else {
         $_HP = getDbData($table['s_page'], "id='" . $mod . "'", '*');
     }
     if ($_HP['uid']) {
         $_HM['layout'] = $_HP['layout'];
     }
     if ($_mod) {
         $g['location'] .= ' &gt; <a href="' . RW('mod=' . $_HP['id']) . '">' . $_HP['name'] . '</a>';
         if (!$_HS['titlefix']) {
             $g['browtitle'] = $_HS['title'] . ' - ' . $_HP['name'];
         }
     }
     if ($_HP['pagetype'] == 1) {
         $_HM['layout'] = $_HP['layout'];
         $_tmpexp = explode('?', $_HP['joint']);
Exemple #26
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$my['uid']) {
    getLink('', '', '정상적인 접근이 아닙니다.', '');
}
$R = getUidData($table[$m . 'data'], $uid);
if (!$R['uid']) {
    getLink('', '', '삭제되었거나 존재하지 않는 게시물입니다.', '');
}
$B = getUidData($table[$m . 'list'], $R['bbs']);
if (!$B['uid']) {
    getLink('', '', '존재하지 않는 게시판입니다.', '');
}
$mbruid = $my['uid'];
$category = $_HM['name'] ? $_HM['name'] : $B['name'];
$subject = addslashes($R['subject']);
$url = getLinkFilter($g['s'] . '/?' . ($_HS['usescode'] ? 'r=' . $r . '&amp;' : '') . ($c ? 'c=' . $c : 'm=' . $m), array('bid', 'skin', 'iframe'));
$d_regis = $date['totime'];
if (getDbRows($table['s_scrap'], "mbruid=" . $mbruid . " and url='" . $url . "'")) {
    getLink('', '', '이미 스크랩된 게시물입니다.', '');
}
$_QKEY = 'mbruid,category,subject,url,d_regis';
$_QVAL = "'{$mbruid}','{$category}','{$subject}','{$url}','{$d_regis}'";
getDbInsert($table['s_scrap'], $_QKEY, $_QVAL);
getLink('', '', '스크랩 되었습니다.', '');
}
//동기화
$cyncArr = getArrayString($R['cync']);
$fdexp = explode(',', $cyncArr['data'][2]);
if ($fdexp[0] && $fdexp[1] && $cyncArr['data'][3]) {
    getDbUpdate($cyncArr['data'][3], $fdexp[1] . '=' . $fdexp[1] . '-1', $fdexp[0] . '=' . $cyncArr['data'][1]);
}
if ($fdexp[0] && $fdexp[2] && $cyncArr['data'][3]) {
    getDbUpdate($cyncArr['data'][3], $fdexp[2] . '=' . $fdexp[2] . '-' . $R['oneline'], $fdexp[0] . '=' . $cyncArr['data'][1]);
}
//첨부파일삭제
if ($R['upload']) {
    //include $g['path_module'].'upload/var/var.php';
    $UPFILES = getArrayString($R['upload']);
    foreach ($UPFILES['data'] as $_val) {
        $U = getUidData($table[$m . 'upload'], $_val);
        if ($U['uid']) {
            getDbUpdate($table['s_numinfo'], 'upload=upload-1', "date='" . substr($U['d_regis'], 0, 8) . "' and site=" . $U['site']);
            getDbDelete($table[$m . 'upload'], 'uid=' . $U['uid']);
            if ($U['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) {
                    echo '[RESULT:FTP서버 연결에 문제가 발생했습니다.:RESULT]';
                }
                //getLink('','','FTP서버 연결에 문제가 발생했습니다.','');
                if (!$FTP_CRESULT) {
                    echo '[RESULT:FTP서버 아이디나 패스워드가 일치하지 않습니다.:RESULT]';
                }
                //getLink('','','FTP서버 아이디나 패스워드가 일치하지 않습니다.','');
                ftp_delete($FTP_CONNECT, $d['upload']['ftp_folder'] . $U['folder'] . '/' . $U['tmpname']);
Exemple #28
0
        } else {
            ?>
		<div class="none"></div>
		<?php 
        }
        ?>
		<?php 
    }
    ?>
	</div>
	<div class="tr">
		<?php 
    if ($d['layout']['bbs4']) {
        ?>
		<?php 
        $_B = getUidData($table['bbslist'], $d['layout']['bbs4']);
        ?>
		<?php 
        $_sort = explode(',', $d['layout']['sort4']);
        ?>
		<?php 
        $_date = $d['layout']['bbs4_day'] != '' ? date('YmdHis', mktime(0, 0, 0, substr($date['today'], 4, 2), substr($date['today'], 6, 2) - $d['layout']['bbs4_day'], $date['year'])) : 0;
        ?>
		<?php 
        $_RCD = getDbArray($table['bbsdata'], 'bbs=' . $d['layout']['bbs4'] . ' and display=1 and d_regis > ' . $_date, '*', $_sort[0], $_sort[1], $d['layout']['bbs4_num'], 1);
        ?>
		<?php 
        $_R = db_fetch_array($_RCD);
        ?>

		<div class="tt">
Exemple #29
0
        $S += $R['size'];
        $N++;
    }
}
$d['mediaset']['limitnum'] = $d['mediaset']['maxnum_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['maxsize_img'];
$d['mediaset']['limitsize'] = $d['mediaset']['limitsize'] * 1024 * 1024;
$LimitNum = $d['mediaset']['limitnum'] - $N;
$LimitSize = $d['mediaset']['limitsize'] - $S;
$gparamExp = explode('|', $gparam);
if ($tab == 'file_info') {
    if (!$file_uid) {
        $file_uid = $P[0]['uid'];
        $_R = $P[0];
    } else {
        $_R = getUidData($table['s_upload'], $file_uid);
    }
}
$g['base_href'] = $g['s'] . '/?r=' . $r . '&amp;m=' . $m . '&amp;iframe=Y&amp;mdfile=' . $mdfile . '&amp;dropfield=' . $dropfield . '&amp;dropfiles=' . $dropfiles;
?>

<?php 
getImport('bootstrap-select', 'bootstrap-select', false, 'css');
getImport('bootstrap-select', 'bootstrap-select', false, 'js');
?>


<form name="_upload_form_" action="<?php 
echo $g['s'];
?>
/" method="post" enctype="multipart/form-data" target="_upload_iframe_">
Exemple #30
0
    $g['url_module_skin'] = $g['url_module'] . '/lang.' . $_HS['lang'] . '/pages';
    $g['img_module_skin'] = $g['url_module_skin'] . '/image';
    $g['dir_module_mode'] = $g['dir_module_skin'] . $system;
    $g['url_module_mode'] = $g['url_module_skin'] . '/' . $system;
    $g['main'] = $g['dir_module_mode'] . '.php';
} else {
    if ($_HM['uid']) {
        if (!$my['admin']) {
            if ($_HM['perm_l'] > $my['level'] || strpos('_' . $_HM['perm_g'], '[' . $my['sosok'] . ']')) {
                getLink($g['s'] . '/?r=' . $r . '&system=guide.perm&_menu=' . $_HM['uid'], '', '', '');
            }
        }
        if ($_HM['menutype'] == 1) {
            if ($m == $g['sys_module']) {
                if (!$mod) {
                    $_HP = getUidData($table['s_page'], $_HS['startpage']);
                } else {
                    $_HP = getDbData($table['s_page'], "id='" . $mod . "'", '*');
                }
                if ($_HP['uid']) {
                    $_HM['layout'] = $_HP['layout'];
                }
            } else {
                getLink($g['s'] . '/?r=' . $r . '&system=edit.menu&_menu=' . $_HM['uid'] . '&notenable=Y', '', '', '');
            }
        } elseif ($_HM['menutype'] == 2) {
            $_HM['mcode'] = sprintf('%05d', $_HM['uid']);
            $d['page']['widget'] = array();
            $d['page']['cctime'] = $g['path_page'] . 'menu/' . $_HM['mcode'] . '.txt';
            $d['page']['source'] = $g['path_page'] . 'menu/' . $_HM['mcode'] . '.widget.php';
            include_once $d['page']['source'];