fix admin menu and add editorfont
This commit is contained in:
parent
c4c75f7303
commit
7f8d99014f
22 changed files with 971 additions and 992 deletions
|
|
@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_'))
|
|||
|
||||
$menu["board"] = new MenuCategory("board", "board", "게시판관리", "/board_list.php", true, 2, "", 0);
|
||||
|
||||
$menu["board"]->addChildMenu("member", "게시판관리", G5_ADMIN_URL . "/board_list.php", true, 1, "gear-wide-connected", 0);
|
||||
$menu["board"]->addChildMenu("member", "게시판관리", G5_ADMIN_URL . "/board_list.php", true, 1, "\F463", 0);
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_list_update.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form_update.php");
|
||||
|
|
@ -12,7 +12,7 @@ $menu["board"]->getLastAddedMenu()->addSubURL("/board_delete.php");
|
|||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_copy.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_copy_update.php");
|
||||
|
||||
$menu["board"]->addChildMenu("member", "게시판그룹관리", G5_ADMIN_URL . "/boardgroup_list.php", true, 2, "gear-wide-connected", 0);
|
||||
$menu["board"]->addChildMenu("member", "게시판그룹관리", G5_ADMIN_URL . "/boardgroup_list.php", true, 2, "\F2EE", 0);
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_list_update.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form_update.php");
|
||||
|
|
@ -20,6 +20,6 @@ $menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_list.php");
|
|||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_update.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_form.php");
|
||||
|
||||
$menu["board"]->addChildMenu("member", "내용관리", G5_ADMIN_URL . "/contentlist.php", true, 2, "gear-wide-connected", 0);
|
||||
$menu["board"]->addChildMenu("member", "내용관리", G5_ADMIN_URL . "/contentlist.php", true, 2, "\F620", 0);
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/contentform.php");
|
||||
$menu["board"]->getLastAddedMenu()->addSubURL("/contentformupdate.php");
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ if (!defined('_GNUBOARD_'))
|
|||
|
||||
$menu["member"] = new MenuCategory("member", "member", "회원관리", "/member_list.php", true, 1, "", 0);
|
||||
|
||||
$menu["member"]->addChildMenu("member", "회원관리", G5_ADMIN_URL . "/member_list.php", true, 1, "gear-wide-connected", 0);
|
||||
$menu["member"]->addChildMenu("member", "회원관리", G5_ADMIN_URL . "/member_list.php", true, 1, "\F8A7", 0);
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_form.php");
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_delete.php");
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_update.php");
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_delete.php");
|
||||
|
||||
$menu["member"]->addChildMenu("member", "접속자집계", G5_ADMIN_URL . "/visit_list.php", true, 2, "grid-1x2", 0);
|
||||
$menu["member"]->addChildMenu("member", "접속자집계", G5_ADMIN_URL . "/visit_list.php", true, 2, "\F3F2", 0);
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_domain.php");
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_browser.php");
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_os.php");
|
||||
|
|
@ -21,5 +21,5 @@ $menu["member"]->getLastAddedMenu()->addSubURL("/visit_week.php");
|
|||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_month.php");
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_year.php");
|
||||
|
||||
$menu["member"]->addChildMenu("member", "접속자로그삭제", G5_ADMIN_URL . "/visit_delete.php", true, 3, "palette2", 0);
|
||||
$menu["member"]->addChildMenu("member", "접속자로그삭제", G5_ADMIN_URL . "/visit_delete.php", true, 3, "\F5DE", 0);
|
||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_delete_update.php");
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ if (!defined('_GNUBOARD_'))
|
|||
|
||||
$menu["other"] = new MenuCategory("other", "other", "기타관리", "/config_form.php", true, 99, "", 0);
|
||||
|
||||
$menu["other"]->addChildMenu("other", "홈페이지 상세관리", G5_ADMIN_URL . "/config_form.php", true, 1, "gear-wide-connected", 0);
|
||||
$menu["other"]->addChildMenu("other", "홈페이지 상세관리", G5_ADMIN_URL . "/config_form.php", true, 1, "\F3E3", 0);
|
||||
$menu["other"]->getLastAddedMenu()->addSubURL("/config_form_update.php");
|
||||
|
||||
$menu["other"]->addChildMenu("other", "세션파일 일괄삭제", G5_ADMIN_URL . "/session_file_delete.php", true, 1, "gear-wide-connected", 0);
|
||||
$menu["other"]->addChildMenu("other", "캐시파일 일괄삭제", G5_ADMIN_URL . "/cache_file_delete.php", true, 1, "gear-wide-connected", 0);
|
||||
$menu["other"]->addChildMenu("other", "세션파일 일괄삭제", G5_ADMIN_URL . "/session_file_delete.php", true, 1, "\F8C3", 0);
|
||||
$menu["other"]->addChildMenu("other", "캐시파일 일괄삭제", G5_ADMIN_URL . "/cache_file_delete.php", true, 1, "\F8C3", 0);
|
||||
|
|
|
|||
|
|
@ -4,22 +4,25 @@ if (!defined('_GNUBOARD_'))
|
|||
|
||||
$menu["config"] = new MenuCategory("config", "config", "사이트 설정", "/site_config_form.php", true, 0, "", 0);
|
||||
|
||||
$menu["config"]->addChildMenu("config", "환경설정", G5_ADMIN_URL . "/site_config_form.php", true, 1, "gear-wide-connected", 0);
|
||||
$menu["config"]->addChildMenu("config", "환경설정", G5_ADMIN_URL . "/site_config_form.php", true, 1, "\F3E5", 0);
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/site_config_form_update.php");
|
||||
|
||||
$menu["config"]->addChildMenu("config", "메인 편집", G5_ADMIN_URL . "/viewer_form.php", true, 2, "grid-1x2", 0);
|
||||
$menu["config"]->addChildMenu("config", "메인 편집", G5_ADMIN_URL . "/viewer_form.php", true, 2, "\F3F4", 0);
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/viewer_form_update.php");
|
||||
|
||||
$menu["config"]->addChildMenu("config", "테마 설정", G5_ADMIN_URL . "/theme.php", true, 3, "palette2", 0);
|
||||
$menu["config"]->addChildMenu("config", "테마 설정", G5_ADMIN_URL . "/theme.php", true, 3, "\F4B2", 0);
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_config_load.php");
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_detail.php");
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_update.php");
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_preview.php");
|
||||
|
||||
$menu["config"]->addChildMenu("config", "디자인 설정", G5_ADMIN_URL . "/design_form.php", true, 4, "brush", 0);
|
||||
$menu["config"]->addChildMenu("config", "디자인 설정", G5_ADMIN_URL . "/design_form.php", true, 4, "\F1D8", 0);
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/design_form_update.php");
|
||||
|
||||
$menu["config"]->addChildMenu("config", "메뉴 설정", G5_ADMIN_URL . "/menu_list.php", true, 5, "list", 0);
|
||||
$menu["config"]->addChildMenu("config", "폰트 설정", G5_ADMIN_URL . "/editor_font.php", true, 5, "\F3DA", 0);
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/editor_font_update.php");
|
||||
|
||||
$menu["config"]->addChildMenu("config", "메뉴 설정", G5_ADMIN_URL . "/menu_list.php", true, 6, "\F478", 0);
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_list_update.php");
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form.php");
|
||||
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form_search.php");
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ if ($copy_case == 'schema_only') {
|
|||
}
|
||||
|
||||
// 게시판 정보
|
||||
$sql = " insert into {$g5['board_table']}
|
||||
$sql = "INSERT INTO {$g5['board_table']}
|
||||
set bo_table = '$target_table',
|
||||
bo_type = '{$board['bo_type']}',
|
||||
gr_id = '{$board['gr_id']}',
|
||||
|
|
@ -180,7 +180,7 @@ if ($copy_case == 'schema_data_both') {
|
|||
|
||||
if (count($file_copy)) {
|
||||
for ($i = 0; $i < count($file_copy); $i++) {
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
$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']}',
|
||||
|
|
|
|||
|
|
@ -16,19 +16,19 @@ if (!$tmp_bo_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_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['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['scrap_table']} WHERE bo_table = '{$tmp_bo_table}' ");
|
||||
|
||||
// 파일 삭제
|
||||
sql_query(" delete from {$g5['board_file_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);
|
||||
sql_query("DROP TABLE {$g5['write_prefix']}{$tmp_bo_table} ", FALSE);
|
||||
|
||||
delete_cache_latest($tmp_bo_table);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,39 +18,39 @@ if (!isset($board['bo_device'])) {
|
|||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_skin'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_skin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_skin` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_gallery_width'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_gallery_width` INT NOT NULL AFTER `bo_gallery_cols`, ADD `bo_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_width`, ADD `bo_mobile_gallery_width` INT NOT NULL DEFAULT '0' AFTER `bo_gallery_height`, ADD `bo_mobile_gallery_height` INT NOT NULL DEFAULT '0' AFTER `bo_mobile_gallery_width` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_subject_len'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject_len` INT(11) NOT NULL DEFAULT '0' AFTER `bo_subject_len` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_page_rows'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_page_rows` INT(11) NOT NULL DEFAULT '0' AFTER `bo_page_rows` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_content_head'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_content_head` TEXT NOT NULL AFTER `bo_content_head`, ADD `bo_mobile_content_tail` TEXT NOT NULL AFTER `bo_content_tail`", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_cert'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_use_cert` ENUM('','cert','adult') NOT NULL DEFAULT '' AFTER `bo_use_email` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_sns'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_use_sns` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_cert` ", false);
|
||||
|
||||
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
sql_query(" ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||
sql_query("ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||
ADD `wr_facebook_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_ip`,
|
||||
ADD `wr_twitter_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_facebook_user` ", false);
|
||||
}
|
||||
|
|
@ -59,21 +59,21 @@ if (!isset($board['bo_use_sns'])) {
|
|||
$sql = " SHOW COLUMNS FROM `{$g5['board_table']}` LIKE 'bo_use_cert' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (strpos($row['Type'], 'hp-') === false) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` CHANGE `bo_use_cert` `bo_use_cert` ENUM('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '' ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` CHANGE `bo_use_cert` `bo_use_cert` ENUM('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '' ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_list_file'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_list_file` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_list_view` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_use_list_file` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_list_view` ", false);
|
||||
|
||||
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
sql_query(" ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||
sql_query("ALTER TABLE `{$g5['write_prefix']}{$row['bo_table']}`
|
||||
ADD `wr_file` TINYINT NOT NULL DEFAULT '0' AFTER `wr_datetime` ", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($board['bo_mobile_subject'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_subject` ", false);
|
||||
sql_query("ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
$required = "";
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ $colspan = 11;
|
|||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="bo_table" <?php echo get_selected($_GET['sfl'], "bo_table", true); ?>>TABLE</option>
|
||||
<option value="bo_table" <?php echo get_selected($_GET['sfl'], "bo_table"); ?>>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>
|
||||
|
|
|
|||
|
|
@ -18,17 +18,17 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
$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']}' ";
|
||||
$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]}',
|
||||
$sql = "UPDATE {$g5['board_table']}
|
||||
SET gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_list_level = '{$_POST['bo_list_level'][$k]}',
|
||||
|
|
@ -36,7 +36,7 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
bo_write_level = '{$_POST['bo_write_level'][$k]}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level'][$k]}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level'][$k]}'
|
||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
WHERE bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,6 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||
|
|
@ -60,8 +59,6 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
$tmp_bo_table = trim($_POST['board_table'][$k]);
|
||||
include('./board_delete.inc.php');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
goto_url('./board_list.php');
|
||||
|
|
|
|||
|
|
@ -314,72 +314,10 @@ body {
|
|||
height: 16px;
|
||||
}
|
||||
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="메뉴 설정"]:before {
|
||||
content: "\F488";
|
||||
#gnb .gnb_2dli>a:before {
|
||||
content: var(--icon, "\F3E3");
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="환경설정"]:before {
|
||||
content: "\F3E3";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="메인 편집"]:before {
|
||||
content: "\F6CF";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="테마 설정"]:before {
|
||||
content: "\F4B1";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="디자인 설정"]:before {
|
||||
content: "\F7BF";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="DB관리"]:before {
|
||||
content: "\F8C4";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="회원관리"]:before {
|
||||
content: "\F4D6";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="접속자집계"]:before {
|
||||
content: "\F17E";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="접속자검색"]:before {
|
||||
content: "\F52A";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="접속자로그삭제"]:before {
|
||||
content: "\F5DE";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="게시판관리"]:before {
|
||||
content: "\F463";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="게시판그룹관리"]:before {
|
||||
content: "\F2EE";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="내용관리"]:before {
|
||||
content: "\F4CB";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="이모티콘관리"]:before {
|
||||
content: "\e9e1";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="세션파일 일괄삭제"]:before {
|
||||
content: "\F8C1";
|
||||
}
|
||||
|
||||
#gnb .gnb_2dli>a[data-text="캐시파일 일괄삭제"]:before {
|
||||
content: "\F8C1";
|
||||
}
|
||||
|
||||
|
||||
#container {
|
||||
padding: 25px;
|
||||
}
|
||||
|
|
|
|||
15
AvocadoEdition_Light/adm/editor_font.php
Normal file
15
AvocadoEdition_Light/adm/editor_font.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
include_once __DIR__ . '/_common.php';
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
alert_close('최고관리자만 접근 가능합니다.');
|
||||
}
|
||||
|
||||
$g5['title'] = '에디터 폰트 관리';
|
||||
|
||||
include_once __DIR__ . '/admin.head.php';
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
include_once __DIR__ . '/admin.tail.php';
|
||||
6
AvocadoEdition_Light/adm/editor_font_update.php
Normal file
6
AvocadoEdition_Light/adm/editor_font_update.php
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
include_once __DIR__ . '/_common.php';
|
||||
|
||||
if ($is_admin != 'super') {
|
||||
alert_close('최고관리자만 접근 가능합니다.');
|
||||
}
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit; // 개별 페이지 접근 불가
|
||||
check_site_auth($is_member);
|
||||
check_site_auth();
|
||||
$begin_time = get_microtime();
|
||||
|
||||
if (!isset($g5['title'])) {
|
||||
|
|
|
|||
|
|
@ -139,10 +139,10 @@ $colspan = 10;
|
|||
$intercept_msg = '';
|
||||
$intercept_title = '';
|
||||
if ($row['mb_leave_date']) {
|
||||
$mb_id = $mb_id;
|
||||
// $mb_id = $mb_id;
|
||||
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||
} else if ($row['mb_intercept_date']) {
|
||||
$mb_id = $mb_id;
|
||||
// $mb_id = $mb_id;
|
||||
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||
$intercept_title = '차단해제';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,9 @@ $colspan = 6;
|
|||
|
||||
$sql_common = " from {$g5['visit_table']} ";
|
||||
$sql_search = " where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
if (isset($domain))
|
||||
if (isset($domain) && is_string($domain)) {
|
||||
$sql_search .= " and vi_referer like '%{$domain}%' ";
|
||||
}
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class MenuCategory extends Menu
|
|||
$this->selected = true;
|
||||
}
|
||||
|
||||
$str .= '<li class="gnb_2dli ' . $check_gnb_grp_style . '"><a href="' . $menu->url . '" class="gnb_2da ' . $gnb_grp_style . ' ' . $gnb_grp_div . '" data-text="' . $menu->name . '">' . $menu->name . '</a></li>';
|
||||
$str .= '<li class="gnb_2dli ' . $check_gnb_grp_style . '"><a href="' . $menu->url . '" class="gnb_2da ' . $gnb_grp_style . ' ' . $gnb_grp_div . '" data-text="' . $menu->name . '" style="--icon:\'' . $menu->icon . '\'">' . $menu->name . '</a></li>';
|
||||
}
|
||||
$str .= "</ul>";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit; // 개별 페이지 접근 불가
|
||||
exit;
|
||||
|
||||
function editor_html($id, $content, $is_dhtml_editor = true)
|
||||
{
|
||||
|
|
@ -13,8 +13,8 @@ function editor_html($id, $content, $is_dhtml_editor = true)
|
|||
(!$w && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content'])))
|
||||
|| ($w == 'u' && isset($write['wr_option']) && strpos($write['wr_option'], 'html') === false)
|
||||
)
|
||||
) { //글쓰기 기본 내용 처리
|
||||
if (preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>')) { //textarea로 작성되고, html 내용이 없다면
|
||||
) {
|
||||
if (preg_match('/\r|\n/', $content) && $content === strip_tags($content, '<a><strong><b>')) {
|
||||
$content = nl2br($content);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,13 +23,15 @@ function editor_html($id, $content, $is_dhtml_editor = true)
|
|||
|
||||
$html = "";
|
||||
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
|
||||
if ($is_dhtml_editor)
|
||||
|
||||
if ($is_dhtml_editor) {
|
||||
$html .= '<script>document.write("<div class=\'cke_sc\'><button type=\'button\' class=\'btn_cke_sc\'>단축키 일람</button></div>");</script>';
|
||||
}
|
||||
|
||||
if ($is_dhtml_editor && $js) {
|
||||
$html .= "\n" . '<script src="' . $editor_url . '/js/service/HuskyEZCreator.js"></script>';
|
||||
$html .= "\n" . '<script>var g5_editor_url = "' . $editor_url . '", oEditors = [], ed_nonce = "' . ft_nonce_create('smarteditor') . '";</script>';
|
||||
$html .= "\n" . '<script src="' . $editor_url . '/config.js"></script>';
|
||||
$html .= "\n<script src=\"{$editor_url}/js/service/HuskyEZCreator.js\"></script>";
|
||||
$html .= "\n<script>var g5_editor_url = \"{$editor_url}\", oEditors = [], ed_nonce = \"{ft_nonce_create('smarteditor')}\";</script>";
|
||||
$html .= "\n<script src=\"{$editor_url}/config.js\"></script>";
|
||||
$html .= "\n<script>";
|
||||
$html .= '
|
||||
$(function(){
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||
$colspan = 5;
|
||||
$category_list = get_category_list($bo_table, $sca);
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||
?>
|
||||
|
||||
|
||||
<!-- 게시판 목록 시작 { -->
|
||||
<div id="bo_list">
|
||||
|
||||
<?php if($board['bo_content_head']) { ?>
|
||||
<?php if ($board['bo_content_head']) { ?>
|
||||
<div class="board-notice-box">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
<?= stripslashes($board['bo_content_head']); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -22,7 +23,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<?php if ($is_category) { ?>
|
||||
<nav class="board-category">
|
||||
<ul>
|
||||
<li><a href="./board.php?bo_table=<?=$bo_table?>" class="ui-btn <?=!$sca || $sca == ''? 'point' : 'etc'?>">ALL</a></li>
|
||||
<li><a href="./board.php?bo_table=<?= $bo_table ?>" class="ui-btn <?= !$sca || $sca == '' ? 'point' : 'etc' ?>">ALL</a>
|
||||
</li>
|
||||
<?php echo $category_list ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
@ -30,7 +32,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<!-- } 게시판 카테고리 끝 -->
|
||||
|
||||
|
||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);"
|
||||
method="post">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
|
|
@ -63,7 +66,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<?php for ($i = 0; $i < count($list); $i++) { ?>
|
||||
<tr>
|
||||
<td class="txt-center">
|
||||
<?php
|
||||
|
|
@ -80,17 +83,22 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
echo $list[$i]['icon_reply'];
|
||||
if ($is_category && $list[$i]['ca_name']) {
|
||||
?>
|
||||
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link" style="font-weight: 600; color: #a9cfff;">[<?php echo $list[$i]['ca_name'] ?>] </a>
|
||||
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"
|
||||
style="font-weight: 600; color: #a9cfff;">[<?php echo $list[$i]['ca_name'] ?>] </a>
|
||||
<?php } ?>
|
||||
|
||||
<a href="<?php echo $list[$i]['href'] ?>">
|
||||
<?php echo $list[$i]['subject'] ?>
|
||||
<?php if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><?php echo $list[$i]['comment_cnt']; ?><span class="sound_only">개</span><?php } ?>
|
||||
<?php if ($list[$i]['comment_cnt']) { ?><span
|
||||
class="sound_only">댓글</span><?php echo $list[$i]['comment_cnt']; ?><span
|
||||
class="sound_only">개</span><?php } ?>
|
||||
</a>
|
||||
|
||||
<?php
|
||||
if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];
|
||||
if (isset($list[$i]['icon_secret'])) echo $list[$i]['icon_secret'];
|
||||
if (isset($list[$i]['icon_new']))
|
||||
echo $list[$i]['icon_new'];
|
||||
if (isset($list[$i]['icon_secret']))
|
||||
echo $list[$i]['icon_secret'];
|
||||
?>
|
||||
</td>
|
||||
<td class="txt-center"><?php echo $list[$i]['wr_name'] ?></td>
|
||||
|
|
@ -98,7 +106,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<td class="txt-center"><?php echo $list[$i]['wr_hit'] ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if (count($list) == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
|
||||
<?php if (count($list) == 0) {
|
||||
echo '<tr><td colspan="' . $colspan . '" class="empty_table">게시물이 없습니다.</td></tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -108,8 +118,10 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<?php if ($list_href || $is_checkbox || $write_href) { ?>
|
||||
<div class="bo_fx">
|
||||
<?php if ($list_href || $write_href) { ?>
|
||||
<?php if ($list_href) { ?><a href="<?php echo $list_href ?>" class="ui-btn"><i class="material-icons">list</i> 목록</a><?php } ?>
|
||||
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point"><i class="material-icons">edit</i> 글쓰기</a><?php } ?>
|
||||
<?php if ($list_href) { ?><a href="<?php echo $list_href ?>" class="ui-btn"><i class="material-icons">list</i>
|
||||
목록</a><?php } ?>
|
||||
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point"><i
|
||||
class="material-icons">edit</i> 글쓰기</a><?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
|
@ -129,40 +141,42 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<input type="hidden" name="sop" value="and">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject"<?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
|
||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>
|
||||
<option value="wr_subject||wr_content"<?php echo get_selected($sfl, 'wr_subject||wr_content'); ?>>제목+내용</option>
|
||||
<option value="wr_subject" <?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
|
||||
<option value="wr_content" <?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>
|
||||
<option value="wr_subject||wr_content" <?php echo get_selected($sfl, 'wr_subject||wr_content'); ?>>제목+내용
|
||||
</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input required" size="15" maxlength="20">
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx"
|
||||
class="frm_input required" size="15" maxlength="20">
|
||||
<button type="submit" class="ui-btn"><i class="material-icons">search</i></button>
|
||||
</form>
|
||||
</fieldset>
|
||||
<!-- } 게시판 검색 끝 -->
|
||||
</div>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
for (var i = 0; i < f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fboardlist_submit(f) {
|
||||
function fboardlist_submit(f) {
|
||||
var chk_count = 0;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
for (var i = 0; i < f.length; i++) {
|
||||
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
|
||||
chk_count++;
|
||||
}
|
||||
|
|
@ -172,17 +186,17 @@ function fboardlist_submit(f) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택복사") {
|
||||
if (document.pressed == "선택복사") {
|
||||
select_copy("copy");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택이동") {
|
||||
if (document.pressed == "선택이동") {
|
||||
select_copy("move");
|
||||
return;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
|
||||
return false;
|
||||
|
||||
|
|
@ -191,10 +205,10 @@ function fboardlist_submit(f) {
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 선택한 게시물 복사 및 이동
|
||||
function select_copy(sw) {
|
||||
// 선택한 게시물 복사 및 이동
|
||||
function select_copy(sw) {
|
||||
var f = document.fboardlist;
|
||||
|
||||
if (sw == "copy")
|
||||
|
|
@ -208,7 +222,7 @@ function select_copy(sw) {
|
|||
f.target = "move";
|
||||
f.action = "./move.php";
|
||||
f.submit();
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 목록 끝 -->
|
||||
|
|
|
|||
|
|
@ -1,4 +1 @@
|
|||
@charset "utf-8";
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,52 +1,48 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
if (!defined("_GNUBOARD_"))
|
||||
exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH . '/thumbnail.lib.php');
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
|
||||
<article id="bo_v">
|
||||
|
||||
<?php if($board['bo_content_head']) { ?>
|
||||
<?php if ($board['bo_content_head']) { ?>
|
||||
<div class="board-notice-box">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
<?= stripslashes($board['bo_content_head']); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="board-title">
|
||||
<?php
|
||||
if ($category_name) echo "<em>{$view['ca_name']}</em>"; // 분류 출력 끝
|
||||
echo "<strong>".cut_str(get_text($view['wr_subject']), 70)."</strong>"; // 글제목 출력
|
||||
if ($category_name)
|
||||
echo "<em>{$view['ca_name']}</em>"; // 분류 출력 끝
|
||||
echo "<strong>" . cut_str(get_text($view['wr_subject']), 70) . "</strong>"; // 글제목 출력
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="board-info">
|
||||
<strong><?php echo $view['name'] ?><?php if ($is_ip_view) { echo " ($ip)"; } ?></strong>
|
||||
<strong><?php echo $view['name'] ?><?php if ($is_ip_view) {
|
||||
echo " ($ip)";
|
||||
} ?></strong>
|
||||
<strong><?php echo date("y-m-d H:i", strtotime($view['wr_datetime'])) ?></strong>
|
||||
<strong><?php echo number_format($view['wr_hit']) ?></strong>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($view['file']['count']) {
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
for ($i = 0; $i < count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if($cnt) { ?>
|
||||
<?php if ($cnt) { ?>
|
||||
<!-- 첨부파일 시작 { -->
|
||||
<div class="board-file">
|
||||
<ul>
|
||||
<?php
|
||||
// 가변 파일
|
||||
for ($i=0; $i<count($view['file']); $i++) {
|
||||
for ($i = 0; $i < count($view['file']); $i++) {
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
|
|
@ -66,15 +62,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
</div>
|
||||
<!-- } 첨부파일 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<div class="board-content">
|
||||
<?php
|
||||
// 파일 출력
|
||||
$v_img_count = count($view['file']);
|
||||
if($v_img_count) {
|
||||
if ($v_img_count) {
|
||||
echo "<div id=\"bo_v_img\">\n";
|
||||
|
||||
for ($i=0; $i<=count($view['file']); $i++) {
|
||||
for ($i = 0; $i <= count($view['file']); $i++) {
|
||||
if ($view['file'][$i]['view']) {
|
||||
//echo $view['file'][$i]['view'];
|
||||
echo get_view_thumbnail($view['file'][$i]['view']);
|
||||
|
|
@ -84,44 +79,43 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
echo "</div>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 본문 내용 시작 { -->
|
||||
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 코멘트 입출력
|
||||
include_once(G5_BBS_PATH.'/view_comment.php');
|
||||
include_once(G5_BBS_PATH . '/view_comment.php');
|
||||
?>
|
||||
|
||||
<!-- 링크 버튼 시작 { -->
|
||||
<div id="bo_v_bot">
|
||||
<div class="bo_v_com" style="text-align: right;">
|
||||
<?php if ($update_href) { ?><a href="<?php echo $update_href ?>" class="ui-btn etc"><i class="material-icons">edit</i> 수정</a><?php } ?>
|
||||
<?php if ($delete_href) { ?><a href="<?php echo $delete_href ?>" class="ui-btn etc" onclick="del(this.href); return false;"><i class="material-icons">delete</i> 삭제</a><?php } ?>
|
||||
<?php if ($update_href) { ?><a href="<?php echo $update_href ?>" class="ui-btn etc"><i
|
||||
class="material-icons">edit</i> 수정</a><?php } ?>
|
||||
<?php if ($delete_href) { ?><a href="<?php echo $delete_href ?>" class="ui-btn etc"
|
||||
onclick="del(this.href); return false;"><i class="material-icons">delete</i> 삭제</a><?php } ?>
|
||||
<a href="<?php echo $list_href ?>" class="ui-btn etc"><i class="material-icons">list</i> 목록</a>
|
||||
<?php if ($reply_href) { ?><a href="<?php echo $reply_href ?>" class="ui-btn"><i class="material-icons">list</i> 답변</a><?php } ?>
|
||||
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point"><i class="material-icons">edit</i> 글쓰기</a><?php } ?>
|
||||
<?php if ($reply_href) { ?><a href="<?php echo $reply_href ?>" class="ui-btn"><i class="material-icons">list</i>
|
||||
답변</a><?php } ?>
|
||||
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point"><i
|
||||
class="material-icons">edit</i> 글쓰기</a><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- } 링크 버튼 끝 -->
|
||||
|
||||
</article>
|
||||
<!-- } 게시판 읽기 끝 -->
|
||||
<script>
|
||||
<?php if ($board['bo_download_point'] < 0) { ?>
|
||||
$(function() {
|
||||
$("a.view_file_download").click(function() {
|
||||
if(!g5_is_member) {
|
||||
<?php if ($board['bo_download_point'] < 0) { ?>
|
||||
$(function () {
|
||||
$("a.view_file_download").click(function () {
|
||||
if (!g5_is_member) {
|
||||
alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var msg = "파일을 다운로드 하시면 포인트가 차감(<?php echo number_format($board['bo_download_point']) ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?";
|
||||
|
||||
if(confirm(msg)) {
|
||||
var href = $(this).attr("href")+"&js=on";
|
||||
if (confirm(msg)) {
|
||||
var href = $(this).attr("href") + "&js=on";
|
||||
$(this).attr("href", href);
|
||||
|
||||
return true;
|
||||
|
|
@ -129,26 +123,24 @@ $(function() {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
function board_move(href)
|
||||
{
|
||||
function board_move(href) {
|
||||
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.view_image").click(function() {
|
||||
$(function () {
|
||||
$("a.view_image").click(function () {
|
||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||
return false;
|
||||
});
|
||||
|
||||
// 추천, 비추천
|
||||
$("#good_button, #nogood_button").click(function() {
|
||||
$("#good_button, #nogood_button").click(function () {
|
||||
var $tx;
|
||||
if(this.id == "good_button")
|
||||
if (this.id == "good_button")
|
||||
$tx = $("#bo_v_act_good");
|
||||
else
|
||||
$tx = $("#bo_v_act_nogood");
|
||||
|
|
@ -159,22 +151,21 @@ $(function() {
|
|||
|
||||
// 이미지 리사이즈
|
||||
$("#bo_v_atc").viewimageresize();
|
||||
});
|
||||
});
|
||||
|
||||
function excute_good(href, $el, $tx)
|
||||
{
|
||||
function excute_good(href, $el, $tx) {
|
||||
$.post(
|
||||
href,
|
||||
{ js: "on" },
|
||||
function(data) {
|
||||
if(data.error) {
|
||||
function (data) {
|
||||
if (data.error) {
|
||||
alert(data.error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(data.count) {
|
||||
if (data.count) {
|
||||
$el.find("strong").text(number_format(String(data.count)));
|
||||
if($tx.attr("id").search("nogood") > -1) {
|
||||
if ($tx.attr("id").search("nogood") > -1) {
|
||||
$tx.text("이 글을 비추천하셨습니다.");
|
||||
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
||||
} else {
|
||||
|
|
@ -184,6 +175,6 @@ function excute_good(href, $el, $tx)
|
|||
}
|
||||
}, "json"
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- } 게시글 읽기 끝 -->
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
$comment_action_url = https_url(G5_BBS_DIR)."/write_comment_update.php";
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit; // 개별 페이지 접근 불가
|
||||
$comment_action_url = https_url(G5_BBS_DIR) . "/write_comment_update.php";
|
||||
?>
|
||||
|
||||
<script>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
</script>
|
||||
|
||||
<!-- 댓글 시작 { -->
|
||||
<section id="bo_vc">
|
||||
<?php
|
||||
$cmt_amt = count($list);
|
||||
for ($i=0; $i<$cmt_amt; $i++) {
|
||||
for ($i = 0; $i < $cmt_amt; $i++) {
|
||||
$comment_id = $list[$i]['wr_id'];
|
||||
$cmt_depth = ""; // 댓글단계
|
||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10;
|
||||
|
|
@ -27,34 +28,39 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||
?>
|
||||
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>class="is-reply" style="border-left-width:<?php echo $cmt_depth ?>px;"<?php } ?>>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>class="is-reply"
|
||||
style="border-left-width:<?php echo $cmt_depth ?>px;" <?php } ?>>
|
||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||
<?php echo $list[$i]['name'] ?>
|
||||
<?php if ($is_ip_view) { ?>
|
||||
<span class="bo_vc_hdinfo"><?php echo $list[$i]['ip']; ?></span>
|
||||
<?php } ?>
|
||||
<span class="bo_vc_hdinfo"><time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo date('m/d H:i', strtotime($list[$i]['datetime'])) ?></time></span>
|
||||
<span class="bo_vc_hdinfo"><time
|
||||
datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo date('m/d H:i', strtotime($list[$i]['datetime'])) ?></time></span>
|
||||
<?php
|
||||
include(G5_SNS_PATH.'/view_comment_list.sns.skin.php');
|
||||
include(G5_SNS_PATH . '/view_comment_list.sns.skin.php');
|
||||
?>
|
||||
</header>
|
||||
|
||||
<!-- 댓글 출력 -->
|
||||
<p>
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img
|
||||
src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
|
||||
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
|
||||
<span id="reply_<?php echo $comment_id ?>"></span><!-- 답변 -->
|
||||
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'], "secret") ?>"
|
||||
id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>"
|
||||
style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
|
||||
<?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
<?php if ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
$query_string = clean_query_string($_SERVER['QUERY_STRING']);
|
||||
|
||||
if($w == 'cu') {
|
||||
if ($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||
|
|
@ -62,31 +68,41 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$c_reply_href = './board.php?' . $query_string . '&c_id=' . $comment_id . '&w=c#bo_vc_w';
|
||||
$c_edit_href = './board.php?' . $query_string . '&c_id=' . $comment_id . '&w=cu#bo_vc_w';
|
||||
?>
|
||||
<footer>
|
||||
<ul class="bo_vc_act">
|
||||
<?php if ($list[$i]['is_reply']) { ?><li><a href="<?php echo $c_reply_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;" class="ui-btn small point">답변</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_edit']) { ?><li><a href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;" class="ui-btn small etc">수정</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();" class="ui-btn small">삭제</a></li><?php } ?>
|
||||
<?php if ($list[$i]['is_reply']) { ?>
|
||||
<li><a href="<?php echo $c_reply_href; ?>"
|
||||
onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;" class="ui-btn small point">답변</a>
|
||||
</li><?php } ?>
|
||||
<?php if ($list[$i]['is_edit']) { ?>
|
||||
<li><a href="<?php echo $c_edit_href; ?>"
|
||||
onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;" class="ui-btn small etc">수정</a></li>
|
||||
<?php } ?>
|
||||
<?php if ($list[$i]['is_del']) { ?>
|
||||
<li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();"
|
||||
class="ui-btn small">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</footer>
|
||||
<?php } ?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
<?php if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><?php } ?>
|
||||
<?php if ($i == 0) { //댓글이 없다면 ?>
|
||||
<p id="bo_vc_empty">등록된 댓글이 없습니다.</p><?php } ?>
|
||||
|
||||
</section>
|
||||
<!-- } 댓글 끝 -->
|
||||
|
||||
<?php if ($is_comment_write) {
|
||||
if($w == '')
|
||||
if ($w == '')
|
||||
$w = 'c';
|
||||
?>
|
||||
<!-- 댓글 쓰기 시작 { -->
|
||||
<aside id="bo_vc_w" class="theme-box">
|
||||
<form name="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
||||
?>
|
||||
<!-- 댓글 쓰기 시작 { -->
|
||||
<aside id="bo_vc_w" class="theme-box">
|
||||
<form name="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);"
|
||||
method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
|
|
@ -108,11 +124,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||
<?php if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_name">이름<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td><input type="text" name="wr_name" value="<?php echo get_cookie("ck_sns_name"); ?>" id="wr_name" required class="frm_input required" size="5" maxLength="20"></td>
|
||||
<td><input type="text" name="wr_name" value="<?php echo get_cookie("ck_sns_name"); ?>" id="wr_name" required
|
||||
class="frm_input required" size="5" maxLength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td><input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="10" maxLength="20"></td>
|
||||
<td><input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="10"
|
||||
maxLength="20"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
|
|
@ -129,12 +147,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td>
|
||||
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?php } ?>
|
||||
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="내용"
|
||||
<?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?php } ?>><?php echo $c_wr_content; ?></textarea>
|
||||
<?php if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
||||
<?php if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span
|
||||
id="char_count"></span>글자</strong><?php } ?>
|
||||
<textarea id="wr_content" name="wr_content" maxlength="10000" required class="required" title="내용" <?php if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');" <?php } ?>><?php echo $c_wr_content; ?></textarea>
|
||||
<?php if ($comment_min || $comment_max) { ?>
|
||||
<script> check_byte('wr_content', 'char_count'); </script><?php } ?>
|
||||
<script>
|
||||
$(document).on( "keyup change", "textarea#wr_content[maxlength]", function(){
|
||||
$(document).on("keyup change", "textarea#wr_content[maxlength]", function () {
|
||||
var str = $(this).val()
|
||||
var mx = parseInt($(this).attr("maxlength"))
|
||||
if (str.length > mx) {
|
||||
|
|
@ -154,14 +173,13 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
|||
</div>
|
||||
|
||||
</form>
|
||||
</aside>
|
||||
</aside>
|
||||
|
||||
<script>
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
<script>
|
||||
var save_before = '';
|
||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
|
||||
function good_and_write()
|
||||
{
|
||||
function good_and_write() {
|
||||
var f = document.fviewcomment;
|
||||
if (fviewcomment_submit(f)) {
|
||||
f.is_good.value = 1;
|
||||
|
|
@ -169,10 +187,9 @@ function good_and_write()
|
|||
} else {
|
||||
f.is_good.value = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
function fviewcomment_submit(f) {
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
f.is_good.value = 0;
|
||||
|
|
@ -180,7 +197,7 @@ function fviewcomment_submit(f)
|
|||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
url: g5_bbs_url + "/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": "",
|
||||
|
|
@ -189,14 +206,14 @@ function fviewcomment_submit(f)
|
|||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
success: function (data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -204,63 +221,54 @@ function fviewcomment_submit(f)
|
|||
// 양쪽 공백 없애기
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||
if (char_min > 0 || char_max > 0)
|
||||
{
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
check_byte('wr_content', 'char_count');
|
||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||
if (char_min > 0 && char_min > cnt)
|
||||
{
|
||||
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("댓글은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
} else if (char_max > 0 && char_max < cnt)
|
||||
{
|
||||
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
} else if (char_max > 0 && char_max < cnt) {
|
||||
alert("댓글은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (!document.getElementById('wr_content').value)
|
||||
{
|
||||
else if (!document.getElementById('wr_content').value) {
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
if (typeof (f.wr_name) != 'undefined') {
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
if (f.wr_name.value == '') {
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
if (typeof (f.wr_password) != 'undefined') {
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
if (f.wr_password.value == '') {
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
||||
<?php if ($is_guest)
|
||||
echo chk_captcha_js(); ?>
|
||||
|
||||
set_comment_token(f);
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function comment_box(comment_id, work)
|
||||
{
|
||||
function comment_box(comment_id, work) {
|
||||
var el_id;
|
||||
// 댓글 아이디가 넘어오면 답변, 수정
|
||||
if (comment_id)
|
||||
{
|
||||
if (comment_id) {
|
||||
if (work == 'c')
|
||||
el_id = 'reply_' + comment_id;
|
||||
else
|
||||
|
|
@ -269,10 +277,8 @@ function comment_box(comment_id, work)
|
|||
else
|
||||
el_id = 'bo_vc_w';
|
||||
|
||||
if (save_before != el_id)
|
||||
{
|
||||
if (save_before)
|
||||
{
|
||||
if (save_before != el_id) {
|
||||
if (save_before) {
|
||||
document.getElementById(save_before).style.display = 'none';
|
||||
document.getElementById(save_before).innerHTML = '';
|
||||
}
|
||||
|
|
@ -280,12 +286,11 @@ function comment_box(comment_id, work)
|
|||
document.getElementById(el_id).style.display = '';
|
||||
document.getElementById(el_id).innerHTML = save_html;
|
||||
// 댓글 수정
|
||||
if (work == 'cu')
|
||||
{
|
||||
if (work == 'cu') {
|
||||
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
|
||||
if (typeof char_count != 'undefined')
|
||||
check_byte('wr_content', 'char_count');
|
||||
if (document.getElementById('secret_comment_'+comment_id).value)
|
||||
if (document.getElementById('secret_comment_' + comment_id).value)
|
||||
document.getElementById('wr_secret').checked = true;
|
||||
else
|
||||
document.getElementById('wr_secret').checked = false;
|
||||
|
|
@ -294,31 +299,30 @@ function comment_box(comment_id, work)
|
|||
document.getElementById('comment_id').value = comment_id;
|
||||
document.getElementById('w').value = work;
|
||||
|
||||
if(save_before)
|
||||
if (save_before)
|
||||
$("#captcha_reload").trigger("click");
|
||||
|
||||
save_before = el_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
function comment_delete() {
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
}
|
||||
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
|
||||
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||
// sns 등록
|
||||
$(function() {
|
||||
<?php if ($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||
// sns 등록
|
||||
$(function () {
|
||||
$("#bo_vc_send_sns").load(
|
||||
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
|
||||
function() {
|
||||
function () {
|
||||
save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||
}
|
||||
);
|
||||
});
|
||||
<?php } ?>
|
||||
</script>
|
||||
});
|
||||
<?php } ?>
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
|
|
@ -1,21 +1,23 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
|
||||
?>
|
||||
|
||||
|
||||
<section id="bo_w">
|
||||
|
||||
<?php if($board['bo_content_head']) { ?>
|
||||
<?php if ($board['bo_content_head']) { ?>
|
||||
<div class="board-notice-box">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
<?= stripslashes($board['bo_content_head']); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 게시물 작성/수정 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);"
|
||||
method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
|
|
@ -33,27 +35,27 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
|
||||
$option .= "\n" . '<input type="checkbox" id="notice" name="notice" value="1" ' . $notice_checked . '>' . "\n" . '<label for="notice">공지</label>';
|
||||
}
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
|
||||
$option .= "\n" . '<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="' . $html_value . '" ' . $html_checked . '>' . "\n" . '<label for="html">html</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
||||
if ($is_admin || $is_secret == 1) {
|
||||
$option .= "\n" . '<input type="checkbox" id="secret" name="secret" value="secret" ' . $secret_checked . '>' . "\n" . '<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
||||
$option .= "\n" . '<input type="checkbox" id="mail" name="mail" value="mail" ' . $recv_email_checked . '>' . "\n" . '<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,28 +71,32 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<?php if ($is_name) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20"></td>
|
||||
<td><input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required
|
||||
class="frm_input required" size="10" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_password) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
|
||||
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?>
|
||||
class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_email) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_email">이메일</label></th>
|
||||
<td><input type="text" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email" size="50" maxlength="100"></td>
|
||||
<td><input type="text" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email"
|
||||
size="50" maxlength="100"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_homepage) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
|
||||
<td><input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input" size="50"></td>
|
||||
<td><input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input"
|
||||
size="50"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -105,7 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<tr>
|
||||
<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="ca_name" id="ca_name" required class="required" >
|
||||
<select name="ca_name" id="ca_name" required class="required">
|
||||
<option value="">선택하세요</option>
|
||||
<?php echo $category_option ?>
|
||||
</select>
|
||||
|
|
@ -117,7 +123,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<div id="autosave_wrapper">
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required
|
||||
class="frm_input required" size="50" maxlength="255">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -125,12 +132,13 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
<tr>
|
||||
<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content">
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<?php if ($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대
|
||||
<strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||
<?php } ?>
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<?php if ($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||
<?php } ?>
|
||||
|
|
@ -138,22 +146,27 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
</tr>
|
||||
|
||||
<?php /*for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_link<?php echo $i ?>">링크 #<?php echo $i ?></label></th>
|
||||
<td><input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50"></td>
|
||||
</tr>
|
||||
<?php }*/ ?>
|
||||
</tr>
|
||||
<?php }*/ ?>
|
||||
|
||||
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
|
||||
<?php for ($i = 0; $is_file && $i < $file_count; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">파일 #<?php echo $i+1 ?></th>
|
||||
<th scope="row">파일 #<?php echo $i + 1 ?></th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[]" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input">
|
||||
<input type="file" name="bf_file[]"
|
||||
title="파일첨부 <?php echo $i + 1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
|
||||
class="frm_file frm_input">
|
||||
<?php if ($is_file_content) { ?>
|
||||
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>" title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">
|
||||
<input type="text" name="bf_content[]" value="<?php echo ($w == 'u') ? $file[$i]['bf_content'] : ''; ?>"
|
||||
title="파일 설명을 입력해주세요." class="frm_file frm_input" size="50">
|
||||
<?php } ?>
|
||||
<?php if($w == 'u' && $file[$i]['file']) { ?>
|
||||
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1"> <label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
|
||||
<?php if ($w == 'u' && $file[$i]['file']) { ?>
|
||||
<input type="checkbox" id="bf_file_del<?php echo $i ?>" name="bf_file_del[<?php echo $i; ?>]" value="1">
|
||||
<label for="bf_file_del<?php echo $i ?>"><?php echo $file[$i]['source'] . '(' . $file[$i]['size'] . ')'; ?> 파일
|
||||
삭제</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -172,27 +185,27 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn point"><i class="material-icons">edit</i> 작성</button>
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn point"><i class="material-icons">edit</i>
|
||||
작성</button>
|
||||
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="ui-btn"><i class="material-icons">list</i> 목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<?php if ($write_min || $write_max) { ?>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||
check_byte("wr_content", "char_count");
|
||||
|
||||
$(function() {
|
||||
$("#wr_content").on("keyup", function() {
|
||||
$(function () {
|
||||
$("#wr_content").on("keyup", function () {
|
||||
check_byte("wr_content", "char_count");
|
||||
});
|
||||
});
|
||||
|
||||
<?php } ?>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
function html_auto_br(obj) {
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
|
|
@ -204,14 +217,13 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
function fwrite_submit(f) {
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
url: g5_bbs_url + "/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
|
|
@ -220,21 +232,21 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
success: function (data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
alert("제목에 금지단어('" + subject + "')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||
if (typeof (ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
|
|
@ -245,11 +257,11 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
alert("내용은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
alert("내용은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue