버전 5.4.1.7 수정
This commit is contained in:
@ -108,7 +108,7 @@ function get_ajax_token()
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$(document).on("click", "form input:submit", function() {
|
||||
$(document).on("click", "form input:submit, form button:submit", function() {
|
||||
var f = this.form;
|
||||
var token = get_ajax_token();
|
||||
|
||||
|
||||
@ -12,6 +12,12 @@ $error_msg = '';
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$check_keys = array('qa_title', 'qa_category', 'qa_skin', 'qa_mobile_skin', 'qa_use_email', 'qa_req_email', 'qa_use_hp', 'qa_req_hp', 'qa_use_sms', 'qa_send_number', 'qa_admin_hp', 'qa_admin_email', 'qa_subject_len', 'qa_mobile_subject_len', 'qa_page_rows', 'qa_mobile_page_rows', 'qa_image_width', 'qa_upload_size');
|
||||
|
||||
foreach($check_keys as $key){
|
||||
$$key = $_POST[$key] = isset($_POST[$key]) ? strip_tags($_POST[$key]) : '';
|
||||
}
|
||||
|
||||
$qa_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_head, 0, 255));
|
||||
$qa_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_tail, 0, 255));
|
||||
|
||||
@ -50,8 +56,6 @@ if( $qa_include_tail && ! is_include_path_check($qa_include_tail, 1) ){
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$_POST['qa_title'] = strip_tags($_POST['qa_title']);
|
||||
|
||||
$sql = " update {$g5['qa_config_table']}
|
||||
set qa_title = '{$_POST['qa_title']}',
|
||||
qa_category = '{$_POST['qa_category']}',
|
||||
|
||||
36
common.php
36
common.php
@ -216,10 +216,6 @@ ini_set("session.gc_divisor", 100); // session.gc_divisor는 session.gc_probabil
|
||||
session_set_cookie_params(0, '/');
|
||||
ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
|
||||
|
||||
@session_start();
|
||||
//==============================================================================
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// 공용 변수
|
||||
//------------------------------------------------------------------------------
|
||||
@ -227,6 +223,38 @@ ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
|
||||
// 기본적으로 사용하는 필드만 얻은 후 상황에 따라 필드를 추가로 얻음
|
||||
$config = get_config();
|
||||
|
||||
// 본인인증 또는 쇼핑몰 사용시에만 secure; SameSite=None 로 설정합니다.
|
||||
if( $config['cf_cert_use'] || (defined('G5_YOUNGCART_VER') && G5_YOUNGCART_VER) ) {
|
||||
// Chrome 80 버전부터 아래 이슈 대응
|
||||
// https://developers-kr.googleblog.com/2020/01/developers-get-ready-for-new.html?fbclid=IwAR0wnJFGd6Fg9_WIbQPK3_FxSSpFLqDCr9bjicXdzy--CCLJhJgC9pJe5ss
|
||||
if(!function_exists('session_start_samesite')) {
|
||||
function session_start_samesite($options = array())
|
||||
{
|
||||
$res = @session_start($options);
|
||||
|
||||
// IE 브라우저 또는 엣지브라우저 일때는 secure; SameSite=None 을 설정하지 않습니다.
|
||||
if( preg_match('/Edge/i', $_SERVER['HTTP_USER_AGENT']) || preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || preg_match('~Trident/7.0(; Touch)?; rv:11.0~',$_SERVER['HTTP_USER_AGENT']) ){
|
||||
return $res;
|
||||
}
|
||||
|
||||
$headers = headers_list();
|
||||
krsort($headers);
|
||||
foreach ($headers as $header) {
|
||||
if (!preg_match('~^Set-Cookie: PHPSESSID=~', $header)) continue;
|
||||
$header = preg_replace('~; secure(; HttpOnly)?$~', '', $header) . '; secure; SameSite=None';
|
||||
header($header, false);
|
||||
break;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
session_start_samesite();
|
||||
} else {
|
||||
@session_start();
|
||||
}
|
||||
//==============================================================================
|
||||
|
||||
define('G5_HTTP_BBS_URL', https_url(G5_BBS_DIR, false));
|
||||
define('G5_HTTPS_BBS_URL', https_url(G5_BBS_DIR, true));
|
||||
if ($config['cf_editor'])
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
********************/
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.4.1.4');
|
||||
define('G5_YOUNGCART_VER', '5.4.1.4');
|
||||
define('G5_GNUBOARD_VER', '5.4.1.7');
|
||||
define('G5_YOUNGCART_VER', '5.4.1.7');
|
||||
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
@ -113,7 +113,7 @@ function short_url_clean($string_url, $add_qry=''){
|
||||
|
||||
$array_page_names = run_replace('url_clean_page_names', array('board', 'write', 'content'));
|
||||
|
||||
if( strpos($string_url, G5_BBS_URL) === false || ! in_array($page_name, $array_page_names) ){ //게시판이 아니면 리턴
|
||||
if( stripos(preg_replace('/^https?:/i', '', $string_url), preg_replace('/^https?:/i', '', G5_BBS_URL)) === false || ! in_array($page_name, $array_page_names) ){ //게시판이 아니면 리턴
|
||||
return run_replace('false_short_url_clean', $string_url, $url, $page_name, $array_page_names);
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<li>
|
||||
<label for="me_recv_mb_id" class="sound_only">받는 회원아이디<strong>필수</strong></label>
|
||||
|
||||
<input type="text" name="me_recv_mb_id" value="<?php echo $me_recv_mb_id; ?>" id="me_recv_mb_id" required class="frm_input full_input required" size="47" placeholder="받는 회원닉네임">
|
||||
<input type="text" name="me_recv_mb_id" value="<?php echo $me_recv_mb_id; ?>" id="me_recv_mb_id" required class="frm_input full_input required" size="47" placeholder="받는 회원아이디">
|
||||
<span class="frm_info">여러 회원에게 보낼때는 컴마(,)로 구분하세요.
|
||||
<?php if ($config['cf_memo_send_point']) { ?><br>쪽지 보낼때 회원당 <?php echo number_format($config['cf_memo_send_point']); ?>점의 포인트를 차감합니다.<?php } ?>
|
||||
</span>
|
||||
|
||||
@ -151,7 +151,7 @@ if(!$view['qa_type']) {
|
||||
</a>
|
||||
</div>
|
||||
<div class="li_info">
|
||||
<span class="li_stat <?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></span>
|
||||
<span class="li_stat <?php echo ($rel_list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></span>
|
||||
<span class="li_date"><?php echo $rel_list[$i]['date']; ?></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -120,7 +120,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
<?php if ($nogood_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<b id="bo_v_act_nogood"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
@ -120,7 +120,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
<?php if ($nogood_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<b id="bo_v_act_nogood"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
@ -163,7 +163,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
</a>
|
||||
</td>
|
||||
<td class="td_date"><?php echo $rel_list[$i]['date']; ?></td>
|
||||
<td class="td_stat"><span class="<?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 답변완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> 답변대기'); ?></span></td>
|
||||
<td class="td_stat"><span class="<?php echo ($rel_list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 답변완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> 답변대기'); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -105,7 +105,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">',
|
||||
$k=0;
|
||||
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
|
||||
?>
|
||||
<div class="search_board_result">
|
||||
<h2><a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>"><?php echo $bo_subject[$idx] ?> 게시판 내 결과</a></h2>
|
||||
<a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>" class="sch_more">더보기</a>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
|
||||
@ -134,8 +136,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">',
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>" class="sch_more">더보기</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } //end for?>
|
||||
<?php if ($stx && $board_count) { ?></section><?php } ?>
|
||||
|
||||
<?php echo $write_pages ?>
|
||||
|
||||
@ -49,8 +49,9 @@ transition:all 0.1s ease-in-out}
|
||||
box-shadow:inset 0 2px 5px rgb(33, 135, 202)}
|
||||
|
||||
.sch_res_list {position:relative;margin-bottom:10px}
|
||||
.sch_res_list .search_board_result{position:relative}
|
||||
.sch_res_list h2 {margin:0 0 15px;font-size:1.2em}
|
||||
.sch_res_list ul {margin:0;padding:0;list-style:none;border-top:1px solid #ececec}
|
||||
.sch_res_list ul {margin:0 0 20px 0;padding:0;list-style:none;border-top:1px solid #ececec}
|
||||
.sch_res_list li {border-bottom:1px solid #ececec;background:#fff;position:relative}
|
||||
.sch_res_list .sch_tit {display:block;padding:20px 0 10px}
|
||||
.sch_res_list .pop_a {display:inline-block;background:#e8eeef;color:#6f777f;border-radius:50%;text-align:center;width:26px;height:26px;line-height:26px}
|
||||
@ -60,4 +61,4 @@ box-shadow:inset 0 2px 5px rgb(33, 135, 202)}
|
||||
.sch_res_list .sch_info:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.sch_res_list .profile_img img {border-radius:50%}
|
||||
.sch_res_list .sch_datetime {margin-left:5px}
|
||||
.sch_more {position:absolute;right:0;top:0;text-align:right;margin:10px 0 30px;color:#3a8afd}
|
||||
.sch_more {position:absolute;right:0;top:5px;text-align:right;font-weight:normal;color:#3a8afd}
|
||||
|
||||
@ -22,7 +22,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<li>
|
||||
<label for="me_recv_mb_id" class="sound_only">받는 회원아이디<strong>필수</strong></label>
|
||||
|
||||
<input type="text" name="me_recv_mb_id" value="<?php echo $me_recv_mb_id; ?>" id="me_recv_mb_id" required class="frm_input full_input required" size="47" placeholder="받는 회원닉네임">
|
||||
<input type="text" name="me_recv_mb_id" value="<?php echo $me_recv_mb_id; ?>" id="me_recv_mb_id" required class="frm_input full_input required" size="47" placeholder="받는 회원아이디">
|
||||
<span class="frm_info">여러 회원에게 보낼때는 컴마(,)로 구분하세요.
|
||||
<?php if ($config['cf_memo_send_point']) { ?><br>쪽지 보낼때 회원당 <?php echo number_format($config['cf_memo_send_point']); ?>점의 포인트를 차감합니다.<?php } ?>
|
||||
</span>
|
||||
|
||||
@ -151,7 +151,7 @@ if(!$view['qa_type']) {
|
||||
</a>
|
||||
</div>
|
||||
<div class="li_info">
|
||||
<span class="li_stat <?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></span>
|
||||
<span class="li_stat <?php echo ($rel_list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></span>
|
||||
<span class="li_date"><?php echo $rel_list[$i]['date']; ?></span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -120,7 +120,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
<?php if ($nogood_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<b id="bo_v_act_nogood"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
@ -120,7 +120,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
<?php if ($nogood_href) { ?>
|
||||
<span class="bo_v_act_gng">
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<a href="<?php echo $nogood_href.'&'.$qstr ?>" id="nogood_button" class="bo_v_nogood"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i><span class="sound_only">비추천</span><strong><?php echo number_format($view['wr_nogood']) ?></strong></a>
|
||||
<b id="bo_v_act_nogood"></b>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
@ -163,7 +163,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
</a>
|
||||
</td>
|
||||
<td class="td_date"><?php echo $rel_list[$i]['date']; ?></td>
|
||||
<td class="td_stat"><span class="<?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 답변완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> 답변대기'); ?></span></td>
|
||||
<td class="td_stat"><span class="<?php echo ($rel_list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 답변완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> 답변대기'); ?></span></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
@ -105,7 +105,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">',
|
||||
$k=0;
|
||||
for ($idx=$table_index, $k=0; $idx<count($search_table) && $k<$rows; $idx++) {
|
||||
?>
|
||||
<div class="search_board_result">
|
||||
<h2><a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>"><?php echo $bo_subject[$idx] ?> 게시판 내 결과</a></h2>
|
||||
<a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>" class="sch_more">더보기</a>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list[$idx]) && $k<$rows; $i++, $k++) {
|
||||
@ -134,8 +136,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$search_skin_url.'/style.css">',
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo get_pretty_url($search_table[$idx], '', $search_query); ?>" class="sch_more">더보기</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } //end for?>
|
||||
<?php if ($stx && $board_count) { ?></section><?php } ?>
|
||||
|
||||
<?php echo $write_pages ?>
|
||||
|
||||
@ -49,8 +49,9 @@ transition:all 0.1s ease-in-out}
|
||||
box-shadow:inset 0 2px 5px rgb(33, 135, 202)}
|
||||
|
||||
.sch_res_list {position:relative;margin-bottom:10px}
|
||||
.sch_res_list .search_board_result{position:relative}
|
||||
.sch_res_list h2 {margin:0 0 15px;font-size:1.2em}
|
||||
.sch_res_list ul {margin:0;padding:0;list-style:none;border-top:1px solid #ececec}
|
||||
.sch_res_list ul {margin:0 0 20px 0;padding:0;list-style:none;border-top:1px solid #ececec}
|
||||
.sch_res_list li {border-bottom:1px solid #ececec;background:#fff;position:relative}
|
||||
.sch_res_list .sch_tit {display:block;padding:20px 0 10px}
|
||||
.sch_res_list .pop_a {display:inline-block;background:#e8eeef;color:#6f777f;border-radius:50%;text-align:center;width:26px;height:26px;line-height:26px}
|
||||
@ -60,4 +61,4 @@ box-shadow:inset 0 2px 5px rgb(33, 135, 202)}
|
||||
.sch_res_list .sch_info:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.sch_res_list .profile_img img {border-radius:50%}
|
||||
.sch_res_list .sch_datetime {margin-left:5px}
|
||||
.sch_more {position:absolute;right:0;top:0;text-align:right;margin:10px 0 30px;color:#3a8afd}
|
||||
.sch_more {position:absolute;right:0;top:5px;text-align:right;font-weight:normal;color:#3a8afd}
|
||||
|
||||
Reference in New Issue
Block a user