충돌 수정
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$is_apache = (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false);
|
||||
|
||||
$is_nginx = (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
|
||||
|
||||
$is_iis = !$is_apache && (stripos($_SERVER['SERVER_SOFTWARE'], 'microsoft-iis') !== false);
|
||||
|
||||
$is_write_file = false;
|
||||
|
||||
if ( $is_nginx ){
|
||||
$is_write_file = false;
|
||||
} else if ( $is_apache && ((!file_exists(G5_PATH.'/.htaccess') && is_writable($home_path)) || is_writable(G5_PATH.'/.htaccess')) ){
|
||||
$is_write_file = true;
|
||||
}
|
||||
|
||||
$get_path_url = parse_url( G5_URL );
|
||||
|
||||
$base_path = isset($get_path_url['path']) ? $get_path_url['path'].'/' : '/';
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/remodal/remodal.css">', 11);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/remodal/remodal-default-theme.css">', 12);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/remodal/remodal.js"></script>', 10);
|
||||
?>
|
||||
<section id="anc_cf_url">
|
||||
<h2 class="h2_frm">짧은 주소 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
게시판과 컨텐츠 페이지에 짧은 URL 을 사용합니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<?php if ( $is_apache ){ ?>
|
||||
<button type="button" data-remodal-target="modal_apache" class="btn btn_03">Apache 설정 코드 보기</button>
|
||||
<?php } else if ( $is_nginx ) { ?>
|
||||
<button type="button" data-remodal-target="modal_nginx" class="btn btn_03">Nginx 설정 코드 보기</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>짧은주소 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
$short_url_arrs = array(
|
||||
'0'=>array('label'=>'사용안함', 'url'=>G5_URL.'/board.php?bo_table=free&wr_id=123'),
|
||||
'1'=>array('label'=>'숫자', 'url'=>G5_URL.'/free/123'),
|
||||
'2'=>array('label'=>'글 이름', 'url'=>G5_URL.'/free/안녕하세요/'),
|
||||
);
|
||||
foreach($short_url_arrs as $k=>$v){
|
||||
$checked = ((int) $config['cf_bbs_rewrite'] === (int) $k) ? 'checked' : '';
|
||||
?>
|
||||
<tr>
|
||||
<td><input name="cf_bbs_rewrite" id="cf_bbs_rewrite_<?php echo $k; ?>" type="radio" value="<?php echo $k; ?>" <?php echo $checked;?> ><label for="cf_bbs_rewrite_<?php echo $k; ?>"><?php echo $v['label']; ?></label></td>
|
||||
<td><?php echo $v['url']; ?></td>
|
||||
</tr>
|
||||
<?php } //end foreach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="server_rewrite_info">
|
||||
<div class="is_rewrite remodal" data-remodal-id="modal_apache" role="dialog" aria-labelledby="modalApache" aria-describedby="modal1Desc">
|
||||
|
||||
<button type="button" class="connect-close" data-remodal-action="close">
|
||||
<i class="fa fa-close"></i>
|
||||
<span class="txt">닫기</span>
|
||||
</button>
|
||||
|
||||
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
|
||||
<?php if( ! $is_write_file ) { ?>
|
||||
<br>아래 코드를 복사하여 .htaccess 파일에 붙여넣기 하여 주세요.
|
||||
<?php } ?>
|
||||
</h4>
|
||||
<textarea readonly="readonly" rows="10"><?php echo get_mod_rewrite_rules(true); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="is_rewrite remodal" data-remodal-id="modal_nginx" role="dialog" aria-labelledby="modalNginx" aria-describedby="modal2Desc">
|
||||
|
||||
<h4 class="copy_title">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
|
||||
<textarea readonly="readonly" rows="10">
|
||||
if (!-e $request_filename){
|
||||
rewrite ^<?php echo $base_path; ?>content/([0-9a-zA-Z_]+)$ <?php echo $base_path; ?>bbs/content.php?co_id=$1&rewrite=1 break;
|
||||
rewrite ^<?php echo $base_path; ?>content/([^/]+)/$ <?php echo $base_path; ?>bbs/content.php?co_seo_title=$1&rewrite=1 break;
|
||||
rewrite ^<?php echo $base_path; ?>rss/([0-9a-zA-Z_]+)$ <?php echo $base_path; ?>bbs/rss.php?bo_table=$1 break;
|
||||
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&rewrite=1 break;
|
||||
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/([^/]+)/$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 break;
|
||||
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/write$ <?php echo $base_path; ?>bbs/write.php?bo_table=$1&rewrite=1 break;
|
||||
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/p([0-9]+)$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&page=$2 break;
|
||||
rewrite ^<?php echo $base_path; ?>([0-9a-zA-Z_]+)/([0-9]+)$ <?php echo $base_path; ?>bbs/board.php?bo_table=$1&wr_id=$2&rewrite=1 break;
|
||||
}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$begin_time = get_microtime();
|
||||
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
|
||||
|
||||
$files = glob(G5_ADMIN_PATH.'/css/admin_extend_*');
|
||||
if (is_array($files)) {
|
||||
@@ -101,7 +101,7 @@ function imageview(id, w, h)
|
||||
<h1><?php echo $config['cf_title'] ?></h1>
|
||||
<div id="hd_top">
|
||||
<button type="button" id="btn_gnb" class="btn_gnb_close <?php echo $adm_menu_cookie['btn_gnb'];?>">메뉴</button>
|
||||
<div id="logo"><a href="<?php echo G5_ADMIN_URL ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||
<div id="logo"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||
|
||||
<div id="tnb">
|
||||
<ul>
|
||||
|
||||
+1
-1
@@ -429,7 +429,7 @@ function admin_referer_check($return=false)
|
||||
// 접근 권한 검사
|
||||
if (!$member['mb_id'])
|
||||
{
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL));
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(correct_goto_url(G5_ADMIN_URL)));
|
||||
}
|
||||
else if ($is_admin != 'super')
|
||||
{
|
||||
|
||||
+2
-2
@@ -185,7 +185,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<?php if ($w == '') { ?>
|
||||
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table'] ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="<?php echo get_pretty_url($board['bo_table']) ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="./board_list.php?<?php echo $qstr;?>" class="btn_frmline">목록으로</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
@@ -1261,7 +1261,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<div class="btn_fixed_top">
|
||||
<?php if( $bo_table && $w ){ ?>
|
||||
<a href="./board_copy.php?bo_table=<?php echo $board['bo_table']; ?>" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table']; ?>" class=" btn_02 btn">게시판 바로가기</a>
|
||||
<a href="<?php echo get_pretty_url($board['bo_table']); ?>" class=" btn_02 btn">게시판 바로가기</a>
|
||||
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table'].'&'.$qstr;?>" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
|
||||
<?php } ?>
|
||||
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ $colspan = 15;
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
|
||||
<a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo $row['bo_table'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
|
||||
|
||||
@@ -127,7 +127,7 @@ $colspan = 10;
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_left"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_left"><a href="<?php echo get_pretty_url(G5_GROUP_DIR, $row['gr_id']); ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_input">
|
||||
<label for="gr_subject_<?php echo $i; ?>" class="sound_only">그룹제목</label>
|
||||
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" class="tbl_input">
|
||||
|
||||
@@ -85,7 +85,7 @@ $colspan = 4;
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_grid"><a href="<?php echo G5_BBS_URL; ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_grid"><a href="<?php echo get_pretty_url(G5_GROUP_DIR, $row['gr_id']); ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ $sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
@@ -3,7 +3,7 @@ $sub_menu = "100520";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
@@ -253,6 +253,12 @@ if(!sql_query(" DESC {$g5['social_profile_table']} ", false)) {
|
||||
) ", true);
|
||||
}
|
||||
|
||||
// 짧은 URL 주소를 사용 여부 필드 추가
|
||||
if (!isset($config['cf_bbs_rewrite'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_bbs_rewrite` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_link_target` ", true);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
@@ -264,6 +270,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_cf_board">게시판기본</a></li>
|
||||
<li><a href="#anc_cf_join">회원가입</a></li>
|
||||
<li><a href="#anc_cf_cert">본인확인</a></li>
|
||||
<li><a href="#anc_cf_url">짧은주소</a></li>
|
||||
<li><a href="#anc_cf_mail">기본메일환경</a></li>
|
||||
<li><a href="#anc_cf_article_mail">글작성메일</a></li>
|
||||
<li><a href="#anc_cf_join_mail">가입메일</a></li>
|
||||
@@ -881,6 +888,9 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('_rewrite_config_form.php');
|
||||
?>
|
||||
|
||||
<section id="anc_cf_mail">
|
||||
<h2 class="h2_frm">기본 메일 환경 설정</h2>
|
||||
|
||||
@@ -59,6 +59,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_add_meta = '{$_POST['cf_add_meta']}',
|
||||
cf_syndi_token = '{$_POST['cf_syndi_token']}',
|
||||
cf_syndi_except = '{$_POST['cf_syndi_except']}',
|
||||
cf_bbs_rewrite = '{$_POST['cf_bbs_rewrite']}',
|
||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||
@@ -177,5 +178,13 @@ sql_query($sql);
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||
|
||||
if( isset($_POST['cf_bbs_rewrite']) ){
|
||||
g5_delete_all_cache();
|
||||
}
|
||||
|
||||
start_event('admin_config_form_update');
|
||||
|
||||
update_rewrite_rules();
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
?>
|
||||
+1
-1
@@ -77,7 +77,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<td>
|
||||
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
||||
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id ="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo get_pretty_url('content', $co_id); ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -69,6 +69,8 @@ if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($co_subject), $g5['content_table'], $co_id);
|
||||
|
||||
$sql_common = " co_include_head = '$co_include_head',
|
||||
co_include_tail = '$co_include_tail',
|
||||
co_html = '$co_html',
|
||||
@@ -76,6 +78,7 @@ $sql_common = " co_include_head = '$co_include_head',
|
||||
co_subject = '$co_subject',
|
||||
co_content = '$co_content',
|
||||
co_mobile_content = '$co_mobile_content',
|
||||
co_seo_title = '$co_seo_title',
|
||||
co_skin = '$co_skin',
|
||||
co_mobile_skin = '$co_mobile_skin' ";
|
||||
|
||||
@@ -109,6 +112,8 @@ else if ($w == "d")
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
g5_delete_cache_by_prefix('content-'.$co_id.'-');
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if ($_FILES['co_himg']['name'])
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ $result = sql_query($sql);
|
||||
<td class="td_left"><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
||||
<td class="td_mng td_mng_l">
|
||||
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $row['co_id']; ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="<?php echo get_pretty_url('content', $row['co_id']); ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+8
-1
@@ -512,8 +512,15 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
/* 환경설정 */
|
||||
.cf_cert_hide {display:none}
|
||||
|
||||
.is_rewrite .connect-close {position:absolute;top:10px;right:10px;margin:0;padding:0;width:30px;height:30px;border:0;background:transparent;color:#383838;cursor:pointer;font-size:15px}
|
||||
.is_rewrite .connect-close:hover {color:#ff5191}
|
||||
.is_rewrite .connect-close .fa {margin:0 0 0 1px}
|
||||
.is_rewrite .connect-close .txt {position:absolute;line-height:0;font-size:0;overflow:hidden}
|
||||
.is_rewrite textarea{width:99%}
|
||||
.is_rewrite .copy_title{margin-top:25px;margin-bottom:10px;font-weight:bold;text-align:left}
|
||||
|
||||
/* 관리권한설정 */
|
||||
#add_admin fieldset {margin-top:20px}
|
||||
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
|
||||
|
||||
/* 메일 테스트 */
|
||||
|
||||
|
||||
@@ -74,6 +74,57 @@ if( isset($g5['social_profile_table']) && !sql_query(" DESC {$g5['social_profile
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 짧은 주소
|
||||
$sql = " select bo_table from {$g5['board_table']} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$write_table = $g5['write_prefix'] . $row['bo_table']; // 게시판 테이블 전체이름
|
||||
|
||||
$sql = " SHOW COLUMNS FROM {$write_table} LIKE 'wr_seo_title' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$write_table}`
|
||||
ADD `wr_seo_title` varchar(255) NOT NULL DEFAULT '' AFTER `wr_content`,
|
||||
ADD INDEX `wr_seo_title` (`wr_seo_title`);
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 내용 관리 짧은 주소
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['content_table']}` LIKE 'co_seo_title' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_seo_title` varchar(255) NOT NULL DEFAULT '' AFTER `co_content`,
|
||||
ADD INDEX `co_seo_title` (`co_seo_title`);
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$sql = "select * from {$g5['content_table']} limit 100 ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
|
||||
if( ! $row['co_seo_title']){
|
||||
|
||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($row['co_subject']), $g5['content_table'], $row['co_id']);
|
||||
|
||||
$sql = " update {$g5['content_table']}
|
||||
set co_seo_title = '$co_seo_title'
|
||||
where co_id = '{$row['co_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
?>
|
||||
|
||||
|
||||
+3
-3
@@ -212,8 +212,8 @@ $colspan = 5;
|
||||
|
||||
<tr>
|
||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'],10) ?></a></td>
|
||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||
<td><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>&wr_id=<?php echo $row2['wr_id'] ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||
<td class="td_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||
<td class="td_mbname"><div><?php echo $name ?></div></td>
|
||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||
</tr>
|
||||
@@ -283,7 +283,7 @@ $colspan = 7;
|
||||
$link1 = $link2 = "";
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
|
||||
{
|
||||
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -52,13 +52,13 @@ if($sql) {
|
||||
<?php }
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
|
||||
$link = get_pretty_url(G5_GROUP_DIR, $row['id']);
|
||||
break;
|
||||
case 'board':
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
|
||||
$link = get_pretty_url($row['id']);
|
||||
break;
|
||||
case 'content':
|
||||
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
|
||||
$link = get_pretty_url(G5_CONTENT_DIR, $row['id']);
|
||||
break;
|
||||
default:
|
||||
$link = '';
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ else
|
||||
|
||||
$link1 = $link2 = '';
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||
`wr_subject` varchar(255) NOT NULL,
|
||||
`wr_content` text NOT NULL,
|
||||
`wr_seo_title` varchar(255) NOT NULL DEFAULT ''
|
||||
`wr_link1` text NOT NULL,
|
||||
`wr_link2` text NOT NULL,
|
||||
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
|
||||
@@ -39,6 +40,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_9` varchar(255) NOT NULL,
|
||||
`wr_10` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`wr_id`),
|
||||
KEY `wr_seo_title` (`wr_seo_title`),
|
||||
KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
|
||||
KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
+8
-8
@@ -8,7 +8,7 @@ if (!$board['bo_table']) {
|
||||
check_device($board['bo_device']);
|
||||
|
||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
||||
goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
|
||||
goto_url(get_pretty_url($bo_table, $write['wr_parent'], '#c_'.$wr_id));
|
||||
}
|
||||
|
||||
if (!$bo_table) {
|
||||
@@ -23,14 +23,14 @@ if (isset($wr_id) && $wr_id) {
|
||||
// 글이 없을 경우 해당 게시판 목록으로 이동
|
||||
if (!$write['wr_id']) {
|
||||
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
|
||||
alert($msg, './board.php?bo_table='.$bo_table);
|
||||
alert($msg, get_pretty_url($bo_table));
|
||||
}
|
||||
|
||||
// 그룹접근 사용
|
||||
if (isset($group['gr_use_access']) && $group['gr_use_access']) {
|
||||
if ($is_guest) {
|
||||
$msg = "비회원은 이 게시판에 접근할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.";
|
||||
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
// 그룹관리자 이상이라면 통과
|
||||
@@ -51,14 +51,14 @@ if (isset($wr_id) && $wr_id) {
|
||||
if ($is_member)
|
||||
alert('글을 읽을 권한이 없습니다.', G5_URL);
|
||||
else
|
||||
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
// 본인확인을 사용한다면
|
||||
if ($config['cf_cert_use'] && !$is_admin) {
|
||||
// 인증된 회원만 가능
|
||||
if ($board['bo_use_cert'] != '' && $is_guest) {
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
|
||||
@@ -108,7 +108,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
// 이 게시물이 저장된 게시물이 아니면서 관리자가 아니라면
|
||||
//if ("$bo_table|$write['wr_num']" != get_session("ss_secret"))
|
||||
if (!get_session($ss_name))
|
||||
goto_url('./password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
goto_url(G5_BBS_URL.'/password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
}
|
||||
|
||||
set_session($ss_name, TRUE);
|
||||
@@ -151,7 +151,7 @@ if (isset($wr_id) && $wr_id) {
|
||||
if ($config['cf_cert_use'] && !$is_admin) {
|
||||
// 인증된 회원만 가능
|
||||
if ($board['bo_use_cert'] != '' && $is_guest) {
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
|
||||
}
|
||||
|
||||
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
|
||||
@@ -189,7 +189,7 @@ $ip = "";
|
||||
$is_ip_view = $board['bo_use_ip_view'];
|
||||
if ($is_admin) {
|
||||
$is_ip_view = true;
|
||||
if (array_key_exists('wr_ip', $write)) {
|
||||
if ($write && array_key_exists('wr_ip', $write)) {
|
||||
$ip = $write['wr_ip'];
|
||||
}
|
||||
} else {
|
||||
|
||||
+7
-3
@@ -6,14 +6,18 @@ if( !isset($g5['content_table']) ){
|
||||
die('<meta charset="utf-8">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');
|
||||
}
|
||||
|
||||
// 내용
|
||||
if($co_seo_title){
|
||||
$co = get_content_by_field($g5['content_table'], 'content', 'co_seo_title', $co_seo_title);
|
||||
} else {
|
||||
$co = get_content_db($co_id);
|
||||
}
|
||||
|
||||
if (G5_IS_MOBILE) {
|
||||
include_once(G5_MOBILE_PATH.'/content.php');
|
||||
return;
|
||||
}
|
||||
|
||||
// 내용
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
if (!$co['co_id'])
|
||||
alert('등록된 내용이 없습니다.');
|
||||
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ else if ($is_admin == 'group') { // 그룹관리자
|
||||
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
|
||||
} else {
|
||||
if ($write['mb_id'])
|
||||
alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
alert('로그인 후 삭제하세요.', './login.php?url='.urlencode(get_pretty_url($bo_table, $wr_id)));
|
||||
else if (!check_password($wr_password, $write['wr_password']))
|
||||
alert('비밀번호가 틀리므로 삭제할 수 없습니다.');
|
||||
}
|
||||
@@ -134,5 +134,5 @@ if ($count_write > 0 || $count_comment > 0)
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
|
||||
?>
|
||||
|
||||
+1
-1
@@ -156,5 +156,5 @@ if ($count_write > 0 || $count_comment > 0)
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
|
||||
?>
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ if (!get_session('ss_view_'.$bo_table.'_'.$wr_id))
|
||||
|
||||
// 다운로드 차감일 때 비회원은 다운로드 불가
|
||||
if($board['bo_download_point'] < 0 && $is_guest)
|
||||
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)));
|
||||
|
||||
$sql = " select bf_source, bf_file from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
|
||||
$file = sql_fetch($sql);
|
||||
@@ -38,7 +38,7 @@ if ($member['mb_level'] < $board['bo_download_level']) {
|
||||
if ($member['mb_id'])
|
||||
alert($alert_msg);
|
||||
else
|
||||
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)));
|
||||
}
|
||||
|
||||
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file'];
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@ if($_POST['js'] == "on") {
|
||||
|
||||
if (!$is_member)
|
||||
{
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id));
|
||||
|
||||
alert('회원만 가능합니다.', $href);
|
||||
}
|
||||
@@ -144,7 +144,7 @@ if($_POST['js'] == "on") {
|
||||
else
|
||||
$status = '비추천';
|
||||
|
||||
$href = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$href = get_pretty_url($bo_table, $wr_id);
|
||||
|
||||
alert("이 글을 $status 하셨습니다.", '', false);
|
||||
}
|
||||
|
||||
+8
-6
@@ -6,7 +6,7 @@ $is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$is_category = true;
|
||||
$category_href = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
$category_href = get_pretty_url($bo_table);
|
||||
|
||||
$category_option .= '<li><a href="'.$category_href.'"';
|
||||
if ($sca=='')
|
||||
@@ -200,13 +200,15 @@ if($page_rows > 0) {
|
||||
}
|
||||
}
|
||||
|
||||
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './board.php?bo_table='.$bo_table.$qstr.'&page=');
|
||||
g5_latest_cache_data($board['bo_table'], $list);
|
||||
|
||||
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, get_pretty_url($bo_table, '', $qstr.'&page='));
|
||||
|
||||
$list_href = '';
|
||||
$prev_part_href = '';
|
||||
$next_part_href = '';
|
||||
if ($is_search_bbs) {
|
||||
$list_href = './board.php?bo_table='.$bo_table;
|
||||
$list_href = get_pretty_url($bo_table);
|
||||
|
||||
$patterns = array('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
|
||||
|
||||
@@ -214,14 +216,14 @@ if ($is_search_bbs) {
|
||||
$prev_spt = $spt - $config['cf_search_part'];
|
||||
if (isset($min_spt) && $prev_spt >= $min_spt) {
|
||||
$qstr1 = preg_replace($patterns, '', $qstr);
|
||||
$prev_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&spt='.$prev_spt.'&page=1';
|
||||
$prev_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$prev_spt.'&page=1');
|
||||
$write_pages = page_insertbefore($write_pages, '<a href="'.$prev_part_href.'" class="pg_page pg_prev">이전검색</a>');
|
||||
}
|
||||
|
||||
$next_spt = $spt + $config['cf_search_part'];
|
||||
if ($next_spt < 0) {
|
||||
$qstr1 = preg_replace($patterns, '', $qstr);
|
||||
$next_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&spt='.$next_spt.'&page=1';
|
||||
$next_part_href = get_pretty_url($bo_table,0,$qstr1.'&spt='.$next_spt.'&page=1');
|
||||
$write_pages = page_insertafter($write_pages, '<a href="'.$next_part_href.'" class="pg_page pg_end">다음검색</a>');
|
||||
}
|
||||
}
|
||||
@@ -229,7 +231,7 @@ if ($is_search_bbs) {
|
||||
|
||||
$write_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_write_level']) {
|
||||
$write_href = './write.php?bo_table='.$bo_table;
|
||||
$write_href = get_pretty_url($bo_table, '', '', 'write');
|
||||
}
|
||||
|
||||
$nobr_begin = $nobr_end = "";
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ if ($url) {
|
||||
|
||||
$link = $url;
|
||||
} else if ($bo_table) {
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
$link = get_pretty_url($bo_table);
|
||||
} else {
|
||||
$link = G5_URL;
|
||||
}
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ if ($sw == 'move')
|
||||
}
|
||||
|
||||
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
|
||||
$opener_href = './board.php?bo_table='.$bo_table.'&page='.$page.'&'.$qstr;
|
||||
$opener_href = get_pretty_url($bo_table,'','&page='.$page.'&'.$qstr);
|
||||
$opener_href1 = str_replace('&', '&', $opener_href);
|
||||
|
||||
echo <<<HEREDOC
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i]['bo_table'] = $row['bo_table'];
|
||||
$list[$i]['name'] = $name;
|
||||
$list[$i]['comment'] = $comment;
|
||||
$list[$i]['href'] = './board.php?bo_table='.$row['bo_table'].'&wr_id='.$row2['wr_id'].$comment_link;
|
||||
$list[$i]['href'] = get_pretty_url($row['bo_table'], $row2['wr_id'], $comment_link);
|
||||
$list[$i]['datetime'] = $datetime;
|
||||
$list[$i]['datetime2'] = $datetime2;
|
||||
|
||||
|
||||
+7
-7
@@ -6,35 +6,35 @@ $g5['title'] = '비밀번호 입력';
|
||||
switch ($w) {
|
||||
case 'u' :
|
||||
$action = G5_HTTP_BBS_URL.'/write.php';
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
break;
|
||||
case 'd' :
|
||||
set_session('ss_delete_token', $token = uniqid(time()));
|
||||
$action = https_url(G5_BBS_DIR).'/delete.php?token='.$token;
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
break;
|
||||
case 'x' :
|
||||
set_session('ss_delete_comment_'.$comment_id.'_token', $token = uniqid(time()));
|
||||
$action = https_url(G5_BBS_DIR).'/delete_comment.php?token='.$token;
|
||||
$row = sql_fetch(" select wr_parent from $write_table where wr_id = '$comment_id' ");
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_parent'];
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_parent']);
|
||||
break;
|
||||
case 's' :
|
||||
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
|
||||
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
else {
|
||||
$action = https_url(G5_BBS_DIR).'/password_check.php';
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table);
|
||||
}
|
||||
break;
|
||||
case 'sc' :
|
||||
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
|
||||
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||
else {
|
||||
$action = https_url(G5_BBS_DIR).'/password_check.php';
|
||||
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
}
|
||||
break;
|
||||
default :
|
||||
|
||||
+4
-4
@@ -47,8 +47,8 @@ echo '<?xml version="1.0" encoding="utf-8" ?>'."\n";
|
||||
?>
|
||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title><?php echo specialchars_replace($config['cf_title'].' > '.$subj1.' > '.$subj2) ?></title>
|
||||
<link><?php echo specialchars_replace(G5_BBS_URL.'/board.php?bo_table='.$bo_table) ?></link>
|
||||
<title><?php echo specialchars_replace($config['cf_title'].' > '.$subj1.' > '.$subj2); ?></title>
|
||||
<link><?php echo specialchars_replace(get_pretty_url($bo_table)); ?></link>
|
||||
<description>테스트 버전 0.2 (2004-04-26)</description>
|
||||
<language>ko</language>
|
||||
|
||||
@@ -69,8 +69,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
?>
|
||||
|
||||
<item>
|
||||
<title><?php echo specialchars_replace($row['wr_subject']) ?></title>
|
||||
<link><?php echo specialchars_replace(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_id']) ?></link>
|
||||
<title><?php echo specialchars_replace($row['wr_subject']); ?></title>
|
||||
<link><?php echo specialchars_replace(get_pretty_url($bo_table, $wr_id)); ?></link>
|
||||
<description><![CDATA[<?php echo $file ?><?php echo conv_content($row['wr_content'], $html) ?>]]></description>
|
||||
<dc:creator><?php echo specialchars_replace($row['wr_name']) ?></dc:creator>
|
||||
<?php
|
||||
|
||||
+2
-2
@@ -47,8 +47,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$row3['wr_subject'] = '[글 없음]';
|
||||
|
||||
$list[$i]['num'] = $num;
|
||||
$list[$i]['opener_href'] = './board.php?bo_table='.$row['bo_table'];
|
||||
$list[$i]['opener_href_wr_id'] = './board.php?bo_table='.$row['bo_table'].'&wr_id='.$row['wr_id'];
|
||||
$list[$i]['opener_href'] = get_pretty_url($row['bo_table']);
|
||||
$list[$i]['opener_href_wr_id'] = get_pretty_url($row['bo_table'], $row['wr_id']);
|
||||
$list[$i]['bo_subject'] = $row2['bo_subject'];
|
||||
$list[$i]['subject'] = $subject;
|
||||
$list[$i]['del_href'] = './scrap_delete.php?ms_id='.$row['ms_id'].'&page='.$page;
|
||||
|
||||
+5
-2
@@ -4,7 +4,7 @@ include_once('./_common.php');
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
if ($is_guest) {
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id));
|
||||
$href2 = str_replace('&', '&', $href);
|
||||
echo <<<HEREDOC
|
||||
<script>
|
||||
@@ -38,6 +38,9 @@ $sql = " select count(*) as cnt from {$g5['scrap_table']}
|
||||
and wr_id = '$wr_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt']) {
|
||||
|
||||
$back_url = get_pretty_url($bo_table, $wr_id);
|
||||
|
||||
echo <<<HEREDOC
|
||||
<script>
|
||||
if (confirm('이미 스크랩하신 글 입니다.\\n\\n지금 스크랩을 확인하시겠습니까?'))
|
||||
@@ -48,7 +51,7 @@ if ($row['cnt']) {
|
||||
<noscript>
|
||||
<p>이미 스크랩하신 글 입니다.</p>
|
||||
<a href="./scrap.php">스크랩 확인하기</a>
|
||||
<a href="./board.php?bo_table={$bo_table}&wr_id=$wr_id">돌아가기</a>
|
||||
<a href="{$back_url}">돌아가기</a>
|
||||
</noscript>
|
||||
HEREDOC;
|
||||
exit;
|
||||
|
||||
@@ -5,7 +5,7 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
if (!$is_member)
|
||||
{
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id);
|
||||
$href = './login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id));
|
||||
echo '<script> alert(\'회원만 접근 가능합니다.\'); top.location.href = \''.str_replace('&', '&', $href).'\'; </script>';
|
||||
exit;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ if ($row['cnt'])
|
||||
<noscript>
|
||||
<p>이미 스크랩하신 글 입니다.</p>
|
||||
<a href="./scrap.php">스크랩 확인하기</a>
|
||||
<a href="./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'">돌아가기</a>
|
||||
<a href="'.get_pretty_url($bo_table, $wr_id).'">돌아가기</a>
|
||||
</noscript>';
|
||||
exit;
|
||||
}
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ if ($stx) {
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
// 검색어까지 링크되면 게시판 부하가 일어남
|
||||
$list[$idx][$i] = $row;
|
||||
$list[$idx][$i]['href'] = './board.php?bo_table='.$search_table[$idx].'&wr_id='.$row['wr_parent'];
|
||||
$list[$idx][$i]['href'] = get_pretty_url($search_table[$idx], $row['wr_parent']);
|
||||
|
||||
if ($row['wr_is_comment'])
|
||||
{
|
||||
|
||||
+22
-18
@@ -13,11 +13,11 @@ $sql_search = "";
|
||||
if ($sca || $stx || $stx === '0') {
|
||||
// where 문을 얻음
|
||||
$sql_search = get_sql_search($sca, $sfl, $stx, $sop);
|
||||
$search_href = './board.php?bo_table='.$bo_table.'&page='.$page.$qstr;
|
||||
$list_href = './board.php?bo_table='.$bo_table;
|
||||
$search_href = get_pretty_url($bo_table,'','&page='.$page.$qstr);
|
||||
$list_href = get_pretty_url($bo_table);
|
||||
} else {
|
||||
$search_href = '';
|
||||
$list_href = './board.php?bo_table='.$bo_table.'&page='.$page;
|
||||
$list_href = get_pretty_url($bo_table,'',$qstr);
|
||||
}
|
||||
|
||||
if (!$board['bo_use_list_view']) {
|
||||
@@ -47,7 +47,7 @@ if (!$board['bo_use_list_view']) {
|
||||
$prev_href = '';
|
||||
if (isset($prev['wr_id']) && $prev['wr_id']) {
|
||||
$prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255));
|
||||
$prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].$qstr;
|
||||
$prev_href = get_pretty_url($bo_table, $prev['wr_id'], $qstr);
|
||||
$prev_wr_date = $prev['wr_datetime'];
|
||||
}
|
||||
|
||||
@@ -55,38 +55,42 @@ if (isset($prev['wr_id']) && $prev['wr_id']) {
|
||||
$next_href = '';
|
||||
if (isset($next['wr_id']) && $next['wr_id']) {
|
||||
$next_wr_subject = get_text(cut_str($next['wr_subject'], 255));
|
||||
$next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].$qstr;
|
||||
$next_href = get_pretty_url($bo_table, $next['wr_id'], $qstr);
|
||||
$next_wr_date = $next['wr_datetime'];
|
||||
}
|
||||
|
||||
// 쓰기 링크
|
||||
$write_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_write_level'])
|
||||
$write_href = './write.php?bo_table='.$bo_table;
|
||||
if ($member['mb_level'] >= $board['bo_write_level']) {
|
||||
$write_href = get_pretty_url($bo_table, '', '', 'write');
|
||||
}
|
||||
|
||||
// 답변 링크
|
||||
$reply_href = '';
|
||||
if ($member['mb_level'] >= $board['bo_reply_level'])
|
||||
$reply_href = './write.php?w=r&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr;
|
||||
if ($member['mb_level'] >= $board['bo_reply_level']) {
|
||||
//$reply_href = './write.php?w=r&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr;
|
||||
$reply_href = get_pretty_url($bo_table, '', 'w=r&wr_id='.$wr_id.$qstr, 'write');
|
||||
}
|
||||
|
||||
// 수정, 삭제 링크
|
||||
$update_href = $delete_href = '';
|
||||
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
|
||||
if (($member['mb_id'] && ($member['mb_id'] === $write['mb_id'])) || $is_admin) {
|
||||
$update_href = './write.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
//$update_href = G5_BBS_URL.'/write.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$update_href = get_pretty_url($bo_table, '', 'w=u&wr_id='.$wr_id.'&page='.$page.$qstr, 'write');
|
||||
set_session('ss_delete_token', $token = uniqid(time()));
|
||||
$delete_href ='./delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&token='.$token.'&page='.$page.urldecode($qstr);
|
||||
$delete_href = G5_BBS_URL.'/delete.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&token='.$token.'&page='.$page.urldecode($qstr);
|
||||
}
|
||||
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
|
||||
$update_href = './password.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$delete_href = './password.php?w=d&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$update_href = G5_BBS_URL.'/password.php?w=u&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$delete_href = G5_BBS_URL.'/password.php?w=d&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
}
|
||||
|
||||
// 최고, 그룹관리자라면 글 복사, 이동 가능
|
||||
$copy_href = $move_href = '';
|
||||
if ($write['wr_reply'] == '' && ($is_admin == 'super' || $is_admin == 'group')) {
|
||||
$copy_href = './move.php?sw=copy&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$move_href = './move.php?sw=move&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$copy_href = G5_BBS_URL.'/move.php?sw=copy&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
$move_href = G5_BBS_URL.'/move.php?sw=move&bo_table='.$bo_table.'&wr_id='.$wr_id.'&page='.$page.$qstr;
|
||||
}
|
||||
|
||||
$scrap_href = '';
|
||||
@@ -94,15 +98,15 @@ $good_href = '';
|
||||
$nogood_href = '';
|
||||
if ($is_member) {
|
||||
// 스크랩 링크
|
||||
$scrap_href = './scrap_popin.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$scrap_href = G5_BBS_URL.'/scrap_popin.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
|
||||
// 추천 링크
|
||||
if ($board['bo_use_good'])
|
||||
$good_href = './good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=good';
|
||||
$good_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=good';
|
||||
|
||||
// 비추천 링크
|
||||
if ($board['bo_use_nogood'])
|
||||
$nogood_href = './good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=nogood';
|
||||
$nogood_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&good=nogood';
|
||||
}
|
||||
|
||||
$view = get_view($write, $board, $board_skin_path);
|
||||
|
||||
@@ -205,7 +205,7 @@ if ($w == 'c') // 댓글 입력
|
||||
|
||||
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
|
||||
// 4.00.15 - 메일로 보내는 댓글의 바로가기 링크 수정
|
||||
$link_url = G5_BBS_URL."/board.php?bo_table=".$bo_table."&wr_id=".$wr_id."&".$qstr."#c_".$comment_id;
|
||||
$link_url = get_pretty_url($bo_table, $wr_id, $qstr."#c_".$comment_id);
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
@@ -337,5 +337,5 @@ else if ($w == 'cu') // 댓글 수정
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&'.$qstr.'&#c_'.$comment_id);
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&'.$qstr.'&#c_'.$comment_id));
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@ if ($_POST['facebook_checked']) {
|
||||
|
||||
if ($user) {
|
||||
try {
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&#c_'.$comment_id;
|
||||
$link = get_pretty_url($bo_table, $wr['wr_parent'], '&#c_'.$comment_id);
|
||||
$attachment = array(
|
||||
'message' => stripslashes($wr_content),
|
||||
'name' => $wr_subject,
|
||||
@@ -53,7 +53,7 @@ if ($_POST['twitter_checked']) {
|
||||
include_once(G5_SNS_PATH."/twitter/twitterconfig.php");
|
||||
|
||||
if ( !(empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) ) {
|
||||
$comment_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&#c_'.$comment_id;
|
||||
$comment_url = get_pretty_url($bo_table, $wr['wr_parent'], '&#c_'.$comment_id);
|
||||
|
||||
$post = googl_short_url($comment_url).' '.$wr_content;
|
||||
$post = utf8_strcut($post, 140);
|
||||
|
||||
+13
-5
@@ -211,6 +211,8 @@ if ($w == '' || $w == 'r') {
|
||||
if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
|
||||
alert('제목을 입력하여 주십시오.');
|
||||
|
||||
$wr_seo_title = exist_seo_title_recursive('bbs', generate_seo_title($wr_subject), $write_table, $wr_id);
|
||||
|
||||
if ($w == '' || $w == 'r') {
|
||||
|
||||
if ($member['mb_id']) {
|
||||
@@ -251,6 +253,7 @@ if ($w == '' || $w == 'r') {
|
||||
wr_option = '$html,$secret,$mail',
|
||||
wr_subject = '$wr_subject',
|
||||
wr_content = '$wr_content',
|
||||
wr_seo_title = '$wr_seo_title',
|
||||
wr_link1 = '$wr_link1',
|
||||
wr_link2 = '$wr_link2',
|
||||
wr_link1_hit = 0,
|
||||
@@ -304,10 +307,10 @@ if ($w == '' || $w == 'r') {
|
||||
}
|
||||
} else if ($w == 'u') {
|
||||
if (get_session('ss_bo_table') != $_POST['bo_table'] || get_session('ss_wr_id') != $_POST['wr_id']) {
|
||||
alert('올바른 방법으로 수정하여 주십시오.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
|
||||
alert('올바른 방법으로 수정하여 주십시오.', get_pretty_url($bo_table));
|
||||
}
|
||||
|
||||
$return_url = './board.php?bo_table='.$bo_table.'&wr_id='.$wr_id;
|
||||
$return_url = get_pretty_url($bo_table, $wr_id);
|
||||
|
||||
if ($is_admin == 'super') // 최고관리자 통과
|
||||
;
|
||||
@@ -372,6 +375,7 @@ if ($w == '' || $w == 'r') {
|
||||
wr_option = '{$html},{$secret},{$mail}',
|
||||
wr_subject = '{$wr_subject}',
|
||||
wr_content = '{$wr_content}',
|
||||
wr_seo_title = '$wr_seo_title',
|
||||
wr_link1 = '{$wr_link1}',
|
||||
wr_link2 = '{$wr_link2}',
|
||||
mb_id = '{$mb_id}',
|
||||
@@ -655,7 +659,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
||||
|
||||
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
|
||||
|
||||
$link_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&'.$qstr;
|
||||
$link_url = get_pretty_url($bo_table, $wr_id, $qstr);
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
@@ -698,8 +702,12 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
$redirect_url = apply_replace('write_update_move_url', short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr), $board, $wr_id, $w, $qstr, $file_upload_msg);
|
||||
|
||||
start_event('write_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
|
||||
|
||||
if ($file_upload_msg)
|
||||
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
alert($file_upload_msg, $redirect_url);
|
||||
else
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||
goto_url($redirect_url);
|
||||
?>
|
||||
|
||||
+22
-7
@@ -122,7 +122,14 @@ $member = array();
|
||||
$board = array();
|
||||
$group = array();
|
||||
$g5 = array();
|
||||
$g5_debug = array('php'=>array(),'sql'=>array());
|
||||
|
||||
include_once(G5_LIB_PATH.'/hook.lib.php'); // hook 함수 파일
|
||||
include_once(G5_LIB_PATH.'/get_data.lib.php');
|
||||
include_once(G5_LIB_PATH.'/uri.lib.php'); // URL 함수 파일
|
||||
include_once(G5_LIB_PATH.'/cache.lib.php');
|
||||
|
||||
$g5_object = new G5_object_store();
|
||||
|
||||
//==============================================================================
|
||||
// 공통
|
||||
@@ -212,7 +219,7 @@ ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
|
||||
//------------------------------------------------------------------------------
|
||||
// 기본환경설정
|
||||
// 기본적으로 사용하는 필드만 얻은 후 상황에 따라 필드를 추가로 얻음
|
||||
$config = sql_fetch(" select * from {$g5['config_table']} ");
|
||||
$config = get_config();
|
||||
|
||||
define('G5_HTTP_BBS_URL', https_url(G5_BBS_DIR, false));
|
||||
define('G5_HTTPS_BBS_URL', https_url(G5_BBS_DIR, true));
|
||||
@@ -402,19 +409,25 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
|
||||
$write = array();
|
||||
$write_table = "";
|
||||
if ($bo_table) {
|
||||
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$bo_table' ");
|
||||
$board = get_board_db($bo_table);
|
||||
if ($board['bo_table']) {
|
||||
set_cookie("ck_bo_table", $board['bo_table'], 86400 * 1);
|
||||
$gr_id = $board['gr_id'];
|
||||
$write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
|
||||
//$comment_table = $g5['write_prefix'] . $bo_table . $g5['comment_suffix']; // 코멘트 테이블 전체이름
|
||||
if (isset($wr_id) && $wr_id)
|
||||
$write = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
|
||||
|
||||
if (isset($wr_id) && $wr_id) {
|
||||
$write = get_write($write_table, $wr_id);
|
||||
} else if (isset($wr_seo_title) && $wr_seo_title) {
|
||||
$write = get_content_by_field($write_table, 'bbs', 'wr_seo_title', $wr_seo_title);
|
||||
if( isset($write['wr_id']) ){
|
||||
$wr_id = $write['wr_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($gr_id) {
|
||||
$group = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
$group = get_group($gr_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -637,5 +650,7 @@ header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
|
||||
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
|
||||
header('Pragma: no-cache'); // HTTP/1.0
|
||||
|
||||
start_event('common_header');
|
||||
|
||||
$html_process = new html_process();
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -29,6 +29,9 @@ if (PHP_VERSION >= '5.1.0') {
|
||||
define('G5_DOMAIN', '');
|
||||
define('G5_HTTPS_DOMAIN', '');
|
||||
|
||||
//디버깅 상수
|
||||
define('G5_DEBUG', true);
|
||||
|
||||
/*
|
||||
www.sir.kr 과 sir.kr 도메인은 서로 다른 도메인으로 인식합니다. 쿠키를 공유하려면 .sir.kr 과 같이 입력하세요.
|
||||
이곳에 입력이 없다면 www 붙은 도메인과 그렇지 않은 도메인은 쿠키를 공유하지 않으므로 로그인이 풀릴 수 있습니다.
|
||||
@@ -60,6 +63,9 @@ define('G5_PHPMAILER_DIR', 'PHPMailer');
|
||||
define('G5_SESSION_DIR', 'session');
|
||||
define('G5_THEME_DIR', 'theme');
|
||||
|
||||
define('G5_GROUP_DIR', 'group');
|
||||
define('G5_CONTENT_DIR', 'content');
|
||||
|
||||
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
||||
if (G5_DOMAIN) {
|
||||
define('G5_URL', G5_DOMAIN);
|
||||
@@ -147,6 +153,9 @@ define('G5_HANGUL', 16); // 한글
|
||||
define('G5_SPACE', 32); // 공백
|
||||
define('G5_SPECIAL', 64); // 특수문자
|
||||
|
||||
// SEO TITLE 문단 길이
|
||||
define('G5_SEO_TITEL_WORD_CUT', 8); // SEO TITLE 문단 길이
|
||||
|
||||
// 퍼미션
|
||||
define('G5_DIR_PERMISSION', 0755); // 디렉토리 생성시 퍼미션
|
||||
define('G5_FILE_PERMISSION', 0644); // 파일 생성시 퍼미션
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
put_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' );
|
||||
}
|
||||
?>
|
||||
@@ -38,8 +38,8 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php"><i class="fa fa-cog" aria-hidden="true"></i> 정보수정</a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/logout.php"><i class="fa fa-sign-out" aria-hidden="true"></i> 로그아웃</a></li>
|
||||
<?php if ($is_admin) { ?>
|
||||
<li class="tnb_admin"><a href="<?php echo G5_ADMIN_URL ?>"><b><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</b></a></li>
|
||||
<?php } ?>
|
||||
<li class="tnb_admin"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>"><b><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</b></a></li>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/register.php"><i class="fa fa-user-plus" aria-hidden="true"></i> 회원가입</a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/login.php"><b><i class="fa fa-sign-in" aria-hidden="true"></i> 로그인</b></a></li>
|
||||
@@ -165,7 +165,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
} //end foreach $row
|
||||
|
||||
if ($i == 0) { ?>
|
||||
<li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
|
||||
<li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<div id="gnb_all">
|
||||
@@ -198,7 +198,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
} //end foreach $row
|
||||
|
||||
if ($i == 0) { ?>
|
||||
<li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
|
||||
<li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<button type="button" class="gnb_close_btn"><i class="fa fa-times" aria-hidden="true"></i></button>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ if(!defined('G5_IS_ADMIN') && defined('G5_THEME_PATH') && is_file(G5_THEME_PATH.
|
||||
return;
|
||||
}
|
||||
|
||||
$begin_time = get_microtime();
|
||||
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
|
||||
|
||||
if (!isset($g5['title'])) {
|
||||
$g5['title'] = $config['cf_title'];
|
||||
|
||||
@@ -13,6 +13,11 @@ include_once ('../config.php');
|
||||
include_once ('../lib/common.lib.php');
|
||||
include_once('./install.function.php'); // 인스톨 과정 함수 모음
|
||||
|
||||
include_once('../lib/hook.lib.php'); // hook 함수 파일
|
||||
include_once('../lib/get_data.lib.php');
|
||||
include_once('../lib/uri.lib.php'); // URL 함수 파일
|
||||
include_once('../lib/cache.lib.php');
|
||||
|
||||
$title = G5_VERSION." 설치 완료 3/3";
|
||||
include_once ('./install.inc.php');
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
class FileCache
|
||||
{
|
||||
|
||||
/**
|
||||
* The root cache directory.
|
||||
* @var string
|
||||
*/
|
||||
protected $_cache_path = '/tmp/cache';
|
||||
|
||||
/** @var string */
|
||||
protected $file_extension = '';
|
||||
|
||||
/**
|
||||
* Creates a FileCache object
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
public function __construct($options = array())
|
||||
{
|
||||
$available_options = array('_cache_path', 'file_extension');
|
||||
foreach ($available_options as $name) {
|
||||
if (isset($options[$name])) {
|
||||
$this->$name = $options[$name];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an entry from the cache.
|
||||
*
|
||||
* @param string $id
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
$data = $this->_get($id);
|
||||
return is_array($data) ? $data['data'] : FALSE;
|
||||
}
|
||||
|
||||
protected function get_cache_file_path($id){
|
||||
|
||||
$id = str_replace(DIRECTORY_SEPARATOR, '/', $id);
|
||||
$add_separator = '';
|
||||
$add_file_extension = '';
|
||||
|
||||
if( strpos('/', $id) !== 0 ){
|
||||
$add_separator = '/';
|
||||
}
|
||||
|
||||
$ext = pathinfo($id, PATHINFO_EXTENSION);
|
||||
|
||||
if( !(isset($ext['extension']) && $ext['extension']) ){
|
||||
$add_file_extension = $this->file_extension;
|
||||
}
|
||||
|
||||
return $this->_cache_path.$add_separator.$id.$add_file_extension;
|
||||
|
||||
}
|
||||
|
||||
protected function _get($id)
|
||||
{
|
||||
$cache_file_path = $this->get_cache_file_path($id);
|
||||
|
||||
if ( ! is_file($cache_file_path) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$data = unserialize(file_get_contents( $cache_file_path ));
|
||||
|
||||
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
|
||||
{
|
||||
unlink( $cache_file_path );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function write_file($path, $data, $mode = 'wb')
|
||||
{
|
||||
if ( ! $fp = @fopen($path, $mode))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
flock($fp, LOCK_EX);
|
||||
|
||||
for ($result = $written = 0, $length = strlen($data); $written < $length; $written += $result)
|
||||
{
|
||||
if (($result = fwrite($fp, substr($data, $written))) === FALSE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
return is_int($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a cache entry.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
$cache_file_path = $this->get_cache_file_path($id);
|
||||
|
||||
return file_exists($cache_file_path) ? unlink($cache_file_path) : FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Puts data into the cache.
|
||||
*
|
||||
* @param string $id
|
||||
* @param mixed $data
|
||||
* @param int $lifetime
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function save($id, $data, $ttl = 60, $raw = FALSE)
|
||||
{
|
||||
$cache_file_path = $this->get_cache_file_path($id);
|
||||
|
||||
$contents = array(
|
||||
'time' => time(),
|
||||
'ttl' => $ttl,
|
||||
'data' => $data
|
||||
);
|
||||
|
||||
if ($this->write_file($cache_file_path, serialize($contents)))
|
||||
{
|
||||
chmod($cache_file_path, G5_FILE_PERMISSION);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a base directory to store the cache data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCacheDirectory()
|
||||
{
|
||||
return $this->_cache_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes some data to a string so it can be written to disk
|
||||
*
|
||||
* @param mixed $data
|
||||
* @param int $ttl
|
||||
* @return string
|
||||
*/
|
||||
public function encode($data, $ttl)
|
||||
{
|
||||
$expire = null;
|
||||
if ($ttl !== null) {
|
||||
$expire = time() + $ttl;
|
||||
}
|
||||
return serialize(array($data, $expire));
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes a string encoded by {@see encode()}
|
||||
*
|
||||
* Must returns a tuple (data, expire). Expire
|
||||
* can be null to signal no expiration.
|
||||
*
|
||||
* @param string $data
|
||||
* @return array (data, expire)
|
||||
*/
|
||||
public function decode($data)
|
||||
{
|
||||
return unserialize($data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,327 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
/**
|
||||
* Library for handling hooks.
|
||||
*
|
||||
* @author Josantonius <hello@josantonius.com>
|
||||
* @copyright 2017 (c) Josantonius - PHP-Hook
|
||||
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
|
||||
* @link https://github.com/Josantonius/PHP-Hook
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Hook handler.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Hook
|
||||
{
|
||||
/**
|
||||
* Instance id.
|
||||
*
|
||||
* @since 1.0.5
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected static $id = '0';
|
||||
|
||||
/**
|
||||
* Callbacks.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $callbacks = array();
|
||||
|
||||
/**
|
||||
* Number of actions executed.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $actions = array('count' => 0);
|
||||
|
||||
/**
|
||||
* Current action hook.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @var string|false
|
||||
*/
|
||||
protected static $current = false;
|
||||
|
||||
/**
|
||||
* Method to use the singleton pattern and just create an instance.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $singleton = 'getInstance';
|
||||
|
||||
/**
|
||||
* Instances.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $instances = array();
|
||||
|
||||
/**
|
||||
* Get instance.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @return object → instance
|
||||
*/
|
||||
// 이부분 수정
|
||||
/*
|
||||
public static function getInstance($id = '0')
|
||||
{
|
||||
self::$id = $id;
|
||||
if (isset(self::$instances[self::$id])) {
|
||||
return self::$instances[self::$id];
|
||||
}
|
||||
|
||||
return self::$instances[self::$id] = new self;
|
||||
}
|
||||
*/
|
||||
|
||||
public static function getInstance($id = '0')
|
||||
{
|
||||
self::$id = $id;
|
||||
if (isset(self::$instances[self::$id])) {
|
||||
return self::$instances[self::$id];
|
||||
}
|
||||
|
||||
$calledClass = get_called_class();
|
||||
|
||||
return self::$instances[self::$id] = new $calledClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach custom function to action hook.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @param string $tag → action hook name
|
||||
* @param callable $func → function to attach to action hook
|
||||
* @param int $priority → order in which the action is executed
|
||||
* @param int $args → number of arguments accepted
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function addAction($tag, $func, $priority = 8, $args = 0)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
$that->callbacks[$tag][$priority][] = array(
|
||||
'function' => $func,
|
||||
'arguments' => $args,
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add actions hooks from array.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @param array $actions
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function addActions($actions)
|
||||
{
|
||||
foreach ($actions as $arguments) {
|
||||
call_user_func_array(array(__CLASS__, 'addAction'), $arguments);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run all hooks attached to the hook.
|
||||
*
|
||||
* By default it will look for getInstance method to use singleton
|
||||
* pattern and create a single instance of the class. If it does not
|
||||
* exist it will create a new object.
|
||||
*
|
||||
* @see setSingletonName() for change the method name.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @param string $tag → action hook name
|
||||
* @param mixed $args → optional arguments
|
||||
* @param bool $remove → delete hook after executing actions
|
||||
*
|
||||
* @return returns the output of the last action or false
|
||||
*/
|
||||
public static function doAction($tag, $args = array(), $remove = true)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
self::$current = $tag;
|
||||
|
||||
$that->actions['count']++;
|
||||
|
||||
if (! array_key_exists($tag, $that->actions)) {
|
||||
$that->actions[$tag] = 0;
|
||||
}
|
||||
|
||||
$that->actions[$tag]++;
|
||||
$actions = $that->getActions($tag, $remove);
|
||||
//asort($actions);
|
||||
// 이 부분 수정 priority 로 정렬 하려면 ksort를 써야함
|
||||
ksort($actions);
|
||||
|
||||
foreach ($actions as $priority) {
|
||||
foreach ($priority as $action) {
|
||||
$action = $that->runAction($action, $args);
|
||||
}
|
||||
}
|
||||
|
||||
self::$current = false;
|
||||
|
||||
return (isset($action)) ? $action : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set method name for use singleton pattern.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @param string $method → singleton method name
|
||||
*/
|
||||
public static function setSingletonName($method)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
$that->singleton = $method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current action hook.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @return string|false → current action hook
|
||||
*/
|
||||
public static function current()
|
||||
{
|
||||
return self::$current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if there is a certain action hook.
|
||||
*
|
||||
* @since 1.0.7
|
||||
*
|
||||
* @param string $tag → action hook name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isAction($tag)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
return isset($that->callbacks[$tag]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run action hook.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @param string $action → action hook
|
||||
* @param int $args → arguments
|
||||
*
|
||||
* @return callable|false → returns the calling function
|
||||
*/
|
||||
protected function runAction($action, $args)
|
||||
{
|
||||
$function = $action['function'];
|
||||
$argsNumber = $action['arguments'];
|
||||
|
||||
$class = (isset($function[0])) ? $function[0] : false;
|
||||
$method = (isset($function[1])) ? $function[1] : false;
|
||||
|
||||
$args = $this->getArguments($argsNumber, $args);
|
||||
|
||||
if (! ($class && $method) && function_exists($function)) {
|
||||
return call_user_func($function, $args);
|
||||
} elseif ($obj = call_user_func(array($class, $this->singleton))) {
|
||||
if ($obj !== false) {
|
||||
return call_user_func_array(array($obj, $method), $args);
|
||||
}
|
||||
} elseif (class_exists($class)) {
|
||||
$instance = new $class;
|
||||
|
||||
return call_user_func_array(array($instance, $method), $args);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get actions for hook
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @param string $tag → action hook name
|
||||
* @param bool $remove → delete hook after executing actions
|
||||
*
|
||||
* @return object|false → returns the calling function
|
||||
*/
|
||||
protected function getActions($tag, $remove)
|
||||
{
|
||||
if (isset($this->callbacks[$tag])) {
|
||||
$actions = $this->callbacks[$tag];
|
||||
if ($remove) {
|
||||
unset($this->callbacks[$tag]);
|
||||
}
|
||||
}
|
||||
|
||||
return (isset($actions)) ? $actions : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arguments for action.
|
||||
*
|
||||
* @since 1.0.3
|
||||
*
|
||||
* @param int $argsNumber → arguments number
|
||||
* @param mixed $arguments → arguments
|
||||
*
|
||||
* @return array → arguments
|
||||
*/
|
||||
protected function getArguments($argsNumber, $arguments)
|
||||
{
|
||||
if ($argsNumber == 1 && is_string($arguments)) {
|
||||
return array($arguments);
|
||||
} elseif ($argsNumber === count($arguments)) {
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $argsNumber; $i++) {
|
||||
if (array_key_exists($i, $arguments)) {
|
||||
$args[] = $arguments[$i];
|
||||
continue;
|
||||
}
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
Class GML_Hook extends Hook {
|
||||
|
||||
protected $filters = array('count' => 0);
|
||||
|
||||
protected $callback_filters = array();
|
||||
|
||||
protected static $current_filter = false;
|
||||
|
||||
protected function runAction($action, $args)
|
||||
{
|
||||
$function = $action['function'];
|
||||
$argsNumber = $action['arguments'];
|
||||
|
||||
$class = (is_array($function) && isset($function[0])) ? $function[0] : false;
|
||||
$method = (is_array($function) && isset($function[1])) ? $function[1] : false;
|
||||
|
||||
$args = $this->getArguments($argsNumber, $args);
|
||||
|
||||
if (! ($class && $method) && function_exists($function)) {
|
||||
return call_user_func_array($function, $args);
|
||||
} elseif ($obj = call_user_func(array($class, $this->singleton))) {
|
||||
if ($obj !== false) {
|
||||
return call_user_func_array(array($obj, $method), $args);
|
||||
}
|
||||
} elseif (class_exists($class)) {
|
||||
$instance = new $class;
|
||||
|
||||
return call_user_func_array(array($instance, $method), $args);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getFilters($tag, $remove)
|
||||
{
|
||||
if (isset($this->callback_filters[$tag])) {
|
||||
$filters = $this->callback_filters[$tag];
|
||||
if ($remove) {
|
||||
unset($this->callback_filters[$tag]);
|
||||
}
|
||||
}
|
||||
|
||||
return (isset($filters)) ? $filters : array();
|
||||
}
|
||||
|
||||
public static function get_properties($type, $is_callback=false){
|
||||
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
if( $type === 'event' ){
|
||||
return $is_callback ? $that->callbacks : $that->actions;
|
||||
}
|
||||
|
||||
return $is_callback ? $that->callback_filters : $that->filters;
|
||||
}
|
||||
|
||||
public static function addFilter($tag, $func, $priority = 8, $args = 0)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
$that->callback_filters[$tag][$priority][] = array(
|
||||
'function' => $func,
|
||||
'arguments' => $args,
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function apply_filters($tag, $args = array(), $remove = true)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
self::$current_filter = $tag;
|
||||
|
||||
$that->filters['count']++;
|
||||
|
||||
if (! array_key_exists($tag, $that->filters)) {
|
||||
$that->filters[$tag] = 0;
|
||||
}
|
||||
|
||||
$that->filters[$tag]++;
|
||||
$filters = $that->getFilters($tag, $remove);
|
||||
ksort($filters);
|
||||
|
||||
$value = $args[0];
|
||||
|
||||
foreach ($filters as $priority) {
|
||||
foreach ($priority as $filter) {
|
||||
$replace = $that->runAction($filter, $args);
|
||||
|
||||
if( ! is_null($replace) ) {
|
||||
$value = $replace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self::$current_filter = false;
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function getArguments($argsNumber, $arguments)
|
||||
{
|
||||
if ($argsNumber == 1 && is_string($arguments)) {
|
||||
return array($arguments);
|
||||
} elseif ($argsNumber === count($arguments)) {
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
$args = array();
|
||||
|
||||
for ($i = 0; $i < $argsNumber; $i++) {
|
||||
if (is_array($arguments) && array_key_exists($i, $arguments)) {
|
||||
$args[] = $arguments[$i];
|
||||
}
|
||||
}
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
public static function remove_filter($tag, $func, $priority)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
$is_remove = false;
|
||||
|
||||
if (isset($that->callback_filters[$tag]) && isset($that->callback_filters[$tag][$priority]) ) {
|
||||
|
||||
$found_key = array_search($func, array_column($that->callback_filters[$tag][$priority], 'function'));
|
||||
|
||||
if( $found_key !== false ){
|
||||
unset($that->callback_filters[$tag][$priority][$found_key]);
|
||||
}
|
||||
}
|
||||
|
||||
return $is_remove;
|
||||
}
|
||||
|
||||
public static function remove_action($tag, $func, $priority)
|
||||
{
|
||||
$that = self::getInstance(self::$id);
|
||||
|
||||
$is_remove = false;
|
||||
|
||||
if (isset($that->callbacks[$tag]) && isset($that->callbacks[$tag][$priority]) ) {
|
||||
|
||||
$found_key = array_search($func, array_column($that->callbacks[$tag][$priority], 'function'));
|
||||
|
||||
if( $found_key !== false ){
|
||||
unset($that->callbacks[$tag][$priority][$found_key]);
|
||||
}
|
||||
}
|
||||
|
||||
return $is_remove;
|
||||
}
|
||||
}
|
||||
|
||||
// end Hook Class
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
Class G5_object_store {
|
||||
public $writes = array();
|
||||
public $contents = array();
|
||||
|
||||
function get($type, $key, $group ='default') {
|
||||
|
||||
switch ($type) {
|
||||
case 'bbs':
|
||||
$datas = $this->writes;
|
||||
break;
|
||||
case 'content' :
|
||||
$datas = $this->contents;
|
||||
break;
|
||||
}
|
||||
|
||||
if( $this->exists($type, $key, $group) ){
|
||||
if ( is_object($datas[$group][$key]) )
|
||||
return clone $datas[$group][$key];
|
||||
else
|
||||
return $datas[$group][$key];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function exists($type, $key, $group = 'default' ) {
|
||||
|
||||
$return_data = '';
|
||||
|
||||
switch ($type) {
|
||||
case 'bbs':
|
||||
$datas = $this->writes;
|
||||
break;
|
||||
case 'content':
|
||||
$datas = $this->contents;
|
||||
break;
|
||||
}
|
||||
|
||||
return isset($datas[$group]) && ( isset($datas[$group][$key]) || array_key_exists($key, $datas[$group]) );
|
||||
}
|
||||
|
||||
function set($type, $key, $data=array(), $group='default') {
|
||||
if ( is_object( $data ) )
|
||||
$data = clone $data;
|
||||
|
||||
switch ($type) {
|
||||
case 'bbs':
|
||||
$this->writes[$group][$key] = $data;
|
||||
break;
|
||||
case 'content':
|
||||
$this->contents[$group][$key] = $data;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function delete($key, $group='default') {
|
||||
switch ($type) {
|
||||
case 'bbs':
|
||||
$datas = $this->writes;
|
||||
break;
|
||||
case 'content':
|
||||
$datas = $this->contents;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! $this->exists('bbs', $key, $group) )
|
||||
return false;
|
||||
|
||||
unset( $datas[$group][$key] );
|
||||
return true;
|
||||
}
|
||||
|
||||
} //end Class
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
class G5_URI {
|
||||
public $basename;
|
||||
public $parts;
|
||||
public $slashes;
|
||||
|
||||
public static function getInstance()
|
||||
{ //싱글톤
|
||||
static $instance = null;
|
||||
if (null === $instance) {
|
||||
$instance = new self();
|
||||
}
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function parseURL() {
|
||||
/* grab URL query string and script name */
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
$script = $_SERVER['SCRIPT_NAME'];
|
||||
/* get extension */
|
||||
$ext = end( explode(".",$script) );
|
||||
|
||||
/* if extension is found in URL, eliminate it */
|
||||
if(strstr($uri,".")) {
|
||||
$arr_uri = explode('.', $uri);
|
||||
/* get last part */
|
||||
$last = end($arr_uri);
|
||||
|
||||
if($last == $ext){
|
||||
array_pop($arr_uri);
|
||||
$uri = implode('.', $arr_uri);
|
||||
}
|
||||
}
|
||||
|
||||
/* pick the name without extension */
|
||||
$basename = basename ($script, '.'.$ext);
|
||||
/* slicing query string */
|
||||
$temp = explode('/',$uri);
|
||||
$key = array_search($basename,$temp);
|
||||
$parts = array_slice ($temp, $key+1);
|
||||
$this->basename = $basename;
|
||||
$this->parts = $parts;
|
||||
|
||||
}
|
||||
|
||||
public function setRelative($relativevar) {
|
||||
/* count the number of slash
|
||||
to define relative path */
|
||||
$numslash = count($this->parts);
|
||||
$slashes="";
|
||||
for($i=0;$i<$numslash;$i++){
|
||||
$slashes .= "../";
|
||||
}
|
||||
$this->slashes = $slashes;
|
||||
/* make relative path variable available for webpage */
|
||||
//eval("\$GLOBALS['$relativevar'] = '$slashes';");
|
||||
|
||||
$links = array();
|
||||
$links[$relativevar] = $slashes;
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
public function getParts() {
|
||||
/* return array of sliced query string */
|
||||
return $this->parts;
|
||||
}
|
||||
|
||||
public function setParts() {
|
||||
/* pair off query string variable and query string value */
|
||||
$numargs = func_num_args();
|
||||
$arg_list = func_get_args();
|
||||
$urlparts = $this->getParts();
|
||||
$links = array();
|
||||
for ($i = 0; $i < $numargs; $i++) {
|
||||
/* make them available for webpage */
|
||||
//eval ("\$GLOBALS['".$arg_list[$i] ."']= '$urlparts[$i]';");
|
||||
$links[$arg_list[$i]] = $urlparts[$i];
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
public function makeClean($stringurl) {
|
||||
/* convert normal URL query string to clean URL */
|
||||
$url=parse_url($stringurl);
|
||||
$strurl = basename($url['path'],".php");
|
||||
$qstring = parse_str($url['query'],$vars);
|
||||
while(list($k,$v) = each($vars)) $strurl .= "/".$v;
|
||||
return $strurl;
|
||||
}
|
||||
|
||||
public function url_clean($stringurl, $add_qry='') {
|
||||
global $config, $g5;
|
||||
|
||||
$stringurl = str_replace('&', '&', $stringurl);
|
||||
$url=parse_url($stringurl);
|
||||
$strurl = basename($url['path'],".php");
|
||||
|
||||
if( ! in_array($strurl, array('board', 'view_comment.page')) ){ //게시판이 아니면 리턴
|
||||
return $stringurl;
|
||||
}
|
||||
|
||||
$return_url = '';
|
||||
$qstring = parse_str($url['query'],$vars);
|
||||
|
||||
// 예) Array ( [scheme] => http [host] => sir.kr [path] => /bbs/board.php [query] => wr_id=1110870&bo_table=cm_free&cpage=1 [fragment] => c_1110946 )
|
||||
//while(list($k,$v) = each($vars)) $strurl .= "/".$v;
|
||||
|
||||
$tmp = array('bo_table'=>'', 'wr_id'=>'');
|
||||
$s = array();
|
||||
|
||||
foreach( $tmp as $key=>$v ){
|
||||
if( !isset($vars[$key]) || empty($vars[$key]) ) continue;
|
||||
$add = '';
|
||||
$s[$key] = $vars[$key];
|
||||
}
|
||||
|
||||
if( $config['cf_bbs_rewrite'] > 1 && (isset($s['wr_id']) && $s['wr_id']) && (isset($s['bo_table']) && $s['bo_table']) ){
|
||||
$get_write = get_write( get_write_table_name($s['bo_table']), $s['wr_id'], true);
|
||||
|
||||
if( $get_write['wr_seo_title'] ){
|
||||
unset($s['wr_id']);
|
||||
$s['wr_seo_title'] = $get_write['wr_seo_title'].'/';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$fragment = isset($url['fragment']) ? '#'.$url['fragment'] : '';
|
||||
|
||||
$host = G5_URL;
|
||||
|
||||
if( isset($url['host']) ){
|
||||
$str_path = isset($url['path']) ? $url['path'] : '';
|
||||
$http = 'http://';
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
|
||||
$http = 'https://';
|
||||
}
|
||||
$host = $http.$url['host'].str_replace('/'.G5_BBS_DIR.'/board.php', '', $str_path);
|
||||
}
|
||||
|
||||
$add_param = '';
|
||||
|
||||
if( $result = array_diff_key($vars, $tmp ) ){
|
||||
$add_param = '?'.http_build_query($result,'','&');
|
||||
}
|
||||
|
||||
if( $add_qry ){
|
||||
$add_param .= $add_param ? '&'.$add_qry : '?'.$add_qry;
|
||||
}
|
||||
|
||||
while(list($k,$v) = each($s)) $return_url .= "/".$v;
|
||||
|
||||
return $host.$return_url.$add_param.$fragment;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once(dirname(__FILE__) .'/Cache/FileCache.class.php');
|
||||
|
||||
function get_cachemanage_instance(){
|
||||
static $instance = null;
|
||||
|
||||
if( ! (defined('G5_USE_CACHE') && G5_USE_CACHE) ) return $instance;
|
||||
|
||||
if( $instance === null ){
|
||||
$options = array(
|
||||
'_cache_path'=> G5_DATA_PATH.'/cache',
|
||||
'file_extension'=>'.php',
|
||||
);
|
||||
$instance = new FileCache($options);
|
||||
}
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function g5_cache_secret_key(){
|
||||
static $str = '';
|
||||
|
||||
if( $str ) return $str;
|
||||
|
||||
$str = substr(md5($_SERVER['SERVER_SOFTWARE'].$_SERVER['DOCUMENT_ROOT']), 0, 6);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function g5_latest_cache_data($bo_table, $cache_list=array(), $find_wr_id=0){
|
||||
static $cache = array();
|
||||
|
||||
if( $bo_table && $cache_list && ! isset($cache[$bo_table]) ){
|
||||
foreach( (array) $cache_list as $wr ){
|
||||
if( empty($wr) || ! isset($wr['wr_id']) ) continue;
|
||||
$cache[$bo_table][$wr['wr_id']] = $wr;
|
||||
}
|
||||
}
|
||||
|
||||
if( $find_wr_id && isset($cache[$bo_table][$find_wr_id]) ){
|
||||
return $cache[$bo_table][$find_wr_id];
|
||||
}
|
||||
}
|
||||
|
||||
function g5_set_cache($key, $save_data, $ttl = null){
|
||||
|
||||
if( $cache = get_cachemanage_instance() ){
|
||||
$cache->save($key, $save_data, $ttl);
|
||||
}
|
||||
}
|
||||
|
||||
function g5_get_cache($key){
|
||||
|
||||
if( $cache = get_cachemanage_instance() ){
|
||||
return $cache->get($key);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function g5_delete_cache($key){
|
||||
if( $cache = get_cachemanage_instance() ){
|
||||
return $cache->delete($key);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function g5_delete_all_cache(){
|
||||
|
||||
$board_tables = get_board_names();
|
||||
|
||||
foreach( $board_tables as $board_table ){
|
||||
delete_cache_latest($board_table);
|
||||
}
|
||||
|
||||
start_event('adm_cache_delete', $board_tables);
|
||||
|
||||
}
|
||||
|
||||
function g5_delete_cache_by_prefix($key){
|
||||
$files = glob(G5_DATA_PATH.'/cache/'.$key.'*');
|
||||
|
||||
foreach( (array) $files as $filename){
|
||||
if(empty($filename)) continue;
|
||||
|
||||
unlink($filename);
|
||||
}
|
||||
|
||||
return ($files) ? true : false;
|
||||
}
|
||||
?>
|
||||
+122
-37
@@ -335,11 +335,13 @@ function get_dirsize($dir)
|
||||
// 게시물 정보($write_row)를 출력하기 위하여 $list로 가공된 정보를 복사 및 가공
|
||||
function get_list($write_row, $board, $skin_url, $subject_len=40)
|
||||
{
|
||||
global $g5, $config;
|
||||
global $g5, $config, $g5_object;
|
||||
global $qstr, $page;
|
||||
|
||||
//$t = get_microtime();
|
||||
|
||||
$g5_object->set('bbs', $write_row['wr_id'], $write_row, $board['bo_table']);
|
||||
|
||||
// 배열전체를 복사
|
||||
$list = $write_row;
|
||||
unset($write_row);
|
||||
@@ -405,9 +407,9 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
|
||||
$list['icon_link'] = '<i class="fa fa-link" aria-hidden="true"></i> ';
|
||||
|
||||
// 분류명 링크
|
||||
$list['ca_name_href'] = G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&sca='.urlencode($list['ca_name']);
|
||||
$list['ca_name_href'] = get_pretty_url($board['bo_table'], '', 'sca='.urlencode($list['ca_name']));
|
||||
|
||||
$list['href'] = G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&wr_id='.$list['wr_id'].$qstr;
|
||||
$list['href'] = get_pretty_url($board['bo_table'], $list['wr_id'], $qstr);
|
||||
$list['comment_href'] = $list['href'];
|
||||
|
||||
$list['icon_new'] = '';
|
||||
@@ -682,13 +684,24 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 게시판 테이블에서 하나의 행을 읽음
|
||||
function get_write($write_table, $wr_id)
|
||||
function get_write($write_table, $wr_id, $is_cache=false)
|
||||
{
|
||||
return sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
|
||||
}
|
||||
global $g5, $g5_object;
|
||||
|
||||
$wr_bo_table = preg_replace('/^'.preg_quote($g5['write_prefix']).'/i', '', $write_table);
|
||||
|
||||
$write = $g5_object->get('bbs', $wr_id, $wr_bo_table);
|
||||
|
||||
if( !$write ){
|
||||
$sql = " select * from {$write_table} where wr_id = '{$wr_id}' ";
|
||||
$write = sql_fetch($sql);
|
||||
|
||||
$g5_object->set('bbs', $wr_id, $write, $wr_bo_table);
|
||||
}
|
||||
|
||||
return $write;
|
||||
}
|
||||
|
||||
// 게시판의 다음글 번호를 얻는다.
|
||||
function get_next_num($table)
|
||||
@@ -702,22 +715,47 @@ function get_next_num($table)
|
||||
|
||||
|
||||
// 그룹 설정 테이블에서 하나의 행을 읽음
|
||||
function get_group($gr_id)
|
||||
function get_group($gr_id, $is_cache=false)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
return sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
static $cache = array();
|
||||
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $gr_id);
|
||||
$key = md5($gr_id);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['group_table']} where gr_id = '$gr_id' ";
|
||||
|
||||
$cache[$key] = apply_replace('get_group', sql_fetch($sql), $gr_id, $is_cache);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
|
||||
// 회원 정보를 얻는다.
|
||||
function get_member($mb_id, $fields='*')
|
||||
function get_member($mb_id, $fields='*', $is_cache=false)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$mb_id = preg_replace("/[^0-9a-z_]+/i", "", $mb_id);
|
||||
|
||||
return sql_fetch(" select $fields from {$g5['member_table']} where mb_id = TRIM('$mb_id') ");
|
||||
static $cache = array();
|
||||
|
||||
$key = md5($fields);
|
||||
|
||||
if( $is_cache && isset($cache[$mb_id]) && isset($cache[$mb_id][$key]) ){
|
||||
return $cache[$mb_id][$key];
|
||||
}
|
||||
|
||||
$sql = " select $fields from {$g5['member_table']} where mb_id = TRIM('$mb_id') ";
|
||||
|
||||
$cache[$mb_id][$key] = apply_replace('get_member', sql_fetch($sql), $mb_id, $fields, $is_cache);
|
||||
|
||||
return $cache[$mb_id][$key];
|
||||
}
|
||||
|
||||
|
||||
@@ -1259,7 +1297,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
if(!$bo_table)
|
||||
return $name;
|
||||
|
||||
$tmp_name = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&sca='.$sca.'&sfl=wr_name,1&stx='.$name.'" title="'.$name.' 이름으로 검색" class="sv_guest" rel="nofollow" onclick="return false;">'.$name.'</a>';
|
||||
$tmp_name = '<a href="'.get_pretty_url($bo_table, '', 'sca='.$sca.'&sfl=wr_name,1&stx='.$name).'" title="'.$name.' 이름으로 검색" class="sv_guest" rel="nofollow" onclick="return false;">'.$name.'</a>';
|
||||
$title_mb_id = '[비회원]';
|
||||
}
|
||||
|
||||
@@ -1277,9 +1315,9 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" onclick=\"win_profile(this.href); return false;\">자기소개</a>\n";
|
||||
if($bo_table) {
|
||||
if($mb_id)
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/board.php?bo_table=".$bo_table."&sca=".$sca."&sfl=mb_id,1&stx=".$mb_id."\">아이디로 검색</a>\n";
|
||||
$str2 .= "<a href=\"".get_pretty_url($bo_table, '', "sca=".$sca."&sfl=mb_id,1&stx=".$mb_id)."\">아이디로 검색</a>\n";
|
||||
else
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/board.php?bo_table=".$bo_table."&sca=".$sca."&sfl=wr_name,1&stx=".$name."\">이름으로 검색</a>\n";
|
||||
$str2 .= "<a href=\"".get_pretty_url($bo_table, '', "sca=".$sca."&sfl=wr_name,1&stx=".$name)."\">이름으로 검색</a>\n";
|
||||
}
|
||||
if($mb_id)
|
||||
$str2 .= "<a href=\"".G5_BBS_URL."/new.php?mb_id=".$mb_id."\" class=\"link_new_page\" onclick=\"check_goto_new(this.href, event);\">전체게시물</a>\n";
|
||||
@@ -1484,7 +1522,7 @@ function sql_set_charset($charset, $link=null)
|
||||
// mysql connect resource 지정 - 명랑폐인님 제안
|
||||
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
{
|
||||
global $g5;
|
||||
global $g5, $g5_debug;
|
||||
|
||||
if(!$link)
|
||||
$link = $g5['connect_db'];
|
||||
@@ -1497,6 +1535,10 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
// `information_schema` DB로의 접근을 허락하지 않습니다.
|
||||
$sql = preg_replace("#^select.*from.*where.*`?information_schema`?.*#i", "select 1", $sql);
|
||||
|
||||
$is_debug = get_permission_debug_show();
|
||||
|
||||
$start_time = $is_debug ? get_microtime() : 0;
|
||||
|
||||
if(function_exists('mysqli_query') && G5_MYSQLI_USE) {
|
||||
if ($error) {
|
||||
$result = @mysqli_query($link, $sql) or die("<p>$sql<p>" . mysqli_errno($link) . " : " . mysqli_error($link) . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
|
||||
@@ -1511,6 +1553,15 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
|
||||
}
|
||||
}
|
||||
|
||||
if($result && $is_debug) {
|
||||
// 여기에 실행한 sql문을 화면에 표시하는 로직 넣기
|
||||
$g5_debug['sql'][] = array(
|
||||
'sql' => $sql,
|
||||
'start_time' => $start_time,
|
||||
'end_time' => get_microtime(),
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -1996,6 +2047,16 @@ function is_utf8($str)
|
||||
// 출처 : https://www.google.co.kr/search?q=utf8_strcut&aq=f&oq=utf8_strcut&aqs=chrome.0.57j0l3.826j0&sourceid=chrome&ie=UTF-8
|
||||
function utf8_strcut( $str, $size, $suffix='...' )
|
||||
{
|
||||
if( function_exists('mb_strlen') && function_exists('mb_substr') ){
|
||||
|
||||
if(mb_strlen($str)<=$size) {
|
||||
return $str;
|
||||
} else {
|
||||
$str = mb_substr($str, 0, $size, 'utf-8');
|
||||
$str .= $suffix;
|
||||
}
|
||||
|
||||
} else {
|
||||
$substr = substr( $str, 0, $size * 2 );
|
||||
$multi_size = preg_match_all( '/[\x80-\xff]/', $substr, $multi_chars );
|
||||
|
||||
@@ -2007,8 +2068,9 @@ function utf8_strcut( $str, $size, $suffix='...' )
|
||||
$str = preg_replace( '/(([\x80-\xff]{3})*?)([\x80-\xff]{0,2})$/', '$1', $str );
|
||||
$str .= $suffix;
|
||||
}
|
||||
}
|
||||
|
||||
return $str;
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
@@ -2159,11 +2221,7 @@ function delete_cache_latest($bo_table)
|
||||
return;
|
||||
}
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/latest-'.$bo_table.'-*');
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $filename)
|
||||
unlink($filename);
|
||||
}
|
||||
g5_delete_cache_by_prefix('latest-'.$bo_table.'-');
|
||||
}
|
||||
|
||||
// 게시판 첨부파일 썸네일 삭제
|
||||
@@ -2447,6 +2505,8 @@ class html_process {
|
||||
}
|
||||
|
||||
array_multisort($order, SORT_ASC, $index, SORT_ASC, $links);
|
||||
|
||||
$links = apply_replace('html_process_css_files', $links);
|
||||
|
||||
foreach($links as $link) {
|
||||
if(!trim($link[1]))
|
||||
@@ -2473,6 +2533,8 @@ class html_process {
|
||||
}
|
||||
|
||||
array_multisort($order, SORT_ASC, $index, SORT_ASC, $scripts);
|
||||
|
||||
$scripts = apply_replace('html_process_script_files', $scripts);
|
||||
|
||||
foreach($scripts as $js) {
|
||||
if(!trim($js[1]))
|
||||
@@ -2501,6 +2563,17 @@ class html_process {
|
||||
if($javascript)
|
||||
$nl = "\n";
|
||||
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript{$nl}$1", $buffer);
|
||||
|
||||
$meta_tag = apply_replace('html_process_add_meta', '');
|
||||
|
||||
if( $meta_tag ){
|
||||
/*
|
||||
</title>content<body>
|
||||
전에 메타태그가 위치 하도록 하게 한다.
|
||||
*/
|
||||
$nl = "\n";
|
||||
$buffer = preg_replace('#(<title[^>]*>.*?</title>)#', "$meta_tag{$nl}$1", $buffer);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
@@ -2672,10 +2745,16 @@ function get_qa_config($fld='*')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = " select $fld from {$g5['qa_config_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
static $cache = array();
|
||||
|
||||
return $row;
|
||||
if( $is_cache && !empty($cache) ){
|
||||
return $cache;
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['qa_config_table']} ";
|
||||
$cache = apply_replace('get_qa_config', sql_fetch($sql));
|
||||
|
||||
return $cache;
|
||||
}
|
||||
|
||||
// get_sock 함수 대체
|
||||
@@ -3176,22 +3255,19 @@ function clean_query_string($query, $amp=true)
|
||||
return $str;
|
||||
}
|
||||
|
||||
function get_device_change_url()
|
||||
{
|
||||
function get_params_merge_url($params){
|
||||
$p = @parse_url(G5_URL);
|
||||
$href = $p['scheme'].'://'.$p['host'];
|
||||
if(isset($p['port']) && $p['port'])
|
||||
$href .= ':'.$p['port'];
|
||||
$href .= $_SERVER['SCRIPT_NAME'];
|
||||
|
||||
if( $tmp = explode('?', $_SERVER['REQUEST_URI']) ){
|
||||
if( isset($tmp[0]) && $tmp[0] )
|
||||
$href .= $tmp[0];
|
||||
}
|
||||
$q = array();
|
||||
$device = 'device='.(G5_IS_MOBILE ? 'pc' : 'mobile');
|
||||
|
||||
if($_SERVER['QUERY_STRING']) {
|
||||
foreach($_GET as $key=>$val) {
|
||||
if($key == 'device')
|
||||
continue;
|
||||
|
||||
$key = strip_tags($key);
|
||||
$val = strip_tags($val);
|
||||
|
||||
@@ -3200,16 +3276,25 @@ function get_device_change_url()
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($q)) {
|
||||
$query = http_build_query($q, '', '&');
|
||||
$href .= '?'.$query.'&'.$device;
|
||||
} else {
|
||||
$href .= '?'.$device;
|
||||
if( is_array($params) ){
|
||||
$q = array_merge($q, $params);
|
||||
}
|
||||
|
||||
$query = http_build_query($q, '', '&');
|
||||
$href .= '?'.$query;
|
||||
|
||||
return $href;
|
||||
}
|
||||
|
||||
function get_device_change_url()
|
||||
{
|
||||
$q = array();
|
||||
$device = (G5_IS_MOBILE ? 'pc' : 'mobile');
|
||||
$q['device'] = $device;
|
||||
|
||||
return get_params_merge_url($q);
|
||||
}
|
||||
|
||||
// 스킨 path
|
||||
function get_skin_path($dir, $skin)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
function get_config($is_cache=false){
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$cache = apply_replace('get_config_cache', $cache, $is_cache);
|
||||
|
||||
if( $is_cache && !empty($cache) ){
|
||||
return $cache;
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['config_table']} ";
|
||||
$cache = apply_replace('get_config', sql_fetch($sql));
|
||||
|
||||
return $cache;
|
||||
}
|
||||
|
||||
function get_content_db($co_id, $is_cache=false){
|
||||
global $g5, $g5_object;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$type = 'content';
|
||||
|
||||
$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
|
||||
$co = $g5_object->get($type, $co_id, $type);
|
||||
|
||||
if( !$co ){
|
||||
|
||||
$cache_file_name = "{$type}-{$co_id}-".g5_cache_secret_key();
|
||||
$co = g5_get_cache($cache_file_name, 10800);
|
||||
|
||||
if( $co === false ){
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
|
||||
g5_set_cache($cache_file_name, $co, 10800);
|
||||
}
|
||||
|
||||
$g5_object->set($type, $co_id, $co, $type);
|
||||
}
|
||||
|
||||
return $co;
|
||||
}
|
||||
|
||||
function get_board_names(){
|
||||
global $g5;
|
||||
|
||||
static $boards = array();
|
||||
|
||||
if( ! $boards ){
|
||||
$sql = " select bo_table from {$g5['board_table']} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$boards[] = $row['bo_table'];
|
||||
}
|
||||
}
|
||||
|
||||
return $boards;
|
||||
}
|
||||
|
||||
function get_board_db($bo_table, $is_cache=false){
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$cache = apply_replace('get_board_db_cache', $cache, $bo_table, $is_cache);
|
||||
|
||||
$key = md5($bo_table);
|
||||
|
||||
$bo_table = preg_replace('/[^a-z0-9_]/i', '', $bo_table);
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
if( !($cache[$key] = apply_replace('get_board_db', array(), $bo_table)) ){
|
||||
|
||||
$sql = " select * from {$g5['board_table']} where bo_table = '$bo_table' ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
}
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
// 게시판 테이블에서 하나의 행을 읽음
|
||||
function get_content_by_field($write_table, $type='bbs', $where_field='', $where_value='', $is_cache=false)
|
||||
{
|
||||
global $g5, $g5_object;
|
||||
|
||||
if( $type === 'content' ){
|
||||
$check_array = array('co_id', 'co_html', 'co_subject', 'co_content', 'co_seo_title', 'co_mobile_content', 'co_skin', 'co_mobile_skin', 'co_tag_filter_use', 'co_hit', 'co_include_head', 'co_include_tail');
|
||||
} else {
|
||||
$check_array = array('wr_id', 'wr_num', 'wr_reply', 'wr_parent', 'wr_is_comment', 'ca_name', 'wr_option', 'wr_subject', 'wr_content', 'wr_seo_title', 'wr_link1', 'wr_link2', 'wr_hit', 'wr_good', 'wr_nogood', 'mb_id', 'wr_name', 'wr_email', 'wr_homepage', 'wr_datetime', 'wr_ip', 'wr_1', 'wr_2', 'wr_3', 'wr_4', 'wr_5', 'wr_6', 'wr_7', 'wr_8', 'wr_9', 'wr_10');
|
||||
}
|
||||
|
||||
if( ! in_array($where_field, $check_array) ){
|
||||
return '';
|
||||
}
|
||||
|
||||
$where_value = strip_tags($where_value);
|
||||
$key = md5($write_table.'|'.$where_field.'|'.$where_value);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$write_table} where $where_field = '".sql_real_escape_string($where_value)."' ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
if( $type === 'content' ){
|
||||
|
||||
$g5_object->set($type, $cache[$key]['co_id'], $cache[$key], 'content');
|
||||
|
||||
} else {
|
||||
|
||||
$wr_bo_table = preg_replace('/^'.preg_quote($g5['write_prefix']).'/i', '', $write_table);
|
||||
$g5_object->set($type, $cache[$key]['wr_id'], $cache[$key], $wr_bo_table);
|
||||
|
||||
}
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
// 게시판 첨부파일 테이블에서 하나의 행을 읽음
|
||||
function get_board_file_db($bo_table, $wr_id, $fields='*', $add_where='', $is_cache=false)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$wr_id = (int) $wr_id;
|
||||
$key = md5($bo_table.'|'.$wr_id.$fields.$add_where);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select $fields from {$g5['board_file_table']}
|
||||
where bo_table = '$bo_table' and wr_id = '$wr_id' $add_where order by bf_no limit 0, 1 ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
function get_poll_db($po_id, $is_cache=false){
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$po_id = (int) $po_id;
|
||||
$key = md5($po_id);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
function get_point_db($po_id, $is_cache=false){
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$po_id = (int) $po_id;
|
||||
$key = md5($po_id);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['point_table']} where po_id = '{$po_id}' ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
function get_mail_content_db($ma_id, $is_cache=false){
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$ma_id = (int) $ma_id;
|
||||
$key = md5($ma_id);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
function get_qacontent_db($qa_id, $is_cache=false){
|
||||
global $g5;
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$qa_id = (int) $qa_id;
|
||||
$key = md5($qa_id);
|
||||
|
||||
if( $is_cache && isset($cache[$key]) ){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['qa_content_table']} where qa_id = '{$qa_id}' ";
|
||||
|
||||
$cache[$key] = sql_fetch($sql);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
function get_thumbnail_find_cache($bo_table, $wr_id, $wr_key){
|
||||
global $g5;
|
||||
|
||||
if( $cache_content = g5_latest_cache_data($bo_table, array(), $wr_id) ){
|
||||
if( $wr_key === 'content' ){
|
||||
return $cache_content;
|
||||
} else if ( $wr_key === 'file' && isset($cache_content['first_file_thumb']) ){
|
||||
return $cache_content['first_file_thumb'];
|
||||
}
|
||||
}
|
||||
|
||||
if( $wr_key === 'content' ){
|
||||
$write_table = $g5['write_prefix'].$bo_table;
|
||||
return get_write($write_table, $wr_id, true);
|
||||
}
|
||||
|
||||
return get_board_file_db($bo_table, $wr_id, 'bf_file, bf_content', "and bf_type between '1' and '3'", true);
|
||||
}
|
||||
|
||||
function get_write_table_name($bo_table){
|
||||
global $g5;
|
||||
|
||||
return $g5['write_prefix'].preg_replace('/[^a-z0-9_]/i', '', $bo_table);
|
||||
}
|
||||
|
||||
function get_db_charset($charset){
|
||||
|
||||
$add_charset = $charset;
|
||||
|
||||
if ( 'utf8mb4' === $charset ) {
|
||||
$add_charset .= ' COLLATE utf8mb4_unicode_ci';
|
||||
}
|
||||
|
||||
return apply_replace('get_db_charset', $add_charset, $charset);
|
||||
}
|
||||
|
||||
function get_db_create_replace($sql_str){
|
||||
|
||||
if( in_array(strtolower(G5_DB_ENGINE), array('innodb', 'myisam')) ){
|
||||
$sql_str = preg_replace('/ENGINE=MyISAM/', 'ENGINE='.G5_DB_ENGINE, $sql_str);
|
||||
} else {
|
||||
$sql_str = preg_replace('/ENGINE=MyISAM/', '', $sql_str);
|
||||
}
|
||||
|
||||
if( G5_DB_CHARSET !== 'utf8' ){
|
||||
$sql_str = preg_replace('/CHARSET=utf8/', 'CHARACTER SET '.get_db_charset(G5_DB_CHARSET), $sql_str);
|
||||
}
|
||||
|
||||
return $sql_str;
|
||||
}
|
||||
|
||||
function get_permission_debug_show(){
|
||||
global $member;
|
||||
|
||||
$bool = false;
|
||||
if ( defined('G5_DEBUG') && G5_DEBUG ){
|
||||
$bool = true;
|
||||
}
|
||||
|
||||
return apply_replace('get_permission_debug_show', $bool, $member);
|
||||
}
|
||||
|
||||
function get_check_mod_rewrite(){
|
||||
|
||||
if( function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules()) )
|
||||
$mod_rewrite = 1;
|
||||
elseif( isset($_SERVER['IIS_UrlRewriteModule']) )
|
||||
$mod_rewrite = 1;
|
||||
else
|
||||
$mod_rewrite = 0;
|
||||
|
||||
return $mod_rewrite;
|
||||
}
|
||||
|
||||
// 생성되면 안되는 게시판명
|
||||
function get_bo_table_banned_word(){
|
||||
|
||||
$folders = array();
|
||||
|
||||
foreach(glob(G5_PATH.'/*', GLOB_ONLYDIR) as $dir) {
|
||||
$folders[] = basename($dir);
|
||||
}
|
||||
|
||||
return apply_replace('get_bo_table_banned_word', $folders);
|
||||
}
|
||||
|
||||
// 읽지 않은 메모 갯수 반환
|
||||
function get_memo_not_read($mb_id, $add_where='')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$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'];
|
||||
}
|
||||
|
||||
function get_scrap_totals($mb_id=''){
|
||||
global $g5;
|
||||
|
||||
$add_where = $mb_id ? " and mb_id = '$mb_id' " : '';
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['scrap_table']} where 1=1 $add_where";
|
||||
$row = sql_fetch($sql, false);
|
||||
|
||||
return $row['cnt'];
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
define('G5_HOOK_DEFAULT_PRIORITY', 8);
|
||||
|
||||
include_once(dirname(__FILE__) .'/Hook/hook.class.php');
|
||||
include_once(dirname(__FILE__) .'/Hook/hook.extends.class.php');
|
||||
|
||||
function get_hook_class(){
|
||||
|
||||
if( class_exists('GML_Hook') ){
|
||||
return GML_Hook::getInstance();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function put_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
global $gml;
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
$hook::addAction($tag, $func, $priority, $args);
|
||||
}
|
||||
}
|
||||
|
||||
function start_event($tag, $arg = ''){
|
||||
global $gml;
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
|
||||
$args = array();
|
||||
|
||||
if (
|
||||
is_array($arg)
|
||||
&&
|
||||
isset($arg[0])
|
||||
&&
|
||||
is_object($arg[0])
|
||||
&&
|
||||
1 == count($arg)
|
||||
) {
|
||||
$args[] =& $arg[0];
|
||||
} else {
|
||||
$args[] = $arg;
|
||||
}
|
||||
|
||||
$numArgs = func_num_args();
|
||||
|
||||
for ($a = 2; $a < $numArgs; $a++) {
|
||||
$args[] = func_get_arg($a);
|
||||
}
|
||||
|
||||
$hook::doAction($tag, $args, false);
|
||||
}
|
||||
}
|
||||
|
||||
function put_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
global $gml;
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
return $hook::addFilter($tag, $func, $priority, $args);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function apply_replace($tag, $arg = ''){
|
||||
global $gml;
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
|
||||
$args = array();
|
||||
|
||||
if (
|
||||
is_array($arg)
|
||||
&&
|
||||
isset($arg[0])
|
||||
&&
|
||||
is_object($arg[0])
|
||||
&&
|
||||
1 == count($arg)
|
||||
) {
|
||||
$args[] =& $arg[0];
|
||||
} else {
|
||||
$args[] = $arg;
|
||||
}
|
||||
|
||||
$numArgs = func_num_args();
|
||||
|
||||
for ($a = 2; $a < $numArgs; $a++) {
|
||||
$args[] = func_get_arg($a);
|
||||
}
|
||||
|
||||
return $hook::apply_filters($tag, $args, false);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function delete_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY){
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
return $hook::remove_action($tag, $func, $priority);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function delete_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY){
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
return $hook::remove_filter($tag, $func, $priority);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function get_hook_datas($type='', $is_callback=''){
|
||||
if( $hook = get_hook_class() ){
|
||||
return $hook::get_properties($type, $is_callback);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
?>
|
||||
+38
-41
@@ -30,46 +30,27 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
|
||||
}
|
||||
}
|
||||
|
||||
$cache_fwrite = false;
|
||||
$caches = null;
|
||||
|
||||
if(G5_USE_CACHE) {
|
||||
$cache_file = G5_DATA_PATH."/cache/latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-serial.php";
|
||||
|
||||
if(!file_exists($cache_file)) {
|
||||
$cache_fwrite = true;
|
||||
} else {
|
||||
if($cache_time > 0) {
|
||||
$filetime = filemtime($cache_file);
|
||||
if($filetime && $filetime < (G5_SERVER_TIME - 3600 * $cache_time)) {
|
||||
@unlink($cache_file);
|
||||
$cache_fwrite = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$cache_fwrite) {
|
||||
try{
|
||||
$file_contents = file_get_contents($cache_file);
|
||||
$file_ex = explode("\n\n", $file_contents);
|
||||
$caches = unserialize(base64_decode($file_ex[1]));
|
||||
|
||||
$list = (is_array($caches) && isset($caches['list'])) ? $caches['list'] : array();
|
||||
$bo_subject = (is_array($caches) && isset($caches['bo_subject'])) ? $caches['bo_subject'] : '';
|
||||
} catch(Exception $e){
|
||||
$cache_fwrite = true;
|
||||
$list = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
$cache_file_name = "latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-".g5_cache_secret_key();
|
||||
$caches = g5_get_cache($cache_file_name);
|
||||
$cache_list = isset($caches['list']) ? $caches['list'] : array();
|
||||
g5_latest_cache_data($bo_table, $cache_list);
|
||||
}
|
||||
|
||||
if(!G5_USE_CACHE || $cache_fwrite) {
|
||||
if( $caches === false ){
|
||||
|
||||
$list = array();
|
||||
|
||||
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
|
||||
$board = sql_fetch($sql);
|
||||
$board = get_board_db($bo_table, true);
|
||||
|
||||
$bo_subject = get_text($board['bo_subject']);
|
||||
$board['bo_use_sideview'] = 0; // not use sideview
|
||||
|
||||
$tmp_write_table = $g5['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
|
||||
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row = sql_fetch_array($result); $i++) {
|
||||
try {
|
||||
@@ -82,22 +63,38 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
|
||||
$row['file'] = array('count'=>0);
|
||||
}
|
||||
$list[$i] = get_list($row, $board, $latest_skin_url, $subject_len);
|
||||
}
|
||||
|
||||
if($cache_fwrite) {
|
||||
$handle = fopen($cache_file, 'w');
|
||||
$list[$i]['first_file_thumb'] = (isset($row['wr_file']) && $row['wr_file']) ? get_board_file_db($bo_table, $row['wr_id'], 'bf_file, bf_content', "and bf_type between '1' and '3'", true) : array('bf_file'=>'', 'bf_content'=>'');
|
||||
$list[$i]['bo_table'] = $bo_table;
|
||||
// 썸네일 추가
|
||||
if($options) {
|
||||
$options_arr = explode(',', $options);
|
||||
$thumb_width = $options_arr[0];
|
||||
$thumb_height = $options_arr[1];
|
||||
$thumb = get_list_thumbnail($bo_table, $row['wr_id'], $thumb_width, $thumb_height, false, true);
|
||||
// 이미지 썸네일
|
||||
if($thumb['src']) {
|
||||
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'">';
|
||||
$list[$i]['img_thumbnail'] = '<a href="'.$list[$i]['href'].'" class="lt_img">'.$img_content.'</a>';
|
||||
// } else {
|
||||
// $img_content = '<img src="'. G5_IMG_URL.'/no_img.png'.'" alt="'.$thumb['alt'].'" width="'.$thumb_width.'" height="'.$thumb_height.'" class="no_img">';
|
||||
}
|
||||
}
|
||||
}
|
||||
g5_latest_cache_data($bo_table, $list);
|
||||
|
||||
if(G5_USE_CACHE) {
|
||||
|
||||
$caches = array(
|
||||
'list' => $list,
|
||||
'bo_subject' => sql_escape_string($bo_subject),
|
||||
);
|
||||
$cache_content = "<?php if (!defined('_GNUBOARD_')) exit; ?>\n\n";
|
||||
$cache_content .= base64_encode(serialize($caches)); //serialize
|
||||
);
|
||||
|
||||
fwrite($handle, $cache_content);
|
||||
fclose($handle);
|
||||
|
||||
@chmod($cache_file, 0640);
|
||||
g5_set_cache($cache_file_name, $caches, 3600 * $cache_time);
|
||||
}
|
||||
} else {
|
||||
$list = $cache_list;
|
||||
$bo_subject = (is_array($caches) && isset($caches['bo_subject'])) ? $caches['bo_subject'] : '';
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -10,9 +10,7 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
||||
$filename = $alt = "";
|
||||
$edt = false;
|
||||
|
||||
$sql = " select bf_file, bf_content from {$g5['board_file_table']}
|
||||
where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_type between '1' and '3' order by bf_no limit 0, 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
$row = get_thumbnail_find_cache($bo_table, $wr_id, 'file');
|
||||
|
||||
if($row['bf_file']) {
|
||||
$filename = $row['bf_file'];
|
||||
|
||||
+259
@@ -0,0 +1,259 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once(dirname(__FILE__) .'/URI/uri.class.php');
|
||||
include_once(dirname(__FILE__) .'/URI/obj.class.php');
|
||||
|
||||
// 짧은 주소 형식으로 만들어서 가져온다.
|
||||
function get_pretty_url($folder, $no='', $query_string='', $action='')
|
||||
{
|
||||
global $g5, $config;
|
||||
|
||||
$boards = get_board_names();
|
||||
$segments = array();
|
||||
$url = $add_query = '';
|
||||
|
||||
// use shortten url
|
||||
if($config['cf_bbs_rewrite']) {
|
||||
|
||||
$segments[0] = G5_URL;
|
||||
|
||||
if( $folder === 'content' && $no ){ // 내용관리
|
||||
|
||||
$segments[1] = $folder;
|
||||
|
||||
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);
|
||||
|
||||
} else {
|
||||
$segments[2] = urlencode($no);
|
||||
}
|
||||
|
||||
} else if(in_array($folder, $boards)) { // 게시판
|
||||
|
||||
$segments[1] = $folder;
|
||||
|
||||
if($no) {
|
||||
|
||||
if( $config['cf_bbs_rewrite'] > 1 ){
|
||||
|
||||
$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);
|
||||
|
||||
} else {
|
||||
$segments[2] = urlencode($no);
|
||||
}
|
||||
|
||||
} else if($action) {
|
||||
$segments[2] = urlencode($action);
|
||||
}
|
||||
|
||||
} else {
|
||||
$segments[1] = $folder;
|
||||
if($no) {
|
||||
$no_array = explode("=", $no);
|
||||
$no_value = end($no_array);
|
||||
$segments[2] = urlencode($no_value);
|
||||
}
|
||||
}
|
||||
|
||||
if($query_string) {
|
||||
// If the first character of the query string is '&', replace it with '?'.
|
||||
if(substr($query_string, 0, 1) == '&') {
|
||||
$add_query = preg_replace("/\&/", "?", $query_string, 1);
|
||||
} else {
|
||||
$add_query = '?'. $query_string;
|
||||
}
|
||||
}
|
||||
|
||||
} else { // don't use shortten url
|
||||
if(in_array($folder, $boards)) {
|
||||
$url = G5_BBS_URL. '/board.php?bo_table='. $folder;
|
||||
if($no) {
|
||||
$url .= '&wr_id='. $no;
|
||||
}
|
||||
if($query_string) {
|
||||
$url .= '&'. $query_string;
|
||||
}
|
||||
} else {
|
||||
$url = G5_BBS_URL. '/'.$folder.'.php';
|
||||
if($no) {
|
||||
$url .= '?'. $no;
|
||||
}
|
||||
if($query_string) {
|
||||
$url .= ($no ? '?' : '&'). $query_string;
|
||||
}
|
||||
}
|
||||
|
||||
$segments[0] = $url;
|
||||
}
|
||||
|
||||
return implode('/', $segments).$add_query;
|
||||
}
|
||||
|
||||
function short_url_clean($url, $add_qry=''){
|
||||
if( class_exists('G5_URI') ){
|
||||
return G5_URI::getInstance()->url_clean($url, $add_qry);
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
function correct_goto_url($url){
|
||||
return $url.'/';
|
||||
}
|
||||
|
||||
function generate_seo_title($string, $wordLimit=G5_SEO_TITEL_WORD_CUT){
|
||||
$separator = '-';
|
||||
|
||||
if($wordLimit != 0){
|
||||
$wordArr = explode(' ', $string);
|
||||
$string = implode(' ', array_slice($wordArr, 0, $wordLimit));
|
||||
}
|
||||
|
||||
$quoteSeparator = preg_quote($separator, '#');
|
||||
|
||||
$trans = array(
|
||||
'&.+?;' => '',
|
||||
'[^\w\d _-]' => '',
|
||||
'\s+' => $separator,
|
||||
'('.$quoteSeparator.')+'=> $separator
|
||||
);
|
||||
|
||||
$string = strip_tags($string);
|
||||
|
||||
if( function_exists('mb_convert_encoding') ){
|
||||
$string = mb_convert_encoding($string, 'UTF-8', 'UTF-8');
|
||||
}
|
||||
|
||||
foreach ($trans as $key => $val){
|
||||
$string = preg_replace('#'.$key.'#iu', $val, $string);
|
||||
}
|
||||
|
||||
$string = strtolower($string);
|
||||
|
||||
return trim(trim($string, $separator));
|
||||
}
|
||||
|
||||
function exist_seo_url($type, $seo_title, $write_table, $sql_id=0){
|
||||
global $g5;
|
||||
|
||||
$exists_title = '';
|
||||
$sql_id = preg_replace('/[^a-z0-9_]/i', '', $sql_id);
|
||||
|
||||
if( $type === 'bbs' ){
|
||||
$sql = "select wr_seo_title FROM {$write_table} WHERE wr_seo_title = '".sql_real_escape_string($seo_title)."' AND wr_id <> '$sql_id' limit 1";
|
||||
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
echo $sql;
|
||||
|
||||
$exists_title = $row['wr_seo_title'];
|
||||
|
||||
} else if ( $type === 'content' ){
|
||||
|
||||
$sql = "select co_seo_title FROM {$write_table} WHERE co_seo_title = '".sql_real_escape_string($seo_title)."' AND co_id <> '$sql_id' limit 1";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$exists_title = $row['co_seo_title'];
|
||||
|
||||
} else {
|
||||
return $seo_title;
|
||||
}
|
||||
|
||||
if ($exists_title)
|
||||
return 'is_exists';
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
function exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id=0){
|
||||
static $count = 0;
|
||||
|
||||
$seo_title_add = ($count > 0) ? utf8_strcut($seo_title, 255 - ($count+1), '')."-$count" : $seo_title;
|
||||
|
||||
if( ! exist_seo_url($type, $seo_title_add, $write_table, $sql_id) ){
|
||||
return $seo_title_add;
|
||||
}
|
||||
|
||||
$count++;
|
||||
|
||||
if( $count > 253 ){
|
||||
return $seo_title_add;
|
||||
}
|
||||
|
||||
return exist_seo_title_recursive($type, $seo_title, $write_table, $sql_id);
|
||||
}
|
||||
|
||||
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[] = '#### '.G5_VERSION.' rewrite BOF #####';
|
||||
$rules[] = '<IfModule mod_rewrite.c>';
|
||||
$rules[] = 'RewriteEngine On';
|
||||
$rules[] = 'RewriteBase '.$base_path;
|
||||
$rules[] = 'RewriteCond %{REQUEST_FILENAME} !-f';
|
||||
$rules[] = 'RewriteCond %{REQUEST_FILENAME} !-d';
|
||||
$rules[] = 'RewriteRule ^content/([0-9a-zA-Z_]+)$ '.G5_BBS_DIR.'/content.php?co_id=$1&rewrite=1 [L]';
|
||||
$rules[] = 'RewriteRule ^content/([^/]+)/$ '.G5_BBS_DIR.'/content.php?co_seo_title=$1&rewrite=1 [QSA,L]';
|
||||
$rules[] = 'RewriteRule ^rss/([0-9a-zA-Z_]+)$ '.G5_BBS_DIR.'/rss.php?bo_table=$1 [L]';
|
||||
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)$ '.G5_BBS_DIR.'/board.php?bo_table=$1&rewrite=1 [QSA,L]';
|
||||
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/([^/]+)/$ '.G5_BBS_DIR.'/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 [QSA,L]';
|
||||
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/write$ '.G5_BBS_DIR.'/write.php?bo_table=$1&rewrite=1 [QSA,L]';
|
||||
$rules[] = 'RewriteRule ^([0-9a-zA-Z_]+)/([0-9]+)$ '.G5_BBS_DIR.'/board.php?bo_table=$1&wr_id=$2&rewrite=1 [QSA,L]';
|
||||
$rules[] = '</IfModule>';
|
||||
$rules[] = '#### '.G5_VERSION.' rewrite EOF #####';
|
||||
|
||||
return $return_string ? implode("\n", $rules) : $rules;
|
||||
}
|
||||
|
||||
function update_rewrite_rules(){
|
||||
|
||||
$is_apache = (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false);
|
||||
|
||||
if($is_apache){
|
||||
$save_path = G5_PATH.'/.htaccess';
|
||||
|
||||
if( (!file_exists($save_path) && is_writable(G5_PATH)) || is_writable($save_path) ){
|
||||
|
||||
$rules = get_mod_rewrite_rules();
|
||||
|
||||
$bof_str = $rules[0];
|
||||
$eof_str = end($rules);
|
||||
|
||||
if( file_exists($save_path) ){
|
||||
$code = file_get_contents($save_path);
|
||||
|
||||
if( $code && strpos($code, $bof_str) !== false && strpos($code, $eof_str) !== false ){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$fp = fopen($save_path, "ab");
|
||||
flock( $fp, LOCK_EX );
|
||||
|
||||
$rewrite_str = implode("\n", $rules);
|
||||
|
||||
fwrite( $fp, "\n" );
|
||||
fwrite( $fp, $rewrite_str );
|
||||
fwrite( $fp, "\n" );
|
||||
|
||||
flock( $fp, LOCK_UN );
|
||||
fclose($fp);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -1,9 +1,6 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
// 내용
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
if (!$co['co_id'])
|
||||
alert('등록된 내용이 없습니다.');
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$outlogin_skin_url.'/style.css">'
|
||||
</div>
|
||||
|
||||
<div id="ol_after_btn">
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?><a href="<?php echo G5_ADMIN_URL ?>" class="btn_admin">관리자</a><?php } ?>
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>" class="btn_admin">관리자</a><?php } ?>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" id="ol_after_logout">로그아웃</a>
|
||||
</div>
|
||||
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ if(defined('G5_THEME_PATH')) {
|
||||
<div id="ft">
|
||||
<div id="ft_copy">
|
||||
<div id="ft_company">
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보처리방침</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'company'); ?>">회사소개</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'privacy'); ?>">개인정보처리방침</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'provision'); ?>">서비스이용약관</a>
|
||||
</div>
|
||||
Copyright © <b>소유하신 도메인.</b> All rights reserved.<br>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_PLUGIN_URL.'/debugbar/style.css">', 0);
|
||||
?>
|
||||
<style>
|
||||
<?php if (defined('G5_IS_ADMIN') && G5_IS_ADMIN){ ?>
|
||||
.debug_bar_wrap{z-index:991001}
|
||||
<?php } ?>
|
||||
</style>
|
||||
<div class="debug_bar_wrap">
|
||||
<div class="debug_bar_text_group">
|
||||
<div class="debug_bar_btn_group"><button class="view_debug_bar debug_button">디버그</button></div>
|
||||
<div class="debug_bar_text">
|
||||
<?php echo 'PHP 실행시간 : '.$php_run_time.' | 메모리 사용량 : '.number_format($memory_usage).' bytes'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="debug_bar_content">
|
||||
<div class="content_inner">
|
||||
|
||||
<div class="debugbar_close_btn_el"><button class="debugbar_close_btn btn">닫기</button></div>
|
||||
<div id="debugbar">
|
||||
<ul class="debugbar_tab">
|
||||
<li class="debug_tab active" data-tab="executed_query"><a href="#debug_executed_query">SQL Query</a></li>
|
||||
<li class="debug_tab" data-tab="hook_info"><a href="#debug_hook_info">HOOK 정보</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="debug_executed_query" class="inner_debug">
|
||||
<h3 class="query_top">
|
||||
총 쿼리수 : <span><?php echo isset($g5_debug['sql']) ? count($g5_debug['sql']) : 0; ?></span>
|
||||
</h3>
|
||||
|
||||
<div class="sql_query_list">
|
||||
<table class="debug_table">
|
||||
<caption>
|
||||
쿼리 목록
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">실행순서</th>
|
||||
<th scope="col">쿼리문</th>
|
||||
<th scope="col">실행시간</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach((array) $g5_debug['sql'] as $key=>$query){
|
||||
|
||||
if( empty($query) ) continue;
|
||||
|
||||
$executed_time = $query['end_time'] - $query['start_time'];
|
||||
$show_excuted_time = number_format((float)$executed_time * 1000, 2, '.', '');
|
||||
?>
|
||||
<tr>
|
||||
<td scope="row" data-label="실행순서"><?php echo $key; ?></td>
|
||||
<td class="left" data-label="쿼리문"><?php echo $query['sql']; ?></td>
|
||||
<td data-label="실행시간"><?php echo $show_excuted_time.' ms'; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="debug_hook_info" class="inner_debug">
|
||||
<?php
|
||||
$event_totals = get_hook_datas('event');
|
||||
$event_callbacks = get_hook_datas('event', 1);
|
||||
$replace_totals = get_hook_datas('replace');
|
||||
$replace_callbacks = get_hook_datas('replace', 1);
|
||||
?>
|
||||
<div class="hook_list">
|
||||
|
||||
<div class="debug_table_wrap">
|
||||
<table class="debug_table hook_table">
|
||||
<caption>
|
||||
HOOK 목록
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" width="20%">event_tag (갯수)</th>
|
||||
<th scope="col" width="60%">event_function</th>
|
||||
<th scope="col" width="10%">인수의 수</th>
|
||||
<th scope="col" width="10%">우선 순위</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
foreach((array) $event_totals as $tag=>$count){
|
||||
|
||||
if( $tag === 'count' ) continue;
|
||||
if( empty($count) ) continue;
|
||||
|
||||
$datas = array();
|
||||
if( isset($event_callbacks[$tag]) ){
|
||||
|
||||
$event_callbacks_tag = $event_callbacks[$tag];
|
||||
ksort($event_callbacks_tag);
|
||||
|
||||
foreach((array) $event_callbacks_tag as $priority=>$event_args){
|
||||
if( empty($event_args) ) continue;
|
||||
|
||||
foreach($event_args as $index=>$funcs){
|
||||
$datas[] = array(
|
||||
'priority' => $priority,
|
||||
'function' => $funcs['function'],
|
||||
'arguments' => $funcs['arguments'],
|
||||
);
|
||||
} //end foreach
|
||||
} //end foreach
|
||||
|
||||
$rowspan = $datas ? ' rowspan='.count($datas) : '';
|
||||
|
||||
$is_print = $rowspan;
|
||||
|
||||
foreach($datas as $data){
|
||||
?>
|
||||
<tr>
|
||||
<?php if ($is_print){ ?>
|
||||
<td scope="row" data-label="event_tag" <?php echo $rowspan; ?>><?php echo $tag.' <span class="hook_count">('.$count.')</span>'; ?></td>
|
||||
<?php } ?>
|
||||
<td data-label="event_function">
|
||||
<?php echo $data['function']; ?>
|
||||
</td>
|
||||
<td data-label="인수의 수"><?php echo $data['arguments']; ?></td>
|
||||
<td data-label="우선 순위"><?php echo $data['priority']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$is_print = '';
|
||||
} //end foreach
|
||||
} else { // else if
|
||||
?>
|
||||
<tr>
|
||||
<td scope="row" data-label="event_tag"><?php echo $tag.' <span class="hook_count">('.$count.')</span>'; ?></td>
|
||||
<td data-label="event_function"> </td>
|
||||
<td data-label="인수의 수"> </td>
|
||||
<td data-label="우선 순위"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}//end if
|
||||
} //end foreach
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="debug_table_wrap">
|
||||
<table class="debug_table hook_table">
|
||||
<caption>
|
||||
HOOK 목록
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" width="20%">replace_tag (갯수)</th>
|
||||
<th scope="col" width="60%">replace_function</th>
|
||||
<th scope="col" width="10%">인수의 수</th>
|
||||
<th scope="col" width="10%">우선 순위</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
foreach((array) $replace_totals as $tag=>$count){
|
||||
|
||||
if( $tag === 'count' ) continue;
|
||||
if( empty($count) ) continue;
|
||||
|
||||
$datas = array();
|
||||
if( isset($replace_callbacks[$tag]) ){
|
||||
|
||||
$replace_callbacks_tag = $replace_callbacks[$tag];
|
||||
ksort($replace_callbacks_tag);
|
||||
|
||||
foreach((array) $replace_callbacks_tag as $priority=>$replace_args){
|
||||
if( empty($replace_args) ) continue;
|
||||
|
||||
foreach($replace_args as $index=>$funcs){
|
||||
$datas[] = array(
|
||||
'priority' => $priority,
|
||||
'function' => $funcs['function'],
|
||||
'arguments' => $funcs['arguments'],
|
||||
);
|
||||
} //end foreach
|
||||
} //end foreach
|
||||
|
||||
$rowspan = $datas ? ' rowspan='.count($datas) : '';
|
||||
|
||||
$is_print = $rowspan;
|
||||
|
||||
foreach($datas as $data){
|
||||
?>
|
||||
<tr>
|
||||
<?php if ($is_print){ ?>
|
||||
<td scope="row" data-label="replace_tag" <?php echo $rowspan; ?>><?php echo $tag.' <span class="hook_count">('.$count.')</span>'; ?></td>
|
||||
<?php } ?>
|
||||
<td data-label="replace_function">
|
||||
<?php echo $data['function']; ?>
|
||||
</td>
|
||||
<td data-label="인수의 수"><?php echo $data['arguments']; ?></td>
|
||||
<td data-label="우선 순위"><?php echo $data['priority']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$is_print = '';
|
||||
} //end foreach
|
||||
} else { // else if
|
||||
?>
|
||||
<tr>
|
||||
<td scope="row" data-label="replace_tag"><?php echo $tag.' <span class="hook_count">('.$count.')</span>'; ?></td>
|
||||
<td data-label="replace_function"> </td>
|
||||
<td data-label="인수의 수"> </td>
|
||||
<td data-label="우선 순위"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}//end if
|
||||
} //end foreach
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div> <!-- end .hook_list -->
|
||||
</div>
|
||||
|
||||
</div> <!-- end .content_inner -->
|
||||
</div> <!-- end .debug_bar_content -->
|
||||
</div> <!-- end .debug_bar_wrap -->
|
||||
<script>
|
||||
jQuery(function($){
|
||||
$(".debug_tab").on("click", function() {
|
||||
$(".inner_debug").hide();
|
||||
$(this).addClass("active").siblings().removeClass("active");
|
||||
$("#debug_" + $(this).attr('data-tab')).show();
|
||||
});
|
||||
|
||||
$(".debug_tab").on("click", "a", function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(".debug_bar_wrap").on("click", ".debugbar_close_btn", function() {
|
||||
$(".view_debug_bar").trigger("click");
|
||||
})
|
||||
.on("click", ".view_debug_bar", function() {
|
||||
$(".debug_bar_content").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,51 @@
|
||||
.debug_bar_wrap{display:block;position:relative;z-index:80;height:32px;background-color:#1ABC9C}
|
||||
.debug_bar_content{display:none;position:absolute;z-index:81;width:100%;top:32px;min-height:300px;overflow:hidden;background:#fff;overflow-y:scroll;box-sizing:content-box;border-top:thin solid gray}
|
||||
.debug_bar_text_group{position:relative;padding:0 20px 0 120px;line-height:32px;}
|
||||
.debug_bar_btn_group{position:absolute;top:0;left:1em;line-height:32px;text-align:left}
|
||||
.debug_bar_text{line-height:32px;display:block;width:100%;color:#fff;text-align:right;font-size:1.2em;overflow:hidden;text-overflow: ellipsis;-o-text-overflow:ellipsis;white-space:nowrap;word-wrap:normal !important}
|
||||
.sql_query_list li{padding:1em;line-height:1em}
|
||||
.debug_bar_content .content_inner{position:relative;padding:1em}
|
||||
.debug_bar_content .debug_table_wrap{margin:10px 0}
|
||||
.debugbar_tab::after{display:block;visibility:hidden;clear:both;content:""}
|
||||
.debugbar_tab li{float:left;margin-bottom:-1px;position:relative;display:block;position:relative;display:block;padding:10px 15px}
|
||||
.debugbar_tab li.debug_tab{border-bottom:2px solid #DDD}
|
||||
.debugbar_tab li.active a,.debugbar_tab li.active a:focus,.debugbar_tab li.active a:hover{border-width:0}
|
||||
.debugbar_tab li a{border:none;color:#666}
|
||||
.debugbar_tab li.active a,.debugbar_tab li a:hover{border:none;color:#4285F4!important;background:transparent}
|
||||
.debugbar_tab li a::after{content:"";background:#4285F4;height:2px;position:absolute;width:100%;left:0;bottom:-1px;transition:all 250ms ease 0;transform:scale(0)}
|
||||
.debugbar_tab li.active a::after,.debugbar_tab li:hover a::after{transform:scale(1)}
|
||||
.debugbar_tab li a::after{background:#21527d none repeat scroll 0 0;color:#fff}
|
||||
.inner_debug {display:none}
|
||||
.inner_debug h3.query_top{padding:1em;font-size:1.3em}
|
||||
#debug_executed_query{display:block}
|
||||
.lang_domain_list td .num{margin-right:10px;color:#9b9ea5;font-size:9px}
|
||||
.debugbar_close_btn_el{position:absolute;top:20px;right:20px}
|
||||
.debug_table{border:1px solid #ccc;border-collapse:collapse;margin:0;padding:0;width:100%}
|
||||
.debug_table caption{display:none}
|
||||
.debug_table tr{background:#f8f8f8;border:1px solid #ddd;padding:.35em}
|
||||
.debug_table th,.debug_table td{padding:.625em;text-align:center}
|
||||
.debug_table tbody tr:hover td{background:#c7d4dd!important}
|
||||
.debug_table tbody tr:nth-child(even){background-color:#fff}
|
||||
.debug_table td.left{text-align:left}
|
||||
.debug_table th{font-size:.85em;letter-spacing:.1em;text-transform:uppercase}
|
||||
.debug_table td img{text-align:center}
|
||||
|
||||
.debug_table.hook_table th, .debug_table.hook_table td {text-align:left;border:1px solid #ddd;}
|
||||
.hook_table .hook_count{margin-left:3px;font-size:0.9em;color:#7cbc0a}
|
||||
|
||||
.debug_bar_btn_group button.debug_button{margin-top:3px}
|
||||
button.debug_button{background-color:#7fbf4d;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#7fbf4d),color-stop(100%,#63a62f));background-image:-webkit-linear-gradient(top,#7fbf4d,#63a62f);background-image:-moz-linear-gradient(top,#7fbf4d,#63a62f);background-image:-ms-linear-gradient(top,#7fbf4d,#63a62f);background-image:-o-linear-gradient(top,#7fbf4d,#63a62f);background-image:linear-gradient(top,#7fbf4d,#63a62f);border:1px solid #63a62f;border-bottom:1px solid #5b992b;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 0 #96ca6d;box-shadow:inset 0 1px 0 0 #96ca6d;color:#fff;padding:3px 0 4px;text-align:center;text-shadow:0 -1px 0 #4c9021;width:100px;font-weight:700;font-size:14px;vertical-align:top}
|
||||
button.debug_button:hover{background-color:#76b347;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#76b347),color-stop(100%,#5e9e2e));background-image:-webkit-linear-gradient(top,#76b347,#5e9e2e);background-image:-moz-linear-gradient(top,#76b347,#5e9e2e);background-image:-ms-linear-gradient(top,#76b347,#5e9e2e);background-image:-o-linear-gradient(top,#76b347,#5e9e2e);background-image:linear-gradient(top,#76b347,#5e9e2e);-webkit-box-shadow:inset 0 1px 0 0 #8dbf67;box-shadow:inset 0 1px 0 0 #8dbf67;cursor:pointer}
|
||||
button.debug_button:active{border:1px solid #5b992b;border-bottom:1px solid #538c27;-webkit-box-shadow:inset 0 0 8px 4px #548c29,0 1px 0 0 #eee;box-shadow:inset 0 0 8px 4px #548c29,0 1px 0 0 #eee}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.debug_table{border:0}
|
||||
.debug_table caption{font-size:1.3em}
|
||||
.debug_table thead{display:none}
|
||||
.debug_table tr{border-bottom:3px solid #ddd;display:block;margin-bottom:.625em}
|
||||
.debug_table td{border-bottom:1px solid #ddd;display:block;font-size:.8em;text-align:right}
|
||||
.debug_table td.left{text-align:right}
|
||||
.debug_table td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}
|
||||
.debug_table.hook_table th, .debug_table.hook_table td{border:0 none;border-bottom:1px solid #ddd;text-align:right}
|
||||
.debug_table td:last-child{border-bottom:0 !important}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
|
||||
|
||||
<div class="btn_confirm write_div">
|
||||
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel btn">취소</a>
|
||||
<a href="<?php echo get_pretty_url($bo_table) ?>" class="btn_cancel btn">취소</a>
|
||||
<input type="submit" value="작성완료" id="btn_submit" accesskey="s" class="btn_submit btn">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -7,7 +7,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
|
||||
<div class="lat">
|
||||
<h2 class="lat_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li>
|
||||
@@ -48,6 +48,6 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
|
||||
<div class="notice">
|
||||
<h2><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><i class="fa fa-bullhorn" aria-hidden="true"></i><span class="sound_only"><?php echo $bo_subject ?></span></a></h2>
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><i class="fa fa-bullhorn" aria-hidden="true"></i><span class="sound_only"><?php echo $bo_subject ?></span></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li>
|
||||
|
||||
@@ -9,7 +9,7 @@ $thumb_height = 150;
|
||||
?>
|
||||
|
||||
<div class="pic_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
@@ -61,6 +61,6 @@ $thumb_height = 150;
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$outlogin_skin_url.'/style.css">'
|
||||
</span>
|
||||
<strong><?php echo $nick ?>님</strong>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" id="ol_after_logout" class="btn_b04">로그아웃</a>
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?><a href="<?php echo G5_ADMIN_URL ?>" class="btn_admin btn_04">관리자</a><?php } ?>
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>" class="btn_admin btn_04">관리자</a><?php } ?>
|
||||
</header>
|
||||
<ul id="ol_after_private">
|
||||
<li>
|
||||
|
||||
@@ -37,9 +37,9 @@ if (G5_IS_MOBILE) {
|
||||
|
||||
<div id="ft_wr">
|
||||
<div id="ft_link">
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보처리방침</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'company'); ?>">회사소개</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'privacy'); ?>">개인정보처리방침</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'provision'); ?>">서비스이용약관</a>
|
||||
<a href="<?php echo get_device_change_url(); ?>">모바일버전</a>
|
||||
</div>
|
||||
<div id="ft_catch"><img src="<?php echo G5_IMG_URL; ?>/ft_logo.png" alt="<?php echo G5_VERSION ?>"></div>
|
||||
|
||||
@@ -25,6 +25,8 @@ $(function() {
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<?php start_event('tail_sub'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php echo html_end(); // HTML 마지막 처리 함수 : 반드시 넣어주시기 바랍니다. ?>
|
||||
@@ -33,7 +33,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php"><i class="fa fa-cog" aria-hidden="true"></i> 정보수정</a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/logout.php"><i class="fa fa-sign-out" aria-hidden="true"></i> 로그아웃</a></li>
|
||||
<?php if ($is_admin) { ?>
|
||||
<li class="tnb_admin"><a href="<?php echo G5_ADMIN_URL ?>"><b><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</b></a></li>
|
||||
<li class="tnb_admin"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>"><b><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</b></a></li>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/register.php"><i class="fa fa-user-plus" aria-hidden="true"></i> 회원가입</a></li>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$begin_time = get_microtime();
|
||||
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
|
||||
|
||||
if (!isset($g5['title'])) {
|
||||
$g5['title'] = $config['cf_title'];
|
||||
|
||||
@@ -6,7 +6,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
?>
|
||||
|
||||
<div class="lat">
|
||||
<h2 class="lat_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li>
|
||||
@@ -47,6 +47,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">',
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ add_javascript('<script src="'.G5_JS_URL.'/jquery.bxslider.js"></script>', 10);
|
||||
?>
|
||||
|
||||
<div class="notice">
|
||||
<h2><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><i class="fa fa-bullhorn" aria-hidden="true"></i><span class="sound_only"><?php echo $bo_subject ?></span></a></h2>
|
||||
<h2><a href="<?php echo get_pretty_url($bo_table); ?>"><i class="fa fa-bullhorn" aria-hidden="true"></i><span class="sound_only"><?php echo $bo_subject ?></span></a></h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<li>
|
||||
|
||||
@@ -9,7 +9,7 @@ $thumb_height = 150;
|
||||
?>
|
||||
|
||||
<div class="pic_lt">
|
||||
<h2 class="lat_title"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<h2 class="lat_title"><a href="<?php echo get_pretty_url($bo_table); ?>"><?php echo $bo_subject ?></a></h2>
|
||||
<ul>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
@@ -62,6 +62,6 @@ $thumb_height = 150;
|
||||
<li class="empty_li">게시물이 없습니다.</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $bo_table ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
<a href="<?php echo get_pretty_url($bo_table); ?>" class="lt_more"><span class="sound_only"><?php echo $bo_subject ?></span><i class="fa fa-plus" aria-hidden="true"></i><span class="sound_only"> 더보기</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$outlogin_skin_url.'/style.css">'
|
||||
</span>
|
||||
<strong><?php echo $nick ?>님</strong>
|
||||
<a href="<?php echo G5_BBS_URL ?>/logout.php" id="ol_after_logout" class="btn_b04">로그아웃</a>
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?><a href="<?php echo G5_ADMIN_URL ?>" class="btn_admin btn_04">관리자</a><?php } ?>
|
||||
<?php if ($is_admin == 'super' || $is_auth) { ?><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>" class="btn_admin btn_04">관리자</a><?php } ?>
|
||||
</header>
|
||||
<ul id="ol_after_private">
|
||||
<li>
|
||||
|
||||
@@ -32,9 +32,9 @@ if (G5_IS_MOBILE) {
|
||||
|
||||
<div id="ft_wr">
|
||||
<div id="ft_link">
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=company">회사소개</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=privacy">개인정보처리방침</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=provision">서비스이용약관</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'company'); ?>">회사소개</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'privacy'); ?>">개인정보처리방침</a>
|
||||
<a href="<?php echo get_pretty_url('content', 'provision'); ?>">서비스이용약관</a>
|
||||
<a href="<?php echo get_device_change_url(); ?>">모바일버전</a>
|
||||
</div>
|
||||
<div id="ft_catch"><img src="<?php echo G5_IMG_URL; ?>/ft_logo.png" alt="<?php echo G5_VERSION ?>"></div>
|
||||
|
||||
@@ -20,6 +20,8 @@ $(function() {
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<?php start_event('tail_sub'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php echo html_end(); // HTML 마지막 처리 함수 : 반드시 넣어주시기 바랍니다. ?>
|
||||
Reference in New Issue
Block a user