update site config

This commit is contained in:
Amberstone 2024-10-10 06:19:31 +09:00
parent e1559044d8
commit d6d00a5de2
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
8 changed files with 205 additions and 181 deletions

View file

@ -51,7 +51,7 @@ $menu["config"]->addChildMenu("config", "애드온 설정", G5_ADMIN_URL . "/add
$menu["config"]->addChildMenu("config", "홈페이지 상세관리", G5_ADMIN_URL . "/config_form.php", true, 1000, "\F3E5", 0); $menu["config"]->addChildMenu("config", "홈페이지 상세관리", G5_ADMIN_URL . "/config_form.php", true, 1000, "\F3E5", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/config_form_update.php"); $menu["config"]->getLastAddedMenu()->addSubFile("/config_form_update.php");
if (Community::isInitCommunity()) { if ($config["cf_community"] && Community::isInitCommunity()) {
$menu["config"]->addChildMenu("config", "메인슬라이드 관리", G5_ADMIN_URL . "/banner_list.php", true, 700, "\F66D", 0); $menu["config"]->addChildMenu("config", "메인슬라이드 관리", G5_ADMIN_URL . "/banner_list.php", true, 700, "\F66D", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/banner_form.php"); $menu["config"]->getLastAddedMenu()->addSubFile("/banner_form.php");

View file

@ -43,7 +43,7 @@ $menu["member"]->getLastAddedMenu()->addSubFile("/visit_year.php");
$menu["member"]->addChildMenu("member", "투표관리", G5_ADMIN_URL . "/poll_list.php", true, 500, "\F5F9", 0); $menu["member"]->addChildMenu("member", "투표관리", G5_ADMIN_URL . "/poll_list.php", true, 500, "\F5F9", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/poll_form.php"); $menu["member"]->getLastAddedMenu()->addSubFile("/poll_form.php");
if (Community::isInitCommunity()) { if ($config["cf_community"] && Community::isInitCommunity()) {
$menu["member"]->addChildMenu("member", "접속자검색", G5_ADMIN_URL . "/visit_search.php", true, 300, "\F52A", 0); $menu["member"]->addChildMenu("member", "접속자검색", G5_ADMIN_URL . "/visit_search.php", true, 300, "\F52A", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_delete_update.php"); $menu["member"]->getLastAddedMenu()->addSubFile("/visit_delete_update.php");

View file

@ -47,7 +47,7 @@ $menu["content"]->addChildMenu("content", "이모티콘 관리", G5_ADMIN_URL .
$menu["content"]->getLastAddedMenu()->addSubFile("/emoticon_list_update.php"); $menu["content"]->getLastAddedMenu()->addSubFile("/emoticon_list_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/emoticon_form_update.php"); $menu["content"]->getLastAddedMenu()->addSubFile("/emoticon_form_update.php");
if (Community::isInitCommunity()) { if ($config["cf_community"] && Community::isInitCommunity()) {
$menu["content"]->addChildMenu("content", "인기 검색어 관리", G5_ADMIN_URL . "/popular_list.php", true, 110, "\F52A", 0); $menu["content"]->addChildMenu("content", "인기 검색어 관리", G5_ADMIN_URL . "/popular_list.php", true, 110, "\F52A", 0);
$menu["content"]->addChildMenu("content", "인기 검색어 순위", G5_ADMIN_URL . "/popular_rank.php", true, 120, "\F52A", 0); $menu["content"]->addChildMenu("content", "인기 검색어 순위", G5_ADMIN_URL . "/popular_rank.php", true, 120, "\F52A", 0);

View file

@ -22,7 +22,7 @@ $menu["community"]->getLastAddedMenu()->addSubFile("/{your_subfile_name}.php");
if (!isset($menu["community"])) { if (!isset($menu["community"])) {
$menu["community"] = new MenuCategory("community", "community", "커뮤니티 설정", "", true, 400, "", 0); $menu["community"] = new MenuCategory("community", "community", "커뮤니티 설정", "", true, 400, "", 0);
if (Community::isInitCommunity()) { if ($config["cf_community"] && Community::isInitCommunity()) {
$menu["character"] = new MenuCategory("community", "community", "캐릭터 관리", "", true, 401, "", 0); $menu["character"] = new MenuCategory("community", "community", "캐릭터 관리", "", true, 401, "", 0);
$menu["item"] = new MenuCategory("community", "community", "아이템 관리", "", true, 402, "", 0); $menu["item"] = new MenuCategory("community", "community", "아이템 관리", "", true, 402, "", 0);
} }
@ -30,7 +30,7 @@ if (!isset($menu["community"])) {
$menu["community"]->addChildMenu("community", "커뮤니티 설정", G5_ADMIN_URL . "/community_form.php", true, 0, "\F3B3", 0); $menu["community"]->addChildMenu("community", "커뮤니티 설정", G5_ADMIN_URL . "/community_form.php", true, 0, "\F3B3", 0);
if (Community::isInitCommunity()) { if ($config["cf_community"] && Community::isInitCommunity()) {
$menu["community"]->addChildMenu("community", "프로필 양식 관리", G5_ADMIN_URL . "/character_article_list.php", true, 100, "\F3B7", 0); $menu["community"]->addChildMenu("community", "프로필 양식 관리", G5_ADMIN_URL . "/character_article_list.php", true, 100, "\F3B7", 0);
$menu["item"]->addChildMenu("item", "상점 관리", G5_ADMIN_URL . "/shop_list.php", true, 0, "\F184", 0); $menu["item"]->addChildMenu("item", "상점 관리", G5_ADMIN_URL . "/shop_list.php", true, 0, "\F184", 0);

View file

@ -23,7 +23,7 @@ $frm_submit = '<div class="list_confirm">
$is_community_init = Community::isInitCommunity(); $is_community_init = Community::isInitCommunity();
if (!$is_community_init) { if (!$config["cf_community"] || !$is_community_init) {
$pg_anchor = '<ul class="anchor"> $pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">DB확인</a></li> <li><a href="#anc_001">DB확인</a></li>
</ul>'; </ul>';
@ -40,7 +40,7 @@ if (!$is_community_init) {
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" <form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);"
enctype="multipart/form-data"> enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token"> <input type="hidden" name="token" value="" id="token">
<?php if(!$is_community_init) { ?> <?php if(!$config["cf_community"] || !$is_community_init) { ?>
<section id="anc_001"> <section id="anc_001">
<h2 class="h2_frm">커뮤니티 DB 확인</h2> <h2 class="h2_frm">커뮤니티 DB 확인</h2>
<?php echo $pg_anchor ?> <?php echo $pg_anchor ?>
@ -67,9 +67,16 @@ if (!$is_community_init) {
?> ?>
</tbody> </tbody>
</table> </table>
<?php if (!$is_community_init) {?>
<div class="list_confirm"> <div class="list_confirm">
<a href="./_create_community_db.php">DB TABLE 생성</a> <a href="./_create_community_db.php">DB TABLE 생성</a>
</div> </div>
<?php } ?>
<?php if (!$config["cf_community"]) {?>
<div class="local_desc02 local_desc">
<p>현재 커뮤니티 기능 사용 설정이 미사용으로 되어 있어 설정이 출력되지 않습니다.</p>
</div>
<?php } ?>
</div> </div>
</section> </section>
<?php } else {?> <?php } else {?>

View file

@ -1,64 +1,77 @@
<?php <?php
include_once "./_common.php"; include_once "./_common.php";
function config_exists($key, $not_exists_callback, $exists_callback = null)
{
global $config;
if (!isset($config[$key])) {
$not_exists_callback();
} else {
if (isset($exists_callback)) {
$exists_callback();
}
}
}
auth_check($auth[$sub_menu], 'r'); auth_check($auth[$sub_menu], 'r');
if ($is_admin != 'super') if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.'); alert('최고관리자만 접근 가능합니다.');
config_exists("cf_use_http", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` ADD `cf_use_http` INT(11) NOT NULL DEFAULT '0' AFTER `cf_10` ", true);
});
if (!isset($config['cf_use_http'])) { config_exists("cf_add_script", function () use ($g5) {
sql_query(" ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}` ADD `cf_add_script` TEXT NOT NULL AFTER `cf_admin_email_name` ", true);
ADD `cf_use_http` INT(11) NOT NULL DEFAULT '0' AFTER `cf_10` ", true); });
}
if (!isset($config['cf_add_script'])) { config_exists("cf_mobile_new_skin", function () use ($g5) {
sql_query(" ALTER TABLE `{$g5['config_table']}`
ADD `cf_add_script` TEXT NOT NULL AFTER `cf_admin_email_name` ", true);
}
if (!isset($config['cf_mobile_new_skin'])) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_mobile_new_skin` VARCHAR(255) NOT NULL AFTER `cf_memo_send_point`, ADD `cf_mobile_new_skin` VARCHAR(255) NOT NULL AFTER `cf_memo_send_point`,
ADD `cf_mobile_search_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_new_skin`, ADD `cf_mobile_search_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_new_skin`,
ADD `cf_mobile_connect_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_search_skin`, ADD `cf_mobile_connect_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_search_skin`,
ADD `cf_mobile_member_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_connect_skin` ", true); ADD `cf_mobile_member_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_connect_skin` ", true);
} });
if (isset($config['cf_gcaptcha_mp3'])) { // migrate older captcha
sql_query(" ALTER TABLE `{$g5['config_table']}` config_exists("cf_gcaptcha_mp3", function () {
CHANGE `cf_gcaptcha_mp3` `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' ", true); // currently here is empty
} else if (!isset($config['cf_captcha_mp3'])) { }, function () use ($g5) {
sql_query(" ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}` CHANGE `cf_gcaptcha_mp3` `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' ", true);
ADD `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_mobile_member_skin` ", true); });
}
if (!isset($config['cf_editor'])) { config_exists("cf_captcha_mp3", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` ADD `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_mobile_member_skin` ", true);
});
config_exists("cf_editor", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_editor` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_captcha_mp3` ", true); ADD `cf_editor` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_captcha_mp3` ", true);
} });
if (!isset($config['cf_googl_shorturl_apikey'])) { config_exists("cf_googl_shorturl_apikey", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_googl_shorturl_apikey` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_captcha_mp3` ", true); ADD `cf_googl_shorturl_apikey` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_captcha_mp3` ", true);
} });
if (!isset($config['cf_mobile_pages'])) { config_exists("cf_mobile_pages", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_mobile_pages` INT(11) NOT NULL DEFAULT '0' AFTER `cf_write_pages` ", true); ADD `cf_mobile_pages` INT(11) NOT NULL DEFAULT '0' AFTER `cf_write_pages` ", true);
sql_query("UPDATE `{$g5['config_table']}` SET cf_mobile_pages = '5' ", true); sql_query("UPDATE `{$g5['config_table']}` SET cf_mobile_pages = '5' ", true);
} });
if (!isset($config['cf_facebook_appid'])) { config_exists("cf_facebook_appid", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_googl_shorturl_apikey`, ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_googl_shorturl_apikey`,
ADD `cf_facebook_secret` VARCHAR(255) NOT NULL AFTER `cf_facebook_appid`, ADD `cf_facebook_secret` VARCHAR(255) NOT NULL AFTER `cf_facebook_appid`,
ADD `cf_twitter_key` VARCHAR(255) NOT NULL AFTER `cf_facebook_secret`, ADD `cf_twitter_key` VARCHAR(255) NOT NULL AFTER `cf_facebook_secret`,
ADD `cf_twitter_secret` VARCHAR(255) NOT NULL AFTER `cf_twitter_key` ", true); ADD `cf_twitter_secret` VARCHAR(255) NOT NULL AFTER `cf_twitter_key` ", true);
} });
// uniqid 테이블이 없을 경우 생성 // uniqid 테이블이 없을 경우 생성
if (!sql_query(" DESC {$g5['uniqid_table']} ", false)) { if (!sql_table_exists($g5['uniqid_table'])) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['uniqid_table']}` ( sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['uniqid_table']}` (
`uq_id` bigint(20) unsigned NOT NULL, `uq_id` bigint(20) unsigned NOT NULL,
`uq_ip` varchar(255) NOT NULL, `uq_ip` varchar(255) NOT NULL,
@ -71,7 +84,7 @@ if (!sql_query("SELECT uq_ip FROM {$g5['uniqid_table']} limit 1 ", false)) {
} }
// 임시저장 테이블이 없을 경우 생성 // 임시저장 테이블이 없을 경우 생성
if (!sql_query(" DESC {$g5['autosave_table']} ", false)) { if (!sql_table_exists($g5['autosave_table'])) {
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['autosave_table']}` ( sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['autosave_table']}` (
`as_id` int(11) NOT NULL AUTO_INCREMENT, `as_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(20) NOT NULL, `mb_id` varchar(20) NOT NULL,
@ -85,17 +98,17 @@ if (!sql_query(" DESC {$g5['autosave_table']} ", false)) {
) ", false); ) ", false);
} }
if (!isset($config['cf_admin_email'])) { config_exists("cf_admin_email", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_admin_email` VARCHAR(255) NOT NULL AFTER `cf_admin` ", true); ADD `cf_admin_email` VARCHAR(255) NOT NULL AFTER `cf_admin` ", true);
} });
if (!isset($config['cf_admin_email_name'])) { config_exists("cf_admin_email_name", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_admin_email_name` VARCHAR(255) NOT NULL AFTER `cf_admin_email` ", true); ADD `cf_admin_email_name` VARCHAR(255) NOT NULL AFTER `cf_admin_email` ", true);
} });
if (!isset($config['cf_cert_use'])) { config_exists("cf_cert_use", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `cf_editor`, ADD `cf_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `cf_editor`,
ADD `cf_cert_ipin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_use`, ADD `cf_cert_ipin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_use`,
@ -118,82 +131,88 @@ if (!isset($config['cf_cert_use'])) {
PRIMARY KEY (`cr_id`), PRIMARY KEY (`cr_id`),
KEY `mb_id` (`mb_id`) KEY `mb_id` (`mb_id`)
)", true); )", true);
} });
if (!isset($config['cf_analytics'])) { config_exists("cf_analytics", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_analytics` TEXT NOT NULL AFTER `cf_intercept_ip` ", true); ADD `cf_analytics` TEXT NOT NULL AFTER `cf_intercept_ip` ", true);
} });
if (!isset($config['cf_add_meta'])) { config_exists("cf_add_meta", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_add_meta` TEXT NOT NULL AFTER `cf_analytics` ", true); ADD `cf_add_meta` TEXT NOT NULL AFTER `cf_analytics` ", true);
} });
if (!isset($config['cf_syndi_token'])) { config_exists("cf_syndi_token", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_syndi_token` VARCHAR(255) NOT NULL AFTER `cf_add_meta` ", true); ADD `cf_syndi_token` VARCHAR(255) NOT NULL AFTER `cf_add_meta` ", true);
} });
if (!isset($config['cf_syndi_except'])) { config_exists("cf_syndi_except", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_syndi_except` TEXT NOT NULL AFTER `cf_syndi_token` ", true); ADD `cf_syndi_except` TEXT NOT NULL AFTER `cf_syndi_token` ", true);
} });
if (!isset($config['cf_sms_use'])) { config_exists("cf_sms_use", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_sms_use` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_limit`, ADD `cf_sms_use` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_limit`,
ADD `cf_icode_id` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use`, ADD `cf_icode_id` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use`,
ADD `cf_icode_pw` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_id`, ADD `cf_icode_pw` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_id`,
ADD `cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_pw`, ADD `cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_pw`,
ADD `cf_icode_server_port` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_server_ip` ", true); ADD `cf_icode_server_port` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_server_ip` ", true);
} });
if (!isset($config['cf_mobile_page_rows'])) { config_exists("cf_mobile_page_rows", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_mobile_page_rows` int(11) NOT NULL DEFAULT '0' AFTER `cf_page_rows` ", true); ADD `cf_mobile_page_rows` int(11) NOT NULL DEFAULT '0' AFTER `cf_page_rows` ", true);
} });
if (!isset($config['cf_cert_req'])) { config_exists("cf_cert_req", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_cert_req` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_cert_limit` ", true); ADD `cf_cert_req` tinyint(4) NOT NULL DEFAULT '0' AFTER `cf_cert_limit` ", true);
} });
if (!isset($config['cf_faq_skin'])) { config_exists("cf_faq_skin", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_connect_skin`, ADD `cf_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_connect_skin`,
ADD `cf_mobile_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_mobile_connect_skin` ", true); ADD `cf_mobile_faq_skin` varchar(255) NOT NULL DEFAULT '' AFTER `cf_mobile_connect_skin` ", true);
} });
config_exists("cf_lg_mid", function () use ($g5) {
// LG유플러스 본인확인 필드 추가 // LG유플러스 본인확인 필드 추가
if (!isset($config['cf_lg_mid'])) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_lg_mid` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_kcp_cd`, ADD `cf_lg_mid` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_kcp_cd`,
ADD `cf_lg_mert_key` varchar(255) NOT NULL DEFAULT '' AFTER `cf_lg_mid` ", true); ADD `cf_lg_mert_key` varchar(255) NOT NULL DEFAULT '' AFTER `cf_lg_mid` ", true);
} });
if (!isset($config['cf_optimize_date'])) { config_exists("cf_optimize_date", function () use ($g5) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_optimize_date` date NOT NULL default '0000-00-00' AFTER `cf_popular_del` ", true); ADD `cf_optimize_date` date NOT NULL default '1970-01-01' AFTER `cf_popular_del` ", true);
} });
config_exists("cf_kakao_js_apikey", function () use ($g5) {
// 카카오톡링크 api 키 // 카카오톡링크 api 키
if (!isset($config['cf_kakao_js_apikey'])) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_kakao_js_apikey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_googl_shorturl_apikey` ", true); ADD `cf_kakao_js_apikey` varchar(255) NOT NULL DEFAULT '' AFTER `cf_googl_shorturl_apikey` ", true);
} });
config_exists("cf_sms_type", function () use ($g5) {
// SMS 전송유형 필드 추가 // SMS 전송유형 필드 추가
if (!isset($config['cf_sms_type'])) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_sms_type` varchar(10) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true); ADD `cf_sms_type` varchar(10) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true);
} });
config_exists("cf_cursor", function () use ($g5) {
// 커서 등록 추가 // 커서 등록 추가
if (!isset($config['cf_cursor'])) {
sql_query("ALTER TABLE `{$g5['config_table']}` sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_cursor` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true); ADD `cf_cursor` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true);
} });
config_exists("cf_community", function () use ($g5) {
// add community config
sql_query("ALTER TABLE `{$g5['config_table']}`
ADD `cf_community` TINYINT(4) NOT NULL DEFAULT '0' AFTER `cf_rank_name` ", true);
});
// 접속자 정보 필드 추가 // 접속자 정보 필드 추가
if (!sql_query("SELECT vi_browser FROM {$g5['visit_table']} limit 1 ")) { if (!sql_query("SELECT vi_browser FROM {$g5['visit_table']} limit 1 ")) {
@ -226,29 +245,25 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']); $userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
} }
?> ?>
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);" <form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);"
enctype="multipart/form-data"> enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token"> <input type="hidden" name="token" value="" id="token">
<div class="btn_confirm"> <div class="btn_confirm">
<div class="btn"> <div class="btn">
<span class="material-icons">save</span> <span class="material-icons">save</span>
<input type="submit" value="저장" class="btn_submit" accesskey="s"> <input type="submit" value="저장" class="btn_submit" accesskey="s">
</div> </div>
</div> </div>
<section id="anc_001"> <section id="anc_001">
<h2 class="h2_frm">홈페이지 기본환경 설정</h2> <h2 class="h2_frm">홈페이지 기본환경 설정</h2>
<?php echo $pg_anchor ?> <?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap"> <div class="tbl_frm01 tbl_wrap">
<table> <table>
<caption>홈페이지 기본환경 설정</caption> <caption>홈페이지 기본환경 설정</caption>
<colgroup> <colgroup>
<col style="width:150px;"> <col class="grid_4">
<col style="width:400px;"> <col class="grid_10">
<col style="width:150px;"> <col class="grid_4">
<col> <col>
</colgroup> </colgroup>
<tbody> <tbody>
@ -266,13 +281,22 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</tr> </tr>
<tr> <tr>
<th scope="row">홈페이지 제목</th> <th scope="row">홈페이지 제목</th>
<td><input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required <td>
class="required" size="40"></td> <input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required
class="required" size="40">
</td>
<th>사이트설명</th> <th>사이트설명</th>
<td> <td>
<input type="text" name="cf_site_descript" value="<?php echo $config['cf_site_descript'] ?>" size="50" /> <input type="text" name="cf_site_descript" value="<?php echo $config['cf_site_descript'] ?>" size="50" />
</td> </td>
</tr> </tr>
<tr>
<th>커뮤니티 기능 사용</th>
<td colspan="3">
<?php echo help('데이터베이스를 설정했더라도 사용하지 않음 상태인 경우 관련 메뉴가 출력되지 않습니다.') ?>
<input type="checkbox" name="cf_community" value="1" id="cf_community" <?php echo $config['cf_community'] ? 'checked' : ''; ?>>
</td>
</tr>
<tr> <tr>
<th>파비콘</th> <th>파비콘</th>
<td colspan="3"> <td colspan="3">
@ -301,7 +325,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
외부경로&nbsp;&nbsp; <input type="text" name="cf_site_img" value="<?= $config['cf_site_img'] ?>" size="50" /> 외부경로&nbsp;&nbsp; <input type="text" name="cf_site_img" value="<?= $config['cf_site_img'] ?>" size="50" />
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="site_back">배경음악</label></th> <th scope="row"><label for="site_back">배경음악</label></th>
<td colspan="3"> <td colspan="3">
@ -337,23 +360,20 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table> </table>
</div> </div>
</section> </section>
<?php echo $frm_submit; ?> <?php echo $frm_submit; ?>
<section id="anc_002"> <section id="anc_002">
<h2 class="h2_frm">게시판/회원 기본 설정</h2> <h2 class="h2_frm">게시판/회원 기본 설정</h2>
<?php echo $pg_anchor ?> <?php echo $pg_anchor ?>
<div class="local_desc02 local_desc"> <div class="local_desc02 local_desc">
<p> 게시판 관리에서 개별적으로 설정 가능합니다.</p> <p> 게시판 관리에서 개별적으로 설정 가능합니다.</p>
</div> </div>
<div class="tbl_frm01 tbl_wrap"> <div class="tbl_frm01 tbl_wrap">
<table> <table>
<caption>게시판 기본 설정</caption> <caption>게시판 기본 설정</caption>
<colgroup> <colgroup>
<col style="width:150px;"> <col class="grid_4">
<col style="width:400px;"> <col class="grid_10">
<col style="width:150px;"> <col class="grid_4">
<col> <col>
</colgroup> </colgroup>
<tbody> <tbody>
@ -372,7 +392,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_filter">단어 필터링</label></th> <th scope="row"><label for="cf_filter">단어 필터링</label></th>
<td colspan="3"> <td colspan="3">
@ -393,7 +412,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>" <td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>"
id="cf_leave_day" class="frm_input" size="2"> 자동 삭제</td> id="cf_leave_day" class="frm_input" size="2"> 자동 삭제</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="cf_prohibit_id">아이디,닉네임 금지단어</label></th> <th scope="row"><label for="cf_prohibit_id">아이디,닉네임 금지단어</label></th>
<td colspan="3"> <td colspan="3">
@ -406,11 +424,8 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table> </table>
</div> </div>
</section> </section>
<?php echo $frm_submit; ?> <?php echo $frm_submit; ?>
</form> </form>
<script> <script>
function fconfigform_submit(f) { function fconfigform_submit(f) {
f.action = "./site_config_form_update.php"; f.action = "./site_config_form_update.php";

View file

@ -62,6 +62,7 @@ $sql = " update {$g5['config_table']}
cf_bgm = '{$_POST['cf_bgm']}', cf_bgm = '{$_POST['cf_bgm']}',
cf_possible_ip = '" . trim($_POST['cf_possible_ip']) . "', cf_possible_ip = '" . trim($_POST['cf_possible_ip']) . "',
cf_intercept_ip = '" . trim($_POST['cf_intercept_ip']) . "', cf_intercept_ip = '" . trim($_POST['cf_intercept_ip']) . "',
cf_community = '{$_POST['cf_community']}',
cf_delay_sec = '{$_POST['cf_delay_sec']}', cf_delay_sec = '{$_POST['cf_delay_sec']}',
cf_link_target = '{$_POST['cf_link_target']}', cf_link_target = '{$_POST['cf_link_target']}',

View file

@ -414,6 +414,7 @@ CREATE TABLE IF NOT EXISTS `avo_config` (
`cf_exp_name` varchar(255) NOT NULL DEFAULT '', `cf_exp_name` varchar(255) NOT NULL DEFAULT '',
`cf_exp_pice` varchar(255) NOT NULL DEFAULT '', `cf_exp_pice` varchar(255) NOT NULL DEFAULT '',
`cf_rank_name` varchar(255) NOT NULL DEFAULT '', `cf_rank_name` varchar(255) NOT NULL DEFAULT '',
`cf_community` tinyint(4) NOT NULL DEFAULT '0',
`cf_1` varchar(255) NOT NULL DEFAULT '', `cf_1` varchar(255) NOT NULL DEFAULT '',
`cf_2` varchar(255) NOT NULL DEFAULT '', `cf_2` varchar(255) NOT NULL DEFAULT '',
`cf_3` varchar(255) NOT NULL DEFAULT '', `cf_3` varchar(255) NOT NULL DEFAULT '',