Compare commits

..
8 Commits
520 changed files with 17526 additions and 19194 deletions
-120
View File
@@ -1,120 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
$is_use_apache = (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false);
$is_use_nginx = (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
$is_use_iis = !$is_use_apache && (stripos($_SERVER['SERVER_SOFTWARE'], 'microsoft-iis') !== false);
$is_write_file = false;
$is_apache_need_rules = false;
$is_apache_rewrite = false;
if( !($is_use_apache || $is_use_nginx || $is_use_iis) ){ // 셋다 아니면 다 출력시킨다.
$is_use_apache = true;
$is_use_nginx = true;
}
if ( $is_use_nginx ){
$is_write_file = false;
}
if ( $is_use_apache ){
$is_write_file = (is_writable(G5_PATH) || (file_exists(G5_PATH.'/.htaccess') && is_writable(G5_PATH.'/.htaccess'))) ? true : false;
$is_apache_need_rules = check_need_rewrite_rules();
$is_apache_rewrite = function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules());
}
$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 을 사용합니다. <a href="https://sir.kr/manual/g5/286" class="btn btn_03" target="_blank" style="margin-left:10px">설정 관련 메뉴얼 보기</a>
<?php if( $is_use_apache && ! $is_use_nginx ){ ?>
<?php if( ! $is_apache_rewrite ){ ?>
<br><strong>Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</strong>
<?php } else if( ! $is_write_file && $is_apache_need_rules ) { // apache인 경우 ?>
<br><strong>짧은 주소 사용시 아래 Apache 설정 코드를 참고하여 설정해 주세요.</strong>
<?php } ?>
<?php } ?>
</p>
</div>
<div class="server_config_views">
<?php if ( $is_use_apache ){ ?>
<button type="button" data-remodal-target="modal_apache" class="btn btn_03">Apache 설정 코드 보기</button>
<?php } ?>
<?php if ( $is_use_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; ?>" class="rules_label"><?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_apache_rewrite ) { ?>
<br><span class="info-warning">Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</span>
<?php } else if ( ! $is_write_file && $is_apache_need_rules ) { ?>
<br><span class="info-warning">자동으로 .htaccess 파일을 수정 할수 있는 권한이 없습니다.<br>.htaccess 파일이 없다면 생성 후에, 아래 코드가 없으면 코드를 복사하여 붙여넣기 해 주세요.</span>
<?php } else if ( ! $is_apache_need_rules ){ ?>
<br><span class="info-success">정상적으로 적용된 상태입니다.</span>
<?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">
<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">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
<textarea readonly="readonly" rows="10"><?php echo get_nginx_conf_rules(true); ?></textarea>
</div>
</div>
</section>
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
if (!defined('_GNUBOARD_')) exit;
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
$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 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="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="tnb">
<ul>
+1 -1
View File
@@ -489,7 +489,7 @@ function admin_check_xss_params($params){
// 접근 권한 검사
if (!$member['mb_id'])
{
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(correct_goto_url(G5_ADMIN_URL)));
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL));
}
else if ($is_admin != 'super')
{
+2 -2
View File
@@ -185,7 +185,7 @@ $pg_anchor = '<ul class="anchor">
<?php if ($w == '') { ?>
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
<?php } else { ?>
<a href="<?php echo get_pretty_url($board['bo_table']) ?>" class="btn_frmline">게시판 바로가기</a>
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $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 get_pretty_url($board['bo_table']); ?>" 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="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table'].'&amp;'.$qstr;?>" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
<?php } ?>
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
-4
View File
@@ -192,8 +192,6 @@ if ($w == '') {
// 게시판 테이블 생성
$file = file('./sql_write.sql');
$file = get_db_create_replace($file);
$sql = implode($file, "\n");
$create_table = $g5['write_prefix'] . $bo_table;
@@ -446,7 +444,5 @@ delete_cache_latest($bo_table);
if(function_exists('get_admin_captcha_by'))
get_admin_captcha_by('remove');
run_event('admin_board_form_update', $bo_table, $w);
goto_url("./board_form.php?w=u&bo_table={$bo_table}&amp;{$qstr}");
?>
+1 -1
View File
@@ -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 get_pretty_url($row['bo_table']) ?>"><?php echo $row['bo_table'] ?></a>
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
</td>
<td>
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
+1 -1
View File
@@ -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 get_pretty_url(G5_GROUP_DIR, $row['gr_id']); ?>"><?php echo $row['gr_id'] ?></a></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_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">
+1 -1
View File
@@ -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 get_pretty_url(G5_GROUP_DIR, $row['gr_id']); ?>"><?php echo $row['gr_id'] ?></a></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_category"><?php echo $row['gr_subject'] ?></td>
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
</tr>
+1 -1
View File
@@ -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('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
+1 -1
View File
@@ -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('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
-22
View File
@@ -253,24 +253,6 @@ 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(!isset($member['mb_memo_cnt'])) {
sql_query(" ALTER TABLE `{$g5['member_table']}`
ADD `mb_memo_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_call`", true);
}
// 스크랩 읽은 수 추가
if(!isset($member['mb_scrap_cnt'])) {
sql_query(" ALTER TABLE `{$g5['member_table']}`
ADD `mb_scrap_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_cnt`", true);
}
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
@@ -282,7 +264,6 @@ $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>
@@ -900,9 +881,6 @@ 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>
-9
View File
@@ -69,7 +69,6 @@ $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']}',
@@ -188,13 +187,5 @@ sql_query($sql);
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
if( isset($_POST['cf_bbs_rewrite']) ){
g5_delete_all_cache();
}
run_event('admin_config_form_update');
update_rewrite_rules();
goto_url('./config_form.php', false);
?>
+1 -1
View File
@@ -78,7 +78,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 get_pretty_url('content', $co_id); ?>" class="btn_frmline">내용확인</a><?php } ?>
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" class="btn_frmline">내용확인</a><?php } ?>
</td>
</tr>
<tr>
-5
View File
@@ -71,8 +71,6 @@ if( $co_include_tail && ! is_include_path_check($co_include_tail, 1) ){
$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',
@@ -80,7 +78,6 @@ $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' ";
@@ -114,8 +111,6 @@ 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
View File
@@ -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&amp;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 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="<?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="./contentformupdate.php?w=d&amp;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>
+1 -14
View File
@@ -27,7 +27,6 @@ a:link, a:visited {color:#000;text-decoration:none}
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
#wrapper {min-height:480px}
/* 레이아웃 */
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
@@ -516,20 +515,8 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
/* 환경설정 */
.cf_cert_hide {display:none}
.server_config_views {margin-bottom:10px}
.rules_label {margin-left:5px;vertical-align:middle}
.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%;min-height:260px}
.is_rewrite .copy_title{margin-top:15px;margin-bottom:10px;font-weight:bold;text-align:left}
.is_rewrite .info-success{color:#155724}
.is_rewrite .info-warning{color:#856404}
/* 관리권한설정 */
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
#add_admin fieldset {margin-top:20px}
/* 메일 테스트 */
-75
View File
@@ -74,81 +74,6 @@ 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(200) 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(200) 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);
}
}
// 메모 테이블
$sql = " SHOW COLUMNS FROM `{$g5['memo_table']}` LIKE 'me_send_id' ";
$row = sql_fetch($sql);
if( !$row ){
sql_query("ALTER TABLE `{$g5['memo_table']}`
ADD `me_send_id` INT(11) NOT NULL DEFAULT '0',
ADD `me_type` ENUM('send','recv') NOT NULL DEFAULT 'recv',
ADD `me_send_ip` VARCHAR(100) NOT NULL DEFAULT '',
CHANGE COLUMN `me_id` `me_id` INT(11) NOT NULL AUTO_INCREMENT;
", false);
$is_check = true;
}
// 읽지 않은 메모 수 칼럼
if(!isset($member['mb_memo_cnt'])) {
sql_query(" ALTER TABLE `{$g5['member_table']}`
ADD `mb_memo_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_call`", true);
$is_check = true;
}
$is_check = run_replace('admin_dbupgrade', $is_check);
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
?>
+3 -3
View File
@@ -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 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_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'] ?>&amp;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_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="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&amp;wr_id='.$row['po_rel_id'].'" target="_blank">';
$link2 = '</a>';
}
?>
+4 -4
View File
@@ -240,9 +240,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
<input type="file" name="mb_icon" id="mb_icon">
<?php
$mb_dir = substr($mb['mb_id'],0,2);
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
if (file_exists($icon_file)) {
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
$icon_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
echo '<img src="'.$icon_url.'" alt="">';
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
}
@@ -256,9 +256,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
<input type="file" name="mb_img" id="mb_img">
<?php
$mb_dir = substr($mb['mb_id'],0,2);
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
if (file_exists($icon_file)) {
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
$icon_url = G5_DATA_URL.'/member_image/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
echo '<img src="'.$icon_url.'" alt="">';
echo '<input type="checkbox" id="del_mb_img" name="del_mb_img" value="1">삭제';
}
+2 -4
View File
@@ -143,13 +143,13 @@ else
if( $w == '' || $w == 'u' ){
$mb_dir = substr($mb_id,0,2);
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
// 회원 아이콘 삭제
if ($del_mb_icon)
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_icon_img);
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
$image_regex = "/(\.(gif|jpe?g|png))$/i";
$mb_icon_img = $mb_id.'.gif';
// 아이콘 업로드
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
@@ -236,7 +236,5 @@ if( $w == '' || $w == 'u' ){
}
}
run_event('admin_member_form_update', $w, $mb_id);
goto_url('./member_form.php?'.$qstr.'&amp;w=u&amp;mb_id='.$mb_id, false);
?>
+2 -6
View File
@@ -12,8 +12,6 @@ auth_check($auth[$sub_menu], 'w');
check_admin_token();
$mb_datas = array();
if ($_POST['act_button'] == "선택수정") {
for ($i=0; $i<count($_POST['chk']); $i++)
@@ -21,7 +19,7 @@ if ($_POST['act_button'] == "선택수정") {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
$mb = get_member($_POST['mb_id'][$k]);
if (!$mb['mb_id']) {
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
@@ -55,7 +53,7 @@ if ($_POST['act_button'] == "선택수정") {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
$mb = get_member($_POST['mb_id'][$k]);
if (!$mb['mb_id']) {
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
@@ -76,7 +74,5 @@ if ($msg)
//echo '<script> alert("'.$msg.'"); </script>';
alert($msg);
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
goto_url('./member_list.php?'.$qstr);
?>
+3 -3
View File
@@ -52,13 +52,13 @@ if($sql) {
<?php }
switch($type) {
case 'group':
$link = get_pretty_url(G5_GROUP_DIR, $row['id']);
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
break;
case 'board':
$link = get_pretty_url($row['id']);
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
break;
case 'content':
$link = get_pretty_url(G5_CONTENT_DIR, $row['id']);
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
break;
default:
$link = '';
+1 -1
View File
@@ -131,7 +131,7 @@ else
$link1 = $link2 = '';
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&amp;wr_id='.$row['po_rel_id'].'" target="_blank">';
$link2 = '</a>';
}
-2
View File
@@ -10,7 +10,6 @@ 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',
@@ -40,7 +39,6 @@ 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;
+10 -10
View File
@@ -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(get_pretty_url($bo_table, $write['wr_parent'], '#c_'.$wr_id));
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$write['wr_parent'].'#c_'.$wr_id);
}
if (!$bo_table) {
@@ -19,18 +19,18 @@ if (!$bo_table) {
$g5['board_title'] = ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo_mobile_subject'] : $board['bo_subject']);
// wr_id 값이 있으면 글읽기
if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
if (isset($wr_id) && $wr_id) {
// 글이 없을 경우 해당 게시판 목록으로 이동
if (!$write['wr_id']) {
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
alert($msg, get_pretty_url($bo_table));
alert($msg, './board.php?bo_table='.$bo_table);
}
// 그룹접근 사용
if (isset($group['gr_use_access']) && $group['gr_use_access']) {
if ($is_guest) {
$msg = "비회원은 이 게시판에 접근할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.";
alert($msg, G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
}
// 그룹관리자 이상이라면 통과
@@ -51,14 +51,14 @@ if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
if ($is_member)
alert('글을 읽을 권한이 없습니다.', G5_URL);
else
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
}
// 본인확인을 사용한다면
if ($config['cf_cert_use'] && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '' && $is_guest) {
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr));
}
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
@@ -108,7 +108,7 @@ if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
// 이 게시물이 저장된 게시물이 아니면서 관리자가 아니라면
//if ("$bo_table|$write['wr_num']" != get_session("ss_secret"))
if (!get_session($ss_name))
goto_url(G5_BBS_URL.'/password.php?w=s&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
goto_url('./password.php?w=s&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
}
set_session($ss_name, TRUE);
@@ -144,14 +144,14 @@ if ((isset($wr_id) && $wr_id) || (isset($wr_seo_title) && $wr_seo_title)) {
if ($member['mb_id'])
alert('목록을 볼 권한이 없습니다.', G5_URL);
else
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.($qstr?'&amp;':'')));
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.($qstr?'&amp;':'')));
}
// 본인확인을 사용한다면
if ($config['cf_cert_use'] && !$is_admin) {
// 인증된 회원만 가능
if ($board['bo_use_cert'] != '' && $is_guest) {
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id, $qstr)));
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$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 ($write && array_key_exists('wr_ip', $write)) {
if (array_key_exists('wr_ip', $write)) {
$ip = $write['wr_ip'];
}
} else {
+3 -12
View File
@@ -8,23 +8,14 @@ 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', generate_seo_title($co_seo_title));
$co_id = $co['co_id'];
} else {
$co = get_content_db($co_id);
}
if( ! (isset($co['co_seo_title']) && $co['co_seo_title']) && $co['co_id'] ){
seo_title_update($g5['content_table'], $co['co_id'], 'content');
}
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 -4
View File
@@ -30,7 +30,7 @@ else if ($is_admin == 'group') { // 그룹관리자
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
} else {
if ($write['mb_id'])
alert('로그인 후 삭제하세요.', G5_BBS_URL.'/login.php?url='.urlencode(get_pretty_url($bo_table, $wr_id)));
alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
else if (!check_password($wr_password, $write['wr_password']))
alert('비밀번호가 틀리므로 삭제할 수 없습니다.');
}
@@ -134,7 +134,5 @@ if ($count_write > 0 || $count_comment > 0)
delete_cache_latest($bo_table);
run_event('bbs_delete', $write, $board);
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr));
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
?>
+1 -3
View File
@@ -156,7 +156,5 @@ if ($count_write > 0 || $count_comment > 0)
delete_cache_latest($bo_table);
run_event('bbs_delete_all', $tmp_array, $board);
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr));
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
?>
-2
View File
@@ -86,7 +86,5 @@ sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}'
delete_cache_latest($bo_table);
run_event('bbs_delete_comment', $comment_id, $board);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$write['wr_parent'].'&amp;page='.$page. $qstr);
?>
+2 -2
View File
@@ -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.'&amp;'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id)));
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&amp;'.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$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);
@@ -42,7 +42,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.'&amp;'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id)));
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?wr_id='.$wr_id.'&amp;'.$qstr.'&amp;url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
}
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file'];
-2
View File
@@ -8,8 +8,6 @@ if (!$config['cf_email_use'])
if (!$is_member && $config['cf_formmail_is_member'])
alert_close('회원만 이용하실 수 있습니다.');
$mb_id = isset($mb_id) ? get_search_string($mb_id) : '';
if ($is_member && !$member['mb_open'] && $is_admin != "super" && $member['mb_id'] != $mb_id)
alert_close('자신의 정보를 공개하지 않으면 다른분에게 메일을 보낼 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다.');
+2 -2
View File
@@ -90,7 +90,7 @@ if($_POST['js'] == "on") {
if (!$is_member)
{
$href = './login.php?'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id));
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
alert('회원만 가능합니다.', $href);
}
@@ -144,7 +144,7 @@ if($_POST['js'] == "on") {
else
$status = '비추천';
$href = get_pretty_url($bo_table, $wr_id);
$href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
alert("이 글을 $status 하셨습니다.", '', false);
}
+8 -10
View File
@@ -6,7 +6,7 @@ $is_category = false;
$category_option = '';
if ($board['bo_use_category']) {
$is_category = true;
$category_href = get_pretty_url($bo_table);
$category_href = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
$category_option .= '<li><a href="'.$category_href.'"';
if ($sca=='')
@@ -17,7 +17,7 @@ if ($board['bo_use_category']) {
for ($i=0; $i<count($categories); $i++) {
$category = trim($categories[$i]);
if ($category=='') continue;
$category_option .= '<li><a href="'.(get_pretty_url($bo_table,'','sca='.urlencode($category))).'"';
$category_option .= '<li><a href="'.($category_href."&amp;sca=".urlencode($category)).'"';
$category_msg = '';
if ($category==$sca) { // 현재 선택된 카테고리라면
$category_option .= ' id="bo_cate_on"';
@@ -200,15 +200,13 @@ if($page_rows > 0) {
}
}
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.'&amp;page='));
$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.'&amp;page=');
$list_href = '';
$prev_part_href = '';
$next_part_href = '';
if ($is_search_bbs) {
$list_href = get_pretty_url($bo_table);
$list_href = './board.php?bo_table='.$bo_table;
$patterns = array('#&amp;page=[0-9]*#', '#&amp;spt=[0-9\-]*#');
@@ -216,14 +214,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 = get_pretty_url($bo_table,0,$qstr1.'&amp;spt='.$prev_spt.'&amp;page=1');
$prev_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&amp;spt='.$prev_spt.'&amp;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 = get_pretty_url($bo_table,0,$qstr1.'&amp;spt='.$next_spt.'&amp;page=1');
$next_part_href = './board.php?bo_table='.$bo_table.$qstr1.'&amp;spt='.$next_spt.'&amp;page=1';
$write_pages = page_insertafter($write_pages, '<a href="'.$next_part_href.'" class="pg_page pg_end">다음검색</a>');
}
}
@@ -231,7 +229,7 @@ if ($is_search_bbs) {
$write_href = '';
if ($member['mb_level'] >= $board['bo_write_level']) {
$write_href = short_url_clean(G5_BBS_URL.'/write.php?bo_table='.$bo_table);
$write_href = './write.php?bo_table='.$bo_table;
}
$nobr_begin = $nobr_end = "";
@@ -243,7 +241,7 @@ if (preg_match("/gecko|firefox/i", $_SERVER['HTTP_USER_AGENT'])) {
// RSS 보기 사용에 체크가 되어 있어야 RSS 보기 가능 061106
$rss_href = '';
if ($board['bo_use_rss_view']) {
$rss_href = G5_BBS_URL.'/rss.php?bo_table='.$bo_table;
$rss_href = './rss.php?bo_table='.$bo_table;
}
$stx = get_text(stripslashes($stx));
-2
View File
@@ -31,7 +31,5 @@ if (!file_exists($login_file))
include_once($member_skin_path.'/login.skin.php');
run_event('member_login_tail', $login_url, $login_action_url, $member_skin_path, $url);
include_once('./_tail.sub.php');
?>
+1 -6
View File
@@ -29,10 +29,7 @@ if(function_exists('social_is_login_check')){
// 가입된 회원이 아니다. 비밀번호가 틀리다. 라는 메세지를 따로 보여주지 않는 이유는
// 회원아이디를 입력해 보고 맞으면 또 비밀번호를 입력해보는 경우를 방지하기 위해서입니다.
// 불법사용자의 경우 회원아이디가 틀린지, 비밀번호가 틀린지를 알기까지는 많은 시간이 소요되기 때문입니다.
if (!$is_social_password_check && (!$mb['mb_id'] || !login_password_check($mb, $mb_password, $mb['mb_password'])) ) {
run_event('password_is_wrong', 'login', $mb);
if (!$is_social_password_check && (!$mb['mb_id'] || !check_password($mb_password, $mb['mb_password'])) ) {
alert('가입된 회원아이디가 아니거나 비밀번호가 틀립니다.\\n비밀번호는 대소문자를 구분합니다.');
}
@@ -121,7 +118,5 @@ if(function_exists('social_login_success_after')){
social_login_session_clear(1);
}
run_event('member_login_check', $mb, $link);
goto_url($link);
?>
+1 -3
View File
@@ -29,12 +29,10 @@ if ($url) {
$link = $url;
} else if ($bo_table) {
$link = get_pretty_url($bo_table);
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table;
} else {
$link = G5_URL;
}
run_event('member_logout', $link);
goto_url($link);
?>
+3 -8
View File
@@ -18,15 +18,12 @@ else if ($kind == 'send')
else
alert(''.$kind .'값을 넘겨주세요.');
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
run_event('memo_list', $kind, $unkind, $page);
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_{$kind}_mb_id = '{$member['mb_id']}' and me_type = '$kind' ";
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_{$kind}_mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$total_page = ceil($total_count / $config['cf_page_rows']); // 전체 페이지 계산
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ((int) $page - 1) * $config['cf_page_rows']; // 시작 열을 구함
if ($kind == 'recv')
@@ -47,9 +44,8 @@ $list = array();
$sql = " select a.*, b.mb_id, b.mb_nick, b.mb_email, b.mb_homepage
from {$g5['memo_table']} a
left join {$g5['member_table']} b on (a.me_{$unkind}_mb_id = b.mb_id)
where a.me_{$kind}_mb_id = '{$member['mb_id']}' and a.me_type = '$kind'
where a.me_{$kind}_mb_id = '{$member['mb_id']}'
order by a.me_id desc limit $from_record, {$config['cf_page_rows']} ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
@@ -71,7 +67,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$send_datetime = substr($row['me_send_datetime'],2,14);
$list[$i]['mb_id'] = $mb_id;
$list[$i]['name'] = $name;
$list[$i]['send_datetime'] = $send_datetime;
$list[$i]['read_datetime'] = $read_datetime;
+4 -9
View File
@@ -15,11 +15,6 @@ $me_id = (int)$_REQUEST['me_id'];
$sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
$row = sql_fetch($sql);
$sql = " delete from {$g5['memo_table']}
where me_id = '{$me_id}'
and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ";
sql_query($sql);
if (!$row['me_read_datetime'][0]) // 메모 받기전이면
{
$sql = " update {$g5['member_table']}
@@ -27,12 +22,12 @@ if (!$row['me_read_datetime'][0]) // 메모 받기전이면
where mb_id = '{$row['me_recv_mb_id']}'
and mb_memo_call = '{$row['me_send_mb_id']}' ";
sql_query($sql);
$sql = " update `{$g5['member_table']}` set mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
}
run_event('memo_delete', $me_id, $row);
$sql = " delete from {$g5['memo_table']}
where me_id = '{$me_id}'
and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ";
sql_query($sql);
goto_url('./memo.php?kind='.$kind);
?>
+6 -34
View File
@@ -13,10 +13,7 @@ $recv_list = explode(',', trim($_POST['me_recv_mb_id']));
$str_nick_list = '';
$msg = '';
$error_list = array();
$member_list = array('id'=>array(), 'nick'=>array());
run_event('memo_form_update_before', $recv_list);
$member_list = array();
for ($i=0; $i<count($recv_list); $i++) {
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$recv_list[$i]}' ");
if ($row) {
@@ -44,10 +41,6 @@ $error_msg = implode(",", $error_list);
if ($error_msg && !$is_admin)
alert("회원아이디 '{$error_msg}' 은(는) 존재(또는 정보공개)하지 않는 회원아이디 이거나 탈퇴, 접근차단된 회원아이디 입니다.\\n쪽지를 발송하지 않았습니다.");
if (! count($member_list['id'])){
alert('해당 회원이 존재하지 않습니다.');
}
if (!$is_admin) {
if (count($member_list['id'])) {
$point = (int)$config['cf_memo_send_point'] * count($member_list['id']);
@@ -66,21 +59,12 @@ for ($i=0; $i<count($member_list['id']); $i++) {
$recv_mb_id = $member_list['id'][$i];
$recv_mb_nick = get_text($member_list['nick'][$i]);
// 받는 회원 쪽지 INSERT
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_type, me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00' , 'recv', '{$_SERVER['REMOTE_ADDR']}' ) ";
// 쪽지 INSERT
$sql = " insert into {$g5['memo_table']} ( me_id, me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime ) values ( '$me_id', '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00' ) ";
sql_query($sql);
if( $me_id = sql_insert_id() ){
// 보내는 회원 쪽지 INSERT
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_send_id, me_type , me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00', '$me_id', 'send', '{$_SERVER['REMOTE_ADDR']}' ) ";
sql_query($sql);
}
// 실시간 쪽지 알림 기능
$sql = " update {$g5['member_table']} set mb_memo_call = '{$member['mb_id']}', mb_memo_cnt = '".get_memo_not_read($recv_mb_id)."' where mb_id = '$recv_mb_id' ";
$sql = " update {$g5['member_table']} set mb_memo_call = '{$member['mb_id']}' where mb_id = '$recv_mb_id' ";
sql_query($sql);
if (!$is_admin) {
@@ -89,21 +73,9 @@ for ($i=0; $i<count($member_list['id']); $i++) {
}
if ($member_list) {
$redirect_url = G5_HTTP_BBS_URL."/memo.php?kind=send";
$str_nick_list = implode(',', $member_list['nick']);
run_event('memo_form_update_after', $member_list, $str_nick_list, $redirect_url);
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", $redirect_url, false);
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", G5_HTTP_BBS_URL."/memo.php?kind=send", false);
} else {
$redirect_url = G5_HTTP_BBS_URL."/memo_form.php";
run_event('memo_form_update_failed', $member_list, $redirect_url);
exit;
alert("회원아이디 오류 같습니다.", $redirect_url, false);
alert("회원아이디 오류 같습니다.", G5_HTTP_BBS_URL."/memo_form.php", false);
}
?>
+18 -18
View File
@@ -13,13 +13,10 @@ if ($kind == 'recv')
$sql = " update {$g5['memo_table']}
set me_read_datetime = '".G5_TIME_YMDHIS."'
where (me_id = '$me_id' or me_send_id = '$me_id' )
where me_id = '$me_id'
and me_recv_mb_id = '{$member['mb_id']}'
and me_read_datetime = '0000-00-00 00:00:00' ";
sql_query($sql);
$sql = " update `{$g5['member_table']}` set mb_memo_cnt = '".get_memo_not_read($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
}
else if ($kind == 'send')
{
@@ -40,28 +37,31 @@ $sql = " select * from {$g5['memo_table']}
$memo = sql_fetch($sql);
// 이전 쪽지
$sql = " select me.*, a.rownum from `{$g5['memo_table']}` as me inner join ( select me_id , (@rownum:=@rownum+1) as rownum from `{$g5['memo_table']}` as memo, (select @rownum:=0) tmp where me_{$kind}_mb_id = '{$member['mb_id']}' and memo.me_type = '$kind' order by me_id desc ) as a on a.me_id = me.me_id where me.me_id < '$me_id' and me.me_{$kind}_mb_id = '{$member['mb_id']}' and me.me_type = '$kind' order by me.me_id desc limit 1 ";
$sql = " select * from {$g5['memo_table']}
where me_id > '{$me_id}'
and me_{$kind}_mb_id = '{$member['mb_id']}'
order by me_id asc
limit 1 ";
$prev = sql_fetch($sql);
if ($prev['me_id']) {
if ($prev['me_id'])
$prev_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$prev['me_id'];
$prev['page'] = ceil( (int)$prev['rownum'] / $config['cf_page_rows']); // 이동할 페이지 계산
if( (int)$prev['page'] > 0 ) $prev_link .= "&amp;page=".$prev['page'];
} else {
else
//$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
$prev_link = '';
}
// 다음 쪽지
$sql = " select me.*, a.rownum from `{$g5['memo_table']}` as me inner join ( select me_id , (@rownum:=@rownum+1) as rownum from `{$g5['memo_table']}` as memo, (select @rownum:=0) tmp where me_{$kind}_mb_id = '{$member['mb_id']}' and memo.me_type = '$kind' order by me_id asc ) as a on a.me_id = me.me_id where me.me_id > '$me_id' and me.me_{$kind}_mb_id = '{$member['mb_id']}' and me.me_type = '$kind' order by me.me_id asc limit 1 ";
$sql = " select * from {$g5['memo_table']}
where me_id < '{$me_id}'
and me_{$kind}_mb_id = '{$member['mb_id']}'
order by me_id desc
limit 1 ";
$next = sql_fetch($sql);
if ($next['me_id']) {
if ($next['me_id'])
$next_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$next['me_id'];
$next['page'] = ceil( (int)$next['rownum'] / $config['cf_page_rows']); // 이동할 페이지 계산
if( (int)$next['page'] > 0 ) $next_link .= "&amp;page=".$next['page'];
} else {
else
//$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
$next_link = '';
}
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
-1
View File
@@ -156,6 +156,5 @@ function fboardmoveall_submit(f)
</script>
<?php
run_event('move_html_footer');
include_once(G5_PATH.'/tail.sub.php');
?>
+1 -3
View File
@@ -215,11 +215,9 @@ if ($sw == 'move')
}
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
$opener_href = get_pretty_url($bo_table,'','&amp;page='.$page.'&amp;'.$qstr);
$opener_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.'&amp;'.$qstr;
$opener_href1 = str_replace('&amp;', '&', $opener_href);
run_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
echo <<<HEREDOC
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script>
+2 -2
View File
@@ -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'] = get_pretty_url($row['bo_table'], $row2['wr_id'], $comment_link);
$list[$i]['href'] = './board.php?bo_table='.$row['bo_table'].'&amp;wr_id='.$row2['wr_id'].$comment_link;
$list[$i]['datetime'] = $datetime;
$list[$i]['datetime2'] = $datetime2;
@@ -113,4 +113,4 @@ $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['c
include_once($new_skin_path.'/new.skin.php');
include_once('./_tail.php');
?>
?>
-2
View File
@@ -143,7 +143,5 @@ foreach ($save_bo_table as $key=>$value) {
delete_cache_latest($value);
}
run_event('bbs_new_delete', $chk_bn_id, $save_bo_table);
goto_url("new.php?sfl=$sfl&stx=$stx&page=$page");
?>
+7 -7
View File
@@ -6,35 +6,35 @@ $g5['title'] = '비밀번호 입력';
switch ($w) {
case 'u' :
$action = G5_HTTP_BBS_URL.'/write.php';
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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 = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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 = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_parent']);
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['wr_parent'];
break;
case 's' :
// 비밀번호 창에서 로그인 하는 경우 관리자 또는 자신의 글이면 바로 글보기로 감
if ($is_admin || ($member['mb_id'] == $write['mb_id'] && $write['mb_id']))
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
else {
$action = https_url(G5_BBS_DIR).'/password_check.php';
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table);
$return_url = 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(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
else {
$action = https_url(G5_BBS_DIR).'/password_check.php';
$return_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$return_url = G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
}
break;
default :
+3 -19
View File
@@ -6,16 +6,8 @@ if ($w == 's') {
$wr = get_write($write_table, $wr_id);
if( !$wr['wr_password'] && $wr['mb_id'] ){
if ( $mb = get_member($wr['mb_id']) ){
$wr['wr_password'] = $mb['mb_password'];
}
}
if (!check_password($wr_password, $wr['wr_password'])) {
run_event('password_is_wrong', 'bbs', $wr, $qstr);
if (!check_password($wr_password, $wr['wr_password']))
alert('비밀번호가 틀립니다.');
}
// 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임.
//$ss_name = 'ss_secret.'_'.$bo_table.'_'.$wr_id';
@@ -28,16 +20,8 @@ if ($w == 's') {
$wr = get_write($write_table, $wr_id);
if( !$wr['wr_password'] && $wr['mb_id'] ){
if ( $mb = get_member($wr['mb_id']) ){
$wr['wr_password'] = $mb['mb_password'];
}
}
if (!check_password($wr_password, $wr['wr_password'])){
run_event('password_is_wrong', 'bbs', $wr, $qstr);
if (!check_password($wr_password, $wr['wr_password']))
alert('비밀번호가 틀립니다.');
}
// 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임.
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$wr['wr_id'];
@@ -47,5 +31,5 @@ if ($w == 's') {
} else
alert('w 값이 제대로 넘어오지 않았습니다.');
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?'.$qstr));
goto_url(G5_HTTP_BBS_URL.'/board.php?'.$qstr);
?>
-3
View File
@@ -7,10 +7,7 @@ if (!$member['mb_id'])
if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id)
alert_close('자신의 정보를 공개하지 않으면 다른분의 정보를 조회할 수 없습니다.\\n\\n정보공개 설정은 회원정보수정에서 하실 수 있습니다.');
$mb_id = isset($mb_id) ? $mb_id : '';
$mb = get_member($mb_id);
if (!$mb['mb_id'])
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
-2
View File
@@ -317,8 +317,6 @@ if($w == '' || $w == 'a' || $w == 'r') {
sql_query($sql);
}
run_event('qawrite_update', $qa_id, $write, $w, $qaconfig);
// SMS 알림
if($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
if($config['cf_sms_type'] == 'LMS') {
+8 -10
View File
@@ -76,14 +76,12 @@ if ($w == "") {
if ($_POST['mb_password']) {
// 수정된 정보를 업데이트후 되돌아 온것이라면 비밀번호가 암호화 된채로 넘어온것임
if ($_POST['is_update']) {
if ($_POST['is_update'])
$tmp_password = $_POST['mb_password'];
$pass_check = ($member['mb_password'] === $tmp_password);
} else {
$pass_check = check_password($_POST['mb_password'], $member['mb_password']);
}
else
$tmp_password = get_encrypt_string($_POST['mb_password']);
if (!$pass_check)
if ($member['mb_password'] != $tmp_password)
alert('비밀번호가 틀립니다.');
}
@@ -119,12 +117,12 @@ if ($w == "") {
include_once('./_head.php');
// 회원아이콘 경로
$mb_icon_path = G5_DATA_PATH.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_icon_url = G5_DATA_URL.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_icon_path = G5_DATA_PATH.'/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_icon_url = G5_DATA_URL.'/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
// 회원이미지 경로
$mb_img_path = G5_DATA_PATH.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_img_url = G5_DATA_URL.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_img_path = G5_DATA_PATH.'/member_image/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_img_url = G5_DATA_URL.'/member_image/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$register_action_url = G5_HTTPS_BBS_URL.'/register_form_update.php';
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400)));
+3 -21
View File
@@ -74,8 +74,6 @@ $mb_addr2 = clean_xss_tags($mb_addr2);
$mb_addr3 = clean_xss_tags($mb_addr3);
$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '';
run_event('register_form_update_before', $mb_id, $w);
if ($w == '' || $w == 'u') {
if ($msg = empty_mb_id($mb_id)) alert($msg, "", true, true); // alert($msg, $url, $error, $post);
@@ -148,8 +146,6 @@ if ($w == '' || $w == 'u') {
$old_email = $member['mb_email'];
}
run_event('register_form_update_valid', $w, $mb_id, $mb_nick, $mb_email);
if ($msg = exist_mb_nick($mb_nick, $mb_id)) alert($msg, "", true, true);
if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg, "", true, true);
}
@@ -269,13 +265,9 @@ if ($w == '') {
include_once ('./register_form_update_mail1.php');
$content = ob_get_contents();
ob_end_clean();
$content = run_replace('register_form_update_mail_mb_content', $content, $mb_id);
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
run_event('register_form_update_send_mb_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
// 메일인증을 사용하는 경우 가입메일에 인증 url이 있으므로 인증메일을 다시 발송되지 않도록 함
if($config['cf_use_email_certify'])
$old_email = $mb_email;
@@ -283,18 +275,14 @@ if ($w == '') {
// 최고관리자님께 메일 발송
if ($config['cf_email_mb_super_admin']) {
$subject = run_replace('register_form_update_mail_admin_subject', '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.', $mb_id, $mb_nick);
$subject = '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.';
ob_start();
include_once ('./register_form_update_mail2.php');
$content = ob_get_contents();
ob_end_clean();
$content = run_replace('register_form_update_mail_admin_content', $content, $mb_id);
mailer($mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content, 1);
run_event('register_form_update_send_admin_mail', $mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content);
}
// 메일인증 사용하지 않는 경우에만 로그인
@@ -368,7 +356,7 @@ $mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2);
// 아이콘 삭제
if (isset($_POST['del_mb_icon'])) {
@unlink($mb_dir.'/'.get_mb_icon_name($mb_id).'.gif');
@unlink($mb_dir.'/'.$mb_id.'.gif');
}
$msg = "";
@@ -376,7 +364,7 @@ $msg = "";
// 아이콘 업로드
$mb_icon = '';
$image_regex = "/(\.(gif|jpe?g|png))$/i";
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
$mb_icon_img = $mb_id.'.gif';
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
@@ -496,12 +484,8 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
include_once ('./register_form_update_mail3.php');
$content = ob_get_contents();
ob_end_clean();
$content = run_replace('register_form_update_mail_certify_content', $content, $mb_id);
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
run_event('register_form_update_send_certify_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
}
@@ -517,8 +501,6 @@ unset($_SESSION['ss_cert_adult']);
if ($msg)
echo '<script>alert(\''.$msg.'\');</script>';
run_event('register_form_update_after', $mb_id, $w);
if ($w == '') {
goto_url(G5_HTTP_BBS_URL.'/register_result.php');
} else if ($w == 'u') {
+4 -4
View File
@@ -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'].' &gt; '.$subj1.' &gt; '.$subj2); ?></title>
<link><?php echo specialchars_replace(get_pretty_url($bo_table)); ?></link>
<title><?php echo specialchars_replace($config['cf_title'].' &gt; '.$subj1.' &gt; '.$subj2) ?></title>
<link><?php echo specialchars_replace(G5_BBS_URL.'/board.php?bo_table='.$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(get_pretty_url($bo_table, $wr_id)); ?></link>
<title><?php echo specialchars_replace($row['wr_subject']) ?></title>
<link><?php echo specialchars_replace(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$row['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
View File
@@ -47,8 +47,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$row3['wr_subject'] = '[글 없음]';
$list[$i]['num'] = $num;
$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]['opener_href'] = './board.php?bo_table='.$row['bo_table'];
$list[$i]['opener_href_wr_id'] = './board.php?bo_table='.$row['bo_table'].'&amp;wr_id='.$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'].'&amp;page='.$page;
-3
View File
@@ -7,8 +7,5 @@ if (!$is_member)
$sql = " delete from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' and ms_id = '$ms_id' ";
sql_query($sql);
$sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
goto_url('./scrap.php?page='.$page);
?>
+2 -5
View File
@@ -4,7 +4,7 @@ include_once('./_common.php');
include_once(G5_PATH.'/head.sub.php');
if ($is_guest) {
$href = './login.php?'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id));
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
$href2 = str_replace('&amp;', '&', $href);
echo <<<HEREDOC
<script>
@@ -38,9 +38,6 @@ $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지금 스크랩을 확인하시겠습니까?'))
@@ -51,7 +48,7 @@ if ($row['cnt']) {
<noscript>
<p>이미 스크랩하신 글 입니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
<a href="{$back_url}">돌아가기</a>
<a href="./board.php?bo_table={$bo_table}&amp;wr_id=$wr_id">돌아가기</a>
</noscript>
HEREDOC;
exit;
+2 -5
View File
@@ -5,7 +5,7 @@ include_once(G5_PATH.'/head.sub.php');
if (!$is_member)
{
$href = './login.php?'.$qstr.'&amp;url='.urlencode(get_pretty_url($bo_table, $wr_id));
$href = './login.php?'.$qstr.'&amp;url='.urlencode('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id);
echo '<script> alert(\'회원만 접근 가능합니다.\'); top.location.href = \''.str_replace('&amp;', '&', $href).'\'; </script>';
exit;
}
@@ -31,7 +31,7 @@ if ($row['cnt'])
<noscript>
<p>이미 스크랩하신 글 입니다.</p>
<a href="./scrap.php">스크랩 확인하기</a>
<a href="'.get_pretty_url($bo_table, $wr_id).'">돌아가기</a>
<a href="./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'">돌아가기</a>
</noscript>';
exit;
}
@@ -101,9 +101,6 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
$sql = " insert into {$g5['scrap_table']} ( mb_id, bo_table, wr_id, ms_datetime ) values ( '{$member['mb_id']}', '$bo_table', '$wr_id', '".G5_TIME_YMDHIS."' ) ";
sql_query($sql);
$sql = " update `{$g5['member_table']}` set mb_scrap_cnt = '".get_scrap_totals($member['mb_id'])."' where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
delete_cache_latest($bo_table);
echo <<<HEREDOC
+1 -1
View File
@@ -172,7 +172,7 @@ if ($stx) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 검색어까지 링크되면 게시판 부하가 일어남
$list[$idx][$i] = $row;
$list[$idx][$i]['href'] = get_pretty_url($search_table[$idx], $row['wr_parent']);
$list[$idx][$i]['href'] = './board.php?bo_table='.$search_table[$idx].'&amp;wr_id='.$row['wr_parent'];
if ($row['wr_is_comment'])
{
+18 -20
View File
@@ -13,11 +13,11 @@ $sql_search = "";
if ($sca || $stx || $stx === '0') {
// where 문을 얻음
$sql_search = get_sql_search($sca, $sfl, $stx, $sop);
$search_href = get_pretty_url($bo_table,'','&amp;page='.$page.$qstr);
$list_href = get_pretty_url($bo_table);
$search_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr;
$list_href = './board.php?bo_table='.$bo_table;
} else {
$search_href = '';
$list_href = get_pretty_url($bo_table,'',$qstr);
$list_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page;
}
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 = get_pretty_url($bo_table, $prev['wr_id'], $qstr);
$prev_href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$prev['wr_id'].$qstr;
$prev_wr_date = $prev['wr_datetime'];
}
@@ -55,40 +55,38 @@ 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 = get_pretty_url($bo_table, $next['wr_id'], $qstr);
$next_href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$next['wr_id'].$qstr;
$next_wr_date = $next['wr_datetime'];
}
// 쓰기 링크
$write_href = '';
if ($member['mb_level'] >= $board['bo_write_level']) {
$write_href = short_url_clean(G5_BBS_URL.'/write.php?bo_table='.$bo_table);
}
if ($member['mb_level'] >= $board['bo_write_level'])
$write_href = './write.php?bo_table='.$bo_table;
// 답변 링크
$reply_href = '';
if ($member['mb_level'] >= $board['bo_reply_level']) {
$reply_href = short_url_clean(G5_BBS_URL.'/write.php?w=r&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
}
if ($member['mb_level'] >= $board['bo_reply_level'])
$reply_href = './write.php?w=r&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr;
// 수정, 삭제 링크
$update_href = $delete_href = '';
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] === $write['mb_id'])) || $is_admin) {
$update_href = short_url_clean(G5_BBS_URL.'/write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
$update_href = './write.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
set_session('ss_delete_token', $token = uniqid(time()));
$delete_href = G5_BBS_URL.'/delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
$delete_href ='./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
}
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
$update_href = G5_BBS_URL.'/password.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$delete_href = G5_BBS_URL.'/password.php?w=d&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$update_href = './password.php?w=u&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$delete_href = './password.php?w=d&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
}
// 최고, 그룹관리자라면 글 복사, 이동 가능
$copy_href = $move_href = '';
if ($write['wr_reply'] == '' && ($is_admin == 'super' || $is_admin == 'group')) {
$copy_href = G5_BBS_URL.'/move.php?sw=copy&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$move_href = G5_BBS_URL.'/move.php?sw=move&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$copy_href = './move.php?sw=copy&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
$move_href = './move.php?sw=move&amp;bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr;
}
$scrap_href = '';
@@ -96,15 +94,15 @@ $good_href = '';
$nogood_href = '';
if ($is_member) {
// 스크랩 링크
$scrap_href = G5_BBS_URL.'/scrap_popin.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
$scrap_href = './scrap_popin.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
// 추천 링크
if ($board['bo_use_good'])
$good_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=good';
$good_href = './good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=good';
// 비추천 링크
if ($board['bo_use_nogood'])
$nogood_href = G5_BBS_URL.'/good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=nogood';
$nogood_href = './good.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;good=nogood';
}
$view = get_view($write, $board, $board_skin_path);
+3 -3
View File
@@ -48,7 +48,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$list[$i]['wr_id'];
if(!get_session($ss_name))
$list[$i]['content'] = '<a href="'.G5_BBS_URL.'/password.php?w=sc&amp;bo_table='.$bo_table.'&amp;wr_id='.$list[$i]['wr_id'].$qstr.'" class="s_cmt">댓글내용 확인</a>';
$list[$i]['content'] = '<a href="./password.php?w=sc&amp;bo_table='.$bo_table.'&amp;wr_id='.$list[$i]['wr_id'].$qstr.'" class="s_cmt">댓글내용 확인</a>';
else {
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
@@ -74,7 +74,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
if ($row['mb_id'] === $member['mb_id'] || $is_admin)
{
set_session('ss_delete_comment_'.$row['wr_id'].'_token', $token = uniqid(time()));
$list[$i]['del_link'] = G5_BBS_URL.'/delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
$list[$i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
$list[$i]['is_edit'] = true;
$list[$i]['is_del'] = true;
}
@@ -82,7 +82,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
else
{
if (!$row['mb_id']) {
$list[$i]['del_link'] = G5_BBS_URL.'/password.php?w=x&amp;bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;page='.$page.$qstr;
$list[$i]['del_link'] = './password.php?w=x&amp;bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;page='.$page.$qstr;
$list[$i]['is_del'] = true;
}
}
+1 -4
View File
@@ -31,8 +31,6 @@ if ($w == 'u' || $w == 'r') {
}
}
run_event('bbs_write', $board, $wr_id, $w);
if ($w == '') {
if ($wr_id) {
alert('글쓰기에는 \$wr_id 값을 사용하지 않습니다.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
@@ -312,8 +310,7 @@ if ($w == '') {
if (!$is_admin) {
if (!($is_member && $member['mb_id'] === $write['mb_id'])) {
if (!check_password($wr_password, $write['wr_password'])) {
$is_wrong = run_replace('invalid_password', false, 'write', $write);
if(!$is_wrong) alert('비밀번호가 틀립니다.');
alert('비밀번호가 틀립니다.');
}
}
}
+4 -10
View File
@@ -54,20 +54,18 @@ if (empty($wr['wr_id']))
// 이 옵션을 사용 안 함으로 설정할 경우 어떤 스크립트도 실행 되지 않습니다.
//if (!trim($_POST["wr_content"])) die ("내용을 입력하여 주십시오.");
$post_wr_password = '';
if ($is_member)
{
$mb_id = $member['mb_id'];
// 4.00.13 - 실명 사용일때 댓글에 닉네임으로 입력되던 오류를 수정
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_password = '';
$wr_password = $member['mb_password'];
$wr_email = addslashes($member['mb_email']);
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
}
else
{
$mb_id = '';
$post_wr_password = $wr_password;
$wr_password = get_encrypt_string($wr_password);
}
@@ -207,7 +205,7 @@ if ($w == 'c') // 댓글 입력
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
// 4.00.15 - 메일로 보내는 댓글의 바로가기 링크 수정
$link_url = get_pretty_url($bo_table, $wr_id, $qstr."#c_".$comment_id);
$link_url = G5_BBS_URL."/board.php?bo_table=".$bo_table."&amp;wr_id=".$wr_id."&amp;".$qstr."#c_".$comment_id;
include_once(G5_LIB_PATH.'/mailer.lib.php');
@@ -291,7 +289,7 @@ else if ($w == 'cu') // 댓글 수정
if ($member['mb_id'] !== $comment['mb_id'])
alert('자신의 글이 아니므로 수정할 수 없습니다.');
} else {
if( !($comment['mb_id'] === '' && $comment['wr_password'] && check_password($post_wr_password, $comment['wr_password'])) )
if($comment['wr_password'] != $wr_password)
alert('댓글을 수정할 권한이 없습니다.');
}
@@ -339,9 +337,5 @@ else if ($w == 'cu') // 댓글 수정
delete_cache_latest($bo_table);
$redirect_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;'.$qstr.'&amp;#c_'.$comment_id);
run_event('comment_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
goto_url($redirect_url);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;'.$qstr.'&amp;#c_'.$comment_id);
?>
+2 -2
View File
@@ -22,7 +22,7 @@ if ($_POST['facebook_checked']) {
if ($user) {
try {
$link = get_pretty_url($bo_table, $wr['wr_parent'], '&#c_'.$comment_id);
$link = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$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 = get_pretty_url($bo_table, $wr['wr_parent'], '&#c_'.$comment_id);
$comment_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&#c_'.$comment_id;
$post = googl_short_url($comment_url).' '.$wr_content;
$post = utf8_strcut($post, 140);
+7 -22
View File
@@ -127,8 +127,6 @@ for ($i=1; $i<=10; $i++) {
@include_once($board_skin_path.'/write_update.head.skin.php');
run_event('write_update_before', $board, $wr_id, $w, $qstr);
if ($w == '' || $w == 'u') {
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 공지는 관리자만 등록이 가능해야 함
@@ -213,14 +211,12 @@ 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']) {
$mb_id = $member['mb_id'];
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_password = '';
$wr_password = $member['mb_password'];
$wr_email = addslashes($member['mb_email']);
$wr_homepage = addslashes(clean_xss_tags($member['mb_homepage']));
} else {
@@ -255,7 +251,6 @@ 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,
@@ -309,10 +304,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('올바른 방법으로 수정하여 주십시오.', get_pretty_url($bo_table));
alert('올바른 방법으로 수정하여 주십시오.', G5_BBS_URL.'/board.php?bo_table='.$bo_table);
}
$return_url = get_pretty_url($bo_table, $wr_id);
$return_url = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id;
if ($is_admin == 'super') // 최고관리자 통과
;
@@ -377,7 +372,6 @@ 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}',
@@ -552,8 +546,6 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
// 올라간 파일의 퍼미션을 변경합니다.
chmod($dest_file, G5_FILE_PERMISSION);
$dest_file = run_replace('write_update_upload_file', $dest_file, $board, $wr_id, $w);
}
}
@@ -611,8 +603,6 @@ for ($i=0; $i<count($upload); $i++)
bf_type = '{$upload[$i]['image']['2']}',
bf_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
run_event('write_update_file_insert', $bo_table, $wr_id, $upload[$i], $w);
}
}
@@ -665,7 +655,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
$subject = '['.$config['cf_title'].'] '.$board['bo_subject'].' 게시판에 '.$str.'글이 올라왔습니다.';
$link_url = get_pretty_url($bo_table, $wr_id, $qstr);
$link_url = G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;'.$qstr;
include_once(G5_LIB_PATH.'/mailer.lib.php');
@@ -696,8 +686,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
// 중복된 메일 주소는 제거
$unique_email = array_unique($array_email);
$unique_email = run_replace('write_update_mail_list', array_values($unique_email), $board, $wr_id);
$unique_email = array_values($unique_email);
for ($i=0; $i<count($unique_email); $i++) {
mailer($wr_name, $wr_email, $unique_email[$i], $subject, $content, 1);
}
@@ -709,12 +698,8 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
delete_cache_latest($bo_table);
$redirect_url = run_replace('write_update_move_url', short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr), $board, $wr_id, $w, $qstr, $file_upload_msg);
run_event('write_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
if ($file_upload_msg)
alert($file_upload_msg, $redirect_url);
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
else
goto_url($redirect_url);
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
?>
+8 -27
View File
@@ -10,9 +10,6 @@ header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV
if (!defined('G5_SET_TIME_LIMIT')) define('G5_SET_TIME_LIMIT', 0);
@set_time_limit(G5_SET_TIME_LIMIT);
if( version_compare( PHP_VERSION, '5.2.17' , '<' ) ){
die(sprintf('PHP 5.2.17 or higher required. Your PHP version is %s', PHP_VERSION));
}
//==========================================================================================================================
// extract($_GET); 명령으로 인해 page.php?_POST[var1]=data1&_POST[var2]=data2 와 같은 코드가 _POST 변수로 사용되는 것을 막음
@@ -128,14 +125,6 @@ $board = array();
$group = array();
$g5 = array();
$qaconfig = 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.'/cache.lib.php'); // cache 함수 및 object cache class 모음
include_once(G5_LIB_PATH.'/uri.lib.php'); // URL 함수 파일
$g5_object = new G5_object_cache();
//==============================================================================
// 공통
@@ -151,7 +140,7 @@ if (file_exists($dbconfig_file)) {
// mysql connect resource $g5 배열에 저장 - 명랑폐인님 제안
$g5['connect_db'] = $connect_db;
sql_set_charset(G5_DB_CHARSET, $connect_db);
sql_set_charset('utf8', $connect_db);
if(defined('G5_MYSQL_SET_MODE') && G5_MYSQL_SET_MODE) sql_query("SET SESSION sql_mode = ''");
if (defined('G5_TIMEZONE')) sql_query(" set time_zone = '".G5_TIMEZONE."'");
} else {
@@ -225,7 +214,7 @@ ini_set("session.cookie_domain", G5_COOKIE_DOMAIN);
//------------------------------------------------------------------------------
// 기본환경설정
// 기본적으로 사용하는 필드만 얻은 후 상황에 따라 필드를 추가로 얻음
$config = get_config();
$config = sql_fetch(" select * from {$g5['config_table']} ");
define('G5_HTTP_BBS_URL', https_url(G5_BBS_DIR, false));
define('G5_HTTPS_BBS_URL', https_url(G5_BBS_DIR, true));
@@ -415,25 +404,19 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
$write = array();
$write_table = "";
if ($bo_table) {
$board = get_board_db($bo_table);
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$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; // 게시판 테이블 전체이름
if (isset($wr_id) && $wr_id) {
$write = get_write($write_table, $wr_id);
} else if (isset($wr_seo_title) && $wr_seo_title) {
$write = get_content_by_field($write_table, 'bbs', 'wr_seo_title', generate_seo_title($wr_seo_title));
if( isset($write['wr_id']) ){
$wr_id = $write['wr_id'];
}
}
//$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 ($gr_id) {
$group = get_group($gr_id);
$group = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
}
@@ -656,7 +639,5 @@ 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
run_event('common_header');
$html_process = new html_process();
?>
?>
+2 -21
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.4.0.1');
define('G5_GNUBOARD_VER', '5.3.3.2');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
@@ -29,16 +29,6 @@ if (PHP_VERSION >= '5.1.0') {
define('G5_DOMAIN', '');
define('G5_HTTPS_DOMAIN', '');
// 디버깅 상수, 실제 서버운영시 false 로 설정해 주제요.
define('G5_DEBUG', false);
// Set Databse table default engine is Databse default_storage_engine, If you want to use MyISAM or InnoDB, change to MyISAM or InnoDB.
define('G5_DB_ENGINE', '');
// Set Databse table default Charset
// utf8, utf8mb4 등 지정 가능 기본값은 utf8, 설치전에 utf8mb4 으로 수정시 모든 테이블에 이모지 입력이 가능합니다. utf8mb4 는 mysql 또는 mariadb 5.5 버전 이상을 요구합니다.
define('G5_DB_CHARSET', 'utf8');
/*
www.sir.kr 과 sir.kr 도메인은 서로 다른 도메인으로 인식합니다. 쿠키를 공유하려면 .sir.kr 과 같이 입력하세요.
이곳에 입력이 없다면 www 붙은 도메인과 그렇지 않은 도메인은 쿠키를 공유하지 않으므로 로그인이 풀릴 수 있습니다.
@@ -70,9 +60,6 @@ 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);
@@ -160,9 +147,6 @@ 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); // 파일 생성시 퍼미션
@@ -182,10 +166,7 @@ define('G5_SMTP_PORT', '25');
// 암호화 함수 지정
// 사이트 운영 중 설정을 변경하면 로그인이 안되는 등의 문제가 발생합니다.
// 5.4 버전 이전에는 sql_password 이 사용됨, 5.4 버전부터 기본이 create_hash 로 변경
//define('G5_STRING_ENCRYPT_FUNCTION', 'sql_password');
define('G5_STRING_ENCRYPT_FUNCTION', 'create_hash');
define('G5_MYSQL_PASSWORD_LENGTH', 41); // mysql password length 41, old_password 의 경우에는 16
define('G5_STRING_ENCRYPT_FUNCTION', 'sql_password');
// SQL 에러를 표시할 것인지 지정
// 에러를 표시하려면 TRUE 로 변경
+217 -218
View File
@@ -2,7 +2,7 @@
/* 초기화 */
html {overflow-y:scroll}
body {margin:0;padding:0;font-size:0.75em;font-family:'Malgun Gothic', dotum, sans-serif;background:#fff}
body {margin:0;padding:0;font-size:0.75em;font-family:'Malgun Gothic', dotum, sans-serif;background:#e7e7e7}
html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}
h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:'Malgun Gothic', dotum, sans-serif}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
@@ -11,7 +11,7 @@ ul, dl,dt,dd {margin:0;padding:0;list-style:none}
legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
label, input, button, select, img {vertical-align:middle;font-size:1em}
input, button {margin:0;padding:0;font-family:'Malgun Gothic', dotum, sans-serif;font-size:1em}
input[type="submit"] {cursor:pointer}
input[type="submit"]{cursor:pointer}
button {cursor:pointer}
textarea, select {font-family:'Malgun Gothic', dotum, sans-serif;font-size:1em}
@@ -22,184 +22,190 @@ pre {overflow-x:scroll;font-size:1.1em}
a {color:#000;text-decoration:none}
*, :after, :before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type=text],input[type=password], textarea {
-webkit-transition:all 0.30s ease-in-out;
-moz-transition:all 0.30s ease-in-out;
-ms-transition:all 0.30s ease-in-out;
-o-transition:all 0.30s ease-in-out;
outline:none;
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
}
input[type=text]:focus,input[type=password]:focus, textarea:focus,select:focus {
-webkit-box-shadow:0 0 5px #9ed4ff;
-moz-box-shadow:0 0 5px #9ed4ff;
box-shadow:0 0 5px #9ed4ff;
border:1px solid #558ab7 !important;
input[type=text]:focus,input[type=password]:focus, textarea:focus,select:focus {
-webkit-box-shadow: 0 0 5px #9ed4ff;
-moz-box-shadow: 0 0 5px #9ed4ff;
box-shadow: 0 0 5px #9ed4ff;
border: 1px solid #558ab7 !important;
}
.placeholdersjs {color:#aaa !important}
.placeholdersjs { color: #aaa !important; }
/* 레이아웃 크기 지정 */
#hd, #wrapper, #ft {min-width:1200px}
#hd, #wrapper, #ft{min-width:1200px}
#hd_pop,
#hd_wrapper,
#tnb .inner,
#tnb ul,
#gnb .gnb_wrap,
#container_wr,
#ft_wr {width:1200px}
#ft_wr{width:1200px}
/* 팝업레이어 */
#hd_pop {z-index:1000;position:relative;margin:0 auto;height:0}
#hd_pop h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff}
.hd_pops img {max-width:100%}
.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff;}
.hd_pops img{max-width:100%}
.hd_pops_con {}
.hd_pops_footer {padding:0;background:#000;color:#fff;text-align:left;position:relative}
.hd_pops_footer {padding: 0;background:#000;color:#fff;text-align:left;position:relative;}
.hd_pops_footer:after {display:block;visibility:hidden;clear:both;content:""}
.hd_pops_footer button {padding:10px;border:0;color:#fff}
.hd_pops_footer .hd_pops_reject {background:#000;text-align:left}
.hd_pops_footer .hd_pops_close {background:#393939;position:absolute;top:0;right:0}
.hd_pops_footer button {padding: 10px;border:0;color:#fff}
.hd_pops_footer .hd_pops_reject{background:#000;text-align:left}
.hd_pops_footer .hd_pops_close{background:#393939;position:absolute;top:0;right:0}
/* 상단 레이아웃 */
#hd {background:#212020}
#hd {border-top:2px solid #253dbe}
#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#tnb {border-bottom:1px solid #383838;margin:0 auto}
#tnb:after {display:block;visibility:hidden;clear:both;content:""}
#tnb .inner {margin:0 auto}
#hd_wrapper {position:relative;margin:0 auto;height:140px;zoom:1}
#hd_wrapper {position:relative;margin:0 auto;padding:10px 0;height:115px;zoom:1}
#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#logo {float:left;padding:30px 0 0}
.hd_sch_wr {float:left;padding:30px 0;;width:445px;margin-left:65px}
.hd_sch_wr{position:absolute;top:25px;left:50%;width:430px;margin-left:-215px;}
#hd_sch h3 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#hd_sch {border-radius:30px;overflow:hidden}
#hd_sch #sch_stx {float:left;width:385px;height:45px;padding-left:10px;border-radius:30px 0 0 30px;background:#2c2c2c;border:0;border-right:0;font-size:1.25em;color:#fff}
#hd_sch #sch_submit {float:left;width:60px;height:45px;border:0;background:#2c2c2c;color:#fff;border-radius:0 30px 30px 0;cursor:pointer;font-size:16px}
#hd_sch{border:2px solid #556ada;background:#fff;border-radius:5px;overflow:hidden}
#hd_sch #sch_stx {padding-left:10px;height:40px;width:376px;border:0;border-right:0;float:left;font-size:1.25em}
#hd_sch #sch_submit {height:40px;border:0;background:#fff;color:#253dbe;width:50px;float:left;cursor:pointer;font-size:18px}
#hd_qnb {float:right;text-align:right}
#sbn_side{position:absolute;top:20px;right:0}
#tnb {border-bottom:1px solid #ddd;background:#fff}
#tnb h3 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#tnb ul {margin:0 auto;zoom:1}
#tnb ul:after {display:block;visibility:hidden;clear:both;content:""}
#tnb li {float:right;border-left:1px solid #ddd;margin-bottom:-1px;font-size:0.92em}
#tnb a {display:inline-block;padding:0 10px;color:#646464;line-height:35px}
#tnb a:focus, #tnb a:hover {color:#253dbe;background:#fafafa}
#tnb .tnb_admin a{color:#ff0000;}
#tnb .tnb_left{float:left}
#tnb .tnb_left a{padding:0 14px}
#tnb .tnb_cart{border-right:1px solid #ddd;}
#tnb .tnb_community{border-right:1px solid #ddd}
#tnb .tnb_community i{font-size:15px}
#tnb .tnb_community{background:#e7e7e7;font-weight:bold;}
#tnb .tnb_community:focus, #tnb .tnb_community:hover {color:#333;border-bottom:0}
#tnb .tnb_community a{color:#253dbe;border-bottom:1px solid #e7e7e7}
#hd_qnb{float:right;margin-top:20px}
#hd_qnb:after {display:block;visibility:hidden;clear:both;content:""}
#hd_qnb li {float:left;font-size:1.083em;line-height:14px;border-right:1px solid #4a4a4a;position:relative;text-align:center;margin:15px 10px 15px 0;padding-right:10px}
#hd_qnb li:last-child {padding-right:0;margin-right:0;border-right:0}
#hd_qnb li{float:left;font-size:1.083em;line-height:15px;position:relative;text-align:center;margin:0 10px}
#hd_qnb li span {display:block;margin-top:5px;font-size:0.92em}
#hd_qnb li a {display:inline-block;color:#919191}
#hd_qnb .visit .visit-num {display:inline-block;line-height:16px;padding:0 5px;margin-left:5px;border-radius:10px;background:#da22f5;color:#fff;font-size:10px}
.hd_login {position:absolute;right:0;top:60px}
.hd_login li {float:left;margin:0 5px;border-left:1px solid #616161;padding-left:10px;line-height:13px}
.hd_login li:first-child {border-left:0}
.hd_login a {color:#fff}
#hd_qnb li a{display:block}
#hd_qnb li i{display:inline-block;width:40px;line-height:40px;border-radius:25px;background:#fff;text-align:center;margin:0;color:#fff}
#hd_qnb .visit .visit-num{display:inline-block;line-height:18px;padding:0 5px;border-radius:10px;background:#f04e00;color:#fff;font-size:10px;position:absolute;top:0;right:0}
#hd_qnb li .fa-question{background:#e83a5f;font-size:20px}
#hd_qnb li .fa-question:hover{background:#e41b45}
#hd_qnb li .fa-comments{background:#82c13f;font-size:16px}
#hd_qnb li .fa-comments:hover{background:#5aa708}
#hd_qnb li .fa-users{background:#f0ba00;font-size:15px}
#hd_qnb li .fa-users:hover{background:#f06f00}
#hd_qnb li .fa-history{background:#8522c4;font-size:15px}
#hd_qnb li .fa-history:hover{background:#6700a9}
/* 메인메뉴 */
#gnb {position:relative;background:#fff}
#gnb > h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#gnb .gnb_wrap {margin:0 auto;position:relative;z-index:10}
#gnb #gnb_1dul {font-size:1.083em;padding:0;border-bottom:1px solid #e0e2e5;zoom:1}
#gnb{position:relative}
#gnb h2{position:absolute;font-size:0;line-height:0;overflow:hidden}
#gnb .gnb_wrap{margin:0 auto;position:relative}
#gnb #gnb_1dul {font-size:1.083em;padding: 0;background:#253dbe;zoom:1;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.3);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.3);
box-shadow: 0 1px 3px rgba(0,0,0,0.3)}
#gnb ul:after {display:block;visibility:hidden;clear:both;content:""}
#gnb .gnb_1dli {float:left;line-height:55px;padding:0px;position:relative}
#gnb .gnb_1dli:hover > a {color:#3a8afd;
-webkit-transition:background-color 2s ease-out;
-moz-transition:background-color 0.3s ease-out;
-o-transition:background-color 0.3s ease-out;
transition:background-color 0.3s ease-out}
#gnb .gnb_1dli{float:left;line-height:50px;padding:0 15px;position:relative;}
#gnb .gnb_1dli:hover{background:#1a30a7;
-webkit-transition: background-color 2s ease-out;
-moz-transition: background-color 0.3s ease-out;
-o-transition: background-color 0.3s ease-out;
transition: background-color 0.3s ease-out;}
.gnb_1dli .bg {position:absolute;top:24px;right:8px;display:inline-block;width:10px;height:10px;overflow:hidden;background:url('./images/gnb_bg2.gif') no-repeat 50% 50%;text-indent:-999px}
.gnb_1da {display:block;font-weight:bold;padding:0 15px;color:#080808;text-decoration:none}
.gnb_1dli.gnb_al_li_plus .gnb_1da{padding-right:25px}
.gnb_2dli:first-child {border:0}
.gnb_2dul {display:none;position:absolute;top:54px;min-width:140px;padding-top:2px}
.gnb_2dul .gnb_2dul_box {border:1px solid #e0e2e5;border-top:0;padding:0;
-webkit-box-shadow:0px 1px 5px rgba(97, 97, 97, 0.2);
-moz-box-shadow:0px 1px 5px rgba(97, 97, 97, 0.2);
box-shadow:0px 1px 5px rgba(97, 97, 97, 0.2)}
.gnb_2da {display:block;padding:0 10px;line-height:40px;background:#fff;color:#080808;text-align:left;text-decoration:none}
a.gnb_2da:hover {color:#3a8afd;background:#f7f7f8;
-moz-transition:all 0.3s ease-out;
-o-transition:all 0.3s ease-out;
transition:all 0.3s ease-out}
.gnb_1dli .bg{display:inline-block;width:10px;height:10px;overflow:hidden;background:url(../img/gnb_bg2.gif) no-repeat 50% 50%;text-indent:-999px}
.gnb_1da {display:inline-block;font-weight:bold;color:#fff;text-decoration:none;}
.gnb_2dli{border-top:1px solid #253dbe}
.gnb_2dli:first-child{border:0}
.gnb_2dul {display:none;position:absolute;top:50px;min-width:140px;background:#1a30a7;padding: 0;
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.1);
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.1);
box-shadow: 0 1px 5px rgba(0,0,0,0.1);}
.gnb_2da {display:block;padding:0 10px;line-height:40px;color:#c3cbf7;text-align:left;text-decoration:none}
a.gnb_2da:hover{background:#0e2080;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;}
.gnb_1dli_air .gnb_2da {}
.gnb_1dli_on .gnb_2da {}
.gnb_2da:focus, .gnb_2da:hover {color:#fff}
.gnb_1dli_over .gnb_2dul {display:block;left:0}
.gnb_1dli_over2 .gnb_2dul {display:block;right:0}
.gnb_wrap .gnb_empty {padding:10px 0;width:100%;text-align:center;line-height:2.7em;color:#080808}
.gnb_wrap .gnb_empty a {color:#3a8afd;text-decoration:underline}
.gnb_wrap .gnb_al_ul .gnb_empty, .gnb_wrap .gnb_al_ul .gnb_empty a {color:#555}
.gnb_wrap .gnb_empty {padding:10px 0;width:100%;text-align:center;line-height:2em;color:#fff}
.gnb_wrap .gnb_empty a{color:#fff;text-decoration:underline}
.gnb_wrap .gnb_al_ul .gnb_empty, .gnb_wrap .gnb_al_ul .gnb_empty a{color:#555}
#gnb .gnb_menu_btn {background:#4158d1;color:#fff;width:50px;height:55px;border:0;vertical-align:top;font-size:18px}
#gnb .gnb_close_btn {background:#fff;color:#b6b9bb;width:50px;height:50px;border:0;vertical-align:top;font-size:18px;position:absolute;top:0;right:0}
#gnb .gnb_mnal {float:right;padding:0}
#gnb .gnb_menu_btn{background:#4158d1;color:#fff;width:50px;height:50px;border:0;vertical-align:top;font-size:18px}
#gnb .gnb_close_btn{background:#4158d1;color:#fff;width:50px;height:50px;border:0;vertical-align:top;font-size:18px;position:absolute;top:-50px;left:0}
#gnb .gnb_mnal{padding:0}
#gnb_all {display:none;position:absolute;border:1px solid #c5d6da;width:100%;background:#fff;z-index:1000;-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.2);
-moz-box-shadow:0 2px 5px rgba(0,0,0,0.2);
box-shadow:0 2px 5px rgba(0,0,0,0.2)}
#gnb_all h2 {font-size:1.3em;padding:15px 20px;border-bottom:1px solid #e7eeef}
#gnb_all{display:none;position:absolute;width:100%;z-index:99;}
#gnb_all .gnb_al_ul:after {display:block;visibility:hidden;clear:both;content:""}
#gnb_all .gnb_al_ul > li:nth-child(5n+1) {border-left:0}
#gnb_all .gnb_al_li {float:left;width:20%;min-height:150px;padding:20px;border-left:1px solid #e7eeef}
#gnb_all .gnb_al_li .gnb_al_a {font-size:1.2em;display:block;position:relative;margin-bottom:10px;font-weight:bold;color:#3a8afd}
#gnb_all .gnb_al_li li {line-height:2em}
#gnb_all .gnb_al_li li a {color:#555}
#gnb_all_bg {display:none;background:rgba(0,0,0,0.1);width:100%;height:100%;position:fixed;left:0;top:0;z-index:999}
#gnb_all .gnb_al_ul{background:#fff;border:1px solid #4158d1;padding:20px;
-webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.2);
-moz-box-shadow: 0 2px 5px rgba(0,0,0,0.2);
box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
#gnb_all .gnb_al_li{background:#fff;float:left;min-width:20%;padding:5px }
#gnb_all .gnb_al_li .gnb_al_a{font-size:1.083em;padding:10px;display:block;position:relative;margin-bottom:10px;background: #eff1f9;border-bottom: 1px solid #dee2f1;font-weight: bold;color:#243071}
#gnb_all .gnb_al_li li {padding-left:10px;line-height:2em}
#gnb_all .gnb_al_li li i{color:#9ca6cc}
#gnb_all .gnb_al_li li a{color:#555}
/* 중간 레이아웃 */
#wrapper {}
#wrapper{}
#container_wr:after {display:block;visibility:hidden;clear:both;content:""}
#container_wr {z-index:5;margin:0 auto;height:100%;zoom:1}
#aside {float:right;width:235px;padding:0;height:100%;margin:20px 0 20px 20px}
#aside {float:right;width:305px;padding:0;background: #e7ebf3;height: 100%;border: 1px solid #adbfd2;margin:20px 0 20px 20px}
#container {z-index:4;position:relative;float:left;min-height:500px;height:auto !important;margin:20px 0;height:500px;font-size:1em;width:930px;zoom:1}
#container {z-index:4;position:relative;float:left;min-height:500px;height:auto !important;margin:20px 0;height:500px;font-size:1em;width:875px;zoom:1}
#container:after {display:block;visibility:hidden;clear:both;content:""}
#container_title {font-size:1.333em;margin:0 auto;font-weight:bold}
#container_title span {margin:0 auto 10px;display:block;line-height:30px}
.lt_wr {width:32%}
.lt_wr:nth-child(3n+1) {clear:both}
.latest_wr {margin-bottom:20px}
#container_title {font-size:1.333em;margin:0 auto;font-weight:bold;}
#container_title span{margin:0 auto 10px;display:block;line-height:30px;}
/*.latest_wr:after {display:block;visibility:hidden;clear:both;content:""}*/
.lt_wr{width:49%}
.lt_wr:nth-child(2n+1){clear:both}
.latest_wr:after {display:block;visibility:hidden;clear:both;content:""}
.latest_top_wr {margin:0 -10px 20px}
.latest_top_wr:after {display:block;visibility:hidden;clear:both;content:""}
/* 하단 레이아웃 */
#ft {background:#212020;margin:0 auto;text-align:center}
#ft {border-top:1px solid #d5d5d5;background:#fff;padding-bottom:30px;margin:0 auto;text-align:center}
#ft h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#ft_wr {max-width:1240px;margin:0;padding:40px 0;position:relative;display:inline-block;text-align:left}
#ft_wr:after {display:block;visibility:hidden;clear:both;content:""}
#ft_wr .ft_cnt {width:25%;float:left;padding:0 20px}
#ft_link {text-align:left}
#ft_link a {display:block;color:#fff;line-height:2em;font-weight:bold}
#ft_company h2 {font-size:1.2em;margin-bottom:20px}
#ft_company {font-weight:normal;color:#e3e3e3;line-height:2em}
#ft_catch {margin:20px 0 10px}
#ft_copy {text-align:center;width:1200px;margin:0 auto;padding:20px 0;color:#5b5b5b;font-size:0.92em;border-top:1px solid #383838}
#ft_wr {margin:0 auto;position:relative;}
#ft_link{padding:15px 0;border-bottom:1px solid #eee}
#ft_link a{display:inline-block;padding:0 8px;line-height:1.083em;font-weight:bold}
#ft_catch{margin:20px 0 10px}
#ft_copy{color:#555;font-size:0.92em}
#top_btn {position:fixed;bottom:20px;right:20px;width:50px;height:50px;line-height:46px;border:2px solid #333;color:#333;text-align:center;font-size:15px;z-index:90;background:rgba(255,255,255,0.5)}
#top_btn:hover {border-color:#3059c7;background:#3059c7;color:#fff}
#top_btn:hover{border-color:#3059c7;background:#3059c7;color:#fff}
/* 게시물 선택복사 선택이동 */
#copymove {}
#copymove .win_desc {text-align:center;display:block}
#copymove .tbl_wrap {margin:20px}
#copymove .win_btn {padding:0 20px 20px}
#copymove .win_desc {text-align:center;display:block}
#copymove .tbl_wrap{margin:20px }
#copymove .win_btn{padding:0 20px 20px}
.copymove_current {float:right;background:#ff3061;padding:5px;color:#fff;border-radius:3px}
.copymove_currentbg {background:#f4f4f4}
/* 화면낭독기 사용자용 */
#hd_login_msg {position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;width:0;height:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
/* 본문 바로가기 */
#skip_to_container a {z-index:100000;position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#skip_to_container a:focus, #skip_to_container a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em}
@@ -209,89 +215,89 @@ box-shadow:0 2px 5px rgba(0,0,0,0.2)}
/* 캡챠 자동등록(입력)방지 기본 -pc */
#captcha {display:inline-block;position:relative}
#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;}
#captcha #captcha_img {height:40px;border:1px solid #898989;vertical-align:top;padding:0;margin:0}
#captcha #captcha_mp3 {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat;text-indent:-999px;border-radius:3px}
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
#captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top}
#captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em}
/* 캡챠 자동등록(입력)방지 기본 - mobile */
#captcha.m_captcha audio {display:block;margin:0 0 5px;width:187px}
#captcha.m_captcha #captcha_img {width:160px;height:60px;border:1px solid #e9e9e9;margin-bottom:3px;margin-top:5px;display:block}
#captcha.m_captcha #captcha_reload {position:static;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px}
#captcha.m_captcha #captcha_reload span {display:none}
#captcha.m_captcha #captcha_img {width:160px;height:60px;border:1px solid #e9e9e9;margin-bottom:3px;margin-top:5px;display:block;}
#captcha.m_captcha #captcha_reload {position:static;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px}
#captcha.m_captcha #captcha_reload span{display:none;}
#captcha.m_captcha #captcha_key {margin:0;padding:0 5px;width:115px;height:29px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:29px;margin-left:3px}
#captcha.m_captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em}
#captcha.m_captcha #captcha_mp3 {width:31px;height:31px;background:url('../img/captcha2.png') no-repeat 0 0 ; vertical-align:top;overflow:hidden;cursor:pointer;text-indent:-9999px;border:none}
#captcha.m_captcha #captcha_mp3 {width:31px;height:31px;background:url('../img/captcha2.png') no-repeat 0 0 ; vertical-align:top;overflow:hidden;cursor:pointer;text-indent:-9999px;border:none}
/* ckeditor 단축키 */
.cke_sc {margin:0 0 5px;text-align:right}
.btn_cke_sc {display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;line-height:1.9em;vertical-align:middle;cursor:pointer}
.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;line-height:1.9em;vertical-align:middle;cursor:pointer}
.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f7f7f7;text-align:center}
.cke_sc_def dl {margin:0 0 5px;text-align:left;zoom:1}
.cke_sc_def dl{margin:0 0 5px;text-align:left;zoom:1}
.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""}
.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9}
.cke_sc_def dt {width:20%;font-weight:bold}
.cke_sc_def dd {width:30%}
/* ckeditor 태그 기본값 */
#bo_v_con ul {display:block;list-style-type:disc;margin-top:1em;margin-bottom:1em;margin-left:0;margin-right:0;padding-left:40px}
#bo_v_con ol {display:block;list-style-type:decimal;margin-top:1em;margin-bottom:1em;margin-left:0;margin-right:0;padding-left:40px}
#bo_v_con li {display:list-item}
/* 버튼 */
a.btn,.btn {line-height:35px;height:35px;padding:0 10px;text-align:center;font-weight:bold;border:0;font-size:1.4em;
-webkit-transition:background-color 0.3s ease-out;
-moz-transition:background-color 0.3s ease-out;
-o-transition:background-color 0.3s ease-out;
transition:background-color 0.3s ease-out}
a.btn,.btn{line-height:35px;height:35px;padding:0 10px;text-align:center;font-weight:bold;border:0;
-webkit-transition: background-color 0.3s ease-out;
-moz-transition: background-color 0.3s ease-out;
-o-transition: background-color 0.3s ease-out;
transition: background-color 0.3s ease-out;}
a.btn01 {display:inline-block;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none;vertical-align:middle}
a.btn01:focus, a.btn01:hover {text-decoration:none}
button.btn01 {display:inline-block;margin:0;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none}
a.btn02 {display:inline-block;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle}
a.btn02 {display:inline-block;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none;vertical-align:middle;}
a.btn02:focus, .btn02:hover {text-decoration:none}
button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f;background:#4b545e;color:#fff;text-decoration:none}
.btn_confirm {text-align:right} /* 서식단계 진행 */
.btn_submit {border:0;background:#3a8afd;color:#fff;cursor:pointer;border-radius:3px}
.btn_submit:hover {background:#2375eb}
.btn_close {border:1px solid #dcdcdc;cursor:pointer;border-radius:3px;background:#fff}
a.btn_close {text-align:center;line-height:50px}
.btn_submit {border:0;background:#253dbe;color:#fff;cursor:pointer;border:0}
.btn_submit:hover {background:#0025eb}
a.btn_cancel {display:inline-block;background:#969696;color:#fff;text-decoration:none;vertical-align:middle}
a.btn_cancel {display:inline-block;background:#969696;color:#fff;text-decoration:none;vertical-align:middle;}
button.btn_cancel {display:inline-block;background:#969696;color:#fff;text-decoration:none;vertical-align:middle}
.btn_cancel:hover {background:#aaa}
a.btn_frmline, button.btn_frmline {display:inline-block;width:128px;padding:0 5px;height:40px;border:0;background:#434a54;border-radius:3px;color:#fff;text-decoration:none;vertical-align:top} /* 우편번호검색버튼 등 */
.btn_cancel:hover {background:#aaa;
}
a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;height:40px;border:0;background:#3c3c3c;border-radius:5px;color:#fff;text-decoration:none;vertical-align:top} /* 우편번호검색버튼 등 */
a.btn_frmline {}
button.btn_frmline {font-size:1em}
/* 게시판용 버튼 */
a.btn_b01,.btn_b01 {display:inline-block;color:#bababa;text-decoration:none;vertical-align:middle;border:0;background:transparent}
.btn_b01:hover, .btn_b01:hover {color:#000}
a.btn_b02,.btn_b02 {display:inline-block;background:#253dbe;padding:0 10px;color:#fff;text-decoration:none;border:0;vertical-align:middle}
a.btn_b01,.btn_b01 {display:inline-block;background:#4c4f6f;color:#fff;text-decoration:none;vertical-align:middle}
.btn_b01:hover, .btn_b01:hover {background:#54598c}
a.btn_b02,.btn_b02 {display:inline-block;background:#253dbe;padding:0 10px;color:#fff;text-decoration:none;border:0;vertical-align:middle;}
a.btn_b02:hover, .btn_b02:hover {background:#0025eb}
a.btn_b03, .btn_b03 {display:inline-block;background:#fff;border:1px solid #b9bdd3;color:#646982;text-decoration:none;vertical-align:middle}
a.btn_b03:hover, .btn_b03:hover {background:#ebedf6}
a.btn_b04, .btn_b04 {display:inline-block;background:#fff;border:1px solid #ccc;color:#707070;text-decoration:none;vertical-align:middle}
a.btn_b04:hover, .btn_b04:hover {color:#333;background:#f9f9f9}
a.btn_admin,.btn_admin {display:inline-block;color:#d13f4a;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */
.btn_admin:hover, a.btn_admin:hover {color:#ff3746}
a.btn_admin,.btn_admin {display:inline-block;background:#d13f4a;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */
.btn_admin:hover, a.btn_admin:hover {background:#ff3746}
/*컬러*/
.color_1 {background:#169dd6}
.color_2 {background:#14d53d}
.color_3 {background:#3814ff}
.color_4 {background:#7520c5}
/* 기본테이블 */
.tbl_wrap table {width:100%;border-collapse:collapse;border-spacing:0 5px;background:#fff;border-top:1px solid #ececec;border-bottom:1px solid #ececec}
.tbl_wrap table {width:100%;border-collapse:collapse;border-spacing: 0 5px;border:1px solid #ccc;}
.tbl_wrap caption {padding:10px 0;font-weight:bold;text-align:left}
.tbl_head01 {margin:0 0 10px}
.tbl_head01 caption {padding:0;font-size:0;line-height:0;overflow:hidden}
.tbl_head01 thead th {padding:20px 0;font-weight:normal;text-align:center;border-bottom:1px solid #ececec;height:40px}
.tbl_head01 thead th {padding:10px 0;font-weight:normal;text-align:center;border-bottom:1px solid #ddd;background:#fafafa;height:40px}
.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.tbl_head01 tfoot th, .tbl_head01 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center}
.tbl_head01 tbody th {padding:8px 0;border-bottom:1px solid #e8e8e8}
.tbl_head01 td {color:#666;padding:10px 5px;border-top:1px solid #ecf0f1;border-bottom:1px solid #ecf0f1;line-height:1.4em;height:60px;word-break:break-all}
.tbl_head01 tbody tr:hover td {background:#fafafa}
.tbl_head01 td {color:#666;background:#fff;padding:10px 5px;border-top:1px solid #ecf0f1;line-height:1.4em;height:60px;word-break:break-all}
.tbl_head01 tbody tr:hover td{background:#fafafa;}
.tbl_head01 a:hover {text-decoration:underline}
.tbl_head02 {margin:0 0 10px}
@@ -309,46 +315,40 @@ a.btn_admin,.btn_admin {display:inline-block;color:#d13f4a;text-decoration:none;
.tbl_frm01 table {width:100%;border-collapse:collapse;border-spacing:0}
.tbl_frm01 th {width:70px;padding:7px 13px;border:1px solid #e9e9e9;border-left:0;background:#f5f8f9;text-align:left}
.tbl_frm01 td {padding:7px 10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;background:transparent}
.wr_content textarea,.tbl_frm01 textarea,.form_01 textarea, .frm_input {border:1px solid #d0d3db;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;
-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
.wr_content textarea,.tbl_frm01 textarea,.form_01 textarea, .frm_input {border:1px solid #ccc;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
}
.tbl_frm01 textarea {padding:2px 2px 3px}
.frm_input {height:40px}
.frm_input {height:40px;}
.full_input {width:100%}
.half_input {width:49.5%}
.twopart_input {width:385px;margin-right:10px}
.full_input{width:100%}
.half_input{width:49.5%}
.tbl_frm01 textarea, .write_div textarea {width:100%;height:100px}
.tbl_frm01 a {text-decoration:none}
.tbl_frm01 .frm_file {display:block;margin-bottom:5px}
.tbl_frm01 .frm_info {display:block;padding:0 0 5px;line-height:1.4em}
/*기본 리스트*/
.list_01 ul {border-top:1px solid #ececec}
.list_01 li {border-bottom:1px solid #ececec;background:#fff;padding:10px 15px;list-style:none;position:relative}
.list_01 li:nth-child(odd) {background:#f6f6f6}
.list_01 li{border:1px solid #dbdbdb;background:#fff;border-radius:3px;margin:3px 0;padding:10px 15px;list-style:none;position:relative;}
.list_01 li:after {display:block;visibility:hidden;clear:both;content:""}
.list_01 li:hover {background:#f9f9f9}
.list_01 li.empty_li {text-align:center;padding:20px 0;color:#666}
.list_01 li:hover{background:#f9f9f9}
.list_01 li.empty_li{text-align:center;padding:20px 0;color:#666}
/*폼 리스트*/
.form_01 h2 {font-size:1.167em}
.form_01 li {margin-bottom:10px}
.form_01 ul:after,
.form_01 h2{margin:0 0 10px;font-size:1.167em}
.form_01 li{margin:10px 0}
.form_01 li:after {display:block;visibility:hidden;clear:both;content:""}
.form_01 .left_input {float:left}
.form_01 .margin_input {margin-right:1%}
.form_01 textarea {height:100px;width:100%}
.form_01 .frm_label {display:inline-block;width:130px}
.form_01 li .right_input{float:right}
.form_01 textarea{height:100px;width:100%}
.form_01 .frm_label{display:inline-block;width:130px}
/* 자료 없는 목록 */
.empty_table {padding:50px 0 !important;text-align:center}
.empty_list {padding:20px 0 !important;color:#666;text-align:center}
/* 필수입력 */
.required, textarea.required {background-image:url('../img/require.png') !important;background-repeat:no-repeat !important;background-position:right top !important}
.required, textarea.required {background-image:url('../img/require.png') !important;background-repeat:no-repeat !important;background-position:right top !important;}
/* 테이블 항목별 정의 */
.td_board {width:80px;text-align:center}
@@ -371,34 +371,29 @@ box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
.txt_rdy {color:#8abc2a}
/* 새창 기본 스타일 */
.new_win {position:relative}
.new_win {position:relative;}
.new_win .tbl_wrap {margin:0 20px}
.new_win #win_title {font-size:1.3em;height:50px;line-height:30px;padding:10px 20px;background:#fff;color:#000;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);
-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);
box-shadow:0 1px 10px rgba(0,0,0,.1)}
.new_win #win_title {font-size:1.25em;height:50px;line-height:30px;padding:10px 20px;background:#333;color:#fff;}
.new_win #win_title .sv {font-size:0.75em;line-height:1.2em}
.new_win .win_ul {margin-bottom:15px;padding:0 20px}
.new_win .win_ul {border-right:1px solid #dfe6e7;}
.new_win .win_ul:after {display:block;visibility:hidden;clear:both;content:""}
.new_win .win_ul li {float:left;background:#fff;text-align:center;padding:0 10px;border:1px solid #d6e9ff;border-radius:30px;margin-left:5px}
.new_win .win_ul li:first-child {margin-left:0}
.new_win .win_ul li a {display:block;padding:8px 0;color:#6794d3}
.new_win .win_ul .selected {background:#3a8afd;border-color:#3a8afd;position:relative;z-index:5}
.new_win .win_ul .selected a {color:#fff;font-weight:bold}
.new_win .win_desc {position:relative;margin:10px;border-radius:5px;font-size:1em;background:#f2838f;color:#fff;line-height:50px;text-align:left;padding:0 20px}
.new_win .win_desc i {font-size:1.2em;vertical-align:baseline}
.new_win .win_desc:after {content:"";position:absolute;left:0;top:0;width:4px;height:50px;background:#da4453;border-radius:3px 0 0 3px}
.new_win .frm_info {font-size:0.92em;color:#919191}
.new_win .win_total {float:right;display:inline-block;line-height:30px;font-weight:normal;font-size:0.75em;color:#3a8afd;background:#f6f6f6;padding:0 10px;border-radius:5px}
.new_win .new_win_con {margin:20px 0;padding:20px}
.new_win .win_ul li{float:left;background:#fff;width:33.333%;text-align:center;border:1px solid #ccc;margin-left:-1px}
.new_win .win_ul li a{display:block;padding:10px 0}
.new_win .win_ul .selected{background:#fff;border-color:#253dbe;position:relative;z-index:5}
.new_win .win_ul .selected a{color:#253dbe;font-weight:bold}
.new_win .win_desc {margin:5px 0;font-size:0.92em;color:#3598db;}
.new_win .frm_info{font-size:0.92em;color:#3598db}
.new_win .win_total{text-align:right;margin:10px 0}
.new_win .win_total span{display:inline-block;line-height:30px;font-size:0.92em;color:#4e546f;background:#d4d4d4;padding:0 10px;border-radius:5px;}
.new_win .new_win_con{margin:20px;}
.new_win .new_win_con:after {display:block;visibility:hidden;clear:both;content:""}
.new_win .new_win_con2 {margin:20px 0}
.new_win .btn_confirm:after {display:block;visibility:hidden;clear:both;content:""}
.new_win .win_btn {text-align:center}
.new_win .btn_close {height:45px;width:60px;overflow:hidden;cursor:pointer}
.new_win .btn_submit {padding:0 20px;height:45px;font-weight:bold;font-size:1.083em}
.new_win .win_btn{text-align:right}
.new_win .btn_close {position:absolute;top:0;right:0;height:50px;width:50px;background:url(../img/close_btn.gif) no-repeat 50% 50%;border:0;text-indent:-999px;overflow:hidden;cursor:pointer}
.new_win .btn_submit {padding:0 20px;height:40px;font-weight:bold;font-size:1.083em;float:right}
/* 검색결과 색상 */
.sch_word {color:#fff;background:#ff005a;padding:2px 5px 3px;line-height:18px;margin:0 2px}
.sch_word {color:#00c4ac}
/* 자바스크립트 alert 대안 */
#validation_check {margin:100px auto;width:500px}
@@ -408,37 +403,41 @@ box-shadow:0 1px 10px rgba(0,0,0,.1)}
/* 사이드뷰 */
.sv_wrap {position:relative;font-weight:normal}
.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;font-size:0.92em;background:#333;
-webkit-box-shadow:2px 2px 3px 0px rgba(0,0,0,0.2);
-moz-box-shadow:2px 2px 3px 0px rgba(0,0,0,0.2);
box-shadow:2px 2px 3px 0px rgba(0,0,0,0.2)}
.sv_wrap .sv:before {content:"";position:absolute;top:-6px;left:15px;width:0;height:0;border-style:solid;border-width:0 6px 6px 6px;border-color:transparent transparent #333 transparent}
.sv_wrap .sv a {display:inline-block;margin:0;padding:0 10px;line-height:30px;width:100px;font-weight:normal;color:#bbb}
.sv_wrap .sv a:hover {background:#000;color:#fff}
.sv_member {color:#333}
-webkit-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
.sv_wrap .sv:before{content: "";position: absolute;top: -6px;left: 15px;width: 0;height: 0;border-style: solid;border-width: 0 6px 6px 6px;border-color: transparent transparent #333 transparent;}
.sv_wrap .sv a {display:inline-block;margin:0;padding:0 10px;line-height:30px;width:100px;font-weight:normal;color:#bbb }
.sv_wrap .sv a:hover{background:#000;color:#fff}
.sv_member{color:#333}
.sv_on {display:block !important;position:absolute;top:23px;left:0px;width:auto;height:auto}
.sv_nojs .sv {display:block}
/* 페이징 */
.pg_wrap {clear:both;float:left;display:inline-block}
.pg_wrap {clear:both;margin:30px 0 ;text-align:center}
.pg_wrap:after {display:block;visibility:hidden;clear:both;content:""}
.pg {text-align:center}
.pg_page, .pg_current {display:inline-block;vertical-align:middle;background:#eee;border:1px solid #eee}
.pg {}
.pg_page, .pg_current {display:inline-block;vertical-align:middle;background:#f3f3f3;border:1px solid #bbbcc3}
.pg a:focus, .pg a:hover {text-decoration:none}
.pg_page {color:#959595;font-size:1.083em;height:30px;line-height:28px;padding:0 5px;min-width:30px;text-decoration:none;border-radius:3px}
.pg_page:hover {background-color:#fafafa}
.pg_start {text-indent:-999px;overflow:hidden;background:url('../img/btn_first.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_prev {text-indent:-999px;overflow:hidden;background:url('../img/btn_prev.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_end {text-indent:-999px;overflow:hidden;background:url('../img/btn_end.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_next {text-indent:-999px;overflow:hidden;background:url('../img/btn_next.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_start:hover,.pg_prev:hover,.pg_end:hover,.pg_next:hover {background-color:#fafafa}
.pg_page {color:#555;font-size:1.083em;height:30px;line-height:28px;padding:0 5px;min-width:30px;text-decoration:none;border-radius:3px;}
.pg_page:hover{background-color:#ddd}
.pg_start {text-indent:-999px;overflow:hidden;background:url('../img/btn_first.gif') no-repeat 50% 50% #fff;padding:0;border:1px solid #bbb;}
.pg_prev {text-indent:-999px;overflow:hidden;background:url('../img/btn_prev.gif') no-repeat 50% 50% #fff;padding:0;border:1px solid #bbb}
.pg_end {text-indent:-999px;overflow:hidden;background:url('../img/btn_end.gif') no-repeat 50% 50% #fff;padding:0;border:1px solid #bbb}
.pg_next {text-indent:-999px;overflow:hidden;background:url('../img/btn_next.gif') no-repeat 50% 50% #fff;padding:0;border:1px solid #bbb}
.pg_start:hover,.pg_prev:hover,.pg_end:hover,.pg_next:hover{background-color:#fafafa}
.pg_current {display:inline-block;background:#3a8afd;border:1px solid #3a8afd;color:#fff;font-weight:bold;height:30px;line-height:30px;padding:0 10px;min-width:30px;border-radius:3px}
.pg_current {display:inline-block;background:#4c4f6f;color:#fff;font-weight:bold;height:30px;line-height:30px;padding:0 10px;min-width:30px;border-radius:3px;
-webkit-box-shadow: inset 1px 1px 2px #222542;
-moz-box-shadow: inset 1px 1px 2px #222542;
box-shadow: inset 1px 1px 2px #222542;
}
/* cheditor 이슈 */
.cheditor-popup-window *, .cheditor-popup-window :after, .cheditor-popup-window :before {
-webkit-box-sizing:content-box;
-moz-box-sizing:content-box;
box-sizing:content-box;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/* Mobile화면으로 */
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 B

+140 -173
View File
@@ -2,146 +2,140 @@
/* 초기화 */
html {overflow-y:scroll;height:100%;min-width:320px}
body {margin:0;padding:0;font-size:0.75em;background:#f8f8f8;height:100%;font-family:'Malgun Gothic', dotum, sans-serif}
body {margin:0;padding:0;font-size:0.75em;background:#e6e6e6;height:100%}
html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}
h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:'Malgun Gothic', dotum, sans-serif}
h1, h2, h3, h4, h5, h6 {font-size:1em}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
label, input, button, select, img {vertical-align:middle}
input, button {margin:0;padding:0;font-size:1em;font-family:'Malgun Gothic', dotum, sans-serif}
input, button {margin:0;padding:0;font-size:1em}
button {cursor:pointer}
input[type=text], input[type=password], input[type=submit], input[type=image], button {font-size:1em;-webkit-appearance:none}
textarea, select {font-size:1em;font-family:'Malgun Gothic', dotum, sans-serif}
textarea {border-radius:0;-webkit-appearance:none;font-family:'Malgun Gothic', dotum, sans-serif}
select {margin:0;background:none;font-family:'Malgun Gothic', dotum, sans-serif}
textarea, select {font-size:1em;font-family:dotum}
textarea {border-radius:0;-webkit-appearance:none}
select {margin:0;background:none}
p {margin:0;padding:0;word-break:break-all}
hr {display:none}
pre {overflow-x:scroll;font-size:1.1em}
a {color:#000;text-decoration:none}
ul,li,dl,dt,dd {padding:0;margin:0}
ul {list-style:none}
ul,li,dl,dt,dd{list-style:none;padding:0;margin:0}
*,:after,:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
*, :after, :before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* 팝업레이어 */
#hd_pop {z-index:1000;position:relative;margin:0 auto;width:100%;height:0}
#hd_pop h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
.hd_pops {position:absolute;border:1px solid #e9e9e9;background:#fff}
.hd_pops img {max-width:100%;height:auto}
.hd_pops_con {}
.hd_pops_footer {padding:10px 0;background:#000;color:#fff;text-align:right}
.hd_pops_footer button {margin-right:5px;padding:5px 10px;border:0;background:#393939;color:#fff}
/* 상단 레이아웃 */
#hd {position:relative;background:#212020}
#hd {position:relative;background:#333}
#hd:after {display:block;visibility:hidden;clear:both;content:""}
#hd_h1 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
#logo {padding:10px 10px;height:60px;text-align:center}
#logo img {vertical-align:middle;margin-top:5px;max-height:100%;width:auto}
#gnb_open {position:absolute;top:10px;left:10px;padding:0 10px;height:40px;width:40px;border:0;background-size:70%;color:#fff;background:none;font-size:2em}
#gnb {display:none;background:#efefef;position:fixed;top:0;left:0;z-index:99999;width:100%;max-width:400px;height:100%;overflow-y:auto;
-webkit-box-shadow:0 0 5px rgba(55,55,5,0.4);
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4);
box-shadow:0 0 5px rgba(55,55,5,0.4)}
#logo {padding:10px 10px;height:50px;text-align:center}
#logo img{vertical-align:middle;max-height:100%;width:auto}
#gnb_open {position:absolute;top:10px;left:10px;padding:0 10px;height:30px;width:30px;border:0;background-size:70%;color:#fff;background:none; font-size: 16px;}
#gnb {display:none;background:#262626;position:fixed;top:0;left:0;z-index:99999;height:100%;overflow-y:auto;width:300px;
-webkit-box-shadow:0 0 5px rgba(55,55,5,0.4);
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4);
box-shadow: 0 0 5px rgba(55,55,5,0.4);}
#gnb_1dul {background:#fff}
#gnb_1dul a {display:block;color:#000}
.gnb_1dli {position:relative;line-height:40px}
.gnb_1dli button {position:absolute;top:5px;right:0;width:40px;height:40px;overflow:hidden;border:0;font-size:1.2em;background:#fff;background:url(../img/mobile/gnb_bg2.png) no-repeat 50% 50%;text-indent:-9999px}
.gnb_1dli button.btn_gnb_cl {background:url(../img/mobile/gnb_bg.png) no-repeat 50% 50%}
.gnb_1da {padding:5px 20px;border-bottom:1px solid #eee;font-weight:bold;font-size:1.2em;}
.gnb_2dul {display:none;background:#fafafa}
.gnb_2da {padding-left:30px}
#gnb_close {display:block;position:absolute;right:8px;top:10px;z-index:99;font-weight:bold;margin:0;height:40px;width:40px;border:0;color:#bfb8b2;font-size:2em;background:transparent}
#gnb a {display:block;color:#efefef}
.gnb_1dli{position:relative;line-height:40px;}
.gnb_1dli button{position:absolute;top:0;right:0;background:url;border:0;width:40px;height:40px;overflow:hidden;border:0;background:url(../img/mobile/gnb_bg.png) no-repeat 50% 50%;text-indent:-9999px}
.gnb_1dli button.btn_gnb_cl{background:url(../img/mobile/gnb_bg2.png) no-repeat 50% 50%}
.gnb_1da {padding:0 20px;border-bottom:1px solid #2d2d2d}
.gnb_2dul {display:none;}
.gnb_2da {border-bottom:1px solid #2d2d2d;background:url(../img/btn_next.gif) no-repeat 21px 17px;padding-left:30px}
#gnb_close {display:block;margin:0;height:50px;width:100%;border:0;background:url(../img/mobile/btn_close.png) no-repeat right 50%
#222222;background-size:25px;color:#fff;text-indent:-999999999px;overflow:hidden}
#gnb_empty {padding:20px 0;color:#fff;text-align:center;line-height:2em}
#gnb_empty a {display:inline;text-decoration:underline}
#hd_sch {text-align:center;padding:12px 55px 12px 15px;background:#212020}
#hd_sch {text-align:center;padding:20px}
#hd_sch h2 {position:absolute;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
#hd_sch form {position:relative;padding-right:40px}
#hd_sch #sch_stx {width:100%;height:38px;margin-left:40px;background:#464646;border:0;color:#fff}
#hd_sch #sch_submit {position:absolute;top:0;left:0;width:40px;height:38px;border:0;border-radius:3px;cursor:pointer;color:#a6a5a5;background:#464646;font-size:1.25em}
#hd_sch form {position:relative;padding-right:40px;}
#hd_sch #sch_stx {width:100%;height:45px;background:#464646;border:0;padding-left:10px;border-radius:3px 0 0 3px;color:#fff}
#hd_sch #sch_submit {position:absolute;top:0;right:0;width:40px;height:45px;;border:0;border-radius:0 3px 3px 0;cursor:pointer;color:#fff;background:#464646;font-size:1.25em}
#user_btn {position:absolute;top:10px;right:10px;padding:0 10px;height:40px;width:40px;border:0;color:#fff;font-size:1.8em;background:none;letter-spacing:-0.1em}
#user_menu {display:none;position:fixed;top:0;right:0;width:100%;height:100%;overflow-y:auto;z-index:9999;background:#efefef;text-align:center}
#user_close {display:block;position:absolute;right:8px;top:10px;z-index:99;font-weight:bold;margin:0;height:40px;width:40px;border:0;color:#bfb8b2;font-size:1.8em;background:transparent}
#user_btn {position:absolute;top:10px;right:10px;padding:0 10px;height:30px;width:30px;border:0;;color:#fff;font-size:16px;background:none;letter-spacing:-0.1em}
#user_menu{display:none;position:fixed;top:0;right:0;height:100%;;overflow-y:auto;width:320px;z-index:9999;background:#fff;text-align:center;
-webkit-box-shadow:0 0 5px rgba(55,55,5,0.4);
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4);
box-shadow: 0 0 5px rgba(55,55,5,0.4);}
#user_close {display:block;margin:0;height:50px;width:100%;border:0;background:url(../img/mobile/btn_close.png) no-repeat right 50%
#222;background-size:25px;color:#fff;text-indent:-999999999px;overflow:hidden}
#snb_cnt span{display:inline-block;padding: 0 7px;height:18px;line-height:18px;font-size:12px;background:#3ca1ff;border-radius:20px;color:#fff}
#snb_cnt span {display:inline-block;float:right;padding:0 7px;height:18px;margin-top:3px;line-height:18px;font-size:12px;background:#da22f5;border-radius:20px;color:#fff}
#hd_nb {background:#fff;margin-top:10px;border-bottom:1px solid #e1e1e1}
#hd_nb{margin:20px;}
#hd_nb:after {display:block;visibility:hidden;clear:both;content:""}
#hd_nb li {width:50%;float:left;text-align:center;line-height:25px;font-size:1.083em;font-weight:bold}
#hd_nb li a {display:block;color:#717171;text-align:left;padding:10px 15px}
#hd_nb li i {font-size:14px;margin-right:10px;color:#a5a8ac}
#hd_nb .hd_nb1 {border-right:1px solid #efefef;border-bottom:1px solid #efefef}
#hd_nb .hd_nb2 {border-bottom:1px solid #efefef}
#hd_nb .hd_nb3 {border-right:1px solid #efefef}
#hd_nb li{width:50%;float:left;text-align:center;line-height:25px;font-size:1.083em;font-weight:bold}
#hd_nb li a{display:block;color:#717171;padding:20px 0}
#hd_nb li i{font-size:20px;}
#hd_nb .hd_nb1{border-right:1px solid #e2e5e7;border-bottom:1px solid #e2e5e7}
#hd_nb .hd_nb2{border-bottom:1px solid #e2e5e7}
#hd_nb .hd_nb3{border-right:1px solid #e2e5e7}
/* 텍스트 크기 조절 */
#text_size {margin:10px 0;text-align:center;display:inline-block;padding:7px 20px;background:#e6e7e9;border-radius:25px;height:48px}
#text_size {margin:0 0 10px;text-align:center;display:inline-block;padding:7px 20px;background:#e6e7e9;border-radius:25px;height:48px;}
#text_size button {margin:0 5px;border:0;background:none;height:35px;width:35px;border-radius:50%}
#text_size button.select {background:#fff;border-bottom:1px solid #bbb;
-webkit-box-shadow:0 0 5px rgba(100,80,100,0.2);
-moz-box-shadow:0 0 5px rgba(100,100,100,0.2);
box-shadow:0 0 5px rgba(100,100,100,0.2)}
#text_size button.select{background:#fff;border-bottom:1px solid #bbb;
-webkit-box-shadow:0 0 5px rgba(100,80,100,0.2);
-moz-box-shadow:0 0 5px rgba(100,100,100,0.2);
box-shadow: 0 0 5px rgba(100,100,100,0.2);}
.ts_up {font-size:1.167em !important}
.ts_up2 {font-size:1.3em !important}
/* 중간 레이아웃 */
#wrapper {}
#wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#container {position:relative;min-height:300px}
#container:after {display:block;visibility:hidden;clear:both;content:""}
#container_title {font-size:1.2em;font-weight:bold;height:50px;padding:10px 15px;line-height:30px;background:#fff;color:#333;
-webkit-box-shadow:0 0 10px rgba(181, 181, 181, 0.4);
-moz-box-shadow:0 0 10px rgba(181, 181, 181, 0.4);
box-shadow:0 0 10px rgba(181, 181, 181, 0.4);
#container_title {font-size:1.2em;font-weight:bold;height:50px;padding:10px;line-height:30px;background:#fff;color:#333;
-webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4);
-moz-box-shadow: 0 0 5px rgba(55,55,5,0.4);
box-shadow: 0 0 5px rgba(55,55,5,0.4);
}
#container_title a {display:inline-block;margin-right:5px}
.top {position:relative}
.btn_top {position:absolute;top:0px;right:10px;z-index:999;padding:8px 0}
.btn_top li {display:inline-block}
.btn_top a,.btn_top button,.btn_top .btn_submit {}
.btn_top .btn_cancel,.btn_top .btn_b01 {border:1px solid #aaa;background:none;color:#666;line-height:28px;background:#fff}
.fixed {position:fixed;top:0;right:0;z-index:999}
.fixed.btn_bo_user {right:10px}
#container_title.fixed {width:100%}
.top{position:relative}
.btn_top{position:absolute;top:0px;right:0px;z-index:999;padding:10px;}
.btn_top li{display:inline-block}
.btn_top a,.btn_top .btn_submit{line-height:30px;padding: 0 10px;border-radius:3px}
.btn_top .btn_cancel,.btn_top .btn_b01{border:1px solid #aaa;background:none;color:#666;line-height:28px;background:#fff}
.fixed{position:fixed;top:0;right:0;z-index:999;}
#container_title.fixed{width:100%;}
/* 하단 레이아웃 */
#ft {background:#222;padding:0px 20px 20px}
#ft {background:#222;padding:0px 10px 10px}
#ft h1 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
#ft p {margin:0;padding:10px 0;line-height:1.8em}
#ft_copy {padding:10px;line-height:2em;text-align:center;color:#777}
#ft_copy #ft_company {text-align:center}
#ft_copy #ft_company a {display:inline-block;padding:0 10px;line-height:1em;border-left:1px solid #333;color:#fff}
#ft_copy #ft_company a:first-child {border:0}
.ft_cnt {font-weight:normal;color:#e3e3e3;line-height:2em;text-align:center}
.ft_cnt h2 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
#ft_copy #ft_company a:first-child{border:0}
#ft_copy b {color:inherit}
#ft_copy a {color:inherit;text-decoration:none}
#top_btn {position:fixed;bottom:10px;right:15px;width:50px;height:50px;line-height:36px;border:2px solid #d2d2d2;border-radius:50%;background:#fff;color:#d2d2d2;text-align:center;font-size:15px;z-index:99;
-webkit-box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4);
-moz-box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4);
box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4)}
#top_btn i {font-size:1.4em}
#top_btn:hover {background:#3b8afb;border-color:#3b8afb;color:#fff}
#device_change {display:block;line-height:40px;border-radius:5px;background:#302e2e;color:#777;font-size:1em;text-decoration:none;text-align:center}
#top_btn {position:fixed;bottom:10px;right:10px;width:40px;height:40px;line-height:36px;border:2px solid #333;background:rgba(255,255,255,0.6);color:#333;text-align:center;font-size:15px;z-index:99}
#device_change {display:block;line-height:40px;border:1px solid #3a3a3a;border-radius:2em;color:#777;font-size:1em;text-decoration:none;text-align:center}
/* 게시물 선택복사 선택이동 */
#copymove {}
.copymove_current {float:right;color:#ff3061}
.copymove_currentbg {background:#f4f4f4}
#copymove .tbl_head01 {margin-top:10px}
#copymove td {background:#fff}
#copymove .win_btn {margin:10px}
/* 화면낭독기 사용자용 */
#hd_login_msg {position:absolute;top:0;left:0;width:0;height:0;overflow:hidden}
@@ -155,38 +149,33 @@ box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4)}
/* 캡챠 자동등록(입력)방지 기본 -pc */
#captcha {position:relative}
#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
#captcha #captcha_img {height:40px;border:1px solid #898989;vertical-align:top;padding:0;margin:0}
#captcha #captcha_mp3 {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;width:40px;height:40px;background:url('../../../img/captcha2.png') no-repeat;text-indent:-999px;border-radius:3px}
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
#captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:0;vertical-align:top}
#captcha #captcha_info {display:block;margin:3px 0 5px;font-size:0.95em;letter-spacing:-0.1em}
#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;}
#captcha #captcha_img {height:40px;border:1px solid #898989;;vertical-align:top;padding:0;margin:0}
#captcha #captcha_mp3 {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;width:40px;height:40px;background:url('../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px}
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
#captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top}
#captcha #captcha_info {display:block;margin:3px 0 5px ;font-size:0.95em;letter-spacing:-0.1em}
/* 캡챠 자동등록(입력)방지 기본 - mobile */
#captcha.m_captcha audio {display:block;margin:0 0 5px}
/* 구글리캡챠 크기 조정 scale */
#captcha.recaptcha {width:213px;height:55px;overflow:hidden}
#rc-imageselect, .g-recaptcha {transform:scale(0.7);-webkit-transform:scale(0.7);transform-origin:0 0;-webkit-transform-origin:0 0}
/* ckeditor 태그 기본값 */
#bo_v_con ul {display:block;list-style-type:disc;margin-top:1em;margin-bottom:1em;margin-left:0;margin-right:0;padding-left:40px}
#bo_v_con ol {display:block;list-style-type:decimal;margin-top:1em;margin-bottom:1em;margin-left:0;margin-right:0;padding-left:40px}
#bo_v_con li {display:list-item}
#captcha.recaptcha{width:213px;height:55px;overflow:hidden}
#rc-imageselect, .g-recaptcha {transform:scale(0.7);-webkit-transform:scale(0.7);transform-origin:0 0;-webkit-transform-origin:0 0;}
/*단축키일람 */
.cke_sc {text-align:right}
.btn_cke_sc {background:#333;color:#fff;padding:5px;border:none}
.cke_sc{text-align:right}
.btn_cke_sc{background:#333;color:#fff;padding:5px;border:none}
.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f7f7f7;text-align:center}
.cke_sc_def dl {margin:0 0 5px;text-align:left;zoom:1}
.cke_sc_def dl{margin:0 0 5px;text-align:left;zoom:1}
.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""}
.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9}
.cke_sc_def dt {width:50%;font-weight:bold}
.cke_sc_def dd {width:50%}
.btn_cke_sc_close {background:#333;padding:5px;border:none;color:#fff}
.btn_cke_sc_close{background:#333;padding:5px;border:none;color:#fff}
/* 버튼 */
.btn {display:inline-block;padding:0 5px;height:30px;line-height:30px;border-radius:3px}
.btn{display:inline-block;padding:0 5px;height:30px;line-height:30px;border-radius:3px}
a.btn01 {display:inline-block;background:#ddd;color:#444;text-decoration:none;vertical-align:middle}
a.btn01:focus, a.btn01:hover {text-decoration:none}
button.btn01 {display:inline-block;margin:0;padding:7px;border:1px solid #ccc;background:#fafafa;color:#000;text-decoration:none}
@@ -196,33 +185,24 @@ button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f
.btn_confirm {text-align:center} /* 서식단계 진행 */
.btn_submit {border:0;background:#3a8afd;color:#fff;cursor:pointer;border-radius:3px}
.btn_submit:hover {background:#2375eb}
.btn_close {border:1px solid #dcdcdc;cursor:pointer;border-radius:3px;background:#fff}
a.btn_close {text-align:center;line-height:50px}
.btn_submit {border:0;background:#ff506a;color:#fff;cursor:pointer;border-radius:3px}
fieldset .btn_submit {}
a.btn_cancel {display:inline-block;background:#ddd;color:#444;text-decoration:none;vertical-align:middle}
button.btn_cancel {display:inline-block;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none}
a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;border:0;background:#fff;border:1px solid #3a8afd;color:#3a8afd;letter-spacing:-0.1em;text-decoration:none;vertical-align:top} /* 우편번호검색버튼 등 */
button.btn_cancel {display:inline-block;;border:1px solid #ccc;background:#fafafa;color:#000;vertical-align:top;text-decoration:none}
a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top} /* 우편번호검색버튼 등 */
button.btn_frmline {font-size:1em}
/* 게시판용 버튼 */
a.btn_b01,.btn_b01 {display:inline-block;background:#3a8afd;color:#fff;border-radius:3px;padding:10px;border:0;text-decoration:none;vertical-align:middle}
a.btn_b01,.btn_b01 {display:inline-block;background:#4c4f6f;color:#fff;text-decoration:none;vertical-align:middle}
.btn_b01:hover, .btn_b01:hover {}
a.btn_b02, .btn_b02 {display:inline-block;background:transparent;color:#fff;border:0;border-radius:3px;padding:10px;text-decoration:none;vertical-align:middle}
a.btn_b02 ,.btn_b02{display:inline-block;background:#ff506a;color:#fff;text-decoration:none;vertical-align:middle;border:0}
a.btn_b02:hover, .btn_b02:hover {}
a.btn_b03, .btn_b03 {display:inline-block;line-height:28px;border:0;background:transparent;color:#bababa;text-decoration:none;vertical-align:middle}
a.btn_b03, .btn_b03 {display:inline-block;line-height:28px;border:1px solid #ed6478;color:#ed6478;background:none;text-decoration:none;vertical-align:middle}
a.btn_b03:hover, .btn_b03:hover {}
a.btn_admin {display:inline-block;color:#d13f4a;font-size:1.4em;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */
a.btn_admin {display:inline-block;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle} /* 관리자 전용 버튼 */
a.btn_admin:focus, a.btn_admin:hover {}
.fix_btn {position:fixed;bottom:65px;right:15px;background:#3a8afd;width:50px;height:50px;color:#fff;text-align:center;border-radius:50% !important;font-size:1.8em;line-height:50px !important;-webkit-box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4);
-moz-box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4);
box-shadow:1px 2px 5px rgba(191, 191, 191, 0.4)}
a.btn,.btn {line-height:35px;width:30px;height:35px;padding:0 5px;text-align:center;font-weight:bold;border:0;font-size:1.4em;
-webkit-transition:background-color 0.3s ease-out;
-moz-transition:background-color 0.3s ease-out;
-o-transition:background-color 0.3s ease-out;
transition:background-color 0.3s ease-out}
/* 기본테이블 */
@@ -232,14 +212,13 @@ transition:background-color 0.3s ease-out}
.tbl_head01 {}
.tbl_head01 caption {padding:0 0 10px;color:#777;text-align:left}
.tbl_head01 thead th {padding:12px 0;border:1px solid #d8dbdf;background:#f7f7f9;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em}
.tbl_head01 thead th {padding:12px 0;border:1px solid #cacaca;background:#d9d9da;color:#383838;font-size:0.95em;text-align:center;letter-spacing:-0.1em}
.tbl_head01 thead a {color:#383838}
.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.tbl_head01 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff}
.tbl_head01 tfoot td {border-color:#e3e3e5;background:#484848;color:#fff;font-weight:bold;text-align:center}
.tbl_head01 tbody {text-align:left}
.tbl_head01 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head01 td {padding:5px;border:1px solid #e7e9ec;border-top:0;line-height:1.5em;word-break:break-all}
.tbl_head01 td {padding:5px;border:1px solid #e3e3e5;line-height:1.5em;word-break:break-all}
.tbl_head02 {}
.tbl_head02 caption {padding:0 0 10px;color:#777;text-align:left}
@@ -252,28 +231,28 @@ transition:background-color 0.3s ease-out}
.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all}
/* 기본리스트 */
.list_01 ul {}
.list_01 li {border-bottom:1px solid #e5ecee;padding:15px}
.list_01 li:after {display:block;visibility:hidden;clear:both;content:""}
.all_chk {padding:15px;border-bottom:1px solid #e8eaee;background:#fff}
.list_01{padding:0 10px;}
.list_01 li{background:#fff;border-radius:3px;margin:10px 0;padding:10px 15px;border-bottom:1px solid #ccc;}
/* 기본폼 */
.form_01 .write_div {margin-bottom:10px;position:relative}
.form_01 li {margin:0 0 10px;position:relative;list-style:none}
.form_01 textarea, .frm_input {border:1px solid #d0d3db;background:#fff;color:#000;vertical-align:middle;padding:5px;border-radius:0;box-shadow:none}
.form_01{margin:10px}
.form_01 .write_div{margin:5px 0;position:relative}
.form_01 li{margin:5px 0;position:relative;list-style:none}
.form_01 textarea, .frm_input {border:1px solid #ccc;background:#fff;color:#000;vertical-align:middle;border-radius:3px;padding:5px;}
.form_01 textarea {width:100%;height:100px}
.frm_input {height:45px}
.full_input {width:100%}
.frm_input {height:40px;}
.full_input{width:100%}
.form_01 .frm_file {display:block;margin-bottom:5px;width:100%}
.form_01 select {height:40px;background-color:#fff}
.form_01 .frm_info {font-size:0.92em;color:#3a8afd;text-align:left;margin:3px 0 10px;display:block;line-height:1.3em}
.form_01 select{height:40px;border-radius:3px}
.form_01 .frm_info{font-size:0.92em;color:#4162ff;text-align:left;margin:3px 0 10px;display:block;line-height:1.3em}
/* 자료 없는 목록 */
.empty_table {padding:100px 0 !important;color:#777;text-align:center}
.empty_list {padding:20px 0 !important;text-align:center}
/* 필수입력 */
.required, textarea.required {background-image:url('../img/require.png') !important;background-repeat:no-repeat !important;background-position:right top !important}
.required, textarea.required {background-image:url('../img/require.png') !important;background-repeat:no-repeat !important;background-position:right top !important;}
/* 테이블 항목별 정의 */
.td_board {width:120px;text-align:center}
@@ -296,62 +275,50 @@ transition:background-color 0.3s ease-out}
.txt_rdy {color:#8abc2a}
/* 새창 기본 스타일 */
.new_win {position:relative;background:#fff}
.new_win #win_title {font-size:1.3em;height:50px;line-height:30px;padding:10px 20px;background:#fff;color:#000;-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);
-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);
box-shadow:0 1px 10px rgba(0,0,0,.1)}
.new_win {}
.new_win #win_title {font-size: 1.2em;font-weight: bold;height: 50px;padding: 10px;line-height: 30px;background: #4162ff;color: #fff;}
.new_win #win_title .sv {font-size:0.75em;line-height:1.2em}
.new_win_con {}
.new_win_con{margin:10px}
.new_win .win_ul {margin-bottom:15px;padding:0 20px}
.new_win .win_ul:after {display:block;visibility:hidden;clear:both;content:""}
.new_win .win_ul li {float:left;background:#fff;text-align:center;padding:0 10px;border:1px solid #d6e9ff;border-radius:30px;margin-left:5px}
.new_win .win_ul li:first-child {margin-left:0}
.new_win .win_ul li a {display:block;padding:8px 0;color:#6794d3}
.new_win .win_ul .selected {background:#3a8afd;border-color:#3a8afd;position:relative;z-index:5}
.new_win .win_ul .selected a {color:#fff;font-weight:bold}
.new_win .win_desc {position:relative;margin:10px;border-radius:5px;font-size:1em;background:#f2838f;color:#fff;line-height:50px;text-align:left;padding:0 20px}
.new_win .win_desc i {font-size:1.2em;vertical-align:baseline}
.new_win .win_desc:after {content:"";position:absolute;left:0;top:0;width:4px;height:50px;background:#da4453;border-radius:3px 0 0 3px}
.new_win .win_ul {margin:10px}
.new_win .win_ul li{display:inline-block;}
.new_win .win_ul li a{display: block;line-height: 24px;padding: 0 10px;}
.new_win .win_ul li .selected {background: #4162ff;color: #fff;border-radius: 13px;
-webkit-box-shadow: 0 0 5px rgba(65,98,255,0.8);
-moz-box-shadow: 0 0 5px rgba(65,98,255,0.8);
box-shadow: 0 0 8px rgba(65,98,255,0.8);}
.new_win .win_total {float:right;display:inline-block;line-height:30px;font-weight:normal;font-size:0.75em;color:#3a8afd;background:#f6f6f6;padding:0 10px;border-radius:5px}
.new_win .new_win_con {padding:20px}
.new_win .new_win_con:after {display:block;visibility:hidden;clear:both;content:""}
.new_win .new_win_con2 {margin:20px 0}
.new_win .win_desc {margin:5px 0;font-size:0.92em;color:#4162ff}
.new_win .win_btn {clear:both;padding:10px 0 30px;text-align:center}
.new_win .win_btn a {display:inline-block;height:45px;line-height:40px;font-weight:bold}
.new_win .btn_close {width:60px;height:45px;overflow:hidden;cursor:pointer}
.new_win .btn_submit {padding:0 20px;height:45px;font-weight:bold;font-size:1.083em}
.new_win .win_btn {clear:both;margin:10px 0;text-align:center}
.new_win .win_btn a {display:inline-block;height:40px;line-height:40px;font-weight:bold}
.new_win .win_btn .btn_close {display:inline-block;padding:0 10px;border:0;background:#c6c6d2;color:#666;text-decoration:none;font-weight:bold;height:40px;border-radius:3px;margin:10px 0}
.new_win .win_btn .btn_submit{width:100%;height:40px;line-height:40px;border-radius:3px;margin:0 0 20px;display:inline-block;font-weight:bold}
/* 검색결과 색상 */
.sch_word {color:#fff;background:#ff005a;padding:2px 4px;margin:0 2px}
.sch_word {color:#00c4ac}
/* 사이드뷰 */
.sv_wrap {display:inline-block;position:relative;font-weight:normal;line-height:20px}
.sv_wrap .sv {z-index:1000;width:100px;display:none;margin:5px 0 0;font-size:0.92em;background:#333;text-align:left;
-webkit-box-shadow:2px 2px 3px 0px rgba(0,0,0,0.2);
-moz-box-shadow:2px 2px 3px 0px rgba(0,0,0,0.2);
box-shadow:2px 2px 3px 0px rgba(0,0,0,0.2)}
.sv_wrap .sv:before {content:"";position:absolute;top:-6px;left:15px;width:0;height:0;border-style:solid;border-width:0 6px 6px 6px;border-color:transparent transparent #333 transparent}
.sv_wrap .sv a {display:inline-block;width:100px;margin:0;padding:0 10px;line-height:30px;font-weight:normal;color:#bbb}
.sv_wrap .sv a:hover {background:#000;color:#fff}
.sv_member {color:#333;font-weight:bold}
-webkit-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);
box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
.sv_wrap .sv:before{content: "";position: absolute;top: -6px;left: 15px;width: 0;height: 0;border-style: solid;border-width: 0 6px 6px 6px;border-color: transparent transparent #333 transparent;}
.sv_wrap .sv a {display:inline-block;width:100px;margin:0;padding:0 10px;line-height:30px;font-weight:normal;color:#bbb }
.sv_wrap .sv a:hover{background:#000;color:#fff}
.sv_member{color:#333;font-weight:bold;}
.sv_on {display:block !important;position:absolute;top:23px;left:0px;width:auto;height:auto}
.sv_nojs .sv {display:block}
/* 페이징 */
.pg_wrap {clear:both;display:block;padding:10px 0;text-align:center}
.pg_wrap:after {display:block;visibility:hidden;clear:both;content:""}
.pg {text-align:center}
.pg_page, .pg_current {display:inline-block;vertical-align:middle;background:#eee;border:1px solid #eee}
.pg_wrap {clear:both;margin:10px 0;text-align:center}
.pg {display:inline-block}
.pg_page, .pg_current {display:inline-block;padding:0 10px;height:30px;color:#000;line-height:28px;vertical-align:middle}
.pg a:focus, .pg a:hover {text-decoration:none}
.pg_page {color:#959595;font-size:1.083em;height:30px;line-height:28px;padding:0 5px;min-width:30px;text-decoration:none;border-radius:3px}
.pg_page:hover {background-color:#fafafa}
.pg_start {text-indent:-999px;overflow:hidden;background:url('../img/btn_first.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_prev {text-indent:-999px;overflow:hidden;background:url('../img/btn_prev.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_end {text-indent:-999px;overflow:hidden;background:url('../img/btn_end.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_next {text-indent:-999px;overflow:hidden;background:url('../img/btn_next.gif') no-repeat 50% 50% #eee;padding:0;border:1px solid #eee}
.pg_start:hover,.pg_prev:hover,.pg_end:hover,.pg_next:hover {background-color:#fafafa}
.pg_current {display:inline-block;background:#3a8afd;border:1px solid #3a8afd;color:#fff;font-weight:bold;height:30px;line-height:30px;padding:0 10px;min-width:30px;border-radius:3px}
.pg_page {background:#fff;border:1px solid #d4d4d4;border-radius:3px}
.pg_start {background:url(../img/btn_first.gif) no-repeat 50% 50% #fff;width:30px;height:30px ;text-indent:-999px;overflow:hidden}
.pg_prev {background:url(../img/btn_prev.gif) no-repeat 50% 50% #fff;width:30px;height:30px ;text-indent:-999px;overflow:hidden}
.pg_next {background:url(../img/btn_next.gif) no-repeat 50% 50% #fff;width:30px;height:30px ;text-indent:-999px;overflow:hidden}
.pg_end {background:url(../img/btn_end.gif) no-repeat 50% 50% #fff;width:30px;height:30px ;text-indent:-999px;overflow:hidden}
.pg_current {display:inline-block;background:#4c4f6f;color:#fff;font-weight:normal;border-radius:3px;line-height:30px;}
-21
View File
@@ -1,21 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_event('tail_sub', 'show_debug_bar');
function show_debug_bar() {
global $g5, $g5_debug, $is_admin;
if( ! get_permission_debug_show() ) return;
if ( !($is_admin === 'super' && !is_mobile() ) ){
return;
}
$memory_usage = function_exists( 'memory_get_peak_usage' ) ? memory_get_peak_usage() : memory_get_usage();
$php_run_time = get_microtime()-$g5_debug['php']['begin_time'];
include_once( G5_PLUGIN_PATH.'/debugbar/debugbar.php' );
}
?>
-70
View File
@@ -1,70 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
add_event('memo_list', 'g54_user_memo_insert', 10, 3);
add_event('password_is_wrong', 'g54_check_bbs_password', 10, 3);
add_replace('invalid_password', 'g54_return_invalid_password', 10, 3);
function g54_return_invalid_password($bool, $type, $wr){
if($type === 'write' && $bool === false && $wr['wr_password'] && isset($_POST['wr_password'])) {
if(G5_STRING_ENCRYPT_FUNCTION === 'create_hash' && strlen($wr['wr_password']) === G5_MYSQL_PASSWORD_LENGTH) {
if( sql_password($_POST['wr_password']) === $wr['wr_password'] ){
$bool = true;
}
}
}
return $bool;
}
function g54_check_bbs_password($type, $wr, $qstr=''){
if($type === 'bbs' && (isset($wr['wr_password']) && $wr['wr_password']) && isset($_POST['wr_password'])) {
global $bo_table, $w;
if(G5_STRING_ENCRYPT_FUNCTION === 'create_hash' && strlen($wr['wr_password']) === G5_MYSQL_PASSWORD_LENGTH) {
if( sql_password($_POST['wr_password']) === $wr['wr_password'] ){
if ($w == 's') {
$ss_name = 'ss_secret_'.$bo_table.'_'.$wr['wr_num'];
set_session($ss_name, TRUE);
} else if ($w == 'sc'){
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$wr['wr_id'];
set_session($ss_name, TRUE);
}
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?'.$qstr));
}
}
}
}
function g54_user_memo_insert($kind, $unkind, $page=1){
global $g5, $is_member, $member;
if( ! $is_member || $kind !== 'send' ) return;
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_send_mb_id = '{$member['mb_id']}' and me_type = 'recv' and me_send_ip = '' ";
$row = sql_fetch($sql);
if ( !$row['cnt'] ) return;
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_send_mb_id = '{$member['mb_id']}' and me_type = 'send' ";
$row2 = sql_fetch($sql);
if( $row['cnt'] && ! $row2['cnt'] ){
$sql = " select * from {$g5['memo_table']} where me_send_mb_id = '{$member['mb_id']}' and me_type = 'recv' ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_read_datetime, me_memo, me_send_id, me_type ) values ( '".addslashes($row['me_recv_mb_id'])."', '".addslashes($row['me_send_mb_id'])."', '".addslashes($row['me_send_datetime'])."', '".addslashes($row['me_read_datetime'])."', '".addslashes($row['me_memo'])."', '".$row['me_id']."', 'send' ) ";
sql_query($sql);
}
$sql = " update {$g5['memo_table']} set me_send_ip = '{$_SERVER['REMOTE_ADDR']}' where me_send_mb_id = '{$member['mb_id']}' and me_type = 'recv' and me_send_ip = '' ";
sql_query($sql);
}
}
?>
+32 -32
View File
@@ -23,6 +23,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<!-- 상단 시작 { -->
<div id="hd">
<h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
<?php
@@ -31,14 +32,21 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
}
?>
<div id="tnb">
<div class="inner">
<ul id="hd_qnb">
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">Q&A</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" class="visit">접속자<strong class="visit-num"><?php echo connect(); // 현재 접속자수, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?></strong></a></li>
</ul>
</div>
<ul>
<?php if ($is_member) { ?>
<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 } ?>
<?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>
<?php } ?>
</ul>
</div>
<div id="hd_wrapper">
@@ -47,7 +55,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
</div>
<div class="hd_sch_wr">
<fieldset id="hd_sch">
<fieldset id="hd_sch" >
<legend>사이트 내 전체검색</legend>
<form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
@@ -89,18 +97,11 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<?php echo popular(); // 인기검색어, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
</div>
<ul class="hd_login">
<?php if ($is_member) { ?>
<li><a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php">정보수정</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/logout.php">로그아웃</a></li>
<?php if ($is_admin) { ?>
<li class="tnb_admin"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>">관리자</a></li>
<?php } ?>
<?php } else { ?>
<li><a href="<?php echo G5_BBS_URL ?>/register.php">회원가입</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/login.php">로그인</a></li>
<?php } ?>
<ul id="hd_qnb">
<li><a href="<?php echo G5_BBS_URL ?>/faq.php"><i class="fa fa-question" aria-hidden="true"></i><span>FAQ</span></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php"><i class="fa fa-comments" aria-hidden="true"></i><span>1:1문의</span></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" class="visit"><i class="fa fa-users" aria-hidden="true"></i><span>접속자</span><strong class="visit-num"><?php echo connect(); // 현재 접속자수, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?></strong></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php"><i class="fa fa-history" aria-hidden="true"></i><span>새글</span></a></li>
</ul>
</div>
@@ -108,7 +109,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<h2>메인메뉴</h2>
<div class="gnb_wrap">
<ul id="gnb_1dul">
<li class="gnb_1dli gnb_mnal"><button type="button" class="gnb_menu_btn" title="전체메뉴"><i class="fa fa-bars" aria-hidden="true"></i><span class="sound_only">전체메뉴열기</span></button></li>
<li class="gnb_1dli gnb_mnal"><button type="button" class="gnb_menu_btn"><i class="fa fa-bars" aria-hidden="true"></i><span class="sound_only">전체메뉴열기</span></button></li>
<?php
$sql = " select *
from {$g5['menu_table']}
@@ -137,10 +138,9 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
$i = 0;
foreach( $menu_datas as $row ){
if( empty($row) ) continue;
$add_class = (isset($row['sub']) && $row['sub']) ? 'gnb_al_li_plus' : '';
if( empty($row) ) continue;
?>
<li class="gnb_1dli <?php echo $add_class; ?>" style="z-index:<?php echo $gnb_zindex--; ?>">
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex--; ?>">
<a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="gnb_1da"><?php echo $row['me_name'] ?></a>
<?php
$k = 0;
@@ -149,7 +149,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
if( empty($row2) ) continue;
if($k == 0)
echo '<span class="bg">하위분류</span><div class="gnb_2dul"><ul class="gnb_2dul_box">'.PHP_EOL;
echo '<span class="bg">하위분류</span><ul class="gnb_2dul">'.PHP_EOL;
?>
<li class="gnb_2dli"><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="gnb_2da"><?php echo $row2['me_name'] ?></a></li>
<?php
@@ -157,7 +157,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
} //end foreach $row2
if($k > 0)
echo '</ul></div>'.PHP_EOL;
echo '</ul>'.PHP_EOL;
?>
</li>
<?php
@@ -184,7 +184,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
if($k == 0)
echo '<ul>'.PHP_EOL;
?>
<li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>"><?php echo $row2['me_name'] ?></a></li>
<li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>"><i class="fa fa-caret-right" aria-hidden="true"></i> <?php echo $row2['me_name'] ?></a></li>
<?php
$k++;
} //end foreach $row2
@@ -203,17 +203,16 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
</ul>
<button type="button" class="gnb_close_btn"><i class="fa fa-times" aria-hidden="true"></i></button>
</div>
<div id="gnb_all_bg"></div>
</div>
</nav>
<script>
$(function(){
$(".gnb_menu_btn").click(function(){
$("#gnb_all, #gnb_all_bg").show();
$("#gnb_all").show();
});
$(".gnb_close_btn, #gnb_all_bg").click(function(){
$("#gnb_all, #gnb_all_bg").hide();
$(".gnb_close_btn").click(function(){
$("#gnb_all").hide();
});
});
@@ -230,3 +229,4 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<div id="container">
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title"><span title="<?php echo get_text($g5['title']); ?>"><?php echo get_head_title($g5['title']); ?></span></h2><?php } ?>
+2 -3
View File
@@ -8,7 +8,7 @@ if(!defined('G5_IS_ADMIN') && defined('G5_THEME_PATH') && is_file(G5_THEME_PATH.
return;
}
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
$begin_time = get_microtime();
if (!isset($g5['title'])) {
$g5['title'] = $config['cf_title'];
@@ -81,8 +81,7 @@ var g5_cookie_domain = "<?php echo G5_COOKIE_DOMAIN ?>";
var g5_admin_url = "<?php echo G5_ADMIN_URL; ?>";
<?php } ?>
</script>
<script src="<?php echo G5_JS_URL ?>/jquery-1.12.4.min.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery-migrate-1.4.1.min.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery-1.8.3.min.js"></script>
<script src="<?php echo G5_JS_URL ?>/jquery.menu.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script src="<?php echo G5_JS_URL ?>/common.js?ver=<?php echo G5_JS_VER; ?>"></script>
<script src="<?php echo G5_JS_URL ?>/wrest.js?ver=<?php echo G5_JS_VER; ?>"></script>
+17 -22
View File
@@ -19,40 +19,22 @@ include_once(G5_PATH.'/head.php');
<h2 class="sound_only">최신글</h2>
<div class="latest_top_wr">
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
// 테마의 스킨을 사용하려면 theme/basic 과 같이 지정
echo latest('pic_list', 'free', 4, 23);
?>
</div>
<div class="latest_wr">
<!-- 사진 최신글2 { -->
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
// 테마의 스킨을 사용하려면 theme/basic 과 같이 지정
echo latest('pic_block', 'gallery', 4, 23);
?>
<!-- } 사진 최신글2 끝 -->
</div>
<div class="latest_wr">
<!-- 최신글 시작 { -->
<?php
// 최신글
$sql = " select bo_table
from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id)
where a.bo_device <> 'mobile' ";
if(!$is_admin)
$sql .= " and a.bo_use_cert = '' ";
$sql .= " and a.bo_use_cert = '' ";
$sql .= " and a.bo_table not in ('notice', 'gallery') "; //공지사항과 갤러리 게시판은 제외
$sql .= " order by b.gr_order, a.bo_order ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$lt_style = '';
if ($i%3 !== 0 ) $lt_style = "margin-left:2%";
if ($i%2==1) $lt_style = "margin-left:2%";
else $lt_style = "";
?>
<div style="float:left;<?php echo $lt_style ?>" class="lt_wr">
<?php
@@ -66,7 +48,20 @@ include_once(G5_PATH.'/head.php');
}
?>
<!-- } 최신글 끝 -->
</div>
<div class="latest_wr">
<!-- 사진 최신글2 { -->
<?php
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
// 테마의 스킨을 사용하려면 theme/basic 과 같이 지정
echo latest('pic_basic', 'gallery', 5, 23);
?>
<!-- } 사진 최신글2 끝 -->
</div>
<?php
include_once(G5_PATH.'/tail.php');
?>
-3
View File
@@ -4,9 +4,6 @@ include_once('../lib/json.lib.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'); // 데이타 가져오는 함수 모음
$data_path = '../'.G5_DATA_DIR;
// 파일이 존재한다면 설치할 수 없다.
+32 -43
View File
@@ -186,10 +186,10 @@ CREATE TABLE IF NOT EXISTS `g5_board_new` (
DROP TABLE IF EXISTS `g5_config`;
CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_title` varchar(255) NOT NULL DEFAULT '',
`cf_theme` varchar(100) NOT NULL DEFAULT '',
`cf_admin` varchar(100) NOT NULL DEFAULT '',
`cf_admin_email` varchar(100) NOT NULL DEFAULT '',
`cf_admin_email_name` varchar(100) NOT NULL DEFAULT '',
`cf_theme` varchar(255) NOT NULL DEFAULT '',
`cf_admin` varchar(255) NOT NULL DEFAULT '',
`cf_admin_email` varchar(255) NOT NULL DEFAULT '',
`cf_admin_email_name` varchar(255) NOT NULL DEFAULT '',
`cf_add_script` text NOT NULL,
`cf_use_point` tinyint(4) NOT NULL DEFAULT '0',
`cf_point_term` int(11) NOT NULL DEFAULT '0',
@@ -198,26 +198,25 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_login_point` int(11) NOT NULL DEFAULT '0',
`cf_cut_name` tinyint(4) NOT NULL DEFAULT '0',
`cf_nick_modify` int(11) NOT NULL DEFAULT '0',
`cf_new_skin` varchar(50) NOT NULL DEFAULT '',
`cf_new_skin` varchar(255) NOT NULL DEFAULT '',
`cf_new_rows` int(11) NOT NULL DEFAULT '0',
`cf_search_skin` varchar(50) NOT NULL DEFAULT '',
`cf_connect_skin` varchar(50) NOT NULL DEFAULT '',
`cf_faq_skin` varchar(50) NOT NULL DEFAULT '',
`cf_search_skin` varchar(255) NOT NULL DEFAULT '',
`cf_connect_skin` varchar(255) NOT NULL DEFAULT '',
`cf_faq_skin` varchar(255) NOT NULL DEFAULT '',
`cf_read_point` int(11) NOT NULL DEFAULT '0',
`cf_write_point` int(11) NOT NULL DEFAULT '0',
`cf_comment_point` int(11) NOT NULL DEFAULT '0',
`cf_download_point` int(11) NOT NULL DEFAULT '0',
`cf_write_pages` int(11) NOT NULL DEFAULT '0',
`cf_mobile_pages` int(11) NOT NULL DEFAULT '0',
`cf_link_target` varchar(50) NOT NULL DEFAULT '',
`cf_bbs_rewrite` tinyint(4) NOT NULL DEFAULT '0',
`cf_link_target` varchar(255) NOT NULL DEFAULT '',
`cf_delay_sec` int(11) NOT NULL DEFAULT '0',
`cf_filter` text NOT NULL,
`cf_possible_ip` text NOT NULL,
`cf_intercept_ip` text NOT NULL,
`cf_analytics` text NOT NULL,
`cf_add_meta` text NOT NULL,
`cf_member_skin` varchar(50) NOT NULL DEFAULT '',
`cf_member_skin` varchar(255) NOT NULL DEFAULT '',
`cf_use_homepage` tinyint(4) NOT NULL DEFAULT '0',
`cf_req_homepage` tinyint(4) NOT NULL DEFAULT '0',
`cf_use_tel` tinyint(4) NOT NULL DEFAULT '0',
@@ -273,44 +272,44 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_privacy` text NOT NULL,
`cf_open_modify` int(11) NOT NULL DEFAULT '0',
`cf_memo_send_point` int(11) NOT NULL DEFAULT '0',
`cf_mobile_new_skin` varchar(50) NOT NULL DEFAULT '',
`cf_mobile_search_skin` varchar(50) NOT NULL DEFAULT '',
`cf_mobile_connect_skin` varchar(50) NOT NULL DEFAULT '',
`cf_mobile_faq_skin` varchar(50) NOT NULL DEFAULT '',
`cf_mobile_member_skin` varchar(50) NOT NULL DEFAULT '',
`cf_mobile_new_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_search_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_connect_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_faq_skin` varchar(255) NOT NULL DEFAULT '',
`cf_mobile_member_skin` varchar(255) NOT NULL DEFAULT '',
`cf_captcha_mp3` varchar(255) NOT NULL DEFAULT '',
`cf_editor` varchar(50) NOT NULL DEFAULT '',
`cf_editor` varchar(255) NOT NULL DEFAULT '',
`cf_cert_use` tinyint(4) NOT NULL DEFAULT '0',
`cf_cert_ipin` varchar(255) NOT NULL DEFAULT '',
`cf_cert_hp` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcb_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcp_cd` varchar(255) NOT NULL DEFAULT '',
`cf_lg_mid` varchar(100) NOT NULL DEFAULT '',
`cf_lg_mert_key` varchar(100) NOT NULL DEFAULT '',
`cf_lg_mid` varchar(255) NOT NULL DEFAULT '',
`cf_lg_mert_key` varchar(255) NOT NULL DEFAULT '',
`cf_cert_limit` int(11) NOT NULL DEFAULT '0',
`cf_cert_req` tinyint(4) NOT NULL DEFAULT '0',
`cf_sms_use` varchar(255) NOT NULL DEFAULT '',
`cf_sms_type` varchar(10) NOT NULL DEFAULT '',
`cf_icode_id` varchar(255) NOT NULL DEFAULT '',
`cf_icode_pw` varchar(255) NOT NULL DEFAULT '',
`cf_icode_server_ip` varchar(50) NOT NULL DEFAULT '',
`cf_icode_server_port` varchar(50) NOT NULL DEFAULT '',
`cf_googl_shorturl_apikey` varchar(50) NOT NULL DEFAULT '',
`cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '',
`cf_icode_server_port` varchar(255) NOT NULL DEFAULT '',
`cf_googl_shorturl_apikey` varchar(255) NOT NULL DEFAULT '',
`cf_social_login_use` tinyint(4) NOT NULL DEFAULT '0',
`cf_social_servicelist` varchar(255) NOT NULL DEFAULT '',
`cf_payco_clientid` varchar(100) NOT NULL DEFAULT '',
`cf_payco_secret` varchar(100) NOT NULL DEFAULT '',
`cf_facebook_appid` varchar(100) NOT NULL,
`cf_facebook_secret` varchar(100) NOT NULL,
`cf_twitter_key` varchar(100) NOT NULL,
`cf_twitter_secret` varchar(100) NOT NULL,
`cf_facebook_appid` varchar(255) NOT NULL,
`cf_facebook_secret` varchar(255) NOT NULL,
`cf_twitter_key` varchar(255) NOT NULL,
`cf_twitter_secret` varchar(255) NOT NULL,
`cf_google_clientid` varchar(100) NOT NULL DEFAULT '',
`cf_google_secret` varchar(100) NOT NULL DEFAULT '',
`cf_naver_clientid` varchar(100) NOT NULL DEFAULT '',
`cf_naver_secret` varchar(100) NOT NULL DEFAULT '',
`cf_kakao_rest_key` varchar(100) NOT NULL DEFAULT '',
`cf_kakao_client_secret` varchar(100) NOT NULL DEFAULT '',
`cf_kakao_js_apikey` varchar(100) NOT NULL,
`cf_kakao_js_apikey` varchar(255) NOT NULL,
`cf_captcha` varchar(100) NOT NULL DEFAULT '',
`cf_recaptcha_site_key` varchar(100) NOT NULL DEFAULT '',
`cf_recaptcha_secret_key` varchar(100) NOT NULL DEFAULT '',
@@ -417,7 +416,7 @@ CREATE TABLE IF NOT EXISTS `g5_group_member` (
DROP TABLE IF EXISTS `g5_login`;
CREATE TABLE IF NOT EXISTS `g5_login` (
`lo_ip` varchar(100) NOT NULL default '',
`lo_ip` varchar(255) NOT NULL default '',
`mb_id` varchar(20) NOT NULL default '',
`lo_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`lo_location` text NOT NULL,
@@ -491,8 +490,6 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
`mb_open_date` date NOT NULL default '0000-00-00',
`mb_profile` text NOT NULL,
`mb_memo_call` varchar(255) NOT NULL default '',
`mb_memo_cnt` int(11) NOT NULL DEFAULT '0',
`mb_scrap_cnt` int(11) NOT NULL default '0',
`mb_1` varchar(255) NOT NULL default '',
`mb_2` varchar(255) NOT NULL default '',
`mb_3` varchar(255) NOT NULL default '',
@@ -517,15 +514,12 @@ CREATE TABLE IF NOT EXISTS `g5_member` (
DROP TABLE IF EXISTS `g5_memo`;
CREATE TABLE IF NOT EXISTS `g5_memo` (
`me_id` INT(11) NOT NULL AUTO_INCREMENT,
`me_id` int(11) NOT NULL default '0',
`me_recv_mb_id` varchar(20) NOT NULL default '',
`me_send_mb_id` varchar(20) NOT NULL default '',
`me_send_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`me_read_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`me_memo` text NOT NULL,
`me_send_id` INT(11) NOT NULL DEFAULT '0',
`me_type` ENUM('send','recv') NOT NULL DEFAULT 'recv',
`me_send_ip` VARCHAR(100) NOT NULL DEFAULT '',
PRIMARY KEY (`me_id`),
KEY `me_recv_mb_id` (`me_recv_mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -549,7 +543,7 @@ CREATE TABLE IF NOT EXISTS `g5_point` (
`po_mb_point` int(11) NOT NULL default '0',
`po_rel_table` varchar(20) NOT NULL default '',
`po_rel_id` varchar(20) NOT NULL default '',
`po_rel_action` varchar(100) NOT NULL default '',
`po_rel_action` varchar(255) NOT NULL default '',
PRIMARY KEY (`po_id`),
KEY `index1` (`mb_id`,`po_rel_table`,`po_rel_id`,`po_rel_action`),
KEY `index2` (`po_expire_date`)
@@ -651,14 +645,11 @@ CREATE TABLE IF NOT EXISTS `g5_scrap` (
DROP TABLE IF EXISTS `g5_visit`;
CREATE TABLE IF NOT EXISTS `g5_visit` (
`vi_id` int(11) NOT NULL default '0',
`vi_ip` varchar(100) NOT NULL default '',
`vi_ip` varchar(255) NOT NULL default '',
`vi_date` date NOT NULL default '0000-00-00',
`vi_time` time NOT NULL default '00:00:00',
`vi_referer` text NOT NULL,
`vi_agent` varchar(200) NOT NULL default '',
`vi_browser` varchar(255) NOT NULL DEFAULT '',
`vi_os` varchar(255) NOT NULL DEFAULT '',
`vi_device` varchar(255) NOT NULL DEFAULT '',
`vi_agent` varchar(255) NOT NULL default '',
PRIMARY KEY (`vi_id`),
UNIQUE KEY `index1` (`vi_ip`,`vi_date`),
KEY `index2` (`vi_date`)
@@ -807,7 +798,6 @@ CREATE TABLE IF NOT EXISTS `g5_content` (
`co_html` tinyint(4) NOT NULL DEFAULT '0',
`co_subject` varchar(255) NOT NULL DEFAULT '',
`co_content` longtext NOT NULL,
`co_seo_title` varchar(255) NOT NULL DEFAULT '',
`co_mobile_content` longtext NOT NULL,
`co_skin` varchar(255) NOT NULL DEFAULT '',
`co_mobile_skin` varchar(255) NOT NULL DEFAULT '',
@@ -815,8 +805,7 @@ CREATE TABLE IF NOT EXISTS `g5_content` (
`co_hit` int(11) NOT NULL DEFAULT '0',
`co_include_head` varchar(255) NOT NULL,
`co_include_tail` varchar(255) NOT NULL,
PRIMARY KEY (`co_id`),
KEY `co_seo_title` (`co_seo_title`)
PRIMARY KEY (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
+6 -16
View File
@@ -13,11 +13,6 @@ 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');
@@ -66,7 +61,7 @@ if (!$select_db) {
}
$mysql_set_mode = 'false';
sql_set_charset(G5_DB_CHARSET, $dblink);
sql_set_charset('utf8', $dblink);
$result = sql_query(" SELECT @@sql_mode as mode ", true, $dblink);
$row = sql_fetch_array($result);
if($row['mode']) {
@@ -91,10 +86,7 @@ $file = preg_replace('/`g5_([^`]+`)/', '`'.$table_prefix.'$1', $file);
$f = explode(';', $file);
for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == '') continue;
$sql = get_db_create_replace($f[$i]);
sql_query($sql, true, $dblink);
sql_query($f[$i], true, $dblink);
}
// 테이블 생성 ------------------------------------
?>
@@ -188,7 +180,7 @@ sql_query($sql, true, $dblink);
// 관리자 회원가입
$sql = " insert into `{$table_prefix}member`
set mb_id = '$admin_id',
mb_password = '".get_encrypt_string($admin_pass)."',
mb_password = PASSWORD('$admin_pass'),
mb_name = '$admin_name',
mb_nick = '$admin_name',
mb_email = '$admin_email',
@@ -202,9 +194,9 @@ $sql = " insert into `{$table_prefix}member`
sql_query($sql, true, $dblink);
// 내용관리 생성
sql_query(" insert into `{$table_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_seo_title = '".generate_seo_title('회사소개')."', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ", true, $dblink);
sql_query(" insert into `{$table_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_seo_title = '".generate_seo_title('개인정보 처리방침')."', co_content= '<p align=center><b>개인정보 처리방침에 대한 내용을 입력하십시오.</b></p>' ", true, $dblink);
sql_query(" insert into `{$table_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_seo_title = '".generate_seo_title('서비스 이용약관')."', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ", true, $dblink);
sql_query(" insert into `{$table_prefix}content` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ", true, $dblink);
sql_query(" insert into `{$table_prefix}content` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '<p align=center><b>개인정보 처리방침에 대한 내용을 입력하십시오.</b></p>' ", true, $dblink);
sql_query(" insert into `{$table_prefix}content` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ", true, $dblink);
// FAQ Master
sql_query(" insert into `{$table_prefix}faq_master` set fm_id = '1', fm_subject = '자주하시는 질문' ", true, $dblink);
@@ -291,8 +283,6 @@ for ($i=0; $i<count($tmp_bo_table); $i++)
// 게시판 테이블 생성
$file = file("../adm/sql_write.sql");
$file = get_db_create_replace($file);
$sql = implode($file, "\n");
$create_table = $table_prefix.'write_' . $tmp_bo_table[$i];
-5
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-186
View File
@@ -1,186 +0,0 @@
/**
* Owl Carousel v2.3.4
* Copyright 2013-2018 David Deutsch
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
*/
/*
* Owl Carousel - Core
*/
.owl-carousel {
display: none;
width: 100%;
-webkit-tap-highlight-color: transparent;
/* position relative and z-index fix webkit rendering fonts issue */
position: relative;
z-index: 1; }
.owl-carousel .owl-stage {
position: relative;
-ms-touch-action: pan-Y;
touch-action: manipulation;
-moz-backface-visibility: hidden;
/* fix firefox animation glitch */ }
.owl-carousel .owl-stage:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0; }
.owl-carousel .owl-stage-outer {
position: relative;
overflow: hidden;
/* fix for flashing background */
-webkit-transform: translate3d(0px, 0px, 0px); }
.owl-carousel .owl-wrapper,
.owl-carousel .owl-item {
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0); }
.owl-carousel .owl-item {
position: relative;
min-height: 1px;
float: left;
-webkit-backface-visibility: hidden;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none; }
.owl-carousel .owl-item img {
display: block;
width: 100%; }
.owl-carousel .owl-nav.disabled,
.owl-carousel .owl-dots.disabled {
display: none; }
.owl-carousel .owl-nav .owl-prev,
.owl-carousel .owl-nav .owl-next,
.owl-carousel .owl-dot {
cursor: pointer;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next,
.owl-carousel button.owl-dot {
background: none;
color: inherit;
border: none;
padding: 0 !important;
font: inherit; }
.owl-carousel.owl-loaded {
display: block; }
.owl-carousel.owl-loading {
opacity: 0;
display: block; }
.owl-carousel.owl-hidden {
opacity: 0; }
.owl-carousel.owl-refresh .owl-item {
visibility: hidden; }
.owl-carousel.owl-drag .owl-item {
-ms-touch-action: pan-y;
touch-action: pan-y;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
.owl-carousel.owl-grab {
cursor: move;
cursor: grab; }
.owl-carousel.owl-rtl {
direction: rtl; }
.owl-carousel.owl-rtl .owl-item {
float: right; }
/* No Js */
.no-js .owl-carousel {
display: block; }
/*
* Owl Carousel - Animate Plugin
*/
.owl-carousel .animated {
animation-duration: 1000ms;
animation-fill-mode: both; }
.owl-carousel .owl-animated-in {
z-index: 0; }
.owl-carousel .owl-animated-out {
z-index: 1; }
.owl-carousel .fadeOut {
animation-name: fadeOut; }
@keyframes fadeOut {
0% {
opacity: 1; }
100% {
opacity: 0; } }
/*
* Owl Carousel - Auto Height Plugin
*/
.owl-height {
transition: height 500ms ease-in-out; }
/*
* Owl Carousel - Lazy Load Plugin
*/
.owl-carousel .owl-item {
/**
This is introduced due to a bug in IE11 where lazy loading combined with autoheight plugin causes a wrong
calculation of the height of the owl-item that breaks page layouts
*/ }
.owl-carousel .owl-item .owl-lazy {
opacity: 0;
transition: opacity 400ms ease; }
.owl-carousel .owl-item .owl-lazy[src^=""], .owl-carousel .owl-item .owl-lazy:not([src]) {
max-height: 0; }
.owl-carousel .owl-item img.owl-lazy {
transform-style: preserve-3d; }
/*
* Owl Carousel - Video Plugin
*/
.owl-carousel .owl-video-wrapper {
position: relative;
height: 100%;
background: #000; }
.owl-carousel .owl-video-play-icon {
position: absolute;
height: 80px;
width: 80px;
left: 50%;
top: 50%;
margin-left: -40px;
margin-top: -40px;
background: url("owl.video.play.png") no-repeat;
cursor: pointer;
z-index: 1;
-webkit-backface-visibility: hidden;
transition: transform 100ms ease; }
.owl-carousel .owl-video-play-icon:hover {
-ms-transform: scale(1.3, 1.3);
transform: scale(1.3, 1.3); }
.owl-carousel .owl-video-playing .owl-video-tn,
.owl-carousel .owl-video-playing .owl-video-play-icon {
display: none; }
.owl-carousel .owl-video-tn {
opacity: 0;
height: 100%;
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
transition: opacity 400ms ease; }
.owl-carousel .owl-video-frame {
position: relative;
z-index: 1;
height: 100%;
width: 100%; }
File diff suppressed because it is too large Load Diff
-6
View File
@@ -1,6 +0,0 @@
/**
* Owl Carousel v2.3.4
* Copyright 2013-2018 David Deutsch
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
*/
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
File diff suppressed because one or more lines are too long
-187
View File
@@ -1,187 +0,0 @@
<?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);
}
}
?>
-92
View File
@@ -1,92 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
Class G5_object_cache {
public $writes = array();
public $contents = array();
public $etcs = array();
function get($type, $key, $group ='default') {
switch ($type) {
case 'bbs':
$datas = $this->writes;
break;
case 'content' :
$datas = $this->contents;
break;
default :
$datas = $this->etcs;
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;
default :
$datas = $this->etcs;
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;
default :
$datas = $this->etcs[$group][$key] = $data;
break;
}
}
function delete($key, $group='default') {
switch ($type) {
case 'bbs':
$datas = $this->writes;
break;
case 'content':
$datas = $this->contents;
break;
default :
$datas = $this->etcs;
break;
}
if ( ! $this->exists('bbs', $key, $group) )
return false;
unset( $datas[$group][$key] );
return true;
}
} //end Class
?>
-327
View File
@@ -1,327 +0,0 @@
<?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();
}
}
?>
-161
View File
@@ -1,161 +0,0 @@
<?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
?>
-167
View File
@@ -1,167 +0,0 @@
<?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($string_url) {
/* convert normal URL query string to clean URL */
$url=parse_url($string_url);
$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($string_url, $add_qry='') {
global $config, $g5;
$string_url = str_replace('&amp;', '&', $string_url);
$url=parse_url($string_url);
$page_name = basename($url['path'],".php");
$array_page_names = run_replace('url_clean_page_names', array('board', 'write'));
if( strpos($string_url, G5_BBS_URL) === false || ! in_array($page_name, $array_page_names) ){ //게시판이 아니면 리턴
return $string_url;
}
$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)) $page_name .= "/".$v;
if( $page_name === 'write' ){
$vars['action'] = 'write';
$allow_param_keys = array('bo_table'=>'', 'action'=>'');
} else {
$allow_param_keys = array('bo_table'=>'', 'wr_id'=>'');
}
$s = array();
foreach( $allow_param_keys as $key=>$v ){
if( !isset($vars[$key]) || empty($vars[$key]) ) continue;
$add = '';
$s[$key] = $vars[$key];
}
if( $config['cf_bbs_rewrite'] > 1 && $page_name === 'board' && (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']) ){
$array_file_paths = run_replace('url_clean_page_paths', array('/'.G5_BBS_DIR.'/board.php', '/'.G5_BBS_DIR.'/write.php'));
$str_path = isset($url['path']) ? $url['path'] : '';
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https://' : 'http://';
$host = $http.$url['host'].str_replace($array_file_paths, '', $str_path);
}
$add_param = '';
if( $result = array_diff_key($vars, $allow_param_keys ) ){
$add_param = '?'.http_build_query($result,'','&amp;');
}
if( $add_qry ){
$add_param .= $add_param ? '&amp;'.$add_qry : '?'.$add_qry;
}
while(list($k,$v) = each($s)) $return_url .= '/'.$v;
return $host.$return_url.$add_param.$fragment;
}
}
?>
-95
View File
@@ -1,95 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
include_once(dirname(__FILE__) .'/Cache/obj.class.php');
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);
}
run_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;
}
?>
+50 -195
View File
@@ -1,8 +1,6 @@
<?php
if (!defined('_GNUBOARD_')) exit;
include_once(dirname(__FILE__) .'/pbkdf2.compat.php');
/*************************************************************************
**
** 일반 함수 모음
@@ -154,8 +152,6 @@ function alert($msg='', $url='', $error=true, $post=false)
{
global $g5, $config, $member;
global $is_admin;
run_event('alert', $msg, $url, $error, $post);
$msg = $msg ? strip_tags($msg, '<br>') : '올바른 방법으로 이용해 주십시오.';
@@ -173,8 +169,6 @@ function alert_close($msg, $error=true)
{
global $g5;
run_event('alert_close', $msg, $error);
$msg = strip_tags($msg, '<br>');
$header = '';
@@ -251,7 +245,7 @@ function url_auto_link($str)
$str = preg_replace("/\t_gt_\t/", "&gt;", $str);
*/
return run_replace('url_auto_link', $str);
return $str;
}
@@ -342,13 +336,11 @@ function get_dirsize($dir)
// 게시물 정보($write_row)를 출력하기 위하여 $list로 가공된 정보를 복사 및 가공
function get_list($write_row, $board, $skin_url, $subject_len=40)
{
global $g5, $config, $g5_object;
global $g5, $config;
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);
@@ -361,10 +353,6 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
else
$list['subject'] = conv_subject($list['wr_subject'], $board['bo_subject_len'], '…');
if( ! (isset($list['wr_seo_title']) && $list['wr_seo_title']) && $list['wr_id'] ){
seo_title_update(get_write_table_name($board['bo_table']), $list['wr_id'], 'bbs');
}
// 목록에서 내용 미리보기 사용한 게시판만 내용을 변환함 (속도 향상) : kkal3(커피)님께서 알려주셨습니다.
if ($board['bo_use_list_content'])
{
@@ -418,9 +406,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'] = get_pretty_url($board['bo_table'], '', 'sca='.urlencode($list['ca_name']));
$list['ca_name_href'] = G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&amp;sca='.urlencode($list['ca_name']);
$list['href'] = get_pretty_url($board['bo_table'], $list['wr_id'], $qstr);
$list['href'] = G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'&amp;wr_id='.$list['wr_id'].$qstr;
$list['comment_href'] = $list['href'];
$list['icon_new'] = '';
@@ -695,25 +683,14 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
return $str;
}
// 게시판 테이블에서 하나의 행을 읽음
function get_write($write_table, $wr_id, $is_cache=false)
function get_write($write_table, $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;
return sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
}
// 게시판의 다음글 번호를 얻는다.
function get_next_num($table)
{
@@ -726,47 +703,22 @@ function get_next_num($table)
// 그룹 설정 테이블에서 하나의 행을 읽음
function get_group($gr_id, $is_cache=false)
function get_group($gr_id)
{
global $g5;
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] = run_replace('get_group', sql_fetch($sql), $gr_id, $is_cache);
return $cache[$key];
return sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
}
// 회원 정보를 얻는다.
function get_member($mb_id, $fields='*', $is_cache=false)
function get_member($mb_id, $fields='*')
{
global $g5;
$mb_id = preg_replace("/[^0-9a-z_]+/i", "", $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] = run_replace('get_member', sql_fetch($sql), $mb_id, $fields, $is_cache);
return $cache[$mb_id][$key];
return sql_fetch(" select $fields from {$g5['member_table']} where mb_id = TRIM('$mb_id') ");
}
@@ -845,19 +797,12 @@ function is_admin($mb_id)
{
global $config, $group, $board;
if (!$mb_id) return '';
if (!$mb_id) return;
$is_authority = '';
if ($config['cf_admin'] == $mb_id){
$is_authority = 'super';
} else if (isset($group['gr_admin']) && ($group['gr_admin'] == $mb_id)){
$is_authority = 'group';
} else if (isset($board['bo_admin']) && ($board['bo_admin'] == $mb_id)){
$is_authority = 'board';
}
return run_replace('is_admin', $is_authority, $mb_id);
if ($config['cf_admin'] == $mb_id) return 'super';
if (isset($group['gr_admin']) && ($group['gr_admin'] == $mb_id)) return 'group';
if (isset($board['bo_admin']) && ($board['bo_admin'] == $mb_id)) return 'board';
return '';
}
@@ -1271,7 +1216,8 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
global $g5;
global $bo_table, $sca, $is_admin, $member;
$email = get_string_encrypt($email);
$email_enc = new str_encrypt();
$email = $email_enc->encrypt($email);
$homepage = set_http(clean_xss_tags($homepage));
$name = get_text($name, 0, true);
@@ -1279,20 +1225,18 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
$homepage = get_text($homepage);
$tmp_name = "";
$en_mb_id = $mb_id;
if ($mb_id) {
//$tmp_name = "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" class=\"sv_member\" title=\"$name 자기소개\" rel="nofollow" target=\"_blank\" onclick=\"return false;\">$name</a>";
$tmp_name = '<a href="'.G5_BBS_URL.'/profile.php?mb_id='.$mb_id.'" class="sv_member" title="'.$name.' 자기소개" target="_blank" rel="nofollow" onclick="return false;">';
if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif';
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
if (file_exists($icon_file)) {
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$icon_file_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif';
$icon_file_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
$tmp_name .= '<span class="profile_img"><img src="'.$icon_file_url.'" width="'.$width.'" height="'.$height.'" alt=""></span>';
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
@@ -1316,7 +1260,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
if(!$bo_table)
return $name;
$tmp_name = '<a href="'.get_pretty_url($bo_table, '', 'sca='.$sca.'&amp;sfl=wr_name,1&amp;stx='.$name).'" title="'.$name.' 이름으로 검색" class="sv_guest" rel="nofollow" onclick="return false;">'.$name.'</a>';
$tmp_name = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;sca='.$sca.'&amp;sfl=wr_name,1&amp;stx='.$name.'" title="'.$name.' 이름으로 검색" class="sv_guest" rel="nofollow" onclick="return false;">'.$name.'</a>';
$title_mb_id = '[비회원]';
}
@@ -1333,11 +1277,10 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
if($mb_id)
$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=\"".get_pretty_url($bo_table, '', "sca=".$sca."&amp;sfl=mb_id,1&amp;stx=".$en_mb_id)."\">아이디로 검색</a>\n";
} else {
$str2 .= "<a href=\"".get_pretty_url($bo_table, '', "sca=".$sca."&amp;sfl=wr_name,1&amp;stx=".$name)."\">이름으로 검색</a>\n";
}
if($mb_id)
$str2 .= "<a href=\"".G5_BBS_URL."/board.php?bo_table=".$bo_table."&amp;sca=".$sca."&amp;sfl=mb_id,1&amp;stx=".$mb_id."\">아이디로 검색</a>\n";
else
$str2 .= "<a href=\"".G5_BBS_URL."/board.php?bo_table=".$bo_table."&amp;sca=".$sca."&amp;sfl=wr_name,1&amp;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";
@@ -1537,21 +1480,12 @@ function sql_set_charset($charset, $link=null)
mysql_query(" set names {$charset} ", $link);
}
function sql_data_seek($result, $offset=0)
{
if ( ! $result ) return;
if(function_exists('mysqli_set_charset') && G5_MYSQLI_USE)
mysqli_data_seek($result, $offset);
else
mysql_data_seek($result, $offset);
}
// mysqli_query 와 mysqli_error 를 한꺼번에 처리
// mysql connect resource 지정 - 명랑폐인님 제안
function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null)
{
global $g5, $g5_debug;
global $g5;
if(!$link)
$link = $g5['connect_db'];
@@ -1564,10 +1498,6 @@ 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']}");
@@ -1582,15 +1512,6 @@ 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;
}
@@ -2076,16 +1997,6 @@ 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 );
@@ -2097,9 +2008,8 @@ function utf8_strcut( $str, $size, $suffix='...' )
$str = preg_replace( '/(([\x80-\xff]{3})*?)([\x80-\xff]{0,2})$/', '$1', $str );
$str .= $suffix;
}
}
return $str;
return $str;
}
@@ -2258,7 +2168,11 @@ function delete_cache_latest($bo_table)
return;
}
g5_delete_cache_by_prefix('latest-'.$bo_table.'-');
$files = glob(G5_DATA_PATH.'/cache/latest-'.$bo_table.'-*');
if (is_array($files)) {
foreach ($files as $filename)
unlink($filename);
}
}
// 게시판 첨부파일 썸네일 삭제
@@ -2542,8 +2456,6 @@ class html_process {
}
array_multisort($order, SORT_ASC, $index, SORT_ASC, $links);
$links = run_replace('html_process_css_files', $links);
foreach($links as $link) {
if(!trim($link[1]))
@@ -2570,8 +2482,6 @@ class html_process {
}
array_multisort($order, SORT_ASC, $index, SORT_ASC, $scripts);
$scripts = run_replace('html_process_script_files', $scripts);
foreach($scripts as $js) {
if(!trim($js[1]))
@@ -2600,17 +2510,6 @@ class html_process {
if($javascript)
$nl = "\n";
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript{$nl}$1", $buffer);
$meta_tag = run_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;
}
@@ -2782,16 +2681,10 @@ function get_qa_config($fld='*')
{
global $g5;
static $cache = array();
$sql = " select $fld from {$g5['qa_config_table']} ";
$row = sql_fetch($sql);
if( $is_cache && !empty($cache) ){
return $cache;
}
$sql = " select * from {$g5['qa_config_table']} ";
$cache = run_replace('get_qa_config', sql_fetch($sql));
return $cache;
return $row;
}
// get_sock 함수 대체
@@ -3161,43 +3054,11 @@ function get_encrypt_string($str)
// 비밀번호 비교
function check_password($pass, $hash)
{
if(defined('G5_STRING_ENCRYPT_FUNCTION') && G5_STRING_ENCRYPT_FUNCTION === 'create_hash') {
return validate_password($pass, $hash);
}
$password = get_encrypt_string($pass);
return ($password === $hash);
}
// 로그인 패스워드 체크
function login_password_check($mb, $pass, $hash)
{
global $g5;
$mb_id = isset($mb['mb_id']) ? $mb['mb_id'] : '';
if(!$mb_id)
return false;
if(G5_STRING_ENCRYPT_FUNCTION === 'create_hash' && strlen($hash) === G5_MYSQL_PASSWORD_LENGTH) {
if( sql_password($pass) === $hash ){
if( ! isset($mb['mb_password2']) ){
$sql = "ALTER TABLE `{$g5['member_table']}` ADD `mb_password2` varchar(255) NOT NULL default '' AFTER `mb_password`";
sql_query($sql);
}
$new_password = create_hash($pass);
$sql = " update {$g5['member_table']} set mb_password = '$new_password', mb_password2 = '$hash' where mb_id = '$mb_id' ";
sql_query($sql);
return true;
}
}
return check_password($pass, $hash);
}
// 동일한 host url 인지
function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
{
@@ -3346,19 +3207,22 @@ function clean_query_string($query, $amp=true)
return $str;
}
function get_params_merge_url($params){
function get_device_change_url()
{
$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);
@@ -3367,25 +3231,16 @@ function get_params_merge_url($params){
}
}
if( is_array($params) ){
$q = array_merge($q, $params);
if(!empty($q)) {
$query = http_build_query($q, '', '&amp;');
$href .= '?'.$query.'&amp;'.$device;
} else {
$href .= '?'.$device;
}
$query = http_build_query($q, '', '&amp;');
$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)
{
@@ -3530,7 +3385,7 @@ function get_member_profile_img($mb_id='', $width='', $height='', $alt='profile_
if( isset($member_cache[$mb_id]) ){
$src = $member_cache[$mb_id];
} else {
$member_img = G5_DATA_PATH.'/member_image/'.substr($mb_id,0,2).'/'.get_mb_icon_name($mb_id).'.gif';
$member_img = G5_DATA_PATH.'/member_image/'.substr($mb_id,0,2).'/'.$mb_id.'.gif';
if (is_file($member_img)) {
$member_cache[$mb_id] = $src = str_replace(G5_DATA_PATH, G5_DATA_URL, $member_img);
}
-393
View File
@@ -1,393 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
function get_config($is_cache=false){
global $g5;
static $cache = array();
$cache = run_replace('get_config_cache', $cache, $is_cache);
if( $is_cache && !empty($cache) ){
return $cache;
}
$sql = " select * from {$g5['config_table']} ";
$cache = run_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 = run_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] = run_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 run_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_class_encrypt(){
static $cache;
if( $cache && is_object($obj) ){
return $cache;
}
$cache = run_replace('get_class_encrypt', new str_encrypt());
return $cache;
}
function get_string_encrypt($str){
$new = get_class_encrypt();
$encrypt_str = $new->encrypt($str);
return $encrypt_str;
}
function get_string_decrypt($str){
$new = get_class_encrypt();
$decrypt_str = $new->decrypt($str);
return $decrypt_str;
}
function get_permission_debug_show(){
global $member;
$bool = false;
if ( defined('G5_DEBUG') && G5_DEBUG ){
$bool = true;
}
return run_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_mb_icon_name($mb_id){
if( $icon_name = run_replace('get_mb_icon_name', '', $mb_id) ){
return $icon_name;
}
return $mb_id;
}
// 생성되면 안되는 게시판명
function get_bo_table_banned_word(){
$folders = array();
foreach(glob(G5_PATH.'/*', GLOB_ONLYDIR) as $dir) {
$folders[] = basename($dir);
}
return run_replace('get_bo_table_banned_word', $folders);
}
function get_board_sfl_select_options($sfl){
global $is_admin;
$str = '';
$str .= '<option value="wr_subject" '.get_selected($sfl, 'wr_subject', true).'>제목</option>';
$str .= '<option value="wr_content" '.get_selected($sfl, 'wr_content').'>내용</option>';
$str .= '<option value="wr_subject||wr_content" '.get_selected($sfl, 'wr_subject||wr_content').'>제목+내용</option>';
if ( $is_admin ){
$str .= '<option value="mb_id,1" '.get_selected($sfl, 'mb_id,1').'>회원아이디</option>';
$str .= '<option value="mb_id,0" '.get_selected($sfl, 'mb_id,0').'>회원아이디(코)</option>';
}
$str .= '<option value="wr_name,1" '.get_selected($sfl, 'wr_name,1').'>글쓴이</option>';
$str .= '<option value="wr_name,0" '.get_selected($sfl, 'wr_name,0').'>글쓴이(코)</option>';
return run_replace('get_board_sfl_select_options', $str, $sfl);
}
// 읽지 않은 메모 갯수 반환
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'];
}
?>
-134
View File
@@ -1,134 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
define('G5_HOOK_DEFAULT_PRIORITY', 8);
if (!function_exists('get_called_class')) {
function get_called_class() {
$bt = debug_backtrace();
$lines = file($bt[1]['file']);
preg_match(
'/([a-zA-Z0-9\_]+)::'.$bt[1]['function'].'/',
$lines[$bt[1]['line']-1],
$matches
);
return $matches[1];
}
}
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 add_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
if( $hook = get_hook_class() ){
$hook->addAction($tag, $func, $priority, $args);
}
}
function run_event($tag, $arg = ''){
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 add_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
if( $hook = get_hook_class() ){
return $hook->addFilter($tag, $func, $priority, $args);
}
return null;
}
function run_replace($tag, $arg = ''){
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;
}
?>
+40 -37
View File
@@ -1,6 +1,5 @@
<?php
if (!defined('_GNUBOARD_')) exit;
@include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// 최신글 추출
// $cache_time 캐시 갱신시간
@@ -31,26 +30,46 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
}
}
$caches = null;
$cache_fwrite = false;
if(G5_USE_CACHE) {
$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);
$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();
}
}
}
}
if( $caches === false ){
if(!G5_USE_CACHE || $cache_fwrite) {
$list = array();
$board = get_board_db($bo_table, true);
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
$bo_subject = get_text($board['bo_subject']);
$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 {
@@ -63,38 +82,22 @@ 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);
$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 && is_string($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) {
if($cache_fwrite) {
$handle = fopen($cache_file, 'w');
$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
g5_set_cache($cache_file_name, $caches, 3600 * $cache_time);
fwrite($handle, $cache_content);
fclose($handle);
@chmod($cache_file, 0640);
}
} else {
$list = $cache_list;
$bo_subject = (is_array($caches) && isset($caches['bo_subject'])) ? $caches['bo_subject'] : '';
}
ob_start();
+5 -8
View File
@@ -36,13 +36,10 @@ function outlogin($skin_dir='basic')
// 읽지 않은 쪽지가 있다면
if ($is_member) {
if( isset($member['mb_memo_cnt']) ){
$memo_not_read = $member['mb_memo_cnt'];
} else {
$memo_not_read = get_memo_not_read($member['mb_id']);
}
$mb_scrap_cnt = isset($member['mb_scrap_cnt']) ? (int) $member['mb_scrap_cnt'] : '';
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_recv_mb_id = '{$member['mb_id']}' and me_read_datetime = '0000-00-00 00:00:00' ";
$row = sql_fetch($sql);
$memo_not_read = $row['cnt'];
$is_auth = false;
$sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
@@ -52,7 +49,7 @@ function outlogin($skin_dir='basic')
$outlogin_url = login_url($urlencode);
$outlogin_action_url = G5_HTTPS_BBS_URL.'/login_check.php';
ob_start();
if ($is_member)
include_once ($outlogin_skin_path.'/outlogin.skin.2.php');
-221
View File
@@ -1,221 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit;
/*
* Password Hashing with PBKDF2 (http://crackstation.net/hashing-security.htm).
* Copyright (c) 2013, Taylor Hornby
* All rights reserved.
*
* Modified to Work with Older Versions of PHP
* Copyright (c) 2014, Kijin Sung
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
// These constants may be changed without breaking existing hashes.
define('PBKDF2_COMPAT_HASH_ALGORITHM', 'SHA256');
define('PBKDF2_COMPAT_ITERATIONS', 12000);
define('PBKDF2_COMPAT_SALT_BYTES', 24);
define('PBKDF2_COMPAT_HASH_BYTES', 24);
// Calculates a hash from the given password.
function create_hash($password, $force_compat = false)
{
// Generate the salt.
if (function_exists('mcrypt_create_iv')) {
$salt = base64_encode(mcrypt_create_iv(PBKDF2_COMPAT_SALT_BYTES, MCRYPT_DEV_URANDOM));
} elseif (@file_exists('/dev/urandom') && $fp = @fopen('/dev/urandom', 'r')) {
$salt = base64_encode(fread($fp, PBKDF2_COMPAT_SALT_BYTES));
} else {
$salt = '';
for ($i = 0; $i < PBKDF2_COMPAT_SALT_BYTES; $i += 2) {
$salt .= pack('S', mt_rand(0, 65535));
}
$salt = base64_encode(substr($salt, 0, PBKDF2_COMPAT_SALT_BYTES));
}
// Determine the best supported algorithm and iteration count.
$algo = strtolower(PBKDF2_COMPAT_HASH_ALGORITHM);
$iterations = PBKDF2_COMPAT_ITERATIONS;
if ($force_compat || !function_exists('hash_algos') || !in_array($algo, hash_algos())) {
$algo = false; // This flag will be detected by pbkdf2_default()
$iterations = round($iterations / 5); // PHP 4 is very slow. Don't cause too much server load.
}
// Return format: algorithm:iterations:salt:hash
$pbkdf2 = pbkdf2_default($algo, $password, $salt, $iterations, PBKDF2_COMPAT_HASH_BYTES);
$prefix = $algo ? $algo : 'sha1';
return $prefix . ':' . $iterations . ':' . $salt . ':' . base64_encode($pbkdf2);
}
// Checks whether a password matches a previously calculated hash
function validate_password($password, $hash)
{
// Split the hash into 4 parts.
$params = explode(':', $hash);
if (count($params) < 4) return false;
// Recalculate the hash and compare it with the original.
$pbkdf2 = base64_decode($params[3]);
$pbkdf2_check = pbkdf2_default($params[0], $password, $params[2], (int)$params[1], strlen($pbkdf2));
return slow_equals($pbkdf2, $pbkdf2_check);
}
// Checks whether a hash needs upgrading.
function needs_upgrade($hash)
{
// Get the current algorithm and iteration count.
$params = explode(':', $hash);
if (count($params) < 4) return true;
$algo = $params[0];
$iterations = (int)$params[1];
// Compare the current hash with the best supported options.
if (!function_exists('hash_algos') || !in_array($algo, hash_algos())) {
return false;
} elseif ($algo === strtolower(PBKDF2_COMPAT_HASH_ALGORITHM) && $iterations >= PBKDF2_COMPAT_ITERATIONS) {
return false;
} else {
return true;
}
}
// Compares two strings $a and $b in length-constant time.
function slow_equals($a, $b)
{
$diff = strlen($a) ^ strlen($b);
for($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {
$diff |= ord($a[$i]) ^ ord($b[$i]);
}
return $diff === 0;
}
// PBKDF2 key derivation function as defined by RSA's PKCS #5: https://www.ietf.org/rfc/rfc2898.txt
// Test vectors can be found here: https://www.ietf.org/rfc/rfc6070.txt
// This implementation of PBKDF2 was originally created by https://defuse.ca
// With improvements by http://www.variations-of-shadow.com
function pbkdf2_default($algo, $password, $salt, $count, $key_length)
{
// Sanity check.
if ($count <= 0 || $key_length <= 0) {
trigger_error('PBKDF2 ERROR: Invalid parameters.', E_USER_ERROR);
}
// Check if we should use the fallback function.
if (!$algo) return pbkdf2_fallback($password, $salt, $count, $key_length);
// Check if the selected algorithm is available.
$algo = strtolower($algo);
if (!function_exists('hash_algos') || !in_array($algo, hash_algos())) {
if ($algo === 'sha1') {
return pbkdf2_fallback($password, $salt, $count, $key_length);
} else {
trigger_error('PBKDF2 ERROR: Hash algorithm not supported.', E_USER_ERROR);
}
}
// Use built-in function if available.
if (function_exists('hash_pbkdf2')) {
return hash_pbkdf2($algo, $password, $salt, $count, $key_length, true);
}
// Count the blocks.
$hash_length = strlen(hash($algo, '', true));
$block_count = ceil($key_length / $hash_length);
// Hash it!
$output = '';
for ($i = 1; $i <= $block_count; $i++) {
$last = $salt . pack('N', $i); // $i encoded as 4 bytes, big endian.
$last = $xorsum = hash_hmac($algo, $last, $password, true); // first iteration.
for ($j = 1; $j < $count; $j++) { // The other $count - 1 iterations.
$xorsum ^= ($last = hash_hmac($algo, $last, $password, true));
}
$output .= $xorsum;
}
// Truncate and return.
return substr($output, 0, $key_length);
}
// Fallback function using sha1() and a pure-PHP implementation of HMAC.
// The result is identical to the default function when used with SHA-1.
// But it is approximately 1.6x slower than the hash_hmac() function of PHP 5.1.2+,
// And approximately 2.3x slower than the hash_pbkdf2() function of PHP 5.5+.
function pbkdf2_fallback($password, $salt, $count, $key_length)
{
// Count the blocks.
$hash_length = 20;
$block_count = ceil($key_length / $hash_length);
// Prepare the HMAC key and padding.
if (strlen($password) > 64) {
$password = str_pad(sha1($password, true), 64, chr(0));
} else {
$password = str_pad($password, 64, chr(0));
}
$opad = str_repeat(chr(0x5C), 64) ^ $password;
$ipad = str_repeat(chr(0x36), 64) ^ $password;
// Hash it!
$output = '';
for ($i = 1; $i <= $block_count; $i++) {
$last = $salt . pack('N', $i);
$xorsum = $last = pack('H*', sha1($opad . pack('H*', sha1($ipad . $last))));
for ($j = 1; $j < $count; $j++) {
$last = pack('H*', sha1($opad . pack('H*', sha1($ipad . $last))));
$xorsum ^= $last;
}
$output .= $xorsum;
}
// Truncate and return.
return substr($output, 0, $key_length);
}
+11 -6
View File
@@ -10,17 +10,22 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
$filename = $alt = "";
$edt = false;
$row = get_thumbnail_find_cache($bo_table, $wr_id, 'file');
$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);
if($row['bf_file']) {
$filename = $row['bf_file'];
$filepath = G5_DATA_PATH.'/file/'.$bo_table;
$alt = get_text($row['bf_content']);
} else {
$write = get_thumbnail_find_cache($bo_table, $wr_id, 'content');
$write_table = $g5['write_prefix'].$bo_table;
$sql = " select wr_content from $write_table where wr_id = '$wr_id' ";
$write = sql_fetch($sql);
$matches = get_editor_image($write['wr_content'], false);
$edt = true;
if( $matches = get_editor_image($write['wr_content'], false) ){
if(isset($matches[1]) && is_array($matches[1])){
for($i=0; $i<count($matches[1]); $i++)
{
// 이미지 path 구함
@@ -45,8 +50,8 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
break;
}
} //end for
} //end if
}
}
}
if(!$filename)

Some files were not shown because too many files have changed in this diff Show More