Files
firstgarden-web-gnu/adm/board_form.php
2012-11-20 11:15:32 +09:00

921 lines
43 KiB
PHP

<?
$sub_menu = "300100";
include_once('./_common.php');
include_once ($g4['path'].'/lib/cheditor4.lib.php');
auth_check($auth[$sub_menu], 'w');
$token = get_token();
function b_draw($pos, $color='red') {
return "border-{$pos}-width:1px; border-{$pos}-color:{$color}; border-{$pos}-style:solid; ";
}
$sql = " select count(*) as cnt from {$g4['group_table']} ";
$row = sql_fetch($sql);
if (!$row[cnt])
alert('게시판그룹이 한개 이상 생성되어야 합니다.', './boardgroup_form.php');
$html_title = '게시판';
if ($w == '') {
$html_title .= ' 생성';
$bo_table_attr = 'required alphanumericunderline';
$board[bo_count_delete] = 1;
$board[bo_count_modify] = 1;
$board[bo_read_point] = $config[cf_read_point];
$board[bo_write_point] = $config[cf_write_point];
$board[bo_comment_point] = $config[cf_comment_point];
$board[bo_download_point] = $config[cf_download_point];
$board[bo_gallery_cols] = 4;
$board[bo_table_width] = 97;
$board[bo_page_rows] = $config[cf_page_rows];
$board[bo_subject_len] = 60;
$board[bo_new] = 24;
$board[bo_hot] = 100;
$board[bo_image_width] = 600;
$board[bo_upload_count] = 2;
$board[bo_upload_size] = 1048576;
$board[bo_reply_order] = 1;
$board[bo_use_search] = 1;
$board['bo_skin'] = 'basic';
$board['gr_id'] = $gr_id;
$board['bo_disable_tags'] = 'script|iframe';
$board[bo_use_secret] = 0;
} else if ($w == 'u') {
$html_title .= ' 수정';
if (!$board['bo_table'])
alert('존재하지 않은 게시판 입니다.');
if ($is_admin == 'group') {
if ($member['mb_id'] != $group['gr_admin'])
alert('그룹이 틀립니다.');
}
$bo_table_attr = 'readonly';
}
if ($is_admin != 'super') {
$group = get_group($board['gr_id']);
$is_admin = is_admin($member['mb_id']);
}
$g4['title'] = $html_title;
include_once ('./admin.head.php');
?>
<script src="<?=$g4['cheditor4_path']?>/cheditor.js"></script>
<?=cheditor1('bo_content_head', '100%', '200');?>
<?=cheditor1('bo_content_tail', '100%', '200');?>
<h2><span></span><?=$html_title?></h2>
<form id="fboardform" name="fboardform" method="post" onsubmit="return fboardform_submit(this)" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="sst" value="<?=$sst?>">
<input type="hidden" name="sod" value="<?=$sod?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="token" value="<?=$token?>">
<section id="bo_basic">
<h3><span></span>기본설정</h3>
<table>
<tbody>
<tr>
<th scope="row"><label for="bo_table">TABLE</label></th>
<td>
<input type="text" id="bo_table" name="bo_table" maxlength="20" <?=$bo_table_attr?> value="<?=$board['bo_table'] ?>">
<?
if ($w == '')
echo '영문자, 숫자, _ 만 가능 (공백없이 20자 이내)';
else
echo '<a href="'.$g4['bbs_path'].'/board.php?bo_table='.$board['bo_table'].'">게시판 바로가기</a>';
?>
</td>
</tr>
<tr>
<th scope="row"><label for="gr_id">그룹</label></th>
<td>
<?=get_group_select('gr_id', $board['gr_id'], "required");?>
<? if ($w=='u') { ?><a href="javascript:location.href='./board_list.php?sfl=a.gr_id&amp;stx='+document.fboardform.gr_id.value;">동일그룹게시판목록</a><?}?>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_subject">게시판 제목</label></th>
<td>
<input type="text" id="bo_subject" name="bo_subject" maxlength="120" required value="<?=get_text($board['bo_subject'])?>">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_category_list">분류</label></th>
<td>
<?=help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])')?>
<input type="text" id="bo_category_list" name="bo_category_list" value="<?=get_text($board['bo_category_list'])?>">
<input type="checkbox" id="bo_use_category" name="bo_use_category" value="1" <?=$board[bo_use_category]?'checked':'';?>><label for="bo_use_category">사용</label>
<span class="group_setting">
<input type="checkbox" id="chk_category_list" name="chk_category_list" value="1">
<label for="chk_category_list">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<? if ($w == 'u') { ?>
<tr>
<th scope="row"><label for="proc_count">카운트 조정</label></th>
<td>
<?=help('현재 원글수 : '.number_format($board[bo_count_write]).', 현재 코멘트수 : '.number_format($board[bo_count_comment]).PHP_EOL.'게시판 목록에서 글의 번호가 맞지 않을 경우에 체크하십시오.')?>
<input type="checkbox" id="proc_count" name="proc_count" value="1">
</td>
</tr>
<? } ?>
</tbody>
</table>
</section>
<section id="bo_rights">
<h3><span></span>권한설정</h3>
<table>
<tbody>
<tr>
<th scope="row"><label for="bo_admin">게시판 관리자</label></th>
<td>
<input type="text" id="bo_admin" name="bo_admin" maxlength="20" value="<?=$board['bo_admin']?>">
<span class="group_setting">
<input type="checkbox" id="chk_admin" name="chk_admin" value="1">
<label for="chk_admin">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_list_level">목록보기 권한</label></th>
<td>
<?=help('권한 1은 비회원, 2 이상 회원입니다. 권한은 10 이 가장 높습니다.')?>
<?=get_member_level_select('bo_list_level', 1, 10, $board[bo_list_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_list_level" name="chk_list_level" value="1">
<label for="chk_list_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_read_level">글읽기 권한</label></th>
<td>
<?=get_member_level_select('bo_read_level', 1, 10, $board[bo_read_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_read_level" name="chk_read_level" value="1">
<label for="chk_read_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_level">글쓰기 권한</label></th>
<td>
<?=get_member_level_select('bo_write_level', 1, 10, $board[bo_write_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_write_level" name="chk_write_level" value="1">
<label for="chk_write_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_reply_level">글답변 권한</label></th>
<td>
<?=get_member_level_select('bo_reply_level', 1, 10, $board[bo_reply_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_reply_level" name="chk_reply_level" value="1">
<label for="chk_reply_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_level">코멘트쓰기 권한</label></th>
<td>
<?=get_member_level_select('bo_comment_level', 1, 10, $board[bo_comment_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_comment_level" name="chk_comment_level" value="1">
<label for="chk_comment_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_link_level">링크 권한</label></th>
<td>
<?=get_member_level_select('bo_link_level', 1, 10, $board[bo_link_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_link_level" name="chk_link_level" value="1">
<label for="chk_link_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_upload_level">업로드 권한</label></th>
<td>
<?=get_member_level_select('bo_upload_level', 1, 10, $board[bo_upload_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_upload_level" name="chk_upload_level" value="1">
<label for="chk_upload_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_download_level">다운로드 권한</label></th>
<td>
<?=get_member_level_select('bo_download_level', 1, 10, $board[bo_download_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_download_level" name="chk_download_level" value="1">
<label for="chk_download_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_html_level">HTML 쓰기 권한</label></th>
<td>
<?=get_member_level_select('bo_html_level', 1, 10, $board[bo_html_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_html_level" name="chk_html_level" value="1">
<label for="chk_html_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_trackback_level">트랙백쓰기 권한</label></th>
<td>
<?=help('트랙백이란? 쉽게 설명하여 "내가 작성하는 글을 다른사람에게 알리는 기능" 입니다.'.PHP_EOL.'자세한 내용은 검색엔진에서 "트랙백"으로 검색을 해보시기 바랍니다.')?>
<?=get_member_level_select('bo_trackback_level', 1, 10, $board[bo_trackback_level]) ?>
<span class="group_setting">
<input type="checkbox" id="chk_trackback_level" name="chk_trackback_level" value="1">
<label for="chk_trackback_level">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
</tbody>
</table>
</section>
<section id="bo_function">
<h3><span></span>기능설정</h3>
<table>
<tbody>
<tr>
<th scope="row"><label for="bo_count_modify">원글 수정 불가</label></th>
<td>
코멘트 <input type="text" id="bo_count_modify" name="bo_count_modify" required numeric value="<?=$board[bo_count_modify]?>">개 이상 달리면 수정불가
<span class="group_setting">
<input type="checkbox" id="chk_count_modify" name="chk_count_modify" value="1">
<label for="chk_count_modify">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_count_delete">원글 삭제 불가</label></th>
<td>
코멘트 <input type="text" id="bo_count_delete" name="bo_count_delete" required numeric value="<?=$board[bo_count_delete]?>">개 이상 달리면 삭제불가
<span class="group_setting">
<input type="checkbox" id="chk_count_delete" name="chk_count_delete" value="1">
<label for="chk_count_delete">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_sideview">글쓴이 사이드뷰</label></th>
<td>
<input type="checkbox" id="bo_use_sideview" name="bo_use_sideview" value="1" <?=$board[bo_use_sideview]?'checked':'';?>>사용 (글쓴이 클릭시 나오는 레이어 메뉴)
<span class="group_setting">
<input type="checkbox" id="chk_use_sideview" name="chk_use_sideview" value="1">
<label for="chk_use_sideview">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_file_content">파일 설명 사용</label></th>
<td>
<input type="checkbox" id="bo_use_file_content" name="bo_use_file_content" value="1" <?=$board[bo_use_file_content]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_file_content" name="chk_use_file_content" value="1">
<label for="chk_use_file_content">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_comment">코멘트 새창 사용</label></th>
<td>
<input type="checkbox" id="bo_use_comment" name="bo_use_comment" value="1" <?=$board[bo_use_comment]?'checked':'';?>>사용 (코멘트수 클릭시 새창으로 보임)
<span class="group_setting">
<input type="checkbox" id="chk_use_comment" name="chk_use_comment" value="1">
<label for="chk_use_comment">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_secret">비밀글 사용</label></th>
<td>
<?=help('"체크박스"는 글작성시 비밀글 체크가 가능합니다. "무조건"은 작성되는 모든글을 비밀글로 작성합니다. (관리자는 체크박스로 출력합니다.) 스킨에 따라 적용되지 않을 수 있습니다.')?>
<select id="bo_use_secret" name="bo_use_secret">
<option value='0'>사용하지 않음
<option value="1">체크박스
<option value='2'>무조건
</select>
<script>document.getElementById('bo_use_secret').value="<?=$board[bo_use_secret]?>";</script>
<span class="group_setting">
<input type="checkbox" id="chk_use_secret" name="chk_use_secret" value="1">
<label for="chk_use_secret">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_dhtml_editor">DHTML 에디터 사용</label></th>
<td>
<?=help('글작성시 내용을 DHTML 에디터 기능으로 사용할 것인지 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.')?>
<input type="checkbox" id="bo_use_dhtml_editor" name="bo_use_dhtml_editor" value="1" <?=$board[bo_use_dhtml_editor]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_dhtml_editor" name="chk_use_dhtml_editor" value="1">
<label for="chk_use_dhtml_editor">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_rss_view">RSS 보이기 사용</label></th>
<td>
<?=help('비회원 글읽기가 가능하고 RSS 보이기 사용에 체크가 되어야만 RSS 지원을 합니다.')?>
<input type="checkbox" id="bo_use_rss_view" name="bo_use_rss_view" value="1" <?=$board[bo_use_rss_view]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_rss_view" name="chk_use_rss_view" value="1">
<label for="chk_use_rss_view">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_good">추천 사용</label></th>
<td>
<input type="checkbox" id="bo_use_good" name="bo_use_good" value="1" <?=$board[bo_use_good]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_good" name="chk_use_good" value="1">
<label for="chk_use_good">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_nogood">비추천 사용</label></th>
<td>
<input type="checkbox" id="bo_use_nogood" name="bo_use_nogood" value="1" <?=$board[bo_use_nogood]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_nogood" name="chk_use_nogood" value="1">
<label for="chk_use_nogood">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_name">이름(실명) 사용</label></th>
<td>
<input type="checkbox" id="bo_use_name" name="bo_use_name" value="1" <?=$board[bo_use_name]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_name" name="chk_use_name" value="1">
<label for="chk_use_name">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_signature">서명보이기 사용</label></th>
<td>
<input type="checkbox" id="bo_use_signature" name="bo_use_signature" value="1" <?=$board[bo_use_signature]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_signature" name="chk_use_signature" value="1">
<label for="chk_use_signature">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_ip_view">IP 보이기 사용</label></th>
<td>
<input type="checkbox" id="bo_use_ip_view" name="bo_use_ip_view" value="1" <?=$board[bo_use_ip_view]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_ip_view" name="chk_use_ip_view" value="1">
<label for="chk_use_ip_view">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_trackback">트랙백 사용</label></th>
<td>
<input type="checkbox" id="bo_use_trackback" name="bo_use_trackback" value="1" <?=$board[bo_use_trackback]?'checked':'';?>>사용 (트랙백쓰기 권한 보다 우선함)
<span class="group_setting">
<input type="checkbox" id="chk_use_trackback" name="chk_use_trackback" value="1">
<label for="chk_use_trackback">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_list_content">목록에서 내용 사용</label></th>
<td>
<input type="checkbox" id="bo_use_list_content" name="bo_use_list_content" value="1" <?=$board[bo_use_list_content]?'checked':'';?>>사용 (사용시 속도 느려짐)
<span class="group_setting">
<input type="checkbox" id="chk_use_list_content" name="chk_use_list_content" value="1">
<label for="chk_use_list_content">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_list_view">전체목록보이기 사용</label></th>
<td>
<input type="checkbox" id="bo_use_list_view" name="bo_use_list_view" value="1" <?=$board[bo_use_list_view]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_list_view" name="chk_use_list_view" value="1">
<label for="chk_use_list_view">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_email">메일발송 사용</label></th>
<td>
<input type="checkbox" id="bo_use_email" name="bo_use_email" value="1" <?=$board[bo_use_email]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_email" name="chk_use_email" value="1">
<label for="chk_use_email">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_upload_count">파일 업로드 갯수</label></th>
<td>
<input type="text" id="bo_upload_count" name="bo_upload_count" required value="<?=$board[bo_upload_count]?>"> 게시물 한건당 업로드 할 수 있는 파일의 최대 개수 (0 이면 제한 없음)
<span class="group_setting">
<input type="checkbox" id="chk_upload_count" name="chk_upload_count" value="1">
<label for="chk_upload_count">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<?
$upload_max_filesize = ini_get('upload_max_filesize');
if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
$upload_max_filesize = (int)($upload_max_filesize / 1048576);
}
?>
<tr>
<th scope="row"><label for="bo_upload_size">파일 업로드 용량</label></th>
<td>
<?=help('최대 '.ini_get("upload_max_filesize").' 이하 업로드 가능, 1 MB = 1,024,768 bytes')?>
업로드 파일 한개당 <input type="text" id="bo_upload_size" name="bo_upload_size" required value='<?=$board[bo_upload_size]?>'> bytes 이하
<span class="group_setting">
<input type="checkbox" id="chk_upload_size" name="chk_upload_size" value="1">
<label for="chk_upload_size">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_min">최소 글수 제한</label></th>
<td>
<?=help('글 입력시 최소 글자수를 설정. 0을 입력하면 검사하지 않음')?>
<input type="text" id="bo_write_min" name="bo_write_min" numeric value="<?=$board[bo_write_min]?>">
<span class="group_setting">
<input type="checkbox" id="chk_write_min" name="chk_write_min" value="1">
<label for="chk_write_min">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_max">최대 글수 제한</label></th>
<td>
<?=help('글 입력시 최대 글자수를 설정. 0을 입력하면 검사하지 않음')?>
<input type="text" id="bo_write_max" name="bo_write_max" numeric value="<?=$board[bo_write_max]?>">
<span class="group_setting">
<input type="checkbox" id="chk_write_max" name="chk_write_max" value="1">
<label for="chk_write_max">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_min">최소 코멘트수 제한</label></th>
<td>
<?=help('코멘트 입력시 최소 글자수, 최대 글자수를 설정. 0을 입력하면 검사하지 않음')?>
<input type="text" id="bo_comment_min" name="bo_comment_min" numeric value="<?=$board[bo_comment_min]?>">
<span class="group_setting">
<input type="checkbox" id="chk_comment_min" name="chk_comment_min" value="1">
<label for="chk_comment_min">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_max">최대 코멘트수 제한</label></th>
<td>
<?=help('코멘트 입력시 최소 글자수, 최대 글자수를 설정. 0을 입력하면 검사하지 않음')?>
<input type="text" id="bo_comment_max" name="bo_comment_max" numeric value="<?=$board[bo_comment_max]?>">
<span class="group_setting">
<input type="checkbox" id="chk_comment_max" name="chk_comment_max" value="1">
<label for="chk_comment_max">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_use_search">전체 검색 사용</label></th>
<td>
<input type="checkbox" id="bo_use_search" name="bo_use_search" value="1" <?=$board[bo_use_search]?'checked':'';?>>사용
<span class="group_setting">
<input type="checkbox" id="chk_use_search" name="chk_use_search" value="1">
<label for="chk_use_search">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_order_search">전체 검색 순서</label></th>
<td>
<?=help('숫자가 낮은 게시판 부터 검색')?>
<input type="text" id="bo_order_search" name="bo_order_search" value='<?=$board[bo_order_search]?>'>
<span class="group_setting">
<input type="checkbox" id="chk_order_search" name="chk_order_search" value="1">
<label for="chk_order_search">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
</tbody>
</table>
</section>
<section id="bo_design">
<h3><span></span>디자인/양식</h3>
<table>
<tbody>
<tr>
<th scope="row"><label for="bo_skin">스킨 디렉토리</label></th>
<td>
<select id="bo_skin" name="bo_skin" required>
<?
$arr = get_skin_dir('board');
for ($i=0; $i<count($arr); $i++) {
echo '<option value="'.$arr[$i].'">'.$arr[$i].'</option>'.PHP_EOL;
}
?></select>
<script>document.fboardform.bo_skin.value="<?=$board['bo_skin']?>";</script>
<span class="group_setting">
<input type="checkbox" id="chk_skin" name="chk_skin" value="1">
<label for="chk_skin">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_image_head">상단 이미지</label></th>
<td>
<input type="file" id="bo_image_head" name="bo_image_head">
<?
if ($board['bo_image_head'])
echo '<br><a href="'.$g4['path'].'/data/file/'.$board['bo_table'].'/'.$board['bo_image_head'].'" target="_blank">'.$board['bo_image_head'].'</a> <input type="checkbox" id="bo_image_head_del" name="bo_image_head_del" value="'.$board['bo_image_head'].'"> 삭제';
?>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_image_tail">하단 이미지</label></th>
<td>
<input type="file" id="bo_image_tail" name="bo_image_tail">
<?
if ($board['bo_image_tail'])
echo '<br><a href="'.$g4['path'].'/data/file/'.$board['bo_table'].'/'.$board['bo_image_tail'].'" target="_blank">'.$board['bo_image_tail'].'</a> <input type="checkbox" id="bo_image_tail_del" name="bo_image_tail_del" value="'.$board['bo_image_tail'].'"> 삭제';
?>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_include_head">상단 파일 경로</label></th>
<td>
<input type="text" id="bo_include_head" name="bo_include_head" value="<?=$board['bo_include_head']?>">
<span class="group_setting">
<input type="checkbox" id="chk_include_head" name="chk_include_head" value="1">
<label for="chk_include_head">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_include_tail">하단 파일 경로</label></th>
<td>
<input type="text" id="bo_include_tail" name="bo_include_tail" value="<?=$board['bo_include_tail']?>">
<span class="group_setting">
<input type="checkbox" id="chk_include_tail" name="chk_include_tail" value="1">
<label for="chk_include_tail">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="tx_bo_content_head">상단 내용</label></th>
<td>
<?=cheditor2('bo_content_head', $board['bo_content_head']);?>
<span class="group_setting">
<input type="checkbox" id="chk_content_head" name="chk_content_head" value="1">
<label for="chk_content_head">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="tx_bo_content_tail">하단 내용</label></th>
<td>
<?=cheditor2('bo_content_tail', $board['bo_content_tail']);?>
<span class="group_setting">
<input type="checkbox" id="chk_content_tail" name="chk_content_tail" value="1">
<label for="chk_content_tail">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_insert_content">글쓰기 기본 내용</label></th>
<td>
<textarea id="bo_insert_content" name="bo_insert_content" rows="5"><?=$board['bo_insert_content'] ?></textarea>
<span class="group_setting">
<input type="checkbox" id="chk_insert_content" name="chk_insert_content" value="1">
<label for="chk_insert_content">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_subject_len">제목 길이</label></th>
<td>
<?=help('목록에서의 제목 글자수. 잘리는 글은 … 로 표시')?>
<input type="text" id="bo_subject_len" name="bo_subject_len" required value="<?=$board[bo_subject_len]?>">
<span class="group_setting">
<input type="checkbox" id="chk_subject_len" name="chk_subject_len" value="1">
<label for="chk_subject_len">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_page_rows">페이지당 목록 수</label></th>
<td>
<input type="text" id="bo_page_rows" name="bo_page_rows" required value="<?=$board[bo_page_rows]?>">
<span class="group_setting">
<input type="checkbox" id="chk_page_rows" name="chk_page_rows" value="1">
<label for="chk_page_rows">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_gallery_cols">가로 이미지수</label></th>
<td>
<?=help('갤러리 형식의 게시판 목록에서 이미지를 한줄에 몇장씩 보여줄것인지를 설정하는 값')?>
<input type="text" id="bo_gallery_cols" name="bo_gallery_cols" required value="<?=$board[bo_gallery_cols]?>">
<span class="group_setting">
<input type="checkbox" id="chk_gallery_cols" name="chk_gallery_cols" value="1">
<label for="chk_gallery_cols">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_table_width">게시판 테이블 폭</label></th>
<td>
<?=help('100 이하는 %')?>
<input type="text" id="bo_table_width" name="bo_table_width" required value="<?=$board[bo_table_width]?>">
<span class="group_setting">
<input type="checkbox" id="chk_table_width" name="chk_table_width" value="1">
<label for="chk_table_width">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_image_width">이미지 폭 크기</label></th>
<td>
<?=help('게시판에서 출력되는 이미지의 폭 크기')?>
<input type="text" id="bo_image_width" name="bo_image_width" required value="<?=$board[bo_image_width]?>"> 픽셀
<span class="group_setting">
<input type="checkbox" id="chk_image_width" name="chk_image_width" value="1">
<label for="chk_image_width">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_new">새글 아이콘</label></th>
<td>
<?=help('글 입력후 new 이미지를 출력하는 시간')?>
<input type="text" id="bo_new" name="bo_new" required value="<?=$board[bo_new]?>">
<span class="group_setting">
<input type="checkbox" id="chk_new" name="chk_new" value="1">
<label for="chk_new">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_hot">인기글 아이콘</label></th>
<td>
<?=help('조회수가 설정값 이상이면 hot 이미지 출력')?>
<input type="text" id="bo_hot" name="bo_hot" required value="<?=$board[bo_hot]?>">
<span class="group_setting">
<input type="checkbox" id="chk_hot" name="chk_hot" value="1">
<label for="chk_hot">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_reply_order">답변 달기</label></th>
<td>
<select id="bo_reply_order" name="bo_reply_order">
<option value="1">나중에 쓴 답변 아래로 달기 (기본)
<option value='0'>나중에 쓴 답변 위로 달기
</select>
<script> document.fboardform.bo_reply_order.value = "<?=$board[bo_reply_order]?>"; </script>
<span class="group_setting">
<input type="checkbox" id="chk_reply_order" name="chk_reply_order" value="1">
<label for="chk_reply_order">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_sort_field">리스트 정렬 필드</label></th>
<td>
<?=help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.')?>
<select id="bo_sort_field" name="bo_sort_field">
<option value="">wr_num, wr_reply : 기본
<option value="wr_datetime asc">wr_datetime asc : 날짜 이전것 부터
<option value="wr_datetime desc">wr_datetime desc : 날짜 최근것 부터
<option value="wr_hit asc, wr_num, wr_reply">wr_hit asc : 조회수 낮은것 부터
<option value="wr_hit desc, wr_num, wr_reply">wr_hit desc : 조회수 높은것 부터
<option value="wr_last asc">wr_last asc : 최근글 이전것 부터
<option value="wr_last desc">wr_last desc : 최근글 최근것 부터
<option value="wr_comment asc, wr_num, wr_reply">wr_comment asc : 코멘트수 낮은것 부터
<option value="wr_comment desc, wr_num, wr_reply">wr_comment desc : 코멘트수 높은것 부터
<option value="wr_good asc, wr_num, wr_reply">wr_good asc : 추천수 낮은것 부터
<option value="wr_good desc, wr_num, wr_reply">wr_good desc : 추천수 높은것 부터
<option value="wr_nogood asc, wr_num, wr_reply">wr_nogood asc : 비추천수 낮은것 부터
<option value="wr_nogood desc, wr_num, wr_reply">wr_nogood desc : 비추천수 높은것 부터
<option value="wr_subject asc, wr_num, wr_reply">wr_subject asc : 제목 내림차순
<option value="wr_subject desc, wr_num, wr_reply">wr_subject desc : 제목 오름차순
<option value="wr_name asc, wr_num, wr_reply">wr_name asc : 글쓴이 내림차순
<option value="wr_name desc, wr_num, wr_reply">wr_name desc : 글쓴이 오름차순
<option value="ca_name asc, wr_num, wr_reply">ca_name asc : 분류명 내림차순
<option value="ca_name desc, wr_num, wr_reply">ca_name desc : 분류명 오름차순
</select>
<script> document.fboardform.bo_sort_field.value = "<?=$board['bo_sort_field']?>"; </script>
<span class="group_setting">
<input type="checkbox" id="chk_sort_field" name="chk_sort_field" value="1">
<label for="chk_sort_field">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tbody>
</table>
</section>
<?/* 이것은 무엇일까?????????????????????? ?>
<tr>
<td><input type="checkbox" id="chk_disable_tags" name="chk_disable_tags" value="1"></td>
<td>사용금지 태그</td>
<td><input type="text" id="bo_disable_tags" name="bo_disable_tags" value="<?=get_text($board['bo_disable_tags'])?>">
<?=help('태그와 태그 사이는 | 로 구분하세요. (예: <b>script</b>|<b>iframe</b>).'PHP_EOL.'HTML 사용시 금지할 태그를 입력하는곳 입니다.')?></td>
</tr>
<?*/?>
<section id="bo_point">
<h3><span></span>포인트 설정</h3>
<table>
<tbody>
<tr>
<th scope="row"><label for="chk_point">기본값으로 설정</label></th>
<td>
<?=help('환경설정에 입력된 포인트로 설정')?>
<input type="checkbox" id="chk_point" name="chk_point" title="기본값 사용" onclick="set_point(this.form)">
</td>
</tr>
<tr>
<th scope="row"><label for="bo_read_point">글읽기 포인트</label></th>
<td>
<input type="text" id="bo_read_point" name="bo_read_point" required value="<?=$board[bo_read_point]?>">
<span class="group_setting">
<input type="checkbox" id="chk_read_point" name="chk_read_point" value="1">
<label for="chk_read_point">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_write_point">글쓰기 포인트</label></th>
<td>
<input type="text" id="bo_write_point" name="bo_write_point" required value="<?=$board[bo_write_point]?>">
<span class="group_setting">
<input type="checkbox" id="chk_write_point" name="chk_write_point" value="1">
<label for="chk_write_point">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_comment_point">코멘트쓰기 포인트</label></th>
<td>
<input type="text" id="bo_comment_point" name="bo_comment_point" required value="<?=$board[bo_comment_point]?>">
<span class="group_setting">
<input type="checkbox" id="chk_comment_point" name="chk_comment_point" value="1">
<label for="">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<tr>
<th scope="row"><label for="bo_download_point">다운로드 포인트</label></th>
<td>
<input type="text" id="bo_download_point" name="bo_download_point" required value="<?=$board[bo_download_point]?>">
<span class="group_setting">
<input type="checkbox" id="chk_download_point" name="chk_download_point" value="1">
<label for="chk_download_point">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
</tbody>
</table>
</section>
<section id="bo_extra">
<h3><span></span>여분필드 설정</h3>
<table>
<tbody>
<? for ($i=1; $i<=10; $i++) { ?>
<tr>
<th scope="row">
여분필드
</th>
<td>
<label for="bo_<?=$i?>_subj">여분필드 <?=$i?> 제목</label>
<input type="text" id="bo_<?=$i?>_subj" name="bo_<?=$i?>_subj" value="<?=get_text($board['bo_'.$i.'_subj'])?>">
<label for="bo_<?=$i?>">여분필드 <?=$i?> 내용</label>
<input type="text" id="bo_<?=$i?>" name="bo_<?=$i?>" value="<?=get_text($board['bo_'.$i])?>">
<span class="group_setting">
<input type="checkbox" id="chk_<?=$i?>" name="chk_<?=$i?>" value="1">
<label for="chk_<?=$i?>">동일그룹 게시판에 모두 적용</label>
</span>
</td>
</tr>
<? } ?>
</tbody>
</table>
</section>
<fieldset id="admin_confirm">
<legend><span></span>XSS 혹은 CSRF 방지</legend>
<p>관리자 권한을 탈취당하는 경우를 대비하여 패스워드를 다시 한번 확인합니다.</p>
<label for="admin_password">관리자 패스워드</label>
<input type="password" id="admin_password" name="admin_password" required title="관리자 패스워드">
</fieldset>
<div class="btn_confirm">
<input type="submit" accesskey="s" value="확인">
<input type="button" value="목록" onclick="document.location.href='./board_list.php?<?=$qstr?>';">
<? if ($w == 'u') { ?><input type="button" value="게시판 복사" onclick="board_copy('<?=$bo_table?>');"><?}?>
</div>
</form>
<script>
function board_copy(bo_table) {
window.open("./board_copy.php?bo_table="+bo_table, "BoardCopy", "left=10,top=10,width=500,height=200");
}
function set_point(f) {
if (f.chk_point.checked) {
f.bo_read_point.value = "<?=$config[cf_read_point]?>";
f.bo_write_point.value = "<?=$config[cf_write_point]?>";
f.bo_comment_point.value = "<?=$config[cf_comment_point]?>";
f.bo_download_point.value = "<?=$config[cf_download_point]?>";
} else {
f.bo_read_point.value = f.bo_read_point.defaultValue;
f.bo_write_point.value = f.bo_write_point.defaultValue;
f.bo_comment_point.value = f.bo_comment_point.defaultValue;
f.bo_download_point.value = f.bo_download_point.defaultValue;
}
}
function fboardform_submit(f) {
var tmp_title;
var tmp_image;
tmp_title = "상단";
tmp_image = f.bo_image_head;
if (tmp_image.value) {
if (!tmp_image.value.toLowerCase().match(/.(gif|jpg|png)$/i)) {
alert(tmp_title + "이미지가 gif, jpg, png 파일이 아닙니다.");
return false;
}
}
tmp_title = "하단";
tmp_image = f.bo_image_tail;
if (tmp_image.value) {
if (!tmp_image.value.toLowerCase().match(/.(gif|jpg|png)$/i)) {
alert(tmp_title + "이미지가 gif, jpg, png 파일이 아닙니다.");
return false;
}
}
if (parseInt(f.bo_count_modify.value) < 1) {
alert("원글 수정 불가 코멘트수는 1 이상 입력하셔야 합니다.");
f.bo_count_modify.focus();
return false;
}
if (parseInt(f.bo_count_delete.value) < 1) {
alert("원글 삭제 불가 코멘트수는 1 이상 입력하셔야 합니다.");
f.bo_count_delete.focus();
return false;
}
<?=cheditor3('bo_content_head')."\n";?>
<?=cheditor3('bo_content_tail')."\n";?>
f.action = './board_form_update.php';
return true;
}
</script>
<?
include_once ('./admin.tail.php');
?>