Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7da8d3743e | |||
| 40da17043b | |||
| 6f8ed103ae |
11 changed files with 811 additions and 829 deletions
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
include_once "./_common.php";
|
||||
|
||||
if (!function_exists('convert_charset'))
|
||||
{
|
||||
if (!function_exists('convert_charset')) {
|
||||
/*
|
||||
-----------------------------------------------------------
|
||||
Charset 을 변환하는 함수
|
||||
|
|
@ -29,8 +28,7 @@ $subject = strtolower($_POST['subject']);
|
|||
$content = strtolower(strip_tags($_POST['content']));
|
||||
|
||||
//euc-kr 일 경우 $config['cf_filter'] 를 utf-8로 변환한다.
|
||||
if (strtolower($g5['charset']) == 'euc-kr')
|
||||
{
|
||||
if (strtolower($g5['charset']) == 'euc-kr') {
|
||||
//$subject = convert_charset('utf-8', 'cp949', $subject);
|
||||
//$content = convert_charset('utf-8', 'cp949', $content);
|
||||
$config['cf_filter'] = convert_charset('cp949', 'utf-8', $config['cf_filter']);
|
||||
|
|
@ -39,15 +37,13 @@ if (strtolower($g5['charset']) == 'euc-kr')
|
|||
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
|
||||
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
|
||||
$filter = explode(",", trim($config['cf_filter']));
|
||||
for ($i=0; $i<count($filter); $i++)
|
||||
{
|
||||
for ($i = 0; $i < count($filter); $i++) {
|
||||
$str = $filter[$i];
|
||||
|
||||
// 제목 필터링 (찾으면 중지)
|
||||
$subj = "";
|
||||
$pos = strpos($subject, $str);
|
||||
if ($pos !== false)
|
||||
{
|
||||
if ($pos !== false) {
|
||||
if (strtolower($g5['charset']) == 'euc-kr')
|
||||
$subj = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
|
||||
else
|
||||
|
|
@ -58,8 +54,7 @@ for ($i=0; $i<count($filter); $i++)
|
|||
// 내용 필터링 (찾으면 중지)
|
||||
$cont = "";
|
||||
$pos = strpos($content, $str);
|
||||
if ($pos !== false)
|
||||
{
|
||||
if ($pos !== false) {
|
||||
if (strtolower($g5['charset']) == 'euc-kr')
|
||||
$cont = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
|
||||
else
|
||||
|
|
|
|||
|
|
@ -123,7 +123,8 @@ if ($board['bo_table_width'] == 0)
|
|||
<p class="control">
|
||||
<?php
|
||||
if ($is_comment_write) {
|
||||
?><a href="javascript:comment_wri('comment_write', '<?= $lists[$ii]['wr_id'] ?>');">+</a>
|
||||
?><a
|
||||
href="javascript:comment_wri('comment_write', '<?= $lists[$ii]['wr_id'] ?>');">+</a>
|
||||
<?php
|
||||
}
|
||||
if (($member['mb_id'] && ($member['mb_id'] == $lists[$ii]['mb_id'])) || $is_admin) {
|
||||
|
|
@ -179,10 +180,8 @@ if ($board['bo_table_width'] == 0)
|
|||
</span>
|
||||
<?php } ?>
|
||||
<input type="submit" name="btn_submit" value="선택삭제" onclick="select_delete();" class="ui-btn small admin">
|
||||
<input type="submit" name="btn_submit" value="선택복사" onclick="select_copy('copy');"
|
||||
class="ui-btn small admin">
|
||||
<input type="submit" name="btn_submit" value="선택이동" onclick="select_copy('move');"
|
||||
class="ui-btn small admin">
|
||||
<input type="submit" name="btn_submit" value="선택복사" onclick="select_copy('copy');" class="ui-btn small admin">
|
||||
<input type="submit" name="btn_submit" value="선택이동" onclick="select_copy('move');" class="ui-btn small admin">
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ if (!defined("_GNUBOARD_"))
|
|||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<p class="ui-text-area">
|
||||
<textarea name="wr_content" required class="frm-input full" value="<?= $list[$i]['wr_content'] ?>" oninput="wr_resize(this);" style="resize: vertical !important; transition: none; min-height: 1em;"></textarea>
|
||||
<textarea name="wr_content" required class="frm-input full" value="<?= $list[$i]['wr_content'] ?>"
|
||||
oninput="wr_resize(this);" style="resize: vertical !important; transition: none; min-height: 1em;"></textarea>
|
||||
<button type="submit" class="ui-btn" accesskey='s'>입력</button>
|
||||
</p>
|
||||
<?php if (!$is_member && $is_comment_write) { ?>
|
||||
<p>
|
||||
<input type="text" name="wr_name" placeholder="이름" value="<?= $_COOKIE['MMB_NAME'] ?>"
|
||||
style="max-width:40%" />
|
||||
<input type="text" name="wr_name" placeholder="이름" value="<?= $_COOKIE['MMB_NAME'] ?>" style="max-width:40%" />
|
||||
<input type="password" name="wr_password" value="<?= $_COOKIE['MMB_PW'] ?>" placeholder="비밀번호"
|
||||
style="max-width:40%" />
|
||||
</p>
|
||||
|
|
@ -93,27 +93,29 @@ if (!defined("_GNUBOARD_"))
|
|||
</p>
|
||||
<?php } ?>
|
||||
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
|
||||
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'], "secret") ?>"
|
||||
id="secret_comment_<?php echo $comment_id ?>">
|
||||
<input type="text" id="save_comment_<?php echo $comment_id ?>" style="display:none"
|
||||
value="<?php echo get_text($list[$i]['content1'], 0) ?>">
|
||||
<textarea name="wr_content" required class="frm-input full" value="<?= $list[$i]['wr_content'] ?>"
|
||||
oninput="wr_resize(this);" id="save_comment_<?php echo $comment_id ?>"
|
||||
style="display:none; resize: vertical !important; transition: none; min-height: 1em;"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
|
||||
<?php if ($list[$i]['is_edit']) { ?>
|
||||
<div class="modify_area ui-text-area" id="save_comment_<?php echo $comment_id ?>" style="display:none;">
|
||||
<input type="text" id="save_co_comment_<?php echo $comment_id ?>"
|
||||
value="<?php echo get_text($list[$i]['wr_content'], 0) ?>" class="full">
|
||||
<p class="txt-right"><button type="button" class="mod_comment ui-btn"
|
||||
onclick="mod_comment('<?php echo $comment_id ?>')">수정</button></p>
|
||||
<textarea type="text" id="save_co_comment_<?php echo $comment_id ?>" oninput="wr_resize(this);"
|
||||
style="resize: vertical !important; transition: none; min-height: 1em;"><?php echo get_text($list[$i]['wr_content'], 0) ?></textarea>
|
||||
<p class="txt-right">
|
||||
<button type="button" class="mod_comment ui-btn" onclick="mod_comment('<?php echo $comment_id ?>')">수정</button>
|
||||
</p>
|
||||
</div>
|
||||
<?php } ?> </li>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<script>
|
||||
function wr_resize(e) {
|
||||
e.style.height = 'auto';
|
||||
e.style.height = e.scrollHeight + 'px';
|
||||
e.style.height = `calc(${e.scrollHeight}px + 0.25em)`;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
|
|
|||
10
write.php
10
write.php
|
|
@ -237,14 +237,6 @@ if ($member['mb_level'] >= $board['bo_html_level'])
|
|||
|
||||
$is_secret = $board['bo_use_secret'];
|
||||
|
||||
//$is_mail = false;
|
||||
//if ($config['cf_email_use'] && $board['bo_use_email'])
|
||||
// $is_mail = true;
|
||||
|
||||
//$recv_email_checked = '';
|
||||
//if ($w == '' || strstr($write['wr_option'], 'mail'))
|
||||
// $recv_email_checked = 'checked';
|
||||
|
||||
$is_name = false;
|
||||
$is_password = false;
|
||||
$is_email = false;
|
||||
|
|
@ -291,8 +283,6 @@ if ($w == "" || $w == "r") {
|
|||
if (isset($write['wr_name'])) {
|
||||
$name = get_text(cut_str(stripslashes($write['wr_name']), 20));
|
||||
}
|
||||
//$email = get_email_address($member['mb_email']);
|
||||
//$homepage = get_text(stripslashes($member['mb_homepage']));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ if ($is_notice || $is_html || $is_secret || $is_mail) {
|
|||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
//if ($is_mail) {
|
||||
// $option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
||||
//}
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
|
|
@ -53,12 +49,12 @@ echo $option_hidden;
|
|||
<div class="ui-write-box ui-text-area<?= $w == 'u' ? " update" : ""; ?>">
|
||||
<a href="#" class="write_open ui-btn point">+</a>
|
||||
<p>
|
||||
<textarea name="wr_content" id="content" class="frm-input full" required value="<?= $content ?>" style="resize: vertical !important; transition: none; min-height: 1em;"></textarea>
|
||||
<textarea name="wr_content" id="content" class="frm-input full" required value="<?= $content ?>"
|
||||
style="resize: vertical !important; transition: none; min-height: 1em;"><?= $content ?></textarea>
|
||||
<button type="submit" id="btn_submit" class="ui-btn" accesskey='s'>입력</button><?php if ($w == 'u') { ?><a
|
||||
href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn etc">뒤로</a><?php } ?>
|
||||
<?php if (!$is_member) { ?>
|
||||
<input type="text" maxlength="20" name="wr_name" id="wr_name" placeholder="이름" required
|
||||
value="<?= $name ?>" />
|
||||
<input type="text" maxlength="20" name="wr_name" id="wr_name" placeholder="이름" required value="<?= $name ?>" />
|
||||
<input type="password" maxlength="20" id="wr_password" name="wr_password" placeholder="비밀번호"
|
||||
value="<?= $password ?>" <?= $password_required ?> />
|
||||
<?php } ?>
|
||||
|
|
@ -90,6 +86,6 @@ echo $option_hidden;
|
|||
|
||||
document.getElementById("content").addEventListener("input", function () {
|
||||
this.style.height = 'auto';
|
||||
this.style.height = this.scrollHeight + 'px';
|
||||
this.style.height = `calc(${this.scrollHeight}px + 0.25em)`;
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue