Compare commits

..
1 Commits
Author SHA1 Message Date
thisgun ad443f679c 리뉴얼 테마 포함된 5.3 버전 2017-11-21 11:06:26 +09:00
323 changed files with 32704 additions and 33761 deletions
+1 -15
View File
@@ -3,20 +3,6 @@ if (!defined('_GNUBOARD_')) exit;
$begin_time = get_microtime();
$files = glob(G5_ADMIN_PATH.'/css/admin_extend_*');
if (is_array($files)) {
foreach ((array) $files as $k=>$css_file) {
$fileinfo = pathinfo($css_file);
$ext = $fileinfo['extension'];
if( $ext !== 'css' ) continue;
$css_file = str_replace(G5_ADMIN_PATH, G5_ADMIN_URL, $css_file);
add_stylesheet('<link rel="stylesheet" href="'.$css_file.'">', $k);
}
}
include_once(G5_PATH.'/head.sub.php');
function print_menu1($key, $no='')
@@ -138,7 +124,7 @@ function imageview(id, w, h)
$button_title = $menu['menu'.$key][0][1];
?>
<li class="gnb_li<?php echo $current_class;?>">
<button type="button" class="btn_op menu-<?php echo $key; ?> menu-order-<?php echo $jj; ?>" title="<?php echo $button_title; ?>"><?php echo $button_title;?></button>
<button type="button" class="btn_op menu-<?php echo $jj; ?>" title="<?php echo $button_title; ?>"><?php echo $button_title;?></button>
<div class="gnb_oparea_wr">
<div class="gnb_oparea">
<h3><?php echo $menu['menu'.$key][0][1];?></h3>
+1 -12
View File
@@ -176,7 +176,7 @@ function get_theme_config_value($dir, $key='*')
$tconfig = array();
$theme_config_file = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir.'/theme.config.php';
if(is_file($theme_config_file)) {
if(is_file) {
include($theme_config_file);
if($key == '*') {
@@ -355,17 +355,6 @@ function get_admin_token()
return $token;
}
//input value 에서 xss 공격 filter 역할을 함 ( 반드시 input value='' 타입에만 사용할것 )
function get_sanitize_input($s, $is_html=false){
if(!$is_html){
$s = strip_tags($s);
}
$s = htmlspecialchars($s, ENT_QUOTES, 'utf-8');
return $s;
}
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
function check_admin_token()
-1
View File
@@ -19,6 +19,5 @@ if(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') &&
$menu['menu100'][] = array('100520', '접속로그 변환', G5_ADMIN_URL.'/browscap_convert.php', 'cf_visit_cnvrt');
}
$menu['menu100'][] = array('100410', 'DB업그레이드', G5_ADMIN_URL.'/dbupgrade.php', 'db_upgrade');
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
?>
+2 -9
View File
@@ -9,24 +9,17 @@ if ($is_admin != 'super')
check_admin_token();
$count = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
if ( (isset($_POST['mb_id']) && ! is_array($_POST['mb_id'])) || (isset($_POST['au_menu']) && ! is_array($_POST['au_menu'])) ){
alert("잘못된 요청입니다.");
}
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$k = $chk[$i];
$mb_id = preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['mb_id'][$k]);
$au_menu = preg_replace('/[^a-zA-Z0-9_]/', '', $_POST['au_menu'][$k]);
$sql = " delete from {$g5['auth_table']} where mb_id = '".$mb_id."' and au_menu = '".$au_menu."' ";
$sql = " delete from {$g5['auth_table']} where mb_id = '{$_POST['mb_id'][$k]}' and au_menu = '{$_POST['au_menu'][$k]}' ";
sql_query($sql);
}
+3 -5
View File
@@ -230,7 +230,7 @@ $pg_anchor = '<ul class="anchor">
<tr>
<th scope="row"><label for="bo_category_list">분류</label></th>
<td>
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])'."\n".'분류명에 일부 특수문자 ()/ 는 사용할수 없습니다.'); ?>
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
<input type="text" name="bo_category_list" value="<?php echo get_text($board['bo_category_list']) ?>" id="bo_category_list" class="frm_input" size="70">
<input type="checkbox" name="bo_use_category" value="1" id="bo_use_category" <?php echo $board['bo_use_category']?'checked':''; ?>>
<label for="bo_use_category">사용</label>
@@ -825,7 +825,6 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_mobile_skin">전체적용</label>
</td>
</tr>
<?php if ($is_admin === 'super'){ // 슈퍼관리자인 경우에만 수정 가능 ?>
<tr>
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
<td>
@@ -898,7 +897,6 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_mobile_content_tail">전체적용</label>
</td>
</tr>
<?php } //end if $is_admin === 'super' ?>
<tr>
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
<td>
@@ -1244,9 +1242,9 @@ $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="./board_copy.php?bo_table='.$bo_table.'" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table']; ?>'" class=" btn_02 btn">게시판 바로가기</a>
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table'].'&amp;'.$qstr;?>" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" 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">
</div>
+23 -42
View File
@@ -18,29 +18,29 @@ $_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_incl
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
if ($file = $_POST['bo_include_head']) {
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
$purl = parse_url($file);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
$_POST['bo_include_head'] = $file;
}
if ($file = $_POST['bo_include_tail']) {
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
$purl = parse_url($file);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
$_POST['bo_include_tail'] = $file;
}
if(!is_include_path_check($_POST['bo_include_head'], 1)) {
alert('상단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
}
if(!is_include_path_check($_POST['bo_include_tail'], 1)) {
alert('하단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
}
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
@@ -60,8 +60,6 @@ $f = @fopen($file, 'w');
$src_char = array('&', '=');
$dst_char = array('&', '〓');
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
//https://github.com/gnuboard/gnuboard5/commit/f5f4925d4eb28ba1af728e1065fc2bdd9ce1da58 에 따른 조치
$str_bo_category_list = isset($_POST['bo_category_list']) ? preg_replace("/[\<\>\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $_POST['bo_category_list']) : '';
$sql_common = " gr_id = '{$_POST['gr_id']}',
bo_subject = '{$_POST['bo_subject']}',
@@ -84,7 +82,7 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_comment_point = '{$_POST['bo_comment_point']}',
bo_download_point = '{$_POST['bo_download_point']}',
bo_use_category = '{$_POST['bo_use_category']}',
bo_category_list = '{$str_bo_category_list}',
bo_category_list = '{$_POST['bo_category_list']}',
bo_use_sideview = '{$_POST['bo_use_sideview']}',
bo_use_file_content = '{$_POST['bo_use_file_content']}',
bo_use_secret = '{$_POST['bo_use_secret']}',
@@ -112,20 +110,13 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_image_width = '{$_POST['bo_image_width']}',
bo_skin = '{$_POST['bo_skin']}',
bo_mobile_skin = '{$_POST['bo_mobile_skin']}',
";
// 최고 관리자인 경우에만 수정가능
if ($is_admin === 'super'){
$sql_common .= " bo_include_head = '{$_POST['bo_include_head']}',
bo_include_head = '{$_POST['bo_include_head']}',
bo_include_tail = '{$_POST['bo_include_tail']}',
bo_content_head = '{$_POST['bo_content_head']}',
bo_content_tail = '{$_POST['bo_content_tail']}',
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
";
}
$sql_common .= " bo_insert_content = '{$_POST['bo_insert_content']}',
bo_insert_content = '{$_POST['bo_insert_content']}',
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
bo_gallery_width = '{$_POST['bo_gallery_width']}',
bo_gallery_height = '{$_POST['bo_gallery_height']}',
@@ -310,17 +301,12 @@ if (is_checked('chk_grp_comment_min')) $grp_fields .= " , bo_comment_mi
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
//최고관리자만 수정가능
if ($is_admin === 'super'){
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
}
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
@@ -399,17 +385,12 @@ if (is_checked('chk_all_comment_min')) $all_fields .= " , bo_comment_mi
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
//최고관리자만 수정가능
if ($is_admin === 'super'){
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
}
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
+16 -17
View File
@@ -8,8 +8,6 @@ if (!count($_POST['chk'])) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
check_admin_token();
if ($_POST['act_button'] == "선택수정") {
auth_check($auth[$sub_menu], 'w');
@@ -21,7 +19,7 @@ if ($_POST['act_button'] == "선택수정") {
if ($is_admin != 'super') {
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
where a.gr_id = '".sql_real_escape_string($_POST['gr_id'][$k])."'
where a.gr_id = '{$_POST['gr_id'][$k]}'
and a.gr_id = b.gr_id
and b.gr_admin = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
@@ -30,20 +28,19 @@ if ($_POST['act_button'] == "선택수정") {
}
$sql = " update {$g5['board_table']}
set gr_id = '".sql_real_escape_string($_POST['gr_id'][$k])."',
bo_subject = '".sql_real_escape_string($_POST['bo_subject'][$k])."',
bo_device = '".sql_real_escape_string($_POST['bo_device'][$k])."',
bo_skin = '".sql_real_escape_string($_POST['bo_skin'][$k])."',
bo_mobile_skin = '".sql_real_escape_string($_POST['bo_mobile_skin'][$k])."',
bo_read_point = '".sql_real_escape_string($_POST['bo_read_point'][$k])."',
bo_write_point = '".sql_real_escape_string($_POST['bo_write_point'][$k])."',
bo_comment_point = '".sql_real_escape_string($_POST['bo_comment_point'][$k])."',
bo_download_point = '".sql_real_escape_string($_POST['bo_download_point'][$k])."',
bo_use_search = '".sql_real_escape_string($_POST['bo_use_search'][$k])."',
bo_use_sns = '".sql_real_escape_string($_POST['bo_use_sns'][$k])."',
bo_order = '".sql_real_escape_string($_POST['bo_order'][$k])."'
where bo_table = '".sql_real_escape_string($_POST['board_table'][$k])."' ";
set gr_id = '{$_POST['gr_id'][$k]}',
bo_subject = '{$_POST['bo_subject'][$k]}',
bo_device = '{$_POST['bo_device'][$k]}',
bo_skin = '{$_POST['bo_skin'][$k]}',
bo_mobile_skin = '{$_POST['bo_mobile_skin'][$k]}',
bo_read_point = '{$_POST['bo_read_point'][$k]}',
bo_write_point = '{$_POST['bo_write_point'][$k]}',
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
bo_download_point = '{$_POST['bo_download_point'][$k]}',
bo_use_search = '{$_POST['bo_use_search'][$k]}',
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
bo_order = '{$_POST['bo_order'][$k]}'
where bo_table = '{$_POST['board_table'][$k]}' ";
sql_query($sql);
}
@@ -54,6 +51,8 @@ if ($_POST['act_button'] == "선택수정") {
auth_check($auth[$sub_menu], 'd');
check_admin_token();
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
define('_BOARD_DELETE_', true);
-5
View File
@@ -5,11 +5,6 @@ include_once('./_common.php');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.', G5_URL);
@include_once('./safe_check.php');
if(function_exists('social_log_file_delete')){
social_log_file_delete();
}
$g5['title'] = '캐시파일 일괄삭제';
include_once('./admin.head.php');
?>
+20 -18
View File
@@ -486,15 +486,17 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</td>
</tr>
<tr>
<th scope="row"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
<td colspan="3">
<th scope="row" rowspan="2"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
<td colspan="3" style="border-bottom:none 0">
<?php echo help('reCAPTCHA V2와 Invisible reCAPTCHA 캡챠의 sitekey 와 secret 키는 동일하지 않고, 서로 발급받는 키가 다릅니다.') ?>
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_recaptcha_site_key" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
</td>
</tr>
<tr>
<td>
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_naver_clientid" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
</td>
<th scope="row"><label for="cf_recaptcha_secret_key">구글 reCAPTCHA Secret key</label></th>
<td colspan="3">
<td>
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo $config['cf_recaptcha_secret_key']; ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52">
</td>
</tr>
@@ -1055,54 +1057,54 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<tr>
<th scope="row"><label for="cf_social_servicelist">소셜로그인설정</label></th>
<td colspan="3" class="social_config_explain">
<div class="explain_box">
<p>
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_naver" value="naver" <?php echo option_array_checked('naver', $config['cf_social_servicelist']); ?> >
<label for="check_social_naver">네이버 로그인을 사용합니다</label>
<div>
<h3>네이버 CallbackURL</h3>
<p><?php echo get_social_callbackurl('naver'); ?></p>
</div>
</div>
<div class="explain_box">
</p>
<p>
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_kakao" value="kakao" <?php echo option_array_checked('kakao', $config['cf_social_servicelist']); ?> >
<label for="check_social_kakao">카카오 로그인을 사용합니다</label>
<div>
<h3>카카오 웹 Redirect Path</h3>
<p><?php echo get_social_callbackurl('kakao', true); ?></p>
</p>
</div>
</div>
<div class="explain_box">
</p>
<p>
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_facebook" value="facebook" <?php echo option_array_checked('facebook', $config['cf_social_servicelist']); ?> >
<label for="check_social_facebook">페이스북 로그인을 사용합니다</label>
<div>
<h3>페이스북 유효한 OAuth 리디렉션 URI</h3>
<p><?php echo get_social_callbackurl('facebook'); ?></p>
</div>
</div>
<div class="explain_box">
</p>
<p>
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_google" value="google" <?php echo option_array_checked('google', $config['cf_social_servicelist']); ?> >
<label for="check_social_google">구글 로그인을 사용합니다</label>
<div>
<h3>구글 승인된 리디렉션 URI</h3>
<p><?php echo get_social_callbackurl('google'); ?></p>
</div>
</div>
<div class="explain_box">
</p>
<p>
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_twitter" value="twitter" <?php echo option_array_checked('twitter', $config['cf_social_servicelist']); ?> >
<label for="check_social_twitter">트위터 로그인을 사용합니다</label>
<div>
<h3>트위터 CallbackURL</h3>
<p><?php echo get_social_callbackurl('twitter'); ?></p>
</div>
</div>
<div class="explain_box">
</p>
<p>
<input type="checkbox" name="cf_social_servicelist[]" id="check_social_payco" value="payco" <?php echo option_array_checked('payco', $config['cf_social_servicelist']); ?> >
<label for="check_social_payco">페이코 로그인을 사용합니다</label>
<div>
<h3>페이코 CallbackURL</h3>
<p><?php echo get_social_callbackurl('payco'); ?></p>
</div>
</div>
</p>
</td>
</tr>
<tr>
@@ -1158,7 +1160,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</td>
<th scope="row"><label for="cf_kakao_client_secret">카카오 Client Secret</label></th>
<td>
<input type="text" name="cf_kakao_client_secret" value="<?php echo $config['cf_kakao_client_secret'] ?>" id="cf_kakao_client_secret" class="frm_input" size="45">
<input type="text" name="cf_kakao_client_secret" value="<?php echo $config['cf_kakao_client_secret'] ?>" id="cf_kakao_js_apikey" class="frm_input" size="45">
</td>
</tr>
<tr>
+15 -27
View File
@@ -29,7 +29,7 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
/* 레이아웃 */
#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}
#hd_top{position:fixed;top:0;left:0;width:100%;width:100%;height:50px;background:#3f51b5;z-index:1000}
#hd_top:after{display:block;visibility:hidden;clear:both;content:""}
#logo{background:#2f409f;height:100%;float:left;width:220px;padding:15px 0 15px 50px;text-align:center}
#btn_gnb{background:url(../img/menu-cl.png) 50% 50% no-repeat #223390;width:50px;height:50px;border:0;position:absolute;top:0;left:0;text-indent:-999px;overflow:hidden}
@@ -58,20 +58,18 @@ h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
#gnb .gnb_ul{position:relative;height:100%;background:#ebebeb;width:50px}
#gnb .gnb_li{border-bottom:1px solid #ddd }
#gnb .gnb_li button{background-color: #ebebeb;border:0;width:50px;height:50px;text-indent:-999px;overflow:hidden;}
#gnb .gnb_li .btn_op{background:url(../img/menu_default.png) 50% 50% no-repeat #ebebeb}
#gnb .on .btn_op{background:url(../img/menu_default_on.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-100{background:url(../img/menu-1-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-100{background:url(../img/menu-1.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-200{background:url(../img/menu-2-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-200{background:url(../img/menu-2.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-300{background:url(../img/menu-3-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-300{background:url(../img/menu-3.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-400{background:url(../img/menu-7-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-400{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-500{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-500{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .btn_op.menu-900{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .btn_op.menu-900{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .menu-1{background:url(../img/menu-1-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .menu-1{background:url(../img/menu-1.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .menu-2{background:url(../img/menu-2-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .menu-2{background:url(../img/menu-2.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .menu-3{background:url(../img/menu-3-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .menu-3{background:url(../img/menu-3.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .menu-4{background:url(../img/menu-7-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .menu-4{background:url(../img/menu-7.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .menu-5{background:url(../img/menu-6-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .menu-5{background:url(../img/menu-6.png) 50% 50% no-repeat #fff}
#gnb .gnb_li .menu-6{background:url(../img/menu-4-1.png) 50% 50% no-repeat #ebebeb }
#gnb .on .menu-6{background:url(../img/menu-4.png) 50% 50% no-repeat #fff}
#gnb .gnb_li button:hover{background-color:#f3f3f3}
#gnb .gnb_oparea{display:none;position:absolute;top:0;left:50px;background:#fff;height:100%;width:170px;padding:20px;border-right:1px solid #dbdbdb;
-webkit-box-shadow: 2px 0 2px rgba(150,150,150,100.1);
@@ -689,7 +687,7 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
.theme_p{margin:0 0 10px }
#theme_list{padding:0;margin:0;list-style:none; width: 1000px;position:relative}
#theme_list:after{display:block;visibility:hidden;clear:both;content:""}
#theme_list li{margin:10px 10px 10px 0;float:left}
#theme_list li{margin:10px 10px 10px 0 ;margin:0;float:left;}
#theme_list li:after{display:block;visibility:hidden;clear:both;content:""}
#theme_list li .tmli_if{border: 1px solid #d1dee2;width:302px;}
#theme_list li .tmli_if>img{width:300px;height:225px;}
@@ -749,14 +747,4 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
#processing{margin: 0 auto;padding: 70px 0;border: 1px solid #eee;background: #f9f9f9;text-align:center;}
#processing p{font-size:1.2em}
.check_processing {width:300px;height:300px;margin:0 auto;background:url(../img/check.png) no-repeat 50% 50% }
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:200px;margin-top:15px;border-radius:5px;font-weight:bold;font-size:1.167em}
@media only screen and (max-device-width : 768px) and (orientation : landscape){
/* Styles */
input[type="text"]{max-width:200px}
}
@media only screen and (max-device-width : 480px) and (orientation : portrait){
/* Styles */
input[type="text"]{max-width:200px}
}
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:200px;margin-top:15px;border-radius:5px;font-weight:bold;font-size:1.167em}
+1 -1
View File
@@ -1,6 +1,6 @@
@charset "utf-8";
#preview_item{height:50px}
#preview_item ul{margin:0;padding:0;top:0;width:100%;margin:0 auto;text-align:center;background:#000;position:fixed;top:0;z-index:999999}
#preview_item ul{margin:0;padding:0;top:0;width:100%margin:0 auto;text-align:center;background:#000;position:fixed;top:0;z-index:999999;width:100%;}
#preview_item ul li{list-style:none;display:inline-block;height:50px;line-height:50px;padding:0 2px;*display:inline; zoom:1;}
#preview_item ul li a{color:#ccc;padding:0 8px;height:32px;line-height:30px;background:none;font-weight:bold;border-radius:5px;display:inline-block;vertical-align:middle;border:1px solid #aaa;}
#preview_item ul li a:hover{background:#fff;text-decoration:none;border:1px solid #ccc;color:#333}
-88
View File
@@ -1,88 +0,0 @@
<?php
$sub_menu = '100410';
include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$g5['title'] = 'DB 업그레이드';
include_once('./admin.head.php');
$is_check = false;
//소셜 로그인 관련 필드 및 구글 리챕챠 필드 추가
if(!isset($config['cf_social_login_use'])) {
sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_social_login_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_googl_shorturl_apikey`,
ADD `cf_google_clientid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_twitter_secret`,
ADD `cf_google_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_google_clientid`,
ADD `cf_naver_clientid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_google_secret`,
ADD `cf_naver_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_naver_clientid`,
ADD `cf_kakao_rest_key` varchar(100) NOT NULL DEFAULT '' AFTER `cf_naver_secret`,
ADD `cf_social_servicelist` varchar(255) NOT NULL DEFAULT '' AFTER `cf_social_login_use`,
ADD `cf_payco_clientid` varchar(100) NOT NULL DEFAULT '' AFTER `cf_social_servicelist`,
ADD `cf_payco_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_payco_clientid`,
ADD `cf_captcha` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakao_js_apikey`,
ADD `cf_recaptcha_site_key` varchar(100) NOT NULL DEFAULT '' AFTER `cf_captcha`,
ADD `cf_recaptcha_secret_key` varchar(100) NOT NULL DEFAULT '' AFTER `cf_recaptcha_site_key`
", true);
$is_check = true;
}
//소셜 로그인 관련 필드 카카오 클라이언트 시크릿 추가
if(!isset($config['cf_kakao_client_secret'])) {
sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_kakao_client_secret` varchar(100) NOT NULL DEFAULT '' AFTER `cf_kakao_rest_key`
", true);
$is_check = true;
}
// 회원 이미지 관련 필드 추가
if(!isset($config['cf_member_img_size'])) {
sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_member_img_size` int(11) NOT NULL DEFAULT '0' AFTER `cf_member_icon_height`,
ADD `cf_member_img_width` int(11) NOT NULL DEFAULT '0' AFTER `cf_member_img_size`,
ADD `cf_member_img_height` int(11) NOT NULL DEFAULT '0' AFTER `cf_member_img_width`
", true);
$sql = " update {$g5['config_table']} set cf_member_img_size = 50000, cf_member_img_width = 60, cf_member_img_height = 60 ";
sql_query($sql, false);
$is_check = true;
}
// 소셜 로그인 관리 테이블 없을 경우 생성
if( isset($g5['social_profile_table']) && !sql_query(" DESC {$g5['social_profile_table']} ", false)) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['social_profile_table']}` (
`mp_no` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(255) NOT NULL DEFAULT '',
`provider` varchar(50) NOT NULL DEFAULT '',
`object_sha` varchar(45) NOT NULL DEFAULT '',
`identifier` varchar(255) NOT NULL DEFAULT '',
`profileurl` varchar(255) NOT NULL DEFAULT '',
`photourl` varchar(255) NOT NULL DEFAULT '',
`displayname` varchar(150) NOT NULL DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
`mp_register_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`mp_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
UNIQUE KEY `mp_no` (`mp_no`),
KEY `mb_id` (`mb_id`),
KEY `provider` (`provider`)
) ", true);
$is_check = true;
}
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
?>
<div class="local_desc01 local_desc">
<p>
<?php echo $db_upgrade_msg; ?>
</p>
</div>
<?php
include_once ('./admin.tail.php');
?>
+1 -1
View File
@@ -5,7 +5,7 @@ include_once('./_common.php');
if ($w == "u" || $w == "d")
check_demo();
if ($w == 'd')
if ($W == 'd')
auth_check($auth[$sub_menu], "d");
else
auth_check($auth[$sub_menu], "w");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

-5
View File
@@ -2,11 +2,6 @@
$sub_menu = '100000';
include_once('./_common.php');
@include_once('./safe_check.php');
if(function_exists('social_log_file_delete')){
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
}
$g5['title'] = '관리자메인';
include_once ('./admin.head.php');
+1 -1
View File
@@ -106,7 +106,7 @@ include_once('./admin.head.php');
<?php } ?>
</tbody>
</table>
<textarea name="ma_list" style="display:none"><?php echo $ma_list?></textarea>
<textarea name="ma_list" style="display:none"><?=$ma_list?></textarea>
</div>
<div class="btn_confirm01 btn_confirm">
+2 -23
View File
@@ -249,22 +249,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
?>
</td>
</tr>
<tr>
<th scope="row"><label for="mb_img">회원이미지</label></th>
<td colspan="3">
<?php echo help('이미지 크기는 <strong>넓이 '.$config['cf_member_img_width'].'픽셀 높이 '.$config['cf_member_img_height'].'픽셀</strong>로 해주세요.') ?>
<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.'/'.$mb['mb_id'].'.gif';
if (file_exists($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">삭제';
}
?>
</td>
</tr>
<tr>
<th scope="row">메일 수신</th>
<td>
@@ -463,13 +447,8 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
<script>
function fmember_submit(f)
{
if (!f.mb_icon.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_icon.value) {
alert('아이콘은 이미지 파일만 가능합니다.');
return false;
}
if (!f.mb_img.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_img.value) {
alert('회원이미지는 이미지 파일만 가능합니다.');
if (!f.mb_icon.value.match(/\.gif$/i) && f.mb_icon.value) {
alert('아이콘은 gif 파일만 가능합니다.');
return false;
}
+11 -74
View File
@@ -2,7 +2,6 @@
$sub_menu = "200100";
include_once("./_common.php");
include_once(G5_LIB_PATH."/register.lib.php");
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
if ($w == 'u')
check_demo();
@@ -121,88 +120,26 @@ else if ($w == 'u')
if ($del_mb_icon)
@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'])) {
if (!preg_match($image_regex, $_FILES['mb_icon']['name'])) {
alert($_FILES['mb_icon']['name'] . '은(는) 이미지 파일이 아닙니다.');
if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
if (!preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
alert($_FILES['mb_icon']['name'] . '은(는) gif 파일이 아닙니다.');
}
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
$mb_icon_dir = G5_DATA_PATH.'/member/'.$mb_dir;
@mkdir($mb_icon_dir, G5_DIR_PERMISSION);
@chmod($mb_icon_dir, G5_DIR_PERMISSION);
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
@mkdir(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
$dest_path = $mb_icon_dir.'/'.$mb_icon_img;
$dest_path = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
chmod($dest_path, G5_FILE_PERMISSION);
if (file_exists($dest_path)) {
$size = @getimagesize($dest_path);
$size = getimagesize($dest_path);
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
$thumb = null;
if($size[2] === 2 || $size[2] === 3) {
//jpg 또는 png 파일 적용
$thumb = thumbnail($mb_icon_img, $mb_icon_dir, $mb_icon_dir, $config['cf_member_icon_width'], $config['cf_member_icon_height'], true, true);
if($thumb) {
@unlink($dest_path);
rename($mb_icon_dir.'/'.$thumb, $dest_path);
}
}
if( !$thumb ){
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
@unlink($dest_path);
}
}
}
}
}
$mb_img_dir = G5_DATA_PATH.'/member_image/';
if( !is_dir($mb_img_dir) ){
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
@chmod($mb_img_dir, G5_DIR_PERMISSION);
}
$mb_img_dir .= substr($mb_id,0,2);
// 회원 이미지 삭제
if ($del_mb_img)
@unlink($mb_img_dir.'/'.$mb_icon_img);
// 아이콘 업로드
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
if (!preg_match($image_regex, $_FILES['mb_img']['name'])) {
alert($_FILES['mb_img']['name'] . '은(는) 이미지 파일이 아닙니다.');
}
if (preg_match($image_regex, $_FILES['mb_img']['name'])) {
@mkdir($mb_img_dir, G5_DIR_PERMISSION);
@chmod($mb_img_dir, G5_DIR_PERMISSION);
$dest_path = $mb_img_dir.'/'.$mb_icon_img;
move_uploaded_file($_FILES['mb_img']['tmp_name'], $dest_path);
chmod($dest_path, G5_FILE_PERMISSION);
if (file_exists($dest_path)) {
$size = @getimagesize($dest_path);
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
$thumb = null;
if($size[2] === 2 || $size[2] === 3) {
//jpg 또는 png 파일 적용
$thumb = thumbnail($mb_icon_img, $mb_img_dir, $mb_img_dir, $config['cf_member_img_width'], $config['cf_member_img_height'], true, true);
if($thumb) {
@unlink($dest_path);
rename($mb_img_dir.'/'.$thumb, $dest_path);
}
}
if( !$thumb ){
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
@unlink($dest_path);
}
@unlink($dest_path);
}
}
}
-2
View File
@@ -10,8 +10,6 @@ if (!count($_POST['chk'])) {
auth_check($auth[$sub_menu], 'w');
check_admin_token();
if ($_POST['act_button'] == "선택수정") {
for ($i=0; $i<count($_POST['chk']); $i++)
-2
View File
@@ -4,8 +4,6 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
$po_id = isset($po_id) ? (int) $po_id : 0;
$html_title = '투표';
if ($w == '')
$html_title .= ' 생성';
-34
View File
@@ -10,40 +10,6 @@ auth_check($auth[$sub_menu], 'w');
check_admin_token();
$check_keys = array(
'po_subject',
'po_poll1',
'po_poll2',
'po_poll3',
'po_poll4',
'po_poll5',
'po_poll6',
'po_poll7',
'po_poll8',
'po_poll9',
'po_cnt1',
'po_cnt2',
'po_cnt3',
'po_cnt4',
'po_cnt5',
'po_cnt6',
'po_cnt7',
'po_cnt8',
'po_cnt9',
'po_etc',
'po_level',
'po_point',
'po_id'
);
foreach( $_POST as $key=>$value ){
if( empty($value) ) continue;
if( in_array($key, $check_keys) ) {
$_POST[$key] = strip_tags($value);
}
}
if ($w == '')
{
$sql = " insert {$g5['poll_table']}
+6 -6
View File
@@ -11,17 +11,17 @@ check_admin_token();
$error_msg = '';
if( $qa_include_head ){
$file_ext = pathinfo($qa_include_head, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
$purl = parse_url($qa_include_head);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
}
if( $qa_include_tail ){
$file_ext = pathinfo($qa_include_tail, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) ) {
$purl = parse_url($qa_include_tail);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
}
-17
View File
@@ -1,17 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function social_log_file_delete($second=0){
$files = glob(G5_DATA_PATH.'/tmp/social_*');
if (is_array($files)) {
$before_time = $second ? G5_SERVER_TIME - $second : 0;
foreach ($files as $social_log_file) {
$modification_time = filemtime($log_file); // 파일접근시간
if ($before_time && $modification_time > $before_time) continue;
unlink($social_log_file);
}
}
}
?>
+16 -27
View File
@@ -13,37 +13,26 @@ $g5['title'] = '메일 테스트';
include_once('./admin.head.php');
if (isset($_POST['email'])) {
$_POST['email'] = strip_tags($_POST['email']);
$email = explode(',', $_POST['email']);
$real_email = array();
for ($i=0; $i<count($email); $i++){
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $email[$i])) continue;
$real_email[] = $email[$i];
for ($i=0; $i<count($email); $i++)
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.G5_TIME_YMDHIS.'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
}
if( $real_email ){
echo '<section>';
echo '<h2>결과메세지</h2>';
echo '<div class="local_desc01 local_desc"><p>';
echo '다음 '.count($real_email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
echo '</p></div>';
echo '<ul>';
for ($i=0;$i<count($real_email);$i++) {
echo '<li>'.$real_email[$i].'</li>';
}
echo '</ul>';
echo '<div class="local_desc02 local_desc"><p>';
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
echo '</p></div>';
echo '</section>';
echo '<section>';
echo '<h2>결과메세지</h2>';
echo '<div class="local_desc01 local_desc"><p>';
echo '다음 '.count($email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
echo '</p></div>';
echo '<ul>';
for ($i=0;$i<count($email);$i++) {
echo '<li>'.$email[$i].'</li>';
}
echo '</ul>';
echo '<div class="local_desc02 local_desc"><p>';
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
echo '</p></div>';
echo '</section>';
}
?>
+2 -3
View File
@@ -11,8 +11,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = '이모티콘그룹 이동';
include_once(G5_PATH.'/head.sub.php');
$list = array(); //배열 변수 초기화
$fo_no_list = isset($_POST['fo_no']) ? implode(',', $_POST['fo_no']) : '';
$fo_no_list = implode(',', $_POST['fo_no']);
$sql = " select * from {$g5['sms5_form_group_table']} order by fg_no ";
$result = sql_query($sql);
@@ -28,7 +27,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<form name="fboardmoveall" method="post" action="./emoticon_move_update.php" onsubmit="return fboardmoveall_submit(this);">
<input type="hidden" name="sw" value="<?php echo $sw ?>">
<input type="hidden" name="fo_no_list" value="<?php echo $fo_no_list ?>">
<input type="hidden" name="url" value="<?php echo clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])); ?>">
<input type="hidden" name="url" value="<?php echo $_SERVER['HTTP_REFERER'] ?>">
<div class="tbl_head01 tbl_wrap">
<table>
+5 -9
View File
@@ -10,9 +10,9 @@ if ($w == 'u') // 업데이트
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$fg_no = (int) $_POST['fg_no'][$k];
$fg_name = strip_tags($_POST['fg_name'][$k]);
$fg_member = strip_tags($_POST['fg_member'][$k]);
$fg_no = $_POST['fg_no'][$k];
$fg_name = $_POST['fg_name'][$k];
$fg_member = $_POST['fg_member'][$k];
if (!is_numeric($fg_no))
alert('그룹 고유번호가 없습니다.');
@@ -38,7 +38,7 @@ else if ($w == 'de') // 그룹삭제
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$fg_no = (int) $_POST['fg_no'][$k];
$fg_no = $_POST['fg_no'][$k];
if (!is_numeric($fg_no))
alert('그룹 고유번호가 없습니다.');
@@ -57,7 +57,7 @@ else if ($w == 'em')
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$fg_no = (int) $_POST['fg_no'][$k];
$fg_no = $_POST['fg_no'][$k];
if ($fg_no == 'no') $fg_no = 0;
@@ -71,8 +71,6 @@ else if ($w == 'no')
{
if ($fg_no == 'no') $fg_no = 0;
$fg_no = (int) $fg_no;
if ($fg_no)
sql_query("update {$g5['sms5_form_group_table']} set fg_count = 0 where fg_no = '$fg_no'");
@@ -83,8 +81,6 @@ else // 등록
if (!strlen(trim($fg_name)))
alert('그룹명을 입력해주세요');
$fg_name = strip_tags($fg_name);
$res = sql_fetch("select fg_name from {$g5['sms5_form_group_table']} where fg_name = '$fg_name'");
if ($res)
alert('같은 그룹명이 존재합니다.');
-3
View File
@@ -4,9 +4,6 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "w");
$fo_name = isset($fo_name) ? strip_tags($fo_name) : '';
$fo_content = isset($fo_content) ? strip_tags($fo_content) : '';
$g5['title'] = "이모티콘 업데이트";
if ($w == 'u') // 업데이트
+6 -9
View File
@@ -5,9 +5,6 @@ include_once("./_common.php");
$spage_size = 20;
$colspan = 10;
$st = isset($st) ? strip_tags($st) : '';
$ssv = isset($ssv) ? strip_tags($ssv) : '';
auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 상세내역";
@@ -67,18 +64,18 @@ function all_send()
</script>
<form name="search_form" method="get" action="<?php echo $_SERVER['SCRIPT_NAME']?>" class="local_sch01 local_sch">
<input type="hidden" name="wr_no" value="<?php echo get_sanitize_input($wr_no); ?>">
<input type="hidden" name="wr_renum" value="<?php echo get_sanitize_input($wr_renum); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<input type="hidden" name="st" value="<?php echo get_sanitize_input($st); ?>">
<input type="hidden" name="sv" value="<?php echo get_sanitize_input($sv); ?>">
<input type="hidden" name="wr_no" value="<?php echo $wr_no?>">
<input type="hidden" name="wr_renum" value="<?php echo $wr_renum?>">
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="st" value="<?php echo $st?>">
<input type="hidden" name="sv" value="<?php echo $sv?>">
<label for="sst" class="sound_only">검색대상</label>
<select name="sst" id="sst">
<option value="hs_name" <?php echo get_selected('hs_name', $sst); ?>>이름</option>
<option value="hs_hp" <?php echo get_selected('hs_hp', $sst); ?>>휴대폰번호</option>
</select>
<label for="ssv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="ssv" value="<?php echo get_sanitize_input($ssv); ?>" id="ssv" class="frm_input">
<input type="text" name="ssv" value="<?php echo $ssv?>" id="ssv" class="frm_input">
<input type="submit" value="검색" class="btn_submit">
</form>
+1 -1
View File
@@ -33,7 +33,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<input type="hidden" name="sw" value="<?php echo $sw ?>">
<input type="hidden" name="bk_no_list" value="<?php echo $bk_no_list ?>">
<input type="hidden" name="act" value="<?php echo $act ?>">
<input type="hidden" name="url" value="<?php echo clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])); ?>">
<input type="hidden" name="url" value="<?php echo $_SERVER['HTTP_REFERER'] ?>">
<div class=" new_win_con">
<div class="tbl_head01 tbl_wrap">
<table>
+4 -6
View File
@@ -10,8 +10,8 @@ if ($w == 'u') // 업데이트
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$bg_no = (int) $_POST['bg_no'][$k];
$bg_name = strip_tags($_POST['bg_name'][$k]);
$bg_no = $_POST['bg_no'][$k];
$bg_name = $_POST['bg_name'][$k];
if (!is_numeric($bg_no))
alert('그룹 고유번호가 없습니다.');
@@ -36,7 +36,7 @@ else if ($w == 'de') // 그룹삭제
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$bg_no = (int) $_POST['bg_no'][$k];
$bg_no = $_POST['bg_no'][$k];
if (!is_numeric($bg_no))
alert('그룹 고유번호가 없습니다.');
@@ -55,7 +55,7 @@ else if ($w == 'em') // 비우기
{
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$bg_no = (int) $_POST['bg_no'][$k];
$bg_no = $_POST['bg_no'][$k];
sql_query("update {$g5['sms5_book_group_table']} set bg_count = 0, bg_member = 0, bg_nomember = 0, bg_receipt = 0, bg_reject = 0 where bg_no='$bg_no'");
sql_query("delete from {$g5['sms5_book_table']} where bg_no='$bg_no'");
@@ -63,8 +63,6 @@ else if ($w == 'em') // 비우기
}
else // 등록
{
$bg_name = strip_tags($bg_name);
if (!strlen(trim($bg_name)))
alert('그룹명을 입력해주세요');
+1 -1
View File
@@ -49,7 +49,7 @@ $now_year = (int)substr(G5_TIME_YMD, 0, 4);
<option value="specific">선택년월의 자료삭제</option>
</select>
</div>
<div class="visit_del_bt">
<div class="visit_del_bt"">
<label for="pass">관리자 비밀번호<strong class="sound_only"> 필수</strong></label>
<input type="password" name="pass" id="pass" class="frm_input required">
<input type="submit" value="확인" class="btn_submit">
+2 -2
View File
@@ -15,7 +15,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
<div class="local_sch local_sch01">
<form name="fvisit" method="get" onsubmit="return fvisit_submit(this);">
<?php echo $listall?>
<?=$listall?>
<label for="sch_sort" class="sound_only">검색분류</label>
<select name="sfl" id="sch_sort" class="search_sort">
<option value="vi_ip"<?php echo get_selected($sfl, 'vi_ip'); ?>>IP</option>
@@ -104,7 +104,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
?>
<tr class="<?php echo $bg; ?>">
<td class="td_id"><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?sfl=vi_ip&amp;stx=<?php echo $ip; ?>"><?php echo $ip; ?></a></td>
<td class="td_left"><?php echo $link.$title; ?><?php echo $link ? '</a>' : ''; ?></td>
<td class="td_left"><?php echo $link.$title; ?></a></td>
<td class="td_idsmall td_category1"><?php echo $brow; ?></td>
<td class="td_idsmall td_category3"><?php echo $os; ?></td>
<td class="td_idsmall td_category2"><?php echo $device; ?></td>
+3 -2
View File
@@ -129,7 +129,7 @@ switch ($day) {
<div id="wr_cont">
<form>
<select name="bo_table">
<option value="">전체게시판</option>
<option value="">전체게시판</a>
<?php
$sql = " select bo_table, bo_subject from {$g5['board_table']} order by bo_count_write desc ";
$result = sql_query($sql);
@@ -173,6 +173,7 @@ if (empty($line1) || empty($line2)) {
} else {
?>
<div id="chart1" style="height:500px; width:100%;"></div>
<div>
<script>
$(document).ready(function(){
var line1 = [<?php echo implode($line1, ','); ?>];
@@ -203,7 +204,7 @@ $(document).ready(function(){
<?php
}
?>
</div>
<?php
include_once ('./admin.tail.php');
?>
+2 -3
View File
@@ -28,7 +28,6 @@ include_once(G5_PATH.'/head.sub.php');
// 파일만 가능합니다.
// 공백이 없어야 합니다.
$msg = isset($msg) ? strip_tags($msg) : '';
$msg2 = str_replace("\\n", "<br>", $msg);
$url = clean_xss_tags($url);
@@ -37,7 +36,7 @@ if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER']);
$url = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", $url);
// url 체크
check_url_host($url, $msg);
check_url_host($url);
if($error) {
$header2 = "다음 항목에 오류가 있습니다.";
@@ -47,7 +46,7 @@ if($error) {
?>
<script>
alert("<?php echo $msg; ?>");
alert("<?php echo strip_tags($msg); ?>");
//document.location.href = "<?php echo $url; ?>";
<?php if ($url) { ?>
document.location.replace("<?php echo str_replace('&amp;', '&', $url); ?>");
-2
View File
@@ -2,8 +2,6 @@
include_once('./_common.php');
include_once(G5_PATH.'/head.sub.php');
$msg = isset($msg) ? strip_tags($msg) : '';
$msg2 = str_replace("\\n", "<br>", $msg);
if($error) {
+6 -8
View File
@@ -16,8 +16,6 @@ if (!$bo_table) {
alert($msg);
}
$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) {
// 글이 없을 경우 해당 게시판 목록으로 이동
@@ -79,7 +77,7 @@ if (isset($wr_id) && $wr_id) {
}
// 자신의 글이거나 관리자라면 통과
if (($write['mb_id'] && $write['mb_id'] === $member['mb_id']) || $is_admin) {
if (($write['mb_id'] && $write['mb_id'] == $member['mb_id']) || $is_admin) {
;
} else {
// 비밀글이라면
@@ -95,7 +93,7 @@ if (isset($wr_id) && $wr_id) {
and wr_reply = ''
and wr_is_comment = 0 ";
$row = sql_fetch($sql);
if ($row['mb_id'] === $member['mb_id'])
if ($row['mb_id'] == $member['mb_id'])
$is_owner = true;
}
@@ -122,7 +120,7 @@ if (isset($wr_id) && $wr_id) {
sql_query(" update {$write_table} set wr_hit = wr_hit + 1 where wr_id = '{$wr_id}' ");
// 자신의 글이면 통과
if ($write['mb_id'] && $write['mb_id'] === $member['mb_id']) {
if ($write['mb_id'] && $write['mb_id'] == $member['mb_id']) {
;
} else if ($is_guest && $board['bo_read_level'] == 1 && $write['wr_ip'] == $_SERVER['REMOTE_ADDR']) {
// 비회원이면서 읽기레벨이 1이고 등록된 아이피가 같다면 자신의 글이므로 통과
@@ -138,7 +136,7 @@ if (isset($wr_id) && $wr_id) {
set_session($ss_name, TRUE);
}
$g5['title'] = strip_tags(conv_subject($write['wr_subject'], 255))." > ".$g5['board_title'];
$g5['title'] = ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo_mobile_subject'] : $board['bo_subject']);
} else {
if ($member['mb_level'] < $board['bo_list_level']) {
if ($member['mb_id'])
@@ -173,7 +171,7 @@ if (isset($wr_id) && $wr_id) {
if (!isset($page) || (isset($page) && $page == 0)) $page = 1;
$g5['title'] = $g5['board_title'].' '.$page.' 페이지';
$g5['title'] = ((G5_IS_MOBILE && $board['bo_mobile_subject']) ? $board['bo_mobile_subject'] : $board['bo_subject']) ;
}
include_once(G5_PATH.'/head.sub.php');
@@ -221,7 +219,7 @@ if ($board['bo_use_nogood'])
$admin_href = "";
// 최고관리자 또는 그룹관리자라면
if ($member['mb_id'] && ($is_admin === 'super' || $group['gr_admin'] === $member['mb_id']))
if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id']))
$admin_href = G5_ADMIN_URL.'/board_form.php?w=u&amp;bo_table='.$bo_table;
include_once(G5_BBS_PATH.'/board_head.php');
+2 -2
View File
@@ -26,7 +26,7 @@ else if ($is_admin == 'group') { // 그룹관리자
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 삭제할 수 없습니다.');
} else if ($member['mb_id']) {
if ($member['mb_id'] !== $write['mb_id'])
if ($member['mb_id'] != $write['mb_id'])
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
} else {
if ($write['mb_id'])
@@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result))
$sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2)) {
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row2['bf_file']));
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
delete_board_thumbnail($bo_table, $row2['bf_file']);
+1 -1
View File
@@ -98,7 +98,7 @@ for ($i=$chk_count-1; $i>=0; $i--)
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2)) {
// 파일삭제
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '',$row2['bf_file']));
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
// 썸네일삭제
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
+4 -4
View File
@@ -20,16 +20,16 @@ if ($is_admin == 'super') // 최고관리자 통과
;
else if ($is_admin == 'group') { // 그룹관리자
$mb = get_member($write['mb_id']);
if ($member['mb_id'] === $group['gr_admin']) { // 자신이 관리하는 그룹인가?
if ($member['mb_id'] == $group['gr_admin']) { // 자신이 관리하는 그룹인가?
if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
;
else
alert('그룹관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다.');
} else
alert('자신이 관리하는 그룹의 게시판이 아니므로 코멘트를 삭제할 수 없습니다.');
} else if ($is_admin === 'board') { // 게시판관리자이면
} else if ($is_admin == 'board') { // 게시판관리자이면
$mb = get_member($write['mb_id']);
if ($member['mb_id'] === $board['bo_admin']) { // 자신이 관리하는 게시판인가?
if ($member['mb_id'] == $board['bo_admin']) { // 자신이 관리하는 게시판인가?
if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
;
else
@@ -37,7 +37,7 @@ else if ($is_admin == 'group') { // 그룹관리자
} else
alert('자신이 관리하는 게시판이 아니므로 코멘트를 삭제할 수 없습니다.');
} else if ($member['mb_id']) {
if ($member['mb_id'] !== $write['mb_id'])
if ($member['mb_id'] != $write['mb_id'])
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
} else {
if (!check_password($wr_password, $write['wr_password']))
+2 -11
View File
@@ -76,12 +76,8 @@ if (!get_session($ss_name))
$g5['title'] = '다운로드 &gt; '.conv_subject($write['wr_subject'], 255);
//파일명에 한글이 있는 경우
if(preg_match("/[\xA1-\xFE][\xA1-\xFE]/", $file['bf_source'])){
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
} else {
$original = urlencode($file['bf_source']);
}
//$original = urlencode($file['bf_source']);
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
@include_once($board_skin_path.'/download.tail.skin.php');
@@ -90,11 +86,6 @@ if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_
header("content-length: ".filesize("$filepath"));
header("content-disposition: attachment; filename=\"$original\"");
header("content-transfer-encoding: binary");
} else if (preg_match("/Firefox/i", $_SERVER['HTTP_USER_AGENT'])){
header("content-type: file/unknown");
header("content-length: ".filesize("$filepath"));
header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\"");
header("content-description: php generated data");
} else {
header("content-type: file/unknown");
header("content-length: ".filesize("$filepath"));
+5 -9
View File
@@ -33,11 +33,7 @@ if ($sop != 'and' && $sop != 'or')
// 분류 선택 또는 검색어가 있다면
$stx = trim($stx);
//검색인지 아닌지 구분하는 변수 초기화
$is_search_bbs = false;
if ($sca || $stx || $stx === '0') { //검색이면
$is_search_bbs = true; //검색구분변수 true 지정
if ($sca || $stx) {
$sql_search = get_sql_search($sca, $sfl, $stx, $sop);
// 가장 작은 번호를 얻어서 변수에 저장 (하단의 페이징에서 사용)
@@ -84,7 +80,7 @@ $notice_count = 0;
$notice_array = array();
// 공지 처리
if (!$is_search_bbs) {
if (!$sca && !$stx) {
$arr_notice = explode(',', trim($board['bo_notice']));
$from_notice_idx = ($page - 1) * $page_rows;
if($from_notice_idx < 0)
@@ -166,7 +162,7 @@ if ($sst) {
$sql_order = " order by {$sst} {$sod} ";
}
if ($is_search_bbs) {
if ($sca || $stx) {
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows ";
} else {
$sql = " select * from {$write_table} where wr_is_comment = 0 ";
@@ -184,7 +180,7 @@ if($page_rows > 0) {
while ($row = sql_fetch_array($result))
{
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
if ($is_search_bbs)
if ($sca || $stx)
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
@@ -205,7 +201,7 @@ $write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['c
$list_href = '';
$prev_part_href = '';
$next_part_href = '';
if ($is_search_bbs) {
if ($sca || $stx) {
$list_href = './board.php?bo_table='.$bo_table;
$patterns = array('#&amp;page=[0-9]*#', '#&amp;spt=[0-9\-]*#');
+1 -1
View File
@@ -83,7 +83,7 @@ if ($auto_login) {
if ($url) {
// url 체크
check_url_host($url, '', G5_URL, true);
check_url_host($url);
$link = urldecode($url);
// 2003-06-14 추가 (다른 변수들을 넘겨주기 위함)
+3 -10
View File
@@ -15,16 +15,9 @@ set_cookie('ck_auto', '', 0);
// 자동로그인 해제 end --------------------------------
if ($url) {
if ( substr($url, 0, 2) == '//' )
$url = 'http:' . $url;
$p = @parse_url(urldecode($url));
/*
// OpenRediect 취약점관련, PHP 5.3 이하버전에서는 parse_url 버그가 있음 ( Safflower 님 제보 ) 아래 url 예제
// http://localhost/bbs/logout.php?url=http://sir.kr%23@/
*/
if (preg_match('/^https?:\/\//i', $url) || $p['scheme'] || $p['host']) {
alert('url에 도메인을 지정할 수 없습니다.', G5_URL);
$p = @parse_url($url);
if ($p['scheme'] || $p['host']) {
alert('url에 도메인을 지정할 수 없습니다.');
}
$link = $url;
+1 -1
View File
@@ -22,7 +22,7 @@ include_once('./_head.sub.php');
$url = clean_xss_tags($_GET['url']);
// url 체크
check_url_host($url, '', G5_URL, true);
check_url_host($url);
$url = get_text($url);
+4 -12
View File
@@ -4,8 +4,6 @@ include_once('./_common.php');
if ($is_guest)
alert_close('회원만 이용하실 수 있습니다.');
set_session('ss_memo_delete_token', $token = uniqid(time()));
$g5['title'] = '내 쪽지함';
include_once(G5_PATH.'/head.sub.php');
@@ -20,11 +18,7 @@ else
$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']; // 시작 열을 구함
$total_count = number_format($row['cnt']);
if ($kind == 'recv')
{
@@ -45,7 +39,7 @@ $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']}'
order by a.me_id desc limit $from_record, {$config['cf_page_rows']} ";
order by a.me_id desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
@@ -70,12 +64,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$list[$i]['name'] = $name;
$list[$i]['send_datetime'] = $send_datetime;
$list[$i]['read_datetime'] = $read_datetime;
$list[$i]['view_href'] = './memo_view.php?me_id='.$row['me_id'].'&amp;kind='.$kind.'&amp;page='.$page;
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&amp;token='.$token.'&amp;kind='.$kind;
$list[$i]['view_href'] = './memo_view.php?me_id='.$row['me_id'].'&amp;kind='.$kind;
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&amp;kind='.$kind;
}
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "./memo.php?kind=$kind".$qstr."&amp;page=");
include_once($member_skin_path.'/memo.skin.php');
include_once(G5_PATH.'/tail.sub.php');
-6
View File
@@ -4,12 +4,6 @@ include_once('./_common.php');
if (!$is_member)
alert('회원만 이용하실 수 있습니다.');
$delete_token = get_session('ss_memo_delete_token');
set_session('ss_memo_delete_token', '');
if (!($token && $delete_token == $token))
alert('토큰 에러로 삭제 불가합니다.');
$me_id = (int)$_REQUEST['me_id'];
$sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
+2 -10
View File
@@ -57,22 +57,14 @@ $sql = " select * from {$g5[memo_table]}
order by me_id desc
limit 1 ";
$next = sql_fetch($sql);
if ($next['me_id'])
$next_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$next['me_id'];
if ($next[me_id])
$next_link = './memo_view.php?kind='.$kind.'&amp;me_id='.$next[me_id];
else
//$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
$next_link = '';
$mb = get_member($memo['me_'.$unkind.'_mb_id']);
$list_link = './memo.php?kind='.$kind;
if(isset($page) && $page){
$prev_link .= $prev_link ? '&amp;page='.(int) $page : '';
$next_link .= $next_link ? '&amp;page='.(int) $page : '';
$list_link .= '&amp;page='.(int) $page;
}
include_once($member_skin_path.'/memo_view.skin.php');
include_once(G5_PATH.'/tail.sub.php');
+1 -8
View File
@@ -28,14 +28,7 @@ while ($row = sql_fetch_array($result))
$wr_num = $row['wr_num'];
for ($i=0; $i<count($_POST['chk_bo_table']); $i++)
{
$move_bo_table = preg_replace('/[^a-z0-9_]/i', '', $_POST['chk_bo_table'][$i]);
// 취약점 18-0075 참고
$sql = "select * from {$g5['board_table']} where bo_table = '".sql_real_escape_string($move_bo_table)."' ";
$move_board = sql_fetch($sql);
// 존재하지 않다면
if( !$move_board['bo_table'] ) continue;
$move_bo_table = $_POST['chk_bo_table'][$i];
$move_write_table = $g5['write_prefix'] . $move_bo_table;
$src_dir = G5_DATA_PATH.'/file/'.$bo_table; // 원본 디렉토리
+2 -9
View File
@@ -4,13 +4,6 @@ include_once('./_common.php');
if($is_guest)
alert('회원이시라면 로그인 후 이용해 주십시오.', G5_URL);
$delete_token = get_session('ss_qa_delete_token');
set_session('ss_qa_delete_token', '');
//관리자가 아닌경우에는 토큰을 검사합니다.
if (!$is_admin && !($token && $delete_token == $token))
alert('토큰 에러로 삭제 불가합니다.');
$tmp_array = array();
if ($qa_id) // 건별삭제
$tmp_array[0] = $qa_id;
@@ -22,7 +15,7 @@ if(!$count)
alert('삭제할 게시글을 하나이상 선택해 주십시오.');
for($i=0; $i<$count; $i++) {
$qa_id = (int) $tmp_array[$i];
$qa_id = $tmp_array[$i];
$sql = " select qa_id, mb_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2
from {$g5['qa_content_table']}
@@ -33,7 +26,7 @@ for($i=0; $i<$count; $i++) {
continue;
// 자신의 글이 아니면 건너뜀
if($is_admin != 'super' && $row['mb_id'] !== $member['mb_id'])
if($is_admin != 'super' && $row['mb_id'] != $member['mb_id'])
continue;
// 답변이 달린 글은 삭제못함
+1 -2
View File
@@ -109,8 +109,7 @@ if(is_file($skin_file)) {
*/
if(($view['qa_type'] && $is_admin) || (!$view['qa_type'] && $view['qa_status'] == 0)) {
$update_href = G5_BBS_URL.'/qawrite.php?w=u&amp;qa_id='.$view['qa_id'].$qstr;
set_session('ss_qa_delete_token', $token = uniqid(time()));
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].'&amp;token='.$token.$qstr;
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].$qstr;
}
// 질문글이고 등록된 답변이 있다면
+1 -1
View File
@@ -200,7 +200,7 @@ for ($i=1; $i<=count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['filesize'] = $filesize;
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
shuffle($chars_array);
$shuffle = implode('', $chars_array);
+22 -49
View File
@@ -3,7 +3,6 @@ include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
include_once(G5_LIB_PATH.'/register.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// 리퍼러 체크
referer_check();
@@ -363,16 +362,13 @@ $msg = "";
// 아이콘 업로드
$mb_icon = '';
$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'])) {
if (preg_match($image_regex, $_FILES['mb_icon']['name'])) {
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
// 아이콘 용량이 설정값보다 이하만 업로드 가능
if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) {
@mkdir($mb_dir, G5_DIR_PERMISSION);
@chmod($mb_dir, G5_DIR_PERMISSION);
$dest_path = $mb_dir.'/'.$mb_icon_img;
$dest_path = $mb_dir.'/'.$mb_id.'.gif';
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
chmod($dest_path, G5_FILE_PERMISSION);
if (file_exists($dest_path)) {
@@ -381,24 +377,13 @@ if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name']
// gif 파일에 악성코드를 심어 업로드 하는 경우를 방지
// 에러메세지는 출력하지 않는다.
//-----------------------------------------------------------------
$size = @getimagesize($dest_path);
if (!($size[2] === 1 || $size[2] === 2 || $size[2] === 3)) { // jpg, gif, png 파일이 아니면 올라간 이미지를 삭제한다.
$size = getimagesize($dest_path);
if ($size[2] != 1) // gif 파일이 아니면 올라간 이미지를 삭제한다.
@unlink($dest_path);
else
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height'])
@unlink($dest_path);
} else if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
$thumb = null;
if($size[2] === 2 || $size[2] === 3) {
//jpg 또는 png 파일 적용
$thumb = thumbnail($mb_icon_img, $mb_dir, $mb_dir, $config['cf_member_icon_width'], $config['cf_member_icon_height'], true, true);
if($thumb) {
@unlink($dest_path);
rename($mb_dir.'/'.$thumb, $dest_path);
}
}
if( !$thumb ){
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
@unlink($dest_path);
}
}
//=================================================================\
}
} else {
@@ -406,7 +391,7 @@ if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name']
}
} else {
$msg .= $_FILES['mb_icon']['name'].'은(는) 이미지 파일이 아닙니다.';
$msg .= $_FILES['mb_icon']['name'].'은(는) gif 파일이 아닙니다.';
}
}
@@ -421,46 +406,34 @@ if( $config['cf_member_img_size'] && $config['cf_member_img_width'] && $config['
// 아이콘 삭제
if (isset($_POST['del_mb_img'])) {
@unlink($mb_dir.'/'.$mb_icon_img);
@unlink($mb_dir.'/'.$mb_id.'.gif');
}
$msg = '';
// 회원 프로필 이미지 업로드
$mb_img = '';
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
$msg = $msg ? $msg."\\r\\n" : '';
if (preg_match($image_regex, $_FILES['mb_img']['name'])) {
if (preg_match("/(\.gif)$/i", $_FILES['mb_img']['name']) || preg_match("/(\.jpg)$/i", $_FILES['mb_img']['name'])) {
// 아이콘 용량이 설정값보다 이하만 업로드 가능
if ($_FILES['mb_img']['size'] <= $config['cf_member_img_size']) {
if ($_FILES['mb_icon']['size'] <= $config['cf_member_img_size']) {
@mkdir($mb_dir, G5_DIR_PERMISSION);
@chmod($mb_dir, G5_DIR_PERMISSION);
$dest_path = $mb_dir.'/'.$mb_icon_img;
$dest_path = $mb_dir.'/'.$mb_id.'.gif';
move_uploaded_file($_FILES['mb_img']['tmp_name'], $dest_path);
chmod($dest_path, G5_FILE_PERMISSION);
if (file_exists($dest_path)) {
$size = @getimagesize($dest_path);
if (!($size[2] === 1 || $size[2] === 2 || $size[2] === 3)) { // gif jpg png 파일이 아니면 올라간 이미지를 삭제한다.
$size = getimagesize($dest_path);
if ( ! ($size[2] === 1 || $size[2] === 2) ) // gif 또는 jpg 파일이 아니면 올라간 이미지를 삭제한다.
@unlink($dest_path);
else
// 이미지의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height'])
@unlink($dest_path);
} else if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
$thumb = null;
if($size[2] === 2 || $size[2] === 3) {
//jpg 또는 png 파일 적용
$thumb = thumbnail($mb_icon_img, $mb_dir, $mb_dir, $config['cf_member_img_width'], $config['cf_member_img_height'], true, true);
if($thumb) {
@unlink($dest_path);
rename($mb_dir.'/'.$thumb, $dest_path);
}
}
if( !$thumb ){
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
@unlink($dest_path);
}
}
//=================================================================\
}
} else {
$msg .= '회원이미지을 '.number_format($config['cf_member_img_size']).'바이트 이하로 업로드 해주십시오.';
$msg .= '회원아이콘을 '.number_format($config['cf_member_img_size']).'바이트 이하로 업로드 해주십시오.';
}
} else {
+1 -9
View File
@@ -45,14 +45,6 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
// 원글이 존재한다면
if ($wr['wr_id'])
{
// 세션의 시간 검사
// 4.00.15 - 댓글 수정시 연속 게시물 등록 메시지로 인한 오류 수정
if ($w == 'c' && $_SESSION['ss_datetime'] >= (G5_SERVER_TIME - $config['cf_delay_sec']) && !$is_admin)
alert('너무 빠른 시간내에 게시물을 연속해서 올릴 수 없습니다.');
set_session('ss_datetime', G5_SERVER_TIME);
$mb_id = $member['mb_id'];
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_password = $member['mb_password'];
@@ -94,7 +86,7 @@ if ($wr_content && ($member['mb_level'] >= $board['bo_comment_level']))
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + 1 where bo_table = '$bo_table' ");
// 포인트 부여
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id}-{$comment_id} 댓글쓰기(스크랩)", $bo_table, $comment_id, '댓글');
insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id}-{$comment_id} 코멘트쓰기", $bo_table, $comment_id, '코멘트');
}
}
+6 -8
View File
@@ -10,7 +10,7 @@ if ($sop != 'and' && $sop != 'or')
$sql_search = "";
// 검색이면
if ($sca || $stx || $stx === '0') {
if ($sca || $stx) {
// where 문을 얻음
$sql_search = get_sql_search($sca, $sfl, $stx, $sop);
$search_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr;
@@ -25,20 +25,20 @@ if (!$board['bo_use_list_view']) {
$sql_search = " and " . $sql_search;
// 윗글을 얻음
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply < '{$write['wr_reply']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 ";
$sql = " select wr_id, wr_subject from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply < '{$write['wr_reply']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 ";
$prev = sql_fetch($sql);
// 위의 쿼리문으로 값을 얻지 못했다면
if (!$prev['wr_id']) {
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num < '{$write['wr_num']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 ";
$sql = " select wr_id, wr_subject from {$write_table} where wr_is_comment = 0 and wr_num < '{$write['wr_num']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 ";
$prev = sql_fetch($sql);
}
// 아래글을 얻음
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply > '{$write['wr_reply']}' {$sql_search} order by wr_num, wr_reply limit 1 ";
$sql = " select wr_id, wr_subject from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply > '{$write['wr_reply']}' {$sql_search} order by wr_num, wr_reply limit 1 ";
$next = sql_fetch($sql);
// 위의 쿼리문으로 값을 얻지 못했다면
if (!$next['wr_id']) {
$sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num > '{$write['wr_num']}' {$sql_search} order by wr_num, wr_reply limit 1 ";
$sql = " select wr_id, wr_subject from {$write_table} where wr_is_comment = 0 and wr_num > '{$write['wr_num']}' {$sql_search} order by wr_num, wr_reply limit 1 ";
$next = sql_fetch($sql);
}
}
@@ -48,7 +48,6 @@ $prev_href = '';
if (isset($prev['wr_id']) && $prev['wr_id']) {
$prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255));
$prev_href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$prev['wr_id'].$qstr;
$prev_wr_date = $prev['wr_datetime'];
}
// 다음글 링크
@@ -56,7 +55,6 @@ $next_href = '';
if (isset($next['wr_id']) && $next['wr_id']) {
$next_wr_subject = get_text(cut_str($next['wr_subject'], 255));
$next_href = './board.php?bo_table='.$bo_table.'&amp;wr_id='.$next['wr_id'].$qstr;
$next_wr_date = $next['wr_datetime'];
}
// 쓰기 링크
@@ -72,7 +70,7 @@ if ($member['mb_level'] >= $board['bo_reply_level'])
// 수정, 삭제 링크
$update_href = $delete_href = '';
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] === $write['mb_id'])) || $is_admin) {
if (($member['mb_id'] && ($member['mb_id'] == $write['mb_id'])) || $is_admin) {
$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 ='./delete.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;token='.$token.'&amp;page='.$page.urldecode($qstr);
+3 -3
View File
@@ -39,8 +39,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$list[$i]['content'] = $list[$i]['content1']= '비밀글 입니다.';
if (!strstr($row['wr_option'], 'secret') ||
$is_admin ||
($write['mb_id']===$member['mb_id'] && $member['mb_id']) ||
($row['mb_id']===$member['mb_id'] && $member['mb_id'])) {
($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
($row['mb_id']==$member['mb_id'] && $member['mb_id'])) {
$list[$i]['content1'] = $row['wr_content'];
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
@@ -71,7 +71,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
if ($member['mb_id'])
{
if ($row['mb_id'] === $member['mb_id'] || $is_admin)
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'] = './delete_comment.php?bo_table='.$bo_table.'&amp;comment_id='.$row['wr_id'].'&amp;token='.$token.'&amp;page='.$page.$qstr;
+6 -6
View File
@@ -56,7 +56,7 @@ if ($w == '') {
} else if ($w == 'u') {
// 김선용 1.00 : 글쓰기 권한과 수정은 별도로 처리되어야 함
//if ($member['mb_level'] < $board['bo_write_level']) {
if($member['mb_id'] && $write['mb_id'] === $member['mb_id']) {
if($member['mb_id'] && $write['mb_id'] == $member['mb_id']) {
;
} else if ($member['mb_level'] < $board['bo_write_level']) {
if ($member['mb_id']) {
@@ -116,7 +116,7 @@ if ($w == '') {
if (strstr($write['wr_option'], 'secret')) {
if ($write['mb_id']) {
// 회원의 경우는 해당 글쓴 회원 및 관리자
if (!($write['mb_id'] === $member['mb_id'] || $is_admin))
if (!($write['mb_id'] == $member['mb_id'] || $is_admin))
alert('비밀글에는 자신 또는 관리자만 답변이 가능합니다.');
} else {
// 비회원의 경우는 비밀글에 답변이 불가함
@@ -168,7 +168,7 @@ if (!empty($group['gr_use_access'])) {
alert("접근 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.", 'login.php?'.$qstr.'&amp;url='.urlencode($_SERVER['SCRIPT_NAME'].'?bo_table='.$bo_table));
}
if ($is_admin == 'super' || $group['gr_admin'] === $member['mb_id'] || $board['bo_admin'] === $member['mb_id']) {
if ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'] || $board['bo_admin'] == $member['mb_id']) {
; // 통과
} else {
// 그룹접근
@@ -251,7 +251,7 @@ $is_name = false;
$is_password = false;
$is_email = false;
$is_homepage = false;
if ($is_guest || ($is_admin && $w == 'u' && $member['mb_id'] !== $write['mb_id'])) {
if ($is_guest || ($is_admin && $w == 'u' && $member['mb_id'] != $write['mb_id'])) {
$is_name = true;
$is_password = true;
$is_email = true;
@@ -308,7 +308,7 @@ if ($w == '') {
$password_required = '';
if (!$is_admin) {
if (!($is_member && $member['mb_id'] === $write['mb_id'])) {
if (!($is_member && $member['mb_id'] == $write['mb_id'])) {
if (!check_password($wr_password, $write['wr_password'])) {
alert('비밀번호가 틀립니다.');
}
@@ -386,7 +386,7 @@ else
$captcha_html = '';
$captcha_js = '';
$is_use_captcha = ((($board['bo_use_captcha'] && $w !== 'u') || $is_guest) && !$is_admin) ? 1 : 0;
$is_use_captcha = ((!empty($board['bo_use_captcha']) || $is_guest) && !$is_admin) ? 1 : 0;
if ($is_use_captcha) {
$captcha_html = captcha_html();
+3 -3
View File
@@ -269,7 +269,7 @@ else if ($w == 'cu') // 댓글 수정
;
else if ($is_admin == 'group') { // 그룹관리자
$mb = get_member($comment['mb_id']);
if ($member['mb_id'] === $group['gr_admin']) { // 자신이 관리하는 그룹인가?
if ($member['mb_id'] == $group['gr_admin']) { // 자신이 관리하는 그룹인가?
if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
;
else
@@ -278,7 +278,7 @@ else if ($w == 'cu') // 댓글 수정
alert('자신이 관리하는 그룹의 게시판이 아니므로 댓글을 수정할 수 없습니다.');
} else if ($is_admin == 'board') { // 게시판관리자이면
$mb = get_member($comment['mb_id']);
if ($member['mb_id'] === $board['bo_admin']) { // 자신이 관리하는 게시판인가?
if ($member['mb_id'] == $board['bo_admin']) { // 자신이 관리하는 게시판인가?
if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
;
else
@@ -286,7 +286,7 @@ else if ($w == 'cu') // 댓글 수정
} else
alert('자신이 관리하는 게시판이 아니므로 댓글을 수정할 수 없습니다.');
} else if ($member['mb_id']) {
if ($member['mb_id'] !== $comment['mb_id'])
if ($member['mb_id'] != $comment['mb_id'])
alert('자신의 글이 아니므로 수정할 수 없습니다.');
} else {
if($comment['wr_password'] != $wr_password)
+9 -14
View File
@@ -129,23 +129,18 @@ for ($i=1; $i<=10; $i++) {
if ($w == '' || $w == 'u') {
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 공지는 관리자만 등록이 가능해야 함
if (!$is_admin && $notice) {
alert('관리자만 공지할 수 있습니다.');
}
//회원 자신이 쓴글을 수정할 경우 공지가 풀리는 경우가 있음
if($w =='u' && !$is_admin && $board['bo_notice'] && in_array($wr['wr_id'], $notice_array)){
$notice = 1;
}
// 김선용 1.00 : 글쓰기 권한과 수정은 별도로 처리되어야 함
if($w =='u' && $member['mb_id'] && $wr['mb_id'] === $member['mb_id']) {
if($w =='u' && $member['mb_id'] && $wr['mb_id'] == $member['mb_id']) {
;
} else if ($member['mb_level'] < $board['bo_write_level']) {
alert('글을 쓸 권한이 없습니다.');
}
// 외부에서 글을 등록할 수 있는 버그가 존재하므로 공지는 관리자만 등록이 가능해야 함
if (!$is_admin && $notice) {
alert('관리자만 공지할 수 있습니다.');
}
} else if ($w == 'r') {
if (in_array((int)$wr_id, $notice_array)) {
@@ -193,7 +188,7 @@ if ($w == '' || $w == 'u') {
alert('w 값이 제대로 넘어오지 않았습니다.');
}
$is_use_captcha = ((($board['bo_use_captcha'] && $w !== 'u') || $is_guest) && !$is_admin) ? 1 : 0;
$is_use_captcha = ((!empty($board['bo_use_captcha']) || $is_guest) && !$is_admin) ? 1 : 0;
if ($is_use_captcha && !chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
@@ -333,7 +328,7 @@ if ($w == '' || $w == 'r') {
if ($member['mb_id']) {
// 자신의 글이라면
if ($member['mb_id'] === $wr['mb_id']) {
if ($member['mb_id'] == $wr['mb_id']) {
$mb_id = $member['mb_id'];
$wr_name = addslashes(clean_xss_tags($board['bo_use_name'] ? $member['mb_name'] : $member['mb_nick']));
$wr_email = addslashes($member['mb_email']);
@@ -531,7 +526,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
$upload[$i]['filesize'] = $filesize;
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
shuffle($chars_array);
$shuffle = implode('', $chars_array);
+17 -20
View File
@@ -29,8 +29,7 @@ for ($i=0; $i<$ext_cnt; $i++) {
function g5_path()
{
$chroot = substr($_SERVER['SCRIPT_FILENAME'], 0, strpos($_SERVER['SCRIPT_FILENAME'], dirname(__FILE__)));
$result['path'] = str_replace('\\', '/', $chroot.dirname(__FILE__));
$result['path'] = str_replace('\\', '/', dirname(__FILE__));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']);
$pattern = '/' . preg_quote($document_root, '/') . '/i';
@@ -140,7 +139,7 @@ if (file_exists($dbconfig_file)) {
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."'");
if (defined(G5_TIMEZONE)) sql_query(" set time_zone = '".G5_TIMEZONE."'");
} else {
?>
@@ -254,7 +253,7 @@ if (isset($_REQUEST['sfl'])) {
if (isset($_REQUEST['stx'])) { // search text (검색어)
$stx = get_search_string(trim($_REQUEST['stx']));
if ($stx || $stx === '0')
if ($stx)
$qstr .= '&amp;stx=' . urlencode(cut_str($stx, 20, ''));
} else {
$stx = '';
@@ -373,22 +372,20 @@ if ($_SESSION['ss_mb_id']) { // 로그인중이라면
if (strtolower($tmp_mb_id) != strtolower($config['cf_admin'])) {
$sql = " select mb_password, mb_intercept_date, mb_leave_date, mb_email_certify from {$g5['member_table']} where mb_id = '{$tmp_mb_id}' ";
$row = sql_fetch($sql);
if($row['mb_password']){
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']);
// 쿠키에 저장된 키와 같다면
$tmp_key = get_cookie('ck_auto');
if ($tmp_key === $key && $tmp_key) {
// 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면
if ($row['mb_intercept_date'] == '' &&
$row['mb_leave_date'] == '' &&
(!$config['cf_use_email_certify'] || preg_match('/[1-9]/', $row['mb_email_certify'])) ) {
// 세션에 회원아이디를 저장하여 로그인으로 간주
set_session('ss_mb_id', $tmp_mb_id);
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']);
// 쿠키에 저장된 키와 같다면
$tmp_key = get_cookie('ck_auto');
if ($tmp_key === $key && $tmp_key) {
// 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면
if ($row['mb_intercept_date'] == '' &&
$row['mb_leave_date'] == '' &&
(!$config['cf_use_email_certify'] || preg_match('/[1-9]/', $row['mb_email_certify'])) ) {
// 세션에 회원아이디를 저장하여 로그인으로 간주
set_session('ss_mb_id', $tmp_mb_id);
// 페이지를 재실행
echo "<script type='text/javascript'> window.location.reload(); </script>";
exit;
}
// 페이지를 재실행
echo "<script type='text/javascript'> window.location.reload(); </script>";
exit;
}
}
// $row 배열변수 해제
@@ -492,7 +489,7 @@ if(isset($config['cf_theme']) && trim($config['cf_theme'])) {
// 테마 설정 로드
if(defined('G5_THEME_PATH') && is_file(G5_THEME_PATH.'/theme.config.php'))
if(is_file(G5_THEME_PATH.'/theme.config.php'))
include_once(G5_THEME_PATH.'/theme.config.php');
//=====================================================================================
+2 -2
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.3.1.2');
define('G5_GNUBOARD_VER', '5.3');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
@@ -152,7 +152,7 @@ define('G5_DIR_PERMISSION', 0755); // 디렉토리 생성시 퍼미션
define('G5_FILE_PERMISSION', 0644); // 파일 생성시 퍼미션
// 모바일 인지 결정 $_SERVER['HTTP_USER_AGENT']
define('G5_MOBILE_AGENT', 'phone|samsung|lgtel|mobile|[^A]skt|nokia|blackberry|BB10|android|sony');
define('G5_MOBILE_AGENT', 'phone|samsung|lgtel|mobile|[^A]skt|nokia|blackberry|android|sony');
// SMTP
// lib/mailer.lib.php 에서 사용
+17 -34
View File
@@ -43,18 +43,8 @@ border: 1px solid #558ab7 !important;
}
.placeholdersjs { color: #aaa !important; }
/* 레이아웃 크기 지정 */
#hd, #wrapper, #ft{min-width:1200px}
#hd_pop,
#hd_wrapper,
#tnb ul,
#gnb .gnb_wrap,
#container_wr,
#ft_wr{width:1200px}
/* 팝업레이어 */
#hd_pop {z-index:1000;position:relative;margin:0 auto;height:0}
#hd_pop {z-index:1000;position:relative;margin:0 auto;width:1200px;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%}
@@ -66,10 +56,10 @@ border: 1px solid #558ab7 !important;
.hd_pops_footer .hd_pops_close{background:#393939;position:absolute;top:0;right:0}
/* 상단 레이아웃 */
#hd {border-top:2px solid #253dbe}
#hd {min-width:1000px;border-top:2px solid #253dbe}
#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#hd_wrapper {position:relative;margin:0 auto;padding:10px 0;height:115px;zoom:1}
#hd_wrapper {position:relative;margin:0 auto;padding:10px 0;height:115px;width:1200px;zoom:1}
#hd_wrapper:after {display:block;visibility:hidden;clear:both;content:""}
#logo {float:left;padding:30px 0 0}
@@ -77,14 +67,14 @@ border: 1px solid #558ab7 !important;
.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: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_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}
#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 {margin:0 auto;width:1200px;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}
@@ -118,7 +108,7 @@ border: 1px solid #558ab7 !important;
/* 메인메뉴 */
#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_wrap{margin:0 auto;width:1200px;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);
@@ -149,7 +139,7 @@ transition: all 0.3s ease-out;}
.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_1dli_over2 .gnb_2dul {display:block;right:0;background:#fff}
.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}
@@ -173,12 +163,12 @@ box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
/* 중간 레이아웃 */
#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:305px;padding:0;background: #e7ebf3;height: 100%;border: 1px solid #adbfd2;margin:20px 0 20px 20px}
#container_wr {z-index:5;margin:0 auto;width:1200px;height:100%;;zoom:1}
#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: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 {font-size:1.333em;max-width:1200px;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%}
@@ -187,7 +177,7 @@ box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
/* 하단 레이아웃 */
#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 {margin:0 auto;position:relative;}
#ft_wr {width:1200px;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}
@@ -216,8 +206,8 @@ 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 #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_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_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}
@@ -257,7 +247,7 @@ button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f
.btn_confirm {text-align:right} /* 서식단계 진행 */
.btn_submit {border:0;background:#253dbe;color:#fff;cursor:pointer;border:0}
.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;}
@@ -296,7 +286,7 @@ a.btn_admin,.btn_admin {display:inline-block;background:#d13f4a;color:#fff;text-
.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;background:#fff;padding:10px 5px;border-top:1px solid #ecf0f1;line-height:1.4em;height:60px;word-break:break-all}
.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}
@@ -325,7 +315,7 @@ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
.full_input{width:100%}
.half_input{width:49.5%}
.tbl_frm01 textarea, .write_div textarea {width:100%;height:100px}
.tbl_frm01 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}
@@ -420,7 +410,7 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
.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:#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_page:hover{background:#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}
@@ -433,13 +423,6 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
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;
}
/* Mobile화면으로 */
#device_change {display:block;margin:0.3em;padding:0.5em 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center}
+4 -4
View File
@@ -39,8 +39,8 @@ ul,li,dl,dt,dd{list-style:none;padding:0;margin:0}
#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:50px;text-align:center}
#logo img{vertical-align:middle;max-height:100%;width:auto}
#logo {padding:15px 10px;height:50px;text-align:center}
#logo img{vertical-align:middle}
#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));
@@ -236,8 +236,8 @@ a.btn_admin:focus, a.btn_admin:hover {}
/* 기본폼 */
.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 div{margin:5px 0;position:relative}
.form_01 li{margin:5px 0;position:relative}
.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:40px;}
-9
View File
@@ -1,9 +0,0 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 유저 사이드뷰에서 아이콘 지정 안했을시 기본 no 프로필 이미지
define('G5_NO_PROFILE_IMG', '<span class="profile_img"><img src="'.G5_IMG_URL.'/no_profile.gif" alt="no_profile" width="20" height="20"></span>');
// 썸네일 처리 방식, 비율유지 하지 않고 썸네일을 생성하려면 주석을 풀고 값은 false 입력합니다. ( true 또는 주석으로 된 경우에는 비율 유지합니다. )
//define('G5_USE_THUMB_RATIO', false);
?>
+1 -4
View File
@@ -39,10 +39,7 @@ define('G5_SOCIAL_USE_POPUP', ! is_mobile() ); // 모바일에서는 팝업사
define('G5_SOCIAL_DELETE_DAY', 0);
// 메일 인증관련, false 이면 메일인증을 받지 않고 로그인됩니다. true 이고 기본환경설정에서 메일인증설정이 활성화 되어 있는 경우 메일인증을 받아야만 로그인 됩니다.
define('G5_SOCIAL_CERTIFY_MAIL', false);
// 소셜 DEBUG 관련 설정, 기본값은 false, true 로 설정시 data/tmp/social_anystring.log 파일이 생성됩니다.
define('G5_SOCIAL_IS_DEBUG', false);
define('G5_SOCIAL_CERTIFY_MAIL', false );
include_once(G5_SOCIAL_LOGIN_PATH.'/includes/functions.php');
?>
+8
View File
@@ -1,3 +1,11 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 유저 사이드뷰에서 아이콘 지정 안했을시 기본 no 프로필 이미지
define('G5_NO_PROFILE_IMG', '<span class="profile_img"><img src="'.G5_IMG_URL.'/no_profile.gif" alt="no_profile" width="20" height="20"></span>');
/**
* 이 아래에 사용자 코드를 적용해 주세요.
*/
?>
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_JS_VER', '171222');
define('G5_CSS_VER', '171222');
define('G5_JS_VER', '171106');
define('G5_CSS_VER', '171106');
?>
+148 -29
View File
@@ -11,8 +11,6 @@ if(get_session('tables_copied') == 'done')
if($is_admin != 'super')
alert('최고관리자로 로그인 후 실행해 주십시오.', G5_URL);
include_once(G5_PATH.'/head.php');
?>
<style>
@@ -22,41 +20,162 @@ include_once(G5_PATH.'/head.php');
#g4_import_frm .btn_submit {padding:0 10px;height:24px}
</style>
<div id="g4_import">
<p>
이 프로그램은 그누보드5 설치 후 바로 실행하셔야만 합니다.<br>
만약 그누보드5 사이트를 운영 중에 이 프로그램을 실행하시면 DB 데이터가 망실되거나 데이터의 오류가 발생할 수 있습니다.<br>
또한 중복해서 실행하실 경우에도 DB 데이터의 오류가 발생할 수 있으니 반드시 한번만 실행해 주십시오.
</p>
<p>프로그램을 실행하시려면 그누보드4의 config.php 파일 경로를 입력하신 후 확인을 클릭해 주십시오.</p>
<!-- 상단 시작 { -->
<div id="hd">
<h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
<form name="fimport" method="post" action="./g4_import_run.php" onsubmit="return fimport_submit(this);">
<input type="hidden" name="token" value="" >
<div id="g4_import_frm">
<label for="file_path">config.php 파일 경로</label>
<input type="text" name="file_path" id="file_path" required class="frm_input required">
<input type="submit" value="확인" class="btn_submit">
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
<div id="hd_wrapper">
<div id="logo">
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="<?php echo $config['cf_title']; ?>"></a>
</div>
<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">
<input type="hidden" name="sop" value="and">
<label for="sch_stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" id="sch_stx" maxlength="20">
<input type="submit" id="sch_submit" value="검색">
</form>
<script>
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
return true;
}
</script>
</fieldset>
<ul id="tnb">
<?php if ($is_member) { ?>
<?php if ($is_admin) { ?>
<li><a href="<?php echo G5_ADMIN_URL ?>"><b>관리자</b></a></li>
<?php } ?>
<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 } else { ?>
<li><a href="<?php echo G5_BBS_URL ?>/register.php">회원가입</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/login.php"><b>로그인</b></a></li>
<?php } ?>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>
</ul>
<div id="text_size">
<!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
<button id="size_down" onclick="font_resize('container', 'ts_up ts_up2', '');"><img src="<?php echo G5_URL; ?>/img/ts01.gif" alt="기본"></button>
<button id="size_def" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');"><img src="<?php echo G5_URL; ?>/img/ts02.gif" alt="크게"></button>
<button id="size_up" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');"><img src="<?php echo G5_URL; ?>/img/ts03.gif" alt="더크게"></button>
</div>
</div>
</form>
<p>
경로는 그누보드5 설치 루트를 기준으로 그누보드4의 config.php 파일의 상대경로입니다.<br>
예를 들어 그누보드4를 웹루트에 설치하셨고 그누보드5를 g5라는 하위 폴더에 설치하셨다면 입력하실 경로는 ../config.php 입니다.
</p>
<hr>
<nav id="gnb">
<h2>메인메뉴</h2>
<ul id="gnb_1dul">
<li class="gnb_empty">메뉴는 표시하지 않습니다.</li>
</ul>
</nav>
</div>
<!-- } 상단 끝 -->
<hr>
<!-- 콘텐츠 시작 { -->
<div id="wrapper">
<div id="aside">
<?php echo outlogin('basic'); // 외부 로그인 ?>
</div>
<div id="container">
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>
<div id="g4_import">
<p>
이 프로그램은 그누보드5 설치 후 바로 실행하셔야만 합니다.<br>
만약 그누보드5 사이트를 운영 중에 이 프로그램을 실행하시면 DB 데이터가 망실되거나 데이터의 오류가 발생할 수 있습니다.<br>
또한 중복해서 실행하실 경우에도 DB 데이터의 오류가 발생할 수 있으니 반드시 한번만 실행해 주십시오.
</p>
<p>프로그램을 실행하시려면 그누보드4의 config.php 파일 경로를 입력하신 후 확인을 클릭해 주십시오.</p>
<form name="fimport" method="post" action="./g4_import_run.php" onsubmit="return fimport_submit(this);">
<input type="hidden" name="token" value="" >
<div id="g4_import_frm">
<label for="file_path">config.php 파일 경로</label>
<input type="text" name="file_path" id="file_path" required class="frm_input required">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
<p>
경로는 그누보드5 설치 루트를 기준으로 그누보드4의 config.php 파일의 상대경로입니다.<br>
예를 들어 그누보드4를 웹루트에 설치하셨고 그누보드5를 g5라는 하위 폴더에 설치하셨다면 입력하실 경로는 ../config.php 입니다.
</p>
</div>
<script>
function fimport_submit(f)
{
var token = get_write_token('g4_import');
f.token.value = token;
return confirm('그누보드4의 DB 데이터를 이전하시겠습니까?');
}
</script>
</div>
</div>
<!-- } 콘텐츠 끝 -->
<hr>
<!-- 하단 시작 { -->
<div id="ft">
<div id="ft_catch"><img src="<?php echo G5_IMG_URL; ?>/ft.png" alt="<?php echo G5_VERSION ?>"></div>
<div id="ft_copy">
<p>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
<a href="#">상단으로</a>
</p>
</div>
</div>
<script>
function fimport_submit(f)
{
var token = get_write_token('g4_import');
f.token.value = token;
return confirm('그누보드4의 DB 데이터를 이전하시겠습니까?');
}
$(function() {
// 폰트 리사이즈 쿠키있으면 실행
font_resize("container", get_cookie("ck_font_resize_rmv_class"), get_cookie("ck_font_resize_add_class"));
});
</script>
<?php
include_once(G5_PATH.'/tail.php');
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/tail.sub.php');
?>
+420 -338
View File
@@ -3,9 +3,17 @@ include_once('./_common.php');
ob_end_clean();
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
set_time_limit ( 0 );
ini_set('memory_limit', '50M');
$g5['title'] = '그누보드4 DB 데이터 이전';
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/head.sub.php');
echo '<link rel="stylesheet" href="'.G5_URL.'/g4_import.css">';
if(empty($_POST))
alert('올바른 방법으로 이용해 주십시오.', G5_URL);
@@ -33,9 +41,6 @@ if(!is_file($g4_config_file))
alert('입력하신 경로에 config.php 파일이 존재하지 않습니다.');
$is_euckr = false;
$g5['title'] = '그누보드4 DB 데이터 이전';
include_once(G5_PATH.'/head.php');
?>
<script>
// 새로고침 방지
@@ -63,375 +68,452 @@ document.onkeydown = noRefresh ;
#g4_import_run ol {margin: 0;padding: 0 0 0 25px;border: 1px solid #E9E9E9;border-bottom: 0;background: #f5f8f9;list-style:none;zoom:1}
#g4_import_run li {padding:7px 10px;border-bottom:1px solid #e9e9e9}
#g4_import_run #run_msg {padding:30px 0;text-align:center}
#container_wr #aside{display:none}
</style>
<div id="g4_import_run">
<ol>
<?php
flush();
<!-- 상단 시작 { -->
<div id="hd">
<h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
// g4의 confing.php
require('./'.$g4_config_file);
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
if(preg_replace('/[^a-z]/', '', strtolower($g4['charset'])) == 'euckr')
$is_euckr = true;
<div id="hd_wrapper">
// member table 복사
$columns = sql_field_names($g5['member_table']);
<div id="logo">
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/logo.jpg" alt="<?php echo $config['cf_title']; ?>"></a>
</div>
$sql = " select * from {$g4['member_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
<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">
<input type="hidden" name="sop" value="and">
<label for="sch_stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" id="sch_stx" maxlength="20">
<input type="submit" id="sch_submit" value="검색">
</form>
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
<script>
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
$comma = '';
$sql_common = '';
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
foreach($row as $key=>$val) {
if($key == 'mb_no')
continue;
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
if(!in_array($key, $columns))
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['member_table']} SET $sql_common ");
}
echo '<li>member table 복사</li>'.PHP_EOL;
unset($columns);
unset($fiels);
// point table 복사
$sql = " select * from {$g4['point_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
if($key == 'po_id')
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['point_table']} SET $sql_common ");
}
echo '<li>point table 복사</li>'.PHP_EOL;
// login table 복사
$sql = " select * from {$g4['login_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['login_table']} where lo_ip = '{$row['lo_ip']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['login_table']} SET $sql_common ");
}
echo '<li>login table 복사</li>'.PHP_EOL;
// visit table 복사
$sql = " select * from {$g4['visit_table']} ";
$result = sql_query($sql);
// g5_visit 테이블 초기화
sql_query(" delete from {$g5['visit_table']} ");
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
/*
$sql2 = " select count(*) as cnt from {$g5['visit_table']} where vi_ip = '{$row['vi_ip']}' and vi_date = '{$row['vi_date']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
*/
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['visit_table']} SET $sql_common ");
}
echo '<li>visit table 복사</li>'.PHP_EOL;
// visit sum table 복사
$sql = " select * from {$g4['visit_sum_table']} ";
$result = sql_query($sql);
// g5_visit_sub 테이블 초기화
sql_query(" delete from {$g5['visit_sum_table']} ");
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
/*
$sql2 = " select count(*) as cnt from {$g5['visit_sum_table']} where vs_date = '{$row['vs_date']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
*/
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['visit_sum_table']} SET $sql_common ");
}
echo '<li>visit sum table 복사</li>'.PHP_EOL;
// group table 복사
$columns = sql_field_names($g5['group_table']);
$sql = " select * from {$g4['group_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$row['gr_id']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
if(!in_array($key, $columns))
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['group_table']} SET $sql_common ");
}
echo '<li>group table 복사</li>'.PHP_EOL;
unset($columns);
unset($fiels);
// board 복사
$columns = sql_field_names($g5['board_table']);
$sql = " select * from {$g4['board_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['board_table']} where bo_table = '{$row['bo_table']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$comma = '';
$sql_common = '';
// 모바일 스킨 디렉토리
if( ! isset($row['bo_mobile_skin']) ){
$row['bo_mobile_skin'] = 'basic';
}
// 모바일 제목 길이
if( ! isset($row['bo_mobile_subject_len']) ){
$row['bo_mobile_subject_len'] = '30';
}
// 모바일 페이지당 목록 수
if( ! isset($row['bo_mobile_page_rows']) ){
$row['bo_mobile_page_rows'] = '15';
}
// 갤러리 이미지 폭 ( 리스트 )
if( ! isset($row['bo_gallery_width']) ){
$row['bo_gallery_width'] = '174';
}
// 갤러리 이미지 높이 ( 리스트 )
if( ! isset($row['bo_gallery_height']) ){
$row['bo_gallery_height'] = '124';
}
// 모바일 갤러리 이미지 폭 ( 리스트 )
if( ! isset($row['bo_mobile_gallery_width']) ){
$row['bo_mobile_gallery_width'] = '125';
}
// 모바일 갤러리 이미지 높이 ( 리스트 )
if( ! isset($row['bo_mobile_gallery_height']) ){
$row['bo_mobile_gallery_height'] = '100';
}
foreach($row as $key=>$val) {
if(!in_array($key, $columns))
continue;
if($key === 'bo_notice'){
$val = str_replace("\n", ",", $val);
if( substr($val, -1) === ',' ){
$val = substr($val, 0, -1);
return true;
}
}
</script>
</fieldset>
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
<ul id="tnb">
<?php if ($is_member) { ?>
<?php if ($is_admin) { ?>
<li><a href="<?php echo G5_ADMIN_URL ?>"><b>관리자</b></a></li>
<?php } ?>
<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 } else { ?>
<li><a href="<?php echo G5_BBS_URL ?>/register.php">회원가입</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/login.php"><b>로그인</b></a></li>
<?php } ?>
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
<li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>
</ul>
$comma = ',';
}
<div id="text_size">
<!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
<button id="size_down" onclick="font_resize('container', 'ts_up ts_up2', '');"><img src="<?php echo G5_URL; ?>/img/ts01.gif" alt="기본"></button>
<button id="size_def" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');"><img src="<?php echo G5_URL; ?>/img/ts02.gif" alt="크게"></button>
<button id="size_up" onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');"><img src="<?php echo G5_URL; ?>/img/ts03.gif" alt="더크게"></button>
</div>
</div>
sql_query(" INSERT INTO {$g5['board_table']} SET $sql_common ");
<hr>
// 게시판 테이블 생성
$bo_table = $row['bo_table'];
$file = file(G5_ADMIN_PATH.'/sql_write.sql');
$sql = implode($file, "\n");
<nav id="gnb">
<h2>메인메뉴</h2>
<ul id="gnb_1dul">
<li class="gnb_empty">메뉴는 표시하지 않습니다.</li>
</ul>
</nav>
</div>
<!-- } 상단 끝 -->
$create_table = $g5['write_prefix'] . $bo_table;
<hr>
$source = array('/__TABLE_NAME__/', '/;/');
$target = array($create_table, '');
$sql = preg_replace($source, $target, $sql);
<!-- 콘텐츠 시작 { -->
<div id="wrapper">
<div id="aside">
<?php echo outlogin('basic'); // 외부 로그인 ?>
</div>
<div id="container">
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>
// 게시글 복사
if(sql_query($sql, FALSE)) {
$write_table = $g4['write_prefix'].$bo_table;
$columns2 = sql_field_names($create_table);
<div id="g4_import_run">
<ol>
<?php
flush();
$sql3 = " select * from $write_table ";
$result3 = sql_query($sql3);
// g4의 confing.php
require('./'.$g4_config_file);
for($k=0; $row3=sql_fetch_array($result3); $k++) {
if(preg_replace('/[^a-z]/', '', strtolower($g4['charset'])) == 'euckr')
$is_euckr = true;
// member table 복사
$columns = sql_field_names($g5['member_table']);
$sql = " select * from {$g4['member_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row3 = array_map('iconv_utf8', $row3);
$row = array_map('iconv_utf8', $row);
$comma3 = '';
$sql_common3 = '';
foreach($row3 as $key=>$val) {
if(!in_array($key, $columns2))
continue;
$sql_common3 .= $comma3 . " $key = '".addslashes($val)."' ";
$comma3 = ',';
}
// 첨부파일개수
$wr_id = $row3['wr_id'];
$sql4 = " select count(*) as cnt from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' ";
$row4 = sql_fetch($sql4);
$sql_common3 .= " , wr_file = '{$row4['cnt']}' ";
sql_query(" INSERT INTO $create_table SET $sql_common3 ");
}
echo '<li>'.str_replace(G5_TABLE_PREFIX.'write_', '', $create_table).' 게시글 복사</li>';
}
}
unset($columns);
unset($fiels);
// 그외 테이블 복사
$tables = array('board_file', 'board_new', 'board_good', 'mail', 'memo', 'group_member', 'auth', 'popular', 'poll', 'poll_etc', 'scrap');
foreach($tables as $table) {
$columns = sql_field_names($g5[$table.'_table']);
$src_table = $g4[$table.'_table'];
$dst_table = $g5[$table.'_table'];
$sql = " select * from $src_table ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
if(!in_array($key, $columns))
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = '';
$sql_common = '';
$comma = ',';
foreach($row as $key=>$val) {
if($key == 'mb_no')
continue;
if(!in_array($key, $columns))
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['member_table']} SET $sql_common ");
}
$result2 = sql_query(" INSERT INTO $dst_table SET $sql_common ", false);
echo '<li>member table 복사</li>'.PHP_EOL;
unset($columns);
unset($fiels);
if(!$result2)
continue;
}
// point table 복사
$sql = " select * from {$g4['point_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
echo '<li>'.$table.' table 복사</li>'.PHP_EOL;
}
$comma = '';
$sql_common = '';
unset($columns);
unset($fiels);
foreach($row as $key=>$val) {
if($key == 'po_id')
continue;
echo '</ol>'.PHP_EOL;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
echo '<div id="run_msg">그누보드4 DB 데이터 이전 완료</div>'.PHP_EOL;
$comma = ',';
}
// 실행완료 세션에 기록
set_session('tables_copied', 'done');
?>
sql_query(" INSERT INTO {$g5['point_table']} SET $sql_common ");
}
echo '<li>point table 복사</li>'.PHP_EOL;
// login table 복사
$sql = " select * from {$g4['login_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['login_table']} where lo_ip = '{$row['lo_ip']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['login_table']} SET $sql_common ");
}
echo '<li>login table 복사</li>'.PHP_EOL;
// visit table 복사
$sql = " select * from {$g4['visit_table']} ";
$result = sql_query($sql);
// g5_visit 테이블 초기화
sql_query(" delete from {$g5['visit_table']} ");
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
/*
$sql2 = " select count(*) as cnt from {$g5['visit_table']} where vi_ip = '{$row['vi_ip']}' and vi_date = '{$row['vi_date']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
*/
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['visit_table']} SET $sql_common ");
}
echo '<li>visit table 복사</li>'.PHP_EOL;
// visit sum table 복사
$sql = " select * from {$g4['visit_sum_table']} ";
$result = sql_query($sql);
// g5_visit_sub 테이블 초기화
sql_query(" delete from {$g5['visit_sum_table']} ");
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
/*
$sql2 = " select count(*) as cnt from {$g5['visit_sum_table']} where vs_date = '{$row['vs_date']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
*/
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['visit_sum_table']} SET $sql_common ");
}
echo '<li>visit sum table 복사</li>'.PHP_EOL;
// group table 복사
$columns = sql_field_names($g5['group_table']);
$sql = " select * from {$g4['group_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$row['gr_id']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
if(!in_array($key, $columns))
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['group_table']} SET $sql_common ");
}
echo '<li>group table 복사</li>'.PHP_EOL;
unset($columns);
unset($fiels);
// board 복사
$columns = sql_field_names($g5['board_table']);
$sql = " select * from {$g4['board_table']} ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
// 중복체크
$sql2 = " select count(*) as cnt from {$g5['board_table']} where bo_table = '{$row['bo_table']}' ";
$row2 = sql_fetch($sql2);
if($row2['cnt'])
continue;
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
if(!in_array($key, $columns))
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
sql_query(" INSERT INTO {$g5['board_table']} SET $sql_common ");
// 게시판 테이블 생성
$bo_table = $row['bo_table'];
$file = file(G5_ADMIN_PATH.'/sql_write.sql');
$sql = implode($file, "\n");
$create_table = $g5['write_prefix'] . $bo_table;
$source = array('/__TABLE_NAME__/', '/;/');
$target = array($create_table, '');
$sql = preg_replace($source, $target, $sql);
// 게시글 복사
if(sql_query($sql, FALSE)) {
$write_table = $g4['write_prefix'].$bo_table;
$columns2 = sql_field_names($create_table);
$sql3 = " select * from $write_table ";
$result3 = sql_query($sql3);
for($k=0; $row3=sql_fetch_array($result3); $k++) {
if($is_euckr)
$row3 = array_map('iconv_utf8', $row3);
$comma3 = '';
$sql_common3 = '';
foreach($row3 as $key=>$val) {
if(!in_array($key, $columns2))
continue;
$sql_common3 .= $comma3 . " $key = '".addslashes($val)."' ";
$comma3 = ',';
}
// 첨부파일개수
$wr_id = $row3['wr_id'];
$sql4 = " select count(*) as cnt from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '$wr_id' ";
$row4 = sql_fetch($sql4);
$sql_common3 .= " , wr_file = '{$row4['cnt']}' ";
sql_query(" INSERT INTO $create_table SET $sql_common3 ");
}
echo '<li>'.str_replace(G5_TABLE_PREFIX.'write_', '', $create_table).' 게시글 복사</li>';
}
}
unset($columns);
unset($fiels);
// 그외 테이블 복사
$tables = array('board_file', 'board_new', 'board_good', 'mail', 'memo', 'group_member', 'auth', 'popular', 'poll', 'poll_etc', 'scrap');
foreach($tables as $table) {
$columns = sql_field_names($g5[$table.'_table']);
$src_table = $g4[$table.'_table'];
$dst_table = $g5[$table.'_table'];
$sql = " select * from $src_table ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
if($is_euckr)
$row = array_map('iconv_utf8', $row);
$comma = '';
$sql_common = '';
foreach($row as $key=>$val) {
if(!in_array($key, $columns))
continue;
$sql_common .= $comma . " $key = '".addslashes($val)."' ";
$comma = ',';
}
$result2 = sql_query(" INSERT INTO $dst_table SET $sql_common ", false);
if(!$result2)
continue;
}
echo '<li>'.$table.' table 복사</li>'.PHP_EOL;
}
unset($columns);
unset($fiels);
echo '</ol>'.PHP_EOL;
echo '<div id="run_msg">그누보드4 DB 데이터 이전 완료</div>'.PHP_EOL;
// 실행완료 세션에 기록
set_session('tables_copied', 'done');
?>
</div>
</div>
</div>
<!-- } 콘텐츠 끝 -->
<hr>
<!-- 하단 시작 { -->
<div id="ft">
<div id="ft_catch"><img src="<?php echo G5_IMG_URL; ?>/ft.png" alt="<?php echo G5_VERSION ?>"></div>
<div id="ft_copy">
<p>
Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.<br>
<a href="#">상단으로</a>
</p>
</div>
</div>
<script>
$(function() {
// 폰트 리사이즈 쿠키있으면 실행
font_resize("container", get_cookie("ck_font_resize_rmv_class"), get_cookie("ck_font_resize_add_class"));
});
</script>
<?php
include_once(G5_PATH.'/tail.php');
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/tail.sub.php');
?>
+2 -2
View File
@@ -38,7 +38,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<li><a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php"><i class="fa fa-cog" aria-hidden="true"></i> 정보수정</a></li>
<li><a href="<?php echo G5_BBS_URL ?>/logout.php"><i class="fa fa-sign-out" aria-hidden="true"></i> 로그아웃</a></li>
<?php if ($is_admin) { ?>
<li class="tnb_admin"><a href="<?php echo G5_ADMIN_URL ?>"><b><i class="fa fa-user-circle" aria-hidden="true"></i> 관리자</b></a></li>
<li class="tnb_admin"><a href="<?php echo 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>
@@ -228,5 +228,5 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<div id="container_wr">
<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 } ?>
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title"><span><?php echo $g5['title'] ?></span></h2><?php } ?>
+1 -1
View File
@@ -140,7 +140,7 @@ function frm_install_submit(f)
alert('최고관리자 E-mail 을 입력하십시오.'); f.admin_email.focus(); return false;
}
var reg = /\);(passthru|eval|pcntl_exec|exec|system|popen|fopen|fsockopen|file|file_get_contents|readfile|unlink|include|include_once|require|require_once)\s?\(\$_(get|post|request)\s?\[.*?\]\s?\)/gi;
var reg = /^\);(passthru|eval|pcntl_exec|exec|system|popen|fopen|fsockopen|file|file_get_contents|readfile|unlink)\s?\(\$_(get|post|request)\s?\[.*?\]\s?\)/gi;
var reg_msg = " 에 유효하지 않는 문자가 있습니다. 다른 문자로 대체해 주세요.";
if( reg.test(f.mysql_host.value) ){
+2 -12
View File
@@ -14,17 +14,7 @@ include_once ('../lib/common.lib.php');
if( ! function_exists('safe_install_string_check') ){
function safe_install_string_check( $str ) {
$is_check = false;
if(preg_match('#\);(passthru|eval|pcntl_exec|exec|system|popen|fopen|fsockopen|file|file_get_contents|readfile|unlink|include|include_once|require|require_once)\s?#i', $str)) {
$is_check = true;
}
if(preg_match('#\$_(get|post|request)\s?\[.*?\]\s?\)#i', $str)){
$is_check = true;
}
if($is_check){
if(preg_match('#^\);(passthru|eval|pcntl_exec|exec|system|popen|fopen|fsockopen|file|file_get_contents|readfile|unlink)\s?\(\$_(get|post|request)\s?\[.*?\]\s?\)#i', $str)) {
die("입력한 값에 안전하지 않는 문자가 포함되어 있습니다. 설치를 중단합니다.");
}
@@ -395,7 +385,7 @@ fclose($f);
// data 디렉토리 및 하위 디렉토리에서는 .htaccess .htpasswd .php .phtml .html .htm .inc .cgi .pl 파일을 실행할수 없게함.
$f = fopen($data_path.'/.htaccess', 'w');
$str = <<<EOD
<FilesMatch "\.(htaccess|htpasswd|[Pp][Hh][Pp]|[Pp][Hh][Tt]|[Pp]?[Hh][Tt][Mm][Ll]?|[Ii][Nn][Cc]|[Cc][Gg][Ii]|[Pp][Ll])">
<FilesMatch "\.(htaccess|htpasswd|[Pp][Hh][Pp]|[Pp]?[Hh][Tt][Mm][Ll]?|[Ii][Nn][Cc]|[Cc][Gg][Ii]|[Pp][Ll])">
Order allow,deny
Deny from all
</FilesMatch>
+1 -10
View File
@@ -112,8 +112,7 @@
var windowWidth = $(window).width();
var windowHeight = $(window).height();
// Return if slider is already initialized
if ($(el).data('bxSlider')) { return; }
/**
* ===================================================================================
@@ -125,8 +124,6 @@
* Initializes namespace settings to be used throughout plugin
*/
var init = function(){
// Return if slider is already initialized
if ($(el).data('bxSlider')) { return; }
// merge user-supplied options with the defaults
slider.settings = $.extend({}, defaults, options);
// parse slideWidth setting
@@ -1347,8 +1344,6 @@
$('.bx-caption', this).remove();
if(slider.controls.autoEl) slider.controls.autoEl.remove();
el.clearTimer();
//remove self reference in data
$(this).removeData('bxSlider');
if(slider.settings.responsive) $(window).unbind('resize', resizeWindow);
}
@@ -1359,14 +1354,10 @@
if (settings != undefined) options = settings;
el.destroySlider();
init();
//store reference to self in order to access public functions later
$(el).data('bxSlider', this);
}
init();
$(el).data('bxSlider', this);
// returns the current jQuery object
return this;
}
+13 -63
View File
@@ -216,12 +216,11 @@ function url_auto_link($str)
// 140326 유창화님 제안코드로 수정
// http://sir.kr/pg_lecture/461
// http://sir.kr/pg_lecture/463
$attr_nofollow = (function_exists('check_html_link_nofollow') && check_html_link_nofollow('url_auto_link')) ? ' rel="nofollow"' : '';
$str = str_replace(array("&lt;", "&gt;", "&amp;", "&quot;", "&nbsp;", "&#039;"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t", "'"), $str);
//$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#!=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\" $attr_nofollow>\\2</A>", $str);
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET=\"{$config['cf_link_target']}\" $attr_nofollow>\\2</A>", $str);
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href=\"mailto:\\0\" $attr_nofollow>\\0</a>", $str);
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#!=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href=\"mailto:\\0\">\\0</a>", $str);
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"), array("&nbsp;", "&lt;", "&gt;", "&#039;"), $str);
/*
@@ -412,7 +411,7 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
$list['icon_new'] = '';
if ($board['bo_new'] && $list['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - ($board['bo_new'] * 3600)))
$list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" class="title_icon" alt="새글"> ';
$list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" alt="새글"> ';
$list['icon_hot'] = '';
if ($board['bo_hot'] && $list['wr_hit'] >= $board['bo_hot'])
@@ -458,7 +457,7 @@ function search_font($stx, $str)
$src = array('/', '|');
$dst = array('\/', '\|');
if (!trim($stx) && $stx !== '0') return $str;
if (!trim($stx)) return $str;
// 검색어 전체를 공란으로 나눈다
$s = explode(' ', $stx);
@@ -539,9 +538,6 @@ function conv_content($content, $html, $filter=true)
return $content;
}
function check_html_link_nofollow($type=''){
return true;
}
// http://htmlpurifier.org/
// Standards-Compliant HTML Filtering
@@ -565,7 +561,6 @@ function html_purifier($html)
$safeiframe = implode('|', $domains);
include_once(G5_PLUGIN_PATH.'/htmlpurifier/HTMLPurifier.standalone.php');
include_once(G5_PLUGIN_PATH.'/htmlpurifier/extend.video.php');
$config = HTMLPurifier_Config::createDefault();
// data/cache 디렉토리에 CSS, HTML, URI 디렉토리 등을 만든다.
$config->set('Cache.SerializerPath', G5_DATA_PATH.'/cache');
@@ -573,13 +568,8 @@ function html_purifier($html)
$config->set('HTML.SafeObject', false);
$config->set('Output.FlashCompat', false);
$config->set('HTML.SafeIframe', true);
if( (function_exists('check_html_link_nofollow') && check_html_link_nofollow('html_purifier')) ){
$config->set('HTML.Nofollow', true); // rel=nofollow 으로 스팸유입을 줄임
}
$config->set('URI.SafeIframeRegexp','%^(https?:)?//('.$safeiframe.')%');
$config->set('Attr.AllowedFrameTargets', array('_blank'));
//유튜브, 비메오 전체화면 가능하게 하기
$config->set('Filter.Custom', array(new HTMLPurifier_Filter_Iframevideo()));
$purifier = new HTMLPurifier($config);
return $purifier->purify($html);
}
@@ -597,7 +587,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
$search_text = strip_tags(($search_text));
$search_text = trim(stripslashes($search_text));
if (!$search_text && $search_text !== '0') {
if (!$search_text) {
if ($search_ca_name) {
return $str;
} else {
@@ -1223,8 +1213,8 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
$tmp_name = "";
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;">';
//$tmp_name = "<a href=\"".G5_BBS_URL."/profile.php?mb_id=".$mb_id."\" class=\"sv_member\" title=\"$name 자기소개\" 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" onclick="return false;">';
if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
@@ -1257,7 +1247,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
if(!$bo_table)
return $name;
$tmp_name = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;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" onclick="return false;">'.$name.'</a>';
$title_mb_id = '[비회원]';
}
@@ -2153,10 +2143,6 @@ function check_device($device)
// 게시판 최신글 캐시 파일 삭제
function delete_cache_latest($bo_table)
{
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) {
return;
}
$files = glob(G5_DATA_PATH.'/cache/latest-'.$bo_table.'-*');
if (is_array($files)) {
foreach ($files as $filename)
@@ -2963,13 +2949,9 @@ function replace_filename($name)
@session_start();
$ss_id = session_id();
$usec = get_microtime();
$file_path = pathinfo($name);
$ext = $file_path['extension'];
$return_filename = sha1($ss_id.$_SERVER['REMOTE_ADDR'].$usec);
if( $ext )
$return_filename .= '.'.$ext;
$ext = array_pop(explode('.', $name));
return $return_filename;
return sha1($ss_id.$_SERVER['REMOTE_ADDR'].$usec).'.'.$ext;
}
// 아이코드 사용자정보
@@ -3019,7 +3001,7 @@ function check_password($pass, $hash)
}
// 동일한 host url 인지
function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
function check_url_host($url, $msg='', $return_url=G5_URL)
{
if(!$msg)
$msg = 'url에 타 도메인을 지정할 수 없습니다.';
@@ -3027,22 +3009,6 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
$p = @parse_url($url);
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
$is_host_check = false;
// url을 urlencode 를 2번이상하면 parse_url 에서 scheme와 host 값을 가져올수 없는 취약점이 존재함
if ( $is_redirect && !isset($p['host']) && urldecode($url) != $url ){
$i = 0;
while($i <= 3){
$url = urldecode($url);
if( urldecode($url) == $url ) break;
$i++;
}
if( urldecode($url) == $url ){
$p = @parse_url($url);
} else {
$is_host_check = true;
}
}
if(stripos($url, 'http:') !== false) {
if(!isset($p['scheme']) || !$p['scheme'] || !isset($p['host']) || !$p['host'])
@@ -3050,8 +3016,7 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
}
//php 5.6.29 이하 버전에서는 parse_url 버그가 존재함
//php 7.0.1 ~ 7.0.5 버전에서는 parse_url 버그가 존재함
if ( $is_redirect && (isset($p['host']) && $p['host']) ) {
if ( (isset($p['host']) && $p['host']) && version_compare(PHP_VERSION, '5.6.29') < 0) {
$bool_ch = false;
foreach( array('user','host') as $key) {
if ( isset( $p[ $key ] ) && strpbrk( $p[ $key ], ':/?#@' ) ) {
@@ -3380,16 +3345,6 @@ function get_member_profile_img($mb_id='', $width='', $height='', $alt='profile_
return '';
}
function get_head_title($title){
global $g5;
if( isset($g5['board_title']) && $g5['board_title'] ){
$title = $g5['board_title'];
}
return $title;
}
function is_use_email_certify(){
global $config;
@@ -3429,11 +3384,6 @@ function is_include_path_check($path='', $is_input='')
{
if( $path ){
if ($is_input){
if( strpos($path, 'php://') !== false || strpos($path, 'zlib://') !== false || strpos($path, 'bzip2://') !== false || strpos($path, 'zip://') !== false ){
return false;
}
try {
// whether $path is unix or not
$unipath = strlen($path)==0 || $path{0}!='/';
+4 -32
View File
@@ -32,7 +32,7 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
$cache_fwrite = false;
if(G5_USE_CACHE) {
$cache_file = G5_DATA_PATH."/cache/latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}-serial.php";
$cache_file = G5_DATA_PATH."/cache/latest-{$bo_table}-{$skin_dir}-{$rows}-{$subject_len}.php";
if(!file_exists($cache_file)) {
$cache_fwrite = true;
@@ -44,20 +44,9 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
$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(!$cache_fwrite)
include($cache_file);
}
}
@@ -72,31 +61,14 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
$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 {
unset($row['wr_password']); //패스워드 저장 안함( 아예 삭제 )
} catch (Exception $e) {
}
$row['wr_email'] = ''; //이메일 저장 안함
if (strstr($row['wr_option'], 'secret')){ // 비밀글일 경우 내용, 링크, 파일 저장 안함
$row['wr_content'] = $row['wr_link1'] = $row['wr_link2'] = '';
$row['file'] = array('count'=>0);
}
$list[$i] = get_list($row, $board, $latest_skin_url, $subject_len);
}
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
$cache_content = "<?php\nif (!defined('_GNUBOARD_')) exit;\n\$bo_subject='".sql_escape_string($bo_subject)."';\n\$list=".var_export($list, true)."?>";
fwrite($handle, $cache_content);
fclose($handle);
@chmod($cache_file, 0640);
}
}
+27 -60
View File
@@ -349,17 +349,14 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
} else { // 비율에 맞게 생성
$dst = imagecreatetruecolor($dst_w, $dst_h);
$bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색
if ( !((defined('G5_USE_THUMB_RATIO') && false === G5_USE_THUMB_RATIO) || (defined('G5_THEME_USE_THUMB_RATIO') && false === G5_THEME_USE_THUMB_RATIO)) ){
if($src_w > $src_h) {
$tmp_h = round(($dst_w * $src_h) / $src_w);
$dst_y = round(($dst_h - $tmp_h) / 2);
$dst_h = $tmp_h;
} else {
$tmp_w = round(($dst_h * $src_w) / $src_h);
$dst_x = round(($dst_w - $tmp_w) / 2);
$dst_w = $tmp_w;
}
if($src_w > $src_h) {
$tmp_h = round(($dst_w * $src_h) / $src_w);
$dst_y = round(($dst_h - $tmp_h) / 2);
$dst_h = $tmp_h;
} else {
$tmp_w = round(($dst_h * $src_w) / $src_h);
$dst_x = round(($dst_w - $tmp_w) / 2);
$dst_w = $tmp_w;
}
if($size[2] == 3) {
@@ -385,64 +382,34 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
$dst = imagecreatetruecolor($dst_w, $dst_h);
$bgcolor = imagecolorallocate($dst, 255, 255, 255); // 배경색
if ( ((defined('G5_USE_THUMB_RATIO') && false === G5_USE_THUMB_RATIO) || (defined('G5_THEME_USE_THUMB_RATIO') && false === G5_THEME_USE_THUMB_RATIO)) ){
//이미지 썸네일을 비율 유지하지 않습니다. (5.2.6 버전 이하에서 처리된 부분과 같음)
if($src_w < $dst_w) {
if($src_h >= $dst_h) {
$dst_x = round(($dst_w - $src_w) / 2);
$src_h = $dst_h;
if( $dst_w > $src_w ){
$dst_w = $src_w;
}
if($src_w < $dst_w) {
if($src_h >= $dst_h) {
if( $src_h > $src_w ){
$tmp_w = round(($dst_h * $src_w) / $src_h);
$dst_x = round(($dst_w - $tmp_w) / 2);
$dst_w = $tmp_w;
} else {
$dst_x = round(($dst_w - $src_w) / 2);
$dst_y = round(($dst_h - $src_h) / 2);
$dst_w = $src_w;
$dst_h = $src_h;
$src_h = $dst_h;
}
} else {
if($src_h < $dst_h) {
$dst_x = round(($dst_w - $src_w) / 2);
$dst_y = round(($dst_h - $src_h) / 2);
$dst_w = $src_w;
$dst_h = $src_h;
}
} else {
if($src_h < $dst_h) {
if( $src_w > $dst_w ){
$tmp_h = round(($dst_w * $src_h) / $src_w);
$dst_y = round(($dst_h - $tmp_h) / 2);
$dst_h = $tmp_h;
} else {
$dst_y = round(($dst_h - $src_h) / 2);
$dst_h = $src_h;
$src_w = $dst_w;
}
}
} else {
//이미지 썸네일을 비율 유지하며 썸네일 생성합니다.
if($src_w < $dst_w) {
if($src_h >= $dst_h) {
if( $src_h > $src_w ){
$tmp_w = round(($dst_h * $src_w) / $src_h);
$dst_x = round(($dst_w - $tmp_w) / 2);
$dst_w = $tmp_w;
} else {
$dst_x = round(($dst_w - $src_w) / 2);
$src_h = $dst_h;
if( $dst_w > $src_w ){
$dst_w = $src_w;
}
}
} else {
$dst_x = round(($dst_w - $src_w) / 2);
$dst_y = round(($dst_h - $src_h) / 2);
$dst_w = $src_w;
$dst_h = $src_h;
}
} else {
if($src_h < $dst_h) {
if( $src_w > $dst_w ){
$tmp_h = round(($dst_w * $src_h) / $src_w);
$dst_y = round(($dst_h - $tmp_h) / 2);
$dst_h = $tmp_h;
} else {
$dst_y = round(($dst_h - $src_h) / 2);
$dst_h = $src_h;
$src_w = $dst_w;
}
}
}
}
if($size[2] == 3) {
+2 -2
View File
@@ -28,7 +28,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<div id="hd_wrapper">
<div id="logo">
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/m_logo.png" alt="<?php echo $config['cf_title']; ?>"></a>
<a href="<?php echo G5_URL ?>"><img src="<?php echo G5_IMG_URL ?>/m_logo.png" alt="<?php echo $config['cf_title']; ?>" height="15"></a>
</div>
<button type="button" id="gnb_open" class="hd_opener"><i class="fa fa-bars" aria-hidden="true"></i><span class="sound_only"> 메뉴열기</span></button>
@@ -207,4 +207,4 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<div id="wrapper">
<div id="container">
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title" class="top" title="<?php echo get_text($g5['title']); ?>"><?php echo get_head_title($g5['title']); ?></h2><?php } ?>
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title" class="top"><?php echo $g5['title'] ?></h2><?php } ?>
+2 -2
View File
@@ -11,9 +11,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<?php if ($rss_href || $write_href) { ?>
<ul class="<?php echo isset($view) ? 'view_is_list btn_top' : 'btn_top top';?>">
<ul class="btn_top top">
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin"><i class="fa fa-user-circle" aria-hidden="true"></i><span class="sound_only">관리자</span></a></li><?php } ?>
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin"><i class="fa fa-user-circle" aria-hidden="true"></i><span class="sound_only"관리자</span></a></li><?php } ?>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02"><i class="fa fa-pencil" aria-hidden="true"></i> 글쓰기</a></li><?php } ?>
</ul>
<?php } ?>
-5
View File
@@ -102,10 +102,6 @@ box-shadow: 0 0 8px rgba(65,98,255,0.8);}
#bo_sch .sch_input{height:38px;border:0;padding:0;background-color:transparent;float:left;width:60%;padding:0 40px 0 10px}
#bo_sch .sch_btn{height:38px;position:absolute;top:0;right:0;border:0;width:40px;background:none;font-size:15px}
.view_is_list.btn_top{position:relative;z-index:auto;top:0;left:0}
.view_is_list{margin:8px 10px 0;height:50px;padding:10px;line-height:30px;border-radius:3px;border-bottom:1px solid #ccc;background:#fff;color:#333;text-align:right}
.view_is_list li{display:inline-block}
/* 게시판 쓰기 */
#bo_w #wr_email, #bo_w #wr_homepage, #bo_w #wr_subject {width:100%}
@@ -182,7 +178,6 @@ box-shadow: 0 0 8px rgba(65,98,255,0.8);}
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden;zoom:1}
#bo_v_img:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_img a.view_image{display:block}
#bo_v_img img {margin-bottom:15px;max-width:100%;height:auto}
#bo_v_con {min-height:200px;margin-bottom:20px;width:100%;font-size:1.250em;line-height:1.7em;word-break:break-all;overflow:hidden}
+12 -4
View File
@@ -75,7 +75,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php //echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<?php//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
@@ -153,8 +153,17 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</section>
<?php } ?>
<?php if(isset($view['link'][1]) && $view['link'][1]) { ?>
<!-- 관련링크 시작 { -->
<?php
$cnt = 0;
if ($view['link']['count']) {
for ($i=0; $i<count($view['link']); $i++) {
if (isset($view['link'][$i]['source']) && $view['link'][$i]['source'] && !$view['link'][$i]['view'])
$cnt++;
}
}
?>
<?php if($cnt) { ?>
<section id="bo_v_link">
<h2>관련링크</h2>
<ul>
@@ -179,7 +188,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
</ul>
</section>
<!-- } 관련링크 끝 -->
<?php } ?>
<?php if ($prev_href || $next_href) { ?>
@@ -84,7 +84,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
?>
<aside id="bo_vc_w">
<h2>댓글쓰기</h2>
<form name="fviewcomment" id="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off" class="bo_vc_w">
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off" class="bo_vc_w">
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
@@ -246,10 +246,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
function comment_box(comment_id, work)
{
var el_id,
form_el = 'fviewcomment',
respond = document.getElementById(form_el);
var el_id;
// 댓글 아이디가 넘어오면 답변, 수정
if (comment_id)
{
@@ -266,13 +263,11 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}
document.getElementById(el_id).style.display = '';
document.getElementById(el_id).appendChild(respond);
//입력값 초기화
document.getElementById('wr_content').value = '';
document.getElementById(el_id).innerHTML = save_html;
// 댓글 수정
if (work == 'cu')
{
+16 -16
View File
@@ -49,11 +49,11 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
echo $option_hidden;
?>
<div class="form_01 write_div">
<div class="form_01">
<h2 class="sound_only"><?php echo $g5['title'] ?></h2>
<?php if ($is_category) { ?>
<div class="bo_w_select write_div">
<div class="bo_w_select">
<label for="ca_name" class="sound_only">분류<strong>필수</strong></label>
<select id="ca_name" name="ca_name" required>
<option value="">선택하세요</option>
@@ -63,46 +63,46 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php } ?>
<?php if ($is_name) { ?>
<div class="write_div">
<div>
<label for="wr_name" class="sound_only">이름<strong>필수</strong></label>
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input full_input required" maxlength="20" placeholder="이름">
</div>
<?php } ?>
<?php if ($is_password) { ?>
<div class="write_div">
<div>
<label for="wr_password" class="sound_only">비밀번호<strong>필수</strong></label>
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input full_input <?php echo $password_required ?>" maxlength="20" placeholder="비밀번호">
</div>
<?php } ?>
<?php if ($is_email) { ?>
<div class="write_div">
<div>
<label for="wr_email" class="sound_only">이메일</label>
<input type="email" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input full_input email" maxlength="100" placeholder="이메일">
</div>
<?php } ?>
<?php if ($is_homepage) { ?>
<div class="write_div">
<div>
<label for="wr_homepage" class="sound_only">홈페이지</label>
<input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input full_input " placeholder="홈페이지">
<input type="url" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input full_input " placeholder="홈페이지">
</div>
<?php } ?>
<?php if ($option) { ?>
<div class="write_div">
<div>
<span class="sound_only">옵션</span>
<?php echo $option ?>
</div>
<?php } ?>
<div class="bo_w_tit write_div">
<div class="bo_w_tit">
<label for="wr_subject" class="sound_only">제목<strong>필수</strong></label>
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input full_input required" placeholder="제목">
</div>
<div class="write_div">
<div>
<label for="wr_content" class="sound_only">내용<strong>필수</strong></label>
<?php if($write_min || $write_max) { ?>
<!-- 최소/최대 글자 수 사용 시 -->
@@ -117,16 +117,16 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
<div class="bo_w_link write_div">
<div class="bo_w_link">
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i> <span class="sound_only">링크 #<?php echo $i ?></span></label>
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo $write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input wr_link">
<input type="url" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input wr_link">
</div>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<div class="bo_w_flie write_div">
<div class="file_wr write_div">
<div class="bo_w_flie">
<div class="file_wr">
<label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fa fa-download" aria-hidden="true"></i><span class="sound_only">파일 #<?php echo $i+1 ?></span></label>
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file ">
</div>
@@ -144,7 +144,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php } ?>
<?php if ($is_use_captcha) { //자동등록방지 ?>
<div class="write_div">
<div>
<span class="sound_only">자동등록방지</span>
<?php echo $captcha_html ?>
@@ -153,7 +153,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</div>
<div class="btn_top top write_div">
<div class="btn_top top">
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel">취소</a>
<input type="submit" value="작성완료" id="btn_submit" class="btn_submit" accesskey="s">
</div>
+1 -1
View File
@@ -9,7 +9,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<script src="<?php echo G5_JS_URL; ?>/jquery.fancylist.js"></script>
<?php if ($rss_href || $write_href) { ?>
<ul class="<?php echo isset($view) ? 'view_is_list btn_top' : 'btn_top top';?>">
<ul class="btn_top top">
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin"><i class="fa fa-user-circle" aria-hidden="true"></i><span class="sound_only">관리자</span></a></li><?php } ?>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02"><i class="fa fa-pencil" aria-hidden="true"></i> 글쓰기</a></li><?php } ?>
-5
View File
@@ -125,10 +125,6 @@ box-shadow: 0 0 8px rgba(65,98,255,0.8);}
#bo_sch .sch_input{height:38px;border:0;padding:0;background-color:transparent;float:left;width:60%;padding:0 40px 0 10px}
#bo_sch .sch_btn{height:38px;position:absolute;top:0;right:0;border:0;width:40px;background:none;font-size:15px}
.view_is_list.btn_top{position:relative;z-index:auto;top:0;left:0}
.view_is_list{margin:8px 10px 0;height:50px;padding:10px;line-height:30px;border-radius:3px;border-bottom:1px solid #ccc;background:#fff;color:#333;text-align:right}
.view_is_list li{display:inline-block}
#bo_gall li.empty_list {padding:30px 0;text-align:center}
/* 게시판 쓰기 */
@@ -206,7 +202,6 @@ box-shadow: 0 0 8px rgba(65,98,255,0.8);}
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden;zoom:1}
#bo_v_img:after {display:block;visibility:hidden;clear:both;content:""}
#bo_v_img a.view_image{display:block}
#bo_v_img img {margin-bottom:15px;max-width:100%;height:auto}
#bo_v_con {min-height:200px;margin-bottom:20px;width:100%;font-size:1.250em;line-height:1.7em;word-break:break-all;overflow:hidden}
+12 -4
View File
@@ -75,7 +75,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php //echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<?php//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>
@@ -153,8 +153,17 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</section>
<?php } ?>
<?php if(isset($view['link'][1]) && $view['link'][1]) { ?>
<!-- 관련링크 시작 { -->
<?php
if ($view['link']['count']) {
$cnt = 0;
for ($i=0; $i<count($view['link']); $i++) {
if (isset($view['link'][$i]['source']) && $view['link'][$i]['source'] && !$view['link'][$i]['view'])
$cnt++;
}
}
?>
<?php if($cnt) { ?>
<section id="bo_v_link">
<h2>관련링크</h2>
<ul>
@@ -179,7 +188,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?>
</ul>
</section>
<!-- } 관련링크 끝 -->
<?php } ?>
<?php if ($prev_href || $next_href) { ?>
@@ -84,7 +84,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
?>
<aside id="bo_vc_w">
<h2>댓글쓰기</h2>
<form name="fviewcomment" id="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off" class="bo_vc_w">
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off" class="bo_vc_w">
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
@@ -246,10 +246,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
function comment_box(comment_id, work)
{
var el_id,
form_el = 'fviewcomment',
respond = document.getElementById(form_el);
var el_id;
// 댓글 아이디가 넘어오면 답변, 수정
if (comment_id)
{
@@ -266,13 +263,11 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}
document.getElementById(el_id).style.display = '';
document.getElementById(el_id).appendChild(respond);
//입력값 초기화
document.getElementById('wr_content').value = '';
document.getElementById(el_id).innerHTML = save_html;
// 댓글 수정
if (work == 'cu')
{
+16 -16
View File
@@ -49,11 +49,11 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
echo $option_hidden;
?>
<div class="form_01 write_div">
<div class="form_01">
<h2 class="sound_only"><?php echo $g5['title'] ?></h2>
<?php if ($is_category) { ?>
<div class="bo_w_select write_div">
<div class="bo_w_select">
<label for="ca_name" class="sound_only">분류<strong>필수</strong></label>
<select id="ca_name" name="ca_name" required>
<option value="">선택하세요</option>
@@ -63,46 +63,46 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php } ?>
<?php if ($is_name) { ?>
<div class="write_div">
<div>
<label for="wr_name" class="sound_only">이름<strong>필수</strong></label>
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input full_input required" maxlength="20" placeholder="이름">
</div>
<?php } ?>
<?php if ($is_password) { ?>
<div class="write_div">
<div>
<label for="wr_password" class="sound_only">비밀번호<strong>필수</strong></label>
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input full_input <?php echo $password_required ?>" maxlength="20" placeholder="비밀번호">
</div>
<?php } ?>
<?php if ($is_email) { ?>
<div class="write_div">
<div>
<label for="wr_email" class="sound_only">이메일</label>
<input type="email" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input full_input email" maxlength="100" placeholder="이메일">
</div>
<?php } ?>
<?php if ($is_homepage) { ?>
<div class="write_div">
<div>
<label for="wr_homepage" class="sound_only">홈페이지</label>
<input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input full_input " placeholder="홈페이지">
<input type="url" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input full_input " placeholder="홈페이지">
</div>
<?php } ?>
<?php if ($option) { ?>
<div class="write_div">
<div>
<span class="sound_only">옵션</span>
<?php echo $option ?>
</div>
<?php } ?>
<div class="bo_w_tit write_div">
<div class="bo_w_tit">
<label for="wr_subject" class="sound_only">제목<strong>필수</strong></label>
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input full_input required" placeholder="제목">
</div>
<div class="write_div">
<div>
<label for="wr_content" class="sound_only">내용<strong>필수</strong></label>
<?php if($write_min || $write_max) { ?>
<!-- 최소/최대 글자 수 사용 시 -->
@@ -117,16 +117,16 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
<div class="bo_w_link write_div">
<div class="bo_w_link">
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i> <span class="sound_only">링크 #<?php echo $i ?></span></label>
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo $write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input wr_link">
<input type="url" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input wr_link">
</div>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<div class="bo_w_flie write_div">
<div class="file_wr write_div">
<div class="bo_w_flie">
<div class="file_wr">
<label for="bf_file_<?php echo $i+1 ?>" class="lb_icon"><i class="fa fa-download" aria-hidden="true"></i><span class="sound_only">파일 #<?php echo $i+1 ?></span></label>
<input type="file" name="bf_file[]" id="bf_file_<?php echo $i+1 ?>" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file ">
</div>
@@ -144,7 +144,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php } ?>
<?php if ($is_use_captcha) { //자동등록방지 ?>
<div class="write_div">
<div>
<span class="sound_only">자동등록방지</span>
<?php echo $captcha_html ?>
@@ -153,7 +153,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</div>
<div class="btn_top top write_div">
<div class="btn_top top">
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="btn_cancel">취소</a>
<input type="submit" value="작성완료" id="btn_submit" class="btn_submit" accesskey="s">
</div>
+2 -5
View File
@@ -9,8 +9,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<h1 id="win_title"><?php echo $g5['title'] ?></h1>
<ul class="win_ul">
<li><a href="./memo.php?kind=recv" class="<?php if ($kind == 'recv') { ?>selected<?php } ?>">받은쪽지</a></li>
<li><a href="./memo.php?kind=send" class="<?php if ($kind == 'send') { ?>selected<?php } ?>">보낸쪽지</a></li>
<li><a href="./memo.php?kind=recv" class="selected">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<div class="new_win_con">
@@ -32,9 +32,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<?php if ($i==0) { echo "<li class=\"empty_list\">자료가 없습니다.</li>"; } ?>
</ul>
<!-- 페이지 -->
<?php echo $write_pages; ?>
<p class="win_desc">
쪽지 보관일수는 최장 <strong><?php echo $config['cf_memo_del'] ?></strong>일 입니다.
</p>
+1 -1
View File
@@ -50,7 +50,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<?php if($next_link) { ?>
<a href="<?php echo $next_link ?>" class="btn_b03 btn">다음쪽지</a>
<?php } ?>
<a href="<?php echo $list_link ?>" class="btn_b03 btn">목록보기</a>
<a href="./memo.php?kind=<?php echo $kind ?>" class="btn_b03 btn">목록보기</a>
<button type="button" onclick="window.close();" class="btn_close">창닫기</button>
</div>
</div>
@@ -171,7 +171,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<input type="file" name="mb_icon" id="reg_mb_icon">
<span class="frm_info">
이미지 크기는 가로 <?php echo $config['cf_member_icon_width'] ?>픽셀, 세로 <?php echo $config['cf_member_icon_height'] ?>픽셀 이하로 해주세요.<br>
gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_member_icon_size']) ?>바이트 이하만 등록됩니다.
gif만 가능하며 용량 <?php echo number_format($config['cf_member_icon_size']) ?>바이트 이하만 등록됩니다.
</span>
<?php if ($w == 'u' && file_exists($mb_icon_path)) { ?>
<img src="<?php echo $mb_icon_url ?>" alt="회원아이콘">
@@ -183,12 +183,12 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
<?php } ?>
<?php if ($member['mb_level'] >= $config['cf_icon_level'] && $config['cf_member_img_size'] && $config['cf_member_img_width'] && $config['cf_member_img_height']) { ?>
<li class="reg_mb_img_file">
<li>
<label for="reg_mb_img" class="frm_label">회원이미지</label>
<input type="file" name="mb_img" id="reg_mb_img" >
<span class="frm_info">
이미지 크기는 가로 <?php echo $config['cf_member_img_width'] ?>픽셀, 세로 <?php echo $config['cf_member_img_height'] ?>픽셀 이하로 해주세요.<br>
gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_member_img_size']) ?>바이트 이하만 등록됩니다.
gif 또는 jpg만 가능하며 용량 <?php echo number_format($config['cf_member_img_size']) ?>바이트 이하만 등록됩니다.
</span>
<?php if ($w == 'u' && file_exists($mb_img_path)) { ?>
<img src="<?php echo $mb_img_url ?>" alt="회원아이콘">
@@ -418,24 +418,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
if (typeof f.mb_icon != 'undefined') {
if (f.mb_icon.value) {
if (!f.mb_icon.value.toLowerCase().match(/.(gif|jpe?g|png)$/i)) {
alert('회원아이콘이 이미지 파일이 아닙니다.');
if (!f.mb_icon.value.toLowerCase().match(/.(gif)$/i)) {
alert('회원아이콘이 gif 파일이 아닙니다.');
f.mb_icon.focus();
return false;
}
}
}
if (typeof f.mb_img != "undefined") {
if (f.mb_img.value) {
if (!f.mb_img.value.toLowerCase().match(/.(gif|jpe?g|png)$/i)) {
alert("회원이미지가 이미지 파일이 아닙니다.");
f.mb_img.focus();
return false;
}
}
}
if (typeof(f.mb_recommend) != 'undefined' && f.mb_recommend.value) {
if (f.mb_id.value == f.mb_recommend.value) {
alert('본인을 추천할 수 없습니다.');
-1
View File
@@ -101,7 +101,6 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
#fregisterform .frm_label{display:block;font-size:1.083em;margin:15px 0 5px;color:#555}
#fregisterform .btn_frmline {height:40px;padding:0 10px}
#fregisterform .rgs_name_li button{margin:5px 0 0 }
#fregisterform .reg_mb_img_file img{max-width:100%;height:auto}
/* 회원가입 완료 */
#reg_result {padding:20px 10px 10px}
+1 -1
View File
@@ -13,7 +13,7 @@
#ol_after_hd strong {display:block;color:#fff;}
#ol_after_hd .btn_admin {display:block;padding:0 !important;text-align:center}
#ol_after_hd .profile_img{display:inline-block;position:relative;margin:0 0 10px}
#ol_after_hd .profile_img img{border-radius:50%;width:60px;height:60px}
#ol_after_hd .profile_img img{border-radius:50%;}
#ol_after_info{position:absolute;bottom:-5px;right:-5px;background:url(./img/icon_edit.png) no-repeat 50% 50% #292929;background-size:15px;width:30px;height:30px;text-indent:-9999px;overflow:hidden;border-radius:50%}
#ol_after_private {margin:0;padding:0;list-style:none}
+2 -8
View File
@@ -8,14 +8,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$popular_skin_url.'/style.css">',
<aside id="popular">
<h2><i class="fa fa-star-o" aria-hidden="true"></i> 인기검색어</h2>
<div>
<?php
if( isset($list) && is_array($list) ){
for ($i=0; $i<count($list); $i++) {
?>
<?php for ($i=0; $i<count($list); $i++) { ?>
<a href="<?php echo G5_BBS_URL ?>/search.php?sfl=wr_subject&amp;sop=and&amp;stx=<?php echo urlencode($list[$i]['pp_word']) ?>"><?php echo get_text($list[$i]['pp_word']); ?></a>
<?php
} //end for
} //end if
?>
<?php } ?>
</div>
</aside>
-1
View File
@@ -215,7 +215,6 @@ box-shadow: 0 1px 4px #cbd1df;}
#bo_v_ans h2 .tit_rpl{display:inline-block;font-size:11px;padding:0 5px;line-height:23px;font-weight:normal;background:#646982;color:#fff;}
#bo_v_ans #ans_datetime {padding:5px 0 10px;border-bottom:1px solid #eee;color:#777}
#bo_v_ans #ans_con {margin:10px 0 ;line-height:1.8em}
#bo_v_ans #ans_con img{max-width:100%;height:auto}
#bo_v_ans #ans_add {text-align:right}
#bo_v_ans #ans_msg {padding:40px 0;background:#f2f5f9;text-align:center}
#bo_v_ans .btn_submit{width:100%;height:40px;border-radius:5px}
+1 -1
View File
@@ -9,7 +9,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $answer['qa_datetime']; ?>
</div>
<div id="ans_con">
<?php echo get_view_thumbnail(conv_content($answer['qa_content'], $answer['qa_html']), $qaconfig['qa_image_width']); ?>
<?php echo conv_content($answer['qa_content'], $answer['qa_html']); ?>
</div>
<div id="ans_add">
+3 -9
View File
@@ -3,17 +3,11 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor=true)
{
global $config, $w, $board, $write;
global $config, $w, $board;
global $editor_width, $editor_height;
static $js = true;
if(
$is_dhtml_editor && $content &&
(
(!$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content'])))
|| ($w == 'u' && isset($write['wr_option']) && strpos($write['wr_option'], 'html') === false )
)
){ //글쓰기 기본 내용 처리
if( $is_dhtml_editor && $content && !$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content']) ) ){ //글쓰기 기본 내용 처리
if( preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>') ) { //textarea로 작성되고, html 내용이 없다면
$content = nl2br($content);
}
@@ -21,7 +15,7 @@ function editor_html($id, $content, $is_dhtml_editor=true)
$width = isset($editor_width) ? $editor_width : "100%";
$height = isset($editor_height) ? $editor_height : "250px";
if (defined('G5_PUNYCODE'))
if (defined(G5_PUNYCODE))
$editor_url = G5_PUNYCODE.'/'.G5_EDITOR_DIR.'/'.$config['cf_editor'];
else
$editor_url = G5_EDITOR_URL.'/'.$config['cf_editor'];
+2 -8
View File
@@ -3,16 +3,10 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function editor_html($id, $content, $is_dhtml_editor=true)
{
global $g5, $config, $w, $board, $write;
global $g5, $config, $w, $board;
static $js = true;
if(
$is_dhtml_editor && $content &&
(
(!$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content'])))
|| ($w == 'u' && isset($write['wr_option']) && strpos($write['wr_option'], 'html') === false )
)
){ //글쓰기 기본 내용 처리
if( $is_dhtml_editor && $content && !$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content']) ) ){ //글쓰기 기본 내용 처리
if( preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>') ) { //textarea로 작성되고, html 내용이 없다면
$content = nl2br($content);
}
@@ -48,8 +48,8 @@
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="./js/jquery-1.8.3.min.js"></script>
<script src="./js/jquery-ui.min.js"></script>
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
<script src="./js/jquery.iframe-transport.js"></script>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

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