Example #1
0
             $thumbFile = $savePath3 . '/' . $thumbname;
             ResizeWidth($saveFile, $thumbFile, 150);
             @chmod($thumbFile, 0707);
             $IM = getimagesize($saveFile);
             $width = $IM[0];
             $height = $IM[1];
         }
         @chmod($saveFile, 0707);
     }
     $mingid = getDbCnt($table['bbsupload'], 'min(gid)', '');
     $gid = $mingid ? $mingid - 1 : 100000000;
     $QKEY = "gid,hidden,tmpcode,site,mbruid,type,ext,fserver,url,folder,name,tmpname,thumbname,size,width,height,caption,down,d_regis,d_update,cync";
     $QVAL = "'{$gid}','{$hidden}','{$tmpcode}','{$s}','{$mbruid}','{$type}','{$fileExt}','{$fserver}','{$url}','{$folder}','{$name}','{$tmpname}','{$thumbname}','{$size}','{$width}','{$height}','{$caption}','{$down}','{$d_regis}','{$d_update}','{$cync}'";
     getDbInsert($table['bbsupload'], $QKEY, $QVAL);
     getDbUpdate($table['s_numinfo'], 'upload=upload+1', "date='" . $date['today'] . "' and site=" . $s);
     $lastuid = getDbCnt($table['bbsupload'], 'max(uid)', '');
     $sourcePath = './modules/bbs' . str_replace('..', '', $savePath3);
     // 소스에 보여주는 패스트 -- 상대경로를  제거한다.
     $code = '100';
     $src = $sourcePath . '/' . $tmpname;
     $result = array($code, $src, $lastuid);
     // 이미지 path 및 이미지 uid 값
     echo json_encode($result);
     // 최종적으로 에디터에 넘어가는 값
 } else {
     $code = '200';
     $msg = '업로드금지 확장자입니다.';
     $result = array($code, $msg);
     echo json_encode($result);
     // 최종적으로 에디터에 넘어가는 값
 }
Example #2
0
)';
	<?php 
        if ($_nowPer > 99) {
            ?>
	parent.gridProgress();
	<?php 
        }
        ?>
	</script>
	<?php 
    }
} 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) {
Example #3
0
     $_page = file('./_package/dump_page.dat');
     foreach ($_page as $_val) {
         if (!trim($_val)) {
             continue;
         }
         $_r = explode("\t", $_val);
         $_p = getDbData($table['s_page'], "id='" . $_r[3] . "'", 'uid');
         if ($_p['uid']) {
             getDbUpdate($table['s_page'], "pagetype='" . $_r[0] . "',ismain='" . $_r[1] . "',mobile='" . $_r[2] . "',id='" . $_r[3] . "',category='" . $_r[4] . "',name='" . $_r[5] . "',layout='" . $_r[6] . "',joint='" . $_r[7] . "',sosokmenu='" . $_r[8] . "'", 'uid=' . $_p['uid']);
         } else {
             getDbInsert($table['s_page'], 'pagetype,ismain,mobile,id,category,name,layout,joint,sosokmenu', "'" . $_r[0] . "','" . $_r[1] . "','" . $_r[2] . "','" . $_r[3] . "','" . $_r[4] . "','" . $_r[5] . "','" . $_r[6] . "','" . $_r[7] . "','" . $_r[8] . "'");
         }
     }
 }
 if ($aply_bbs == '1') {
     $maxgid = getDbCnt($table['bbslist'], 'max(gid)', '');
     $_bbs = file('./_package/dump_bbs.dat');
     foreach ($_bbs as $_val) {
         if (!trim($_val)) {
             continue;
         }
         $_r = explode("\t", $_val);
         $_p = getDbData($table['bbslist'], "id='" . $_r[0] . "'", 'uid');
         if ($_p['uid']) {
             continue;
         }
         $maxgid++;
         getDbInsert($table['bbslist'], 'gid,id,name,category,imghead,imgfoot,puthead,putfoot', "'" . $maxgid . "','" . $_r[0] . "','" . $_r[1] . "','" . $_r[2] . "','" . $_r[3] . "','" . $_r[4] . "','" . $_r[5] . "','" . $_r[6] . "'");
     }
 }
 DirCopy('./_package/rb', './');
