Compare commits

...
17 Commits
Author SHA1 Message Date
thisgun ab7ba78fd2 Merge branch 'master' of github.com:gnuboard/g5 2021-01-08 15:54:28 +09:00
thisgun 8e679ee4da 버전 5.4.4.4 수정 2021-01-08 15:46:33 +09:00
thisgun be2f27a7fa PHP8 버전에서 경고코드가 표시되는 코드 수정 2021-01-08 15:45:55 +09:00
thisgun 18bc64ab0a Merge branch 'master' of github.com:gnuboard/g5 2021-01-06 14:24:51 +09:00
thisgun 5e5cd396c4 잘못 수정한 회원가입완료 코드 재수정 2021-01-06 13:43:00 +09:00
thisgun 24268f70b8 Merge branch 'master' of github.com:gnuboard/g5 2021-01-06 10:43:21 +09:00
thisgun 15ad2b6b35 버전 5.4.4.3 수정 2021-01-06 10:28:42 +09:00
thisgun 2d1ef8b7bb 기존 스킨 또는 테마 title 에서 불필요한 | 문자열이 들어가 PHP8 버전 조건문 추가 2021-01-06 10:27:25 +09:00
thisgun e5ab7456f2 PHP80 버전에서 경고문이 나오는 코드 및 글 이동시 오류 현상 수정 2021-01-06 09:59:33 +09:00
thisgun 3eb07bdfa0 Merge branch 'master' of github.com:gnuboard/g5 2021-01-05 20:34:02 +09:00
thisgun 242eed5b35 head.sub.php 파일의 상태바 타이틀 코드 수정 2021-01-05 20:29:00 +09:00
thisgun caf16b5d6a 버전 5.4.4.2 2021-01-05 20:14:57 +09:00
thisgun c5c8924b42 1:1 문의 답변 오류 및 스킨 코드 수정 2021-01-05 20:14:30 +09:00
lupin_latte e6764f4a7c Merge branch 'master' of github.com:gnuboard/g5 2021-01-05 16:04:40 +09:00
thisgun 6368a5b638 PHP8 버전에서 경고문이 나오는 코드 추가 수정 2021-01-05 15:37:00 +09:00
thisgun 12c836104a 버전 5.4.4.1 수정 2021-01-05 14:13:05 +09:00
thisgun c77a001355 관리자 < 내용관리 삭제가 안되는 오류수정 및 PHP8 경고메시지 뜨는 코드 추가 수정 2021-01-05 14:12:04 +09:00
30 changed files with 217 additions and 141 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ function get_theme_config_value($dir, $key='*')
} else {
$keys = array_map('trim', explode(',', $key));
foreach($keys as $v) {
$tconfig[$v] = trim($theme_config[$v]);
$tconfig[$v] = isset($theme_config[$v]) ? trim($theme_config[$v]) : '';
}
}
}
+3 -3
View File
@@ -570,14 +570,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td colspan="3">
<?php if (!function_exists('curl_init')) echo help('<b>경고) curl이 지원되지 않아 네이버 신디케이션을 사용할수 없습니다.</b>'); ?>
<?php echo help('네이버 신디케이션 연동키(token)을 입력하면 네이버 신디케이션을 사용할 수 있습니다.<br>연동키는 <a href="http://webmastertool.naver.com/" target="_blank"><u>네이버 웹마스터도구</u></a> -> 네이버 신디케이션에서 발급할 수 있습니다.') ?>
<input type="text" name="cf_syndi_token" value="<?php echo get_sanitize_input($config['cf_syndi_token']); ?>" id="cf_syndi_token" class="frm_input" size="70">
<input type="text" name="cf_syndi_token" value="<?php echo isset($config['cf_syndi_token']) ? get_sanitize_input($config['cf_syndi_token']) : ''; ?>" id="cf_syndi_token" class="frm_input" size="70">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_syndi_except">네이버 신디케이션 제외게시판</label></th>
<td colspan="3">
<?php echo help('네이버 신디케이션 수집에서 제외할 게시판 아이디를 | 로 구분하여 입력하십시오. 예) notice|adult<br>참고로 그룹접근사용 게시판, 글읽기 권한 2 이상 게시판, 비밀글은 신디케이션 수집에서 제외됩니다.') ?>
<input type="text" name="cf_syndi_except" value="<?php echo get_sanitize_input($config['cf_syndi_except']); ?>" id="cf_syndi_except" class="frm_input" size="70">
<input type="text" name="cf_syndi_except" value="<?php echo isset($config['cf_syndi_except']) ? get_sanitize_input($config['cf_syndi_except']) : ''; ?>" id="cf_syndi_except" class="frm_input" size="70">
</td>
</tr>
</tbody>
@@ -1317,7 +1317,7 @@ include_once('_rewrite_config_form.php');
<th scope="row"><label for="cf_icode_token_key">아이코드 토큰키<br>(JSON버전)</label></th>
<td>
<?php echo help("아이코드 JSON 버전의 경우 아이코드 토큰키를 입력시 실행됩니다.<br>SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다."); ?>
<input type="text" name="cf_icode_token_key" value="<?php echo $config['cf_icode_token_key']; ?>" id="cf_icode_token_key" class="frm_input" size="40">
<input type="text" name="cf_icode_token_key" value="<?php echo isset($config['cf_icode_token_key']) ? get_sanitize_input($config['cf_icode_token_key']) : ''; ?>" id="cf_icode_token_key" class="frm_input" size="40">
<?php echo help("아이코드 사이트 -> 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다."); ?>
<br>
서버아이피 : <?php echo $_SERVER['SERVER_ADDR']; ?>
+14 -7
View File
@@ -12,24 +12,31 @@ else
check_admin_token();
$co_row = array('co_id'=>'', 'co_include_head'=>'', 'co_include_tail'=>'');
if ($w == "" || $w == "u")
{
if(isset($_POST['co_id']) && preg_match("/[^a-z0-9_]/i", $_POST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
if(isset($_REQUEST['co_id']) && preg_match("/[^a-z0-9_]/i", $_REQUEST['co_id'])) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
$co_row = sql_fetch($sql);
}
$co_id = isset($_POST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['co_id']) : '';
$co_subject = strip_tags(clean_xss_attributes($co_subject));
$co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255));
$co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255));
$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
$co_subject = isset($_POST['co_subject']) ? strip_tags(clean_xss_attributes($_POST['co_subject'])) : '';
$co_include_head = isset($_POST['co_include_head']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_head'], 0, 255)) : '';
$co_include_tail = isset($_POST['co_include_tail']) ? preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($_POST['co_include_tail'], 0, 255)) : '';
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
$co_html = isset($_POST['co_html']) ? (int) $_POST['co_html'] : 0;
$co_content = isset($_POST['co_content']) ? $_POST['co_content'] : '';
$co_mobile_content = isset($_POST['co_mobile_content']) ? $_POST['co_mobile_content'] : '';
$co_skin = isset($_POST['co_skin']) ? clean_xss_tags($_POST['co_skin'], 1, 1) : '';
$co_mobile_skin = isset($_POST['co_mobile_skin']) ? clean_xss_tags($_POST['co_mobile_skin'], 1, 1) : '';
// 관리자가 자동등록방지를 사용해야 할 경우
if (($co_row['co_include_head'] !== $co_include_head || $co_row['co_include_tail'] !== $co_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
if ((( isset($co_row['co_include_head']) && $co_row['co_include_head'] !== $co_include_head ) || ( isset($co_row['co_include_tail']) && $co_row['co_include_tail'] !== $co_include_tail )) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if (!chk_captcha()) {
@@ -94,7 +101,7 @@ $sql_common = " co_include_head = '$co_include_head',
if ($w == "")
{
$row = $co_row;
if ($row['co_id'])
if (isset($row['co_id']) && $row['co_id'])
alert("이미 같은 ID로 등록된 내용이 있습니다.");
$sql = " insert {$g5['content_table']}
+7 -8
View File
@@ -1,4 +1,5 @@
<?php
$sub_menu = "900600";
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
@@ -46,18 +47,16 @@ if ($sw == 'move')
$msg = '해당 이모티콘을 선택한 그룹으로 이동 하였습니다.';
$opener_href = './form_list.php?page='.$page;
echo <<<HEREDOC
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
alert("$msg");
opener.document.location.href = "$opener_href";
alert("<?php echo $msg; ?>");
opener.document.location.href = "<?php echo $opener_href; ?>";
window.close();
</script>
<noscript>
<p>
"$msg"
<?php echo $msg; ?>
</p>
<a href="$opener_href">돌아가기</a>
</noscript>
HEREDOC;
<a href="<?php echo $opener_href; ?>">돌아가기</a>
</noscript>
+5 -4
View File
@@ -34,7 +34,7 @@ if ($st == 'all') {
}
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where 1 $sql_group $sql_search");
$total_count = $total_res['cnt'];
$total_count = isset($total_res['cnt']) ? $total_res['cnt'] : 0;
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
$page_start = $page_size * ( $page - 1 );
@@ -46,7 +46,7 @@ $qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name"
while ($res = sql_fetch_array($qry)) array_push($group, $res);
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where fg_no=0");
$no_count = $res['cnt'];
$no_count = isset($res['cnt']) ? $res['cnt'] : 0;
include_once(G5_ADMIN_PATH.'/admin.head.php');
?>
@@ -146,6 +146,7 @@ function multi_update(sel)
<form name="emoticonlist" id="emoticonlist" method="post" action="./form_multi_update.php" onsubmit="return emoticonlist_submit(this);" >
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="hidden" name="fg_no" value="<?php echo $fg_no; ?>">
<input type="hidden" name="sw" value="">
<input type="hidden" name="atype" value="del">
<ul id="sms5_preset" class="sms5_box">
@@ -234,7 +235,7 @@ function select_copy(sw, f) {
}
</script>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME']."?fg_no=$fg_no&amp;st=$st&amp;sv=$sv&amp;page="); ?>
<?php
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['SCRIPT_NAME']."?fg_no=$fg_no&amp;st=$st&amp;sv=$sv&amp;page=");
include_once(G5_ADMIN_PATH.'/admin.tail.php');
+2 -1
View File
@@ -8,6 +8,7 @@ check_admin_token();
$post_fo_no = (isset($_POST['fo_no']) && is_array($_POST['fo_no'])) ? $_POST['fo_no'] : array();
$atype = isset($_POST['atype']) ? clean_xss_tags($_POST['atype'], 1, 1) : '';
$fg_no = isset($_POST['fg_no']) ? (int) $_POST['fg_no'] : 0;
if($atype == "del"){
$count = count($post_fo_no);
@@ -27,4 +28,4 @@ if($atype == "del"){
sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res['fg_no']}'");
}
}
goto_url('./form_list.php');
goto_url('./form_list.php?fg_no='.$fg_no);
+1
View File
@@ -7,6 +7,7 @@ auth_check_menu($auth, $sub_menu, "w");
$fo_name = isset($_REQUEST['fo_name']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_name'])) : '';
$fo_content = isset($_REQUEST['fo_content']) ? strip_tags(clean_xss_attributes($_REQUEST['fo_content'])) : '';
$fo_receipt = isset($_REQUEST['fo_receipt']) ? clean_xss_tags($_REQUEST['fo_receipt'], 1, 1) : '';
$get_fg_no = '';
$g5['title'] = "이모티콘 업데이트";
+14 -13
View File
@@ -2,6 +2,7 @@
include_once('./_common.php');
$co_id = isset($_GET['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_GET['co_id']) : 0;
$co_seo_title = isset($_GET['co_seo_title']) ? clean_xss_tags($_GET['co_seo_title'], 1, 1) : '';
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
if( !isset($g5['content_table']) ){
@@ -25,7 +26,7 @@ if (G5_IS_MOBILE) {
return;
}
if (!$co['co_id'])
if (! (isset($co['co_id']) && $co['co_id']))
alert('등록된 내용이 없습니다.');
$g5['title'] = $co['co_subject'];
@@ -45,29 +46,29 @@ $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
$dst[] = $config['cf_title'];
if(isset($default) && isset($default['de_admin_company_name'])){
$src[] = "/{{회사명}}|{{상호}}/";
$dst[] = $default['de_admin_company_name'];
$dst[] = isset($default['de_admin_company_name']) ? $default['de_admin_company_name'] : '';
$src[] = "/{{대표자명}}/";
$dst[] = $default['de_admin_company_owner'];
$dst[] = isset($default['de_admin_company_owner']) ? $default['de_admin_company_owner'] : '';
$src[] = "/{{사업자등록번호}}/";
$dst[] = $default['de_admin_company_saupja_no'];
$dst[] = isset($default['de_admin_company_saupja_no']) ? $default['de_admin_company_saupja_no'] : '';
$src[] = "/{{대표전화번호}}/";
$dst[] = $default['de_admin_company_tel'];
$dst[] = isset($default['de_admin_company_tel']) ? $default['de_admin_company_tel'] : '';
$src[] = "/{{팩스번호}}/";
$dst[] = $default['de_admin_company_fax'];
$dst[] = isset($default['de_admin_company_fax']) ? $default['de_admin_company_fax'] : '';
$src[] = "/{{통신판매업신고번호}}/";
$dst[] = $default['de_admin_company_tongsin_no'];
$dst[] = isset($default['de_admin_company_tongsin_no']) ? $default['de_admin_company_tongsin_no'] : '';
$src[] = "/{{사업장우편번호}}/";
$dst[] = $default['de_admin_company_zip'];
$dst[] = isset($default['de_admin_company_zip']) ? $default['de_admin_company_zip'] : '';
$src[] = "/{{사업장주소}}/";
$dst[] = $default['de_admin_company_addr'];
$dst[] = isset($default['de_admin_company_addr']) ? $default['de_admin_company_addr'] : '';
$src[] = "/{{운영자명}}|{{관리자명}}/";
$dst[] = $default['de_admin_name'];
$dst[] = isset($default['de_admin_name']) ? $default['de_admin_name'] : '';
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
$dst[] = $default['de_admin_email'];
$dst[] = isset($default['de_admin_email']) ? $default['de_admin_email'] : '';
$src[] = "/{{정보관리책임자명}}/";
$dst[] = $default['de_admin_info_name'];
$dst[] = isset($default['de_admin_info_name']) ? $default['de_admin_info_name'] : '';
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
$dst[] = $default['de_admin_info_email'];
$dst[] = isset($default['de_admin_info_email']) ? $default['de_admin_info_email'] : '';
}
$str = preg_replace($src, $dst, $str);
+1 -1
View File
@@ -25,7 +25,7 @@ else {
$count_chk_wr_id = (isset($_POST['chk_wr_id']) && is_array($_POST['chk_wr_id'])) ? count($_POST['chk_wr_id']) : 0;
for ($i=0; $i<count($count_chk_wr_id); $i++) {
for ($i=0; $i<$count_chk_wr_id; $i++) {
$wr_id_val = isset($_POST['chk_wr_id'][$i]) ? preg_replace('/[^0-9]/', '', $_POST['chk_wr_id'][$i]) : 0;
$wr_id_list .= $comma . $wr_id_val;
$comma = ',';
+6 -8
View File
@@ -242,18 +242,16 @@ $opener_href = get_pretty_url($bo_table,'','&amp;page='.$page.'&amp;'.$qstr);
$opener_href1 = str_replace('&amp;', '&', $opener_href);
run_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
echo <<<HEREDOC
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
alert("$msg");
opener.document.location.href = "$opener_href1";
alert("<?php echo $msg; ?>");
opener.document.location.href = "<?php echo $opener_href1; ?>";
window.close();
</script>
<noscript>
<p>
"$msg"
<?php echo $msg; ?>
</p>
<a href="$opener_href">돌아가기</a>
</noscript>
HEREDOC;
<a href="<?php echo $opener_href; ?>">돌아가기</a>
</noscript>
+1 -1
View File
@@ -19,7 +19,7 @@ $token = isset($_POST['token']) ? clean_xss_tags($_POST['token'], 1, 1) : '';
//모든 회원의 토큰을 검사합니다.
if (!($token && $write_token === $token))
alert('토큰 에러로 삭제 불가합니다.');
alert('올바른 방법으로 이용해 주십시오.');
// 1:1문의 설정값
$qaconfig = get_qa_config();
+2 -2
View File
@@ -34,8 +34,8 @@ if(!$mb_id)
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password']) : '';
$mb_password_re = isset($_POST['mb_password_re']) ? trim($_POST['mb_password_re']) : '';
$mb_name = isset($_POST['mb_name']) ? trim($_POST['mb_name']) : '';
$mb_nick = isset($_POST['mb_name']) ? trim($_POST['mb_nick']) : '';
$mb_email = isset($_POST['mb_name']) ? trim($_POST['mb_email']) : '';
$mb_nick = isset($_POST['mb_nick']) ? trim($_POST['mb_nick']) : '';
$mb_email = isset($_POST['mb_email']) ? trim($_POST['mb_email']) : '';
$mb_sex = isset($_POST['mb_sex']) ? trim($_POST['mb_sex']) : "";
$mb_birth = isset($_POST['mb_birth']) ? trim($_POST['mb_birth']) : "";
$mb_homepage = isset($_POST['mb_homepage']) ? trim($_POST['mb_homepage']) : "";
+7 -9
View File
@@ -11,7 +11,7 @@ if (!$is_member)
}
// 게시글 존재하는지
if(!$write['wr_id'])
if(! (isset($write['wr_id']) && $write['wr_id']))
alert_close('스크랩하시려는 게시글이 존재하지 않습니다.');
$sql = " select count(*) as cnt from {$g5['scrap_table']}
@@ -19,7 +19,7 @@ $sql = " select count(*) as cnt from {$g5['scrap_table']}
and bo_table = '$bo_table'
and wr_id = '$wr_id' ";
$row = sql_fetch($sql);
if ($row['cnt'])
if (isset($row['cnt']) && $row['cnt'])
{
echo '
<script>
@@ -43,7 +43,7 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
{
$wr = get_write($write_table, $wr_id);
// 원글이 존재한다면
if ($wr['wr_id'])
if (isset($wr['wr_id']) && $wr['wr_id'])
{
// 세션의 시간 검사
@@ -105,16 +105,14 @@ $sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($
sql_query($sql);
delete_cache_latest($bo_table);
echo <<<HEREDOC
?>
<script>
if (confirm('이 글을 스크랩 하였습니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
document.location.href = './scrap.php';
if (confirm("이 글을 스크랩 하였습니다.\n\n지금 스크랩을 확인하시겠습니까?"))
document.location.href = "./scrap.php";
else
window.close();
</script>
<noscript>
<p>이 글을 스크랩 하였습니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
</noscript>
HEREDOC;
</noscript>
+2 -1
View File
@@ -126,7 +126,8 @@ $config = array();
$member = array('mb_id'=>'', 'mb_level'=> 1, 'mb_name'=> '', 'mb_point'=> 0, 'mb_certify'=>'', 'mb_email'=>'', 'mb_open'=>'', 'mb_homepage'=>'', 'mb_tel'=>'', 'mb_hp'=>'', 'mb_zip1'=>'', 'mb_zip2'=>'', 'mb_addr1'=>'', 'mb_addr2'=>'', 'mb_addr3'=>'', 'mb_addr_jibeon'=>'', 'mb_signature'=>'', 'mb_profile'=>'');
$board = array('bo_table'=>'', 'bo_skin'=>'', 'bo_mobile_skin'=>'', 'bo_upload_count' => 0, 'bo_use_dhtml_editor'=>'', 'bo_subject'=>'', 'bo_image_width'=>0);
$group = array('gr_device'=>'', 'gr_subject'=>'');
$g5 = array('title'=>'');
$g5 = array();
if( version_compare( phpversion(), '8.0.0', '>=' ) ) { $g5 = array('title'=>''); }
$qaconfig = array();
$g5_debug = array('php'=>array(),'sql'=>array());
+1 -1
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.4.4');
define('G5_GNUBOARD_VER', '5.4.4.4');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
+1 -1
View File
@@ -14,7 +14,7 @@ function show_debug_bar() {
}
$memory_usage = function_exists( 'memory_get_peak_usage' ) ? memory_get_peak_usage() : memory_get_usage();
$php_run_time = get_microtime()-$g5_debug['php']['begin_time'];
$php_run_time = (isset($g5_debug['php']) && isset($g5_debug['php']['begin_time'])) ? ( get_microtime() - $g5_debug['php']['begin_time'] ) : 0;
include_once( G5_PLUGIN_PATH.'/debugbar/debugbar.php' );
}
+2 -2
View File
@@ -15,8 +15,8 @@ if (!isset($g5['title'])) {
$g5_head_title = $g5['title'];
}
else {
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
$g5_head_title .= " | ".$config['cf_title'];
// 상태바에 표시될 제목
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
}
$g5['title'] = strip_tags($g5['title']);
+2
View File
@@ -1644,6 +1644,8 @@ function sql_fetch($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
// 결과값에서 한행 연관배열(이름으로)로 얻는다.
function sql_fetch_array($result)
{
if( ! $result) return array();
if(function_exists('mysqli_fetch_assoc') && G5_MYSQLI_USE)
$row = @mysqli_fetch_assoc($result);
else
+35 -35
View File
@@ -96,48 +96,48 @@ function get_menu_db($use_mobile=0, $is_cache=false){
global $g5;
static $cache = array();
$cache = run_replace('get_menu_db_cache', $cache, $use_mobile, $is_cache);
$key = md5($use_mobile);
$cache = run_replace('get_menu_db_cache', $cache, $use_mobile, $is_cache);
$key = md5($use_mobile);
if( $is_cache && isset($cache[$key]) ){
return $cache[$key];
}
$where = $use_mobile ? "me_mobile_use = '1'" : "me_use = '1'";
if( !($cache[$key] = run_replace('get_menu_db', array(), $use_mobile)) ){
$sql = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
$where = $use_mobile ? "me_mobile_use = '1'" : "me_use = '1'";
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['ori_me_link'] = $row['me_link'];
$row['me_link'] = short_url_clean($row['me_link']);
if( !($cache[$key] = run_replace('get_menu_db', array(), $use_mobile)) ){
$sql = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '2'
order by me_order, me_id ";
$result = sql_query($sql, false);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['ori_me_link'] = $row['me_link'];
$row['me_link'] = short_url_clean($row['me_link']);
$row['sub'] = isset($row['sub']) ? $row['sub'] : array();
$cache[$key][$i] = $row;
$cache[$key][$i] = $row;
$sql2 = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
$row2['ori_me_link'] = $row2['me_link'];
$row2['me_link'] = short_url_clean($row2['me_link']);
$cache[$key][$i]['sub'][$k] = $row2;
}
}
}
$sql2 = " select *
from {$g5['menu_table']}
where $where
and length(me_code) = '4'
and substring(me_code, 1, 2) = '{$row['me_code']}'
order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
$row2['ori_me_link'] = $row2['me_link'];
$row2['me_link'] = short_url_clean($row2['me_link']);
$cache[$key][$i]['sub'][$k] = $row2;
}
}
}
return $cache[$key];
return $cache[$key];
}
// 게시판 테이블에서 하나의 행을 읽음
@@ -465,7 +465,7 @@ function get_memo_not_read($mb_id, $add_where='')
$sql = " SELECT count(*) as cnt FROM {$g5['memo_table']} WHERE me_recv_mb_id = '$mb_id' and me_type= 'recv' and me_read_datetime like '0%' $add_where ";
$row = sql_fetch($sql, false);
return $row['cnt'];
return isset($row['cnt']) ? $row['cnt'] : 0;
}
function get_scrap_totals($mb_id=''){
@@ -476,5 +476,5 @@ function get_scrap_totals($mb_id=''){
$sql = " select count(*) as cnt from {$g5['scrap_table']} where 1=1 $add_where";
$row = sql_fetch($sql, false);
return $row['cnt'];
return isset($row['cnt']) ? $row['cnt'] : 0;
}
+4 -4
View File
@@ -28,7 +28,7 @@ function get_pretty_url($folder, $no='', $query_string='', $action='')
if( $config['cf_bbs_rewrite'] > 1 ){
$get_content = get_content_db( $no , true);
$segments[2] = $get_content['co_seo_title'] ? urlencode($get_content['co_seo_title']).'/' : urlencode($no);
$segments[2] = (isset($get_content['co_seo_title']) && $get_content['co_seo_title']) ? urlencode($get_content['co_seo_title']).'/' : urlencode($no);
} else {
$segments[2] = urlencode($no);
@@ -44,7 +44,7 @@ function get_pretty_url($folder, $no='', $query_string='', $action='')
$get_write = get_write( $g5['write_prefix'].$folder, $no , true);
$segments[2] = $get_write['wr_seo_title'] ? urlencode($get_write['wr_seo_title']).'/' : urlencode($no);
$segments[2] = (isset($get_write['wr_seo_title']) && $get_write['wr_seo_title']) ? urlencode($get_write['wr_seo_title']).'/' : urlencode($no);
} else {
$segments[2] = urlencode($no);
@@ -282,7 +282,7 @@ function seo_title_update($db_table, $pk_id, $type='bbs'){
if( $type === 'bbs' ){
$write = get_write($db_table, $pk_id, true);
if( ! $write['wr_seo_title'] && $write['wr_subject'] ){
if( ! (isset($write['wr_seo_title']) && $write['wr_seo_title']) && (isset($write['wr_subject']) && $write['wr_subject']) ){
$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($write['wr_subject']), $db_table, $pk_id);
$sql = " update `{$db_table}` set wr_seo_title = '{$wr_seo_title}' where wr_id = '{$pk_id}' ";
@@ -291,7 +291,7 @@ function seo_title_update($db_table, $pk_id, $type='bbs'){
} else if ( $type === 'content' ){
$co = get_content_db($pk_id, true);
if( ! $co['co_seo_title'] && $co['co_subject'] ){
if( ! (isset($co['co_seo_title']) && $co['co_seo_title']) && (isset($co['co_subject']) && $co['co_subject']) ){
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($co['co_subject']), $db_table, $pk_id);
$sql = " update `{$db_table}` set co_seo_title = '{$co_seo_title}' where co_id = '{$pk_id}' ";
+12 -12
View File
@@ -16,29 +16,29 @@ $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/";
$dst[] = $config['cf_title'];
if(isset($default) && isset($default['de_admin_company_name'])){
$src[] = "/{{회사명}}|{{상호}}/";
$dst[] = $default['de_admin_company_name'];
$dst[] = isset($default['de_admin_company_name']) ? $default['de_admin_company_name'] : '';
$src[] = "/{{대표자명}}/";
$dst[] = $default['de_admin_company_owner'];
$dst[] = isset($default['de_admin_company_owner']) ? $default['de_admin_company_owner'] : '';
$src[] = "/{{사업자등록번호}}/";
$dst[] = $default['de_admin_company_saupja_no'];
$dst[] = isset($default['de_admin_company_saupja_no']) ? $default['de_admin_company_saupja_no'] : '';
$src[] = "/{{대표전화번호}}/";
$dst[] = $default['de_admin_company_tel'];
$dst[] = isset($default['de_admin_company_tel']) ? $default['de_admin_company_tel'] : '';
$src[] = "/{{팩스번호}}/";
$dst[] = $default['de_admin_company_fax'];
$dst[] = isset($default['de_admin_company_fax']) ? $default['de_admin_company_fax'] : '';
$src[] = "/{{통신판매업신고번호}}/";
$dst[] = $default['de_admin_company_tongsin_no'];
$dst[] = isset($default['de_admin_company_tongsin_no']) ? $default['de_admin_company_tongsin_no'] : '';
$src[] = "/{{사업장우편번호}}/";
$dst[] = $default['de_admin_company_zip'];
$dst[] = isset($default['de_admin_company_zip']) ? $default['de_admin_company_zip'] : '';
$src[] = "/{{사업장주소}}/";
$dst[] = $default['de_admin_company_addr'];
$dst[] = isset($default['de_admin_company_addr']) ? $default['de_admin_company_addr'] : '';
$src[] = "/{{운영자명}}|{{관리자명}}/";
$dst[] = $default['de_admin_name'];
$dst[] = isset($default['de_admin_name']) ? $default['de_admin_name'] : '';
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
$dst[] = $default['de_admin_email'];
$dst[] = isset($default['de_admin_email']) ? $default['de_admin_email'] : '';
$src[] = "/{{정보관리책임자명}}/";
$dst[] = $default['de_admin_info_name'];
$dst[] = isset($default['de_admin_info_name']) ? $default['de_admin_info_name'] : '';
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
$dst[] = $default['de_admin_info_email'];
$dst[] = isset($default['de_admin_info_email']) ? $default['de_admin_info_email'] : '';
}
$str = preg_replace($src, $dst, $str);
+7 -7
View File
@@ -5,6 +5,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($admin_href || $write_href) { ?>
<ul class="btn_top top btn_bo_user">
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
@@ -41,12 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<!-- } 카테고리 끝 -->
<?php } ?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($is_checkbox) { ?>
<div class="all_chk chk_box">
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
@@ -93,8 +93,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<?php if ($i == 0) { echo '<li class="empty_list">게시물이 없습니다.</li>'; } ?>
</ul>
</div>
</form>
</div>
</form>
<?php if($is_checkbox) { ?>
<noscript>
+19 -1
View File
@@ -9,12 +9,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<h2>답변등록</h2>
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
<input type="hidden" name="w" value="a">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -104,6 +105,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
+1 -1
View File
@@ -16,8 +16,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<li>
<button type="button" class="btn_more_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
<ul class="more_opt">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
</ul>
</li>
</ul>
+18
View File
@@ -15,6 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -106,6 +107,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
+2 -2
View File
@@ -9,8 +9,8 @@ if (!isset($g5['title'])) {
$g5_head_title = $g5['title'];
}
else {
$g5_head_title = $g5['title']; // 상태바에 표시될 제목
$g5_head_title .= " | ".$config['cf_title'];
// 상태바에 표시될 제목
$g5_head_title = implode(' | ', array_filter(array($g5['title'], $config['cf_title'])));
}
$g5['title'] = strip_tags($g5['title']);
@@ -5,6 +5,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($admin_href || $write_href) { ?>
<ul class="btn_top top btn_bo_user">
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
@@ -41,12 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<!-- } 카테고리 끝 -->
<?php } ?>
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo get_text($token); ?>">
<?php if ($is_checkbox) { ?>
<div class="all_chk chk_box">
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);" class="selec_chk">
@@ -93,8 +93,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<?php if ($i == 0) { echo '<li class="empty_list">게시물이 없습니다.</li>'; } ?>
</ul>
</div>
</form>
</div>
</form>
<?php if($is_checkbox) { ?>
<noscript>
@@ -9,12 +9,13 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<h2>답변등록</h2>
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
<input type="hidden" name="w" value="a">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -104,6 +105,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;
@@ -15,15 +15,10 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
<?php } ?>
<li>
<button type="button" class="btn_more_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">게시판 리스트 옵션</span></button>
<?php ob_start(); ?>
<ul class="more_opt">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" onclick="del(this.href); return false;"><i class="fa fa-trash-o" aria-hidden="true"></i> 삭제</a></li><?php } ?>
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 수정</a></li><?php } ?>
</ul>
<?php
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</li>
</ul>
<script>
@@ -113,8 +108,8 @@ $(".btn_more_opt").on("click", function() {
<?php if ($prev_href || $next_href) { ?>
<ul class="bo_v_nb">
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_wr_subject;?></a></li><?php } ?>
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_wr_subject;?></a></li><?php } ?>
<?php if ($prev_href) { ?><li class="bo_v_prev"><a href="<?php echo $prev_href ?>"><i class="fa fa-chevron-up" aria-hidden="true"></i><span class="sound_only">이전글</span> <?php echo $prev_qa_subject;?></a></li><?php } ?>
<?php if ($next_href) { ?><li class="bo_v_next"><a href="<?php echo $next_href ?>"><i class="fa fa-chevron-down" aria-hidden="true"></i><span class="sound_only">다음글</span> <?php echo $next_qa_subject;?></a></li><?php } ?>
</ul>
<?php } ?>
</article>
@@ -15,6 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
@@ -106,6 +107,23 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
return false;
}
$.ajax({
type: "POST",
url: g5_bbs_url+"/ajax.write.token.php",
data: { 'token_case' : 'qa_write' },
cache: false,
async: false,
dataType: "json",
success: function(data) {
if (typeof data.token !== "undefined") {
token = data.token;
if(typeof f.token === "undefined")
$(f).prepend('<input type="hidden" name="token" value="">');
$(f).find("input[name=token]").val(token);
}
}
});
document.getElementById("btn_submit").disabled = "disabled";
return true;