diff --git a/_common.php b/_common.php index 626acc9..48e1738 100644 --- a/_common.php +++ b/_common.php @@ -1,4 +1,2 @@ \ No newline at end of file +include_once '../../../common.php'; diff --git a/list.skin.php b/list.skin.php index c515653..94d9a19 100644 --- a/list.skin.php +++ b/list.skin.php @@ -1,132 +1,146 @@ - -', 0); ?> - - -', 0); -include_once(G5_LIB_PATH.'/thumbnail.lib.php'); - -$au_type=$board['bo_1']?$board['bo_1']:'오리지널'; -$slide_space=10; -$margin="5px"; -$slide_loop=($board['bo_3']) ? 'true':'false'; -if($board['bo_table_width']==0) $width="100%"; + +', 0); ?> + + +', 0); +include_once G5_LIB_PATH . '/thumbnail.lib.php'; -$cate=array(); -$lists=array(); -?> - -
- -
- -
- - - - - -0 && $h==count($cate)) continue; - $list_item=sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1 desc, wr_num"); - - for($k=0;$row=sql_fetch_array($list_item);$k++){ - $lists[$k]=get_list($row,$board,$board_skin_url); - } +$au_type = $board['bo_1'] ? $board['bo_1'] : '오리지널'; +$slide_space = 10; +$margin = "5px"; +$slide_loop = ($board['bo_3']) ? 'true' : 'false'; +if ($board['bo_table_width'] == 0) + $width = "100%"; + +$cate = array(); +$lists = array(); ?> -
-

- + for ($k = 0; $row = sql_fetch_array($list_item); $k++) { + $lists[$k] = get_list($row, $board, $board_skin_url); + } + ?> +
+ +

+
    + 0) { + for ($i = 0; $i < count($lists); $i++) { + if ($is_category) { + if (($board['bo_4'] == '1' && $lists[$i]['ca_name'] != $cate[$h]) || (!$board['bo_4'] && $sca && $lists[$i]['ca_name'] != $sca)) + continue; + } + + if ($lists[$i]['wr_file'] > 0) { + if ($lists[$i]['wr_8'] == 'wr_1' || $lists[$i]['wr_8'] == '') { + if ($lists[$i]['wr_width'] == '0') + $position = "center top"; + else + $position = "-" . $lists[$i]['wr_width'] . "px 0"; + $thumb_img = get_list_thumbnail($bo_table, $lists[$i]['wr_id'], 0, $board['bo_gallery_height'], true, true, 'custom', false, '', $lists[$i]['wr_height']); + if ($thumb_img['src']) + $thumb = $thumb_img['src']; + else + $thumb = ""; + } else { + $idx = $lists[$i]['wr_8']; + $thumb = $lists[$i][$idx]; + $position = "center"; + } + } else { + $thumb = ""; + } + ?> +
  • + + " + style="width:px;height:px;background-image:url();background-repeat:no-repeat;background-position:;background-size:cover;"> + + + + + + + + + + + +
  • +
+
+ + + + + + + +
- -
>
-
<
- - - -
- - 목록 - - 캐릭터 등록 - - - 순서 관리 - 관리자 -
- -
- - - + - - - + - - - + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..4255475 --- /dev/null +++ b/readme.md @@ -0,0 +1,21 @@ +## 게시판 캐릭터 정리 게시판 ver.2 스킨 + +작성자: 대하 (Extra Shot) +원본주소: https://extrashot.tistory.com/38 + +오류 수정 및 일부 코드에 최적화 작업을 진행했습니다. + +### 주요 수정 사항 +- short open tag 제거 + +모든 아보카도 버전에 호환됩니다. + +## 설치방법 + +아보카도가 설치된 폴더의 하위 폴더인 `skin/board/` 에 `es_character` (또는 `character_new`) +라는 폴더를 생성하고 파일을 업로드합니다. +> (폴더명은 기능과 무관하므로 어느 폴더명을 넣으셔도 상관 없습니다.) + +``` +php 최소 버전: 5.6 이상 (5.3부터 사용 가능) +``` diff --git a/set_order.php b/set_order.php index 638c85d..803b97c 100644 --- a/set_order.php +++ b/set_order.php @@ -1,57 +1,61 @@ -', 0); +', 0); if (!$is_admin) - alert('관리자만 접근 가능합니다.'); -if($is_admin){ -?> -
- - -
- -
- -목록으로 -
-
- \ No newline at end of file + alert('관리자만 접근 가능합니다.'); +if ($is_admin) { + ?> +
+ + +
+ +
+ + 목록으로 +
+
+ diff --git a/set_order_update.php b/set_order_update.php index a6bcec2..77b84f1 100644 --- a/set_order_update.php +++ b/set_order_update.php @@ -1,17 +1,17 @@ - + +goto_url('./set_order.php?bo_table=' . $bo_table . '&write_table=' . $write_table); diff --git a/upload_file.php b/upload_file.php index 265d80f..80f63f6 100644 --- a/upload_file.php +++ b/upload_file.php @@ -1,46 +1,51 @@ 16) - alert("업로드 불가능한 확장자입니다.","./board.php?bo_table=".$bo_table); //@200927 - }else{ - $files['img']=$timg; - $files['source']=$filename; - $files['size']=$filesize; + $files = array(); + $tmp_file = $_FILES[$name]['tmp_name']; + $filesize = $_FILES[$name]['size']; + $filename = $_FILES[$name]['name']; + $filename = get_safe_filename($filename); - // 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함 - $filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename); + $timg = @getimagesize($tmp_file); + // image type + if ( + preg_match("/\.({$config['cf_image_extension']})$/i", $filename) || + preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) + ) { + if ($timg['2'] < 1 || $timg['2'] > 16) + alert("업로드 불가능한 확장자입니다.", "./board.php?bo_table=" . $bo_table); //@200927 + } else { + $files['img'] = $timg; + $files['source'] = $filename; + $files['size'] = $filesize; - $chars_array = array_merge(range(0,9), range('a','z'), range('A','Z')); - shuffle($chars_array); - $shuffle = implode('', $chars_array); + // 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함 + $filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename); - // 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925) - $file_name = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.replace_filename($filename); + $chars_array = array_merge(range(0, 9), range('a', 'z'), range('A', 'Z')); + shuffle($chars_array); + $shuffle = implode('', $chars_array); - $dest_file = G5_DATA_PATH.'/file/'.$table.'/'.$file_name; + // 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925) + $file_name = abs(ip2long($_SERVER['REMOTE_ADDR'])) . '_' . substr($shuffle, 0, 8) . '_' . replace_filename($filename); + + $dest_file = G5_DATA_PATH . '/file/' . $table . '/' . $file_name; @move_uploaded_file($tmp_file, $dest_file); - @chmod($dest_file, G5_FILE_PERMISSION); - - $files['link']=G5_DATA_URL.'/file/'.$table.'/'.$file_name; - $files['name']=$file_name; - if (!get_magic_quotes_gpc()) { - $files['source'] = addslashes($files['source']); + @chmod($dest_file, G5_FILE_PERMISSION); + + $files['link'] = G5_DATA_URL . '/file/' . $table . '/' . $file_name; + $files['name'] = $file_name; + if (!get_magic_quotes_gpc()) { + $files['source'] = addslashes($files['source']); } - return $files; - } + return $files; + } } -?> diff --git a/view.skin.php b/view.skin.php index bb5550a..a123545 100644 --- a/view.skin.php +++ b/view.skin.php @@ -1,151 +1,163 @@ -', 0); - -if($board['bo_table_width']==0) $width="100%"; -$parent_type=$board['bo_1']?$board['bo_1']:'오리지널'; +add_stylesheet('', 0); + +if ($board['bo_table_width'] == 0) + $width = "100%"; +$parent_type = $board['bo_1'] ? $board['bo_1'] : '오리지널'; // 동일캐릭터 wr_9 묶음, au명은 wr_type 사용, 캐릭터명은 wr_subject 사용. -$allow_body=450; -$content_width=400; -if($board['bo_5']) $conts=explode("|",$board['bo_5']); -if($conts[0]) $allow_body=trim($conts[0]); -if($conts[1]) $content_width=trim($conts[1]); +$allow_body = 450; +$content_width = 400; +if ($board['bo_5']) + $conts = explode("|", $board['bo_5']); +if ($conts[0]) + $allow_body = trim($conts[0]); +if ($conts[1]) + $content_width = trim($conts[1]); -$rel=sql_fetch("select wr_id from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1"); -$relate=sql_query("select wr_id, wr_type from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1, wr_reply"); -$or_link = './board.php?bo_table='.$bo_table.'&wr_id='.$view['wr_9'].$qstr; // @211117 -$parent=sql_fetch("select wr_id, wr_type, wr_7 from {$write_table} where wr_id='{$view['wr_9']}' and wr_is_comment=0"); -$cl_no=sql_query("select * from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content='옷장' order by wr_10*1 "); -$cl=array(); -$idx=0; -for($i=0;$clo=sql_fetch_array($cl_no);$i++){ - $cl[$idx]=$clo; - $idx++; -}?> +$rel = sql_fetch("select wr_id from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1"); +$relate = sql_query("select wr_id, wr_type from {$write_table} where wr_9='{$view['wr_9']}' and wr_id!={$view['wr_9']} order by wr_10*1, wr_reply"); +$or_link = './board.php?bo_table=' . $bo_table . '&wr_id=' . $view['wr_9'] . $qstr; // @211117 +$parent = sql_fetch("select wr_id, wr_type, wr_7 from {$write_table} where wr_id='{$view['wr_9']}' and wr_is_comment=0"); +$cl_no = sql_query("select * from {$write_table} where wr_is_comment=1 and wr_parent='{$wr_id}' and wr_content='옷장' order by wr_10*1 "); +$cl = array(); +$idx = 0; +for ($i = 0; $clo = sql_fetch_array($cl_no); $i++) { + $cl[$idx] = $clo; + $idx++; +} ?>
-
- -
- - - - -0){?> -AU/옷장 - -
-
-
- -
- - + - \ No newline at end of file + diff --git a/view_comment.skin.php b/view_comment.skin.php index bc1804a..da869d7 100644 --- a/view_comment.skin.php +++ b/view_comment.skin.php @@ -1,373 +1,342 @@ - -
- -=$board['bo_comment_level']){ -?> -
-0){?> -로그 - -
-
-
- 0){ - $co_list=array(); - for($k=0;$k'.$co_list[$k][0].''; - echo $c_link; - } - } - ?> -
- -
- - m - d - -
- -
- - -
- - " id="secret_comment_"> - - - - - - -
- - +
+ + = $board['bo_comment_level']) { + ?> +
+ 0) { ?> + 로그 + -0){?> - 옷장 - - -
-
-
- - + $cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결 + ?> +
+
+
+ 0) { + $co_list = array(); + for ($k = 0; $k < count($co_links); $k++) { + $co_list[$k] = explode('|', $co_links[$k]); + $c_link = '' . $co_list[$k][0] . ''; + echo $c_link; + } + } + ?> +
+
+ + if ($w == 'cu') { + $sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' "; + $cmt = sql_fetch($sql); + if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id']))) + $cmt['wr_content'] = ''; + $c_wr_content = $cmt['wr_content']; + } -
- + m + d + +
+
+ +
+ " + id="secret_comment_"> + + + + +
+ +
+ 0) { ?> + 옷장 + + +
+
+
+ + +
+
+ - m - d - -
- -
- - -
- - " id="secret_comment_"> - - - - - -
- -

▶ 로그 링크 추가

-

▶ 의상 추가

- + +
+
-=$board['bo_comment_level']){?> - \ No newline at end of file + save_before = el_id; + } + if (type == 'clo') { + $('#' + el_id + ' #wr_content').hide(); + $('#' + el_id + ' #bf_content, #' + el_id + ' #bf_file, #' + el_id + ' #wr_10').show(); + if (work == 'c') { + $('#' + el_id + ' #wr_content').text('옷장'); + } + } + if (type == 'link') { + if (work == 'c') { + $('#' + el_id + ' #wr_content').text(''); + } + $('#' + el_id + ' #bf_content, #' + el_id + ' #bf_file, #' + el_id + ' #wr_10').hide(); + $('#' + el_id + ' #wr_content').show(); + } + } + + function comment_delete() { + return confirm("이 댓글을 삭제하시겠습니까?"); + } + // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님) + + + // sns 등록 + $(function () { + $("#bo_vc_send_sns").load( + "/view_comment_write.sns.skin.php?bo_table=", + function () { + save_html = document.getElementById('bo_vc_w').innerHTML; + } + ); + }); + + diff --git a/write.skin.php b/write.skin.php index d07b695..d6bb476 100644 --- a/write.skin.php +++ b/write.skin.php @@ -1,297 +1,312 @@ ', 0); +add_stylesheet('', 0); -$c_name=$board['bo_1'] ? $board['bo_1'] : '오리지널'; +$c_name = $board['bo_1'] ? $board['bo_1'] : '오리지널'; -if($w=='' || $w=='r'){ - $write['wr_width']=0; - $write['wr_height']=0; - $wr_type=''; -} -else $wr_type=$write['wr_type']; +if ($w == '' || $w == 'r') { + $write['wr_width'] = 0; + $write['wr_height'] = 0; + $wr_type = ''; +} else + $wr_type = $write['wr_type']; $category_option = ""; -if($is_category && $board['bo_category_list']){ +if ($is_category && $board['bo_category_list']) { + $categories = explode("|", $board['bo_category_list']); // 구분자가 | 로 되어 있음 + for ($i = 0; $i < count($categories); $i++) { + $category = trim($categories[$i]); + if (!$category) + continue; - $categories = explode("|", $board['bo_category_list']); // 구분자가 | 로 되어 있음 - for ($i=0; $i - -
- -
- - - - - - - - - - - - - '."\n".''; - } + + + + + + + + + + + + + + + '."\n".''; + } - if ($is_html) { - if ($is_dhtml_editor) { - $option_hidden .= ''; - } else { - $option .= "\n".''."\n".''; - } - } + if ($is_html) { + if ($is_dhtml_editor) { + $option_hidden .= ''; + } else { + $option .= "\n" . '' . "\n" . ''; + } + } - if ($is_secret) { - if ($is_admin || $is_secret==1) { - $option .= "\n".''."\n".''; - } else { - $option_hidden .= ''; - } - } + if ($is_secret) { + if ($is_admin || $is_secret == 1) { + $option .= "\n" . '' . "\n" . ''; + } else { + $option_hidden .= ''; + } + } - if ($is_mail) { - $option .= "\n".''."\n".''; - } - } + if ($is_mail) { + $option .= "\n" . '' . "\n" . ''; + } + } - echo $option_hidden; - ?> + echo $option_hidden; + ?> -
- -
-
옵션
-
-
- - - -
-
카테고리
-
-
-
- -
-
이미지
-
-
-
전신 - - "> - - 전신 확인 - - -
style="display:none;">크롭 지점 - X (왼쪽에서부터) px / - Y (위에서부터) px