Example #4
0
    $QVAL = "'{$Ugid}','{$id}','{$name}','{$category}','0','','" . $date['totime'] . "','{$imghead}','{$imgfoot}','{$puthead}','{$putfoot}','{$addinfo}','{$writecode}'";
    getDbInsert($table[$m . 'list'], $QKEY, $QVAL);
    $mfile = $g['dir_module'] . 'var/code/' . $id;
    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);
    }
    $backUrl = $g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=makebbs&iframe=Y&uid=' . getDbCnt($table[$m . 'list'], 'max(uid)', '');
}
$fdset = array('layout', 'skin', 'm_skin', 'c_skin', 'c_mskin', 'c_hidden', 'c_open', 'perm_g_list', 'perm_g_view', 'perm_g_write', 'perm_g_down', 'perm_l_list', 'perm_l_view', 'perm_l_write', 'perm_l_down', 'admin', 'hitcount', 'recnum', 'sbjcut', 'newtime', 'rss', 'sosokmenu', 'point1', 'point2', 'point3', 'display', 'hidelist', 'snsconnect');
$gfile = $g['dir_module'] . 'var/var.' . $id . '.php';
$fp = fopen($gfile, 'w');
fwrite($fp, "<?php\n");
foreach ($fdset as $val) {
    fwrite($fp, "\$d['bbs']['" . $val . "'] = \"" . trim(${$val}) . "\";\n");
}
fwrite($fp, "?>");
fclose($fp);
@chmod($gfile, 0707);
if ($bid) {
    $msg = '게시판 설정이 수정되었습니다. ';
} else {
    $msg = '새 게시판이 만들어졌습니다';
Example #5
0
if ($R['tag']) {
    $_tagdate = substr($R['d_regis'], 0, 8);
    $_tagarr1 = explode(',', $R['tag']);
    foreach ($_tagarr1 as $_t) {
        if (!$_t) {
            continue;
        }
        $_TAG = getDbData($table['s_tag'], "site=" . $R['site'] . " and date='" . $_tagdate . "' and keyword='" . $_t . "'", '*');
        if ($_TAG['uid']) {
            if ($_TAG['hit'] > 1) {
                getDbUpdate($table['s_tag'], 'hit=hit-1', 'uid=' . $_TAG['uid']);
            } else {
                getDbDelete($table['s_tag'], 'uid=' . $_TAG['uid']);
            }
        }
    }
}
getDbUpdate($table[$m . 'month'], 'num=num-1', "date='" . substr($R['d_regis'], 0, 6) . "' and site=" . $R['site'] . ' and bbs=' . $R['bbs']);
getDbUpdate($table[$m . 'day'], 'num=num-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site'] . ' and bbs=' . $R['bbs']);
getDbDelete($table[$m . 'idx'], 'gid=' . $R['gid']);
getDbDelete($table[$m . 'data'], 'uid=' . $R['uid']);
getDbUpdate($table[$m . 'list'], 'num_r=num_r-1', 'uid=' . $R['bbs']);
if ($cuid) {
    getDbUpdate($table['s_menu'], "num='" . getDbCnt($table[$m . 'month'], 'sum(num)', 'site=' . $s . ' and bbs=' . $R['bbs']) . "'", 'uid=' . $cuid);
}
getDbDelete($table['s_trackback'], "parent='" . $R['bbsid'] . $R['uid'] . "'");
if ($R['point1'] && $R['mbruid']) {
    getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $R['mbruid'] . "','0','-" . $R['point1'] . "','게시물삭제(" . getStrCut($R['subject'], 15, '') . ")환원','" . $date['totime'] . "'");
    getDbUpdate($table['s_mbrdata'], 'point=point-' . $R['point1'], 'memberuid=' . $R['mbruid']);
}
getLink($backUrl, 'parent.', $alert, $history);
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;
Example #7
0
        db_query("OPTIMIZE TABLE " . $table[$m . 'idx'], $DB_CONNECT);
        db_query("OPTIMIZE TABLE " . $table[$m . 'data'], $DB_CONNECT);
        db_query("OPTIMIZE TABLE " . $table[$m . 'month'], $DB_CONNECT);
        db_query("OPTIMIZE TABLE " . $table[$m . 'day'], $DB_CONNECT);
    }
}
$NOWUID = $LASTUID ? $LASTUID : $R['uid'];
if ($trackback) {
    $trackback = trim($trackback);
    $compaurl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '/' . $m . '/' . $NOWUID;
    if ($trackback != $compaurl) {
        include_once $g['path_core'] . 'function/trackback.func.php';
        $orignurl = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('index.php', '?m=', $_SERVER['SCRIPT_NAME']) . $m . '&bid=' . $bbsid . '&uid=' . $NOWUID;
        $result = putTrackback($trackback, $orignurl, getUTFtoKR(strip_tags($subject)), getUTFtoKR(${$_HS['nametype']}), getUTFtoKR(strip_tags($content)), 0);
        if ($result) {
            $minuid = getDbCnt($table['s_trackback'], 'min(uid)', '');
            $trackuid = $minuid ? $minuid - 1 : 100000000;
            $cync = '[' . $m . '][' . $NOWUID . '][m:' . $m . ',bid:' . $bbsid . ',uid:' . $NOWUID . ']';
            $QKEY = "uid,site,type,parent,parentmbr,url,name,subject,content,d_regis,d_modify,cync";
            $QVAL = "'{$trackuid}','{$s}','2','" . $m . $NOWUID . "','{$mbruid}','{$trackback}','','','','{$d_regis}','','{$cync}'";
            getDbInsert($table['s_trackback'], $QKEY, $QVAL);
            getDbUpdate($table['s_numinfo'], 'sndtrack=sndtrack+1', "date='" . $date['today'] . "' and site=" . $s);
            if ($trackuid == 100000000) {
                db_query("OPTIMIZE TABLE " . $table['s_trackback'], $DB_CONNECT);
            }
        }
    }
}
if ($tag || $R['tag']) {
    $_tagarr1 = array();
    $_tagarr2 = explode(',', $tag);
Example #8
0
<div class="archiv">
<div class="tt">포스트현황</div>
<ul>
<?php 
for ($i = 0; $i < 12; $i++) {
    $_month = date('Ym', mktime(0, 0, 0, substr($date['today'], 4, 2) - $i, substr($date['today'], 6, 2), $date['year']));
    $_num = getDbCnt($table['bbsmonth'], 'sum(num)', "date='" . $_month . "' and site=" . $s);
    ?>
<li>
<a href="<?php 
    echo $g['s'];
    ?>
/?r=<?php 
    echo $r;
    ?>
&amp;m=bbs&amp;where=term&amp;keyword=<?php 
    echo $_month;
    ?>
"><?php 
    echo getDateFormat($_month, 'Y M');
    ?>
</a>
<span>(<?php 
    echo $_num;
    ?>
)</span>
</li>
<?php 
}
?>
</ul>
Example #9
0
    ?>

			<a href="<?php 
    echo $g['base_href'];
    ?>
&album=trash" class="list-group-item<?php 
    if ($album == 'trash') {
        ?>
 active<?php 
    }
    ?>
"><?php 
    echo _LANG('m0002', 'mediaset');
    ?>
<span class="badge"><?php 
    echo getDbCnt($table['s_uploadcat'], 'sum(r_num)', 'mbruid=' . $my['uid'] . " and type=1 and name='trash'");
    ?>
</span></a>
		</div>
		<div class="list-group">
			<form action="<?php 
    echo $g['s'];
    ?>
/" method="post" target="_upload_iframe_" onsubmit="return AddAlbumRcheck(this);">
			<input type="hidden" name="r" value="<?php 
    echo $r;
    ?>
">
			<input type="hidden" name="m" value="<?php 
    echo $m;
    ?>
Example #10
0
     $tmpname = $_FILES['img' . $imgset[$i]]['tmp_name'];
     $realname = $_FILES['img' . $imgset[$i]]['name'];
     $fileExt = strtolower(getExt($realname));
     $fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
     $userimg = $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;
     }
 }
 $Ugid = getDbCnt($table[$m . 'list'], 'max(gid)', '') + 1;
 $QKEY = "gid,id,name,category,num_r,d_last,d_regis,imghead,imgfoot,puthead,putfoot,addinfo,writecode";
 $QVAL = "'{$Ugid}','{$id}','{$name}','{$category}','0','','" . $date['totime'] . "','{$imghead}','{$imgfoot}','{$puthead}','{$putfoot}','{$addinfo}','{$writecode}'";
 getDbInsert($table[$m . 'list'], $QKEY, $QVAL);
 $mfile = $g['dir_module'] . 'var/code/' . $id;
 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);
