Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad443f679c |
+1
-15
@@ -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
-91
@@ -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,70 +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;
|
||||
}
|
||||
|
||||
function check_log_folder($log_path){
|
||||
|
||||
if( is_writable($log_path) ){
|
||||
|
||||
// 아파치 서버인 경우 웹에서 해당 폴더 접근 막기
|
||||
$htaccess_file = $log_path.'/.htaccess';
|
||||
if ( !file_exists( $htaccess_file ) ) {
|
||||
if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
|
||||
fwrite( $handle, 'Order deny,allow' . "\n" );
|
||||
fwrite( $handle, 'Deny from all' . "\n" );
|
||||
fclose( $handle );
|
||||
}
|
||||
}
|
||||
|
||||
// 아파치 서버인 경우 해당 디렉토리 파일 목록 안보이게 하기
|
||||
$index_file = $log_path . '/index.php';
|
||||
if ( !file_exists( $index_file ) ) {
|
||||
if ( $handle = @fopen( $index_file, 'w' ) ) {
|
||||
fwrite( $handle, '' );
|
||||
fclose( $handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// txt 파일과 log 파일을 조회하여 30일이 지난 파일은 삭제합니다.
|
||||
$txt_files = glob($log_path.'/*.txt');
|
||||
$log_files = glob($log_path.'/*.log');
|
||||
|
||||
$del_files = array_merge($txt_files, $log_files);
|
||||
|
||||
if( $del_files && is_array($del_files) ){
|
||||
foreach ($del_files as $del_file) {
|
||||
$filetime = filemtime($del_file);
|
||||
// 30일이 지난 파일을 삭제
|
||||
if($filetime && $filetime < (G5_SERVER_TIME - 2592000)) {
|
||||
@unlink($del_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
||||
function check_admin_token()
|
||||
@@ -467,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|onerror]=.*/ius', $value)) ){
|
||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// 접근 권한 검사
|
||||
if (!$member['mb_id'])
|
||||
{
|
||||
@@ -508,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();
|
||||
@@ -549,12 +466,6 @@ if (isset($stx)) $arr_query[] = 'stx='.$stx;
|
||||
if (isset($page)) $arr_query[] = 'page='.$page;
|
||||
$qstr = implode("&", $arr_query);
|
||||
|
||||
if ( isset($_REQUEST) && $_REQUEST ){
|
||||
if( admin_referer_check(true) ){
|
||||
admin_check_xss_params($_REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자에서는 추가 스크립트는 사용하지 않는다.
|
||||
//$config['cf_add_script'] = '';
|
||||
?>
|
||||
@@ -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');
|
||||
?>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if( isset($_POST['admin_use_captcha']) ){
|
||||
set_session('ss_admin_use_captcha', true);
|
||||
}
|
||||
?>
|
||||
@@ -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
-49
@@ -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,21 +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_use_captcha = '{$board['bo_use_captcha']}',
|
||||
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'])."',
|
||||
|
||||
+10
-78
@@ -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,26 +849,10 @@ $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>
|
||||
<?php echo editor_html("bo_content_head", get_text(html_purifier($board['bo_content_head']), 0)); ?>
|
||||
<?php echo editor_html("bo_content_head", get_text($board['bo_content_head'], 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_content_head" value="1" id="chk_grp_content_head">
|
||||
@@ -881,7 +864,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_content_tail">하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_content_tail", get_text(html_purifier($board['bo_content_tail']), 0)); ?>
|
||||
<?php echo editor_html("bo_content_tail", get_text($board['bo_content_tail'], 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_content_tail" value="1" id="chk_grp_content_tail">
|
||||
@@ -893,7 +876,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_mobile_content_head">모바일 상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_mobile_content_head", get_text(html_purifier($board['bo_mobile_content_head']), 0)); ?>
|
||||
<?php echo editor_html("bo_mobile_content_head", get_text($board['bo_mobile_content_head'], 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_mobile_content_head" value="1" id="chk_grp_mobile_content_head">
|
||||
@@ -905,7 +888,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_mobile_content_tail">모바일 하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("bo_mobile_content_tail", get_text(html_purifier($board['bo_mobile_content_tail']), 0)); ?>
|
||||
<?php echo editor_html("bo_mobile_content_tail", get_text($board['bo_mobile_content_tail'], 0)); ?>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_mobile_content_tail" value="1" id="chk_grp_mobile_content_tail">
|
||||
@@ -914,11 +897,10 @@ $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>
|
||||
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo html_purifier($board['bo_insert_content']); ?></textarea>
|
||||
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?php echo $board['bo_insert_content'] ?></textarea>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_insert_content" value="1" id="chk_grp_insert_content">
|
||||
@@ -1242,7 +1224,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<label for="bo_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="bo_<?php echo $i ?>_subj" id="bo_<?php echo $i ?>_subj" value="<?php echo get_text($board['bo_'.$i.'_subj']) ?>" class="frm_input">
|
||||
<label for="bo_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
||||
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input extra-value-input">
|
||||
<input type="text" name="bo_<?php echo $i ?>" value="<?php echo get_text($board['bo_'.$i]) ?>" id="bo_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_<?php echo $i ?>" value="1" id="chk_grp_<?php echo $i ?>">
|
||||
@@ -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'].'&'.$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']; ?>'&'.$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>
|
||||
|
||||
+35
-72
@@ -9,50 +9,38 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$gr_id = isset($_POST['gr_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['gr_id']) : '';
|
||||
$bo_admin = isset($_POST['bo_admin']) ? preg_replace('/[^a-z0-9_\, \|\#]/i', '', $_POST['bo_admin']) : '';
|
||||
|
||||
if (!$gr_id) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||
if (!$_POST['gr_id']) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||
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;
|
||||
@@ -72,17 +60,12 @@ $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 = '{$gr_id}',
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_subject = '{$_POST['bo_subject']}',
|
||||
bo_mobile_subject = '{$_POST['bo_mobile_subject']}',
|
||||
bo_device = '{$_POST['bo_device']}',
|
||||
bo_admin = '{$bo_admin}',
|
||||
bo_admin = '{$_POST['bo_admin']}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
bo_write_level = '{$_POST['bo_write_level']}',
|
||||
@@ -99,7 +82,7 @@ $sql_common = " gr_id = '{$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']}',
|
||||
@@ -127,20 +110,13 @@ $sql_common = " gr_id = '{$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']}',
|
||||
@@ -325,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}' ";
|
||||
@@ -414,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}' ";
|
||||
@@ -441,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}&{$qstr}");
|
||||
?>
|
||||
|
||||
+16
-19
@@ -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);
|
||||
@@ -29,23 +27,20 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
|
||||
}
|
||||
|
||||
$p_bo_subject = is_array($_POST['bo_subject']) ? strip_tags($_POST['bo_subject'][$k]) : '';
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set gr_id = '".sql_real_escape_string(strip_tags($_POST['gr_id'][$k]))."',
|
||||
bo_subject = '".$p_bo_subject."',
|
||||
bo_device = '".sql_real_escape_string(strip_tags($_POST['bo_device'][$k]))."',
|
||||
bo_skin = '".sql_real_escape_string(strip_tags($_POST['bo_skin'][$k]))."',
|
||||
bo_mobile_skin = '".sql_real_escape_string(strip_tags($_POST['bo_mobile_skin'][$k]))."',
|
||||
bo_read_point = '".sql_real_escape_string(strip_tags($_POST['bo_read_point'][$k]))."',
|
||||
bo_write_point = '".sql_real_escape_string(strip_tags($_POST['bo_write_point'][$k]))."',
|
||||
bo_comment_point = '".sql_real_escape_string(strip_tags($_POST['bo_comment_point'][$k]))."',
|
||||
bo_download_point = '".sql_real_escape_string(strip_tags($_POST['bo_download_point'][$k]))."',
|
||||
bo_use_search = '".sql_real_escape_string(strip_tags($_POST['bo_use_search'][$k]))."',
|
||||
bo_use_sns = '".sql_real_escape_string(strip_tags($_POST['bo_use_sns'][$k]))."',
|
||||
bo_order = '".sql_real_escape_string(strip_tags($_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);
|
||||
}
|
||||
|
||||
@@ -56,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);
|
||||
|
||||
|
||||
@@ -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 } ?>
|
||||
|
||||
@@ -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']}',
|
||||
|
||||
@@ -18,20 +18,18 @@ if(!$count)
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i];
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $_POST['group_id'][$k]);
|
||||
$gr_subject = is_array($_POST['gr_subject']) ? strip_tags($_POST['gr_subject'][$k]) : '';
|
||||
$gr_admin = is_array($_POST['gr_admin']) ? strip_tags($_POST['gr_admin'][$k]) : '';
|
||||
$gr_id = $_POST['group_id'][$k];
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
$sql = " update {$g5['group_table']}
|
||||
set gr_subject = '{$gr_subject}',
|
||||
gr_device = '".sql_real_escape_string($_POST['gr_device'][$k])."',
|
||||
gr_admin = '".sql_real_escape_string($_POST['gr_admin'][$k])."',
|
||||
gr_use_access = '".sql_real_escape_string($_POST['gr_use_access'][$k])."',
|
||||
gr_order = '".sql_real_escape_string($_POST['gr_order'][$k])."'
|
||||
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]}',
|
||||
gr_order = '{$_POST['gr_order'][$k]}'
|
||||
where gr_id = '{$gr_id}' ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$gr_admin}' ";
|
||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||
sql_query($sql);
|
||||
} else if($_POST['act_button'] == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||
|
||||
@@ -48,7 +48,7 @@ else if ($w == 'd' || $w == 'ld')
|
||||
check_admin_token();
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$gm_id = (int) $_POST['chk'][$i];
|
||||
$gm_id = $_POST['chk'][$i];
|
||||
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||
$gm = sql_fetch($sql);
|
||||
if (!$gm['gm_id']) {
|
||||
|
||||
@@ -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');
|
||||
?>
|
||||
|
||||
+28
-43
@@ -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 URI</h3>
|
||||
<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 extra-value-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 } ?>
|
||||
@@ -1419,10 +1421,6 @@ if($config['cf_cert_use']) {
|
||||
}
|
||||
|
||||
echo module_exec_check($exe, 'okname');
|
||||
|
||||
if(is_dir(G5_OKNAME_PATH.'/log') && is_writable(G5_OKNAME_PATH.'/log') && function_exists('check_log_folder') ) {
|
||||
check_log_folder(G5_OKNAME_PATH.'/log');
|
||||
}
|
||||
}
|
||||
|
||||
// kcp일 때
|
||||
@@ -1440,29 +1438,16 @@ if($config['cf_cert_use']) {
|
||||
$log_path = G5_LGXPAY_PATH.'/lgdacom/log';
|
||||
|
||||
if(!is_dir($log_path)) {
|
||||
|
||||
if( is_writable(G5_LGXPAY_PATH.'/lgdacom/') ){
|
||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||
@mkdir($log_path, G5_DIR_PERMISSION);
|
||||
@chmod($log_path, G5_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
if(!is_dir($log_path)){
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '', G5_LGXPAY_PATH).'/lgdacom 폴더 안에 log 폴더를 생성하신 후 쓰기권한을 부여해 주십시오.\n> mkdir log\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
} else {
|
||||
if(!is_writable($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '', G5_LGXPAY_PATH).'/lgdacom 폴더 안에 log 폴더를 생성하신 후 쓰기권한을 부여해 주십시오.\n> mkdir log\n> chmod 707 log");'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '',$log_path).' 폴더에 쓰기권한을 부여해 주십시오.\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_dir($log_path) && is_writable($log_path)) {
|
||||
if( function_exists('check_log_folder') ){
|
||||
check_log_folder($log_path);
|
||||
}
|
||||
} else if (is_dir($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '',$log_path).' 폴더에 쓰기권한을 부여해 주십시오.\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,16 +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']);
|
||||
|
||||
$check_keys = array('cf_lg_mid', 'cf_lg_mert_key', 'cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret');
|
||||
|
||||
foreach( $check_keys as $key ){
|
||||
if ( isset($_POST[$key]) && $_POST[$key] ){
|
||||
$_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_title = '{$_POST['cf_title']}',
|
||||
cf_admin = '{$_POST['cf_admin']}',
|
||||
|
||||
+7
-82
@@ -35,7 +35,6 @@ if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) {
|
||||
|
||||
$html_title = "내용";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
$readonly = '';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
@@ -50,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');
|
||||
@@ -87,11 +84,11 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td><?php echo editor_html('co_content', get_text(html_purifier($co['co_content']), 0)); ?></td>
|
||||
<td><?php echo editor_html('co_content', get_text($co['co_content'], 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일 내용</th>
|
||||
<td><?php echo editor_html('co_mobile_content', get_text(html_purifier($co['co_mobile_content']), 0)); ?></td>
|
||||
<td><?php echo editor_html('co_mobile_content', get_text($co['co_mobile_content'], 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
@@ -105,18 +102,16 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<?php echo get_mobile_skin_select('content', 'co_mobile_skin', 'co_mobile_skin', $co['co_mobile_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
||||
<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>
|
||||
-->
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
@@ -131,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>
|
||||
@@ -206,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 = "";
|
||||
@@ -274,11 +204,6 @@ function frmcontentform_check(f)
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if( captcha_chk ) {
|
||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
+15
-39
@@ -12,29 +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));
|
||||
$co_tag_filter_use = isset($_POST['co_tag_filter_use']) ? (int) $_POST['co_tag_filter_use'] : 1;
|
||||
|
||||
// 관리자가 자동등록방지를 사용해야 할 경우
|
||||
if (($co_row['co_include_head'] !== $co_include_head || $co_row['co_include_tail'] !== $co_include_tail) && function_exists('get_admin_captcha_by') && get_admin_captcha_by()){
|
||||
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);
|
||||
|
||||
@@ -44,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/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
@@ -83,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로 등록된 내용이 있습니다.");
|
||||
|
||||
@@ -108,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
-39
@@ -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);
|
||||
@@ -403,9 +401,6 @@ tfoot th {}
|
||||
#anc_bo_extra label {display:inline-block;width:100px}
|
||||
#anc_bo_extra input {margin-right:10px}
|
||||
|
||||
/* 환경설정 및 게시판 여분필드 값 input style 로빈아빠님 제안 */
|
||||
#anc_bo_extra input.extra-value-input, #anc_cf_extra input.extra-value-input{width:calc(100% - 370px);}
|
||||
|
||||
/* 접속자집계 목록 */
|
||||
.tbl_visit_list td {text-align:center}
|
||||
.visit_bar {position:relative}
|
||||
@@ -688,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;}
|
||||
@@ -761,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
@@ -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}
|
||||
|
||||
@@ -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');
|
||||
?>
|
||||
+2
-5
@@ -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);
|
||||
|
||||
@@ -54,11 +51,11 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">질문</th>
|
||||
<td><?php echo editor_html('fa_subject', get_text(html_purifier($fa['fa_subject']), 0)); ?></td>
|
||||
<td><?php echo editor_html('fa_subject', get_text($fa['fa_subject'], 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">답변</th>
|
||||
<td><?php echo editor_html('fa_content', get_text(html_purifier($fa['fa_content']), 0)); ?></td>
|
||||
<td><?php echo editor_html('fa_content', get_text($fa['fa_content'], 0)); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -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
@@ -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("삭제", "");
|
||||
|
||||
@@ -21,7 +21,6 @@ if ($w == "u")
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
$fm = array();
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
@@ -117,25 +116,25 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<tr>
|
||||
<th scope="row">상단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_head_html', get_text(html_purifier($fm['fm_head_html']), 0)); ?>
|
||||
<?php echo editor_html('fm_head_html', get_text($fm['fm_head_html'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">하단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_tail_html', get_text(html_purifier($fm['fm_tail_html']), 0)); ?>
|
||||
<?php echo editor_html('fm_tail_html', get_text($fm['fm_tail_html'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일상단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_mobile_head_html', get_text(html_purifier($fm['fm_mobile_head_html']), 0)); ?>
|
||||
<?php echo editor_html('fm_mobile_head_html', get_text($fm['fm_mobile_head_html'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일하단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_mobile_tail_html', get_text(html_purifier($fm['fm_mobile_tail_html']), 0)); ?>
|
||||
<?php echo editor_html('fm_mobile_tail_html', get_text($fm['fm_mobile_tail_html'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -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 |
@@ -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
-3
@@ -10,8 +10,6 @@ $html_title = '회원메일';
|
||||
if ($w == 'u') {
|
||||
$html_title .= '수정';
|
||||
$readonly = ' readonly';
|
||||
|
||||
$ma_id = (int) $ma_id;
|
||||
|
||||
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$ma = sql_fetch($sql);
|
||||
@@ -46,7 +44,7 @@ include_once('./admin.head.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td><?php echo editor_html("ma_content", get_text(html_purifier($ma['ma_content']), 0)); ?></td>
|
||||
<td><?php echo editor_html("ma_content", get_text($ma['ma_content'], 0)); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -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">
|
||||
|
||||
+5
-7
@@ -9,13 +9,11 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$ma_id = isset($_POST['ma_id']) ? (int) $_POST['ma_id'] : 0;
|
||||
$ma_subject = isset($_POST['ma_subject']) ? strip_tags($_POST['ma_subject']) : '';
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert {$g5['mail_table']}
|
||||
set ma_subject = '{$ma_subject}',
|
||||
set ma_id = '{$_POST['ma_id']}',
|
||||
ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
@@ -24,16 +22,16 @@ if ($w == '')
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " update {$g5['mail_table']}
|
||||
set ma_subject = '{$ma_subject}',
|
||||
set ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||
where ma_id = '{$ma_id}' ";
|
||||
where ma_id = '{$_POST['ma_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == 'd')
|
||||
{
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
+2
-23
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+37
-108
@@ -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();
|
||||
@@ -33,14 +32,9 @@ if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||
$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
|
||||
$mb_zip2 = substr($_POST['mb_zip'], 3);
|
||||
|
||||
$mb_email = isset($_POST['mb_email']) ? get_email_address(trim($_POST['mb_email'])) : '';
|
||||
$mb_nick = isset($_POST['mb_nick']) ? trim(strip_tags($_POST['mb_nick'])) : '';
|
||||
|
||||
if ($msg = valid_mb_nick($mb_nick)) alert($msg, "", true, true);
|
||||
|
||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||
mb_nick = '{$mb_nick}',
|
||||
mb_email = '{$mb_email}',
|
||||
mb_nick = '{$_POST['mb_nick']}',
|
||||
mb_email = '{$_POST['mb_email']}',
|
||||
mb_homepage = '{$_POST['mb_homepage']}',
|
||||
mb_tel = '{$_POST['mb_tel']}',
|
||||
mb_hp = '{$mb_hp}',
|
||||
@@ -79,13 +73,13 @@ if ($w == '')
|
||||
alert('이미 존재하는 회원아이디입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n닉네임 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$mb_email}' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
@@ -109,17 +103,48 @@ else if ($w == 'u')
|
||||
alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$mb_nick}' and mb_id <> '$mb_id' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$mb_email}' and mb_id <> '$mb_id' ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if ($del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||
|
||||
// 아이콘 업로드
|
||||
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("/(\.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 = 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);
|
||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||
@unlink($dest_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mb_password)
|
||||
$sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' ";
|
||||
else
|
||||
@@ -140,101 +165,5 @@ else if ($w == 'u')
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
if( $w == '' || $w == 'u' ){
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
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 (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);
|
||||
|
||||
$dest_path = $mb_icon_dir.'/'.$mb_icon_img;
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-15
@@ -76,7 +76,7 @@ $colspan = 7;
|
||||
<td class="td_category<?php echo $sub_menu_class; ?>">
|
||||
<input type="hidden" name="code[]" value="<?php echo substr($row['me_code'], 0, 2) ?>">
|
||||
<label for="me_name_<?php echo $i; ?>" class="sound_only"><?php echo $sub_menu_info; ?> 메뉴<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="me_name[]" value="<?php echo get_sanitize_input($me_name); ?>" id="me_name_<?php echo $i; ?>" required class="required tbl_input full_input">
|
||||
<input type="text" name="me_name[]" value="<?php echo $me_name; ?>" id="me_name_<?php echo $i; ?>" required class="required tbl_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<label for="me_link_<?php echo $i; ?>" class="sound_only">링크<strong class="sound_only"> 필수</strong></label>
|
||||
@@ -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>
|
||||
|
||||
+11
-13
@@ -20,13 +20,11 @@ $count = count($_POST['code']);
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$_POST = array_map_deep('trim', $_POST);
|
||||
|
||||
$_POST['me_link'][$i] = is_array($_POST['me_link']) ? clean_xss_tags($_POST['me_link'][$i], 1) : '';
|
||||
|
||||
$code = is_array($_POST['code']) ? strip_tags($_POST['code'][$i]) : '';
|
||||
$me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$i]) : '';
|
||||
$me_link = (preg_match('/^javascript/i', $_POST['me_link'][$i]) || preg_match('/script:/i', $_POST['me_link'][$i])) ? G5_URL : strip_tags($_POST['me_link'][$i]);
|
||||
|
||||
$code = $_POST['code'][$i];
|
||||
$me_name = $_POST['me_name'][$i];
|
||||
$me_link = $_POST['me_link'][$i];
|
||||
|
||||
if(!$code || !$me_name || !$me_link)
|
||||
continue;
|
||||
|
||||
@@ -58,13 +56,13 @@ for ($i=0; $i<$count; $i++)
|
||||
|
||||
// 메뉴 등록
|
||||
$sql = " insert into {$g5['menu_table']}
|
||||
set me_code = '".$me_code."',
|
||||
me_name = '".$me_name."',
|
||||
me_link = '".$me_link."',
|
||||
me_target = '".sql_real_escape_string(strip_tags($_POST['me_target'][$i]))."',
|
||||
me_order = '".sql_real_escape_string(strip_tags($_POST['me_order'][$i]))."',
|
||||
me_use = '".sql_real_escape_string(strip_tags($_POST['me_use'][$i]))."',
|
||||
me_mobile_use = '".sql_real_escape_string(strip_tags($_POST['me_mobile_use'][$i]))."' ";
|
||||
set me_code = '$me_code',
|
||||
me_name = '$me_name',
|
||||
me_link = '$me_link',
|
||||
me_target = '{$_POST['me_target'][$i]}',
|
||||
me_order = '{$_POST['me_order'][$i]}',
|
||||
me_use = '{$_POST['me_use'][$i]}',
|
||||
me_mobile_use = '{$_POST['me_mobile_use'][$i]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -109,12 +109,12 @@ 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>
|
||||
<th scope="row"><label for="nw_content">내용</label></th>
|
||||
<td><?php echo editor_html('nw_content', get_text(html_purifier($nw['nw_content']), 0)); ?></td>
|
||||
<td><?php echo editor_html('nw_content', get_text($nw['nw_content'], 0)); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -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']}' ";
|
||||
|
||||
|
||||
@@ -16,11 +16,9 @@ for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$po_id = (int) $_POST['po_id'][$k];
|
||||
$str_mb_id = sql_real_escape_string($_POST['mb_id'][$k]);
|
||||
|
||||
// 포인트 내역정보
|
||||
$sql = " select * from {$g5['point_table']} where po_id = '{$po_id}' ";
|
||||
$sql = " select * from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['po_id'])
|
||||
@@ -41,19 +39,19 @@ for ($i=0; $i<$count; $i++)
|
||||
}
|
||||
|
||||
// 포인트 내역삭제
|
||||
$sql = " delete from {$g5['point_table']} where po_id = '{$po_id}' ";
|
||||
$sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// po_mb_point에 반영
|
||||
$sql = " update {$g5['point_table']}
|
||||
set po_mb_point = po_mb_point - '{$row['po_point']}'
|
||||
where mb_id = '{$str_mb_id}'
|
||||
and po_id > '{$po_id}' ";
|
||||
where mb_id = '{$_POST['mb_id'][$k]}'
|
||||
and po_id > '{$_POST['po_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 포인트 UPDATE
|
||||
$sum_point = get_point_sum($_POST['mb_id'][$k]);
|
||||
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$str_mb_id}' ";
|
||||
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 .= ' 생성';
|
||||
|
||||
@@ -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']}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+5
-72
@@ -263,50 +263,34 @@ 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>
|
||||
<?php echo editor_html("qa_content_head", get_text(html_purifier($qaconfig['qa_content_head']), 0)); ?>
|
||||
<?php echo editor_html("qa_content_head", get_text($qaconfig['qa_content_head'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content_tail">하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_content_tail", get_text(html_purifier($qaconfig['qa_content_tail']), 0)); ?>
|
||||
<?php echo editor_html("qa_content_tail", get_text($qaconfig['qa_content_tail'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_content_head">모바일 상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_mobile_content_head", get_text(html_purifier($qaconfig['qa_mobile_content_head']), 0)); ?>
|
||||
<?php echo editor_html("qa_mobile_content_head", get_text($qaconfig['qa_mobile_content_head'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_content_tail">모바일 하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_mobile_content_tail", get_text(html_purifier($qaconfig['qa_mobile_content_tail']), 0)); ?>
|
||||
<?php echo editor_html("qa_mobile_content_tail", get_text($qaconfig['qa_mobile_content_tail'], 0)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_insert_content">글쓰기 기본 내용</label></th>
|
||||
<td>
|
||||
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo html_purifier($qaconfig['qa_insert_content']); ?></textarea>
|
||||
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo $qaconfig['qa_insert_content'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<?php for ($i=1; $i<=5; $i++) { ?>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 만 허용합니다.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +36,6 @@ if( $qa_include_tail && ! is_include_path_check($qa_include_tail, 1) ){
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$_POST['qa_title'] = strip_tags($_POST['qa_title']);
|
||||
|
||||
$sql = " update {$g5['qa_config_table']}
|
||||
set qa_title = '{$_POST['qa_title']}',
|
||||
qa_category = '{$_POST['qa_category']}',
|
||||
@@ -91,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 {
|
||||
|
||||
@@ -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
@@ -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>';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ if (!strstr($_SERVER['SCRIPT_NAME'], 'install.php')) {
|
||||
}
|
||||
|
||||
$sv = isset($_REQUEST['sv']) ? get_search_string($_REQUEST['sv']) : '';
|
||||
$st = (isset($_REQUEST['st']) && $st) ? substr(get_search_string($_REQUEST['st']), 0, 12) : '';
|
||||
|
||||
if( isset($token) ){
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
|
||||
@@ -74,13 +74,10 @@ while($res = sql_fetch_array($qry))
|
||||
";
|
||||
}
|
||||
|
||||
$arr_ajax_msg = array(
|
||||
'error'=>'',
|
||||
'list_text'=>$list_text,
|
||||
'page'=>$page,
|
||||
'total_count'=>$total_count,
|
||||
'total_page'=>$total_page
|
||||
);
|
||||
|
||||
$arr_ajax_msg['error'] = "";
|
||||
$arr_ajax_msg['list_text'] = $list_text;
|
||||
$arr_ajax_msg['page'] = $page;
|
||||
$arr_ajax_msg['total_count'] = $total_count;
|
||||
$arr_ajax_msg['total_page'] = $total_page;
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
?>
|
||||
@@ -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']) ? clean_xss_tags(strip_tags(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>
|
||||
|
||||
@@ -6,8 +6,6 @@ auth_check($auth[$sub_menu], "r");
|
||||
if(!count($_POST['chk_fg_no']))
|
||||
alert('이모티콘을 이동할 그룹을 한개 이상 선택해 주십시오.', $url);
|
||||
|
||||
$fo_no_list = preg_replace('/[^a-zA-Z0-9\, ]/', '', $fo_no_list);
|
||||
|
||||
$sql = "select * from {$g5['sms5_form_table']} where fo_no in ($fo_no_list) order by fo_no desc ";
|
||||
$result = sql_query($sql);
|
||||
$save = array();
|
||||
|
||||
@@ -10,9 +10,9 @@ if ($w == 'u') // 업데이트
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$fg_no = (int) $_POST['fg_no'][$k];
|
||||
$fg_name = isset($_POST['fg_name'][$k]) ? addslashes(strip_tags($_POST['fg_name'][$k])) : '';
|
||||
$fg_member = isset($_POST['fg_member'][$k]) ? addslashes(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 = addslashes(strip_tags($fg_name));
|
||||
|
||||
$res = sql_fetch("select fg_name from {$g5['sms5_form_group_table']} where fg_name = '$fg_name'");
|
||||
if ($res)
|
||||
alert('같은 그룹명이 존재합니다.');
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'");
|
||||
|
||||
@@ -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') // 업데이트
|
||||
|
||||
@@ -11,10 +11,6 @@ $g5['title'] = "문자전송 내역 (번호별)";
|
||||
|
||||
if ($page < 1) $page = 1;
|
||||
|
||||
if( isset($st) && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
|
||||
$st = '';
|
||||
}
|
||||
|
||||
if ($st && trim($sv))
|
||||
$sql_search = " and $st like '%$sv%' ";
|
||||
else
|
||||
@@ -31,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>
|
||||
|
||||
@@ -5,17 +5,6 @@ include_once("./_common.php");
|
||||
$spage_size = 20;
|
||||
$colspan = 10;
|
||||
|
||||
$st = isset($st) ? strip_tags($st) : '';
|
||||
$ssv = isset($ssv) ? strip_tags($ssv) : '';
|
||||
|
||||
if( $st && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
|
||||
$st = '';
|
||||
}
|
||||
|
||||
if( $sst && !in_array($sst, array('mb_id', 'bk_no', 'hs_name', 'hs_hp', 'hs_datetime', 'hs_flag', 'hs_code', 'hs_memo', 'hs_log')) ){
|
||||
$sst = '';
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = "문자전송 상세내역";
|
||||
@@ -26,7 +15,7 @@ if (!is_numeric($wr_no))
|
||||
if ($spage < 1) $spage = 1;
|
||||
|
||||
if ($sst && trim($ssv))
|
||||
$sql_search = " and $sst like '%".sql_real_escape_string($ssv)."%' ";
|
||||
$sql_search = " and $sst like '%$ssv%' ";
|
||||
else
|
||||
$sql_search = "";
|
||||
|
||||
@@ -75,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>
|
||||
|
||||
@@ -135,22 +124,22 @@ function all_send()
|
||||
<tr>
|
||||
<td><?php echo $re_vnum--?></td>
|
||||
<!-- <td><input type=checkbox></td> -->
|
||||
<!-- <td><?php echo $res['wr_message']; ?></span></td>-->
|
||||
<!-- <td><?php echo $res['wr_reply']; ?></td>-->
|
||||
<!-- <td><?php echo $res[wr_message]; ?></span></td>-->
|
||||
<!-- <td><?php echo $res[wr_reply]; ?></td>-->
|
||||
<td><?php echo $res['wr_datetime']?></td>
|
||||
<td><?php echo number_format($res['wr_total'])?></td>
|
||||
<td><?php echo number_format($res['wr_success'])?></td>
|
||||
<td><?php echo number_format($res['wr_failure'])?></td>
|
||||
<td class="td_mng">
|
||||
<a href="./history_view.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res['wr_no']?>&wr_renum=<?php echo $res['wr_renum']?>" class="btn btn_03">수정</a>
|
||||
<!-- <a href="./history_del.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res['wr_no']?>&wr_renum=<?php echo $res['wr_renum']?>">삭제</a> -->
|
||||
<!-- <a href="./history_del.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res[wr_no]?>&wr_renum=<?php echo $res[wr_renum]?>">삭제</a> -->
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if( $write['wr_memo'] ){
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,9 +31,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
|
||||
<form name="fboardmoveall" method="post" action="./number_move_update.php" onsubmit="return fboardmoveall_submit(this);">
|
||||
<input type="hidden" name="sw" value="<?php echo $sw ?>">
|
||||
<input type="hidden" name="bk_no_list" value="<?php echo get_sanitize_input($bk_no_list); ?>">
|
||||
<input type="hidden" name="act" value="<?php echo get_sanitize_input($act); ?>">
|
||||
<input type="hidden" name="url" value="<?php echo clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])); ?>">
|
||||
<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 $_SERVER['HTTP_REFERER'] ?>">
|
||||
<div class=" new_win_con">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
|
||||
@@ -12,9 +12,6 @@ $is_hp_exist = false;
|
||||
|
||||
$bk_hp = get_hp($bk_hp);
|
||||
|
||||
$bk_memo = strip_tags($bk_memo);
|
||||
$bk_name = strip_tags($bk_name);
|
||||
|
||||
if ($w=='u') // 업데이트
|
||||
{
|
||||
if (!$bg_no) $bg_no = 0;
|
||||
@@ -49,7 +46,7 @@ if ($w=='u') // 업데이트
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_receipt = bg_receipt - 1, bg_reject = bg_reject + 1 where bg_no='$bg_no'");
|
||||
}
|
||||
|
||||
sql_query("update {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='".addslashes($bk_name)."', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."' where bk_no='$bk_no'");
|
||||
sql_query("update {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$bk_name', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."' where bk_no='$bk_no'");
|
||||
if ($res['mb_id']){ //만약에 mb_id가 있다면...
|
||||
// 휴대폰번호 중복체크
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$res['mb_id']}' and mb_hp = '{$bk_hp}' ";
|
||||
|
||||
@@ -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>
|
||||
@@ -121,7 +121,7 @@ include_once(G5_ADMIN_PATH."/admin.head.php");
|
||||
<tr>
|
||||
<th scope="row"><label for="bk_memo">메모</label></th>
|
||||
<td>
|
||||
<textarea name="bk_memo" id="bk_memo"><?php echo html_purifier($write['bk_memo']); ?></textarea>
|
||||
<textarea name="bk_memo" id="bk_memo"><?php echo $write['bk_memo']?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -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;
|
||||
|
||||
@@ -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('그룹명을 입력해주세요');
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ auth_check($auth[$sub_menu], "r");
|
||||
if(!count($_POST['chk_bg_no']))
|
||||
alert('번호를 '.$act.'할 그룹을 한개 이상 선택해 주십시오.', $url);
|
||||
|
||||
$bk_no_list = preg_replace('/[^a-zA-Z0-9\, ]/', '', $bk_no_list);
|
||||
|
||||
$sql = "select * from {$g5['sms5_book_table']} where bk_no in ($bk_no_list) order by bk_no desc ";
|
||||
$result = sql_query($sql);
|
||||
$save = array();
|
||||
|
||||
@@ -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">
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ $result = sql_query($sql);
|
||||
}
|
||||
|
||||
$title = str_replace(array('<', '>', '&'), array("<", ">", "&"), $referer);
|
||||
$link = '<a href="'.get_text($row['vi_referer']).'" target="_blank">';
|
||||
$link = '<a href="'.$row['vi_referer'].'" target="_blank">';
|
||||
$link = str_replace('&', "&", $link);
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -92,7 +92,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
|
||||
}
|
||||
|
||||
$title = str_replace(array("<", ">"), array("<", ">"), $referer);
|
||||
$link = '<a href="'.get_text($row['vi_referer']).'" target="_blank" title="'.$title.'">';
|
||||
$link = '<a href="'.$row['vi_referer'].'" target="_blank" title="'.$title.'">';
|
||||
}
|
||||
|
||||
if ($is_admin == 'super')
|
||||
@@ -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&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
@@ -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');
|
||||
?>
|
||||
+7
-11
@@ -28,17 +28,15 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
// 파일만 가능합니다.
|
||||
// 공백이 없어야 합니다.
|
||||
|
||||
$msg = isset($msg) ? strip_tags($msg) : '';
|
||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||
|
||||
$url = clean_xss_tags($url, 1);
|
||||
if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER'], 1);
|
||||
$url = clean_xss_tags($url);
|
||||
if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||
|
||||
$url = preg_replace("/[\<\>\'\"\\\'\\\"\(\)]/", "", $url);
|
||||
$url = preg_replace('/\r\n|\r|\n|[^\x20-\x7e]/','', $url);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url, $msg);
|
||||
check_url_host($url);
|
||||
|
||||
if($error) {
|
||||
$header2 = "다음 항목에 오류가 있습니다.";
|
||||
@@ -48,10 +46,12 @@ 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('&', '&', $url); ?>");
|
||||
<?php } else { ?>
|
||||
//alert('history.back();');
|
||||
history.back();
|
||||
<?php } ?>
|
||||
</script>
|
||||
@@ -66,17 +66,13 @@ history.back();
|
||||
<form method="post" action="<?php echo $url ?>">
|
||||
<?php
|
||||
foreach($_POST as $key => $value) {
|
||||
|
||||
$key = clean_xss_tags($key);
|
||||
$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,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
@@ -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&bo_table='.$bo_table;
|
||||
|
||||
include_once(G5_BBS_PATH.'/board_head.php');
|
||||
|
||||
+2
-2
@@ -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
@@ -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 { //파일경로가 올바르지 않으면 기본파일을 가져옴
|
||||
|
||||
+5
-11
@@ -2,15 +2,9 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$pattern1 = "/[\<\>\'\"\\\'\\\"\(\)]/";
|
||||
$pattern2 = "/\r\n|\r|\n|[^\x20-\x7e]/";
|
||||
|
||||
$url1 = preg_replace($pattern1, "", clean_xss_tags($url1, 1));
|
||||
$url1 = preg_replace($pattern2, "", $url1);
|
||||
$url2 = preg_replace($pattern1, "", clean_xss_tags($url2, 1));
|
||||
$url2 = preg_replace($pattern2, "", $url2);
|
||||
$url3 = preg_replace($pattern1, "", clean_xss_tags($url3, 1));
|
||||
$url3 = preg_replace($pattern2, "", $url3);
|
||||
$url1 = clean_xss_tags($url1);
|
||||
$url2 = clean_xss_tags($url2);
|
||||
$url3 = clean_xss_tags($url3);
|
||||
|
||||
// url 체크
|
||||
check_url_host($url1);
|
||||
@@ -31,12 +25,12 @@ if (confirm(conf)) {
|
||||
<article id="confirm_check">
|
||||
<header>
|
||||
<hgroup>
|
||||
<h1><?php echo get_text(strip_tags($header)); ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h1><?php echo $header; ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||
<h2>아래 내용을 확인해 주세요.</h2>
|
||||
</hgroup>
|
||||
</header>
|
||||
<p>
|
||||
<?php echo get_text(strip_tags($msg)); ?>
|
||||
<?php echo $msg; ?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo $url1; ?>">확인</a>
|
||||
|
||||
@@ -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">관리자 모드에서 게시판관리->내용 관리를 먼저 확인해 주세요.');
|
||||
@@ -26,8 +24,6 @@ if ($co['co_include_head'] && is_include_path_check($co['co_include_head']))
|
||||
else
|
||||
include_once('./_head.php');
|
||||
|
||||
// KVE-2019-0828 취약점 내용
|
||||
$co['co_tag_filter_use'] = 1;
|
||||
$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']);
|
||||
|
||||
// $src 를 $dst 로 변환
|
||||
|
||||
+2
-2
@@ -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
@@ -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'])) {
|
||||
|
||||
@@ -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']))
|
||||
@@ -53,8 +51,8 @@ $comment_reply = substr($write['wr_comment_reply'], 0, $len);
|
||||
$sql = " select count(*) as cnt from {$write_table}
|
||||
where wr_comment_reply like '{$comment_reply}%'
|
||||
and wr_id <> '{$comment_id}'
|
||||
and wr_parent = '{$write['wr_parent']}'
|
||||
and wr_comment = '{$write['wr_comment']}'
|
||||
and wr_parent = '{$write[wr_parent]}'
|
||||
and wr_comment = '{$write[wr_comment]}'
|
||||
and wr_is_comment = 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'] && !$is_admin)
|
||||
|
||||
+5
-30
@@ -25,12 +25,8 @@ if (!$file['bf_file'])
|
||||
// JavaScript 불가일 때
|
||||
if($js != 'on' && $board['bo_download_point'] < 0) {
|
||||
$msg = $file['bf_source'].' 파일을 다운로드 하시면 포인트가 차감('.number_format($board['bo_download_point']).'점)됩니다.\\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\\n그래도 다운로드 하시겠습니까?';
|
||||
$url1 = G5_BBS_URL.'/download.php?'.clean_query_string($_SERVER['QUERY_STRING'], false).'&js=on';
|
||||
$url1 = G5_BBS_URL.'/download.php?'.clean_query_string($_SERVER['QUERY_STRING']).'&js=on';
|
||||
$url2 = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||
|
||||
if( $url2 && stripos($url2, $_SERVER['REQUEST_URI']) !== false ){
|
||||
$url2 = G5_BBS_URL.'/board.php?'.clean_query_string($_SERVER['QUERY_STRING'], false);
|
||||
}
|
||||
|
||||
//$url1 = 확인link, $url2=취소link
|
||||
// 특정주소로 이동시키려면 $url3 이용
|
||||
@@ -71,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'] = '다운로드 > '.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');
|
||||
|
||||
@@ -106,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,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' ");
|
||||
|
||||
|
||||
@@ -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
@@ -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('#&page=[0-9]*#', '#&spt=[0-9\-]*#');
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ if( function_exists('social_check_login_before') ){
|
||||
$g5['title'] = '로그인';
|
||||
include_once('./_head.sub.php');
|
||||
|
||||
$url = strip_tags($_GET['url']);
|
||||
$url = $_GET['url'];
|
||||
|
||||
// url 체크
|
||||
check_url_host($url);
|
||||
|
||||
+3
-3
@@ -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
@@ -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
@@ -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
@@ -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'].'&kind='.$kind.'&page='.$page;
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&token='.$token.'&kind='.$kind;
|
||||
$list[$i]['view_href'] = './memo_view.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&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."&page=");
|
||||
|
||||
include_once($member_skin_path.'/memo.skin.php');
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
|
||||
@@ -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}' ";
|
||||
|
||||
@@ -60,7 +60,7 @@ for ($i=0; $i<count($member_list['id']); $i++) {
|
||||
$recv_mb_nick = get_text($member_list['nick'][$i]);
|
||||
|
||||
// 쪽지 INSERT
|
||||
$sql = " insert into {$g5['memo_table']} ( me_id, me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime ) values ( '$me_id', '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00' ) ";
|
||||
$sql = " insert into {$g5['memo_table']} ( me_id, me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo ) values ( '$me_id', '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}' ) ";
|
||||
sql_query($sql);
|
||||
|
||||
// 실시간 쪽지 알림 기능
|
||||
|
||||
+4
-12
@@ -51,28 +51,20 @@ else
|
||||
|
||||
|
||||
// 다음 쪽지
|
||||
$sql = " select * from {$g5['memo_table']}
|
||||
$sql = " select * from {$g5[memo_table]}
|
||||
where me_id < '{$me_id}'
|
||||
and me_{$kind}_mb_id = '{$member['mb_id']}'
|
||||
and me_{$kind}_mb_id = '{$member[mb_id]}'
|
||||
order by me_id desc
|
||||
limit 1 ";
|
||||
$next = sql_fetch($sql);
|
||||
if ($next['me_id'])
|
||||
$next_link = './memo_view.php?kind='.$kind.'&me_id='.$next['me_id'];
|
||||
if ($next[me_id])
|
||||
$next_link = './memo_view.php?kind='.$kind.'&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 ? '&page='.(int) $page : '';
|
||||
$next_link .= $next_link ? '&page='.(int) $page : '';
|
||||
$list_link .= '&page='.(int) $page;
|
||||
}
|
||||
|
||||
include_once($member_skin_path.'/memo_view.skin.php');
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
|
||||
+4
-19
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$act = isset($act) ? strip_tags($act) : '';
|
||||
|
||||
// 게시판 관리자 이상 복사, 이동 가능
|
||||
if ($is_admin != 'board' && $is_admin != 'group' && $is_admin != 'super')
|
||||
alert_close('게시판 관리자 이상 접근이 가능합니다.');
|
||||
@@ -30,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; // 원본 디렉토리
|
||||
@@ -127,7 +118,7 @@ while ($row = sql_fetch_array($result))
|
||||
// 제이프로님 코드제안 적용
|
||||
$copy_file_name = ($bo_table !== $move_bo_table) ? $row3['bf_file'] : $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file'];
|
||||
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$copy_file_name);
|
||||
@chmod($dst_dir.'/'.$copy_file_name, G5_FILE_PERMISSION);
|
||||
@chmod($dst_dir/$row3['bf_file'], G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
@@ -198,14 +189,8 @@ if ($sw == 'move')
|
||||
{
|
||||
for ($i=0; $i<count($save); $i++)
|
||||
{
|
||||
if( isset($save[$i]['bf_file']) && $save[$i]['bf_file'] ){
|
||||
for ($k=0; $k<count($save[$i]['bf_file']); $k++) {
|
||||
@unlink($save[$i]['bf_file'][$k]);
|
||||
|
||||
// 썸네일 파일 삭제, 먼지손 님 코드 제안
|
||||
delete_board_thumbnail($bo_table, basename($save[$i]['bf_file'][$k]));
|
||||
}
|
||||
}
|
||||
for ($k=0; $k<count($save[$i]['bf_file']); $k++)
|
||||
@unlink($save[$i]['bf_file'][$k]);
|
||||
|
||||
sql_query(" delete from $write_table where wr_parent = '{$save[$i]['wr_id']}' ");
|
||||
sql_query(" delete from {$g5['board_new_table']} where bo_table = '$bo_table' and wr_id = '{$save[$i]['wr_id']}' ");
|
||||
|
||||
+3
-3
@@ -87,7 +87,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
$lf = '';
|
||||
for ($k=0; $k<count($notice_array); $k++) {
|
||||
if ((int)$write['wr_id'] != (int)$notice_array[$k])
|
||||
$bo_notice .= $lf.$notice_array[$k];
|
||||
$bo_notice .= $nl.$notice_array[$k];
|
||||
|
||||
if($bo_notice)
|
||||
$lf = ',';
|
||||
@@ -117,7 +117,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||
|
||||
// 코멘트 삭제
|
||||
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트')) {
|
||||
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제");
|
||||
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write[wr_parent]}-{$comment_id} 코멘트삭제");
|
||||
}
|
||||
|
||||
// 코멘트 삭제
|
||||
@@ -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
@@ -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');
|
||||
?>
|
||||
|
||||
@@ -11,7 +11,7 @@ if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$email = get_email_address(trim($_POST['mb_email']));
|
||||
$email = trim($_POST['mb_email']);
|
||||
|
||||
if (!$email)
|
||||
alert_close('메일주소 오류입니다.');
|
||||
@@ -21,9 +21,9 @@ $row = sql_fetch($sql);
|
||||
if ($row['cnt'] > 1)
|
||||
alert('동일한 메일주소가 2개 이상 존재합니다.\\n\\n관리자에게 문의하여 주십시오.');
|
||||
|
||||
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime, mb_leave_date from {$g5['member_table']} where mb_email = '$email' ";
|
||||
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g5['member_table']} where mb_email = '$email' ";
|
||||
$mb = sql_fetch($sql);
|
||||
if (!$mb['mb_id'] || $mb['mb_leave_date'])
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
else if (is_admin($mb['mb_id']))
|
||||
alert('관리자 아이디는 접근 불가합니다.');
|
||||
|
||||
@@ -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
@@ -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
@@ -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&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'].'&token='.$token.$qstr;
|
||||
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].$qstr;
|
||||
}
|
||||
|
||||
// 질문글이고 등록된 답변이 있다면
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ if(is_file($skin_file)) {
|
||||
|
||||
$content = '';
|
||||
if ($w == '') {
|
||||
$content = html_purifier($qaconfig['qa_insert_content']);
|
||||
$content = $qaconfig['qa_insert_content'];
|
||||
} else if($w == 'r') {
|
||||
if($is_dhtml_editor)
|
||||
$content = '<div><br><br><br>====== 이전 답변내용 =======<br></div>';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user