영카트 5.4 버전 내용 적용

This commit is contained in:
thisgun
2019-12-02 10:29:31 +09:00
parent 8517e1e31e
commit 9b0078350d
840 changed files with 36442 additions and 28088 deletions

View File

@ -0,0 +1,21 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_event('tail_sub', 'show_debug_bar');
function show_debug_bar() {
global $g5, $g5_debug, $is_admin;
if( ! get_permission_debug_show() ) return;
if ( !($is_admin === 'super' && !is_mobile() ) ){
return;
}
$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'];
include_once( G5_PLUGIN_PATH.'/debugbar/debugbar.php' );
}
?>

View File

@ -0,0 +1,70 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_event('memo_list', 'g54_user_memo_insert', 10, 3);
add_event('password_is_wrong', 'g54_check_bbs_password', 10, 3);
add_replace('invalid_password', 'g54_return_invalid_password', 10, 3);
function g54_return_invalid_password($bool, $type, $wr){
if($type === 'write' && $bool === false && $wr['wr_password'] && isset($_POST['wr_password'])) {
if(G5_STRING_ENCRYPT_FUNCTION === 'create_hash' && (strlen($wr['wr_password']) === G5_MYSQL_PASSWORD_LENGTH || strlen($wr['wr_password']) === 16)) {
if( sql_password($_POST['wr_password']) === $wr['wr_password'] ){
$bool = true;
}
}
}
return $bool;
}
function g54_check_bbs_password($type, $wr, $qstr=''){
if($type === 'bbs' && (isset($wr['wr_password']) && $wr['wr_password']) && isset($_POST['wr_password'])) {
global $bo_table, $w;
if(G5_STRING_ENCRYPT_FUNCTION === 'create_hash' && (strlen($wr['wr_password']) === G5_MYSQL_PASSWORD_LENGTH || strlen($wr['wr_password']) === 16)) {
if( sql_password($_POST['wr_password']) === $wr['wr_password'] ){
if ($w == 's') {
$ss_name = 'ss_secret_'.$bo_table.'_'.$wr['wr_num'];
set_session($ss_name, TRUE);
} else if ($w == 'sc'){
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$wr['wr_id'];
set_session($ss_name, TRUE);
}
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?'.$qstr));
}
}
}
}
function g54_user_memo_insert($kind, $unkind, $page=1){
global $g5, $is_member, $member;
if( ! $is_member || $kind !== 'send' ) return;
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_send_mb_id = '{$member['mb_id']}' and me_type = 'recv' and me_send_ip = '' ";
$row = sql_fetch($sql);
if ( !$row['cnt'] ) return;
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_send_mb_id = '{$member['mb_id']}' and me_type = 'send' ";
$row2 = sql_fetch($sql);
if( $row['cnt'] && ! $row2['cnt'] ){
$sql = " select * from {$g5['memo_table']} where me_send_mb_id = '{$member['mb_id']}' and me_type = 'recv' ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_read_datetime, me_memo, me_send_id, me_type ) values ( '".addslashes($row['me_recv_mb_id'])."', '".addslashes($row['me_send_mb_id'])."', '".addslashes($row['me_send_datetime'])."', '".addslashes($row['me_read_datetime'])."', '".addslashes($row['me_memo'])."', '".$row['me_id']."', 'send' ) ";
sql_query($sql);
}
$sql = " update {$g5['memo_table']} set me_send_ip = '{$_SERVER['REMOTE_ADDR']}' where me_send_mb_id = '{$member['mb_id']}' and me_type = 'recv' and me_send_ip = '' ";
sql_query($sql);
}
}
?>

View File

@ -25,6 +25,7 @@ define('G5_DELIVERY_COMPANY',
.'(호남택배^http://www.honamlogis.co.kr/04estimate/songjang_list.php?c_search1=^031-376-6070)'
);
include_once(G5_LIB_PATH.'/shop.data.lib.php');
include_once(G5_LIB_PATH.'/shop.lib.php');
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
@ -69,4 +70,13 @@ define('G5_CART_STOCK_LIMIT', 3);
// 아이코드 코인 최소금액 설정
// 코인 잔액이 설정 금액보다 작을 때는 주문시 SMS 발송 안함
define('G5_ICODE_COIN', 100);
include_once(G5_LIB_PATH.'/shop.uri.lib.php');
add_replace('get_pretty_url', 'add_pretty_shop_url', 10, 5);
add_replace('false_short_url_clean', 'shop_short_url_clean', 10, 4);
add_replace('add_nginx_conf_rules', 'add_shop_nginx_conf_rules', 10, 3);
add_replace('add_mod_rewrite_rules', 'add_shop_mod_rewrite_rules', 10, 3);
add_replace('admin_dbupgrade', 'add_shop_admin_dbupgrade', 10, 3);
add_replace('exist_check_seo_title', 'shop_exist_check_seo_title', 10, 4);
?>

View File

@ -1,6 +1,6 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_JS_VER', '171222');
define('G5_CSS_VER', '171222');
define('G5_JS_VER', '191110');
define('G5_CSS_VER', '191110');
?>