Example #11
0
        if ($backgo == 'admin') {
            getLink($g['s'] . '/?r=' . $id . '&m=' . $backgo . '&module=' . $m, 'parent.', '', '');
        } else {
            getLink($g['s'] . '/?r=' . $id . '&system=edit.all&type=site', 'parent.', '', '');
        }
    } else {
        if ($iframe == 'Y') {
            getLink('reload', 'parent.parent.', '', '');
        } else {
            getLink('reload', 'parent.', '', '');
        }
    }
} else {
    $ISID = getDbData($Table['s_site'], "id='" . $id . "'", '*');
    if ($ISID['uid']) {
        getLink('', '', '이미 동일한 명칭의 계정아이디가 존재합니다.', '');
    }
    $MAXC = getDbCnt($table['s_site'], 'max(gid)', '');
    $gid = $MAXC + 1;
    $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}','{$title}','{$titlefix}','{$icon}','{$layout}','{$startpage}','{$m_layout}','{$m_startpage}','{$sitelang}','{$open}','{$dtd}','{$nametype}','{$timecal}','{$rewrite}','{$buffer}','{$usescode}','{$headercode}','{$footercode}'";
    getDbInsert($table['s_site'], $QKEY, $QVAL);
    $LASTUID = getDbCnt($table['s_site'], 'max(uid)', '');
    db_query("OPTIMIZE TABLE " . $table['s_site'], $DB_CONNECT);
    $vfile = $g['path_var'] . 'sitephp/' . $LASTUID . '.php';
    $fp = fopen($vfile, 'w');
    fwrite($fp, trim(stripslashes($sitephpcode)));
    fclose($fp);
    @chmod($vfile, 0707);
    getLink('reload', 'parent.', '', '');
}
Example #12
0
                    @unlink($g['path_tmp'] . 'session/' . $U['tmpname']);
                    if ($U['type'] == 2) {
                        ftp_get($FTP_CONNECT, $g['path_tmp'] . 'session/' . $U['thumbname'], $d['upload']['ftp_folder'] . $U['folder'] . '/' . $U['thumbname'], FTP_BINARY);
                        ftp_put($FTP_CONNECT, $d['upload']['ftp_folder'] . $U['folder'] . '/' . $_thumbna, $g['path_tmp'] . 'session/' . $U['thumbname'], FTP_BINARY);
                        @unlink($g['path_tmp'] . 'session/' . $U['thumbname']);
                    }
                    ftp_close($FTP_CONNECT);
                } else {
                    copy($g['path_file'] . $U['folder'] . '/' . $U['tmpname'], $g['path_file'] . $U['folder'] . '/' . $_tmpname);
                    if ($U['type'] == 2) {
                        copy($g['path_file'] . $U['folder'] . '/' . $U['thumbname'], $g['path_file'] . $U['folder'] . '/' . $_thumbna);
                    }
                }
                $upload_mingid = getDbCnt($table['s_upload'], 'min(gid)', '');
                $upload_gid = $upload_mingid ? $upload_mingid - 1 : 100000000;
                $QKEY = "gid,hidden,tmpcode,site,mbruid,type,ext,fserver,url,folder,name,tmpname,thumbname,size,width,height,caption,down,d_regis,d_update,cync";
                $QVAL = "'{$upload_gid}','" . $U['hidden'] . "','','" . $U['site'] . "','" . $U['mbruid'] . "','" . $U['type'] . "','" . $U['ext'] . "','" . $U['fserver'] . "','" . $U['url'] . "',";
                $QVAL .= "'" . $U['folder'] . "','" . addslashes($U['name']) . "','" . $_tmpname . "','" . $_thumbna . "','" . $U['size'] . "','" . $U['width'] . "','" . $U['height'] . "',";
                $QVAL .= "'" . addslashes($U['caption']) . "','" . $U['down'] . "','" . $U['d_regis'] . "','" . $U['d_update'] . "',''";
                getDbInsert($table['s_upload'], $QKEY, $QVAL);
                getDbUpdate($table['s_numinfo'], 'upload=upload+1', "date='" . substr($U['d_regis'], 0, 8) . "' and site=" . $U['site']);
                $tmpupload .= '[' . getDbCnt($table['s_upload'], 'max(uid)', '') . ']';
                $_content1 = str_replace($U['tmpname'], $_tmpname, $_content1);
            }
        }
        getDbUpdate($table[$m . 'data'], "content='" . addslashes($_content1) . "',upload='" . $tmpupload . "'", 'uid=' . $NOWUID);
    }
    $_SESSION['BbsPost' . $type] = str_replace('[' . $R['uid'] . ']', '', $_SESSION['BbsPost' . $type]);
}
$referer = $g['s'] . '/?r=' . $r . '&iframe=Y&m=admin&module=' . $m . '&front=movecopy&type=' . $type;
getLink($referer, 'parent.', '실행되었습니다.', '');
Example #13
0
            $thumbFile = $savePath3 . '/' . $thumbname;
            ResizeWidth($saveFile, $thumbFile, 150);
            @chmod($thumbFile, 0707);
            $IM = getimagesize($saveFile);
            $width = $IM[0];
            $height = $IM[1];
        }
        @chmod($saveFile, 0707);
    }
}
$mingid = getDbCnt($table[$m . 'upload'], 'min(gid)', '');
$gid = $mingid ? $mingid - 1 : 100000000;
$QKEY = "gid,hidden,tmpcode,blog,parent,mbruid,type,ext,fserver,url,folder,name,tmpname,thumbname,size,width,height,caption,down,d_regis,d_update";
$QVAL = "'{$gid}','{$hidden}','{$tmpcode}','{$blog}','0','{$mbruid}','{$type}','{$fileExt}','{$fserver}','{$url}','{$folder}','{$name}','{$tmpname}','{$thumbname}','{$size}','{$width}','{$height}','{$caption}','{$down}','{$d_regis}','{$d_update}'";
getDbInsert($table[$m . 'upload'], $QKEY, $QVAL);
if ($gid == 100000000) {
    db_query("OPTIMIZE TABLE " . $table[$m . 'upload'], $DB_CONNECT);
}
if ($upType == 'normal') {
    getLink($g['s'] . '/?r=' . $r . '&m=' . $m . '&blog=' . $blog . '&upload=Y&mod=' . $mod . '&gparam=' . $gparam . ($cupload ? '&cupload=' . $cupload : ''), '', '', '');
}
$lastuid = getDbCnt($table[$m . 'upload'], 'max(uid)', '');
$sourcePath = './modules/' . $m . str_replace('..', '', $savePath3);
// 소스에 보여주는 패스트 -- 상대경로를  제거한다.
$code = '100';
$src = $saveFile;
$result = array($code, $src, $lastuid);
// 이미지 path 및 이미지 uid 값
echo json_encode($result);
// 최종적으로 에디터에 넘어가는 값
exit;
Example #14
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$memberuid = $my['uid'];
$url = $g['s'] . '/?r=' . $r . '&m=' . $m . '&module=' . $_addmodule . '&front=' . $_addfront;
if (getDbRows($table['s_admpage'], 'memberuid=' . $memberuid . " and url='" . $url . "'")) {
    getLink('', '', '이미 등록된 페이지입니다.', '');
}
$maxgid = getDbCnt($table['s_admpage'], 'max(gid)', 'memberuid=' . $memberuid);
$MD = getDbData($table['s_module'], "id='" . $_addmodule . "'", '*');
include_once $g['path_module'] . $_addmodule . '/lang.' . $_HS['lang'] . '/admin/_pc/var/var.menu.php';
$gid = $maxgid + 1;
$name = $MD['name'] . '&gt;' . $d['amenu'][$_addfront];
getDbInsert($table['s_admpage'], 'memberuid,gid,name,url', "'{$memberuid}','{$gid}','{$name}','{$url}'");
getLink('reload', 'parent.', '', '');
    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;
    if ($snsCallBack && is_file($g['path_module'] . $snsCallBack)) {
        $xcync = $cync . ',CMT:' . $uid;
        $orignSubject = strip_tags($subject);
Example #16
0
}
if ($use_oneline) {
    if (!$o_table) {
        getLink('', '', '한줄의견 저장 테이블을 입력해주세요. ', '');
    }
}
if ($uid) {
    $R = getUidData($table[$m . 'object'], $uid);
    $QVAL = "name='{$name}',p_theme='{$p_theme}',m_theme='{$m_theme}',use_oneline='{$use_oneline}',p_table='{$p_table}',c_perm_write='{$c_perm_write}',c_table='{$c_table}',";
    $QVAL .= "c_snsconnect='{$c_snsconnect}',c_recnum='{$c_recnum}',c_sort='{$c_sort}',c_orderby='{$c_orderby}',c_point='{$c_point}',c_onelinedel='{$c_onelinedel}',";
    $QVAL .= "o_table='{$o_table}',o_orderby='{$o_orderby}',o_point='{$o_point}',badword='{$badword}',badword_action='{$badword_action}',badword_escape='{$badword_escape}'";
    getDbUpdate($table[$m . 'object'], $QVAL, 'uid=' . $R['uid']);
    $msg = '수정되었습니다.';
    $_link = $g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=settings&uid=' . $uid;
} else {
    if (!$id) {
        getLink('', '', '오브젝트 아이디를 입력해 주세요.', '');
    }
    if (getDbRows($table[$m . 'object'], "id='" . $id . "'")) {
        getLink('', '', '이미 같은 아이디의 오브젝트가 존재합니다.', '');
    }
    $QKEY = "id,name,p_theme,m_theme,use_oneline,p_table,c_perm_write,c_table,c_snsconnect,c_recnum,c_sort,c_orderby,c_point,c_onelinedel,o_table,";
    $QKEY .= "o_orderby,o_point,badword,badword_action,badword_escape";
    $QVAL = "'{$id}','{$name}','{$p_theme}','{$m_theme}','{$use_oneline}','{$p_table}','{$c_perm_write}','{$c_table}','{$c_snsconnect}','{$c_recnum}','{$c_sort}','{$c_orderby}',";
    $QVAL .= "'{$c_point}','{$c_onelinedel}','{$o_table}','{$o_orderby}','{$o_point}','{$badword}','{$badword_action}','{$badword_escape}'";
    getDbInsert($table[$m . 'object'], $QKEY, $QVAL);
    $LASTUID = getDbCnt($table[$m . 'object'], 'max(uid)', '');
    $msg = '신규 오브젝트가 생성되었습니다.';
    $_link = $g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=main';
}
getLink($_link, 'parent.', $msg, '');
Example #17
0
             fwrite($fp, "<?php\n");
             foreach ($_tmptable2 as $key => $val) {
                 fwrite($fp, "\$table['{$key}'] = \"{$val}\";\n");
             }
             foreach ($_tmptable1 as $key => $val) {
                 fwrite($fp, "\$table['{$key}'] = \"{$val}\";\n");
             }
             fwrite($fp, "?>");
             fclose($fp);
             @chmod($_tmptfile, 0707);
         } else {
             if (is_file($table_db . '.done')) {
                 include $table_db . '.done';
             }
         }
         $maxgid = getDbCnt($_tmptable2['s_module'], 'max(gid)', '');
         $QKEY = "gid,system,hidden,mobile,name,id,tblnum,icon,d_regis";
         $QVAL = "'" . ($maxgid + 1) . "','0','0','1','" . getFolderName($g['path_tmp'] . 'app/' . $package_folder . '/modules/' . $module) . "','{$module}','" . count($table) . "','kf-module','" . $date['totime'] . "'";
         getDbInsert($_tmptable2['s_module'], $QKEY, $QVAL);
     }
     closedir($dirh);
 }
 //플러그인설치
 if (is_dir($g['path_tmp'] . 'app/' . $package_folder . '/plugins')) {
     $dirh = opendir($g['path_tmp'] . 'app/' . $package_folder . '/plugins');
     while (false !== ($filename = readdir($dirh))) {
         if ($filename == '.' || $filename == '..') {
             continue;
         }
         if (is_dir($g['path_plugin'] . $filename)) {
             continue;
Example #18
0
        }
    }
}
if ($search_travel) {
    $where3 .= " and {$travel} = '{$search_travel}' ";
}
$where2 = $reception_sql . " and display='1'" . $select_admin_sql . $where3;
$NTC = getDbArray($table[$m . 'idx'], $bbsque1, 'gid', 'gid', $orderby, 0, 0);
while ($_R = db_fetch_array($NTC)) {
    $NCD[] = getDbData($table[$m . 'data'], 'gid=' . $_R['gid'], '*');
}
if ($bid == "cus_manager2") {
    $bbsque2 .= $where2;
}
if ($sort == 'gid' && !$where2 && !$cat) {
    $NUM = getDbCnt($table[$m . 'month'], 'sum(num)', $bbsque0) - count($NCD);
    $recnum = 15;
    $TCD = getDbArray($table[$m . 'idx'], $bbsque2, 'gid', $sort, $orderby, $recnum, $p);
    while ($_R = db_fetch_array($TCD)) {
        $RCD[] = getDbData($table[$m . 'data'], 'gid=' . $_R['gid'], '*');
    }
} else {
    if ($cat) {
        $bbsque2 .= " and category='" . $cat . "'";
    }
    if ($where && $keyword) {
        if (strpos('[name][nic][id][ip]', $where)) {
            $bbsque2 .= " and " . $where . "='" . $keyword . "'";
        } else {
            if ($where == 'term') {
                $bbsque2 .= " and d_regis like '" . $keyword . "%'";
Example #19
0
    getDbUpdate($table['s_mbrid'], "pw='" . $newPw . "'", 'uid=' . $uid);
    getDbUpdate($table['s_mbrdata'], "email='{$email}',name='{$name}',nic='{$nic}',photo='{$photo}',tel2='{$tel2}'", 'memberuid=' . $uid);
    if ($my['uid'] == $uid) {
        if ($pw != '') {
            $_SESSION['mbr_pw'] = $newPw;
            $newPw = getCrypt($pw, $_M['d_regis']);
            getDbUpdate($table['s_mbrid'], "pw='" . $newPw . "'", 'uid=' . $uid);
            if ($my['uid'] == $uid) {
                $_SESSION['mbr_pw'] = $newPw;
            }
        }
    }
    getDbUpdate($table['s_mbrdata'], "email='{$email}',name='{$name}',nic='{$nic}',photo='{$photo}',tel2='{$tel2}'", 'memberuid=' . $uid);
} else {
    getDbInsert($table['s_mbrid'], 'site,id,pw', "'{$s}','{$id}','" . getCrypt($pw, $date['totime']) . "'");
    $memberuid = getDbCnt($table['s_mbrid'], 'max(uid)', '');
    $auth = 1;
    $mygroup = 1;
    $level = 1;
    $comp = 0;
    $adm_view = $admin ? '[admin]' : '';
    $home = '';
    $birth1 = 0;
    $birth2 = 0;
    $birthtype = 0;
    $tel1 = $tel2 && substr($tel2, 0, 2) != '01' ? $tel2 : '';
    $tel2 = $tel2 && substr($tel2, 0, 2) == '01' ? $tel2 : '';
    $zip = '';
    $addr0 = '';
    $addr1 = '';
    $addr2 = '';
Example #20
0
		



			
			<div class="counter">
			Total : <?php 
echo number_format(getDbCnt($table['s_counter'], 'sum(hit)', 'site=' . $s));
?>
<br />
			Yesterday : <?php 
echo number_format(getDbCnt($table['s_counter'], 'sum(hit)', 'site=' . $s . " and date='" . getDateCal('Ymd', $date['totime'], -24) . "'"));
?>
<br />
			Today : <?php 
echo number_format(getDbCnt($table['s_counter'], 'sum(hit)', 'site=' . $s . " and date='" . $date['today'] . "'"));
?>
<br />
			</div>


			<div class="rss">
				<img src="<?php 
echo $g['img_core'];
?>
/_public/btn_rss_gray.gif" alt="rss" />
				<a href="<?php 
echo $g['s'];
?>
/?r=<?php 
echo $r;
Example #21
0
 @chmod($mfile, 0707);
 $mfile = $g['path_page'] . $id . '.widget.php';
 $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.', '', '');
Example #22
0
$url = $g['s'] . '/?r=' . $r . '&m=' . $m . '&module=' . $_addmodule . '&front=' . $_addfront;
if (getDbRows($table['s_admpage'], 'memberuid=' . $memberuid . " and url='" . $url . "'")) {
    getLink('', '', '이미 등록된 북마크입니다.', '');
}
$maxgid = getDbCnt($table['s_admpage'], 'max(gid)', 'memberuid=' . $memberuid);
$MD = getDbData($table['s_module'], "id='" . $_addmodule . "'", '*');
$varfile = $g['path_module'] . $_addmodule . '/lang.' . $_HS['lang'] . '/admin/var/var.menu.php';
if (is_file($varfile)) {
    include $varfile;
    $name = $MD['name'] . ' - ' . $d['amenu'][$_addfront];
} else {
    $name = $MD['name'];
}
$gid = $maxgid + 1;
getDbInsert($table['s_admpage'], 'memberuid,gid,name,url', "'{$memberuid}','{$gid}','{$name}','{$url}'");
$bookmark_uid = getDbCnt($table['s_admpage'], 'max(uid)', '');
if ($_addmodule == 'admin' && $_addfront == 'bookmark') {
    getLink('reload', 'parent.', '', '');
} else {
    ?>
<script>
parent.getId('_bookmark_star_').className = 'fa fa-lg fa-star rb-star-fill';
parent.getId('_bookmark_notyet_').className = 'btn-group btn-group-sm dropdown hidden';
parent.getId('_bookmark_already_').className = 'btn-group btn-group-sm dropdown';
parent.getId('_add_bookmark_').innerHTML <?php 
    if (getDbRows($table['s_admpage'], 'memberuid=' . $my['uid']) > 1) {
        ?>
+<?php 
    }
    ?>
= '<a href="<?php 
Example #23
0
<?php

if (!defined('__KIMS__')) {
    exit;
}
if (!$my['uid']) {
    getLink('', '', _LANG('a0001', 'mediaset'), '');
}
if (!getDbRows($table['s_uploadcat'], 'mbruid=' . $my['uid'] . ' and type=' . $ablum_type)) {
    getDbInsert($table['s_uploadcat'], 'gid,site,mbruid,type,hidden,users,name,r_num,d_regis,d_update', "'0','" . $s . "','" . $my['uid'] . "','" . $ablum_type . "','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'] . "','" . $ablum_type . "','0','','trash','0','" . $date['totime'] . "',''");
}
$MAXC = getDbCnt($table['s_uploadcat'], 'max(gid)', 'mbruid=' . $my['uid'] . ' and type=' . $ablum_type);
$sarr = explode(',', trim($name));
$slen = count($sarr);
for ($i = 0; $i < $slen; $i++) {
    $xname = trim($sarr[$i]);
    if (!$xname) {
        continue;
    }
    if ($xname == 'none' || $xname == 'trash') {
        continue;
    }
    $gid = $MAXC + 1 + $i;
    getDbInsert($table['s_uploadcat'], 'gid,site,mbruid,type,hidden,users,name,r_num,d_regis,d_update', "'{$gid}','" . $s . "','" . $my['uid'] . "','" . $ablum_type . "','0','','" . $xname . "','0','" . $date['totime'] . "',''");
}
getLink('reload', 'parent.', '', '');
Example #24
0
	<col width="77"> 
	<col width="77"> 
	<col width="77"> 
	<col width="77"> 
	<col width="77"> 
	<col width="77"> 
	<col width="77"> 
	<col>
	</colgroup>
	<thead>
	<tr class="grptr">
		<?php 
foreach ($brset as $val) {
    ?>
		<?php 
    $numOfBrowser = getDbCnt($table['s_browser'], 'sum(hit)', $_WHERE . " and browser='" . $val . "'");
    ?>
		<th scope="col"><?php 
    if ($numOfBrowser) {
        ?>
<div class="info"><?php 
        echo number_format($numOfBrowser);
        ?>
<br /><span>(<?php 
        echo @intval($numOfBrowser / $DATNUM * 100);
        ?>
%)</span></div><div class="grp" style="height:<?php 
        echo @intval($numOfBrowser / $DATNUM * 330);
        ?>
px;"></div><?php 
    }
Example #25
0
				<tr class="looptr">
					<td class="datetd"><?php 
    echo sprintf('%02d', $month);
    ?>
/<?php 
    echo sprintf('%02d', $i);
    ?>
 (<?php 
    echo getWeekday(date('w', mktime(0, 0, 0, $month, $i, $year)));
    ?>
)</td>
					<?php 
    $DayOf1 = getDbData($table['s_counter'], $accountQue . "date='" . $year . sprintf('%02d', $month) . sprintf('%02d', $i) . "'", '*');
    ?>
					<?php 
    $DayOf2 = getDbCnt($table['s_browser'], 'sum(hit)', $accountQue . "date='" . $year . sprintf('%02d', $month) . sprintf('%02d', $i) . "' and browser='Mobile'");
    ?>
					<?php 
    $TOT1 += $DayOf1['hit'];
    ?>
					<?php 
    $TOT2 += $DayOf1['page'];
    ?>
					<?php 
    $TOT3 += $DayOf2;
    ?>

					<td class="sumtd1"><?php 
    echo $DayOf1['hit'] ? number_format($DayOf1['hit']) : '&nbsp;';
    ?>
</td>
Example #26
0
    exit;
}
checkAdmin(0);
$name = trim($name);
$name = str_replace('http://', '', $name);
$name = str_replace('/', '', $name);
if ($vtype == 'sub') {
    $name = $name . $_fdomain;
}
if ($cat && !$vtype) {
    $R = getDbData($table['s_domain'], "uid<>" . $cat . " and name='" . $name . "'", '*');
    if ($R['uid']) {
        getLink('', '', _q('This is a domain already has registered.', 'a1001', 'domain'), '');
    }
    getDbUpdate($table['s_domain'], "name='{$name}',site='{$site}'", 'uid=' . $cat);
    getLink('reload', 'parent.', '', '');
} else {
    $R = getDbData($table['s_domain'], "name='" . $name . "'", '*');
    if ($R['uid']) {
        getLink('', '', _LANG('a1001', 'domain'), '');
    }
    $MAXC = getDbCnt($table['s_domain'], 'max(gid)', 'depth=' . ($depth + 1) . ' and parent=' . $parent);
    $gid = $MAXC + 1;
    $xdepth = $depth + 1;
    getDbInsert($table['s_domain'], "gid,is_child,parent,depth,name,site", "'{$gid}','0','{$parent}','{$xdepth}','{$name}','{$site}'");
    if ($parent) {
        getDbUpdate($table['s_domain'], 'is_child=1', 'uid=' . $parent);
    }
    db_query("OPTIMIZE TABLE " . $table['s_domain'], $DB_CONNECT);
    getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . ($parent ? '&cat=' . $parent : '') . ($code ? '&code=' . $code : ''), 'parent.', '', '');
}
Example #27
0
    	@chmod($mfile,0707);
    	$mfile = $g['path_page'].$_key.'.widget.php';
    	$fp = fopen($mfile,'w');
    	fwrite($fp,'');
    	fclose($fp);
    	@chmod($mfile,0707);
    */
}
//임시셋팅
$menus_array = array('event-overview' => 'Event Overview', 'speakers-and-moderators' => 'Speakers & Moderators', 'event-program' => 'Event Program', 'previous-events' => 'Previous Events', 'cover' => 'Cover');
$_i = 0;
foreach ($menus_array as $_key => $_val) {
    $qkey = 'gid,site,isson,parent,depth,id,menutype,mobile,hidden,reject,name,target,redirect,joint,layout,imghead,imgfoot,addattr';
    $qval = "'" . $_i . "','" . $LASTUID . "','0','0','1','" . $_key . "','3','1','0','0','" . $_val . "','','','','','','',''";
    getDbInsert($table['s_menu'], $qkey, $qval);
    $lastmenu = getDbCnt($table['s_menu'], 'max(uid)', '');
    $mfile = $g['path_page'] . 'menu/' . sprintf('%05d', $lastmenu);
    $fp = fopen($mfile . '.php', 'w');
    fwrite($fp, '');
    fclose($fp);
    @chmod($mfile . '.php', 0707);
    $fp = fopen($mfile . '.widget.php', 'w');
    fwrite($fp, '');
    fclose($fp);
    @chmod($mfile . '.widget.php', 0707);
    $_i++;
}
db_query("insert into " . $table['s_mbrid'] . " (site,id,pw)values('1','{$id}','" . md5($pw1) . "')", $DB_CONNECT);
$QUE = "insert into " . $table['s_mbrdata'] . " \n(memberuid,site,auth,sosok,level,comp,admin,adm_view,\nemail,name,nic,grade,photo,home,sex,birth1,birth2,birthtype,tel1,tel2,zip,\naddr0,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,addfield)\nvalues\n('1','1','1','1','1','0','1','',\n'{$email}','{$name}','관리자','','','','0','0','0','0','','','',\n'','','','','0','0','1','1','0','0','0','0','0','1','킴스큐 설치시에 입력한 회원비밀번호는?','{$pw1}','1','" . $date['totime'] . "','" . $date['today'] . "','0','" . $date['totime'] . "','','','')";
db_query($QUE, $DB_CONNECT);
$sosokset = array('A그룹', 'B그룹', 'C그룹', 'D그룹', 'E그룹', 'F그룹', 'G그룹', 'H그룹');
Example #28
0
}
checkAdmin(0);
$str_month = '';
$str_today = '';
$B = getUidData($table[$m . 'list'], $bid);
sort($post_members);
reset($post_members);
foreach ($post_members as $val) {
    $R = getUidData($table[$m . 'data'], $val);
    if (!$R['uid']) {
        continue;
    }
    if ($R['bbs'] == $B['uid']) {
        continue;
    }
    $mingid = getDbCnt($table[$m . 'data'], 'min(gid)', '');
    $gid = $mingid ? $mingid - 1 : 100000000.0;
    $month = substr($R['d_regis'], 0, 6);
    $today = substr($R['d_regis'], 0, 8);
    //게시물이동
    getDbUpdate($table[$m . 'data'], 'gid=' . $gid . ',bbs=' . $B['uid'] . ",bbsid='" . $B['id'] . "'", 'uid=' . $R['uid']);
    getDbUpdate($table[$m . 'idx'], 'bbs=' . $B['uid'] . ',gid=' . $gid, 'gid=' . $R['gid']);
    getDbUpdate($table[$m . 'list'], "num_r=num_r-1", 'uid=' . $R['bbs']);
    getDbUpdate($table[$m . 'list'], "num_r=num_r+1", 'uid=' . $B['uid']);
    getDbUpdate($table[$m . 'month'], 'num=num-1', "date='" . $month . "' and site=" . $R['site'] . ' and bbs=' . $R['bbs']);
    getDbUpdate($table[$m . 'day'], 'num=num-1', "date='" . $today . "' and site=" . $R['site'] . ' and bbs=' . $R['bbs']);
    if (!strstr($str_month, '[' . $month . ']') && !getDbRows($table[$m . 'month'], "date='" . $month . "' and site=" . $R['site'] . ' and bbs=' . $B['uid'])) {
        getDbInsert($table[$m . 'month'], 'date,site,bbs,num', "'" . $month . "','" . $R['site'] . "','" . $B['uid'] . "','1'");
        $str_month .= '[' . $month . ']';
    } else {
        getDbUpdate($table[$m . 'month'], 'num=num+1', "date='" . $month . "' and site=" . $R['site'] . ' and bbs=' . $B['uid']);