- -
-
- 1){?>
두상 - - "> - - 두상 확인 - - - -
- - - -
-
-
-
-
캐릭터명
-
- - -
-
- - -
-
구분
-
- " > - > 프로필 AU 목록에 ''로 표기 - -
-
-
-
-
설정 및 내용
-
- - - -

이 게시판은 최소 글자 이상, 최대 글자 이하까지 글을 쓰실 수 있습니다.

- - - - -
글자
- -
-
-
-
-
순서
-
- " > - -
-
-
-
+
+ +
+
옵션
+
+
-
-
- - 취소 -
- + + +
+
카테고리
+
+
+
+ +
+
이미지
+
+
+
전신 + + "> + + 전신 확인 + + +
style="display:none;" >크롭 지점 + X (왼쪽에서부터) + px / + Y (위에서부터) + px

+ +
+
+ 1) { ?> +
두상 + + "> + + 두상 확인 + + + +
+ + + +
+
+
+
+
캐릭터명
+
+
+ + +
+
+
+ + +
+
구분
+
+
+ " > + > 프로필 AU 목록에 + ''로 표기 + +
+
+
+
+
설정 및 내용
+
+
+ + + +

이 게시판은 최소 글자 이상, 최대 + 글자 이하까지 글을 쓰실 수 있습니다.

+ + + + +
글자
+ +
+
+
+
+
순서
+
+
+ "> + +
+
+
+
- + if (content) { + alert("내용에 금지단어('" + content + "')가 포함되어있습니다"); + if (typeof (ed_wr_content) != "undefined") + ed_wr_content.returnFalse(); + else + f.wr_content.focus(); + return false; + } + + if (document.getElementById("char_count")) { + if (char_min > 0 || char_max > 0) { + var cnt = parseInt(check_byte("wr_content", "char_count")); + if (char_min > 0 && char_min > cnt) { + alert("내용은 " + char_min + "글자 이상 쓰셔야 합니다."); + return false; + } + else if (char_max > 0 && char_max < cnt) { + alert("내용은 " + char_max + "글자 이하로 쓰셔야 합니다."); + return false; + } + } + } + document.getElementById("btn_submit").disabled = "disabled"; + + return true; + } + $(".wr_8").on("change", function () { + if ($(this).val() == 'wr_1') { + $("#crop").css("display", "block"); + } else { + $("#crop").css("display", "none"); + } + }); +
- \ No newline at end of file + diff --git a/write_comment_update.skin.php b/write_comment_update.skin.php index e5c99ca..962c8e1 100644 --- a/write_comment_update.skin.php +++ b/write_comment_update.skin.php @@ -1,44 +1,48 @@ diff --git a/write_update.skin.php b/write_update.skin.php index 2e2b651..71cbee6 100644 --- a/write_update.skin.php +++ b/write_update.skin.php @@ -1,37 +1,42 @@ + if ($bf_file_del[$i] == 'wr_1') + $common_line = "and bf_no='0'"; + if ($bf_file_del[$i] == 'wr_2') + $common_line = "and bf_no='1'"; + if ($bf_file_del[$i] == 'wr_3') + $common_line = "and bf_no='2'"; + sql_query("delete from {$g5['board_file_table']} where wr_id='{$wr_id}' and bo_table='{$bo_table}' {$common_line}"); + } +} + +for ($i = 0; $i < $board['bo_upload_count']; $i++) { + if ($_FILES['bf_file']['name'][$i]) { + $uimg = sql_fetch("SELECT bf_file FROM {$g5['board_file_table']} WHERE bo_table='{$bo_table}' AND wr_id='{$wr_id}' AND bf_no='{$i}'"); + $ulink = G5_DATA_URL . '/file/' . $bo_table . '/' . $uimg['bf_file']; + $uid = $i + 1; + $customer_sql .= ", wr_{$uid}='{$ulink}'"; + if ($i == '0') { + sql_query("UPDATE {$g5['board_file_table']} SET bf_content='기본전신' WHERE wr_id='{$wr_id}' AND bf_no='0'"); + } + } +} + +sql_query("UPDATE {$write_table} + SET wr_id = '{$wr_id}' + {$customer_sql} + WHERE wr_id = '{$wr_id}' ");