Compare commits

..
1 Commits
Author SHA1 Message Date
thisgun ad443f679c 리뉴얼 테마 포함된 5.3 버전 2017-11-21 11:06:26 +09:00
394 changed files with 32990 additions and 34685 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>
+2 -50
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,29 +355,6 @@ function get_admin_token()
return $token;
}
// 관리자가 자동등록방지를 사용해야 할 경우
function get_admin_captcha_by($type='get'){
$captcha_name = 'ss_admin_use_captcha';
if($type === 'remove'){
set_session($captcha_name, '');
}
return get_session($captcha_name);
}
//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()
@@ -426,25 +403,6 @@ function admin_referer_check($return=false)
}
}
function admin_check_xss_params($params){
if( ! $params ) return;
foreach( $params as $key=>$value ){
if ( empty($value) ) continue;
if( is_array($value) ){
admin_check_xss_params($value);
} else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/onload=.*/ius', $value)) ){
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
die();
}
}
return;
}
// 접근 권한 검사
if (!$member['mb_id'])
{
@@ -467,7 +425,7 @@ else if ($is_admin != 'super')
}
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
$admin_key = md5($member['mb_datetime'] . get_real_client_ip() . $_SERVER['HTTP_USER_AGENT']);
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
if (get_session('ss_mb_key') !== $admin_key) {
session_destroy();
@@ -508,12 +466,6 @@ if (isset($stx)) $arr_query[] = 'stx='.$stx;
if (isset($page)) $arr_query[] = 'page='.$page;
$qstr = implode("&amp;", $arr_query);
if ( isset($_REQUEST) && $_REQUEST ){
if( admin_referer_check(true) ){
admin_check_xss_params($_REQUEST);
}
}
// 관리자에서는 추가 스크립트는 사용하지 않는다.
//$config['cf_add_script'] = '';
?>
-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');
?>
-7
View File
@@ -1,7 +0,0 @@
<?php
include_once('./_common.php');
if( isset($_POST['admin_use_captcha']) ){
set_session('ss_admin_use_captcha', true);
}
?>
+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);
}
+48 -48
View File
@@ -38,43 +38,43 @@ $sql = " insert into {$g5['board_table']}
bo_subject = '$target_subject',
bo_device = '{$board['bo_device']}',
bo_admin = '{$board['bo_admin']}',
bo_list_level = '{$board['bo_list_level']}',
bo_read_level = '{$board['bo_read_level']}',
bo_write_level = '{$board['bo_write_level']}',
bo_reply_level = '{$board['bo_reply_level']}',
bo_comment_level = '{$board['bo_comment_level']}',
bo_upload_level = '{$board['bo_upload_level']}',
bo_download_level = '{$board['bo_download_level']}',
bo_html_level = '{$board['bo_html_level']}',
bo_link_level = '{$board['bo_link_level']}',
bo_count_modify = '{$board['bo_count_modify']}',
bo_count_delete = '{$board['bo_count_delete']}',
bo_read_point = '{$board['bo_read_point']}',
bo_write_point = '{$board['bo_write_point']}',
bo_comment_point = '{$board['bo_comment_point']}',
bo_download_point = '{$board['bo_download_point']}',
bo_use_category = '{$board['bo_use_category']}',
bo_list_level = '{$board[bo_list_level]}',
bo_read_level = '{$board[bo_read_level]}',
bo_write_level = '{$board[bo_write_level]}',
bo_reply_level = '{$board[bo_reply_level]}',
bo_comment_level = '{$board[bo_comment_level]}',
bo_upload_level = '{$board[bo_upload_level]}',
bo_download_level = '{$board[bo_download_level]}',
bo_html_level = '{$board[bo_html_level]}',
bo_link_level = '{$board[bo_link_level]}',
bo_count_modify = '{$board[bo_count_modify]}',
bo_count_delete = '{$board[bo_count_delete]}',
bo_read_point = '{$board[bo_read_point]}',
bo_write_point = '{$board[bo_write_point]}',
bo_comment_point = '{$board[bo_comment_point]}',
bo_download_point = '{$board[bo_download_point]}',
bo_use_category = '{$board[bo_use_category]}',
bo_category_list = '{$board['bo_category_list']}',
bo_use_sideview = '{$board['bo_use_sideview']}',
bo_use_file_content = '{$board['bo_use_file_content']}',
bo_use_secret = '{$board['bo_use_secret']}',
bo_use_dhtml_editor = '{$board['bo_use_dhtml_editor']}',
bo_use_rss_view = '{$board['bo_use_rss_view']}',
bo_use_good = '{$board['bo_use_good']}',
bo_use_nogood = '{$board['bo_use_nogood']}',
bo_use_name = '{$board['bo_use_name']}',
bo_use_signature = '{$board['bo_use_signature']}',
bo_use_ip_view = '{$board['bo_use_ip_view']}',
bo_use_sideview = '{$board[bo_use_sideview]}',
bo_use_file_content = '{$board[bo_use_file_content]}',
bo_use_secret = '{$board[bo_use_secret]}',
bo_use_dhtml_editor = '{$board[bo_use_dhtml_editor]}',
bo_use_rss_view = '{$board[bo_use_rss_view]}',
bo_use_good = '{$board[bo_use_good]}',
bo_use_nogood = '{$board[bo_use_nogood]}',
bo_use_name = '{$board[bo_use_name]}',
bo_use_signature = '{$board[bo_use_signature]}',
bo_use_ip_view = '{$board[bo_use_ip_view]}',
bo_use_list_view = '{$board['bo_use_list_view']}',
bo_use_list_content = '{$board['bo_use_list_content']}',
bo_table_width = '{$board['bo_table_width']}',
bo_subject_len = '{$board['bo_subject_len']}',
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
bo_page_rows = '{$board['bo_page_rows']}',
bo_mobile_page_rows = '{$board['bo_mobile_page_rows']}',
bo_new = '{$board['bo_new']}',
bo_hot = '{$board['bo_hot']}',
bo_image_width = '{$board['bo_image_width']}',
bo_use_list_content = '{$board[bo_use_list_content]}',
bo_table_width = '{$board[bo_table_width]}',
bo_subject_len = '{$board[bo_subject_len]}',
bo_mobile_subject_len = '{$board[bo_mobile_subject_len]}',
bo_page_rows = '{$board[bo_page_rows]}',
bo_mobile_page_rows = '{$board[bo_mobile_page_rows]}',
bo_new = '{$board[bo_new]}',
bo_hot = '{$board[bo_hot]}',
bo_image_width = '{$board[bo_image_width]}',
bo_skin = '{$board['bo_skin']}',
bo_mobile_skin = '{$board['bo_mobile_skin']}',
bo_include_head = '{$board['bo_include_head']}',
@@ -84,20 +84,20 @@ $sql = " insert into {$g5['board_table']}
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
bo_gallery_cols = '{$board['bo_gallery_cols']}',
bo_gallery_width = '{$board['bo_gallery_width']}',
bo_gallery_height = '{$board['bo_gallery_height']}',
bo_mobile_gallery_width = '{$board['bo_mobile_gallery_width']}',
bo_mobile_gallery_height = '{$board['bo_mobile_gallery_height']}',
bo_upload_size = '{$board['bo_upload_size']}',
bo_reply_order = '{$board['bo_reply_order']}',
bo_use_search = '{$board['bo_use_search']}',
bo_order = '{$board['bo_order']}',
bo_gallery_cols = '{$board[bo_gallery_cols]}',
bo_gallery_width = '{$board[bo_gallery_width]}',
bo_gallery_height = '{$board[bo_gallery_height]}',
bo_mobile_gallery_width = '{$board[bo_mobile_gallery_width]}',
bo_mobile_gallery_height = '{$board[bo_mobile_gallery_height]}',
bo_upload_size = '{$board[bo_upload_size]}',
bo_reply_order = '{$board[bo_reply_order]}',
bo_use_search = '{$board[bo_use_search]}',
bo_order = '{$board[bo_order]}',
bo_notice = '{$board['bo_notice']}',
bo_upload_count = '{$board['bo_upload_count']}',
bo_use_email = '{$board['bo_use_email']}',
bo_use_cert = '{$board['bo_use_cert']}',
bo_use_sns = '{$board['bo_use_sns']}',
bo_upload_count = '{$board[bo_upload_count]}',
bo_use_email = '{$board[bo_use_email]}',
bo_use_cert = '{$board[bo_use_cert]}',
bo_use_sns = '{$board[bo_use_sns]}',
bo_sort_field = '{$board['bo_sort_field']}',
bo_1_subj = '".addslashes($board['bo_1_subj'])."',
bo_2_subj = '".addslashes($board['bo_2_subj'])."',
+4 -72
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>
@@ -850,22 +849,6 @@ $pg_anchor = '<ul class="anchor">
<label for="chk_all_include_tail">전체적용</label>
</td>
</tr>
<tr id="admin_captcha_box" style="display:none;">
<th scope="row">자동등록방지</th>
<td>
<?php
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
$captcha_html = captcha_html();
$captcha_js = chk_captcha_js();
echo $captcha_html;
?>
<script>
jQuery("#captcha_key").removeAttr("required").removeClass("required");
</script>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_content_head">상단 내용</label></th>
<td>
@@ -914,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>
@@ -1260,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="<?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_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>
<?php } ?>
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
</div>
@@ -1326,52 +1308,6 @@ function set_point(f) {
}
}
var captcha_chk = false;
function use_captcha_check(){
$.ajax({
type: "POST",
url: g5_admin_url+"/ajax.use_captcha.php",
data: { admin_use_captcha: "1" },
cache: false,
async: false,
dataType: "json",
success: function(data) {
}
});
}
function frm_check_file(){
var bo_include_head = "<?php echo $board['bo_include_head']; ?>";
var bo_include_tail = "<?php echo $board['bo_include_tail']; ?>";
var head = jQuery.trim(jQuery("#bo_include_head").val());
var tail = jQuery.trim(jQuery("#bo_include_tail").val());
if(bo_include_head !== head || bo_include_tail !== tail){
// 캡챠를 사용합니다.
jQuery("#admin_captcha_box").show();
captcha_chk = true;
use_captcha_check();
return false;
} else {
jQuery("#admin_captcha_box").hide();
}
return true;
}
jQuery(function($){
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
$("#bo_include_head, #bo_include_tail").on("change paste keyup", function(e) {
frm_check_file();
});
use_captcha_check();
}
});
function fboardform_submit(f)
{
<?php echo get_editor_js("bo_content_head"); ?>
@@ -1391,10 +1327,6 @@ function fboardform_submit(f)
return false;
}
if( captcha_chk ) {
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
}
return true;
}
</script>
+32 -66
View File
@@ -14,42 +14,33 @@ if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
$bo_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($bo_include_head, 0, 255));
$bo_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($bo_include_tail, 0, 255));
$_POST['bo_include_head'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_head'], 0, 255));
$_POST['bo_include_tail'] = preg_replace("#[\\\]+$#", "", substr($_POST['bo_include_tail'], 0, 255));
// 관리자가 자동등록방지를 사용해야 할 경우
if ($board && ($board['bo_include_head'] !== $bo_include_head || $board['bo_include_tail'] !== $bo_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
}
if ($file = $bo_include_head) {
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
if ($file = $_POST['bo_include_head']) {
$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 = $bo_include_tail) {
$file_ext = pathinfo($file, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $file) ) {
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
if ($file = $_POST['bo_include_tail']) {
$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($bo_include_head, 1)) {
alert('상단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
if(!is_include_path_check($_POST['bo_include_head'], 1)) {
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.');
}
if(!is_include_path_check($bo_include_tail, 1)) {
alert('하단 파일 경로에 포함시킬수 없는 문자열이 있습니다.');
if(!is_include_path_check($_POST['bo_include_tail'], 1)) {
alert('/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.');
}
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
@@ -69,11 +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']) : '';
$_POST['bo_subject'] = strip_tags($_POST['bo_subject']);
$_POST['bo_mobile_subject'] = strip_tags($_POST['bo_mobile_subject']);
$sql_common = " gr_id = '{$_POST['gr_id']}',
bo_subject = '{$_POST['bo_subject']}',
@@ -96,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']}',
@@ -124,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 = '".$bo_include_head."',
bo_include_tail = '".$bo_include_tail."',
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']}',
@@ -322,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}' ";
@@ -411,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}' ";
@@ -438,8 +407,5 @@ if ($all_fields) {
delete_cache_latest($bo_table);
if(function_exists('get_admin_captcha_by'))
get_admin_captcha_by('remove');
goto_url("./board_form.php?w=u&bo_table={$bo_table}&amp;{$qstr}");
?>
+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);
+2 -2
View File
@@ -12,7 +12,7 @@ $sound_only = '';
if ($w == '') {
$gr_id_attr = 'required';
$sound_only = '<strong class="sound_only"> 필수</strong>';
$gr = array('gr_use_access' => 0);
$gr['gr_use_access'] = 0;
$html_title .= ' 생성';
} else if ($w == 'u') {
$gr_id_attr = 'readonly';
@@ -117,7 +117,7 @@ include_once('./admin.head.php');
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo get_text($group['gr_'.$i.'_subj']) ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo get_sanitize_input($gr['gr_'.$i]); ?>" id="gr_<?php echo $i ?>" class="frm_input">
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo $gr['gr_'.$i] ?>" id="gr_<?php echo $i ?>" class="frm_input">
</td>
</tr>
<?php } ?>
+1 -3
View File
@@ -16,9 +16,7 @@ if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
$gr_subject = isset($_POST['gr_subject']) ? strip_tags($_POST['gr_subject']) : '';
$sql_common = " gr_subject = '{$gr_subject}',
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
gr_device = '{$_POST['gr_device']}',
gr_admin = '{$_POST['gr_admin']}',
gr_1_subj = '{$_POST['gr_1_subj']}',
+1 -2
View File
@@ -19,11 +19,10 @@ for ($i=0; $i<$count; $i++)
{
$k = $_POST['chk'][$i];
$gr_id = $_POST['group_id'][$k];
$gr_subject = strip_tags($_POST['gr_subject'][$k]);
if($_POST['act_button'] == '선택수정') {
$sql = " update {$g5['group_table']}
set gr_subject = '{$gr_subject}',
set gr_subject = '{$_POST['gr_subject'][$k]}',
gr_device = '{$_POST['gr_device'][$k]}',
gr_admin = '{$_POST['gr_admin'][$k]}',
gr_use_access = '{$_POST['gr_use_access'][$k]}',
-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');
?>
+21 -19
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>
@@ -1317,7 +1319,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<label for="cf_<?php echo $i ?>_subj">여분필드<?php echo $i ?> 제목</label>
<input type="text" name="cf_<?php echo $i ?>_subj" value="<?php echo get_text($config['cf_'.$i.'_subj']) ?>" id="cf_<?php echo $i ?>_subj" class="frm_input" size="30">
<label for="cf_<?php echo $i ?>">여분필드<?php echo $i ?> 값</label>
<input type="text" name="cf_<?php echo $i ?>" value="<?php echo get_sanitize_input($config['cf_'.$i]); ?>" id="cf_<?php echo $i ?>" class="frm_input" size="30">
<input type="text" name="cf_<?php echo $i ?>" value="<?php echo $config['cf_'.$i] ?>" id="cf_<?php echo $i ?>" class="frm_input" size="30">
</td>
</tr>
<?php } ?>
-2
View File
@@ -26,8 +26,6 @@ if(!$_POST['cf_cert_use']) {
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
$_POST['cf_title'] = strip_tags($_POST['cf_title']);
$sql = " update {$g5['config_table']}
set cf_title = '{$_POST['cf_title']}',
cf_admin = '{$_POST['cf_admin']}',
+5 -77
View File
@@ -49,11 +49,9 @@ if ($w == "u")
else
{
$html_title .= ' 입력';
$co = array(
'co_html' => 2,
'co_skin' => 'basic',
'co_mobile_skin' => 'basic'
);
$co['co_html'] = 2;
$co['co_skin'] = 'basic';
$co['co_mobile_skin'] = 'basic';
}
include_once (G5_ADMIN_PATH.'/admin.head.php');
@@ -109,8 +107,8 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<td>
<?php echo help("내용에서 iframe 등의 태그를 사용하려면 사용안함으로 선택해 주십시오."); ?>
<select name="co_tag_filter_use" id="co_tag_filter_use">
<option value="1"<?php echo get_selected($co['co_tag_filter_use'], 1); ?>>사용함</option>
<option value="0"<?php echo get_selected($co['co_tag_filter_use'], 0); ?>>사용안함</option>
<option value="1"<?php echo get_selected(1, $co['co_tag_filter_use']); ?>>사용함</option>
<option value="0"<?php echo get_selected(0, $co['co_tag_filter_use']); ?>>사용안함</option>
</select>
</td>
</tr>
@@ -128,22 +126,6 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<input type="text" name="co_include_tail" value="<?php echo $co['co_include_tail']; ?>" id="co_include_tail" class="frm_input" size="60">
</td>
</tr>
<tr id="admin_captcha_box" style="display:none;">
<th scope="row">자동등록방지</th>
<td>
<?php
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
$captcha_html = captcha_html();
$captcha_js = chk_captcha_js();
echo $captcha_html;
?>
<script>
jQuery("#captcha_key").removeAttr("required").removeClass("required");
</script>
</td>
</tr>
<tr>
<th scope="row"><label for="co_himg">상단이미지</label></th>
<td>
@@ -203,56 +185,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
</form>
<?php
// [KVE-2018-2089] 취약점 으로 인해 파일 경로 수정시에만 자동등록방지 코드 사용
?>
<script>
var captcha_chk = false;
function use_captcha_check(){
$.ajax({
type: "POST",
url: g5_admin_url+"/ajax.use_captcha.php",
data: { admin_use_captcha: "1" },
cache: false,
async: false,
dataType: "json",
success: function(data) {
}
});
}
function frm_check_file(){
var co_include_head = "<?php echo $co['co_include_head']; ?>";
var co_include_tail = "<?php echo $co['co_include_tail']; ?>";
var head = jQuery.trim(jQuery("#co_include_head").val());
var tail = jQuery.trim(jQuery("#co_include_tail").val());
if(co_include_head !== head || co_include_tail !== tail){
// 캡챠를 사용합니다.
jQuery("#admin_captcha_box").show();
captcha_chk = true;
use_captcha_check();
return false;
} else {
jQuery("#admin_captcha_box").hide();
}
return true;
}
jQuery(function($){
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
$("#co_include_head, #co_include_tail").on("change paste keyup", function(e) {
frm_check_file();
});
use_captcha_check();
}
});
function frmcontentform_check(f)
{
errmsg = "";
@@ -271,11 +204,6 @@ function frmcontentform_check(f)
errfld.focus();
return false;
}
if( captcha_chk ) {
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
}
return true;
}
</script>
+15 -38
View File
@@ -12,28 +12,6 @@ else
check_admin_token();
if ($w == "" || $w == "u")
{
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
$co_row = sql_fetch($sql);
}
$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
$co_subject = strip_tags($co_subject);
$co_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_head, 0, 255));
$co_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($co_include_tail, 0, 255));
// 관리자가 자동등록방지를 사용해야 할 경우
if (($co_row['co_include_head'] !== $co_include_head || $co_row['co_include_tail'] !== $co_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
}
@mkdir(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
@@ -43,29 +21,27 @@ if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
$error_msg = '';
if( $co_include_head ){
$file_ext = pathinfo($co_include_head, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $co_include_head) ) {
alert('상단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
$purl = parse_url($co_include_head);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('상단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
}
if( $co_include_tail ){
$file_ext = pathinfo($co_include_tail, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $co_include_tail) ) {
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
$purl = parse_url($co_include_tail);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
}
if( $co_include_head && ! is_include_path_check($co_include_head, 1) ){
if( $co_include_head && ! is_include_path_check($co_include_head) ){
$co_include_head = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 상단 파일 경로에 포함시킬수 없습니다.';
}
if( $co_include_tail && ! is_include_path_check($co_include_tail, 1) ){
if( $co_include_tail && ! is_include_path_check($co_include_tail) ){
$co_include_tail = '';
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
}
@@ -82,7 +58,11 @@ $sql_common = " co_include_head = '$co_include_head',
if ($w == "")
{
$row = $co_row;
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
$sql = " select co_id from {$g5['content_table']} where co_id = '$co_id' ";
$row = sql_fetch($sql);
if ($row['co_id'])
alert("이미 같은 ID로 등록된 내용이 있습니다.");
@@ -107,9 +87,6 @@ else if ($w == "d")
sql_query($sql);
}
if(function_exists('get_admin_captcha_by'))
get_admin_captcha_by('remove');
if ($w == "" || $w == "u")
{
if ($_FILES['co_himg']['name'])
+15 -36
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);
@@ -685,20 +683,11 @@ box-shadow: 2px 2px 3px 0px rgba(0,0,0,0.2);}
.sevice_2 .svc_design{overflow:hidden;height:210px;position:relative}
.sevice_2 .svc_design .svc_btn a{margin:0 0 20px}
/* 캡챠 */
#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_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}
/*테마*/
.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;}
@@ -758,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');
?>
-3
View File
@@ -5,9 +5,6 @@ include_once(G5_EDITOR_LIB);
auth_check($auth[$sub_menu], "w");
$fm_id = (int) $fm_id;
$fa_id = isset($fa_id) ? (int) $fa_id : 0;
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
+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");
+3 -9
View File
@@ -5,13 +5,7 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], "r");
$g5['title'] = 'FAQ 상세관리';
if ($fm_subject){
$fm_subject = clean_xss_tags(strip_tags($fm_subject));
$g5['title'] .= ' : '.$fm_subject;
}
$fm_id = (int) $fm_id;
if ($fm_subject) $g5['title'] .= ' : '.$fm_subject;
include_once (G5_ADMIN_PATH.'/admin.head.php');
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
@@ -22,7 +16,7 @@ $sql_common = " from {$g5['faq_table']} where fm_id = '$fm_id' ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$total_count = $row[cnt];
$sql = "select * $sql_common order by fa_order , fa_id ";
$result = sql_query($sql);
@@ -60,7 +54,7 @@ $result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
$cnt = $row1['cnt'];
$cnt = $row1[cnt];
$s_mod = icon("수정", "");
$s_del = icon("삭제", "");
-1
View File
@@ -21,7 +21,6 @@ if ($w == "u")
else
{
$html_title .= ' 입력';
$fm = array();
}
$g5['title'] = $html_title.' 관리';
-2
View File
@@ -18,8 +18,6 @@ check_admin_token();
if ($fm_himg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
$fm_subject = strip_tags($fm_subject);
$sql_common = " set fm_subject = '$fm_subject',
fm_head_html = '$fm_head_html',
fm_tail_html = '$fm_tail_html',
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);
}
}
}
+8 -10
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++)
@@ -29,19 +27,19 @@ if ($_POST['act_button'] == "선택수정") {
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
} else {
if($_POST['mb_certify'][$k])
$mb_adult = (int) $_POST['mb_adult'][$k];
$mb_adult = $_POST['mb_adult'][$k];
else
$mb_adult = 0;
$sql = " update {$g5['member_table']}
set mb_level = '".sql_real_escape_string($_POST['mb_level'][$k])."',
mb_intercept_date = '".sql_real_escape_string($_POST['mb_intercept_date'][$k])."',
mb_mailling = '".sql_real_escape_string($_POST['mb_mailling'][$k])."',
mb_sms = '".sql_real_escape_string($_POST['mb_sms'][$k])."',
mb_open = '".sql_real_escape_string($_POST['mb_open'][$k])."',
mb_certify = '".sql_real_escape_string($_POST['mb_certify'][$k])."',
set mb_level = '{$_POST['mb_level'][$k]}',
mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}',
mb_mailling = '{$_POST['mb_mailling'][$k]}',
mb_sms = '{$_POST['mb_sms'][$k]}',
mb_open = '{$_POST['mb_open'][$k]}',
mb_certify = '{$_POST['mb_certify'][$k]}',
mb_adult = '{$mb_adult}'
where mb_id = '".sql_real_escape_string($_POST['mb_id'][$k])."' ";
where mb_id = '{$_POST['mb_id'][$k]}' ";
sql_query($sql);
}
}
-14
View File
@@ -196,20 +196,6 @@ function base_convert(number, frombase, tobase) {
function fmenulist_submit(f)
{
var me_links = document.getElementsByName('me_link[]');
var reg = /^javascript/;
for (i=0; i<me_links.length; i++){
if( reg.test(me_links[i].value) ){
alert('링크에 자바스크립트문을 입력할수 없습니다.');
me_links[i].focus();
return false;
}
}
return true;
}
</script>
+2 -2
View File
@@ -23,8 +23,8 @@ for ($i=0; $i<$count; $i++)
$code = $_POST['code'][$i];
$me_name = $_POST['me_name'][$i];
$me_link = preg_match('/^javascript/i', $_POST['me_link'][$i]) ? G5_URL : strip_tags($_POST['me_link'][$i]);
$me_link = $_POST['me_link'][$i];
if(!$code || !$me_name || !$me_link)
continue;
+1 -1
View File
@@ -109,7 +109,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
<tr>
<th scope="row"><label for="nw_subject">팝업 제목<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_subject" value="<?php echo get_sanitize_input($nw['nw_subject']); ?>" id="nw_subject" required class="frm_input required" size="80">
<input type="text" name="nw_subject" value="<?php echo stripslashes($nw['nw_subject']) ?>" id="nw_subject" required class="frm_input required" size="80">
</td>
</tr>
<tr>
+1 -3
View File
@@ -12,8 +12,6 @@ else
check_admin_token();
$nw_subject = isset($_POST['nw_subject']) ? strip_tags($_POST['nw_subject']) : '';
$sql_common = " nw_device = '{$_POST['nw_device']}',
nw_begin_time = '{$_POST['nw_begin_time']}',
nw_end_time = '{$_POST['nw_end_time']}',
@@ -22,7 +20,7 @@ $sql_common = " nw_device = '{$_POST['nw_device']}',
nw_top = '{$_POST['nw_top']}',
nw_height = '{$_POST['nw_height']}',
nw_width = '{$_POST['nw_width']}',
nw_subject = '{$nw_subject}',
nw_subject = '{$_POST['nw_subject']}',
nw_content = '{$_POST['nw_content']}',
nw_content_html = '{$_POST['nw_content_html']}' ";
+3 -3
View File
@@ -6,9 +6,9 @@ auth_check($auth[$sub_menu], 'w');
check_admin_token();
$mb_id = strip_tags($_POST['mb_id']);
$po_point = strip_tags($_POST['po_point']);
$po_content = strip_tags($_POST['po_content']);
$mb_id = $_POST['mb_id'];
$po_point = $_POST['po_point'];
$po_content = $_POST['po_content'];
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
$mb = get_member($mb_id);
-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']}
+1 -1
View File
@@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], 'r');
// 체크된 자료 삭제
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
for ($i=0; $i<count($_POST['chk']); $i++) {
$pp_id = (int) $_POST['chk'][$i];
$pp_id = $_POST['chk'][$i];
sql_query(" delete from {$g5['popular_table']} where pp_id = '$pp_id' ", true);
}
-67
View File
@@ -263,22 +263,6 @@ if(!isset($qaconfig['qa_include_head'])) {
<input type="text" name="qa_include_tail" value="<?php echo $qaconfig['qa_include_tail'] ?>" id="qa_include_tail" class="frm_input" size="50">
</td>
</tr>
<tr id="admin_captcha_box" style="display:none;">
<th scope="row">자동등록방지</th>
<td>
<?php
echo help("파일 경로를 입력 또는 수정시 캡챠를 반드시 입력해야 합니다.");
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
$captcha_html = captcha_html();
$captcha_js = chk_captcha_js();
echo $captcha_html;
?>
<script>
jQuery("#captcha_key").removeAttr("required").removeClass("required");
</script>
</td>
</tr>
<tr>
<th scope="row"><label for="qa_content_head">상단 내용</label></th>
<td>
@@ -332,53 +316,6 @@ if(!isset($qaconfig['qa_include_head'])) {
</form>
<script>
var captcha_chk = false;
function use_captcha_check(){
$.ajax({
type: "POST",
url: g5_admin_url+"/ajax.use_captcha.php",
data: { admin_use_captcha: "1" },
cache: false,
async: false,
dataType: "json",
success: function(data) {
}
});
}
function frm_check_file(){
var qa_include_head = "<?php echo $qaconfig['qa_include_head']; ?>";
var qa_include_tail = "<?php echo $qaconfig['qa_include_tail']; ?>";
var head = jQuery.trim(jQuery("#qa_include_head").val());
var tail = jQuery.trim(jQuery("#qa_include_tail").val());
if(qa_include_head !== head || qa_include_tail !== tail){
// 캡챠를 사용합니다.
jQuery("#admin_captcha_box").show();
captcha_chk = true;
use_captcha_check();
return false;
} else {
jQuery("#admin_captcha_box").hide();
}
return true;
}
jQuery(function($){
if( window.self !== window.top ){ // frame 또는 iframe을 사용할 경우 체크
$("#qa_include_head, #qa_include_tail").on("change paste keyup", function(e) {
frm_check_file();
});
use_captcha_check();
}
});
function fqaconfigform_submit(f)
{
<?php echo get_editor_js("qa_content_head"); ?>
@@ -386,10 +323,6 @@ function fqaconfigform_submit(f)
<?php echo get_editor_js("qa_mobile_content_head"); ?>
<?php echo get_editor_js("qa_mobile_content_tail"); ?>
if( captcha_chk ) {
<?php echo isset($captcha_js) ? $captcha_js : ''; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
}
f.action = "./qa_config_update.php";
return true;
}
+8 -25
View File
@@ -10,33 +10,19 @@ check_admin_token();
$error_msg = '';
$qaconfig = get_qa_config();
$qa_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_head, 0, 255));
$qa_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($qa_include_tail, 0, 255));
// 관리자가 자동등록방지를 사용해야 할 경우
if ($board && ($qaconfig['qa_include_head'] !== $qa_include_head || $qaconfig['qa_include_tail'] !== $qa_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
}
if( $qa_include_head ){
$file_ext = pathinfo($qa_include_head, PATHINFO_EXTENSION);
if( ! $file_ext || ! in_array($file_ext, array('php', 'htm', 'html')) || ! preg_match('/^.*\.(php|htm|html)$/i', $qa_include_head) ) {
alert('상단 파일 경로의 확장자는 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')) || ! preg_match('/^.*\.(php|htm|html)$/i', $qa_include_tail) ) {
alert('하단 파일 경로의 확장자는 php, htm, html 만 허용합니다.');
$purl = parse_url($qa_include_tail);
$file = $purl['path'];
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
alert('하단 파일 경로의 확장자는 php, html 만 허용합니다.');
}
}
@@ -89,9 +75,6 @@ $sql = " update {$g5['qa_config_table']}
qa_5 = '{$_POST['qa_5']}' ";
sql_query($sql);
if(function_exists('get_admin_captcha_by'))
get_admin_captcha_by('remove');
if($error_msg){
alert($error_msg, './qa_config.php');
} else {
-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('같은 그룹명이 존재합니다.');
-2
View File
@@ -13,8 +13,6 @@ $g5['title'] = "이모티콘 관리";
if ($page < 1) $page = 1;
$fg_no = isset($fg_no) ? (int) $fg_no : '';
if (is_numeric($fg_no))
$sql_group = " and fg_no='$fg_no' ";
else
+2 -2
View File
@@ -4,7 +4,7 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], "w");
check_admin_token();
check_token();
if($atype == "del"){
$count = count($_POST['fo_no']);
@@ -14,7 +14,7 @@ if($atype == "del"){
for ($i=0; $i<$count; $i++)
{
// 실제 번호를 넘김
$fo_no = (int) $_POST['fo_no'][$i];
$fo_no = $_POST['fo_no'][$i];
if (!trim($fo_no)) continue;
$res = sql_fetch("select * from {$g5['sms5_form_table']} where fo_no='$fo_no'");
-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') // 업데이트
+1 -1
View File
@@ -27,7 +27,7 @@ $vnum = $total_count - (($page-1) * $page_size);
include_once(G5_ADMIN_PATH.'/admin.head.php');
?>
<form name="search_form" method="get" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" class="local_sch01 local_sch" >
<form name="search_form" method="get" action="<?echo $_SERVER['SCRIPT_NAME']?>" class="local_sch01 local_sch" >
<label for="st" class="sound_only">검색대상</label>
<select name="st" id="st">
<option value="hs_name"<?php echo get_selected('hs_name', $st); ?>>이름</option>
+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>
-3
View File
@@ -13,9 +13,6 @@ $g5['title'] = "휴대폰번호 관리";
if ($page < 1) $page = 1;
$bg_no = isset($bg_no) ? (int) $bg_no : 0;
$st = isset($st) ? preg_replace('/[^a-z0-9]/i', '', $st) : '';
if (is_numeric($bg_no))
$sql_group = " and bg_no='$bg_no' ";
else
+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>
-2
View File
@@ -21,8 +21,6 @@ if ($w=='u') // 업데이트
if (!strlen(trim($bk_name)))
alert('이름을 입력해주세요');
$bk_name = strip_tags($bk_name);
if ($bk_hp == '')
alert('휴대폰번호만 입력 가능합니다.');
/*
+8 -6
View File
@@ -30,7 +30,7 @@ if ($w == 'u' && is_numeric($bk_no)) {
$g5['title'] .= '수정';
}
else {
$write = array('bg_no' => (int) $bg_no);
$write['bg_no'] = $bg_no;
$g5['title'] .= '추가';
}
@@ -43,12 +43,12 @@ include_once(G5_ADMIN_PATH."/admin.head.php");
?>
<form name="book_form" id="book_form" method="post" action="./num_book_update.php">
<input type="hidden" name="w" value="<?php echo get_sanitize_input($w); ?>">
<input type="hidden" name="page" value="<?php echo get_sanitize_input($page); ?>">
<input type="hidden" name="ap" value="<?php echo get_sanitize_input($ap); ?>">
<input type="hidden" name="w" value="<?php echo $w?>">
<input type="hidden" name="page" value="<?php echo $page?>">
<input type="hidden" name="ap" value="<?php echo $ap?>">
<input type="hidden" name="bk_no" value="<?php echo $write['bk_no']?>">
<input type="hidden" name="mb_id" id="mb_id" value="<?php echo $write['mb_id']?>">
<input type="hidden" name="get_bg_no" value="<?php echo get_sanitize_input($bg_no); ?>">
<input type="hidden" name="get_bg_no" value="<?php echo $bg_no?>">
<div class="tbl_frm01 tbl_wrap">
<table>
@@ -74,7 +74,7 @@ include_once(G5_ADMIN_PATH."/admin.head.php");
</tr>
<tr>
<th scope="row"><label for="bk_name">이름<strong class="sound_only"> 필수</strong></label></th>
<td><input type="text" name="bk_name" id="bk_name" maxlength="50" value="<?php echo get_sanitize_input($write['bk_name']); ?>" required class="frm_input required"></td>
<td><input type="text" name="bk_name" id="bk_name" maxlength="50" value="<?php echo $write['bk_name']?>" required class="frm_input required"></td>
</tr>
<tr>
<th scope="row"><label for="bk_hp">휴대폰번호<strong class="sound_only"> 필수</strong></label></th>
@@ -187,12 +187,14 @@ function book_submit(){
if($check_msg.size()> 0)
$check_msg.remove();
// $("#exist_msg").text("<?php echo $exist_msg_2; ?>");
is_submit = true;
} else {
if($check_msg.size() < 1)
$("input#bk_hp").after("<div id=\"hp_check_el\"><h3>이 번호를 쓰는 회원 정보</h3><ul></ul></div>");
$("#hp_check_el").find("ul").html( list_text );
// $("#exist_msg").html("<?php echo $exist_msg_1 ?>");
if(confirm("회원 정보에 중복 휴대폰 번호가 있습니다.수정하실 경우 회원정보에 반영되지 않습니다.\n수정하시겠습니까?"))
is_submit = true;
+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');
?>
+3 -8
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); ?>");
@@ -67,17 +66,13 @@ history.back();
<form method="post" action="<?php echo $url ?>">
<?php
foreach($_POST as $key => $value) {
$key = clean_xss_tags($url);
$value = clean_xss_tags($value);
if(strlen($value) < 1)
continue;
if(preg_match("/pass|pwd|capt|url/", $key))
continue;
?>
<input type="hidden" name="<?php echo htmlspecialchars($key); ?>" value="<?php echo htmlspecialchars($value); ?>">
<input type="hidden" name="<?php echo $key ?>" value="<?php echo $value ?>">
<?php
}
?>
-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
@@ -5,13 +5,13 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (G5_IS_MOBILE) {
// 모바일의 경우 설정을 따르지 않는다.
include_once(G5_BBS_PATH.'/_head.php');
echo html_purifier(stripslashes($board['bo_mobile_content_head']));
echo stripslashes($board['bo_mobile_content_head']);
} else {
if(is_include_path_check($board['bo_include_head'])) { //파일경로 체크
@include ($board['bo_include_head']);
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
include_once(G5_BBS_PATH.'/_head.php');
}
echo html_purifier(stripslashes($board['bo_content_head']));
echo stripslashes($board['bo_content_head']);
}
?>
+2 -2
View File
@@ -3,11 +3,11 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 게시판 관리의 하단 파일 경로
if (G5_IS_MOBILE) {
echo html_purifier(stripslashes($board['bo_mobile_content_tail']));
echo stripslashes($board['bo_mobile_content_tail']);
// 모바일의 경우 설정을 따르지 않는다.
include_once(G5_BBS_PATH.'/_tail.php');
} else {
echo html_purifier(stripslashes($board['bo_content_tail']));
echo stripslashes($board['bo_content_tail']);
if(is_include_path_check($board['bo_include_tail'])) { //파일경로 체크
@include ($board['bo_include_tail']);
} else { //파일경로가 올바르지 않으면 기본파일을 가져옴
+3 -3
View File
@@ -2,9 +2,9 @@
include_once('./_common.php');
include_once(G5_PATH.'/head.sub.php');
$url1 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url1));
$url2 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url2));
$url3 = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", clean_xss_tags($url3));
$url1 = clean_xss_tags($url1);
$url2 = clean_xss_tags($url2);
$url3 = clean_xss_tags($url3);
// url 체크
check_url_host($url1);
-2
View File
@@ -1,8 +1,6 @@
<?php
include_once('./_common.php');
$co_id = preg_replace('/[^a-z0-9_]/i', '', $co_id);
//dbconfig파일에 $g5['content_table'] 배열변수가 있는지 체크
if( !isset($g5['content_table']) ){
die('<meta charset="utf-8">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');
+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 -6
View File
@@ -2,8 +2,6 @@
// 코멘트 삭제
include_once('./_common.php');
$comment_id = (int) $comment_id;
$delete_comment_token = get_session('ss_delete_comment_'.$comment_id.'_token');
set_session('ss_delete_comment_'.$comment_id.'_token', '');
@@ -22,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
@@ -39,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']))
+4 -25
View File
@@ -67,33 +67,17 @@ if (!get_session($ss_name))
insert_point($member['mb_id'], $board['bo_download_point'], "{$board['bo_subject']} $wr_id 파일 다운로드", $bo_table, $wr_id, "다운로드");
}
set_session($ss_name, TRUE);
}
// 이미 다운로드 받은 파일인지를 검사한 후 다운로드 카운트 증가 ( SIR 그누위즈 님 코드 제안 )
$ss_name = 'ss_down_'.$bo_table.'_'.$wr_id.'_'.$no;
if (!get_session($ss_name))
{
// 다운로드 카운트 증가
$sql = " update {$g5['board_file_table']} set bf_download = bf_download + 1 where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
sql_query($sql);
// 다운로드 카운트를 증가시키고 세션을 생성
$_SESSION[$ss_name] = true;
set_session($ss_name, TRUE);
}
$g5['title'] = '다운로드 &gt; '.conv_subject($write['wr_subject'], 255);
//파일명에 한글이 있는 경우
/*
if(preg_match("/[\xA1-\xFE][\xA1-\xFE]/", $file['bf_source'])){
// 2015.09.02 날짜의 파이어폭스에서 인코딩된 문자 그대로 출력되는 문제가 발생됨, 2018.12.11 날짜의 파이어폭스에서는 해당 현상이 없으므로 해당 코드를 사용 안합니다.
$original = iconv('utf-8', 'euc-kr', $file['bf_source']); // SIR 잉끼님 제안코드
} else {
$original = urlencode($file['bf_source']);
}
*/
$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');
@@ -102,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"));
+1 -8
View File
@@ -1,21 +1,14 @@
<?php
include_once('./_common.php');
// 봇의 메일 링크 크롤링을 방지합니다.
if(function_exists('check_mail_bot')){ check_mail_bot($_SERVER['REMOTE_ADDR']); }
$mb_id = trim($_GET['mb_id']);
$mb_md5 = trim($_GET['mb_md5']);
$sql = " select mb_id, mb_email_certify2, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$mb_id}' ";
$sql = " select mb_id, mb_email_certify2 from {$g5['member_table']} where mb_id = '{$mb_id}' ";
$row = sql_fetch($sql);
if (!$row['mb_id'])
alert('존재하는 회원이 아닙니다.', G5_URL);
if ( $row['mb_leave_date'] || $row['mb_intercept_date'] ){
alert('탈퇴 또는 차단된 회원입니다.', G5_URL);
}
// 인증 링크는 한번만 처리가 되게 한다.
sql_query(" update {$g5['member_table']} set mb_email_certify2 = '' where mb_id = '$mb_id' ");
+4 -3
View File
@@ -12,13 +12,14 @@ if (!$is_member && $config['cf_formmail_is_member'])
$email_enc = new str_encrypt();
$to = $email_enc->decrypt($to);
if (substr_count($to, "@") > 1)
alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
if (!chk_captcha()) {
alert('자동등록방지 숫자가 틀렸습니다.');
}
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $to)){
alert_close('E-mail 주소가 형식에 맞지 않아서, 메일을 보낼수 없습니다.');
}
$file = array();
for ($i=1; $i<=$attach; $i++) {
+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\-]*#');
+3 -3
View File
@@ -56,7 +56,7 @@ if ( is_use_email_certify() && !preg_match("/[1-9]/", $mb['mb_email_certify']))
// 회원아이디 세션 생성
set_session('ss_mb_id', $mb['mb_id']);
// FLASH XSS 공격에 대응하기 위하여 회원의 고유키를 생성해 놓는다. 관리자에서 검사함 - 110106
set_session('ss_mb_key', md5($mb['mb_datetime'] . get_real_client_ip() . $_SERVER['HTTP_USER_AGENT']));
set_session('ss_mb_key', md5($mb['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']));
// 포인트 체크
if($config['cf_use_point']) {
@@ -72,7 +72,7 @@ if ($auto_login) {
// 3.27
// 자동로그인 ---------------------------
// 쿠키 한달간 저장
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['SERVER_SOFTWARE'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']);
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']);
set_cookie('ck_mb_id', $mb['mb_id'], 86400 * 31);
set_cookie('ck_auto', $key, 86400 * 31);
// 자동로그인 end ---------------------------
@@ -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;
+4 -13
View File
@@ -11,27 +11,18 @@ else
$urlencode = urlencode($_SERVER[REQUEST_URI]);
*/
$url = clean_xss_tags($_GET['url']);
//소셜 로그인 한 경우
if( function_exists('social_member_comfirm_redirect') && (! $url || $url === 'register_form.php' || (function_exists('social_is_edit_page') && social_is_edit_page($url) ) ) ){
if( function_exists('social_member_comfirm_redirect') ){
social_member_comfirm_redirect();
}
$g5['title'] = '회원 비밀번호 확인';
include_once('./_head.sub.php');
$url = clean_xss_tags($_GET['url']);
// url 체크
check_url_host($url, '', G5_URL, true);
if($url){
$url = preg_replace('#^/\\\{1,}#', '/', $url);
if( preg_match('#^/{3,}#', $url) ){
$url = preg_replace('#^/{3,}#', '/', $url);
}
}
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; // 원본 디렉토리
+1 -1
View File
@@ -128,7 +128,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
$row = sql_fetch($sql);
// 원글의 코멘트 숫자를 감소
sql_query(" update $write_table set wr_comment = wr_comment - 1, wr_last = '{$row['wr_last']}' where wr_id = '{$write['wr_parent']}' ");
sql_query(" update $write_table set wr_comment = wr_comment - 1, wr_last = '$row[wr_last]' where wr_id = '{$write['wr_parent']}' ");
// 코멘트 숫자 감소
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment - 1 where bo_table = '$bo_table' ");
+4 -4
View File
@@ -43,8 +43,8 @@ switch ($w) {
include_once(G5_PATH.'/head.sub.php');
//if ($board['bo_include_head'] && is_include_path_check($board['bo_content_head'])) { @include ($board['bo_include_head']); }
//if ($board['bo_content_head']) { echo html_purifier(stripslashes($board['bo_content_head'])); }
//if ($board['bo_include_head']) { @include ($board['bo_include_head']); }
//if ($board['bo_content_head']) { echo stripslashes($board['bo_content_head']); }
/* 비밀글의 제목을 가져옴 지운아빠 2013-01-29 */
$sql = " select wr_subject from {$write_table}
@@ -57,8 +57,8 @@ $g5['title'] = get_text($row['wr_subject']);
include_once($member_skin_path.'/password.skin.php');
//if ($board['bo_content_tail']) { echo html_purifier(stripslashes($board['bo_content_tail'])); }
//if ($board['bo_include_tail'] && is_include_path_check($board['bo_content_tail'])) { @include ($board['bo_include_tail']); }
//if ($board['bo_content_tail']) { echo stripslashes($board['bo_content_tail']); }
//if ($board['bo_include_tail']) { @include ($board['bo_include_tail']); }
include_once(G5_PATH.'/tail.sub.php');
?>
-3
View File
@@ -1,9 +1,6 @@
<?php
include_once('./_common.php');
// 봇의 메일 링크 크롤링을 방지합니다.
if(function_exists('check_mail_bot')){ check_mail_bot($_SERVER['REMOTE_ADDR']); }
// 오류시 공히 Error 라고 처리하는 것은 회원정보가 있는지? 비밀번호가 틀린지? 를 알아보려는 해킹에 대비한것
$mb_no = trim($_GET['mb_no']);
+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;
+2 -7
View File
@@ -4,13 +4,8 @@ include_once('./_common.php');
$g5['title'] = '이미지 크게보기';
include_once(G5_PATH.'/head.sub.php');
$filename = preg_replace('/[^A-Za-z0-9 _ .\-\/]/', '', $_GET['fn']);
$extension = pathinfo($filename, PATHINFO_EXTENSION);
if ( ! preg_match('/(jpg|jpeg|png|gif|bmp)$/i', $extension) ){
alert_close('이미지 확장자가 아닙니다.');
}
$filename = $_GET['fn'];
$bo_table = $_GET['bo_table'];
if(strpos($filename, 'data/editor')) {
$editor_file = strstr($filename, 'editor');
+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 -21
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['SERVER_SOFTWARE'] . $_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');
//=====================================================================================
@@ -621,7 +618,6 @@ if(!empty($extend_file) && is_array($extend_file)) {
foreach($extend_file as $file) {
include_once(G5_EXTEND_PATH.'/'.$file);
}
unset($file);
}
unset($extend_file);
+2 -2
View File
@@ -5,7 +5,7 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.3.2.3');
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 에서 사용
+20 -37
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,32 +56,32 @@ 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}
.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{;border:2px solid #556ada;background:#fff;border-radius:5px;overflow:hidden}
#hd_sch #sch_stx {padding-left:10px;height:40px;width:376px;border:0;;border-right:0;float:left;font-size:1.25em}
#hd_sch #sch_submit {height:40px;border:0;background:#fff;color:#253dbe;width:50px;float:left;cursor:pointer;font-size:18px}
#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}
#tnb a:focus, #tnb a:hover {color:#253dbe;background:#fafafa}
#tnb .tnb_admin a{color:#ff0000;}
#tnb .tnb_left{float:left}
#tnb .tnb_left a{padding:0 14px}
#tnb .tnb_left a{;padding:0 14px}
#tnb .tnb_cart{border-right:1px solid #ddd;}
#tnb .tnb_community{border-right:1px solid #ddd}
#tnb .tnb_community i{font-size:15px}
@@ -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,9 +177,9 @@ 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_link a{;display:inline-block;padding:0 8px;line-height:1.083em;font-weight:bold}
#ft_catch{margin:20px 0 10px}
#ft_copy{color:#555;font-size:0.92em}
#top_btn {position:fixed;bottom:20px;right:20px;width:50px;height:50px;line-height:46px;border:2px solid #333;color:#333;text-align:center;font-size:15px;z-index:90;background:rgba(255,255,255,0.5)}
@@ -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}
+13 -13
View File
@@ -39,12 +39,12 @@ 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);
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4);
-webkit-box-shadow:0 0 5px rgba(55,55,5,0.4));
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4));
box-shadow: 0 0 5px rgba(55,55,5,0.4);}
#gnb a {display:block;color:#efefef}
@@ -68,8 +68,8 @@ box-shadow: 0 0 5px rgba(55,55,5,0.4);}
#user_btn {position:absolute;top:10px;right:10px;padding:0 10px;height:30px;width:30px;border:0;;color:#fff;font-size:16px;background:none;letter-spacing:-0.1em}
#user_menu{display:none;position:fixed;top:0;right:0;height:100%;;overflow-y:auto;width:320px;z-index:9999;background:#fff;text-align:center;
-webkit-box-shadow:0 0 5px rgba(55,55,5,0.4);
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4);
-webkit-box-shadow:0 0 5px rgba(55,55,5,0.4));
-moz-box-shadow:0 0 5px rgba(55,55,5,0.4));
box-shadow: 0 0 5px rgba(55,55,5,0.4);}
#user_close {display:block;margin:0;height:50px;width:100%;border:0;background:url(../img/mobile/btn_close.png) no-repeat right 50%
#222;background-size:25px;color:#fff;text-indent:-999999999px;overflow:hidden}
@@ -102,8 +102,8 @@ box-shadow: 0 0 5px rgba(100,100,100,0.2);}
#container {position:relative;min-height:300px}
#container:after {display:block;visibility:hidden;clear:both;content:""}
#container_title {font-size:1.2em;font-weight:bold;height:50px;padding:10px;line-height:30px;background:#fff;color:#333;
-webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4);
-moz-box-shadow: 0 0 5px rgba(55,55,5,0.4);
-webkit-box-shadow: 0 0 5px rgba(55,55,5,0.4));
-moz-box-shadow: 0 0 5px rgba(55,55,5,0.4));
box-shadow: 0 0 5px rgba(55,55,5,0.4);
}
.top{position:relative}
@@ -150,8 +150,8 @@ box-shadow: 0 0 5px rgba(100,100,100,0.2);}
/* 캡챠 자동등록(입력)방지 기본 -pc */
#captcha {position:relative}
#captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;}
#captcha #captcha_img {height:40px;border:1px solid #898989;;vertical-align:top;padding:0;margin:0}
#captcha #captcha_mp3 {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;width:40px;height:40px;background:url('../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px}
#captcha #captcha_img {;height:40px;border:1px solid #898989;;vertical-align:top;padding:0;margin:0}
#captcha #captcha_mp3 {;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;width:40px;height:40px;background:url('../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px}
#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px}
#captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top}
#captcha #captcha_info {display:block;margin:3px 0 5px ;font-size:0.95em;letter-spacing:-0.1em}
@@ -185,7 +185,7 @@ button.btn02 {display:inline-block;margin:0;padding:7px;border:1px solid #3b3c3f
.btn_confirm {text-align:center} /* 서식단계 진행 */
.btn_submit {border:0;background:#ff506a;color:#fff;cursor:pointer;border-radius:3px}
.btn_submit {;border:0;background:#ff506a;color:#fff;cursor:pointer;border-radius:3px}
fieldset .btn_submit {}
a.btn_cancel {display:inline-block;background:#ddd;color:#444;text-decoration:none;vertical-align:middle}
@@ -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');
?>

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