misc update

This commit is contained in:
Amberstone 2024-09-22 23:17:57 +09:00
parent 13412490b6
commit 0e0a992325
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
5 changed files with 405 additions and 61 deletions

View file

@ -45,6 +45,10 @@ if (!isset($board['bo_use_cert'])) {
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false);
}
if (!isset($board['bo_pass'])) {
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_pass` varchar(255) NOT NULL DEFAULT '' AFTER `bo_use_email` , ADD `bo_use_pass` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_email`", false);
}
if (!isset($board['bo_use_sns'])) {
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false);
@ -86,8 +90,8 @@ if ($w == '') {
$required_valid = 'alnum_';
$sound_only = '<strong class="sound_only">필수</strong>';
$board['bo_count_delete'] = 0;
$board['bo_count_modify'] = 0;
$board['bo_count_delete'] = 1;
$board['bo_count_modify'] = 1;
$board['bo_read_point'] = $config['cf_read_point'];
$board['bo_write_point'] = $config['cf_write_point'];
$board['bo_comment_point'] = $config['cf_comment_point'];
@ -102,8 +106,10 @@ if ($w == '') {
$board['bo_new'] = 24;
$board['bo_hot'] = 100;
$board['bo_image_width'] = 600;
$board['bo_upload_count'] = 0;
$board['bo_upload_count'] = 1;
$board['bo_upload_size'] = (int) ini_get("upload_max_filesize") * 1048576;
$board['bo_gallery_cols'] = 4;
$board['bo_gallery_width'] = 130;
$board['bo_reply_order'] = 1;
$board['bo_use_search'] = 1;
$board['bo_skin'] = 'basic';
@ -112,10 +118,17 @@ if ($w == '') {
$board['bo_use_secret'] = 0;
$board['bo_include_head'] = '_head.php';
$board['bo_include_tail'] = '_tail.php';
$board['bo_table_width'] = '100';
} else if ($w == 'u') {
$html_title .= ' 수정';
if ($board['bo_gallery_cols'] == 0)
$board['bo_gallery_cols'] = 4;
if ($board['bo_table_width'] == 0)
$board['bo_table_width'] = '100';
if ($board['bo_gallery_width'] == 0)
$board['bo_gallery_width'] = 130;
if (!$board['bo_table'])
alert('존재하지 않은 게시판 입니다.');
@ -143,6 +156,7 @@ $pg_anchor = '<ul class="anchor">
<li><a href="#anc_003">기능 설정</a></li>
<li><a href="#anc_006">확장 기능 설정</a></li>
<li><a href="#anc_004">디자인/양식</a></li>
<li><a href="#anc_005">포인트 설정</a></li>
<li><a href="#anc_007">여분필드</a></li>
</ul>';
@ -175,6 +189,20 @@ $pg_anchor = '<ul class="anchor">
<input type="hidden" name="bo_reply_order" value="<?php echo $board['bo_reply_order'] ?>" />
<div class="btn_confirm01 btn_confirm">
<?php if ($w == 'u') { ?>
<a href="./board_thumbnail_delete.php?bo_table=<?= $board['bo_table'] ?>&amp;<?= $qstr ?>"
onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn ty2" title="게시판 썸네일 삭제">
<span class="material-icons">
layers_clear
</span>
</a>
<a href="./board_copy.php?bo_table=<?= $bo_table ?>" id="board_copy" target="win_board_copy" class="btn ty2"
title="게시판 복사">
<span class="material-icons">
content_copy
</span>
</a>
<?php } ?>
<a href="./board_list.php" title="목록" class="btn ty2"><span class="material-icons">list</span></a>
<div class="btn">
<span class="material-icons">save</span>
@ -252,6 +280,15 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_category_list">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_pass">게시판 비밀번호</label></th>
<td colspan="2">
<input type="text" name="bo_pass" value="<?= $board['bo_pass'] ?>" id="bo_pass" class="frm_input"
size="80" maxlength="120">
<label for="bo_use_pass"><input type="checkbox" name="bo_use_pass" id="bo_use_pass" value="1"
<?= $board['bo_use_pass'] == 1 ? "checked" : ""; ?>> 비밀번호 사용</label>
</td>
</tr>
<?php if ($w == 'u') { ?>
<tr>
<th scope="row"><label for="proc_count">카운트 조정</label></th>
@ -357,7 +394,90 @@ $pg_anchor = '<ul class="anchor">
<col style="width: 180px;">
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="bo_write_min"> 최소 글자수 제한</label></th>
<td>
<?php echo help('글 입력시 최소 글자수를 설정. 0을 입력하거나 최고관리자, DHTML 에디터 사용시에는 검사하지 않음') ?>
<input type="text" name="bo_write_min" value="<?php echo $board['bo_write_min'] ?>" id="bo_write_min"
class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_write_min" value="1" id="chk_grp_write_min">
<label for="chk_grp_write_min">그룹적용</label>
<input type="checkbox" name="chk_all_write_min" value="1" id="chk_all_write_min">
<label for="chk_all_write_min">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_max"> 최대 글자수 제한</label></th>
<td>
<?php echo help('글 입력시 최대 글자수를 설정. 0을 입력하거나 최고관리자, DHTML 에디터 사용시에는 검사하지 않음') ?>
<input type="text" name="bo_write_max" value="<?php echo $board['bo_write_max'] ?>" id="bo_write_max"
class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_write_max" value="1" id="chk_grp_write_max">
<label for="chk_grp_write_max">그룹적용</label>
<input type="checkbox" name="chk_all_write_max" value="1" id="chk_all_write_max">
<label for="chk_all_write_max">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_min">댓글 최소 글자수 제한</label></th>
<td>
<?php echo help('댓글 입력시 최소 글자수를 설정. 0을 입력하면 검사하지 않음') ?>
<input type="text" name="bo_comment_min" value="<?php echo $board['bo_comment_min'] ?>"
id="bo_comment_min" class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_comment_min" value="1" id="chk_grp_comment_min">
<label for="chk_grp_comment_min">그룹적용</label>
<input type="checkbox" name="chk_all_comment_min" value="1" id="chk_all_comment_min">
<label for="chk_all_comment_min">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_max">댓글 최대 글자수 제한</label></th>
<td>
<?php echo help('댓글 입력시 최대 글자수를 설정. 0을 입력하면 검사하지 않음') ?>
<input type="text" name="bo_comment_max" value="<?php echo $board['bo_comment_max'] ?>"
id="bo_comment_max" class="numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_comment_max" value="1" id="chk_grp_comment_max">
<label for="chk_grp_comment_max">그룹적용</label>
<input type="checkbox" name="chk_all_comment_max" value="1" id="chk_all_comment_max">
<label for="chk_all_comment_max">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_count_modify">원글 수정 불가<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('댓글의 수가 설정 수 이상이면 원글을 수정할 수 없습니다. 0으로 설정하시면 댓글 수에 관계없이 수정할 수있습니다.'); ?>
댓글 <input type="text" name="bo_count_modify" value="<?php echo $board['bo_count_modify'] ?>"
id="bo_count_modify" required class="required numeric frm_input" size="3"> 이상 달리면 수정불가
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_count_modify" value="1" id="chk_grp_count_modify">
<label for="chk_grp_count_modify">그룹적용</label>
<input type="checkbox" name="chk_all_count_modify" value="1" id="chk_all_count_modify">
<label for="chk_all_count_modify">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_count_delete">원글 삭제 불가<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('댓글의 수가 설정 수 이상이면 원글을 삭제할 수 없습니다. 0으로 설정하시면 댓글 수에 관계없이 삭제할 수있습니다.'); ?>
댓글 <input type="text" name="bo_count_delete" value="<?php echo $board['bo_count_delete'] ?>"
id="bo_count_delete" required class="required numeric frm_input" size="3"> 이상 달리면 삭제불가
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_count_delete" value="1" id="chk_grp_count_delete">
<label for="chk_grp_count_delete">그룹적용</label>
<input type="checkbox" name="chk_all_count_delete" value="1" id="chk_all_count_delete">
<label for="chk_all_count_delete">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_secret">비밀글 사용</label></th>
<td>
@ -375,7 +495,6 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_use_secret">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_dhtml_editor">DHTML 에디터 사용</label></th>
<td>
@ -390,7 +509,34 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_use_dhtml_editor">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_list_content">목록에서 내용 사용</label></th>
<td>
<?php echo help("목록에서 게시판 제목외에 내용도 읽어와야 할 경우에 설정하는 옵션입니다. 기본은 사용하지 않습니다."); ?>
<input type="checkbox" name="bo_use_list_content" value="1" id="bo_use_list_content" <?php echo $board['bo_use_list_content'] ? 'checked' : ''; ?>>
사용 (사용시 속도가 느려질 있습니다.)
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_use_list_content" value="1" id="chk_grp_use_list_content">
<label for="chk_grp_use_list_content">그룹적용</label>
<input type="checkbox" name="chk_all_use_list_content" value="1" id="chk_all_use_list_content">
<label for="chk_all_use_list_content">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_list_file">목록에서 파일 사용</label></th>
<td>
<?php echo help("목록에서 게시판 첨부파일을 읽어와야 할 경우에 설정하는 옵션입니다. 기본은 사용하지 않습니다."); ?>
<input type="checkbox" name="bo_use_list_file" value="1" id="bo_use_list_file" <?php echo $board['bo_use_list_file'] ? 'checked' : ''; ?>>
사용 (사용시 속도가 느려질 있습니다.)
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_use_list_file" value="1" id="chk_grp_use_list_file">
<label for="chk_grp_use_list_file">그룹적용</label>
<input type="checkbox" name="chk_all_use_list_file" value="1" id="chk_all_use_list_file">
<label for="chk_all_use_list_file">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_list_view">전체목록보이기 사용</label></th>
<td>
@ -433,7 +579,6 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_upload_size">전체적용</label>
</td>
</tr>
</tbody>
</table>
</div>
@ -443,6 +588,18 @@ $pg_anchor = '<ul class="anchor">
$skin_path = G5_PATH . "/" . G5_SKIN_DIR . "/board/" . $board['bo_skin'] . "/extra.config.php";
if (file_exists($skin_path)) {
include_once $skin_path;
} else {
?>
<section id="anc_006">
<h2 class="h2_frm">확장 기능 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<div style="background: #f9f9f9; padding: 8px 16px; border-color: #efeff5; border-style: solid; border-width: 1px 0 1px 0; color: #5b5b5a">
게시판 스킨에 확장 기능이 없습니다.
</div>
</div>
</section>
<?php
}
?>
@ -537,6 +694,21 @@ $pg_anchor = '<ul class="anchor">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_table_width">게시판 가로<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('숫자만 입력해주세요. 100이하는 퍼센티지로 출력되며 그 위로는 픽셀단위로 출력됩니다.') ?>
<input type="text" name="bo_table_width" value="<?php echo $board['bo_table_width'] ?>"
id="bo_table_width" required class="required numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_bo_table_width" value="1" id="chk_grp_bo_table_width">
<label for="chk_grp_bo_table_width">그룹적용</label>
<input type="checkbox" name="chk_all_bo_table_width" value="1" id="chk_all_bo_table_width">
<label for="chk_all_bo_table_width">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_image_width">이미지 크기<strong class="sound_only">필수</strong></label></th>
<td>
@ -553,7 +725,8 @@ $pg_anchor = '<ul class="anchor">
</tr>
<tr>
<th scope="row"><label for="bo_gallery_height">로그접기 세로기준<strong class="sound_only">필수</strong></label></th>
<th scope="row"><label for="bo_gallery_height">로그접기/갤러리 세로기준<strong class="sound_only">필수</strong></label>
</th>
<td>
<?php echo help('자비란 형태의 게시판에서만 적용됩니다.') ?>
<input type="text" name="bo_gallery_height" value="<?php echo $board['bo_gallery_height'] ?>"
@ -567,6 +740,63 @@ $pg_anchor = '<ul class="anchor">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_gallery_width">갤러리 가로기준</label></th>
<td>
<?php echo help('갤러리형 게시판 목록상에서 보여질 썸네일의 가로 사이즈를 설정합니다. 게시판 스킨에 따라 적용되지 않는 게시판도 있습니다.') ?>
<input type="text" name="bo_gallery_width" value="<?php echo $board['bo_gallery_width'] ?>"
id="bo_gallery_width" required class="required numeric frm_input" size="4"> 픽셀
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_gallery_width" value="1" id="chk_grp_gallery_width">
<label for="chk_grp_gallery_width">그룹적용</label>
<input type="checkbox" name="chk_all_gallery_width" value="1" id="chk_all_gallery_width">
<label for="chk_all_gallery_width">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_gallery_cols">갤러리 개수<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('갤러리형 게시판에서 한줄에 들어갈 이미지 개수를 정합니다. 가로 사이즈는 자동으로 조절됩니다.') ?>
<input type="text" name="bo_gallery_cols" value="<?php echo $board['bo_gallery_cols'] ?>"
id="bo_gallery_cols" required class="required numeric frm_input" size="3">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_gallery_cols" value="1" id="chk_grp_gallery_cols">
<label for="chk_grp_gallery_cols">그룹적용</label>
<input type="checkbox" name="chk_all_image_width" value="1" id="chk_all_gallery_cols">
<label for="chk_all_gallery_cols">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_new"> 강조<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('글 입력후 new 이미지를 출력하는 시간. 0을 입력하시면 아이콘을 출력하지 않습니다.') ?>
<input type="text" name="bo_new" value="<?php echo $board['bo_new'] ?>" id="bo_new" required
class="required numeric frm_input" size="4">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_new" value="1" id="chk_grp_new">
<label for="chk_grp_new">그룹적용</label>
<input type="checkbox" name="chk_all_new" value="1" id="chk_all_new">
<label for="chk_all_new">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_reply_order">답변 달기</label></th>
<td>
<select id="bo_reply_order" name="bo_reply_order">
<option value="1" <?php echo get_selected($board['bo_reply_order'], 1); ?>>나중에 쓴 답변 아래로 달기 (기본)
<option value="0" <?php echo get_selected($board['bo_reply_order'], 0); ?>>나중에 쓴 답변 위로 달기
</select>
</td>
<td class="td_grpset">
<input type="checkbox" id="chk_grp_reply_order" name="chk_grp_reply_order" value="1">
<label for="chk_grp_reply_order">그룹적용</label>
<input type="checkbox" id="chk_all_reply_order" name="chk_all_reply_order" value="1">
<label for="chk_all_reply_order">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_sort_field">리스트 정렬 필드</label></th>
<td>
@ -608,6 +838,72 @@ $pg_anchor = '<ul class="anchor">
</div>
</section>
<section id="anc_005">
<h2 class="h2_frm">게시판 포인트 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>게시판 포인트 설정</caption>
<colgroup>
<col style="width: 150px;">
<col>
<col style="width: 180px;">
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="chk_grp_point">기본값으로 설정</label></th>
<td colspan="2">
<?php echo help('환경설정에 입력된 포인트로 설정') ?>
<input type="checkbox" name="chk_grp_point" id="chk_grp_point" onclick="set_point(this.form)">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_read_point" value="<?php echo $board['bo_read_point'] ?>" id="bo_read_point"
required class="required frm_input" size="5">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_read_point" value="1" id="chk_grp_read_point">
<label for="chk_grp_read_point">그룹적용</label>
<input type="checkbox" name="chk_all_read_point" value="1" id="chk_all_read_point">
<label for="chk_all_read_point">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_point">글쓰기 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_write_point" value="<?php echo $board['bo_write_point'] ?>"
id="bo_write_point" required class="required frm_input" size="5">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_write_point" value="1" id="chk_grp_write_point">
<label for="chk_grp_write_point">그룹적용</label>
<input type="checkbox" name="chk_all_write_point" value="1" id="chk_all_write_point">
<label for="chk_all_write_point">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_point">댓글쓰기 포인트<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" name="bo_comment_point" value="<?php echo $board['bo_comment_point'] ?>"
id="bo_comment_point" required class="required frm_input" size="5">
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_grp_comment_point" value="1" id="chk_grp_comment_point">
<label for="chk_grp_comment_point">그룹적용</label>
<input type="checkbox" name="chk_all_comment_point" value="1" id="chk_all_comment_point">
<label for="chk_all_comment_point">전체적용</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="anc_007">
<h2 class="h2_frm">게시판 여분필드 설정</h2>
<?php echo $pg_anchor ?>

View file

@ -110,6 +110,8 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_use_list_content = '{$_POST['bo_use_list_content']}',
bo_use_email = '{$_POST['bo_use_email']}',
bo_use_cert = '{$_POST['bo_use_cert']}',
bo_pass = '{$_POST['bo_pass']}',
bo_use_pass = '{$_POST['bo_use_pass']}',
bo_use_sns = '{$_POST['bo_use_sns']}',
bo_table_width = '{$_POST['bo_table_width']}',
bo_subject_len = '{$_POST['bo_subject_len']}',

View file

@ -37,6 +37,15 @@ switch ($w) {
$return_url = './board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id;
}
break;
case 'bs':
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
if ($is_admin)
goto_url(G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table);
else {
$action = https_url(G5_BBS_DIR) . '/password_check.php';
$return_url = G5_URL;
}
break;
default:
alert('w 값이 제대로 넘어오지 않았습니다.');
}
@ -54,10 +63,14 @@ $sql = " select wr_subject from {$write_table}
$row = sql_fetch($sql);
$g5['title'] = get_text($row['wr_subject']);
$delete_str = "";
if ($w == 'x') $delete_str = "";
if ($w == 'u') $g5['title'] = "{$delete_str}글 수정";
else if ($w == 'd' || $w == 'x') $g5['title'] = "{$delete_str}글 삭제";
include_once($member_skin_path . '/password.skin.php');
include_once $member_skin_path . '/password.skin.php';
//if ($board['bo_content_tail']) { echo stripslashes($board['bo_content_tail']); }
//if ($board['bo_include_tail']) { @include ($board['bo_include_tail']); }
include_once(G5_PATH . '/tail.sub.php');
include_once G5_PATH . '/tail.sub.php';

View file

@ -5,6 +5,11 @@ if ($w == 's') {
$qstr = 'bo_table=' . $bo_table . '&amp;sfl=' . $sfl . '&amp;stx=' . $stx . '&amp;sop=' . $sop . '&amp;wr_id=' . $wr_id . '&amp;page=' . $page;
$wr = get_write($write_table, $wr_id);
if (!$wr['wr_password'] && $wr['mb_id']) {
if ($mb = get_member($wr['mb_id'])) {
$wr['wr_password'] = $mb['mb_password'];
}
}
if (!check_password($wr_password, $wr['wr_password']))
alert('비밀번호가 틀립니다.');
@ -15,10 +20,29 @@ if ($w == 's') {
//set_session("ss_secret", "$bo_table|$wr['wr_num']");
set_session($ss_name, TRUE);
} else if ($w == 'p') {
$qstr = 'bo_table=' . $bo_table . '&amp;sfl=' . $sfl . '&amp;stx=' . $stx . '&amp;sop=' . $sop . '&amp;wr_id=' . $wr_id . '&amp;page=' . $page;
$wr = get_write($write_table, $wr_id);
if ($wr_password != $wr['wr_protect'])
alert('비밀번호가 틀립니다.');
// 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임.
//$ss_name = 'ss_secret.'_'.$bo_table.'_'.$wr_id';
$ss_name = 'ss_secret_' . $bo_table . '_' . $wr['wr_num'];
//set_session("ss_secret", "$bo_table|$wr[wr_num]");
set_session($ss_name, TRUE);
} else if ($w == 'sc') {
$qstr = 'bo_table=' . $bo_table . '&amp;sfl=' . $sfl . '&amp;stx=' . $stx . '&amp;sop=' . $sop . '&amp;wr_id=' . $wr_id . '&amp;page=' . $page;
$wr = get_write($write_table, $wr_id);
if (!$wr['wr_password'] && $wr['mb_id']) {
if ($mb = get_member($wr['mb_id'])) {
$wr['wr_password'] = $mb['mb_password'];
}
}
if (!check_password($wr_password, $wr['wr_password']))
alert('비밀번호가 틀립니다.');
@ -28,6 +52,15 @@ if ($w == 's') {
//set_session("ss_secret", "$bo_table|$wr['wr_num']");
set_session($ss_name, TRUE);
} else if ($w == 'bs') {
$qstr = 'bo_table=' . $bo_table . '&amp;sfl=' . $sfl . '&amp;stx=' . $stx . '&amp;sop=' . $sop . '&amp;wr_id=' . $wr_id . '&amp;page=' . $page;
$bo = sql_fetch("select bo_pass from {$g5['board_table']} where bo_table='{$bo_table}'");
$pw = get_encrypt_string($bo['bo_pass']);
if (!check_password($wr_password, $pw)) {
alert('비밀번호가 틀립니다.');
}
set_session('bo_pass_' . $bo_table, true); //@230623 세션 저장 방식 변경
} else
alert('w 값이 제대로 넘어오지 않았습니다.');

View file

@ -136,44 +136,44 @@ if ($w == 'c') // 댓글 입력
//$wr_subject = get_text(stripslashes($wr['wr_subject']));
$sql = " insert into $write_table
set ca_name = '{$wr['ca_name']}',
wr_option = '$wr_secret',
wr_num = '{$wr['wr_num']}',
wr_reply = '',
wr_parent = '$wr_id',
wr_is_comment = 1,
wr_comment = '$tmp_comment',
wr_comment_reply = '$tmp_comment_reply',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
mb_id = '$mb_id',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '" . G5_TIME_YMDHIS . "',
wr_last = '',
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
$sql = "INSERT INTO $write_table
SET ca_name = '{$wr['ca_name']}',
wr_option = '$wr_secret',
wr_num = '{$wr['wr_num']}',
wr_reply = '',
wr_parent = '$wr_id',
wr_is_comment = 1,
wr_comment = '$tmp_comment',
wr_comment_reply = '$tmp_comment_reply',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
mb_id = '$mb_id',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '" . G5_TIME_YMDHIS . "',
wr_last = '',
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
ch_id = '{$character['ch_id']}',
ch_side = '{$character['ch_side']}',
ch_class = '{$character['ch_class']}',
ch_id = '{$character['ch_id']}',
ch_side = '{$character['ch_side']}',
ch_class = '{$character['ch_class']}',
wr_noname = '$wr_noname',
wr_noname = '$wr_noname',
ti_id = '{$character['ch_title']}',
ti_id = '{$character['ch_title']}',
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10' ";
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10' ";
sql_query($sql);
$comment_id = sql_insert_id();
@ -314,23 +314,23 @@ if ($w == 'c') // 댓글 입력
if ($wr_secret)
$sql_secret = " , wr_option = '$wr_secret' ";
$sql = " update $write_table
set wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10',
wr_option = '$wr_option'
$sql_ip
$sql_secret
where wr_id = '$comment_id' ";
$sql = "UPDATE $write_table
SET wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10',
wr_option = '$wr_option'
$sql_ip
$sql_secret
WHERE wr_id = '$comment_id' ";
sql_query($sql);
}