typo
This commit is contained in:
parent
f122633032
commit
6635183e56
45 changed files with 1307 additions and 1307 deletions
|
|
@ -306,7 +306,7 @@ function icon($act, $link = '', $target = '_parent')
|
|||
{
|
||||
global $g5;
|
||||
|
||||
$img = array('입력' => 'insert', '추가' => 'insert', '생성' => 'insert', '수정' => 'modify', '삭제' => 'delete', '이동' => 'move', '그룹' => 'move', '보기' => 'view', '미리보기' => 'view', '복사' => 'copy');
|
||||
$img =['입력' => 'insert', '추가' => 'insert', '생성' => 'insert', '수정' => 'modify', '삭제' => 'delete', '이동' => 'move', '그룹' => 'move', '보기' => 'view', '미리보기' => 'view', '복사' => 'copy'];
|
||||
$icon = '<img src="' . G5_ADMIN_PATH . '/img/icon_' . $img[$act] . '.gif" title="' . $act . '">';
|
||||
if ($link)
|
||||
$s = '<a href="' . $link . '">' . $icon . '</a>';
|
||||
|
|
|
|||
|
|
@ -984,7 +984,7 @@ $pg_anchor = '<ul class="anchor">
|
|||
return false;
|
||||
}
|
||||
|
||||
var field = Array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width');
|
||||
var field = ['bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width'];
|
||||
var count = field.length;
|
||||
var key;
|
||||
|
||||
|
|
|
|||
|
|
@ -165,8 +165,8 @@ $f = @fopen($file, 'w');
|
|||
@chmod($file, G5_FILE_PERMISSION);
|
||||
|
||||
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||
$src_char = array('&', '=');
|
||||
$dst_char = array('&', '〓');
|
||||
$src_char =['&', '='];
|
||||
$dst_char =['&', '〓'];
|
||||
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
|
|
@ -285,8 +285,8 @@ if ($w == '') {
|
|||
$create_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
// sql_board.sql 파일의 테이블명을 변환
|
||||
$source = array('/__TABLE_NAME__/', '/;/');
|
||||
$target = array($create_table, '');
|
||||
$source = ['/__TABLE_NAME__/', '/;/'];
|
||||
$target = [$create_table, ''];
|
||||
$sql = preg_replace($source, $target, $sql);
|
||||
sql_query($sql, FALSE);
|
||||
|
||||
|
|
|
|||
|
|
@ -786,7 +786,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||
return false;
|
||||
}
|
||||
|
||||
var field = Array('cf_member_skin', 'cf_mobile_member_skin', 'cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin');
|
||||
var field = ['cf_member_skin', 'cf_mobile_member_skin', 'cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin'];
|
||||
var count = field.length;
|
||||
var key;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ $result = sql_query($sql);
|
|||
|
||||
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
|
||||
|
||||
$mb = array();
|
||||
$mb = [];
|
||||
|
||||
$g5['title'] = '커플 관리';
|
||||
include_once './admin.head.php';
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ $result = sql_query($sql);
|
|||
|
||||
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
|
||||
|
||||
$mb = array();
|
||||
$mb = [];
|
||||
if ($sfl == 'mb_id' && $stx)
|
||||
$mb = get_member($stx);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $result = sql_query($sql);
|
|||
|
||||
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
|
||||
|
||||
$ch = array();
|
||||
$ch = [];
|
||||
if ($sfl == 'ch_id' && $stx)
|
||||
$ch = get_member($stx);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ for ($i = 1; $i <= 10; $i++) {
|
|||
}
|
||||
|
||||
foreach ($check_keys as $key) {
|
||||
if (in_array($key, array('mb_signature', 'mb_profile'))) {
|
||||
if (in_array($key, ['mb_signature', 'mb_profile'])) {
|
||||
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1, 0, 0) : '';
|
||||
} else {
|
||||
$posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ $colspan = 11;
|
|||
$sub_menu_ico = '<span class="sub_menu_ico"></span>';
|
||||
}
|
||||
|
||||
$search = array('"', "'");
|
||||
$replace = array('"', ''');
|
||||
$search = ['"', "'"];
|
||||
$replace = ['"', '''];
|
||||
$me_name = str_replace($search, $replace, $row['me_name']);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>"
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $frm_submit .= '</div>';
|
|||
|
||||
/** 세력 정보 **/
|
||||
if ($config['cf_side_title']) {
|
||||
$ch_si = array();
|
||||
$ch_si = [];
|
||||
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
|
||||
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
|
||||
$ch_si[$i]['name'] = $row['si_name'];
|
||||
|
|
@ -57,7 +57,7 @@ if ($config['cf_side_title']) {
|
|||
|
||||
/** 종족 정보 **/
|
||||
if ($config['cf_class_title']) {
|
||||
$ch_cl = array();
|
||||
$ch_cl = [];
|
||||
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
|
||||
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {
|
||||
$ch_cl[$i]['name'] = $row['cl_name'];
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ if (!in_array($config['cf_theme'], $theme_dir)) {
|
|||
}
|
||||
|
||||
$type = $_POST['type'];
|
||||
$arr_type = array('board', 'conf_skin', 'conf_member', 'shop_skin', 'shop_pc_index', 'shop_mobile_index', 'shop_etc', 'shop_event', 'shop_category');
|
||||
$arr_type = ['board', 'conf_skin', 'conf_member', 'shop_skin', 'shop_pc_index', 'shop_mobile_index', 'shop_etc', 'shop_event', 'shop_category'];
|
||||
if (!in_array($type, $arr_type)) {
|
||||
$data['error'] = '올바른 방법으로 이용해 주십시오.';
|
||||
die(json_encode($data));
|
||||
}
|
||||
|
||||
if ($type == 'board') {
|
||||
$keys = run_replace('theme_config_load_keys', array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width'], $type);
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
$i = 0;
|
||||
|
|
@ -41,7 +41,7 @@ if ($type == 'board') {
|
|||
if ($i == 0)
|
||||
$data['error'] = '적용할 게시판 이미지 설정이 없습니다.';
|
||||
} else if ($type == 'conf_skin') {
|
||||
$keys = run_replace('theme_config_load_keys', array('cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin'], $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ if ($type == 'board') {
|
|||
if ($i == 0)
|
||||
$data['error'] = '적용할 기본환경 스킨 설정이 없습니다.';
|
||||
} else if ($type == 'conf_member') {
|
||||
$keys = run_replace('theme_config_load_keys', array('cf_member_skin', 'cf_mobile_member_skin'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['cf_member_skin', 'cf_mobile_member_skin'], $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ if ($type == 'board') {
|
|||
if ($i == 0)
|
||||
$data['error'] = '적용할 기본환경 회원스킨 설정이 없습니다.';
|
||||
} else if ($type == 'shop_skin') {
|
||||
$keys = run_replace('theme_config_load_keys', array('de_shop_skin', 'de_shop_mobile_skin'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['de_shop_skin', 'de_shop_mobile_skin'], $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ if ($type == 'board') {
|
|||
if ($i == 0)
|
||||
$data['error'] = '적용할 테마 설정이 없습니다.';
|
||||
} else if ($type == 'shop_etc') {
|
||||
$keys = run_replace('theme_config_load_keys', array('de_rel_list_use', 'de_rel_list_skin', 'de_rel_list_mod', 'de_rel_img_width', 'de_rel_img_height', 'de_mobile_rel_list_use', 'de_mobile_rel_list_skin', 'de_mobile_rel_list_mod', 'de_mobile_rel_img_width', 'de_mobile_rel_img_height', 'de_search_list_skin', 'de_search_list_mod', 'de_search_list_row', 'de_search_img_width', 'de_search_img_height', 'de_mobile_search_list_skin', 'de_mobile_search_list_mod', 'de_mobile_search_list_row', 'de_mobile_search_img_width', 'de_mobile_search_img_height', 'de_mimg_width', 'de_mimg_height', 'de_listtype_list_mod', 'de_listtype_list_row', 'de_mobile_listtype_list_mod', 'de_mobile_listtype_list_row'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['de_rel_list_use', 'de_rel_list_skin', 'de_rel_list_mod', 'de_rel_img_width', 'de_rel_img_height', 'de_mobile_rel_list_use', 'de_mobile_rel_list_skin', 'de_mobile_rel_list_mod', 'de_mobile_rel_img_width', 'de_mobile_rel_img_height', 'de_search_list_skin', 'de_search_list_mod', 'de_search_list_row', 'de_search_img_width', 'de_search_img_height', 'de_mobile_search_list_skin', 'de_mobile_search_list_mod', 'de_mobile_search_list_row', 'de_mobile_search_img_width', 'de_mobile_search_img_height', 'de_mimg_width', 'de_mimg_height', 'de_listtype_list_mod', 'de_listtype_list_row', 'de_mobile_listtype_list_mod', 'de_mobile_listtype_list_row'], $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ if ($type == 'board') {
|
|||
if ($i == 0)
|
||||
$data['error'] = '적용할 테마 설정이 없습니다.';
|
||||
} else if ($type == 'shop_event') {
|
||||
$keys = run_replace('theme_config_load_keys', array('ev_skin', 'ev_img_width', 'ev_img_height', 'ev_list_mod', 'ev_list_row', 'ev_mobile_skin', 'ev_mobile_img_width', 'ev_mobile_img_height', 'ev_mobile_list_mod', 'ev_mobile_list_row'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['ev_skin', 'ev_img_width', 'ev_img_height', 'ev_list_mod', 'ev_list_row', 'ev_mobile_skin', 'ev_mobile_img_width', 'ev_mobile_img_height', 'ev_mobile_list_mod', 'ev_mobile_list_row'], $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ if ($type == 'board') {
|
|||
if ($i == 0)
|
||||
$data['error'] = '적용할 테마 설정이 없습니다.';
|
||||
} else if ($type == 'shop_category') {
|
||||
$keys = run_replace('theme_config_load_keys', array('ca_skin', 'ca_img_width', 'ca_img_height', 'ca_list_mod', 'ca_list_row', 'ca_mobile_skin', 'ca_mobile_img_width', 'ca_mobile_img_height', 'ca_mobile_list_mod', 'ca_mobile_list_row'), $type);
|
||||
$keys = run_replace('theme_config_load_keys', ['ca_skin', 'ca_img_width', 'ca_img_height', 'ca_list_mod', 'ca_list_row', 'ca_mobile_skin', 'ca_mobile_img_width', 'ca_mobile_img_height', 'ca_mobile_list_mod', 'ca_mobile_list_row'], $type);
|
||||
|
||||
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ if (!$theme || !in_array($theme, $theme_dir))
|
|||
|
||||
$info = get_theme_info($theme);
|
||||
|
||||
$arr_mode = array('index', 'list', 'view', 'shop', 'ca_list', 'item');
|
||||
$arr_mode = ['index', 'list', 'view', 'shop', 'ca_list', 'item'];
|
||||
$mode = isset($_GET['mode']) ? substr(strip_tags($_GET['mode']), 0, 20) : '';
|
||||
|
||||
if (!in_array($mode, $arr_mode))
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ include_once "./admin.head.php";
|
|||
|
||||
<?php
|
||||
$directory = [];
|
||||
$dl = array('file', 'editor');
|
||||
$dl = ['file', 'editor'];
|
||||
|
||||
foreach ($dl as $val) {
|
||||
if ($handle = opendir(G5_DATA_PATH . '/' . $val)) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ $result = sql_query($sql);
|
|||
$referer = iconv_utf8($referer);
|
||||
}
|
||||
|
||||
$title = str_replace(array('<', '>', '&'), array("<", ">", "&"), $referer);
|
||||
$title = str_replace(['<', '>', '&'], ["<", ">", "&"], $referer);
|
||||
$link = '<a href="' . get_text($row['vi_referer']) . '" target="_blank">';
|
||||
$link = str_replace('&', "&", $link);
|
||||
$link2 = '</a>';
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ $listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '">처음</a>'; //페이지
|
|||
$referer = iconv('euc-kr', 'utf-8', $referer);
|
||||
}
|
||||
|
||||
$title = str_replace(array("<", ">"), array("<", ">"), $referer);
|
||||
$title = str_replace(["<", ">"], ["<", ">"], $referer);
|
||||
$link = '<a href="' . get_text($row['vi_referer']) . '" target="_blank" title="' . $title . '">';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ $g5['title'] = '요일별 접속자집계';
|
|||
include_once "./visit.sub.php";
|
||||
|
||||
$colspan = 4;
|
||||
$weekday = array('월', '화', '수', '목', '금', '토', '일');
|
||||
$weekday = ['월', '화', '수', '목', '금', '토', '일'];
|
||||
|
||||
$sum_count = 0;
|
||||
$sql = " select WEEKDAY(vs_date) as weekday_date, SUM(vs_count) as cnt
|
||||
|
|
|
|||
|
|
@ -28,18 +28,18 @@ $g5['title'] = '글,댓글 현황';
|
|||
include_once "./admin.head.php";
|
||||
|
||||
$period_array = array(
|
||||
'오늘' => array('시간', 0),
|
||||
'어제' => array('시간', 0),
|
||||
'7일전' => array('일', 7),
|
||||
'14일전' => array('일', 14),
|
||||
'30일전' => array('일', 30),
|
||||
'3개월전' => array('주', 90),
|
||||
'6개월전' => array('주', 180),
|
||||
'1년전' => array('월', 365),
|
||||
'2년전' => array('월', 365 * 2),
|
||||
'3년전' => array('월', 365 * 3),
|
||||
'5년전' => array('년', 365 * 5),
|
||||
'10년전' => array('년', 365 * 10),
|
||||
'오늘' => ['시간', 0],
|
||||
'어제' => ['시간', 0],
|
||||
'7일전' => ['일', 7],
|
||||
'14일전' => ['일', 14],
|
||||
'30일전' => ['일', 30],
|
||||
'3개월전' => ['주', 90],
|
||||
'6개월전' => ['주', 180],
|
||||
'1년전' => ['월', 365],
|
||||
'2년전' => ['월', 365 * 2],
|
||||
'3년전' => ['월', 365 * 3],
|
||||
'5년전' => ['년', 365 * 5],
|
||||
'10년전' => ['년', 365 * 10],
|
||||
);
|
||||
|
||||
$is_period = false;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ $token = _token();
|
|||
|
||||
set_session($ss_name, $token);
|
||||
|
||||
die(json_encode(array('token' => $token)));
|
||||
die(json_encode(['token' => $token]));
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ $next_part_href = '';
|
|||
if ($sca || $stx) {
|
||||
$list_href = './board.php?bo_table=' . $bo_table;
|
||||
|
||||
$patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
|
||||
$patterns = ['#&page=[0-9]*#', '#&spt=[0-9\-]*#'];
|
||||
|
||||
//if ($prev_spt >= $min_spt)
|
||||
$prev_spt = $spt - $config['cf_search_part'];
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ $next_part_href = '';
|
|||
if ($sca || $stx) {
|
||||
$list_href = './board.php?bo_table=' . $bo_table;
|
||||
|
||||
$patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
|
||||
$patterns = ['#&page=[0-9]*#', '#&spt=[0-9\-]*#'];
|
||||
|
||||
//if ($prev_spt >= $min_spt)
|
||||
$prev_spt = $spt - $config['cf_search_part'];
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function specialchars_replace($str, $len = 0)
|
|||
$str = substr($str, 0, $len);
|
||||
}
|
||||
|
||||
$str = str_replace(array("&", "<", ">"), array("&", "<", ">"), $str);
|
||||
$str = str_replace(["&", "<", ">"], ["&", "<", ">"], $str);
|
||||
|
||||
/*
|
||||
$str = preg_replace("/&/", "&", $str);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ if ($w == 'c') // 댓글 입력
|
|||
|
||||
$wr_content = nl2br(get_text(stripslashes("원글\n{$wr['wr_subject']}\n\n\n댓글\n$wr_content")));
|
||||
|
||||
$warr = array('' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '댓글 ', 'cu' => '댓글 수정');
|
||||
$warr = ['' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '댓글 ', 'cu' => '댓글 수정'];
|
||||
$str = $warr[$w];
|
||||
|
||||
$subject = '[' . $config['cf_title'] . '] ' . $board['bo_subject'] . ' 게시판에 ' . $str . '글이 올라왔습니다.';
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ if ($_POST['twitter_checked']) {
|
|||
$access_token = $_SESSION['access_token'];
|
||||
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token['oauth_token'], $access_token['oauth_token_secret']);
|
||||
// 등록
|
||||
$connection->post('statuses/update', array('status' => $post));
|
||||
$connection->post('statuses/update', ['status' => $post]);
|
||||
|
||||
set_cookie('ck_twitter_checked', true, 86400 * 31);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ include_once "./_common.php";
|
|||
include_once G5_LIB_PATH . "/json.lib.php";
|
||||
|
||||
if (!$bo_table)
|
||||
die(json_encode(array('error' => '게시판 정보가 올바르지 않습니다.', 'url' => G5_URL)));
|
||||
die(json_encode(['error' => '게시판 정보가 올바르지 않습니다.', 'url' => G5_URL]));
|
||||
|
||||
set_session('ss_write_' . $bo_table . '_token', '');
|
||||
|
||||
$token = get_write_token($bo_table);
|
||||
|
||||
die(json_encode(array('error' => '', 'token' => $token, 'url' => '')));
|
||||
die(json_encode(['error' => '', 'token' => $token, 'url' => '']));
|
||||
|
|
|
|||
|
|
@ -699,7 +699,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
|||
|
||||
$wr_content = conv_content(conv_unescape_nl(stripslashes($wr_content)), $tmp_html);
|
||||
|
||||
$warr = array('' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '코멘트', 'cu' => '코멘트 수정');
|
||||
$warr = ['' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '코멘트', 'cu' => '코멘트 수정'];
|
||||
$str = $warr[$w];
|
||||
|
||||
$subject = '[' . $config['cf_title'] . '] ' . $board['bo_subject'] . ' 게시판에 ' . $str . '글이 올라왔습니다.';
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
|||
|
||||
$wr_content = conv_content(conv_unescape_nl(stripslashes($wr_content)), $tmp_html);
|
||||
|
||||
$warr = array('' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '코멘트', 'cu' => '코멘트 수정');
|
||||
$warr = ['' => '입력', 'u' => '수정', 'r' => '답변', 'c' => '코멘트', 'cu' => '코멘트 수정'];
|
||||
$str = $warr[$w];
|
||||
|
||||
$subject = '[' . $config['cf_title'] . '] ' . $board['bo_subject'] . ' 게시판에 ' . $str . '글이 올라왔습니다.';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
if (!defined('_GNUBOARD_'))
|
||||
exit;
|
||||
|
||||
$yoil = array("일", "월", "화", "수", "목", "금", "토");
|
||||
$yoil = ["일", "월", "화", "수", "목", "금", "토"];
|
||||
$is_add_register = $config['cf_1'] ? true : false;
|
||||
|
||||
function get_category_list($bo_table = '', $ca_name = '')
|
||||
|
|
@ -282,9 +282,9 @@ function hex2rgba($color, $opacity = false)
|
|||
$color = substr($color, 1);
|
||||
}
|
||||
if (strlen($color) == 6) {
|
||||
$hex = array($color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]);
|
||||
$hex = [$color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]];
|
||||
} elseif (strlen($color) == 3) {
|
||||
$hex = array($color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]);
|
||||
$hex = [$color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]];
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ function get_status($ch_id, $st_id)
|
|||
{
|
||||
global $g5;
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
$sc = sql_fetch("select sc_value, sc_max from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$st_id}'");
|
||||
$sl = sql_fetch("select st_id, st_use_max, st_max, st_min from {$g5['status_config_table']} where st_id = '{$st_id}'");
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ function get_status_by_name($ch_id, $st_name)
|
|||
{
|
||||
global $g5;
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
$sl = sql_fetch("select st_id, st_use_max, st_max from {$g5['status_config_table']} where st_name = '{$st_name}'");
|
||||
$sc = sql_fetch("select sc_value, sc_max from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$sl['st_id']}'");
|
||||
|
|
@ -75,7 +75,7 @@ function set_status($ch_id, $st_id, $hunt, $msg = '')
|
|||
{
|
||||
global $g5;
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
$sl = sql_fetch("select st_id from {$g5['status_config_table']} where st_id = '{$st_id}'");
|
||||
$sc = sql_fetch("select sc_id, sc_value, sc_max from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$sl['st_id']}'");
|
||||
|
|
@ -99,7 +99,7 @@ function set_status_by_name($ch_id, $st_name, $hunt, $msg = '')
|
|||
{
|
||||
global $g5;
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
|
||||
$sl = sql_fetch("select st_id from {$g5['status_config_table']} where st_name = '{$st_name}'");
|
||||
$sc = sql_fetch("select sc_id, sc_value, sc_max from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$sl['st_id']}'");
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ class FileCache
|
|||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct($options = array())
|
||||
public function __construct($options = [])
|
||||
{
|
||||
$available_options = array('_cache_path', 'file_extension');
|
||||
$available_options = ['_cache_path', 'file_extension'];
|
||||
foreach ($available_options as $name) {
|
||||
if (isset($options[$name])) {
|
||||
$this->$name = $options[$name];
|
||||
|
|
@ -76,7 +76,7 @@ class FileCache
|
|||
$file_ex = explode("\n\n", $file_contents);
|
||||
$data = unserialize(base64_decode($file_ex[1]));
|
||||
} catch (Exception $e) {
|
||||
$data = array('ttl' => 1, 'time' => $server_time - 1000);
|
||||
$data = ['ttl' => 1, 'time' => $server_time - 1000];
|
||||
}
|
||||
|
||||
if ($data['ttl'] > 0 && $server_time > $data['time'] + $data['ttl']) {
|
||||
|
|
@ -179,7 +179,7 @@ class FileCache
|
|||
if ($ttl !== null) {
|
||||
$expire = time() + $ttl;
|
||||
}
|
||||
return base64_encode(serialize(array($data, $expire)));
|
||||
return base64_encode(serialize([$data, $expire]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ if (!defined('_GNUBOARD_'))
|
|||
|
||||
class G5_object_cache
|
||||
{
|
||||
public $writes = array();
|
||||
public $contents = array();
|
||||
public $etcs = array();
|
||||
public $writes = [];
|
||||
public $contents = [];
|
||||
public $etcs = [];
|
||||
|
||||
function get($type, $key, $group = 'default')
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ class G5_object_cache
|
|||
return isset($datas[$group]) && (isset($datas[$group][$key]) || array_key_exists($key, $datas[$group]));
|
||||
}
|
||||
|
||||
function set($type, $key, $data = array(), $group = 'default')
|
||||
function set($type, $key, $data = [], $group = 'default')
|
||||
{
|
||||
if (is_object($data))
|
||||
$data = clone $data;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -35,7 +35,7 @@ class Hook
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $callbacks = array();
|
||||
protected $callbacks = [];
|
||||
|
||||
/**
|
||||
* Number of actions executed.
|
||||
|
|
@ -44,7 +44,7 @@ class Hook
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $actions = array('count' => 0);
|
||||
protected $actions = ['count' => 0];
|
||||
|
||||
/**
|
||||
* Current action hook.
|
||||
|
|
@ -71,7 +71,7 @@ class Hook
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $instances = array();
|
||||
private static $instances = [];
|
||||
|
||||
/**
|
||||
* Get instance.
|
||||
|
|
@ -143,7 +143,7 @@ class Hook
|
|||
public static function addActions($actions)
|
||||
{
|
||||
foreach ($actions as $arguments) {
|
||||
call_user_func_array(array(__CLASS__, 'addAction'), $arguments);
|
||||
call_user_func_array([__CLASS__, 'addAction'], $arguments);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -166,7 +166,7 @@ class Hook
|
|||
*
|
||||
* @return mixed returns the output of the last action or false
|
||||
*/
|
||||
public static function doAction($tag, $args = array(), $remove = true)
|
||||
public static function doAction($tag, $args = [], $remove = true)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
|
|
@ -259,14 +259,14 @@ class Hook
|
|||
|
||||
if (!($class && $method) && function_exists($function)) {
|
||||
return call_user_func($function, $args);
|
||||
} elseif ($obj = call_user_func(array($class, $this->singleton))) {
|
||||
} elseif ($obj = call_user_func([$class, $this->singleton])) {
|
||||
if ($obj !== false) {
|
||||
return call_user_func_array(array($obj, $method), $args);
|
||||
return call_user_func_array([$obj, $method], $args);
|
||||
}
|
||||
} elseif (class_exists($class)) {
|
||||
$instance = new $class;
|
||||
|
||||
return call_user_func_array(array($instance, $method), $args);
|
||||
return call_user_func_array([$instance, $method], $args);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -291,7 +291,7 @@ class Hook
|
|||
}
|
||||
}
|
||||
|
||||
return isset($actions) ? $actions : array();
|
||||
return isset($actions) ? $actions : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -307,7 +307,7 @@ class Hook
|
|||
protected function getArguments($argsNumber, $arguments)
|
||||
{
|
||||
if ($argsNumber == 1 && is_string($arguments)) {
|
||||
return array($arguments);
|
||||
return [$arguments];
|
||||
} elseif ($argsNumber === count($arguments)) {
|
||||
return $arguments;
|
||||
}
|
||||
|
|
@ -321,6 +321,6 @@ class Hook
|
|||
return $args;
|
||||
}
|
||||
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ if (!defined('_GNUBOARD_'))
|
|||
class GML_Hook extends Hook
|
||||
{
|
||||
|
||||
protected $filters = array('count' => 0);
|
||||
protected $filters = ['count' => 0];
|
||||
|
||||
protected $callback_filters = array();
|
||||
protected $callback_filters = [];
|
||||
|
||||
protected static $current_filter = false;
|
||||
|
||||
|
|
@ -23,14 +23,14 @@ class GML_Hook extends Hook
|
|||
|
||||
if (!($class && $method) && is_callable($function)) {
|
||||
return call_user_func_array($function, $args);
|
||||
} elseif ($obj = call_user_func(array($class, $this->singleton))) {
|
||||
} elseif ($obj = call_user_func([$class, $this->singleton])) {
|
||||
if ($obj !== false) {
|
||||
return call_user_func_array(array($obj, $method), $args);
|
||||
return call_user_func_array([$obj, $method], $args);
|
||||
}
|
||||
} elseif (class_exists($class)) {
|
||||
$instance = new $class;
|
||||
|
||||
return call_user_func_array(array($instance, $method), $args);
|
||||
return call_user_func_array([$instance, $method], $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ class GML_Hook extends Hook
|
|||
}
|
||||
}
|
||||
|
||||
return (isset($filters)) ? $filters : array();
|
||||
return (isset($filters)) ? $filters : [];
|
||||
}
|
||||
|
||||
public static function get_properties($type, $is_callback = false)
|
||||
|
|
@ -70,7 +70,7 @@ class GML_Hook extends Hook
|
|||
return true;
|
||||
}
|
||||
|
||||
public static function apply_filters($tag, $args = array(), $remove = true)
|
||||
public static function apply_filters($tag, $args = [], $remove = true)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
|
|
@ -109,12 +109,12 @@ class GML_Hook extends Hook
|
|||
protected function getArguments($argsNumber, $arguments)
|
||||
{
|
||||
if ($argsNumber == 1 && is_string($arguments)) {
|
||||
return array($arguments);
|
||||
return [$arguments];
|
||||
} elseif ($argsNumber === count($arguments)) {
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
$args = array();
|
||||
$args = [];
|
||||
|
||||
for ($i = 0; $i < $argsNumber; $i++) {
|
||||
if (is_array($arguments) && array_key_exists($i, $arguments)) {
|
||||
|
|
|
|||
|
|
@ -246,12 +246,12 @@ function url_auto_link($str)
|
|||
// 140326 유창화님 제안코드로 수정
|
||||
// http://sir.kr/pg_lecture/461
|
||||
// http://sir.kr/pg_lecture/463
|
||||
$str = str_replace(array("<", ">", "&", """, " ", "'"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t", "'"), $str);
|
||||
$str = str_replace(["<", ">", "&", """, " ", "'"], ["\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t", "'"], $str);
|
||||
//$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
|
||||
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
|
||||
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
|
||||
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href=\"mailto:\\0\">\\0</a>", $str);
|
||||
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"), array(" ", "<", ">", "'"), $str);
|
||||
$str = str_replace(["\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"], [" ", "<", ">", "'"], $str);
|
||||
|
||||
/*
|
||||
// 속도 향상 031011
|
||||
|
|
@ -483,8 +483,8 @@ function search_font($stx, $str)
|
|||
global $config;
|
||||
|
||||
// 문자앞에 \ 를 붙입니다.
|
||||
$src = array('/', '|');
|
||||
$dst = array('\/', '\|');
|
||||
$src = ['/', '|'];
|
||||
$dst = ['\/', '\|'];
|
||||
|
||||
if (!trim($stx))
|
||||
return $str;
|
||||
|
|
@ -1475,7 +1475,7 @@ function get_text($str, $html = 0, $restore = false)
|
|||
// HTML 특수문자 변환 htmlspecialchars
|
||||
function hsc($str)
|
||||
{
|
||||
$trans = array("\"" => """, "'" => "'", "<"=>"<", ">"=>">");
|
||||
$trans = ["\"" => """, "'" => "'", "<"=>"<", ">"=>">"];
|
||||
$str = strtr($str, $trans);
|
||||
return $str;
|
||||
}
|
||||
|
|
@ -1826,7 +1826,7 @@ function referer_check($url = '')
|
|||
// 한글 요일
|
||||
function get_yoil($date, $full = 0)
|
||||
{
|
||||
$arr_yoil = array('일', '월', '화', '수', '목', '금', '토');
|
||||
$arr_yoil = ['일', '월', '화', '수', '목', '금', '토'];
|
||||
|
||||
$yoil = date("w", strtotime($date));
|
||||
$str = $arr_yoil[$yoil];
|
||||
|
|
@ -2571,7 +2571,7 @@ function board_notice($bo_notice, $wr_id, $insert = false)
|
|||
if ($insert && in_array($wr_id, $notice_array))
|
||||
return $bo_notice;
|
||||
|
||||
$notice_array = array_merge(array($wr_id), $notice_array);
|
||||
$notice_array = array_merge([$wr_id], $notice_array);
|
||||
$notice_array = array_unique($notice_array);
|
||||
foreach ($notice_array as $key => $value) {
|
||||
if (!trim($value))
|
||||
|
|
@ -2596,7 +2596,7 @@ function googl_short_url($longUrl)
|
|||
// URL Shortener API ON
|
||||
$apiKey = $config['cf_googl_shorturl_apikey'];
|
||||
|
||||
$postData = array('longUrl' => $longUrl);
|
||||
$postData = ['longUrl' => $longUrl];
|
||||
$jsonData = json_encode($postData);
|
||||
|
||||
$curlObj = curl_init();
|
||||
|
|
@ -2605,7 +2605,7 @@ function googl_short_url($longUrl)
|
|||
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($curlObj, CURLOPT_HEADER, 0);
|
||||
curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));
|
||||
curl_setopt($curlObj, CURLOPT_HTTPHEADER, ['Content-type:application/json']);
|
||||
curl_setopt($curlObj, CURLOPT_POST, 1);
|
||||
curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);
|
||||
|
||||
|
|
@ -2846,7 +2846,7 @@ function check_input_vars()
|
|||
// HTML 특수문자 변환 htmlspecialchars
|
||||
function htmlspecialchars2($str)
|
||||
{
|
||||
$trans = array("\"" => """, "'" => "'", "<" => "<", ">" => ">");
|
||||
$trans = ["\"" => """, "'" => "'", "<" => "<", ">" => ">"];
|
||||
$str = strtr($str, $trans);
|
||||
return $str;
|
||||
}
|
||||
|
|
@ -2906,7 +2906,7 @@ function clean_xss_tags($str, $check_entities = 0, $is_remove_tags = 0, $cur_str
|
|||
$result = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $str);
|
||||
|
||||
if ($check_entities) {
|
||||
$result = str_replace(array(':', '(', ')', '
', '	'), '', $result);
|
||||
$result = str_replace([':', '(', ')', '
', '	'], '', $result);
|
||||
}
|
||||
|
||||
$result = preg_replace(
|
||||
|
|
@ -2977,8 +2977,8 @@ function clean_relative_paths($path)
|
|||
// unescape nl 얻기
|
||||
function conv_unescape_nl($str)
|
||||
{
|
||||
$search = array('\\r', '\r', '\\n', '\n');
|
||||
$replace = array('', '', "\n", "\n");
|
||||
$search = ['\\r', '\r', '\\n', '\n'];
|
||||
$replace = ['', '', "\n", "\n"];
|
||||
|
||||
return str_replace($search, $replace, $str);
|
||||
}
|
||||
|
|
@ -3484,7 +3484,7 @@ function is_include_path_check($path = '', $is_input = '')
|
|||
}
|
||||
|
||||
// resolve path parts (single dot, double dot and double delimiters)
|
||||
$path = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $path);
|
||||
$path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
|
||||
$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
|
||||
$absolutes = [];
|
||||
foreach ($parts as $part) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if (!function_exists('json_encode')) {
|
|||
return floatval(str_replace(',', '.', strval($a)));
|
||||
}
|
||||
if (is_string($a)) {
|
||||
static $jsonReplaces = array(array('\\', '/', "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'));
|
||||
static $jsonReplaces = [['\\', '/', "\n", "\t", "\r", "\b", "\f", '"'], ['\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"']];
|
||||
return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"';
|
||||
} else
|
||||
return $a;
|
||||
|
|
@ -32,7 +32,7 @@ if (!function_exists('json_encode')) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
$result = array();
|
||||
$result = [];
|
||||
if ($isList) {
|
||||
foreach ($a as $v)
|
||||
$result[] = json_encode($v);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function latest($skin_dir = '', $bo_table, $rows = 10, $subject_len = 40, $cache
|
|||
}
|
||||
|
||||
if (!G5_USE_CACHE || $cache_fwrite) {
|
||||
$list = array();
|
||||
$list = [];
|
||||
|
||||
$sql = "SELECT * FROM {$g5['board_table']} where bo_table = '{$bo_table}' ";
|
||||
$board = sql_fetch($sql);
|
||||
|
|
|
|||
|
|
@ -70,6 +70,6 @@ function attach_file($filename, $tmp_name)
|
|||
// 서버에 업로드 되는 파일은 확장자를 주지 않는다. (보안 취약점)
|
||||
$dest_file = G5_DATA_PATH . '/tmp/' . str_replace('/', '_', $tmp_name);
|
||||
move_uploaded_file($tmp_name, $dest_file);
|
||||
$tmpfile = array("name" => $filename, "path" => $dest_file);
|
||||
$tmpfile = ["name" => $filename, "path" => $dest_file];
|
||||
return $tmpfile;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ function naver_syndi_ping($bo_table, $wr_id)
|
|||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_CONNECTTIMEOUT => 10,
|
||||
CURLOPT_TIMEOUT => 10,
|
||||
CURLOPT_HTTPHEADER => array("Host: apis.naver.com", "Pragma: no-cache", "Accept: */*", $ping_auth_header)
|
||||
CURLOPT_HTTPHEADER => ["Host: apis.naver.com", "Pragma: no-cache", "Accept: */*", $ping_auth_header]
|
||||
);
|
||||
|
||||
//print_r2($ping_client_opt); exit;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
|||
$filename = $alt = $data_path = '';
|
||||
$edt = false;
|
||||
|
||||
$empty_array = array('src' => '', 'ori' => '', 'alt' => '');
|
||||
$empty_array = ['src' => '', 'ori' => '', 'alt' => ''];
|
||||
|
||||
$write = get_thumbnail_find_cache($bo_table, $wr_id, 'content');
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
|||
if (!$filename)
|
||||
return $empty_array;
|
||||
|
||||
if ($thumbnail_info = run_replace('get_list_thumbnail_info', array(), array('bo_table' => $bo_table, 'wr_id' => $wr_id, 'data_path' => $data_path, 'edt' => $edt, 'filename' => $filename, 'filepath' => $filepath, 'thumb_width' => $thumb_width, 'thumb_height' => $thumb_height, 'is_create' => $is_create, 'is_crop' => $is_crop, 'crop_mode' => $crop_mode, 'is_sharpen' => $is_sharpen, 'um_value' => $um_value))) {
|
||||
if ($thumbnail_info = run_replace('get_list_thumbnail_info', [], ['bo_table' => $bo_table, 'wr_id' => $wr_id, 'data_path' => $data_path, 'edt' => $edt, 'filename' => $filename, 'filepath' => $filepath, 'thumb_width' => $thumb_width, 'thumb_height' => $thumb_height, 'is_create' => $is_create, 'is_crop' => $is_crop, 'crop_mode' => $crop_mode, 'is_sharpen' => $is_sharpen, 'um_value' => $um_value])) {
|
||||
return $thumbnail_info;
|
||||
}
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
|||
return $empty_array;
|
||||
}
|
||||
|
||||
$thumb = array("src" => $src, "ori" => $ori, "alt" => $alt);
|
||||
$thumb = ["src" => $src, "ori" => $ori, "alt" => $alt];
|
||||
|
||||
return $thumb;
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ function get_view_thumbnail($contents, $thumb_width = 0)
|
|||
if (empty($matches))
|
||||
return $contents;
|
||||
|
||||
$extensions = array(1 => 'gif', 2 => 'jpg', 3 => 'png', 18 => 'webp');
|
||||
$extensions = [1 => 'gif', 2 => 'jpg', 3 => 'png', 18 => 'webp'];
|
||||
|
||||
for ($i = 0; $i < count($matches[1]); $i++) {
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
|||
|
||||
$size = @getimagesize($source_file);
|
||||
|
||||
$extensions = array(1 => 'gif', 2 => 'jpg', 3 => 'png', 18 => 'webp');
|
||||
$extensions = [1 => 'gif', 2 => 'jpg', 3 => 'png', 18 => 'webp'];
|
||||
$file_ext = $extensions[$size[2]]; // 파일 확장자
|
||||
if (!$file_ext)
|
||||
return;
|
||||
|
|
@ -638,9 +638,9 @@ function UnsharpMask($img, $amount, $radius, $threshold)
|
|||
|
||||
if (function_exists('imageconvolution')) { // PHP >= 5.1
|
||||
$matrix = array(
|
||||
array(1, 2, 1),
|
||||
array(2, 4, 2),
|
||||
array(1, 2, 1)
|
||||
[1, 2, 1],
|
||||
[2, 4, 2],
|
||||
[1, 2, 1]
|
||||
);
|
||||
$divisor = array_sum(array_map('array_sum', $matrix));
|
||||
$offset = 0;
|
||||
|
|
@ -762,7 +762,7 @@ function is_animated_webp($filename)
|
|||
function is_animated_gif($filename)
|
||||
{
|
||||
|
||||
static $cache = array();
|
||||
static $cache = [];
|
||||
$key = md5($filename);
|
||||
|
||||
if (isset($cache[$key])) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function get_pretty_url($folder, $no = '', $query_string = '', $action = '')
|
|||
global $g5, $config;
|
||||
|
||||
$boards = get_board_names();
|
||||
$segments = array();
|
||||
$segments = [];
|
||||
$url = $add_query = '';
|
||||
|
||||
if ($url = run_replace('get_pretty_url', $url, $folder, $no, $query_string, $action)) {
|
||||
|
|
@ -111,7 +111,7 @@ function short_url_clean($string_url, $add_qry = '')
|
|||
$url = parse_url($string_url);
|
||||
$page_name = isset($url['path']) ? basename($url['path'], ".php") : '';
|
||||
|
||||
$array_page_names = run_replace('url_clean_page_names', array('board', 'write', 'content'));
|
||||
$array_page_names = run_replace('url_clean_page_names', ['board', 'write', 'content']);
|
||||
|
||||
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);
|
||||
|
|
@ -127,15 +127,15 @@ function short_url_clean($string_url, $add_qry = '')
|
|||
|
||||
if ($page_name === 'write') {
|
||||
$vars['action'] = 'write';
|
||||
$allow_param_keys = array('bo_table' => '', 'action' => '');
|
||||
$allow_param_keys = ['bo_table' => '', 'action' => ''];
|
||||
} else if ($page_name === 'content') {
|
||||
$vars['action'] = 'content';
|
||||
$allow_param_keys = array('action' => '', 'co_id' => '');
|
||||
$allow_param_keys = ['action' => '', 'co_id' => ''];
|
||||
} else {
|
||||
$allow_param_keys = array('bo_table' => '', 'wr_id' => '');
|
||||
$allow_param_keys = ['bo_table' => '', 'wr_id' => ''];
|
||||
}
|
||||
|
||||
$s = array();
|
||||
$s = [];
|
||||
|
||||
foreach ($allow_param_keys as $key => $v) {
|
||||
if (!isset($vars[$key]) || empty($vars[$key]))
|
||||
|
|
@ -159,7 +159,7 @@ function short_url_clean($string_url, $add_qry = '')
|
|||
|
||||
if (isset($url['host'])) {
|
||||
|
||||
$array_file_paths = run_replace('url_clean_page_paths', array('/' . G5_BBS_DIR . '/board.php', '/' . G5_BBS_DIR . '/write.php', '/' . G5_BBS_DIR . '/content.php'));
|
||||
$array_file_paths = run_replace('url_clean_page_paths', ['/' . G5_BBS_DIR . '/board.php', '/' . G5_BBS_DIR . '/write.php', '/' . G5_BBS_DIR . '/content.php']);
|
||||
|
||||
$str_path = isset($url['path']) ? $url['path'] : '';
|
||||
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
|
||||
|
|
@ -354,7 +354,7 @@ function get_nginx_conf_rules($return_string = false)
|
|||
$get_path_url = parse_url(G5_URL);
|
||||
$base_path = isset($get_path_url['path']) ? $get_path_url['path'] . '/' : '/';
|
||||
|
||||
$rules = array();
|
||||
$rules = [];
|
||||
$rules[] = '#### ' . G5_VERSION . ' nginx rules BEGIN #####';
|
||||
|
||||
if ($add_rules = run_replace('add_nginx_conf_pre_rules', '', $get_path_url, $base_path, $return_string)) {
|
||||
|
|
@ -385,7 +385,7 @@ function get_mod_rewrite_rules($return_string = false)
|
|||
$get_path_url = parse_url(G5_URL);
|
||||
$base_path = isset($get_path_url['path']) ? $get_path_url['path'] . '/' : '/';
|
||||
|
||||
$rules = array();
|
||||
$rules = [];
|
||||
$rules[] = '#### ' . G5_VERSION . ' rewrite BEGIN #####';
|
||||
$rules[] = '<IfModule mod_rewrite.c>';
|
||||
$rules[] = 'RewriteEngine On';
|
||||
|
|
|
|||
|
|
@ -14,20 +14,20 @@
|
|||
class UploadHandler
|
||||
{
|
||||
|
||||
public $files = array();
|
||||
public $files = [];
|
||||
protected $options;
|
||||
protected $post_max_size;
|
||||
protected $error_messages;
|
||||
|
||||
protected $image_objects = array();
|
||||
protected $image_objects = [];
|
||||
|
||||
private static $MIME_TYPES_PROCESSORS = array(
|
||||
"image/gif" => array("imagecreatefromgif", "imagegif"),
|
||||
"image/jpg" => array("imagecreatefromjpeg", "imagejpeg"),
|
||||
"image/jpeg" => array("imagecreatefromjpeg", "imagejpeg"),
|
||||
"image/png" => array("imagecreatefrompng", "imagepng"),
|
||||
"image/webp" => array("imagecreatefromwebp", "imagewebp"),
|
||||
"image/bmp" => array("imagecreatefromwbmp", "imagewbmp")
|
||||
"image/gif" => ["imagecreatefromgif", "imagegif"],
|
||||
"image/jpg" => ["imagecreatefromjpeg", "imagejpeg"],
|
||||
"image/jpeg" => ["imagecreatefromjpeg", "imagejpeg"],
|
||||
"image/png" => ["imagecreatefrompng", "imagepng"],
|
||||
"image/webp" => ["imagecreatefromwebp", "imagewebp"],
|
||||
"image/bmp" => ["imagecreatefromwbmp", "imagewbmp"]
|
||||
);
|
||||
|
||||
public function __construct($options = null, $initialize = true, $error_messages = null)
|
||||
|
|
@ -363,10 +363,10 @@ class UploadHandler
|
|||
{
|
||||
$upload_dir = $this->get_upload_path();
|
||||
if (!is_dir($upload_dir)) {
|
||||
return array();
|
||||
return [];
|
||||
}
|
||||
return array_values(array_filter(array_map(
|
||||
array($this, $iteration_method),
|
||||
[$this, $iteration_method],
|
||||
scandir($upload_dir)
|
||||
)));
|
||||
}
|
||||
|
|
@ -491,7 +491,7 @@ class UploadHandler
|
|||
{
|
||||
return preg_replace_callback(
|
||||
'/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/',
|
||||
array($this, 'upcount_name_callback'),
|
||||
[$this, 'upcount_name_callback'],
|
||||
$name,
|
||||
1
|
||||
);
|
||||
|
|
@ -539,16 +539,16 @@ class UploadHandler
|
|||
if (function_exists('exif_imagetype') && $file_path) {
|
||||
switch (@exif_imagetype($file_path)) {
|
||||
case IMAGETYPE_JPEG:
|
||||
$extensions = array('jpg', 'jpeg');
|
||||
$extensions = ['jpg', 'jpeg'];
|
||||
break;
|
||||
case IMAGETYPE_PNG:
|
||||
$extensions = array('png');
|
||||
$extensions = ['png'];
|
||||
break;
|
||||
case IMAGETYPE_GIF:
|
||||
$extensions = array('gif');
|
||||
$extensions = ['gif'];
|
||||
break;
|
||||
case IMAGETYPE_WEBP:
|
||||
$extensions = array('webp');
|
||||
$extensions = ['webp'];
|
||||
break;
|
||||
}
|
||||
// Adjust incorrect image file extensions:
|
||||
|
|
@ -595,7 +595,7 @@ class UploadHandler
|
|||
} else {
|
||||
$new_file_path = $file_path;
|
||||
}
|
||||
return array($file_path, $new_file_path);
|
||||
return [$file_path, $new_file_path];
|
||||
}
|
||||
|
||||
protected function gd_get_image_object($file_path, $func, $no_cache = false)
|
||||
|
|
@ -1035,7 +1035,7 @@ class UploadHandler
|
|||
$image = new \Imagick();
|
||||
try {
|
||||
if (@$image->pingImage($file_path)) {
|
||||
$dimensions = array($image->getImageWidth(), $image->getImageHeight());
|
||||
$dimensions = [$image->getImageWidth(), $image->getImageHeight()];
|
||||
$image->destroy();
|
||||
return $dimensions;
|
||||
}
|
||||
|
|
@ -1096,7 +1096,7 @@ class UploadHandler
|
|||
|
||||
protected function handle_image_file($file_path, $file)
|
||||
{
|
||||
$failed_versions = array();
|
||||
$failed_versions = [];
|
||||
foreach ($this->options['image_versions'] as $version => $options) {
|
||||
if ($this->create_scaled_image($file->name, $version, $options)) {
|
||||
if (!empty($version)) {
|
||||
|
|
@ -1356,7 +1356,7 @@ class UploadHandler
|
|||
protected function get_file_names_params()
|
||||
{
|
||||
$params = isset($_GET[$this->options['param_name']]) ?
|
||||
$_GET[$this->options['param_name']] : array();
|
||||
$_GET[$this->options['param_name']] : [];
|
||||
foreach ($params as $key => $value) {
|
||||
$params[$key] = basename(stripslashes($value));
|
||||
}
|
||||
|
|
@ -1497,7 +1497,7 @@ class UploadHandler
|
|||
$content_range = $this->get_server_var('HTTP_CONTENT_RANGE') ?
|
||||
preg_split('/[^0-9]+/', $this->get_server_var('HTTP_CONTENT_RANGE')) : null;
|
||||
$size = $content_range ? $content_range[3] : null;
|
||||
$files = array();
|
||||
$files = [];
|
||||
if ($upload && is_array($upload['tmp_name'])) {
|
||||
// param_name is an array identifier like "files[]",
|
||||
// $_FILES is a multi-dimensional array:
|
||||
|
|
@ -1529,7 +1529,7 @@ class UploadHandler
|
|||
);
|
||||
}
|
||||
return $this->generate_response(
|
||||
array($this->options['param_name'] => $files),
|
||||
[$this->options['param_name'] => $files],
|
||||
$print_response
|
||||
);
|
||||
}
|
||||
|
|
@ -1539,9 +1539,9 @@ class UploadHandler
|
|||
/* 보안 이슈 url을 참고 https://github.com/blueimp/jQuery-File-Upload/issues/2426 */
|
||||
$file_names = $this->get_file_names_params();
|
||||
if (empty($file_names)) {
|
||||
$file_names = array($this->get_file_name_param());
|
||||
$file_names = [$this->get_file_name_param()];
|
||||
}
|
||||
$response = array();
|
||||
$response = [];
|
||||
foreach ($file_names as $file_name) {
|
||||
if (substr($file_name, 0, 32) != $this->get_file_passname())
|
||||
continue; //session_id() 와 비교하여 틀리면 지우지 않음
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ if (!class_exists('HTMLPurifier_Filter_Iframevideo')) {
|
|||
public function preFilter($html, $config, $context)
|
||||
{
|
||||
if (strstr($html, '<iframe')) {
|
||||
$html = preg_replace_callback('/<iframe.*?src="https?:\/\/www\.youtube\.com\/embed\/([^"]*)[^>]*>(.*?)?\/iframe>/i', array($this, 'trust_url_match'), $html);
|
||||
$html = preg_replace_callback('/<iframe.*?src="https?:\/\/player\.vimeo.com\/video\/([^"]*)[^>]*>(.*?)?\/iframe>/i', array($this, 'trust_url_match'), $html);
|
||||
$html = preg_replace_callback('/<iframe.*?src="https?:\/\/www\.facebook.com\/plugins\/([^"]*)[^>]*>(.*?)?\/iframe>/i', array($this, 'trust_url_match'), $html);
|
||||
$html = preg_replace_callback('/<iframe.*?src="https?:\/\/www\.youtube\.com\/embed\/([^"]*)[^>]*>(.*?)?\/iframe>/i', [$this, 'trust_url_match'], $html);
|
||||
$html = preg_replace_callback('/<iframe.*?src="https?:\/\/player\.vimeo.com\/video\/([^"]*)[^>]*>(.*?)?\/iframe>/i', [$this, 'trust_url_match'], $html);
|
||||
$html = preg_replace_callback('/<iframe.*?src="https?:\/\/www\.facebook.com\/plugins\/([^"]*)[^>]*>(.*?)?\/iframe>/i', [$this, 'trust_url_match'], $html);
|
||||
//$html = preg_replace('#<iframe#i', '<img class="Iframevideo"', $html);
|
||||
//$html = preg_replace('#</iframe>#i', '</img>', $html);
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ if (!class_exists('HTMLPurifier_Filter_Iframevideo')) {
|
|||
public function postFilter($html, $config, $context)
|
||||
{
|
||||
$post_regex = '#<img class="Iframevideo"([^>]+?)>#';
|
||||
return preg_replace_callback($post_regex, array($this, 'postFilterCallback'), $html);
|
||||
return preg_replace_callback($post_regex, [$this, 'postFilterCallback'], $html);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,74 +1,74 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (!$board['bo_use_sns']) return;
|
||||
|
||||
$sns_msg = urlencode(str_replace('\"', '"', $view['subject']));
|
||||
//$sns_url = googl_short_url('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
//$msg_url = $sns_msg.' : '.$sns_url;
|
||||
|
||||
/*
|
||||
$facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg;
|
||||
$twitter_url = 'http://twitter.com/home?status='.$msg_url;
|
||||
$gplus_url = 'https://plus.google.com/share?url='.$sns_url;
|
||||
*/
|
||||
|
||||
$sns_send = G5_BBS_URL.'/sns_send.php?longurl='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
//$sns_send .= '&title='.urlencode(utf8_strcut(get_text($view['subject']),140));
|
||||
$sns_send .= '&title='.$sns_msg;
|
||||
|
||||
$facebook_url = $sns_send.'&sns=facebook';
|
||||
$twitter_url = $sns_send.'&sns=twitter';
|
||||
$gplus_url = $sns_send.'&sns=gplus';
|
||||
$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?ver=<?php echo G5_JS_VER; ?>" charset="utf-8"></script>
|
||||
<script type='text/javascript'>
|
||||
//<![CDATA[
|
||||
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") || '';
|
||||
|
||||
Kakao.Link.sendDefault({
|
||||
objectType: 'feed',
|
||||
content: {
|
||||
title: "<?php echo str_replace(array('%27', '"' , '\"'), '', strip_tags($view['subject'])); ?>",
|
||||
description: "<?php echo preg_replace('/\r\n|\r|\n/','', strip_tags(get_text(cut_str(strip_tags($view['wr_content']), 200), 1))); ?>",
|
||||
imageUrl: imageUrl,
|
||||
link: {
|
||||
mobileWebUrl: webUrl,
|
||||
webUrl: webUrl
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
title: '자세히 보기',
|
||||
link: {
|
||||
mobileWebUrl: webUrl,
|
||||
webUrl: webUrl
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<ul id="bo_v_sns" class="<?php echo $bo_v_sns_class; ?>">
|
||||
<li><a href="<?php echo $facebook_url; ?>" target="_blank" class="sns_f"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 공유" width="20"><span>페이스북 공유</span></a></li>
|
||||
<li><a href="<?php echo $twitter_url; ?>" target="_blank" class="sns_t"><img src="<?php echo G5_SNS_URL; ?>/icon/twitter.png" alt="트위터로 공유" width="20"><span>트위터 공유</span></a></li>
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<li><a href="javascript:Kakao_sendLink();" class="sns_k" ><img src="<?php echo G5_SNS_URL; ?>/icon/kakaotalk.png" alt="카카오톡으로 보내기" width="20"></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if (!$board['bo_use_sns']) return;
|
||||
|
||||
$sns_msg = urlencode(str_replace('\"', '"', $view['subject']));
|
||||
//$sns_url = googl_short_url('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
//$msg_url = $sns_msg.' : '.$sns_url;
|
||||
|
||||
/*
|
||||
$facebook_url = 'http://www.facebook.com/sharer/sharer.php?s=100&p[url]='.$sns_url.'&p[title]='.$sns_msg;
|
||||
$twitter_url = 'http://twitter.com/home?status='.$msg_url;
|
||||
$gplus_url = 'https://plus.google.com/share?url='.$sns_url;
|
||||
*/
|
||||
|
||||
$sns_send = G5_BBS_URL.'/sns_send.php?longurl='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||
//$sns_send .= '&title='.urlencode(utf8_strcut(get_text($view['subject']),140));
|
||||
$sns_send .= '&title='.$sns_msg;
|
||||
|
||||
$facebook_url = $sns_send.'&sns=facebook';
|
||||
$twitter_url = $sns_send.'&sns=twitter';
|
||||
$gplus_url = $sns_send.'&sns=gplus';
|
||||
$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?ver=<?php echo G5_JS_VER; ?>" charset="utf-8"></script>
|
||||
<script type='text/javascript'>
|
||||
//<![CDATA[
|
||||
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") || '';
|
||||
|
||||
Kakao.Link.sendDefault({
|
||||
objectType: 'feed',
|
||||
content: {
|
||||
title: "<?php echo str_replace(['%27', '"' , '\"'], '', strip_tags($view['subject'])); ?>",
|
||||
description: "<?php echo preg_replace('/\r\n|\r|\n/','', strip_tags(get_text(cut_str(strip_tags($view['wr_content']), 200), 1))); ?>",
|
||||
imageUrl: imageUrl,
|
||||
link: {
|
||||
mobileWebUrl: webUrl,
|
||||
webUrl: webUrl
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
title: '자세히 보기',
|
||||
link: {
|
||||
mobileWebUrl: webUrl,
|
||||
webUrl: webUrl
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
<ul id="bo_v_sns" class="<?php echo $bo_v_sns_class; ?>">
|
||||
<li><a href="<?php echo $facebook_url; ?>" target="_blank" class="sns_f"><img src="<?php echo G5_SNS_URL; ?>/icon/facebook.png" alt="페이스북으로 공유" width="20"><span>페이스북 공유</span></a></li>
|
||||
<li><a href="<?php echo $twitter_url; ?>" target="_blank" class="sns_t"><img src="<?php echo G5_SNS_URL; ?>/icon/twitter.png" alt="트위터로 공유" width="20"><span>트위터 공유</span></a></li>
|
||||
<?php if($config['cf_kakao_js_apikey']) { ?>
|
||||
<li><a href="javascript:Kakao_sendLink();" class="sns_k" ><img src="<?php echo G5_SNS_URL; ?>/icon/kakaotalk.png" alt="카카오톡으로 보내기" width="20"></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ $next_part_href = '';
|
|||
if ($sca || $stx) {
|
||||
$list_href = './board.php?bo_table=' . $bo_table;
|
||||
|
||||
$patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
|
||||
$patterns = ['#&page=[0-9]*#', '#&spt=[0-9\-]*#'];
|
||||
|
||||
//if ($prev_spt >= $min_spt)
|
||||
$prev_spt = $spt - $config['cf_search_part'];
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ $file_index = $board_skin_path . "/day"; ### 기념일 폴더 위치 지정
|
|||
### 양력 기념일 파일 지정 : 해당년도 파일이 없으면 기본파일(solar.txt)을 불러온다
|
||||
//$dayfile = file($file_index."/solar.txt");
|
||||
|
||||
$lastday = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
|
||||
$lastday = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
if ($year % 4 == 0)
|
||||
$lastday[2] = 29;
|
||||
$dayoftheweek = date("w", mktime(0, 0, 0, $month, 1, $year));
|
||||
|
|
|
|||
Loading…
Reference in a new issue