최신글 캐시파일 '.$
?>
\ No newline at end of file
+include_once('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/captcha_file_delete.php b/adm/captcha_file_delete.php
index 65cb56535..e3d0f4981 100644
--- a/adm/captcha_file_delete.php
+++ b/adm/captcha_file_delete.php
@@ -49,5 +49,4 @@ echo '캡챠파일 '.$cnt.'건
?>
\ No newline at end of file
+include_once('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/config_form.php b/adm/config_form.php
index 6dcf7d90d..237b83610 100644
--- a/adm/config_form.php
+++ b/adm/config_form.php
@@ -2,7 +2,7 @@
$sub_menu = "100100";
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
@@ -304,6 +304,7 @@ $pg_anchor = '
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
+$userinfo = array('payment'=>'');
if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
}
@@ -569,14 +570,14 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
경고) curl이 지원되지 않아 네이버 신디케이션을 사용할수 없습니다.'); ?>
연동키는 네이버 웹마스터도구 -> 네이버 신디케이션에서 발급할 수 있습니다.') ?>
-
+
네이버 신디케이션 제외게시판
참고로 그룹접근사용 게시판, 글읽기 권한 2 이상 게시판, 비밀글은 신디케이션 수집에서 제외됩니다.') ?>
-
+
@@ -1529,5 +1530,4 @@ if($config['cf_cert_use']) {
}
}
-include_once ('./admin.tail.php');
-?>
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/config_form_update.php b/adm/config_form_update.php
index f7e51ae24..d2564cd8a 100644
--- a/adm/config_form_update.php
+++ b/adm/config_form_update.php
@@ -4,39 +4,33 @@ include_once('./_common.php');
check_demo();
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
+$cf_title = isset($_POST['cf_title']) ? strip_tags(clean_xss_attributes($_POST['cf_title'])) : '';
+$cf_admin = isset($_POST['cf_admin']) ? clean_xss_tags($_POST['cf_admin'], 1, 1) : '';
+$posts = array();
+
$mb = get_member($cf_admin);
-if (!$mb['mb_id'])
+
+if (! (isset($mb['mb_id']) && $mb['mb_id']))
alert('최고관리자 회원아이디가 존재하지 않습니다.');
check_admin_token();
-// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
-if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
- alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
-
-if(!$_POST['cf_cert_use']) {
- $_POST['cf_cert_ipin'] = '';
- $_POST['cf_cert_hp'] = '';
-}
-
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
-$_POST['cf_title'] = strip_tags(clean_xss_attributes($_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]);
+ $posts[$key] = $_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
}
}
-$_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
+$posts['cf_icode_server_port'] = $_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
if(isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']){
@@ -56,9 +50,134 @@ if(isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']){
}
}
+$check_keys = array(
+'cf_use_email_certify' => 'int',
+'cf_use_homepage' => 'int',
+'cf_req_homepage' => 'int',
+'cf_use_tel' => 'int',
+'cf_req_tel' => 'int',
+'cf_use_hp' => 'int',
+'cf_req_hp' => 'int',
+'cf_use_addr' => 'int',
+'cf_req_addr' => 'int',
+'cf_use_signature' => 'int',
+'cf_req_signature' => 'int',
+'cf_use_profile' => 'int',
+'cf_req_profile' => 'int',
+'cf_register_level' => 'int',
+'cf_register_point' => 'int',
+'cf_icon_level' => 'int',
+'cf_use_recommend' => 'int',
+'cf_leave_day' => 'int',
+'cf_search_part' => 'int',
+'cf_email_use' => 'int',
+'cf_email_wr_super_admin' => 'int',
+'cf_email_wr_group_admin' => 'int',
+'cf_email_wr_board_admin' => 'int',
+'cf_email_wr_write' => 'int',
+'cf_email_wr_comment_all' => 'int',
+'cf_email_mb_super_admin' => 'int',
+'cf_email_mb_member' => 'int',
+'cf_email_po_super_admin' => 'int',
+'cf_prohibit_id' => 'text',
+'cf_prohibit_email' => 'text',
+'cf_new_del' => 'int',
+'cf_memo_del' => 'int',
+'cf_visit_del' => 'int',
+'cf_popular_del' => 'int',
+'cf_use_member_icon' => 'int',
+'cf_member_icon_size' => 'int',
+'cf_member_icon_width' => 'int',
+'cf_member_icon_height' => 'int',
+'cf_member_img_size' => 'int',
+'cf_member_img_width' => 'int',
+'cf_member_img_height' => 'int',
+'cf_login_minutes' => 'int',
+'cf_formmail_is_member' => 'int',
+'cf_page_rows' => 'int',
+'cf_mobile_page_rows' => 'int',
+'cf_social_login_use' => 'int',
+'cf_cert_req' => 'int',
+'cf_cert_use' => 'int',
+'cf_cert_ipin' => 'char',
+'cf_cert_hp' => 'char',
+'cf_admin_email' => 'char',
+'cf_admin_email_name' => 'char',
+'cf_add_script' => 'text',
+'cf_use_point' => 'int',
+'cf_point_term' => 'int',
+'cf_use_copy_log' => 'int',
+'cf_login_point' => 'int',
+'cf_cut_name' => 'int',
+'cf_nick_modify' => 'int',
+'cf_new_skin' => 'char',
+'cf_new_rows' => 'int',
+'cf_search_skin' => 'char',
+'cf_connect_skin' => 'char',
+'cf_faq_skin' => 'char',
+'cf_read_point' => 'int',
+'cf_write_point' => 'int',
+'cf_comment_point' => 'int',
+'cf_download_point' => 'int',
+'cf_write_pages' => 'int',
+'cf_mobile_pages' => 'int',
+'cf_link_target' => 'char',
+'cf_delay_sec' => 'int',
+'cf_filter' => 'text',
+'cf_possible_ip' => 'text',
+'cf_analytics' => 'text',
+'cf_add_meta' => 'text',
+'cf_member_skin' => 'char',
+'cf_image_extension' => 'char',
+'cf_flash_extension' => 'char',
+'cf_movie_extension' => 'char',
+'cf_visit' => 'char',
+'cf_stipulation' => 'text',
+'cf_privacy' => 'text',
+'cf_open_modify' => 'int',
+'cf_memo_send_point' => 'int',
+'cf_mobile_new_skin' => 'char',
+'cf_mobile_search_skin' => 'char',
+'cf_mobile_connect_skin' => 'char',
+'cf_mobile_faq_skin' => 'char',
+'cf_mobile_member_skin' => 'char',
+'cf_captcha_mp3' => 'char',
+'cf_cert_limit' => 'int',
+'cf_sms_use' => 'char',
+'cf_sms_type' => 'char',
+'cf_icode_id' => 'char',
+'cf_icode_pw' => 'char',
+'cf_icode_server_ip' => 'char',
+'cf_captcha' => 'char',
+'cf_syndi_token' => '',
+'cf_syndi_except' => ''
+);
+
+for($i=1;$i<=10;$i++){
+ $check_keys['cf_'.$i.'_subj'] = isset($_POST['cf_'.$i.'_subj']) ? $_POST['cf_'.$i.'_subj'] : '';
+ $check_keys['cf_'.$i] = isset($_POST['cf_'.$i]) ? $_POST['cf_'.$i] : '';
+}
+
+foreach( $check_keys as $k => $v ){
+ if( $v === 'int' ){
+ $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
+ } else {
+ $posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
+ }
+}
+
+// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
+if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
+ alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
+
+if(!$_POST['cf_cert_use']) {
+ $posts[$key] = $_POST['cf_cert_ipin'] = '';
+ $posts[$key] = $_POST['cf_cert_hp'] = '';
+}
+
$sql = " update {$g5['config_table']}
- set cf_title = '{$_POST['cf_title']}',
- cf_admin = '{$_POST['cf_admin']}',
+ set cf_title = '{$cf_title}',
+ cf_admin = '{$cf_admin}',
cf_admin_email = '{$_POST['cf_admin_email']}',
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
cf_add_script = '{$_POST['cf_add_script']}',
@@ -217,5 +336,4 @@ run_event('admin_config_form_update');
update_rewrite_rules();
-goto_url('./config_form.php', false);
-?>
\ No newline at end of file
+goto_url('./config_form.php', false);
\ No newline at end of file
diff --git a/adm/contentform.php b/adm/contentform.php
index 4a8eeb1c6..7aa1184f2 100644
--- a/adm/contentform.php
+++ b/adm/contentform.php
@@ -3,7 +3,9 @@ $sub_menu = '300600';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
-auth_check($auth[$sub_menu], "w");
+auth_check_menu($auth, $sub_menu, "w");
+
+$co_id = isset($_REQUEST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['co_id']) : '';
// 상단, 하단 파일경로 필드 추가
if(!sql_query(" select co_include_head from {$g5['content_table']} limit 1 ", false)) {
@@ -51,6 +53,13 @@ else
{
$html_title .= ' 입력';
$co = array(
+ 'co_id' => '',
+ 'co_subject' => '',
+ 'co_content' => '',
+ 'co_mobile_content' => '',
+ 'co_include_head' => '',
+ 'co_include_tail' => '',
+ 'co_tag_filter_use' => 1,
'co_html' => 2,
'co_skin' => 'basic',
'co_mobile_skin' => 'basic'
@@ -153,6 +162,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
750)
@@ -177,6 +187,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
750)
@@ -284,5 +295,4 @@ function frmcontentform_check(f)
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/contentformupdate.php b/adm/contentformupdate.php
index af8c35007..ac1be285d 100644
--- a/adm/contentformupdate.php
+++ b/adm/contentformupdate.php
@@ -6,25 +6,27 @@ if ($w == "u" || $w == "d")
check_demo();
if ($w == 'd')
- auth_check($auth[$sub_menu], "d");
+ auth_check_menu($auth, $sub_menu, "d");
else
- auth_check($auth[$sub_menu], "w");
+ auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
if ($w == "" || $w == "u")
{
- if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
+ if(isset($_POST['co_id']) && preg_match("/[^a-z0-9_]/i", $_POST['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_id = isset($_POST['co_id']) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['co_id']) : '';
$co_subject = strip_tags(clean_xss_attributes($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;
+$co_himg_del = (isset($_POST['co_himg_del']) && $_POST['co_himg_del']) ? 1 : 0;
+$co_timg_del = (isset($_POST['co_timg_del']) && $_POST['co_timg_del']) ? 1 : 0;
// 관리자가 자동등록방지를 사용해야 할 경우
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()){
@@ -145,5 +147,4 @@ if ($w == "" || $w == "u")
else
{
goto_url("./contentlist.php");
-}
-?>
+}
\ No newline at end of file
diff --git a/adm/contentlist.php b/adm/contentlist.php
index a23437423..cf4c54660 100644
--- a/adm/contentlist.php
+++ b/adm/contentlist.php
@@ -2,7 +2,7 @@
$sub_menu = '300600';
include_once('./_common.php');
-auth_check($auth[$sub_menu], "r");
+auth_check_menu($auth, $sub_menu, "r");
if( !isset($g5['content_table']) ){
die(' /data/dbconfig.php 파일에 $g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\'; 를 추가해 주세요.');
@@ -94,5 +94,4 @@ $result = sql_query($sql);
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/dbupgrade.php b/adm/dbupgrade.php
index 23ae7916b..d5d954d1f 100644
--- a/adm/dbupgrade.php
+++ b/adm/dbupgrade.php
@@ -2,7 +2,7 @@
$sub_menu = '100410';
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
$g5['title'] = 'DB 업그레이드';
include_once('./admin.head.php');
@@ -189,5 +189,4 @@ $db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '
\ No newline at end of file
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/faqform.php b/adm/faqform.php
index f5791df49..33024c77d 100644
--- a/adm/faqform.php
+++ b/adm/faqform.php
@@ -3,16 +3,18 @@ $sub_menu = '300700';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
-auth_check($auth[$sub_menu], "w");
+auth_check_menu($auth, $sub_menu, "w");
-$fm_id = (int) $fm_id;
-$fa_id = isset($fa_id) ? (int) $fa_id : 0;
+$fm_id = isset($_GET['fm_id']) ? (int) $_GET['fm_id'] : 0;
+$fa_id = isset($_GET['fa_id']) ? (int) $_GET['fa_id'] : 0;
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
$fm = sql_fetch($sql);
$html_title = 'FAQ '.$fm['fm_subject'];
+$fa = array('fa_id'=>0, 'fm_id'=>0, 'fa_subject'=>'', 'fa_content'=>'', 'fa_order'=>0);
+
if ($w == "u")
{
$html_title .= " 수정";
@@ -97,5 +99,4 @@ function frmfaqform_check(f)
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/faqformupdate.php b/adm/faqformupdate.php
index 35b8dcb30..2b54d1879 100644
--- a/adm/faqformupdate.php
+++ b/adm/faqformupdate.php
@@ -6,12 +6,18 @@ if ($w == "u" || $w == "d")
check_demo();
if ($w == 'd')
- auth_check($auth[$sub_menu], "d");
+ auth_check_menu($auth, $sub_menu, "d");
else
- auth_check($auth[$sub_menu], "w");
+ auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
+$fm_id = isset($_POST['fm_id']) ? (int) $_POST['fm_id'] : 0;
+$fa_subject = isset($_POST['fa_subject']) ? $_POST['fa_subject'] : '';
+$fa_content = isset($_POST['fa_content']) ? $_POST['fa_content'] : '';
+$fa_order = isset($_POST['fa_order']) ? (int) $_POST['fa_order'] : 0;
+$fa_id = isset($_POST['fa_id']) ? (int) $_POST['fa_id'] : 0;
+
$sql_common = " fa_subject = '$fa_subject',
fa_content = '$fa_content',
fa_order = '$fa_order' ";
@@ -41,5 +47,4 @@ else if ($w == "d")
if ($w == 'd')
goto_url("./faqlist.php?fm_id=$fm_id");
else
- goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
-?>
+ goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
\ No newline at end of file
diff --git a/adm/faqlist.php b/adm/faqlist.php
index 6f4849bb0..eccd16772 100644
--- a/adm/faqlist.php
+++ b/adm/faqlist.php
@@ -2,11 +2,11 @@
$sub_menu = '300700';
include_once('./_common.php');
-auth_check($auth[$sub_menu], "r");
+auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = 'FAQ 상세관리';
-if ($fm_subject){
- $fm_subject = clean_xss_tags(strip_tags($fm_subject));
+if (isset($_REQUEST['fm_subject'])){
+ $fm_subject = clean_xss_tags($_REQUEST['fm_subject'], 1, 1, 255);
$g5['title'] .= ' : '.$fm_subject;
}
@@ -96,5 +96,4 @@ $result = sql_query($sql);
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/faqmasterform.php b/adm/faqmasterform.php
index 4ac3f6f80..5e3410615 100644
--- a/adm/faqmasterform.php
+++ b/adm/faqmasterform.php
@@ -3,11 +3,11 @@ $sub_menu = '300700';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
-auth_check($auth[$sub_menu], "w");
+auth_check_menu($auth, $sub_menu, "w");
$html_title = 'FAQ';
-$fm_id = preg_replace('/[^0-9]/', '', $fm_id);
+$fm_id = isset($_GET['fm_id']) ? preg_replace('/[^0-9]/', '', $_GET['fm_id']) : 0;
if ($w == "u")
{
@@ -21,7 +21,7 @@ if ($w == "u")
else
{
$html_title .= ' 입력';
- $fm = array();
+ $fm = array('fm_order'=>'', 'fm_subject'=>'', 'fm_id'=>0, 'fm_head_html'=> '', 'fm_tail_html'=> '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
}
$g5['title'] = $html_title.' 관리';
@@ -72,6 +72,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
750)
@@ -96,6 +97,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
750)
@@ -162,5 +164,4 @@ function frmfaqmasterform_check(f)
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/faqmasterformupdate.php b/adm/faqmasterformupdate.php
index 609e805b3..bdc3c39a1 100644
--- a/adm/faqmasterformupdate.php
+++ b/adm/faqmasterformupdate.php
@@ -5,21 +5,29 @@ include_once('./_common.php');
if ($w == "u" || $w == "d")
check_demo();
-if ($W == 'd')
- auth_check($auth[$sub_menu], "d");
+if ($w == 'd')
+ auth_check_menu($auth, $sub_menu, "d");
else
- auth_check($auth[$sub_menu], "w");
+ auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
@mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
+$fm_id = isset($_POST['fm_id']) ? (int) $_POST['fm_id'] : 0;
+$fm_himg_del = isset($_POST['fm_himg_del']) ? (int) $_POST['fm_himg_del'] : 0;
+$fm_timg_del = isset($_POST['fm_timg_del']) ? (int) $_POST['fm_timg_del'] : 0;
+$fm_subject = isset($_POST['fm_subject']) ? strip_tags(clean_xss_attributes($_POST['fm_subject'])) : '';
+$fm_head_html = isset($_POST['fm_head_html']) ? $_POST['fm_head_html'] : '';
+$fm_tail_html = isset($_POST['fm_tail_html']) ? $_POST['fm_tail_html'] : '';
+$fm_mobile_head_html = isset($_POST['fm_mobile_head_html']) ? $_POST['fm_mobile_head_html'] : '';
+$fm_mobile_tail_html = isset($_POST['fm_mobile_tail_html']) ? $_POST['fm_mobile_tail_html'] : '';
+$fm_order = isset($_POST['fm_order']) ? (int) $_POST['fm_order'] : 0;
+
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(clean_xss_attributes($fm_subject));
-
$sql_common = " set fm_subject = '$fm_subject',
fm_head_html = '$fm_head_html',
fm_tail_html = '$fm_tail_html',
@@ -72,5 +80,4 @@ if ($w == "" || $w == "u")
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
}
else
- goto_url("./faqmasterlist.php");
-?>
+ goto_url("./faqmasterlist.php");
\ No newline at end of file
diff --git a/adm/faqmasterlist.php b/adm/faqmasterlist.php
index 50dfc11e0..d5abfbb9d 100644
--- a/adm/faqmasterlist.php
+++ b/adm/faqmasterlist.php
@@ -2,7 +2,7 @@
$sub_menu = '300700';
include_once('./_common.php');
-auth_check($auth[$sub_menu], "r");
+auth_check_menu($auth, $sub_menu, "r");
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
@@ -124,5 +124,4 @@ $result = sql_query($sql);
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/index.php b/adm/index.php
index 4a2020238..f6b954dc4 100644
--- a/adm/index.php
+++ b/adm/index.php
@@ -138,7 +138,7 @@ $sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['g
if ($gr_id)
$sql_common .= " and b.gr_id = '$gr_id' ";
-if ($view) {
+if (isset($view) && $view) {
if ($view == 'w')
$sql_common .= " and a.wr_id = a.wr_parent ";
else if ($view == 'c')
@@ -314,5 +314,4 @@ $colspan = 7;
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/mail_delete.php b/adm/mail_delete.php
index a190802eb..a351bd879 100644
--- a/adm/mail_delete.php
+++ b/adm/mail_delete.php
@@ -4,21 +4,20 @@ include_once('./_common.php');
check_demo();
-auth_check($auth[$sub_menu], 'd');
+auth_check_menu($auth, $sub_menu, 'd');
check_admin_token();
-$count = count($_POST['chk']);
+$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
if(!$count)
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
for($i=0; $i<$count; $i++) {
- $ma_id = $_POST['chk'][$i];
+ $ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
sql_query($sql);
}
-goto_url('./mail_list.php');
-?>
\ No newline at end of file
+goto_url('./mail_list.php');
\ No newline at end of file
diff --git a/adm/mail_form.php b/adm/mail_form.php
index 6ee6fb95b..a7671fb3b 100644
--- a/adm/mail_form.php
+++ b/adm/mail_form.php
@@ -3,15 +3,16 @@ $sub_menu = "200300";
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
$html_title = '회원메일';
+$ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
+$ma = array('ma_id'=>0, 'ma_subject'=>'', 'ma_content'=>'');
+
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);
@@ -82,5 +83,4 @@ document.fmailform.ma_subject.focus();
+include_once('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/mail_list.php b/adm/mail_list.php
index 587a8ddb0..9e2368ff4 100644
--- a/adm/mail_list.php
+++ b/adm/mail_list.php
@@ -2,7 +2,7 @@
$sub_menu = '200300';
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
$sql_common = " from {$g5['mail_table']} ";
@@ -101,5 +101,4 @@ $(function() {
\ No newline at end of file
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/mail_preview.php b/adm/mail_preview.php
index 16abd479d..a13020e5c 100644
--- a/adm/mail_preview.php
+++ b/adm/mail_preview.php
@@ -3,7 +3,9 @@ $sub_menu = "200300";
include_once('./_common.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
+
+$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
$se = sql_fetch("select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ");
diff --git a/adm/mail_select_form.php b/adm/mail_select_form.php
index a8115297d..076e3a60f 100644
--- a/adm/mail_select_form.php
+++ b/adm/mail_select_form.php
@@ -5,7 +5,9 @@ include_once('./_common.php');
if (!$config['cf_email_use'])
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
+
+$ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
$ma = sql_fetch($sql);
@@ -26,8 +28,8 @@ $last_option = explode('||', $ma['ma_last_option']);
for ($i=0; $i
@@ -55,15 +61,15 @@ include_once('./admin.head.php');
> 전체
> 구간
- 에서
- 까지
+ 에서
+ 까지
E-mail
-
+
@@ -118,5 +124,4 @@ include_once('./admin.head.php');
+include_once('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/mail_select_list.php b/adm/mail_select_list.php
index b78b55375..e08032e79 100644
--- a/adm/mail_select_list.php
+++ b/adm/mail_select_list.php
@@ -2,7 +2,7 @@
$sub_menu = "200300";
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
$ma_last_option = "";
@@ -117,5 +117,4 @@ include_once('./admin.head.php');
+include_once('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/mail_select_update.php b/adm/mail_select_update.php
index 219e58573..4a7ba5be8 100644
--- a/adm/mail_select_update.php
+++ b/adm/mail_select_update.php
@@ -2,7 +2,7 @@
$sub_menu = "200300";
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
$html_title = '회원메일 발송';
@@ -26,14 +26,12 @@ echo "";
-
-
+
\ No newline at end of file
diff --git a/adm/mail_test.php b/adm/mail_test.php
index bc321f545..3731a3f2a 100644
--- a/adm/mail_test.php
+++ b/adm/mail_test.php
@@ -7,7 +7,7 @@ if (!$config['cf_email_use'])
include_once(G5_LIB_PATH.'/mailer.lib.php');
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
check_demo();
@@ -17,6 +17,7 @@ $name = get_text($member['mb_name']);
$nick = $member['mb_nick'];
$mb_id = $member['mb_id'];
$email = $member['mb_email'];
+$ma_id = isset($_REQUEST['ma_id']) ? (int) $_REQUEST['ma_id'] : 0;
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
$ma = sql_fetch($sql);
@@ -35,5 +36,4 @@ $content = $content . '더 이상 정보 수신을 원치 않으시면 [
+alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
\ No newline at end of file
diff --git a/adm/mail_update.php b/adm/mail_update.php
index 04d04ac92..844aa4435 100644
--- a/adm/mail_update.php
+++ b/adm/mail_update.php
@@ -5,18 +5,19 @@ include_once('./_common.php');
if ($w == 'u' || $w == 'd')
check_demo();
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($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(clean_xss_attributes($_POST['ma_subject'])) : '';
+$ma_content = isset($_POST['ma_content']) ? $_POST['ma_content'] : '';
if ($w == '')
{
$sql = " insert {$g5['mail_table']}
set ma_subject = '{$ma_subject}',
- ma_content = '{$_POST['ma_content']}',
+ ma_content = '{$ma_content}',
ma_time = '".G5_TIME_YMDHIS."',
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($sql);
@@ -25,7 +26,7 @@ else if ($w == 'u')
{
$sql = " update {$g5['mail_table']}
set ma_subject = '{$ma_subject}',
- ma_content = '{$_POST['ma_content']}',
+ ma_content = '{$ma_content}',
ma_time = '".G5_TIME_YMDHIS."',
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
where ma_id = '{$ma_id}' ";
@@ -37,5 +38,4 @@ else if ($w == 'd')
sql_query($sql);
}
-goto_url('./mail_list.php');
-?>
+goto_url('./mail_list.php');
\ No newline at end of file
diff --git a/adm/member_delete.php b/adm/member_delete.php
index e536f6c57..6f675f347 100644
--- a/adm/member_delete.php
+++ b/adm/member_delete.php
@@ -4,11 +4,11 @@ include_once("./_common.php");
check_demo();
-auth_check($auth[$sub_menu], "d");
+auth_check_menu($auth, $sub_menu, "d");
-$mb = get_member($_POST['mb_id']);
+$mb = isset($_POST['mb_id']) ? get_member($_POST['mb_id']) : array();
-if (!$mb['mb_id'])
+if (! (isset($mb['mb_id']) && $mb['mb_id']))
alert("회원자료가 존재하지 않습니다.");
else if ($member['mb_id'] == $mb['mb_id'])
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
@@ -25,5 +25,4 @@ member_delete($mb['mb_id']);
if ($url)
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
else
- goto_url("./member_list.php?$qstr");
-?>
+ goto_url("./member_list.php?$qstr");
\ No newline at end of file
diff --git a/adm/member_form.php b/adm/member_form.php
index a5b249d35..470fccced 100644
--- a/adm/member_form.php
+++ b/adm/member_form.php
@@ -2,7 +2,46 @@
$sub_menu = "200100";
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
+
+$mb = array(
+'mb_certify' => null,
+'mb_adult' => null,
+'mb_sms' => null,
+'mb_intercept_date' => null,
+'mb_id' => null,
+'mb_name' => null,
+'mb_nick' => null,
+'mb_point' => null,
+'mb_email' => null,
+'mb_homepage' => null,
+'mb_hp' => null,
+'mb_tel' => null,
+'mb_zip1' => null,
+'mb_zip2' => null,
+'mb_addr1' => null,
+'mb_addr2' => null,
+'mb_addr3' => null,
+'mb_addr_jibeon' => null,
+'mb_signature' => null,
+'mb_profile' => null,
+'mb_memo' => null,
+'mb_leave_date' => null,
+'mb_1' => null,
+'mb_2' => null,
+'mb_3' => null,
+'mb_4' => null,
+'mb_5' => null,
+'mb_6' => null,
+'mb_7' => null,
+'mb_8' => null,
+'mb_9' => null,
+'mb_10' => null,
+);
+
+$sound_only = '';
+$required_mb_id_class = '';
+$required_mb_password = '';
if ($w == '')
{
@@ -26,7 +65,6 @@ else if ($w == 'u')
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
$required_mb_id = 'readonly';
- $required_mb_password = '';
$html_title = '수정';
$mb['mb_name'] = get_text($mb['mb_name']);
@@ -481,5 +519,4 @@ function fmember_submit(f)
+include_once('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/member_form_update.php b/adm/member_form_update.php
index a0c87eb9d..163fbcb74 100644
--- a/adm/member_form_update.php
+++ b/adm/member_form_update.php
@@ -7,11 +7,14 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
if ($w == 'u')
check_demo();
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
check_admin_token();
-$mb_id = trim($_POST['mb_id']);
+$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
+$mb_certify_case = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
+$mb_certify = isset($_POST['mb_certify']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify']) : '';
+$mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
// 휴대폰번호 체크
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
@@ -22,72 +25,101 @@ if($mb_hp) {
}
// 인증정보처리
-if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
- $mb_certify = $_POST['mb_certify_case'];
- $mb_adult = $_POST['mb_adult'];
+if($mb_certify_case && $mb_certify) {
+ $mb_certify = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
+ $mb_adult = isset($_POST['mb_adult']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_adult']) : '';
} else {
$mb_certify = '';
$mb_adult = 0;
}
-$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
-$mb_zip2 = substr($_POST['mb_zip'], 3);
+$mb_zip1 = substr($mb_zip, 0, 3);
+$mb_zip2 = substr($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']}',
+$posts = array();
+$check_keys = array(
+'mb_name',
+'mb_homepage',
+'mb_tel',
+'mb_addr1',
+'mb_addr2',
+'mb_addr3',
+'mb_addr_jibeon',
+'mb_signature',
+'mb_leave_date',
+'mb_intercept_date',
+'mb_mailling',
+'mb_sms',
+'mb_open',
+'mb_profile',
+'mb_level'
+);
+
+for($i=1;$i<=10;$i++){
+ $check_keys[] = 'mb_'.$i;
+}
+
+foreach( $check_keys as $key ){
+ $posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : '';
+}
+
+$mb_memo = isset($_POST['mb_memo']) ? $_POST['mb_memo'] : '';
+
+$sql_common = " mb_name = '{$posts['mb_name']}',
mb_nick = '{$mb_nick}',
mb_email = '{$mb_email}',
- mb_homepage = '{$_POST['mb_homepage']}',
- mb_tel = '{$_POST['mb_tel']}',
+ mb_homepage = '{$posts['mb_homepage']}',
+ mb_tel = '{$posts['mb_tel']}',
mb_hp = '{$mb_hp}',
mb_certify = '{$mb_certify}',
mb_adult = '{$mb_adult}',
mb_zip1 = '$mb_zip1',
mb_zip2 = '$mb_zip2',
- mb_addr1 = '{$_POST['mb_addr1']}',
- mb_addr2 = '{$_POST['mb_addr2']}',
- mb_addr3 = '{$_POST['mb_addr3']}',
- mb_addr_jibeon = '{$_POST['mb_addr_jibeon']}',
- mb_signature = '{$_POST['mb_signature']}',
- mb_leave_date = '{$_POST['mb_leave_date']}',
- mb_intercept_date='{$_POST['mb_intercept_date']}',
- mb_memo = '{$_POST['mb_memo']}',
- mb_mailling = '{$_POST['mb_mailling']}',
- mb_sms = '{$_POST['mb_sms']}',
- mb_open = '{$_POST['mb_open']}',
- mb_profile = '{$_POST['mb_profile']}',
- mb_level = '{$_POST['mb_level']}',
- mb_1 = '{$_POST['mb_1']}',
- mb_2 = '{$_POST['mb_2']}',
- mb_3 = '{$_POST['mb_3']}',
- mb_4 = '{$_POST['mb_4']}',
- mb_5 = '{$_POST['mb_5']}',
- mb_6 = '{$_POST['mb_6']}',
- mb_7 = '{$_POST['mb_7']}',
- mb_8 = '{$_POST['mb_8']}',
- mb_9 = '{$_POST['mb_9']}',
- mb_10 = '{$_POST['mb_10']}' ";
+ mb_addr1 = '{$posts['mb_addr1']}',
+ mb_addr2 = '{$posts['mb_addr2']}',
+ mb_addr3 = '{$posts['mb_addr3']}',
+ mb_addr_jibeon = '{$posts['mb_addr_jibeon']}',
+ mb_signature = '{$posts['mb_signature']}',
+ mb_leave_date = '{$posts['mb_leave_date']}',
+ mb_intercept_date='{$posts['mb_intercept_date']}',
+ mb_memo = '{$mb_memo}',
+ mb_mailling = '{$posts['mb_mailling']}',
+ mb_sms = '{$posts['mb_sms']}',
+ mb_open = '{$posts['mb_open']}',
+ mb_profile = '{$posts['mb_profile']}',
+ mb_level = '{$posts['mb_level']}',
+ mb_1 = '{$posts['mb_1']}',
+ mb_2 = '{$posts['mb_2']}',
+ mb_3 = '{$posts['mb_3']}',
+ mb_4 = '{$posts['mb_4']}',
+ mb_5 = '{$posts['mb_5']}',
+ mb_6 = '{$posts['mb_6']}',
+ mb_7 = '{$posts['mb_7']}',
+ mb_8 = '{$posts['mb_8']}',
+ mb_9 = '{$posts['mb_9']}',
+ mb_10 = '{$posts['mb_10']}' ";
if ($w == '')
{
$mb = get_member($mb_id);
- if ($mb['mb_id'])
+ if (isset($mb['mb_id']) && $mb['mb_id'])
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}' ";
$row = sql_fetch($sql);
- if ($row['mb_id'])
+ if (isset($row['mb_id']) && $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}' ";
$row = sql_fetch($sql);
- if ($row['mb_id'])
+ if (isset($row['mb_id']) && $row['mb_id'])
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".get_encrypt_string($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} ");
@@ -95,7 +127,7 @@ if ($w == '')
else if ($w == 'u')
{
$mb = get_member($mb_id);
- if (!$mb['mb_id'])
+ if (! (isset($mb['mb_id']) && $mb['mb_id']))
alert('존재하지 않는 회원자료입니다.');
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
@@ -105,19 +137,19 @@ else if ($w == 'u')
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
}
- if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
+ if ($mb_id === $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
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' ";
$row = sql_fetch($sql);
- if ($row['mb_id'])
+ if (isset($row['mb_id']) && $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' ";
$row = sql_fetch($sql);
- if ($row['mb_id'])
+ if (isset($row['mb_id']) && $row['mb_id'])
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
if ($mb_password)
@@ -125,7 +157,7 @@ else if ($w == 'u')
else
$sql_password = "";
- if ($passive_certify)
+ if (isset($passive_certify) && $passive_certify)
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
else
$sql_certify = "";
@@ -146,7 +178,7 @@ if( $w == '' || $w == 'u' ){
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
// 회원 아이콘 삭제
- if ($del_mb_icon)
+ if (isset($del_mb_icon) && $del_mb_icon)
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_icon_img);
$image_regex = "/(\.(gif|jpe?g|png))$/i";
@@ -196,7 +228,7 @@ if( $w == '' || $w == 'u' ){
$mb_img_dir .= substr($mb_id,0,2);
// 회원 이미지 삭제
- if ($del_mb_img)
+ if (isset($del_mb_img) && $del_mb_img)
@unlink($mb_img_dir.'/'.$mb_icon_img);
// 아이콘 업로드
@@ -238,5 +270,4 @@ if( $w == '' || $w == 'u' ){
run_event('admin_member_form_update', $w, $mb_id);
-goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
-?>
\ No newline at end of file
+goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
\ No newline at end of file
diff --git a/adm/member_list.php b/adm/member_list.php
index e8bcf4611..248b62be8 100644
--- a/adm/member_list.php
+++ b/adm/member_list.php
@@ -2,7 +2,7 @@
$sub_menu = "200100";
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
$sql_common = " from {$g5['member_table']} ";
@@ -78,17 +78,17 @@ $colspan = 16;
검색대상
- >회원아이디
- >닉네임
- >이름
- >권한
- >E-MAIL
- >전화번호
- >휴대폰번호
- >포인트
- >가입일시
- >IP
- >추천인
+ >회원아이디
+ >닉네임
+ >이름
+ >권한
+ >E-MAIL
+ >전화번호
+ >휴대폰번호
+ >포인트
+ >가입일시
+ >IP
+ >추천인
검색어 필수
@@ -330,5 +330,4 @@ function fmemberlist_submit(f)
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/member_list_delete.php b/adm/member_list_delete.php
index f416a6011..eeab528f7 100644
--- a/adm/member_list_delete.php
+++ b/adm/member_list_delete.php
@@ -4,7 +4,7 @@ include_once("./_common.php");
check_demo();
-auth_check($auth[$sub_menu], "d");
+auth_check_menu($auth, $sub_menu, "d");
check_admin_token();
@@ -33,5 +33,4 @@ for ($i=0; $i alert('$msg'); ";
-goto_url("./member_list.php?$qstr");
-?>
+goto_url("./member_list.php?$qstr");
\ No newline at end of file
diff --git a/adm/member_list_update.php b/adm/member_list_update.php
index 7e250d4af..82a2db6c3 100644
--- a/adm/member_list_update.php
+++ b/adm/member_list_update.php
@@ -4,46 +4,54 @@ include_once('./_common.php');
check_demo();
-if (!count($_POST['chk'])) {
+if (! (isset($_POST['chk']) && is_array($_POST['chk']))) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
-auth_check($auth[$sub_menu], 'w');
+auth_check_menu($auth, $sub_menu, 'w');
check_admin_token();
$mb_datas = array();
+$msg = '';
if ($_POST['act_button'] == "선택수정") {
for ($i=0; $i= $member['mb_level']) {
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
} else if ($member['mb_id'] == $mb['mb_id']) {
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
} else {
- if($_POST['mb_certify'][$k])
- $mb_adult = (int) $_POST['mb_adult'][$k];
+ if($post_mb_certify)
+ $mb_adult = isset($_POST['mb_adult'][$k]) ? (int) $_POST['mb_adult'][$k] : 0;
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."',
+ mb_intercept_date = '".sql_real_escape_string($post_mb_intercept_date)."',
+ mb_mailling = '".$post_mb_mailling."',
+ mb_sms = '".$post_mb_sms."',
+ mb_open = '".$post_mb_open."',
+ mb_certify = '".sql_real_escape_string($post_mb_certify)."',
mb_adult = '{$mb_adult}'
- where mb_id = '".sql_real_escape_string($_POST['mb_id'][$k])."' ";
+ where mb_id = '".sql_real_escape_string($mb['mb_id'])."' ";
sql_query($sql);
}
}
@@ -53,7 +61,7 @@ if ($_POST['act_button'] == "선택수정") {
for ($i=0; $i
+goto_url('./member_list.php?'.$qstr);
\ No newline at end of file
diff --git a/adm/menu_form.php b/adm/menu_form.php
index bb421af1c..59bbd4415 100644
--- a/adm/menu_form.php
+++ b/adm/menu_form.php
@@ -8,7 +8,7 @@ if ($is_admin != 'super')
$g5['title'] = '메뉴 추가';
include_once(G5_PATH.'/head.sub.php');
-$code = isset($code) ? preg_replace('/[^0-9a-zA-Z]/', '', strip_tags($code)) : '';
+$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
// 코드
if($new == 'new' || !$code) {
@@ -174,10 +174,10 @@ function add_menu_list(name, link, code)
else
$menu_last = $menulist.find("tr.menu_list:last");
- if($menu_last.size() > 0) {
+ if($menu_last.length > 0) {
$menu_last.after(list);
} else {
- if($menulist.find("#empty_menu_list").size() > 0)
+ if($menulist.find("#empty_menu_list").length > 0)
$menulist.find("#empty_menu_list").remove();
$menulist.find("table tbody").append(list);
@@ -193,5 +193,4 @@ function add_menu_list(name, link, code)
\ No newline at end of file
+include_once(G5_PATH.'/tail.sub.php');
\ No newline at end of file
diff --git a/adm/menu_form_search.php b/adm/menu_form_search.php
index 497ee3ee1..bb26e26f4 100644
--- a/adm/menu_form_search.php
+++ b/adm/menu_form_search.php
@@ -4,6 +4,8 @@ include_once('./_common.php');
if ($is_admin != 'super')
die('최고관리자만 접근 가능합니다.');
+$type = isset($_REQUEST['type']) ? preg_replace('/[^0-9a-z_]/i', '', $_REQUEST['type']) : '';
+
switch($type) {
case 'group':
$sql = " select gr_id as id, gr_subject as subject
@@ -24,9 +26,7 @@ switch($type) {
$sql = '';
break;
}
-?>
-추가
창닫기
-
\ No newline at end of file
+
@@ -143,14 +144,14 @@ $(function() {
return false;
var $tr = $(this).closest("tr");
- if($tr.find("td.sub_menu_class").size() > 0) {
+ if($tr.find("td.sub_menu_class").length > 0) {
$tr.remove();
} else {
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
$("tr.menu_group_"+code).remove();
}
- if($("#menulist tr.menu_list").size() < 1) {
+ if($("#menulist tr.menu_list").length < 1) {
var list = "\n";
$("#menulist table tbody").append(list);
} else {
@@ -215,5 +216,4 @@ function fmenulist_submit(f)
+include_once ('./admin.tail.php');
\ No newline at end of file
diff --git a/adm/menu_list_update.php b/adm/menu_list_update.php
index 528a5a42b..9a3ecd499 100644
--- a/adm/menu_list_update.php
+++ b/adm/menu_list_update.php
@@ -70,5 +70,4 @@ for ($i=0; $i<$count; $i++)
run_event('admin_menu_list_update');
-goto_url('./menu_list.php');
-?>
+goto_url('./menu_list.php');
\ No newline at end of file
diff --git a/adm/newwinform.php b/adm/newwinform.php
index 371aea64a..7dc842c5d 100644
--- a/adm/newwinform.php
+++ b/adm/newwinform.php
@@ -3,9 +3,15 @@ $sub_menu = '100310';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);
-auth_check($auth[$sub_menu], "w");
+auth_check_menu($auth, $sub_menu, "w");
-$nw_id = preg_replace('/[^0-9]/', '', $nw_id);
+$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
+$nw = array(
+'nw_begin_time'=>'',
+'nw_end_time'=>'',
+'nw_subject'=>'',
+'nw_content'=>'',
+);
$html_title = "팝업레이어";
if ($w == "u")
@@ -13,7 +19,7 @@ if ($w == "u")
$html_title .= " 수정";
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
$nw = sql_fetch($sql);
- if (!$nw['nw_id']) alert("등록된 자료가 없습니다.");
+ if (! (isset($nw['nw_id']) && $nw['nw_id'])) alert("등록된 자료가 없습니다.");
}
else
{
@@ -146,5 +152,4 @@ function frmnewwin_check(f)
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/newwinformupdate.php b/adm/newwinformupdate.php
index f03701166..e046fe0fa 100644
--- a/adm/newwinformupdate.php
+++ b/adm/newwinformupdate.php
@@ -2,29 +2,55 @@
$sub_menu = '100310';
include_once('./_common.php');
+$nw_id = isset($_POST['nw_id']) ? preg_replace('/[^0-9]/', '', $_POST['nw_id']) : 0;
+
if ($w == "u" || $w == "d")
check_demo();
if ($w == 'd')
- auth_check($auth[$sub_menu], "d");
+ auth_check_menu($auth, $sub_menu, "d");
else
- auth_check($auth[$sub_menu], "w");
+ auth_check_menu($auth, $sub_menu, "w");
check_admin_token();
$nw_subject = isset($_POST['nw_subject']) ? strip_tags(clean_xss_attributes($_POST['nw_subject'])) : '';
+$posts = array();
-$sql_common = " nw_device = '{$_POST['nw_device']}',
- nw_begin_time = '{$_POST['nw_begin_time']}',
- nw_end_time = '{$_POST['nw_end_time']}',
- nw_disable_hours = '{$_POST['nw_disable_hours']}',
- nw_left = '{$_POST['nw_left']}',
- nw_top = '{$_POST['nw_top']}',
- nw_height = '{$_POST['nw_height']}',
- nw_width = '{$_POST['nw_width']}',
+$check_keys = array(
+'nw_device'=>'str',
+'nw_begin_time'=>'str',
+'nw_end_time'=>'str',
+'nw_disable_hours'=>'int',
+'nw_left'=>'int',
+'nw_top'=>'int',
+'nw_height'=>'int',
+'nw_width'=>'int',
+'nw_content'=>'text',
+'nw_content_html'=>'text',
+);
+
+foreach($check_keys as $key=>$val){
+ if($val === 'int'){
+ $posts[$key] = isset($_POST[$key]) ? (int) $_POST[$key] : 0;
+ } else if ($val === 'str') {
+ $posts[$key] = isset($_POST[$key]) ? clean_xss_tags($_POST[$key], 1, 1) : 0;
+ } else {
+ $posts[$key] = isset($_POST[$key]) ? trim($_POST[$key]) : 0;
+ }
+}
+
+$sql_common = " nw_device = '{$posts['nw_device']}',
+ nw_begin_time = '{$posts['nw_begin_time']}',
+ nw_end_time = '{$posts['nw_end_time']}',
+ nw_disable_hours = '{$posts['nw_disable_hours']}',
+ nw_left = '{$posts['nw_left']}',
+ nw_top = '{$posts['nw_top']}',
+ nw_height = '{$posts['nw_height']}',
+ nw_width = '{$posts['nw_width']}',
nw_subject = '{$nw_subject}',
- nw_content = '{$_POST['nw_content']}',
- nw_content_html = '{$_POST['nw_content_html']}' ";
+ nw_content = '{$posts['nw_content']}',
+ nw_content_html = '{$posts['nw_content_html']}' ";
if($w == "")
{
@@ -51,5 +77,4 @@ if ($w == "d")
else
{
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
-}
-?>
+}
\ No newline at end of file
diff --git a/adm/newwinlist.php b/adm/newwinlist.php
index 093892050..ba44e063e 100644
--- a/adm/newwinlist.php
+++ b/adm/newwinlist.php
@@ -2,7 +2,7 @@
$sub_menu = '100310';
include_once('./_common.php');
-auth_check($auth[$sub_menu], "r");
+auth_check_menu($auth, $sub_menu, "r");
if( !isset($g5['new_win_table']) ){
die('
/data/dbconfig.php 파일에
$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\'; 를 추가해 주세요.');
@@ -114,5 +114,4 @@ $result = sql_query($sql);
+include_once (G5_ADMIN_PATH.'/admin.tail.php');
\ No newline at end of file
diff --git a/adm/phpinfo.php b/adm/phpinfo.php
index a7f01a149..6bb61c4be 100644
--- a/adm/phpinfo.php
+++ b/adm/phpinfo.php
@@ -4,7 +4,6 @@ include_once('./_common.php');
check_demo();
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
-phpinfo();
-?>
\ No newline at end of file
+phpinfo();
\ No newline at end of file
diff --git a/adm/point_list.php b/adm/point_list.php
index 7e25aec50..a8c348ad4 100644
--- a/adm/point_list.php
+++ b/adm/point_list.php
@@ -2,7 +2,7 @@
$sub_menu = "200200";
include_once('./_common.php');
-auth_check($auth[$sub_menu], 'r');
+auth_check_menu($auth, $sub_menu, 'r');
$sql_common = " from {$g5['point_table']} ";
@@ -84,8 +84,8 @@ else