그누보드5
This commit is contained in:
5
adm/_common.php
Normal file
5
adm/_common.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
define('G5_IS_ADMIN', true);
|
||||
include_once ('../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
?>
|
||||
126
adm/admin.head.php
Normal file
126
adm/admin.head.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$begin_time = get_microtime();
|
||||
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
function print_menu1($key, $no)
|
||||
{
|
||||
global $menu;
|
||||
|
||||
$str = print_menu2($key, $no);
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function print_menu2($key, $no)
|
||||
{
|
||||
global $menu, $auth_menu, $is_admin, $auth, $g5;
|
||||
|
||||
$str .= "<ul class=\"gnb_2dul\">";
|
||||
for($i=1; $i<count($menu[$key]); $i++)
|
||||
{
|
||||
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
|
||||
continue;
|
||||
|
||||
if ($menu[$key][$i][4] == 1 && $gnb_grp_style == false) $gnb_grp_div = 'gnb_grp_div';
|
||||
else if ($menu[$key][$i][4] != 1 && $gnb_grp_style == true) $gnb_grp_div = 'gnb_grp_div';
|
||||
else $gnb_grp_div = '';
|
||||
|
||||
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
|
||||
else $gnb_grp_style = '';
|
||||
|
||||
$str .= '<li class="gnb_2dli"><a href="'.$menu[$key][$i][2].'" class="gnb_2da '.$gnb_grp_style.' '.$gnb_grp_div.'">'.$menu[$key][$i][1].'</a></li>';
|
||||
|
||||
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
|
||||
}
|
||||
$str .= "</ul>";
|
||||
|
||||
return $str;
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
var tempX = 0;
|
||||
var tempY = 0;
|
||||
|
||||
function imageview(id, w, h)
|
||||
{
|
||||
|
||||
menu(id);
|
||||
|
||||
var el_id = document.getElementById(id);
|
||||
|
||||
//submenu = eval(name+".style");
|
||||
submenu = el_id.style;
|
||||
submenu.left = tempX - ( w + 11 );
|
||||
submenu.top = tempY - ( h / 2 );
|
||||
|
||||
selectBoxVisible();
|
||||
|
||||
if (el_id.style.display != 'none')
|
||||
selectBoxHidden(id);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="to_content"><a href="#container">본문 바로가기</a></div>
|
||||
|
||||
<header id="hd">
|
||||
<div id="hd_wrap">
|
||||
<h1><?php echo $config['cf_title'] ?></h1>
|
||||
|
||||
<div id="logo"><a href="<?php echo G5_ADMIN_URL ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.jpg" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||
|
||||
<ul id="tnb">
|
||||
<li><a href="<?php echo G5_ADMIN_URL ?>/member_form.php?w=u&mb_id=<?php echo $member['mb_id'] ?>">관리자정보</a></li>
|
||||
<li><a href="<?php echo G5_ADMIN_URL ?>/config_form.php">환경설정</a></li>
|
||||
<li><a href="<?php echo G5_URL ?>/">홈페이지</a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/logout.php">로그아웃</a></li>
|
||||
</ul>
|
||||
|
||||
<nav id="gnb">
|
||||
<h2>관리자 주메뉴</h2>
|
||||
<script>$('#gnb').addClass('gnb_js');</script>
|
||||
<?php
|
||||
$gnb_str = "<ul id=\"gnb_1dul\">";
|
||||
foreach($amenu as $key=>$value) {
|
||||
$href1 = $href2 = '';
|
||||
if ($menu['menu'.$key][0][2]) {
|
||||
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
|
||||
$href2 = '</a>';
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
$current_class = "";
|
||||
if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)))
|
||||
$current_class = " gnb_1dli_air";
|
||||
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
|
||||
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
|
||||
$gnb_str .= print_menu1('menu'.$key, 1);
|
||||
$gnb_str .= "</li>";
|
||||
if ($current_class) $current_class = ""; // 클래스 반복부여 방지
|
||||
}
|
||||
$gnb_str .= "</ul>";
|
||||
echo $gnb_str;
|
||||
?>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<!-- <ul id="qnb">
|
||||
<li><a href="<?php echo G5_ADMIN_URL ?>/member_list.php">회원</a></li>
|
||||
<li><a href="<?php echo G5_ADMIN_URL ?>/board_list.php">게시판</a></li>
|
||||
<li><a href="<?php echo G5_ADMIN_URL ?>/visit_list.php">접속자</a></li>
|
||||
</ul> -->
|
||||
|
||||
<div id="container">
|
||||
<div id="text_size">
|
||||
<button class="no_text_resize" onclick="font_resize('container', 'default');">기본</button>
|
||||
<button class="no_text_resize" onclick="font_resize('container', 'large');">크게</button>
|
||||
<button class="no_text_resize" onclick="font_resize('container', 'larger');">더크게</button>
|
||||
</div>
|
||||
<h1><?php echo $g5['title'] ?></h1>
|
||||
66
adm/admin.js
Normal file
66
adm/admin.js
Normal file
@ -0,0 +1,66 @@
|
||||
function check_all(f)
|
||||
{
|
||||
var chk = document.getElementsByName("chk[]");
|
||||
|
||||
for (i=0; i<chk.length; i++)
|
||||
chk[i].checked = f.chkall.checked;
|
||||
}
|
||||
|
||||
function btn_check(f, act)
|
||||
{
|
||||
if (act == "update") // 선택수정
|
||||
{
|
||||
f.action = list_update_php;
|
||||
str = "수정";
|
||||
}
|
||||
else if (act == "delete") // 선택삭제
|
||||
{
|
||||
f.action = list_delete_php;
|
||||
str = "삭제";
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
var chk = document.getElementsByName("chk[]");
|
||||
var bchk = false;
|
||||
|
||||
for (i=0; i<chk.length; i++)
|
||||
{
|
||||
if (chk[i].checked)
|
||||
bchk = true;
|
||||
}
|
||||
|
||||
if (!bchk)
|
||||
{
|
||||
alert(str + "할 자료를 하나 이상 선택하세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (act == "delete")
|
||||
{
|
||||
if (!confirm("선택한 자료를 정말 삭제 하시겠습니까?"))
|
||||
return;
|
||||
}
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
function is_checked(elements_name)
|
||||
{
|
||||
var checked = false;
|
||||
var chk = document.getElementsByName(elements_name);
|
||||
for (var i=0; i<chk.length; i++) {
|
||||
if (chk[i].checked) {
|
||||
checked = true;
|
||||
}
|
||||
}
|
||||
return checked;
|
||||
}
|
||||
|
||||
function delete_confirm()
|
||||
{
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?"))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
269
adm/admin.lib.php
Normal file
269
adm/admin.lib.php
Normal file
@ -0,0 +1,269 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
/*
|
||||
// 081022 : CSRF 방지를 위해 코드를 작성했으나 효과가 없어 주석처리 함
|
||||
if (!get_session('ss_admin')) {
|
||||
set_session('ss_admin', true);
|
||||
goto_url('.');
|
||||
}
|
||||
*/
|
||||
|
||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
$skins = get_skin_dir($skin_gubun);
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||
$str .= option_selected($skins[$i], $selected);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
||||
function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
{
|
||||
$skins = get_skin_dir($skin_gubun, G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i=0; $i<count($skins); $i++) {
|
||||
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||
$str .= option_selected($skins[$i], $selected);
|
||||
}
|
||||
$str .= "</select>";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 스킨경로를 얻는다
|
||||
function get_skin_dir($skin, $skin_path=G5_SKIN_PATH)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$result_array = array();
|
||||
|
||||
$dirname = $skin_path.'/'.$skin.'/';
|
||||
$handle = opendir($dirname);
|
||||
while ($file = readdir($handle)) {
|
||||
if($file == '.'||$file == '..') continue;
|
||||
|
||||
if (is_dir($dirname.$file)) $result_array[] = $file;
|
||||
}
|
||||
closedir($handle);
|
||||
sort($result_array);
|
||||
|
||||
return $result_array;
|
||||
}
|
||||
|
||||
|
||||
// 회원 삭제
|
||||
function member_delete($mb_id)
|
||||
{
|
||||
global $config;
|
||||
global $g5;
|
||||
|
||||
$sql = " select mb_name, mb_nick, mb_ip, mb_recommend, mb_memo, mb_level from {$g5['member_table']} where mb_id= '".$mb_id."' ";
|
||||
$mb = sql_fetch($sql);
|
||||
if ($mb['mb_recommend']) {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['member_table']} where mb_id = '".addslashes($mb['mb_recommend'])."' ");
|
||||
if ($row['cnt'])
|
||||
insert_point($mb['mb_recommend'], $config['cf_recommend_point'] * (-1), $mb_id.'님의 회원자료 삭제로 인한 추천인 포인트 반환', "@member", $mb['mb_recommend'], $mb_id.' 추천인 삭제');
|
||||
}
|
||||
|
||||
// 회원자료는 정보만 없앤 후 아이디는 보관하여 다른 사람이 사용하지 못하도록 함 : 061025
|
||||
$sql = " update {$g5['member_table']} set mb_jumin = '', mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_password_q = '', mb_password_a = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G5_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G5_SERVER_TIME)."' where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
// 회원권한을 SELECT 형식으로 얻음
|
||||
function get_member_level_select($name, $start_id=0, $end_id=10, $selected="", $event="")
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$str = "\n<select id=\"{$name}\" name=\"{$name}\"";
|
||||
if ($event) $str .= " $event";
|
||||
$str .= ">\n";
|
||||
for ($i=$start_id; $i<=$end_id; $i++) {
|
||||
$str .= '<option value="'.$i.'"';
|
||||
if ($i == $selected)
|
||||
$str .= ' selected="selected"';
|
||||
$str .= ">{$i}</option>\n";
|
||||
}
|
||||
$str .= "</select>\n";
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 회원아이디를 SELECT 형식으로 얻음
|
||||
function get_member_id_select($name, $level, $selected="", $event="")
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_level >= '{$level}' ";
|
||||
$result = sql_query($sql);
|
||||
$str = '<select id="'.$name.'" name="'.$name.'" '.$event.'><option value="">선택안함</option>';
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$str .= '<option value="'.$row['mb_id'].'"';
|
||||
if ($row['mb_id'] == $selected) $str .= ' selected';
|
||||
$str .= '>'.$row['mb_id'].'</option>';
|
||||
}
|
||||
$str .= '</select>';
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 권한 검사
|
||||
function auth_check($auth, $attr)
|
||||
{
|
||||
global $is_admin;
|
||||
|
||||
if ($is_admin == 'super') return;
|
||||
|
||||
if (!trim($auth))
|
||||
alert('이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.');
|
||||
|
||||
$attr = strtolower($attr);
|
||||
|
||||
if (!strstr($auth, $attr)) {
|
||||
if ($attr == 'r')
|
||||
alert('읽을 권한이 없습니다.');
|
||||
else if ($attr == 'w')
|
||||
alert('입력, 추가, 생성, 수정 권한이 없습니다.');
|
||||
else if ($attr == 'd')
|
||||
alert('삭제 권한이 없습니다.');
|
||||
else
|
||||
alert('속성이 잘못 되었습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 작업아이콘 출력
|
||||
function icon($act, $link='', $target='_parent')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy');
|
||||
$icon = '<img src="'.G5_ADMIN_PATH.'/img/icon_'.$img[$act].'.gif" title="'.$act.'">';
|
||||
if ($link)
|
||||
$s = '<a href="'.$link.'">'.$icon.'</a>';
|
||||
else
|
||||
$s = $icon;
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
// rm -rf 옵션 : exec(), system() 함수를 사용할 수 없는 서버 또는 win32용 대체
|
||||
// www.php.net 참고 : pal at degerstrom dot com
|
||||
function rm_rf($file)
|
||||
{
|
||||
if (file_exists($file)) {
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
if (is_dir($file)) {
|
||||
$handle = opendir($file);
|
||||
while($filename = readdir($handle)) {
|
||||
if ($filename != '.' && $filename != '..')
|
||||
rm_rf($file.'/'.$filename);
|
||||
}
|
||||
closedir($handle);
|
||||
rmdir($file);
|
||||
} else
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
// 입력 폼 안내문
|
||||
function help($help="")
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$str = '<span class="adm_field_explain">'.str_replace("\n", "<br>", $help).'</span>';
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 출력순서
|
||||
function order_select($fld, $sel='')
|
||||
{
|
||||
$s = '<select name="'.$fld.'">';
|
||||
for ($i=1; $i<=100; $i++) {
|
||||
$s .= '<option value="'.$i.'" ';
|
||||
if ($sel) {
|
||||
if ($i == $sel) {
|
||||
$s .= 'selected';
|
||||
}
|
||||
} else {
|
||||
if ($i == 50) {
|
||||
$s .= 'selected';
|
||||
}
|
||||
}
|
||||
$s .= '>'.$i.'</option>';
|
||||
}
|
||||
$s .= '</select>';
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
// 접근 권한 검사
|
||||
if (!$member['mb_id'])
|
||||
{
|
||||
//alert('로그인 하십시오.', '$g5['bbs_path']/login.php?url=' . urlencode('$_SERVER['PHP_SELF']?w=$w&mb_id=$mb_id'));
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode($_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']));
|
||||
}
|
||||
else if ($is_admin != 'super')
|
||||
{
|
||||
$auth = array();
|
||||
$sql = " select au_menu, au_auth from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||
$result = sql_query($sql);
|
||||
for($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$auth[$row['au_menu']] = $row['au_auth'];
|
||||
}
|
||||
|
||||
if (!$i)
|
||||
{
|
||||
alert('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G5_URL);
|
||||
}
|
||||
}
|
||||
|
||||
// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
|
||||
$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
|
||||
if (get_session('ss_mb_key') !== $admin_key) {
|
||||
|
||||
session_destroy();
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
// 메일 알림
|
||||
mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n'.G5_URL, 0);
|
||||
|
||||
alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
|
||||
}
|
||||
|
||||
@ksort($auth);
|
||||
|
||||
// 가변 메뉴
|
||||
unset($auth_menu);
|
||||
unset($menu);
|
||||
unset($amenu);
|
||||
$tmp = dir(G5_ADMIN_PATH);
|
||||
while ($entry = $tmp->read()) {
|
||||
if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m))
|
||||
continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
|
||||
|
||||
$amenu[$m[1]] = $entry;
|
||||
include_once(G5_ADMIN_PATH.'/'.$entry);
|
||||
}
|
||||
@ksort($amenu);
|
||||
|
||||
$arr_query = array();
|
||||
if (isset($sst)) $arr_query[] = 'sst='.$sst;
|
||||
if (isset($sod)) $arr_query[] = 'sod='.$sod;
|
||||
if (isset($sfl)) $arr_query[] = 'sfl='.$sfl;
|
||||
if (isset($stx)) $arr_query[] = 'stx='.$stx;
|
||||
if (isset($page)) $arr_query[] = 'page='.$page;
|
||||
$qstr = implode("&", $arr_query);
|
||||
|
||||
// 관리자에서는 추가 스크립트는 사용하지 않는다.
|
||||
//$config['cf_add_script'] = '';
|
||||
?>
|
||||
18
adm/admin.menu100.php
Normal file
18
adm/admin.menu100.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$menu['menu100'] = array (
|
||||
array('100000', '환경설정', G5_ADMIN_URL.'/config_form.php', 'config'),
|
||||
array('', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
|
||||
array('', '관리권한설정', G5_ADMIN_URL.'/auth_list.php', 'cf_auth'),
|
||||
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
|
||||
//array('100400', '버전정보', G5_ADMIN_URL.'/version.php', 'cf_version'),
|
||||
array('100800', '세션파일 일괄삭제',G5_ADMIN_URL.'/session_file_delete.php', 'cf_session', 1),
|
||||
array('100900', '캐쉬파일 일괄삭제',G5_ADMIN_URL.'/cache_file_delete.php', 'cf_cache', 1),
|
||||
array('100910', '캡챠파일 일괄삭제',G5_ADMIN_URL.'/gcaptcha_file_delete.php', 'cf_captcha', 1),
|
||||
array('100920', '썸네일파일 일괄삭제',G5_ADMIN_URL.'/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
||||
array('100930', '네이버 신디케이션 핑',G5_SYNDI_URL.'/ping.php', 'cf_syndi_ping', 1),
|
||||
array('100500', 'phpinfo()', G5_ADMIN_URL.'/phpinfo.php', 'cf_phpinfo'),
|
||||
//array('100600', '업그레이드', G5_ADMIN_URL.'/upgrade.php', 'cf_upgrade'),
|
||||
//array('100700', '복구/최적화', G5_ADMIN_URL.'/repair.php', 'cf_repair'),
|
||||
//array('', 'phpMyAdmin', ''.$g5['path'].'/'.$g5['phpmyadmin_dir'].'', 'cf_phpmyadmin')
|
||||
);
|
||||
?>
|
||||
10
adm/admin.menu200.php
Normal file
10
adm/admin.menu200.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$menu['menu200'] = array (
|
||||
array('200000', '회원관리', G5_ADMIN_URL.'/member_list.php', 'member'),
|
||||
array('200100', '회원관리', G5_ADMIN_URL.'/member_list.php', 'mb_list'),
|
||||
array('200300', '회원메일발송', G5_ADMIN_URL.'/mail_list.php', 'mb_mail'),
|
||||
array('200800', '접속자집계', G5_ADMIN_URL.'/visit_list.php', 'mb_visit', 1),
|
||||
array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'),
|
||||
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll')
|
||||
);
|
||||
?>
|
||||
9
adm/admin.menu300.php
Normal file
9
adm/admin.menu300.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$menu['menu300'] = array (
|
||||
array('300000', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'board'),
|
||||
array('300100', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'bbs_board'),
|
||||
array('300200', '게시판그룹관리', ''.G5_ADMIN_URL.'/boardgroup_list.php', 'bbs_group'),
|
||||
array('300300', '인기검색어관리', ''.G5_ADMIN_URL.'/popular_list.php', 'bbs_poplist', 1),
|
||||
array('300400', '인기검색어순위', ''.G5_ADMIN_URL.'/popular_rank.php', 'bbs_poprank', 1),
|
||||
);
|
||||
?>
|
||||
130
adm/admin.tail.php
Normal file
130
adm/admin.tail.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
?>
|
||||
|
||||
<noscript>
|
||||
<p>
|
||||
귀하께서 사용하시는 브라우저는 현재 <strong>자바스크립트를 사용하지 않음</strong>으로 설정되어 있습니다.<br>
|
||||
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
||||
</p>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer id="ft">
|
||||
<p>
|
||||
Copyright © 소유하신 도메인. All rights reserved.<br>
|
||||
<a href="#">상단으로</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
|
||||
|
||||
<script src="<?php echo G5_ADMIN_URL ?>/admin.js"></script>
|
||||
<script>
|
||||
$(function(){
|
||||
var hide_menu = false;
|
||||
var mouse_event = false;
|
||||
var oldX = oldY = 0;
|
||||
|
||||
$(document).mousemove(function(e) {
|
||||
if(oldX == 0) {
|
||||
oldX = e.pageX;
|
||||
oldY = e.pageY;
|
||||
}
|
||||
|
||||
if(oldX != e.pageX || oldY != e.pageY) {
|
||||
mouse_event = true;
|
||||
}
|
||||
});
|
||||
|
||||
// 주메뉴
|
||||
var $gnb = $(".gnb_1dli > a");
|
||||
$gnb.mouseover(function() {
|
||||
if(mouse_event) {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).parent());
|
||||
hide_menu = false;
|
||||
}
|
||||
});
|
||||
|
||||
$gnb.mouseout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$(".gnb_2dli").mouseover(function() {
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$(".gnb_2dli").mouseout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$gnb.focusin(function() {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).parent());
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$gnb.focusout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$(".gnb_2da").focusin(function() {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
|
||||
menu_rearrange($(this).closest(".gnb_1dli"));
|
||||
hide_menu = false;
|
||||
});
|
||||
|
||||
$(".gnb_2da").focusout(function() {
|
||||
hide_menu = true;
|
||||
});
|
||||
|
||||
$('#gnb_1dul>li').bind('mouseleave',function(){
|
||||
submenu_hide();
|
||||
});
|
||||
|
||||
$(document).bind('click focusin',function(){
|
||||
if(hide_menu) {
|
||||
submenu_hide();
|
||||
}
|
||||
});
|
||||
|
||||
// 폰트 리사이즈 쿠키있으면 실행
|
||||
var font_resize_act = get_cookie("ck_font_resize_act");
|
||||
if(font_resize_act != "") {
|
||||
font_resize("container", font_resize_act);
|
||||
}
|
||||
});
|
||||
|
||||
function submenu_hide() {
|
||||
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||
}
|
||||
|
||||
function menu_rearrange(el)
|
||||
{
|
||||
var width = $("#gnb_1dul").width();
|
||||
var left = w1 = w2 = 0;
|
||||
var idx = $(".gnb_1dli").index(el);
|
||||
|
||||
for(i=0; i<=idx; i++) {
|
||||
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
|
||||
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
|
||||
|
||||
if((left + w2) > width) {
|
||||
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
||||
}
|
||||
|
||||
left += w1;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
242
adm/auth_list.php
Normal file
242
adm/auth_list.php
Normal file
@ -0,0 +1,242 @@
|
||||
<?php
|
||||
$sub_menu = "100200";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g5['auth_table']} a left join {$g5['member_table']} b on (a.mb_id=b.mb_id) ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "a.mb_id, au_menu";
|
||||
$sod = "";
|
||||
}
|
||||
$sql_order = " order by $sst $sod ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌 : 지운아빠 2012-10-31
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$g5['title'] = "관리권한설정";
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 5;
|
||||
?>
|
||||
|
||||
<form name="fsearch" id="fsearch" method="get">
|
||||
<input type="hidden" name="sfl" value="a.mb_id" id="sfl">
|
||||
<fieldset>
|
||||
<legend>관리권한 검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
설정된 관리권한 <?php echo number_format($total_count) ?>건
|
||||
</span>
|
||||
<strong id="msg_stx" class="msg_sound_only"></strong>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" title="회원아이디(필수)" required class="required frm_input">
|
||||
<input type="submit" value="검색" id="fsearch_submit" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>설정된 관리권한 내역</h2>
|
||||
<p>권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.</p>
|
||||
|
||||
<ul class="sort_odr">
|
||||
<li><?php echo subject_sort_link('a.mb_id') ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_nick') ?>별명<span class="sound_only"> 순 정렬</span></a></li>
|
||||
</ul>
|
||||
|
||||
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php" onsubmit="return fauthlist_submit(this);">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">메뉴</th>
|
||||
<th scope="col">권한</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
// 메뉴번호가 바뀌는 경우에 현재 없는 저장된 메뉴는 삭제함
|
||||
if (!isset($auth_menu[$row['au_menu']]))
|
||||
{
|
||||
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
||||
continue;
|
||||
}
|
||||
|
||||
$list = $i%2;
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
|
||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?>님 권한</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_mbid"><a href="?sfl=a.mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||
<td class="td_auth_mbnick"><?php echo $mb_nick ?></td>
|
||||
<td class="td_menu">
|
||||
<?php echo $row['au_menu'] ?>
|
||||
<?php echo $auth_menu[$row['au_menu']] ?>
|
||||
</td>
|
||||
<td class="td_auth"><?php echo $row['au_auth'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page=');
|
||||
echo $pagelist;
|
||||
?>
|
||||
|
||||
<?php
|
||||
//if (isset($stx))
|
||||
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
|
||||
|
||||
if (strstr($sfl, 'mb_id'))
|
||||
$mb_id = $stx;
|
||||
else
|
||||
$mb_id = '';
|
||||
?>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<section id="add_admin" class="cbox">
|
||||
<h2>관리권한 추가</h2>
|
||||
<p>다음 양식에서 회원에게 관리권한을 부여하실 수 있습니다.</p>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<strong id="msg_mb_id" class="msg_sound_only"></strong>
|
||||
<input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" title="회원아이디" required class="required frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="au_menu">접근가능메뉴<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select id="au_menu" name="au_menu" required class="required" title="접근가능메뉴">
|
||||
<option value=''>선택하세요</option>
|
||||
<?php
|
||||
foreach($auth_menu as $key=>$value)
|
||||
{
|
||||
if (!(substr($key, -3) == '000' || $key == '-' || !$key))
|
||||
echo '<option value="'.$key.'">'.$key.' '.$value.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">권한지정</th>
|
||||
<td>
|
||||
<input type="checkbox" name="r" value="r" id="r" checked>
|
||||
<label for="r">r (읽기)</label>
|
||||
<input type="checkbox" name="w" value="w" id="w">
|
||||
<label for="w">w (쓰기)</label>
|
||||
<input type="checkbox" name="d" value="d" id="d">
|
||||
<label for="d">d (삭제)</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="완료" class="btn_submit">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fauthlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
27
adm/auth_list_delete.php
Normal file
27
adm/auth_list_delete.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
$sub_menu = "100200";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if (!$count)
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $chk[$i];
|
||||
|
||||
$sql = " delete from {$g5['auth_table']} where mb_id = '{$_POST['mb_id'][$k]}' and au_menu = '{$_POST['au_menu'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
?>
|
||||
30
adm/auth_update.php
Normal file
30
adm/auth_update.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
$sub_menu = "100200";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하는 회원아이디가 아닙니다.');
|
||||
|
||||
check_token();
|
||||
|
||||
$sql = " insert into {$g5['auth_table']}
|
||||
set mb_id = '{$_POST['mb_id']}',
|
||||
au_menu = '{$_POST['au_menu']}',
|
||||
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
if (!$result) {
|
||||
$sql = " update {$g5['auth_table']}
|
||||
set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
|
||||
where mb_id = '{$_POST['mb_id']}'
|
||||
and au_menu = '{$_POST['au_menu']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
|
||||
|
||||
goto_url('./auth_list.php?'.$qstr);
|
||||
?>
|
||||
70
adm/board_copy.php
Normal file
70
adm/board_copy.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$g5['title'] = '게시판 복사';
|
||||
$administrator = 1;
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<div class="new_win">
|
||||
<h1>기존 게시판을 새 게시판으로 복사</h1>
|
||||
|
||||
<form name="fboardcopy" id="fboardcopy" action="./board_copy_update.php" onsubmit="return fboardcopy_check(this);" method="post">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>" id="bo_table">
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="col">원본 테이블명</th>
|
||||
<td><?php echo $bo_table ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="target_table">복사 테이블명<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="target_table" id="target_table" required class="required alnum_ frm_input" maxlength="20">영문자, 숫자, _ 만 가능 (공백없이)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="target_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="target_subject" value="[복사본] <?php echo $board['bo_subject'] ?>" id="target_subject" required class="required frm_input" maxlength="120"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">복사 유형</th>
|
||||
<td>
|
||||
<input type="radio" name="copy_case" value="schema_only" id="copy_case" checked>
|
||||
<label for="copy_case">구조만</label>
|
||||
<input type="radio" name="copy_case" value="schema_data_both" id="copy_case2">
|
||||
<label for="copy_case2">구조와 데이터</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
게시판을 복사하시려면 <strong>복사</strong> 버튼을, 작성을 취소하고 창을 닫으시려면 <strong>창닫기</strong> 버튼을 누르세요.
|
||||
</p>
|
||||
<input type="submit" class="btn_submit" value="복사">
|
||||
<input type="button" class="btn_cancel" value="창닫기" onclick="window.close();">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function fboardcopy_check(f)
|
||||
{
|
||||
if (f.bo_table.value == f.target_table.value) {
|
||||
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
205
adm/board_copy_update.php
Normal file
205
adm/board_copy_update.php
Normal file
@ -0,0 +1,205 @@
|
||||
<?php
|
||||
$sub_menu = '300100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$target_table = escape_trim($_POST['target_table']);
|
||||
$target_subject = escape_trim($_POST['target_subject']);
|
||||
|
||||
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||
}
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
||||
if ($row['cnt'])
|
||||
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$sql = get_table_define($g5['write_prefix'] . $bo_table);
|
||||
$sql = str_replace($g5['write_prefix'] . $bo_table, $g5['write_prefix'] . $target_table, $sql);
|
||||
sql_query($sql, false);
|
||||
|
||||
$file_copy = array();
|
||||
|
||||
// 구조만 복사시에는 공지사항 번호는 복사하지 않는다.
|
||||
if ($copy_case == 'schema_only') {
|
||||
$board['bo_notice'] = '';
|
||||
}
|
||||
|
||||
// 게시판 정보
|
||||
$sql = " insert into {$g5['board_table']}
|
||||
set bo_table = '$target_table',
|
||||
gr_id = '{$board['gr_id']}',
|
||||
bo_subject = '$target_subject',
|
||||
bo_device = '{$board['bo_device']}',
|
||||
bo_admin = '{$board['bo_admin']}',
|
||||
bo_list_level = '{$board[bo_list_level]}',
|
||||
bo_read_level = '{$board[bo_read_level]}',
|
||||
bo_write_level = '{$board[bo_write_level]}',
|
||||
bo_reply_level = '{$board[bo_reply_level]}',
|
||||
bo_comment_level = '{$board[bo_comment_level]}',
|
||||
bo_upload_level = '{$board[bo_upload_level]}',
|
||||
bo_download_level = '{$board[bo_download_level]}',
|
||||
bo_html_level = '{$board[bo_html_level]}',
|
||||
bo_link_level = '{$board[bo_link_level]}',
|
||||
bo_trackback_level = '{$board[bo_trackback_level]}',
|
||||
bo_count_modify = '{$board[bo_count_modify]}',
|
||||
bo_count_delete = '{$board[bo_count_delete]}',
|
||||
bo_read_point = '{$board[bo_read_point]}',
|
||||
bo_write_point = '{$board[bo_write_point]}',
|
||||
bo_comment_point = '{$board[bo_comment_point]}',
|
||||
bo_download_point = '{$board[bo_download_point]}',
|
||||
bo_use_category = '{$board[bo_use_category]}',
|
||||
bo_category_list = '{$board['bo_category_list']}',
|
||||
bo_disable_tags = '{$board['bo_disable_tags']}',
|
||||
bo_use_sideview = '{$board[bo_use_sideview]}',
|
||||
bo_use_file_content = '{$board[bo_use_file_content]}',
|
||||
bo_use_secret = '{$board[bo_use_secret]}',
|
||||
bo_use_dhtml_editor = '{$board[bo_use_dhtml_editor]}',
|
||||
bo_use_rss_view = '{$board[bo_use_rss_view]}',
|
||||
bo_use_good = '{$board[bo_use_good]}',
|
||||
bo_use_nogood = '{$board[bo_use_nogood]}',
|
||||
bo_use_signature = '{$board[bo_use_signature]}',
|
||||
bo_use_ip_view = '{$board[bo_use_ip_view]}',
|
||||
bo_use_list_view = '{$board['o_use_list_view']}',
|
||||
bo_use_list_content = '{$board[bo_use_list_content]}',
|
||||
bo_table_width = '{$board[bo_table_width]}',
|
||||
bo_subject_len = '{$board[bo_subject_len]}',
|
||||
bo_mobile_subject_len = '{$board[bo_mobile_subject_len]}',
|
||||
bo_page_rows = '{$board[bo_page_rows]}',
|
||||
bo_mobile_page_rows = '{$board[bo_mobile_page_rows]}',
|
||||
bo_new = '{$board[bo_new]}',
|
||||
bo_hot = '{$board[bo_hot]}',
|
||||
bo_image_width = '{$board[bo_image_width]}',
|
||||
bo_skin = '{$board['bo_skin']}',
|
||||
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||
bo_include_head = '{$board['bo_include_head']}',
|
||||
bo_include_tail = '{$board['bo_include_tail']}',
|
||||
bo_content_head = '".addslashes($board['bo_content_head'])."',
|
||||
bo_content_tail = '".addslashes($board['bo_content_tail'])."',
|
||||
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
|
||||
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
|
||||
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
|
||||
bo_gallery_cols = '{$board[bo_gallery_cols]}',
|
||||
bo_gallery_width = '{$board[bo_gallery_width]}',
|
||||
bo_gallery_height = '{$board[bo_gallery_height]}',
|
||||
bo_mobile_gallery_cols = '{$board[bo_mobile_gallery_cols]}',
|
||||
bo_mobile_gallery_width = '{$board[bo_mobile_gallery_width]}',
|
||||
bo_mobile_gallery_height = '{$board[bo_mobile_gallery_height]}',
|
||||
bo_upload_size = '{$board[bo_upload_size]}',
|
||||
bo_reply_order = '{$board[bo_reply_order]}',
|
||||
bo_use_search = '{$board[bo_use_search]}',
|
||||
bo_show_menu = '{$board[bo_show_menu]}',
|
||||
bo_order = '{$board[bo_order]}',
|
||||
bo_notice = '{$board['bo_notice']}',
|
||||
bo_upload_count = '{$board[bo_upload_count]}',
|
||||
bo_use_email = '{$board[bo_use_email]}',
|
||||
bo_use_cert = '{$board[bo_use_cert]}',
|
||||
bo_use_sns = '{$board[bo_use_sns]}',
|
||||
bo_sort_field = '{$board['bo_sort_field']}',
|
||||
bo_1_subj = '{$board['bo_1_subj']}',
|
||||
bo_2_subj = '{$board['bo_2_subj']}',
|
||||
bo_3_subj = '{$board['bo_3_subj']}',
|
||||
bo_4_subj = '{$board['bo_4_subj']}',
|
||||
bo_5_subj = '{$board['bo_5_subj']}',
|
||||
bo_6_subj = '{$board['bo_6_subj']}',
|
||||
bo_7_subj = '{$board['bo_7_subj']}',
|
||||
bo_8_subj = '{$board['bo_8_subj']}',
|
||||
bo_9_subj = '{$board['bo_9_subj']}',
|
||||
bo_10_subj = '{$board['bo_10_subj']}',
|
||||
bo_1 = '{$board['bo_1']}',
|
||||
bo_2 = '{$board['bo_2']}',
|
||||
bo_3 = '{$board['bo_3']}',
|
||||
bo_4 = '{$board['bo_4']}',
|
||||
bo_5 = '{$board['bo_5']}',
|
||||
bo_6 = '{$board['bo_6']}',
|
||||
bo_7 = '{$board['bo_7']}',
|
||||
bo_8 = '{$board['bo_8']}',
|
||||
bo_9 = '{$board['bo_9']}',
|
||||
bo_10 = '{$board['bo_10']}' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 게시판 폴더 생성
|
||||
@mkdir(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$board_path = G5_DATA_PATH.'/file/'.$target_table;
|
||||
$file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
|
||||
$copy_file = 0;
|
||||
if ($copy_case == 'schema_data_both') {
|
||||
$d = dir(G5_DATA_PATH.'/file/'.$bo_table);
|
||||
while ($entry = $d->read()) {
|
||||
if ($entry == '.' || $entry == '..') continue;
|
||||
|
||||
// 김선용 201007 :
|
||||
if(is_dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
|
||||
$dd = dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
|
||||
@mkdir(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||
while ($entry2 = $dd->read()) {
|
||||
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, G5_DIR_PERMISSION);
|
||||
$copy_file++;
|
||||
}
|
||||
$dd->close();
|
||||
}
|
||||
else {
|
||||
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||
$copy_file++;
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
|
||||
// 글복사
|
||||
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 게시글수 저장
|
||||
$sql = " select bo_count_write, bo_count_comment from {$g5['board_table']} where bo_table = '$bo_table' ";
|
||||
$row = sql_fetch($sql);
|
||||
$sql = " update {$g5['board_table']} set bo_count_write = '{$row['bo_count_write']}', bo_count_comment = '{$row['bo_count_comment']}' where bo_table = '$target_table' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 4.00.01
|
||||
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
||||
$result = sql_query($sql, false);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$file_copy[$i] = $row;
|
||||
}
|
||||
|
||||
if (count($file_copy)) {
|
||||
for ($i=0; $i<count($file_copy); $i++) {
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||
bf_source = '{$file_copy[$i]['bf_source']}',
|
||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||
bf_content = '{$file_copy[$i]['bf_content']}',
|
||||
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
}
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
delete_cache_latest($target_table);
|
||||
|
||||
echo "<script>opener.document.location.reload();</script>";
|
||||
|
||||
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||
?>
|
||||
36
adm/board_delete.inc.php
Normal file
36
adm/board_delete.inc.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
|
||||
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
if (!defined('_BOARD_DELETE_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
|
||||
if (!$tmp_bo_table) { return; }
|
||||
|
||||
// 게시판 1개는 삭제 불가 (게시판 복사를 위해서)
|
||||
//$row = sql_fetch(" select count(*) as cnt from $g5['board_table'] ");
|
||||
//if ($row['cnt'] <= 1) { return; }
|
||||
|
||||
// 게시판 설정 삭제
|
||||
sql_query(" delete from {$g5['board_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 최신글 삭제
|
||||
sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 스크랩 삭제
|
||||
sql_query(" delete from {$g5['scrap_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 파일 삭제
|
||||
sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 게시판 테이블 DROP
|
||||
sql_query(" drop table {$g5['write_prefix']}{$tmp_bo_table} ", FALSE);
|
||||
|
||||
delete_cache_latest($tmp_bo_table);
|
||||
|
||||
// 게시판 폴더 전체 삭제
|
||||
rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
|
||||
|
||||
// syndication ping
|
||||
include G5_SYNDI_PATH.'/include/include.adm.board_delete.inc.php';
|
||||
?>
|
||||
1298
adm/board_form.php
Normal file
1298
adm/board_form.php
Normal file
File diff suppressed because it is too large
Load Diff
398
adm/board_form_update.php
Normal file
398
adm/board_form_update.php
Normal file
@ -0,0 +1,398 @@
|
||||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if (!$_POST['gr_id']) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||
if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
|
||||
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
|
||||
|
||||
if ($file = $_POST['bo_include_head']) {
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('상단 파일 경로가 php, html 파일이 아닙니다.');
|
||||
}
|
||||
}
|
||||
|
||||
if ($file = $_POST['bo_include_tail']) {
|
||||
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||
alert('하단 파일 경로가 php, html 파일이 아닙니다.');
|
||||
}
|
||||
}
|
||||
|
||||
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
// 게시판 디렉토리 생성
|
||||
@mkdir($board_path, G5_DIR_PERMISSION);
|
||||
@chmod($board_path, G5_DIR_PERMISSION);
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
|
||||
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||
$src_char = array('&', '=');
|
||||
$dst_char = array('&', '〓');
|
||||
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_subject = '{$_POST['bo_subject']}',
|
||||
bo_mobile_subject = '{$_POST['bo_mobile_subject']}',
|
||||
bo_device = '{$_POST['bo_device']}',
|
||||
bo_admin = '{$_POST['bo_admin']}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
bo_write_level = '{$_POST['bo_write_level']}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level']}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level']}',
|
||||
bo_html_level = '{$_POST['bo_html_level']}',
|
||||
bo_link_level = '{$_POST['bo_link_level']}',
|
||||
bo_count_modify = '{$_POST['bo_count_modify']}',
|
||||
bo_count_delete = '{$_POST['bo_count_delete']}',
|
||||
bo_upload_level = '{$_POST['bo_upload_level']}',
|
||||
bo_download_level = '{$_POST['bo_download_level']}',
|
||||
bo_read_point = '{$_POST['bo_read_point']}',
|
||||
bo_write_point = '{$_POST['bo_write_point']}',
|
||||
bo_comment_point = '{$_POST['bo_comment_point']}',
|
||||
bo_download_point = '{$_POST['bo_download_point']}',
|
||||
bo_use_category = '{$_POST['bo_use_category']}',
|
||||
bo_category_list = '{$_POST['bo_category_list']}',
|
||||
bo_use_sideview = '{$_POST['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$_POST['bo_use_file_content']}',
|
||||
bo_use_secret = '{$_POST['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
|
||||
bo_use_good = '{$_POST['bo_use_good']}',
|
||||
bo_use_nogood = '{$_POST['bo_use_nogood']}',
|
||||
bo_use_name = '{$_POST['bo_use_name']}',
|
||||
bo_use_signature = '{$_POST['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$_POST['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$_POST['bo_use_list_view']}',
|
||||
bo_use_list_file = '{$_POST['bo_use_list_file']}',
|
||||
bo_use_list_content = '{$_POST['bo_use_list_content']}',
|
||||
bo_use_email = '{$_POST['bo_use_email']}',
|
||||
bo_use_cert = '{$_POST['bo_use_cert']}',
|
||||
bo_use_sns = '{$_POST['bo_use_sns']}',
|
||||
bo_table_width = '{$_POST['bo_table_width']}',
|
||||
bo_subject_len = '{$_POST['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$_POST['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$_POST['bo_mobile_page_rows']}',
|
||||
bo_new = '{$_POST['bo_new']}',
|
||||
bo_hot = '{$_POST['bo_hot']}',
|
||||
bo_image_width = '{$_POST['bo_image_width']}',
|
||||
bo_skin = '{$_POST['bo_skin']}',
|
||||
bo_mobile_skin = '{$_POST['bo_mobile_skin']}',
|
||||
bo_include_head = '{$_POST['bo_include_head']}',
|
||||
bo_include_tail = '{$_POST['bo_include_tail']}',
|
||||
bo_content_head = '{$_POST['bo_content_head']}',
|
||||
bo_content_tail = '{$_POST['bo_content_tail']}',
|
||||
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
|
||||
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
|
||||
bo_insert_content = '{$_POST['bo_insert_content']}',
|
||||
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$_POST['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$_POST['bo_gallery_height']}',
|
||||
bo_mobile_gallery_cols = '{$_POST['bo_mobile_gallery_cols']}',
|
||||
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
|
||||
bo_upload_count = '{$_POST['bo_upload_count']}',
|
||||
bo_upload_size = '{$_POST['bo_upload_size']}',
|
||||
bo_reply_order = '{$_POST['bo_reply_order']}',
|
||||
bo_use_search = '{$_POST['bo_use_search']}',
|
||||
bo_order = '{$_POST['bo_order']}',
|
||||
bo_show_menu = '{$_POST['bo_show_menu']}',
|
||||
bo_write_min = '{$_POST['bo_write_min']}',
|
||||
bo_write_max = '{$_POST['bo_write_max']}',
|
||||
bo_comment_min = '{$_POST['bo_comment_min']}',
|
||||
bo_comment_max = '{$_POST['bo_comment_max']}',
|
||||
bo_sort_field = '{$_POST['bo_sort_field']}',
|
||||
bo_1_subj = '{$_POST['bo_1_subj']}',
|
||||
bo_2_subj = '{$_POST['bo_2_subj']}',
|
||||
bo_3_subj = '{$_POST['bo_3_subj']}',
|
||||
bo_4_subj = '{$_POST['bo_4_subj']}',
|
||||
bo_5_subj = '{$_POST['bo_5_subj']}',
|
||||
bo_6_subj = '{$_POST['bo_6_subj']}',
|
||||
bo_7_subj = '{$_POST['bo_7_subj']}',
|
||||
bo_8_subj = '{$_POST['bo_8_subj']}',
|
||||
bo_9_subj = '{$_POST['bo_9_subj']}',
|
||||
bo_10_subj = '{$_POST['bo_10_subj']}',
|
||||
bo_1 = '{$_POST['bo_1']}',
|
||||
bo_2 = '{$_POST['bo_2']}',
|
||||
bo_3 = '{$_POST['bo_3']}',
|
||||
bo_4 = '{$_POST['bo_4']}',
|
||||
bo_5 = '{$_POST['bo_5']}',
|
||||
bo_6 = '{$_POST['bo_6']}',
|
||||
bo_7 = '{$_POST['bo_7']}',
|
||||
bo_8 = '{$_POST['bo_8']}',
|
||||
bo_9 = '{$_POST['bo_9']}',
|
||||
bo_10 = '{$_POST['bo_10']}' ";
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '{$bo_table}' ");
|
||||
if ($row['cnt'])
|
||||
alert($bo_table.' 은(는) 이미 존재하는 TABLE 입니다.');
|
||||
|
||||
$sql = " insert into {$g5['board_table']}
|
||||
set bo_table = '{$bo_table}',
|
||||
bo_count_write = '0',
|
||||
bo_count_comment = '0',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$file = file('./sql_write.sql');
|
||||
$sql = implode($file, "\n");
|
||||
|
||||
$create_table = $g5['write_prefix'] . $bo_table;
|
||||
|
||||
// sql_board.sql 파일의 테이블명을 변환
|
||||
$source = array('/__TABLE_NAME__/', '/;/');
|
||||
$target = array($create_table, '');
|
||||
$sql = preg_replace($source, $target, $sql);
|
||||
sql_query($sql, FALSE);
|
||||
|
||||
} else if ($w == 'u') {
|
||||
|
||||
// 게시판의 글 수
|
||||
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||
$row = sql_fetch($sql);
|
||||
$bo_count_write = $row['cnt'];
|
||||
|
||||
// 게시판의 코멘트 수
|
||||
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 1 ";
|
||||
$row = sql_fetch($sql);
|
||||
$bo_count_comment = $row['cnt'];
|
||||
|
||||
// 글수 조정
|
||||
/*
|
||||
엔피씨님의 팁으로 교체합니다. 130308
|
||||
http://sir.co.kr/bbs/board.php?bo_table=g5_tiptech&wr_id=27207
|
||||
*/
|
||||
if (isset($_POST['proc_count'])) {
|
||||
// 원글을 얻습니다.
|
||||
//$sql = " select wr_id from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||
$sql = " select a.wr_id, (count(b.wr_parent) - 1) as cnt from {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b where a.wr_id=b.wr_parent and a.wr_is_comment=0 group by a.wr_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
/*
|
||||
// 코멘트수를 얻습니다.
|
||||
$sql2 = " select count(*) as cnt from {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
*/
|
||||
|
||||
sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_comment = '{$row['cnt']}' where wr_id = '{$row['wr_id']}' ");
|
||||
}
|
||||
}
|
||||
|
||||
// 공지사항에는 등록되어 있지만 실제 존재하지 않는 글 아이디는 삭제합니다.
|
||||
$bo_notice = "";
|
||||
$lf = "";
|
||||
if ($board['bo_notice']) {
|
||||
$tmp_array = explode("\n", $board['bo_notice']);
|
||||
for ($i=0; $i<count($tmp_array); $i++) {
|
||||
$tmp_wr_id = trim($tmp_array[$i]);
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' ");
|
||||
if ($row['cnt'])
|
||||
{
|
||||
$bo_notice .= $lf . $tmp_wr_id;
|
||||
$lf = "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set bo_notice = '{$bo_notice}',
|
||||
bo_count_write = '{$bo_count_write}',
|
||||
bo_count_comment = '{$bo_count_comment}',
|
||||
{$sql_common}
|
||||
where bo_table = '{$bo_table}' ";
|
||||
sql_query($sql);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 같은 그룹내 게시판 동일 옵션 적용
|
||||
$grp_fields = '';
|
||||
if (is_checked('chk_grp_device')) $grp_fields .= " , bo_device = '{$bo_device}' ";
|
||||
if (is_checked('chk_grp_admin')) $grp_fields .= " , bo_admin = '{$bo_admin}' ";
|
||||
if (is_checked('chk_grp_list_level')) $grp_fields .= " , bo_list_level = '{$bo_list_level}' ";
|
||||
if (is_checked('chk_grp_read_level')) $grp_fields .= " , bo_read_level = '{$bo_read_level}' ";
|
||||
if (is_checked('chk_grp_write_level')) $grp_fields .= " , bo_write_level = '{$bo_write_level}' ";
|
||||
if (is_checked('chk_grp_reply_level')) $grp_fields .= " , bo_reply_level = '{$bo_reply_level}' ";
|
||||
if (is_checked('chk_grp_comment_level')) $grp_fields .= " , bo_comment_level = '{$bo_comment_level}' ";
|
||||
if (is_checked('chk_grp_link_level')) $grp_fields .= " , bo_link_level = '{$bo_link_level}' ";
|
||||
if (is_checked('chk_grp_upload_level')) $grp_fields .= " , bo_upload_level = '{$bo_upload_level}' ";
|
||||
if (is_checked('chk_grp_download_level')) $grp_fields .= " , bo_download_level = '{$bo_download_level}' ";
|
||||
if (is_checked('chk_grp_html_level')) $grp_fields .= " , bo_html_level = '{$bo_html_level}' ";
|
||||
if (is_checked('chk_grp_count_modify')) $grp_fields .= " , bo_count_modify = '{$bo_count_modify}' ";
|
||||
if (is_checked('chk_grp_count_delete')) $grp_fields .= " , bo_count_delete = '{$bo_count_delete}' ";
|
||||
if (is_checked('chk_grp_read_point')) $grp_fields .= " , bo_read_point = '{$bo_read_point}' ";
|
||||
if (is_checked('chk_grp_write_point')) $grp_fields .= " , bo_write_point = '{$bo_write_point}' ";
|
||||
if (is_checked('chk_grp_comment_point')) $grp_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||
if (is_checked('chk_grp_download_point')) $grp_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||
if (is_checked('chk_grp_category_list')) {
|
||||
$grp_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||
$grp_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||
}
|
||||
if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||
if (is_checked('chk_grp_use_name')) $grp_fields .= " , bo_use_name = '{$bo_use_name}' ";
|
||||
if (is_checked('chk_grp_use_signature')) $grp_fields .= " , bo_use_signature = '{$bo_use_signature}' ";
|
||||
if (is_checked('chk_grp_use_ip_view')) $grp_fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
|
||||
if (is_checked('chk_grp_use_list_view')) $grp_fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
|
||||
if (is_checked('chk_grp_use_list_file')) $grp_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
|
||||
if (is_checked('chk_grp_use_list_content')) $grp_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||
if (is_checked('chk_grp_use_email')) $grp_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_grp_use_cert')) $grp_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_grp_use_sns')) $grp_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_grp_skin')) $grp_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||
if (is_checked('chk_grp_mobile_skin')) $grp_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||
if (is_checked('chk_grp_gallery_cols')) $grp_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||
if (is_checked('chk_grp_gallery_width')) $grp_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||
if (is_checked('chk_grp_gallery_height')) $grp_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||
if (is_checked('chk_grp_mobile_gallery_cols')) $grp_fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
|
||||
if (is_checked('chk_grp_mobile_gallery_width')) $grp_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||
if (is_checked('chk_grp_page_rows')) $grp_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||
if (is_checked('chk_grp_mobile_page_rows')) $grp_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||
if (is_checked('chk_grp_subject_len')) $grp_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||
if (is_checked('chk_grp_mobile_subject_len')) $grp_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||
if (is_checked('chk_grp_new')) $grp_fields .= " , bo_new = '{$bo_new}' ";
|
||||
if (is_checked('chk_grp_hot')) $grp_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||
if (is_checked('chk_grp_image_width')) $grp_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||
if (is_checked('chk_grp_reply_order')) $grp_fields .= " , bo_reply_order = '{$bo_reply_order}' ";
|
||||
if (is_checked('chk_grp_sort_field')) $grp_fields .= " , bo_sort_field = '{$bo_sort_field}' ";
|
||||
if (is_checked('chk_grp_write_min')) $grp_fields .= " , bo_write_min = '{$bo_write_min}' ";
|
||||
if (is_checked('chk_grp_write_max')) $grp_fields .= " , bo_write_max = '{$bo_write_max}' ";
|
||||
if (is_checked('chk_grp_comment_min')) $grp_fields .= " , bo_comment_min = '{$bo_comment_min}' ";
|
||||
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
|
||||
if (is_checked('chk_grp_show_menu')) $grp_fields .= " , bo_show_menu = '{$bo_show_menu}' ";
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
if (is_checked('chk_grp_'.$i)) {
|
||||
$grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||
$grp_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||
}
|
||||
}
|
||||
|
||||
if ($grp_fields) {
|
||||
sql_query(" update {$g5['board_table']} set bo_table = bo_table {$grp_fields} where gr_id = '$gr_id' ");
|
||||
}
|
||||
|
||||
|
||||
// 모든 게시판 동일 옵션 적용
|
||||
$all_fields = '';
|
||||
if (is_checked('chk_all_device')) $all_fields .= " , bo_device = '{$bo_device}' ";
|
||||
if (is_checked('chk_all_admin')) $all_fields .= " , bo_admin = '{$bo_admin}' ";
|
||||
if (is_checked('chk_all_list_level')) $all_fields .= " , bo_list_level = '{$bo_list_level}' ";
|
||||
if (is_checked('chk_all_read_level')) $all_fields .= " , bo_read_level = '{$bo_read_level}' ";
|
||||
if (is_checked('chk_all_write_level')) $all_fields .= " , bo_write_level = '{$bo_write_level}' ";
|
||||
if (is_checked('chk_all_reply_level')) $all_fields .= " , bo_reply_level = '{$bo_reply_level}' ";
|
||||
if (is_checked('chk_all_comment_level')) $all_fields .= " , bo_comment_level = '{$bo_comment_level}' ";
|
||||
if (is_checked('chk_all_link_level')) $all_fields .= " , bo_link_level = '{$bo_link_level}' ";
|
||||
if (is_checked('chk_all_upload_level')) $all_fields .= " , bo_upload_level = '{$bo_upload_level}' ";
|
||||
if (is_checked('chk_all_download_level')) $all_fields .= " , bo_download_level = '{$bo_download_level}' ";
|
||||
if (is_checked('chk_all_html_level')) $all_fields .= " , bo_html_level = '{$bo_html_level}' ";
|
||||
if (is_checked('chk_all_count_modify')) $all_fields .= " , bo_count_modify = '{$bo_count_modify}' ";
|
||||
if (is_checked('chk_all_count_delete')) $all_fields .= " , bo_count_delete = '{$bo_count_delete}' ";
|
||||
if (is_checked('chk_all_read_point')) $all_fields .= " , bo_read_point = '{$bo_read_point}' ";
|
||||
if (is_checked('chk_all_write_point')) $all_fields .= " , bo_write_point = '{$bo_write_point}' ";
|
||||
if (is_checked('chk_all_comment_point')) $all_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||
if (is_checked('chk_all_download_point')) $all_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||
if (is_checked('chk_all_category_list')) {
|
||||
$all_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||
$all_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||
}
|
||||
if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||
if (is_checked('chk_all_use_name')) $all_fields .= " , bo_use_name = '{$bo_use_name}' ";
|
||||
if (is_checked('chk_all_use_signature')) $all_fields .= " , bo_use_signature = '{$bo_use_signature}' ";
|
||||
if (is_checked('chk_all_use_ip_view')) $all_fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
|
||||
if (is_checked('chk_all_use_list_view')) $all_fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
|
||||
if (is_checked('chk_all_use_list_file')) $all_fields .= " , bo_use_list_view = '{$bo_use_list_file}' ";
|
||||
if (is_checked('chk_all_use_list_content')) $all_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||
if (is_checked('chk_all_use_email')) $all_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_all_use_cert')) $all_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_all_use_sns')) $all_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_all_skin')) $all_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||
if (is_checked('chk_all_mobile_skin')) $all_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||
if (is_checked('chk_all_gallery_cols')) $all_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||
if (is_checked('chk_all_gallery_width')) $all_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||
if (is_checked('chk_all_gallery_height')) $all_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||
if (is_checked('chk_all_mobile_gallery_cols')) $all_fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
|
||||
if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||
if (is_checked('chk_all_mobile_gallery_height'))$all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||
if (is_checked('chk_all_page_rows')) $all_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||
if (is_checked('chk_all_mobile_page_rows')) $all_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||
if (is_checked('chk_all_subject_len')) $all_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||
if (is_checked('chk_all_mobile_subject_len')) $all_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||
if (is_checked('chk_all_new')) $all_fields .= " , bo_new = '{$bo_new}' ";
|
||||
if (is_checked('chk_all_hot')) $all_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||
if (is_checked('chk_all_image_width')) $all_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||
if (is_checked('chk_all_reply_order')) $all_fields .= " , bo_reply_order = '{$bo_reply_order}' ";
|
||||
if (is_checked('chk_all_sort_field')) $all_fields .= " , bo_sort_field = '{$bo_sort_field}' ";
|
||||
if (is_checked('chk_all_write_min')) $all_fields .= " , bo_write_min = '{$bo_write_min}' ";
|
||||
if (is_checked('chk_all_write_max')) $all_fields .= " , bo_write_max = '{$bo_write_max}' ";
|
||||
if (is_checked('chk_all_comment_min')) $all_fields .= " , bo_comment_min = '{$bo_comment_min}' ";
|
||||
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
|
||||
if (is_checked('chk_all_show_menu')) $all_fields .= " , bo_show_menu = '{$bo_show_menu}' ";
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
if (is_checked('chk_all_'.$i)) {
|
||||
$all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||
$all_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||
}
|
||||
}
|
||||
|
||||
if ($all_fields) {
|
||||
sql_query(" update {$g5['board_table']} set bo_table = bo_table {$all_fields} ");
|
||||
}
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
// syndication ping
|
||||
include G5_SYNDI_PATH.'/include/include.adm.board_form_update.php';
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
?>
|
||||
224
adm/board_list.php
Normal file
224
adm/board_list.php
Normal file
@ -0,0 +1,224 @@
|
||||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['board_table']} a ";
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($is_admin != "super") {
|
||||
$sql_common .= " , {$g5['group_table']} b ";
|
||||
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
|
||||
}
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case "bo_table" :
|
||||
$sql_search .= " ($sfl like '$stx%') ";
|
||||
break;
|
||||
case "a.gr_id" :
|
||||
$sql_search .= " ($sfl = '$stx') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ($sfl like '%$stx%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "a.gr_id, a.bo_table";
|
||||
$sod = "asc";
|
||||
}
|
||||
$sql_order = " order by $sst $sod ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$g5['title'] = '게시판관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 15;
|
||||
?>
|
||||
|
||||
<form name="fsearch" id="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>게시판 검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
생성된 게시판수 <?php echo number_format($total_count) ?>개
|
||||
</span>
|
||||
<select name="sfl" title="검색대상">
|
||||
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_subject", true); ?>>TABLE</option>
|
||||
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
|
||||
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>생성된 게시판 목록</h2>
|
||||
<p>여러개의 게시판 설정을 한번에 바꾸실 때는 게시판 체크기능을 이용하세요.</p>
|
||||
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<div class="btn_add sort_with">
|
||||
<a href="./board_form.php" id="bo_add">게시판 추가</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="sort_odr">
|
||||
<li><?php echo subject_sort_link('a.gr_id') ?>그룹<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_table') ?>TABLE<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<span class="sound_only"> 스킨 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_subject') ?>제목<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_use_sns') ?>SNS<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_use_search') ?>검색사용<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_show_menu') ?>메뉴보임<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('bo_order') ?>출력순서<span class="sound_only"> 순 정렬</span></a></li>
|
||||
</ul>
|
||||
|
||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<table class="tbl_bo_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">게시판 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">TABLE</th>
|
||||
<th scope="col">스킨</th>
|
||||
<th scope="col">모바일<br>스킨</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">읽기P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">다운P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">SNS<br>사용</th>
|
||||
<th scope="col">검색<br>사용</th>
|
||||
<th scope="col">메뉴<br>보임</th>
|
||||
<th scope="col">출력<br>순서</th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$one_update = '<a href="./board_form.php?w=u&bo_table='.$row['bo_table'].'&'.$qstr.'">수정</a>';
|
||||
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy" target="win_board_copy">복사</a>';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<?php echo get_group_select("gr_id[$i]", $row['gr_id']) ?>
|
||||
<?php }else{ ?>
|
||||
<input type="hidden" name="gr_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="td_boid">
|
||||
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo get_mobile_skin_select('board', 'bo_mobile_skin_'.$i, "bo_mobile_skin[$i]", $row['bo_mobile_skin']); ?>
|
||||
</td>
|
||||
<td><input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject[<?php echo $i ?>]" title="게시판제목" class="required frm_input" size="10" required="required"></td>
|
||||
<td><input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" title="읽기포인트" class="frm_input" size="2"></td>
|
||||
<td><input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" title="쓰기포인트" class="frm_input" size="2"></td>
|
||||
<td><input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" title="댓글포인트" class="frm_input" size="2"></td>
|
||||
<td><input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" title="다운포인트" class="frm_input" size="2"></td>
|
||||
<td><input type="checkbox" name="bo_use_sns[<?php echo $i ?>]" value="1" id="bo_use_sns<?php echo $i ?>" <?php echo $row['bo_use_sns']?"checked":"" ?> title="선택시 SNS 사용"></td>
|
||||
<td><input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search']?"checked":"" ?> title="선택시 검색사용"></td>
|
||||
<td><input type="checkbox" name="bo_show_menu[<?php echo $i ?>]" value="1" id="bo_show_menu_<?php echo $i ?>" <?php echo $row['bo_show_menu']?"checked":"" ?> title="선택시 메뉴보이기"></td>
|
||||
<td><input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order<?php echo $i ?>" title="출력순서" class="frm_input" size="2"></td>
|
||||
<td>
|
||||
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>" title="접속기기 선택">
|
||||
<option value="both"<?php echo get_selected($row['bo_device'], 'both', true); ?>>모두</option>
|
||||
<option value="pc"<?php echo get_selected($row['bo_device'], 'pc'); ?>>PC</option>
|
||||
<option value="mobile"<?php echo get_selected($row['bo_device'], 'mobile'); ?>>모바일</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><?php echo $one_update ?> <?php echo $one_copy ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page='); ?>
|
||||
|
||||
<script>
|
||||
function fboardlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$(".board_copy").click(function(){
|
||||
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
73
adm/board_list_update.php
Normal file
73
adm/board_list_update.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
$sub_menu = "300100";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||
and a.gr_id = b.gr_id
|
||||
and b.gr_admin = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt'])
|
||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
|
||||
}
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_device = '{$_POST['bo_device'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_mobile_skin = '{$_POST['bo_mobile_skin'][$k]}',
|
||||
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
|
||||
bo_download_point = '{$_POST['bo_download_point'][$k]}',
|
||||
bo_use_search = '{$_POST['bo_use_search'][$k]}',
|
||||
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
|
||||
bo_show_menu = '{$_POST['bo_show_menu'][$k]}',
|
||||
bo_order = '{$_POST['bo_order'][$k]}'
|
||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||
define('_BOARD_DELETE_', true);
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// include 전에 $bo_table 값을 반드시 넘겨야 함
|
||||
$tmp_bo_table = escape_trim($_POST['board_table'][$k]);
|
||||
include ('./board_delete.inc.php');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
goto_url('./board_list.php?'.$qstr);
|
||||
?>
|
||||
159
adm/boardgroup_form.php
Normal file
159
adm/boardgroup_form.php
Normal file
@ -0,0 +1,159 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$html_title = '게시판그룹';
|
||||
if ($w == '') {
|
||||
$gr_id_attr = 'required';
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
$gr['gr_use_access'] = 0;
|
||||
$html_title .= ' 생성';
|
||||
} else if ($w == 'u') {
|
||||
$gr_id_attr = 'readonly';
|
||||
$gr = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
$html_title .= ' 수정';
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
if (!isset($group['gr_device'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||
}
|
||||
|
||||
if (!isset($group['gr_show_menu'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['group_table']}` ADD `gr_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `gr_use_access`, ADD `gr_order` INT NOT NULL DEFAULT '0' AFTER `gr_show_menu` ", false);
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="cbox">
|
||||
<p>
|
||||
게시판을 생성하시려면 1개 이상의 게시판그룹이 필요합니다.<br>
|
||||
게시판그룹을 이용하시면 더 효과적으로 게시판을 관리할 수 있습니다.
|
||||
</p>
|
||||
<form name="fboardgroup" id="fboardgroup" action="./boardgroup_form_update.php" onsubmit="return fboardgroup_check(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<table id="frm_gr" class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_id">그룹 ID<?php echo $sound_only ?></label></th>
|
||||
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" class="<?php echo $gr_id_attr ?> alnum_ frm_input" maxlength="10">
|
||||
<?php
|
||||
if ($w=='')
|
||||
echo '영문자, 숫자, _ 만 가능 (공백없이)';
|
||||
else
|
||||
echo '<a href="'.G5_BBS_URL.'/group.php?gr_id='.$group['gr_id'].'" class="btn_frmline">게시판그룹 바로가기</a>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_subject">그룹 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80">
|
||||
<?php
|
||||
if ($w == 'u')
|
||||
echo '<a href="./board_form.php?gr_id='.$gr_id.'" class="btn_frmline">게시판생성</a>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_device">접속기기</label></th>
|
||||
<td>
|
||||
<?php echo help("PC 와 모바일 사용을 구분합니다.") ?>
|
||||
<select id="gr_device" name="gr_device">
|
||||
<option value="both"<?php echo get_selected($group['gr_device'], 'both', true); ?>>PC와 모바일에서 모두 사용</option>
|
||||
<option value="pc"<?php echo get_selected($group['gr_device'], 'pc'); ?>>PC 전용</option>
|
||||
<option value="mobile"<?php echo get_selected($group['gr_device'], 'mobile'); ?>>모바일 전용</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_admin">그룹 관리자</label></th>
|
||||
<td>
|
||||
<?php
|
||||
if ($is_admin == 'super')
|
||||
echo '<input type="text" id="gr_admin" name="gr_admin" class="frm_input" value="'.$gr['gr_admin'].'" maxlength="20">';
|
||||
else
|
||||
echo '<input type="hidden" id="gr_admin" name="gr_admin" value="'.$gr['gr_admin'].'">'.$gr['gr_admin'];
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_use_access">접근회원사용</label></th>
|
||||
<td>
|
||||
<?php echo help("사용에 체크하시면 이 그룹에 속한 게시판은 접근가능한 회원만 접근이 가능합니다.") ?>
|
||||
<input type="checkbox" name="gr_use_access" value="1" id="gr_use_access" <?php echo $gr['gr_use_access']?'checked':''; ?>>
|
||||
사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">접근회원수</th>
|
||||
<td>
|
||||
<?php
|
||||
// 접근회원수
|
||||
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$gr_id}' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
echo '<a href="./boardgroupmember_list.php?gr_id='.$gr_id.'">'.$row1['cnt'].'</a>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_show_menu">메뉴보이기</label></th>
|
||||
<td>
|
||||
<?php echo help("사용에 체크하시면 게시판그룹 제목을 메뉴에 출력합니다.") ?>
|
||||
<input type="checkbox" name="gr_show_menu" value="1" id="gr_show_menu" <?php echo $gr['gr_show_menu']?'checked':''; ?>>
|
||||
사용
|
||||
</td>
|
||||
</tr>
|
||||
<?php for ($i=1;$i<=10;$i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_gr_extra">
|
||||
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo get_text($group['gr_'.$i.'_subj']) ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
||||
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
|
||||
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo $gr['gr_'.$i] ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||
</p>
|
||||
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||
<a href="./boardgroup_list.php?<?php echo $qstr ?>">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function fboardgroup_check(f)
|
||||
{
|
||||
f.action = './boardgroup_form_update.php';
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
73
adm/boardgroup_form_update.php
Normal file
73
adm/boardgroup_form_update.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
||||
alert('그룹 ID는 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (10자 이내)');
|
||||
|
||||
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||
|
||||
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
||||
gr_device = '{$_POST['gr_device']}',
|
||||
gr_admin = '{$_POST['gr_admin']}',
|
||||
gr_show_menu = '{$_POST['gr_show_menu']}',
|
||||
gr_1_subj = '{$_POST['gr_1_subj']}',
|
||||
gr_2_subj = '{$_POST['gr_2_subj']}',
|
||||
gr_3_subj = '{$_POST['gr_3_subj']}',
|
||||
gr_4_subj = '{$_POST['gr_4_subj']}',
|
||||
gr_5_subj = '{$_POST['gr_5_subj']}',
|
||||
gr_6_subj = '{$_POST['gr_6_subj']}',
|
||||
gr_7_subj = '{$_POST['gr_7_subj']}',
|
||||
gr_8_subj = '{$_POST['gr_8_subj']}',
|
||||
gr_9_subj = '{$_POST['gr_9_subj']}',
|
||||
gr_10_subj = '{$_POST['gr_10_subj']}',
|
||||
gr_1 = '{$_POST['gr_1']}',
|
||||
gr_2 = '{$_POST['gr_2']}',
|
||||
gr_3 = '{$_POST['gr_3']}',
|
||||
gr_4 = '{$_POST['gr_4']}',
|
||||
gr_5 = '{$_POST['gr_5']}',
|
||||
gr_6 = '{$_POST['gr_6']}',
|
||||
gr_7 = '{$_POST['gr_7']}',
|
||||
gr_8 = '{$_POST['gr_8']}',
|
||||
gr_9 = '{$_POST['gr_9']}',
|
||||
gr_10 = '{$_POST['gr_10']}' ";
|
||||
if (isset($_POST['gr_use_access']))
|
||||
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
|
||||
else
|
||||
$sql_common .= ", gr_use_access = '' ";
|
||||
|
||||
if ($w == '') {
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$_POST['gr_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt'])
|
||||
alert('이미 존재하는 그룹 ID 입니다.');
|
||||
|
||||
$sql = " insert into {$g5['group_table']}
|
||||
set gr_id = '{$_POST['gr_id']}',
|
||||
{$sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
} else if ($w == "u") {
|
||||
|
||||
$sql = " update {$g5['group_table']}
|
||||
set {$sql_common}
|
||||
where gr_id = '{$_POST['gr_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
} else {
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
// syndication ping
|
||||
include G5_SYNDI_PATH.'/include/include.adm.boardgroup_form_update.php';
|
||||
|
||||
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||
?>
|
||||
217
adm/boardgroup_list.php
Normal file
217
adm/boardgroup_list.php
Normal file
@ -0,0 +1,217 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (!isset($group['gr_device'])) {
|
||||
// 게시판 그룹 사용 필드 추가
|
||||
// both : pc, mobile 둘다 사용
|
||||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g5['board_group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['group_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($is_admin != 'super')
|
||||
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case "gr_id" :
|
||||
case "gr_admin" :
|
||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if ($sst)
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
else
|
||||
$sql_order = " order by gr_id asc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>';
|
||||
|
||||
$g5['title'] = '게시판그룹설정';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 8;
|
||||
?>
|
||||
|
||||
<form id="fsearch" name="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>그룹 검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
생성된 그룹수 <?php echo number_format($total_count) ?>개
|
||||
</span>
|
||||
<select name="sfl" title="검색대상">
|
||||
<option value="gr_subject"<?php echo get_selected($_GET['sfl'], "gr_subject"); ?>>제목</option>
|
||||
<option value="gr_id"<?php echo get_selected($_GET['sfl'], "gr_id"); ?>>ID</option>
|
||||
<option value="gr_admin"<?php echo get_selected($_GET['sfl'], "gr_admin"); ?>>그룹관리자</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>게시판그룹 목록</h2>
|
||||
<p>
|
||||
접근사용 옵션을 설정하시면 관리자가 지정한 회원만 해당 그룹에 접근할 수 있습니다.<br>
|
||||
접근사용 옵션은 해당 그룹에 속한 모든 게시판에 적용됩니다.
|
||||
</p>
|
||||
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<div class="btn_add sort_with">
|
||||
<a href="./boardgroup_form.php" id="bo_gr_add">게시판그룹 추가</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="sort_odr">
|
||||
<li><?php echo subject_sort_link('gr_id') ?>그룹아이디<span class="sound_only"> 순 정렬</span></a></th>
|
||||
<li><?php echo subject_sort_link('gr_subject') ?>제목<span class="sound_only"> 순 정렬</span></a></th>
|
||||
<?php if ($is_admin == 'super'){ ?><li><?php echo subject_sort_link('gr_admin') ?>그룹관리자<span class="sound_only"> 순 정렬</span></a></th><?php } ?>
|
||||
<li><?php echo subject_sort_link('gr_order') ?>출력순서<span class="sound_only"> 순 정렬</span></a></th>
|
||||
</ul>
|
||||
|
||||
<form name="fboardgrouplist" id="fboardgrouplist" action="./boardgroup_list_update.php" onsubmit="return fboardgrouplist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<table class="tbl_gr_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">그룹 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">그룹아이디</th>
|
||||
<th scope="col">제목</th>
|
||||
<?php if ($is_admin == 'super'){ ?><th scope="col">그룹관리자</th><?php } ?>
|
||||
<th scope="col">게시판<br>갯수</th>
|
||||
<th scope="col">접근<br>사용</th>
|
||||
<th scope="col">접근<br>회원수</th>
|
||||
<th scope="col">메뉴<br>보임</th>
|
||||
<th scope="col">출력<br>순서</th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 접근회원수
|
||||
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$row['gr_id']}' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
|
||||
// 게시판수
|
||||
$sql2 = " select count(*) as cnt from {$g5['board_table']} where gr_id = '{$row['gr_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
|
||||
$s_upd = '<a href="./boardgroup_form.php?'.$qstr.'&w=u&gr_id='.$row['gr_id'].'">수정</a>';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_grid"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td>
|
||||
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" title="그룹제목 수정" class="frm_input">
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>" id="gr_admin_<?php echo $i ?>" title="그룹관리자 수정" class="frm_input" size="10" maxlength="20">
|
||||
<?php }else{ ?>
|
||||
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>"><td><?php echo $row['gr_admin'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
||||
<td><input type="checkbox" name="gr_use_access[<?php echo $i ?>]" <?php echo $row['gr_use_access']?'checked':'' ?> value="1" id="gr_use_access_<?php echo $i ?>" title="선택 시 접근회원 사용"></td>
|
||||
<td><a href="./boardgroupmember_list.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row1['cnt'] ?></a></td>
|
||||
<td><input type="checkbox" name="gr_show_menu[<?php echo $i ?>]" <?php echo $row['gr_show_menu']?'checked':'' ?> value="1" id="gr_show_menu_<?php echo $i ?>" title="선택 시 메뉴보이기"></td>
|
||||
<td>
|
||||
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" title="출력순서 수정" class="frm_input" size="2">
|
||||
</td>
|
||||
<td>
|
||||
<select id="gr_device_<?php echo $i ?>" name="gr_device[<?php echo $i ?>]" title="접속기기 선택">
|
||||
<option value="both"<?php echo get_selected($row['gr_device'], 'both'); ?>>모두</option>
|
||||
<option value="pc"<?php echo get_selected($row['gr_device'], 'pc'); ?>>PC</option>
|
||||
<option value="mobile"<?php echo get_selected($row['gr_device'], 'mobile'); ?>>모바일</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_smallmng"><?php echo $s_upd ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정">
|
||||
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제">
|
||||
<a href="./boardgroup_form.php">게시판그룹 추가</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page=');
|
||||
echo $pagelist;
|
||||
?>
|
||||
|
||||
<script>
|
||||
function fboardgrouplist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
47
adm/boardgroup_list_update.php
Normal file
47
adm/boardgroup_list_update.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
//print_r2($_POST); exit;
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i];
|
||||
$gr_id = $_POST['group_id'][$k];
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
$sql = " update {$g5['group_table']}
|
||||
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||
gr_device = '{$_POST['gr_device'][$k]}',
|
||||
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||
gr_use_access = '{$_POST['gr_use_access'][$k]}',
|
||||
gr_show_menu = '{$_POST['gr_show_menu'][$k]}',
|
||||
gr_order = '{$_POST['gr_order'][$k]}'
|
||||
where gr_id = '{$gr_id}' ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||
sql_query($sql);
|
||||
} else if($_POST['act_button'] == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||
if ($row['cnt'])
|
||||
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||
|
||||
// 그룹 삭제
|
||||
sql_query(" delete from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||
|
||||
// 그룹접근 회원 삭제
|
||||
sql_query(" delete from {$g5['group_member_table']} where gr_id = '$gr_id' ");
|
||||
}
|
||||
}
|
||||
|
||||
goto_url('./boardgroup_list.php?'.$qstr);
|
||||
?>
|
||||
124
adm/boardgroupmember_form.php
Normal file
124
adm/boardgroupmember_form.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
|
||||
$g5['title'] = '회원별 접근가능그룹';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 4;
|
||||
?>
|
||||
|
||||
<div class="cbox">
|
||||
<p>아이디 <?php echo $mb['mb_id'] ?>, 이름 <?php echo $mb['mb_name'] ?>, 별명 <?php echo $mb['mb_nick'] ?>님이 접근가능한 그룹 목록</p>
|
||||
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>" id="sst">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>" id="sod">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>" id="sfl">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>" id="stx">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>" id="page">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||
<input type="hidden" name="w" value="d" id="w">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 접근가능그룹 전체선택" onclick="check_all(this.form)"></th>
|
||||
<th scope="col">그룹아이디</th>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">처리일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select * from {$g5['group_member_table']} a, {$g5['group_table']} b
|
||||
where a.mb_id = '{$mb['mb_id']}'
|
||||
and a.gr_id = b.gr_id ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and b.gr_admin = '{$member['mb_id']}' ";
|
||||
$sql .= " order by a.gr_id desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$s_del = '<a href="javascript:post_delete(\'boardgroupmember_update.php\', \''.$row['gm_id'].'\');">삭제</a>';
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk"><input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>" title="<?php echo $row['gr_subject'] ?> 그룹 선택"></td>
|
||||
<td class="td_grid"><a href="<?php echo $g5['bbs_path'] ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||
<td class="td_time"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">접근가능한 그룹이 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form name="fboardgroupmember_form" id="fboardgroupmember_form" action="./boardgroupmember_update.php" onsubmit="return boardgroupmember_form_check(this)" method="post">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
<fieldset>
|
||||
<legend><?php echo $mb['mb_id'] ?>님 접근가능그룹 추가</legend>
|
||||
<label for="gr_id">그룹지정</label>
|
||||
<select name="gr_id" id="gr_id">
|
||||
<option value="">접근가능 그룹을 선택하세요.</option>
|
||||
<?php
|
||||
$sql = " select *
|
||||
from {$g5['group_table']}
|
||||
where gr_use_access = 1 ";
|
||||
//if ($is_admin == 'group') {
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$member['mb_id']}' ";
|
||||
$sql .= " order by gr_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
echo "<option value=\"".$row['gr_id']."\">".$row['gr_subject']."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="submit" value="선택" class="btn_submit" accesskey="s">
|
||||
<p>게시판 그룹이 존재하지 않는다면 <a href="./boardgroup_form.php">게시판그룹생성하기</a></p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fboardgroupmember_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function boardgroupmember_form_check(f)
|
||||
{
|
||||
if (f.gr_id.value == '') {
|
||||
alert('접근가능 그룹을 선택하세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
167
adm/boardgroupmember_list.php
Normal file
167
adm/boardgroupmember_list.php
Normal file
@ -0,0 +1,167 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$gr = get_group($gr_id);
|
||||
if (!$gr['gr_id']) {
|
||||
alert('존재하지 않는 그룹입니다.');
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['group_member_table']} a
|
||||
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
|
||||
|
||||
$sql_search = " where gr_id = '{$gr_id}' ";
|
||||
// 회원아이디로 검색되지 않던 오류를 수정
|
||||
if (isset($stx) && $stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default :
|
||||
$sql_search .= " ($sfl like '%$stx%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "gm_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g5['title'] = $gr['gr_subject'].' 그룹 접근가능회원';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<form name="fsearch" id="fsearch" method="get">
|
||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||
<fieldset>
|
||||
<legend><?php echo $gr['gr_subject'] ?>(아이디 <?php echo $gr['gr_id'] ?>)에서 검색</legend>
|
||||
<label for="sfl">검색대상</label>
|
||||
<select id="sfl" name="sfl">
|
||||
<option value="a.mb_id"<?php echo get_selected($_GET['sfl'], "a.mb_id") ?>>회원아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2><?php echo $gr['gr_subject'] ?> 그룹 접근가능 회원 목록 (그룹아이디:<?php echo $gr['gr_id'] ?>)</h2>
|
||||
|
||||
<ul class="sort_odr">
|
||||
<li><?php echo subject_sort_link('b.mb_id', 'gr_id='.$gr_id) ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('b.mb_name', 'gr_id='.$gr_id) ?>이름<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('b.mb_nick', 'gr_id='.$gr_id) ?>별명<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('b.mb_today_login', 'gr_id='.$gr_id) ?>최종접속<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('a.gm_datetime', 'gr_id='.$gr_id) ?>처리일시<span class="sound_only"> 순 정렬</span></a></li>
|
||||
</ul>
|
||||
|
||||
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||
<input type="hidden" name="w" value="ld">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">접근가능회원 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">최종접속</th>
|
||||
<th scope="col">처리일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
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']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt'])
|
||||
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||
|
||||
//$s_del = '<a href="javascript:post_delete(\'boardgroupmember_update.php\', \''.$row['gm_id'].'\');">삭제</a>';
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_grid"><?php echo $group ?></td>
|
||||
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||
<td class="td_name sv_use"><?php echo $mb_nick ?></td>
|
||||
<td class="td_time"><?php echo substr($row['mb_today_login'],2,8) ?></td>
|
||||
<td class="td_time"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
{
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&gr_id=$gr_id&page="); ?>
|
||||
|
||||
<script>
|
||||
function fboardgroupmember_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
70
adm/boardgroupmember_update.php
Normal file
70
adm/boardgroupmember_update.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
sql_query(" ALTER TABLE {$g5['group_member_table']} CHANGE `gm_id` `gm_id` INT( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ", false);
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id']) {
|
||||
alert('존재하지 않는 회원입니다.');
|
||||
}
|
||||
|
||||
$gr = get_group($gr_id);
|
||||
if (!$gr['gr_id']) {
|
||||
alert('존재하지 않는 그룹입니다.');
|
||||
}
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
from {$g5['group_member_table']}
|
||||
where gr_id = '{$gr_id}'
|
||||
and mb_id = '{$mb_id}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt']) {
|
||||
alert('이미 등록되어 있는 자료입니다.');
|
||||
}
|
||||
else
|
||||
{
|
||||
check_token();
|
||||
|
||||
$sql = " insert into {$g5['group_member_table']}
|
||||
set gr_id = '{$_POST['gr_id']}',
|
||||
mb_id = '{$_POST['mb_id']}',
|
||||
gm_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
else if ($w == 'd' || $w == 'ld')
|
||||
{
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if(!$count)
|
||||
alert('삭제할 목록을 하나이상 선택해 주세요.');
|
||||
|
||||
check_token();
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$gm_id = $_POST['chk'][$i];
|
||||
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||
$gm = sql_fetch($sql);
|
||||
if (!$gm['gm_id']) {
|
||||
if($count == 1)
|
||||
alert('존재하지 않는 자료입니다.');
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
$sql = " delete from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if ($w == 'ld')
|
||||
goto_url('./boardgroupmember_list.php?gr_id='.$gr_id);
|
||||
else
|
||||
goto_url('./boardgroupmember_form.php?mb_id='.$mb_id);
|
||||
?>
|
||||
47
adm/cache_file_delete.php
Normal file
47
adm/cache_file_delete.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
$sub_menu = '100900';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '캐시파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div id="cache_del">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/latest-*');
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $cache_file) {
|
||||
$cnt++;
|
||||
unlink($cache_file);
|
||||
echo '<li>'.$cache_file.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<p><span>최신글 캐시파일 '.$cnt.'건 삭제가 완료됐습니다.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>'.PHP_EOL;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
965
adm/config_form.php
Normal file
965
adm/config_form.php
Normal file
@ -0,0 +1,965 @@
|
||||
<?php
|
||||
$sub_menu = "100100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
if (!isset($config['cf_include_index'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_include_index` VARCHAR(255) NOT NULL AFTER `cf_admin`,
|
||||
ADD `cf_include_head` VARCHAR(255) NOT NULL AFTER `cf_include_index`,
|
||||
ADD `cf_include_tail` VARCHAR(255) NOT NULL AFTER `cf_include_head`,
|
||||
ADD `cf_add_script` TEXT NOT NULL AFTER `cf_include_tail` ", true);
|
||||
}
|
||||
|
||||
if (!isset($config['cf_mobile_new_skin'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_mobile_new_skin` VARCHAR(255) NOT NULL AFTER `cf_memo_send_point`,
|
||||
ADD `cf_mobile_search_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_new_skin`,
|
||||
ADD `cf_mobile_connect_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_search_skin`,
|
||||
ADD `cf_mobile_member_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_connect_skin` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_gcaptcha_mp3'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_gcaptcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_mobile_member_skin` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_editor'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_editor` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_gcaptcha_mp3` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_googl_shorturl_apikey'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_googl_shorturl_apikey` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_gcaptcha_mp3` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_mobile_pages'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_mobile_pages` INT(11) NOT NULL DEFAULT '0' AFTER `cf_write_pages` ", true);
|
||||
sql_query(" UPDATE `{$g5['config_table']}` SET cf_mobile_pages = '5' ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_facebook_appid'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_googl_shorturl_apikey`,
|
||||
ADD `cf_facebook_secret` VARCHAR(255) NOT NULL AFTER `cf_facebook_appid`,
|
||||
ADD `cf_twitter_key` VARCHAR(255) NOT NULL AFTER `cf_facebook_secret`,
|
||||
ADD `cf_twitter_secret` VARCHAR(255) NOT NULL AFTER `cf_twitter_key`,
|
||||
ADD `cf_me2day_key` VARCHAR(255) NOT NULL AFTER `cf_twitter_secret` ", true);
|
||||
}
|
||||
|
||||
// uniqid 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['uniqid_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['uniqid_table']}` (
|
||||
`uq_id` bigint(20) unsigned NOT NULL,
|
||||
`uq_ip` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`uq_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
if(!sql_query(" SELECT uq_ip from {$g5['uniqid_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['uniqid_table']} ADD `uq_ip` VARCHAR(255) NOT NULL ");
|
||||
}
|
||||
|
||||
// 임시저장 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['autosave_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['autosave_table']}` (
|
||||
`as_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mb_id` varchar(20) NOT NULL,
|
||||
`as_uid` bigint(20) unsigned NOT NULL,
|
||||
`as_subject` varchar(255) NOT NULL,
|
||||
`as_content` text NOT NULL,
|
||||
`as_datetime` datetime NOT NULL,
|
||||
PRIMARY KEY (`as_id`),
|
||||
UNIQUE KEY `as_uid` (`as_uid`),
|
||||
KEY `mb_id` (`mb_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_admin_email'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_admin_email` VARCHAR(255) NOT NULL AFTER `cf_admin` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_cert_use'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `cf_editor`,
|
||||
ADD `cf_cert_ipin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_use`,
|
||||
ADD `cf_cert_hp` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_ipin`,
|
||||
ADD `cf_cert_kcb_cd` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_hp`,
|
||||
ADD `cf_cert_kcp_cd` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_kcb_cd`,
|
||||
ADD `cf_cert_limit` INT(11) NOT NULL DEFAULT '0' AFTER `cf_cert_kcp_cd` ", true);
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
CHANGE `mb_hp_certify` `mb_certify` VARCHAR(20) NOT NULL DEFAULT '' ", true);
|
||||
sql_query(" update {$g5['member_table']} set mb_certify = 'hp' where mb_certify = '1' ");
|
||||
sql_query(" update {$g5['member_table']} set mb_certify = '' where mb_certify = '0' ");
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['cert_history_table']}` (
|
||||
`cr_id` int(11) NOT NULL auto_increment,
|
||||
`mb_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_company` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_method` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`cr_date` date NOT NULL DEFAULT '0000-00-00',
|
||||
`cr_time` time NOT NULL DEFAULT '00:00:00',
|
||||
PRIMARY KEY (`cr_id`),
|
||||
KEY `mb_id` (`mb_id`)
|
||||
)", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_analytics'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_analytics` TEXT NOT NULL AFTER `cf_intercept_ip` ", true);
|
||||
}
|
||||
|
||||
$g5['title'] = '환경설정';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_cf_basic">기본환경</a></li>
|
||||
<li><a href="#anc_cf_board">게시판기본</a></li>
|
||||
<li><a href="#anc_cf_join">회원가입</a></li>
|
||||
<li><a href="#anc_cf_cert">본인확인</a></li>
|
||||
<li><a href="#anc_cf_mail">기본메일환경</a></li>
|
||||
<li><a href="#anc_cf_article_mail">글작성메일</a></li>
|
||||
<li><a href="#anc_cf_join_mail">가입메일</a></li>
|
||||
<li><a href="#anc_cf_vote_mail">투표메일</a></li>
|
||||
<li><a href="#anc_cf_sns">SNS</a></li>
|
||||
<li><a href="#anc_cf_lay">레이아웃 추가설정</a></li>
|
||||
<li><a href="#anc_cf_extra">여분필드</a></li>
|
||||
</ul>';
|
||||
?>
|
||||
|
||||
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
|
||||
<section id="anc_cf_basic" class="cbox">
|
||||
<h2>홈페이지 기본환경 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_title">홈페이지 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="3"><input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required class="required frm_input" size="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_admin">최고관리자<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="3"><?php echo get_member_id_select('cf_admin', 10, $config['cf_admin'], 'required') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_admin_email">관리자 메일 주소<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
|
||||
<input type="text" name="cf_admin_email" value="<?php echo $config['cf_admin_email'] ?>" id="cf_admin_email" required class="required email frm_input" size="40">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_point">포인트 사용</label></th>
|
||||
<td colspan="3"><input type="checkbox" name="cf_use_point" value="1" id="cf_use_point" <?php echo $config['cf_use_point']?'checked':''; ?>> 사용</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_login_point">로그인시 포인트<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('회원에게 하루에 한번만 부여') ?>
|
||||
<input type="text" name="cf_login_point" value="<?php echo $config['cf_login_point'] ?>" id="cf_login_point" required class="required frm_input" size="2"> 점
|
||||
</td>
|
||||
<th scope="row"><label for="cf_memo_send_point">쪽지보낼시 차감 포인트<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('양수로 입력하십시오. 0점은 쪽지 보낼시 포인트를 차감하지 않습니다.') ?>
|
||||
<input type="text" name="cf_memo_send_point" value="<?php echo $config['cf_memo_send_point'] ?>" id="cf_memo_send_point" required class="required frm_input" size="2"> 점
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_cut_name">이름(별명) 표시</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('영숫자 2글자 = 한글 1글자') ?>
|
||||
<input type="text" name="cf_cut_name" value="<?php echo $config['cf_cut_name'] ?>" id="cf_cut_name" class="frm_input" size="2"> 자리만 표시
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_nick_modify">별명 수정</label></th>
|
||||
<td>수정하면 <input type="text" name="cf_nick_modify" value="<?php echo $config['cf_nick_modify'] ?>" id="cf_nick_modify" class="frm_input" size="1"> 일 동안 바꿀 수 없음</td>
|
||||
<th scope="row"><label for="cf_open_modify">정보공개 수정</label></th>
|
||||
<td>수정하면 <input type="text" name="cf_open_modify" value="<?php echo $config['cf_open_modify'] ?>" id="cf_open_modify" class="frm_input" size="1"> 일 동안 바꿀 수 없음</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_new_del">최근게시물 삭제</label></th>
|
||||
<td>
|
||||
<?php echo help('설정일이 지난 최근게시물 자동 삭제') ?>
|
||||
<input type="text" name="cf_new_del" value="<?php echo $config['cf_new_del'] ?>" id="cf_new_del" class="frm_input" size="2"> 일
|
||||
</td>
|
||||
<th scope="row"><label for="cf_memo_del">쪽지 삭제</label></th>
|
||||
<td>
|
||||
<?php echo help('설정일이 지난 쪽지 자동 삭제') ?>
|
||||
<input type="text" name="cf_memo_del" value="<?php echo $config['cf_memo_del'] ?>" id="cf_memo_del" class="frm_input" size="2"> 일
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_visit_del">접속자로그 삭제</label></th>
|
||||
<td>
|
||||
<?php echo help('설정일이 지난 접속자 로그 자동 삭제') ?>
|
||||
<input type="text" name="cf_visit_del" value="<?php echo $config['cf_visit_del'] ?>" id="cf_visit_del" class="frm_input" size="2"> 일
|
||||
</td>
|
||||
<th scope="row"><label for="cf_popular_del">인기검색어 삭제</label></th>
|
||||
<td>
|
||||
<?php echo help('설정일이 지난 인기검색어 자동 삭제') ?>
|
||||
<input type="text" name="cf_popular_del" value="<?php echo $config['cf_popular_del'] ?>" id="cf_popular_del" class="frm_input" size="2"> 일
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_login_minutes">현재 접속자</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('설정값 이내의 접속자를 현재 접속자로 인정') ?>
|
||||
<input type="text" name="cf_login_minutes" value="<?php echo $config['cf_login_minutes'] ?>" id="cf_login_minutes" class="frm_input" size="2"> 분
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_page_rows">한페이지당 라인수</label></th>
|
||||
<td>
|
||||
<?php echo help('목록(리스트) 한페이지당 라인수') ?>
|
||||
<input type="text" name="cf_page_rows" value="<?php echo $config['cf_page_rows'] ?>" id="cf_page_rows" class="frm_input" size="2"> 라인
|
||||
</td>
|
||||
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
|
||||
<td>
|
||||
<?php echo help('목록 한페이지당 라인수') ?>
|
||||
<input type="text" name="cf_new_rows" value="<?php echo $config['cf_new_rows'] ?>" id="cf_new_rows" class="frm_input" size="2"> 라인
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_write_pages">페이지 표시 수<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="cf_write_pages" value="<?php echo $config['cf_write_pages'] ?>" id="cf_write_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
|
||||
<th scope="row"><label for="cf_mobile_pages">모바일 페이지 표시 수<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="cf_mobile_pages" value="<?php echo $config['cf_mobile_pages'] ?>" id="cf_mobile_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_new_skin" id="cf_new_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('new');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_mobile_new_skin">모바일<br>최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_mobile_new_skin" id="cf_mobile_new_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('new', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_search_skin">검색 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_search_skin" id="cf_search_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('search');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_mobile_search_skin">모바일 검색 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_mobile_search_skin" id="cf_mobile_search_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('search', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_connect_skin">접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_connect_skin" id="cf_connect_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('connect');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_mobile_connect_skin">모바일 접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_mobile_connect_skin" id="cf_mobile_connect_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('connect', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_editor">에디터 선택</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help(G5_EDITOR_URL.' 밑의 DHTML 에디터 폴더를 선택합니다.') ?>
|
||||
<select name="cf_editor" id="cf_editor">
|
||||
<?php
|
||||
$arr = get_skin_dir('', G5_EDITOR_PATH);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">사용안함</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_editor'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_gcaptcha_mp3">음성캡챠 선택<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help(G5_GCAPTCHA_URL.'/mp3 밑의 음성 폴더를 선택합니다.') ?>
|
||||
<select name="cf_gcaptcha_mp3" id="cf_gcaptcha_mp3" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('mp3', G5_GCAPTCHA_PATH);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_gcaptcha_mp3'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_copy_log">복사, 이동시 로그</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('게시물 아래에 누구로 부터 복사, 이동됨 표시') ?>
|
||||
<input type="checkbox" name="cf_use_copy_log" value="1" id="cf_use_copy_log" <?php echo $config['cf_use_copy_log']?'checked':''; ?>> 남김
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_point_term">포인트 유효기간</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('기간을 0으로 설정시 포인트 유효기간이 적용되지 않습니다.') ?>
|
||||
<input type="text" name="cf_point_term" value="<?php echo $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
|
||||
<td>
|
||||
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?> </textarea>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
|
||||
<td>
|
||||
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?> </textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리스틱'); ?>
|
||||
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?> </textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_board" class="cbox">
|
||||
<h2>게시판 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<p>각 게시판 관리에서 개별적으로 설정 가능합니다.</p>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_delay_sec">글쓰기 간격<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="cf_delay_sec" value="<?php echo $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td>
|
||||
<th scope="row"><label for="cf_link_target">새창 링크</label></th>
|
||||
<td>
|
||||
<?php echo help('글내용중 자동 링크되는 타켓을 지정합니다.') ?>
|
||||
<select id="cf_link_target" name="cf_link_target">
|
||||
<option value="_blank"<?php echo get_selected($config['cf_link_target'], '_blank') ?>>_blank</option>
|
||||
<option value="_self"<?php echo get_selected($config['cf_link_target'], '_self') ?>>_self</option>
|
||||
<option value="_top"<?php echo get_selected($config['cf_link_target'], '_top') ?>>_top</option>
|
||||
<option value="_new"<?php echo get_selected($config['cf_link_target'], '_new') ?>>_new</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="cf_read_point" value="<?php echo $config['cf_read_point'] ?>" id="cf_read_point" required class="required frm_input" size="3"> 점</td>
|
||||
<th scope="row"><label for="cf_write_point">글쓰기 포인트</label></th>
|
||||
<td><input type="text" name="cf_write_point" value="<?php echo $config['cf_write_point'] ?>" id="cf_write_point" required class="required frm_input" size="3"> 점</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_comment_point">댓글쓰기 포인트</label></th>
|
||||
<td><input type="text" name="cf_comment_point" value="<?php echo $config['cf_comment_point'] ?>" id="cf_comment_point" required class="required frm_input" size="3"> 점</td>
|
||||
<th scope="row"><label for="cf_download_point">다운로드 포인트</label></th>
|
||||
<td><input type="text" name="cf_download_point" value="<?php echo $config['cf_download_point'] ?>" id="cf_download_point" required class="required frm_input" size="3"> 점</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_search_part">검색 단위</label></th>
|
||||
<td colspan="3"><input type="text" name="cf_search_part" value="<?php echo $config['cf_search_part'] ?>" id="cf_search_part" class="frm_input" size="4"> 건 단위로 검색</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_image_extension">이미지 업로드 확장자</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('게시판 글작성시 이미지 파일 업로드 가능 확장자. | 로 구분') ?>
|
||||
<input type="text" name="cf_image_extension" value="<?php echo $config['cf_image_extension'] ?>" id="cf_image_extension" class="frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_flash_extension">플래쉬 업로드 확장자</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('게시판 글작성시 플래쉬 파일 업로드 가능 확장자. | 로 구분') ?>
|
||||
<input type="text" name="cf_flash_extension" value="<?php echo $config['cf_flash_extension'] ?>" id="cf_flash_extension" class="frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_movie_extension">동영상 업로드 확장자</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('게시판 글작성시 동영상 파일 업로드 가능 확장자. | 로 구분') ?>
|
||||
<input type="text" name="cf_movie_extension" value="<?php echo $config['cf_movie_extension'] ?>" id="cf_movie_extension" class="frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_filter">단어 필터링</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
|
||||
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?> </textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_join" class="cbox">
|
||||
<h2>회원가입 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<p>회원가입 시 사용할 스킨과 입력 받을 정보 등을 설정할 수 있습니다.</p>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_member_skin">회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_member_skin" id="cf_member_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('member');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_mobile_member_skin">모바일<br>회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="cf_mobile_member_skin" id="cf_mobile_member_skin" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('member', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_mobile_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">홈페이지 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_homepage" value="1" id="cf_use_homepage" <?php echo $config['cf_use_homepage']?'checked':''; ?>> <label for="cf_use_homepage">보이기</label>
|
||||
<input type="checkbox" name="cf_req_homepage" value="1" id="cf_req_homepage" <?php echo $config['cf_req_homepage']?'checked':''; ?>> <label for="cf_req_homepage">필수입력</label>
|
||||
</td>
|
||||
<th scope="row">주소 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_addr" value="1" id="cf_use_addr" <?php echo $config['cf_use_addr']?'checked':''; ?>> <label for="cf_use_addr">보이기</label>
|
||||
<input type="checkbox" name="cf_req_addr" value="1" id="cf_req_addr" <?php echo $config['cf_req_addr']?'checked':''; ?>> <label for="cf_req_addr">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">전화번호 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_tel" value="1" id="cf_use_tel" <?php echo $config['cf_use_tel']?'checked':''; ?>> <label for="cf_use_tel">보이기</label>
|
||||
<input type="checkbox" name="cf_req_tel" value="1" id="cf_req_tel" <?php echo $config['cf_req_tel']?'checked':''; ?>> <label for="cf_req_tel">필수입력</label>
|
||||
</td>
|
||||
<th scope="row">휴대폰번호 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_hp" value="1" id="cf_use_hp" <?php echo $config['cf_use_hp']?'checked':''; ?>> <label for="cf_use_hp">보이기</label>
|
||||
<input type="checkbox" name="cf_req_hp" value="1" id="cf_req_hp" <?php echo $config['cf_req_hp']?'checked':''; ?>> <label for="cf_req_hp">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">서명 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_signature" value="1" id="cf_use_signature" <?php echo $config['cf_use_signature']?'checked':''; ?>> <label for="cf_use_signature">보이기</label>
|
||||
<input type="checkbox" name="cf_req_signature" value="1" id="cf_req_signature" <?php echo $config['cf_req_signature']?'checked':''; ?>> <label for="cf_req_signature">필수입력</label>
|
||||
</td>
|
||||
<th scope="row">자기소개 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_profile" value="1" id="cf_use_profile" <?php echo $config['cf_use_profile']?'checked':''; ?>> <label for="cf_use_profile">보이기</label>
|
||||
<input type="checkbox" name="cf_req_profile" value="1" id="cf_req_profile" <?php echo $config['cf_req_profile']?'checked':''; ?>> <label for="cf_req_profile">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_register_level">회원가입시 권한</label></th>
|
||||
<td><?php echo get_member_level_select('cf_register_level', 1, 9, $config['cf_register_level']) ?></td>
|
||||
<th scope="row"><label for="cf_register_point">회원가입시 포인트</label></th>
|
||||
<td><input type="text" name="cf_register_point" value="<?php echo $config['cf_register_point'] ?>" id="cf_register_point" class="frm_input" size="5"> 점</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" id="th310"><label for='cf_leave_day'>회원탈퇴후 삭제일</label></th>
|
||||
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_member_icon">회원아이콘 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('게시물에 게시자 별명 대신 아이콘 사용') ?>
|
||||
<select id="cf_use_member_icon" name="cf_use_member_icon">
|
||||
<option value="0"<?php echo get_selected($config['cf_use_member_icon'], '0') ?>>미사용
|
||||
<option value="1"<?php echo get_selected($config['cf_use_member_icon'], '1') ?>>아이콘만 표시
|
||||
<option value="2"<?php echo get_selected($config['cf_use_member_icon'], '2') ?>>아이콘+이름 표시
|
||||
</select>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_icon_level">아이콘 업로드 권한</label></th>
|
||||
<td><?php echo get_member_level_select('cf_icon_level', 1, 9, $config['cf_icon_level']) ?> 이상</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_member_icon_size">회원아이콘 용량</label></th>
|
||||
<td><input type="text" name="cf_member_icon_size" value="<?php echo $config['cf_member_icon_size'] ?>" id="cf_member_icon_size" class="frm_input" size="10"> 바이트 이하</td>
|
||||
<th scope="row">회원아이콘 사이즈</th>
|
||||
<td>
|
||||
<label for="cf_member_icon_width">가로</label>
|
||||
<input type="text" name="cf_member_icon_width" value="<?php echo $config['cf_member_icon_width'] ?>" id="cf_member_icon_width" class="frm_input" size="2">
|
||||
<label for="cf_member_icon_height">세로</label>
|
||||
<input type="text" name="cf_member_icon_height" value="<?php echo $config['cf_member_icon_height'] ?>" id="cf_member_icon_height" class="frm_input" size="2">
|
||||
픽셀 이하
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_recommend">추천인제도 사용</label></th>
|
||||
<td><input type="checkbox" name="cf_use_recommend" value="1" id="cf_use_recommend" <?php echo $config['cf_use_recommend']?'checked':''; ?>> 사용</td>
|
||||
<th scope="row"><label for="cf_recommend_point">추천인 포인트</label></th>
|
||||
<td><input type="text" name="cf_recommend_point" value="<?php echo $config['cf_recommend_point'] ?>" id="cf_recommend_point" class="frm_input"> 점</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_prohibit_id">아이디,별명 금지단어</label></th>
|
||||
<td>
|
||||
<?php echo help('회원아이디, 별명으로 사용할 수 없는 단어를 정합니다. 쉼표 (,) 로 구분') ?>
|
||||
<textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="5"><?php echo $config['cf_prohibit_id'] ?></textarea>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_prohibit_email">입력 금지 메일</label></th>
|
||||
<td>
|
||||
<?php echo help('입력 받지 않을 도메인을 지정합니다. 엔터로 구분 ex) hotmail.com') ?>
|
||||
<textarea name="cf_prohibit_email" id="cf_prohibit_email" rows="5"><?php echo $config['cf_prohibit_email'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_stipulation">회원가입약관</label></th>
|
||||
<td colspan="3"><textarea name="cf_stipulation" id="cf_stipulation" rows="10"><?php echo $config['cf_stipulation'] ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_privacy">개인정보취급방침</label></th>
|
||||
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?> </textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_cert" class="cbox">
|
||||
<h2>본인확인</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<p>
|
||||
회원가입 시 본인확인 수단을 설정합니다.<br>
|
||||
실명과 휴대폰 번호 그리고 본인확인 당시에 성인인지의 여부를 저장합니다.<br>
|
||||
게시판의 경우 본인확인 또는 성인여부를 따져 게시물 조회 및 쓰기 권한을 줄 수 있습니다.
|
||||
</p>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_cert_use">본인확인</label></th>
|
||||
<td>
|
||||
<select name="cf_cert_use" id="cf_cert_use">
|
||||
<?php echo option_selected("0", $config['cf_cert_use'], "사용안함"); ?>
|
||||
<?php echo option_selected("1", $config['cf_cert_use'], "테스트"); ?>
|
||||
<?php echo option_selected("2", $config['cf_cert_use'], "실서비스"); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_ipin">아이핀 본인확인</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<select name="cf_cert_ipin" id="cf_cert_ipin">
|
||||
<?php echo option_selected("", $config['cf_cert_ipin'], "사용안함"); ?>
|
||||
<?php echo option_selected("kcb", $config['cf_cert_ipin'], "코리아크레딧뷰로(KCB) 아이핀"); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<select name="cf_cert_hp" id="cf_cert_hp">
|
||||
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
||||
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
|
||||
<?php echo option_selected("kcp", $config['cf_cert_hp'], "한국사이버결제(KCP) 휴대폰 본인확인"); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?>
|
||||
<input type="text" name="cf_cert_kcb_cd" value="<?php echo $config['cf_cert_kcb_cd'] ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.co.kr/main/provider/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
|
||||
<a href="http://sir.co.kr/main/provider/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">한국사이버결제<br>KCP 사이트코드</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
||||
<span class="sitecode">SM</span>
|
||||
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.co.kr/main/provider/p_cert.php" target="_blank" class="btn_frmline">KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('하루동안 아이핀과 휴대폰 본인확인 인증 이용회수를 제한할 수 있습니다.<br>회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.<br>0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?>
|
||||
<input type="text" name="cf_cert_limit" value="<?php echo $config['cf_cert_limit']; ?>" id="cf_cert_limit" class="frm_input" size="3"> 회
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_mail" class="cbox">
|
||||
<h2>기본 메일환경 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_use">메일발송 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('체크하지 않으면 메일발송을 아예 사용하지 않습니다. 메일 테스트도 불가합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_use" value="1" id="cf_email_use" <?php echo $config['cf_email_use']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_email_certify">메일인증 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('메일에 배달된 인증 주소를 클릭하여야 회원으로 인정합니다.'); ?>
|
||||
<input type="checkbox" name="cf_use_email_certify" value="1" id="cf_use_email_certify" <?php echo $config['cf_use_email_certify']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_formmail_is_member">폼메일 사용 여부</label></th>
|
||||
<td>
|
||||
<?php echo help('체크하지 않으면 비회원도 사용 할 수 있습니다.') ?>
|
||||
<input type="checkbox" name="cf_formmail_is_member" value="1" id="cf_formmail_is_member" <?php echo $config['cf_formmail_is_member']?'checked':''; ?>> 회원만 사용
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_article_mail" class="cbox">
|
||||
<h2>게시판 글 작성 시 메일 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_wr_super_admin">최고관리자</label></th>
|
||||
<td>
|
||||
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_wr_super_admin" value="1" id="cf_email_wr_super_admin" <?php echo $config['cf_email_wr_super_admin']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_wr_group_admin">그룹관리자</label></th>
|
||||
<td>
|
||||
<?php echo help('그룹관리자에게 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_wr_group_admin" value="1" id="cf_email_wr_group_admin" <?php echo $config['cf_email_wr_group_admin']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_wr_board_admin">게시판관리자</label></th>
|
||||
<td>
|
||||
<?php echo help('게시판관리자에게 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_wr_board_admin" value="1" id="cf_email_wr_board_admin" <?php echo $config['cf_email_wr_board_admin']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_wr_write">원글작성자</label></th>
|
||||
<td>
|
||||
<?php echo help('게시자님께 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_wr_write" value="1" id="cf_email_wr_write" <?php echo $config['cf_email_wr_write']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_wr_comment_all">댓글작성자</label></th>
|
||||
<td>
|
||||
<?php echo help('원글에 댓글이 올라오는 경우 댓글 쓴 모든 분들께 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_wr_comment_all" value="1" id="cf_email_wr_comment_all" <?php echo $config['cf_email_wr_comment_all']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_join_mail" class="cbox">
|
||||
<h2>회원가입 시 메일 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_mb_super_admin">최고관리자 메일발송</label></th>
|
||||
<td>
|
||||
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_mb_super_admin" value="1" id="cf_email_mb_super_admin" <?php echo $config['cf_email_mb_super_admin']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_mb_member">회원님께 메일발송</label></th>
|
||||
<td>
|
||||
<?php echo help('회원가입한 회원님께 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_mb_member" value="1" id="cf_email_mb_member" <?php echo $config['cf_email_mb_member']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="anc_cf_vote_mail" class="cbox">
|
||||
<h2>투표 기타의견 작성시 메일 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_email_po_super_admin">최고관리자 메일발송</label></th>
|
||||
<td>
|
||||
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
|
||||
<input type="checkbox" name="cf_email_po_super_admin" value="1" id="cf_email_po_super_admin" <?php echo $config['cf_email_po_super_admin']?'checked':''; ?>> 사용
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="anc_cf_sns" class="cbox">
|
||||
<h2>소셜네트워크서비스(SNS : Social Network Service)</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_facebook_appid">페이스북 앱 ID</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_facebook_appid" value="<?php echo $config['cf_facebook_appid'] ?>" id="cf_facebook_appid" class="frm_input"> <a href="https://developers.facebook.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_facebook_secret">페이스북 앱 Secret</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_facebook_secret" value="<?php echo $config['cf_facebook_secret'] ?>" id="cf_facebook_secret" class="frm_input" size="35">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input"> <a href="https://dev.twitter.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_twitter_secret" value="<?php echo $config['cf_twitter_secret'] ?>" id="cf_twitter_secret" class="frm_input" size="35">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_me2day_key">미투데이 Key</label></th>
|
||||
<td colspan="3">
|
||||
<input type="text" name="cf_me2day_key" value="<?php echo $config['cf_me2day_key'] ?>" id="cf_me2day_key" class="frm_input"> <a href="http://me2day.net/me2/app/get_appkey" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_googl_shorturl_apikey">구글 짧은주소 API Key</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_googl_shorturl_apikey" value="<?php echo $config['cf_googl_shorturl_apikey'] ?>" id="cf_googl_shorturl_apikey" class="frm_input"> <a href="http://code.google.com/apis/console/" target="_blank" class="btn_frmline">API Key 등록하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_lay" class="cbox">
|
||||
<h2>레이아웃 추가설정</h2>
|
||||
<?php echo $pg_anchor; ?>
|
||||
<p>기본 설정된 파일 경로 및 script, css 를 추가하거나 변경할 수 있습니다.</p>
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_include_index">초기화면 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help('입력이 없으면 index.php가 초기화면 파일의 기본 경로로 설정됩니다.') ?>
|
||||
<input type="text" name="cf_include_index" value="<?php echo $config['cf_include_index'] ?>" id="cf_include_index" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help('입력이 없으면 head.php가 상단 파일의 기본 경로로 설정됩니다.') ?>
|
||||
<input type="text" name="cf_include_head" value="<?php echo $config['cf_include_head'] ?>" id="cf_include_head" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help('입력이 없으면 tail.php가 상단 파일의 기본 경로로 설정됩니다.') ?>
|
||||
<input type="text" name="cf_include_tail" value="<?php echo $config['cf_include_tail'] ?>" id="cf_include_tail" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_add_script">추가 script, css</label></th>
|
||||
<td>
|
||||
<?php echo help('HTML의 </HEAD> 태그위로 추가될 JavaScript와 css 코드를 설정합니다.<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.') ?>
|
||||
<textarea name="cf_add_script" id="cf_add_script"><?php echo get_text($config['cf_add_script']); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_extra" class="cbox">
|
||||
<h2>여분필드 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<p>각 게시판 관리에서 개별적으로 설정 가능합니다.</p>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td>
|
||||
<label for="cf_<?php echo $i ?>_subj">여분필드<?php echo $i ?> 제목</label>
|
||||
<input type="text" name="cf_<?php echo $i ?>_subj" value="<?php echo get_text($config['cf_'.$i.'_subj']) ?>" id="cf_<?php echo $i ?>_subj" class="frm_input" size="30">
|
||||
<label for="cf_<?php echo $i ?>">여분필드<?php echo $i ?> 값</label>
|
||||
<input type="text" name="cf_<?php echo $i ?>" value="<?php echo $config['cf_'.$i] ?>" id="cf_<?php echo $i ?>" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||
</p>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
<?php
|
||||
if(!$config['cf_cert_use'])
|
||||
echo '$(".cf_cert_service").addClass("cf_cert_hide");';
|
||||
?>
|
||||
$("#cf_cert_use").change(function(){
|
||||
var cf_cert_sel = $("#cf_cert_use option:selected").val();
|
||||
switch(cf_cert_sel) {
|
||||
case "0":
|
||||
$(".cf_cert_service").addClass("cf_cert_hide");
|
||||
break;
|
||||
default:
|
||||
$(".cf_cert_service").removeClass("cf_cert_hide");
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function fconfigform_submit(f)
|
||||
{
|
||||
f.action = "./config_form_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
149
adm/config_form_update.php
Normal file
149
adm/config_form_update.php
Normal file
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
$sub_menu = "100100";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$mb = get_member($cf_admin);
|
||||
if (!$mb['mb_id'])
|
||||
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
||||
|
||||
check_token();
|
||||
|
||||
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
|
||||
if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
|
||||
alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_title = '{$_POST['cf_title']}',
|
||||
cf_admin = '{$_POST['cf_admin']}',
|
||||
cf_admin_email = '{$_POST['cf_admin_email']}',
|
||||
cf_include_index = '{$_POST['cf_include_index']}',
|
||||
cf_include_head = '{$_POST['cf_include_head']}',
|
||||
cf_include_tail = '{$_POST['cf_include_tail']}',
|
||||
cf_add_script = '{$_POST['cf_add_script']}',
|
||||
cf_use_point = '{$_POST['cf_use_point']}',
|
||||
cf_point_term = '{$_POST['cf_point_term']}',
|
||||
cf_use_norobot = '{$_POST['cf_use_norobot']}',
|
||||
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
|
||||
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
|
||||
cf_login_point = '{$_POST['cf_login_point']}',
|
||||
cf_cut_name = '{$_POST['cf_cut_name']}',
|
||||
cf_nick_modify = '{$_POST['cf_nick_modify']}',
|
||||
cf_new_skin = '{$_POST['cf_new_skin']}',
|
||||
cf_new_rows = '{$_POST['cf_new_rows']}',
|
||||
cf_search_skin = '{$_POST['cf_search_skin']}',
|
||||
cf_connect_skin = '{$_POST['cf_connect_skin']}',
|
||||
cf_read_point = '{$_POST['cf_read_point']}',
|
||||
cf_write_point = '{$_POST['cf_write_point']}',
|
||||
cf_comment_point = '{$_POST['cf_comment_point']}',
|
||||
cf_download_point = '{$_POST['cf_download_point']}',
|
||||
cf_search_bgcolor = '{$_POST['cf_search_bgcolor']}',
|
||||
cf_search_color = '{$_POST['cf_search_color']}',
|
||||
cf_write_pages = '{$_POST['cf_write_pages']}',
|
||||
cf_mobile_pages = '{$_POST['cf_mobile_pages']}',
|
||||
cf_link_target = '{$_POST['cf_link_target']}',
|
||||
cf_delay_sec = '{$_POST['cf_delay_sec']}',
|
||||
cf_filter = '{$_POST['cf_filter']}',
|
||||
cf_possible_ip = '".trim($_POST['cf_possible_ip'])."',
|
||||
cf_intercept_ip = '".trim($_POST['cf_intercept_ip'])."',
|
||||
cf_analytics = '{$_POST['cf_analytics']}',
|
||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||
cf_use_tel = '{$_POST['cf_use_tel']}',
|
||||
cf_req_tel = '{$_POST['cf_req_tel']}',
|
||||
cf_use_hp = '{$_POST['cf_use_hp']}',
|
||||
cf_req_hp = '{$_POST['cf_req_hp']}',
|
||||
cf_use_addr = '{$_POST['cf_use_addr']}',
|
||||
cf_req_addr = '{$_POST['cf_req_addr']}',
|
||||
cf_use_signature = '{$_POST['cf_use_signature']}',
|
||||
cf_req_signature = '{$_POST['cf_req_signature']}',
|
||||
cf_use_profile = '{$_POST['cf_use_profile']}',
|
||||
cf_req_profile = '{$_POST['cf_req_profile']}',
|
||||
cf_register_level = '{$_POST['cf_register_level']}',
|
||||
cf_register_point = '{$_POST['cf_register_point']}',
|
||||
cf_icon_level = '{$_POST['cf_icon_level']}',
|
||||
cf_use_recommend = '{$_POST['cf_use_recommend']}',
|
||||
cf_recommend_point = '{$_POST['cf_recommend_point']}',
|
||||
cf_leave_day = '{$_POST['cf_leave_day']}',
|
||||
cf_search_part = '{$_POST['cf_search_part']}',
|
||||
cf_email_use = '{$_POST['cf_email_use']}',
|
||||
cf_email_wr_super_admin = '{$_POST['cf_email_wr_super_admin']}',
|
||||
cf_email_wr_group_admin = '{$_POST['cf_email_wr_group_admin']}',
|
||||
cf_email_wr_board_admin = '{$_POST['cf_email_wr_board_admin']}',
|
||||
cf_email_wr_write = '{$_POST['cf_email_wr_write']}',
|
||||
cf_email_wr_comment_all = '{$_POST['cf_email_wr_comment_all']}',
|
||||
cf_email_mb_super_admin = '{$_POST['cf_email_mb_super_admin']}',
|
||||
cf_email_mb_member = '{$_POST['cf_email_mb_member']}',
|
||||
cf_email_po_super_admin = '{$_POST['cf_email_po_super_admin']}',
|
||||
cf_prohibit_id = '{$_POST['cf_prohibit_id']}',
|
||||
cf_prohibit_email = '{$_POST['cf_prohibit_email']}',
|
||||
cf_new_del = '{$_POST['cf_new_del']}',
|
||||
cf_memo_del = '{$_POST['cf_memo_del']}',
|
||||
cf_visit_del = '{$_POST['cf_visit_del']}',
|
||||
cf_popular_del = '{$_POST['cf_popular_del']}',
|
||||
cf_use_jumin = '{$_POST['cf_use_jumin']}',
|
||||
cf_use_member_icon = '{$_POST['cf_use_member_icon']}',
|
||||
cf_member_icon_size = '{$_POST['cf_member_icon_size']}',
|
||||
cf_member_icon_width = '{$_POST['cf_member_icon_width']}',
|
||||
cf_member_icon_height = '{$_POST['cf_member_icon_height']}',
|
||||
cf_login_minutes = '{$_POST['cf_login_minutes']}',
|
||||
cf_image_extension = '{$_POST['cf_image_extension']}',
|
||||
cf_flash_extension = '{$_POST['cf_flash_extension']}',
|
||||
cf_movie_extension = '{$_POST['cf_movie_extension']}',
|
||||
cf_formmail_is_member = '{$_POST['cf_formmail_is_member']}',
|
||||
cf_page_rows = '{$_POST['cf_page_rows']}',
|
||||
cf_stipulation = '{$_POST['cf_stipulation']}',
|
||||
cf_privacy = '{$_POST['cf_privacy']}',
|
||||
cf_open_modify = '{$_POST['cf_open_modify']}',
|
||||
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
||||
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
||||
cf_mobile_search_skin = '{$_POST['cf_mobile_search_skin']}',
|
||||
cf_mobile_connect_skin = '{$_POST['cf_mobile_connect_skin']}',
|
||||
cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}',
|
||||
cf_gcaptcha_mp3 = '{$_POST['cf_gcaptcha_mp3']}',
|
||||
cf_editor = '{$_POST['cf_editor']}',
|
||||
cf_cert_use = '{$_POST['cf_cert_use']}',
|
||||
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
|
||||
cf_cert_hp = '{$_POST['cf_cert_hp']}',
|
||||
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||
cf_facebook_appid = '{$_POST['cf_facebook_appid']}',
|
||||
cf_facebook_secret = '{$_POST['cf_facebook_secret']}',
|
||||
cf_twitter_key = '{$_POST['cf_twitter_key']}',
|
||||
cf_twitter_secret = '{$_POST['cf_twitter_secret']}',
|
||||
cf_me2day_key = '{$_POST['cf_me2day_key']}',
|
||||
cf_1_subj = '{$_POST['cf_1_subj']}',
|
||||
cf_2_subj = '{$_POST['cf_2_subj']}',
|
||||
cf_3_subj = '{$_POST['cf_3_subj']}',
|
||||
cf_4_subj = '{$_POST['cf_4_subj']}',
|
||||
cf_5_subj = '{$_POST['cf_5_subj']}',
|
||||
cf_6_subj = '{$_POST['cf_6_subj']}',
|
||||
cf_7_subj = '{$_POST['cf_7_subj']}',
|
||||
cf_8_subj = '{$_POST['cf_8_subj']}',
|
||||
cf_9_subj = '{$_POST['cf_9_subj']}',
|
||||
cf_10_subj = '{$_POST['cf_10_subj']}',
|
||||
cf_1 = '{$_POST['cf_1']}',
|
||||
cf_2 = '{$_POST['cf_2']}',
|
||||
cf_3 = '{$_POST['cf_3']}',
|
||||
cf_4 = '{$_POST['cf_4']}',
|
||||
cf_5 = '{$_POST['cf_5']}',
|
||||
cf_6 = '{$_POST['cf_6']}',
|
||||
cf_7 = '{$_POST['cf_7']}',
|
||||
cf_8 = '{$_POST['cf_8']}',
|
||||
cf_9 = '{$_POST['cf_9']}',
|
||||
cf_10 = '{$_POST['cf_10']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
?>
|
||||
52
adm/gcaptcha_file_delete.php
Normal file
52
adm/gcaptcha_file_delete.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
$sub_menu = '100910';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '캡챠파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div id="cache_del">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/gcaptcha-*');
|
||||
if (is_array($files)) {
|
||||
$before_time = G5_SERVER_TIME - 3600; // 한시간전
|
||||
foreach ($files as $gcaptcha_file) {
|
||||
$modification_time = filemtime($gcaptcha_file); // 파일접근시간
|
||||
|
||||
if ($modification_time > $before_time) continue;
|
||||
|
||||
$cnt++;
|
||||
unlink($gcaptcha_file);
|
||||
echo '<li>'.$gcaptcha_file.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<p><span>캡챠파일 '.$cnt.'건의 삭제가 완료됐습니다.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>'.PHP_EOL;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
BIN
adm/img/hd_bg.jpg
Normal file
BIN
adm/img/hd_bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
BIN
adm/img/logo.jpg
Normal file
BIN
adm/img/logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
300
adm/index.php
Normal file
300
adm/index.php
Normal file
@ -0,0 +1,300 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$g5['title'] = '관리자메인';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$new_member_rows = 5;
|
||||
$new_point_rows = 5;
|
||||
$new_write_rows = 5;
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($is_admin != 'super')
|
||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "mb_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
// 탈퇴회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 차단회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 12;
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
||||
<p>총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">권한</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">수신</th>
|
||||
<th scope="col">공개</th>
|
||||
<th scope="col">인증</th>
|
||||
<th scope="col">차단</th>
|
||||
<th scope="col">그룹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
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']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt'])
|
||||
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||
|
||||
if ($is_admin == 'group')
|
||||
{
|
||||
$s_mod = '';
|
||||
$s_del = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id='.$row['mb_id'].'">수정</a>';
|
||||
$s_del = '<a href="javascript:del(\'./member_delete.php?'.$qstr.'&w=d&mb_id='.$row['mb_id'].'&url='.$_SERVER['PHP_SELF'].'\');">삭제</a>';
|
||||
}
|
||||
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
|
||||
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_SERVER_TIME);
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
if ($row['mb_leave_date'])
|
||||
$mb_id = $mb_id;
|
||||
else if ($row['mb_intercept_date'])
|
||||
$mb_id = $mb_id;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $mb_id ?></td>
|
||||
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||
<td class="td_bignum"><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_open']?'예':'아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'예':'아니오'; ?></td>
|
||||
<td class="td_boolean"><?php echo $row['mb_intercept_date']?'예':'아니오'; ?></td>
|
||||
<td class="td_category"><?php echo $group ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_ft">
|
||||
<a href="./member_list.php">회원 전체보기</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<?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 ";
|
||||
|
||||
if ($gr_id)
|
||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||
if ($view) {
|
||||
if ($view == 'w')
|
||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||
else if ($view == 'c')
|
||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||
}
|
||||
$sql_order = " order by a.bn_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$colspan = 5;
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>최근게시물</h2>
|
||||
<p>사이트 전체게시물 중 최근게시물 <?php echo $new_write_rows ?>건 목록</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">그룹</th>
|
||||
<th scope="col">게시판</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||
|
||||
if ($row['wr_id'] == $row['wr_parent']) // 원글
|
||||
{
|
||||
$comment = "";
|
||||
$comment_link = "";
|
||||
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
$name = get_sideview($row2['mb_id'], cut_str($row2['wr_name'], $config['cf_cut_name']), $row2['wr_email'], $row2['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$datetime = substr($row2['wr_datetime'],0,10);
|
||||
$datetime2 = $row2['wr_datetime'];
|
||||
if ($datetime == G5_TIME_YMD)
|
||||
$datetime2 = substr($datetime2,11,5);
|
||||
else
|
||||
$datetime2 = substr($datetime2,5,5);
|
||||
|
||||
}
|
||||
else // 코멘트
|
||||
{
|
||||
$comment = '댓글. ';
|
||||
$comment_link = '#c_'.$row['wr_id'];
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
$name = get_sideview($row3['mb_id'], cut_str($row3['wr_name'], $config['cf_cut_name']), $row3['wr_email'], $row3['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
$datetime = substr($row3['wr_datetime'],0,10);
|
||||
$datetime2 = $row3['wr_datetime'];
|
||||
if ($datetime == G5_TIME_YMD)
|
||||
$datetime2 = substr($datetime2,11,5);
|
||||
else
|
||||
$datetime2 = substr($datetime2,5,5);
|
||||
}
|
||||
?>
|
||||
|
||||
<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 ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||
<td><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>&wr_id=<?php echo $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_time"><?php echo $datetime ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_ft">
|
||||
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
$sql_common = " from {$g5['point_table']} ";
|
||||
$sql_search = " where (1) ";
|
||||
$sql_order = " order by po_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>최근 포인트 발생내역</h2>
|
||||
<p>전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">일시</th>
|
||||
<th scope="col">포인트 내용</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">포인트합</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$row2['mb_id'] = '';
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
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']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
}
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||
|
||||
$link1 = $link2 = "";
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
|
||||
{
|
||||
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
<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_mbname"><?php echo $row2['mb_name'] ?></td>
|
||||
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||
<td class="td_time"><?php echo $row['po_datetime'] ?></td>
|
||||
<td><?php echo $link1.$row['po_content'].$link2 ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($row['po_point']) ?></td>
|
||||
<td class="td_bignum"><?php echo number_format($row2['mb_point']) ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_ft">
|
||||
<a href="./point_list.php">포인트내역 전체보기</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
24
adm/mail_delete.php
Normal file
24
adm/mail_delete.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$sub_menu = '200300';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if(!$count)
|
||||
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$ma_id = $_POST['chk'][$i];
|
||||
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
?>
|
||||
87
adm/mail_form.php
Normal file
87
adm/mail_form.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$html_title = '회원메일';
|
||||
|
||||
if ($w == 'u') {
|
||||
$html_title .= '수정';
|
||||
$readonly = ' readonly';
|
||||
|
||||
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$ma = sql_fetch($sql);
|
||||
if (!$ma['ma_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
} else {
|
||||
$html_title .= '입력';
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="cbox">
|
||||
<p>메일 내용에 {이름} , {별명} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.</p>
|
||||
|
||||
<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="ma_id" value="<?php echo $ma['ma_id'] ?>" id="ma_id">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_15">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_subject">메일 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="ma_subject" value="<?php echo $ma['ma_subject'] ?>" id="ma_subject" required class="required frm_input" size="100"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td><?php echo editor_html("ma_content", $ma['ma_content']); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을 누르세요.
|
||||
</p>
|
||||
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function fmailform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
|
||||
check_field(f.ma_subject, "제목을 입력하세요.");
|
||||
//check_field(f.ma_content, "내용을 입력하세요.");
|
||||
|
||||
if (errmsg != "") {
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
<?php echo get_editor_js("ma_content"); ?>
|
||||
<?php echo chk_editor_js("ma_content"); ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
document.fmailform.ma_subject.focus();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
104
adm/mail_list.php
Normal file
104
adm/mail_list.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
$sub_menu = '200300';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['mail_table']} ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select COUNT(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$page = 1;
|
||||
|
||||
$sql = " select * {$sql_common} order by ma_id desc ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g5['title'] = '회원메일발송';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>등록된 메일내용 목록</h2>
|
||||
<p>
|
||||
<strong>테스트</strong>는 등록된 최고관리자의 이메일로 테스트 메일을 발송합니다.<br>
|
||||
현재 등록된 메일은 총 <?php echo $total_count ?>건입니다.<br>
|
||||
<span class="str_caution">주의) 수신자가 동의하지 않은 대량 메일 발송에는 적합하지 않습니다. 수십건 단위로 발송해 주십시오.</span>
|
||||
</p>
|
||||
|
||||
<div class="btn_add">
|
||||
<a href="./mail_form.php" id="mail_add">메일내용추가</a>
|
||||
</div>
|
||||
|
||||
<form name="fmaillist" id="fmaillist" action="./mail_delete.php" method="post">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 목록 전체선택" onclick="check_all(this.form)"></th>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">작성일시</th>
|
||||
<th scope="col">테스트</th>
|
||||
<th scope="col">보내기</th>
|
||||
<th scope="col">미리보기</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
//$s_del = '<a href="javascript:post_delete(\'mail_update.php\', '.$row['ma_id'].');">삭제</a>';
|
||||
$s_vie = '<a href="./mail_preview.php?ma_id='.$row['ma_id'].'" target="_blank">미리보기</a>';
|
||||
|
||||
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>" title="메일선택">
|
||||
</td>
|
||||
<td class="td_num"><?php echo $num ?></td>
|
||||
<td><a href="./mail_form.php?w=u&ma_id=<?php echo $row['ma_id'] ?>"><?php echo $row['ma_subject'] ?></a></td>
|
||||
<td class="td_time"><?php echo $row['ma_time'] ?></td>
|
||||
<td class="td_test"><a href="./mail_test.php?ma_id=<?php echo $row['ma_id'] ?>">테스트</a></td>
|
||||
<td class="td_send"><a href="./mail_select_form.php?ma_id=<?php echo $row['ma_id'] ?>">보내기</a></td>
|
||||
<td class="td_mng"><?php echo $s_vie ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if (!$i)
|
||||
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<button type="submit">선택삭제</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#fmaillist').submit(function() {
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
34
adm/mail_preview.php
Normal file
34
adm/mail_preview.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$se = sql_fetch("select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ");
|
||||
|
||||
$subject = $se['ma_subject'];
|
||||
$content = $se['ma_content'] . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id=***&mb_md5=***' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo G5_VERSION ?> 메일발송 테스트</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1><?php echo $subject ?></h1>
|
||||
|
||||
<p>
|
||||
<?php echo $se['ma_content'] ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>주의!</strong> 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
123
adm/mail_select_form.php
Normal file
123
adm/mail_select_form.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$config['cf_email_use'])
|
||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||
$ma = sql_fetch($sql);
|
||||
if (!$ma['ma_id'])
|
||||
alert('보내실 내용을 선택하여 주십시오.');
|
||||
|
||||
// 전체회원수
|
||||
$sql = " select COUNT(*) as cnt from {$g5['member_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
$tot_cnt = $row['cnt'];
|
||||
|
||||
// 탈퇴대기회원수
|
||||
$sql = " select COUNT(*) as cnt from {$g5['member_table']} where mb_leave_date <> '' ";
|
||||
$row = sql_fetch($sql);
|
||||
$finish_cnt = $row['cnt'];
|
||||
|
||||
$last_option = explode('||', $ma['ma_last_option']);
|
||||
for ($i=0; $i<count($last_option); $i++) {
|
||||
$option = explode('=', $last_option[$i]);
|
||||
// 동적변수
|
||||
$var = $option[0];
|
||||
$$var = $option[1];
|
||||
}
|
||||
|
||||
if (!isset($mb_id1)) $mb_id1 = 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;
|
||||
|
||||
$g5['title'] = '회원메일발송';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>메일발송대상 선택</h2>
|
||||
<p>
|
||||
전체회원 <?php echo number_format($tot_cnt) ?>명 , 탈퇴대기회원 <?php echo number_format($finish_cnt) ?>명, 정상회원 <?php echo number_format($tot_cnt - $finish_cnt) ?>명 중 메일 발송 대상 선택
|
||||
</p>
|
||||
|
||||
<form name="frmsendmailselectform" id="frmsendmailselectform" action="./mail_select_list.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="ma_id" value='<?php echo $ma_id ?>'>
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">회원 ID</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_id1" value="1" id="mb_id1_all" <?php echo $mb_id1?"checked":""; ?>> <label for="mb_id1_all">전체</label>
|
||||
<input type="radio" name="mb_id1" value="0" id="mb_id1_section" <?php echo !$mb_id1?"checked":""; ?>> <label for="mb_id1_section">구간</label>
|
||||
<input type="text" name="mb_id1_from" value="<?php echo $mb_id1_from ?>" id="mb_id1_from" title="시작구간" class="frm_input"> 에서
|
||||
<input type="text" name="mb_id1_to" value="<?php echo $mb_id1_to ?>" id="mb_id1_to" title="종료구간" class="frm_input"> 까지
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||
<td>
|
||||
<?php echo help("메일 주소에 단어 포함 (예 : @sir.co.kr)") ?>
|
||||
<input type="text" name="mb_email" value="<?php echo $mb_email ?>" id="mb_email" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_mailling">메일링</label></th>
|
||||
<td>
|
||||
<select name="mb_mailling" id="mb_mailling">
|
||||
<option value="1">수신동의한 회원만
|
||||
<option value="">전체
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_level_from">권한</label></th>
|
||||
<td>
|
||||
<select name="mb_level_from" id="mb_level_from" title="최소권한">
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value="<?php echo $i ?>"><?php echo $i ?></option>
|
||||
<?php } ?>
|
||||
</select> 에서
|
||||
<select name="mb_level_to" id="mb_level_to" title="최대권한">
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value="<?php echo $i ?>"<?php echo $i==10 ? " selected" : ""; ?>><?php echo $i ?></option>
|
||||
<?php } ?>
|
||||
</select> 까지
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="gr_id">게시판그룹회원</label></th>
|
||||
<td>
|
||||
<select id="gr_id" name="gr_id">
|
||||
<option value=''>전체</option>
|
||||
<?php
|
||||
$sql = " select gr_id, gr_subject from {$g5['group_table']} order by gr_subject ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
echo '<option value="'.$row['gr_id'].'">'.$row['gr_subject'].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
메일발송대상 선택을 완료하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||
</p>
|
||||
<input type="submit" value="확인" class="btn_submit">
|
||||
<a href="./mail_list.php">목록 </a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
121
adm/mail_select_list.php
Normal file
121
adm/mail_select_list.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$ma_last_option = "";
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
$sql_where = " where (1) ";
|
||||
|
||||
// 회원ID ..에서 ..까지
|
||||
if ($mb_id1 != 1)
|
||||
$sql_where .= " and mb_id between '{$mb_id1_from}' and '{$mb_id1_to}' ";
|
||||
|
||||
// E-mail에 특정 단어 포함
|
||||
if ($mb_email != "")
|
||||
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
||||
|
||||
// 메일링
|
||||
if ($mb_mailling != "")
|
||||
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
||||
|
||||
// 권한
|
||||
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
||||
|
||||
// 게시판그룹회원
|
||||
if ($gr_id) {
|
||||
$group_member = "";
|
||||
$comma = "";
|
||||
$sql2 = " select mb_id from {$g5['group_member_table']} where gr_id = '{$gr_id}' order by mb_id ";
|
||||
$result2 = sql_query($sql2);
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$group_member .= "{$comma}'{$row2['mb_id']}'";
|
||||
$comma = ",";
|
||||
}
|
||||
|
||||
if (!$group_member)
|
||||
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
||||
|
||||
$sql_where .= " and mb_id in ($group_member) ";
|
||||
}
|
||||
|
||||
// 탈퇴, 차단된 회원은 제외
|
||||
$sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
|
||||
|
||||
$sql = " select COUNT(*) as cnt {$sql_common} {$sql_where} ";
|
||||
$row = sql_fetch($sql);
|
||||
$cnt = $row['cnt'];
|
||||
if ($cnt == 0)
|
||||
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
||||
|
||||
// 마지막 옵션을 저장합니다.
|
||||
$ma_last_option .= "mb_id1={$mb_id1}";
|
||||
$ma_last_option .= "||mb_id1_from={$mb_id1_from}";
|
||||
$ma_last_option .= "||mb_id1_to={$mb_id1_to}";
|
||||
$ma_last_option .= "||mb_email={$mb_email}";
|
||||
$ma_last_option .= "||mb_mailling={$mb_mailling}";
|
||||
$ma_last_option .= "||mb_level_from={$mb_level_from}";
|
||||
$ma_last_option .= "||mb_level_to={$mb_level_to}";
|
||||
$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}' ");
|
||||
|
||||
$g5['title'] = "메일발송 대상 회원";
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="cbox">
|
||||
<p>조건에 따라 선택된 메일발송 대상자 목록입니다.</p>
|
||||
|
||||
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">E-mail</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_datetime $sql_common $sql_where order by mb_id ";
|
||||
$result = sql_query($sql);
|
||||
$i=0;
|
||||
$ma_list = "";
|
||||
$cr = "";
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$i++;
|
||||
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
|
||||
$cr = "\n";
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $i ?></td>
|
||||
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||
<td class="td_mbnick"><?php echo $row['mb_nick'] ?></td>
|
||||
<td><?php echo $row['mb_email'] ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<textarea name="ma_list" style="display:none"><?=$ma_list?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="메일보내기" class="btn_submit">
|
||||
<a href="./mail_select_form.php?ma_id=<?php echo $ma_id ?>">뒤로</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
87
adm/mail_select_update.php
Normal file
87
adm/mail_select_update.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$html_title = '회원메일 발송';
|
||||
|
||||
check_demo();
|
||||
|
||||
check_token();
|
||||
|
||||
include_once('./admin.head.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$countgap = 10; // 몇건씩 보낼지 설정
|
||||
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
||||
$sleepsec = 200; // 천분의 몇초간 쉴지 설정
|
||||
|
||||
echo "<span style='font-size:9pt;'>";
|
||||
echo "<p>메일 발송중 ...<p><font color=crimson><b>[끝]</b></font> 이라는 단어가 나오기 전에는 중간에 중지하지 마세요.<p>";
|
||||
echo "</span>";
|
||||
?>
|
||||
|
||||
<span id="cont"></span>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
ob_flush();
|
||||
|
||||
$ma_id = trim($_POST['ma_id']);
|
||||
$select_member_list = addslashes(trim($_POST['ma_list']));
|
||||
|
||||
//print_r2($_POST); EXIT;
|
||||
$member_list = explode("\n", $select_member_list);
|
||||
|
||||
// 메일내용 가져오기
|
||||
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||
$ma = sql_fetch($sql);
|
||||
|
||||
$subject = $ma['ma_subject'];
|
||||
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($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);
|
||||
// 올바른 메일 주소만
|
||||
if ($sw == true)
|
||||
{
|
||||
$cnt++;
|
||||
|
||||
$mb_md5 = md5($mb_id.$to_email.$datetime);
|
||||
|
||||
$content = $ma['ma_content'];
|
||||
$content = preg_replace("/{이름}/", $name, $content);
|
||||
$content = preg_replace("/{별명}/", $nick, $content);
|
||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||
$content = preg_replace("/{이메일}/", $to_email, $content);
|
||||
|
||||
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||
|
||||
mailer($config['cf_title'], $config['cf_admin_email'], $to_email, $subject, $content, 1);
|
||||
|
||||
echo "<script> document.all.cont.innerHTML += '$cnt. $to_email ($mb_id : $name)<br>'; </script>\n";
|
||||
//echo "+";
|
||||
flush();
|
||||
ob_flush();
|
||||
ob_end_flush();
|
||||
usleep($sleepsec);
|
||||
if ($cnt % $countgap == 0)
|
||||
{
|
||||
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
||||
}
|
||||
|
||||
// 화면을 지운다... 부하를 줄임
|
||||
if ($cnt % $maxscreen == 0)
|
||||
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>
|
||||
39
adm/mail_test.php
Normal file
39
adm/mail_test.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$config['cf_email_use'])
|
||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_demo();
|
||||
|
||||
$g5['title'] = '회원메일 테스트';
|
||||
|
||||
$name = $member['mb_name'];
|
||||
$nick = $member['mb_nick'];
|
||||
$mb_id = $member['mb_id'];
|
||||
$email = $member['mb_email'];
|
||||
|
||||
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$ma = sql_fetch($sql);
|
||||
|
||||
$subject = $ma['ma_subject'];
|
||||
|
||||
$content = $ma['ma_content'];
|
||||
$content = preg_replace("/{이름}/", $name, $content);
|
||||
$content = preg_replace("/{별명}/", $nick, $content);
|
||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||
$content = preg_replace("/{이메일}/", $email, $content);
|
||||
|
||||
$mb_md5 = md5($member['mb_id'].$member['mb_email'].$member['mb_datetime']);
|
||||
|
||||
$content = $content . '<p>더 이상 정보 수신을 원치 않으시면 [<a href="'.G5_BBS_URL.'/email_stop.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5.'" target="_blank">수신거부</a>] 해 주십시오.</p>';
|
||||
|
||||
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
|
||||
|
||||
alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
|
||||
?>
|
||||
39
adm/mail_update.php
Normal file
39
adm/mail_update.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
$sub_menu = "200300";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u' || $w == 'd')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert {$g5['mail_table']}
|
||||
set ma_id = '{$_POST['ma_id']}',
|
||||
ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " update {$g5['mail_table']}
|
||||
set ma_subject = '{$_POST['ma_subject']}',
|
||||
ma_content = '{$_POST['ma_content']}',
|
||||
ma_time = '".G5_TIME_YMDHIS."',
|
||||
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||
where ma_id = '{$_POST['ma_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == 'd')
|
||||
{
|
||||
$sql = " delete from {$g5['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
?>
|
||||
349
adm/member_form.php
Normal file
349
adm/member_form.php
Normal file
@ -0,0 +1,349 @@
|
||||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$required_mb_id = 'required';
|
||||
$required_mb_id_class = 'required minlength=3 alnum_';
|
||||
$required_mb_password = 'required';
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
|
||||
$mb['mb_mailling'] = 1;
|
||||
$mb['mb_open'] = 1;
|
||||
$mb['mb_level'] = $config['cf_register_level'];
|
||||
$html_title = '추가';
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원자료입니다.');
|
||||
|
||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||
|
||||
$required_mb_id = 'readonly';
|
||||
$required_mb_password = '';
|
||||
$html_title = '수정';
|
||||
|
||||
$mb['mb_email'] = get_text($mb['mb_email']);
|
||||
$mb['mb_homepage'] = get_text($mb['mb_homepage']);
|
||||
$mb['mb_password_q'] = get_text($mb['mb_password_q']);
|
||||
$mb['mb_password_a'] = get_text($mb['mb_password_a']);
|
||||
$mb['mb_birth'] = get_text($mb['mb_birth']);
|
||||
$mb['mb_tel'] = get_text($mb['mb_tel']);
|
||||
$mb['mb_hp'] = get_text($mb['mb_hp']);
|
||||
$mb['mb_addr1'] = get_text($mb['mb_addr1']);
|
||||
$mb['mb_addr2'] = get_text($mb['mb_addr2']);
|
||||
$mb['mb_signature'] = get_text($mb['mb_signature']);
|
||||
$mb['mb_recommend'] = get_text($mb['mb_recommend']);
|
||||
$mb['mb_profile'] = get_text($mb['mb_profile']);
|
||||
$mb['mb_1'] = get_text($mb['mb_1']);
|
||||
$mb['mb_2'] = get_text($mb['mb_2']);
|
||||
$mb['mb_3'] = get_text($mb['mb_3']);
|
||||
$mb['mb_4'] = get_text($mb['mb_4']);
|
||||
$mb['mb_5'] = get_text($mb['mb_5']);
|
||||
$mb['mb_6'] = get_text($mb['mb_6']);
|
||||
$mb['mb_7'] = get_text($mb['mb_7']);
|
||||
$mb['mb_8'] = get_text($mb['mb_8']);
|
||||
$mb['mb_9'] = get_text($mb['mb_9']);
|
||||
$mb['mb_10'] = get_text($mb['mb_10']);
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
// 본인확인방법
|
||||
switch($mb['mb_certify']) {
|
||||
case 'hp':
|
||||
$mb_certify_case = '휴대폰';
|
||||
$mb_certify_val = 'hp';
|
||||
break;
|
||||
case 'ipin':
|
||||
$mb_certify_case = '아이핀';
|
||||
$mb_certify_val = 'ipin';
|
||||
break;
|
||||
case 'admin':
|
||||
$mb_certify_case = '관리자 수정';
|
||||
$mb_certify_val = 'admin';
|
||||
break;
|
||||
default:
|
||||
$mb_certify_case = '';
|
||||
$mb_certify_val = 'admin';
|
||||
break;
|
||||
}
|
||||
|
||||
// 본인확인
|
||||
$mb_certify_yes = $mb['mb_certify'] ? 'checked="checked"' : '';
|
||||
$mb_certify_no = !$mb['mb_certify'] ? 'checked="checked"' : '';
|
||||
|
||||
// 성인인증
|
||||
$mb_adult_yes = $mb['mb_adult'] ? 'checked="checked"' : '';
|
||||
$mb_adult_no = !$mb['mb_adult'] ? 'checked="checked"' : '';
|
||||
|
||||
//메일수신
|
||||
$mb_mailling_yes = $mb['mb_mailling'] ? 'checked="checked"' : '';
|
||||
$mb_mailling_no = !$mb['mb_mailling'] ? 'checked="checked"' : '';
|
||||
|
||||
// SMS 수신
|
||||
$mb_sms_yes = $mb['mb_sms'] ? 'checked="checked"' : '';
|
||||
$mb_sms_no = !$mb['mb_sms'] ? 'checked="checked"' : '';
|
||||
|
||||
// 정보 공개
|
||||
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
||||
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
||||
|
||||
if (isset($mb['mb_certify'])) {
|
||||
// 날짜시간형이라면 drop 시킴
|
||||
if (preg_match("/-/", $mb['mb_certify'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` DROP `mb_certify` ", false);
|
||||
}
|
||||
} else {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_certify` TINYINT(4) NOT NULL DEFAULT '0' AFTER `mb_hp` ", false);
|
||||
}
|
||||
|
||||
if(isset($mb['mb_adult'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` CHANGE `mb_adult` `mb_adult` TINYINT(4) NOT NULL DEFAULT '0' ", false);
|
||||
} else {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_adult` TINYINT NOT NULL DEFAULT '0' AFTER `mb_certify` ", false);
|
||||
}
|
||||
|
||||
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
||||
else $g5['title'] .= "";
|
||||
$g5['title'] .= '회원 '.$html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="fmember" id="fmember" action="./member_form_update.php" onsubmit="return fmember_submit(this);" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="cbox">
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
<col class="grid_3">
|
||||
<col class="grid_6">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_id">아이디<?php echo $sound_only ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id" <?php echo $required_mb_id ?> class="frm_input <?php echo $required_mb_id_class ?>" size="15" maxlength="20" >
|
||||
<?php if ($w=='u'){ ?><a href="./boardgroupmember_form.php?mb_id=<?php echo $mb['mb_id'] ?>">접근가능그룹보기</a><?php } ?>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_password">패스워드<?php echo $sound_only ?></label></th>
|
||||
<td><input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_name">이름(실명)<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required frm_input minlength=2" size="15" maxlength="20"></td>
|
||||
<th scope="row"><label for="mb_nick">별명<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_nick" value="<?php echo $mb['mb_nick'] ?>" id="mb_nick" required class="required frm_input minlength=2" size="15" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_level">회원 권한</label></th>
|
||||
<td><?php echo get_member_level_select('mb_level', 1, $member['mb_level'], $mb['mb_level']) ?></td>
|
||||
<th scope="row">포인트</th>
|
||||
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $mb['mb_id'] ?>" target="_blank"><?php echo number_format($mb['mb_point']) ?></a> 점</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_email" value="<?php echo $mb['mb_email'] ?>" id="mb_email" maxlength="100" required class="required frm_input email" size="30"></td>
|
||||
<th scope="row"><label for="mb_homepage">홈페이지</label></th>
|
||||
<td><input type="text" name="mb_homepage" value="<?php echo $mb['mb_homepage'] ?>" id="mb_homepage" class="frm_input" maxlength="255" size="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_hp">휴대폰번호</label></th>
|
||||
<td><input type="text" name="mb_hp" value="<?php echo $mb['mb_hp'] ?>" id="mb_hp" class="frm_input" size="15" maxlength="20"></td>
|
||||
<th scope="row"><label for="mb_tel">전화번호</label></th>
|
||||
<td><input type="text" name="mb_tel" value="<?php echo $mb['mb_tel'] ?>" id="mb_tel" class="frm_input" size="15" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">본인확인방법</th>
|
||||
<td colspan="3">
|
||||
<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>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">본인확인</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_certify" value="1" id="mb_certify_yes" <?php echo $mb_certify_yes; ?>>
|
||||
<label for="mb_certify_yes">예</label>
|
||||
<input type="radio" name="mb_certify" value="" id="mb_certify_no" <?php echo $mb_certify_no; ?>>
|
||||
<label for="mb_certify_no">아니오</label>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_adult">성인인증</label></th>
|
||||
<td>
|
||||
<input type="radio" name="mb_adult" value="1" id="mb_adult_yes" <?php echo $mb_adult_yes; ?>>
|
||||
<label for="mb_adult_yes">예</label>
|
||||
<input type="radio" name="mb_adult" value="0" id="mb_adult_no" <?php echo $mb_adult_no; ?>>
|
||||
<label for="mb_adult_no">아니오</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_zip1">주소</label></th>
|
||||
<td colspan="3" style="line-height:2em">
|
||||
<input type="text" name="mb_zip1" value="<?php echo $mb['mb_zip1'] ?>" id="mb_zip1" title="우편번호 앞자리" class="frm_input readonly" size="3" maxlength="3"> -
|
||||
<input type="text" name="mb_zip2" value="<?php echo $mb['mb_zip2'] ?>" id="mb_zip2" title="우편번호 뒷자리" class="frm_input readonly" size="3" maxlength="3">
|
||||
<span id="win_zip" style="display:block"></span>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" title="행정기본주소" class="frm_input readonly" size="50"><br>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" title="상세주소" class="frm_input" size="50"> 상세주소 입력
|
||||
<script>
|
||||
// 우편번호 자바스크립트 비활성화 대응을 위한 코드
|
||||
$('<a href="<?php echo G5_BBS_URL ?>/zip.php?frm_name=fmember&frm_zip1=mb_zip1&frm_zip2=mb_zip2&frm_addr1=mb_addr1&frm_addr2=mb_addr2" id="win_zip" class="win_zip_find btn_frmline" target="_blank">우편번호 검색</a><br>').appendTo('#win_zip');
|
||||
$('#win_zip').css('display','inline');
|
||||
$('#mb_zip1,#mb_zip2,#mb_addr1').attr('readonly','readonly');
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_icon">회원아이콘</label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help('이미지 크기는 <strong>넓이 '.$config['cf_member_icon_width'].'픽셀 높이 '.$config['cf_member_icon_height'].'픽셀</strong>로 해주세요.') ?>
|
||||
<input type="file" name="mb_icon" id="mb_icon">
|
||||
<?php
|
||||
$mb_dir = substr($mb['mb_id'],0,2);
|
||||
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
if (file_exists($icon_file)) {
|
||||
$icon_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
echo '<img src="'.$icon_url.'" alt="">';
|
||||
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">메일 수신</th>
|
||||
<td>
|
||||
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
||||
<label for="mb_mailling_yes">예</label>
|
||||
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
||||
<label for="mb_mailling_no">아니오</label>
|
||||
</td>
|
||||
<th scope="row"><label for="mb_sms_yes">SMS 수신</label></th>
|
||||
<td>
|
||||
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
||||
<label for="mb_sms_yes">예</label>
|
||||
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
||||
<label for="mb_sms_no">아니오</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_open">정보 공개</label></th>
|
||||
<td colspan="3">
|
||||
<input type="radio" name="mb_open" value="1" id="mb_open_yes" <?php echo $mb_open_yes; ?>>
|
||||
<label for="mb_open">예</label>
|
||||
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
||||
<label for="mb_open_no">아니오</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_signature">서명</label></th>
|
||||
<td colspan="3"><textarea name="mb_signature" id="mb_signature"><?php echo $mb['mb_signature'] ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_profile">자기 소개</label></th>
|
||||
<td colspan="3"><textarea name="mb_profile" id="mb_profile"><?php echo $mb['mb_profile'] ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_memo">메모</label></th>
|
||||
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo $mb['mb_memo'] ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<?php if ($w == 'u') { ?>
|
||||
<tr>
|
||||
<th scope="row">회원가입일</th>
|
||||
<td><?php echo $mb['mb_datetime'] ?></td>
|
||||
<th scope="row">최근접속일</th>
|
||||
<td><?php echo $mb['mb_today_login'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">IP</th>
|
||||
<td colspan="3"><?php echo $mb['mb_ip'] ?></td>
|
||||
</tr>
|
||||
<?php if ($config['cf_use_email_certify']) { ?>
|
||||
<tr>
|
||||
<th scope="row">인증일시</th>
|
||||
<td colspan="3">
|
||||
<?php if ($mb['mb_email_certify'] == '0000-00-00 00:00:00') { ?>
|
||||
<?php echo help('회원님이 메일을 수신할 수 없는 경우 등에 직접 인증처리를 하실 수 있습니다.') ?>
|
||||
<input type="checkbox" id="passive_certify" name="passive_certify">
|
||||
<label>수동인증</label>
|
||||
<?php } else { ?>
|
||||
<?php echo $mb['mb_email_certify'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
|
||||
<tr>
|
||||
<th scope="row">추천인</th>
|
||||
<td colspan="3"><?php echo ($mb['mb_recommend'] ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row">탈퇴일자</th>
|
||||
<td>
|
||||
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" class="frm_input" maxlength="8">
|
||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" title="탈퇴일을 오늘로 지정" 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; }"> 오늘
|
||||
</td>
|
||||
<th scope="row">접근차단일자</th>
|
||||
<td>
|
||||
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" class="frm_input" maxlength="8">
|
||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" title="접근차단일을 오늘로 지정" 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; }"> 오늘
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_<?php echo $i ?>">여분 필드 <?php echo $i ?></label></th>
|
||||
<td colspan="3"><input type="text" id="mb_<?php echo $i ?>" name="mb_<?php echo $i ?>" value="<?php echo $mb['mb_'.$i] ?>" class="frm_input" size="30" maxlength="255"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||
</p>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey='s'>
|
||||
<a href="./member_list.php?<?php echo $qstr ?>">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fmember_submit(f)
|
||||
{
|
||||
if (!f.mb_icon.value.match(/\.(gif|jp['e']g|png)$/i) && f.mb_icon.value) {
|
||||
alert('아이콘이 이미지 파일이 아닙니다. (bmp 제외)');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
150
adm/member_form_update.php
Normal file
150
adm/member_form_update.php
Normal file
@ -0,0 +1,150 @@
|
||||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
include_once(G5_LIB_PATH."/register.lib.php");
|
||||
|
||||
if ($w == 'u')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
$mb_id = escape_trim($_POST['mb_id']);
|
||||
|
||||
// 휴대폰번호 체크
|
||||
$mb_hp = $_POST['mb_hp'];
|
||||
if($mb_hp) {
|
||||
$result = exist_mb_hp($mb_hp, $mb_id);
|
||||
if ($result)
|
||||
alert($result);
|
||||
}
|
||||
|
||||
// 인증정보처리
|
||||
if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||
$mb_certify = $_POST['mb_certify_case'];
|
||||
$mb_adult = $_POST['mb_adult'];
|
||||
} else {
|
||||
$mb_certify = '';
|
||||
$mb_adult = 0;
|
||||
}
|
||||
|
||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||
mb_nick = '{$_POST['mb_nick']}',
|
||||
mb_email = '{$_POST['mb_email']}',
|
||||
mb_homepage = '{$_POST['mb_homepage']}',
|
||||
mb_tel = '{$_POST['mb_tel']}',
|
||||
mb_hp = '{$_POST['mb_hp']}',
|
||||
mb_certify = '{$mb_certify}',
|
||||
mb_adult = '{$mb_adult}',
|
||||
mb_zip1 = '{$_POST['mb_zip1']}',
|
||||
mb_zip2 = '{$_POST['mb_zip2']}',
|
||||
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||
mb_addr2 = '{$_POST['mb_addr2']}',
|
||||
mb_birth = '{$_POST['mb_birth']}',
|
||||
mb_sex = '{$_POST['mb_sex']}',
|
||||
mb_signature = '{$_POST['mb_signature']}',
|
||||
mb_leave_date = '{$_POST['mb_leave_date']}',
|
||||
mb_intercept_date='{$_POST['mb_intercept_date']}',
|
||||
mb_memo = '{$_POST['mb_memo']}',
|
||||
mb_mailling = '{$_POST['mb_mailling']}',
|
||||
mb_sms = '{$_POST['mb_sms']}',
|
||||
mb_open = '{$_POST['mb_open']}',
|
||||
mb_profile = '{$_POST['mb_profile']}',
|
||||
mb_level = '{$_POST['mb_level']}',
|
||||
mb_1 = '{$_POST['mb_1']}',
|
||||
mb_2 = '{$_POST['mb_2']}',
|
||||
mb_3 = '{$_POST['mb_3']}',
|
||||
mb_4 = '{$_POST['mb_4']}',
|
||||
mb_5 = '{$_POST['mb_5']}',
|
||||
mb_6 = '{$_POST['mb_6']}',
|
||||
mb_7 = '{$_POST['mb_7']}',
|
||||
mb_8 = '{$_POST['mb_8']}',
|
||||
mb_9 = '{$_POST['mb_9']}',
|
||||
mb_10 = '{$_POST['mb_10']}' ";
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if ($mb['mb_id'])
|
||||
alert('이미 존재하는 회원입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n별명 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||
|
||||
if ($mb['mb_nick'] == $mb_nick)
|
||||
alert('이미 존재하는 별명입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n별명 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||
|
||||
if ($mb['mb_email'] == $mb_email)
|
||||
alert('이미 존재하는 E-mail 입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n별명 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||
|
||||
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".sql_password($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} ");
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$mb = get_member($mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하지 않는 회원자료입니다.');
|
||||
|
||||
if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
|
||||
alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||
|
||||
if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
|
||||
alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select count(*) as cnt from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if($row['cnt'])
|
||||
alert('다른 회원이 사용 중인 이메일입니다.');
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if ($del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||
|
||||
// 아이콘 업로드
|
||||
if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||
if (!preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
alert($_FILES['mb_icon']['name'] . '은(는) gif 파일이 아닙니다.');
|
||||
}
|
||||
|
||||
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
@mkdir(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||
|
||||
$dest_path = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||
|
||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||
chmod($dest_path, G5_FILE_PERMISSION);
|
||||
|
||||
if (file_exists($dest_path)) {
|
||||
$size = getimagesize($dest_path);
|
||||
// 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
|
||||
if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
|
||||
@unlink($dest_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mb_password)
|
||||
$sql_password = " , mb_password = '".sql_password($mb_password)."' ";
|
||||
else
|
||||
$sql_password = "";
|
||||
|
||||
if ($passive_certify)
|
||||
$sql_certify = " , mb_email_certify = '".G5_TIME_YMDHIS."' ";
|
||||
else
|
||||
$sql_certify = "";
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set {$sql_common}
|
||||
{$sql_password}
|
||||
{$sql_certify}
|
||||
where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
307
adm/member_list.php
Normal file
307
adm/member_list.php
Normal file
@ -0,0 +1,307 @@
|
||||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case 'mb_point' :
|
||||
$sql_search .= " ({$sfl} >= '{$stx}') ";
|
||||
break;
|
||||
case 'mb_level' :
|
||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||
break;
|
||||
case 'mb_tel' :
|
||||
case 'mb_hp' :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if ($is_admin != 'super')
|
||||
$sql_search .= " and mb_level <= '{$member['mb_level']}' ";
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "mb_datetime";
|
||||
$sod = "desc";
|
||||
}
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
// 탈퇴회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 차단회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$listall = "";
|
||||
if (isset($sfl) || isset($stx)) // 검색일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$g5['title'] = '회원관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 15;
|
||||
?>
|
||||
|
||||
<form id="fsearch" name="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>회원검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
총회원수 <?php echo number_format($total_count) ?>명 중,
|
||||
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>">차단 <?php echo number_format($intercept_count) ?></a>명,
|
||||
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>">탈퇴 <?php echo number_format($leave_count) ?></a>명
|
||||
</span>
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl">
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||
<option value="mb_nick"<?php echo get_selected($_GET['sfl'], "mb_nick"); ?>>별명</option>
|
||||
<option value="mb_name"<?php echo get_selected($_GET['sfl'], "mb_name"); ?>>이름</option>
|
||||
<option value="mb_level"<?php echo get_selected($_GET['sfl'], "mb_level"); ?>>권한</option>
|
||||
<option value="mb_email"<?php echo get_selected($_GET['sfl'], "mb_email"); ?>>E-MAIL</option>
|
||||
<option value="mb_tel"<?php echo get_selected($_GET['sfl'], "mb_tel"); ?>>전화번호</option>
|
||||
<option value="mb_hp"<?php echo get_selected($_GET['sfl'], "mb_hp"); ?>>휴대폰번호</option>
|
||||
<option value="mb_point"<?php echo get_selected($_GET['sfl'], "mb_point"); ?>>포인트</option>
|
||||
<option value="mb_datetime"<?php echo get_selected($_GET['sfl'], "mb_datetime"); ?>>가입일시</option>
|
||||
<option value="mb_ip"<?php echo get_selected($_GET['sfl'], "mb_ip"); ?>>IP</option>
|
||||
<option value="mb_recommend"<?php echo get_selected($_GET['sfl'], "mb_recommend"); ?>>추천인</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>회원 목록</h2>
|
||||
<p>회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 별명은 삭제하지 않고 영구 보관합니다.</p>
|
||||
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<div class="btn_add sort_with">
|
||||
<a href="./member_form.php" id="member_add">회원추가</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<ul id="sort_mb" class="sort_odr">
|
||||
<li><?php echo subject_sort_link('mb_id') ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_name') ?>이름<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_point', '', 'desc') ?> 포인트<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_nick') ?>별명<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>메일수신<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('mb_datetime', '', 'desc') ?>가입일<span class="sound_only"> 순 정렬</span></a></li>
|
||||
</ul>
|
||||
|
||||
<form name="fmemberlist" id="fmemberlist" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<table class="tbl_mb_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" rowspan="2" id="mb_list_chk">
|
||||
<label for="chkall" class="sound_only">회원 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col" rowspan="2" id="mb_list_id">아이디</th>
|
||||
<th scope="col" id="mb_list_name">이름</th>
|
||||
<th scope="col" colspan="5" id="mb_list_cert">본인확인</th>
|
||||
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
||||
<th scope="col" id="mb_list_auth">상태/권한</th>
|
||||
<th scope="col" id="mb_list_lastcall">최종접속</th>
|
||||
<th scope="col" rowspan="2" id="mb_list_grp">접근<br>그룹</th>
|
||||
<th scope="col" rowspan="2" id="mb_list_mng">관리</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" id="mb_list_nick">별명</th>
|
||||
<th scope="col" id="mb_list_mailr">메일<br>수신</th>
|
||||
<th scope="col" id="mb_list_open">정보<br>공개</th>
|
||||
<th scope="col" id="mb_list_mailc">메일<br>인증</th>
|
||||
<th scope="col" id="mb_list_adultc">성인<br>인증</th>
|
||||
<th scope="col" id="mb_list_deny">접근<br>차단</th>
|
||||
<th scope="col" id="mb_list_tel">전화번호</th>
|
||||
<th scope="col" id="mb_list_point">포인트</th>
|
||||
<th scope="col" id="mb_list_join">가입일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
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']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = '';
|
||||
if ($row2['cnt'])
|
||||
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||
|
||||
if ($is_admin == 'group') {
|
||||
$s_mod = '';
|
||||
$s_del = '';
|
||||
} else {
|
||||
$s_mod = '<a href="./member_form.php?'.$qstr.'&w=u&mb_id='.$row['mb_id'].'">수정</a>';
|
||||
//$s_del = '<a href="javascript:post_delete(\'member_delete.php\', \''.$row['mb_id'].'\');">삭제</a>';
|
||||
}
|
||||
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
|
||||
|
||||
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G5_SERVER_TIME);
|
||||
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G5_SERVER_TIME);
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$mb_id = $row['mb_id'];
|
||||
$leave_msg = '';
|
||||
$intercept_msg = '';
|
||||
$intercept_title = '';
|
||||
if ($row['mb_leave_date']) {
|
||||
$mb_id = $mb_id;
|
||||
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||
}
|
||||
else if ($row['mb_intercept_date']) {
|
||||
$mb_id = $mb_id;
|
||||
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||
$intercept_title = '차단해제';
|
||||
}
|
||||
if ($intercept_title == '')
|
||||
$intercept_title = '차단하기';
|
||||
|
||||
$address = $row['mb_zip1'] ? $row['mb_addr1'].' '.$row['mb_addr2'] : '';
|
||||
|
||||
$tr_bg = '';
|
||||
if ($i%2 == 0) $tr_bg = 'class="tr_bg"';
|
||||
|
||||
switch($row['mb_certify']) {
|
||||
case 'hp':
|
||||
$mb_certify_case = '휴대폰';
|
||||
$mb_certify_val = 'hp';
|
||||
break;
|
||||
case 'ipin':
|
||||
$mb_certify_case = '아이핀';
|
||||
$mb_certify_val = '';
|
||||
break;
|
||||
case 'admin':
|
||||
$mb_certify_case = '관리자';
|
||||
$mb_certify_val = 'admin';
|
||||
break;
|
||||
default:
|
||||
$mb_certify_case = ' ';
|
||||
$mb_certify_val = 'admin';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<tr <?php echo $tr_bg; ?>>
|
||||
<td headers="mb_list_chk" class="td_chk" rowspan="2">
|
||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_name']; ?> <?php echo $row['mb_nick']; ?>님</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td headers="mb_list_id" rowspan="2" class="td_name sv_use"><?php echo $mb_id ?></td>
|
||||
<td headers="mb_list_name" class="td_mbname"><?php echo $row['mb_name']; ?></td>
|
||||
<td headers="mb_list_cert" colspan="5">
|
||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify']=='ipin'?'checked':''; ?>>
|
||||
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label>
|
||||
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="hp" id="mb_certify_hp_<?php echo $i; ?>" <?php echo $row['mb_certify']=='hp'?'checked':''; ?>>
|
||||
<label for="mb_certify_hp_<?php echo $i; ?>">휴대폰</label>
|
||||
</td>
|
||||
<td headers="mb_list_mobile" class="td_callnum"><?php echo $row['mb_hp']; ?></td>
|
||||
<td headers="mb_list_auth" class="">
|
||||
<?php
|
||||
if ($leave_msg || $intercept_msg) echo $leave_msg.' '.$intercept_msg;
|
||||
else echo "정상";
|
||||
?>
|
||||
<?php echo get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level']) ?>
|
||||
</td>
|
||||
<td headers="mb_list_lastcall" class="td_date"><?php echo substr($row['mb_today_login'],2,8); ?></td>
|
||||
<td headers="mb_list_grp" rowspan="2" class="td_smallnum"><?php echo $group ?></td>
|
||||
<td headers="mb_list_mng" rowspan="2" class="td_smallmng"><?php echo $s_mod ?><br><?php echo $s_grp ?></td>
|
||||
</tr>
|
||||
<tr <?php echo $tr_bg; ?>>
|
||||
<td headers="mb_list_nick" class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||
<td headers="mb_list_mailc" class="td_chk"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'<span class="txt_true">Yes</span>':'<span class="txt_false">No</span>'; ?></td>
|
||||
<td headers="mb_list_mailr" class="td_chk"><input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling']?'checked':''; ?> value="1"></td>
|
||||
<td headers="mb_list_open" class="td_chk"><input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open']?'checked':''; ?> value="1"></td>
|
||||
<td headers="mb_list_adultc" class="td_chk"><input type="checkbox" name="mb_adult[<?php echo $i; ?>]" <?php echo $row['mb_adult']?'checked':''; ?> value="1"></td>
|
||||
<td headers="mb_list_deny" class="td_chk">
|
||||
<?php if(empty($row['mb_leave_date'])){ ?>
|
||||
<input type="checkbox" name="mb_intercept_date[<?php echo $i; ?>]" <?php echo $row['mb_intercept_date']?'checked':''; ?> value="<?php echo $intercept_date ?>" id="mb_intercept_date_<?php echo $i ?>" title="<?php echo $intercept_title ?>">
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td headers="mb_list_tel"><?php echo $row['mb_tel']; ?></td>
|
||||
<td headers="mb_list_point" class="td_num"><a href="point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||
<td headers="mb_list_join"><?php echo substr($row['mb_datetime'],2,8); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&page='); ?>
|
||||
|
||||
<script>
|
||||
function fmemberlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
75
adm/member_list_update.php
Normal file
75
adm/member_list_update.php
Normal file
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
$sub_menu = "200100";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||
} else {
|
||||
if($_POST['mb_certify'][$k])
|
||||
$mb_adult = $_POST['mb_adult'][$k];
|
||||
else
|
||||
$mb_adult = 0;
|
||||
|
||||
$sql = " update {$g5['member_table']}
|
||||
set mb_level = '{$_POST['mb_level'][$k]}',
|
||||
mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}',
|
||||
mb_mailling = '{$_POST['mb_mailling'][$k]}',
|
||||
mb_open = '{$_POST['mb_open'][$k]}',
|
||||
mb_certify = '{$_POST['mb_certify'][$k]}',
|
||||
mb_adult = '{$mb_adult}'
|
||||
where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
|
||||
} else if (is_admin($mb['mb_id']) == 'super') {
|
||||
$msg .= $mb['mb_id'].' : 최고 관리자는 삭제할 수 없습니다.\\n';
|
||||
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
|
||||
} else {
|
||||
// 회원자료 삭제
|
||||
member_delete($mb['mb_id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
//echo '<script> alert("'.$msg.'"); </script>';
|
||||
alert($msg);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
?>
|
||||
10
adm/phpinfo.php
Normal file
10
adm/phpinfo.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$sub_menu = "100500";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
phpinfo();
|
||||
?>
|
||||
64
adm/point_clear.php
Normal file
64
adm/point_clear.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
$sub_menu = "200200";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!$ok)
|
||||
alert();
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('포인트 정리는 최고관리자만 가능합니다.');
|
||||
|
||||
$g5['title'] = '포인트 정리';
|
||||
include_once('./admin.head.php');
|
||||
echo '<span id="ct"></span>';
|
||||
include_once('./admin.tail.php');
|
||||
flush();
|
||||
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>포인트 정리중...</p>\';</script>'."\n";
|
||||
flush();
|
||||
|
||||
$max_count = 50;
|
||||
|
||||
// 테이블 락을 걸고
|
||||
$sql = " LOCK TABLES {$g5['member_table']} WRITE, {$g5['point_table']} WRITE ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " select mb_id, count(po_point) as cnt
|
||||
from {$g5['point_table']}
|
||||
group by mb_id
|
||||
having cnt > {$max_count}+1
|
||||
order by cnt ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$count = 0;
|
||||
$total = 0;
|
||||
$sql2 = " select po_id, po_point
|
||||
from {$g5['point_table']}
|
||||
where mb_id = '{$row['mb_id']}'
|
||||
order by po_id desc
|
||||
limit {$max_count}, {$row['cnt']} ";
|
||||
$result2 = sql_query($sql2);
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++)
|
||||
{
|
||||
$count++;
|
||||
$total += $row2['po_point'];
|
||||
|
||||
sql_query(" delete from {$g5['point_table']} where po_id = '{$row2['po_id']}' ");
|
||||
}
|
||||
|
||||
insert_point($row['mb_id'], $total, '포인트 {$count}건 정리', '@clear', $row['mb_id'], G5_TIME_YMD."-".uniqid(""));
|
||||
|
||||
$str = $row['mb_id']."님 포인트 내역 ".number_format($count)."건 ".number_format($total)."점 정리<br>";
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \''.$str.'\';</script>'."\n";
|
||||
flush();
|
||||
}
|
||||
|
||||
// 테이블 락을 풀고
|
||||
$sql = " UNLOCK TABLES ";
|
||||
sql_query($sql);
|
||||
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>총 '.$i.'건의 회원포인트 내역이 정리 되었습니다.</p>\';</script>'."\n";
|
||||
?>
|
||||
272
adm/point_list.php
Normal file
272
adm/point_list.php
Normal file
@ -0,0 +1,272 @@
|
||||
<?php
|
||||
$sub_menu = "200200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g5['point_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case 'mb_id' :
|
||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "po_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$mb = array();
|
||||
if ($sfl == 'mb_id' && $stx)
|
||||
$mb = get_member($stx);
|
||||
|
||||
$g5['title'] = '포인트관리';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$colspan = 9;
|
||||
|
||||
$po_expire_term = '';
|
||||
if($config['cf_point_term'] > 0) {
|
||||
$po_expire_term = $config['cf_point_term'];
|
||||
}
|
||||
|
||||
if (strstr($sfl, "mb_id"))
|
||||
$mb_id = $stx;
|
||||
else
|
||||
$mb_id = "";
|
||||
?>
|
||||
|
||||
<script>
|
||||
function point_clear()
|
||||
{
|
||||
if (confirm('포인트 정리를 하시면 최근 50건 이전의 포인트 부여 내역을 삭제하므로 포인트 부여 내역을 필요로 할때 찾지 못할 수도 있습니다. 그래도 진행하시겠습니까?'))
|
||||
{
|
||||
document.location.href = "./point_clear.php?ok=1";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form name="fsearch" id="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>포인트 내역 검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
전체 <?php echo number_format($total_count) ?> 건
|
||||
<?php
|
||||
if (isset($mb['mb_id']) && $mb['mb_id']) {
|
||||
echo ' (' . $mb['mb_id'] .' 님 포인트 합계 : ' . number_format($mb['mb_point']) . '점)';
|
||||
} else {
|
||||
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g5['point_table']} ");
|
||||
echo ' (전체 합계 '.number_format($row2['sum_point']).'점)';
|
||||
}
|
||||
?>
|
||||
<?php if ($is_admin == 'super') { ?><!-- <a href="javascript:point_clear();">포인트정리</a> --><?php } ?>
|
||||
</span>
|
||||
<select name="sfl" title="검색대상">
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||
<option value="po_content"<?php echo get_selected($_GET['sfl'], "po_content"); ?>>내용</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>포인트 내역</h2>
|
||||
|
||||
<ul class="sort_odr">
|
||||
<li><?php echo subject_sort_link('mb_id') ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('po_datetime') ?>일시<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('po_content') ?>포인트 내용<span class="sound_only"> 순 정렬</span></a></li>
|
||||
<li><?php echo subject_sort_link('po_point') ?>포인트<span class="sound_only"> 순 정렬</span></a></li>
|
||||
</ul>
|
||||
|
||||
<form name="fpointlist" id="fpointlist" method="post" action="./point_list_delete.php" onsubmit="return fpointlist_submit(this);">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<table class="tbl_pt_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">포인트 내역 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">회원아이디</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">별명</th>
|
||||
<th scope="col">포인트 내용</th>
|
||||
<th scope="col">포인트</th>
|
||||
<th scope="col">일시</th>
|
||||
<th scope="col">만료일</th>
|
||||
<th scope="col">포인트합</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if ($i==0 || ($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']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
}
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||
|
||||
$link1 = $link2 = '';
|
||||
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
$expr = '';
|
||||
if($row['po_expired'] == 1)
|
||||
$expr = ' txt_expired';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>" id="po_id_<?php echo $i ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only">내역</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_mbid"><a href="?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||
<td class="td_mbname"><?php echo $row2['mb_name'] ?></td>
|
||||
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||
<td class="td_pt_log"><?php echo $link1 ?><?php echo $row['po_content'] ?><?php echo $link2 ?></td>
|
||||
<td class="td_num td_pt"><?php echo number_format($row['po_point']) ?></td>
|
||||
<td class="td_time"><?php echo $row['po_datetime'] ?></td>
|
||||
<td class="td_date<?php echo $expr; ?>">
|
||||
<?php if ($row['po_expired'] == 1) { ?>
|
||||
만료<?php echo substr(str_replace('-', '', $row['po_expire_date']), 2); ?>
|
||||
<?php } else echo $row['po_expire_date'] == '9999-12-31' ? ' ' : $row['po_expire_date']; ?>
|
||||
</td>
|
||||
<td class="td_num td_pt"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<section id="point_mng" class="cbox">
|
||||
<h2>개별회원 포인트 증감 설정</h2>
|
||||
|
||||
<form name="fpointlist2" method="post" id="fpointlist2" action="./point_update.php" autocomplete="off">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<colgroup>
|
||||
<col class="grid_3">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" class="required frm_input" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_content">포인트 내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="po_content" id="po_content" required class="required frm_input" size="80"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_point">포인트<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="po_point" id="po_point" required class="required frm_input"></td>
|
||||
</tr>
|
||||
<?php if($config['cf_point_term'] > 0) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_expire_term">포인트 유효기간</label></th>
|
||||
<td><input type="text" name="po_expire_term" value="<?php echo $po_expire_term; ?>" id="po_expire_term" class="frm_input" size="5"> 일</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function fpointlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
59
adm/point_list_delete.php
Normal file
59
adm/point_list_delete.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
$sub_menu = '200200';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// 포인트 내역정보
|
||||
$sql = " select * from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['po_id'])
|
||||
continue;
|
||||
|
||||
if($row['po_point'] < 0) {
|
||||
$mb_id = $row['mb_id'];
|
||||
$po_point = abs($row['po_point']);
|
||||
|
||||
if($row['po_rel_table'] == '@expire')
|
||||
delete_expire_point($mb_id, $po_point);
|
||||
else
|
||||
delete_use_point($mb_id, $po_point);
|
||||
} else {
|
||||
if($row['po_use_point'] > 0) {
|
||||
insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
|
||||
}
|
||||
}
|
||||
|
||||
// 포인트 내역삭제
|
||||
$sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// po_mb_point에 반영
|
||||
$sql = " update {$g5['point_table']}
|
||||
set po_mb_point = po_mb_point - '{$row['po_point']}'
|
||||
where mb_id = '{$_POST['mb_id'][$k]}'
|
||||
and po_id > '{$_POST['po_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 포인트 UPDATE
|
||||
$sum_point = get_point_sum($_POST['mb_id'][$k]);
|
||||
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
?>
|
||||
25
adm/point_update.php
Normal file
25
adm/point_update.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$sub_menu = "200200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
$mb_id = $_POST['mb_id'];
|
||||
$po_point = $_POST['po_point'];
|
||||
$po_content = $_POST['po_content'];
|
||||
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
|
||||
if (!$mb['mb_id'])
|
||||
alert('존재하는 회원아이디가 아닙니다.', './point_list.php?'.$qstr);
|
||||
|
||||
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
|
||||
alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?'.$qstr);
|
||||
|
||||
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'].'-'.uniqid(''), $expire);
|
||||
|
||||
goto_url('./point_list.php?'.$qstr);
|
||||
?>
|
||||
27
adm/poll_delete.php
Normal file
27
adm/poll_delete.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if(!$count)
|
||||
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$po_id = $_POST['chk'][$i];
|
||||
|
||||
$sql = " delete from {$g5['poll_table']} where po_id = '$po_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " delete from {$g5['poll_etc_table']} where po_id = '$po_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./poll_list.php?'.$qstr);
|
||||
?>
|
||||
113
adm/poll_form.php
Normal file
113
adm/poll_form.php
Normal file
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$html_title = '투표';
|
||||
if ($w == '')
|
||||
$html_title .= ' 생성';
|
||||
else if ($w == 'u') {
|
||||
$html_title .= ' 수정';
|
||||
$sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' ";
|
||||
$po = sql_fetch($sql);
|
||||
} else
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="cbox">
|
||||
<form name="fpoll" id="fpoll" action="./poll_form_update.php" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_subject">투표 제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="po_subject" value="<?php echo $po['po_subject'] ?>" id="po_subject" required class="required frm_input" size="80" maxlength="125"></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
for ($i=1; $i<=9; $i++) {
|
||||
$required = '';
|
||||
if ($i==1 || $i==2) {
|
||||
$required = 'required';
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
}
|
||||
|
||||
$po_poll = get_text($po['po_poll'.$i]);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="po_poll<?php echo $i ?>">항목 <?php echo $i ?><?php echo $sound_only ?></label></th>
|
||||
<td>
|
||||
<input type="text" name="po_poll<?php echo $i ?>" value="<?php echo $po_poll ?>" id="po_poll<?php echo $i ?>" <?php echo $required ?> class="frm_input <?php echo $required ?>" maxlength="125">
|
||||
<label for="po_cnt<?php echo $i ?>">항목 <?php echo $i ?> 투표수</label>
|
||||
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po['po_cnt'.$i] ?>" id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="po_etc">기타의견</label></th>
|
||||
<td>
|
||||
<?php echo help('기타 의견을 남길 수 있도록 하려면, 간단한 질문을 입력하세요.') ?>
|
||||
<input type="text" name="po_etc" value="<?php echo get_text($po['po_etc']) ?>" id="po_etc" class="frm_input" size="80" maxlength="125">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_level">투표가능 회원레벨</label></th>
|
||||
<td>
|
||||
<?php echo help("레벨을 1로 설정하면 손님도 투표할 수 있습니다.") ?>
|
||||
<?php echo get_member_level_select('po_level', 1, 10, $po['po_level']) ?> 이상 투표할 수 있음
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_point">포인트</label></th>
|
||||
<td>
|
||||
<?php echo help('투표에 참여한 회원에게 포인트를 부여합니다.') ?>
|
||||
<input type="text" name="po_point" value="<?php echo $po['po_point'] ?>" id="po_point" class="frm_input"> 점
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($w == 'u') { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_date">투표시작일</label></th>
|
||||
<td><input type="text" name="po_date" value="<?php echo $po['po_date'] ?>" id="po_date" class="frm_input" maxlength="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="po_ips">투표참가 IP</label></th>
|
||||
<td><textarea name="po_ips" id="po_ips" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['po_ips']) ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_ids">투표참가 회원</label></th>
|
||||
<td><textarea name="mb_ids" id="mb_ids" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['mb_ids']) ?></textarea></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<p>
|
||||
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||
</p>
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./poll_list.php?<?php echo $qstr ?>">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
70
adm/poll_form_update.php
Normal file
70
adm/poll_form_update.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
$w = $_POST['w'];
|
||||
if ($w == 'u' || $w == 'd')
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
if ($w == '')
|
||||
{
|
||||
$sql = " insert {$g5['poll_table']}
|
||||
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date )
|
||||
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMDHIS."' ) ";
|
||||
sql_query($sql);
|
||||
|
||||
$po_id = mysql_insert_id();
|
||||
}
|
||||
else if ($w == 'u')
|
||||
{
|
||||
$sql = " update {$g5['poll_table']}
|
||||
set po_subject = '{$_POST['po_subject']}',
|
||||
po_poll1 = '{$_POST['po_poll1']}',
|
||||
po_poll2 = '{$_POST['po_poll2']}',
|
||||
po_poll3 = '{$_POST['po_poll3']}',
|
||||
po_poll4 = '{$_POST['po_poll4']}',
|
||||
po_poll5 = '{$_POST['po_poll5']}',
|
||||
po_poll6 = '{$_POST['po_poll6']}',
|
||||
po_poll7 = '{$_POST['po_poll7']}',
|
||||
po_poll8 = '{$_POST['po_poll8']}',
|
||||
po_poll9 = '{$_POST['po_poll9']}',
|
||||
po_cnt1 = '{$_POST['po_cnt1']}',
|
||||
po_cnt2 = '{$_POST['po_cnt2']}',
|
||||
po_cnt3 = '{$_POST['po_cnt3']}',
|
||||
po_cnt4 = '{$_POST['po_cnt4']}',
|
||||
po_cnt5 = '{$_POST['po_cnt5']}',
|
||||
po_cnt6 = '{$_POST['po_cnt6']}',
|
||||
po_cnt7 = '{$_POST['po_cnt7']}',
|
||||
po_cnt8 = '{$_POST['po_cnt8']}',
|
||||
po_cnt9 = '{$_POST['po_cnt9']}',
|
||||
po_etc = '{$_POST['po_etc']}',
|
||||
po_level = '{$_POST['po_level']}',
|
||||
po_point = '{$_POST['po_point']}',
|
||||
po_date = '{$_POST['po_date']}'
|
||||
where po_id = '{$_POST['po_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == 'd')
|
||||
{
|
||||
$sql = " delete from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " delete from {$g5['poll_etc_table']} where po_id = '{$_POST['po_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
// 가장 큰 투표번호를 기본환경설정에 저장하여
|
||||
// 투표번호를 넘겨주지 않았을 경우
|
||||
// 가장 큰 투표번호를 구해야 하는 쿼리를 대체한다
|
||||
$row = sql_fetch(" select max(po_id) as max_po_id from {$g5['poll_table']} ");
|
||||
sql_query(" update {$g5['config_table']} set cf_max_po_id = '{$row['max_po_id']}' ");
|
||||
|
||||
if ($w == 'd')
|
||||
goto_url('./poll_list.php?'.$qstr);
|
||||
else
|
||||
goto_url('./poll_form.php?w=u&po_id='.$po_id.'&'.$qstr);
|
||||
?>
|
||||
158
adm/poll_list.php
Normal file
158
adm/poll_list.php
Normal file
@ -0,0 +1,158 @@
|
||||
<?php
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g5['poll_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "po_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$g5['title'] = '투표관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 6;
|
||||
?>
|
||||
|
||||
<form id="fsearch" name="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>투표검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
투표수 : <?php echo number_format($total_count) ?>개
|
||||
</span>
|
||||
<select name="sfl" id="sfl" title="검색대상">
|
||||
<option value="po_subject"<?php echo get_selected($_GET['sfl'], "po_subject"); ?>>제목</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>투표목록</h2>
|
||||
|
||||
<div class="btn_add">
|
||||
<a href="./poll_form.php" id="poll_add">투표 추가</a>
|
||||
</div>
|
||||
|
||||
<form name="fpolllist" id="fpolllist" action="./poll_delete.php" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 투표 전체선택" onclick="check_all(this.form)"></th>
|
||||
<th scope="col">번호</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">투표권한</th>
|
||||
<th scope="col">투표수</th>
|
||||
<th scope="col">기타의견</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$sql2 = " select sum(po_cnt1+po_cnt2+po_cnt3+po_cnt4+po_cnt5+po_cnt6+po_cnt7+po_cnt8+po_cnt9) as sum_po_cnt from {$g5['poll_table']} where po_id = '{$row['po_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$po_etc = ($row['po_etc']) ? "사용" : "미사용";
|
||||
|
||||
$s_mod = '<a href="./poll_form.php?'.$qstr.'&w=u&po_id='.$row['po_id'].'">수정</a>';
|
||||
//$s_del = '<a href="javascript:post_delete(\'poll_form_update.php\', \''.$row['po_id'].'\');">삭제</a>';
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>" title="투표선택">
|
||||
</td>
|
||||
<td class="td_num"><?php echo $row['po_id'] ?></td>
|
||||
<td><?php echo cut_str(get_text($row['po_subject']),70) ?></td>
|
||||
<td class="td_num"><?php echo $row['po_level'] ?></td>
|
||||
<td class="td_num"><?php echo $row2['sum_po_cnt'] ?></td>
|
||||
<td class="td_etc"><?php echo $po_etc ?></td>
|
||||
<td class="td_smallmng"><?php echo $s_mod ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<button type="submit">선택삭제</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#fpolllist').submit(function() {
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
166
adm/popular_list.php
Normal file
166
adm/popular_list.php
Normal file
@ -0,0 +1,166 @@
|
||||
<?php
|
||||
$sub_menu = "300300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
// 체크된 자료 삭제
|
||||
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
$pp_id = $_POST['chk'][$i];
|
||||
|
||||
sql_query(" delete from {$g5['popular_table']} where pp_id = '$pp_id' ", true);
|
||||
}
|
||||
}
|
||||
|
||||
$sql_common = " from {$g5['popular_table']} a ";
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
case "pp_word" :
|
||||
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||
break;
|
||||
case "pp_date" :
|
||||
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||
break;
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "pp_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
if (isset($stx))
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$g5['title'] = '인기검색어관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 4;
|
||||
?>
|
||||
|
||||
<script>
|
||||
var list_update_php = '';
|
||||
var list_delete_php = 'popular_list.php';
|
||||
</script>
|
||||
|
||||
<form id="fsearch" name="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>인기검색어 검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
건수 : <?php echo number_format($total_count) ?>개
|
||||
</span>
|
||||
<select name="sfl" title="검색대상">
|
||||
<option value="pp_word"<?php echo get_selected($_GET['sfl'], "pp_word"); ?>>검색어</option>
|
||||
<option value="pp_date"<?php echo get_selected($_GET['sfl'], "pp_date"); ?>>등록일</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>인기검색어 목록</h2>
|
||||
|
||||
<form name="fpopularlist" id="fpopularlist" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<table class="tbl_pop_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 인기검색어 전체선택" onclick="check_all(this.form)"></th>
|
||||
<th scope="col"><?php echo subject_sort_link('pp_word') ?>검색어</a></th>
|
||||
<th scope="col">등록일</th>
|
||||
<th scope="col">등록IP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
$word = get_text($row['pp_word']);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['pp_id'] ?>" id="chk_<?php echo $i ?>" title="<?php echo $word ?> 선택">
|
||||
</td>
|
||||
<td> <a href="<?php echo $_SERVER['PHP_SELF'] ?>?sfl=pp_word&stx=<?php echo $word ?>"><?php echo $word ?></a></td>
|
||||
<td><?php echo $row['pp_date'] ?></td>
|
||||
<td><?php echo $row['pp_ip'] ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<div class="btn_list">
|
||||
<button type="submit">선택삭제</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#fpopularlist').submit(function() {
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
if (!is_checked("chk[]")) {
|
||||
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
110
adm/popular_rank.php
Normal file
110
adm/popular_rank.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
$sub_menu = "300400";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||
if (empty($to_date)) $to_date = G5_TIME_YMD;
|
||||
|
||||
$qstr = "fr_date={$fr_date}{&to_date}={$to_date}";
|
||||
|
||||
$sql_common = " from {$g5['popular_table']} a ";
|
||||
$sql_search = " where trim(pp_word) <> '' and pp_date between '{$fr_date}' and '{$to_date}' ";
|
||||
$sql_group = " group by pp_word ";
|
||||
$sql_order = " order by cnt desc ";
|
||||
|
||||
$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} ";
|
||||
$result = sql_query($sql);
|
||||
$total_count = mysql_num_rows($result);
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '';
|
||||
if (!empty($_GET['fr_date']) || !empty($_GET['to_date']))
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||
|
||||
$g5['title'] = '인기검색어순위';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 3;
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||
});
|
||||
</script>
|
||||
|
||||
<form name="fsearch" id="fsearch" method="get">
|
||||
<fieldset>
|
||||
<legend>인기검색어 검색</legend>
|
||||
<span>
|
||||
<?php echo $listall ?>
|
||||
건수 <?php echo number_format($total_count) ?>개
|
||||
</span>
|
||||
<label for="fr_date">기간설정</label>
|
||||
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" title="구간시작일" class="frm_input" size="11" maxlength="10"> 부터
|
||||
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" title="구간종료일" class="frm_input" size="11" maxlength="10"> 까지
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>인기검색어 순위 및 내역</h2>
|
||||
<form name="fpopularrank" id="fpopularrank" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<table class="tbl_pop_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">검색어</th>
|
||||
<th scope="col">검색회수</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
|
||||
$word = get_text($row['pp_word']);
|
||||
$rank = ($i + 1 + ($rows * ($page - 1)));
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $rank ?></td>
|
||||
<td><?php echo $word ?></td>
|
||||
<td class="td_bignum"><?php echo $row['cnt'] ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
61
adm/sendmail_test.php
Normal file
61
adm/sendmail_test.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
$sub_menu = '100300';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (!$config['cf_email_use'])
|
||||
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$g5['title'] = '메일 테스트';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
if (isset($_POST['email'])) {
|
||||
$email = explode(',', $_POST['email']);
|
||||
for ($i=0; $i<count($email); $i++)
|
||||
mailer($config['cf_title'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.G5_TIME_YMDHIS.'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
|
||||
|
||||
echo '<section class=\'cbox\'>';
|
||||
echo '<h2>결과메세지</h2>';
|
||||
echo '<p>';
|
||||
echo '다음 '.count($email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
|
||||
echo '</p>';
|
||||
echo '<ul>';
|
||||
for ($i=0;$i<count($email);$i++) {
|
||||
echo '<li>'.$email[$i].'</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '<p>';
|
||||
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
|
||||
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
|
||||
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
|
||||
echo '</p>';
|
||||
echo '</section>';
|
||||
}
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>테스트 메일 발송</h2>
|
||||
<p>
|
||||
메일서버가 정상적으로 동작 중인지 확인할 수 있습니다.<br>
|
||||
아래 입력칸에 테스트 메일을 발송하실 메일 주소를 입력하시면, [메일검사] 라는 제목으로 테스트 메일을 발송합니다.<br>
|
||||
</p>
|
||||
<form name="fsendmailtest" method="post">
|
||||
<fieldset id="fsendmailtest">
|
||||
<legend>테스트메일 발송</legend>
|
||||
<label for="email">받는 메일주소<strong class="sound_only">필수</strong></label>
|
||||
<input type="text" name="email" value="<?php echo $member['mb_email'] ?>" id="email" required class="required email frm_input" size="80">
|
||||
<input type="submit" value="발송" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
<p>
|
||||
만약 [메일검사] 라는 내용으로 테스트 메일이 도착하지 않는다면 보내는 메일서버 혹은 받는 메일서버 중 문제가 발생했을 가능성이 있습니다.<br>
|
||||
따라서 보다 정확한 테스트를 원하신다면 여러 곳으로 테스트 메일을 발송하시기 바랍니다.<br>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
62
adm/session_file_delete.php
Normal file
62
adm/session_file_delete.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
$sub_menu = "100800";
|
||||
include_once("./_common.php");
|
||||
|
||||
if ($is_admin != "super")
|
||||
alert("최고관리자만 접근 가능합니다.", G5_URL);
|
||||
|
||||
$g5['title'] = "세션파일 일괄삭제";
|
||||
include_once("./admin.head.php");
|
||||
?>
|
||||
|
||||
<div id="session_del">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
|
||||
$list_tag_st = "";
|
||||
$list_tag_end = "";
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/session')) {
|
||||
echo "<p>세션 디렉토리를 열지못했습니다.</p>";
|
||||
} else {
|
||||
$list_tag_st = "<ul>\n<li>완료됨</li>\n";
|
||||
$list_tag_end = "</ul>\n";
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo $list_tag_st;
|
||||
while($file=readdir($dir)) {
|
||||
|
||||
if (!strstr($file,'sess_')) continue;
|
||||
if (strpos($file,'sess_')!=0) continue;
|
||||
|
||||
$session_file = G5_DATA_PATH.'/session/'.$file;
|
||||
|
||||
if (!$atime=@fileatime($session_file)) {
|
||||
continue;
|
||||
}
|
||||
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
|
||||
$cnt++;
|
||||
$return = unlink($session_file);
|
||||
//echo "<script>document.getElementById('ct').innerHTML += '{$session_file}<br/>';</script>\n";
|
||||
echo "<li>{$session_file}</li>\n";
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
//echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
echo $list_tag_end;
|
||||
//echo "<script>document.getElementById('ct').innerHTML += '세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
|
||||
echo "<p><span>세션데이터 {$cnt}건 삭제 완료.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>\n";
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once("./admin.tail.php");
|
||||
?>
|
||||
46
adm/sql_write.sql
Normal file
46
adm/sql_write.sql
Normal file
@ -0,0 +1,46 @@
|
||||
CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`wr_num` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_reply` varchar(10) NOT NULL,
|
||||
`wr_parent` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_is_comment` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`wr_comment` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_comment_reply` varchar(5) NOT NULL,
|
||||
`ca_name` varchar(255) NOT NULL,
|
||||
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||
`wr_subject` varchar(255) NOT NULL,
|
||||
`wr_content` text NOT NULL,
|
||||
`wr_link1` text NOT NULL,
|
||||
`wr_link2` text NOT NULL,
|
||||
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_link2_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_trackback` varchar(255) NOT NULL,
|
||||
`wr_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_good` int(11) NOT NULL DEFAULT '0',
|
||||
`wr_nogood` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(255) NOT NULL,
|
||||
`wr_password` varchar(255) NOT NULL,
|
||||
`wr_name` varchar(255) NOT NULL,
|
||||
`wr_email` varchar(255) NOT NULL,
|
||||
`wr_homepage` varchar(255) NOT NULL,
|
||||
`wr_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`wr_file` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`wr_last` varchar(19) NOT NULL,
|
||||
`wr_ip` varchar(255) NOT NULL,
|
||||
`wr_facebook_user` varchar(255) NOT NULL,
|
||||
`wr_twitter_user` varchar(255) NOT NULL,
|
||||
`wr_me2day_user` varchar(255) NOT NULL,
|
||||
`wr_1` varchar(255) NOT NULL,
|
||||
`wr_2` varchar(255) NOT NULL,
|
||||
`wr_3` varchar(255) NOT NULL,
|
||||
`wr_4` varchar(255) NOT NULL,
|
||||
`wr_5` varchar(255) NOT NULL,
|
||||
`wr_6` varchar(255) NOT NULL,
|
||||
`wr_7` varchar(255) NOT NULL,
|
||||
`wr_8` varchar(255) NOT NULL,
|
||||
`wr_9` varchar(255) NOT NULL,
|
||||
`wr_10` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`wr_id`),
|
||||
KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
|
||||
KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
67
adm/thumbnail_file_delete.php
Normal file
67
adm/thumbnail_file_delete.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
$sub_menu = '100920';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '썸네일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div id="thumbnail_del">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
<?php
|
||||
$directory = array();
|
||||
$dl = array('file', 'editor');
|
||||
|
||||
foreach($dl as $val) {
|
||||
if($handle = opendir(G5_DATA_PATH.'/'.$val)) {
|
||||
while(false !== ($entry = readdir($handle))) {
|
||||
if($entry == '.' || $entry == '..')
|
||||
continue;
|
||||
|
||||
$path = G5_DATA_PATH.'/'.$val.'/'.$entry;
|
||||
|
||||
if(is_dir($path))
|
||||
$directory[] = $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flush();
|
||||
|
||||
if (empty($directory)) {
|
||||
echo '<p>썸네일디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
foreach($directory as $dir) {
|
||||
$files = glob($dir.'/thumb-*');
|
||||
if (is_array($files)) {
|
||||
foreach($files as $thumbnail) {
|
||||
$cnt++;
|
||||
@unlink($thumbnail);
|
||||
|
||||
echo '<li>'.$thumbnail.'</li>'.PHP_EOL;
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<p><span>썸네일 '.$cnt.'건의 삭제가 완료됐습니다.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>'.PHP_EOL;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
47
adm/visit.sub.php
Normal file
47
adm/visit.sub.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
include_once(G5_LIB_PATH.'/visit.lib.php');
|
||||
include_once('./admin.head.php');
|
||||
|
||||
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||
if (empty($to_date)) $to_date = G5_TIME_YMD;
|
||||
|
||||
$qstr = "fr_date=".$fr_date."&to_date=".$to_date;
|
||||
$query_string = $qstr ? '?'.$qstr : '';
|
||||
?>
|
||||
|
||||
<ul class="anchor">
|
||||
<li><a href="./visit_list.php<?php echo $query_string ?>">접속자</a></li>
|
||||
<li><a href="./visit_domain.php<?php echo $query_string ?>">도메인</a></li>
|
||||
<li><a href="./visit_browser.php<?php echo $query_string ?>">브라우저</a></li>
|
||||
<li><a href="./visit_os.php<?php echo $query_string ?>">운영체제</a></li>
|
||||
<li><a href="./visit_hour.php<?php echo $query_string ?>">시간</a></li>
|
||||
<li><a href="./visit_week.php<?php echo $query_string ?>">요일</a></li>
|
||||
<li><a href="./visit_date.php<?php echo $query_string ?>">일</a></li>
|
||||
<li><a href="./visit_month.php<?php echo $query_string ?>">월</a></li>
|
||||
<li><a href="./visit_year.php<?php echo $query_string ?>">년</a></li>
|
||||
</ul>
|
||||
|
||||
<form name="fvisit" id="fvisit" method="get">
|
||||
<fieldset>
|
||||
<legend>기간별 접속자집계 검색</legend>
|
||||
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" class="frm_input" size="11" maxlength="10"> 부터
|
||||
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" class="frm_input" size="11" maxlength="10"> 까지
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||
});
|
||||
|
||||
function fvisit_submit(act)
|
||||
{
|
||||
var f = document.fvisit;
|
||||
f.action = act;
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
94
adm/visit_browser.php
Normal file
94
adm/visit_browser.php
Normal file
@ -0,0 +1,94 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '브라우저별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = get_brow($row['vi_agent']);
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
if ($arr[$s] > $max) $max = $arr[$s];
|
||||
|
||||
$sum_count++;
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>브라우저별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">브라우저</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
arsort($arr);
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $arr[$key];
|
||||
if ($save_count != $count) {
|
||||
$i++;
|
||||
$no = $i;
|
||||
$save_count = $count;
|
||||
} else {
|
||||
$no = "";
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category"><?php echo $key ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
84
adm/visit_date.php
Normal file
84
adm/visit_date.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '일별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 4;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select vs_date, vs_count as cnt
|
||||
from {$g5['visit_sum_table']}
|
||||
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||
order by vs_date desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$arr[$row['vs_date']] = $row['cnt'];
|
||||
|
||||
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||
|
||||
$sum_count += $row['cnt'];
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>일별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">년-월-일</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">합계</td>
|
||||
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $value;
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_category"><a href="./visit_list.php?fr_date=<?php echo $key ?>&to_date=<?php echo $key ?>"><?php echo $key ?></a></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($value) ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
103
adm/visit_domain.php
Normal file
103
adm/visit_domain.php
Normal file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '도메인별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$str = $row['vi_referer'];
|
||||
preg_match("/^http[s]*:\/\/([\.\-\_0-9a-zA-Z]*)\//", $str, $match);
|
||||
$s = $match[1];
|
||||
$s = preg_replace("/^(www\.|search\.|dirsearch\.|dir\.search\.|dir\.|kr\.search\.|myhome\.)(.*)/", "\\2", $s);
|
||||
$arr[$s]++;
|
||||
|
||||
if ($arr[$s] > $max) $max = $arr[$s];
|
||||
|
||||
$sum_count++;
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>도메인별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">접속 도메인</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
arsort($arr);
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $arr[$key];
|
||||
if ($save_count != $count) {
|
||||
$i++;
|
||||
$no = $i;
|
||||
$save_count = $count;
|
||||
} else {
|
||||
$no = '';
|
||||
}
|
||||
|
||||
if (!$key) {
|
||||
$link = '';
|
||||
$link2 = '';
|
||||
$key = '직접';
|
||||
} else {
|
||||
$link = '<a href="./visit_list.php?'.$qstr.'&domain='.$key.'">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category"><?php echo $link ?><?php echo $key ?><?php echo $link2 ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
81
adm/visit_hour.php
Normal file
81
adm/visit_hour.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '시간별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 4;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select SUBSTRING(vi_time,1,2) as vi_hour, count(vi_id) as cnt
|
||||
from {$g5['visit_table']}
|
||||
where vi_date between '{$fr_date}' and '{$to_date}'
|
||||
group by vi_hour
|
||||
order by vi_hour ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$arr[$row['vi_hour']] = $row['cnt'];
|
||||
|
||||
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||
|
||||
$sum_count += $row['cnt'];
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>시간대별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">시간</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">합계</td>
|
||||
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
if ($i) {
|
||||
for ($i=0; $i<24; $i++) {
|
||||
$hour = sprintf("%02d", $i);
|
||||
$count = (int)$arr[$hour];
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_category"><?php echo $hour ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($count) ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
110
adm/visit_list.php
Normal file
110
adm/visit_list.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$sql_common = " from {$g5['visit_table']} ";
|
||||
$sql_search = " where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
if (isset($domain))
|
||||
$sql_search .= " and vi_referer like '%{$domain}%' ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
order by vi_id desc
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>접속자 개요</h2>
|
||||
<p>IP, 경로, 브라우저, 운영체제, 일시</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">IP</th>
|
||||
<th scope="col">접속 경로</th>
|
||||
<th scope="col">브라우저</th>
|
||||
<th scope="col">운영체제</th>
|
||||
<th scope="col">일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$brow = get_brow($row['vi_agent']);
|
||||
$os = get_os($row['vi_agent']);
|
||||
|
||||
$link = '';
|
||||
$link2 = '';
|
||||
$referer = '';
|
||||
$title = '';
|
||||
if ($row['vi_referer']) {
|
||||
|
||||
$referer = get_text(cut_str($row['vi_referer'], 255, ''));
|
||||
$referer = urldecode($referer);
|
||||
|
||||
if (!is_utf8($referer)) {
|
||||
$referer = iconv_utf8($referer);
|
||||
}
|
||||
|
||||
$title = str_replace(array('<', '>', '&'), array("<", ">", "&"), $referer);
|
||||
$link = '<a href="'.$row['vi_referer'].'" target="_blank">';
|
||||
$link = str_replace('&', "&", $link);
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
if ($is_admin == 'super')
|
||||
$ip = $row['vi_ip'];
|
||||
else
|
||||
$ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']);
|
||||
|
||||
if ($brow == '기타') { $brow = '<span title="'.$row['vi_agent'].'">'.$brow.'</span>'; }
|
||||
if ($os == '기타') { $os = '<span title="'.$row['vi_agent'].'">'.$os.'</span>'; }
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_category"><?php echo $ip ?></td>
|
||||
<td><?php echo $link ?><?php echo $title ?><?php echo $link2 ?></td>
|
||||
<td class="td_category"><?php echo $brow ?></td>
|
||||
<td class="td_category"><?php echo $os ?></td>
|
||||
<td class="td_time"><?php echo $row['vi_date'] ?> <?php echo $row['vi_time'] ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
if (isset($domain))
|
||||
$qstr .= "&domain=$domain";
|
||||
$qstr .= "&page=";
|
||||
|
||||
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr");
|
||||
echo $pagelist;
|
||||
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
88
adm/visit_month.php
Normal file
88
adm/visit_month.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '월별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 4;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select SUBSTRING(vs_date,1,7) as vs_month, SUM(vs_count) as cnt
|
||||
from {$g5['visit_sum_table']}
|
||||
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||
group by vs_month
|
||||
order by vs_month desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$arr[$row['vs_month']] = $row['cnt'];
|
||||
|
||||
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||
|
||||
$sum_count += $row['cnt'];
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>월별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">년-월</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">합계</td>
|
||||
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $value;
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_category"><a href="./visit_date.php?fr_date=<?php echo $key ?>-01&to_date=<?php echo $key ?>-31"><?php echo $key ?></a></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($value) ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
98
adm/visit_os.php
Normal file
98
adm/visit_os.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = 'OS별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '$fr_date' and '$to_date' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = get_os($row['vi_agent']);
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
if ($arr[$s] > $max) $max = $arr[$s];
|
||||
|
||||
$sum_count++;
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>운영체제별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">OS</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
arsort($arr);
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $arr[$key];
|
||||
if ($save_count != $count) {
|
||||
$i++;
|
||||
$no = $i;
|
||||
$save_count = $count;
|
||||
} else {
|
||||
$no = '';
|
||||
}
|
||||
|
||||
if (!$key) {
|
||||
$key = '직접';
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category"><?php echo $key ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
80
adm/visit_week.php
Normal file
80
adm/visit_week.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '요일별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 4;
|
||||
$weekday = array ('월', '화', '수', '목', '금', '토', '일');
|
||||
|
||||
$sum_count = 0;
|
||||
$sql = " select WEEKDAY(vs_date) as weekday_date, SUM(vs_count) as cnt
|
||||
from {$g5['visit_sum_table']}
|
||||
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||
group by weekday_date
|
||||
order by weekday_date ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$arr[$row['weekday_date']] = $row['cnt'];
|
||||
|
||||
$sum_count += $row['cnt'];
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>요일별 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">요일</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
if ($i) {
|
||||
for ($i=0; $i<7; $i++) {
|
||||
$count = (int)$arr[$i];
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_category"><?php echo $weekday[$i] ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
85
adm/visit_year.php
Normal file
85
adm/visit_year.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '연도별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 4;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select SUBSTRING(vs_date,1,4) as vs_year, SUM(vs_count) as cnt
|
||||
from {$g5['visit_sum_table']}
|
||||
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||
group by vs_year
|
||||
order by vs_year desc ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$arr[$row['vs_year']] = $row['cnt'];
|
||||
|
||||
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||
|
||||
$sum_count += $row['cnt'];
|
||||
}
|
||||
?>
|
||||
|
||||
<section class="cbox">
|
||||
<h2>연간 접속자 수</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">년</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">합계</td>
|
||||
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $value;
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td class="td_category"><a href="./visit_month.php?fr_date=<?php echo $key ?>-01-01&to_date=<?php echo $key ?>-12-31"><?php echo $key ?></a></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_bignum"><?php echo number_format($value) ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
Reference in New Issue
Block a user