1:1 문의 답변 오류 및 스킨 코드 수정
This commit is contained in:
@ -19,7 +19,7 @@ $token = isset($_POST['token']) ? clean_xss_tags($_POST['token'], 1, 1) : '';
|
||||
|
||||
//모든 회원의 토큰을 검사합니다.
|
||||
if (!($token && $write_token === $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
alert('올바른 방법으로 이용해 주십시오.');
|
||||
|
||||
// 1:1문의 설정값
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
@ -5,6 +5,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
|
||||
|
||||
<?php if ($admin_href || $write_href) { ?>
|
||||
<ul class="btn_top top btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
@ -41,12 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<!-- } 카테고리 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<div class="all_chk chk_box">
|
||||
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
|
||||
@ -93,8 +93,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<?php if ($i == 0) { echo '<li class="empty_list">게시물이 없습니다.</li>'; } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
|
||||
@ -9,12 +9,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<h2>답변등록</h2>
|
||||
|
||||
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
|
||||
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
|
||||
<input type="hidden" name="w" value="a">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
@ -104,6 +105,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_bbs_url+"/ajax.write.token.php",
|
||||
data: { 'token_case' : 'qa_write' },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (typeof data.token !== "undefined") {
|
||||
token = data.token;
|
||||
if(typeof f.token === "undefined")
|
||||
$(f).prepend('<input type="hidden" name="token" value="">');
|
||||
$(f).find("input[name=token]").val(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
|
||||
@ -16,8 +16,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<li>
|
||||
<button type="button" class="btn_more_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
|
||||
<ul class="more_opt">
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
|
||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -15,6 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
@ -106,6 +107,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_bbs_url+"/ajax.write.token.php",
|
||||
data: { 'token_case' : 'qa_write' },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (typeof data.token !== "undefined") {
|
||||
token = data.token;
|
||||
if(typeof f.token === "undefined")
|
||||
$(f).prepend('<input type="hidden" name="token" value="">');
|
||||
$(f).find("input[name=token]").val(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
|
||||
@ -5,6 +5,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
|
||||
|
||||
<?php if ($admin_href || $write_href) { ?>
|
||||
<ul class="btn_top top btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
@ -41,12 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<!-- } 카테고리 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<div class="all_chk chk_box">
|
||||
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
|
||||
@ -93,8 +93,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<?php if ($i == 0) { echo '<li class="empty_list">게시물이 없습니다.</li>'; } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
|
||||
@ -9,12 +9,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
<h2>답변등록</h2>
|
||||
|
||||
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
|
||||
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
|
||||
<input type="hidden" name="w" value="a">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
@ -104,6 +105,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_bbs_url+"/ajax.write.token.php",
|
||||
data: { 'token_case' : 'qa_write' },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (typeof data.token !== "undefined") {
|
||||
token = data.token;
|
||||
if(typeof f.token === "undefined")
|
||||
$(f).prepend('<input type="hidden" name="token" value="">');
|
||||
$(f).find("input[name=token]").val(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
|
||||
@ -15,15 +15,10 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
<?php } ?>
|
||||
<li>
|
||||
<button type="button" class="btn_more_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
|
||||
<?php ob_start(); ?>
|
||||
<ul class="more_opt">
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
|
||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php
|
||||
$link_buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
@ -113,8 +108,8 @@ $(".btn_more_opt").on("click", function() {
|
||||
|
||||
<?php if ($prev_href || $next_href) { ?>
|
||||
<ul class="bo_v_nb">
|
||||
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_wr_subject;?></a></li><?php } ?>
|
||||
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_wr_subject;?></a></li><?php } ?>
|
||||
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_qa_subject;?></a></li><?php } ?>
|
||||
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_qa_subject;?></a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</article>
|
||||
|
||||
@ -15,6 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
@ -106,6 +107,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: g5_bbs_url+"/ajax.write.token.php",
|
||||
data: { 'token_case' : 'qa_write' },
|
||||
cache: false,
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if (typeof data.token !== "undefined") {
|
||||
token = data.token;
|
||||
if(typeof f.token === "undefined")
|
||||
$(f).prepend('<input type="hidden" name="token" value="">');
|
||||
$(f).find("input[name=token]").val(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user