diff --git a/bbs/qaview.php b/bbs/qaview.php index e415aa272..124297859 100644 --- a/bbs/qaview.php +++ b/bbs/qaview.php @@ -135,6 +135,32 @@ if(is_file($skin_file)) { $answer_update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$answer['qa_id'].$qstr; $answer_delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$answer['qa_id'].'&token='.$token.$qstr; } + + $ss_name = 'ss_qa_view_'.$answer['qa_id']; + if(!get_session($ss_name)) + set_session($ss_name, TRUE); + + // 답변 첨부파일 + $answer['img_file'] = array(); + $answer['download_href'] = array(); + $answer['download_source'] = array(); + $answer['img_count'] = 0; + $answer['download_count'] = 0; + + for ($i=1; $i<=2; $i++) { + if(preg_match("/\.({$config['cf_image_extension']})$/i", $answer['qa_file'.$i])) { + $attr_href = run_replace('thumb_view_image_href', G5_BBS_URL.'/view_image.php?fn='.urlencode('/'.G5_DATA_DIR.'/qa/'.$answer['qa_file'.$i]), '/'.G5_DATA_DIR.'/qa/'.$answer['qa_file'.$i], '', '', '', ''); + $answer['img_file'][] = ''; + $answer['img_count']++; + continue; + } + + if ($answer['qa_file'.$i]) { + $answer['download_href'][] = G5_BBS_URL.'/qadownload.php?qa_id='.$answer['qa_id'].'&no='.$i; + $answer['download_source'][] = $answer['qa_source'.$i]; + $answer['download_count']++; + } + } } $stx = get_text(stripslashes($stx)); diff --git a/mobile/skin/qa/basic/style.css b/mobile/skin/qa/basic/style.css index 4b0f4eebb..46b098733 100644 --- a/mobile/skin/qa/basic/style.css +++ b/mobile/skin/qa/basic/style.css @@ -149,9 +149,9 @@ #bo_w .bo_w_select select {border:1px solid #d0d3db;background:#fff;width:100%} #bo_w .bo_w_link label {position:absolute;top:1px;left:1px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2} #bo_w .bo_w_link .frm_input {padding-left:50px} -#bo_w .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2} -#bo_w .bo_w_flie .frm_file {padding-left:50px} -#bo_w .bo_w_flie .file_wr {position:relative;color:#000;vertical-align:middle;margin:0} +#bo_w .bo_w_flie .lb_icon, .form_01 .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2} +#bo_w .bo_w_flie .frm_file, .form_01 .bo_w_flie .frm_file {padding-left:50px} +#bo_w .bo_w_flie .file_wr, .form_01 .bo_w_flie .file_wr {position:relative;color:#000;vertical-align:middle;margin:0} #bo_w .bo_w_flie .frm_input {margin:5px 0 0} .filebox .btn_file {display:inline-block;position:absolute;right:8px;top:8px;border:1px solid #3a8afd;border-radius:3px;width:60px;height:30px;color:#3a8afd;font-size:1em;line-height:30px;font-weight:bold;background:#fff;text-align:center;vertical-align:middle;cursor:pointer} diff --git a/mobile/skin/qa/basic/view.answer.skin.php b/mobile/skin/qa/basic/view.answer.skin.php index 067bcf660..27de05230 100644 --- a/mobile/skin/qa/basic/view.answer.skin.php +++ b/mobile/skin/qa/basic/view.answer.skin.php @@ -11,7 +11,43 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
+ \n"; + + for ($i=0; $i<$answer['img_count']; $i++) { + echo get_view_thumbnail($answer['img_file'][$i], $qaconfig['qa_image_width']); + } + + echo "
\n"; + } + ?> + + + + +
+

첨부파일

+ +
+ + diff --git a/mobile/skin/qa/basic/view.answerform.skin.php b/mobile/skin/qa/basic/view.answerform.skin.php index 671e97fef..e89ec6c66 100644 --- a/mobile/skin/qa/basic/view.answerform.skin.php +++ b/mobile/skin/qa/basic/view.answerform.skin.php @@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?>

