From 06f2c72d846c9673949bba8ce3a611eadd5bb8b4 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Tue, 19 Feb 2013 13:03:56 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=EA=B8=80,=EB=8C=93=EA=B8=80=20=EC=93=B0?= =?UTF-8?q?=EA=B8=B0=EC=8B=9C=20=EC=BA=90=EC=8B=9C=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/board_list_update.php | 20 ++++++++++---------- bbs/delete_all.php | 4 +++- bbs/write_comment_update.php | 2 ++ bbs/write_update.php | 5 +++-- index.php | 3 +-- lib/common.lib.php | 9 +++++++++ 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/bbs/board_list_update.php b/bbs/board_list_update.php index 8302c1bd3..a43924024 100644 --- a/bbs/board_list_update.php +++ b/bbs/board_list_update.php @@ -4,18 +4,18 @@ include_once('./_common.php'); $count = count($_POST['chk_wr_id']); if(!$count) { - alert($_POST['btn_submit']." 하실 항목을 하나 이상 선택하세요."); + alert($_POST['btn_submit'].' 하실 항목을 하나 이상 선택하세요.'); } -if($_POST['btn_submit'] == "선택삭제") { - include "./delete_all.php"; -} else if($_POST['btn_submit'] == "선택복사") { - $sw = "copy"; - include "./move.php"; -} else if($_POST['btn_submit'] == "선택이동") { - $sw = "move"; - include "./move.php"; +if($_POST['btn_submit'] == '선택삭제') { + include './delete_all.php'; +} else if($_POST['btn_submit'] == '선택복사') { + $sw = 'copy'; + include './move.php'; +} else if($_POST['btn_submit'] == '선택이동') { + $sw = 'move'; + include './move.php'; } else { - alert("올바른 방법으로 이용해 주세요."); + alert('올바른 방법으로 이용해 주세요.'); } ?> \ No newline at end of file diff --git a/bbs/delete_all.php b/bbs/delete_all.php index 90b5e7098..06ae7bfbf 100644 --- a/bbs/delete_all.php +++ b/bbs/delete_all.php @@ -92,7 +92,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--) $result2 = sql_query($sql2); while ($row2 = sql_fetch_array($result2)) // 파일삭제 - @unlink(G4_PATH.'/data/file/'.$bo_table.'/'.$row2['bf_file']); + @unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']); // 파일테이블 행 삭제 sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "); @@ -136,5 +136,7 @@ if ($count_write > 0 || $count_comment > 0) // 4.11 @include_once($board_skin_path.'/delete_all.tail.skin.php'); +delete_cache_latest($bo_table); + goto_url('./board.php?bo_table='.$bo_table.'&page='.$page.$qstr); ?> diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index 56dc4f825..364ccfefc 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -312,5 +312,7 @@ else if ($w == 'cu') // 코멘트 수정 @include_once($board_skin_path.'/write_comment_update.skin.php'); @include_once($board_skin_path.'/write_comment_update.tail.skin.php'); +delete_cache_latest($bo_table); + goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&page='.$page.$qstr.'&#c_'.$comment_id); ?> diff --git a/bbs/write_update.php b/bbs/write_update.php index a27d4c09c..19b948ae7 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -602,10 +602,11 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai } // 사용자 코드 실행 -@include_once ($board_skin_path.'/write_update.skin.php'); - +@include_once($board_skin_path.'/write_update.skin.php'); @include_once($board_skin_path.'/write_update.tail.skin.php'); +delete_cache_latest($bo_table); + if ($file_upload_msg) alert($file_upload_msg, G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr); else diff --git a/index.php b/index.php index ed59f5b89..3f6b26af3 100644 --- a/index.php +++ b/index.php @@ -7,7 +7,6 @@ include_once('./_head.php'); diff --git a/lib/common.lib.php b/lib/common.lib.php index e90251f70..4567117e2 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1732,4 +1732,13 @@ function check_device($device) alert('모바일 전용 게시판입니다.', G4_URL); } } + + +// 게시판 최신글 캐시 파일 삭제 +function delete_cache_latest($bo_table) +{ + foreach (glob(G4_DATA_PATH.'/cache/latest-'.$bo_table.'-*') as $filename) { + unlink($filename); + } +} ?> \ No newline at end of file From a48779d6d6d50367e28cb91b540e9a760b280b26 Mon Sep 17 00:00:00 2001 From: whitedot Date: Tue, 19 Feb 2013 14:11:41 +0900 Subject: [PATCH 2/9] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90:=20=EB=A6=AC?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=207,=20=EA=B2=8C=EC=8B=9C=ED=8C=90?= =?UTF-8?q?=EC=8A=A4=ED=82=A8=20=EC=B5=9C=EC=8B=A0=EA=B8=80=EC=8A=A4?= =?UTF-8?q?=ED=82=A8=20=EC=95=84=EC=9D=B4=EC=BD=98=20=EB=B0=8F=20=EC=83=81?= =?UTF-8?q?=EB=8B=A8=20=EA=B2=80=EC=83=89=EC=B0=BD=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/default.css | 12 ++++++------ head.php | 2 +- img/btn_search.gif | Bin 249 -> 0 bytes img/btn_search.jpg | Bin 0 -> 925 bytes skin/board/basic/img/icon_file.gif | Bin 154 -> 107 bytes skin/board/basic/img/icon_hot.gif | Bin 102 -> 97 bytes skin/board/basic/img/icon_img.gif | Bin 114 -> 145 bytes skin/board/basic/img/icon_link.gif | Bin 215 -> 104 bytes skin/board/basic/img/icon_new.gif | Bin 71 -> 71 bytes skin/board/basic/img/icon_reply.gif | Bin 80 -> 77 bytes skin/board/basic/img/icon_secret.gif | Bin 80 -> 97 bytes skin/latest/basic/img/icon_file.gif | Bin 154 -> 107 bytes skin/latest/basic/img/icon_hot.gif | Bin 102 -> 97 bytes skin/latest/basic/img/icon_img.gif | Bin 114 -> 145 bytes skin/latest/basic/img/icon_link.gif | Bin 215 -> 104 bytes skin/latest/basic/img/icon_new.gif | Bin 71 -> 71 bytes skin/latest/basic/img/icon_reply.gif | Bin 80 -> 77 bytes skin/latest/basic/img/icon_secret.gif | Bin 80 -> 97 bytes 18 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 img/btn_search.gif create mode 100644 img/btn_search.jpg diff --git a/css/default.css b/css/default.css index be4eed953..a2d5bb13a 100644 --- a/css/default.css +++ b/css/default.css @@ -32,17 +32,17 @@ a:active {color:#000;text-decoration:underline} #captcha_wav img {border:1px solid #cfded8;border-left:0;background:#494949} /* 상단 레이아웃 */ -#hd {border-top:5px solid #415353;border-bottom:1px solid #e7f1ed;background:#fff} +#hd {border-top:3px solid #415353;border-bottom:1px solid #e7f1ed;background:#fff} #hd h1 {width:0;height:0;overflow:hidden} #hd_wrapper {position:relative;margin:0 auto;width:980px} -#logo {padding:17px} +#logo {padding:17px 0 17px 0} #logo span {display:inline-block;margin-left:10px;color:#109ff1;font-family:"verdana";vertical-align:middle} -#schall {position:absolute;top:20px;left:90px;margin:0;padding:0;letter-spacing:-5px} +#schall {position:absolute;top:22px;left:70px;margin:0;padding:0;letter-spacing:-5px} #schall legend {width:0;height:0;overflow:hidden} -#schall_stx {padding-left:5px;width:156px;height:27px;border:1px solid #ccc;border-right:0;background:#fff;line-height:2em !important;line-height:2em} -#schall_submit {border:1px solid #ccc;border-left:0} +#schall_stx {padding-left:5px;width:156px;height:24px;border:1px solid #445052;border-right:0;background:#4e5d60;color:#fff;line-height:1.9em !important;line-height:1.6em} +#schall_submit {border:1px solid #333;border-left:0} #snb {position:absolute;top:18px;right:0;zoom:1} #snb:after {display:block;visibility:hidden;clear:both;content:""} @@ -94,7 +94,7 @@ a:active {color:#000;text-decoration:underline} /* 콘텐츠별 스타일 */ /* 버튼 */ -.btn01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} +.btn01 {display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fff !important;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} .btn01:focus, .btn01:hover {text-decoration:none !important} .btn02 {display:inline-block;padding:0 10px;height:23px;border:1px solid #383b3f !important;background:#444 !important;color:#fff !important;text-decoration:none !important;line-height:2.15em;vertical-align:middle} diff --git a/head.php b/head.php index 7f1592372..bb5784b6e 100644 --- a/head.php +++ b/head.php @@ -28,7 +28,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
- +
diff --git a/adm/admin.lib.php b/adm/admin.lib.php index d4bb2cb81..f52a0b4cb 100644 --- a/adm/admin.lib.php +++ b/adm/admin.lib.php @@ -125,23 +125,6 @@ function auth_check($auth, $attr) } -// 텍스트에리어 늘리기, 줄이기 -// 보류 : 지운아빠 2012-11-07 -function textarea_size($fld) -{ - /* - global $g4; - - $size = 10; - $s = "
"; - $s .= " "; - $s .= ""; - $s .= "
"; - return $s; - */ -} - - // 작업아이콘 출력 function icon($act, $link='', $target='_parent') { @@ -150,7 +133,6 @@ function icon($act, $link='', $target='_parent') $img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy'); $icon = ''; if ($link) - //$s = ''.$icon.''; $s = ''.$icon.''; else $s = $icon; @@ -237,7 +219,7 @@ if (get_session('ss_mb_key') !== $admin_key) { session_destroy(); - include_once($g4['path'].'/lib/mailer.lib.php'); + include_once(G4_LIB_PATH.'/mailer.lib.php'); // 메일 알림 mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n'.G4_URL, 0); diff --git a/adm/board_delete.inc.php b/adm/board_delete.inc.php index f61482d56..123fe00f3 100644 --- a/adm/board_delete.inc.php +++ b/adm/board_delete.inc.php @@ -2,7 +2,7 @@ // board_delete.php , boardgroup_delete.php 에서 include 하는 파일 if (!defined('_GNUBOARD_')) exit; -if (!defined("_BOARD_DELETE_")) exit; // 개별 페이지 접근 불가 +if (!defined('_BOARD_DELETE_')) exit; // 개별 페이지 접근 불가 // $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함 if (!$tmp_bo_table) { return; } @@ -27,5 +27,5 @@ sql_query(" delete from {$g4['board_file_table']} where bo_table = '{$tmp_bo_tab sql_query(" drop table {$g4['write_prefix']}{$tmp_bo_table} ", FALSE); // 게시판 폴더 전체 삭제 -rm_rf($g4['path'].'/data/file/'.$tmp_bo_table); +rm_rf(G4_DATA_PATH.'/file/'.$tmp_bo_table); ?> \ No newline at end of file diff --git a/adm/board_form_update.php b/adm/board_form_update.php index 1865ee021..83e9c58af 100644 --- a/adm/board_form_update.php +++ b/adm/board_form_update.php @@ -33,7 +33,7 @@ if ($file = $_POST['bo_include_tail']) { } } -$board_path = $g4['path'].'/data/file/'.$bo_table; +$board_path = G4_DATA_PATH.'/file/'.$bo_table; // 게시판 디렉토리 생성 @mkdir($board_path, 0707); diff --git a/adm/index.php b/adm/index.php index 64fc26463..94be0f31d 100644 --- a/adm/index.php +++ b/adm/index.php @@ -216,7 +216,7 @@ $colspan = 5; diff --git a/adm/member_form.php b/adm/member_form.php index 7367694bd..dc40f7e9d 100644 --- a/adm/member_form.php +++ b/adm/member_form.php @@ -154,7 +154,7 @@ include_once('./admin.head.php'); '; echo '삭제'; diff --git a/adm/member_form_update.php b/adm/member_form_update.php index 3e4c3caf7..761bab04f 100644 --- a/adm/member_form_update.php +++ b/adm/member_form_update.php @@ -77,7 +77,7 @@ else if ($w == 'u') // 회원 아이콘 삭제 if ($del_mb_icon) - @unlink($g4['path'].'/data/member/'.$mb_dir.'/'.$mb_id.'.gif'); + @unlink(G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif'); // 아이콘 업로드 if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) { @@ -86,10 +86,10 @@ else if ($w == 'u') } if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) { - @mkdir($g4['path'].'/data/member/'.$mb_dir, 0707); - @chmod($g4['path'].'/data/member/'.$mb_dir, 0707); + @mkdir(G4_DATA_PATH.'/member/'.$mb_dir, 0707); + @chmod(G4_DATA_PATH.'/member/'.$mb_dir, 0707); - $dest_path = $g4['path'].'/data/member/'.$mb_dir.'/'.$mb_id.'.gif'; + $dest_path = G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif'; move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path); chmod($dest_path, 0606); diff --git a/skin/member/basic/ajax_mb_email_check.php b/bbs/ajax.mb_email.php similarity index 89% rename from skin/member/basic/ajax_mb_email_check.php rename to bbs/ajax.mb_email.php index 3c736a24f..a6a884e7d 100644 --- a/skin/member/basic/ajax_mb_email_check.php +++ b/bbs/ajax.mb_email.php @@ -1,5 +1,5 @@ '; + echo ''; } // 게시판 관리의 상단 내용 diff --git a/bbs/board_tail.php b/bbs/board_tail.php index 1893a05d2..7cad781db 100644 --- a/bbs/board_tail.php +++ b/bbs/board_tail.php @@ -8,7 +8,7 @@ if ($board['bo_content_tail']) { // 게시판 관리의 하단 이미지 경로 if ($board['bo_image_tail']) { - echo ''; + echo ''; } // 게시판 관리의 하단 파일 경로 diff --git a/bbs/delete.php b/bbs/delete.php index b2bc87e1a..f5fb6c675 100644 --- a/bbs/delete.php +++ b/bbs/delete.php @@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result)) $sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "; $result2 = sql_query($sql2); while ($row2 = sql_fetch_array($result2)) - @unlink(G4_PATH.'/data/file/'.$bo_table.'/'.$row2['bf_file']); + @unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']); // 파일테이블 행 삭제 sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "); diff --git a/bbs/download.php b/bbs/download.php index 5ad5508cd..af595365a 100644 --- a/bbs/download.php +++ b/bbs/download.php @@ -34,7 +34,7 @@ if ($member['mb_level'] < $board['bo_download_level']) { alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode($g4['bbs_path'].'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id)); } -$filepath = G4_PATH.'/data/file/'.$bo_table.'/'.$file['bf_file']; +$filepath = G4_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file']; $filepath = addslashes($filepath); if (!is_file($filepath) || !file_exists($filepath)) alert('파일이 존재하지 않습니다.'); diff --git a/bbs/gcaptcha/_common.php b/bbs/gcaptcha/_common.php index d82224eec..49adf4677 100644 --- a/bbs/gcaptcha/_common.php +++ b/bbs/gcaptcha/_common.php @@ -1,4 +1,3 @@ \ No newline at end of file diff --git a/bbs/group.php b/bbs/group.php index 69b695360..ec3684040 100644 --- a/bbs/group.php +++ b/bbs/group.php @@ -1,8 +1,6 @@ var g4_cf_filter = '$config['cf_filter']'; \n"; -//echo "\n"; - if (!$member['mb_id']) // 비회원일 경우에만 echo ''.PHP_EOL; diff --git a/bbs/write.php b/bbs/write.php index 2ebff2f83..f00d187f9 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -16,7 +16,7 @@ if (!$bo_table) { check_device($board['bo_device']); -@include_once (G4_PATH.'/skin/board/write.head.skin.php'); +@include_once (G4_SKIN_PATH.'/board/write.head.skin.php'); @include_once ($board_skin_path.'/write.head.skin.php'); $notice_array = explode(',', trim($board['bo_notice'])); diff --git a/bbs/write_comment_update.php b/bbs/write_comment_update.php index 364ccfefc..04bd919c1 100644 --- a/bbs/write_comment_update.php +++ b/bbs/write_comment_update.php @@ -194,7 +194,7 @@ if ($w == 'c') // 코멘트 입력 // 4.00.15 - 메일로 보내는 코멘트의 바로가기 링크 수정 $link_url = G4_BBS_URL."/board.php?bo_table=".$bo_table."&wr_id=".$wr_id."&".$qstr."#c_".$comment_id; - include_once(G4_PATH.'/lib/mailer.lib.php'); + include_once(G4_LIB_PATH.'/mailer.lib.php'); ob_start(); include_once ('./write_update_mail.php'); diff --git a/bbs/write_update.php b/bbs/write_update.php index 19b948ae7..215c6f3e0 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -562,7 +562,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai $subject = '"'.$board['bo_subject'].'" 게시판에 '.$str.'글이 올라왔습니다.'; $link_url = G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&'.$qstr; - include_once(G4_PATH.'/lib/mailer.lib.php'); + include_once(G4_LIB_PATH.'/mailer.lib.php'); ob_start(); include_once ('./write_update_mail.php'); diff --git a/common.php b/common.php index c58ca60cc..b59339ed7 100644 --- a/common.php +++ b/common.php @@ -172,7 +172,7 @@ else if (is_mobile()) $_SESSION['ss_is_mobile'] = $is_mobile; define('G4_IS_MOBILE', $is_mobile); if (G4_IS_MOBILE) { - include_once(G4_PATH.'/lib/mobile.lib.php'); // 모바일 전용 라이브러리 + include_once(G4_LIB_PATH.'/mobile.lib.php'); // 모바일 전용 라이브러리 $g4['mobile_path'] = G4_PATH.'/'.$g4['mobile_dir']; } //============================================================================== diff --git a/head.php b/head.php index 7f1592372..9b3c611f7 100644 --- a/head.php +++ b/head.php @@ -63,13 +63,13 @@ include_once(G4_LIB_PATH.'/popular.lib.php');