Compare commits
37
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f910f192e | ||
|
|
bc2c939d72 | ||
|
|
b7c557f44e | ||
|
|
1ff5df8215 | ||
|
|
72d03f305c | ||
|
|
1ec9a0ee12 | ||
|
|
a061d6c863 | ||
|
|
4f2f725de8 | ||
|
|
fae53d3cd5 | ||
|
|
1fc3a343c2 | ||
|
|
5e1ab9c1e7 | ||
|
|
5605b539f4 | ||
|
|
a8baa8dd7d | ||
|
|
16051b3049 | ||
|
|
db1d56e07b | ||
|
|
4455f7d3c9 | ||
|
|
398967f804 | ||
|
|
ee75b32b3c | ||
|
|
c869f29f0d | ||
|
|
c95168fb0c | ||
|
|
b8ffd99362 | ||
|
|
64e1fbe786 | ||
|
|
91715ff830 | ||
|
|
1fb9e28510 | ||
|
|
babbc9afdb | ||
|
|
04030f9274 | ||
|
|
3085703c61 | ||
|
|
20dc211a82 | ||
|
|
a773839338 | ||
|
|
84b22909c5 | ||
|
|
28bfcea9c2 | ||
|
|
8cd1df0f43 | ||
|
|
cf2a8ab282 | ||
|
|
941f3e135a | ||
|
|
4b9b1af01e | ||
|
|
41d48891f4 | ||
|
|
616f5b8d46 |
+3
-4
@@ -617,13 +617,12 @@ if (!$member['mb_id']) {
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
$admin_key = md5($member['mb_datetime'] . get_real_client_ip() . $_SERVER['HTTP_USER_AGENT']);
|
||||
if (get_session('ss_mb_key') !== $admin_key) {
|
||||
|
||||
// 관리자의 클라이언트를 검증하여 일치하지 않으면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
if (!verify_mb_key($member)) {
|
||||
session_destroy();
|
||||
|
||||
include_once G5_LIB_PATH . '/mailer.lib.php';
|
||||
|
||||
// 메일 알림
|
||||
mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'] . ' 아이피로 XSS 공격이 있었습니다.<br><br>관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.<br><br>해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.' . G5_URL, 0);
|
||||
|
||||
|
||||
@@ -191,7 +191,6 @@ if ($copy_case == 'schema_data_both') {
|
||||
sql_query($sql, false);
|
||||
|
||||
// 4.00.01
|
||||
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
||||
$result = sql_query($sql, false);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
|
||||
+6
-4
@@ -8,7 +8,9 @@ if ($is_admin != 'super') {
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
}
|
||||
|
||||
$copy_config = get_config(true);
|
||||
// https://github.com/gnuboard/gnuboard5/issues/296 이슈처리
|
||||
$sql = " select * from {$g5['config_table']} limit 1";
|
||||
$config = sql_fetch($sql);
|
||||
|
||||
if (!isset($config['cf_add_script'])) {
|
||||
sql_query(
|
||||
@@ -699,14 +701,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리틱스<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.'); ?>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo get_text($copy_config['cf_analytics']); ?></textarea>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo get_text($config['cf_analytics']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_add_meta">추가 메타태그</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('추가로 사용하실 meta 태그를 입력합니다.<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.'); ?>
|
||||
<textarea name="cf_add_meta" id="cf_add_meta"><?php echo get_text($copy_config['cf_add_meta']); ?></textarea>
|
||||
<textarea name="cf_add_meta" id="cf_add_meta"><?php echo get_text($config['cf_add_meta']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1392,7 +1394,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<th scope="row"><label for="cf_add_script">추가 script, css</label></th>
|
||||
<td>
|
||||
<?php echo help('HTML의 </HEAD> 태그위로 추가될 JavaScript와 css 코드를 설정합니다.<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.') ?>
|
||||
<textarea name="cf_add_script" id="cf_add_script"><?php echo get_text($copy_config['cf_add_script']); ?></textarea>
|
||||
<textarea name="cf_add_script" id="cf_add_script"><?php echo get_text($config['cf_add_script']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -57,6 +57,9 @@ if ($w == "u") {
|
||||
if (!$co['co_id']) {
|
||||
alert('등록된 자료가 없습니다.');
|
||||
}
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($co, G5_CONTENT_DIR, false);
|
||||
|
||||
} else {
|
||||
$html_title .= ' 입력';
|
||||
$co = array(
|
||||
|
||||
@@ -207,6 +207,18 @@ if (defined('G5_USE_SHOP') && G5_USE_SHOP) {
|
||||
}
|
||||
}
|
||||
|
||||
// auth.au_menu 컬럼 크기 조정
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['auth_table']}` LIKE 'au_menu' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (
|
||||
stripos($row['Type'], 'varchar') !== false
|
||||
&& (int) preg_replace('/[^0-9]/', '', $row['Type']) <= 50
|
||||
) {
|
||||
sql_query(" ALTER TABLE `{$g5['auth_table']}` CHANGE `au_menu` `au_menu` VARCHAR(50) NOT NULL; ", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
|
||||
+43
-33
@@ -3,8 +3,10 @@ $sub_menu = '100000';
|
||||
require_once './_common.php';
|
||||
|
||||
@require_once './safe_check.php';
|
||||
|
||||
if (function_exists('social_log_file_delete')) {
|
||||
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
//소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
social_log_file_delete(86400);
|
||||
}
|
||||
|
||||
$g5['title'] = '관리자메인';
|
||||
@@ -14,8 +16,12 @@ $new_member_rows = 5;
|
||||
$new_point_rows = 5;
|
||||
$new_write_rows = 5;
|
||||
|
||||
if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$addtional_content_before = run_replace('adm_index_addtional_content_before', '', $is_admin, $auth, $member);
|
||||
if ($addtional_content_before) {
|
||||
echo $addtional_content_before;
|
||||
}
|
||||
|
||||
if (!auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
@@ -31,7 +37,7 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
@@ -41,11 +47,11 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 차단회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 12;
|
||||
@@ -78,7 +84,7 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
<?php
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
// 접근가능한 그룹수
|
||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$sql2 = " SELECT count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt']) {
|
||||
@@ -100,7 +106,7 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$mb_nick = get_sideview($row['mb_id'], get_text($row['mb_nick']), $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
?>
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_mbid"><?php echo $mb_id ?></td>
|
||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||
@@ -115,7 +121,7 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
<td class="td_boolean"><?php echo $row['mb_intercept_date'] ? '예' : '아니오'; ?></td>
|
||||
<td class="td_category"><?php echo $group ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
@@ -128,18 +134,17 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="./member_list.php">회원 전체보기</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
} //endif 최신 회원
|
||||
<?php
|
||||
} //endif 최신 회원
|
||||
|
||||
if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
if (!auth_check_menu($auth, '300100', 'r', true)) {
|
||||
|
||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||
|
||||
if ($gr_id) {
|
||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||
$sql_common .= " and b.gr_id = '{$gr_id}' ";
|
||||
}
|
||||
if (isset($view) && $view) {
|
||||
if ($view == 'w') {
|
||||
@@ -150,7 +155,7 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
}
|
||||
$sql_order = " order by a.bn_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
@@ -174,16 +179,16 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$sql = " SELECT a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$result = sql_query($sql);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||
|
||||
// 원글
|
||||
if ($row['wr_id'] == $row['wr_parent']) {
|
||||
// 원글
|
||||
$comment = "";
|
||||
$comment_link = "";
|
||||
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
@@ -194,12 +199,12 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
} else {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
} else // 코멘트
|
||||
{
|
||||
} else {
|
||||
// 코멘트
|
||||
$comment = '댓글. ';
|
||||
$comment_link = '#c_' . $row['wr_id'];
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" SELECT mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
@@ -211,7 +216,7 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'], 10) ?></a></td>
|
||||
@@ -223,7 +228,7 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
@@ -239,19 +244,19 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
</section>
|
||||
|
||||
<?php
|
||||
} //endif 최근게시물
|
||||
} //endif 최근게시물
|
||||
|
||||
if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
if (!auth_check_menu($auth, '200200', 'r', true)) {
|
||||
|
||||
$sql_common = " from {$g5['point_table']} ";
|
||||
$sql_search = " where (1) ";
|
||||
$sql_order = " order by po_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 7;
|
||||
@@ -282,7 +287,7 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
$row2['mb_id'] = '';
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
if ($row2['mb_id'] != $row['mb_id']) {
|
||||
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$sql2 = " SELECT mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
}
|
||||
|
||||
@@ -293,7 +298,7 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||
@@ -307,7 +312,7 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
<td class="td_numbig"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
@@ -323,6 +328,11 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
} //endif
|
||||
require_once './admin.tail.php';
|
||||
<?php
|
||||
} //endif
|
||||
|
||||
$addtional_content_after = run_replace('adm_index_addtional_content_after', '', $is_admin, $auth, $member);
|
||||
if ($addtional_content_after) {
|
||||
echo $addtional_content_after;
|
||||
}
|
||||
require_once './admin.tail.php';
|
||||
@@ -184,6 +184,8 @@ $sql = " update {$g5['g5_shop_item_table']}
|
||||
where it_id = '$new_it_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
if( function_exists('shop_seo_title_update') ) shop_seo_title_update($new_it_id, true);
|
||||
|
||||
/**
|
||||
* 아이템 복사 처리 후 Event Hook
|
||||
* @var string $it_id 원본 아이템 ID
|
||||
|
||||
@@ -112,6 +112,8 @@ else if ($w == "u")
|
||||
|
||||
if(!$it)
|
||||
alert('상품정보가 존재하지 않습니다.');
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($it, G5_SHOP_DIR, false);
|
||||
|
||||
if (! (isset($ca_id) && $ca_id))
|
||||
$ca_id = $it['ca_id'];
|
||||
|
||||
@@ -104,6 +104,13 @@ if (!$is_search_bbs) {
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
$list[$i]['is_notice'] = true;
|
||||
$list[$i]['list_content'] = $list[$i]['wr_content'];
|
||||
|
||||
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$list[$i]['wr_content'] = '';
|
||||
}
|
||||
|
||||
$list[$i]['num'] = 0;
|
||||
$i++;
|
||||
$notice_count++;
|
||||
@@ -197,6 +204,13 @@ if($page_rows > 0) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
$list[$i]['is_notice'] = false;
|
||||
$list[$i]['list_content'] = $list[$i]['wr_content'];
|
||||
|
||||
// 비밀글인 경우 리스트에서 내용이 출력되지 않게 글 내용을 지웁니다.
|
||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||
$list[$i]['wr_content'] = '';
|
||||
}
|
||||
|
||||
$list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count;
|
||||
$list[$i]['num'] = $list_num - $k;
|
||||
|
||||
|
||||
+3
-2
@@ -71,8 +71,9 @@ if (! (defined('SKIP_SESSION_REGENERATE_ID') && SKIP_SESSION_REGENERATE_ID)) {
|
||||
|
||||
// 회원아이디 세션 생성
|
||||
set_session('ss_mb_id', $mb['mb_id']);
|
||||
// FLASH XSS 공격에 대응하기 위하여 회원의 고유키를 생성해 놓는다. 관리자에서 검사함 - 110106
|
||||
set_session('ss_mb_key', md5($mb['mb_datetime'] . get_real_client_ip() . $_SERVER['HTTP_USER_AGENT']));
|
||||
// FLASH XSS 공격에 대응하기 위하여 회원의 고유키를 생성해 놓는다. 관리자에서 검사함
|
||||
generate_mb_key($mb);
|
||||
|
||||
// 회원의 토큰키를 세션에 저장한다. /common.php 에서 해당 회원의 토큰값을 검사한다.
|
||||
if(function_exists('update_auth_session_token')) update_auth_session_token($mb['mb_datetime']);
|
||||
|
||||
|
||||
+7
-6
@@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result))
|
||||
}
|
||||
|
||||
$sql = " insert into $move_write_table
|
||||
set wr_num = '$next_wr_num',
|
||||
set wr_num = " . ($next_wr_num ? "'$next_wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $move_write_table sq) ") . ",
|
||||
wr_reply = '{$row2['wr_reply']}',
|
||||
wr_is_comment = '{$row2['wr_is_comment']}',
|
||||
wr_comment = '{$row2['wr_comment']}',
|
||||
@@ -118,14 +118,15 @@ while ($row = sql_fetch_array($result))
|
||||
sql_query($sql);
|
||||
|
||||
$insert_id = sql_insert_id();
|
||||
|
||||
if ($next_wr_num === 0) {
|
||||
$tmp = sql_fetch("select wr_num from $move_write_table where wr_id = '$insert_id'");
|
||||
$next_wr_num = $tmp['wr_num'];
|
||||
}
|
||||
|
||||
// 코멘트가 아니라면
|
||||
if (!$row2['wr_is_comment'])
|
||||
{
|
||||
if (! $row2['wr_reply']) {
|
||||
$next_wr_num = -$insert_id;
|
||||
}
|
||||
|
||||
$save_parent = $insert_id;
|
||||
|
||||
$sql3 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' order by bf_no ";
|
||||
@@ -206,7 +207,7 @@ while ($row = sql_fetch_array($result))
|
||||
}
|
||||
}
|
||||
|
||||
sql_query(" update $move_write_table set wr_parent = '$save_parent', wr_num = '$next_wr_num' where wr_id = '$insert_id' ");
|
||||
sql_query(" update $move_write_table set wr_parent = '$save_parent' where wr_id = '$insert_id' ");
|
||||
|
||||
if ($sw == 'move')
|
||||
$save[$cnt]['wr_id'] = $row2['wr_parent'];
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($write, G5_BBS_DIR, true);
|
||||
|
||||
// 게시판에서 두단어 이상 검색 후 검색된 게시물에 코멘트를 남기면 나오던 오류 수정
|
||||
$sop = strtolower($sop);
|
||||
if ($sop != 'and' && $sop != 'or')
|
||||
|
||||
+10
-6
@@ -257,9 +257,9 @@ if ($w == '' || $w == 'r') {
|
||||
$wr_num = 0;
|
||||
$wr_reply = '';
|
||||
}
|
||||
|
||||
|
||||
$sql = " insert into $write_table
|
||||
set wr_num = '$wr_num',
|
||||
set wr_num = " . ($w == 'r' ? "'$wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $write_table sq) ") . ",
|
||||
wr_reply = '$wr_reply',
|
||||
wr_comment = 0,
|
||||
ca_name = '$ca_name',
|
||||
@@ -296,10 +296,8 @@ if ($w == '' || $w == 'r') {
|
||||
|
||||
$wr_id = sql_insert_id();
|
||||
|
||||
$add_wr_update_sql = ($wr_num === 0) ? ", wr_num = '-$wr_id' " : "";
|
||||
|
||||
// 부모 아이디에 UPDATE
|
||||
sql_query(" update $write_table set wr_parent = '$wr_id' $add_wr_update_sql where wr_id = '$wr_id' ");
|
||||
sql_query(" update $write_table set wr_parent = '$wr_id' where wr_id = '$wr_id' ");
|
||||
|
||||
// 새글 INSERT
|
||||
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$bo_table}', '{$wr_id}', '{$wr_id}', '".G5_TIME_YMDHIS."', '{$member['mb_id']}' ) ");
|
||||
@@ -680,8 +678,14 @@ sql_query(" delete from {$g5['autosave_table']} where as_uid = '{$uid}' ");
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// 비밀글이라면 세션에 비밀글의 아이디를 저장한다. 자신의 글은 다시 비밀번호를 묻지 않기 위함
|
||||
if ($secret)
|
||||
if ($secret) {
|
||||
if (! $wr_num) {
|
||||
$write = get_write($write_table, $wr_id, true);
|
||||
$wr_num = $write['wr_num'];
|
||||
}
|
||||
|
||||
set_session("ss_secret_{$bo_table}_{$wr_num}", TRUE);
|
||||
}
|
||||
|
||||
// 메일발송 사용 (수정글은 발송하지 않음)
|
||||
if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_email']) {
|
||||
|
||||
+18
-9
@@ -226,7 +226,12 @@ ini_set("session.gc_maxlifetime", 10800); // session data의 garbage collection
|
||||
ini_set("session.gc_probability", 1); // session.gc_probability는 session.gc_divisor와 연계하여 gc(쓰레기 수거) 루틴의 시작 확률을 관리합니다. 기본값은 1입니다. 자세한 내용은 session.gc_divisor를 참고하십시오.
|
||||
ini_set("session.gc_divisor", 100); // session.gc_divisor는 session.gc_probability와 결합하여 각 세션 초기화 시에 gc(쓰레기 수거) 프로세스를 시작할 확률을 정의합니다. 확률은 gc_probability/gc_divisor를 사용하여 계산합니다. 즉, 1/100은 각 요청시에 GC 프로세스를 시작할 확률이 1%입니다. session.gc_divisor의 기본값은 100입니다.
|
||||
|
||||
session_set_cookie_params(0, '/', null, false, true);
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
|
||||
session_set_cookie_params(0, '/', null, true, true);
|
||||
} else {
|
||||
session_set_cookie_params(0, '/', null, false, true);
|
||||
}
|
||||
|
||||
ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
|
||||
|
||||
function chrome_domain_session_name(){
|
||||
@@ -381,7 +386,7 @@ if( $config['cf_cert_use'] || (defined('G5_YOUNGCART_VER') && G5_YOUNGCART_VER)
|
||||
$cookie_session_name = method_exists('XenoPostToForm', 'g5_session_name') ? XenoPostToForm::g5_session_name() : 'PHPSESSID';
|
||||
foreach ($headers as $header) {
|
||||
if (!preg_match('~^Set-Cookie: '.$cookie_session_name.'=~', $header)) continue;
|
||||
$header = preg_replace('~; secure(; HttpOnly)?$~', '', $header) . '; secure; SameSite=None';
|
||||
$header = preg_replace('~(; secure; HttpOnly)?$~', '; secure; HttpOnly; SameSite=None', $header);
|
||||
header($header, false);
|
||||
$g5['session_cookie_samesite'] = 'none';
|
||||
break;
|
||||
@@ -484,6 +489,7 @@ if (isset($_REQUEST['w'])) {
|
||||
$w = '';
|
||||
}
|
||||
|
||||
/** @var int $wr_id 게시판 글의 ID */
|
||||
if (isset($_REQUEST['wr_id'])) {
|
||||
$wr_id = (int)$_REQUEST['wr_id'];
|
||||
} else {
|
||||
@@ -507,7 +513,7 @@ if (isset($_REQUEST['url'])) {
|
||||
if (G5_DOMAIN) {
|
||||
$p = @parse_url(G5_DOMAIN);
|
||||
$p['path'] = isset($p['path']) ? $p['path'] : '/';
|
||||
$urlencode = G5_DOMAIN.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", $urlencode));
|
||||
$urlencode = rtrim(G5_DOMAIN, '%2F').'%2F'.ltrim(urldecode(preg_replace("/^".urlencode($p['path'])."/", "", $urlencode)), '%2F');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,27 +587,30 @@ if (isset($_SESSION['ss_mb_id']) && $_SESSION['ss_mb_id']) { // 로그인중이
|
||||
}
|
||||
|
||||
|
||||
/** @var array $write 글 데이터 */
|
||||
$write = array();
|
||||
/** @var string $write_table 게시판 테이블 전체이름 */
|
||||
$write_table = '';
|
||||
if ($bo_table) {
|
||||
$board = get_board_db($bo_table, true);
|
||||
if (isset($board['bo_table']) && $board['bo_table']) {
|
||||
set_cookie("ck_bo_table", $board['bo_table'], 86400 * 1);
|
||||
$gr_id = $board['gr_id'];
|
||||
$write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
|
||||
// 게시판 테이블 전체이름
|
||||
$write_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
if (isset($wr_id) && $wr_id) {
|
||||
$write = get_write($write_table, $wr_id);
|
||||
} else if (isset($wr_seo_title) && $wr_seo_title) {
|
||||
$write = get_content_by_field($write_table, 'bbs', 'wr_seo_title', generate_seo_title($wr_seo_title));
|
||||
if( isset($write['wr_id']) ){
|
||||
$wr_id = $write['wr_id'];
|
||||
if (isset($write['wr_id'])) {
|
||||
$wr_id = (int) $write['wr_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 게시판에서
|
||||
if (isset($board['bo_select_editor']) && $board['bo_select_editor']){
|
||||
|
||||
// 게시판에서 사용하는 에디터를 설정
|
||||
if (isset($board['bo_select_editor']) && $board['bo_select_editor']) {
|
||||
$config['cf_editor'] = $board['bo_select_editor'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
DROP TABLE IF EXISTS `g5_auth`;
|
||||
CREATE TABLE IF NOT EXISTS `g5_auth` (
|
||||
`mb_id` varchar(20) NOT NULL default '',
|
||||
`au_menu` varchar(20) NOT NULL default '',
|
||||
`au_menu` varchar(50) NOT NULL default '',
|
||||
`au_auth` set('r','w','d') NOT NULL default '',
|
||||
PRIMARY KEY (`mb_id`,`au_menu`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
function kakaolink_send(text, url, image)
|
||||
{
|
||||
if (window.Kakao && (kakao_javascript_apikey !== undefined)) {
|
||||
if (! Kakao.isInitialized()) {
|
||||
Kakao.init(kakao_javascript_apikey);
|
||||
}
|
||||
}
|
||||
|
||||
if( image === undefined ){
|
||||
image = '';
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ Class G5_object_cache {
|
||||
* @param string $key
|
||||
* @param string $group
|
||||
* @return bool
|
||||
* kkigomi 님이 고쳐주심
|
||||
*/
|
||||
function delete($type, $key, $group = 'default')
|
||||
{
|
||||
|
||||
+73
-6
@@ -155,6 +155,10 @@ function set_cookie($cookie_name, $value, $expire, $path='/', $domain=G5_COOKIE_
|
||||
global $g5;
|
||||
|
||||
$c = run_replace('set_cookie_params', array('path'=>$path, 'domain'=>$domain, 'secure'=>$secure, 'httponly'=>$httponly), $cookie_name);
|
||||
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
|
||||
$c['secure'] = true;
|
||||
}
|
||||
|
||||
setcookie(md5($cookie_name), base64_encode($value), G5_SERVER_TIME + $expire, $c['path'], $c['domain'], $c['secure'], $c['httponly']);
|
||||
}
|
||||
@@ -651,7 +655,7 @@ function html_purifier($html)
|
||||
if ((function_exists('check_html_link_nofollow') && check_html_link_nofollow('html_purifier'))) {
|
||||
$config->set('HTML.Nofollow', true); // rel=nofollow 으로 스팸유입을 줄임
|
||||
}
|
||||
$config->set('URI.SafeIframeRegexp', '%^(https?:)?//(' . $safeiframe . ')%');
|
||||
$config->set('URI.SafeIframeRegexp', '%^(https?:)?//(' . preg_replace('/\\\?\./', '\.', $safeiframe) . ')%');
|
||||
$config->set('Attr.AllowedFrameTargets', array('_blank'));
|
||||
//유튜브, 비메오 전체화면 가능하게 하기
|
||||
$config->set('Filter.Custom', array(new HTMLPurifier_Filter_Iframevideo()));
|
||||
@@ -1843,11 +1847,22 @@ function sql_free_result($result)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* MySQL PASSWORD() 함수로 생성된 비밀번호의 hash 값을 반환
|
||||
*
|
||||
* MySQL 버전에 따라 결과가 다르게 나올 수 있음.
|
||||
* MySQL 8.0.11 버전 이상에서는 오류 발생(PASSWORD 함수가 제거됨)으로 사용할 수 없음.
|
||||
*
|
||||
* @deprecated 이 함수는 안전하지 않으므로 사용하지 않는 것을 권장 함
|
||||
* @see get_encrypt_string() and check_password()
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
function sql_password($value)
|
||||
{
|
||||
// mysql 4.0x 이하 버전에서는 password() 함수의 결과가 16bytes
|
||||
// mysql 4.1x 이상 버전에서는 password() 함수의 결과가 41bytes
|
||||
$row = sql_fetch(" select password('$value') as pass ");
|
||||
$row = sql_fetch(" SELECT password('{$value}') as pass ");
|
||||
|
||||
return $row['pass'];
|
||||
}
|
||||
@@ -2255,6 +2270,53 @@ function check_token()
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 브라우저 검증을 위한 세션 반환 및 재생성
|
||||
* @param array $member 로그인 된 회원의 정보. 가입일시(mb_datetime)를 반드시 포함해야 한다.
|
||||
* @param bool $regenerate true 이면 재생성
|
||||
* @return string
|
||||
*/
|
||||
function ss_mb_key($member, $regenerate = false)
|
||||
{
|
||||
$client_key = ($regenerate) ? null : get_cookie('mb_client_key');
|
||||
|
||||
if (!$client_key) {
|
||||
$client_key = get_random_token_string(16);
|
||||
set_cookie('mb_client_key', $client_key, G5_SERVER_TIME * -1);
|
||||
}
|
||||
|
||||
$mb_key = md5($member['mb_datetime'] . $client_key) . run_replace('ss_mb_key_user_agent', md5($_SERVER['HTTP_USER_AGENT']));
|
||||
|
||||
return $mb_key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원의 클라이언트 검증
|
||||
* @param array $member 로그인 된 회원의 정보. 가입일시(mb_datetime)를 반드시 포함해야 한다.
|
||||
* @return bool
|
||||
*/
|
||||
function verify_mb_key($member)
|
||||
{
|
||||
$mb_key = ss_mb_key($member);
|
||||
$verified = get_session('ss_mb_key') === $mb_key;
|
||||
|
||||
if (!$verified) {
|
||||
ss_mb_key($member, true);
|
||||
}
|
||||
|
||||
return $verified;
|
||||
}
|
||||
|
||||
/**
|
||||
* 회원의 클라이언트 검증 키 생성
|
||||
* 클라이언트 키를 다시 생성하여 생성된 키는 `ss_mb_key` 세션에 저장됨
|
||||
* @param array $member 로그인 된 회원의 정보. 가입일시(mb_datetime)를 반드시 포함해야 한다.
|
||||
*/
|
||||
function generate_mb_key($member)
|
||||
{
|
||||
$mb_key = ss_mb_key($member, true);
|
||||
set_session('ss_mb_key', $mb_key);
|
||||
}
|
||||
|
||||
// 문자열에 utf8 문자가 들어 있는지 검사하는 함수
|
||||
// 코드 : http://in2.php.net/manual/en/function.mb-check-encoding.php#95289
|
||||
@@ -2464,14 +2526,19 @@ function check_device($device)
|
||||
}
|
||||
|
||||
|
||||
// 게시판 최신글 캐시 파일 삭제
|
||||
/**
|
||||
* 게시판 최신글 캐시 파일 삭제
|
||||
* @param string $bo_table 게시판 ID
|
||||
*/
|
||||
function delete_cache_latest($bo_table)
|
||||
{
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) {
|
||||
return;
|
||||
}
|
||||
|
||||
g5_delete_cache_by_prefix('latest-'.$bo_table.'-');
|
||||
run_event('delete_cache_latest', $bo_table);
|
||||
|
||||
g5_delete_cache_by_prefix('latest-' . $bo_table . '-');
|
||||
}
|
||||
|
||||
// 게시판 첨부파일 썸네일 삭제
|
||||
@@ -3804,7 +3871,7 @@ function check_vaild_callback($callback){
|
||||
class str_encrypt
|
||||
{
|
||||
var $salt;
|
||||
var $lenght;
|
||||
var $length;
|
||||
|
||||
function __construct($salt='')
|
||||
{
|
||||
@@ -4157,7 +4224,7 @@ function get_random_token_string($length=6)
|
||||
}
|
||||
|
||||
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
$output = substr(str_shuffle($characters), 0, $length); // jihan001 님 제안코드로 수정
|
||||
$output = substr(str_shuffle($characters), 0, $length);
|
||||
|
||||
return bin2hex($output);
|
||||
}
|
||||
|
||||
@@ -145,8 +145,12 @@ function get_content_by_field($write_table, $type='bbs', $where_field='', $where
|
||||
{
|
||||
global $g5, $g5_object;
|
||||
|
||||
$order_key = 'wr_id';
|
||||
|
||||
if( $type === 'content' ){
|
||||
$check_array = array('co_id', 'co_html', 'co_subject', 'co_content', 'co_seo_title', 'co_mobile_content', 'co_skin', 'co_mobile_skin', 'co_tag_filter_use', 'co_hit', 'co_include_head', 'co_include_tail');
|
||||
|
||||
$order_key = 'co_id';
|
||||
} else {
|
||||
$check_array = array('wr_id', 'wr_num', 'wr_reply', 'wr_parent', 'wr_is_comment', 'ca_name', 'wr_option', 'wr_subject', 'wr_content', 'wr_seo_title', 'wr_link1', 'wr_link2', 'wr_hit', 'wr_good', 'wr_nogood', 'mb_id', 'wr_name', 'wr_email', 'wr_homepage', 'wr_datetime', 'wr_ip', 'wr_1', 'wr_2', 'wr_3', 'wr_4', 'wr_5', 'wr_6', 'wr_7', 'wr_8', 'wr_9', 'wr_10');
|
||||
}
|
||||
@@ -162,7 +166,7 @@ function get_content_by_field($write_table, $type='bbs', $where_field='', $where
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$write_table} where $where_field = '".sql_real_escape_string($where_value)."' ";
|
||||
$sql = " select * from {$write_table} where $where_field = '".sql_real_escape_string($where_value)."' order by $order_key desc limit 1 ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
@@ -394,7 +398,7 @@ function get_mb_icon_name($mb_id){
|
||||
// 생성되면 안되는 게시판명
|
||||
function get_bo_table_banned_word(){
|
||||
|
||||
$folders = array();
|
||||
$folders = array(G5_CONTENT_DIR, 'rss');
|
||||
|
||||
foreach(glob(G5_PATH.'/*', GLOB_ONLYDIR) as $dir) {
|
||||
$folders[] = basename($dir);
|
||||
|
||||
@@ -32,9 +32,9 @@ function get_shop_item_with_category($it_id, $seo_title='', $add_query=''){
|
||||
global $g5, $default;
|
||||
|
||||
if( $seo_title ){
|
||||
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_seo_title = '".sql_real_escape_string(generate_seo_title($seo_title))."' and a.ca_id = b.ca_id $add_query";
|
||||
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_seo_title = '".sql_real_escape_string(generate_seo_title($seo_title))."' and a.ca_id = b.ca_id $add_query order by it_id desc limit 1";
|
||||
} else {
|
||||
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id $add_query";
|
||||
$sql = " select a.*, b.ca_name, b.ca_use from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id $add_query order by it_id desc limit 1";
|
||||
}
|
||||
|
||||
$item = sql_fetch($sql);
|
||||
|
||||
+10
-3
@@ -10,15 +10,22 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
||||
$filename = $alt = $data_path = '';
|
||||
$edt = false;
|
||||
|
||||
$row = get_thumbnail_find_cache($bo_table, $wr_id, 'file');
|
||||
$empty_array = array('src'=>'', 'ori'=>'', 'alt'=>'');
|
||||
|
||||
if(isset($row['bf_file']) && $row['bf_file']) {
|
||||
$write = get_thumbnail_find_cache($bo_table, $wr_id, 'content');
|
||||
|
||||
// 비밀글이면 썸네일을 노출하지 않습니다.
|
||||
if (isset($write['wr_option']) && strstr($write['wr_option'], "secret")) {
|
||||
return run_replace('is_secret_list_thumbnail', $empty_array, $bo_table, $write);
|
||||
}
|
||||
|
||||
$row = get_thumbnail_find_cache($bo_table, $wr_id, 'file');
|
||||
|
||||
if (isset($row['bf_file']) && $row['bf_file']) {
|
||||
$filename = $row['bf_file'];
|
||||
$filepath = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
$alt = get_text($row['bf_content']);
|
||||
} else {
|
||||
$write = get_thumbnail_find_cache($bo_table, $wr_id, 'content');
|
||||
$edt = true;
|
||||
|
||||
if( $matches = get_editor_image($write['wr_content'], false) ){
|
||||
|
||||
+53
-2
@@ -253,10 +253,61 @@ function exist_seo_url($type, $seo_title, $write_table, $sql_id=0){
|
||||
return '';
|
||||
}
|
||||
|
||||
function check_case_exist_title($data, $case=G5_BBS_DIR, $is_redirect=false) {
|
||||
global $config, $g5, $board;
|
||||
|
||||
if ((int) $config['cf_bbs_rewrite'] !== 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
$seo_title = '';
|
||||
$redirect_url = '';
|
||||
|
||||
if ($case == G5_BBS_DIR && isset($data['wr_seo_title'])) {
|
||||
$db_table = $g5['write_prefix'].$board['bo_table'];
|
||||
|
||||
if (exist_seo_url($case, $data['wr_seo_title'], $db_table, $data['wr_id'])) {
|
||||
$seo_title = $data['wr_seo_title'].'-'.$data['wr_id'];
|
||||
$sql = " update `{$db_table}` set wr_seo_title = '".sql_real_escape_string($seo_title)."' where wr_id = '{$data['wr_id']}' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
get_write($db_table, $data['wr_id'], false);
|
||||
$redirect_url = get_pretty_url($board['bo_table'], $data['wr_id']);
|
||||
}
|
||||
} else if ($case == G5_CONTENT_DIR && isset($data['co_seo_title'])) {
|
||||
$db_table = $g5['content_table'];
|
||||
|
||||
if (exist_seo_url($case, $data['co_seo_title'], $db_table, $data['co_id'])) {
|
||||
$seo_title = $data['co_seo_title'].'-'.substr(get_random_token_string(4), 4);
|
||||
$sql = " update `{$db_table}` set co_seo_title = '".sql_real_escape_string($seo_title)."' where co_id = '{$data['co_id']}' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
get_content_db($data['co_id'], false);
|
||||
g5_delete_cache_by_prefix('content-' . $data['co_id'] . '-');
|
||||
$redirect_url = get_pretty_url($case, $data['co_id']);
|
||||
}
|
||||
} else if (defined('G5_SHOP_DIR') && $case == G5_SHOP_DIR && isset($data['it_seo_title'])) {
|
||||
$db_table = $g5['g5_shop_item_table'];
|
||||
|
||||
if (shop_exist_check_seo_title($data['it_seo_title'], $case, $db_table, $data['it_id'])) {
|
||||
$seo_title = $data['it_seo_title'].'-'.substr(get_random_token_string(4), 4);
|
||||
$sql = " update `{$db_table}` set it_seo_title = '".sql_real_escape_string($seo_title)."' where it_id = '{$data['it_id']}' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
get_shop_item($data['it_id'], false);
|
||||
$redirect_url = get_pretty_url($case, $data['it_id']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_redirect && $seo_title && $redirect_url) {
|
||||
goto_url($redirect_url);
|
||||
}
|
||||
}
|
||||
|
||||
function exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id=0){
|
||||
static $count = 0;
|
||||
|
||||
$seo_title_add = ($count > 0) ? utf8_strcut($seo_title, 200 - ($count+1), '')."-$count" : $seo_title;
|
||||
$seo_title_add = ($count > 0) ? utf8_strcut($seo_title, 100000 - ($count+1), '')."-$count" : $seo_title;
|
||||
|
||||
if( ! exist_seo_url($type, $seo_title_add, $write_table, $sql_id) ){
|
||||
return $seo_title_add;
|
||||
@@ -264,7 +315,7 @@ function exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id=0){
|
||||
|
||||
$count++;
|
||||
|
||||
if( $count > 198 ){
|
||||
if( $count > 99998 ){
|
||||
return $seo_title_add;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ if( isset($row['it_seo_title']) && ! $row['it_seo_title'] ){
|
||||
shop_seo_title_update($row['it_id']);
|
||||
}
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($it, G5_SHOP_DIR, true);
|
||||
|
||||
if (!($it['ca_use'] && $it['it_use'])) {
|
||||
if (!$is_admin)
|
||||
alert('판매가능한 상품이 아닙니다.');
|
||||
|
||||
@@ -99,7 +99,7 @@ class PayService extends SoapClient
|
||||
var $resMsg;
|
||||
|
||||
|
||||
public function PayService( $wsdl = "", $options = array() )
|
||||
public function __construct( $wsdl = "", $options = array() )
|
||||
{
|
||||
foreach( self::$classmap as $key => $value )
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<h2>회원로그인 안내</h2>
|
||||
<div>
|
||||
<a href="<?php echo G5_BBS_URL ?>/password_lost.php">아이디/비밀번호 찾기</a>
|
||||
<a href="./register.php">회원 가입</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/register.php">회원 가입</a>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
@@ -8,11 +8,10 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<form name="fitem" action="<?php echo $action_url; ?>" method="post" onsubmit="return fitem_submit(this);">
|
||||
|
||||
@@ -10,11 +10,10 @@ add_javascript('<script src="'.G5_JS_URL.'/shop.list.action.js"></script>', 10);
|
||||
|
||||
<?php if(!defined('G5_IS_SHOP_AJAX_LIST') && $config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 메인상품진열 10 시작 { -->
|
||||
|
||||
@@ -10,11 +10,10 @@ add_javascript('<script src="'.G5_JS_URL.'/shop.list.action.js"></script>', 10);
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 메인상품진열 10 시작 { -->
|
||||
|
||||
@@ -11,11 +11,10 @@ add_javascript('<script src="'.G5_JS_URL.'/shop.list.action.js"></script>', 10);
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.fancylist.js"></script>
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 메인상품진열 20 시작 { -->
|
||||
|
||||
@@ -11,11 +11,10 @@ add_javascript('<script src="'.G5_JS_URL.'/shop.list.action.js"></script>', 10);
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
<div class="st_30_wr">
|
||||
<!-- 메인상품진열 30 시작 { -->
|
||||
|
||||
@@ -8,11 +8,10 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.fancylist.js"></script>
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 상품진열 10 시작 { -->
|
||||
|
||||
@@ -61,9 +61,9 @@ if( !class_exists('HTMLPurifier_Filter_Iframevideo') ){
|
||||
protected function postFilterCallback($matches)
|
||||
{
|
||||
// Domain Whitelist
|
||||
$youTubeMatch = preg_match('#src="https?://www.youtube(-nocookie)?.com/#i', $matches[1]);
|
||||
$vimeoMatch = preg_match('#src="https?://player.vimeo.com/#i', $matches[1]);
|
||||
$fackbookMatch = preg_match('#src="https?://www.facebook.com/#i', $matches[1]);
|
||||
$youTubeMatch = preg_match('#src="https?://www\.youtube(-nocookie)?\.com/#i', $matches[1]);
|
||||
$vimeoMatch = preg_match('#src="https?://player\.vimeo\.com/#i', $matches[1]);
|
||||
$fackbookMatch = preg_match('#src="https?://www\.facebook\.com/#i', $matches[1]);
|
||||
if ($youTubeMatch || $vimeoMatch || $fackbookMatch) {
|
||||
$extra = ' frameborder="0"';
|
||||
if ($youTubeMatch || $fackbookMatch) {
|
||||
|
||||
@@ -12,9 +12,9 @@ if($config['cf_cert_use'] == 2) { // 실서비스 일때
|
||||
$mTxId ='SIR_'.$max_cr_id;
|
||||
certify_count_check($member['mb_id'], 'simple'); // 금일 인증시도 횟수 체크
|
||||
} else { // 테스트 일때
|
||||
$mid = "INIiasTest";
|
||||
$apiKey = "TGdxb2l3enJDWFRTbTgvREU3MGYwUT09";
|
||||
$mTxId ='test_'.$max_cr_id;
|
||||
$mid = "SRAiasTest";
|
||||
$apiKey = "43700dfd4c795fe9550853aef3b6aaf1";
|
||||
$mTxId ='SIR_'.$max_cr_id;
|
||||
}
|
||||
$reqSvcCd ='01';
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ $payReqMap = $_SESSION['lgd_certify'];//결제 요청시, Session에 저장했
|
||||
</head>
|
||||
<body onload="setLGDResult()">
|
||||
<?php
|
||||
$LGD_RESPCODE = isset($_POST['LGD_RESPCODE']) ? $_POST['LGD_RESPCODE'] : '';
|
||||
$LGD_RESPMSG = isset($_POST['LGD_RESPMSG']) ? iconv("EUC-KR", "UTF-8", $_POST['LGD_RESPMSG']) : '';
|
||||
$LGD_RESPCODE = isset($_POST['LGD_RESPCODE']) ? clean_xss_tags($_POST['LGD_RESPCODE']) : '';
|
||||
$LGD_RESPMSG = isset($_POST['LGD_RESPMSG']) ? clean_xss_tags(iconv("EUC-KR", "UTF-8", $_POST['LGD_RESPMSG'])) : '';
|
||||
$LGD_AUTHONLYKEY = "";
|
||||
$LGD_PAYTYPE = "";
|
||||
|
||||
@@ -47,8 +47,8 @@ $payReqMap = $_SESSION['lgd_certify'];//결제 요청시, Session에 저장했
|
||||
$payReqMap['LGD_RESPMSG'] = $LGD_RESPMSG;
|
||||
|
||||
if($LGD_RESPCODE == "0000"){
|
||||
$payReqMap['LGD_AUTHONLYKEY'] = isset($_POST['LGD_AUTHONLYKEY']) ? $_POST['LGD_AUTHONLYKEY'] : '';
|
||||
$payReqMap['LGD_PAYTYPE'] = isset($_POST['LGD_PAYTYPE']) ? $_POST['LGD_PAYTYPE'] : '';
|
||||
$payReqMap['LGD_AUTHONLYKEY'] = isset($_POST['LGD_AUTHONLYKEY']) ? clean_xss_tags($_POST['LGD_AUTHONLYKEY']) : '';
|
||||
$payReqMap['LGD_PAYTYPE'] = isset($_POST['LGD_PAYTYPE']) ? clean_xss_tags($_POST['LGD_PAYTYPE']) : '';
|
||||
}
|
||||
else{
|
||||
echo "LGD_RESPCODE:" . $LGD_RESPCODE . " ,LGD_RESPMSG:" . $LGD_RESPMSG; //인증 실패에 대한 처리 로직 추가
|
||||
|
||||
@@ -25,13 +25,19 @@ $bo_v_sns_class = $config['cf_kakao_js_apikey'] ? 'show_kakao' : '';
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="//developers.kakao.com/sdk/js/kakao.min.js" async charset="utf-8"></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js" charset="utf-8"></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>" charset="utf-8"></script>
|
||||
<script type='text/javascript'>
|
||||
//<![CDATA[
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
|
||||
function Kakao_sendLink() {
|
||||
|
||||
if (window.Kakao && (kakao_javascript_apikey !== undefined)) {
|
||||
if (! Kakao.isInitialized()) {
|
||||
Kakao.init(kakao_javascript_apikey);
|
||||
}
|
||||
}
|
||||
|
||||
var webUrl = location.protocol+"<?php echo '//'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>",
|
||||
imageUrl = $("#bo_v_img").find("img").attr("src") || $(".view_image").find("img").attr("src") || '';
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ if( isset($row['it_seo_title']) && ! $row['it_seo_title'] ){
|
||||
shop_seo_title_update($row['it_id']);
|
||||
}
|
||||
|
||||
if (function_exists('check_case_exist_title')) check_case_exist_title($it, G5_SHOP_DIR, true);
|
||||
|
||||
if (!($it['ca_use'] && $it['it_use'])) {
|
||||
if (!$is_admin)
|
||||
alert('현재 판매가능한 상품이 아닙니다.');
|
||||
|
||||
@@ -8,11 +8,10 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<form name="fitem" action="<?php echo $action_url; ?>" method="post" onsubmit="return fitem_submit(this);">
|
||||
|
||||
@@ -10,11 +10,10 @@ add_javascript('<script src="'.G5_THEME_JS_URL.'/theme.shop.list.js"></script>',
|
||||
|
||||
<?php if(!defined('G5_IS_SHOP_AJAX_LIST') && $config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 메인상품진열 10 시작 { -->
|
||||
|
||||
@@ -10,11 +10,10 @@ add_javascript('<script src="'.G5_THEME_JS_URL.'/theme.shop.list.js"></script>',
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 메인상품진열 10 시작 { -->
|
||||
|
||||
@@ -11,11 +11,10 @@ add_javascript('<script src="'.G5_THEME_JS_URL.'/theme.shop.list.js"></script>',
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.fancylist.js"></script>
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 메인상품진열 20 시작 { -->
|
||||
|
||||
@@ -11,11 +11,10 @@ add_javascript('<script src="'.G5_THEME_JS_URL.'/theme.shop.list.js"></script>',
|
||||
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
<div class="st_30_wr">
|
||||
<!-- 메인상품진열 30 시작 { -->
|
||||
|
||||
@@ -8,11 +8,10 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.fancylist.js"></script>
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<script src="https://developers.kakao.com/sdk/js/kakao.min.js" async></script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js"></script>
|
||||
<script>
|
||||
// 사용할 앱의 Javascript 키를 설정해 주세요.
|
||||
Kakao.init("<?php echo $config['cf_kakao_js_apikey']; ?>");
|
||||
var kakao_javascript_apikey = "<?php echo $config['cf_kakao_js_apikey']; ?>";
|
||||
</script>
|
||||
<script src="<?php echo G5_JS_URL; ?>/kakaolink.js?ver=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 상품진열 10 시작 { -->
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.5.8.3.3');
|
||||
define('G5_GNUBOARD_VER', '5.5.11');
|
||||
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전을 합쳐서 그누보드5.4.6 버전에서 시작함 (kagla-210617)
|
||||
// G5_YOUNGCART_VER 이 상수를 사용하는 곳이 있으므로 주석 처리 해제함
|
||||
// 그누보드5.4.6 이상 버전 부터는 영카트를 그누보드에 포함하여 배포하므로 영카트5의 버전은 의미가 없습니다.
|
||||
|
||||
Reference in New Issue
Block a user