답변등록

-
+ @@ -46,6 +46,21 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + +
  • +
    + + + +
    +
    +
    + + + +
    +
  • + diff --git a/skin/qa/basic/style.css b/skin/qa/basic/style.css index 4c0abb64a..284f5a6e9 100644 --- a/skin/qa/basic/style.css +++ b/skin/qa/basic/style.css @@ -159,7 +159,7 @@ html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !importa #bo_v_info .profile_img img {border-radius:50%} #bo_v_file {margin:10px 0 0;background:#f3f3f3} -#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden} +#bo_v_file h2 {margin:0;padding:0 !important;height:0;overflow:hidden} #bo_v_file ul {margin:0;padding:5px 0;list-style:none} #bo_v_file li {padding:5px 10px;position:relative} #bo_v_file a {display:inline-block;color:#3497d9;text-decoration:underline;word-wrap:break-word} @@ -285,7 +285,7 @@ html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !importa /*글쓰기*/ #bo_w .write_div {margin:10px 0;position:relative} -#bo_w li {position:relative} +#bo_w li, .form_01 li {position:relative} #bo_w .bo_w_info:after {display:block;visibility:hidden;clear:both;content:""} #bo_w .bo_w_info .frm_input {float:left;width:33%} #bo_w #wr_password {margin:0 0.5%} @@ -294,11 +294,11 @@ html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !importa #bo_w .bo_w_tit .frm_input {padding-right:120px} #bo_w .bo_w_tit #btn_autosave {position:absolute;top:5px;right:5px;line-height:30px;height:30px} #bo_w .bo_w_link label {position:absolute;top:1px;left:1px;border-radius:3px 0 0 3px;height:38px;line-height:38px;width:40px;font-size:1.2em;text-align:center;color:#b2b2b2} -#bo_w .bo_w_link .frm_input {padding-left:50px} -#bo_w .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;height:38px;line-height:38px;width:40px;font-size:1.2em;text-align:center;color:#b2b2b2} -#bo_w .bo_w_flie .frm_file {padding-left:50px;margin-top:3px} -#bo_w .bo_w_flie .file_wr {border:1px solid #ccc;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;height:40px;margin:0} -#bo_w .bo_w_flie .frm_input {margin:10px 0 0} +#bo_w .bo_w_link .frm_input, .form_01 .bo_w_link .frm_input {padding-left:50px} +#bo_w .bo_w_flie .lb_icon, .form_01 .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;height:38px;line-height:38px;width:40px;font-size:1.2em;text-align:center;color:#b2b2b2} +#bo_w .bo_w_flie .frm_file, .form_01 .bo_w_flie .frm_file {padding-left:50px;margin-top:3px} +#bo_w .bo_w_flie .file_wr, .form_01 .bo_w_flie .file_wr {border:1px solid #ccc;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;height:40px;margin:0} +#bo_w .bo_w_flie .frm_input, .form_01 .bo_w_flie .frm_input {margin:10px 0 0} #bo_w .bo_w_flie .file_del {position:absolute;top:10px;right:10px;font-size:0.92em;color:#7d7d7d} #bo_w .bo_w_select select {border:1px solid #d0d3db;width:100%;height:40px;border-radius:3px} diff --git a/skin/qa/basic/view.answer.skin.php b/skin/qa/basic/view.answer.skin.php index 55f1f1efb..f830843a7 100644 --- a/skin/qa/basic/view.answer.skin.php +++ b/skin/qa/basic/view.answer.skin.php @@ -31,7 +31,43 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
    + \n"; + + for ($i=0; $i<$answer['img_count']; $i++) { + echo get_view_thumbnail($answer['img_file'][$i], $qaconfig['qa_image_width']); + } + + echo "
    \n"; + } + ?> + + + + +
    +

    첨부파일

    + +
    + + diff --git a/skin/qa/basic/view.answerform.skin.php b/skin/qa/basic/view.answerform.skin.php index b1d0b459b..931ca38ee 100644 --- a/skin/qa/basic/view.answerform.skin.php +++ b/skin/qa/basic/view.answerform.skin.php @@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?>

    답변등록

    - + @@ -48,6 +48,20 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + +
  • +
    + + +
    +
  • + +
  • +
    + + +
    +
  • diff --git a/theme/basic/mobile/skin/qa/basic/style.css b/theme/basic/mobile/skin/qa/basic/style.css index 4b0f4eebb..46b098733 100644 --- a/theme/basic/mobile/skin/qa/basic/style.css +++ b/theme/basic/mobile/skin/qa/basic/style.css @@ -149,9 +149,9 @@ #bo_w .bo_w_select select {border:1px solid #d0d3db;background:#fff;width:100%} #bo_w .bo_w_link label {position:absolute;top:1px;left:1px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2} #bo_w .bo_w_link .frm_input {padding-left:50px} -#bo_w .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2} -#bo_w .bo_w_flie .frm_file {padding-left:50px} -#bo_w .bo_w_flie .file_wr {position:relative;color:#000;vertical-align:middle;margin:0} +#bo_w .bo_w_flie .lb_icon, .form_01 .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;width:45px;height:43px;line-height:43px;font-size:1.2em;text-align:center;color:#b2b2b2} +#bo_w .bo_w_flie .frm_file, .form_01 .bo_w_flie .frm_file {padding-left:50px} +#bo_w .bo_w_flie .file_wr, .form_01 .bo_w_flie .file_wr {position:relative;color:#000;vertical-align:middle;margin:0} #bo_w .bo_w_flie .frm_input {margin:5px 0 0} .filebox .btn_file {display:inline-block;position:absolute;right:8px;top:8px;border:1px solid #3a8afd;border-radius:3px;width:60px;height:30px;color:#3a8afd;font-size:1em;line-height:30px;font-weight:bold;background:#fff;text-align:center;vertical-align:middle;cursor:pointer} diff --git a/theme/basic/mobile/skin/qa/basic/view.answer.skin.php b/theme/basic/mobile/skin/qa/basic/view.answer.skin.php index 067bcf660..27de05230 100644 --- a/theme/basic/mobile/skin/qa/basic/view.answer.skin.php +++ b/theme/basic/mobile/skin/qa/basic/view.answer.skin.php @@ -11,7 +11,43 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
    + \n"; + + for ($i=0; $i<$answer['img_count']; $i++) { + echo get_view_thumbnail($answer['img_file'][$i], $qaconfig['qa_image_width']); + } + + echo "
    \n"; + } + ?> + + + + +
    +

    첨부파일

    + +
    + + diff --git a/theme/basic/mobile/skin/qa/basic/view.answerform.skin.php b/theme/basic/mobile/skin/qa/basic/view.answerform.skin.php index 671e97fef..e89ec6c66 100644 --- a/theme/basic/mobile/skin/qa/basic/view.answerform.skin.php +++ b/theme/basic/mobile/skin/qa/basic/view.answerform.skin.php @@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?>

    답변등록

    - + @@ -46,6 +46,21 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + +
  • +
    + + + +
    +
    +
    + + + +
    +
  • + diff --git a/theme/basic/skin/qa/basic/style.css b/theme/basic/skin/qa/basic/style.css index 4c0abb64a..284f5a6e9 100644 --- a/theme/basic/skin/qa/basic/style.css +++ b/theme/basic/skin/qa/basic/style.css @@ -159,7 +159,7 @@ html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !importa #bo_v_info .profile_img img {border-radius:50%} #bo_v_file {margin:10px 0 0;background:#f3f3f3} -#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden} +#bo_v_file h2 {margin:0;padding:0 !important;height:0;overflow:hidden} #bo_v_file ul {margin:0;padding:5px 0;list-style:none} #bo_v_file li {padding:5px 10px;position:relative} #bo_v_file a {display:inline-block;color:#3497d9;text-decoration:underline;word-wrap:break-word} @@ -285,7 +285,7 @@ html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !importa /*글쓰기*/ #bo_w .write_div {margin:10px 0;position:relative} -#bo_w li {position:relative} +#bo_w li, .form_01 li {position:relative} #bo_w .bo_w_info:after {display:block;visibility:hidden;clear:both;content:""} #bo_w .bo_w_info .frm_input {float:left;width:33%} #bo_w #wr_password {margin:0 0.5%} @@ -294,11 +294,11 @@ html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !importa #bo_w .bo_w_tit .frm_input {padding-right:120px} #bo_w .bo_w_tit #btn_autosave {position:absolute;top:5px;right:5px;line-height:30px;height:30px} #bo_w .bo_w_link label {position:absolute;top:1px;left:1px;border-radius:3px 0 0 3px;height:38px;line-height:38px;width:40px;font-size:1.2em;text-align:center;color:#b2b2b2} -#bo_w .bo_w_link .frm_input {padding-left:50px} -#bo_w .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;height:38px;line-height:38px;width:40px;font-size:1.2em;text-align:center;color:#b2b2b2} -#bo_w .bo_w_flie .frm_file {padding-left:50px;margin-top:3px} -#bo_w .bo_w_flie .file_wr {border:1px solid #ccc;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;height:40px;margin:0} -#bo_w .bo_w_flie .frm_input {margin:10px 0 0} +#bo_w .bo_w_link .frm_input, .form_01 .bo_w_link .frm_input {padding-left:50px} +#bo_w .bo_w_flie .lb_icon, .form_01 .bo_w_flie .lb_icon {position:absolute;top:0px;left:0px;border-radius:3px 0 0 3px;height:38px;line-height:38px;width:40px;font-size:1.2em;text-align:center;color:#b2b2b2} +#bo_w .bo_w_flie .frm_file, .form_01 .bo_w_flie .frm_file {padding-left:50px;margin-top:3px} +#bo_w .bo_w_flie .file_wr, .form_01 .bo_w_flie .file_wr {border:1px solid #ccc;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;height:40px;margin:0} +#bo_w .bo_w_flie .frm_input, .form_01 .bo_w_flie .frm_input {margin:10px 0 0} #bo_w .bo_w_flie .file_del {position:absolute;top:10px;right:10px;font-size:0.92em;color:#7d7d7d} #bo_w .bo_w_select select {border:1px solid #d0d3db;width:100%;height:40px;border-radius:3px} diff --git a/theme/basic/skin/qa/basic/view.answer.skin.php b/theme/basic/skin/qa/basic/view.answer.skin.php index 55f1f1efb..f830843a7 100644 --- a/theme/basic/skin/qa/basic/view.answer.skin.php +++ b/theme/basic/skin/qa/basic/view.answer.skin.php @@ -31,7 +31,43 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
    + \n"; + + for ($i=0; $i<$answer['img_count']; $i++) { + echo get_view_thumbnail($answer['img_file'][$i], $qaconfig['qa_image_width']); + } + + echo "
    \n"; + } + ?> + + + + +
    +

    첨부파일

    + +
    + + diff --git a/theme/basic/skin/qa/basic/view.answerform.skin.php b/theme/basic/skin/qa/basic/view.answerform.skin.php index b1d0b459b..931ca38ee 100644 --- a/theme/basic/skin/qa/basic/view.answerform.skin.php +++ b/theme/basic/skin/qa/basic/view.answerform.skin.php @@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?>

    답변등록

    - + @@ -48,6 +48,20 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + +
  • +
    + + +
    +
  • + +
  • +
    + + +
    +