Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eb07bdfa0 | ||
|
|
242eed5b35 | ||
|
|
caf16b5d6a | ||
|
|
c5c8924b42 | ||
|
|
e6764f4a7c | ||
|
|
6368a5b638 | ||
|
|
12c836104a | ||
|
|
c77a001355 |
@@ -12,24 +12,31 @@ else
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$co_row = array('co_id'=>'', 'co_include_head'=>'', 'co_include_tail'=>'');
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if(isset($_POST['co_id']) && preg_match("/[^a-z0-9_]/i", $_POST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
if(isset($_REQUEST['co_id']) && preg_match("/[^a-z0-9_]/i", $_REQUEST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co_row = sql_fetch($sql);
|
||||
}
|
||||
|
||||
$co_id = isset($_POST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['co_id']) : '';
|
||||
$co_subject = strip_tags(clean_xss_attributes($co_subject));
|
||||
$co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255));
|
||||
$co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255));
|
||||
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
|
||||
$co_subject = isset($_POST['co_subject']) ? strip_tags(clean_xss_attributes($_POST['co_subject'])) : '';
|
||||
$co_include_head = isset($_POST['co_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_head'], 0, 255)) : '';
|
||||
$co_include_tail = isset($_POST['co_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_tail'], 0, 255)) : '';
|
||||
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
|
||||
$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
|
||||
$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
|
||||
$co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0;
|
||||
$co_content = isset($_POST['co_content']) ? $_POST['co_content'] : '';
|
||||
$co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : '';
|
||||
$co_skin = isset($_POST['co_skin']) ? clean_xss_tags($_POST['co_skin'], 1, 1) : '';
|
||||
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? clean_xss_tags($_POST['co_mobile_skin'], 1, 1) : '';
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if (($co_row['co_include_head'] !== $co_include_head || $co_row['co_include_tail'] !== $co_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
|
||||
if ((( isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head ) || ( isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail )) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
|
||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
|
||||
if (!chk_captcha()) {
|
||||
@@ -94,7 +101,7 @@ $sql_common = " co_include_head = '$co_include_head',
|
||||
if ($w == "")
|
||||
{
|
||||
$row = $co_row;
|
||||
if ($row['co_id'])
|
||||
if (isset($row['co_id']) && $row['co_id'])
|
||||
alert("이미 같은 ID로 등록된 내용이 있습니다.");
|
||||
|
||||
$sql = " insert {$g5['content_table']}
|
||||
|
||||
+14
-13
@@ -2,6 +2,7 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$co_id = isset($_GET['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_GET['co_id']) : 0;
|
||||
$co_seo_title = isset($_GET['co_seo_title']) ? clean_xss_tags($_GET['co_seo_title'], 1, 1) : '';
|
||||
|
||||
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
|
||||
if( !isset($g5['content_table']) ){
|
||||
@@ -25,7 +26,7 @@ if (G5_IS_MOBILE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$co['co_id'])
|
||||
if (! (isset($co['co_id']) && $co['co_id']))
|
||||
alert('등록된 내용이 없습니다.');
|
||||
|
||||
$g5['title'] = $co['co_subject'];
|
||||
@@ -45,29 +46,29 @@ $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
|
||||
$dst[] = $config['cf_title'];
|
||||
if(isset($default) && isset($default['de_admin_company_name'])){
|
||||
$src[] = "/{{회사명}}|{{상호}}/";
|
||||
$dst[] = $default['de_admin_company_name'];
|
||||
$dst[] = isset($default['de_admin_company_name']) ? $default['de_admin_company_name'] : '';
|
||||
$src[] = "/{{대표자명}}/";
|
||||
$dst[] = $default['de_admin_company_owner'];
|
||||
$dst[] = isset($default['de_admin_company_owner']) ? $default['de_admin_company_owner'] : '';
|
||||
$src[] = "/{{사업자등록번호}}/";
|
||||
$dst[] = $default['de_admin_company_saupja_no'];
|
||||
$dst[] = isset($default['de_admin_company_saupja_no']) ? $default['de_admin_company_saupja_no'] : '';
|
||||
$src[] = "/{{대표전화번호}}/";
|
||||
$dst[] = $default['de_admin_company_tel'];
|
||||
$dst[] = isset($default['de_admin_company_tel']) ? $default['de_admin_company_tel'] : '';
|
||||
$src[] = "/{{팩스번호}}/";
|
||||
$dst[] = $default['de_admin_company_fax'];
|
||||
$dst[] = isset($default['de_admin_company_fax']) ? $default['de_admin_company_fax'] : '';
|
||||
$src[] = "/{{통신판매업신고번호}}/";
|
||||
$dst[] = $default['de_admin_company_tongsin_no'];
|
||||
$dst[] = isset($default['de_admin_company_tongsin_no']) ? $default['de_admin_company_tongsin_no'] : '';
|
||||
$src[] = "/{{사업장우편번호}}/";
|
||||
$dst[] = $default['de_admin_company_zip'];
|
||||
$dst[] = isset($default['de_admin_company_zip']) ? $default['de_admin_company_zip'] : '';
|
||||
$src[] = "/{{사업장주소}}/";
|
||||
$dst[] = $default['de_admin_company_addr'];
|
||||
$dst[] = isset($default['de_admin_company_addr']) ? $default['de_admin_company_addr'] : '';
|
||||
$src[] = "/{{운영자명}}|{{관리자명}}/";
|
||||
$dst[] = $default['de_admin_name'];
|
||||
$dst[] = isset($default['de_admin_name']) ? $default['de_admin_name'] : '';
|
||||
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
|
||||
$dst[] = $default['de_admin_email'];
|
||||
$dst[] = isset($default['de_admin_email']) ? $default['de_admin_email'] : '';
|
||||
$src[] = "/{{정보관리책임자명}}/";
|
||||
$dst[] = $default['de_admin_info_name'];
|
||||
$dst[] = isset($default['de_admin_info_name']) ? $default['de_admin_info_name'] : '';
|
||||
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
|
||||
$dst[] = $default['de_admin_info_email'];
|
||||
$dst[] = isset($default['de_admin_info_email']) ? $default['de_admin_info_email'] : '';
|
||||
}
|
||||
$str = preg_replace($src, $dst, $str);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
********************/
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.4.4');
|
||||
define('G5_GNUBOARD_VER', '5.4.4.2');
|
||||
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
@@ -14,7 +14,7 @@ function show_debug_bar() {
|
||||
}
|
||||
|
||||
$memory_usage = function_exists( 'memory_get_peak_usage' ) ? memory_get_peak_usage() : memory_get_usage();
|
||||
$php_run_time = get_microtime()-$g5_debug['php']['begin_time'];
|
||||
$php_run_time = (isset($g5_debug['php']) && isset($g5_debug['php']['begin_time'])) ? ( get_microtime() - $g5_debug['php']['begin_time'] ) : 0;
|
||||
|
||||
include_once( G5_PLUGIN_PATH.'/debugbar/debugbar.php' );
|
||||
}
|
||||
+2
-2
@@ -15,8 +15,8 @@ if (!isset($g5['title'])) {
|
||||
$g5_head_title = $g5['title'];
|
||||
}
|
||||
else {
|
||||
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
|
||||
$g5_head_title .= " | ".$config['cf_title'];
|
||||
// 상태바에 표시될 제목
|
||||
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
|
||||
}
|
||||
|
||||
$g5['title'] = strip_tags($g5['title']);
|
||||
|
||||
@@ -1644,6 +1644,8 @@ function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
// 결과값에서 한행 연관배열(이름으로)로 얻는다.
|
||||
function sql_fetch_array($result)
|
||||
{
|
||||
if( ! $result) return array();
|
||||
|
||||
if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE)
|
||||
$row = @mysqli_fetch_assoc($result);
|
||||
else
|
||||
|
||||
+12
-12
@@ -16,29 +16,29 @@ $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
|
||||
$dst[] = $config['cf_title'];
|
||||
if(isset($default) && isset($default['de_admin_company_name'])){
|
||||
$src[] = "/{{회사명}}|{{상호}}/";
|
||||
$dst[] = $default['de_admin_company_name'];
|
||||
$dst[] = isset($default['de_admin_company_name']) ? $default['de_admin_company_name'] : '';
|
||||
$src[] = "/{{대표자명}}/";
|
||||
$dst[] = $default['de_admin_company_owner'];
|
||||
$dst[] = isset($default['de_admin_company_owner']) ? $default['de_admin_company_owner'] : '';
|
||||
$src[] = "/{{사업자등록번호}}/";
|
||||
$dst[] = $default['de_admin_company_saupja_no'];
|
||||
$dst[] = isset($default['de_admin_company_saupja_no']) ? $default['de_admin_company_saupja_no'] : '';
|
||||
$src[] = "/{{대표전화번호}}/";
|
||||
$dst[] = $default['de_admin_company_tel'];
|
||||
$dst[] = isset($default['de_admin_company_tel']) ? $default['de_admin_company_tel'] : '';
|
||||
$src[] = "/{{팩스번호}}/";
|
||||
$dst[] = $default['de_admin_company_fax'];
|
||||
$dst[] = isset($default['de_admin_company_fax']) ? $default['de_admin_company_fax'] : '';
|
||||
$src[] = "/{{통신판매업신고번호}}/";
|
||||
$dst[] = $default['de_admin_company_tongsin_no'];
|
||||
$dst[] = isset($default['de_admin_company_tongsin_no']) ? $default['de_admin_company_tongsin_no'] : '';
|
||||
$src[] = "/{{사업장우편번호}}/";
|
||||
$dst[] = $default['de_admin_company_zip'];
|
||||
$dst[] = isset($default['de_admin_company_zip']) ? $default['de_admin_company_zip'] : '';
|
||||
$src[] = "/{{사업장주소}}/";
|
||||
$dst[] = $default['de_admin_company_addr'];
|
||||
$dst[] = isset($default['de_admin_company_addr']) ? $default['de_admin_company_addr'] : '';
|
||||
$src[] = "/{{운영자명}}|{{관리자명}}/";
|
||||
$dst[] = $default['de_admin_name'];
|
||||
$dst[] = isset($default['de_admin_name']) ? $default['de_admin_name'] : '';
|
||||
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
|
||||
$dst[] = $default['de_admin_email'];
|
||||
$dst[] = isset($default['de_admin_email']) ? $default['de_admin_email'] : '';
|
||||
$src[] = "/{{정보관리책임자명}}/";
|
||||
$dst[] = $default['de_admin_info_name'];
|
||||
$dst[] = isset($default['de_admin_info_name']) ? $default['de_admin_info_name'] : '';
|
||||
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
|
||||
$dst[] = $default['de_admin_info_email'];
|
||||
$dst[] = isset($default['de_admin_info_email']) ? $default['de_admin_info_email'] : '';
|
||||
}
|
||||
$str = preg_replace($src, $dst, $str);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -9,8 +9,8 @@ if (!isset($g5['title'])) {
|
||||
$g5_head_title = $g5['title'];
|
||||
}
|
||||
else {
|
||||
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
|
||||
$g5_head_title .= " | ".$config['cf_title'];
|
||||
// 상태바에 표시될 제목
|
||||
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
|
||||
}
|
||||
|
||||
$g5['title'] = strip_tags($g5['title']);
|
||||
|
||||
@@ -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