5.4 버전 내용 적용
This commit is contained in:
@ -6,4 +6,6 @@ include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
if( isset($token) ){
|
||||
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
|
||||
}
|
||||
|
||||
run_event('admin_common');
|
||||
?>
|
||||
120
adm/_rewrite_config_form.php
Normal file
120
adm/_rewrite_config_form.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$is_use_apache = (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false);
|
||||
|
||||
$is_use_nginx = (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
|
||||
|
||||
$is_use_iis = !$is_use_apache && (stripos($_SERVER['SERVER_SOFTWARE'], 'microsoft-iis') !== false);
|
||||
|
||||
$is_write_file = false;
|
||||
$is_apache_need_rules = false;
|
||||
$is_apache_rewrite = false;
|
||||
|
||||
if( !($is_use_apache || $is_use_nginx || $is_use_iis) ){ // 셋다 아니면 다 출력시킨다.
|
||||
$is_use_apache = true;
|
||||
$is_use_nginx = true;
|
||||
}
|
||||
|
||||
if ( $is_use_nginx ){
|
||||
$is_write_file = false;
|
||||
}
|
||||
|
||||
if ( $is_use_apache ){
|
||||
$is_write_file = (is_writable(G5_PATH) || (file_exists(G5_PATH.'/.htaccess') && is_writable(G5_PATH.'/.htaccess'))) ? true : false;
|
||||
$is_apache_need_rules = check_need_rewrite_rules();
|
||||
$is_apache_rewrite = function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules());
|
||||
}
|
||||
|
||||
$get_path_url = parse_url( G5_URL );
|
||||
|
||||
$base_path = isset($get_path_url['path']) ? $get_path_url['path'].'/' : '/';
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/remodal/remodal.css">', 11);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_JS_URL.'/remodal/remodal-default-theme.css">', 12);
|
||||
add_javascript('<script src="'.G5_JS_URL.'/remodal/remodal.js"></script>', 10);
|
||||
?>
|
||||
<section id="anc_cf_url">
|
||||
<h2 class="h2_frm">짧은 주소 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
게시판과 컨텐츠 페이지에 짧은 URL 을 사용합니다. <a href="https://sir.kr/manual/g5/286" class="btn btn_03" target="_blank" style="margin-left:10px">설정 관련 메뉴얼 보기</a>
|
||||
<?php if( $is_use_apache && ! $is_use_nginx ){ ?>
|
||||
<?php if( ! $is_apache_rewrite ){ ?>
|
||||
<br><strong>Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</strong>
|
||||
<?php } else if( ! $is_write_file && $is_apache_need_rules ) { // apache인 경우 ?>
|
||||
<br><strong>짧은 주소 사용시 아래 Apache 설정 코드를 참고하여 설정해 주세요.</strong>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="server_config_views">
|
||||
<?php if ( $is_use_apache ){ ?>
|
||||
<button type="button" data-remodal-target="modal_apache" class="btn btn_03">Apache 설정 코드 보기</button>
|
||||
<?php } ?>
|
||||
<?php if ( $is_use_nginx ) { ?>
|
||||
<button type="button" data-remodal-target="modal_nginx" class="btn btn_03">Nginx 설정 코드 보기</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>짧은주소 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?php
|
||||
$short_url_arrs = array(
|
||||
'0'=>array('label'=>'사용안함', 'url'=>G5_URL.'/board.php?bo_table=free&wr_id=123'),
|
||||
'1'=>array('label'=>'숫자', 'url'=>G5_URL.'/free/123'),
|
||||
'2'=>array('label'=>'글 이름', 'url'=>G5_URL.'/free/안녕하세요/'),
|
||||
);
|
||||
foreach($short_url_arrs as $k=>$v){
|
||||
$checked = ((int) $config['cf_bbs_rewrite'] === (int) $k) ? 'checked' : '';
|
||||
?>
|
||||
<tr>
|
||||
<td><input name="cf_bbs_rewrite" id="cf_bbs_rewrite_<?php echo $k; ?>" type="radio" value="<?php echo $k; ?>" <?php echo $checked;?> ><label for="cf_bbs_rewrite_<?php echo $k; ?>" class="rules_label"><?php echo $v['label']; ?></label></td>
|
||||
<td><?php echo $v['url']; ?></td>
|
||||
</tr>
|
||||
<?php } //end foreach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="server_rewrite_info">
|
||||
<div class="is_rewrite remodal" data-remodal-id="modal_apache" role="dialog" aria-labelledby="modalApache" aria-describedby="modal1Desc">
|
||||
|
||||
<button type="button" class="connect-close" data-remodal-action="close">
|
||||
<i class="fa fa-close"></i>
|
||||
<span class="txt">닫기</span>
|
||||
</button>
|
||||
|
||||
<h4 class="copy_title">.htaccess 파일에 적용할 코드입니다.
|
||||
<?php if( ! $is_apache_rewrite ) { ?>
|
||||
<br><span class="info-warning">Apache 서버인 경우 rewrite_module 이 비활성화 되어 있으면 짧은 주소를 사용할수 없습니다.</span>
|
||||
<?php } else if ( ! $is_write_file && $is_apache_need_rules ) { ?>
|
||||
<br><span class="info-warning">자동으로 .htaccess 파일을 수정 할수 있는 권한이 없습니다.<br>.htaccess 파일이 없다면 생성 후에, 아래 코드가 없으면 코드를 복사하여 붙여넣기 해 주세요.</span>
|
||||
<?php } else if ( ! $is_apache_need_rules ){ ?>
|
||||
<br><span class="info-success">정상적으로 적용된 상태입니다.</span>
|
||||
<?php } ?>
|
||||
</h4>
|
||||
<textarea readonly="readonly" rows="10"><?php echo get_mod_rewrite_rules(true); ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="is_rewrite remodal" data-remodal-id="modal_nginx" role="dialog" aria-labelledby="modalNginx" aria-describedby="modal2Desc">
|
||||
|
||||
<button type="button" class="connect-close" data-remodal-action="close">
|
||||
<i class="fa fa-close"></i>
|
||||
<span class="txt">닫기</span>
|
||||
</button>
|
||||
<h4 class="copy_title">아래 코드를 복사하여 nginx 설정 파일에 적용해 주세요.</h4>
|
||||
<textarea readonly="readonly" rows="10"><?php echo get_nginx_conf_rules(true); ?></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
$begin_time = get_microtime();
|
||||
$g5_debug['php']['begin_time'] = $begin_time = get_microtime();
|
||||
|
||||
$files = glob(G5_ADMIN_PATH.'/css/admin_extend_*');
|
||||
if (is_array($files)) {
|
||||
@ -101,7 +101,7 @@ function imageview(id, w, h)
|
||||
<h1><?php echo $config['cf_title'] ?></h1>
|
||||
<div id="hd_top">
|
||||
<button type="button" id="btn_gnb" class="btn_gnb_close <?php echo $adm_menu_cookie['btn_gnb'];?>">메뉴</button>
|
||||
<div id="logo"><a href="<?php echo G5_ADMIN_URL ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||
<div id="logo"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.png" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||
|
||||
<div id="tnb">
|
||||
<ul>
|
||||
|
||||
@ -486,10 +486,41 @@ function admin_check_xss_params($params){
|
||||
return;
|
||||
}
|
||||
|
||||
function admin_menu_find_by($call, $search_key){
|
||||
global $menu;
|
||||
|
||||
static $cache_menu = array();
|
||||
|
||||
if( empty($cache_menu) ){
|
||||
foreach( $menu as $k1=>$arr1 ){
|
||||
|
||||
if (empty($arr1) ) continue;
|
||||
foreach( $arr1 as $k2=>$arr2 ){
|
||||
if (empty($arr2) ) continue;
|
||||
|
||||
$menu_key = isset($arr2[3]) ? $arr2[3] : '';
|
||||
if (empty($menu_key) ) continue;
|
||||
|
||||
$cache_menu[$menu_key] = array(
|
||||
'sub_menu'=>$arr2[0],
|
||||
'title'=>$arr2[1],
|
||||
'link'=>$arr2[2],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( isset($cache_menu[$call]) && isset($cache_menu[$call][$search_key]) ){
|
||||
return$cache_menu[$call][$search_key];
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
// 접근 권한 검사
|
||||
if (!$member['mb_id'])
|
||||
{
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(G5_ADMIN_URL));
|
||||
alert('로그인 하십시오.', G5_BBS_URL.'/login.php?url=' . urlencode(correct_goto_url(G5_ADMIN_URL)));
|
||||
}
|
||||
else if ($is_admin != 'super')
|
||||
{
|
||||
@ -541,6 +572,11 @@ foreach($menu_files as $file){
|
||||
}
|
||||
@ksort($amenu);
|
||||
|
||||
$amenu = run_replace('admin_amenu', $amenu);
|
||||
if( isset($menu) && $menu ){
|
||||
$menu = run_replace('admin_menu', $menu);
|
||||
}
|
||||
|
||||
$arr_query = array();
|
||||
if (isset($sst)) $arr_query[] = 'sst='.$sst;
|
||||
if (isset($sod)) $arr_query[] = 'sod='.$sod;
|
||||
|
||||
@ -58,6 +58,19 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
<script>
|
||||
function fboardcopy_check(f)
|
||||
{
|
||||
<?php
|
||||
if(!$w){
|
||||
$js_array = get_bo_table_banned_word();
|
||||
echo "var banned_array = ". json_encode($js_array) . ";\n";
|
||||
}
|
||||
?>
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if( (typeof banned_array != 'undefined') && jQuery.inArray(f.target_table.value, banned_array) !== -1 ){
|
||||
alert("입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f.bo_table.value == f.target_table.value) {
|
||||
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||
return false;
|
||||
|
||||
@ -15,6 +15,11 @@ if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||
}
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if ( $w == '' && in_array($target_table, get_bo_table_banned_word()) ){
|
||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
||||
}
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
||||
if ($row['cnt'])
|
||||
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||
@ -160,6 +165,8 @@ if ($copy_case == 'schema_data_both') {
|
||||
}
|
||||
}
|
||||
$d->close();
|
||||
|
||||
run_event('admin_board_copy_file', $bo_table, $target_table);
|
||||
|
||||
// 글복사
|
||||
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
||||
@ -181,6 +188,9 @@ if ($copy_case == 'schema_data_both') {
|
||||
|
||||
if (count($file_copy)) {
|
||||
for ($i=0; $i<count($file_copy); $i++) {
|
||||
|
||||
$file_copy[$i] = run_replace('admin_copy_update_file', $file_copy[$i], $file_copy[$i]['bf_file'], $bo_table, $target_table);
|
||||
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
@ -189,11 +199,15 @@ if (count($file_copy)) {
|
||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||
bf_content = '".addslashes($file_copy[$i]['bf_content'])."',
|
||||
bf_fileurl = '".addslashes($file_copy[$i]['bf_fileurl'])."',
|
||||
bf_thumburl = '".addslashes($file_copy[$i]['bf_thumburl'])."',
|
||||
bf_storage = '".addslashes($file_copy[$i]['bf_storage'])."',
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<?php if ($w == '') { ?>
|
||||
영문자, 숫자, _ 만 가능 (공백없이 20자 이내)
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table'] ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="<?php echo get_pretty_url($board['bo_table']) ?>" class="btn_frmline">게시판 바로가기</a>
|
||||
<a href="./board_list.php?<?php echo $qstr;?>" class="btn_frmline">목록으로</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
@ -1114,25 +1114,23 @@ $pg_anchor = '<ul class="anchor">
|
||||
<td>
|
||||
<?php echo help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.') ?>
|
||||
<select id="bo_sort_field" name="bo_sort_field">
|
||||
<option value="" <?php echo get_selected($board['bo_sort_field'], ""); ?>>wr_num, wr_reply : 기본</option>
|
||||
<option value="wr_datetime asc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime asc"); ?>>wr_datetime asc : 날짜 이전것 부터</option>
|
||||
<option value="wr_datetime desc" <?php echo get_selected($board['bo_sort_field'], "wr_datetime desc"); ?>>wr_datetime desc : 날짜 최근것 부터</option>
|
||||
<option value="wr_hit asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit asc, wr_num, wr_reply"); ?>>wr_hit asc : 조회수 낮은것 부터</option>
|
||||
<option value="wr_hit desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_hit desc, wr_num, wr_reply"); ?>>wr_hit desc : 조회수 높은것 부터</option>
|
||||
<option value="wr_last asc" <?php echo get_selected($board['bo_sort_field'], "wr_last asc"); ?>>wr_last asc : 최근글 이전것 부터</option>
|
||||
<option value="wr_last desc" <?php echo get_selected($board['bo_sort_field'], "wr_last desc"); ?>>wr_last desc : 최근글 최근것 부터</option>
|
||||
<option value="wr_comment asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment asc, wr_num, wr_reply"); ?>>wr_comment asc : 댓글수 낮은것 부터</option>
|
||||
<option value="wr_comment desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_comment desc, wr_num, wr_reply"); ?>>wr_comment desc : 댓글수 높은것 부터</option>
|
||||
<option value="wr_good asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good asc, wr_num, wr_reply"); ?>>wr_good asc : 추천수 낮은것 부터</option>
|
||||
<option value="wr_good desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_good desc, wr_num, wr_reply"); ?>>wr_good desc : 추천수 높은것 부터</option>
|
||||
<option value="wr_nogood asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood asc, wr_num, wr_reply"); ?>>wr_nogood asc : 비추천수 낮은것 부터</option>
|
||||
<option value="wr_nogood desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_nogood desc, wr_num, wr_reply"); ?>>wr_nogood desc : 비추천수 높은것 부터</option>
|
||||
<option value="wr_subject asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject asc, wr_num, wr_reply"); ?>>wr_subject asc : 제목 오름차순</option>
|
||||
<option value="wr_subject desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_subject desc, wr_num, wr_reply"); ?>>wr_subject desc : 제목 내림차순</option>
|
||||
<option value="wr_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name asc, wr_num, wr_reply"); ?>>wr_name asc : 글쓴이 오름차순</option>
|
||||
<option value="wr_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "wr_name desc, wr_num, wr_reply"); ?>>wr_name desc : 글쓴이 내림차순</option>
|
||||
<option value="ca_name asc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name asc, wr_num, wr_reply"); ?>>ca_name asc : 분류명 오름차순</option>
|
||||
<option value="ca_name desc, wr_num, wr_reply" <?php echo get_selected($board['bo_sort_field'], "ca_name desc, wr_num, wr_reply"); ?>>ca_name desc : 분류명 내림차순</option>
|
||||
<?php foreach( get_board_sort_fields($board) as $v ){
|
||||
|
||||
$option_value = $order_by_str = $v[0];
|
||||
if( $v[0] === 'wr_num, wr_reply' ){
|
||||
$selected = (! $board['bo_sort_field']) ? 'selected="selected"' : '';
|
||||
$option_value = '';
|
||||
} else {
|
||||
$selected = ($board['bo_sort_field'] === $v[0]) ? 'selected="selected"' : '';
|
||||
}
|
||||
|
||||
if( $order_by_str !== 'wr_num, wr_reply' ){
|
||||
$tmp = explode(',', $v[0]);
|
||||
$order_by_str = $tmp[0];
|
||||
}
|
||||
|
||||
echo '<option value="'.$option_value.'" '.$selected.' >'.$order_by_str.' : '.$v[1].'</option>';
|
||||
} //end foreach ?>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
@ -1261,7 +1259,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<div class="btn_fixed_top">
|
||||
<?php if( $bo_table && $w ){ ?>
|
||||
<a href="./board_copy.php?bo_table=<?php echo $board['bo_table']; ?>" id="board_copy" target="win_board_copy" class=" btn_02 btn">게시판복사</a>
|
||||
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $board['bo_table']; ?>" class=" btn_02 btn">게시판 바로가기</a>
|
||||
<a href="<?php echo get_pretty_url($board['bo_table']); ?>" class=" btn_02 btn">게시판 바로가기</a>
|
||||
<a href="./board_thumbnail_delete.php?bo_table=<?php echo $board['bo_table'].'&'.$qstr;?>" onclick="return delete_confirm2('게시판 썸네일 파일을 삭제하시겠습니까?');" class="btn_02 btn">게시판 썸네일 삭제</a>
|
||||
<?php } ?>
|
||||
<input type="submit" value="확인" class="btn_submi btn btn_01" accesskey="s">
|
||||
@ -1374,6 +1372,19 @@ jQuery(function($){
|
||||
|
||||
function fboardform_submit(f)
|
||||
{
|
||||
<?php
|
||||
if(!$w){
|
||||
$js_array = get_bo_table_banned_word();
|
||||
echo "var banned_array = ". json_encode($js_array) . ";\n";
|
||||
}
|
||||
?>
|
||||
|
||||
// 게시판명이 금지된 단어로 되어 있으면
|
||||
if( (typeof banned_array != 'undefined') && jQuery.inArray(f.bo_table.value, banned_array) !== -1 ){
|
||||
alert("입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
<?php echo get_editor_js("bo_content_head"); ?>
|
||||
<?php echo get_editor_js("bo_content_tail"); ?>
|
||||
<?php echo get_editor_js("bo_mobile_content_head"); ?>
|
||||
|
||||
@ -17,6 +17,11 @@ 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 ( $w == '' && in_array($bo_table, get_bo_table_banned_word()) ){
|
||||
alert('입력한 게시판 TABLE명을 사용할수 없습니다. 다른 이름으로 입력해 주세요.');
|
||||
}
|
||||
|
||||
$bo_include_head = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($bo_include_head, 0, 255));
|
||||
$bo_include_tail = preg_replace(array("#[\\\]+$#", "#(<\?php|<\?)#i"), "", substr($bo_include_tail, 0, 255));
|
||||
|
||||
@ -192,6 +197,8 @@ if ($w == '') {
|
||||
|
||||
// 게시판 테이블 생성
|
||||
$file = file('./sql_write.sql');
|
||||
$file = get_db_create_replace($file);
|
||||
|
||||
$sql = implode($file, "\n");
|
||||
|
||||
$create_table = $g5['write_prefix'] . $bo_table;
|
||||
@ -444,5 +451,7 @@ delete_cache_latest($bo_table);
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
run_event('admin_board_form_update', $bo_table, $w);
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
?>
|
||||
|
||||
@ -131,7 +131,7 @@ $colspan = 15;
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
<a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo $row['bo_table'] ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">스킨</label>
|
||||
|
||||
@ -10,6 +10,10 @@ if (!count($_POST['chk'])) {
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$act_button = isset($_POST['act_button']) ? strip_tags($_POST['act_button']) : '';
|
||||
$chk = (isset($_POST['chk']) && is_array($_POST['chk'])) ? $_POST['chk'] : array();
|
||||
$board_table = (isset($_POST['board_table']) && is_array($_POST['board_table'])) ? $_POST['board_table'] : array();
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
@ -74,5 +78,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
}
|
||||
|
||||
run_event('admin_board_list_update', $act_button, $chk, $board_table, $qstr);
|
||||
|
||||
goto_url('./board_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
@ -127,7 +127,7 @@ $colspan = 10;
|
||||
<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_left"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_left"><a href="<?php echo get_pretty_url(G5_GROUP_DIR, $row['gr_id']); ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_input">
|
||||
<label for="gr_subject_<?php echo $i; ?>" class="sound_only">그룹제목</label>
|
||||
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" class="tbl_input">
|
||||
|
||||
@ -85,7 +85,7 @@ $colspan = 4;
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" 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 class="td_grid"><a href="<?php echo get_pretty_url(G5_GROUP_DIR, $row['gr_id']); ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
|
||||
@ -3,7 +3,7 @@ $sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
@ -3,7 +3,7 @@ $sub_menu = "100520";
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!(version_compare(phpversion(), '5.3.0', '>=') && defined('G5_BROWSCAP_USE') && G5_BROWSCAP_USE))
|
||||
alert('사용할 수 없는 기능입니다.', G5_ADMIN_URL);
|
||||
alert('사용할 수 없는 기능입니다.', correct_goto_url(G5_ADMIN_URL));
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
@ -10,6 +10,8 @@ if(function_exists('social_log_file_delete')){
|
||||
social_log_file_delete();
|
||||
}
|
||||
|
||||
run_event('adm_cache_file_delete_before');
|
||||
|
||||
$g5['title'] = '캐시파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
@ -31,6 +33,9 @@ $cnt=0;
|
||||
echo '<ul class="session_del">'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/latest-*');
|
||||
$content_files = glob(G5_DATA_PATH.'/cache/content-*');
|
||||
|
||||
$files = array_merge($files, $content_files);
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $cache_file) {
|
||||
$cnt++;
|
||||
@ -44,6 +49,8 @@ if (is_array($files)) {
|
||||
}
|
||||
}
|
||||
|
||||
run_event('adm_cache_file_delete');
|
||||
|
||||
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||
echo '<div class="local_desc01 local_desc"><p><strong>최신글 캐시파일 '.$cnt.'건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
@ -253,6 +253,24 @@ if(!sql_query(" DESC {$g5['social_profile_table']} ", false)) {
|
||||
) ", true);
|
||||
}
|
||||
|
||||
// 짧은 URL 주소를 사용 여부 필드 추가
|
||||
if (!isset($config['cf_bbs_rewrite'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_bbs_rewrite` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_link_target` ", true);
|
||||
}
|
||||
|
||||
// 읽지 않은 메모 수 칼럼 추가
|
||||
if(!isset($member['mb_memo_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_memo_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_call`", true);
|
||||
}
|
||||
|
||||
// 스크랩 읽은 수 추가
|
||||
if(!isset($member['mb_scrap_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_scrap_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_cnt`", true);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
@ -264,6 +282,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<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_url">짧은주소</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>
|
||||
@ -881,6 +900,9 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('_rewrite_config_form.php');
|
||||
?>
|
||||
|
||||
<section id="anc_cf_mail">
|
||||
<h2 class="h2_frm">기본 메일 환경 설정</h2>
|
||||
|
||||
@ -69,6 +69,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_add_meta = '{$_POST['cf_add_meta']}',
|
||||
cf_syndi_token = '{$_POST['cf_syndi_token']}',
|
||||
cf_syndi_except = '{$_POST['cf_syndi_except']}',
|
||||
cf_bbs_rewrite = '{$_POST['cf_bbs_rewrite']}',
|
||||
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||
@ -187,5 +188,13 @@ sql_query($sql);
|
||||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||
|
||||
if( isset($_POST['cf_bbs_rewrite']) ){
|
||||
g5_delete_all_cache();
|
||||
}
|
||||
|
||||
run_event('admin_config_form_update');
|
||||
|
||||
update_rewrite_rules();
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
?>
|
||||
@ -78,7 +78,7 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
<td>
|
||||
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
||||
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id ="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo get_pretty_url('content', $co_id); ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -71,6 +71,8 @@ if( $co_include_tail && ! is_include_path_check($co_include_tail, 1) ){
|
||||
$error_msg = '/data/file/ 또는 /data/editor/ 포함된 문자를 하단 파일 경로에 포함시킬수 없습니다.';
|
||||
}
|
||||
|
||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($co_subject), $g5['content_table'], $co_id);
|
||||
|
||||
$sql_common = " co_include_head = '$co_include_head',
|
||||
co_include_tail = '$co_include_tail',
|
||||
co_html = '$co_html',
|
||||
@ -78,6 +80,7 @@ $sql_common = " co_include_head = '$co_include_head',
|
||||
co_subject = '$co_subject',
|
||||
co_content = '$co_content',
|
||||
co_mobile_content = '$co_mobile_content',
|
||||
co_seo_title = '$co_seo_title',
|
||||
co_skin = '$co_skin',
|
||||
co_mobile_skin = '$co_mobile_skin' ";
|
||||
|
||||
@ -111,6 +114,8 @@ else if ($w == "d")
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
g5_delete_cache_by_prefix('content-'.$co_id.'-');
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if ($_FILES['co_himg']['name'])
|
||||
|
||||
@ -77,7 +77,7 @@ $result = sql_query($sql);
|
||||
<td class="td_left"><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
||||
<td class="td_mng td_mng_l">
|
||||
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $row['co_id']; ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="<?php echo get_pretty_url('content', $row['co_id']); ?>" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -27,6 +27,7 @@ a:link, a:visited {color:#000;text-decoration:none}
|
||||
|
||||
h2{font-size: 1.083em;font-weight: bold;margin:10px 0}
|
||||
|
||||
#wrapper {min-height:480px}
|
||||
/* 레이아웃 */
|
||||
#hd h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#hd_top{position:fixed;top:0;left:0;width:100%;height:50px;background:#3f51b5;z-index:1000}
|
||||
@ -515,8 +516,20 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
/* 환경설정 */
|
||||
.cf_cert_hide {display:none}
|
||||
|
||||
.server_config_views {margin-bottom:10px}
|
||||
.rules_label {margin-left:5px;vertical-align:middle}
|
||||
|
||||
.is_rewrite .connect-close {position:absolute;top:10px;right:10px;margin:0;padding:0;width:30px;height:30px;border:0;background:transparent;color:#383838;cursor:pointer;font-size:15px}
|
||||
.is_rewrite .connect-close:hover {color:#ff5191}
|
||||
.is_rewrite .connect-close .fa {margin:0 0 0 1px}
|
||||
.is_rewrite .connect-close .txt {position:absolute;line-height:0;font-size:0;overflow:hidden}
|
||||
.is_rewrite textarea{width:99%;min-height:260px}
|
||||
.is_rewrite .copy_title{margin-top:15px;margin-bottom:10px;font-weight:bold;text-align:left}
|
||||
.is_rewrite .info-success{color:#155724}
|
||||
.is_rewrite .info-warning{color:#856404}
|
||||
|
||||
/* 관리권한설정 */
|
||||
#add_admin fieldset {margin-top:20px}
|
||||
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
|
||||
|
||||
/* 메일 테스트 */
|
||||
|
||||
|
||||
@ -74,6 +74,95 @@ if( isset($g5['social_profile_table']) && !sql_query(" DESC {$g5['social_profile
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 게시판 짧은 주소
|
||||
$sql = " select bo_table from {$g5['board_table']} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
$write_table = $g5['write_prefix'] . $row['bo_table']; // 게시판 테이블 전체이름
|
||||
|
||||
$sql = " SHOW COLUMNS FROM {$write_table} LIKE 'wr_seo_title' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$write_table}`
|
||||
ADD `wr_seo_title` varchar(200) NOT NULL DEFAULT '' AFTER `wr_content`,
|
||||
ADD INDEX `wr_seo_title` (`wr_seo_title`);
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 내용 관리 짧은 주소
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['content_table']}` LIKE 'co_seo_title' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_seo_title` varchar(200) NOT NULL DEFAULT '' AFTER `co_content`,
|
||||
ADD INDEX `co_seo_title` (`co_seo_title`);
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$sql = "select * from {$g5['content_table']} limit 100 ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result)) {
|
||||
|
||||
if( ! $row['co_seo_title']){
|
||||
|
||||
$co_seo_title = exist_seo_title_recursive('content', generate_seo_title($row['co_subject']), $g5['content_table'], $row['co_id']);
|
||||
|
||||
$sql = " update {$g5['content_table']}
|
||||
set co_seo_title = '$co_seo_title'
|
||||
where co_id = '{$row['co_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 메모 테이블
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['memo_table']}` LIKE 'me_send_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ){
|
||||
sql_query("ALTER TABLE `{$g5['memo_table']}`
|
||||
ADD `me_send_id` INT(11) NOT NULL DEFAULT '0',
|
||||
ADD `me_type` ENUM('send','recv') NOT NULL DEFAULT 'recv',
|
||||
ADD `me_send_ip` VARCHAR(100) NOT NULL DEFAULT '',
|
||||
CHANGE COLUMN `me_id` `me_id` INT(11) NOT NULL AUTO_INCREMENT;
|
||||
", false);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 읽지 않은 메모 수 칼럼
|
||||
if(!isset($member['mb_memo_cnt'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||
ADD `mb_memo_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_call`", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
// 파일테이블에 추가 칼럼
|
||||
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['board_file_table']}` LIKE 'bf_fileurl' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( !$row ) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_file_table']}`
|
||||
ADD COLUMN `bf_fileurl` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bf_content`,
|
||||
ADD COLUMN `bf_thumburl` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bf_fileurl`,
|
||||
ADD COLUMN `bf_storage` VARCHAR(50) NOT NULL DEFAULT '' AFTER `bf_thumburl`", true);
|
||||
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
?>
|
||||
|
||||
|
||||
@ -212,8 +212,8 @@ $colspan = 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_category"><a href="<?php echo get_pretty_url($row['bo_table']) ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||
<td><a href="<?php echo get_pretty_url($row['bo_table'], $row2['wr_id']); ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||
<td class="td_mbname"><div><?php echo $name ?></div></td>
|
||||
<td class="td_datetime"><?php echo $datetime ?></td>
|
||||
</tr>
|
||||
@ -283,7 +283,7 @@ $colspan = 7;
|
||||
$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">';
|
||||
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
@ -240,9 +240,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<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';
|
||||
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
|
||||
if (file_exists($icon_file)) {
|
||||
$icon_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
|
||||
echo '<img src="'.$icon_url.'" alt="">';
|
||||
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
||||
}
|
||||
@ -256,9 +256,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
<input type="file" name="mb_img" id="mb_img">
|
||||
<?php
|
||||
$mb_dir = substr($mb['mb_id'],0,2);
|
||||
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
|
||||
if (file_exists($icon_file)) {
|
||||
$icon_url = G5_DATA_URL.'/member_image/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
|
||||
echo '<img src="'.$icon_url.'" alt="">';
|
||||
echo '<input type="checkbox" id="del_mb_img" name="del_mb_img" value="1">삭제';
|
||||
}
|
||||
@ -441,6 +441,8 @@ this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }">
|
||||
<?php
|
||||
} //end if
|
||||
} //end if
|
||||
|
||||
run_event('admin_member_form_add', $mb, $w, 'table');
|
||||
?>
|
||||
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
@ -476,7 +478,8 @@ function fmember_submit(f)
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
run_event('admin_member_form_after', $mb, $w);
|
||||
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -143,13 +143,13 @@ else
|
||||
if( $w == '' || $w == 'u' ){
|
||||
|
||||
$mb_dir = substr($mb_id,0,2);
|
||||
$mb_icon_img = get_mb_icon_name($mb_id).'.gif';
|
||||
|
||||
// 회원 아이콘 삭제
|
||||
if ($del_mb_icon)
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
|
||||
@unlink(G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_icon_img);
|
||||
|
||||
$image_regex = "/(\.(gif|jpe?g|png))$/i";
|
||||
$mb_icon_img = $mb_id.'.gif';
|
||||
|
||||
// 아이콘 업로드
|
||||
if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
|
||||
@ -236,5 +236,7 @@ if( $w == '' || $w == 'u' ){
|
||||
}
|
||||
}
|
||||
|
||||
run_event('admin_member_form_update', $w, $mb_id);
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
@ -12,6 +12,8 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$mb_datas = array();
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
@ -19,7 +21,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
@ -53,7 +55,7 @@ if ($_POST['act_button'] == "선택수정") {
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$mb = get_member($_POST['mb_id'][$k]);
|
||||
$mb_datas[] = $mb = get_member($_POST['mb_id'][$k]);
|
||||
|
||||
if (!$mb['mb_id']) {
|
||||
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||
@ -74,5 +76,7 @@ if ($msg)
|
||||
//echo '<script> alert("'.$msg.'"); </script>';
|
||||
alert($msg);
|
||||
|
||||
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
@ -52,13 +52,13 @@ if($sql) {
|
||||
<?php }
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
|
||||
$link = get_pretty_url(G5_GROUP_DIR, $row['id']);
|
||||
break;
|
||||
case 'board':
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
|
||||
$link = get_pretty_url($row['id']);
|
||||
break;
|
||||
case 'content':
|
||||
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
|
||||
$link = get_pretty_url(G5_CONTENT_DIR, $row['id']);
|
||||
break;
|
||||
default:
|
||||
$link = '';
|
||||
|
||||
@ -131,7 +131,7 @@ else
|
||||
|
||||
$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">';
|
||||
$link1 = '<a href="'.get_pretty_url($row['po_rel_table'], $row['po_rel_id']).'" target="_blank">';
|
||||
$link2 = '</a>';
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||
`wr_subject` varchar(255) NOT NULL,
|
||||
`wr_content` text NOT NULL,
|
||||
`wr_seo_title` varchar(255) NOT NULL DEFAULT '',
|
||||
`wr_link1` text NOT NULL,
|
||||
`wr_link2` text NOT NULL,
|
||||
`wr_link1_hit` int(11) NOT NULL DEFAULT '0',
|
||||
@ -39,6 +40,7 @@ CREATE TABLE `__TABLE_NAME__` (
|
||||
`wr_9` varchar(255) NOT NULL,
|
||||
`wr_10` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`wr_id`),
|
||||
KEY `wr_seo_title` (`wr_seo_title`),
|
||||
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;
|
||||
28
adm/view.php
Normal file
28
adm/view.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$call = isset($_REQUEST['call']) ? strtolower(preg_replace('/[^a-z0-9_]/i', '', $_REQUEST['call'])) : '';
|
||||
|
||||
if( ! $call ){
|
||||
return;
|
||||
}
|
||||
|
||||
if( ! $is_admin ){
|
||||
$sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ( ! $row['cnt']) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
run_event('admin_request_handler_'.$call, $arr_query, $token);
|
||||
|
||||
$sub_menu = admin_menu_find_by($call, 'sub_menu');
|
||||
$g5['title'] = admin_menu_find_by($call, 'title');
|
||||
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
run_event('admin_get_page_'.$call, $arr_query, $token);
|
||||
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
@ -6,27 +6,27 @@ check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '글,댓글 현황';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
// http://www.jqplot.com/
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.css">', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.pointLabels.min.js"></script>', 0);
|
||||
add_javascript('<!--[if lt IE 9]><script src="'.G5_PLUGIN_URL.'/jqplot/excanvas.js"></script><![endif]-->', 0);
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.css">', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.pointLabels.min.js"></script>', 1);
|
||||
add_javascript('<!--[if lt IE 9]><script src="'.G5_PLUGIN_URL.'/jqplot/excanvas.js"></script><![endif]-->', 1);
|
||||
|
||||
if (!($graph == 'line' || $graph == 'bar'))
|
||||
$graph = 'line';
|
||||
|
||||
if ($graph == 'bar') {
|
||||
// 바 타입으로 사용하는 코드입니다.
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.barRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.categoryAxisRenderer.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.pointLabels.min.js"></script>', 0);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.barRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.categoryAxisRenderer.min.js"></script>', 1);
|
||||
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.pointLabels.min.js"></script>', 1);
|
||||
}
|
||||
|
||||
$g5['title'] = '글,댓글 현황';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$period_array = array(
|
||||
'오늘'=>array('시간', 0),
|
||||
'어제'=>array('시간', 0),
|
||||
|
||||
Reference in New Issue
Block a user