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"] = 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_list_update.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form.php");
|
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form_update.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.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/board_copy_update.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_list_update.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form.php");
|
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form_update.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_update.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_form.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("/contentform.php");
|
||||||
$menu["board"]->getLastAddedMenu()->addSubURL("/contentformupdate.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"] = 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_form.php");
|
||||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_delete.php");
|
$menu["member"]->getLastAddedMenu()->addSubURL("/member_delete.php");
|
||||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_update.php");
|
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_update.php");
|
||||||
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_delete.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_domain.php");
|
||||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_browser.php");
|
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_browser.php");
|
||||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_os.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_month.php");
|
||||||
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_year.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");
|
$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"] = 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"]->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 . "/session_file_delete.php", true, 1, "\F8C3", 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 . "/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"] = 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"]->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"]->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_config_load.php");
|
||||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_detail.php");
|
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_detail.php");
|
||||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_update.php");
|
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_update.php");
|
||||||
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_preview.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"]->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_list_update.php");
|
||||||
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form.php");
|
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form.php");
|
||||||
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form_search.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',
|
set bo_table = '$target_table',
|
||||||
bo_type = '{$board['bo_type']}',
|
bo_type = '{$board['bo_type']}',
|
||||||
gr_id = '{$board['gr_id']}',
|
gr_id = '{$board['gr_id']}',
|
||||||
|
|
@ -180,7 +180,7 @@ if ($copy_case == 'schema_data_both') {
|
||||||
|
|
||||||
if (count($file_copy)) {
|
if (count($file_copy)) {
|
||||||
for ($i = 0; $i < count($file_copy); $i++) {
|
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',
|
set bo_table = '$target_table',
|
||||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||||
bf_no = '{$file_copy[$i]['bf_no']}',
|
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||||
|
|
|
||||||
|
|
@ -16,19 +16,19 @@ if (!$tmp_bo_table) {
|
||||||
//if ($row['cnt'] <= 1) { return; }
|
//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
|
// 게시판 테이블 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);
|
delete_cache_latest($tmp_bo_table);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,39 +18,39 @@ if (!isset($board['bo_device'])) {
|
||||||
// pc : pc 전용 사용
|
// pc : pc 전용 사용
|
||||||
// mobile : mobile 전용 사용
|
// mobile : mobile 전용 사용
|
||||||
// none : 사용 안함
|
// 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'])) {
|
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'])) {
|
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'])) {
|
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'])) {
|
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'])) {
|
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'])) {
|
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'])) {
|
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']}` ");
|
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
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_facebook_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_ip`,
|
||||||
ADD `wr_twitter_user` VARCHAR(255) NOT NULL DEFAULT '' AFTER `wr_facebook_user` ", false);
|
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' ";
|
$sql = " SHOW COLUMNS FROM `{$g5['board_table']}` LIKE 'bo_use_cert' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (strpos($row['Type'], 'hp-') === false) {
|
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'])) {
|
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']}` ");
|
$result = sql_query(" select bo_table from `{$g5['board_table']}` ");
|
||||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
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);
|
ADD `wr_file` TINYINT NOT NULL DEFAULT '0' AFTER `wr_datetime` ", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($board['bo_mobile_subject'])) {
|
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 = "";
|
$required = "";
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ $colspan = 11;
|
||||||
|
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
<select name="sfl" id="sfl">
|
<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="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>
|
<option value="a.gr_id" <?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -18,25 +18,25 @@ if ($_POST['act_button'] == "선택수정") {
|
||||||
$k = $_POST['chk'][$i];
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
if ($is_admin != 'super') {
|
if ($is_admin != 'super') {
|
||||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
$sql = "SELECT count(*) AS cnt FROM {$g5['board_table']} a, {$g5['group_table']} b
|
||||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
WHERE a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||||
and a.gr_id = b.gr_id
|
AND a.gr_id = b.gr_id
|
||||||
and b.gr_admin = '{$member['mb_id']}' ";
|
AND b.gr_admin = '{$member['mb_id']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if (!$row['cnt'])
|
if (!$row['cnt'])
|
||||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판(' . $board_table[$k] . ')은 수정이 불가합니다.');
|
alert('최고관리자가 아닌 경우 다른 관리자의 게시판(' . $board_table[$k] . ')은 수정이 불가합니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = " update {$g5['board_table']}
|
$sql = "UPDATE {$g5['board_table']}
|
||||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
SET gr_id = '{$_POST['gr_id'][$k]}',
|
||||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||||
bo_list_level = '{$_POST['bo_list_level'][$k]}',
|
bo_list_level = '{$_POST['bo_list_level'][$k]}',
|
||||||
bo_read_level = '{$_POST['bo_read_level'][$k]}',
|
bo_read_level = '{$_POST['bo_read_level'][$k]}',
|
||||||
bo_write_level = '{$_POST['bo_write_level'][$k]}',
|
bo_write_level = '{$_POST['bo_write_level'][$k]}',
|
||||||
bo_comment_level = '{$_POST['bo_comment_level'][$k]}',
|
bo_comment_level = '{$_POST['bo_comment_level'][$k]}',
|
||||||
bo_reply_level = '{$_POST['bo_reply_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);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,7 +46,6 @@ if ($_POST['act_button'] == "선택수정") {
|
||||||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'd');
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
check_admin_token();
|
check_admin_token();
|
||||||
|
|
||||||
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||||
|
|
@ -60,8 +59,6 @@ if ($_POST['act_button'] == "선택수정") {
|
||||||
$tmp_bo_table = trim($_POST['board_table'][$k]);
|
$tmp_bo_table = trim($_POST['board_table'][$k]);
|
||||||
include('./board_delete.inc.php');
|
include('./board_delete.inc.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
goto_url('./board_list.php');
|
goto_url('./board_list.php');
|
||||||
|
|
|
||||||
|
|
@ -314,72 +314,10 @@ body {
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#gnb .gnb_2dli>a:before {
|
||||||
#gnb .gnb_2dli>a[data-text="메뉴 설정"]:before {
|
content: var(--icon, "\F3E3");
|
||||||
content: "\F488";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#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 {
|
#container {
|
||||||
padding: 25px;
|
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
|
<?php
|
||||||
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
|
||||||
if (!defined('_GNUBOARD_'))
|
if (!defined('_GNUBOARD_'))
|
||||||
exit; // 개별 페이지 접근 불가
|
exit; // 개별 페이지 접근 불가
|
||||||
check_site_auth($is_member);
|
check_site_auth();
|
||||||
$begin_time = get_microtime();
|
$begin_time = get_microtime();
|
||||||
|
|
||||||
if (!isset($g5['title'])) {
|
if (!isset($g5['title'])) {
|
||||||
|
|
|
||||||
|
|
@ -139,10 +139,10 @@ $colspan = 10;
|
||||||
$intercept_msg = '';
|
$intercept_msg = '';
|
||||||
$intercept_title = '';
|
$intercept_title = '';
|
||||||
if ($row['mb_leave_date']) {
|
if ($row['mb_leave_date']) {
|
||||||
$mb_id = $mb_id;
|
// $mb_id = $mb_id;
|
||||||
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||||
} else if ($row['mb_intercept_date']) {
|
} else if ($row['mb_intercept_date']) {
|
||||||
$mb_id = $mb_id;
|
// $mb_id = $mb_id;
|
||||||
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||||
$intercept_title = '차단해제';
|
$intercept_title = '차단해제';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,9 @@ $colspan = 6;
|
||||||
|
|
||||||
$sql_common = " from {$g5['visit_table']} ";
|
$sql_common = " from {$g5['visit_table']} ";
|
||||||
$sql_search = " where vi_date between '{$fr_date}' and '{$to_date}' ";
|
$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_search .= " and vi_referer like '%{$domain}%' ";
|
||||||
|
}
|
||||||
|
|
||||||
$sql = " select count(*) as cnt
|
$sql = " select count(*) as cnt
|
||||||
{$sql_common}
|
{$sql_common}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class MenuCategory extends Menu
|
||||||
$this->selected = true;
|
$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>";
|
$str .= "</ul>";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_'))
|
if (!defined('_GNUBOARD_'))
|
||||||
exit; // 개별 페이지 접근 불가
|
exit;
|
||||||
|
|
||||||
function editor_html($id, $content, $is_dhtml_editor = true)
|
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 && (isset($board['bo_insert_content']) && !empty($board['bo_insert_content'])))
|
||||||
|| ($w == 'u' && isset($write['wr_option']) && strpos($write['wr_option'], 'html') === false)
|
|| ($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);
|
$content = nl2br($content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -23,29 +23,31 @@ function editor_html($id, $content, $is_dhtml_editor = true)
|
||||||
|
|
||||||
$html = "";
|
$html = "";
|
||||||
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
|
$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>';
|
$html .= '<script>document.write("<div class=\'cke_sc\'><button type=\'button\' class=\'btn_cke_sc\'>단축키 일람</button></div>");</script>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_dhtml_editor && $js) {
|
if ($is_dhtml_editor && $js) {
|
||||||
$html .= "\n" . '<script src="' . $editor_url . '/js/service/HuskyEZCreator.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>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}/config.js\"></script>";
|
||||||
$html .= "\n<script>";
|
$html .= "\n<script>";
|
||||||
$html .= '
|
$html .= '
|
||||||
$(function(){
|
$(function(){
|
||||||
$(".btn_cke_sc").click(function(){
|
$(".btn_cke_sc").click(function(){
|
||||||
if ($(this).next("div.cke_sc_def").length) {
|
if ($(this).next("div.cke_sc_def").length) {
|
||||||
$(this).next("div.cke_sc_def").remove();
|
$(this).next("div.cke_sc_def").remove();
|
||||||
$(this).text("단축키 일람");
|
$(this).text("단축키 일람");
|
||||||
} else {
|
} else {
|
||||||
$(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("' . $editor_url . '/shortcut.html");
|
$(this).after("<div class=\'cke_sc_def\' />").next("div.cke_sc_def").load("' . $editor_url . '/shortcut.html");
|
||||||
$(this).text("단축키 일람 닫기");
|
$(this).text("단축키 일람 닫기");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).on("click", ".btn_cke_sc_close", function(){
|
$(document).on("click", ".btn_cke_sc_close", function(){
|
||||||
$(this).parent("div.cke_sc_def").remove();
|
$(this).parent("div.cke_sc_def").remove();
|
||||||
});
|
});
|
||||||
});';
|
});';
|
||||||
$html .= "\n</script>";
|
$html .= "\n</script>";
|
||||||
$js = false;
|
$js = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,214 +1,228 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||||
$colspan = 5;
|
$colspan = 5;
|
||||||
$category_list = get_category_list($bo_table, $sca);
|
$category_list = get_category_list($bo_table, $sca);
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// 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">
|
<div id="bo_list">
|
||||||
|
|
||||||
<?php if($board['bo_content_head']) { ?>
|
|
||||||
<div class="board-notice-box">
|
|
||||||
<?=stripslashes($board['bo_content_head']);?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<!-- 게시판 카테고리 시작 { -->
|
<?php if ($board['bo_content_head']) { ?>
|
||||||
<?php if ($is_category) { ?>
|
<div class="board-notice-box">
|
||||||
<nav class="board-category">
|
<?= stripslashes($board['bo_content_head']); ?>
|
||||||
<ul>
|
</div>
|
||||||
<li><a href="./board.php?bo_table=<?=$bo_table?>" class="ui-btn <?=!$sca || $sca == ''? 'point' : 'etc'?>">ALL</a></li>
|
<?php } ?>
|
||||||
<?php echo $category_list ?>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<?php } ?>
|
|
||||||
<!-- } 게시판 카테고리 끝 -->
|
|
||||||
|
|
||||||
|
<!-- 게시판 카테고리 시작 { -->
|
||||||
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
<?php if ($is_category) { ?>
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
<nav class="board-category">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<ul>
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<li><a href="./board.php?bo_table=<?= $bo_table ?>" class="ui-btn <?= !$sca || $sca == '' ? 'point' : 'etc' ?>">ALL</a>
|
||||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
</li>
|
||||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
<?php echo $category_list ?>
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
</ul>
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
</nav>
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<?php } ?>
|
||||||
<input type="hidden" name="sw" value="">
|
<!-- } 게시판 카테고리 끝 -->
|
||||||
|
|
||||||
<div class="responsive-table-box">
|
|
||||||
<p class="guide">Scroll →</p>
|
|
||||||
<div class="resp-table">
|
|
||||||
<table class="theme-list">
|
|
||||||
<caption><?php echo $board['bo_subject'] ?> 목록</caption>
|
|
||||||
<colgroup>
|
|
||||||
<col style="width: 80px;" />
|
|
||||||
<col />
|
|
||||||
<col style="width: 120px;" />
|
|
||||||
<col style="width: 120px;" />
|
|
||||||
<col style="width: 100px;" />
|
|
||||||
</colgroup>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">No</th>
|
|
||||||
<th scope="col">제목</th>
|
|
||||||
<th scope="col">작성자</th>
|
|
||||||
<th scope="col">작성일</th>
|
|
||||||
<th scope="col">조회</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
|
||||||
<tr>
|
|
||||||
<td class="txt-center">
|
|
||||||
<?php
|
|
||||||
if ($list[$i]['is_notice']) // 공지사항
|
|
||||||
echo '<strong>공지</strong>';
|
|
||||||
else if ($wr_id == $list[$i]['wr_id'])
|
|
||||||
echo "<span class=\"bo_current\">열람중</span>";
|
|
||||||
else
|
|
||||||
echo $list[$i]['num'];
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
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>
|
|
||||||
<?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 } ?>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
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>
|
|
||||||
<td class="txt-center"><?php echo $list[$i]['datetime2'] ?></td>
|
|
||||||
<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>'; } ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<?php if ($list_href || $is_checkbox || $write_href) { ?>
|
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);"
|
||||||
<div class="bo_fx">
|
method="post">
|
||||||
<?php if ($list_href || $write_href) { ?>
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||||
<?php if ($list_href) { ?><a href="<?php echo $list_href ?>" class="ui-btn"><i class="material-icons">list</i> 목록</a><?php } ?>
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point"><i class="material-icons">edit</i> 글쓰기</a><?php } ?>
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<?php } ?>
|
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||||
</div>
|
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||||
<?php } ?>
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
</form>
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="sw" value="">
|
||||||
|
|
||||||
|
<div class="responsive-table-box">
|
||||||
<!-- 페이지 -->
|
<p class="guide">Scroll →</p>
|
||||||
<?php echo $write_pages; ?>
|
<div class="resp-table">
|
||||||
|
<table class="theme-list">
|
||||||
|
<caption><?php echo $board['bo_subject'] ?> 목록</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 80px;" />
|
||||||
|
<col />
|
||||||
|
<col style="width: 120px;" />
|
||||||
|
<col style="width: 120px;" />
|
||||||
|
<col style="width: 100px;" />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">No</th>
|
||||||
|
<th scope="col">제목</th>
|
||||||
|
<th scope="col">작성자</th>
|
||||||
|
<th scope="col">작성일</th>
|
||||||
|
<th scope="col">조회</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php for ($i = 0; $i < count($list); $i++) { ?>
|
||||||
|
<tr>
|
||||||
|
<td class="txt-center">
|
||||||
|
<?php
|
||||||
|
if ($list[$i]['is_notice']) // 공지사항
|
||||||
|
echo '<strong>공지</strong>';
|
||||||
|
else if ($wr_id == $list[$i]['wr_id'])
|
||||||
|
echo "<span class=\"bo_current\">열람중</span>";
|
||||||
|
else
|
||||||
|
echo $list[$i]['num'];
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
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>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<!-- 게시판 검색 시작 { -->
|
<a href="<?php echo $list[$i]['href'] ?>">
|
||||||
<fieldset id="bo_sch">
|
<?php echo $list[$i]['subject'] ?>
|
||||||
<legend>게시물 검색</legend>
|
<?php if ($list[$i]['comment_cnt']) { ?><span
|
||||||
|
class="sound_only">댓글</span><?php echo $list[$i]['comment_cnt']; ?><span
|
||||||
|
class="sound_only">개</span><?php } ?>
|
||||||
|
</a>
|
||||||
|
|
||||||
<form name="fsearch" method="get">
|
<?php
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
if (isset($list[$i]['icon_new']))
|
||||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
echo $list[$i]['icon_new'];
|
||||||
<input type="hidden" name="sop" value="and">
|
if (isset($list[$i]['icon_secret']))
|
||||||
<label for="sfl" class="sound_only">검색대상</label>
|
echo $list[$i]['icon_secret'];
|
||||||
<select name="sfl" id="sfl">
|
?>
|
||||||
<option value="wr_subject"<?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
|
</td>
|
||||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>
|
<td class="txt-center"><?php echo $list[$i]['wr_name'] ?></td>
|
||||||
<option value="wr_subject||wr_content"<?php echo get_selected($sfl, 'wr_subject||wr_content'); ?>>제목+내용</option>
|
<td class="txt-center"><?php echo $list[$i]['datetime2'] ?></td>
|
||||||
</select>
|
<td class="txt-center"><?php echo $list[$i]['wr_hit'] ?></td>
|
||||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
</tr>
|
||||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input required" size="15" maxlength="20">
|
<?php } ?>
|
||||||
<button type="submit" class="ui-btn"><i class="material-icons">search</i></button>
|
<?php if (count($list) == 0) {
|
||||||
</form>
|
echo '<tr><td colspan="' . $colspan . '" class="empty_table">게시물이 없습니다.</td></tr>';
|
||||||
</fieldset>
|
} ?>
|
||||||
<!-- } 게시판 검색 끝 -->
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?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 } ?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 페이지 -->
|
||||||
|
<?php echo $write_pages; ?>
|
||||||
|
|
||||||
|
<!-- 게시판 검색 시작 { -->
|
||||||
|
<fieldset id="bo_sch">
|
||||||
|
<legend>게시물 검색</legend>
|
||||||
|
|
||||||
|
<form name="fsearch" method="get">
|
||||||
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||||
|
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||||
|
<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>
|
||||||
|
</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">
|
||||||
|
<button type="submit" class="ui-btn"><i class="material-icons">search</i></button>
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
<!-- } 게시판 검색 끝 -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if($is_checkbox) { ?>
|
<?php if ($is_checkbox) { ?>
|
||||||
<noscript>
|
<noscript>
|
||||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||||
</noscript>
|
</noscript>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<?php if ($is_checkbox) { ?>
|
<?php if ($is_checkbox) { ?>
|
||||||
<script>
|
<script>
|
||||||
function all_checked(sw) {
|
function all_checked(sw) {
|
||||||
var f = document.fboardlist;
|
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[]")
|
if (f.elements[i].name == "chk_wr_id[]")
|
||||||
f.elements[i].checked = sw;
|
f.elements[i].checked = sw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fboardlist_submit(f) {
|
function fboardlist_submit(f) {
|
||||||
var chk_count = 0;
|
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)
|
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
|
||||||
chk_count++;
|
chk_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chk_count) {
|
if (!chk_count) {
|
||||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(document.pressed == "선택복사") {
|
if (document.pressed == "선택복사") {
|
||||||
select_copy("copy");
|
select_copy("copy");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(document.pressed == "선택이동") {
|
if (document.pressed == "선택이동") {
|
||||||
select_copy("move");
|
select_copy("move");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(document.pressed == "선택삭제") {
|
if (document.pressed == "선택삭제") {
|
||||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
|
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다\n\n답변글이 있는 게시글을 선택하신 경우\n답변글도 선택하셔야 게시글이 삭제됩니다."))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
f.removeAttribute("target");
|
f.removeAttribute("target");
|
||||||
f.action = "./board_list_update.php";
|
f.action = "./board_list_update.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 선택한 게시물 복사 및 이동
|
// 선택한 게시물 복사 및 이동
|
||||||
function select_copy(sw) {
|
function select_copy(sw) {
|
||||||
var f = document.fboardlist;
|
var f = document.fboardlist;
|
||||||
|
|
||||||
if (sw == "copy")
|
if (sw == "copy")
|
||||||
str = "복사";
|
str = "복사";
|
||||||
else
|
else
|
||||||
str = "이동";
|
str = "이동";
|
||||||
|
|
||||||
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
|
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
|
||||||
|
|
||||||
f.sw.value = sw;
|
f.sw.value = sw;
|
||||||
f.target = "move";
|
f.target = "move";
|
||||||
f.action = "./move.php";
|
f.action = "./move.php";
|
||||||
f.submit();
|
f.submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<!-- } 게시판 목록 끝 -->
|
<!-- } 게시판 목록 끝 -->
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1 @@
|
||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,189 +1,180 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
if (!defined("_GNUBOARD_"))
|
||||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
exit; // 개별 페이지 접근 불가
|
||||||
|
include_once(G5_LIB_PATH . '/thumbnail.lib.php');
|
||||||
|
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// 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>
|
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
|
||||||
<article id="bo_v">
|
<article id="bo_v">
|
||||||
|
<?php if ($board['bo_content_head']) { ?>
|
||||||
<?php if($board['bo_content_head']) { ?>
|
<div class="board-notice-box">
|
||||||
<div class="board-notice-box">
|
<?= stripslashes($board['bo_content_head']); ?>
|
||||||
<?=stripslashes($board['bo_content_head']);?>
|
</div>
|
||||||
</div>
|
<?php } ?>
|
||||||
<?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>"; // 글제목 출력
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="board-info">
|
||||||
|
<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++) {
|
||||||
|
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
|
||||||
|
$cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php if ($cnt) { ?>
|
||||||
|
<!-- 첨부파일 시작 { -->
|
||||||
|
<div class="board-file">
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
// 가변 파일
|
||||||
|
for ($i = 0; $i < count($view['file']); $i++) {
|
||||||
|
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||||
|
<img src="<?php echo $board_skin_url ?>/img/icon_file.gif" alt="첨부">
|
||||||
|
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
||||||
|
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||||
|
</a>
|
||||||
|
<span class="bo_v_file_cnt"><?php echo $view['file'][$i]['download'] ?>회 다운로드</span>
|
||||||
|
<span>DATE : <?php echo $view['file'][$i]['datetime'] ?></span>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- } 첨부파일 끝 -->
|
||||||
|
<?php } ?>
|
||||||
|
<div class="board-content">
|
||||||
|
<?php
|
||||||
|
// 파일 출력
|
||||||
|
$v_img_count = count($view['file']);
|
||||||
|
if ($v_img_count) {
|
||||||
|
echo "<div id=\"bo_v_img\">\n";
|
||||||
|
|
||||||
<div class="board-title">
|
for ($i = 0; $i <= count($view['file']); $i++) {
|
||||||
<?php
|
if ($view['file'][$i]['view']) {
|
||||||
if ($category_name) echo "<em>{$view['ca_name']}</em>"; // 분류 출력 끝
|
//echo $view['file'][$i]['view'];
|
||||||
echo "<strong>".cut_str(get_text($view['wr_subject']), 70)."</strong>"; // 글제목 출력
|
echo get_view_thumbnail($view['file'][$i]['view']);
|
||||||
?>
|
}
|
||||||
</div>
|
}
|
||||||
|
|
||||||
<div class="board-info">
|
|
||||||
<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++) {
|
|
||||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
|
|
||||||
$cnt++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if($cnt) { ?>
|
|
||||||
<!-- 첨부파일 시작 { -->
|
|
||||||
<div class="board-file">
|
|
||||||
<ul>
|
|
||||||
<?php
|
|
||||||
// 가변 파일
|
|
||||||
for ($i=0; $i<count($view['file']); $i++) {
|
|
||||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
|
||||||
?>
|
|
||||||
<li>
|
|
||||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
|
||||||
<img src="<?php echo $board_skin_url ?>/img/icon_file.gif" alt="첨부">
|
|
||||||
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
|
||||||
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
|
||||||
</a>
|
|
||||||
<span class="bo_v_file_cnt"><?php echo $view['file'][$i]['download'] ?>회 다운로드</span>
|
|
||||||
<span>DATE : <?php echo $view['file'][$i]['datetime'] ?></span>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<!-- } 첨부파일 끝 -->
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="board-content">
|
|
||||||
<?php
|
|
||||||
// 파일 출력
|
|
||||||
$v_img_count = count($view['file']);
|
|
||||||
if($v_img_count) {
|
|
||||||
echo "<div id=\"bo_v_img\">\n";
|
|
||||||
|
|
||||||
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']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- 링크 버튼 시작 { -->
|
|
||||||
<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 } ?>
|
|
||||||
<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 } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- } 링크 버튼 끝 -->
|
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
<!-- 링크 버튼 시작 { -->
|
||||||
|
<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 } ?>
|
||||||
|
<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 } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- } 링크 버튼 끝 -->
|
||||||
</article>
|
</article>
|
||||||
<!-- } 게시판 읽기 끝 -->
|
<!-- } 게시판 읽기 끝 -->
|
||||||
<script>
|
<script>
|
||||||
<?php if ($board['bo_download_point'] < 0) { ?>
|
<?php if ($board['bo_download_point'] < 0) { ?>
|
||||||
$(function() {
|
$(function () {
|
||||||
$("a.view_file_download").click(function() {
|
$("a.view_file_download").click(function () {
|
||||||
if(!g5_is_member) {
|
if (!g5_is_member) {
|
||||||
alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
|
alert("다운로드 권한이 없습니다.\n회원이시라면 로그인 후 이용해 보십시오.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var msg = "파일을 다운로드 하시면 포인트가 차감(<?php echo number_format($board['bo_download_point']) ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?";
|
var msg = "파일을 다운로드 하시면 포인트가 차감(<?php echo number_format($board['bo_download_point']) ?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?";
|
||||||
|
|
||||||
if(confirm(msg)) {
|
if (confirm(msg)) {
|
||||||
var href = $(this).attr("href")+"&js=on";
|
var href = $(this).attr("href") + "&js=on";
|
||||||
$(this).attr("href", href);
|
$(this).attr("href", href);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
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");
|
||||||
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function () {
|
||||||
$("a.view_image").click(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");
|
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;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 추천, 비추천
|
// 추천, 비추천
|
||||||
$("#good_button, #nogood_button").click(function() {
|
$("#good_button, #nogood_button").click(function () {
|
||||||
var $tx;
|
var $tx;
|
||||||
if(this.id == "good_button")
|
if (this.id == "good_button")
|
||||||
$tx = $("#bo_v_act_good");
|
$tx = $("#bo_v_act_good");
|
||||||
else
|
else
|
||||||
$tx = $("#bo_v_act_nogood");
|
$tx = $("#bo_v_act_nogood");
|
||||||
|
|
||||||
excute_good(this.href, $(this), $tx);
|
excute_good(this.href, $(this), $tx);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 이미지 리사이즈
|
// 이미지 리사이즈
|
||||||
$("#bo_v_atc").viewimageresize();
|
$("#bo_v_atc").viewimageresize();
|
||||||
});
|
});
|
||||||
|
|
||||||
function excute_good(href, $el, $tx)
|
function excute_good(href, $el, $tx) {
|
||||||
{
|
$.post(
|
||||||
$.post(
|
href,
|
||||||
href,
|
{ js: "on" },
|
||||||
{ js: "on" },
|
function (data) {
|
||||||
function(data) {
|
if (data.error) {
|
||||||
if(data.error) {
|
alert(data.error);
|
||||||
alert(data.error);
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(data.count) {
|
if (data.count) {
|
||||||
$el.find("strong").text(number_format(String(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.text("이 글을 비추천하셨습니다.");
|
||||||
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
||||||
} else {
|
} else {
|
||||||
$tx.text("이 글을 추천하셨습니다.");
|
$tx.text("이 글을 추천하셨습니다.");
|
||||||
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
$tx.fadeIn(200).delay(2500).fadeOut(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, "json"
|
}, "json"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<!-- } 게시글 읽기 끝 -->
|
<!-- } 게시글 읽기 끝 -->
|
||||||
|
|
|
||||||
|
|
@ -1,324 +1,328 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
$comment_action_url = https_url(G5_BBS_DIR)."/write_comment_update.php";
|
exit; // 개별 페이지 접근 불가
|
||||||
|
$comment_action_url = https_url(G5_BBS_DIR) . "/write_comment_update.php";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 글자수 제한
|
// 글자수 제한
|
||||||
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
var char_min = parseInt(<?php echo $comment_min ?>); // 최소
|
||||||
var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- 댓글 시작 { -->
|
<!-- 댓글 시작 { -->
|
||||||
<section id="bo_vc">
|
<section id="bo_vc">
|
||||||
<?php
|
<?php
|
||||||
$cmt_amt = count($list);
|
$cmt_amt = count($list);
|
||||||
for ($i=0; $i<$cmt_amt; $i++) {
|
for ($i = 0; $i < $cmt_amt; $i++) {
|
||||||
$comment_id = $list[$i]['wr_id'];
|
$comment_id = $list[$i]['wr_id'];
|
||||||
$cmt_depth = ""; // 댓글단계
|
$cmt_depth = ""; // 댓글단계
|
||||||
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10;
|
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 10;
|
||||||
$comment = $list[$i]['content'];
|
$comment = $list[$i]['content'];
|
||||||
/*
|
/*
|
||||||
if (strstr($list[$i]['wr_option'], "secret")) {
|
if (strstr($list[$i]['wr_option'], "secret")) {
|
||||||
$str = $str;
|
$str = $str;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
|
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
|
||||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
$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"
|
||||||
<header style="z-index:<?php echo $cmt_sv; ?>">
|
style="border-left-width:<?php echo $cmt_depth ?>px;" <?php } ?>>
|
||||||
<?php echo $list[$i]['name'] ?>
|
<header style="z-index:<?php echo $cmt_sv; ?>">
|
||||||
<?php if ($is_ip_view) { ?>
|
<?php echo $list[$i]['name'] ?>
|
||||||
<span class="bo_vc_hdinfo"><?php echo $list[$i]['ip']; ?></span>
|
<?php if ($is_ip_view) { ?>
|
||||||
<?php } ?>
|
<span class="bo_vc_hdinfo"><?php echo $list[$i]['ip']; ?></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 } ?>
|
||||||
<?php
|
<span class="bo_vc_hdinfo"><time
|
||||||
include(G5_SNS_PATH.'/view_comment_list.sns.skin.php');
|
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
|
||||||
</header>
|
include(G5_SNS_PATH . '/view_comment_list.sns.skin.php');
|
||||||
|
?>
|
||||||
|
</header>
|
||||||
|
|
||||||
<!-- 댓글 출력 -->
|
<!-- 댓글 출력 -->
|
||||||
<p>
|
<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
|
||||||
<?php echo $comment ?>
|
src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||||
</p>
|
<?php echo $comment ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
|
<span id="edit_<?php echo $comment_id ?>"></span><!-- 수정 -->
|
||||||
<span id="reply_<?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 ?>">
|
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'], "secret") ?>"
|
||||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
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']);
|
$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' ";
|
$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);
|
$cmt = sql_fetch($sql);
|
||||||
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
if (!($is_admin || ($member['mb_id'] == $cmt['mb_id'] && $cmt['mb_id'])))
|
||||||
$cmt['wr_content'] = '';
|
$cmt['wr_content'] = '';
|
||||||
$c_wr_content = $cmt['wr_content'];
|
$c_wr_content = $cmt['wr_content'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#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';
|
$c_edit_href = './board.php?' . $query_string . '&c_id=' . $comment_id . '&w=cu#bo_vc_w';
|
||||||
?>
|
?>
|
||||||
<footer>
|
<footer>
|
||||||
<ul class="bo_vc_act">
|
<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_reply']) { ?>
|
||||||
<?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 } ?>
|
<li><a href="<?php echo $c_reply_href; ?>"
|
||||||
<?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 } ?>
|
onclick="comment_box('<?php echo $comment_id ?>', 'c'); return false;" class="ui-btn small point">답변</a>
|
||||||
</ul>
|
</li><?php } ?>
|
||||||
</footer>
|
<?php if ($list[$i]['is_edit']) { ?>
|
||||||
<?php } ?>
|
<li><a href="<?php echo $c_edit_href; ?>"
|
||||||
</article>
|
onclick="comment_box('<?php echo $comment_id ?>', 'cu'); return false;" class="ui-btn small etc">수정</a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><?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 } ?>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<!-- } 댓글 끝 -->
|
<!-- } 댓글 끝 -->
|
||||||
|
|
||||||
<?php if ($is_comment_write) {
|
<?php if ($is_comment_write) {
|
||||||
if($w == '')
|
if ($w == '')
|
||||||
$w = 'c';
|
$w = 'c';
|
||||||
?>
|
?>
|
||||||
<!-- 댓글 쓰기 시작 { -->
|
<!-- 댓글 쓰기 시작 { -->
|
||||||
<aside id="bo_vc_w" class="theme-box">
|
<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">
|
<form name="fviewcomment" action="<?php echo $comment_action_url; ?>" onsubmit="return fviewcomment_submit(this);"
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
method="post" autocomplete="off">
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||||
<input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
|
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
<input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||||
<input type="hidden" name="is_good" value="">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="is_good" value="">
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_wrap">
|
<div class="tbl_frm01 tbl_wrap">
|
||||||
<table class="theme-form">
|
<table class="theme-form">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 80px;" />
|
<col style="width: 80px;" />
|
||||||
<col />
|
<col />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php if ($is_guest) { ?>
|
<?php if ($is_guest) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="wr_name">이름<strong class="sound_only"> 필수</strong></label></th>
|
<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
|
||||||
</tr>
|
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>
|
<tr>
|
||||||
<td><input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="10" maxLength="20"></td>
|
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only"> 필수</strong></label></th>
|
||||||
</tr>
|
<td><input type="password" name="wr_password" id="wr_password" required class="frm_input required" size="10"
|
||||||
<?php } ?>
|
maxLength="20"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row"><label for="wr_secret">비밀글</label></th>
|
<?php } ?>
|
||||||
<td><input type="checkbox" name="wr_secret" value="secret" id="wr_secret"></td>
|
<tr>
|
||||||
</tr>
|
<th scope="row"><label for="wr_secret">비밀글</label></th>
|
||||||
<?php if ($is_guest) { ?>
|
<td><input type="checkbox" name="wr_secret" value="secret" id="wr_secret"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<th scope="row">자동등록방지</th>
|
<?php if ($is_guest) { ?>
|
||||||
<td><?php echo $captcha_html; ?></td>
|
<tr>
|
||||||
</tr>
|
<th scope="row">자동등록방지</th>
|
||||||
<?php } ?>
|
<td><?php echo $captcha_html; ?></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<?php } ?>
|
||||||
<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 } ?>
|
|
||||||
<script>
|
|
||||||
$(document).on( "keyup change", "textarea#wr_content[maxlength]", function(){
|
|
||||||
var str = $(this).val()
|
|
||||||
var mx = parseInt($(this).attr("maxlength"))
|
|
||||||
if (str.length > mx) {
|
|
||||||
$(this).val(str.substr(0, mx));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="btn_confirm">
|
<tr>
|
||||||
<button type="submit" id="btn_submit" class="ui-btn">댓글등록</button>
|
<th scope="row">내용</th>
|
||||||
</div>
|
<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 } ?>
|
||||||
|
<script>
|
||||||
|
$(document).on("keyup change", "textarea#wr_content[maxlength]", function () {
|
||||||
|
var str = $(this).val()
|
||||||
|
var mx = parseInt($(this).attr("maxlength"))
|
||||||
|
if (str.length > mx) {
|
||||||
|
$(this).val(str.substr(0, mx));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
<div class="btn_confirm">
|
||||||
</aside>
|
<button type="submit" id="btn_submit" class="ui-btn">댓글등록</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
</form>
|
||||||
var save_before = '';
|
</aside>
|
||||||
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
|
||||||
|
|
||||||
function good_and_write()
|
<script>
|
||||||
{
|
var save_before = '';
|
||||||
var f = document.fviewcomment;
|
var save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||||
if (fviewcomment_submit(f)) {
|
|
||||||
f.is_good.value = 1;
|
|
||||||
f.submit();
|
|
||||||
} else {
|
|
||||||
f.is_good.value = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function fviewcomment_submit(f)
|
function good_and_write() {
|
||||||
{
|
var f = document.fviewcomment;
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
if (fviewcomment_submit(f)) {
|
||||||
|
f.is_good.value = 1;
|
||||||
|
f.submit();
|
||||||
|
} else {
|
||||||
|
f.is_good.value = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
f.is_good.value = 0;
|
function fviewcomment_submit(f) {
|
||||||
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
|
|
||||||
var subject = "";
|
f.is_good.value = 0;
|
||||||
var content = "";
|
|
||||||
$.ajax({
|
|
||||||
url: g5_bbs_url+"/ajax.filter.php",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"subject": "",
|
|
||||||
"content": f.wr_content.value
|
|
||||||
},
|
|
||||||
dataType: "json",
|
|
||||||
async: false,
|
|
||||||
cache: false,
|
|
||||||
success: function(data, textStatus) {
|
|
||||||
subject = data.subject;
|
|
||||||
content = data.content;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (content) {
|
var subject = "";
|
||||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
var content = "";
|
||||||
f.wr_content.focus();
|
$.ajax({
|
||||||
return false;
|
url: g5_bbs_url + "/ajax.filter.php",
|
||||||
}
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"subject": "",
|
||||||
|
"content": f.wr_content.value
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
cache: false,
|
||||||
|
success: function (data, textStatus) {
|
||||||
|
subject = data.subject;
|
||||||
|
content = data.content;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 양쪽 공백 없애기
|
if (content) {
|
||||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||||
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
f.wr_content.focus();
|
||||||
if (char_min > 0 || char_max > 0)
|
return false;
|
||||||
{
|
}
|
||||||
check_byte('wr_content', 'char_count');
|
|
||||||
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
|
||||||
if (char_min > 0 && char_min > cnt)
|
|
||||||
{
|
|
||||||
alert("댓글은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
|
||||||
return false;
|
|
||||||
} else if (char_max > 0 && char_max < cnt)
|
|
||||||
{
|
|
||||||
alert("댓글은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!document.getElementById('wr_content').value)
|
|
||||||
{
|
|
||||||
alert("댓글을 입력하여 주십시오.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof(f.wr_name) != 'undefined')
|
// 양쪽 공백 없애기
|
||||||
{
|
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
|
||||||
if (f.wr_name.value == '')
|
if (char_min > 0 || char_max > 0) {
|
||||||
{
|
check_byte('wr_content', 'char_count');
|
||||||
alert('이름이 입력되지 않았습니다.');
|
var cnt = parseInt(document.getElementById('char_count').innerHTML);
|
||||||
f.wr_name.focus();
|
if (char_min > 0 && char_min > cnt) {
|
||||||
return false;
|
alert("댓글은 " + char_min + "글자 이상 쓰셔야 합니다.");
|
||||||
}
|
return false;
|
||||||
}
|
} else if (char_max > 0 && char_max < cnt) {
|
||||||
|
alert("댓글은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!document.getElementById('wr_content').value) {
|
||||||
|
alert("댓글을 입력하여 주십시오.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof(f.wr_password) != 'undefined')
|
if (typeof (f.wr_name) != 'undefined') {
|
||||||
{
|
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
if (f.wr_name.value == '') {
|
||||||
if (f.wr_password.value == '')
|
alert('이름이 입력되지 않았습니다.');
|
||||||
{
|
f.wr_name.focus();
|
||||||
alert('비밀번호가 입력되지 않았습니다.');
|
return false;
|
||||||
f.wr_password.focus();
|
}
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<?php if($is_guest) echo chk_captcha_js(); ?>
|
if (typeof (f.wr_password) != 'undefined') {
|
||||||
|
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||||
|
if (f.wr_password.value == '') {
|
||||||
|
alert('비밀번호가 입력되지 않았습니다.');
|
||||||
|
f.wr_password.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
set_comment_token(f);
|
<?php if ($is_guest)
|
||||||
|
echo chk_captcha_js(); ?>
|
||||||
|
|
||||||
document.getElementById("btn_submit").disabled = "disabled";
|
set_comment_token(f);
|
||||||
|
|
||||||
return true;
|
document.getElementById("btn_submit").disabled = "disabled";
|
||||||
}
|
|
||||||
|
|
||||||
function comment_box(comment_id, work)
|
return true;
|
||||||
{
|
}
|
||||||
var el_id;
|
|
||||||
// 댓글 아이디가 넘어오면 답변, 수정
|
|
||||||
if (comment_id)
|
|
||||||
{
|
|
||||||
if (work == 'c')
|
|
||||||
el_id = 'reply_' + comment_id;
|
|
||||||
else
|
|
||||||
el_id = 'edit_' + comment_id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
el_id = 'bo_vc_w';
|
|
||||||
|
|
||||||
if (save_before != el_id)
|
function comment_box(comment_id, work) {
|
||||||
{
|
var el_id;
|
||||||
if (save_before)
|
// 댓글 아이디가 넘어오면 답변, 수정
|
||||||
{
|
if (comment_id) {
|
||||||
document.getElementById(save_before).style.display = 'none';
|
if (work == 'c')
|
||||||
document.getElementById(save_before).innerHTML = '';
|
el_id = 'reply_' + comment_id;
|
||||||
}
|
else
|
||||||
|
el_id = 'edit_' + comment_id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
el_id = 'bo_vc_w';
|
||||||
|
|
||||||
document.getElementById(el_id).style.display = '';
|
if (save_before != el_id) {
|
||||||
document.getElementById(el_id).innerHTML = save_html;
|
if (save_before) {
|
||||||
// 댓글 수정
|
document.getElementById(save_before).style.display = 'none';
|
||||||
if (work == 'cu')
|
document.getElementById(save_before).innerHTML = '';
|
||||||
{
|
}
|
||||||
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)
|
|
||||||
document.getElementById('wr_secret').checked = true;
|
|
||||||
else
|
|
||||||
document.getElementById('wr_secret').checked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById('comment_id').value = comment_id;
|
document.getElementById(el_id).style.display = '';
|
||||||
document.getElementById('w').value = work;
|
document.getElementById(el_id).innerHTML = save_html;
|
||||||
|
// 댓글 수정
|
||||||
|
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)
|
||||||
|
document.getElementById('wr_secret').checked = true;
|
||||||
|
else
|
||||||
|
document.getElementById('wr_secret').checked = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(save_before)
|
document.getElementById('comment_id').value = comment_id;
|
||||||
$("#captcha_reload").trigger("click");
|
document.getElementById('w').value = work;
|
||||||
|
|
||||||
save_before = el_id;
|
if (save_before)
|
||||||
}
|
$("#captcha_reload").trigger("click");
|
||||||
}
|
|
||||||
|
|
||||||
function comment_delete()
|
save_before = el_id;
|
||||||
{
|
}
|
||||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
}
|
||||||
}
|
|
||||||
|
|
||||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
function comment_delete() {
|
||||||
|
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||||
|
}
|
||||||
|
|
||||||
<?php if($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||||
// sns 등록
|
|
||||||
$(function() {
|
<?php if ($board['bo_use_sns'] && ($config['cf_facebook_appid'] || $config['cf_twitter_key'])) { ?>
|
||||||
$("#bo_vc_send_sns").load(
|
// sns 등록
|
||||||
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
|
$(function () {
|
||||||
function() {
|
$("#bo_vc_send_sns").load(
|
||||||
save_html = document.getElementById('bo_vc_w').innerHTML;
|
"<?php echo G5_SNS_URL; ?>/view_comment_write.sns.skin.php?bo_table=<?php echo $bo_table; ?>",
|
||||||
}
|
function () {
|
||||||
);
|
save_html = document.getElementById('bo_vc_w').innerHTML;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</script>
|
<!-- } 댓글 쓰기 끝 -->
|
||||||
<?php } ?>
|
|
||||||
<!-- } 댓글 쓰기 끝 -->
|
|
||||||
|
|
|
||||||
|
|
@ -1,266 +1,278 @@
|
||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_'))
|
||||||
|
exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// 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">
|
<section id="bo_w">
|
||||||
|
|
||||||
<?php if($board['bo_content_head']) { ?>
|
|
||||||
<div class="board-notice-box">
|
|
||||||
<?=stripslashes($board['bo_content_head']);?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<!-- 게시물 작성/수정 시작 { -->
|
<?php if ($board['bo_content_head']) { ?>
|
||||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
<div class="board-notice-box">
|
||||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
<?= stripslashes($board['bo_content_head']); ?>
|
||||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
</div>
|
||||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
<?php } ?>
|
||||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
|
||||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
|
||||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
|
||||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
|
||||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
|
||||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
|
||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
|
||||||
<?php
|
|
||||||
$option = '';
|
|
||||||
$option_hidden = '';
|
|
||||||
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>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($is_html) {
|
<!-- 게시물 작성/수정 시작 { -->
|
||||||
if ($is_dhtml_editor) {
|
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);"
|
||||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
} else {
|
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||||
$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>';
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
}
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||||
}
|
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||||
|
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<?php
|
||||||
|
$option = '';
|
||||||
|
$option_hidden = '';
|
||||||
|
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>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($is_secret) {
|
if ($is_html) {
|
||||||
if ($is_admin || $is_secret==1) {
|
if ($is_dhtml_editor) {
|
||||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||||
} else {
|
} else {
|
||||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
$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_mail) {
|
if ($is_secret) {
|
||||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</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">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo $option_hidden;
|
if ($is_mail) {
|
||||||
?>
|
$option .= "\n" . '<input type="checkbox" id="mail" name="mail" value="mail" ' . $recv_email_checked . '>' . "\n" . '<label for="mail">답변메일받기</label>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<table class="theme-form">
|
echo $option_hidden;
|
||||||
<colgroup>
|
?>
|
||||||
<col style="width: 100px;" />
|
|
||||||
<col />
|
|
||||||
</colgroup>
|
|
||||||
<tbody>
|
|
||||||
<?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>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($is_password) { ?>
|
<table class="theme-form">
|
||||||
<tr>
|
<colgroup>
|
||||||
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only">필수</strong></label></th>
|
<col style="width: 100px;" />
|
||||||
<td><input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
|
<col />
|
||||||
</tr>
|
</colgroup>
|
||||||
<?php } ?>
|
<tbody>
|
||||||
|
<?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>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($is_email) { ?>
|
<?php if ($is_password) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="wr_email">이메일</label></th>
|
<th scope="row"><label for="wr_password">비밀번호<strong class="sound_only">필수</strong></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="password" name="wr_password" id="wr_password" <?php echo $password_required ?>
|
||||||
</tr>
|
class="frm_input <?php echo $password_required ?>" maxlength="20"></td>
|
||||||
<?php } ?>
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($is_homepage) { ?>
|
<?php if ($is_email) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
|
<th scope="row"><label for="wr_email">이메일</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_email" value="<?php echo $email ?>" id="wr_email" class="frm_input email"
|
||||||
</tr>
|
size="50" maxlength="100"></td>
|
||||||
<?php } ?>
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($option) { ?>
|
<?php if ($is_homepage) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">옵션</th>
|
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
|
||||||
<td><?php echo $option ?></td>
|
<td><input type="text" name="wr_homepage" value="<?php echo $homepage ?>" id="wr_homepage" class="frm_input"
|
||||||
</tr>
|
size="50"></td>
|
||||||
<?php } ?>
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($is_category) { ?>
|
<?php if ($option) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>
|
<th scope="row">옵션</th>
|
||||||
<td>
|
<td><?php echo $option ?></td>
|
||||||
<select name="ca_name" id="ca_name" required class="required" >
|
</tr>
|
||||||
<option value="">선택하세요</option>
|
<?php } ?>
|
||||||
<?php echo $category_option ?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<tr>
|
<?php if ($is_category) { ?>
|
||||||
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
|
<tr>
|
||||||
<td>
|
<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>
|
||||||
<div id="autosave_wrapper">
|
<td>
|
||||||
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
|
<select name="ca_name" id="ca_name" required class="required">
|
||||||
</div>
|
<option value="">선택하세요</option>
|
||||||
</td>
|
<?php echo $category_option ?>
|
||||||
</tr>
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||||
<td class="wr_content">
|
<td>
|
||||||
<?php if($write_min || $write_max) { ?>
|
<div id="autosave_wrapper">
|
||||||
<!-- 최소/최대 글자 수 사용 시 -->
|
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required
|
||||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
class="frm_input required" size="50" maxlength="255">
|
||||||
<?php } ?>
|
</div>
|
||||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
</td>
|
||||||
<?php if($write_min || $write_max) { ?>
|
</tr>
|
||||||
<!-- 최소/최대 글자 수 사용 시 -->
|
|
||||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
|
||||||
<?php } ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php /*for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
<tr>
|
||||||
<tr>
|
<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||||
<th scope="row"><label for="wr_link<?php echo $i ?>">링크 #<?php echo $i ?></label></th>
|
<td class="wr_content">
|
||||||
<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>
|
<?php if ($write_min || $write_max) { ?>
|
||||||
</tr>
|
<!-- 최소/최대 글자 수 사용 시 -->
|
||||||
<?php }*/ ?>
|
<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) { ?>
|
||||||
|
<!-- 최소/최대 글자 수 사용 시 -->
|
||||||
|
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
|
<?php /*for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">파일 #<?php echo $i+1 ?></th>
|
<th scope="row"><label for="wr_link<?php echo $i ?>">링크 #<?php echo $i ?></label></th>
|
||||||
<td>
|
<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>
|
||||||
<input type="file" name="bf_file[]" title="파일첨부 <?php echo $i+1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input">
|
</tr>
|
||||||
<?php if ($is_file_content) { ?>
|
<?php }*/ ?>
|
||||||
<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 } ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php if ($is_guest) { //자동등록방지 ?>
|
<?php for ($i = 0; $is_file && $i < $file_count; $i++) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">자동등록방지</th>
|
<th scope="row">파일 #<?php echo $i + 1 ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $captcha_html ?>
|
<input type="file" name="bf_file[]"
|
||||||
</td>
|
title="파일첨부 <?php echo $i + 1 ?> : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
|
||||||
</tr>
|
class="frm_file frm_input">
|
||||||
<?php } ?>
|
<?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">
|
||||||
|
<?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 } ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</tbody>
|
<?php if ($is_guest) { //자동등록방지 ?>
|
||||||
</table>
|
<tr>
|
||||||
|
<th scope="row">자동등록방지</th>
|
||||||
|
<td>
|
||||||
|
<?php echo $captcha_html ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div class="btn_confirm">
|
</tbody>
|
||||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn point"><i class="material-icons">edit</i> 작성</button>
|
</table>
|
||||||
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="ui-btn"><i class="material-icons">list</i> 목록</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script>
|
<div class="btn_confirm">
|
||||||
<?php if($write_min || $write_max) { ?>
|
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn point"><i class="material-icons">edit</i>
|
||||||
// 글자수 제한
|
작성</button>
|
||||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
<a href="./board.php?bo_table=<?php echo $bo_table ?>" class="ui-btn"><i class="material-icons">list</i> 목록</a>
|
||||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
</div>
|
||||||
check_byte("wr_content", "char_count");
|
</form>
|
||||||
|
|
||||||
$(function() {
|
<script>
|
||||||
$("#wr_content").on("keyup", function() {
|
<?php if ($write_min || $write_max) { ?>
|
||||||
check_byte("wr_content", "char_count");
|
// 글자수 제한
|
||||||
});
|
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||||
});
|
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||||
|
check_byte("wr_content", "char_count");
|
||||||
|
|
||||||
<?php } ?>
|
$(function () {
|
||||||
function html_auto_br(obj)
|
$("#wr_content").on("keyup", function () {
|
||||||
{
|
check_byte("wr_content", "char_count");
|
||||||
if (obj.checked) {
|
});
|
||||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
});
|
||||||
if (result)
|
|
||||||
obj.value = "html2";
|
|
||||||
else
|
|
||||||
obj.value = "html1";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
obj.value = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function fwrite_submit(f)
|
<?php } ?>
|
||||||
{
|
function html_auto_br(obj) {
|
||||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
if (obj.checked) {
|
||||||
|
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||||
|
if (result)
|
||||||
|
obj.value = "html2";
|
||||||
|
else
|
||||||
|
obj.value = "html1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
obj.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
var subject = "";
|
function fwrite_submit(f) {
|
||||||
var content = "";
|
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||||
$.ajax({
|
|
||||||
url: g5_bbs_url+"/ajax.filter.php",
|
|
||||||
type: "POST",
|
|
||||||
data: {
|
|
||||||
"subject": f.wr_subject.value,
|
|
||||||
"content": f.wr_content.value
|
|
||||||
},
|
|
||||||
dataType: "json",
|
|
||||||
async: false,
|
|
||||||
cache: false,
|
|
||||||
success: function(data, textStatus) {
|
|
||||||
subject = data.subject;
|
|
||||||
content = data.content;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (subject) {
|
var subject = "";
|
||||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
var content = "";
|
||||||
f.wr_subject.focus();
|
$.ajax({
|
||||||
return false;
|
url: g5_bbs_url + "/ajax.filter.php",
|
||||||
}
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"subject": f.wr_subject.value,
|
||||||
|
"content": f.wr_content.value
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
cache: false,
|
||||||
|
success: function (data, textStatus) {
|
||||||
|
subject = data.subject;
|
||||||
|
content = data.content;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (content) {
|
if (subject) {
|
||||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
alert("제목에 금지단어('" + subject + "')가 포함되어있습니다");
|
||||||
if (typeof(ed_wr_content) != "undefined")
|
f.wr_subject.focus();
|
||||||
ed_wr_content.returnFalse();
|
return false;
|
||||||
else
|
}
|
||||||
f.wr_content.focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.getElementById("char_count")) {
|
if (content) {
|
||||||
if (char_min > 0 || char_max > 0) {
|
alert("내용에 금지단어('" + content + "')가 포함되어있습니다");
|
||||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
if (typeof (ed_wr_content) != "undefined")
|
||||||
if (char_min > 0 && char_min > cnt) {
|
ed_wr_content.returnFalse();
|
||||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
else
|
||||||
return false;
|
f.wr_content.focus();
|
||||||
}
|
return false;
|
||||||
else if (char_max > 0 && char_max < cnt) {
|
}
|
||||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
if (document.getElementById("char_count")) {
|
||||||
|
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 + "글자 이상 쓰셔야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (char_max > 0 && char_max < cnt) {
|
||||||
|
alert("내용은 " + char_max + "글자 이하로 쓰셔야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById("btn_submit").disabled = "disabled";
|
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
|
||||||
|
|
||||||
return true;
|
document.getElementById("btn_submit").disabled = "disabled";
|
||||||
}
|
|
||||||
</script>
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</section>
|
</section>
|
||||||
<!-- } 게시물 작성/수정 끝 -->
|
<!-- } 게시물 작성/수정 끝 -->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue