From 4542507bc7b67c8a297ffee62d2aa890e446f05a Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 22 Apr 2013 09:30:18 +0900 Subject: [PATCH 1/6] =?UTF-8?q?get=5Flist=5Fthumbnail=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EC=97=90=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EC=88=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/thumbnail.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index e0bb85b79..0a6117f47 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -9,7 +9,7 @@ function it_img_thumb($filename, $filepath, $thumb_width, $thumb_height, $is_cre } // 게시글리스트 썸네일 생성 -function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true) +function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=true, $um_value='80/0.5/3') { global $g4, $config; $filename = $alt = ""; From 2e8e1bc41ccfc48f4187a67d0ea0e19ec4c46a1a Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 14:13:04 +0900 Subject: [PATCH 2/6] =?UTF-8?q?tail.sub.php=20=EC=9D=98=20=EB=A9=94?= =?UTF-8?q?=EB=89=B4=20=EC=9E=90=EB=B0=94=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EB=B3=84=EB=8F=84=EC=9D=98=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=A1=9C=20=EB=B6=84=EB=A6=AC=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/jquery.menu.js | 106 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 js/jquery.menu.js diff --git a/js/jquery.menu.js b/js/jquery.menu.js new file mode 100644 index 000000000..8eeea4201 --- /dev/null +++ b/js/jquery.menu.js @@ -0,0 +1,106 @@ +$(function(){ + var hide_menu = false; + var mouse_event = false; + var oldX = oldY = 0; + + $(document).mousemove(function(e) { + if(oldX == 0) { + oldX = e.pageX; + oldY = e.pageY; + } + + if(oldX != e.pageX || oldY != e.pageY) { + mouse_event = true; + } + }); + + // 주메뉴 + var $gnb = $(".gnb_1depth > a"); + $gnb.mouseover(function() { + if(mouse_event) { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + $(this).parent().addClass("gnb_1depth_over gnb_1depth_on"); + menu_rearrange($(this).parent()); + hide_menu = false; + } + }); + + $gnb.mouseout(function() { + hide_menu = true; + }); + + $(".gnb_1depth li").mouseover(function() { + hide_menu = false; + }); + + $(".gnb_1depth li").mouseout(function() { + hide_menu = true; + }); + + $gnb.focusin(function() { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + $(this).parent().addClass("gnb_1depth_over gnb_1depth_on"); + menu_rearrange($(this).parent()); + hide_menu = false; + }); + + $gnb.focusout(function() { + hide_menu = true; + }); + + $(".gnb_1depth ul a").focusin(function() { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + var $gnb_li = $(this).closest(".gnb_1depth").addClass("gnb_1depth_over gnb_1depth_on"); + menu_rearrange($(this).closest(".gnb_1depth")); + hide_menu = false; + }); + + $(".gnb_1depth ul a").focusout(function() { + hide_menu = true; + }); + + $('#gnb_ul>li').bind('mouseleave',function(){ + submenu_hide(); + }); + + $(document).bind('click focusin',function(){ + if(hide_menu) { + submenu_hide(); + } + }); + + function submenu_hide() { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + } + + // 텍스트 리사이즈 카운트 쿠키있으면 실행 + var resize_act; + var text_resize_count = parseInt(get_cookie("ck_font_resize_count")); + if(!isNaN(text_resize_count)) { + if(text_resize_count > 0) + resize_act = "increase"; + else if(text_resize_count < 0) + resize_act = "decrease"; + + if(Math.abs(text_resize_count) > 0) + font_resize2("container", resize_act, Math.abs(text_resize_count)); + } +}); + +function menu_rearrange(el) +{ + var width = $("#gnb_ul").width(); + var left = w1 = w2 = 0; + var idx = $(".gnb_1depth").index(el); + + for(i=0; i<=idx; i++) { + w1 = $(".gnb_1depth:eq("+i+")").outerWidth(); + w2 = $(".gnb_2depth > a:eq("+i+")").outerWidth(true); + + if((left + w2) > width) { + el.removeClass("gnb_1depth_over").addClass("gnb_1depth_over2"); + } + + left += w1; + } +} \ No newline at end of file From 113231ac78b3e388ce121ad6f469adbb9bf03272 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 14:13:47 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=EB=B2=84=ED=8D=BC=EC=9D=98=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=EC=97=90=EC=84=9C=20body=20=ED=83=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=A4=91=EA=B0=84=EC=9D=98=20=EC=99=B8=EB=B6=80=20css=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=84=20CAPTURE=20=ED=95=98=EC=97=AC=20he?= =?UTF-8?q?ad=20=ED=83=9C=EA=B7=B8=EB=A1=9C=20=EC=9D=B4=EB=8F=99=EC=8B=9C?= =?UTF-8?q?=EC=BC=9C=EC=A4=80=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 10 +- head.sub.php | 45 ++----- lib/common.lib.php | 40 +++++++ lib/connect.lib.php | 1 + lib/poll.lib.php | 2 + skin/board/basic/list.skin.php | 2 + skin/board/basic/view.skin.php | 2 + skin/board/basic/write.skin.php | 2 + skin/connect/basic/connect.skin.php | 2 + skin/connect/basic/current_connect.skin.php | 2 + skin/connect/basic/style.css | 0 skin/member/basic/register_form.skin.php | 1 + skin/new/basic/new.skin.php | 2 + skin/poll/basic/poll.skin.php | 2 + skin/poll/basic/poll_result.skin.php | 2 + skin/search/basic/search.skin.php | 2 + tail.sub.php | 125 +------------------- 17 files changed, 75 insertions(+), 167 deletions(-) create mode 100644 skin/connect/basic/style.css diff --git a/common.php b/common.php index f816f4ade..7cf534946 100644 --- a/common.php +++ b/common.php @@ -436,9 +436,7 @@ if (G4_IS_MOBILE) { $new_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/new/'.$config['cf_mobile_new_skin']; $search_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/search/'.$config['cf_mobile_search_skin']; $connect_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/connect/'.$config['cf_mobile_connect_skin']; - $poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/basic'; - if (isset($_GET['skin_dir'])) - $poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/'.$_GET['skin_dir']; + $connect_skin_url = G4_MOBILE_URL.'/'.G4_SKIN_DIR.'/connect/'.$config['cf_mobile_connect_skin']; } else { $board_skin_path = G4_SKIN_PATH.'/board/'.$board['bo_skin']; $board_skin_url = G4_SKIN_URL .'/board/'.$board['bo_skin']; @@ -447,9 +445,7 @@ if (G4_IS_MOBILE) { $new_skin_path = G4_SKIN_PATH.'/new/'.$config['cf_new_skin']; $search_skin_path = G4_SKIN_PATH.'/search/'.$config['cf_search_skin']; $connect_skin_path = G4_SKIN_PATH.'/connect/'.$config['cf_connect_skin']; - $poll_skin_path = G4_SKIN_PATH.'/poll/basic'; - if (isset($_GET['skin_dir'])) - $poll_skin_path = G4_SKIN_PATH.'/poll/'.$_GET['skin_dir']; + $connect_skin_url = G4_SKIN_URL.'/connect/'.$config['cf_connect_skin']; } //============================================================================== @@ -466,6 +462,8 @@ while ($entry = $tmp->read()) { include_once(G4_EXTEND_PATH.'/'.$entry); } +ob_start('ob_gzhandler'); + // 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면 // 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음 header('Content-Type: text/html; charset=utf-8'); diff --git a/head.sub.php b/head.sub.php index 5e9c583fa..b811ed25f 100644 --- a/head.sub.php +++ b/head.sub.php @@ -32,35 +32,19 @@ header("Pragma: no-cache"); // HTTP/1.0 -<?=$g4_head_title?> + + + + + +<?=$g4_head_title?> - -"> - -"> - - @@ -78,24 +62,9 @@ var g4_cookie_domain = ""; ?> + -
diff --git a/skin/new/basic/new.skin.php b/skin/new/basic/new.skin.php index 329536eef..ca0b635f4 100644 --- a/skin/new/basic/new.skin.php +++ b/skin/new/basic/new.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + +
상세검색 diff --git a/skin/poll/basic/poll.skin.php b/skin/poll/basic/poll.skin.php index 6ec6feeee..f5ee195e9 100644 --- a/skin/poll/basic/poll.skin.php +++ b/skin/poll/basic/poll.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + + diff --git a/skin/poll/basic/poll_result.skin.php b/skin/poll/basic/poll_result.skin.php index 6e864af37..f4e8010aa 100644 --- a/skin/poll/basic/poll_result.skin.php +++ b/skin/poll/basic/poll_result.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + +

