Checked PSR-1 / PHP 8.1 Undefiend Varialbe, type error
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check_menu($auth, $sub_menu, "r");
|
||||||
|
|
||||||
@ -10,9 +10,9 @@ if (isset($_REQUEST['fm_subject'])){
|
|||||||
$g5['title'] .= ' : ' . $fm_subject;
|
$g5['title'] .= ' : ' . $fm_subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fm_id = (int) $fm_id;
|
$fm_id = isset($fm_id) ? (int) $fm_id : 0;
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
require_once G5_ADMIN_PATH . '/admin.head.php';
|
||||||
|
|
||||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
$fm = sql_fetch($sql);
|
$fm = sql_fetch($sql);
|
||||||
@ -57,8 +57,7 @@ $result = sql_query($sql);
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
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']}' ");
|
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
|
||||||
$cnt = $row1['cnt'];
|
$cnt = $row1['cnt'];
|
||||||
|
|
||||||
@ -81,7 +80,6 @@ $result = sql_query($sql);
|
|||||||
<a href="./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $fa_subject; ?> </span>삭제</a>
|
<a href="./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $fa_subject; ?> </span>삭제</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,4 +94,4 @@ $result = sql_query($sql);
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
||||||
|
|||||||
@ -1,25 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
include_once(G5_EDITOR_LIB);
|
require_once G5_EDITOR_LIB;
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check_menu($auth, $sub_menu, "w");
|
||||||
|
|
||||||
$html_title = 'FAQ';
|
$html_title = 'FAQ';
|
||||||
|
|
||||||
$fm_id = isset($_GET['fm_id']) ? preg_replace('/[^0-9]/', '', $_GET['fm_id']) : 0;
|
$fm_id = isset($_GET['fm_id']) ? strval(preg_replace('/[^0-9]/', '', $_GET['fm_id'])) : 0;
|
||||||
|
|
||||||
if ($w == "u")
|
if ($w == "u") {
|
||||||
{
|
|
||||||
$html_title .= ' 수정';
|
$html_title .= ' 수정';
|
||||||
$readonly = ' readonly';
|
$readonly = ' readonly';
|
||||||
|
|
||||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
$fm = sql_fetch($sql);
|
$fm = sql_fetch($sql);
|
||||||
if (!$fm['fm_id']) alert('등록된 자료가 없습니다.');
|
if (!$fm['fm_id']) {
|
||||||
|
alert('등록된 자료가 없습니다.');
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
$html_title .= ' 입력';
|
$html_title .= ' 입력';
|
||||||
$fm = array('fm_order' => '', 'fm_subject' => '', 'fm_id' => 0, 'fm_head_html' => '', 'fm_tail_html' => '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
|
$fm = array('fm_order' => '', 'fm_subject' => '', 'fm_id' => 0, 'fm_head_html' => '', 'fm_tail_html' => '', 'fm_mobile_head_html' => '', 'fm_mobile_tail_html' => '');
|
||||||
}
|
}
|
||||||
@ -28,12 +27,15 @@ $g5['title'] = $html_title.' 관리';
|
|||||||
|
|
||||||
// 모바일 상하단 내용 필드추가
|
// 모바일 상하단 내용 필드추가
|
||||||
if (!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
|
if (!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
|
||||||
sql_query(" ALTER TABLE `{$g5['faq_master_table']}`
|
sql_query(
|
||||||
|
" ALTER TABLE `{$g5['faq_master_table']}`
|
||||||
ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`,
|
ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`,
|
||||||
ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ", true);
|
ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ",
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
require_once G5_ADMIN_PATH . '/admin.head.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="frmfaqmasterform" action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
|
<form name="frmfaqmasterform" action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
|
||||||
@ -73,13 +75,16 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
<?php
|
<?php
|
||||||
$himg = G5_DATA_PATH . '/faq/' . $fm['fm_id'] . '_h';
|
$himg = G5_DATA_PATH . '/faq/' . $fm['fm_id'] . '_h';
|
||||||
$himg_str = '';
|
$himg_str = '';
|
||||||
|
$width = 0;
|
||||||
if (file_exists($himg)) {
|
if (file_exists($himg)) {
|
||||||
$size = @getimagesize($himg);
|
$size = @getimagesize($himg);
|
||||||
if($size[0] && $size[0] > 750)
|
if ($size) {
|
||||||
|
if ($size[0] && $size[0] > 750) {
|
||||||
$width = 750;
|
$width = 750;
|
||||||
else
|
} else {
|
||||||
$width = $size[0];
|
$width = $size[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
echo '<input type="checkbox" name="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
|
echo '<input type="checkbox" name="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
|
||||||
$himg_str = '<img src="' . G5_DATA_URL . '/faq/' . $fm['fm_id'] . '_h" width="' . $width . '" alt="">';
|
$himg_str = '<img src="' . G5_DATA_URL . '/faq/' . $fm['fm_id'] . '_h" width="' . $width . '" alt="">';
|
||||||
}
|
}
|
||||||
@ -98,12 +103,16 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
<?php
|
<?php
|
||||||
$timg = G5_DATA_PATH . '/faq/' . $fm['fm_id'] . '_t';
|
$timg = G5_DATA_PATH . '/faq/' . $fm['fm_id'] . '_t';
|
||||||
$timg_str = '';
|
$timg_str = '';
|
||||||
|
$width = 0;
|
||||||
if (file_exists($timg)) {
|
if (file_exists($timg)) {
|
||||||
$size = @getimagesize($timg);
|
$size = @getimagesize($timg);
|
||||||
if($size[0] && $size[0] > 750)
|
if ($size) {
|
||||||
|
if ($size[0] && $size[0] > 750) {
|
||||||
$width = 750;
|
$width = 750;
|
||||||
else
|
} else {
|
||||||
$width = $size[0];
|
$width = $size[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo '<input type="checkbox" name="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
|
echo '<input type="checkbox" name="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
|
||||||
$timg_str = '<img src="' . G5_DATA_URL . '/faq/' . $fm['fm_id'] . '_t" width="' . $width . '" alt="">';
|
$timg_str = '<img src="' . G5_DATA_URL . '/faq/' . $fm['fm_id'] . '_t" width="' . $width . '" alt="">';
|
||||||
@ -152,8 +161,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function frmfaqmasterform_check(f)
|
function frmfaqmasterform_check(f) {
|
||||||
{
|
|
||||||
<?php echo get_editor_js('fm_head_html'); ?>
|
<?php echo get_editor_js('fm_head_html'); ?>
|
||||||
<?php echo get_editor_js('fm_tail_html'); ?>
|
<?php echo get_editor_js('fm_tail_html'); ?>
|
||||||
<?php echo get_editor_js('fm_mobile_head_html'); ?>
|
<?php echo get_editor_js('fm_mobile_head_html'); ?>
|
||||||
@ -164,4 +172,4 @@ function frmfaqmasterform_check(f)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
||||||
|
|||||||
@ -1,14 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if ($w == "u" || $w == "d")
|
if ($w == "u" || $w == "d") {
|
||||||
check_demo();
|
check_demo();
|
||||||
|
}
|
||||||
|
|
||||||
if ($w == 'd')
|
if ($w == 'd') {
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
auth_check_menu($auth, $sub_menu, "d");
|
||||||
else
|
} else {
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check_menu($auth, $sub_menu, "w");
|
||||||
|
}
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
@ -25,8 +27,12 @@ $fm_mobile_head_html = isset($_POST['fm_mobile_head_html']) ? $_POST['fm_mobile_
|
|||||||
$fm_mobile_tail_html = isset($_POST['fm_mobile_tail_html']) ? $_POST['fm_mobile_tail_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;
|
$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_himg_del) {
|
||||||
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_h");
|
||||||
|
}
|
||||||
|
if ($fm_timg_del) {
|
||||||
|
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_t");
|
||||||
|
}
|
||||||
|
|
||||||
$sql_common = " set fm_subject = '$fm_subject',
|
$sql_common = " set fm_subject = '$fm_subject',
|
||||||
fm_head_html = '$fm_head_html',
|
fm_head_html = '$fm_head_html',
|
||||||
@ -35,8 +41,7 @@ $sql_common = " set fm_subject = '$fm_subject',
|
|||||||
fm_mobile_tail_html = '$fm_mobile_tail_html',
|
fm_mobile_tail_html = '$fm_mobile_tail_html',
|
||||||
fm_order = '$fm_order' ";
|
fm_order = '$fm_order' ";
|
||||||
|
|
||||||
if ($w == "")
|
if ($w == "") {
|
||||||
{
|
|
||||||
$sql = " alter table {$g5['faq_master_table']} auto_increment=1 ";
|
$sql = " alter table {$g5['faq_master_table']} auto_increment=1 ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
@ -44,14 +49,10 @@ if ($w == "")
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
$fm_id = sql_insert_id();
|
$fm_id = sql_insert_id();
|
||||||
}
|
} elseif ($w == "u") {
|
||||||
else if ($w == "u")
|
|
||||||
{
|
|
||||||
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
|
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
} elseif ($w == "d") {
|
||||||
else if ($w == "d")
|
|
||||||
{
|
|
||||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_h");
|
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_h");
|
||||||
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_t");
|
@unlink(G5_DATA_PATH . "/faq/{$fm_id}_t");
|
||||||
|
|
||||||
@ -64,8 +65,7 @@ else if ($w == "d")
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($w == "" || $w == "u")
|
if ($w == "" || $w == "u") {
|
||||||
{
|
|
||||||
if ($_FILES['fm_himg']['name']) {
|
if ($_FILES['fm_himg']['name']) {
|
||||||
$dest_path = G5_DATA_PATH . "/faq/" . $fm_id . "_h";
|
$dest_path = G5_DATA_PATH . "/faq/" . $fm_id . "_h";
|
||||||
@move_uploaded_file($_FILES['fm_himg']['tmp_name'], $dest_path);
|
@move_uploaded_file($_FILES['fm_himg']['tmp_name'], $dest_path);
|
||||||
@ -78,6 +78,6 @@ if ($w == "" || $w == "u")
|
|||||||
}
|
}
|
||||||
|
|
||||||
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
|
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
goto_url("./faqmasterlist.php");
|
goto_url("./faqmasterlist.php");
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '300700';
|
$sub_menu = '300700';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check_menu($auth, $sub_menu, "r");
|
||||||
|
|
||||||
@ -14,14 +14,17 @@ if(!sql_query(" DESCRIBE {$g5['faq_master_table']} ", false)) {
|
|||||||
if (sql_query(" DESCRIBE {$g5['g5_shop_faq_master_table']} ", false)) {
|
if (sql_query(" DESCRIBE {$g5['g5_shop_faq_master_table']} ", false)) {
|
||||||
sql_query(" ALTER TABLE {$g5['g5_shop_faq_master_table']} RENAME TO `{$g5['faq_master_table']}` ;", false);
|
sql_query(" ALTER TABLE {$g5['g5_shop_faq_master_table']} RENAME TO `{$g5['faq_master_table']}` ;", false);
|
||||||
} else {
|
} else {
|
||||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
|
$query_cp = sql_query(
|
||||||
|
" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
|
||||||
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
|
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`fm_subject` varchar(255) NOT NULL DEFAULT '',
|
`fm_subject` varchar(255) NOT NULL DEFAULT '',
|
||||||
`fm_head_html` text NOT NULL,
|
`fm_head_html` text NOT NULL,
|
||||||
`fm_tail_html` text NOT NULL,
|
`fm_tail_html` text NOT NULL,
|
||||||
`fm_order` int(11) NOT NULL DEFAULT '0',
|
`fm_order` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`fm_id`)
|
PRIMARY KEY (`fm_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// FAQ Master
|
// FAQ Master
|
||||||
sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
|
sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
|
||||||
@ -32,7 +35,8 @@ if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
|
|||||||
if (sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
|
if (sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
|
||||||
sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
|
sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
|
||||||
} else {
|
} else {
|
||||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
|
$query_cp = sql_query(
|
||||||
|
" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
|
||||||
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
|
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`fm_id` int(11) NOT NULL DEFAULT '0',
|
`fm_id` int(11) NOT NULL DEFAULT '0',
|
||||||
`fa_subject` text NOT NULL,
|
`fa_subject` text NOT NULL,
|
||||||
@ -40,12 +44,14 @@ if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
|
|||||||
`fa_order` int(11) NOT NULL DEFAULT '0',
|
`fa_order` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`fa_id`),
|
PRIMARY KEY (`fa_id`),
|
||||||
KEY `fm_id` (`fm_id`)
|
KEY `fm_id` (`fm_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = 'FAQ관리';
|
$g5['title'] = 'FAQ관리';
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
require_once G5_ADMIN_PATH . '/admin.head.php';
|
||||||
|
|
||||||
$sql_common = " from {$g5['faq_master_table']} ";
|
$sql_common = " from {$g5['faq_master_table']} ";
|
||||||
|
|
||||||
@ -56,7 +62,9 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
if ($page < 1) {
|
||||||
|
$page = 1;
|
||||||
|
} // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
|
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
|
||||||
@ -64,7 +72,9 @@ $result = sql_query($sql);
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
<div class="local_ov01 local_ov">
|
||||||
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a><?php } ?>
|
<?php if ($page > 1) { ?>
|
||||||
|
<a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a>
|
||||||
|
<?php } ?>
|
||||||
<span class="btn_ov01"><span class="ov_txt"> 전체 FAQ </span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
<span class="btn_ov01"><span class="ov_txt"> 전체 FAQ </span><span class="ov_num"> <?php echo $total_count; ?>건</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -124,4 +134,4 @@ $result = sql_query($sql);
|
|||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100000';
|
$sub_menu = '100000';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
@include_once('./safe_check.php');
|
@require_once './safe_check.php';
|
||||||
if (function_exists('social_log_file_delete')) {
|
if (function_exists('social_log_file_delete')) {
|
||||||
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
|
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = '관리자메인';
|
$g5['title'] = '관리자메인';
|
||||||
include_once ('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
|
|
||||||
$new_member_rows = 5;
|
$new_member_rows = 5;
|
||||||
$new_point_rows = 5;
|
$new_point_rows = 5;
|
||||||
@ -18,8 +18,9 @@ $sql_common = " from {$g5['member_table']} ";
|
|||||||
|
|
||||||
$sql_search = " where (1) ";
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super') {
|
||||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||||
|
}
|
||||||
|
|
||||||
if (!$sst) {
|
if (!$sst) {
|
||||||
$sst = "mb_datetime";
|
$sst = "mb_datetime";
|
||||||
@ -73,22 +74,19 @@ $colspan = 12;
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||||
{
|
|
||||||
// 접근가능한 그룹수
|
// 접근가능한 그룹수
|
||||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
$group = "";
|
$group = "";
|
||||||
if ($row2['cnt'])
|
if ($row2['cnt']) {
|
||||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_admin == 'group')
|
if ($is_admin == 'group') {
|
||||||
{
|
|
||||||
$s_mod = '';
|
$s_mod = '';
|
||||||
$s_del = '';
|
$s_del = '';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id=' . $row['mb_id'] . '">수정</a>';
|
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id=' . $row['mb_id'] . '">수정</a>';
|
||||||
$s_del = '<a href="./member_delete.php?' . $qstr . '&w=d&mb_id=' . $row['mb_id'] . '&url=' . $_SERVER['SCRIPT_NAME'] . '" onclick="return delete_confirm(this);">삭제</a>';
|
$s_del = '<a href="./member_delete.php?' . $qstr . '&w=d&mb_id=' . $row['mb_id'] . '&url=' . $_SERVER['SCRIPT_NAME'] . '" onclick="return delete_confirm(this);">삭제</a>';
|
||||||
}
|
}
|
||||||
@ -104,7 +102,9 @@ $colspan = 12;
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="td_mbid"><?php echo $mb_id ?></td>
|
<td class="td_mbid"><?php echo $mb_id ?></td>
|
||||||
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
<td class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||||
<td class="td_mbname sv_use"><div><?php echo $mb_nick ?></div></td>
|
<td class="td_mbname sv_use">
|
||||||
|
<div><?php echo $mb_nick ?></div>
|
||||||
|
</td>
|
||||||
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||||
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||||
<td class="td_boolean"><?php echo $row['mb_mailling'] ? '예' : '아니오'; ?></td>
|
<td class="td_boolean"><?php echo $row['mb_mailling'] ? '예' : '아니오'; ?></td>
|
||||||
@ -115,8 +115,9 @@ $colspan = 12;
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($i == 0)
|
if ($i == 0) {
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -131,14 +132,16 @@ $colspan = 12;
|
|||||||
<?php
|
<?php
|
||||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||||
|
|
||||||
if ($gr_id)
|
if ($gr_id) {
|
||||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||||
|
}
|
||||||
if (isset($view) && $view) {
|
if (isset($view) && $view) {
|
||||||
if ($view == 'w')
|
if ($view == 'w') {
|
||||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||||
else if ($view == 'c')
|
} elseif ($view == 'c') {
|
||||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$sql_order = " order by a.bn_id desc ";
|
$sql_order = " order by a.bn_id desc ";
|
||||||
|
|
||||||
$sql = " select count(*) as cnt {$sql_common} ";
|
$sql = " select count(*) as cnt {$sql_common} ";
|
||||||
@ -167,12 +170,11 @@ $colspan = 5;
|
|||||||
<?php
|
<?php
|
||||||
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||||
{
|
|
||||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||||
|
|
||||||
if ($row['wr_id'] == $row['wr_parent']) // 원글
|
// 원글
|
||||||
{
|
if ($row['wr_id'] == $row['wr_parent']) {
|
||||||
$comment = "";
|
$comment = "";
|
||||||
$comment_link = "";
|
$comment_link = "";
|
||||||
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
||||||
@ -181,13 +183,12 @@ $colspan = 5;
|
|||||||
// 당일인 경우 시간으로 표시함
|
// 당일인 경우 시간으로 표시함
|
||||||
$datetime = substr($row2['wr_datetime'], 0, 10);
|
$datetime = substr($row2['wr_datetime'], 0, 10);
|
||||||
$datetime2 = $row2['wr_datetime'];
|
$datetime2 = $row2['wr_datetime'];
|
||||||
if ($datetime == G5_TIME_YMD)
|
if ($datetime == G5_TIME_YMD) {
|
||||||
$datetime2 = substr($datetime2, 11, 5);
|
$datetime2 = substr($datetime2, 11, 5);
|
||||||
else
|
} else {
|
||||||
$datetime2 = substr($datetime2, 5, 5);
|
$datetime2 = substr($datetime2, 5, 5);
|
||||||
|
|
||||||
}
|
}
|
||||||
else // 코멘트
|
} else // 코멘트
|
||||||
{
|
{
|
||||||
$comment = '댓글. ';
|
$comment = '댓글. ';
|
||||||
$comment_link = '#c_' . $row['wr_id'];
|
$comment_link = '#c_' . $row['wr_id'];
|
||||||
@ -198,25 +199,29 @@ $colspan = 5;
|
|||||||
// 당일인 경우 시간으로 표시함
|
// 당일인 경우 시간으로 표시함
|
||||||
$datetime = substr($row3['wr_datetime'], 0, 10);
|
$datetime = substr($row3['wr_datetime'], 0, 10);
|
||||||
$datetime2 = $row3['wr_datetime'];
|
$datetime2 = $row3['wr_datetime'];
|
||||||
if ($datetime == G5_TIME_YMD)
|
if ($datetime == G5_TIME_YMD) {
|
||||||
$datetime2 = substr($datetime2, 11, 5);
|
$datetime2 = substr($datetime2, 11, 5);
|
||||||
else
|
} else {
|
||||||
$datetime2 = substr($datetime2, 5, 5);
|
$datetime2 = substr($datetime2, 5, 5);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'], 10) ?></a></td>
|
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'], 10) ?></a></td>
|
||||||
<td class="td_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'], 20) ?></a></td>
|
<td class="td_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'], 20) ?></a></td>
|
||||||
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||||
<td class="td_mbname"><div><?php echo $name ?></div></td>
|
<td class="td_mbname">
|
||||||
|
<div><?php echo $name ?></div>
|
||||||
|
</td>
|
||||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($i == 0)
|
if ($i == 0) {
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -265,10 +270,8 @@ $colspan = 7;
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$row2['mb_id'] = '';
|
$row2['mb_id'] = '';
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||||
{
|
if ($row2['mb_id'] != $row['mb_id']) {
|
||||||
if ($row2['mb_id'] != $row['mb_id'])
|
|
||||||
{
|
|
||||||
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
}
|
}
|
||||||
@ -276,8 +279,7 @@ $colspan = 7;
|
|||||||
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||||
|
|
||||||
$link1 = $link2 = "";
|
$link1 = $link2 = "";
|
||||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
|
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||||
{
|
|
||||||
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
$link1 = '<a href="' . get_pretty_url($row['po_rel_table'], $row['po_rel_id']) . '" target="_blank">';
|
||||||
$link2 = '</a>';
|
$link2 = '</a>';
|
||||||
}
|
}
|
||||||
@ -286,7 +288,9 @@ $colspan = 7;
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
<td class="td_mbname"><?php echo get_text($row2['mb_name']); ?></td>
|
<td class="td_mbname"><?php echo get_text($row2['mb_name']); ?></td>
|
||||||
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
<td class="td_name sv_use">
|
||||||
|
<div><?php echo $mb_nick ?></div>
|
||||||
|
</td>
|
||||||
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
<td class="td_datetime"><?php echo $row['po_datetime'] ?></td>
|
||||||
<td><?php echo $link1 . $row['po_content'] . $link2 ?></td>
|
<td><?php echo $link1 . $row['po_content'] . $link2 ?></td>
|
||||||
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
||||||
@ -296,8 +300,9 @@ $colspan = 7;
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i == 0)
|
if ($i == 0) {
|
||||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -309,4 +314,4 @@ $colspan = 7;
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once ('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '200300';
|
$sub_menu = '200300';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
@ -10,8 +10,9 @@ check_admin_token();
|
|||||||
|
|
||||||
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
$post_count_chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? count($_POST['chk']) : 0;
|
||||||
|
|
||||||
if(! $post_count_chk)
|
if (!$post_count_chk) {
|
||||||
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
||||||
|
}
|
||||||
|
|
||||||
for ($i = 0; $i < $post_count_chk; $i++) {
|
for ($i = 0; $i < $post_count_chk; $i++) {
|
||||||
$ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$ma_id = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
include_once(G5_EDITOR_LIB);
|
require_once G5_EDITOR_LIB;
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
@ -16,17 +16,20 @@ if ($w == 'u') {
|
|||||||
|
|
||||||
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||||
$ma = sql_fetch($sql);
|
$ma = sql_fetch($sql);
|
||||||
if (!$ma['ma_id'])
|
if (!$ma['ma_id']) {
|
||||||
alert('등록된 자료가 없습니다.');
|
alert('등록된 자료가 없습니다.');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$html_title .= '입력';
|
$html_title .= '입력';
|
||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
$g5['title'] = $html_title;
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_desc"><p>메일 내용에 {이름} , {닉네임} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.</p></div>
|
<div class="local_desc">
|
||||||
|
<p>메일 내용에 {이름} , {닉네임} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form name="fmailform" id="fmailform" action="./mail_update.php" onsubmit="return fmailform_check(this);" method="post">
|
<form name="fmailform" id="fmailform" action="./mail_update.php" onsubmit="return fmailform_check(this);" method="post">
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||||
@ -59,8 +62,7 @@ include_once('./admin.head.php');
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fmailform_check(f)
|
function fmailform_check(f) {
|
||||||
{
|
|
||||||
errmsg = "";
|
errmsg = "";
|
||||||
errfld = "";
|
errfld = "";
|
||||||
|
|
||||||
@ -83,4 +85,4 @@ document.fmailform.ma_subject.focus();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '200300';
|
$sub_menu = '200300';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ $sql = " select * {$sql_common} order by ma_id desc ";
|
|||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$g5['title'] = '회원메일발송';
|
$g5['title'] = '회원메일발송';
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
|
|
||||||
$colspan = 7;
|
$colspan = 7;
|
||||||
?>
|
?>
|
||||||
@ -71,8 +71,9 @@ $colspan = 7;
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (!$i)
|
if (!$i) {
|
||||||
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -101,4 +102,4 @@ $(function() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once ('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
require_once G5_LIB_PATH . '/mailer.lib.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
@ -15,22 +15,18 @@ $content = conv_content($se['ma_content'], 1) . "<hr size=0><p><span style='font
|
|||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="ko">
|
<html lang="ko">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><?php echo G5_VERSION ?> 메일발송 테스트</title>
|
<title><?php echo G5_VERSION ?> 메일발송 테스트</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1><?php echo $subject; ?></h1>
|
<h1><?php echo $subject; ?></h1>
|
||||||
|
<p><?php echo $content; ?></p>
|
||||||
<p>
|
|
||||||
<?php echo $content; ?>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>주의!</strong> 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
|
<strong>주의!</strong> 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if (!$config['cf_email_use'])
|
if (!$config['cf_email_use']) {
|
||||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
@ -11,8 +12,9 @@ $ma_id = isset($_GET['ma_id']) ? (int) $_GET['ma_id'] : 0;
|
|||||||
|
|
||||||
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
$ma = sql_fetch($sql);
|
$ma = sql_fetch($sql);
|
||||||
if (!$ma['ma_id'])
|
if (!$ma['ma_id']) {
|
||||||
alert('보내실 내용을 선택하여 주십시오.');
|
alert('보내실 내용을 선택하여 주십시오.');
|
||||||
|
}
|
||||||
|
|
||||||
// 전체회원수
|
// 전체회원수
|
||||||
$sql = " select COUNT(*) as cnt from {$g5['member_table']} ";
|
$sql = " select COUNT(*) as cnt from {$g5['member_table']} ";
|
||||||
@ -29,20 +31,30 @@ for ($i=0; $i<count($last_option); $i++) {
|
|||||||
$option = explode('=', $last_option[$i]);
|
$option = explode('=', $last_option[$i]);
|
||||||
// 동적변수
|
// 동적변수
|
||||||
$var = isset($option[0]) ? $option[0] : '';
|
$var = isset($option[0]) ? $option[0] : '';
|
||||||
if( isset($option[1]) ) $$var = $option[1];
|
if (isset($option[1])) {
|
||||||
|
$$var = $option[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($mb_id1)) $mb_id1 = 1;
|
if (!isset($mb_id1)) {
|
||||||
if (!isset($mb_level_from)) $mb_level_from = 1;
|
$mb_id1 = 1;
|
||||||
if (!isset($mb_level_to)) $mb_level_to = 10;
|
}
|
||||||
if (!isset($mb_mailling)) $mb_mailling = 1;
|
if (!isset($mb_level_from)) {
|
||||||
|
$mb_level_from = 1;
|
||||||
|
}
|
||||||
|
if (!isset($mb_level_to)) {
|
||||||
|
$mb_level_to = 10;
|
||||||
|
}
|
||||||
|
if (!isset($mb_mailling)) {
|
||||||
|
$mb_mailling = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$mb_id1_from = isset($mb_id1_from) ? clean_xss_tags($mb_id1_from, 1, 1, 30) : '';
|
$mb_id1_from = isset($mb_id1_from) ? clean_xss_tags($mb_id1_from, 1, 1, 30) : '';
|
||||||
$mb_id1_to = isset($mb_id1_to) ? clean_xss_tags($mb_id1_to, 1, 1, 30) : '';
|
$mb_id1_to = isset($mb_id1_to) ? clean_xss_tags($mb_id1_to, 1, 1, 30) : '';
|
||||||
$mb_email = isset($mb_email) ? clean_xss_tags($mb_email, 1, 1, 100) : '';
|
$mb_email = isset($mb_email) ? clean_xss_tags($mb_email, 1, 1, 100) : '';
|
||||||
|
|
||||||
$g5['title'] = '회원메일발송';
|
$g5['title'] = '회원메일발송';
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="local_ov01 local_ov">
|
<div class="local_ov01 local_ov">
|
||||||
@ -124,4 +136,4 @@ include_once('./admin.head.php');
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
@ -9,17 +9,28 @@ $ma_last_option = "";
|
|||||||
$sql_common = " from {$g5['member_table']} ";
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
$sql_where = " where (1) ";
|
$sql_where = " where (1) ";
|
||||||
|
|
||||||
|
$mb_id1 = isset($_POST['mb_id1']) ? $_POST['mb_id1'] : 1;
|
||||||
|
$mb_id1_from = isset($_POST['mb_id1_from']) ? clean_xss_tags($_POST['mb_id1_from'], 1, 1, 30) : '';
|
||||||
|
$mb_id1_to = isset($_POST['mb_id1_to']) ? clean_xss_tags($_POST['mb_id1_to'], 1, 1, 30) : '';
|
||||||
|
$mb_email = isset($_POST['mb_email']) ? clean_xss_tags($_POST['mb_email'], 1, 1, 100) : '';
|
||||||
|
$mb_mailling = isset($_POST['mb_mailling']) ? clean_xss_tags($_POST['mb_mailling'], 1, 1, 100) : '';
|
||||||
|
$mb_level_from = isset($_POST['mb_level_from'])? $_POST['mb_level_from'] : 1;
|
||||||
|
$mb_level_to = isset($_POST['mb_level_to']) ? $_POST['mb_level_to'] : 10;
|
||||||
|
|
||||||
// 회원ID ..에서 ..까지
|
// 회원ID ..에서 ..까지
|
||||||
if ($mb_id1 != 1)
|
if ($mb_id1 != 1) {
|
||||||
$sql_where .= " and mb_id between '{$mb_id1_from}' and '{$mb_id1_to}' ";
|
$sql_where .= " and mb_id between '{$mb_id1_from}' and '{$mb_id1_to}' ";
|
||||||
|
}
|
||||||
|
|
||||||
// E-mail에 특정 단어 포함
|
// E-mail에 특정 단어 포함
|
||||||
if ($mb_email != "")
|
if ($mb_email != "") {
|
||||||
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
||||||
|
}
|
||||||
|
|
||||||
// 메일링
|
// 메일링
|
||||||
if ($mb_mailling != "")
|
if ($mb_mailling != "") {
|
||||||
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
||||||
|
}
|
||||||
|
|
||||||
// 권한
|
// 권한
|
||||||
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
||||||
@ -35,8 +46,9 @@ if ($gr_id) {
|
|||||||
$comma = ",";
|
$comma = ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$group_member)
|
if (!$group_member) {
|
||||||
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
$sql_where .= " and mb_id in ($group_member) ";
|
$sql_where .= " and mb_id in ($group_member) ";
|
||||||
}
|
}
|
||||||
@ -47,8 +59,9 @@ $sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
|
|||||||
$sql = " select COUNT(*) as cnt {$sql_common} {$sql_where} ";
|
$sql = " select COUNT(*) as cnt {$sql_common} {$sql_where} ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
$cnt = $row['cnt'];
|
$cnt = $row['cnt'];
|
||||||
if ($cnt == 0)
|
if ($cnt == 0) {
|
||||||
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
// 마지막 옵션을 저장합니다.
|
// 마지막 옵션을 저장합니다.
|
||||||
$ma_last_option .= "mb_id1={$mb_id1}";
|
$ma_last_option .= "mb_id1={$mb_id1}";
|
||||||
@ -63,7 +76,7 @@ $ma_last_option .= "||gr_id={$gr_id}";
|
|||||||
sql_query(" update {$g5['mail_table']} set ma_last_option = '{$ma_last_option}' where ma_id = '{$ma_id}' ");
|
sql_query(" update {$g5['mail_table']} set ma_last_option = '{$ma_last_option}' where ma_id = '{$ma_id}' ");
|
||||||
|
|
||||||
$g5['title'] = "메일발송 대상 회원";
|
$g5['title'] = "메일발송 대상 회원";
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
||||||
@ -117,4 +130,4 @@ include_once('./admin.head.php');
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check_menu($auth, $sub_menu, 'w');
|
||||||
|
|
||||||
@ -10,8 +10,8 @@ check_demo();
|
|||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
require_once G5_LIB_PATH . '/mailer.lib.php';
|
||||||
|
|
||||||
$countgap = 10; // 몇건씩 보낼지 설정
|
$countgap = 10; // 몇건씩 보낼지 설정
|
||||||
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
||||||
@ -25,7 +25,7 @@ echo "</span>";
|
|||||||
<span id="cont"></span>
|
<span id="cont"></span>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|
||||||
flush();
|
flush();
|
||||||
ob_flush();
|
ob_flush();
|
||||||
@ -43,23 +43,21 @@ $ma = sql_fetch($sql);
|
|||||||
$subject = $ma['ma_subject'];
|
$subject = $ma['ma_subject'];
|
||||||
|
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
for ($i=0; $i<count($member_list); $i++)
|
for ($i = 0; $i < count($member_list); $i++) {
|
||||||
{
|
|
||||||
list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
|
list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
|
||||||
|
|
||||||
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $to_email);
|
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $to_email);
|
||||||
// 올바른 메일 주소만
|
// 올바른 메일 주소만
|
||||||
if ($sw == true)
|
if ($sw == true) {
|
||||||
{
|
|
||||||
$cnt++;
|
$cnt++;
|
||||||
|
|
||||||
$mb_md5 = md5($mb_id . $to_email . $datetime);
|
$mb_md5 = md5($mb_id . $to_email . $datetime);
|
||||||
|
|
||||||
$content = $ma['ma_content'];
|
$content = $ma['ma_content'];
|
||||||
$content = preg_replace("/{이름}/", $name, $content);
|
$content = preg_replace("/{이름}/", $name, (string)$content);
|
||||||
$content = preg_replace("/{닉네임}/", $nick, $content);
|
$content = preg_replace("/{닉네임}/", $nick, (string)$content);
|
||||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
$content = preg_replace("/{회원아이디}/", $mb_id, (string)$content);
|
||||||
$content = preg_replace("/{이메일}/", $to_email, $content);
|
$content = preg_replace("/{이메일}/", $to_email, (string)$content);
|
||||||
|
|
||||||
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='" . G5_BBS_URL . "/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='" . G5_BBS_URL . "/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||||
|
|
||||||
@ -71,15 +69,18 @@ for ($i=0; $i<count($member_list); $i++)
|
|||||||
ob_flush();
|
ob_flush();
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
usleep($sleepsec);
|
usleep($sleepsec);
|
||||||
if ($cnt % $countgap == 0)
|
if ($cnt % $countgap == 0) {
|
||||||
{
|
|
||||||
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 화면을 지운다... 부하를 줄임
|
// 화면을 지운다... 부하를 줄임
|
||||||
if ($cnt % $maxscreen == 0)
|
if ($cnt % $maxscreen == 0) {
|
||||||
echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
|
echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<script> document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>"; document.body.scrollTop += 1000; </script>
|
<script>
|
||||||
|
document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>";
|
||||||
|
document.body.scrollTop += 1000;
|
||||||
|
</script>
|
||||||
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if (!$config['cf_email_use'])
|
if (!$config['cf_email_use']) {
|
||||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
require_once G5_LIB_PATH . '/mailer.lib.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check_menu($auth, $sub_menu, 'w');
|
||||||
|
|
||||||
@ -25,10 +26,10 @@ $ma = sql_fetch($sql);
|
|||||||
$subject = $ma['ma_subject'];
|
$subject = $ma['ma_subject'];
|
||||||
|
|
||||||
$content = $ma['ma_content'];
|
$content = $ma['ma_content'];
|
||||||
$content = preg_replace("/{이름}/", $name, $content);
|
$content = preg_replace("/{이름}/", $name, (string)$content);
|
||||||
$content = preg_replace("/{닉네임}/", $nick, $content);
|
$content = preg_replace("/{닉네임}/", $nick, (string)$content);
|
||||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
$content = preg_replace("/{회원아이디}/", $mb_id, (string)$content);
|
||||||
$content = preg_replace("/{이메일}/", $email, $content);
|
$content = preg_replace("/{이메일}/", $email, (string)$content);
|
||||||
|
|
||||||
$mb_md5 = md5($member['mb_id'] . $member['mb_email'] . $member['mb_datetime']);
|
$mb_md5 = md5($member['mb_id'] . $member['mb_email'] . $member['mb_datetime']);
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200300";
|
$sub_menu = "200300";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if ($w == 'u' || $w == 'd')
|
if ($w == 'u' || $w == 'd') {
|
||||||
check_demo();
|
check_demo();
|
||||||
|
}
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check_menu($auth, $sub_menu, 'w');
|
||||||
|
|
||||||
@ -13,17 +14,14 @@ $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_subject = isset($_POST['ma_subject']) ? strip_tags(clean_xss_attributes($_POST['ma_subject'])) : '';
|
||||||
$ma_content = isset($_POST['ma_content']) ? $_POST['ma_content'] : '';
|
$ma_content = isset($_POST['ma_content']) ? $_POST['ma_content'] : '';
|
||||||
|
|
||||||
if ($w == '')
|
if ($w == '') {
|
||||||
{
|
|
||||||
$sql = " insert {$g5['mail_table']}
|
$sql = " insert {$g5['mail_table']}
|
||||||
set ma_subject = '{$ma_subject}',
|
set ma_subject = '{$ma_subject}',
|
||||||
ma_content = '{$ma_content}',
|
ma_content = '{$ma_content}',
|
||||||
ma_time = '" . G5_TIME_YMDHIS . "',
|
ma_time = '" . G5_TIME_YMDHIS . "',
|
||||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
} elseif ($w == 'u') {
|
||||||
else if ($w == 'u')
|
|
||||||
{
|
|
||||||
$sql = " update {$g5['mail_table']}
|
$sql = " update {$g5['mail_table']}
|
||||||
set ma_subject = '{$ma_subject}',
|
set ma_subject = '{$ma_subject}',
|
||||||
ma_content = '{$ma_content}',
|
ma_content = '{$ma_content}',
|
||||||
@ -31,9 +29,7 @@ else if ($w == 'u')
|
|||||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||||
where ma_id = '{$ma_id}' ";
|
where ma_id = '{$ma_id}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
} elseif ($w == 'd') {
|
||||||
else if ($w == 'd')
|
|
||||||
{
|
|
||||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
$sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
include_once("./_common.php");
|
require_once "./_common.php";
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
@ -8,21 +8,23 @@ auth_check_menu($auth, $sub_menu, "d");
|
|||||||
|
|
||||||
$mb = isset($_POST['mb_id']) ? get_member($_POST['mb_id']) : array();
|
$mb = isset($_POST['mb_id']) ? get_member($_POST['mb_id']) : array();
|
||||||
|
|
||||||
if (! (isset($mb['mb_id']) && $mb['mb_id']))
|
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||||
alert("회원자료가 존재하지 않습니다.");
|
alert("회원자료가 존재하지 않습니다.");
|
||||||
else if ($member['mb_id'] == $mb['mb_id'])
|
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
||||||
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
||||||
else if (is_admin($mb['mb_id']) == "super")
|
} elseif (is_admin($mb['mb_id']) == "super") {
|
||||||
alert("최고 관리자는 삭제할 수 없습니다.");
|
alert("최고 관리자는 삭제할 수 없습니다.");
|
||||||
else if ($mb['mb_level'] >= $member['mb_level'])
|
} elseif ($mb['mb_level'] >= $member['mb_level']) {
|
||||||
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
|
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
// 회원자료 삭제
|
// 회원자료 삭제
|
||||||
member_delete($mb['mb_id']);
|
member_delete($mb['mb_id']);
|
||||||
|
|
||||||
if ($url)
|
if (isset($url)) {
|
||||||
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
|
goto_url("{$url}?$qstr&w=u&mb_id=" . $mb['mb_id']);
|
||||||
else
|
} else {
|
||||||
goto_url("./member_list.php?$qstr");
|
goto_url("./member_list.php?$qstr");
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check_menu($auth, $sub_menu, 'w');
|
||||||
|
|
||||||
@ -40,11 +40,12 @@ $mb = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
$sound_only = '';
|
$sound_only = '';
|
||||||
|
$required_mb_id = '';
|
||||||
$required_mb_id_class = '';
|
$required_mb_id_class = '';
|
||||||
$required_mb_password = '';
|
$required_mb_password = '';
|
||||||
|
$html_title = '';
|
||||||
|
|
||||||
if ($w == '')
|
if ($w == '') {
|
||||||
{
|
|
||||||
$required_mb_id = 'required';
|
$required_mb_id = 'required';
|
||||||
$required_mb_id_class = 'required alnum_';
|
$required_mb_id_class = 'required alnum_';
|
||||||
$required_mb_password = 'required';
|
$required_mb_password = 'required';
|
||||||
@ -54,15 +55,15 @@ if ($w == '')
|
|||||||
$mb['mb_open'] = 1;
|
$mb['mb_open'] = 1;
|
||||||
$mb['mb_level'] = $config['cf_register_level'];
|
$mb['mb_level'] = $config['cf_register_level'];
|
||||||
$html_title = '추가';
|
$html_title = '추가';
|
||||||
}
|
} elseif ($w == 'u') {
|
||||||
else if ($w == 'u')
|
|
||||||
{
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (!$mb['mb_id'])
|
if (!$mb['mb_id']) {
|
||||||
alert('존재하지 않는 회원자료입니다.');
|
alert('존재하지 않는 회원자료입니다.');
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
$required_mb_id = 'readonly';
|
$required_mb_id = 'readonly';
|
||||||
$html_title = '수정';
|
$html_title = '수정';
|
||||||
@ -90,9 +91,9 @@ else if ($w == 'u')
|
|||||||
$mb['mb_8'] = get_text($mb['mb_8']);
|
$mb['mb_8'] = get_text($mb['mb_8']);
|
||||||
$mb['mb_9'] = get_text($mb['mb_9']);
|
$mb['mb_9'] = get_text($mb['mb_9']);
|
||||||
$mb['mb_10'] = get_text($mb['mb_10']);
|
$mb['mb_10'] = get_text($mb['mb_10']);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
// 본인확인방법
|
// 본인확인방법
|
||||||
switch ($mb['mb_certify']) {
|
switch ($mb['mb_certify']) {
|
||||||
@ -179,7 +180,8 @@ if( !isset($g5['member_cert_history']) ){
|
|||||||
}
|
}
|
||||||
// 멤버 본인인증 정보 변경 내역 테이블 없을 경우 생성
|
// 멤버 본인인증 정보 변경 내역 테이블 없을 경우 생성
|
||||||
if (isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cert_history_table']} ", false)) {
|
if (isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cert_history_table']} ", false)) {
|
||||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['member_cert_history_table']}` (
|
sql_query(
|
||||||
|
" CREATE TABLE IF NOT EXISTS `{$g5['member_cert_history_table']}` (
|
||||||
`ch_id` int(11) NOT NULL auto_increment,
|
`ch_id` int(11) NOT NULL auto_increment,
|
||||||
`mb_id` varchar(20) NOT NULL DEFAULT '',
|
`mb_id` varchar(20) NOT NULL DEFAULT '',
|
||||||
`ch_name` varchar(255) NOT NULL DEFAULT '',
|
`ch_name` varchar(255) NOT NULL DEFAULT '',
|
||||||
@ -189,7 +191,9 @@ if(isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cer
|
|||||||
`ch_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
`ch_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
PRIMARY KEY (`ch_id`),
|
PRIMARY KEY (`ch_id`),
|
||||||
KEY `mb_id` (`mb_id`)
|
KEY `mb_id` (`mb_id`)
|
||||||
) ", true);
|
) ",
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mb_cert_history = '';
|
$mb_cert_history = '';
|
||||||
@ -198,10 +202,13 @@ if (isset($mb_id) && $mb_id) {
|
|||||||
$mb_cert_history = sql_query($sql);
|
$mb_cert_history = sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
if ($mb['mb_intercept_date']) {
|
||||||
else $g5['title'] .= "";
|
$g5['title'] = "차단된 ";
|
||||||
|
} else {
|
||||||
|
$g5['title'] .= "";
|
||||||
|
}
|
||||||
$g5['title'] .= '회원 ' . $html_title;
|
$g5['title'] .= '회원 ' . $html_title;
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
|
|
||||||
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||||
@ -262,11 +269,11 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">본인확인방법</th>
|
<th scope="row">본인확인방법</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<input type="radio" name="mb_certify_case" value="simple" id="mb_certify_sa" <?php if($mb['mb_certify'] == 'simple') echo 'checked="checked"'; ?>>
|
<input type="radio" name="mb_certify_case" value="simple" id="mb_certify_sa" <?php if ($mb['mb_certify'] == 'simple') { echo 'checked="checked"'; } ?>>
|
||||||
<label for="mb_certify_sa">간편인증</label>
|
<label for="mb_certify_sa">간편인증</label>
|
||||||
<input type="radio" name="mb_certify_case" value="hp" id="mb_certify_hp" <?php if($mb['mb_certify'] == 'hp') echo 'checked="checked"'; ?>>
|
<input type="radio" name="mb_certify_case" value="hp" id="mb_certify_hp" <?php if ($mb['mb_certify'] == 'hp') { echo 'checked="checked"'; } ?>>
|
||||||
<label for="mb_certify_hp">휴대폰</label>
|
<label for="mb_certify_hp">휴대폰</label>
|
||||||
<input type="radio" name="mb_certify_case" value="ipin" id="mb_certify_ipin" <?php if($mb['mb_certify'] == 'ipin') echo 'checked="checked"'; ?>>
|
<input type="radio" name="mb_certify_case" value="ipin" id="mb_certify_ipin" <?php if ($mb['mb_certify'] == 'ipin') { echo 'checked="checked"'; } ?>>
|
||||||
<label for="mb_certify_ipin">아이핀</label>
|
<label for="mb_certify_ipin">아이핀</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -275,7 +282,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<td>
|
<td>
|
||||||
<input type="radio" name="mb_certify" value="1" id="mb_certify_yes" <?php echo $mb_certify_yes; ?>>
|
<input type="radio" name="mb_certify" value="1" id="mb_certify_yes" <?php echo $mb_certify_yes; ?>>
|
||||||
<label for="mb_certify_yes">예</label>
|
<label for="mb_certify_yes">예</label>
|
||||||
<input type="radio" name="mb_certify" value="" id="mb_certify_no" <?php echo $mb_certify_no; ?>>
|
<input type="radio" name="mb_certify" value="0" id="mb_certify_no" <?php echo $mb_certify_no; ?>>
|
||||||
<label for="mb_certify_no">아니오</label>
|
<label for="mb_certify_no">아니오</label>
|
||||||
</td>
|
</td>
|
||||||
<th scope="row">성인인증</th>
|
<th scope="row">성인인증</th>
|
||||||
@ -378,6 +385,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
while ($row = sql_fetch_array($mb_cert_history)) {
|
while ($row = sql_fetch_array($mb_cert_history)) {
|
||||||
$cnt++;
|
$cnt++;
|
||||||
|
$cert_type = '';
|
||||||
switch ($row['ch_type']) {
|
switch ($row['ch_type']) {
|
||||||
case 'simple':
|
case 'simple':
|
||||||
$cert_type = '간편인증';
|
$cert_type = '간편인증';
|
||||||
@ -443,16 +451,13 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<th scope="row"><label for="mb_leave_date">탈퇴일자</label></th>
|
<th scope="row"><label for="mb_leave_date">탈퇴일자</label></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" id="mb_leave_date" class="frm_input" maxlength="8">
|
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" id="mb_leave_date" class="frm_input" maxlength="8">
|
||||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_leave_date_set_today" onclick="if (this.form.mb_leave_date.value==this.form.mb_leave_date.defaultValue) {
|
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_leave_date_set_today" onclick="if (this.form.mb_leave_date.value==this.form.mb_leave_date.defaultValue) { this.form.mb_leave_date.value=this.value; } else { this.form.mb_leave_date.value=this.form.mb_leave_date.defaultValue; }">
|
||||||
this.form.mb_leave_date.value=this.value; } else { this.form.mb_leave_date.value=this.form.mb_leave_date.defaultValue; }">
|
|
||||||
<label for="mb_leave_date_set_today">탈퇴일을 오늘로 지정</label>
|
<label for="mb_leave_date_set_today">탈퇴일을 오늘로 지정</label>
|
||||||
</td>
|
</td>
|
||||||
<th scope="row">접근차단일자</th>
|
<th scope="row">접근차단일자</th>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" id="mb_intercept_date" class="frm_input" maxlength="8">
|
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" id="mb_intercept_date" class="frm_input" maxlength="8">
|
||||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_intercept_date_set_today" onclick="if
|
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_intercept_date_set_today" onclick="if (this.form.mb_intercept_date.value==this.form.mb_intercept_date.defaultValue) { this.form.mb_intercept_date.value=this.value; } else { this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
||||||
(this.form.mb_intercept_date.value==this.form.mb_intercept_date.defaultValue) { this.form.mb_intercept_date.value=this.value; } else {
|
|
||||||
this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
|
||||||
<label for="mb_intercept_date_set_today">접근차단일을 오늘로 지정</label>
|
<label for="mb_intercept_date_set_today">접근차단일을 오늘로 지정</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -461,7 +466,6 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
|||||||
//소셜계정이 있다면
|
//소셜계정이 있다면
|
||||||
if (function_exists('social_login_link_account') && $mb['mb_id']) {
|
if (function_exists('social_login_link_account') && $mb['mb_id']) {
|
||||||
if ($my_social_accounts = social_login_link_account($mb['mb_id'], false, 'get_data')) { ?>
|
if ($my_social_accounts = social_login_link_account($mb['mb_id'], false, 'get_data')) { ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>소셜계정목록</th>
|
<th>소셜계정목록</th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
@ -469,7 +473,9 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
|||||||
<li class="social_login_container">
|
<li class="social_login_container">
|
||||||
<h4>연결된 소셜 계정 목록</h4>
|
<h4>연결된 소셜 계정 목록</h4>
|
||||||
<?php foreach ($my_social_accounts as $account) { //반복문
|
<?php foreach ($my_social_accounts as $account) { //반복문
|
||||||
if( empty($account) ) continue;
|
if (empty($account)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$provider = strtolower($account['provider']);
|
$provider = strtolower($account['provider']);
|
||||||
$provider_name = social_get_provider_service_name($provider);
|
$provider_name = social_get_provider_service_name($provider);
|
||||||
@ -565,8 +571,7 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fmember_submit(f)
|
function fmember_submit(f) {
|
||||||
{
|
|
||||||
if (!f.mb_icon.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_icon.value) {
|
if (!f.mb_icon.value.match(/\.(gif|jpe?g|png)$/i) && f.mb_icon.value) {
|
||||||
alert('아이콘은 이미지 파일만 가능합니다.');
|
alert('아이콘은 이미지 파일만 가능합니다.');
|
||||||
return false;
|
return false;
|
||||||
@ -583,4 +588,4 @@ function fmember_submit(f)
|
|||||||
<?php
|
<?php
|
||||||
run_event('admin_member_form_after', $mb, $w);
|
run_event('admin_member_form_after', $mb, $w);
|
||||||
|
|
||||||
include_once('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,17 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
include_once("./_common.php");
|
require_once "./_common.php";
|
||||||
include_once(G5_LIB_PATH."/register.lib.php");
|
require_once G5_LIB_PATH . "/register.lib.php";
|
||||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
require_once G5_LIB_PATH . '/thumbnail.lib.php';
|
||||||
|
|
||||||
if ($w == 'u')
|
if ($w == 'u') {
|
||||||
check_demo();
|
check_demo();
|
||||||
|
}
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'w');
|
auth_check_menu($auth, $sub_menu, 'w');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
|
||||||
|
$mb_password = isset($_POST['mb_password']) ? trim($_POST['mb_password']) : '';
|
||||||
$mb_certify_case = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
|
$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_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_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_zip']) : '';
|
||||||
@ -20,14 +22,15 @@ $mb_zip = isset($_POST['mb_zip']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb
|
|||||||
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
|
$mb_hp = hyphen_hp_number($_POST['mb_hp']);
|
||||||
if ($mb_hp) {
|
if ($mb_hp) {
|
||||||
$result = exist_mb_hp($mb_hp, $mb_id);
|
$result = exist_mb_hp($mb_hp, $mb_id);
|
||||||
if ($result)
|
if ($result) {
|
||||||
alert($result);
|
alert($result);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 인증정보처리
|
// 인증정보처리
|
||||||
if ($mb_certify_case && $mb_certify) {
|
if ($mb_certify_case && $mb_certify) {
|
||||||
$mb_certify = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_certify_case']) : '';
|
$mb_certify = isset($_POST['mb_certify_case']) ? preg_replace('/[^0-9a-z_]/i', '', (string)$_POST['mb_certify_case']) : '';
|
||||||
$mb_adult = isset($_POST['mb_adult']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['mb_adult']) : '';
|
$mb_adult = isset($_POST['mb_adult']) ? preg_replace('/[^0-9a-z_]/i', '', (string)$_POST['mb_adult']) : '';
|
||||||
} else {
|
} else {
|
||||||
$mb_certify = '';
|
$mb_certify = '';
|
||||||
$mb_adult = 0;
|
$mb_adult = 0;
|
||||||
@ -39,7 +42,9 @@ $mb_zip2 = substr($mb_zip, 3);
|
|||||||
$mb_email = isset($_POST['mb_email']) ? get_email_address(trim($_POST['mb_email'])) : '';
|
$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'])) : '';
|
$mb_nick = isset($_POST['mb_nick']) ? trim(strip_tags($_POST['mb_nick'])) : '';
|
||||||
|
|
||||||
if ($msg = valid_mb_nick($mb_nick)) alert($msg, "", true, true);
|
if ($msg = valid_mb_nick($mb_nick)) {
|
||||||
|
alert($msg, "", true, true);
|
||||||
|
}
|
||||||
|
|
||||||
$posts = array();
|
$posts = array();
|
||||||
$check_keys = array(
|
$check_keys = array(
|
||||||
@ -104,63 +109,70 @@ $sql_common = " mb_name = '{$posts['mb_name']}',
|
|||||||
mb_9 = '{$posts['mb_9']}',
|
mb_9 = '{$posts['mb_9']}',
|
||||||
mb_10 = '{$posts['mb_10']}' ";
|
mb_10 = '{$posts['mb_10']}' ";
|
||||||
|
|
||||||
if ($w == '')
|
if ($w == '') {
|
||||||
{
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (isset($mb['mb_id']) && $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']);
|
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 = '{$mb_nick}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $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']);
|
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 = '{$mb_email}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $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']);
|
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} ");
|
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} ");
|
||||||
}
|
} elseif ($w == 'u') {
|
||||||
else if ($w == 'u')
|
|
||||||
{
|
|
||||||
$mb = get_member($mb_id);
|
$mb = get_member($mb_id);
|
||||||
if (! (isset($mb['mb_id']) && $mb['mb_id']))
|
if (!(isset($mb['mb_id']) && $mb['mb_id'])) {
|
||||||
alert('존재하지 않는 회원자료입니다.');
|
alert('존재하지 않는 회원자료입니다.');
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_admin !== 'super' && is_admin($mb['mb_id']) === 'super') {
|
if ($is_admin !== 'super' && is_admin($mb['mb_id']) === 'super') {
|
||||||
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
|
alert('최고관리자의 비밀번호를 수정할수 없습니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($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'] . ' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
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 = '{$mb_nick}' and mb_id <> '$mb_id' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $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']);
|
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 = '{$mb_email}' and mb_id <> '$mb_id' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (isset($row['mb_id']) && $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']);
|
alert('이미 존재하는 이메일입니다.\\nID : ' . $row['mb_id'] . '\\n이름 : ' . $row['mb_name'] . '\\n닉네임 : ' . $row['mb_nick'] . '\\n메일 : ' . $row['mb_email']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($mb_password)
|
if ($mb_password) {
|
||||||
$sql_password = " , mb_password = '" . get_encrypt_string($mb_password) . "' ";
|
$sql_password = " , mb_password = '" . get_encrypt_string($mb_password) . "' ";
|
||||||
else
|
} else {
|
||||||
$sql_password = "";
|
$sql_password = "";
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($passive_certify) && $passive_certify)
|
if (isset($passive_certify) && $passive_certify) {
|
||||||
$sql_certify = " , mb_email_certify = '" . G5_TIME_YMDHIS . "' ";
|
$sql_certify = " , mb_email_certify = '" . G5_TIME_YMDHIS . "' ";
|
||||||
else
|
} else {
|
||||||
$sql_certify = "";
|
$sql_certify = "";
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " update {$g5['member_table']}
|
$sql = " update {$g5['member_table']}
|
||||||
set {$sql_common}
|
set {$sql_common}
|
||||||
@ -168,18 +180,18 @@ else if ($w == 'u')
|
|||||||
{$sql_certify}
|
{$sql_certify}
|
||||||
where mb_id = '{$mb_id}' ";
|
where mb_id = '{$mb_id}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
if ($w == '' || $w == 'u') {
|
if ($w == '' || $w == 'u') {
|
||||||
|
|
||||||
$mb_dir = substr($mb_id, 0, 2);
|
$mb_dir = substr($mb_id, 0, 2);
|
||||||
$mb_icon_img = get_mb_icon_name($mb_id) . '.gif';
|
$mb_icon_img = get_mb_icon_name($mb_id) . '.gif';
|
||||||
|
|
||||||
// 회원 아이콘 삭제
|
// 회원 아이콘 삭제
|
||||||
if (isset($del_mb_icon) && $del_mb_icon)
|
if (isset($del_mb_icon) && $del_mb_icon) {
|
||||||
@unlink(G5_DATA_PATH . '/member/' . $mb_dir . '/' . $mb_icon_img);
|
@unlink(G5_DATA_PATH . '/member/' . $mb_dir . '/' . $mb_icon_img);
|
||||||
|
}
|
||||||
|
|
||||||
$image_regex = "/(\.(gif|jpe?g|png))$/i";
|
$image_regex = "/(\.(gif|jpe?g|png))$/i";
|
||||||
|
|
||||||
@ -201,6 +213,7 @@ if( $w == '' || $w == 'u' ){
|
|||||||
|
|
||||||
if (file_exists($dest_path)) {
|
if (file_exists($dest_path)) {
|
||||||
$size = @getimagesize($dest_path);
|
$size = @getimagesize($dest_path);
|
||||||
|
if ($size) {
|
||||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||||
$thumb = null;
|
$thumb = null;
|
||||||
if ($size[2] === 2 || $size[2] === 3) {
|
if ($size[2] === 2 || $size[2] === 3) {
|
||||||
@ -219,6 +232,7 @@ if( $w == '' || $w == 'u' ){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$mb_img_dir = G5_DATA_PATH . '/member_image/';
|
$mb_img_dir = G5_DATA_PATH . '/member_image/';
|
||||||
if (!is_dir($mb_img_dir)) {
|
if (!is_dir($mb_img_dir)) {
|
||||||
@ -228,8 +242,9 @@ if( $w == '' || $w == 'u' ){
|
|||||||
$mb_img_dir .= substr($mb_id, 0, 2);
|
$mb_img_dir .= substr($mb_id, 0, 2);
|
||||||
|
|
||||||
// 회원 이미지 삭제
|
// 회원 이미지 삭제
|
||||||
if (isset($del_mb_img) && $del_mb_img)
|
if (isset($del_mb_img) && $del_mb_img) {
|
||||||
@unlink($mb_img_dir . '/' . $mb_icon_img);
|
@unlink($mb_img_dir . '/' . $mb_icon_img);
|
||||||
|
}
|
||||||
|
|
||||||
// 아이콘 업로드
|
// 아이콘 업로드
|
||||||
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
|
if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) {
|
||||||
@ -248,6 +263,7 @@ if( $w == '' || $w == 'u' ){
|
|||||||
|
|
||||||
if (file_exists($dest_path)) {
|
if (file_exists($dest_path)) {
|
||||||
$size = @getimagesize($dest_path);
|
$size = @getimagesize($dest_path);
|
||||||
|
if ($size) {
|
||||||
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
|
if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) {
|
||||||
$thumb = null;
|
$thumb = null;
|
||||||
if ($size[2] === 2 || $size[2] === 3) {
|
if ($size[2] === 2 || $size[2] === 3) {
|
||||||
@ -267,6 +283,7 @@ if( $w == '' || $w == 'u' ){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
run_event('admin_member_form_update', $w, $mb_id);
|
run_event('admin_member_form_update', $w, $mb_id);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, 'r');
|
auth_check_menu($auth, $sub_menu, 'r');
|
||||||
|
|
||||||
@ -27,8 +27,9 @@ if ($stx) {
|
|||||||
$sql_search .= " ) ";
|
$sql_search .= " ) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super') {
|
||||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||||
|
}
|
||||||
|
|
||||||
if (!$sst) {
|
if (!$sst) {
|
||||||
$sst = "mb_datetime";
|
$sst = "mb_datetime";
|
||||||
@ -43,7 +44,9 @@ $total_count = $row['cnt'];
|
|||||||
|
|
||||||
$rows = $config['cf_page_rows'];
|
$rows = $config['cf_page_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
if ($page < 1) {
|
||||||
|
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
|
}
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
// 탈퇴회원수
|
// 탈퇴회원수
|
||||||
@ -59,7 +62,7 @@ $intercept_count = $row['cnt'];
|
|||||||
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
|
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
|
||||||
|
|
||||||
$g5['title'] = '회원관리';
|
$g5['title'] = '회원관리';
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
|
|
||||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
@ -150,8 +153,9 @@ $colspan = 16;
|
|||||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
$group = '';
|
$group = '';
|
||||||
if ($row2['cnt'])
|
if ($row2['cnt']) {
|
||||||
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
$group = '<a href="./boardgroupmember_form.php?mb_id=' . $row['mb_id'] . '">' . $row2['cnt'] . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_admin == 'group') {
|
if ($is_admin == 'group') {
|
||||||
$s_mod = '';
|
$s_mod = '';
|
||||||
@ -172,14 +176,14 @@ $colspan = 16;
|
|||||||
if ($row['mb_leave_date']) {
|
if ($row['mb_leave_date']) {
|
||||||
$mb_id = $mb_id;
|
$mb_id = $mb_id;
|
||||||
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||||
}
|
} elseif ($row['mb_intercept_date']) {
|
||||||
else if ($row['mb_intercept_date']) {
|
|
||||||
$mb_id = $mb_id;
|
$mb_id = $mb_id;
|
||||||
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||||
$intercept_title = '차단해제';
|
$intercept_title = '차단해제';
|
||||||
}
|
}
|
||||||
if ($intercept_title == '')
|
if ($intercept_title == '') {
|
||||||
$intercept_title = '차단하기';
|
$intercept_title = '차단하기';
|
||||||
|
}
|
||||||
|
|
||||||
$address = $row['mb_zip1'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3'], $row['mb_addr_jibeon']) : '';
|
$address = $row['mb_zip1'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3'], $row['mb_addr_jibeon']) : '';
|
||||||
|
|
||||||
@ -221,10 +225,11 @@ $colspan = 16;
|
|||||||
//소셜계정이 있다면
|
//소셜계정이 있다면
|
||||||
if (function_exists('social_login_link_account')) {
|
if (function_exists('social_login_link_account')) {
|
||||||
if ($my_social_accounts = social_login_link_account($row['mb_id'], false, 'get_data')) {
|
if ($my_social_accounts = social_login_link_account($row['mb_id'], false, 'get_data')) {
|
||||||
|
|
||||||
echo '<div class="member_social_provider sns-wrap-over sns-wrap-32">';
|
echo '<div class="member_social_provider sns-wrap-over sns-wrap-32">';
|
||||||
foreach ((array) $my_social_accounts as $account) { //반복문
|
foreach ((array) $my_social_accounts as $account) { //반복문
|
||||||
if( empty($account) || empty($account['provider']) ) continue;
|
if (empty($account) || empty($account['provider'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$provider = strtolower($account['provider']);
|
$provider = strtolower($account['provider']);
|
||||||
$provider_name = social_get_provider_service_name($provider);
|
$provider_name = social_get_provider_service_name($provider);
|
||||||
@ -258,8 +263,11 @@ $colspan = 16;
|
|||||||
</td>
|
</td>
|
||||||
<td headers="mb_list_auth" class="td_mbstat">
|
<td headers="mb_list_auth" class="td_mbstat">
|
||||||
<?php
|
<?php
|
||||||
if ($leave_msg || $intercept_msg) echo $leave_msg.' '.$intercept_msg;
|
if ($leave_msg || $intercept_msg) {
|
||||||
else echo "정상";
|
echo $leave_msg . ' ' . $intercept_msg;
|
||||||
|
} else {
|
||||||
|
echo "정상";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td headers="mb_list_mobile" class="td_tel"><?php echo get_text($row['mb_hp']); ?></td>
|
<td headers="mb_list_mobile" class="td_tel"><?php echo get_text($row['mb_hp']); ?></td>
|
||||||
@ -269,7 +277,9 @@ $colspan = 16;
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="<?php echo $bg; ?>">
|
<tr class="<?php echo $bg; ?>">
|
||||||
<td headers="mb_list_name" class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
<td headers="mb_list_name" class="td_mbname"><?php echo get_text($row['mb_name']); ?></td>
|
||||||
<td headers="mb_list_nick" class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
<td headers="mb_list_nick" class="td_name sv_use">
|
||||||
|
<div><?php echo $mb_nick ?></div>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td headers="mb_list_sms">
|
<td headers="mb_list_sms">
|
||||||
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
||||||
@ -296,8 +306,9 @@ $colspan = 16;
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($i == 0)
|
if ($i == 0) {
|
||||||
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -318,8 +329,7 @@ $colspan = 16;
|
|||||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?' . $qstr . '&page='); ?>
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?' . $qstr . '&page='); ?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fmemberlist_submit(f)
|
function fmemberlist_submit(f) {
|
||||||
{
|
|
||||||
if (!is_checked("chk[]")) {
|
if (!is_checked("chk[]")) {
|
||||||
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
|
||||||
return false;
|
return false;
|
||||||
@ -336,4 +346,4 @@ function fmemberlist_submit(f)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once ('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
include_once("./_common.php");
|
require_once "./_common.php";
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
@ -9,8 +9,7 @@ auth_check_menu($auth, $sub_menu, "d");
|
|||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
$msg = "";
|
$msg = "";
|
||||||
for ($i=0; $i<count($chk); $i++)
|
for ($i = 0; $i < count($chk); $i++) {
|
||||||
{
|
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = $_POST['chk'][$i];
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
@ -30,7 +29,8 @@ for ($i=0; $i<count($chk); $i++)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg)
|
if ($msg) {
|
||||||
echo "<script type='text/javascript'> alert('$msg'); </script>";
|
echo "<script type='text/javascript'> alert('$msg'); </script>";
|
||||||
|
}
|
||||||
|
|
||||||
goto_url("./member_list.php?$qstr");
|
goto_url("./member_list.php?$qstr");
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "200100";
|
$sub_menu = "200100";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
@ -16,9 +16,7 @@ $mb_datas = array();
|
|||||||
$msg = '';
|
$msg = '';
|
||||||
|
|
||||||
if ($_POST['act_button'] == "선택수정") {
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
|
for ($i = 0; $i < count($_POST['chk']); $i++) {
|
||||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
|
||||||
{
|
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||||
|
|
||||||
@ -38,10 +36,11 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
} elseif ($member['mb_id'] == $mb['mb_id']) {
|
||||||
$msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
$msg .= $mb['mb_id'] . ' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||||
} else {
|
} else {
|
||||||
if($post_mb_certify)
|
if ($post_mb_certify) {
|
||||||
$mb_adult = isset($_POST['mb_adult'][$k]) ? (int) $_POST['mb_adult'][$k] : 0;
|
$mb_adult = isset($_POST['mb_adult'][$k]) ? (int) $_POST['mb_adult'][$k] : 0;
|
||||||
else
|
} else {
|
||||||
$mb_adult = 0;
|
$mb_adult = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " update {$g5['member_table']}
|
$sql = " update {$g5['member_table']}
|
||||||
set mb_level = '" . $post_mb_level . "',
|
set mb_level = '" . $post_mb_level . "',
|
||||||
@ -55,11 +54,8 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($_POST['act_button'] == "선택삭제") {
|
} elseif ($_POST['act_button'] == "선택삭제") {
|
||||||
|
for ($i = 0; $i < count($_POST['chk']); $i++) {
|
||||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
|
||||||
{
|
|
||||||
// 실제 번호를 넘김
|
// 실제 번호를 넘김
|
||||||
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
$k = isset($_POST['chk'][$i]) ? (int) $_POST['chk'][$i] : 0;
|
||||||
|
|
||||||
@ -80,9 +76,10 @@ if ($_POST['act_button'] == "선택수정") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($msg)
|
if ($msg) {
|
||||||
//echo '<script> alert("'.$msg.'"); </script>';
|
//echo '<script> alert("'.$msg.'"); </script>';
|
||||||
alert($msg);
|
alert($msg);
|
||||||
|
}
|
||||||
|
|
||||||
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
||||||
|
|
||||||
|
|||||||
@ -1,22 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100290";
|
$sub_menu = "100290";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super') {
|
||||||
alert_close('최고관리자만 접근 가능합니다.');
|
alert_close('최고관리자만 접근 가능합니다.');
|
||||||
|
}
|
||||||
|
|
||||||
$g5['title'] = '메뉴 추가';
|
$g5['title'] = '메뉴 추가';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
require_once G5_PATH . '/head.sub.php';
|
||||||
|
|
||||||
$new = isset($_GET['new']) ? clean_xss_tags($_GET['new'], 1, 1) : '';
|
$new = isset($_GET['new']) ? clean_xss_tags($_GET['new'], 1, 1) : '';
|
||||||
$code = isset($_GET['code']) ? preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
|
$code = isset($_GET['code']) ? (string)preg_replace('/[^0-9a-zA-Z]/', '', $_GET['code']) : '';
|
||||||
|
|
||||||
// 코드
|
// 코드
|
||||||
if ($new == 'new' || !$code) {
|
if ($new == 'new' || !$code) {
|
||||||
$code = base_convert(substr($code,0, 2), 36, 10);
|
$code = (int)base_convert(substr($code, 0, 2), 36, 10);
|
||||||
$code += 36;
|
$code += 36;
|
||||||
$code = base_convert($code, 10, 36);
|
$code = base_convert((string)$code, 10, 36);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="menu_frm" class="new_win">
|
<div id="menu_frm" class="new_win">
|
||||||
@ -78,8 +80,9 @@ $(function() {
|
|||||||
var dfd = new $.Deferred();
|
var dfd = new $.Deferred();
|
||||||
|
|
||||||
$("#menu_result").empty().load(
|
$("#menu_result").empty().load(
|
||||||
"./menu_form_search.php",
|
"./menu_form_search.php", {
|
||||||
{ type : type },
|
type: type
|
||||||
|
},
|
||||||
function() {
|
function() {
|
||||||
dfd.resolve('Finished');
|
dfd.resolve('Finished');
|
||||||
}
|
}
|
||||||
@ -114,8 +117,7 @@ $(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function add_menu_list(name, link, code)
|
function add_menu_list(name, link, code) {
|
||||||
{
|
|
||||||
var $menulist = $("#menulist", opener.document);
|
var $menulist = $("#menulist", opener.document);
|
||||||
var ms = new Date().getTime();
|
var ms = new Date().getTime();
|
||||||
var sub_menu_class;
|
var sub_menu_class;
|
||||||
@ -194,4 +196,4 @@ function add_menu_list(name, link, code)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once(G5_PATH.'/tail.sub.php');
|
require_once G5_PATH . '/tail.sub.php';
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super') {
|
||||||
die('최고관리자만 접근 가능합니다.');
|
die('최고관리자만 접근 가능합니다.');
|
||||||
|
}
|
||||||
|
|
||||||
$type = isset($_REQUEST['type']) ? preg_replace('/[^0-9a-z_]/i', '', $_REQUEST['type']) : '';
|
$type = isset($_REQUEST['type']) ? preg_replace('/[^0-9a-z_]/i', '', $_REQUEST['type']) : '';
|
||||||
|
|
||||||
@ -32,7 +33,6 @@ if($sql) {
|
|||||||
|
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
|
|
||||||
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
|
$bbs_subject_title = ($type == 'board') ? '게시판제목' : '제목';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -96,7 +96,6 @@ if($sql) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100290";
|
$sub_menu = "100290";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super') {
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
}
|
||||||
|
|
||||||
// 메뉴테이블 생성
|
// 메뉴테이블 생성
|
||||||
if (!isset($g5['menu_table'])) {
|
if (!isset($g5['menu_table'])) {
|
||||||
@ -11,7 +12,8 @@ if( !isset($g5['menu_table']) ){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) {
|
if (!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) {
|
||||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['menu_table']}` (
|
sql_query(
|
||||||
|
" CREATE TABLE IF NOT EXISTS `{$g5['menu_table']}` (
|
||||||
`me_id` int(11) NOT NULL AUTO_INCREMENT,
|
`me_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`me_code` varchar(255) NOT NULL DEFAULT '',
|
`me_code` varchar(255) NOT NULL DEFAULT '',
|
||||||
`me_name` varchar(255) NOT NULL DEFAULT '',
|
`me_name` varchar(255) NOT NULL DEFAULT '',
|
||||||
@ -21,14 +23,16 @@ if(!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) {
|
|||||||
`me_use` tinyint(4) NOT NULL DEFAULT '0',
|
`me_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`me_mobile_use` tinyint(4) NOT NULL DEFAULT '0',
|
`me_mobile_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`me_id`)
|
PRIMARY KEY (`me_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = " select * from {$g5['menu_table']} order by me_id ";
|
$sql = " select * from {$g5['menu_table']} order by me_id ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$g5['title'] = "메뉴설정";
|
$g5['title'] = "메뉴설정";
|
||||||
include_once('./admin.head.php');
|
require_once './admin.head.php';
|
||||||
|
|
||||||
$colspan = 7;
|
$colspan = 7;
|
||||||
$sub_menu_info = '';
|
$sub_menu_info = '';
|
||||||
@ -59,8 +63,7 @@ $sub_menu_info = '';
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||||
{
|
|
||||||
$bg = 'bg' . ($i % 2);
|
$bg = 'bg' . ($i % 2);
|
||||||
$sub_menu_class = '';
|
$sub_menu_class = '';
|
||||||
if (strlen($row['me_code']) == 4) {
|
if (strlen($row['me_code']) == 4) {
|
||||||
@ -118,8 +121,9 @@ $sub_menu_info = '';
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i==0)
|
if ($i == 0) {
|
||||||
echo '<tr id="empty_menu_list"><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
echo '<tr id="empty_menu_list"><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -163,8 +167,7 @@ $(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function add_menu()
|
function add_menu() {
|
||||||
{
|
|
||||||
var max_code = base_convert(0, 10, 36);
|
var max_code = base_convert(0, 10, 36);
|
||||||
$("#menulist tr.menu_list").each(function() {
|
$("#menulist tr.menu_list").each(function() {
|
||||||
var me_code = $(this).find("input[name='code[]']").val().substr(0, 2);
|
var me_code = $(this).find("input[name='code[]']").val().substr(0, 2);
|
||||||
@ -177,8 +180,7 @@ function add_menu()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_submenu(code)
|
function add_submenu(code) {
|
||||||
{
|
|
||||||
var url = "./menu_form.php?code=" + code;
|
var url = "./menu_form.php?code=" + code;
|
||||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||||
return false;
|
return false;
|
||||||
@ -195,8 +197,7 @@ function base_convert(number, frombase, tobase) {
|
|||||||
.toString(tobase | 0);
|
.toString(tobase | 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fmenulist_submit(f)
|
function fmenulist_submit(f) {
|
||||||
{
|
|
||||||
|
|
||||||
var me_links = document.getElementsByName('me_link[]');
|
var me_links = document.getElementsByName('me_link[]');
|
||||||
var reg = /^javascript/;
|
var reg = /^javascript/;
|
||||||
@ -216,4 +217,4 @@ function fmenulist_submit(f)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once ('./admin.tail.php');
|
require_once './admin.tail.php';
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "100290";
|
$sub_menu = "100290";
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
check_demo();
|
check_demo();
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super') {
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
}
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
@ -17,8 +18,7 @@ $group_code = null;
|
|||||||
$primary_code = null;
|
$primary_code = null;
|
||||||
$count = isset($_POST['code']) ? count($_POST['code']) : 0;
|
$count = isset($_POST['code']) ? count($_POST['code']) : 0;
|
||||||
|
|
||||||
for ($i=0; $i<$count; $i++)
|
for ($i = 0; $i < $count; $i++) {
|
||||||
{
|
|
||||||
$_POST = array_map_deep('trim', $_POST);
|
$_POST = array_map_deep('trim', $_POST);
|
||||||
|
|
||||||
if (preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))) {
|
if (preg_match('/^javascript/i', preg_replace('/[ ]{1,}|[\t]/', '', $_POST['me_link'][$i]))) {
|
||||||
@ -32,8 +32,9 @@ for ($i=0; $i<$count; $i++)
|
|||||||
$me_name = is_array($_POST['me_name']) ? strip_tags($_POST['me_name'][$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(clean_xss_attributes($_POST['me_link'][$i]));
|
$me_link = (preg_match('/^javascript/i', $_POST['me_link'][$i]) || preg_match('/script:/i', $_POST['me_link'][$i])) ? G5_URL : strip_tags(clean_xss_attributes($_POST['me_link'][$i]));
|
||||||
|
|
||||||
if(!$code || !$me_name || !$me_link)
|
if (!$code || !$me_name || !$me_link) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$sub_code = '';
|
$sub_code = '';
|
||||||
if ($group_code == $code) {
|
if ($group_code == $code) {
|
||||||
@ -42,9 +43,9 @@ for ($i=0; $i<$count; $i++)
|
|||||||
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
$sub_code = base_convert($row['max_me_code'], 36, 10);
|
$sub_code = (int)base_convert($row['max_me_code'], 36, 10);
|
||||||
$sub_code += 36;
|
$sub_code += 36;
|
||||||
$sub_code = base_convert($sub_code, 10, 36);
|
$sub_code = base_convert((string)$sub_code, 10, 36);
|
||||||
|
|
||||||
$me_code = $primary_code . $sub_code;
|
$me_code = $primary_code . $sub_code;
|
||||||
} else {
|
} else {
|
||||||
@ -53,9 +54,9 @@ for ($i=0; $i<$count; $i++)
|
|||||||
where LENGTH(me_code) = '2' ";
|
where LENGTH(me_code) = '2' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
$me_code = base_convert($row['max_me_code'], 36, 10);
|
$me_code = (int)base_convert($row['max_me_code'], 36, 10);
|
||||||
$me_code += 36;
|
$me_code += 36;
|
||||||
$me_code = base_convert($me_code, 10, 36);
|
$me_code = base_convert((string)$me_code, 10, 36);
|
||||||
|
|
||||||
$group_code = $code;
|
$group_code = $code;
|
||||||
$primary_code = $me_code;
|
$primary_code = $me_code;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100310';
|
$sub_menu = '100310';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
include_once(G5_EDITOR_LIB);
|
require_once G5_EDITOR_LIB;
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check_menu($auth, $sub_menu, "w");
|
||||||
|
|
||||||
$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
$nw_id = isset($_REQUEST['nw_id']) ? (string)preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
||||||
$nw = array(
|
$nw = array(
|
||||||
'nw_begin_time' => '',
|
'nw_begin_time' => '',
|
||||||
'nw_end_time' => '',
|
'nw_end_time' => '',
|
||||||
@ -20,15 +20,14 @@ $html_title = "팝업레이어";
|
|||||||
$sql = " ALTER TABLE `{$g5['new_win_table']}` ADD `nw_division` VARCHAR(10) NOT NULL DEFAULT 'both' ";
|
$sql = " ALTER TABLE `{$g5['new_win_table']}` ADD `nw_division` VARCHAR(10) NOT NULL DEFAULT 'both' ";
|
||||||
sql_query($sql, false);
|
sql_query($sql, false);
|
||||||
|
|
||||||
if ($w == "u")
|
if ($w == "u") {
|
||||||
{
|
|
||||||
$html_title .= " 수정";
|
$html_title .= " 수정";
|
||||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||||
$nw = sql_fetch($sql);
|
$nw = sql_fetch($sql);
|
||||||
if (! (isset($nw['nw_id']) && $nw['nw_id'])) alert("등록된 자료가 없습니다.");
|
if (!(isset($nw['nw_id']) && $nw['nw_id'])) {
|
||||||
|
alert("등록된 자료가 없습니다.");
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
$html_title .= " 입력";
|
$html_title .= " 입력";
|
||||||
$nw['nw_device'] = 'both';
|
$nw['nw_device'] = 'both';
|
||||||
$nw['nw_disable_hours'] = 24;
|
$nw['nw_disable_hours'] = 24;
|
||||||
@ -40,7 +39,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = $html_title;
|
$g5['title'] = $html_title;
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
require_once G5_ADMIN_PATH . '/admin.head.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
|
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
|
||||||
@ -152,8 +151,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function frmnewwin_check(f)
|
function frmnewwin_check(f) {
|
||||||
{
|
|
||||||
errmsg = "";
|
errmsg = "";
|
||||||
errfld = "";
|
errfld = "";
|
||||||
|
|
||||||
@ -171,4 +169,4 @@ function frmnewwin_check(f)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
||||||
|
|||||||
@ -1,16 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100310';
|
$sub_menu = '100310';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
$nw_id = isset($_REQUEST['nw_id']) ? preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
$nw_id = isset($_REQUEST['nw_id']) ? (string)preg_replace('/[^0-9]/', '', $_REQUEST['nw_id']) : 0;
|
||||||
|
|
||||||
if ($w == "u" || $w == "d")
|
if ($w == "u" || $w == "d") {
|
||||||
check_demo();
|
check_demo();
|
||||||
|
}
|
||||||
|
|
||||||
if ($w == 'd')
|
if ($w == 'd') {
|
||||||
auth_check_menu($auth, $sub_menu, "d");
|
auth_check_menu($auth, $sub_menu, "d");
|
||||||
else
|
} else {
|
||||||
auth_check_menu($auth, $sub_menu, "w");
|
auth_check_menu($auth, $sub_menu, "w");
|
||||||
|
}
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
@ -54,29 +56,21 @@ $sql_common = " nw_device = '{$posts['nw_device']}',
|
|||||||
nw_content = '{$posts['nw_content']}',
|
nw_content = '{$posts['nw_content']}',
|
||||||
nw_content_html = '{$posts['nw_content_html']}' ";
|
nw_content_html = '{$posts['nw_content_html']}' ";
|
||||||
|
|
||||||
if($w == "")
|
if ($w == "") {
|
||||||
{
|
|
||||||
$sql = " insert {$g5['new_win_table']} set $sql_common ";
|
$sql = " insert {$g5['new_win_table']} set $sql_common ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
$nw_id = sql_insert_id();
|
$nw_id = sql_insert_id();
|
||||||
}
|
} elseif ($w == "u") {
|
||||||
else if ($w == "u")
|
|
||||||
{
|
|
||||||
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
|
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
} elseif ($w == "d") {
|
||||||
else if ($w == "d")
|
|
||||||
{
|
|
||||||
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($w == "d")
|
if ($w == "d") {
|
||||||
{
|
|
||||||
goto_url('./newwinlist.php');
|
goto_url('./newwinlist.php');
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
|
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = '100310';
|
$sub_menu = '100310';
|
||||||
include_once('./_common.php');
|
require_once './_common.php';
|
||||||
|
|
||||||
auth_check_menu($auth, $sub_menu, "r");
|
auth_check_menu($auth, $sub_menu, "r");
|
||||||
|
|
||||||
@ -12,7 +12,8 @@ if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
|
|||||||
if (sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
|
if (sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
|
||||||
sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
|
sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
|
||||||
} else {
|
} else {
|
||||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
|
$query_cp = sql_query(
|
||||||
|
" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
|
||||||
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
|
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`nw_division` varchar(10) NOT NULL DEFAULT 'both',
|
`nw_division` varchar(10) NOT NULL DEFAULT 'both',
|
||||||
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
|
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
|
||||||
@ -27,12 +28,14 @@ if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
|
|||||||
`nw_content` text NOT NULL,
|
`nw_content` text NOT NULL,
|
||||||
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
|
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`nw_id`)
|
PRIMARY KEY (`nw_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ",
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = '팝업레이어 관리';
|
$g5['title'] = '팝업레이어 관리';
|
||||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
require_once G5_ADMIN_PATH . '/admin.head.php';
|
||||||
|
|
||||||
$sql_common = " from {$g5['new_win_table']} ";
|
$sql_common = " from {$g5['new_win_table']} ";
|
||||||
|
|
||||||
@ -115,4 +118,4 @@ $result = sql_query($sql);
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
require_once G5_ADMIN_PATH . '/admin.tail.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user