diff --git a/skin/search/basic/search.skin.php b/skin/search/basic/search.skin.php index c2a7cc4e6..538976fec 100644 --- a/skin/search/basic/search.skin.php +++ b/skin/search/basic/search.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + +
diff --git a/tail.sub.php b/tail.sub.php index af5d419c8..5c95f9774 100644 --- a/tail.sub.php +++ b/tail.sub.php @@ -21,133 +21,12 @@ $(function() { 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] "); -} +// HTML 마지막 처리 함수 : 반드시 넣어주시기 바랍니다. +echo html_end(); ?> \ No newline at end of file From 809a8a6e9b77af4b379769cf1f820d13b8396665 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 14:28:00 +0900 Subject: [PATCH 4/6] =?UTF-8?q?link=20=EC=97=90=EC=84=9C=20=EC=99=B8?= =?UTF-8?q?=EB=B6=80=20css=20=ED=8C=8C=EC=9D=BC=EC=9D=B4=20=EA=B2=B9?= =?UTF-8?q?=EC=B9=98=EB=8A=94=20=EA=B2=BD=EC=9A=B0=EA=B0=80=20=EC=9E=88?= =?UTF-8?q?=EC=96=B4=20=EB=B2=84=ED=8D=BC=EB=A7=81=20=EC=86=8C=EC=8A=A4?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 7 ++++--- lib/latest.lib.php | 2 ++ skin/latest/basic/latest.skin.php | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index b1f75f4a0..056681f0a 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1961,9 +1961,10 @@ function html_end() preg_match('#(.*)#is', $buffer, $bodys); preg_match_all('/]+>/i', $bodys[0], $links); $stylesheet = ''; - for ($i=0; $i$link) { + //$link = PHP_EOL.$links[0][$i]; + $stylesheet .= PHP_EOL.$link; $buffer = preg_replace('#'.$link.'#', '', $buffer); } return preg_replace('#()#', "$1$stylesheet", $buffer); diff --git a/lib/latest.lib.php b/lib/latest.lib.php index a22cc4fbf..eb82e7d65 100644 --- a/lib/latest.lib.php +++ b/lib/latest.lib.php @@ -39,11 +39,13 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40) include_once($cache_file); + /* // 같은 스킨은 .css 를 한번만 호출한다. if (!in_array($skin_dir, $css) && is_file($latest_skin_path.'/style.css')) { echo ''; $css[] = $skin_dir; } + */ ob_start(); include $latest_skin_path.'/latest.skin.php'; diff --git a/skin/latest/basic/latest.skin.php b/skin/latest/basic/latest.skin.php index 51184902b..55e08d98d 100644 --- a/skin/latest/basic/latest.skin.php +++ b/skin/latest/basic/latest.skin.php @@ -2,6 +2,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> + +
    From bd2de184550586ef0b4130ada747813b71c9c463 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 22 Apr 2013 15:24:05 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=EC=8D=B8=EB=84=A4=EC=9D=BC=20=EC=9D=BC?= =?UTF-8?q?=EA=B4=84=EC=82=AD=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.menu100.php | 1 + adm/thumbnail_file_delete.php | 67 +++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 adm/thumbnail_file_delete.php diff --git a/adm/admin.menu100.php b/adm/admin.menu100.php index 985edef26..a50316266 100644 --- a/adm/admin.menu100.php +++ b/adm/admin.menu100.php @@ -7,6 +7,7 @@ $menu['menu100'] = array ( //array('100400', '버전정보', G4_ADMIN_URL.'/version.php', 'cf_version'), array('100800', '세션파일 일괄삭제',G4_ADMIN_URL.'/session_file_delete.php', 'cf_session', 1), array('100900', '캐쉬파일 일괄삭제',G4_ADMIN_URL.'/cache_file_delete.php', 'cf_cache', 1), + array('100920', '썸네일파일 일괄삭제',G4_ADMIN_URL.'/thumbnail_file_delete.php', 'cf_cache', 1), array('100500', 'phpinfo()', G4_ADMIN_URL.'/phpinfo.php', 'cf_phpinfo'), //array('100600', '업그레이드', G4_ADMIN_URL.'/upgrade.php', 'cf_upgrade'), //array('100700', '복구/최적화', G4_ADMIN_URL.'/repair.php', 'cf_repair'), diff --git a/adm/thumbnail_file_delete.php b/adm/thumbnail_file_delete.php new file mode 100644 index 000000000..585eddc46 --- /dev/null +++ b/adm/thumbnail_file_delete.php @@ -0,0 +1,67 @@ + + +
    +

    + 완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오. +

    + 썸네일디렉토리를 열지못했습니다.

    '; + } + + $cnt=0; + echo '
      '.PHP_EOL; + + foreach($directory as $dir) { + $files = glob($dir.'/thumb-*'); + if (is_array($files)) { + foreach($files as $thumbnail) { + $cnt++; + @unlink($thumbnail); + + echo '
    • '.$thumbnail.'
    • '.PHP_EOL; + + flush(); + + if ($cnt%10==0) + echo PHP_EOL; + } + } + } + + echo '
    • 완료됨
    '.PHP_EOL; + echo '

    썸네일 '.$cnt.'건의 삭제가 완료됐습니다.
    프로그램의 실행을 끝마치셔도 좋습니다.

    '.PHP_EOL; + ?> +
    + + \ No newline at end of file From 3d97d944bfba9676f02d2b6be63b1fddfb5cea3d Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 15:41:45 +0900 Subject: [PATCH 6/6] =?UTF-8?q?ob=5Fstart=20=EC=97=90=EC=84=9C=20ob=5Fgzha?= =?UTF-8?q?ndler=20=EC=84=A4=EC=A0=95=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index 7cf534946..5c91f4dc7 100644 --- a/common.php +++ b/common.php @@ -462,7 +462,7 @@ while ($entry = $tmp->read()) { include_once(G4_EXTEND_PATH.'/'.$entry); } -ob_start('ob_gzhandler'); +ob_start(); // 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면 // 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음