add community version features

This commit is contained in:
Amberstone 2024-10-07 10:35:20 +09:00
parent 56c3c3d237
commit 5ac6319e3f
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
149 changed files with 11174 additions and 859 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@
[Aa]vocado[Ee]dition_[Ll]ight/data/*
error.log
access.log
build.log

View file

@ -0,0 +1,470 @@
<?php
include_once "./_common.php";
if ($is_admin && $is_admin == "super") {
/**
* 매번 테이블 유무를 체크하면 성능이 떨어지지만, 마이그레이션의 경우를 고려하여
* 삭제 재생성하지 않고 각각 체크로 작성
* 고친다면 미래에...
*/
// 폴더생성 (커뮤니티 버전)
$dir_arr = [
G5_DATA_PATH . '/cache',
G5_DATA_PATH . '/editor',
G5_DATA_PATH . '/file',
G5_DATA_PATH . '/log',
G5_DATA_PATH . '/member',
G5_DATA_PATH . '/session',
G5_DATA_PATH . '/content',
G5_DATA_PATH . '/faq',
G5_DATA_PATH . '/tmp',
G5_DATA_PATH . '/banner',
G5_DATA_PATH . '/intro',
G5_DATA_PATH . '/character',
G5_DATA_PATH . '/item',
G5_DATA_PATH . '/emoticon',
G5_DATA_PATH . '/side',
G5_DATA_PATH . '/site',
G5_DATA_PATH . '/title',
G5_DATA_PATH . '/class'
];
for ($i = 0; $i < count($dir_arr); $i++) {
@mkdir($dir_arr[$i], G5_DIR_PERMISSION);
@chmod($dir_arr[$i], G5_DIR_PERMISSION);
}
if (!sql_table_exists($g5["article_table"])) {
sql_query("CREATE TABLE IF NOT EXISTS `avo_article` (
`ar_id` INT(11) NOT NULL AUTO_INCREMENT,
`ar_theme` VARCHAR(255) NOT NULL DEFAULT '',
`ar_code` VARCHAR(255) NOT NULL DEFAULT '',
`ar_name` VARCHAR(255) NOT NULL DEFAULT '',
`ar_type` VARCHAR(255) NOT NULL DEFAULT '',
`ar_size` INT(11) NOT NULL DEFAULT '0',
`ar_text` VARCHAR(255) NOT NULL DEFAULT '',
`ar_help` VARCHAR(255) NOT NULL DEFAULT '',
`ar_order` INT(11) NOT NULL DEFAULT '0',
`ar_secret` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`ar_id`),
KEY `ar_id` (`ar_id`)
) ENGINE = MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5["article_default_table"])) {
sql_query("CREATE TABLE IF NOT EXISTS `avo_article_default` (
`ad_id` INT(11) NOT NULL AUTO_INCREMENT ,
`ad_use_thumb` INT(11) NOT NULL DEFAULT '0',
`ad_use_head` INT(11) NOT NULL DEFAULT '0',
`ad_use_body` INT(11) NOT NULL DEFAULT '0',
`ad_use_name` INT(11) NOT NULL DEFAULT '0',
`ad_text_thumb` VARCHAR(255) NOT NULL DEFAULT '',
`ad_text_head` VARCHAR(255) NOT NULL DEFAULT '',
`ad_text_body` VARCHAR(255) NOT NULL DEFAULT '',
`ad_text_name` VARCHAR(255) NOT NULL DEFAULT '',
`ad_help_thumb` VARCHAR(255) NOT NULL DEFAULT '',
`ad_help_head` VARCHAR(255) NOT NULL DEFAULT '',
`ad_help_body` VARCHAR(255) NOT NULL DEFAULT '',
`ad_help_name` VARCHAR(255) NOT NULL DEFAULT '',
`ad_url_thumb` INT(11) NOT NULL DEFAULT '0',
`ad_url_head` INT(11) NOT NULL DEFAULT '0',
`ad_url_body` INT(11) NOT NULL DEFAULT '0',
`ad_use_title` INT(11) NOT NULL DEFAULT '0',
`ad_use_closet` INT(11) NOT NULL DEFAULT '0',
`ad_use_inven` INT(11) NOT NULL DEFAULT '0',
`ad_use_money` INT(11) NOT NULL DEFAULT '0',
`ad_use_rank` INT(11) NOT NULL DEFAULT '0',
`ad_use_exp` INT(11) NOT NULL DEFAULT '0',
`ad_use_status` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`ad_id`),
KEY `ad_id` (`ad_id`)
) ENGINE = MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5["value_table"])) {
sql_query("CREATE TABLE IF NOT EXISTS `avo_article_value` (
`av_id` INT(11) NOT NULL AUTO_INCREMENT ,
`ch_id` INT(11) NOT NULL DEFAULT '0',
`ar_theme` VARCHAR(255) NOT NULL DEFAULT '',
`ar_code` VARCHAR(255) NOT NULL DEFAULT '',
`av_value` TEXT NOT NULL ,
`av_1` VARCHAR(255) NOT NULL DEFAULT '',
`av_2` VARCHAR(255) NOT NULL DEFAULT '',
`av_3` VARCHAR(255) NOT NULL DEFAULT '',
`av_4` VARCHAR(255) NOT NULL DEFAULT '',
`av_5` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`av_id`),
KEY `av_id` (`av_id`)
) ENGINE = MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['intro_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['intro_table']}` (
`bn_id` int(11) NOT NULL AUTO_INCREMENT,
`bn_img` varchar(255) NOT NULL DEFAULT '',
`bn_m_img` varchar(255) NOT NULL DEFAULT '',
`bn_alt` varchar(255) NOT NULL DEFAULT '',
`bn_url` varchar(255) NOT NULL DEFAULT '',
`bn_new_win` tinyint(4) NOT NULL DEFAULT '0',
`bn_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bn_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`bn_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['character_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['character_table']}` (
`ch_id` int(11) NOT NULL AUTO_INCREMENT,
`ch_name` varchar(255) NOT NULL DEFAULT '',
`ch_thumb` varchar(255) NOT NULL DEFAULT '',
`ch_head` varchar(255) NOT NULL DEFAULT '',
`ch_body` varchar(255) NOT NULL DEFAULT '',
`ch_title` varchar(255) NOT NULL DEFAULT '',
`mb_id` varchar(255) NOT NULL DEFAULT '',
`ch_side` varchar(255) NOT NULL DEFAULT '0',
`ch_class` varchar(255) NOT NULL DEFAULT '0',
`ch_rank` char(4) NOT NULL DEFAULT '',
`ch_exp` int(11) NOT NULL DEFAULT '0',
`ch_point` int(11) NOT NULL DEFAULT '0',
`ch_type` varchar(255) NOT NULL DEFAULT '',
`ch_search_date` varchar(255) NOT NULL DEFAULT '',
`ch_search` int(11) NOT NULL DEFAULT '0',
`ch_state` varchar(255) NOT NULL DEFAULT '',
`ma_id` int(11) NOT NULL DEFAULT '0',
`ch_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`ch_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['class_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['class_table']}` (
`cl_id` int(11) NOT NULL AUTO_INCREMENT,
`cl_name` varchar(255) NOT NULL DEFAULT '',
`cl_img` varchar(255) NOT NULL DEFAULT '',
`cl_auth` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`cl_id`),
KEY `cl_id` (`cl_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['side_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['side_table']}` (
`si_id` int(11) NOT NULL AUTO_INCREMENT,
`si_name` varchar(255) NOT NULL DEFAULT '',
`si_img` varchar(255) NOT NULL DEFAULT '',
`si_auth` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`si_id`),
KEY `si_id` (`si_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['title_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['title_table']}` (
`ti_id` int(11) NOT NULL AUTO_INCREMENT,
`ti_title` varchar(255) NOT NULL DEFAULT '',
`ti_img` varchar(255) NOT NULL DEFAULT '',
`ti_use` char(4) NOT NULL DEFAULT '',
`ti_value` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`ti_id`),
KEY `ti_id` (`ti_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['title_has_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['title_has_table']}` (
`hi_id` int(11) NOT NULL AUTO_INCREMENT,
`ti_id` int(11) NOT NULL DEFAULT '0',
`ch_id` int(11) NOT NULL DEFAULT '0',
`ch_name` varchar(255) NOT NULL DEFAULT '',
`hi_use` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`hi_id`),
KEY `hi_id` (`hi_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['couple_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['couple_table']}` (
`co_id` int(11) NOT NULL AUTO_INCREMENT,
`co_left` int(11) NOT NULL DEFAULT '0',
`co_right` int(11) NOT NULL DEFAULT '0',
`co_order` int(11) NOT NULL DEFAULT '0',
`co_date` date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY (`co_id`),
KEY `co_id` (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['exp_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['exp_table']}` (
`ex_id` int(11) NOT NULL AUTO_INCREMENT,
`ch_id` varchar(20) NOT NULL DEFAULT '',
`ch_name` varchar(255) NOT NULL DEFAULT '',
`ex_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ex_content` varchar(255) NOT NULL DEFAULT '',
`ex_point` int(11) NOT NULL DEFAULT '0',
`ex_ch_exp` int(11) NOT NULL DEFAULT '0',
`ex_rel_action` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`ex_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['inventory_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['inventory_table']}` (
`in_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` varchar(255) NOT NULL DEFAULT '',
`it_name` varchar(255) NOT NULL DEFAULT '',
`it_rel` varchar(255) NOT NULL DEFAULT '',
`ch_id` varchar(255) NOT NULL DEFAULT '',
`ch_name` varchar(255) NOT NULL DEFAULT '',
`se_ch_id` varchar(255) NOT NULL DEFAULT '',
`se_ch_name` varchar(255) NOT NULL DEFAULT '',
`re_ch_id` varchar(255) NOT NULL DEFAULT '',
`re_ch_name` varchar(255) NOT NULL DEFAULT '',
`in_sdatetime` datetime NOT NULL DEFAULT '0000-00-00',
`in_edatetime` datetime NOT NULL DEFAULT '0000-00-00',
`in_memo` varchar(255) NOT NULL DEFAULT '',
`in_use` varchar(255) NOT NULL DEFAULT '',
`in_1` varchar(255) NOT NULL DEFAULT '',
`in_2` varchar(255) NOT NULL DEFAULT '',
`in_3` varchar(255) NOT NULL DEFAULT '',
`in_4` varchar(255) NOT NULL DEFAULT '',
`in_5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`in_id`),
KEY `in_id` (`in_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['item_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['item_table']}` (
`it_id` int(11) NOT NULL DEFAULT '0',
`it_name` varchar(255) NOT NULL DEFAULT '',
`it_category` varchar(255) NOT NULL DEFAULT '',
`it_content` varchar(255) NOT NULL DEFAULT '',
`it_content2` text NOT NULL,
`it_use_class` varchar(255) NOT NULL DEFAULT '',
`it_use_side` varchar(255) NOT NULL DEFAULT '',
`it_use_able` varchar(255) NOT NULL DEFAULT '',
`it_use_mmb_able` int(4) NOT NULL DEFAULT '0',
`it_img` varchar(255) NOT NULL DEFAULT '',
`it_has` int(11) NOT NULL DEFAULT '0',
`it_sell` int(11) NOT NULL DEFAULT '0',
`it_use_sell` int(11) NOT NULL DEFAULT '0',
`it_use_ever` int(11) NOT NULL DEFAULT '0',
`it_use` char(4) NOT NULL DEFAULT '',
`it_type` varchar(255) NOT NULL DEFAULT '',
`it_value` varchar(255) NOT NULL DEFAULT '',
`it_use_recepi` int(11) NOT NULL DEFAULT '0',
`it_seeker` int(4) NOT NULL DEFAULT '0',
`it_seeker_per_s` int(11) NOT NULL DEFAULT '0',
`it_seeker_per_e` int(11) NOT NULL DEFAULT '0',
`st_id` int(11) NOT NULL DEFAULT '0',
`it_1` varchar(255) NOT NULL DEFAULT '',
`it_2` varchar(255) NOT NULL DEFAULT '',
`it_3` varchar(255) NOT NULL DEFAULT '',
`it_4` varchar(255) NOT NULL DEFAULT '',
`it_5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`it_id`),
KEY `it_id` (`it_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['recepi_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['recepi_table']}` (
`re_id` int(11) NOT NULL AUTO_INCREMENT,
`re_item_order` varchar(255) NOT NULL DEFAULT '',
`it_id` int(11) NOT NULL DEFAULT '0',
`re_use` int(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`re_id`),
KEY `re_id` (`re_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['explorer_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['explorer_table']}` (
`ie_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` int(11) NOT NULL DEFAULT '0',
`re_it_id` int(11) NOT NULL DEFAULT '0',
`ie_per_s` int(11) NOT NULL DEFAULT '0',
`ie_per_e` int(11) NOT NULL DEFAULT '0',
`ma_id` int(11) NOT NULL DEFAULT '0',
`ie_1` int(11) NOT NULL DEFAULT '0',
`ie_2` int(11) NOT NULL DEFAULT '0',
`ie_3` int(11) NOT NULL DEFAULT '0',
`ie_4` int(11) NOT NULL DEFAULT '0',
`ie_5` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`ie_id`),
KEY `ie_id` (`ie_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['relation_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['relation_table']}` (
`rm_id` int(11) NOT NULL AUTO_INCREMENT,
`ch_id` int(11) NOT NULL DEFAULT '0',
`re_ch_id` int(11) NOT NULL DEFAULT '0',
`rm_memo` text NOT NULL,
`rm_like` int(11) NOT NULL DEFAULT '0',
`rm_link` text NOT NULL,
`rm_order` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`rm_id`),
KEY `rm_id` (`rm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['order_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['order_table']}` (
`or_id` int(11) NOT NULL AUTO_INCREMENT,
`ch_id` varchar(255) NOT NULL DEFAULT '',
`it_id` varchar(255) NOT NULL DEFAULT '',
`or_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`mb_id` varchar(255) NOT NULL DEFAULT '',
`or_use` varchar(11) NOT NULL DEFAULT '',
`add_state` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`or_id`),
KEY `or_id` (`or_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['closthes_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['closthes_table']}` (
`cl_id` int(11) NOT NULL AUTO_INCREMENT,
`ch_id` int(11) NOT NULL DEFAULT '0',
`cl_subject` varchar(255) NOT NULL DEFAULT '',
`cl_path` varchar(255) NOT NULL DEFAULT '',
`cl_use` int(4) NOT NULL DEFAULT '0',
`cl_type` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`cl_id`),
KEY `cl_id` (`cl_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['call_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['call_table']}` (
`bc_id` int(11) NOT NULL AUTO_INCREMENT,
`bo_table` varchar(255) NOT NULL DEFAULT '',
`wr_id` varchar(255) NOT NULL DEFAULT '',
`wr_num` varchar(255) NOT NULL DEFAULT '',
`mb_id` varchar(255) NOT NULL DEFAULT '',
`mb_name` varchar(255) NOT NULL DEFAULT '',
`ch_side` int(11) NOT NULL DEFAULT '0',
`re_mb_id` varchar(255) NOT NULL DEFAULT '',
`re_mb_name` varchar(255) NOT NULL DEFAULT '',
`memo` text NOT NULL,
`bc_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`bc_check` int(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`bc_id`),
KEY `bc_id` (`bc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['level_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['level_table']}` (
`lv_id` INT(11) NOT NULL AUTO_INCREMENT,
`lv_name` VARCHAR(255) NOT NULL DEFAULT '',
`lv_exp` INT(11) NOT NULL DEFAULT '0',
`lv_add_state` INT(11) NOT NULL DEFAULT '0',
`lv_1` VARCHAR(255) NOT NULL DEFAULT '',
`lv_2` VARCHAR(255) NOT NULL DEFAULT '',
`lv_3` VARCHAR(255) NOT NULL DEFAULT '',
`lv_4` VARCHAR(255) NOT NULL DEFAULT '',
`lv_5` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`lv_id`),
KEY `lv_id` (`lv_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['shop_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['shop_table']}` (
`sh_id` int(11) NOT NULL AUTO_INCREMENT,
`it_id` int(11) NOT NULL DEFAULT '0',
`ca_name` varchar(255) NOT NULL DEFAULT '',
`sh_limit` int(11) NOT NULL DEFAULT '0',
`sh_qty` int(11) NOT NULL DEFAULT '0',
`sh_money` int(11) NOT NULL DEFAULT '0',
`sh_use_money` int(11) NOT NULL DEFAULT '0',
`sh_exp` int(11) NOT NULL DEFAULT '0',
`sh_use_exp` int(11) NOT NULL DEFAULT '0',
`sh_content` varchar(255) NOT NULL DEFAULT '',
`sh_side` varchar(255) NOT NULL DEFAULT '',
`sh_use_side` int(11) NOT NULL DEFAULT '0',
`sh_class` varchar(255) NOT NULL DEFAULT '',
`sh_use_class` int(11) NOT NULL DEFAULT '0',
`sh_rank` varchar(255) NOT NULL DEFAULT '',
`sh_use_rank` int(11) NOT NULL DEFAULT '0',
`sh_has_item` int(11) NOT NULL DEFAULT '0',
`sh_use_has_item` int(11) NOT NULL DEFAULT '0',
`sh_has_title` int(11) NOT NULL DEFAULT '0',
`sh_use_has_title` int(11) NOT NULL DEFAULT '0',
`sh_date_s` varchar(255) NOT NULL DEFAULT '',
`sh_date_e` varchar(255) NOT NULL DEFAULT '',
`sh_time_s` int(11) NOT NULL DEFAULT '0',
`sh_time_e` int(11) NOT NULL DEFAULT '0',
`sh_week` varchar(255) NOT NULL DEFAULT '',
`sh_order` int(11) NOT NULL DEFAULT '0',
`sh_use` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`sh_id`),
KEY `sh_id` (`sh_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['status_config_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['status_config_table']}` (
`st_id` int(11) NOT NULL AUTO_INCREMENT,
`st_name` varchar(255) NOT NULL DEFAULT '',
`st_max` int(11) NOT NULL DEFAULT '0',
`st_min` int(11) NOT NULL DEFAULT '0',
`st_use_max` int(11) NOT NULL DEFAULT '0',
`st_order` int(11) NOT NULL DEFAULT '0',
`st_help` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`st_id`),
KEY `st_id` (`st_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['status_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['status_table']}` (
`sc_id` int(11) NOT NULL AUTO_INCREMENT,
`st_id` int(11) NOT NULL DEFAULT '0',
`ch_id` int(11) NOT NULL DEFAULT '0',
`sc_max` int(11) NOT NULL DEFAULT '0',
`sc_value` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`sc_id`),
KEY `sc_id` (`sc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['quest_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['quest_table']}` (
`qu_id` int(11) NOT NULL AUTO_INCREMENT,
`qu_type` varchar(255) NOT NULL DEFAULT '',
`qu_title` varchar(255) NOT NULL DEFAULT '',
`qu_content` text NOT NULL,
`qu_min_lv` int(11) NOT NULL DEFAULT '0',
`qu_max_lv` int(11) NOT NULL DEFAULT '0',
`qu_side` varchar(255) NOT NULL DEFAULT '',
`qu_class` varchar(255) NOT NULL DEFAULT '',
`qu_order` int(11) NOT NULL DEFAULT '0',
`qu_use` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`qu_id`),
KEY `qu_id` (`qu_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
if (!sql_table_exists($g5['item_modify_table'])) {
sql_query("CREATE TABLE IF NOT EXISTS `{$g5['item_modify_table']}` (
`im_id` int(11) NOT NULL AUTO_INCREMENT,
`ch_id` int(11) NOT NULL,
`it_id` int(11) NOT NULL,
`it_count` int(11) NOT NULL,
`im_using_type` varchar(255) NOT NULL default '',
`im_origin_item` text NOT NULL,
`im_date` datetime NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (`im_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
}
goto_url("./community_form.php");
} else {
goto_url(G5_URL);
}

View file

@ -0,0 +1,56 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
* 파일명은 {구분명}.menu.php 같이 작성하고 구분명에는 영문자 파일 이름에 가능한 문자열을 모두 허용합니다.
*
* 코드 작성예시:
<?php
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["config"])) {
$menu["config"] = new MenuCategory("config", "config", "사이트 설정", "/site_config_form.php", true, 0, "", 0);
}
$menu["config"]->addChildMenu("config", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/{your_subfile_name}.php");
*/
if (!isset($menu["config"])) {
$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, 0, "\F3E5", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/site_config_form_update.php");
$menu["config"]->addChildMenu("config", "테마 설정", G5_ADMIN_URL . "/theme.php", true, 200, "\F4B2", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/theme_config_load.php");
$menu["config"]->getLastAddedMenu()->addSubFile("/theme_detail.php");
$menu["config"]->getLastAddedMenu()->addSubFile("/theme_update.php");
$menu["config"]->getLastAddedMenu()->addSubFile("/theme_preview.php");
$menu["config"]->addChildMenu("config", "디자인 설정", G5_ADMIN_URL . "/design_form.php", true, 300, "\F1D8", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/design_form_update.php");
$menu["config"]->addChildMenu("config", "메인 편집", G5_ADMIN_URL . "/viewer_form.php", true, 400, "\F891", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/viewer_form_update.php");
$menu["config"]->addChildMenu("config", "홈페이지 폰트 설정", G5_ADMIN_URL . "/editor_font.php", true, 500, "\F5CB", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/editor_font_update.php");
$menu["config"]->addChildMenu("config", "메뉴 설정", G5_ADMIN_URL . "/menu_list.php", true, 600, "\F478", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/menu_list_update.php");
$menu["config"]->getLastAddedMenu()->addSubFile("/menu_form.php");
$menu["config"]->getLastAddedMenu()->addSubFile("/menu_form_search.php");
$menu["config"]->addChildMenu("config", "애드온 설정", G5_ADMIN_URL . "/addon_config.php", true, 700, "\F4CA", 0);
$menu["config"]->addChildMenu("config", "홈페이지 상세관리", G5_ADMIN_URL . "/config_form.php", true, 1000, "\F3E5", 0);
$menu["config"]->getLastAddedMenu()->addSubFile("/config_form_update.php");
if (Community::isInitCommunity()) {
$menu["config"]->addChildMenu("config", "메인슬라이드 관리", G5_ADMIN_URL . "/banner_list.php", true, 700, "\F155", 0);
}

View file

@ -0,0 +1,54 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
* 파일명은 {구분명}.menu.php 같이 작성하고 구분명에는 영문자 파일 이름에 가능한 문자열을 모두 허용합니다.
*
* 코드 작성예시:
<?php
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["member"])) {
$menu["member"] = new MenuCategory("member", "member", "회원관리", "/member_list.php", true, 1, "", 0);
}
$menu["member"]->addChildMenu("member", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/{your_subfile_name}.php");
*/
if (!isset($menu["member"])) {
$menu["member"] = new MenuCategory("member", "member", "회원관리", "/member_list.php", true, 100, "", 0);
}
$menu["member"]->addChildMenu("member", "회원관리", G5_ADMIN_URL . "/member_list.php", true, 100, "\F8A7", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/member_form.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/member_delete.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/member_list_update.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/member_list_delete.php");
$menu["member"]->addChildMenu("member", "접속자집계", G5_ADMIN_URL . "/visit_list.php", true, 200, "\F3F2", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_domain.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_browser.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_os.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_device.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_hour.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_date.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_week.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_month.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_year.php");
$menu["member"]->addChildMenu("member", "투표관리", G5_ADMIN_URL . "/poll_list.php", true, 500, "\F5F9", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/poll_form.php");
if (Community::isInitCommunity()) {
$menu["member"]->addChildMenu("member", "접속자검색", G5_ADMIN_URL . "/visit_search.php", true, 300, "\F52A", 0);
$menu["member"]->addChildMenu("member", $config['cf_money'] . " 관리", G5_ADMIN_URL . "/point_list.php", true, 400, "\F589", 0);
$menu["member"]->getLastAddedMenu()->addSubFile("/point_list_update.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/point_update.php");
$menu["member"]->getLastAddedMenu()->addSubFile("/visit_delete_update.php");
}

View file

@ -0,0 +1,58 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
* 파일명은 {구분명}.menu.php 같이 작성하고 구분명에는 영문자 파일 이름에 가능한 문자열을 모두 허용합니다.
*
* 코드 작성예시:
<?php
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["content"])) {
$menu["content"] = new MenuCategory("content", "content", "콘텐츠관리", "/contentlist.php", true, 99, "", 0);
}
$menu["content"]->addChildMenu("content", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["content"]->getLastAddedMenu()->addSubFile("/{your_subfile_name}.php");
*/
if (!isset($menu["content"])) {
$menu["content"] = new MenuCategory("content", "content", "게시판/콘텐츠 관리", "/contentlist.php", true, 200, "", 0);
}
$menu["content"]->addChildMenu("content", "게시판관리", G5_ADMIN_URL . "/board_list.php", true, 0, "\F463", 0);
$menu["content"]->getLastAddedMenu()->addSubFile("/board_list_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/board_form.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/board_form_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/board_delete.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/board_copy_update.php");
$menu["content"]->addChildMenu("content", "게시판그룹관리", G5_ADMIN_URL . "/boardgroup_list.php", true, 100, "\F2EE", 0);
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroup_list_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroup_form.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroup_form_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroupmember_list.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroupmember_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/boardgroupmember_form.php");
$menu["content"]->addChildMenu("content", "내용관리", G5_ADMIN_URL . "/contentlist.php", true, 300, "\F620", 0);
$menu["content"]->getLastAddedMenu()->addSubFile("/contentform.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/contentformupdate.php");
$menu["content"]->addChildMenu("content", "이모티콘 관리", G5_ADMIN_URL . "/emoticon_list.php", true, 500, "\F329", 0);
$menu["content"]->getLastAddedMenu()->addSubFile("/emoticon_list_update.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/emoticon_form_update.php");
if (Community::isInitCommunity()) {
$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 . "/write_count.php", true, 130, "\F4A3", 0);
$menu["content"]->addChildMenu("content", "팝업레이어 관리", G5_ADMIN_URL . "/newwinlist.php", true, 200, "\F1C0", 0);
$menu["content"]->getLastAddedMenu()->addSubFile("/newwinform.php");
$menu["content"]->getLastAddedMenu()->addSubFile("/newwinformupdate.php");
}

View file

@ -0,0 +1,94 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
* 파일명은 {구분명}.menu.php 같이 작성하고 구분명에는 영문자 파일 이름에 가능한 문자열을 모두 허용합니다.
*
* 코드 작성예시:
<?php
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["community"])) {
$menu["community"] = new MenuCategory("community", "community", "커뮤니티", "", true, 4, "", 0);
}
$menu["community"]->addChildMenu("community", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["community"]->getLastAddedMenu()->addSubFile("/{your_subfile_name}.php");
*/
if (!isset($menu["community"])) {
$menu["community"] = new MenuCategory("community", "community", "커뮤니티 설정", "", true, 400, "", 0);
if (Community::isInitCommunity()) {
$menu["character"] = new MenuCategory("community", "community", "캐릭터 관리", "", true, 401, "", 0);
$menu["item"] = new MenuCategory("community", "community", "아이템 관리", "", true, 402, "", 0);
}
}
$menu["community"]->addChildMenu("community", "커뮤니티 설정", G5_ADMIN_URL . "/community_form.php", true, 0, "\F3B3", 0);
if (Community::isInitCommunity()) {
$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"]->getLastAddedMenu()->addSubFile("/shop_form.php");
$menu["item"]->getLastAddedMenu()->addSubFile("/shop_form_update.php");
$menu["item"]->getLastAddedMenu()->addSubFile("/shop_list_update.php");
$menu["item"]->addChildMenu("item", "아이템 관리", G5_ADMIN_URL . "/item_list.php", true, 0, "\F685", 0);
$menu["item"]->getLastAddedMenu()->addSubFile("/item_form.php");
$menu["item"]->getLastAddedMenu()->addSubFile("/item_form_update.php");
$menu["item"]->getLastAddedMenu()->addSubFile("/item_list_update.php");
$menu["item"]->addChildMenu("item", "뽑기 관리", G5_ADMIN_URL . "/explorer_list.php", true, 0, "\F567", 0);
$menu["item"]->getLastAddedMenu()->addSubFile("/explorer_list_update.php");
$menu["item"]->getLastAddedMenu()->addSubFile("/explorer_update.php");
$menu["item"]->addChildMenu("item", "아이템 보유현황", G5_ADMIN_URL . "/inventory_list.php", true, 0, "\F8E2", 0);
$menu["item"]->getLastAddedMenu()->addSubFile("/inventory_list_delete.php");
$menu["item"]->getLastAddedMenu()->addSubFile("/inventory_update.php");
$menu["item"]->addChildMenu("item", "레시피 관리", G5_ADMIN_URL . "/recipe_list.php", true, 0, "\F442", 0);
$menu["item"]->addChildMenu("item", "아이템 구매 기록", G5_ADMIN_URL . "/order_list.php", true, 0, "\F50F", 0);
$menu["item"]->addChildMenu("item", "아이템 사용 기록", G5_ADMIN_URL . "/itemlog_list.php", true, 0, "\F50F", 0);
$menu["character"]->addChildMenu("character", "캐릭터 관리", G5_ADMIN_URL . "/character_list.php", true, 0, "\F379", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/character_list_update.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/character_form.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/character_form_update.php");
$menu["character"]->addChildMenu("character", "타이틀 관리", G5_ADMIN_URL . "/title_list.php", true, 100, "\F5B0", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/title_update.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/title_list_update.php");
$menu["character"]->addChildMenu("character", "보유 타이틀 관리", G5_ADMIN_URL . "/title_has_list.php", true, 200, "\F5B2", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/title_has_update.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/title_has_delete.php");
$menu["character"]->addChildMenu("character", ($config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크") ." 설정 관리", G5_ADMIN_URL . "/level_list.php", true, 300, "\F452", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/level_form_update.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/level_list_update.php");
$menu["character"]->addChildMenu("character", ($config['cf_exp_name'] ? $config['cf_exp_name'] : "경험치") ." 설정 관리", G5_ADMIN_URL . "/exp_list.php", true, 400, "\F52B", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/exp_list_delete.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/exp_update.php");
$menu["character"]->addChildMenu("character", "스탯 관리", G5_ADMIN_URL . "/status_list.php", true, 500, "\F6A0", 0);
$menu["character"]->addChildMenu("character", "커플 관리", G5_ADMIN_URL . "/couple_list.php", true, 600, "\F4CF", 0);
if ($config['cf_side_title']) {
$menu["character"]->addChildMenu("character", ($config['cf_side_title'] ? $config['cf_side_title'] : "소속") . " 관리", G5_ADMIN_URL . "/side_list.php", true, 700, "\F8C9", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/side_list_delete.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/side_update.php");
}
if ($config['cf_class_title'] != "") {
$menu["character"]->addChildMenu("character", ($config['cf_class_title'] ? $config['cf_class_title'] : "클래스") . " 관리", G5_ADMIN_URL . "/class_list.php", true, 800, "\F3EA", 0);
$menu["character"]->getLastAddedMenu()->addSubFile("/class_update.php");
$menu["character"]->getLastAddedMenu()->addSubFile("/class_list_delete.php");
}
}

View file

@ -4,6 +4,10 @@ if (!defined('_GNUBOARD_'))
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
* 파일명은 {구분명}.menu.php 같이 작성하고 구분명에는 영문자 파일 이름에 가능한 문자열을 모두 허용합니다.
*
* 코드 작성예시:
<?php
if (!defined('_GNUBOARD_'))
exit;
@ -12,15 +16,12 @@ if (!isset($menu["other"])) {
}
$menu["other"]->addChildMenu("other", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["other"]->getLastAddedMenu()->addSubURL("/{your_subfile_name}.php");
$menu["other"]->getLastAddedMenu()->addSubFile("/{your_subfile_name}.php");
*/
if (!isset($menu["other"])) {
$menu["other"] = new MenuCategory("other", "other", "기타관리", "/config_form.php", true, 99, "", 0);
$menu["other"] = new MenuCategory("other", "other", "기타관리", "/config_form.php", true, 1000, "", 0);
}
$menu["other"]->addChildMenu("other", "홈페이지 상세관리", G5_ADMIN_URL . "/config_form.php", true, 100, "\F3E3", 0);
$menu["other"]->getLastAddedMenu()->addSubURL("/config_form_update.php");
$menu["other"]->addChildMenu("other", "세션파일 일괄삭제", G5_ADMIN_URL . "/session_file_delete.php", true, 200, "\F8C3", 0);
$menu["other"]->addChildMenu("other", "캐시파일 일괄삭제", G5_ADMIN_URL . "/cache_file_delete.php", true, 300, "\F8C3", 0);
$menu["other"]->addChildMenu("other", "세션파일 일괄삭제", G5_ADMIN_URL . "/session_file_delete.php", true, 0, "\F8C3", 0);
$menu["other"]->addChildMenu("other", "캐시파일 일괄삭제", G5_ADMIN_URL . "/cache_file_delete.php", true, 100, "\F8C3", 0);

View file

@ -1,44 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["board"])) {
$menu["board"] = new MenuCategory("board", "board", "게시판관리", "/board_list.php", true, 2, "", 0);
}
$menu["board"]->addChildMenu("board", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["board"]->getLastAddedMenu()->addSubURL("/{your_subfile_name}.php");
*/
if (!isset($menu["board"])) {
$menu["board"] = new MenuCategory("board", "board", "게시판관리", "/board_list.php", true, 2, "", 0);
}
$menu["board"]->addChildMenu("board", "게시판관리", G5_ADMIN_URL . "/board_list.php", true, 100, "\F463", 0);
$menu["board"]->getLastAddedMenu()->addSubURL("/board_list_update.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/board_form_update.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/board_delete.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/board_copy.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/board_copy_update.php");
$menu["board"]->addChildMenu("board", "게시판그룹관리", G5_ADMIN_URL . "/boardgroup_list.php", true, 200, "\F2EE", 0);
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_list_update.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroup_form_update.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_list.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_update.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/boardgroupmember_form.php");
$menu["board"]->addChildMenu("board", "내용관리", G5_ADMIN_URL . "/contentlist.php", true, 300, "\F620", 0);
$menu["board"]->getLastAddedMenu()->addSubURL("/contentform.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/contentformupdate.php");
$menu["board"]->addChildMenu("board", "이모티콘 관리", G5_ADMIN_URL . "/emoticon_list.php", true, 400, "\F329", 0);
$menu["board"]->getLastAddedMenu()->addSubURL("/emoticon_list_update.php");
$menu["board"]->getLastAddedMenu()->addSubURL("/emoticon_form_update.php");

View file

@ -1,30 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["community"])) {
$menu["community"] = new MenuCategory("community", "community", "커뮤니티 호환기능", "", true, 4, "", 0);
}
$menu["community"]->addChildMenu("community", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["community"]->getLastAddedMenu()->addSubURL("/{your_subfile_name}.php");
*/
/*
!! TODO
if (!isset($menu["community"])) {
$menu["community"] = new MenuCategory("community", "community", "커뮤니티 호환기능", "", true, 4, "", 0);
}
$menu["community"]->addChildMenu("config", "커뮤니티 설정", G5_ADMIN_URL . "/community_form.php", true, 100, "\F3B3", 0);
$menu["community"]->addChildMenu("config", "캐릭터 관리", G5_ADMIN_URL . "/character_list.php", true, 200, "\F379", 0);
$menu["community"]->getLastAddedMenu()->addSubURL("/character_list_update.php");
$menu["community"]->getLastAddedMenu()->addSubURL("/character_form.php");
$menu["community"]->getLastAddedMenu()->addSubURL("/character_form_update.php");
*/

View file

@ -1,40 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["member"])) {
$menu["member"] = new MenuCategory("member", "member", "회원관리", "/member_list.php", true, 1, "", 0);
}
$menu["member"]->addChildMenu("member", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["member"]->getLastAddedMenu()->addSubURL("/{your_subfile_name}.php");
*/
if (!isset($menu["member"])) {
$menu["member"] = new MenuCategory("member", "member", "회원관리", "/member_list.php", true, 1, "", 0);
}
$menu["member"]->addChildMenu("member", "회원관리", G5_ADMIN_URL . "/member_list.php", true, 100, "\F8A7", 0);
$menu["member"]->getLastAddedMenu()->addSubURL("/member_form.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/member_delete.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_update.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/member_list_delete.php");
$menu["member"]->addChildMenu("member", "접속자집계", G5_ADMIN_URL . "/visit_list.php", true, 200, "\F3F2", 0);
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_domain.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_browser.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_os.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_device.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_hour.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_date.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_week.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_month.php");
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_year.php");
$menu["member"]->addChildMenu("member", "접속자로그삭제", G5_ADMIN_URL . "/visit_delete.php", true, 300, "\F5DE", 0);
$menu["member"]->getLastAddedMenu()->addSubURL("/visit_delete_update.php");

View file

@ -1,45 +0,0 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/**
* 메뉴 추가가 필요한 경우 파일을 직접 수정하지 않고
* 파일 추가 변수 호출을 통해 사용하세요
if (!defined('_GNUBOARD_'))
exit;
if (!isset($menu["config"])) {
$menu["config"] = new MenuCategory("config", "config", "사이트 설정", "/site_config_form.php", true, 0, "", 0);
}
$menu["config"]->addChildMenu("config", "커스텀메뉴", G5_ADMIN_URL . "/{your_file_name}.php", true, 1, "{bootstrap icon css code}", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/{your_subfile_name}.php");
*/
if (!isset($menu["config"])) {
$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, 100, "\F3E5", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/site_config_form_update.php");
$menu["config"]->addChildMenu("config", "테마 설정", G5_ADMIN_URL . "/theme.php", true, 200, "\F4B2", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_config_load.php");
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_detail.php");
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_update.php");
$menu["config"]->getLastAddedMenu()->addSubURL("/theme_preview.php");
$menu["config"]->addChildMenu("config", "디자인 설정", G5_ADMIN_URL . "/design_form.php", true, 300, "\F1D8", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/design_form_update.php");
$menu["config"]->addChildMenu("config", "메인 편집", G5_ADMIN_URL . "/viewer_form.php", true, 400, "\F891", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/viewer_form_update.php");
$menu["config"]->addChildMenu("config", "홈페이지 폰트 설정", G5_ADMIN_URL . "/editor_font.php", true, 500, "\F5CB", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/editor_font_update.php");
$menu["config"]->addChildMenu("config", "메뉴 설정", G5_ADMIN_URL . "/menu_list.php", true, 600, "\F478", 0);
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_list_update.php");
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form.php");
$menu["config"]->getLastAddedMenu()->addSubURL("/menu_form_search.php");
$menu["config"]->addChildMenu("config", "애드온 설정", G5_ADMIN_URL . "/addon_config.php", true, 700, "\F4CA", 0);

View file

@ -0,0 +1,134 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], "w");
$html_title = "메인슬라이드 ";
$g5['title'] = $html_title . "관리";
if ($w == "u") {
$html_title .= " 수정";
$sql = " select * from {$g5['banner_table']} where bn_id = '$bn_id' ";
$bn = sql_fetch($sql);
} else {
$html_title .= " 입력";
$bn['bn_url'] = "http://";
$bn['bn_begin_time'] = date("Y-m-d 00:00:00", time());
$bn['bn_end_time'] = date("Y-m-d 00:00:00", time() + (60 * 60 * 24 * 31));
}
include_once G5_ADMIN_PATH . "/admin.head.php";
?>
<form name="fbanner" action="./banner_form_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="bn_id" value="<?php echo $bn_id; ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 130px">
<col style="width: 150px">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="2">배너 이미지</th>
<td rowspan="2" class="txt-center bo-right ">
<?php if ($bn['bn_img']) { ?>
<img src="<?= $bn['bn_img'] ?>" class="prev_thumb" />
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td>
직접등록&nbsp;&nbsp; <input type="file" name="bn_img_file" size="50" />
</td>
</tr>
<tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="bn_img" value="<?= $bn['bn_img'] ?>" size="50" />
</td>
</tr>
<tr>
<th scope="row" rowspan="2">배너 모바일 이미지</th>
<td rowspan="2" class="txt-center bo-right ">
<?php if ($bn['bn_img']) { ?>
<img src="<?= $bn['bn_m_img'] ?>" class="prev_thumb" />
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td>
직접등록&nbsp;&nbsp; <input type="file" name="bn_m_img_file" size="50" />
</td>
</tr>
<tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="bn_m_img" value="<?= $bn['bn_m_img'] ?>" size="50" />
</td>
</tr>
<tr>
<th>대체텍스트</th>
<td colspan="2">
<input type="text" name="bn_alt" value="<?php echo $bn['bn_alt']; ?>" size="84">
</td>
</tr>
<tr>
<th>링크</th>
<td colspan="2">
<input type="text" name="bn_url" value="<?php echo $bn['bn_url']; ?>" size="84" />
</td>
</tr>
<tr>
<th>새창</th>
<td colspan="2">
<?php echo help("배너 클릭시 새창을 띄울지를 설정합니다."); ?>
<select name="bn_new_win">
<option value="0" <?php echo get_selected($bn['bn_new_win'], 0); ?>>사용안함</option>
<option value="1" <?php echo get_selected($bn['bn_new_win'], 1); ?>>사용</option>
<option value="2" <?php echo get_selected($bn['bn_new_win'], 2); ?>>팝업사용</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_begin_time">시작일시</label></th>
<td colspan="2">
<?php echo help("배너 게시 시작일시를 설정합니다."); ?>
<input type="text" name="bn_begin_time" value="<?php echo $bn['bn_begin_time']; ?>" id="bn_begin_time"
class="frm_input" size="21" maxlength="19">
<input type="checkbox" name="bn_begin_chk" value="<?php echo date("Y-m-d 00:00:00", time()); ?>"
id="bn_begin_chk"
onclick="if (this.checked == true) this.form.bn_begin_time.value=this.form.bn_begin_chk.value; else this.form.bn_begin_time.value = this.form.bn_begin_time.defaultValue;">
<label for="bn_begin_chk">오늘</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_end_time">종료일시</label></th>
<td colspan="2">
<?php echo help("비쥬얼 게시 종료일시를 설정합니다."); ?>
<input type="text" name="bn_end_time" value="<?php echo $bn['bn_end_time']; ?>" id="bn_end_time"
class="frm_input" size=21 maxlength=19>
<input type="checkbox" name="bn_end_chk" value="<?php echo date("Y-m-d 23:59:59", time() + 60 * 60 * 24 * 31); ?>"
id="bn_end_chk"
onclick="if (this.checked == true) this.form.bn_end_time.value=this.form.bn_end_chk.value; else this.form.bn_end_time.value = this.form.bn_end_time.defaultValue;">
<label for="bn_end_chk">오늘+31</label>
</td>
</tr>
<tr>
<th scope="row"><label for="bn_order">출력 순서</label></th>
<td colspan="2">
<?php echo help("배너를 출력할 때 순서를 정합니다. 숫자가 작을수록 먼저 출력됩니다."); ?>
<?php echo order_select("bn_order", $bn['bn_order']); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./banner_list.php">목록</a>
</div>
</form>
<?php
include_once G5_ADMIN_PATH . "/admin.tail.php";

View file

@ -0,0 +1,77 @@
<?php
include_once "./_common.php";
check_demo();
if ($w == 'd')
auth_check($auth[$sub_menu], "d");
else
auth_check($auth[$sub_menu], "w");
$banner_path = G5_DATA_PATH . "/banner";
$banner_url = G5_DATA_URL . "/banner";
@mkdir($banner_path, G5_DIR_PERMISSION);
@chmod($banner_path, G5_DIR_PERMISSION);
$add_banner = "";
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
if ($_FILES['bn_img_file']['name']) {
$exp = explode(".", $_FILES['bn_img_file']['name']);
$exp = $exp[count($exp) - 1];
$banner_name = "visual_" . time() . "." . $exp;
upload_file($_FILES['bn_img_file']['tmp_name'], $banner_name, $banner_path);
$bn_img = $banner_url . "/" . $banner_name;
}
// 이미지 등록 시, 이미지를 업로드한 뒤 - 해당 이미지 경로를 삽입
if ($_FILES['bn_m_img_file']['name']) {
$exp = explode(".", $_FILES['bn_m_img_file']['name']);
$exp = $exp[count($exp) - 1];
$banner_name = "visual_" . time() . "_m." . $exp;
upload_file($_FILES['bn_m_img_file']['tmp_name'], $banner_name, $banner_path);
$bn_m_img = $banner_url . "/" . $banner_name;
}
if ($w == "" || $w == "u") {
if ($w == "") {
$sql = " insert into {$g5['banner_table']}
set bn_img = '$bn_img',
bn_m_img = '$bn_m_img',
bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_order = '$bn_order'";
sql_query($sql);
} else if ($w == "u") {
$sql = " update {$g5['banner_table']}
set bn_img = '$bn_img',
bn_m_img = '$bn_m_img',
bn_alt = '$bn_alt',
bn_url = '$bn_url',
bn_new_win = '$bn_new_win',
bn_begin_time = '$bn_begin_time',
bn_end_time = '$bn_end_time',
bn_order = '$bn_order'
where bn_id = '$bn_id' ";
sql_query($sql);
}
} else if ($w == "d") {
$sql = " select * from {$g5['banner_table']} where bn_id = '$bn_id' ";
$bn = sql_fetch($sql);
@unlink($bn['bn_img']);
@unlink($bn['bn_m_img']);
$sql = " delete from {$g5['banner_table']} where bn_id = $bn_id ";
$result = sql_query($sql);
}
goto_url("./banner_list.php");

View file

@ -0,0 +1,116 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], "r");
$g5['title'] = "메인슬라이드 관리";
include_once G5_ADMIN_PATH . "/admin.head.php";
$sql_common = " from {$g5['banner_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql_common
order by bn_order, bn_id desc
limit $from_record, $rows ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">
등록된 이미지 <?php echo $total_count; ?>
</div>
<div class="btn_add01 btn_add">
<a href="./banner_form.php">메인슬라이드 추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 170px;" />
<col />
<col style="width: 130px;" />
<col style="width: 130px;" />
<col style="width: 80px;" />
<col style="width: 80px;" />
</colgroup>
<thead>
<tr>
<th scope="col" class="bo-right">ID</th>
<th scope="col">이미지</th>
<th scope="col">대체텍스트</th>
<th scope="col">시작일시</th>
<th scope="col">종료일시</th>
<th scope="col">출력순서</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
// 새창 띄우기인지
$bn_new_win = ($row['bn_new_win']) ? 'target="_blank"' : '';
$bn_img_obj = "";
$link_tag = false;
if ($row['bn_img']) {
if ($row['bn_url'] && $row['bn_url'] != "http://") {
$link_tag = true;
}
if ($link_tag)
$bn_img_obj .= "<a hreef='" . $row['bn_url'] . "' " . $bn_new_win . ">";
$bn_img_obj .= "<img src='" . $row['bn_img'] . "' alt='" . $row['bn_alt'] . "' class='banner-thumb'/>";
if ($link_tag)
$bn_img_obj .= "</a>";
}
$bn_begin_time = substr($row['bn_begin_time'], 2, 14);
$bn_end_time = substr($row['bn_end_time'], 2, 14);
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td><?php echo $row['bn_id']; ?></td>
<td><?php echo $bn_img_obj; ?></td>
<td><?php echo $row['bn_alt']; ?></td>
<td><?php echo $bn_begin_time; ?></td>
<td><?php echo $bn_end_time; ?></td>
<td><?php echo $row['bn_order']; ?></td>
<td>
<a href="./banner_form.php?w=u&amp;bn_id=<?php echo $row['bn_id']; ?>">수정</a></li>
<a href="./banner_form_update.php?w=d&amp;bn_id=<?php echo $row['bn_id']; ?>"
onclick="return delete_confirm();">삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo "<tr><td colspan=\"7\" class=\"empty_table\">자료가 없습니다.</td></tr>";
}
?>
</tbody>
</table>
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;position=$position&amp;page="); ?>
<script>
$(function () {
$(".sbn_img_view").on("click", function () {
$(this).closest(".td_img_view").find(".sbn_image").slideToggle();
});
});
</script>
<?php
include_once G5_ADMIN_PATH . "/admin.tail.php";

View file

@ -162,7 +162,7 @@ $pg_anchor = '<ul class="anchor">
<li><a href="#anc_003">기능 설정</a></li>
<li><a href="#anc_006">확장 기능 설정</a></li>
<li><a href="#anc_004">디자인/양식</a></li>
<li><a href="#anc_005">포인트 설정</a></li>
<li><a href="#anc_005">포인트 설정</a></li>
<li><a href="#anc_007">여분필드</a></li>
</ul>';

View file

@ -110,8 +110,8 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_use_list_content = '{$_POST['bo_use_list_content']}',
bo_use_email = '{$_POST['bo_use_email']}',
bo_use_cert = '{$_POST['bo_use_cert']}',
bo_pass = '{$_POST['bo_pass']}',
bo_use_pass = '{$_POST['bo_use_pass']}',
bo_pass = '{$_POST['bo_pass']}',
bo_use_pass = '{$_POST['bo_use_pass']}',
bo_use_sns = '{$_POST['bo_use_sns']}',
bo_table_width = '{$_POST['bo_table_width']}',
bo_subject_len = '{$_POST['bo_subject_len']}',

View file

@ -45,7 +45,7 @@ if (is_dir($dir)) {
}
?>
<div class="btn_confirm01 btn_confirm"><a
<div class="list_confirm"><a
href="./board_form.php?w=u&amp;bo_table=<?php echo $bo_table; ?>&amp;<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
<?php

View file

@ -13,7 +13,6 @@ include_once "./admin.head.php";
$colspan = 4;
?>
<form name="fboardgroupmember_form" id="fboardgroupmember_form" action="./boardgroupmember_update.php"
onsubmit="return boardgroupmember_form_check(this)" method="post">
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
@ -41,7 +40,6 @@ $colspan = 4;
<input type="submit" value="선택" class="btn_submit" accesskey="s">
</div>
</form>
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php"
onsubmit="return fboardgroupmember_submit(this);" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>" id="sst">
@ -52,7 +50,6 @@ $colspan = 4;
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
<input type="hidden" name="w" value="d" id="w">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -99,12 +96,10 @@ $colspan = 4;
</tbody>
</table>
</div>
<div class="btn_list01 btn_list">
<div class="list_confirm">
<input type="submit" name="" value="선택삭제">
</div>
</form>
<script>
function fboardgroupmember_submit(f) {
if (!is_checked("chk[]")) {

View file

@ -10,7 +10,7 @@ if (!$gr['gr_id']) {
}
$sql_common = " from {$g5['group_member_table']} a
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
$sql_search = " where gr_id = '{$gr_id}' ";
// 회원아이디로 검색되지 않던 오류를 수정
@ -132,7 +132,7 @@ $colspan = 7;
</table>
</div>
<div class="btn_list01 btn_list">
<div class="list_confirm">
<input type="submit" name="" value="선택삭제">
</div>
</form>

View file

@ -0,0 +1,315 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$token = get_token();
// 기본항목에 대한 설정값 가져오기
$profile = sql_fetch(" select * from {$g5['article_default_table']} ");
$profile['ad_text_thumb'] = $profile['ad_text_thumb'] ? $profile['ad_text_thumb'] : "두상";
$profile['ad_text_head'] = $profile['ad_text_head'] ? $profile['ad_text_head'] : "흉상";
$profile['ad_text_body'] = $profile['ad_text_body'] ? $profile['ad_text_body'] : "전신";
$profile['ad_text_name'] = $profile['ad_text_name'] ? $profile['ad_text_name'] : "이름";
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">기본 프로필 양식</a></li>
<li><a href="#anc_002">추가 프로필 양식</a></li>
<li><a href="#anc_003">프로필 항목 등록</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
// 추가 항목에 대한 데이터들 가져오기
$sql = " select * from {$g5['article_table']} order by ar_theme asc, ar_order asc";
$result = sql_query($sql);
$g5['title'] = '프로필 양식 관리';
include_once './admin.head.php';
?>
<form name="farticle" method="post" action="./character_article_list_update.php" autocomplete="off">
<section id="anc_001">
<h2 class="h2_frm">기본 프로필 양식</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col style="width: 80px;">
<col />
</colgroup>
<tbody>
<tr>
<th>기능사용설정</th>
<td colspan="2">
<input type="checkbox" name="ad_use_title" value="1" id="ad_use_title" <?= $profile['ad_use_title'] ? "checked" : "" ?> />
<label for="ad_use_title">타이틀 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_closet" value="1" id="ad_use_closet" <?= $profile['ad_use_closet'] ? "checked" : "" ?> />
<label for="ad_use_closet">옷장 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_inven" value="1" id="ad_use_inven" <?= $profile['ad_use_inven'] ? "checked" : "" ?> />
<label for="ad_use_inven">인벤토리 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_money" value="1" id="ad_use_money" <?= $profile['ad_use_money'] ? "checked" : "" ?> />
<label for="ad_use_money">금액 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_exp" value="1" id="ad_use_exp" <?= $profile['ad_use_exp'] ? "checked" : "" ?> />
<label for="ad_use_exp">경험치 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_rank" value="1" id="ad_use_rank" <?= $profile['ad_use_rank'] ? "checked" : "" ?> />
<label for="ad_use_rank">랭킹 사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_use_status" value="1" id="ad_use_status" <?= $profile['ad_use_status'] ? "checked" : "" ?> />
<label for="ad_use_status">스탯 사용</label>
</td>
</tr>
<tr>
<th rowspan="2"><input type="text" name="ad_text_thumb" value="<?= $profile['ad_text_thumb'] ?>" size="13" />
</th>
<td class="bo-right bo-left">사용여부</td>
<td>
<input type="checkbox" name="ad_use_thumb" value="1" id="ad_use_thumb" <?= $profile['ad_use_thumb'] ? "checked" : "" ?> />
<label for="ad_use_thumb">사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_url_thumb" value="1" id="ad_url_thumb" <?= $profile['ad_url_thumb'] ? "checked" : "" ?> />
<label for="ad_url_thumb">외부 이미지 경로로 등록</label>
</td>
</tr>
<tr>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="text" name="ad_help_thumb" value="<?= $profile['ad_help_thumb'] ?>" size="80" />
</td>
</tr>
<tr>
<th rowspan="2"><input type="text" name="ad_text_head" value="<?= $profile['ad_text_head'] ?>" size="13" />
</th>
<td class="bo-right bo-left">사용여부</td>
<td>
<input type="checkbox" name="ad_use_head" value="1" id="ad_use_head" <?= $profile['ad_use_head'] ? "checked" : "" ?> />
<label for="ad_use_head">사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_url_head" value="1" id="ad_url_head" <?= $profile['ad_url_head'] ? "checked" : "" ?> />
<label for="ad_url_head">외부 이미지 경로로 등록</label>
</td>
</tr>
<tr>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="text" name="ad_help_head" value="<?= $profile['ad_help_head'] ?>" size="80" />
</td>
</tr>
<tr>
<th rowspan="2"><input type="text" name="ad_text_body" value="<?= $profile['ad_text_body'] ?>" size="13" />
</th>
<td class="bo-right bo-left">사용여부</td>
<td>
<input type="checkbox" name="ad_use_body" value="1" id="ad_use_body" <?= $profile['ad_use_body'] ? "checked" : "" ?> />
<label for="ad_use_body">사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="ad_url_body" value="1" id="ad_url_body" <?= $profile['ad_url_body'] ? "checked" : "" ?> />
<label for="ad_url_body">외부 이미지 경로로 등록</label>
</td>
</tr>
<tr>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="text" name="ad_help_body" value="<?= $profile['ad_help_body'] ?>" size="80" />
</td>
</tr>
<tr>
<th><input type="text" name="ad_text_name" value="<?= $profile['ad_text_name'] ?>" size="13" /></th>
<td class="bo-right bo-left">도움말</td>
<td>
<input type="hidden" name="ad_use_name" value="1" />
<input type="text" name="ad_help_name" value="<?= $profile['ad_help_name'] ?>" size="80" />
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_002">
<h2 class="h2_frm">추가 프로필 양식</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>항목을 제거하실 , 고유코드 항목을 지우고 확인을 누르시면 됩니다.</p>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<colgroup>
<col style="width:100px;" />
<col style="width:120px;" />
<col style="width:120px;" />
<col style="width:120px;" />
<col style="width:100px;" />
<col style="width:120px;" />
<col />
<col style="width:100px;" />
<col style="width:100px;" />
</colgroup>
<thead>
<tr>
<th>테마</th>
<th>고유코드</th>
<th>항목명</th>
<th>항목타입</th>
<th>폼크기</th>
<th>단위/항목</th>
<th>도움말</th>
<th>순서</th>
<th>공개영역</th>
</tr>
</thead>
<tbody>
<?php for ($i = 0; $ar = sql_fetch_array($result); $i++) { ?>
<tr>
<td>
<?php echo get_theme_select('theme_dir_' . $i, "ar_theme[$i]", $ar['ar_theme'], " class='full'"); ?>
</td>
<td>
<input type="hidden" name="ar_id[<?= $i ?>]" value="<?= $ar['ar_id'] ?>" />
<input type="text" name="ar_code[<?= $i ?>]" value="<?= $ar['ar_code'] ?>" class="full" />
</td>
<td>
<input type="text" name="ar_name[<?= $i ?>]" value="<?= $ar['ar_name'] ?>" class="full" />
</td>
<td>
<select name="ar_type[<?= $i ?>]" class="full">
<option value="text" <?= $ar['ar_type'] == "text" ? "selected" : "" ?>>한줄 텍스트</option>
<option value="textarea" <?= $ar['ar_type'] == "textarea" ? "selected" : "" ?>>텍스트</option>
<option value="select" <?= $ar['ar_type'] == "select" ? "selected" : "" ?>>단일선택</option>
<option value="file" <?= $ar['ar_type'] == "file" ? "selected" : "" ?>>이미지 업로드</option>
<option value="url" <?= $ar['ar_type'] == "url" ? "selected" : "" ?>>외부이미지 링크</option>
</select>
</td>
<td>
<input type="text" name="ar_size[<?= $i ?>]" value="<?= $ar['ar_size'] ?>" style="width: 50px;" /> px
</td>
<td>
<input type="text" name="ar_text[<?= $i ?>]" value="<?= $ar['ar_text'] ?>" class="full" />
</td>
<td>
<input type="text" name="ar_help[<?= $i ?>]" value="<?= $ar['ar_help'] ?>" class="full" />
</td>
<td>
<input type="text" name="ar_order[<?= $i ?>]" value="<?= $ar['ar_order'] ?>" class="full" />
</td>
<td>
<select name="ar_secret[<?= $i ?>]" class="full">
<option value="">전체공개</option>
<option value="S" <?= $ar['ar_secret'] == "S" ? "selected" : "" ?>>오너+관리자 공개</option>
<option value="H" <?= $ar['ar_secret'] == "H" ? "selected" : "" ?>>관리자 공개</option>
</select>
</td>
</tr>
<?php }
if ($i == 0) { ?>
<tr>
<td colspan="9" class="empty_table">등록된 항목이 없습니다.</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<form name="farticle_add" method="post" action="./character_article_update.php" autocomplete="off">
<section id="anc_003">
<h2 class="h2_frm">프로필 항목 등록</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>프로필 항목 등록은 하단의 확인을 눌러야만 등록이 됩니다. (기본 프로필 양식 추가 프로필 양식의 확인버튼을 클릭 내용이 날아갑니다.) </p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col />
</colgroup>
<tbody>
<tr>
<th>테마</th>
<td>
<?php echo help("테마 전용 항목을 지정할 경우, 테마가 지정되지 않거나 다른 테마에서는 출력되지 않습니다.") ?>
<?php echo get_theme_select('theme_dir', "ar_theme", ''); ?>
</td>
</tr>
<tr>
<th>고유코드</th>
<td>
<?php echo help("해당 항목만의 고유코드 영문 및 '_' 문자 만으로 입력해 주시길 바랍니다.") ?>
<input type="text" name="ar_code" value="" size="30" />
</td>
</tr>
<tr>
<th>항목명</th>
<td>
<input type="text" name="ar_name" value="" size="30" />
</td>
</tr>
<tr>
<th>항목타입</th>
<td>
<select name="ar_type">
<option value="text">한줄 텍스트</option>
<option value="textarea">텍스트</option>
<option value="select">단일선택</option>
<option value="file">이미지 업로드</option>
<option value="url">외부이미지 링크</option>
</select>
</td>
</tr>
<tr>
<th>폼크기</th>
<td>
<?php echo help("입력폼의 가로 사이즈를 지정합니다. (텍스트 타입의 경우, 세로 사이즈)") ?>
<input type="text" name="ar_size" value="" size="20" />px
</td>
</tr>
<tr>
<th>단위/항목</th>
<td>
<?php echo help("입력폼의 옆에 출력될 단위, 혹은 단일 선택 항목의 경우 선택할 항목을 입력해 주세요.") ?>
<?php echo help("항목 구분은 '||' 로 해주세요. (ex : 남성||여성)") ?>
<input type="text" name="ar_text" value="" size="30" />
</td>
</tr>
<tr>
<th>도움말</th>
<td>
<?php echo help("해당 항목에 대한 추가 설명문을 입력해 주세요.") ?>
<input type="text" name="ar_help" value="" size="80" />
</td>
</tr>
<tr>
<th>순서</th>
<td>
<?php echo help("항목 출력 순서를 작성해주세요. 숫자가 작을수록 먼저 출력됩니다.") ?>
<input type="text" name="ar_order" value="" size="10" />
</td>
</tr>
<tr>
<th>공개범위</th>
<td>
<select name="ar_secret">
<option value="">전체공개</option>
<option value="S">오너+관리자 공개</option>
<option value="H">관리자 공개</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,111 @@
<?php
$sub_menu = '400100';
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
// 기본 프로필 양식 등록
$profile = sql_fetch("SELECT ad_id FROM {$g5['article_default_table']} ");
$ad_help_thumb = htmlspecialchars($ad_help_thumb, ENT_QUOTES);
$ad_help_head = htmlspecialchars($ad_help_head, ENT_QUOTES);
$ad_help_body = htmlspecialchars($ad_help_body, ENT_QUOTES);
$ad_help_name = htmlspecialchars($ad_help_name, ENT_QUOTES);
if ($profile['ad_id']) {
// 업데이트
$sql = "UPDATE {$g5['article_default_table']} SET
ad_use_thumb = '$ad_use_thumb',
ad_use_head = '$ad_use_head',
ad_use_body = '$ad_use_body',
ad_use_name = '$ad_use_name',
ad_text_thumb = '$ad_text_thumb',
ad_text_head = '$ad_text_head',
ad_text_body = '$ad_text_body',
ad_text_name = '$ad_text_name',
ad_help_thumb = '$ad_help_thumb',
ad_help_head = '$ad_help_head',
ad_help_body = '$ad_help_body',
ad_help_name = '$ad_help_name',
ad_url_thumb = '$ad_url_thumb',
ad_url_head = '$ad_url_head',
ad_url_body = '$ad_url_body',
ad_use_title = '$ad_use_title',
ad_use_closet = '$ad_use_closet',
ad_use_inven = '$ad_use_inven',
ad_use_money = '$ad_use_money',
ad_use_exp = '$ad_use_exp',
ad_use_rank = '$ad_use_rank',
ad_use_status = '$ad_use_status'";
sql_query($sql);
} else {
// 신규등록
$sql = "INSERT INTO {$g5['article_default_table']} SET
ad_use_thumb = '$ad_use_thumb',
ad_use_head = '$ad_use_head',
ad_use_body = '$ad_use_body',
ad_use_name = '$ad_use_name',
ad_text_thumb = '$ad_text_thumb',
ad_text_head = '$ad_text_head',
ad_text_body = '$ad_text_body',
ad_text_name = '$ad_text_name',
ad_help_thumb = '$ad_help_thumb',
ad_help_head = '$ad_help_head',
ad_help_body = '$ad_help_body',
ad_help_name = '$ad_help_name',
ad_url_thumb = '$ad_url_thumb',
ad_url_head = '$ad_url_head',
ad_url_body = '$ad_url_body',
ad_use_title = '$ad_use_title',
ad_use_closet = '$ad_use_closet',
ad_use_inven = '$ad_use_inven',
ad_use_money = '$ad_use_money',
ad_use_exp = '$ad_use_exp',
ad_use_rank = '$ad_use_rank',
ad_use_status = '$ad_use_status'";
sql_query($sql);
}
// -------------- 기본 프로필 양식 등록
// 추가 프로필 양식 수정
if (is_array($ar_id)) {
for ($i = 0; $i < count($ar_id); $i++) {
$ar = sql_fetch(" select ar_code from {$g5['article_table']} where ar_id = '{$ar_id[$i]}' and ar_theme= '{$ar_theme[$i]}");
if ($ar_code[$i] == '') {
// 등록된 캐릭터의 항목값 삭제
$sql = " delete from {$g5['value_table']} where ar_code = '{$ar['ar_code']}' ";
sql_query($sql);
// 등록된 항목 삭제
$sql = " delete from {$g5['article_table']} where ar_id = '{$ar_id[$i]}' ";
sql_query($sql);
} else {
if ($ar['ar_code'] != $ar_code[$i]) {
// 코드 항목명 변경
// 등록된 캐릭터 항목값의 항목코드 변경
$sql = "UPDATE {$g5['value_table']} SET ar_code = '{$ar_code[$i]}' WHERE ar_code = '{$ar['ar_code']}'";
sql_query($sql);
}
$ar_help[$i] = htmlspecialchars($ar_help[$i], ENT_QUOTES);
// 업데이트
$sql = "UPDATE {$g5['article_table']} SET
ar_code = '{$ar_code[$i]}',
ar_theme = '{$ar_theme[$i]}',
ar_name = '{$ar_name[$i]}',
ar_type = '{$ar_type[$i]}',
ar_size = '{$ar_size[$i]}',
ar_text = '{$ar_text[$i]}',
ar_help = '{$ar_help[$i]}',
ar_order = '{$ar_order[$i]}',
ar_secret = '{$ar_secret[$i]}'
WHERE ar_id = '{$ar_id[$i]}'";
sql_query($sql);
}
}
}
goto_url('./character_article_list.php?' . $qstr);

View file

@ -0,0 +1,20 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
check_token();
$ar_help = htmlspecialchars($ar_help, ENT_QUOTES);
$sql = "INSERT INTO {$g5['article_table']} SET
ar_code = '$ar_code',
ar_theme = '$ar_theme',
ar_name = '$ar_name',
ar_type = '$ar_type',
ar_size = '$ar_size',
ar_text = '$ar_text',
ar_help = '$ar_help',
ar_order = '$ar_order',
ar_secret = '$ar_secret'";
sql_query($sql);
goto_url('./character_article_list.php?' . $qstr);

View file

@ -0,0 +1,33 @@
<?php
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], "d");
$ch = sql_fetch("select * from {$g5['character_table']} where ch_id = '{$ch_id}'");
if (!$ch['ch_id']) {
alert("{$ch['ch_id']} : 캐릭터 자료가 존재하지 않습니다.");
} else {
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_thumb']);
@unlink($prev_file_path);
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_head']);
@unlink($prev_file_path);
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_body']);
@unlink($prev_file_path);
sql_query("DELETE FROM {$g5['character_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query("DELETE FROM {$g5['value_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query("DELETE FROM {$g5['exp_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query("DELETE FROM {$g5['title_has_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query("DELETE FROM {$g5['closthes_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query("DELETE FROM {$g5['inventory_table']} where ch_id = '{$ch['ch_id']}' ");
$sql = " update {$g5['member_table']}
set ch_id = ''
where mb_id = '{$ch['mb_id']}' and ch_id = '{$ch['ch_id']}' ";
sql_query($sql);
}
goto_url("./character_list.php?$qstr");

View file

@ -0,0 +1,446 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
$token = get_token();
// 기본 항목 설정 데이터
$ad = sql_fetch("select * from {$g5['article_default_table']}");
// 추가 항목 설정 데이터
$ch_ar = [];
$ar_result = sql_query("select * from {$g5['article_table']} order by ar_order asc");
for ($i = 0; $row = sql_fetch_array($ar_result); $i++) {
$ch_ar[$i] = $row;
}
$status = [];
if ($ad['ad_use_status']) {
// 스탯 정보 가져오기
$st_result = sql_query("select * from {$g5['status_config_table']} order by st_order asc");
for ($i = 0; $row = sql_fetch_array($st_result); $i++) {
$status[$i] = $row;
}
}
$ch_si = [];
if ($config['cf_side_title']) {
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
$ch_cl = [];
if ($config['cf_class_title']) {
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
if ($w == '') {
$html_title = '추가';
} else if ($w == 'u') {
$ch = Character::getCharacter($ch_id);
if (!$ch['ch_id'])
alert('존재하지 않는 캐릭터 자료 입니다.');
$html_title = '수정';
} else {
alert('제대로 된 값이 넘어오지 않았습니다.');
}
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">기본 설정</a></li>
<li><a href="#anc_002">이미지 설정</a></li>
';
if ($ad['ad_use_status']) {
$pg_anchor .= '<li><a href="#anc_004">스탯 설정</a></li>';
}
$pg_anchor .= '
<li><a href="#anc_003">프로필 설정</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./character_list.php?{$qstr}">목록</a>
</div>';
$g5['title'] .= "";
$g5['title'] .= '캐릭터 ' . $html_title;
include_once "./admin.head.php";
?>
<form name="fmember" id="fmember" action="./character_form_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<input type="hidden" name="ch_id" value="<?php echo $ch_id ?>">
<section id="anc_001">
<h2 class="h2_frm">캐릭터 기본 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">활동 승인</th>
<td>
<select name="ch_state">
<option value="수정중" <?= $ch['ch_state'] == '수정중' ? 'selected' : '' ?>>수정중</option>
<option value="대기" <?= $ch['ch_state'] == '대기' ? 'selected' : '' ?>>대기</option>
<option value="승인" <?= $ch['ch_state'] == '승인' ? 'selected' : '' ?>>승인</option>
<option value="삭제" <?= $ch['ch_state'] == '삭제' ? 'selected' : '' ?>>삭제</option>
</select>
</td>
</tr>
<tr>
<th>캐릭터유형</th>
<td>
<select name="ch_type">
<option value="main" <?= $ch['ch_type'] == 'main' ? 'selected' : '' ?>>메인캐릭터</option>
<option value="sub" <?= $ch['ch_type'] == 'sub' ? 'selected' : '' ?>>서브캐릭터</option>
<option value="npc" <?= $ch['ch_type'] == 'npc' ? 'selected' : '' ?>>NPC</option>
</select>
</td>
</tr>
<?php if ($config['cf_side_title']) { ?>
<tr>
<th><?= $config['cf_side_title'] ?></th>
<td>
<select name="ch_side" id="ch_side">
<option value=""><?= $config['cf_side_title'] ?> 선택</option>
<?php for ($i = 0; $i < count($ch_si); $i++) { ?>
<option value="<?= $ch_si[$i]['id'] ?>" <?= $ch['ch_side'] == $ch_si[$i]['id'] ? "selected" : "" ?>>
<?= $ch_si[$i]['name'] ?></option>
<?php } ?>
</select>
</td>
</tr>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<tr>
<th><?= $config['cf_class_title'] ?></th>
<td>
<select name="ch_class" id="ch_class">
<option value=""><?= $config['cf_class_title'] ?> 선택</option>
<?php for ($i = 0; $i < count($ch_cl); $i++) { ?>
<option value="<?= $ch_cl[$i]['id'] ?>" <?= $ch['ch_class'] == $ch_cl[$i]['id'] ? "selected" : "" ?>>
<?= $ch_cl[$i]['name'] ?></option>
<?php } ?>
</select>
</td>
</tr>
<?php } ?>
<tr>
<th scope="row">오너아이디</th>
<td>
<input type="text" name="mb_id" value="<?php echo $ch['mb_id'] ?>" id="mb_id">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_002">
<h2 class="h2_frm">캐릭터 이미지 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col class="grid_4">
<col>
</colgroup>
<tbody>
<?php if ($ad['ad_use_thumb']) { ?>
<tr>
<th><?= $ad['ad_text_thumb'] ?></th>
<td class="bo-left bo-right txt-center">
<?php if ($ch['ch_thumb']) { ?>
<img src="<?= $ch['ch_thumb'] ?>" class="character-thumb">
<?php } else { ?>
이미지 미등록
<?php } ?>
</td>
<td>
<?php echo help($ad['ad_help_thumb']) ?>
<?php if ($ad['ad_url_thumb']) {
// 두상 - 외부링크 등록
?>
<input type="text" name="ch_thumb" value="<?php echo $ch['ch_thumb'] ?>" size="50" />
<?php } else {
// 두상 - 직접 업로드
?>
<input type="file" name="ch_thumb_file" />
<input type="hidden" name="ch_thumb" value="<?php echo $ch['ch_thumb'] ?>" />
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($ad['ad_use_head']) { ?>
<tr>
<th><?= $ad['ad_text_head'] ?></th>
<td class="bo-left bo-right txt-center">
<?php if ($ch['ch_head']) { ?>
<img src="<?= $ch['ch_head'] ?>" class="character-thumb">
<?php } else { ?>
이미지 미등록
<?php } ?>
</td>
<td>
<?php echo help($ad['ad_help_head']) ?>
<?php if ($ad['ad_url_head']) {
// 흉상 - 외부링크 등록
?>
<input type="text" name="ch_head" value="<?php echo $ch['ch_head'] ?>" size="50" />
<?php } else {
// 흉상 - 직접 업로드
?>
<input type="file" name="ch_head_file" />
<input type="hidden" name="ch_head" value="<?php echo $ch['ch_head'] ?>" />
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($ad['ad_use_body']) { ?>
<tr>
<th><?= $ad['ad_text_body'] ?></th>
<td class="bo-left bo-right txt-center">
<?php if ($ch['ch_body']) { ?>
<img src="<?= $ch['ch_body'] ?>" class="character-thumb">
<?php } else { ?>
이미지 미등록
<?php } ?>
</td>
<td>
<?php echo help($ad['ad_help_body']) ?>
<?php if ($ad['ad_url_body']) {
// 전신 - 외부링크 등록
?>
<input type="text" name="ch_body" value="<?php echo $ch['ch_body'] ?>" size="50" />
<?php } else {
// 전신 - 직접 업로드
?>
<input type="file" name="ch_body_file" />
<input type="hidden" name="ch_body" value="<?php echo $ch['ch_body'] ?>" />
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<?php if ($ad['ad_use_status']) { ?>
<section id="anc_004">
<h2 class="h2_frm">캐릭터 스탯 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col style="width: 80px;">
<col>
</colgroup>
<tbody>
<?php
$use_point = 0;
for ($i = 0; $i < count($status); $i++) {
$st = $status[$i];
$sc = get_status($ch['ch_id'], $st['st_id']);
$use_point += $sc['has'];
?>
<tr>
<th rowspan="2" scope="row"><?= $st['st_name'] ?></th>
<td class="bo-right">보유 스탯</td>
<td>
<?php echo help($st['st_help']) ?>
<input type="hidden" name="st_id[]" value="<?php echo $st['st_id'] ?>" />
<input type="text" name="sc_max[]" value="<?php echo $sc['has'] ? $sc['has'] : $st['st_min'] ?>" size="5">
</td>
</tr>
<tr>
<td class="bo-right">차감 수치</td>
<td>
<input type="text" name="sc_value[]" value="<?php echo $sc['drop'] ?>" size="5">
</td>
</tr>
<?php }
if ($i == 0) { ?>
<tr>
<td colspan="3" class="empty_table txt-center">
등록된 스탯 정보가 존재하지 않습니다.
</td>
</tr>
<?php } ?>
<tr>
<th rowspan="2" scope="row">스탯포인트</th>
<td class="bo-right">전체포인트</td>
<td>
<input type="text" name="ch_point"
value="<?php echo $ch['ch_point'] ? $ch['ch_point'] : $config['cf_status_point'] ?>" size="5">
</td>
</tr>
<tr>
<td class="bo-right">사용포인트</td>
<td>
<?= $use_point ?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<?php } ?>
<section id="anc_003">
<h2 class="h2_frm">캐릭터 프로필 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<?php if ($ad['ad_use_name']) { ?>
<tr>
<th scope="row"><?= $ad['ad_text_name'] ?></th>
<td colspan="3">
<?php echo help($ad['ad_help_name']) ?>
<input type="text" name="ch_name" value="<?php echo $ch['ch_name'] ?>" id="ch_name">
</td>
</tr>
<?php }
// 추가 항목 값 가져오기
$av_result = sql_query("select * from {$g5['value_table']} where ch_id = '{$ch['ch_id']}'");
for ($i = 0; $row = sql_fetch_array($av_result); $i++) {
$ch['av_' . $row['ar_code']] = $row['av_value'];
}
?>
<?php for ($i = 0; $i < count($ch_ar); $i++) {
$ar = $ch_ar[$i];
$key = 'av_' . $ar['ar_code'];
$ch[$key] = sql_fetch("select av_value from {$g5['value_table']} where ch_id = '{$ch_id}' and ar_code = '{$ar['ar_code']}' and ar_theme = '{$ar['ar_theme']}'");
$ch[$key] = $ch[$key]['av_value'];
$style = "";
if ($ar['ar_size']) {
if ($ar['ar_type'] != 'textarea')
$style = "style = 'width: {$ar['ar_size']}px;'";
else
$style = "style = 'width: 100%; height: {$ar['ar_size']}px;'";
} else {
$style = "style = 'width: 100%;'";
}
?>
<tr>
<th>
<input type="hidden" name="ar_theme[<?= $i ?>]" value="<?= $ar['ar_theme'] ?>" />
<input type="hidden" name="ar_code[<?= $i ?>]" value="<?= $ar['ar_code'] ?>" />
<?php if ($ar['ar_theme']) {
echo "[{$ar['ar_theme']}]";
} ?>
<?= $ar['ar_name'] ?>
</th>
<?php
if ($ar['ar_type'] == 'file' || $ar['ar_type'] == 'url') {
// 이미지 타입의 파일
?>
<td class="bo-right txt-center">
<?php if ($ch[$key]) { ?>
<img src="<?= $ch[$key] ?>" class="character-thumb" />
<?php } else { ?>
이미지 미등록
<?php } ?>
</td>
<td>
<?php echo help($ar['ar_help']) ?>
<?php if ($ar['ar_type'] == 'url') { ?>
<input type="text" name="av_value[<?= $i ?>]" value="<?php echo $ch[$key] ?>" <?= $style ?> />
<?php } else {
// 두상 - 직접 업로드
?>
<input type="file" name="av_value_file[<?= $i ?>]" />
<input type="hidden" name="av_value[<?= $i ?>]" value="<?php echo $ch[$key] ?>" />
<?php } ?>
</td>
<?php } else { ?>
<td colspan="2">
<?php echo help($ad['ad_help']) ?>
<?php
if ($ar['ar_type'] == 'text') {
?>
<input type="text" name="av_value[<?= $i ?>]" value="<?php echo $ch[$key] ?>" <?= $style ?> />
<?= $ar['ar_text'] ?>
<?php } else if ($ar['ar_type'] == 'textarea') { ?>
<textarea name="av_value[<?= $i ?>]" <?= $style ?>><?php echo $ch[$key] ?></textarea>
<?php } else if ($ar['ar_type'] == 'select') {
$option = explode("||", $ar['ar_text']);
?>
<select name="av_value[<?= $i ?>]" <?= $style ?>>
<?php for ($j = 0; $j < count($option); $j++) { ?>
<option value="<?= $option[$j] ?>" <?= $option[$j] == $ch[$key] ? "selected" : "" ?>><?= $option[$j] ?></option>
<?php } ?>
</select>
<?php } ?>
</td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<?php
include_once "./admin.tail.php";
?>

View file

@ -0,0 +1,203 @@
<?php
include_once "./_common.php";
function insert_character($data)
{
global $g5;
$sql = "INSERT INTO {$g5['character_table']} SET " . implode(', ', array_map(function ($k, $v) {
return "{$k} = '" . sql_real_escape_string($v) . "'";
}, array_keys($data), $data));
sql_query($sql);
return ['ch_id' => sql_insert_id()];
}
function update_character($ch_id, $data, $old_data)
{
global $g5, $ad;
$sql = "UPDATE {$g5['character_table']} SET " . implode(', ', array_map(function ($k, $v) {
return "{$k} = '" . sql_real_escape_string($v) . "'";
}, array_keys($data), $data)) . " WHERE ch_id = '" . sql_real_escape_string($ch_id) . "'";
sql_query($sql);
$file_fields = ['thumb', 'head', 'body'];
foreach ($file_fields as $field) {
if ($ad["ad_use_{$field}"] && !$ad["ad_url_{$field}"] && $old_data["ch_{$field}"] != $data["ch_{$field}"]) {
$prev_file_path = str_replace(G5_URL, G5_PATH, $old_data["ch_{$field}"]);
@unlink($prev_file_path);
}
}
}
function update_member_character($mb_id, $ch_id)
{
global $g5;
sql_query("UPDATE {$g5['member_table']} SET ch_id = '" . sql_real_escape_string($ch_id) . "' WHERE mb_id = '" . sql_real_escape_string($mb_id) . "'");
}
function insert_default_clothes($ch_id, $ch_body)
{
global $g5;
$sql = "INSERT INTO {$g5['closthes_table']} SET
ch_id = '" . sql_real_escape_string($ch_id) . "',
cl_subject = '기본의상',
cl_path = '" . sql_real_escape_string($ch_body) . "',
cl_use = '1',
cl_type = 'default'";
sql_query($sql);
}
function update_or_insert_default_clothes($ch_id, $ch_body)
{
global $g5;
$cl = sql_fetch("SELECT cl_id FROM {$g5['closthes_table']} WHERE ch_id = '" . sql_real_escape_string($ch_id) . "' AND cl_type = 'default'");
if ($cl['cl_id']) {
sql_query("UPDATE {$g5['closthes_table']} SET cl_path = '" . sql_real_escape_string($ch_body) . "' WHERE cl_id = '" . sql_real_escape_string($cl['cl_id']) . "'");
} else {
insert_default_clothes($ch_id, $ch_body);
}
}
function handle_additional_profile_data($ch_id, $ar_code, $ar_theme, $av_value, $character_image_path, $character_image_url)
{
global $g5;
if (is_array($ar_code)) {
for ($i = 0; $i < count($ar_code); $i++) {
$key = 'av_' . $ar_code[$i];
$prev_value = sql_fetch("SELECT av_value FROM {$g5['value_table']} WHERE ch_id = '" . sql_real_escape_string($ch_id) . "' AND ar_code = '" . sql_real_escape_string($ar_code[$i]) . "' AND ar_theme = '" . sql_real_escape_string($ar_theme[$i]) . "'");
$prev_value = $prev_value['av_value'];
if (isset($_FILES['av_value_file']['name'][$i]) && $_FILES['av_value_file']['name'][$i]) {
$ext = pathinfo($_FILES['av_value_file']['name'][$i], PATHINFO_EXTENSION);
$image_name = "img_" . $ar_code[$i] . "_" . time() . "." . $ext;
upload_file($_FILES['av_value_file']['tmp_name'][$i], $image_name, $character_image_path);
$av_value[$i] = $character_image_url . "/" . $image_name;
}
if ($prev_value != $av_value[$i] && strstr(G5_URL, $prev_value)) {
$prev_file_path = str_replace(G5_URL, G5_PATH, $prev_value);
@unlink($prev_file_path);
}
$sql_data = [
'ch_id' => $ch_id,
'ar_code' => $ar_code[$i],
'ar_theme' => $ar_theme[$i],
'av_value' => $av_value[$i]
];
if (isset($prev_value)) {
$sql = "UPDATE {$g5['value_table']} SET " . implode(', ', array_map(function ($k, $v) {
return "{$k} = '" . sql_real_escape_string($v) . "'";
}, array_keys($sql_data), $sql_data)) . " WHERE ar_code = '" . sql_real_escape_string($ar_code[$i]) . "' AND ch_id = '" . sql_real_escape_string($ch_id) . "' AND ar_theme = '" . sql_real_escape_string($ar_theme[$i]) . "'";
} else {
$sql = "INSERT INTO {$g5['value_table']} SET " . implode(', ', array_map(function ($k, $v) {
return "{$k} = '" . sql_real_escape_string($v) . "'";
}, array_keys($sql_data), $sql_data));
}
sql_query($sql);
}
}
}
function handle_character_stats($ch_id, $st_id, $sc_max, $sc_value)
{
global $g5;
if (is_array($st_id) && count($st_id) > 0) {
for ($i = 0; $i < count($st_id); $i++) {
$temp_st_id = $st_id[$i];
$old_sc = sql_fetch("SELECT * FROM {$g5['status_table']} WHERE ch_id = '" . sql_real_escape_string($ch_id) . "' AND st_id = '" . sql_real_escape_string($temp_st_id) . "'");
$sql_data = array(
'sc_max' => $sc_max[$i],
'sc_value' => $sc_value[$i]
);
if ($old_sc['sc_id']) {
$sql = "UPDATE {$g5['status_table']} SET " . implode(', ', array_map(function ($k, $v) {
return "{$k} = '" . sql_real_escape_string($v) . "'";
}, array_keys($sql_data), $sql_data)) . " WHERE sc_id = '" . sql_real_escape_string($old_sc['sc_id']) . "'";
} else {
$sql_data['st_id'] = $st_id[$i];
$sql_data['ch_id'] = $ch_id;
$sql = "INSERT INTO {$g5['status_table']} SET " . implode(', ', array_map(function ($k, $v) {
return "{$k} = '" . sql_real_escape_string($v) . "'";
}, array_keys($sql_data), $sql_data));
}
sql_query($sql);
}
}
}
$w = isset($_POST['w']) ? $_POST['w'] : '';
$ch_id = isset($_POST['ch_id']) ? trim($_POST['ch_id']) : '';
$mb_id = isset($_POST['mb_id']) ? trim($_POST['mb_id']) : '';
if ($w == 'u') {
check_demo();
}
auth_check($auth[$sub_menu], 'w');
check_token();
$mb = get_member($mb_id);
if (!$mb['mb_id']) {
alert('존재하지 않는 회원 정보입니다.');
}
$character_image_path = G5_DATA_PATH . "/character/" . $mb_id;
$character_image_url = G5_DATA_URL . "/character/" . $mb_id;
@mkdir($character_image_path, G5_DIR_PERMISSION);
@chmod($character_image_path, G5_DIR_PERMISSION);
$character_data = [
'ch_state' => $ch_state,
'ch_type' => $ch_type,
'mb_id' => $mb_id,
'ch_side' => $ch_side,
'ch_class' => $ch_class,
'ch_name' => $ch_name,
'ch_point' => $ch_point,
];
$ad = sql_fetch("SELECT * FROM {$g5['article_default_table']}");
$file_fields = [
'thumb' => 'ch_thumb_file',
'head' => 'ch_head_file',
'body' => 'ch_body_file'
];
foreach ($file_fields as $field => $file_key) {
if ($ad["ad_use_{$field}"] && isset($_FILES[$file_key]['name']) && $_FILES[$file_key]['name']) {
$ext = get_file_extension($_FILES[$file_key]['name']);
$image_name = "{$field}_" . time() . "." . $ext;
$upload_result = upload_file($_FILES[$file_key]['tmp_name'], $image_name, $character_image_path);
if ($upload_result) {
$character_data["ch_{$field}"] = $character_image_url . "/" . $image_name;
}
}
}
if ($w == '') {
$result = insert_character($character_data);
$ch_id = $result['ch_id'];
update_member_character($mb['mb_id'], $ch_id);
if (isset($character_data['ch_body'])) {
insert_default_clothes($ch_id, $character_data['ch_body']);
}
} else {
$ch = get_character($ch_id);
if (!$ch['ch_id']) {
alert("캐릭터 정보가 존재하지 않습니다.");
}
update_character($ch_id, $character_data, $ch);
update_member_character($mb['mb_id'], $ch_id);
if (isset($character_data['ch_body'])) {
update_or_insert_default_clothes($ch_id, $character_data['ch_body']);
}
}
// 추가 프로필 핸들링
handle_additional_profile_data($ch_id, $ar_code, $ar_theme, $av_value, $character_image_path, $character_image_url);
// 캐릭터 스탯 핸들링
handle_character_stats($ch_id, $st_id, $sc_max, $sc_value);
goto_url('./character_form.php?' . $qstr . '&amp;w=u&amp;ch_id=' . $ch_id);

View file

@ -0,0 +1,296 @@
<?php
/**
* @var string $s_side
* @var string $s_class
*/
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['character_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if ($sfl != 'ch_state' && $stx != '삭제') {
$sql_search .= " and ch_state != '삭제' ";
}
if ($s_side) {
$sql_search .= " and ch_side = '{$s_side}' ";
}
if ($s_class) {
$sql_search .= " and ch_class = '{$s_class}' ";
}
if (!$sst) {
$sst = "ch_type asc";
$sod = "";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = 50;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
// 승인대기
$sql = " select count(*) as cnt {$sql_common} where ch_state = '대기' {$sql_order} ";
$row = sql_fetch($sql);
$leave_count = $row['cnt'];
// 수정중
$sql = " select count(*) as cnt {$sql_common} where ch_state = '수정중' {$sql_order} ";
$row = sql_fetch($sql);
$modify_count = $row['cnt'];
// 삭제
$sql = " select count(*) as cnt {$sql_common} where ch_state = '삭제' {$sql_order} ";
$row = sql_fetch($sql);
$del_count = $row['cnt'];
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '캐릭터 관리';
include_once "./admin.head.php";
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$colspan = 7;
/** 세력 정보 **/
$ch_si = [];
if ($config['cf_side_title']) {
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
/** 종족 정보 **/
$ch_cl = [];
if ($config['cf_class_title']) {
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
$profile = sql_fetch(" select ad_use_rank from {$g5['article_default_table']} ");
if ($profile['ad_use_rank']) {
$colspan++;
}
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
총캐릭터수 <?php echo number_format($total_count) ?>
<span style="float: right;">
<a href="?sfl=ch_state&amp;stx=대기">승인대기 <?php echo number_format($leave_count) ?></a>명 |
<a href="?sfl=ch_state&amp;stx=수정중">수정중 <?php echo number_format($modify_count) ?></a>명 |
<a href="?sfl=ch_state&amp;stx=삭제">삭제 <?php echo number_format($del_count) ?></a>명
</span>
</div>
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<?php
if (count($ch_si) > 0) {
?>
<select name="s_side" id="c_side">
<option value=""><?= $config['cf_side_title'] ?>선택</option>
<?php for ($i = 0; $i < count($ch_si); $i++) { ?>
<option value="<?= $ch_si[$i]['id'] ?>" <?php echo get_selected($_GET['s_side'], $ch_si[$i]['id']); ?>>
<?= $ch_si[$i]['name'] ?></option>
<?php } ?>
</select>
<?php } ?>
<?php
if (count($ch_cl) > 0) {
?>
<select name="s_class" id="c_class">
<option value=""><?= $config['cf_class_title'] ?>선택</option>
<?php for ($i = 0; $i < count($ch_cl); $i++) { ?>
<option value="<?= $ch_cl[$i]['id'] ?>" <?php echo get_selected($_GET['s_class'], $ch_cl[$i]['id']); ?>>
<?= $ch_cl[$i]['name'] ?></option>
<?php } ?>
</select>
<?php } ?>
<select name="sfl" id="sfl">
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
<option value="mb_id" <?php echo get_selected($_GET['sfl'], "mb_id"); ?>>오너 아이디</option>
<option value="ch_state" <?php echo get_selected($_GET['sfl'], "ch_state"); ?>>승인현황</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" class="frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add">
<a href="./character_form.php" id="member_add">캐릭터추가</a>
</div>
<?php } ?>
<form name="fmemberlist" id="fmemberlist" action="./character_list_update.php"
onsubmit="return fmemberlist_submit(this);" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 100px;" />
<col />
<?php if ($profile['ad_use_rank']) { ?>
<col style="width: 120px;" />
<?php } ?>
<?php if ($config['cf_side_title']) { ?>
<col style="width: 120px;" />
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<col style="width: 120px;" />
<?php } ?>
<col style="width: 80px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only">캐릭터 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>유형</th>
<th>이름</th>
<?php if ($profile['ad_use_rank']) { ?>
<th>랭킹</th>
<?php } ?>
<?php if ($config['cf_side_title']) { ?>
<th><?= $config['cf_side_title'] ?></th>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<th><?= $config['cf_class_title'] ?></th>
<?php } ?>
<th>상태</th>
<th>관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$ch_id = $row['ch_id'];
$bg = 'bg' . ($i % 2);
$s_mod = '<a href="./character_form.php?' . $qstr . '&amp;w=u&amp;ch_id=' . $row['ch_id'] . '">수정</a>';
$s_del = '<a href="javascript:post_delete(\'character_delete.php\', \'' . $row['ch_id'] . '\');">제거</a>';
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ch_id[<?php echo $i ?>]" value="<?php echo $row['ch_id'] ?>"
id="ch_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['ch_name']); ?>님</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<select name="ch_type[<?= $i ?>]" class="frm_input">
<option value="">유형선택</option>
<option value="main" <?= $row['ch_type'] == "main" ? "selected" : "" ?>>MAIN</option>
<option value="sub" <?= $row['ch_type'] == "sub" ? "selected" : "" ?>>SUB</option>
<option value="npc" <?= $row['ch_type'] == "npc" ? "selected" : "" ?>>NPC</option>
</select>
</td>
<td class="txt-left"><?php echo get_text($row['ch_name']); ?></td>
<?php if ($profile['ad_use_rank']) { ?>
<td>
<?= get_rank_name($row['ch_rank']) ?>
</td>
<?php } ?>
<?php if ($config['cf_side_title']) { ?>
<td>
<select name="ch_side[<?= $i ?>]" class="frm_input">
<option value=""><?= $config['cf_side_title'] ?>선택</option>
<?php for ($k = 0; $k < count($ch_si); $k++) { ?>
<option value="<?= $ch_si[$k]['id'] ?>" <?php echo get_selected($row['ch_side'], $ch_si[$k]['id']); ?>>
<?= $ch_si[$k]['name'] ?></option>
<?php } ?>
</select>
</td>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<td>
<select name="ch_class[<?= $i ?>]" class="frm_input">
<option value=""><?= $config['cf_class_title'] ?>선택</option>
<?php for ($k = 0; $k < count($ch_cl); $k++) { ?>
<option value="<?= $ch_cl[$k]['id'] ?>" <?php echo get_selected($row['ch_class'], $ch_cl[$k]['id']); ?>>
<?= $ch_cl[$k]['name'] ?></option>
<?php } ?>
</select>
</td>
<?php } ?>
<td>
<select name="ch_state[<?= $i ?>]" class="frm_input">
<option value="수정중">수정중</option>
<option value="대기" <?= $row['ch_state'] == "대기" ? "selected" : "" ?>>대기</option>
<option value="승인" <?= $row['ch_state'] == "승인" ? "selected" : "" ?>>승인</option>
<option value="삭제" <?= $row['ch_state'] == "삭제" ? "selected" : "" ?>>삭제</option>
</select>
</td>
<td><?php echo $s_mod ?>&nbsp;&nbsp;<?php echo $s_del ?></td>
</tr>
<?php
}
if ($i == 0)
echo "<tr><td colspan=\"" . $colspan . "\" class=\"empty_table\">자료가 없습니다.</td></tr>";
?>
</tbody>
</table>
</div>
<div class="local_desc02 local_desc pos-top">
<p>선택삭제 - 상태를 삭제로 변경, 차후 문제 복구가 가능합니다. / 선택제거 - 캐리터 정보 삭제. 복구 불가능. 캐릭터와 관련된 아이템, 포인트 등의 정보 까지 모두 제거 됩니다.</p>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택승인" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택제거" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?' . $qstr . '&amp;page='); ?>
<script>
function fmemberlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once "./admin.tail.php";

View file

@ -0,0 +1,78 @@
<?php
$sub_menu = "400200";
include_once "./_common.php";
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
auth_check($auth[$sub_menu], 'w');
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= $ch['ch_id'] . ' : 캐릭터 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['character_table']}
set ch_type = '{$_POST['ch_type'][$k]}',
ch_side = '{$_POST['ch_side'][$k]}',
ch_class = '{$_POST['ch_class'][$k]}',
ch_state = '{$_POST['ch_state'][$k]}'
where ch_id = '{$_POST['ch_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택승인") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= $ch['ch_id'] . ' : 캐릭터 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['character_table']}
set ch_state = '승인'
where ch_id = '{$_POST['ch_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch = get_character($_POST['ch_id'][$k]);
if (!$ch['ch_id']) {
$msg .= $ch['ch_id'] . ' : 캐릭터 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['character_table']}
set ch_state = '삭제'
where ch_id = '{$_POST['ch_id'][$k]}' ";
sql_query($sql);
$sql = " update {$g5['member_table']}
set ch_id = ''
where mb_id = '{$ch['mb_id']}' and ch_id = '{$ch['ch_id']}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택제거") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch_id = $_POST['ch_id'][$k];
if (!Character::exists($ch_id)) {
$msg .= "{$ch_id} : 캐릭터 자료가 존재하지 않습니다.\\n";
} else {
Character::delete($ch_id);
}
}
}
if ($msg)
alert($msg);
goto_url('./character_list.php');

View file

@ -0,0 +1,208 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['class_table']} ";
$sql_search = " where (1) ";
if (!$sst) {
$sst = "cl_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = $config['cf_class_title'] . ' 관리';
include_once './admin.head.php';
$colspan = 7;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">' . $config['cf_class_title'] . ' 목록</a></li>
<li><a href="#anc_002">' . $config['cf_class_title'] . ' 등록</a></li>
</ul>';
?>
<section id="anc_001">
<h2 class="h2_frm"><?= $config['cf_class_title'] ?> 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fclasslist" id="fclasslist" method="post" action="./class_list_delete.php"
onsubmit="return fclasslist_submit(this);" enctype="multipart/form-data">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 120px;" />
<col style="width: 120px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only"><?= $config['cf_class_title'] ?> 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">IDX</th>
<th scope="col" colspan="2">이미지</th>
<th scope="col"><?= $config['cf_class_title'] ?>명</th>
<th scope="col">선택권한</th>
<th scope="col">보기</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td style="text-align: center">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<input type="text" name="cl_id[<?php echo $i ?>]" value="<?php echo $row['cl_id'] ?>"
id="cl_id_<?php echo $i ?>" readonly style="width: 30px;">
</td>
<td style="text-align: center">
<?php if ($row['cl_img']) { ?>
<img src='<?= $row['cl_img'] ?>' alt='<?= $row['cl_name'] ?>' style="max-width: 40px;">
<input type="hidden" name="old_cl_img[<?= $i ?>]" value="<?= $row['cl_img'] ?>" />
<?php } ?>
</td>
<td>
<input type="file" name="cl_img[<?= $i ?>]" id="cl_img<?= $i ?>" />
</td>
<td>
<input type="text" name="cl_name[<?php echo $i ?>]" value="<?php echo $row['cl_name'] ?>"
class="frm_input" style="width: 98%;">
</td>
<td>
<?php echo get_member_level_select("cl_auth[$i]", 2, $member['mb_level'], $row['cl_auth']) ?>
</td>
<td>
<a href="<?= G5_URL ?>/member/index.php?class=<?= $row['cl_id'] ?>" target="_blank">
멤버목록보기
</a>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<section id="anc_002">
<h2 class="h2_frm"><?= $config['cf_class_title'] ?>정보 등록</h2>
<?php echo $pg_anchor ?>
<form name="fclassform" method="post" id="fclassform" action="./class_update.php" autocomplete="off"
enctype="multipart/form-data">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cl_name"><?= $config['cf_class_title'] ?>명<strong
class="sound_only">필수</strong></label></th>
<td><input type="text" name="cl_name" id="cl_name" class="required frm_input" required></td>
</tr>
<tr>
<th scope="row"><label for="cl_img">이미지<strong class="sound_only">필수</strong></label></th>
<td><input type="file" name="cl_img" id="cl_img"></td>
</tr>
<tr>
<th scope="row"><label for="cl_auth">선택권한</label></th>
<td><?php echo get_member_level_select('cl_auth', 2, $member['mb_level'], $mb['mb_level']) ?></td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fclasslist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';
?>

View file

@ -0,0 +1,84 @@
<?php
include_once './_common.php';
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
auth_check($auth[$sub_menu], 'w');
$class_path = G5_DATA_PATH . "/class";
$class_url = G5_DATA_URL . "/class";
@mkdir($class_path, G5_DIR_PERMISSION);
@chmod($class_path, G5_DIR_PERMISSION);
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
$sql_common = "";
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$si = sql_fetch("select * from {$g5['class_table']} where cl_id = '{$_POST['cl_id'][$k]}'");
if (!$si['cl_id']) {
$msg .= $si['cl_id'] . ' : 기존 자료가 존재하지 않습니다.\\n';
} else {
if ($img = $_FILES['cl_img']['name'][$k]) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("관련 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 기존 데이터 삭제
$prev_file_path = str_replace(G5_URL, G5_PATH, $si['cl_img'][$k]);
@unlink($prev_file_path);
// 확장자 따기
$exp = explode(".", $_FILES['cl_img']['name'][$k]);
$exp = $exp[count($exp) - 1];
$image_name = "class_" . time() . "." . $exp;
upload_file($_FILES['cl_img']['tmp_name'][$k], $image_name, $class_path);
$image_url = $class_url . "/" . $image_name;
$sql_common .= " , cl_img = '{$image_url}' ";
}
}
$sql = " update {$g5['class_table']}
set cl_name = '{$_POST['cl_name'][$k]}',
cl_auth = '{$_POST['cl_auth'][$k]}'
{$sql_common}
";
$sql .= " where cl_id = '{$_POST['cl_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
$count = count($_POST['chk']);
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 소속 내역삭제
$sql = " delete from {$g5['class_table']} where cl_id = '{$_POST['cl_id'][$k]}' ";
sql_query($sql);
// 소속 아이콘 이미지 삭제
if ($_POST['old_cl_img'][$k]) {
// 기존 데이터 삭제
$prev_file_path = str_replace(G5_URL, G5_PATH, $_POST['old_cl_img'][$k]);
@unlink($prev_file_path);
}
}
}
if ($msg)
alert($msg);
goto_url('./class_list.php?' . $qstr);

View file

@ -0,0 +1,42 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
$class_path = G5_DATA_PATH . "/class";
$class_url = G5_DATA_URL . "/class";
@mkdir($class_path, G5_DIR_PERMISSION);
@chmod($class_path, G5_DIR_PERMISSION);
/** 소속 아이콘 등록 **/
$sql_common = "";
if ($img = $_FILES['cl_img']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("타이틀 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 확장자 따기
$exp = explode(".", $_FILES['cl_img']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "class_" . time() . "." . $exp;
upload_file($_FILES['cl_img']['tmp_name'], $image_name, $class_path);
$image_url = $class_url . "/" . $image_name;
$sql_common .= " , cl_img = '{$image_url}' ";
}
}
$sql = " insert into {$g5['class_table']}
set cl_name = '{$_POST['cl_name']}',
cl_auth = '{$_POST['cl_auth']}'
{$sql_common}
";
sql_query($sql);
goto_url('./class_list.php?' . $qstr);

View file

@ -0,0 +1,257 @@
<?php
include_once './_common.php';
include_once G5_EDITOR_LIB;
auth_check($auth[$sub_menu], 'r');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
$g5['title'] = '커뮤니티 설정';
include_once './admin.head.php';
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">DB확인</a></li>
<li><a href="#anc_002">기본설정</a></li>
<li><a href="#anc_003">기능설정</a></li>
<li><a href="#anc_004">기타항목설정</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
$is_community_init = Community::isInitCommunity();
if (!$is_community_init) {
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">DB확인</a></li>
</ul>';
$frm_submit = '';
} else {
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_002">기본설정</a></li>
<li><a href="#anc_003">기능설정</a></li>
<li><a href="#anc_004">기타항목설정</a></li>
</ul>';
}
?>
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);"
enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token">
<?php if(!$is_community_init) { ?>
<section id="anc_001">
<h2 class="h2_frm">커뮤니티 DB 확인</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>커뮤니티용 기능에 필요한 데이터베이스를 확인합니다.</p>
<p>데이터베이스가 생성되어 있지 않으면 정상적으로 동작하지 않을 있습니다.</p>
<p><strong>커뮤니티 기능을 사용할 것이 아니라면 DB를 생성하지 않아도 됩니다.</strong></p>
<p>커뮤니티 기능 활성화 커뮤니티 메뉴가 표시됩니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>홈페이지 기본환경 설정</caption>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<?php
$items = Community::checkDatabase();
foreach($items as $key => $item) {
$vicon = "<span class=\"dbchk\"><i class=\"dbchk bi bi-x-circle\"></i> 생성되지 않음</span>";
?><tr><th scope="row"><?=$key?></th><td><?=$vicon?></td></tr><?php
}
?>
</tbody>
</table>
<div class="list_confirm">
<a href="./_create_community_db.php">DB TABLE 생성</a>
</div>
</div>
</section>
<?php } else {?>
<section id="anc_002">
<h2 class="h2_frm">커뮤니티 기본환경 설정</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>커뮤니티용 기능에 필요한 설정입니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>홈페이지 기본환경 설정</caption>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">공개설정</th>
<td>
<input type="checkbox" name="cf_2" value="1" id="cf_2" <?php echo $config['cf_2'] ? 'checked' : ''; ?>>
<label for="cf_2">캐릭터생성 가능</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_3" value="1" id="cf_3" <?php echo $config['cf_3'] ? 'checked' : ''; ?>>
<label for="cf_3">캐릭터수정 가능</label>
</td>
</tr>
<tr>
<th scope="row">기능설정</th>
<td>
<input type="checkbox" name="cf_4" value="1" id="cf_4" <?php echo $config['cf_4'] ? 'checked' : ''; ?>>
<label for="cf_4">탐색사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_5" value="1" id="cf_5" <?php echo $config['cf_5'] ? 'checked' : ''; ?>>
<label for="cf_5">조합(레시피)사용</label>
&nbsp;&nbsp;
<input type="checkbox" name="cf_6" value="1" id="cf_6" <?php echo $config['cf_6'] ? 'checked' : ''; ?>>
<label for="cf_6">탐색 수행 가능</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_003">
<h2 class="h2_frm">기능 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">캐릭터 최대 생성 갯수</th>
<td>
<input type="text" name="cf_character_count" value="<?php echo get_text($config['cf_character_count']) ?>"
id="cf_character_count" size="10">
</td>
</tr>
<tr>
<th scope="row">최초 스탯 포인트</th>
<td>
<?php echo help('스탯 사용 설정 시, 캐릭터가 최초로 획득하는 스탯 포인트를 설정합니다.') ?>
<input type="text" name="cf_status_point" value="<?php echo get_text($config['cf_status_point']) ?>"
id="cf_status_point" size="10">
</td>
</tr>
<tr>
<th scope="row">하루 탐색 횟수</th>
<td>
<input type="text" name="cf_search_count" value="<?php echo get_text($config['cf_search_count']) ?>"
id="cf_search_count" size="10">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_004">
<h2 class="h2_frm">기타 항목명 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 150px;">
<col style="width: 100px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="2"><?= $config['cf_money'] ? $config['cf_money'] : "(포인트)" ?> 설정</th>
<td>명칭</td>
<td>
<input type="text" name="cf_money" value="<?php echo get_text($config['cf_money']) ?>" id="cf_money"
size="30">
</td>
</tr>
<tr>
<td>단위</td>
<td>
<input type="text" name="cf_money_pice" value="<?php echo get_text($config['cf_money_pice']) ?>"
id="cf_money_pice" size="30">
</td>
</tr>
<tr>
<th scope="row" rowspan="2"><?= $config['cf_exp_name'] ? $config['cf_exp_name'] : "(경험치)" ?> 설정</th>
<td>명칭</td>
<td>
<input type="text" name="cf_exp_name" value="<?php echo get_text($config['cf_exp_name']) ?>"
id="cf_exp_name" size="30">
</td>
</tr>
<tr>
<td>단위</td>
<td>
<input type="text" name="cf_exp_pice" value="<?php echo get_text($config['cf_exp_pice']) ?>"
id="cf_exp_pice" size="30">
</td>
</tr>
<tr>
<th scope="row"><?= $config['cf_rank_name'] ? $config['cf_rank_name'] : "(랭크)" ?> 설정</th>
<td>명칭</td>
<td>
<input type="text" name="cf_rank_name" value="<?php echo get_text($config['cf_rank_name']) ?>"
id="cf_rank_name" size="30">
</td>
</tr>
<tr>
<th scope="row"><?= $config['cf_side_title'] ? $config['cf_side_title'] : "(소속)" ?> (선택A)설정</th>
<td>명칭</td>
<td>
<?php echo help('명칭이 입력되지 않을 시, 프로필에 출력되지 않습니다.') ?>
<input type="text" name="cf_side_title" value="<?php echo get_text($config['cf_side_title']) ?>"
id="cf_side_title" size="30">
</td>
</tr>
<tr>
<th scope="row"><?= $config['cf_class_title'] ? $config['cf_class_title'] : "(클래스)" ?> (선택B)설정</th>
<td>명칭</td>
<td>
<?php echo help('명칭이 입력되지 않을 시, 프로필에 출력되지 않습니다.') ?>
<input type="text" name="cf_class_title" value="<?php echo get_text($config['cf_class_title']) ?>"
id="cf_class_title" size="30">
</td>
</tr>
<tr>
<th scope="row">상점 카테고리</th>
<td>-</td>
<td>
<?php echo help('카테고리 구분은 || 를 사용합니다.') ?>
<input type="text" name="cf_shop_category" value="<?php echo get_text($config['cf_shop_category']) ?>"
id="cf_shop_category" size="100" placeholder="예시) 일반||이벤트">
</td>
</tr>
<tr>
<th scope="row">아이템 기능</th>
<td>-</td>
<td>
<?php echo help('기능 구분은 || 를 사용합니다.') ?>
<input type="text" name="cf_item_category" value="<?php echo get_text($config['cf_item_category']) ?>"
id="cf_item_category" size="100" placeholder="예시) 일반||프로필수정||아이템추가||스탯회복">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<?php } ?>
</form>
<script>
function fconfigform_submit(f) {
f.action = "./community_form_update.php";
<?php echo get_editor_js("cf_menu_text"); ?>
<?php echo get_editor_js("cf_mobile_menu_text"); ?>
return true;
}
</script>
<?php
EventHandler::triggerEvent("amber.admin.community_form_after");
include_once './admin.tail.php';

View file

@ -0,0 +1,36 @@
<?php
include_once './_common.php';
check_demo();
auth_check($auth[$sub_menu], 'w');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.');
check_admin_token();
$sql = "UPDATE {$g5['config_table']} SET
cf_2 = '{$_POST['cf_2']}',
cf_3 = '{$_POST['cf_3']}',
cf_4 = '{$_POST['cf_4']}',
cf_5 = '{$_POST['cf_5']}',
cf_6 = '{$_POST['cf_6']}',
cf_character_count = '{$_POST['cf_character_count']}',
cf_status_point = '{$_POST['cf_status_point']}',
cf_search_count = '{$_POST['cf_search_count']}',
cf_money = '{$_POST['cf_money']}',
cf_money_pice = '{$_POST['cf_money_pice']}',
cf_exp_name = '{$_POST['cf_exp_name']}',
cf_exp_pice = '{$_POST['cf_exp_pice']}',
cf_rank_name = '{$_POST['cf_rank_name']}',
cf_side_title = '{$_POST['cf_side_title']}',
cf_class_title = '{$_POST['cf_class_title']}',
cf_shop_category = '{$_POST['cf_shop_category']}',
cf_item_category = '{$_POST['cf_item_category']}'";
EventHandler::triggerEvent("amber.admin.community_form_update");
sql_query($sql);
goto_url('./community_form.php');

View file

@ -211,7 +211,7 @@ $pg_anchor = '<ul class="anchor">
<li><a href="#anc_010">레이아웃 추가설정</a></li>
</ul>';
$frm_submit = '<div class="btn_confirm01 btn_confirm">
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
@ -224,15 +224,12 @@ 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']);
}
?>
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);"
enctype="multipart/form-data">
<input type="hidden" name="token" value="" id="token">
<section id="anc_001">
<h2 class="h2_frm">홈페이지 기본환경 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>홈페이지 기본환경 설정</caption>
@ -247,7 +244,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<th scope="row"><label for="cf_admin">최고관리자<strong class="sound_only">필수</strong></label></th>
<td colspan="3"><?php echo get_member_id_select('cf_admin', 10, $config['cf_admin'], 'required') ?></td>
</tr>
<tr>
<th>관리자 아이콘</th>
<td>
@ -259,7 +255,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
<input type="file" name="admin_icon_file" value="" size="50">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_admin_email">관리자 메일 주소<strong class="sound_only">필수</strong></label></th>
<td colspan="3">
@ -479,16 +474,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_002">
<h2 class="h2_frm">게시판 기본 설정</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p> 게시판 관리에서 개별적으로 설정 가능합니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>게시판 기본 설정</caption>
@ -570,16 +562,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_003">
<h2 class="h2_frm">회원가입 설정</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>회원가입 사용할 스킨과 입력 받을 정보 등을 설정할 있습니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>회원가입 설정</caption>
@ -707,249 +696,10 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_004" style="display: none;">
<h2 class="h2_frm">본인확인 설정</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>
회원가입 본인확인 수단을 설정합니다.<br>
실명과 휴대폰 번호 그리고 본인확인 당시에 성인인지의 여부를 저장합니다.<br>
게시판의 경우 본인확인 또는 성인여부를 따져 게시물 조회 쓰기 권한을 있습니다.
</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>본인확인 설정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cf_cert_use">본인확인</label></th>
<td>
<select name="cf_cert_use" id="cf_cert_use">
<?php echo option_selected("0", $config['cf_cert_use'], "사용안함"); ?>
<?php echo option_selected("1", $config['cf_cert_use'], "테스트"); ?>
<?php echo option_selected("2", $config['cf_cert_use'], "실서비스"); ?>
</select>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_ipin">아이핀 본인확인</label></th>
<td class="cf_cert_service">
<select name="cf_cert_ipin" id="cf_cert_ipin">
<?php echo option_selected("", $config['cf_cert_ipin'], "사용안함"); ?>
<?php echo option_selected("kcb", $config['cf_cert_ipin'], "코리아크레딧뷰로(KCB) 아이핀"); ?>
</select>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
<td class="cf_cert_service">
<select name="cf_cert_hp" id="cf_cert_hp">
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
<?php echo option_selected("kcp", $config['cf_cert_hp'], "NHN KCP 휴대폰 본인확인"); ?>
<?php echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인"); ?>
</select>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
<td class="cf_cert_service">
<?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?>
<input type="text" name="cf_cert_kcb_cd" value="<?php echo $config['cf_cert_kcb_cd'] ?>"
id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php"
target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
<a href="http://sir.kr/main/service/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스
신청페이지</a>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">NHN KCP 사이트코드</label></th>
<td class="cf_cert_service">
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
<span class="sitecode">SM</span>
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>"
id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php"
target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_lg_mid">LG유플러스 상점아이디</label></th>
<td class="cf_cert_service">
<?php echo help('LG유플러스 상점아이디 중 si_를 제외한 나머지 아이디만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.<br><strong>LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.</strong>') ?>
<span class="sitecode">si_</span>
<input type="text" name="cf_lg_mid" value="<?php echo $config['cf_lg_mid'] ?>" id="cf_lg_mid"
class="frm_input" size="20"> <a href="http://sir.kr/main/service/lg_cert.php" target="_blank"
class="btn_frmline">LG유플러스 본인확인 서비스 신청페이지</a>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td class="cf_cert_service">
<?php echo help('LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.') ?>
<input type="text" name="cf_lg_mert_key" value="<?php echo $config['cf_lg_mert_key'] ?>"
id="cf_lg_mert_key" class="frm_input" size="40">
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
<td class="cf_cert_service">
<?php echo help('하루동안 아이핀과 휴대폰 본인확인 인증 이용회수를 제한할 수 있습니다.<br>회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.<br>0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?>
<input type="text" name="cf_cert_limit" value="<?php echo $config['cf_cert_limit']; ?>" id="cf_cert_limit"
class="frm_input" size="3">
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_req">본인확인 필수</label></th>
<td class="cf_cert_service">
<?php echo help('회원가입 때 본인확인을 필수로 할지 설정합니다. 필수로 설정하시면 본인확인을 하지 않은 경우 회원가입이 안됩니다.'); ?>
<input type="checkbox" name="cf_cert_req" value="1" id="cf_cert_req" <?php echo get_checked($config['cf_cert_req'], 1); ?>> 예
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php //echo $frm_submit; ?>
<section id="anc_005" style="display: none;">
<h2 class="h2_frm">기본 메일 환경 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>기본 메일 환경 설정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cf_email_use">메일발송 사용</label></th>
<td>
<?php echo help('체크하지 않으면 메일발송을 아예 사용하지 않습니다. 메일 테스트도 불가합니다.') ?>
<input type="checkbox" name="cf_email_use" value="1" id="cf_email_use" <?php echo $config['cf_email_use'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_use_email_certify">메일인증 사용</label></th>
<td>
<?php echo help('메일에 배달된 인증 주소를 클릭하여야 회원으로 인정합니다.'); ?>
<input type="checkbox" name="cf_use_email_certify" value="1" id="cf_use_email_certify" <?php echo $config['cf_use_email_certify'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_formmail_is_member">폼메일 사용 여부</label></th>
<td>
<?php echo help('체크하지 않으면 비회원도 사용 할 수 있습니다.') ?>
<input type="checkbox" name="cf_formmail_is_member" value="1" id="cf_formmail_is_member" <?php echo $config['cf_formmail_is_member'] ? 'checked' : ''; ?>> 회원만 사용
</td>
</tr>
</table>
</div>
</section>
<?php // echo $frm_submit; ?>
<section id="anc_006" style="display: none;">
<h2 class="h2_frm">게시판 작성 메일 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>게시판 작성 메일 설정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cf_email_wr_super_admin">최고관리자</label></th>
<td>
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_wr_super_admin" value="1" id="cf_email_wr_super_admin" <?php echo $config['cf_email_wr_super_admin'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_email_wr_group_admin">그룹관리자</label></th>
<td>
<?php echo help('그룹관리자에게 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_wr_group_admin" value="1" id="cf_email_wr_group_admin" <?php echo $config['cf_email_wr_group_admin'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_email_wr_board_admin">게시판관리자</label></th>
<td>
<?php echo help('게시판관리자에게 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_wr_board_admin" value="1" id="cf_email_wr_board_admin" <?php echo $config['cf_email_wr_board_admin'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_email_wr_write">원글작성자</label></th>
<td>
<?php echo help('게시자님께 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_wr_write" value="1" id="cf_email_wr_write" <?php echo $config['cf_email_wr_write'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_email_wr_comment_all">댓글작성자</label></th>
<td>
<?php echo help('원글에 댓글이 올라오는 경우 댓글 쓴 모든 분들께 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_wr_comment_all" value="1" id="cf_email_wr_comment_all" <?php echo $config['cf_email_wr_comment_all'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php // echo $frm_submit; ?>
<section id="anc_007" style="display: none;">
<h2 class="h2_frm">회원가입 메일 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>회원가입 메일 설정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cf_email_mb_super_admin">최고관리자 메일발송</label></th>
<td>
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_mb_super_admin" value="1" id="cf_email_mb_super_admin" <?php echo $config['cf_email_mb_super_admin'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
<tr>
<th scope="row"><label for="cf_email_mb_member">회원님께 메일발송</label></th>
<td>
<?php echo help('회원가입한 회원님께 메일을 발송합니다.') ?>
<input type="checkbox" name="cf_email_mb_member" value="1" id="cf_email_mb_member" <?php echo $config['cf_email_mb_member'] ? 'checked' : ''; ?>> 사용
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php // echo $frm_submit; ?>
<section id="anc_008">
<h2 class="h2_frm">투표 기타의견 작성 메일 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>투표 기타의견 작성 메일 설정</caption>
@ -969,78 +719,13 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_009" style="display: none;">
<h2 class="h2_frm">소셜네트워크서비스(SNS : Social Network Service)</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>소셜네트워크서비스 설정</caption>
<colgroup>
<col class="grid_4">
<col>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cf_facebook_appid">페이스북 ID</label></th>
<td>
<input type="text" name="cf_facebook_appid" value="<?php echo $config['cf_facebook_appid'] ?>"
id="cf_facebook_appid" class="frm_input"> <a href="https://developers.facebook.com/apps" target="_blank"
class="btn_frmline"> 등록하기</a>
</td>
<th scope="row"><label for="cf_facebook_secret">페이스북 Secret</label></th>
<td>
<input type="text" name="cf_facebook_secret" value="<?php echo $config['cf_facebook_secret'] ?>"
id="cf_facebook_secret" class="frm_input" size="35">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
<td>
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>"
id="cf_twitter_key" class="frm_input"> <a href="https://dev.twitter.com/apps" target="_blank"
class="btn_frmline"> 등록하기</a>
</td>
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
<td>
<input type="text" name="cf_twitter_secret" value="<?php echo $config['cf_twitter_secret'] ?>"
id="cf_twitter_secret" class="frm_input" size="35">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_googl_shorturl_apikey">구글 짧은주소 API Key</label></th>
<td>
<input type="text" name="cf_googl_shorturl_apikey"
value="<?php echo $config['cf_googl_shorturl_apikey'] ?>" id="cf_googl_shorturl_apikey"
class="frm_input"> <a href="http://code.google.com/apis/console/" target="_blank"
class="btn_frmline">API Key 등록하기</a>
</td>
<th scope="row"><label for="cf_kakao_js_apikey">카카오 Javascript API Key</label></th>
<td>
<input type="text" name="cf_kakao_js_apikey" value="<?php echo $config['cf_kakao_js_apikey'] ?>"
id="cf_kakao_js_apikey" class="frm_input"> <a href="http://developers.kakao.com/" target="_blank"
class="btn_frmline"> 등록하기</a>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php //echo $frm_submit; ?>
<section id="anc_010">
<h2 class="h2_frm">레이아웃 추가설정</h2>
<?php echo $pg_anchor; ?>
<div class="local_desc02 local_desc">
<p>기본 설정된 파일 경로 script, css 추가하거나 변경할 있습니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>레이아웃 추가설정</caption>
@ -1061,102 +746,8 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_011" style="display: none;">
<h2 class="h2_frm">SMS</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>SMS 설정</caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="cf_sms_use">SMS 사용</label></th>
<td>
<select id="cf_sms_use" name="cf_sms_use">
<option value="" <?php echo get_selected($config['cf_sms_use'], ''); ?>>사용안함</option>
<option value="icode" <?php echo get_selected($config['cf_sms_use'], 'icode'); ?>>아이코드</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_sms_type">SMS 전송유형</label></th>
<td>
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 1500바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
<select id="cf_sms_type" name="cf_sms_type">
<option value="" <?php echo get_selected($config['cf_sms_type'], ''); ?>>SMS</option>
<option value="LMS" <?php echo get_selected($config['cf_sms_type'], 'LMS'); ?>>LMS</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디</label></th>
<td>
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id"
class="frm_input" size="20">
</td>
</tr>
<tr>
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호</label></th>
<td>
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw"
class="frm_input">
</td>
</tr>
<tr>
<th scope="row">요금제</th>
<td>
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
<?php
if ($userinfo['payment'] == 'A') {
echo '충전제';
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
} else if ($userinfo['payment'] == 'C') {
echo '정액제';
echo '<input type="hidden" name="cf_icode_server_port" value="7296">';
} else {
echo '가입해주세요.';
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
}
?>
</td>
</tr>
<tr>
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
<td>
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank"
class="btn_frmline">아이코드 회원가입</a>
</td>
</tr>
<?php if ($userinfo['payment'] == 'A') { ?>
<tr>
<th scope="row">충전 잔액</th>
<td colspan="3">
<?php echo number_format($userinfo['coin']); ?> 원.
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&amp;icode_passwd=<?php echo $config['cf_icode_pw']; ?>"
target="_blank" class="btn_frmline"
onclick="window.open(this.href,'icode_payment', 'scrollbars=1,resizable=1'); return false;">충전하기</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php // echo $frm_submit; ?>
</form>
<script>
$(function () {
<?php
@ -1212,6 +803,26 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
});
function fconfigform_submit(f) {
f.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(input => {
if (!input.checked && !f.querySelector(`input[type="hidden"][name="${input.name}"]`)) {
const hiddenInput = document.createElement('input');
hiddenInput.type = 'hidden';
hiddenInput.name = input.name;
hiddenInput.value = '';
f.appendChild(hiddenInput);
}
});
f.querySelectorAll('select[multiple]').forEach(select => {
if (select.selectedOptions.length === 0 && !f.querySelector(`input[type="hidden"][name="${select.name}"]`)) {
const hiddenInput = document.createElement('input');
hiddenInput.type = 'hidden';
hiddenInput.name = select.name;
hiddenInput.value = '';
f.appendChild(hiddenInput);
}
});
f.action = "./config_form_update.php";
return true;
}

View file

@ -15,10 +15,6 @@ if (!$mb['mb_id'])
check_admin_token();
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
if ($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
if (!$_POST['cf_cert_use']) {
$_POST['cf_cert_ipin'] = '';
$_POST['cf_cert_hp'] = '';
@ -38,7 +34,29 @@ if ($_FILES['admin_icon_file']['name']) {
upload_file($_FILES['admin_icon_file']['tmp_name'], $image_name, $site_style_path);
}
$check_keys = ['cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret', 'cf_cert_kg_cd', 'cf_cert_kg_mid'];
$check_keys = [
'cf_cert_kcb_cd',
'cf_cert_kcp_cd',
'cf_editor',
'cf_recaptcha_site_key',
'cf_recaptcha_secret_key',
'cf_naver_clientid',
'cf_naver_secret',
'cf_facebook_appid',
'cf_facebook_secret',
'cf_twitter_key',
'cf_twitter_secret',
'cf_google_clientid',
'cf_google_secret',
'cf_googl_shorturl_apikey',
'cf_kakao_rest_key',
'cf_kakao_client_secret',
'cf_kakao_js_apikey',
'cf_payco_clientid',
'cf_payco_secret',
'cf_cert_kg_cd',
'cf_cert_kg_mid'
];
foreach ($check_keys as $key) {
if (isset($_POST[$key]) && $_POST[$key]) {
@ -46,117 +64,244 @@ foreach ($check_keys as $key) {
}
}
$sql = " update {$g5['config_table']}
set cf_admin = '{$_POST['cf_admin']}',
cf_admin_email = '{$_POST['cf_admin_email']}',
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
cf_add_script = '{$_POST['cf_add_script']}',
cf_use_point = '{$_POST['cf_use_point']}',
cf_point_term = '{$_POST['cf_point_term']}',
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
cf_login_point = '{$_POST['cf_login_point']}',
cf_cut_name = '{$_POST['cf_cut_name']}',
cf_nick_modify = '{$_POST['cf_nick_modify']}',
cf_new_skin = '{$_POST['cf_new_skin']}',
cf_new_rows = '{$_POST['cf_new_rows']}',
cf_search_skin = '{$_POST['cf_search_skin']}',
cf_connect_skin = '{$_POST['cf_connect_skin']}',
cf_faq_skin = '{$_POST['cf_faq_skin']}',
cf_read_point = '{$_POST['cf_read_point']}',
cf_write_point = '{$_POST['cf_write_point']}',
cf_comment_point = '{$_POST['cf_comment_point']}',
cf_download_point = '{$_POST['cf_download_point']}',
cf_write_pages = '{$_POST['cf_write_pages']}',
cf_mobile_pages = '{$_POST['cf_mobile_pages']}',
cf_link_target = '{$_POST['cf_link_target']}',
cf_delay_sec = '{$_POST['cf_delay_sec']}',
cf_filter = '{$_POST['cf_filter']}',
cf_possible_ip = '" . trim($_POST['cf_possible_ip']) . "',
cf_intercept_ip = '" . trim($_POST['cf_intercept_ip']) . "',
cf_analytics = '{$_POST['cf_analytics']}',
cf_add_meta = '{$_POST['cf_add_meta']}',
cf_syndi_token = '{$_POST['cf_syndi_token']}',
cf_syndi_except = '{$_POST['cf_syndi_except']}',
cf_member_skin = '{$_POST['cf_member_skin']}',
cf_use_homepage = '{$_POST['cf_use_homepage']}',
cf_req_homepage = '{$_POST['cf_req_homepage']}',
cf_use_tel = '{$_POST['cf_use_tel']}',
cf_req_tel = '{$_POST['cf_req_tel']}',
cf_use_hp = '{$_POST['cf_use_hp']}',
cf_req_hp = '{$_POST['cf_req_hp']}',
cf_use_addr = '{$_POST['cf_use_addr']}',
cf_req_addr = '{$_POST['cf_req_addr']}',
cf_use_signature = '{$_POST['cf_use_signature']}',
cf_req_signature = '{$_POST['cf_req_signature']}',
cf_use_profile = '{$_POST['cf_use_profile']}',
cf_req_profile = '{$_POST['cf_req_profile']}',
cf_register_level = '{$_POST['cf_register_level']}',
cf_register_point = '{$_POST['cf_register_point']}',
cf_icon_level = '{$_POST['cf_icon_level']}',
cf_use_recommend = '{$_POST['cf_use_recommend']}',
cf_recommend_point = '{$_POST['cf_recommend_point']}',
cf_leave_day = '{$_POST['cf_leave_day']}',
cf_search_part = '{$_POST['cf_search_part']}',
cf_email_use = '{$_POST['cf_email_use']}',
cf_email_wr_super_admin = '{$_POST['cf_email_wr_super_admin']}',
cf_email_wr_group_admin = '{$_POST['cf_email_wr_group_admin']}',
cf_email_wr_board_admin = '{$_POST['cf_email_wr_board_admin']}',
cf_email_wr_write = '{$_POST['cf_email_wr_write']}',
cf_email_wr_comment_all = '{$_POST['cf_email_wr_comment_all']}',
cf_email_mb_super_admin = '{$_POST['cf_email_mb_super_admin']}',
cf_email_mb_member = '{$_POST['cf_email_mb_member']}',
cf_email_po_super_admin = '{$_POST['cf_email_po_super_admin']}',
cf_prohibit_id = '{$_POST['cf_prohibit_id']}',
cf_prohibit_email = '{$_POST['cf_prohibit_email']}',
cf_new_del = '{$_POST['cf_new_del']}',
cf_memo_del = '{$_POST['cf_memo_del']}',
cf_visit_del = '{$_POST['cf_visit_del']}',
cf_popular_del = '{$_POST['cf_popular_del']}',
cf_use_member_icon = '{$_POST['cf_use_member_icon']}',
cf_member_icon_size = '{$_POST['cf_member_icon_size']}',
cf_member_icon_width = '{$_POST['cf_member_icon_width']}',
cf_member_icon_height = '{$_POST['cf_member_icon_height']}',
cf_login_minutes = '{$_POST['cf_login_minutes']}',
cf_image_extension = '{$_POST['cf_image_extension']}',
cf_flash_extension = '{$_POST['cf_flash_extension']}',
cf_movie_extension = '{$_POST['cf_movie_extension']}',
cf_formmail_is_member = '{$_POST['cf_formmail_is_member']}',
cf_page_rows = '{$_POST['cf_page_rows']}',
cf_mobile_page_rows = '{$_POST['cf_mobile_page_rows']}',
cf_stipulation = '{$_POST['cf_stipulation']}',
cf_privacy = '{$_POST['cf_privacy']}',
cf_open_modify = '{$_POST['cf_open_modify']}',
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
cf_mobile_search_skin = '{$_POST['cf_mobile_search_skin']}',
cf_mobile_connect_skin = '{$_POST['cf_mobile_connect_skin']}',
cf_mobile_faq_skin = '{$_POST['cf_mobile_faq_skin']}',
cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}',
cf_captcha_mp3 = '{$_POST['cf_captcha_mp3']}',
cf_editor = '{$_POST['cf_editor']}',
cf_cert_use = '{$_POST['cf_cert_use']}',
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
cf_cert_hp = '{$_POST['cf_cert_hp']}',
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
cf_lg_mid = '{$_POST['cf_lg_mid']}',
cf_lg_mert_key = '{$_POST['cf_lg_mert_key']}',
cf_cert_limit = '{$_POST['cf_cert_limit']}',
cf_cert_req = '{$_POST['cf_cert_req']}',
cf_sms_use = '{$_POST['cf_sms_use']}',
cf_sms_type = '{$_POST['cf_sms_type']}',
cf_icode_id = '{$_POST['cf_icode_id']}',
cf_icode_pw = '{$_POST['cf_icode_pw']}',
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
cf_kakao_js_apikey = '{$_POST['cf_kakao_js_apikey']}',
cf_facebook_appid = '{$_POST['cf_facebook_appid']}',
cf_facebook_secret = '{$_POST['cf_facebook_secret']}',
cf_twitter_key = '{$_POST['cf_twitter_key']}',
cf_twitter_secret = '{$_POST['cf_twitter_secret']}' ";
sql_query($sql);
$fields = [
'cf_title',
'cf_theme',
'cf_admin',
'cf_admin_email',
'cf_admin_email_name',
'cf_add_script',
'cf_use_point',
'cf_point_term',
'cf_use_copy_log',
'cf_use_email_certify',
'cf_login_point',
'cf_cut_name',
'cf_nick_modify',
'cf_new_skin',
'cf_new_rows',
'cf_search_skin',
'cf_connect_skin',
'cf_faq_skin',
'cf_read_point',
'cf_write_point',
'cf_comment_point',
'cf_download_point',
'cf_write_pages',
'cf_mobile_pages',
'cf_link_target',
'cf_delay_sec',
'cf_filter',
'cf_possible_ip',
'cf_intercept_ip',
'cf_analytics',
'cf_add_meta',
'cf_syndi_token',
'cf_syndi_except',
'cf_member_skin',
'cf_use_homepage',
'cf_req_homepage',
'cf_use_tel',
'cf_req_tel',
'cf_use_hp',
'cf_req_hp',
'cf_use_addr',
'cf_req_addr',
'cf_use_signature',
'cf_req_signature',
'cf_use_profile',
'cf_req_profile',
'cf_register_level',
'cf_register_point',
'cf_icon_level',
'cf_use_recommend',
'cf_recommend_point',
'cf_leave_day',
'cf_search_part',
'cf_email_use',
'cf_email_wr_super_admin',
'cf_email_wr_group_admin',
'cf_email_wr_board_admin',
'cf_email_wr_write',
'cf_email_wr_comment_all',
'cf_email_mb_super_admin',
'cf_email_mb_member',
'cf_email_po_super_admin',
'cf_prohibit_id',
'cf_prohibit_email',
'cf_new_del',
'cf_memo_del',
'cf_visit_del',
'cf_popular_del',
'cf_use_member_icon',
'cf_member_icon_size',
'cf_member_icon_width',
'cf_member_icon_height',
'cf_login_minutes',
'cf_image_extension',
'cf_flash_extension',
'cf_movie_extension',
'cf_formmail_is_member',
'cf_page_rows',
'cf_mobile_page_rows',
'cf_stipulation',
'cf_privacy',
'cf_open_modify',
'cf_memo_send_point',
'cf_mobile_new_skin',
'cf_mobile_search_skin',
'cf_mobile_connect_skin',
'cf_mobile_faq_skin',
'cf_mobile_member_skin',
'cf_captcha_mp3',
'cf_editor',
'cf_cert_use',
'cf_cert_ipin',
'cf_cert_hp',
'cf_cert_kcb_cd',
'cf_cert_kcp_cd',
'cf_lg_mid',
'cf_lg_mert_key',
'cf_cert_limit',
'cf_cert_req',
'cf_sms_use',
'cf_sms_type',
'cf_icode_id',
'cf_icode_pw',
'cf_icode_server_ip',
'cf_icode_server_port',
'cf_googl_shorturl_apikey',
'cf_facebook_appid',
'cf_facebook_secret',
'cf_twitter_key',
'cf_twitter_secret',
'cf_kakao_js_apikey',
'cf_optimize_date',
'cf_add_fonts',
'cf_bgm',
'cf_open',
'cf_twitter',
'cf_side_title',
'cf_class_title',
'cf_shop_category',
'cf_item_category',
'cf_site_descript',
'cf_site_img',
'cf_favicon',
'cf_character_count',
'cf_search_count',
'cf_status_point',
'cf_money',
'cf_money_pice',
'cf_exp_name',
'cf_exp_pice',
'cf_rank_name',
'cf_1',
'cf_2',
'cf_3',
'cf_4',
'cf_5',
'cf_6',
'cf_7',
'cf_8',
'cf_9',
'cf_10',
'cf_use_http'
];
$trims = ['cf_possible_ip', 'cf_intercept_ip'];
$zero_fields = [
'cf_use_point',
'cf_point_term',
'cf_use_copy_log',
'cf_use_email_certify',
'cf_login_point',
'cf_cut_name',
'cf_nick_modify',
'cf_new_rows',
'cf_read_point',
'cf_write_point',
'cf_comment_point',
'cf_download_point',
'cf_write_pages',
'cf_mobile_pages',
'cf_delay_sec',
'cf_use_homepage',
'cf_req_homepage',
'cf_use_tel',
'cf_req_tel',
'cf_use_hp',
'cf_req_hp',
'cf_use_addr',
'cf_req_addr',
'cf_use_signature',
'cf_req_signature',
'cf_use_profile',
'cf_req_profile',
'cf_register_level',
'cf_register_point',
'cf_icon_level',
'cf_use_recommend',
'cf_recommend_point',
'cf_leave_day',
'cf_search_part',
'cf_email_use',
'cf_email_wr_super_admin',
'cf_email_wr_group_admin',
'cf_email_wr_board_admin',
'cf_email_wr_write',
'cf_email_wr_comment_all',
'cf_email_mb_super_admin',
'cf_email_mb_member',
'cf_email_po_super_admin',
'cf_new_del',
'cf_memo_del',
'cf_visit_del',
'cf_popular_del',
'cf_use_member_icon',
'cf_member_icon_size',
'cf_member_icon_width',
'cf_member_icon_height',
'cf_login_minutes',
'cf_formmail_is_member',
'cf_page_rows',
'cf_mobile_page_rows',
'cf_open_modify',
'cf_memo_send_point',
'cf_cert_use',
'cf_cert_limit',
'cf_cert_req',
'cf_character_count',
'cf_search_count',
'cf_status_point',
'cf_use_http'
];
$date_fields = ['cf_optimize_date'];
$updates = [];
foreach ($fields as $field) {
if (array_key_exists($field, $_POST)) {
$value = $_POST[$field];
if (in_array($field, $trims)) {
$value = trim($value);
}
if (in_array($field, $zero_fields) && $value == '') {
$value = '0';
}
if (in_array($field, $date_fields) && $value == '') {
$value = '0000-00-00';
}
$updates[] = "{$field} = '{$value}'";
}
}
if (!empty($updates)) {
$sql = "UPDATE {$g5['config_table']} SET " . implode(', ', $updates);
sql_query($sql);
}
EventHandler::triggerEvent("gnuboard.admin.config_form_update");

View file

@ -97,7 +97,7 @@ $result = sql_query($sql);
<?php
}
if ($i == 0) {
echo '<tr><td colspan="4" class="empty_table">자료가 한건도 없습니다.</td></tr>';
echo '<tr><td colspan="4" class="empty_table">생성된 페이지가 없습니다.</td></tr>';
}
?>
</tbody>

View file

@ -0,0 +1,219 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['couple_table']} ";
$sql_search = " where (1) ";
if (!$sst) {
$sst = "co_order";
$sod = "asc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$mb = array();
$g5['title'] = '커플 관리';
include_once './admin.head.php';
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">커플 목록</a></li>
<li><a href="#anc_002">커플 추가</a></li>
</ul>';
$colspan = 5;
?>
<form name="fpointlist" id="fpointlist" method="post" action="./couple_list_delete.php"
onsubmit="return fpointlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<section id="anc_001">
<h2 class="h2_frm">커플 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?> 커플
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 120px;" />
<col style="width: 120px;" />
<col />
<col style="width: 50px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only">커플 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>왼쪽</th>
<th>오른족</th>
<th><?php echo subject_sort_link('co_date') ?>사귄날짜</a></th>
<th><?php echo subject_sort_link('co_order') ?>순서</a></th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$ch_left = sql_fetch("select ch_thumb, ch_name, ch_id from {$g5['character_table']} where ch_id = '{$row['co_left']}'");
$ch_right = sql_fetch("select ch_thumb, ch_name, ch_id from {$g5['character_table']} where ch_id = '{$row['co_right']}'");
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="co_id[<?php echo $i ?>]" value="<?php echo $row['co_id'] ?>"
id="co_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only">tt</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<a href=""><img src="<?= $ch_left['ch_thumb'] ?>" /></a>
</td>
<td>
<a href=""><img src="<?= $ch_right['ch_thumb'] ?>" /></a>
</td>
<td>
<?= $row['co_date'] ?>
</td>
<td>
<?= $row['co_order'] ?>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
</form>
<section id="anc_002">
<h2 class="h2_frm">커플 추가</h2>
<?php echo $pg_anchor ?>
<?php
include_once G5_PLUGIN_PATH . '/jquery-ui/datepicker.php';
if (empty($fr_date))
$fr_date = G5_TIME_YMD;
?>
<form name="fpointlist2" method="post" id="fpointlist2" action="./couple_update.php" autocomplete="off">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="ch_name_left">왼쪽 캐릭터<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="co_left" id="co_left" value="<?php echo $co_left ?>" />
<input type="text" name="ch_name_left" value="" id="ch_name_left"
onkeyup="get_ajax_character(this, 'character_left_list', 'co_left');" />
<div id="character_left_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row"><label for="ch_name_right">오른쪽 캐릭터<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="co_right" id="co_right" value="<?php echo $co_right ?>" />
<input type="text" name="ch_name_right" value="" id="ch_name_right"
onkeyup="get_ajax_character(this, 'character_right_list', 'co_right');" />
<div id="character_right_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row"><label for="co_order">순서<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="co_order" id="co_order" required class="required" style="width: 50px;"></td>
</tr>
<tr>
<th scope="row"><label for="co_date">시작일</label></th>
<td><input type="text" name="co_date" value="<?php echo $co_date; ?>" id="co_date"></td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
$(function () {
$("#co_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
});
</script>
<script>
function fpointlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';
?>

View file

@ -0,0 +1,23 @@
<?php
include_once './_common.php';
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 포인트 내역삭제
$sql = " delete from {$g5['couple_table']} where co_id = '{$_POST['co_id'][$k]}' ";
sql_query($sql);
}
goto_url('./couple_list.php?' . $qstr);

View file

@ -0,0 +1,35 @@
<?php
/**
* @var string $ch_name_left
* @var string $ch_name_right
*/
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
if (!$co_left && $ch_name_left) {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_name = '{$ch_name_left}'");
$co_left = $ch['ch_id'];
if (!$co_left)
alert("존재하지 않는 캐릭터 입니다.");
}
if (!$co_right && $ch_name_right) {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_name = '{$ch_name_right}'");
$co_right = $ch['ch_id'];
if (!$co_right)
alert("존재하지 않는 캐릭터 입니다.");
}
$sql_common = " co_left = '{$_POST['co_left']}',
co_right = '{$_POST['co_right']}',
co_order = '{$_POST['co_order']}',
co_date = '{$_POST['co_date']}' ";
$sql = " insert into {$g5['couple_table']}
set $sql_common ";
sql_query($sql);
goto_url('./couple_list.php?' . $qstr);

View file

@ -199,6 +199,9 @@ label+input {
margin-left: 10px;
}
input[type=checkbox] {
margin-left: 0;
}
.txt-center {
text-align: center !important;
@ -643,6 +646,10 @@ table {
border-left-width: 0px !important;
}
table .side-image {
max-width: 100%;
}
.index-gnb {
display: block;
font-size: 13px;
@ -821,7 +828,7 @@ table {
height: 220px;
background-image: var(--bg);
background-size: cover;
background-position: center;
background-position: center;
}
#theme_list li .tmli_if>img {
@ -1040,3 +1047,89 @@ table {
.footer-copyright a {
color: #A0A0A0;
}
table span.dbchk {
display: flex;
align-items: center;
gap: 8px;
}
table i.dbchk.bi {
font-size: 16px;
}
table i.dbchk.bi.bi-x-circle {
color: #800000;
}
.grid_1 {
width: 50px
}
.grid_2 {
width: 100px
}
.grid_3 {
width: 150px
}
.grid_4 {
width: 200px
}
.grid_5 {
width: 250px
}
.grid_6 {
width: 300px
}
.grid_7 {
width: 350px
}
.grid_8 {
width: 400px
}
.grid_9 {
width: 450px
}
.grid_10 {
width: 500px
}
.grid_11 {
width: 550px
}
.grid_12 {
width: 600px
}
.grid_13 {
width: 650px
}
.grid_14 {
width: 700px
}
.grid_15 {
width: 750px
}
.grid_16 {
width: 800px
}
.grid_17 {
width: 850px
}
.grid_18 {
width: 900px
}

View file

@ -187,6 +187,7 @@ body {
display: flex;
justify-content: end;
padding: 16px;
gap: 8px;
}
.list_confirm>* {
@ -341,7 +342,7 @@ body {
margin: 0;
}
#fsearch .btn_submit {
form .btn_submit {
border: none;
background: var(--theme-color-c);
color: #fff;

View file

@ -16,9 +16,9 @@ if (!$sst) {
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
@ -29,10 +29,10 @@ if ($page < 1)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';

View file

@ -0,0 +1,246 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['exp_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'mb_name':
$temp_mb = sql_fetch("select mb_id, mb_10 from {$g5['member_table']} where mb_nick = '{$stx}'");
$sql_search .= " (ch_id = '{$temp_mb['mb_10']}') ";
break;
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "ex_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$mb = array();
if ($sfl == 'mb_id' && $stx)
$mb = get_member($stx);
$g5['title'] = $config['cf_exp_name'] . ' 관리';
include_once './admin.head.php';
$colspan = 7;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">' . $config['cf_exp_name'] . ' 지급/회수</a></li>
<li><a href="#anc_002">' . $config['cf_exp_name'] . ' 내역</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
?>
<form name="fpointlist2" method="post" id="fpointlist2" action="./exp_update.php" autocomplete="off">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<section id="anc_001">
<h2 class="h2_frm"><?= $config['cf_exp_name'] ?> 지급/회수</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">지급유형</th>
<td>
<input type="radio" id="take_type_01" name="take_type" value="P" checked
onclick="if(document.getElementById('take_type_01').checked) $('#take_member_name').show();" />
<label for="take_type_01">개별지급</label>
&nbsp;&nbsp;
<input type="radio" id="take_type_02" name="take_type" value="A"
onclick="if(document.getElementById('take_type_02').checked) $('#take_member_name').hide();" />
<label for="take_type_02">전체지급</label>
</td>
</tr>
<tr id="take_member_name">
<th scope="row"><label for="ch_name">캐릭터 이름<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="ch_id" id="ch_id" value="" />
<input type="text" name="ch_name" value="" id="ch_name"
onkeyup="get_ajax_character(this, 'character_list', 'ch_id');" />
<div id="character_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row"><label for="ex_content">지급 내용<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="ex_content" id="ex_content" required class="required frm_input" size="80">
</td>
</tr>
<tr>
<th scope="row"><label for="ex_point"><?= $config['cf_exp_name'] ?><strong
class="sound_only">필수</strong></label></th>
<td><input type="text" name="ex_point" id="ex_point" required class="required frm_input"></td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
<section id="anc_002">
<h2 class="h2_frm"><?= $config['cf_exp_name'] ?> 내역</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
<?php
if (isset($mb['mb_id']) && $mb['mb_id']) {
echo '&nbsp;(' . $mb['mb_id'] . ' 님 골드 합계 : ' . number_format($mb['mb_point']) . '점)';
} else {
$row2 = sql_fetch(" select sum(ex_point) as sum_point from {$g5['exp_table']} ");
echo '&nbsp;(전체 합계 ' . number_format($row2['sum_point']) . '점)';
}
?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터이름</option>
<option value="mb_name" <?php echo get_selected($_GET['sfl'], "mb_name"); ?>>오너이름</option>
<option value="ex_content" <?php echo get_selected($_GET['sfl'], "ex_content"); ?>>내용</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<br>
<form name="fpointlist" id="fpointlist" method="post" action="./exp_list_delete.php"
onsubmit="return fpointlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 45px;" />
<col style="width: 100px;" />
<col style="width: 150px;" />
<col />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only"><?= $config['cf_exp_name'] ?> 지급 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>오너명</th>
<th>캐릭터 이름</th>
<th>지급 내용</th>
<th><?= $config['cf_exp_name'] ?></th>
<th>일시</th>
<th><?= $config['cf_exp_name'] ?> 합계</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
$ch = get_character($row['ch_id']);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ch_id[<?php echo $i ?>]" value="<?php echo $row['ch_id'] ?>"
id="ch_id_<?php echo $i ?>">
<input type="hidden" name="ex_id[<?php echo $i ?>]" value="<?php echo $row['ex_id'] ?>"
id="ex_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['ex_content'] ?> 내역</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td><?= get_member_name($ch['mb_id']) ?></td>
<td><a href="?sfl=ch_name&amp;stx=<?php echo $row['ch_name'] ?>"><?php echo $row['ch_name'] ?></a></td>
<td class="txt-left"><?php echo $row['ex_content'] ?></td>
<td><?php echo number_format($row['ex_point']) ?></td>
<td><?php echo $row['ex_datetime'] ?></td>
<td><?php echo number_format($row['ex_ch_exp']) ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<script>
function fpointlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,51 @@
<?php
include_once './_common.php';
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ch_id = $_POST['ch_id'][$k];
$ch = sql_fetch("select ch_id, ch_name, ch_exp, ch_rank, ch_point from {$g5['character_table']} where ch_id = '{$ch_id}'");
// 포인트 내역정보
$sql = " select * from {$g5['exp_table']} where ex_id = '{$_POST['ex_id'][$k]}' ";
$row = sql_fetch($sql);
if (!$row['ex_id'])
continue;
// 포인트 내역삭제
$sql = " delete from {$g5['exp_table']} where ex_id = '{$_POST['ex_id'][$k]}' ";
sql_query($sql);
// ex_ch_exp에 반영
$sql = " update {$g5['exp_table']}
set ex_ch_exp = ex_ch_exp - '{$row['ex_point']}'
where ch_id = '{$ch_id}'
and ex_id > '{$_POST['ex_id'][$k]}' ";
sql_query($sql);
// 포인트 UPDATE
$sum_point = get_exp_sum($ch_id);
$sql = " update {$g5['character_table']} set ch_exp = '$sum_point' where ch_id = '{$ch_id}' ";
sql_query($sql);
$rank_info = get_rank_exp($sum_point, $ch_id);
// 기존 랭크에서 변동이 있을 경우에만 실행
if ($ch['ch_rank'] != $rank_info['rank']) {
$state_point = $ch['ch_point'] + $rank_info['add_point'];
// 스탯 포인트 변동 사항 및 랭크 변동사항 저장
$rank_up_sql = " update {$g5['character_table']} set ch_rank = '{$rank_info['rank']}', ch_point = '{$state_point}' where ch_id = '$ch_id' ";
sql_query($rank_up_sql);
}
}
goto_url('./exp_list.php?' . $qstr);

View file

@ -0,0 +1,48 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
$ch_id = $_POST['ch_id'];
$ch_name = $_POST['ch_name'];
$ex_point = $_POST['ex_point'];
$ex_content = $_POST['ex_content'];
$action = '획득';
if ($ex_point < 0) {
$action = '차감';
}
if ($take_type == 'A') {
// 전체지급
$sql_common = " from {$g5['character_table']} ";
$sql_search = " where ch_state = '승인' ";
$sql = " select * {$sql_common} {$sql_search} ";
$result = sql_query($sql);
for ($i = 0; $ch = sql_fetch_array($result); $i++) {
if (($ex_point < 0) && ($ex_point * (-1) > $ch['ch_exp']))
continue;
insert_exp($ch['ch_id'], $ex_point, $ex_content, $action);
}
} else {
// 개별지급
if (!$ch_id && $ch_name) {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_name = '{$ch_name}'");
$ch_id = $ch['ch_id'];
} else {
$ch = sql_fetch("select ch_id, ch_name, ch_exp from {$g5['character_table']} where ch_id = '{$ch_id}'");
}
if (!$ch['ch_id'])
alert('존재하는 캐릭터가 아닙니다.');
if (($ex_point < 0) && ($ex_point * (-1) > $ch['ch_exp']))
alert('경험치를 차감하는 경우 현재 경험치보다 작으면 안됩니다.');
insert_exp($ch['ch_id'], $ex_point, $ex_content, $action);
}
goto_url('./exp_list.php?' . $qstr);

View file

@ -0,0 +1,284 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['explorer_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if ($sch_it_id) {
$sql_search .= " and it_id = '{$sch_it_id}' ";
}
if (!$sst) {
$sst = "ie_id";
$sod = "desc";
}
$sql_order = " order by it_id asc, {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '아이템 뽑기 관리';
include_once './admin.head.php';
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">뽑기 설정 목록</a></li>
<li><a href="#anc_002">뽑기 등록</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
$colspan = 5;
if ($sch_it_id) {
$sch_it = get_item($sch_it_id);
$sch_it_name = $sch_it['it_name'];
$sch_it_img = $sch_it['it_img'];
}
?>
<section id="anc_001">
<h2 class="h2_frm">뽑기 설정 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
등록된 뽑기 설정 <?php echo number_format($total_count) ?>
</div>
<?php if ($sch_it_name) { ?>
<div style="padding-bottom: 10px;">
<img src="<?= $sch_it_img ?>" style="width: 50px;" />
[ <?= $sch_it_name ?> ] 뽑기 설정
</div>
<?php } ?>
<form name="ftitlelist" id="ftitlelist" action="./explorer_list_update.php" method="post"
enctype="multipart/form-data">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="sch_it_id" value="<?php echo $sch_it_id ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 45px;" />
<col style="width: 100px;" />
<col style="width: 200px;" />
<col style="width: 100px;" />
<col style="width: 200px;" />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 타이틀 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th colspan="2">뽑기아이템</th>
<th colspan="2">획득아이템</th>
<th>획득구간</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $ie = sql_fetch_array($result); $i++) {
$it = sql_fetch("select it_id, it_name, it_img from {$g5['item_table']} where it_id = '{$ie['it_id']}'");
$re_it = sql_fetch("select it_id, it_name, it_img from {$g5['item_table']} where it_id = '{$ie['re_it_id']}'");
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ie_id[<?php echo $i ?>]" value="<?php echo $ie['ie_id'] ?>"
id="ie_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<?php if ($it['it_img']) { ?>
<img src="<?= $it['it_img'] ?>" style="max-width: 50px;" />
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td>
<a href="?sch_it_id=<?= $it['it_id'] ?>"><?= $it['it_name'] ?></a>
</td>
<td>
<?php if ($re_it['it_img']) { ?>
<img src="<?= $re_it['it_img'] ?>" style="max-width: 50px;" />
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td>
<?= $re_it['it_name'] ?>
</td>
<td>
<input type="text" name="ie_per_s[<?php echo $i ?>]" value="<?php echo $ie['ie_per_s']; ?>" size="5"
maxlength="11">
~
<input type="text" name="ie_per_e[<?php echo $i ?>]" value="<?php echo $ie['ie_per_e']; ?>" size="5"
maxlength="11"> 구간 획득
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
$(function () {
$('#ftitlelist').submit(function () {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
});
});
</script>
</section>
<?php
if (!$sch_it_id || $sch_it['it_type'] == '뽑기') {
?>
<section id="anc_002" style="margin-top: 0; margin-bottom: 50px;">
<form name="fexplorerlist2" method="post" id="fexplorerlist2" action="./explorer_update.php" autocomplete="off"
enctype="multipart/form-data">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<input type="hidden" name="sch_it_id" value="<?php echo $sch_it_id ?>">
<h2 class="h2_frm">뽑기 등록</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">뽑기 아이템</th>
<td>
<?php if ($sch_it_name) { ?>
<input type="hidden" name="it_id" value="<?= $sch_it_id ?>" />
<input type="hidden" name="it_name" value="<?= $sch_it_name ?>" />
<img src="<?= $sch_it_img ?>" alt="" style="max-width: 50px;" /> <?= $sch_it_name ?>
<?php } else { ?>
<?php echo help("※ [ 아이템 기능 - 뽑기 아이템 ] 이 설정되어 있어야 적용됩니다.") ?>
<input type="hidden" name="it_id" id="it_id" value="<?= $sch_it_id ?>" />
<input type="text" name="it_name" value="<?= $sch_it_name ?>" id="it_name"
onkeyup="get_ajax_item(this, 'item_list', 'it_id', '뽑기');" />
<div id="item_list" class="ajax-list-box">
<div class="list"></div>
</div>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row">획득 아이템</th>
<td>
<input type="hidden" name="re_it_id" id="re_it_id" value="" />
<input type="text" name="re_it_name" value="" id="re_it_name"
onkeyup="get_ajax_item(this, 're_item_list', 're_it_id');" />
<div id="re_item_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">획득구간</th>
<td>
<?php echo help("※ 100면체 주사위를 굴렸을 때 나오는 숫자 중 획득 가능 범위를 지정해 주시길 바랍니다. (0~100)<br />※ 다수의 구간이 겹칠 시,랜덤으로 획득 됩니다.") ?>
<input type="text" name="ie_per_s" value="" size="5" maxlength="11">
~
<input type="text" name="ie_per_e" value="" size="5" maxlength="11"> 구간 획득
</td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="등록" class="btn_submit" id="btn_submit">
</div>
</form>
</section>
<?php } ?>
<?php
include_once './admin.tail.php';
?>

View file

@ -0,0 +1,44 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ie = sql_fetch("select * from {$g5['explorer_table']} where ie_id = '{$_POST['ie_id'][$k]}'");
if (!$ie['ie_id']) {
$msg .= $ie['ie_id'] . ' : 설정 자료가 존재하지 않습니다.\\n';
} else {
$sql_common = "";
$sql = " update {$g5['explorer_table']}
set ie_per_s = '{$_POST['ie_per_s'][$k]}',
ie_per_e = '{$_POST['ie_per_e'][$k]}'
where ie_id = '{$ie['ie_id']}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ie = sql_fetch("select * from {$g5['explorer_table']} where ie_id = '{$_POST['ie_id'][$k]}'");
if (!$ie['ie_id']) {
$msg .= $ie['ie_id'] . ' : 설정 자료가 존재하지 않습니다.\\n';
} else {
sql_query(" delete from {$g5['explorer_table']} where ie_id = '{$ie['ie_id']}' ");
}
}
}
if ($msg)
alert($msg);
goto_url('./explorer_list.php?sch_it_id=' . $sch_it_id . '&' . $qstr);

View file

@ -0,0 +1,38 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
/** 획득 아이템 설정 등록 **/
$sql_common = "";
if (!$it_id && $it_name) {
$it = sql_fetch("select it_id, it_type from {$g5['item_table']} where it_name = '{$it_name}'");
if ($it['it_type'] != '뽑기') {
alert("해당 아이템은 뽑기 기능이 설정되지 않은 아이템입니다.");
}
$it_id = $it['it_id'];
}
if (!$re_it_id && $re_it_name) {
$it = sql_fetch("select it_id from {$g5['item_table']} where it_name = '{$re_it_name}'");
$re_it_id = $it['it_id'];
}
$sql = " insert into {$g5['explorer_table']}
set it_id = '{$it_id}',
re_it_id = '{$re_it_id}',
ie_per_s = '{$ie_per_s}',
ie_per_e = '{$ie_per_e}',
ma_id = '{$ma_id}',
ie_1 = '{$ie_1}',
ie_2 = '{$ie_2}',
ie_3 = '{$ie_3}',
ie_4 = '{$ie_4}',
ie_5 = '{$ie_5}'
";
sql_query($sql);
goto_url('./explorer_list.php?sch_it_id=' . $sch_it_id . '&' . $qstr);

View file

@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
check_site_auth();
$begin_time = get_microtime();
$begin_time = microtime(true);
if (!isset($g5['title'])) {
$g5['title'] = $config['cf_title'];

View file

@ -0,0 +1,243 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['inventory_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "in_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$ch = array();
if ($sfl == 'ch_id' && $stx)
$ch = get_member($stx);
$g5['title'] = '아이템 보유현황 관리';
include_once './admin.head.php';
$colspan = 8;
if (strstr($sfl, "ch_id"))
$ch_id = $stx;
else
$ch_id = "";
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">아이템 지급</a></li>
<li><a href="#anc_002">아이템 보유 목록</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
?>
<form name="fpointlist2" method="post" id="fpointlist2" action="./inventory_update.php" autocomplete="off">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<input type="hidden" name="it_rel" value="SYSTEM" />
<section id="anc_001">
<h2 class="h2_frm">캐릭터 아이템 지급</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">지급유형</th>
<td>
<input type="radio" id="take_type_01" name="take_type" value="P" checked
onclick="if(document.getElementById('take_type_01').checked) $('#take_member_name').show();" />
<label for="take_type_01">개별지급</label>
&nbsp;&nbsp;
<input type="radio" id="take_type_02" name="take_type" value="A"
onclick="if(document.getElementById('take_type_02').checked) $('#take_member_name').hide();" />
<label for="take_type_02">전체지급</label>
</td>
</tr>
<tr id="take_member_name">
<th scope="row">캐릭터 이름</th>
<td>
<?php echo help('개별지급 시 입력') ?>
<input type="hidden" name="ch_id" id="ch_id" value="" />
<input type="text" name="ch_name" value="" id="ch_name"
onkeyup="get_ajax_character(this, 'character_list', 'ch_id');" />
<div id="character_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">아이템 이름</th>
<td>
<input type="hidden" name="it_id" id="it_id" value="" />
<input type="text" name="it_name" value="" id="it_name"
onkeyup="get_ajax_item(this, 'item_list', 'it_id');" />
<input type="text" name="item_count" value="" style="width:50px;" />
<div id="item_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?= $frm_submit ?>
</form>
<section id="anc_002">
<h2 class="h2_frm">아이템 보유 현황</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
<option value="it_name" <?php echo get_selected($_GET['sfl'], "it_name"); ?>>아이템 이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<br>
<form name="fitemlist" id="fitemlist" method="post" action="./inventory_list_delete.php"
onsubmit="return fitemlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 120px;" />
<col style="width: 80px;" />
<col style="width: 180px;" />
<col style="width: 120px;" />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">소지품 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">소유자</a></th>
<th scope="col" colspan="2">아이템 이름</a></th>
<th scope="col">보낸사람</th>
<th scope="col">메모</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
$it = get_item($row['it_id']);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="in_id[<?php echo $i ?>]" value="<?php echo $row['in_id'] ?>"
id="in_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only">내역</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td class="txt-left"><?php echo get_text($row['ch_name']); ?></td>
<td>
<?php if ($it['it_img']) { ?>
<img src="<?= $it['it_img'] ?>" style="max-width: 30px;" />
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td class="txt-left">
<?php echo get_text($row['it_name']); ?>
</td>
<td class="txt-left"><?= $row['se_ch_name'] ?></td>
<td class="txt-left"><?php echo $row['in_memo'] ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<script>
function fitemlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,21 @@
<?php
include_once './_common.php';
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 아이템 내역삭제
$sql = " delete from {$g5['inventory_table']} where in_id = '{$_POST['in_id'][$k]}' ";
sql_query($sql);
}
goto_url('./inventory_list.php?' . $qstr);

View file

@ -0,0 +1,52 @@
<?php
/**
* @var string $it_name
* @var string $ch_name
*/
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
if (!$it_id && $it_name) {
$it = sql_fetch("select * from {$g5['item_table']} where it_name = '{$it_name}'");
if (!$it['it_id']) {
alert("해당 아이템의 정보가 없습니다.");
}
$it_id = $it['it_id'];
} else {
$it = sql_fetch("select * from {$g5['item_table']} where it_id = '{$it_id}'");
if (!$it['it_id']) {
alert("해당 아이템의 정보가 없습니다.");
}
}
$item_count = $item_count ? $item_count : 1;
if ($take_type == 'A') {
// 전체지급
$sql_common = " from {$g5['character_table']} ";
$sql_search = " where ch_state = '승인' ";
$sql = " select ch_id, ch_name {$sql_common} {$sql_search} ";
$result = sql_query($sql);
for ($i = 0; $ch = sql_fetch_array($result); $i++) {
insert_inventory($ch['ch_id'], $it_id, $it, $item_count);
}
} else {
// 개별지급
if (!$ch_id && $ch_name) {
$ch = sql_fetch("select ch_id, ch_name from {$g5['character_table']} where ch_name = '{$ch_name}'");
$ch_id = $ch['ch_id'];
} else {
$ch = sql_fetch("select ch_id, ch_name from {$g5['character_table']} where ch_id = '{$ch_id}'");
}
if (!$ch['ch_id'])
alert('존재하는 캐릭터가 아닙니다.');
insert_inventory($ch['ch_id'], $it_id, $it, $item_count);
}
goto_url('./inventory_list.php?' . $qstr);

View file

@ -0,0 +1,308 @@
<?php
include_once './_common.php';
include_once G5_EDITOR_LIB;
auth_check($auth[$sub_menu], 'w');
$category = explode("||", $config['cf_item_category']);
$html_title = '아이템';
$required = "";
$readonly = "";
if ($w == '') {
$html_title .= ' 생성';
$required = 'required';
$required_valid = 'alnum_';
$sound_only = '<strong class="sound_only">필수</strong>';
$item['it_use'] = 'Y';
} else if ($w == 'u') {
$html_title .= ' 수정';
$item = sql_fetch("select * from {$g5['item_table']} where it_id = '{$it_id}'");
if (!$item['it_id'])
alert('존재하지 않는 아이템 입니다.');
$readonly = 'readonly';
}
$g5['title'] = $html_title;
include_once './admin.head.php';
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">기본 설정</a></li>';
if ($config['cf_4']) {
$pg_anchor .= '<li><a href="#anc_002">탐색 설정</a></li>';
}
$pg_anchor .= '</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./item_list.php?' . $qstr . '">목록</a>' . PHP_EOL;
$frm_submit .= '</div>';
?>
<form name="fitemform" id="fitemform" action="./item_form_update.php" onsubmit="return fitemform_submit(this)"
method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="it_id" value="<?php echo $it_id ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<section id="anc_001">
<h2 class="h2_frm">아이템 기본 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>아이템 기본 설정</caption>
<colgroup>
<col style="width: 130px;">
<col style="width: 100px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">사용여부</th>
<td colspan="2">
<input type="checkbox" name="it_use" id="it_use" value="Y" <?= $item['it_use'] == 'Y' ? "checked" : "" ?> />
</td>
</tr>
<tr>
<th scope="row">아이템 분류</th>
<td colspan="2">
<select name="it_category">
<option value="일반" <?= $item['it_category'] == "일반" ? "selected" : "" ?>>일반 아이템</option>
<option value="개인" <?= $item['it_category'] == "개인" ? "selected" : "" ?>>개인 아이템</option>
<option value="출석" <?= $item['it_category'] == "출석" ? "selected" : "" ?>>출석 아이템</option>
</select>
</td>
</tr>
<tr>
<th scope="row" rowspan="2">아이템 기능</th>
<td>
기능종류
</td>
<td colspan="2">
<select name="it_type" onchange="fn_type_chage(this);">
<?php for ($k = 0; $k < count($category); $k++) {
if (!$category[$k])
continue;
?>
<option value="<?= $category[$k] ?>" <?= $item['it_type'] == $category[$k] ? "selected" : "" ?>>
<?= $category[$k] ?></option>
<?php } ?>
<option value="뽑기" <?= $item['it_type'] == "뽑기" ? "selected" : "" ?>>뽑기 아이템</option>
</select>
<?php if ($w == 'u' && $item['it_type'] == '뽑기') { ?>
&nbsp;&nbsp;
<a href="./explorer_list.php?sch_it_id=<?= $it_id ?>">뽑기 아이템 설정하러 가기</a>
<?php } ?>
</td>
</tr>
<tr>
<td>
적용값
</td>
<td>
<?php echo help("※ 적용값이 추가로 필요 할 시에만 기입해 주시길 바랍니다.") ?>
<span data-type="스탯" class="switch-obj"
style="display:<?= strstr($item['it_type'], '스탯') ? "inline-block" : "none" ?>;">
스탯 :
<select name="st_id">
<option value="">지정하지 않음</option>
<?php
$stat_sql = "select st_id, st_name from {$g5['status_config_table']} order by st_order asc";
$stat_list = sql_query($stat_sql);
for ($i = 0; $srow = sql_fetch_array($stat_list); $i++) {
?>
<option value="<?= $srow['st_id'] ?>" <?= $item['st_id'] == $srow['st_id'] ? "selected" : "" ?>>
<?= $srow['st_name'] ?></option>
<?php } ?>
</select>
</span>
<input type="text" name="it_value" value="<?php echo $item['it_value']; ?>" id="it_value" size="15">
</td>
</tr>
<tr>
<th scope="row">아이템 이름</th>
<td colspan="2">
<input type="text" name="it_name" value="<?php echo get_text($item['it_name']) ?>" id="it_name" required
class="required" size="50" maxlength="120">
</td>
</tr>
<tr>
<th scope="row" rowspan="2">아이템 이미지</th>
<td rowspan="2" class="bo-right">
<?php if ($item['it_img']) { ?>
<img src="<?= $item['it_img'] ?>">
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td>
직접등록&nbsp;&nbsp; <input type="file" name="it_img_file" value="" size="50">
</td>
</tr>
<tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="it_img" value="<?= $item['it_img'] ?>" size="50" />
</td>
</tr>
<tr>
<th scope="row" rowspan="2">상세이미지</th>
<td rowspan="2" class="bo-right">
<?php if ($item['it_1']) { ?>
<img src="<?= $item['it_1'] ?>">
<?php } else { ?>
이미지 없음
<?php } ?>
</td>
<td>
직접등록&nbsp;&nbsp; <input type="file" name="it_1_file" value="" size="50">
</td>
</tr>
<tr>
<td>
외부경로&nbsp;&nbsp; <input type="text" name="it_1" value="<?= $item['it_1'] ?>" size="50" />
</td>
</tr>
<tr>
<th scope="row">아이템 설명</th>
<td colspan="2">
<input type="text" name="it_content" value="<?php echo get_text($item['it_content']) ?>" id="it_content"
required class="required" size="80">
</td>
</tr>
<tr>
<th scope="row">아이템 효과</th>
<td colspan="2">
<input type="text" name="it_content2" value="<?php echo get_text($item['it_content2']) ?>"
id="it_content2" size="80">
</td>
</tr>
<tr>
<th rowspan="2" scope="row">되팔기 설정</th>
<td>사용여부</td>
<td>
<input type="checkbox" name="it_use_sell" id="it_use_sell" value="1" <?= $item['it_use_sell'] == '1' ? "checked" : "" ?> />
<label for="it_use_sell">판매가능</label>
</td>
</tr>
<tr>
<td>가격</td>
<td>
<input type="text" name="it_sell" value="<?php echo $item['it_sell'] ?>" id="it_sell" size="10">
</td>
</tr>
<tr>
<th scope="row">아이템 속성</th>
<td colspan="2">
<input type="checkbox" name="it_has" id="it_has" value="1" <?= $item['it_has'] == '1' ? "checked" : "" ?> />
<label for="it_has">귀속성&nbsp;&nbsp;&nbsp;</label>
<input type="checkbox" name="it_use_ever" id="it_use_ever" value="1" <?= $item['it_use_ever'] == '1' ? "checked" : "" ?> />
<label for="it_use_ever">영구성&nbsp;&nbsp;&nbsp;</label>
<input type="checkbox" name="it_use_able" id="it_use_able" value="1" <?= $item['it_use_able'] == '1' ? "checked" : "" ?> />
<label for="it_use_able">인벤 사용가능&nbsp;&nbsp;&nbsp;</label>
<input type="checkbox" name="it_use_mmb_able" id="it_use_mmb_able" value="1"
<?= $item['it_use_mmb_able'] == '1' ? "checked" : "" ?> />
<label for="it_use_mmb_able">자비란 사용가능&nbsp;&nbsp;&nbsp;</label>
<input type="checkbox" name="it_use_recepi" id="it_use_recepi" value="1" <?= $item['it_use_recepi'] == '1' ? "checked" : "" ?> />
<label for="it_use_recepi">레시피 재료 사용</label>
<?php echo help("&nbsp;") ?>
<?php echo help("※ 아이템 기능에 따라, 인벤만 사용 가능 / 자비란만 사용 가능한 템이 있습니다.") ?>
<?php echo help("※ 뽑기 아이템의 경우, 자비란 사용 가능에 체크 하셔야 사용 가능합니다. (인벤 사용 X)") ?>
<?php echo help("※ 나머지 아이템들의 경우, 인벤 사용 가능에 체크 하셔야 사용 가능합니다. (자비란 사용 X)") ?>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<?php if ($config['cf_4']) { ?>
<section id="anc_002">
<h2 class="h2_frm">탐색설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>아이템 기본 설정</caption>
<colgroup>
<col style="width: 130px;">
<col style="width: 100px;">
<col>
</colgroup>
<tbody>
<tr>
<th rowspan="2" scope="row">탐색획득</th>
<td>
탐색사용여부
</td>
<td />
<input type="checkbox" name="it_seeker" id="it_seeker" value="1" <?= $item['it_seeker'] == '1' ? "checked" : "" ?> />
<label for="it_seeker">자비란 탐색시 획득 가능</label>
</td>
</tr>
<tr>
<td>
회득 구간 설정
</td>
<td>
<?php echo help("※ 100면체 주사위를 굴렸을 때 나오는 숫자 중 획득 가능 범위를 지정해 주시길 바랍니다. (0 ~ 100)<br />※ 다수의 구간이 겹칠 시,랜덤으로 획득 됩니다.") ?>
<input type="text" name="it_seeker_per_s" value="<?php echo $item['it_seeker_per_s']; ?>"
id="it_seeker_per_s" size="5" maxlength="11">
~
<input type="text" name="it_seeker_per_e" value="<?php echo $item['it_seeker_per_e']; ?>"
id="it_seeker_per_e" size="5" maxlength="11"> 구간 획득
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<?php } ?>
</form>
<script>
function fitemform_submit(f) {
return true;
}
function fn_type_chage(obj) {
var target = obj.value;
$('.switch-obj').hide();
$('.switch-obj').find('select').val('');
$('.switch-obj').find('input').val('');
$('.switch-obj').each(function () {
var check = $(this).attr('data-type');
if (target.indexOf(check) < 0) {
// --
} else {
$(this).show();
}
});
$('.switch-obj[data-type*="' + target + '"]').show();
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,134 @@
<?php
/**
* @var string $it_use
* @var string $it_category
* @var string $it_type
* @var string $it_value
* @var string $it_name
* @var string $it_img
* @var string $it_content
* @var string $it_content2
*
* @var string|int $it_use_sell
* @var string|int $it_sell
* @var string|int $it_use_ever
*
* @var string|int $it_has
* @var string $it_use_able
* @var string|int $it_use_mmb_able
* @var string|int $it_use_recepi
*
* @var string|int $it_seeker
* @var string|int $it_seeker_per_s
* @var string|int $it_seeker_per_e
*
* @var string|int $st_id
*
* @var string $it_1
* @var string $it_2
* @var string $it_3
* @var string $it_4
* @var string $it_5
*/
include_once './_common.php';
if ($w == 'u')
check_demo();
auth_check($auth[$sub_menu], 'w');
check_token();
$item_data_path = G5_DATA_PATH . "/item";
$item_data_url = G5_DATA_URL . "/item";
@mkdir($item_data_path, G5_DIR_PERMISSION);
@chmod($item_data_path, G5_DIR_PERMISSION);
$sql_common = "";
if ($w == '') {
$tmp_row = sql_fetch(" select max(it_id) as max_it_id from {$g5['item_table']}");
$it_id = $tmp_row['max_it_id'] + 1;
} else {
$it_id = trim($it_id);
}
if ($img = $_FILES['it_img_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['it_img_file']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "item_" . $it_id . "_img." . $exp;
upload_file($_FILES['it_img_file']['tmp_name'], $image_name, $item_data_path);
$it_img = $item_data_url . "/" . $image_name;
}
if ($img = $_FILES['it_1_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['it_1_file']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "item_" . $it_id . "_detail_img." . $exp;
upload_file($_FILES['it_1_file']['tmp_name'], $image_name, $item_data_path);
$it_1 = $item_data_url . "/" . $image_name;
}
$sql_common = " it_use = '{$it_use}',
it_category = '{$it_category}',
it_type = '{$it_type}',
it_value = '{$it_value}',
it_name = '{$it_name}',
it_img = '{$it_img}',
it_content = '{$it_content}',
it_content2 = '{$it_content2}',
it_use_sell = '{$it_use_sell}',
it_sell = '{$it_sell}',
it_use_ever = '{$it_use_ever}',
it_has = '{$it_has}',
it_use_able = '{$it_use_able}',
it_use_mmb_able = '{$it_use_mmb_able}',
it_use_recepi = '{$it_use_recepi}',
it_seeker = '{$it_seeker}',
it_seeker_per_s = '{$it_seeker_per_s}',
it_seeker_per_e = '{$it_seeker_per_e}',
st_id = '{$st_id}',
it_1 = '{$it_1}',
it_2 = '{$it_2}',
it_3 = '{$it_3}',
it_4 = '{$it_4}',
it_5 = '{$it_5}'";
if ($w == '') {
$sql = " insert into {$g5['item_table']}
set it_id = '{$it_id}', {$sql_common}";
sql_query($sql);
} else {
$it = sql_fetch("select it_id, it_img from {$g5['item_table']} where it_id = '{$it_id}'");
if (!$it['it_id']) {
alert("아이템 정보가 존재하지 않습니다.");
}
$sql = " update {$g5['item_table']}
set {$sql_common}
where it_id = '{$it['it_id']}'";
sql_query($sql);
if ($it['it_img'] != $it_img) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $it['it_img']);
@unlink($prev_file_path);
}
if ($it['it_1'] != $it_img) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $it['it_1']);
@unlink($prev_file_path);
}
}
goto_url('./item_list.php?' . $qstr);

View file

@ -0,0 +1,258 @@
<?php
/**
* @var string $cate
*/
include_once './_common.php';
$category = explode("||", $config['cf_item_category']);
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['item_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if ($cate) {
$sql_search .= " and it_category = '{$cate}' ";
}
if ($type) {
$sql_search .= " and it_type = '{$type}' ";
}
if (!$sst) {
$sst = "it_id";
$sod = "asc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '아이템 관리';
include_once './admin.head.php';
$colspan = 15;
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
추가된 아이템 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<select name="cate" id="cate">
<option value="">아이템 종류</option>
<option value="일반" <?= $cate == "일반" ? "selected" : "" ?>>일반 아이템</option>
<option value="개인" <?= $cate == "개인" ? "selected" : "" ?>>개인 아이템</option>
<option value="출석" <?= $cate == "출석" ? "selected" : "" ?>>출석 아이템</option>
</select>
<select name="type">
<option value="">아이템 기능</option>
<?php for ($k = 0; $k < count($category); $k++) {
if (!$category[$k])
continue;
?>
<option value="<?= $category[$k] ?>" <?= $type == $category[$k] ? "selected" : "" ?>><?= $category[$k] ?></option>
<?php } ?>
<option value="뽑기" <?= $type == "뽑기" ? "selected" : "" ?>>뽑기</option>
</select>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($_GET['sfl'], "it_name"); ?>>아이템 이름</option>
<option value="it_content" <?php echo get_selected($_GET['sfl'], "it_content"); ?>>아이템 설명</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx">
<input type="submit" value="검색" class="btn_submit">
</form>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add">
<a href="./item_form.php" id="bo_add">아이템 추가</a>
</div>
<?php } ?>
<form name="fitemlist" id="fitemlist" action="./item_list_update.php" onsubmit="return fitemlist_submit(this);"
method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="cate" value="<?php echo $cate ?>">
<input type="hidden" name="map_id" value="<?php echo $map_id ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 40px;" />
<col style="width: 80px;" />
<col style="width: 120px;" />
<col style="width: 100px;" />
<col style="width: 60px;" />
<col />
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 70px;" />
<col style="width: 50px;" />
<col style="width: 80px;" />
<col style="width: 50px;" />
<col style="width: 60px;" />
</colgroup>
<thead>
<tr>
<th scope="col" class="bo-right">
<label for="chkall" class="sound_only">아이템 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">분류</th>
<th scope="col" colspan="2">기능</th>
<th scope="col" colspan="2">아이템</th>
<th scope="col">귀속</th>
<th scope="col">영구</th>
<th scope="col">인벤</th>
<th scope="col">자비</th>
<th scope="col">레시피</th>
<th scope="col" colspan="2">되팔기</th>
<th scope="col">사용</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $item = sql_fetch_array($result); $i++) {
$one_update = '<a href="./item_form.php?w=u&amp;it_id=' . $item['it_id'] . '&amp;' . $qstr . '">수정</a>';
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($item['it_name']) ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
<input type="hidden" name="it_id[<?php echo $i ?>]" value="<?php echo $item['it_id'] ?>" />
</td>
<td>
<select name="it_category[<?php echo $i ?>]" id="it_category_<?php echo $i ?>"
style="display: block; width:100%;">
<option value="일반" <?= $item['it_category'] == "일반" ? "selected" : "" ?>>일반</option>
<option value="개인" <?= $item['it_category'] == "개인" ? "selected" : "" ?>>개인</option>
<option value="출석" <?= $item['it_category'] == "출석" ? "selected" : "" ?>>출석</option>
</select>
</td>
<td>
<select name="it_type[<?php echo $i ?>]" style="width:100%;">
<?php for ($k = 0; $k < count($category); $k++) {
if (!$category[$k])
continue;
?>
<option value="<?= $category[$k] ?>" <?= $item['it_type'] == $category[$k] ? "selected" : "" ?>>
<?= $category[$k] ?></option>
<?php } ?>
<option value="뽑기" <?= $item['it_type'] == "뽑기" ? "selected" : "" ?>>뽑기 아이템</option>
</select>
</td>
<td>
<input type="text" name="it_value[<?php echo $i ?>]" value="<?php echo get_text($item['it_value']) ?>"
id="it_value_<?php echo $i ?>" size="8">
</td>
<td class="txt-center">
<?php if ($item['it_img']) { ?>
<img src="<?= $item['it_img'] ?>" style="max-width: 40px;" />
<?php } else { ?>
이미지없음
<?php } ?>
</td>
<td class="txt-left">
<input type="text" name="it_name[<?php echo $i ?>]" value="<?php echo get_text($item['it_name']) ?>"
id="it_name_<?php echo $i ?>" size="20" style="width:100%;">
</td>
<td>
<input type="checkbox" name="it_has[<?php echo $i ?>]" value="1" id="it_has_<?php echo $i ?>" <?php echo $item['it_has'] ? "checked" : "" ?>>
</td>
<td>
<input type="checkbox" name="it_use_ever[<?php echo $i ?>]" value="1" id="it_use_ever_<?php echo $i ?>"
<?php echo $item['it_use_ever'] ? "checked" : "" ?>>
</td>
<td>
<input type="checkbox" name="it_use_able[<?php echo $i ?>]" value="1" id="it_use_able_<?php echo $i ?>"
<?php echo $item['it_use_able'] ? "checked" : "" ?>>
</td>
<td>
<input type="checkbox" name="it_use_mmb_able[<?php echo $i ?>]" value="1"
id="it_use_mmb_able_<?php echo $i ?>" <?php echo $item['it_use_mmb_able'] ? "checked" : "" ?>>
</td>
<td>
<input type="checkbox" name="it_use_recepi[<?php echo $i ?>]" value="1" id="it_use_recepi_<?php echo $i ?>"
<?php echo $item['it_use_recepi'] ? "checked" : "" ?>>
</td>
<td>
<input type="checkbox" name="it_use_sell[<?php echo $i ?>]" value="1" id="it_use_sell_<?php echo $i ?>"
<?php echo $item['it_use_sell'] ? "checked" : "" ?>>
</td>
<td>
<input type="text" name="it_sell[<?php echo $i ?>]" value="<?php echo get_text($item['it_sell']) ?>"
id="it_sell_<?php echo $i ?>" size="5">
</td>
<td>
<input type="checkbox" name="it_use[<?php echo $i ?>]" value="Y" id="it_use_<?php echo $i ?>" <?php echo $item['it_use'] ? "checked" : "" ?>>
</td>
<td class="td_mngsmall">
<?php echo $one_update ?>
<?php echo $one_copy ?>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<?php } ?>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'] . '?' . $qstr . '&amp;type=' . $type . '&amp;cate=' . $cate . '&amp;cate2=' . $cate2 . '&amp;map_id=' . $map_id . '&amp;page='); ?>
<script>
function fitemlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,62 @@
<?php
/**
* @var string|int $tmp_it_id
*/
include_once './_common.php';
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] == "선택수정") {
auth_check($auth[$sub_menu], 'w');
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = " update {$g5['item_table']}
set it_category = '{$_POST['it_category'][$k]}',
it_name = '{$_POST['it_name'][$k]}',
it_sell = '{$_POST['it_sell'][$k]}',
it_use_able = '{$_POST['it_use_able'][$k]}',
it_use_mmb_able = '{$_POST['it_use_mmb_able'][$k]}',
it_use_recepi = '{$_POST['it_use_recepi'][$k]}',
it_has = '{$_POST['it_has'][$k]}',
it_use_sell = '{$_POST['it_use_sell'][$k]}',
it_use_ever = '{$_POST['it_use_ever'][$k]}',
it_type = '{$_POST['it_type'][$k]}',
it_value = '{$_POST['it_value'][$k]}',
it_use = '{$_POST['it_use'][$k]}'
where it_id = '{$_POST['it_id'][$k]}' ";
sql_query($sql);
}
} else if ($_POST['act_button'] == "선택삭제") {
auth_check($auth[$sub_menu], 'd');
check_token();
for ($i = 0; $i < count($_POST['chk']); $i++) {
$k = $_POST['chk'][$i];
$temp_it_id = trim($_POST['it_id'][$k]);
if (!$temp_it_id) {
return;
}
$it = sql_fetch("select it_img from {$g5['item_table']} where it_id = '{$tmp_it_id}'");
$prev_file_path = str_replace(G5_URL, G5_PATH, $it['it_img']);
@unlink($prev_file_path);
sql_query(" delete from {$g5['item_table']} where it_id = '{$temp_it_id}'");
sql_query(" delete from {$g5['inventory_table']} where it_id = '{$temp_it_id}'");
sql_query(" delete from {$g5['order_table']} where it_id = '{$temp_it_id}'");
sql_query(" delete from {$g5['shop_table']} where it_id = '{$temp_it_id}'");
}
}
goto_url('./item_list.php?' . $qstr . "&cate=" . $cate . "&map_id=" . $map_id);

View file

@ -0,0 +1,125 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " FROM {$g5['item_modifylog']} o ";
$sql_search = " WHERE (1) ";
if ($stx) {
if ($sfl == 'ch_name') {
$sql_common .= ", {$g5['character_table']} c ";
$sql_search .= " AND c.ch_name LIKE '%{$stx}%' AND c.ch_id = o.ch_id ";
} else if ($sfl == 'it_name') {
$sql_common .= ", {$g5['item_table']} i ";
$sql_search .= " AND i.it_name LIKE '%{$stx}%' AND i.it_id = o.it_id ";
}
}
if (!$sst) {
$sst = "o.srl";
$sod = "DESC";
}
$sql_order = " ORDER BY {$sst} {$sod} ";
$sql = " SELECT count(*) AS cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows);
if ($page < 1)
$page = 1;
$from_record = ($page - 1) * $rows;
$sql = " SELECT *
{$sql_common}
{$sql_search}
{$sql_order}
LIMIT {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$ch = [];
if ($sfl == 'ch_id' && $stx)
$ch = get_member($stx);
$g5['title'] = '아이템 기록';
include_once './admin.head.php';
$colspan = 4; ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
<option value="it_name" <?php echo get_selected($_GET['sfl'], "it_name"); ?>>아이템 이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<br />
<style>
.tbl_head01 tbody td.al {
text-align: left;
}
</style>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 150px;" />
<col />
<col style="width: 150px;" />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr>
<th scope="col">캐릭터명</th>
<th scope="col">아이템</th>
<th scope="col">구분</th>
<th scope="col">일시</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
$it = get_item($row['it_id']);
$ch = get_character($row['ch_id']);
$mb = get_member($row['mb_id']);
?>
<tr class="<?php echo $bg; ?>">
<td><?php echo get_text($ch['ch_name']); ?></td>
<td class="al">
<img src="<?= $it['it_img'] ?>" style="max-width: 30px;" />
<?php echo get_text($it['it_name']); ?>
</td>
<td><?php echo get_text($row['using_type']); ?></td>
<td><?php echo ($row['regdate'] == '0000-00-00 00:00:00') ? '' : $row['regdate'] ?></td>
</tr><?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<?php
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
include_once './admin.tail.php';

View file

@ -0,0 +1,19 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
$sql = " insert into {$g5['level_table']}
set lv_name = '{$_POST['lv_name']}',
lv_exp = '{$_POST['lv_exp']}',
lv_add_state = '{$_POST['lv_add_state']}',
lv_1 = '{$_POST['lv_1']}',
lv_2 = '{$_POST['lv_2']}',
lv_3 = '{$_POST['lv_3']}',
lv_4 = '{$_POST['lv_4']}',
lv_5 = '{$_POST['lv_5']}'
";
sql_query($sql);
goto_url('./level_list.php?' . $qstr);

View file

@ -0,0 +1,182 @@
<?php
$sub_menu = "400400";
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['level_table']} ";
$sql_search = " where (1) ";
$sql_order = " order by lv_exp desc ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = ($config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크") . '설정 관리';
include_once './admin.head.php';
$colspan = 5;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">' . ($config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크") . ' 설정 목록</a></li>
<li><a href="#anc_002">' . ($config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크") . ' 설정 등록</a></li>
</ul>';
?>
<section id="anc_001">
<h2 class="h2_frm"><?= $config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크" ?> 설정 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fpointlist" id="fpointlist" method="post" action="./level_list_update.php"
onsubmit="return fpointlist_submit(this);" enctype="multipart/form-data">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 120px;" />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only"><?= $config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크" ?>설정 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col"><?= $config['cf_rank_name'] ?>명</th>
<th scope="col">요구<?= $config['cf_exp_name'] ?></th>
<th scope="col">추가 스탯 포인트</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td style="text-align: center">
<input type="hidden" name="lv_id[<?php echo $i ?>]" value="<?php echo $row['lv_id'] ?>"
id="lv_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<input type="text" name="lv_name[<?php echo $i ?>]" value="<?php echo $row['lv_name'] ?>"
class="frm_input" style="width: 98%;">
</td>
<td>
<input type="text" name="lv_exp[<?php echo $i ?>]" value="<?php echo $row['lv_exp'] ?>" class="frm_input"
style="width: 70%;"> exp
</td>
<td>
<input type="text" name="lv_add_state[<?php echo $i ?>]" value="<?php echo $row['lv_add_state'] ?>"
class="frm_input" style="width: 50px;">
</td>
<td>&nbsp;</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<section id="anc_002">
<h2 class="h2_frm"><?= $config['cf_rank_name'] ? $config['cf_rank_name'] : "랭크" ?> 설정 등록</h2>
<?php echo $pg_anchor ?>
<form name="fpointlist2" method="post" id="fpointlist2" action="./level_form_update.php" autocomplete="off"
enctype="multipart/form-data">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="lv_name"><?= $config['cf_rank_name'] ?>명<strong
class="sound_only">필수</strong></label></th>
<td><input type="text" name="lv_name" id="lv_name" class="required frm_input" required></td>
</tr>
<tr>
<th scope="row"><label for="lv_exp">요구<?= $config['cf_exp_name'] ?><strong
class="sound_only">필수</strong></label></th>
<td><input type="text" name="lv_exp" id="lv_exp" class="required frm_input" required></td>
</tr>
<tr>
<th scope="row"><label for="lv_add_state">추가스탯포인트<strong class="sound_only">필수</strong></label></th>
<td><input type="text" name="lv_add_state" id="lv_add_state" class="required frm_input"></td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fpointlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,55 @@
<?php
include_once './_common.php';
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
auth_check($auth[$sub_menu], 'w');
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
$sql_common = "";
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$lv = sql_fetch("select * from {$g5['level_table']} where lv_id = '{$_POST['lv_id'][$k]}'");
if (!$lv['lv_id']) {
$msg .= $lv['lv_id'] . ' : 기존 자료가 존재하지 않습니다.\\n';
} else {
$sql = " update {$g5['level_table']}
set lv_name = '{$_POST['lv_name'][$k]}',
lv_exp = '{$_POST['lv_exp'][$k]}',
lv_add_state = '{$_POST['lv_add_state'][$k]}',
lv_1 = '{$_POST['lv_1'][$k]}',
lv_2 = '{$_POST['lv_2'][$k]}',
lv_3 = '{$_POST['lv_3'][$k]}',
lv_4 = '{$_POST['lv_4'][$k]}',
lv_5 = '{$_POST['lv_5'][$k]}'
";
$sql .= " where lv_id = '{$_POST['lv_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
$count = count($_POST['chk']);
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 레벨 셋팅 내역삭제
$sql = " delete from {$g5['level_table']} where lv_id = '{$_POST['lv_id'][$k]}' ";
sql_query($sql);
}
}
if ($msg)
alert($msg);
goto_url('./level_list.php?' . $qstr);

View file

@ -0,0 +1,153 @@
<?php
$sub_menu = '100310';
include_once "./_common.php";
include_once G5_EDITOR_LIB;
auth_check($auth[$sub_menu], "w");
$nw_id = preg_replace('/[^0-9]/', '', $nw_id);
$html_title = "팝업레이어";
if ($w == "u") {
$html_title .= " 수정";
$sql = " select * from {$g5['new_win_table']} where nw_id = '{$nw_id}' ";
$nw = sql_fetch($sql);
if (!$nw['nw_id'])
alert("등록된 자료가 없습니다.");
} else {
$html_title .= " 입력";
$nw['nw_device'] = 'both';
$nw['nw_disable_hours'] = 24;
$nw['nw_left'] = 10;
$nw['nw_top'] = 10;
$nw['nw_width'] = 450;
$nw['nw_height'] = 500;
$nw['nw_content_html'] = 2;
}
$g5['title'] = $html_title;
include_once G5_ADMIN_PATH . "/admin.head.php";
?>
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="nw_id" value="<?php echo $nw_id; ?>">
<input type="hidden" name="token" value="">
<div class="local_desc01 local_desc">
<p>초기화면 접속 자동으로 팝업레이어를 설정합니다.</p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="nw_device">접속기기</label></th>
<td>
<?php echo help("팝업레이어가 표시될 접속기기를 설정합니다."); ?>
<select name="nw_device" id="nw_device">
<option value="both" <?php echo get_selected($nw['nw_device'], 'both'); ?>>PC와 모바일</option>
<option value="pc" <?php echo get_selected($nw['nw_device'], 'pc'); ?>>PC</option>
<option value="mobile" <?php echo get_selected($nw['nw_device'], 'mobile'); ?>>모바일</option>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_disable_hours">시간<strong class="sound_only"> 필수</strong></label></th>
<td>
<?php echo help("고객이 다시 보지 않음을 선택할 시 몇 시간동안 팝업레이어를 보여주지 않을지 설정합니다."); ?>
<input type="text" name="nw_disable_hours" value="<?php echo $nw['nw_disable_hours']; ?>"
id="nw_disable_hours" required class="frm_input required" size="5"> 시간
</td>
</tr>
<tr>
<th scope="row"><label for="nw_begin_time">시작일시<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_begin_time" value="<?php echo $nw['nw_begin_time']; ?>" id="nw_begin_time"
required class="frm_input required" size="21" maxlength="19">
<input type="checkbox" name="nw_begin_chk" value="<?php echo date("Y-m-d 00:00:00", G5_SERVER_TIME); ?>"
id="nw_begin_chk"
onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">
<label for="nw_begin_chk">시작일시를 오늘로</label>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_end_time">종료일시<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_end_time" value="<?php echo $nw['nw_end_time']; ?>" id="nw_end_time" required
class="frm_input required" size="21" maxlength="19">
<input type="checkbox" name="nw_end_chk"
value="<?php echo date("Y-m-d 23:59:59", G5_SERVER_TIME + (60 * 60 * 24 * 7)); ?>" id="nw_end_chk"
onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">
<label for="nw_end_chk">종료일시를 오늘로부터 7 후로</label>
</td>
</tr>
<tr>
<th scope="row"><label for="nw_left">팝업레이어 좌측 위치<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_left" value="<?php echo $nw['nw_left']; ?>" id="nw_left" required
class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_top">팝업레이어 상단 위치<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_top" value="<?php echo $nw['nw_top']; ?>" id="nw_top" required
class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_width">팝업레이어 넓이<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_width" value="<?php echo $nw['nw_width'] ?>" id="nw_width" required
class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_height">팝업레이어 높이<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_height" value="<?php echo $nw['nw_height'] ?>" id="nw_height" required
class="frm_input required" size="5"> px
</td>
</tr>
<tr>
<th scope="row"><label for="nw_subject">팝업 제목<strong class="sound_only"> 필수</strong></label></th>
<td>
<input type="text" name="nw_subject" value="<?php echo stripslashes($nw['nw_subject']) ?>" id="nw_subject"
required class="frm_input required" size="80">
</td>
</tr>
<tr>
<th scope="row"><label for="nw_content">내용</label></th>
<td><?php echo editor_html('nw_content', get_text($nw['nw_content'], 0)); ?></td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./newwinlist.php">목록</a>
</div>
</form>
<script>
function frmnewwin_check(f) {
errmsg = "";
errfld = "";
<?php echo get_editor_js('nw_content'); ?>
check_field(f.nw_subject, "제목을 입력하세요.");
if (errmsg != "") {
alert(errmsg);
errfld.focus();
return false;
}
return true;
}
</script>
<?php
include_once G5_ADMIN_PATH . "/admin.tail.php";
?>

View file

@ -0,0 +1,45 @@
<?php
$sub_menu = '100310';
include_once "./_common.php";
if ($w == "u" || $w == "d")
check_demo();
if ($w == 'd')
auth_check($auth[$sub_menu], "d");
else
auth_check($auth[$sub_menu], "w");
check_admin_token();
$sql_common = " nw_device = '{$_POST['nw_device']}',
nw_begin_time = '{$_POST['nw_begin_time']}',
nw_end_time = '{$_POST['nw_end_time']}',
nw_disable_hours = '{$_POST['nw_disable_hours']}',
nw_left = '{$_POST['nw_left']}',
nw_top = '{$_POST['nw_top']}',
nw_height = '{$_POST['nw_height']}',
nw_width = '{$_POST['nw_width']}',
nw_subject = '{$_POST['nw_subject']}',
nw_content = '{$_POST['nw_content']}',
nw_content_html = '{$_POST['nw_content_html']}' ";
if ($w == "") {
$sql = " insert {$g5['new_win_table']} set {$sql_common} ";
sql_query($sql);
$nw_id = sql_insert_id();
} else if ($w == "u") {
$sql = " update {$g5['new_win_table']} set {$sql_common} where nw_id = '{$nw_id}' ";
sql_query($sql);
} else if ($w == "d") {
$sql = " delete from {$g5['new_win_table']} where nw_id = '{$nw_id}' ";
sql_query($sql);
}
if ($w == "d") {
goto_url('./newwinlist.php');
} else {
goto_url("./newwinform.php?w=u&amp;nw_id={$nw_id}");
}
?>

View file

@ -0,0 +1,121 @@
<?php
$sub_menu = '100310';
include_once "./_common.php";
auth_check($auth[$sub_menu], "r");
if (!isset($g5['new_win_table'])) {
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\';</strong> 를 추가해 주세요.');
}
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
if (!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
if (sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
} else {
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
`nw_left` int(11) NOT NULL DEFAULT '0',
`nw_top` int(11) NOT NULL DEFAULT '0',
`nw_height` int(11) NOT NULL DEFAULT '0',
`nw_width` int(11) NOT NULL DEFAULT '0',
`nw_subject` text NOT NULL,
`nw_content` text NOT NULL,
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`nw_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
}
}
$g5['title'] = '팝업레이어 관리';
include_once G5_ADMIN_PATH . "/admin.head.php";
$sql_common = " from {$g5['new_win_table']} ";
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$sql = "select * {$sql_common} order by nw_id desc ";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">전체 <?php echo $total_count; ?>건</div>
<div class="btn_add01 btn_add">
<a href="./newwinform.php">새창관리추가</a>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">번호</th>
<th scope="col">제목</th>
<th scope="col">접속기기</th>
<th scope="col">시작일시</th>
<th scope="col">종료일시</th>
<th scope="col">시간</th>
<th scope="col">Left</th>
<th scope="col">Top</th>
<th scope="col">Width</th>
<th scope="col">Height</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
switch ($row['nw_device']) {
case 'pc':
$nw_device = 'PC';
break;
case 'mobile':
$nw_device = '모바일';
break;
default:
$nw_device = '모두';
break;
}
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $row['nw_id']; ?></td>
<td><?php echo $row['nw_subject']; ?></td>
<td class="td_device"><?php echo $nw_device; ?></td>
<td class="td_datetime"><?php echo substr($row['nw_begin_time'], 2, 14); ?></td>
<td class="td_datetime"><?php echo substr($row['nw_end_time'], 2, 14); ?></td>
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
<td class="td_num"><?php echo $row['nw_left']; ?>px</td>
<td class="td_num"><?php echo $row['nw_top']; ?>px</td>
<td class="td_num"><?php echo $row['nw_width']; ?>px</td>
<td class="td_num"><?php echo $row['nw_height']; ?>px</td>
<td class="td_mngsmall">
<a href="./newwinform.php?w=u&amp;nw_id=<?php echo $row['nw_id']; ?>"><span
class="sound_only"><?php echo $row['nw_subject']; ?> </span>수정</a>
<a href="./newwinformupdate.php?w=d&amp;nw_id=<?php echo $row['nw_id']; ?>"
onclick="return delete_confirm(this);"><span class="sound_only"><?php echo $row['nw_subject']; ?>
</span>삭제</a>
</td>
</tr>
<?php
}
if ($i == 0) {
echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
}
?>
</tbody>
</table>
</div>
<?php
include_once G5_ADMIN_PATH . "/admin.tail.php";
?>

View file

@ -0,0 +1,158 @@
<?php
$sub_menu = "500400";
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['order_table']} o ";
$sql_search = " where (1) ";
if ($stx) {
if ($sfl == 'ch_name') {
$sql_common .= ", {$g5['character_table']} c ";
$sql_search .= " and c.ch_name like '%{$stx}%' and c.ch_id = o.ch_id ";
} else if ($sfl == 'it_name') {
$sql_common .= ", {$g5['item_table']} i ";
$sql_search .= " and i.it_name like '%{$stx}%' and i.it_id = o.it_id ";
}
}
if (!$sst) {
$sst = "o.or_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows);
if ($page < 1)
$page = 1;
$from_record = ($page - 1) * $rows;
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$ch = [];
if ($sfl == 'ch_id' && $stx)
$ch = get_member($stx);
$g5['title'] = '아이템 구매 기록';
include_once "./admin.head.php";
$colspan = 5;
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
<option value="it_name" <?php echo get_selected($_GET['sfl'], "it_name"); ?>>아이템 이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<br />
<form name="forderlist" id="forderlist" method="post" action="./order_list_delete.php"
onsubmit="return forderlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 150px;" />
<col style="width: 150px;" />
<col />
<col style="width: 120px;" />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">아이템 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">구매캐릭터</th>
<th scope="col">구매회원</th>
<th scope="col">아이템</th>
<th scope="col">구매일</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
$it = get_item($row['it_id']);
$ch = get_character($row['ch_id']);
$mb = get_member($row['mb_id']);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
<input type="hidden" name="or_id[<?php echo $i ?>]" value="<?php echo $row['or_id'] ?>" />
</td>
<td><?php echo get_text($ch['ch_name']); ?></td>
<td><?php echo get_text($mb['mb_nick']); ?></td>
<td>
<img src="<?= $it['it_img'] ?>" style="max-width: 30px;" />
<?php echo get_text($it['it_name']); ?>
</td>
<td><?php echo ($row['or_datetime'] == '0000-00-00 00:00:00') ? '' : $row['or_datetime'] ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
<script>
function forderlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once "./admin.tail.php";

View file

@ -0,0 +1,20 @@
<?php
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
print_r($_POST);
for ($i = 0; $i < count($_POST['chk']); $i++) {
$k = $_POST['chk'][$i];
$temp_or_id = trim($_POST['or_id'][$k]);
if (!$temp_or_id) {
return;
}
sql_query("DELETE FROM {$g5['order_table']} WHERE or_id = '{$temp_or_id}'");
}
goto_url('./order_list.php?' . $qstr);

View file

@ -0,0 +1,245 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['point_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case 'mb_id':
$sql_search .= " ({$sfl} = '{$stx}') ";
break;
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "po_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
$mb = [];
if ($sfl == 'mb_id' && $stx)
$mb = get_member($stx);
$g5['title'] = ($config['cf_money'] ? $config['cf_money'] : "포인트") . ' 관리';
include_once "./admin.head.php";
$colspan = 8;
$po_expire_term = '';
if ($config['cf_point_term'] > 0) {
$po_expire_term = $config['cf_point_term'];
}
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
<?php
if (isset($mb['mb_id']) && $mb['mb_id']) {
echo '&nbsp;(' . $mb['mb_id'] . ' 님 ' . ($config['cf_money'] ? $config['cf_money'] : "포인트") . ' 합계 : ' . number_format($mb['mb_point']) . '점)';
} else {
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g5['point_table']} ");
echo '&nbsp;(전체 합계 ' . number_format($row2['sum_point']) . '점)';
}
?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="mb_id" <?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
<option value="po_content" <?php echo get_selected($_GET['sfl'], "po_content"); ?>>내용</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<br />
<form name="fpointlist" id="fpointlist" method="post" action="./point_list_delete.php"
onsubmit="return fpointlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only"><?= $config['cf_money'] ? $config['cf_money'] : "포인트" ?> 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col"><?php echo subject_sort_link('mb_id') ?>회원아이디</a></th>
<th scope="col">이름</th>
<th scope="col">닉네임</th>
<th scope="col"><?php echo subject_sort_link('po_content') ?>내용</a></th>
<th scope="col"><?php echo subject_sort_link('po_datetime') ?>일시</a></th>
<th scope="col"><?php echo subject_sort_link('po_point') ?><?= $config['cf_money'] ? $config['cf_money'] : "포인트" ?></a></th>
<th scope="col"><?= $config['cf_money'] ? $config['cf_money'] : "포인트" ?>합</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
if ($i == 0 || ($row2['mb_id'] != $row['mb_id'])) {
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
}
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
$link1 = $link2 = '';
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
$link1 = '<a href="' . G5_BBS_URL . '/board.php?bo_table=' . $row['po_rel_table'] . '&amp;wr_id=' . $row['po_rel_id'] . '" target="_blank">';
$link2 = '</a>';
}
$expr = '';
if ($row['po_expired'] == 1)
$expr = ' txt_expired';
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>"
id="mb_id_<?php echo $i ?>">
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>"
id="po_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['po_content'] ?> 내역</label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td><a href="?sfl=mb_id&amp;stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
<td><?php echo get_text($row2['mb_name']); ?></td>
<td>
<div><?php echo $mb_nick ?></div>
</td>
<td class="txt-left"><?php echo $link1 ?><?php echo $row['po_content'] ?><?php echo $link2 ?></td>
<td><?php echo $row['po_datetime'] ?></td>
<td><?php echo number_format($row['po_point']) ?></td>
<td><?php echo number_format($row['po_mb_point']) ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<section id="point_mng">
<h2 class="h2_frm">개별회원 <?= $config['cf_money'] ? $config['cf_money'] : "포인트" ?> 증감 설정</h2>
<form name="fpointlist2" method="post" id="fpointlist2" action="./point_update.php" autocomplete="off">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">지급유형</th>
<td>
<input type="radio" id="take_type_01" name="take_type" value="P" checked
onclick="if(document.getElementById('take_type_01').checked) $('#take_member_name').show();" />
<label for="take_type_01">개별지급</label>
&nbsp;&nbsp;
<input type="radio" id="take_type_02" name="take_type" value="A"
onclick="if(document.getElementById('take_type_02').checked) $('#take_member_name').hide();" />
<label for="take_type_02">전체지급</label>
</td>
</tr>
<tr id="take_member_name">
<th scope="row">멤버 닉네임</th>
<td>
<?php echo help('개별지급 시 입력') ?>
<input type="hidden" name="mb_id" id="mb_id" value="" />
<input type="text" name="mb_name" value="" id="mb_name"
onkeyup="get_ajax_member(this, 'member_list', 'mb_id');" />
<div id="member_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row"><label for="po_content"><?= $config['cf_money'] ? $config['cf_money'] : "포인트" ?> 내용<strong
class="sound_only">필수</strong></label></th>
<td><input type="text" name="po_content" id="po_content" required class="required frm_input" size="80"></td>
</tr>
<tr>
<th scope="row"><label for="po_point"><?= $config['cf_money'] ? $config['cf_money'] : "포인트" ?><strong class="sound_only">필수</strong></label>
</th>
<td><input type="text" name="po_point" id="po_point" required class="required frm_input"></td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fpointlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once "./admin.tail.php";
?>

View file

@ -0,0 +1,56 @@
<?php
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], 'd');
check_admin_token();
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 소지금 내역정보
$sql = " select * from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
$row = sql_fetch($sql);
if (!$row['po_id'])
continue;
if ($row['po_point'] < 0) {
$mb_id = $row['mb_id'];
$po_point = abs($row['po_point']);
if ($row['po_rel_table'] == '@expire')
delete_expire_point($mb_id, $po_point);
else
delete_use_point($mb_id, $po_point);
} else {
if ($row['po_use_point'] > 0) {
insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
}
}
// 소지금 내역삭제
$sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
sql_query($sql);
// po_mb_point에 반영
$sql = " update {$g5['point_table']}
set po_mb_point = po_mb_point - '{$row['po_point']}'
where mb_id = '{$_POST['mb_id'][$k]}'
and po_id > '{$_POST['po_id'][$k]}' ";
sql_query($sql);
// 소지금 UPDATE
$sum_point = get_point_sum($_POST['mb_id'][$k]);
$sql = " update {$g5['member_table']} set mb_point = '{$sum_point}' where mb_id = '{$_POST['mb_id'][$k]}' ";
sql_query($sql);
}
goto_url('./point_list.php?' . $qstr);

View file

@ -0,0 +1,46 @@
<?php
$sub_menu = "500900";
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
check_admin_token();
$mb_id = $_POST['mb_id'];
$po_point = $_POST['po_point'];
$po_content = $_POST['po_content'];
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
if ($take_type == 'A') {
// 전체지급
$sql_common = " from {$g5['member_table']} ";
$sql_search = " where mb_level > 1 ";
$sql = " select * {$sql_common} {$sql_search} ";
$result = sql_query($sql);
for ($i = 0; $mb = sql_fetch_array($result); $i++) {
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
alert('소지금를 깎는 경우 현재 소지금보다 작으면 안됩니다.', './point_list.php?' . $qstr);
insert_point($mb['mb_id'], $po_point, $po_content, '@passive', $mb['mb_id'], $member['mb_id'] . '-' . uniqid(''), $expire);
}
} else {
// 개별지급
if (!$mb_id && $mb_name) {
$mb = sql_fetch("select * from {$g5['member_table']} where mb_name = '{$mb_name}'");
$mb_id = $mb['mb_id'];
} else {
$mb = get_member($mb_id);
}
if (!$mb['mb_id'])
alert('존재하는 회원이 아닙니다.');
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
alert('소지금를 깎는 경우 현재 소지금보다 작으면 안됩니다.', './point_list.php?' . $qstr);
insert_point($mb['mb_id'], $po_point, $po_content, '@passive', $mb['mb_id'], $member['mb_id'] . '-' . uniqid(''), $expire);
}
goto_url('./point_list.php?' . $qstr);

View file

@ -0,0 +1,22 @@
<?php
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], 'd');
check_admin_token();
$count = count($_POST['chk']);
if (!$count) {
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
}
for ($i = 0; $i < $count; $i++) {
$po_id = $_POST['chk'][$i];
$sql = " delete from {$g5['poll_table']} where po_id = '$po_id' ";
sql_query($sql);
$sql = " delete from {$g5['poll_etc_table']} where po_id = '$po_id' ";
sql_query($sql);
}
goto_url('./poll_list.php?' . $qstr);

View file

@ -0,0 +1,117 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
$html_title = '투표';
if ($w == '')
$html_title .= ' 생성';
else if ($w == 'u') {
$html_title .= ' 수정';
$sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' ";
$po = sql_fetch($sql);
} else
alert('w 값이 제대로 넘어오지 않았습니다.');
$g5['title'] = $html_title;
include_once "./admin.head.php";
?>
<form name="fpoll" id="fpoll" action="./poll_form_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?></caption>
<colgroup>
<col style="width: 120px;" />
<col style="width: 250px;" />
<col style="width: 100px;" />
<col />
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="po_subject">투표 제목<strong class="sound_only">필수</strong></label></th>
<td colspan="4"><input type="text" name="po_subject" value="<?php echo $po['po_subject'] ?>" id="po_subject"
required class="required frm_input" size="80" maxlength="125"></td>
</tr>
<?php
for ($i = 1; $i <= 9; $i++) {
$required = '';
if ($i == 1 || $i == 2) {
$required = 'required';
$sound_only = '<strong class="sound_only">필수</strong>';
}
$po_poll = get_text($po['po_poll' . $i]);
?>
<tr>
<th scope="row"><label for="po_poll<?php echo $i ?>">항목 <?php echo $i ?><?php echo $sound_only ?></label></th>
<td>
<input type="text" name="po_poll<?php echo $i ?>" value="<?php echo $po_poll ?>"
id="po_poll<?php echo $i ?>" <?php echo $required ?> class="frm_input <?php echo $required ?>"
maxlength="125">
</td>
<th class="bo-left">
<label for="po_cnt<?php echo $i ?>">항목 <?php echo $i ?> 투표수</label>
</th>
<td>
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po['po_cnt' . $i] ?>"
id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
</td>
</tr>
<?php } ?>
<tr>
<th scope="row"><label for="po_etc">기타의견</label></th>
<td colspan="4">
<?php echo help('기타 의견을 남길 수 있도록 하려면, 간단한 질문을 입력하세요.') ?>
<input type="text" name="po_etc" value="<?php echo get_text($po['po_etc']) ?>" id="po_etc" class="frm_input"
size="80" maxlength="125">
</td>
</tr>
<tr>
<th scope="row"><label for="po_level">투표가능 회원레벨</label></th>
<td colspan="4">
<?php echo help("레벨을 1로 설정하면 손님도 투표할 수 있습니다.") ?>
<?php echo get_member_level_select('po_level', 1, 10, $po['po_level']) ?> 이상 투표할 수 있음
</td>
</tr>
<tr>
<th scope="row"><label for="po_point">포인트</label></th>
<td colspan="4">
<?php echo help('투표에 참여한 회원에게 포인트를 부여합니다.') ?>
<input type="text" name="po_point" value="<?php echo $po['po_point'] ?>" id="po_point" class="frm_input">
</td>
</tr>
<?php if ($w == 'u') { ?>
<tr>
<th scope="row">투표등록일</th>
<td colspan="4"><?php echo $po['po_date']; ?></td>
</tr>
<tr>
<th scope="row"><label for="po_ips">투표참가 IP</label></th>
<td colspan="4"><textarea name="po_ips" id="po_ips" readonly
rows="10"><?php echo preg_replace("/\n/", " / ", $po['po_ips']) ?></textarea></td>
</tr>
<tr>
<th scope="row"><label for="mb_ids">투표참가 회원</label></th>
<td colspan="4"><textarea name="mb_ids" id="mb_ids" readonly
rows="10"><?php echo preg_replace("/\n/", " / ", $po['mb_ids']) ?></textarea></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./poll_list.php?<?php echo $qstr ?>">목록</a>
</div>
</form>
<?php
include_once "./admin.tail.php";

View file

@ -0,0 +1,62 @@
<?php
include_once "./_common.php";
$w = $_POST['w'];
if ($w == 'u' || $w == 'd')
check_demo();
auth_check($auth[$sub_menu], 'w');
check_admin_token();
if ($w == '') {
$sql = " insert {$g5['poll_table']}
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date )
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '" . G5_TIME_YMD . "' ) ";
sql_query($sql);
$po_id = sql_insert_id();
} else if ($w == 'u') {
$sql = "UPDATE {$g5['poll_table']} SET
po_subject = '{$_POST['po_subject']}',
po_poll1 = '{$_POST['po_poll1']}',
po_poll2 = '{$_POST['po_poll2']}',
po_poll3 = '{$_POST['po_poll3']}',
po_poll4 = '{$_POST['po_poll4']}',
po_poll5 = '{$_POST['po_poll5']}',
po_poll6 = '{$_POST['po_poll6']}',
po_poll7 = '{$_POST['po_poll7']}',
po_poll8 = '{$_POST['po_poll8']}',
po_poll9 = '{$_POST['po_poll9']}',
po_cnt1 = '{$_POST['po_cnt1']}',
po_cnt2 = '{$_POST['po_cnt2']}',
po_cnt3 = '{$_POST['po_cnt3']}',
po_cnt4 = '{$_POST['po_cnt4']}',
po_cnt5 = '{$_POST['po_cnt5']}',
po_cnt6 = '{$_POST['po_cnt6']}',
po_cnt7 = '{$_POST['po_cnt7']}',
po_cnt8 = '{$_POST['po_cnt8']}',
po_cnt9 = '{$_POST['po_cnt9']}',
po_etc = '{$_POST['po_etc']}',
po_level = '{$_POST['po_level']}',
po_point = '{$_POST['po_point']}'
WHERE po_id = '{$_POST['po_id']}' ";
sql_query($sql);
} else if ($w == 'd') {
$sql = " delete from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' ";
sql_query($sql);
$sql = " delete from {$g5['poll_etc_table']} where po_id = '{$_POST['po_id']}' ";
sql_query($sql);
}
// 가장 큰 투표번호를 기본환경설정에 저장하여
// 투표번호를 넘겨주지 않았을 경우
// 가장 큰 투표번호를 구해야 하는 쿼리를 대체한다
$row = sql_fetch(" select max(po_id) as max_po_id from {$g5['poll_table']} ");
sql_query(" update {$g5['config_table']} set cf_max_po_id = '{$row['max_po_id']}' ");
if ($w == 'd')
goto_url('./poll_list.php?' . $qstr);
else
goto_url('./poll_form.php?w=u&po_id=' . $po_id . '&amp;' . $qstr);

View file

@ -0,0 +1,153 @@
<?php
$sub_menu = "200900";
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['poll_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "po_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '투표관리';
include_once "./admin.head.php";
$colspan = 7;
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
투표수 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<div class="sch_last">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="po_subject" <?php echo get_selected($_GET['sfl'], "po_subject"); ?>>제목</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</div>
</form>
<div class="btn_add01 btn_add">
<a href="./poll_form.php" id="poll_add">투표 추가</a>
</div>
<form name="fpolllist" id="fpolllist" action="./poll_delete.php" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 투표 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">번호</th>
<th scope="col">제목</th>
<th scope="col">투표권한</th>
<th scope="col">투표수</th>
<th scope="col">기타의견</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$sql2 = " select sum(po_cnt1+po_cnt2+po_cnt3+po_cnt4+po_cnt5+po_cnt6+po_cnt7+po_cnt8+po_cnt9) as sum_po_cnt from {$g5['poll_table']} where po_id = '{$row['po_id']}' ";
$row2 = sql_fetch($sql2);
$po_etc = ($row['po_etc']) ? "사용" : "미사용";
$s_mod = '<a href="./poll_form.php?' . $qstr . '&amp;w=u&amp;po_id=' . $row['po_id'] . '">수정</a>';
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo cut_str(get_text($row['po_subject']), 70) ?>
투표</label>
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>">
</td>
<td class="td_num"><?php echo $row['po_id'] ?></td>
<td><?php echo cut_str(get_text($row['po_subject']), 70) ?></td>
<td class="td_num"><?php echo $row['po_level'] ?></td>
<td class="td_num"><?php echo $row2['sum_po_cnt'] ?></td>
<td class="td_etc"><?php echo $po_etc ?></td>
<td class="td_mngsmall">
<a href="<?= G5_BBS_URL ?>/poll.php?po_id=<?= $row['po_id'] ?>" target="_blank">보기</a>
<?php echo $s_mod ?>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">생성된 투표가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="선택삭제">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
$(function () {
$('#fpolllist').submit(function () {
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
if (!is_checked("chk[]")) {
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
return false;
}
return true;
} else {
return false;
}
});
});
</script>
<?php
include_once "./admin.tail.php";

View file

@ -0,0 +1,163 @@
<?php
$sub_menu = "300300";
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
// 체크된 자료 삭제
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
for ($i = 0; $i < count($_POST['chk']); $i++) {
$pp_id = $_POST['chk'][$i];
sql_query(" delete from {$g5['popular_table']} where pp_id = '$pp_id' ", true);
}
}
$sql_common = " from {$g5['popular_table']} a ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "pp_word":
$sql_search .= " ({$sfl} like '{$stx}%') ";
break;
case "pp_date":
$sql_search .= " ({$sfl} = '{$stx}') ";
break;
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "pp_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '인기검색어관리';
include_once './admin.head.php';
$colspan = 4;
?>
<script>
var list_update_php = '';
var list_delete_php = 'popular_list.php';
</script>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
건수 : <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<div class="sch_last">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="pp_word" <?php echo get_selected($_GET['sfl'], "pp_word"); ?>>검색어</option>
<option value="pp_date" <?php echo get_selected($_GET['sfl'], "pp_date"); ?>>등록일</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" value="검색" class="btn_submit">
</div>
</form>
<br>
<form name="fpopularlist" id="fpopularlist" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 인기검색어 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col"><?php echo subject_sort_link('pp_word') ?>검색어</a></th>
<th scope="col">등록일</th>
<th scope="col">등록IP</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$word = get_text($row['pp_word']);
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $word ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $row['pp_id'] ?>" id="chk_<?php echo $i ?>">
</td>
<td><a
href="<?php echo $_SERVER['SCRIPT_NAME'] ?>?sfl=pp_word&amp;stx=<?php echo $word ?>"><?php echo $word ?></a>
</td>
<td><?php echo $row['pp_date'] ?></td>
<td><?php echo $row['pp_ip'] ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<?php if ($is_admin == 'super') { ?>
<div class="list_confirm">
<button type="submit">선택삭제</button>
</div>
<?php } ?>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
$(function () {
$('#fpopularlist').submit(function () {
if (confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
if (!is_checked("chk[]")) {
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
return false;
}
return true;
} else {
return false;
}
});
});
</script>
<?php
include_once './admin.tail.php';
?>

View file

@ -0,0 +1,107 @@
<?php
$sub_menu = "300400";
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
if (empty($fr_date) || !preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $fr_date))
$fr_date = G5_TIME_YMD;
if (empty($to_date) || !preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $to_date))
$to_date = G5_TIME_YMD;
$qstr = "fr_date={$fr_date}{&amp;to_date}={$to_date}";
$sql_common = " from {$g5['popular_table']} a ";
$sql_search = " where trim(pp_word) <> '' and pp_date between '{$fr_date}' and '{$to_date}' ";
$sql_group = " group by pp_word ";
$sql_order = " order by cnt desc ";
$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} ";
$result = sql_query($sql);
$total_count = sql_num_rows($result);
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '인기검색어순위';
include_once './admin.head.php';
include_once G5_PLUGIN_PATH . '/jquery-ui/datepicker.php';
$colspan = 3;
?>
<script>
$(function () {
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
});
</script>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
건수 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch02 local_sch" method="get">
<div class="sch_last">
<strong>기간별검색</strong>
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" class="frm_input" size="11"
maxlength="10">
<label for="fr_date" class="sound_only">시작일</label>
~
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" class="frm_input" size="11"
maxlength="10">
<label for="to_date" class="sound_only">종료일</label>
<input type="submit" class="btn_submit" value="검색">
</div>
</form>
<br>
<form name="fpopularrank" id="fpopularrank" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">순위</th>
<th scope="col">검색어</th>
<th scope="col">검색회수</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$word = get_text($row['pp_word']);
$rank = ($i + 1 + ($rows * ($page - 1)));
?>
<tr>
<td class="td_num"><?php echo $rank ?></td>
<td><?php echo $word ?></td>
<td class="td_numbig"><?php echo $row['cnt'] ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
</form>
<?php
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page=");
include_once './admin.tail.php';

View file

@ -0,0 +1,299 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['recepi_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "re_id";
$sod = "asc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '레시피 관리';
include_once "./admin.head.php";
$colspan = 11;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">레시피 목록</a></li>
<li><a href="#anc_002">레시피 정보 입력</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
?>
<form name="fpointlist" id="fpointlist" method="post" action="./recipe_list_update.php"
onsubmit="return fpointlist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<section id="anc_001">
<h2 class="h2_frm">레시피 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 45px;" />
<col style="width: 80px;" />
<col style="width: 120px;" />
<col style="width: 80px;" />
<col style="width: 120px;" />
<col style="width: 80px;" />
<col style="width: 120px;" />
<col style="width: 80px;" />
<col style="width: 120px;" />
<col style="width: 50px;" />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">레시피정보 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col" colspan="2" class="bo-left bo-right">재료01</th>
<th scope="col" colspan="2" class="bo-right">재료02</th>
<th scope="col" colspan="2" class="bo-right">재료03</th>
<th scope="col" colspan="2" class="bo-right">조합결과</th>
<th scope="col" class="bo-right">사용</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
$re_item = explode("||", $row['re_item_order']);
$re_item = array_filter($re_item);
sort($re_item);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" name="re_id[<?php echo $i ?>]" value="<?php echo $row['re_id'] ?>"
id="re_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<?php
$img_url = Item::getImage($re_item[0]);
if ($img_url) {
echo "<img src='" . $img_url . "' style='width: 30px;' />";
}
?>
</td>
<td>
<?= Item::getName($re_item[0]) ?>
</td>
<td>
<?php
$img_url = Item::getImage($re_item[1]);
if ($img_url) {
echo "<img src='" . $img_url . "' style='width: 30px;' />";
}
?>
</td>
<td>
<?= Item::getName($re_item[1]) ?>
</td>
<td>
<?php
$img_url = Item::getImage($re_item[2]);
if ($img_url) {
echo "<img src='" . $img_url . "' style='width: 30px;' />";
}
?>
</td>
<td>
<?= Item::getName($re_item[2]) ?>
</td>
<td>
<?php
$img_url = Item::getImage($row['it_id']);
if ($img_url) {
echo "<img src='" . $img_url . "' style='width: 30px;' />";
}
?>
</td>
<td>
<?= Item::getName($row['it_id']) ?>
</td>
<td style="Text-align: center;">
<input type="checkbox" name="re_use[<?php echo $i ?>]" value="1" id="re_use_<?php echo $i ?>" <?php echo $row['re_use'] ? "checked" : "" ?>>
</td>
<td></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
</form>
<form name="fpointlist2" method="post" id="fpointlist2" action="./recipi_update.php" autocomplete="off">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<section id="anc_002">
<h2 class="h2_frm">레시피 정보 입력</h2>
<?php echo $pg_anchor ?>
<div class="local_desc02 local_desc">
<p>재료 선택 , [ 아이템 속성 > 레시피 재료 ] 설정이 되어 있는 아이템만 검색됩니다. </p>
</div>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">재료 01</th>
<td>
<input type="hidden" name="re_item1" id="re_item1" value="" />
<input type="text" name="re_item1_name" value="" id="re_item1_name" size="50"
onkeyup="get_ajax_item(this, 'item_01_list', 're_item1', '레시피');" />
<div id="item_01_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">재료 02</th>
<td>
<input type="hidden" name="re_item2" id="re_item2" value="" />
<input type="text" name="re_item2_name" value="" id="re_item2_name" size="50"
onkeyup="get_ajax_item(this, 'item_02_list', 're_item2', '레시피');" />
<div id="item_02_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">재료 03</th>
<td>
<input type="hidden" name="re_item3" id="re_item3" value="" />
<input type="text" name="re_item3_name" value="" id="re_item3_name" size="50"
onkeyup="get_ajax_item(this, 'item_03_list', 're_item3', '레시피');" />
<div id="item_03_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">결과</th>
<td>
<input type="hidden" name="it_id" id="it_id" value="" />
<input type="text" name="it_name" value="" id="it_name" size="50"
onkeyup="get_ajax_item(this, 'item_result_list', 'it_id');" />
<div id="item_result_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row"><label for="re_use">사용여부</label></th>
<td><input type="checkbox" name="re_use" value="1" id="re_use" checked /></td>
</tr>
</tbody>
</table>
</div>
</section>
<?= $frm_submit ?>
</form>
<script>
function fpointlist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once "./admin.tail.php";

View file

@ -0,0 +1,31 @@
<?php
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
$count = count($_POST['chk']);
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = " update {$g5['recepi_table']}
set re_use = '{$_POST['re_use'][$k]}'
where re_id = '{$_POST['re_id'][$k]}' ";
sql_query($sql);
}
} else if ($_POST['act_button'] == "선택삭제") {
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = " delete from {$g5['recepi_table']} where re_id = '{$_POST['re_id'][$k]}' ";
sql_query($sql);
}
}
goto_url('./recipe_list.php?' . $qstr);

View file

@ -0,0 +1,66 @@
<?php
/**
* @var string $re_item1_name
* @var string $re_item2_name
* @var string $re_item3_name
* @var string $it_name
* @var string|int $re_use
*/
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
check_token();
// 레시피 정보 등록
// - $re_item_order 를 큰 순서 대로 입력한다.
if (!$re_item1 && $re_item1_name) {
$it = sql_fetch("select it_id, it_use_recepi from {$g5['item_table']} where it_name = '{$re_item1_name}'");
if ($it['it_use_recepi'] == 0) {
alert("해당 아이템은 레시피 재료 기능이 설정되지 않은 아이템입니다.");
}
$re_item1 = $it['it_id'];
}
if (!$re_item2 && $re_item2_name) {
$it = sql_fetch("select it_id, it_use_recepi from {$g5['item_table']} where it_name = '{$re_item2_name}'");
if ($it['it_use_recepi'] == 0) {
alert("해당 아이템은 레시피 재료 기능이 설정되지 않은 아이템입니다.");
}
$re_item2 = $it['it_id'];
}
if (!$re_item3 && $re_item3_name) {
$it = sql_fetch("select it_id, it_use_recepi from {$g5['item_table']} where it_name = '{$re_item3_name}'");
if ($it['it_use_recepi'] == 0) {
alert("해당 아이템은 레시피 재료 기능이 설정되지 않은 아이템입니다.");
}
$re_item3 = $it['it_id'];
}
if (!$it_id && $it_name) {
$it = sql_fetch("select it_id from {$g5['item_table']} where it_name = '{$it_name}'");
$it_id = $it['it_id'];
}
$re_item[0] = $re_item1;
$re_item[1] = $re_item2;
$re_item[2] = $re_item3;
sort($re_item);
$re_item_order = implode("||", $re_item);
$re = sql_fetch("select count(*) as cnt from {$g5['recepi_table']} where re_item_order = '{$re_item_order}'");
;
if ($re['cnt'] > 0)
alert('이미 등록된 레시피 조합 입니다.', './recipe_list.php?' . $qstr);
sql_query("insert into {$g5['recepi_table']}
set re_item_order ='{$re_item_order}',
it_id = '{$it_id}',
re_use = '{$re_use}'
");
goto_url('./recipe_list.php?' . $qstr);

View file

@ -0,0 +1,410 @@
<?php
$sub_menu = "500100";
include_once './_common.php';
include_once G5_EDITOR_LIB;
auth_check($auth[$sub_menu], 'w');
$category = explode("||", $config['cf_shop_category']);
$html_title = '상점 진열 아이템';
$required = "";
$readonly = "";
if ($w == '') {
$html_title .= ' 등록';
$sound_only = '<strong class="sound_only">필수</strong>';
$shop['sh_use'] = '1';
$shop['sh_use_money'] = '1';
} else if ($w == 'u') {
$html_title .= ' 수정';
$shop = sql_fetch("select * from {$g5['shop_table']} where sh_id = '{$sh_id}'");
if (!$shop['sh_id'])
alert('존재하지 않는 진열정보 입니다.');
$readonly = 'readonly';
}
$g5['title'] = $html_title;
include_once './admin.head.php';
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">기본 설정</a></li>
<li><a href="#anc_002">구매가 설정</a></li>
<li><a href="#anc_003">구매제한 설정</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./shop_list.php?' . $qstr . '">목록</a>' . PHP_EOL;
$frm_submit .= '</div>';
/** 세력 정보 **/
if ($config['cf_side_title']) {
$ch_si = array();
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
/** 종족 정보 **/
if ($config['cf_class_title']) {
$ch_cl = array();
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
?>
<?php
include_once G5_PLUGIN_PATH . '/jquery-ui/datepicker.php';
if (empty($fr_date))
$fr_date = G5_TIME_YMD;
?>
<form name="fshopform" id="fshopform" action="./shop_form_update.php" onsubmit="return fshopform_submit(this)"
method="post" enctype="multipart/form-data">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="sh_id" value="<?php echo $sh_id ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<section id="anc_001">
<h2 class="h2_frm">진열 기본 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>아이템 기본 설정</caption>
<colgroup>
<col style="width: 130px;">
<col style="width: 80px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">판매여부</th>
<td colspan="2">
<input type="checkbox" name="sh_use" id="sh_use" value="1" <?= $shop['sh_use'] == '1' ? "checked" : "" ?> />
</td>
</tr>
<tr>
<th scope="row">상점 분류</th>
<td colspan="2">
<select name="ca_name">
<option value="">카테고리 선택</option>
<?php for ($i = 0; $i < count($category); $i++) {
if (!$category[$i])
continue;
?>
<option value="<?= $category[$i] ?>" <?= $shop['ca_name'] == $category[$i] ? "selected" : "" ?>>
<?= $category[$i] ?></option>
<?php } ?>
</td>
</tr>
<tr>
<th scope="row">진열 아이템</th>
<td colspan="2">
<input type="hidden" name="it_id" id="it_id" value="<?= $shop['it_id'] ?>" />
<input type="text" name="it_name" value="<?= get_item_name($shop['it_id']) ?>" id="it_name"
onkeyup="get_ajax_item(this, 'item_list', 'it_id');" />
<div id="item_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">아이템 설명</th>
<td colspan="2">
<input type="text" name="sh_content" value="<?php echo get_text($shop['sh_content']) ?>" size="80">
</td>
</tr>
<tr>
<th rowspan="3" scope="row">진열기간</th>
<td class="bo-right">날짜</td>
<td>
<?php echo help("※ 날짜를 지정하지 않을 시, 적용되지 않습니다.") ?>
<input type="text" name="sh_date_s" value="<?php echo get_text($shop['sh_date_s']) ?>" size="15"
class="date" />
~
<input type="text" name="sh_date_e" value="<?php echo get_text($shop['sh_date_e']) ?>" size="15"
class="date" />
</td>
</tr>
<tr>
<td class="bo-right">시간</td>
<td>
<?php echo help("※ 시작시간과 종료시간이 모두 00 일 시, 적용되지 않습니다.") ?>
<select name="sh_time_s">
<?php for ($i = 0; $i <= 24; $i++) { ?>
<option value="<?= $i ?>"><?= str_pad($i, 2, "0", STR_PAD_LEFT) ?></option>
<?php } ?>
</select>
~
<select name="sh_time_e">
<?php for ($i = 0; $i <= 24; $i++) { ?>
<option value="<?= $i ?>"><?= str_pad($i, 2, "0", STR_PAD_LEFT) ?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td class="bo-right">요일</td>
<td>
<?php echo help("※ 요일을 모두 체크하지 않을 시, 적용되지 않습니다.") ?>
<?php
for ($i = 0; $i < 7; $i++) {
?>
<span style="display: inline-block; padding-right: 20px;">
<input type="checkbox" name="sh_week[]" id="sh_week_<?= $i ?>" value="<?= $i ?>" <?= strstr($shop['sh_week'], "||" . $i . "||") ? "checked" : "" ?>>
<label for="sh_week_<?= $i ?>"><?= $yoil[$i] ?>요일</label>
</span>
<?php } ?>
</td>
</tr>
<tr>
<th>진열순서</th>
<td colspan="2">
<input type="text" name="sh_order" value="<?= $shop['sh_order'] ?>" id="sh_order" />
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_002">
<h2 class="h2_frm">가격 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>아이템 기본 설정</caption>
<colgroup>
<col style="width: 130px;">
<col style="width: 100px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row" rowspan="2"><?= $config['cf_money'] ?> 설정</th>
<td class="bo-right">
필요 <?= $config['cf_money'] ?>
</td>
<td>
<input type="text" name="sh_money" value="<?= $shop['sh_money'] ?>" size="15" />
<?= $config['cf_money_pice'] ?>
</td>
</tr>
<tr>
<td class="bo-right">소모여부</td>
<td>
<input type="checkbox" name="sh_use_money" id="sh_use_money" value="1" <?= $shop['sh_use_money'] == '1' ? "checked" : "" ?> />
<label for="sh_use_money">구매 <?= $config['cf_money'] ?> 소모</label>
</td>
</tr>
<tr>
<th scope="row" rowspan="2"><?= $config['cf_exp_name'] ?> 설정</th>
<td class="bo-right">
필요 <?= $config['cf_exp_name'] ?>
</td>
<td>
<input type="text" name="sh_exp" value="<?= $shop['sh_exp'] ?>" size="15" /> <?= $config['cf_exp_pice'] ?>
</td>
</tr>
<tr>
<td class="bo-right">소모여부</td>
<td>
<input type="checkbox" name="sh_use_exp" id="sh_use_exp" value="1" <?= $shop['sh_use_exp'] == '1' ? "checked" : "" ?> />
<label for="sh_use_exp">구매 <?= $config['cf_exp_name'] ?> 소모</label>
</td>
</tr>
<tr>
<th scope="row" rowspan="2">교환아이템 설정</th>
<td class="bo-right">
필요 아이템
</td>
<td>
<input type="hidden" name="sh_has_item" id="sh_has_item" value="<?= $shop['sh_has_item'] ?>" />
<input type="text" name="sh_has_item_name" value="<?= get_item_name($shop['sh_has_item']) ?>"
id="sh_has_item_name" onkeyup="get_ajax_item(this, 'has_item_list', 'sh_has_item');" />
<input type="text" name="sh_has_item_count" value="<?= $shop['sh_has_item_count'] ?>" size="5" />
<div id="has_item_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<td class="bo-right">소모여부</td>
<td>
<input type="checkbox" name="sh_use_has_item" id="sh_use_has_item" value="1"
<?= $shop['sh_use_has_item'] == '1' ? "checked" : "" ?> />
<label for="sh_use_has_item">구매 아이템 소모</label>
</td>
</tr>
<tr>
<th scope="row" rowspan="2">교환타이틀 설정</th>
<td class="bo-right">
필요 타이틀
</td>
<td>
<input type="hidden" name="sh_has_title" id="sh_has_title" value="<?= $shop['sh_has_title'] ?>" />
<input type="text" name="sh_has_title_name" value="<?= get_title($shop['sh_has_title'], true) ?>"
id="sh_has_title_name" onkeyup="get_ajax_title(this, 'has_title_list', 'sh_has_title');" />
<div id="has_title_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<td class="bo-right">소모여부</td>
<td>
<input type="checkbox" name="sh_use_has_title" id="sh_use_has_title" value="1"
<?= $shop['sh_use_has_title'] == '1' ? "checked" : "" ?> />
<label for="sh_use_has_title">구매 타이틀 소모</label>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
<section id="anc_003">
<h2 class="h2_frm">구매제한 설정</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<caption>아이템 기본 설정</caption>
<colgroup>
<col style="width: 130px;">
<col style="width: 100px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">구매갯수</th>
<td colspan="2">
<?php echo help("※ 1인당 구매가 가능한 갯수를 제한합니다. 0 입력 시 제한하지 않습니다.") ?>
<input type="text" name="sh_limit" value="<?= $shop['sh_limit'] ?>" size="10" />
</td>
</tr>
<tr>
<th scope="row">재고설정</th>
<td colspan="2">
<?php echo help("※ 총 판매 갯수를 제한합니다. 0 입력 시 제한하지 않습니다.") ?>
<input type="text" name="sh_qty" value="<?= $shop['sh_qty'] ?>" size="10" />
</td>
</tr>
<?php if ($config['cf_side_title']) { ?>
<tr>
<th scope="row" rowspan="2"><?= $config['cf_side_title'] ?> 제한 설정</th>
<td class="bo-right">
구매가능
</td>
<td>
<?php for ($i = 0; $i < count($ch_si); $i++) { ?>
<span style="display: inline-block; padding-right: 20px;">
<input type="checkbox" name="sh_side[]" id="sh_side_<?= $i ?>" value="<?= $ch_si[$i]['id'] ?>"
<?= strstr($shop['sh_side'], "||" . $ch_si[$i]['id'] . "||") ? "checked" : "" ?>>
<label for="sh_side_<?= $i ?>"><?= $ch_si[$i]['name'] ?></label>
</span>
<?php } ?>
</td>
</tr>
<tr>
<td class="bo-right">사용여부</td>
<td>
<input type="checkbox" name="sh_use_side" id="sh_use_side" value="1" <?= $shop['sh_use_side'] == '1' ? "checked" : "" ?> />
<label for="sh_use_side"><?= $config['sh_use_side'] ?> 제한 설정을 사용합니다.</label>
</td>
</tr>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<tr>
<th scope="row" rowspan="2"><?= $config['cf_class_title'] ?> 제한 설정</th>
<td class="bo-right">
구매가능
</td>
<td>
<?php for ($i = 0; $i < count($ch_cl); $i++) { ?>
<span style="display: inline-block; padding-right: 20px;">
<input type="checkbox" name="sh_class[]" id="sh_class_<?= $i ?>" value="<?= $ch_cl[$i]['id'] ?>"
<?= strstr($shop['sh_class'], "||" . $ch_cl[$i]['id'] . "||") ? "checked" : "" ?>>
<label for="sh_class_<?= $i ?>"><?= $ch_cl[$i]['name'] ?></label>
</span>
<?php } ?>
</td>
</tr>
<tr>
<td class="bo-right">사용여부</td>
<td>
<input type="checkbox" name="sh_use_class" id="sh_use_class" value="1" <?= $shop['sh_use_class'] == '1' ? "checked" : "" ?> />
<label for="sh_use_class"><?= $config['sh_use_class'] ?> 제한 설정을 사용합니다.</label>
</td>
</tr>
<?php } ?>
<?php
$use_level = sql_fetch("select ad_use_rank from {$g5['article_default_table']}");
if ($use_level['ad_use_rank']) {
$level_result = sql_query("select lv_id, lv_name from {$g5['level_table']} order by lv_exp desc");
?>
<tr>
<th scope="row" rowspan="2">랭킹 제한 설정</th>
<td class="bo-right">
구매가능
</td>
<td>
<?php for ($i = 0; $lv = sql_fetch_array($level_result); $i++) { ?>
<span style="display: inline-block; padding-right: 20px;">
<input type="checkbox" name="sh_rank[]" id="sh_rank_<?= $i ?>" value="<?= $lv['lv_id'] ?>"
<?= strstr($shop['sh_rank'], "||" . $lv['lv_id'] . "") ? "checked" : "" ?>>
<label for="sh_rank_<?= $i ?>"><?= $lv['lv_name'] ?></label>
</span>
<?php } ?>
</td>
</tr>
<tr>
<td class="bo-right">사용여부</td>
<td>
<input type="checkbox" name="sh_use_rank" id="sh_use_rank" value="1" <?= $shop['sh_use_rank'] == '1' ? "checked" : "" ?> />
<label for="sh_use_rank">랭킹 제한 설정을 사용합니다.</label>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</section>
<?php echo $frm_submit; ?>
</form>
<script>
$(function () {
$(".date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yymmdd", showButtonPanel: true, yearRange: "c-99:c+99" });
});
function fshopform_submit(f) {
return true;
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,119 @@
<?php
/**
* @var string $it_name
* @var string $sh_has_item_name
* @var string $sh_has_title_name
*/
include_once './_common.php';
if ($w == 'u')
check_demo();
auth_check($auth[$sub_menu], 'w');
check_token();
// 요일 데이터 저장
if (count($sh_week) > 0) {
$sh_week = implode("||", $sh_week);
$sh_week = "||" . $sh_week . "||";
}
// 소속 제한 설정 저장
if (count($sh_side) > 0) {
$sh_side = implode("||", $sh_side);
$sh_side = "||" . $sh_side . "||";
}
// 종족 제한 설정 저장
if (count($sh_class) > 0) {
$sh_class = implode("||", $sh_class);
$sh_class = "||" . $sh_class . "||";
}
// 랭킹 제한 설정 저장
if (count($sh_rank) > 0) {
$sh_rank = implode("||", $sh_rank);
$sh_rank = "||" . $sh_rank . "||";
}
// 진열 아이템 유효성 여부 체크
if (!$it_id && $it_name) {
$it = sql_fetch("select it_id from {$g5['item_table']} where it_name = '{$it_name}'");
$it_id = $it['it_id'];
if (!$it['it_id']) {
alert("진열 아이템으로 등록되는 아이템의 정보가 없습니다.");
}
}
// 교환 아이템 유효성 여부 체크
if (!$sh_has_item && $sh_has_item_name) {
$has_item = sql_fetch("select it_id from {$g5['item_table']} where it_name = '{$sh_has_item_name}'");
$sh_has_item = $has_item['it_id'];
if (!$has_item['it_id']) {
alert("교환 아이템으로 등록되는 아이템의 정보가 없습니다.");
}
}
if (!$sh_has_item_name) {
$sh_has_item = 0;
}
// 교환 타이틀 유효성 여부 체크
if (!$sh_has_title && $sh_has_title_name) {
$has_title = sql_fetch("select ti_id from {$g5['item_table']} where ti_title = '{$sh_has_title_name}'");
$sh_has_title = $has_title['ti_id'];
if (!$has_title['ti_id']) {
alert("교환 타이틀로 등록되는 타이틀의 정보가 없습니다.");
}
}
if (!$sh_has_title_name) {
$sh_has_title = 0;
}
$sql_common = "
it_id = '{$it_id}',
ca_name = '{$ca_name}',
sh_limit = '{$sh_limit}',
sh_qty = '{$sh_qty}',
sh_money = '{$sh_money}',
sh_use_money = '{$sh_use_money}',
sh_exp = '{$sh_exp}',
sh_use_exp = '{$sh_use_exp}',
sh_content = '{$sh_content}',
sh_side = '{$sh_side}',
sh_use_side = '{$sh_use_side}',
sh_class = '{$sh_class}',
sh_use_class = '{$sh_use_class}',
sh_rank = '{$sh_rank}',
sh_use_rank = '{$sh_use_rank}',
sh_has_item = '{$sh_has_item}',
sh_use_has_item = '{$sh_use_has_item}',
sh_has_item_count = '{$sh_has_item_count}',
sh_has_title = '{$sh_has_title}',
sh_use_has_title = '{$sh_use_has_title}',
sh_use = '{$sh_use}',
sh_date_s = '{$sh_date_s}',
sh_date_e = '{$sh_date_e}',
sh_time_s = '{$sh_time_s}',
sh_time_e = '{$sh_time_e}',
sh_week = '{$sh_week}',
sh_order = '{$sh_order}'
";
if ($w == '') {
$sql = " insert into {$g5['shop_table']}
set {$sql_common}";
sql_query($sql);
} else {
$sh = sql_fetch("select sh_id from {$g5['shop_table']} where sh_id = '{$sh_id}'");
if (!$sh['sh_id']) {
alert("상품 진열 정보가 존재하지 않습니다.");
}
$sql = " update {$g5['shop_table']}
set {$sql_common}
where sh_id = '{$sh_id}'";
sql_query($sql);
}
goto_url('./shop_list.php?' . $qstr, false);
?>

View file

@ -0,0 +1,310 @@
<?php
$sub_menu = "500100";
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$category = explode("||", $config['cf_shop_category']);
$use_level = sql_fetch("select ad_use_rank from {$g5['article_default_table']}");
$use_level = $use_level['ad_use_rank'] ? true : false;
$sql_common = " from {$g5['shop_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ($sfl like '%$stx%') ";
break;
}
$sql_search .= " ) ";
}
if ($cate) {
$sql_search .= " and ca_name = '{$cate}' ";
}
if (!$sst) {
$sst = "sh_id";
$sod = "asc";
}
$sql_order = " order by sh_order desc, $sst $sod ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '상점 관리';
include_once './admin.head.php';
/*******************************
구매 아이템 갯수 설정
*******************************/
if (!sql_query(" SELECT sh_has_item_count from {$g5['shop_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE {$g5['shop_table']} ADD `sh_has_item_count` int(11) NOT NULL DEFAULT '0' AFTER `sh_has_item`");
}
$colspan = 19;
?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
진열된 아이템 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<select name="cate" id="cate">
<option value="">카테고리</option>
<?php for ($i = 0; $i < count($category); $i++) {
if (!$category[$i])
continue;
?>
<option value="<?= $category[$i] ?>" <?= $cate == $category[$i] ? "selected" : "" ?>><?= $category[$i] ?></option>
<?php } ?>
</select>
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($_GET['sfl'], "it_name", true); ?>>아이템 이름</option>
<option value="it_content" <?php echo get_selected($_GET['sfl'], "it_content"); ?>>아이템 설명</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx">
<input type="submit" value="검색" class="btn_submit">
</form>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add">
<a href="./shop_form.php" id="bo_add">진열 추가</a>
</div>
<?php } ?>
<form name="fshoplist" id="fshoplist" action="./shop_list_update.php" onsubmit="return fshoplist_submit(this);"
method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="cate" value="<?php echo $cate ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col" class="bo-right">
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">분류</th>
<th scope="col" colspan="2">아이템</th>
<th scope="col">진열기간</th>
<th scope="col" colspan="2">구매금액</th>
<th scope="col" colspan="2">구매<?= $config['cf_exp_name'] ?></th>
<th scope="col" colspan="4">교환아이템</th>
<th scope="col" colspan="2">교환타이틀</th>
<th scope="col">구매갯수</th>
<th scope="col">재고갯수</th>
<th scope="col">순서</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $shop = sql_fetch_array($result); $i++) {
$one_update = '<a href="./shop_form.php?w=u&amp;sh_id=' . $shop['sh_id'] . '&amp;' . $qstr . '">수정</a>';
$bg = 'bg' . ($i % 2);
$is_order_limit = false;
?>
<tr class="<?php echo $bg; ?>">
<td style="width:30px; padding:0;" class="txt-center">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
<input type="hidden" name="sh_id[<?php echo $i ?>]" value="<?php echo $shop['sh_id'] ?>" />
</td>
<td style="width:100px;">
<select name="ca_name[<?php echo $i ?>]" style="width:100%;">
<option value="">카테고리</option>
<?php for ($k = 0; $k < count($category); $k++) {
if (!$category[$k])
continue;
?>
<option value="<?= $category[$k] ?>" <?= $shop['ca_name'] == $category[$k] ? "selected" : "" ?>>
<?= $category[$k] ?></option>
<?php } ?>
</select>
</td>
<td style="width:27px; padding:0; border-right-width:0;">
<?php if ($shop['it_id']) { ?>
<img src="<?= get_item_img($shop['it_id']) ?>" style="max-width:20px; max-height:20px;" />
<?php } ?>
</td>
<td style="text-align:left; padding-left:0;">
<?php if ($shop['it_id']) {
echo get_item_name($shop['it_id']);
} ?>
</td>
<td class="txt-left">
<?php if ($shop['sh_date_s']) {
$is_order_limit = true; ?>
<p><?= date('Y-m-d', strtotime($shop['sh_date_s'])) ?> ~ <?= date('Y-m-d', strtotime($shop['sh_date_e'])) ?></p>
<?php } ?>
<?php if ($shop['sh_time_s']) {
$is_order_limit = true; ?>
<p><?= $shop['sh_time_s'] ?>시 ~ <?= $shop['sh_time_e'] ?>시</p>
<?php } ?>
<?php if ($shop['sh_week']) {
$is_order_limit = true;
echo "<p>";
$str_week = explode("||", $shop['sh_week']);
$add_str = "";
for ($k = 0; $k < count($str_week); $k++) {
if ($str_week[$k] == '')
continue;
?>
<?= $add_str . $yoil[$str_week[$k]] ?>
<?php
$add_str = ", ";
}
echo "</p>";
}
if (!$is_order_limit) {
echo "<span style='opacity:.5;'>상시판매</span>";
}
?>
</td>
<td style="width:30px; padding:0; border-right-width:0;">
<input type="checkbox" name="sh_use_money[<?php echo $i ?>]" value="1" <?php echo $shop['sh_use_money'] ? "checked" : "" ?>>
</td>
<td style="width:80px; padding-left:0;">
<input type="text" name="sh_money[<?php echo $i ?>]" value="<?php echo get_text($shop['sh_money']) ?>"
style="width:100%;">
</td>
<td style="width:30px; padding:0; border-right-width:0;">
<input type="checkbox" name="sh_use_exp[<?php echo $i ?>]" value="1" <?php echo $shop['sh_use_exp'] ? "checked" : "" ?>>
</td>
<td style="width:80px; padding-left:0;">
<input type="text" name="sh_exp[<?php echo $i ?>]" value="<?php echo get_text($shop['sh_exp']) ?>"
style="width:100%;">
</td>
<td style="width:30px; padding:0; border-right-width:0;">
<input type="checkbox" name="sh_use_has_item[<?php echo $i ?>]" value="1" <?php echo $shop['sh_use_has_item'] ? "checked" : "" ?>>
</td>
<td style="width:27px; padding:0; border-right-width:0;">
<?php if ($shop['sh_has_item']) { ?>
<img src="<?= get_item_img($shop['sh_has_item']) ?>" style="max-width:20px; max-height:20px;" />
<?php } ?>
</td>
<td style="text-align:left; padding-left:0; padding-right:0; border-right-width:0;">
<?php if ($shop['sh_has_item']) {
echo get_item_name($shop['sh_has_item']);
} else {
echo "-";
} ?>
</td>
<td style="width:60px;">
<input type="text" name="sh_has_item_count[<?php echo $i ?>]"
value="<?php echo get_text($shop['sh_has_item_count']) ?>" style="width:70%;">
</td>
<td style="width:30px; padding:0; border-right-width:0;">
<input type="checkbox" name="sh_use_has_title[<?php echo $i ?>]" value="1" <?php echo $shop['sh_use_has_title'] ? "checked" : "" ?>>
</td>
<td style="text-align:left; padding-left:0;">
<?php if ($shop['sh_has_title']) { ?>
<?= get_title_image($shop['sh_has_title']) ?>
<?php } else { ?>
-
<?php } ?>
</td>
<td style="width:50px;">
<input type="text" name="sh_limit[<?php echo $i ?>]" value="<?php echo get_text($shop['sh_limit']) ?>"
style="width:100%;">
</td>
<td style="width:50px;">
<input type="text" name="sh_qty[<?php echo $i ?>]" value="<?php echo get_text($shop['sh_qty']) ?>"
style="width:100%;">
</td>
<td style="width:50px;">
<input type="text" name="sh_order[<?php echo $i ?>]" value="<?php echo get_text($shop['sh_order']) ?>"
style="width:100%;">
</td>
<td style="width:50px;" class="td_mngsmall">
<?php echo $one_update ?>
<?php echo $one_copy ?>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<?php } ?>
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'] . '?' . $qstr . '&amp;cate=' . $cate . '&amp;cate2=' . $cate2 . '&amp;map_id=' . $map_id . '&amp;page='); ?>
<script>
function fshoplist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';
?>

View file

@ -0,0 +1,52 @@
<?php
$sub_menu = "500100";
include_once './_common.php';
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] == "선택수정") {
auth_check($auth[$sub_menu], 'w');
for ($i=0; $i<count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$sql = " update {$g5['shop_table']}
set ca_name = '{$_POST['ca_name'][$k]}',
sh_money = '{$_POST['sh_money'][$k]}',
sh_use_money = '{$_POST['sh_use_money'][$k]}',
sh_exp = '{$_POST['sh_exp'][$k]}',
sh_use_exp = '{$_POST['sh_use_exp'][$k]}',
sh_limit = '{$_POST['sh_limit'][$k]}',
sh_qty = '{$_POST['sh_qty'][$k]}',
sh_use_money = '{$_POST['sh_use_money'][$k]}',
sh_use_exp = '{$_POST['sh_use_exp'][$k]}',
sh_use_has_title = '{$_POST['sh_use_has_title'][$k]}',
sh_use_has_item = '{$_POST['sh_use_has_item'][$k]}',
sh_has_item_count = '{$_POST['sh_has_item_count'][$k]}',
sh_order = '{$_POST['sh_order'][$k]}'
where sh_id = '{$_POST['sh_id'][$k]}' ";
sql_query($sql);
}
} else if ($_POST['act_button'] == "선택삭제") {
auth_check($auth[$sub_menu], 'd');
check_token();
for ($i=0; $i<count($_POST['chk']); $i++) {
$k = $_POST['chk'][$i];
$temp_sh_id = trim($_POST['sh_id'][$k]);
if (!$temp_sh_id) { return; }
sql_query(" delete from {$g5['shop_table']} where sh_id = '{$temp_sh_id}'");
}
}
goto_url('./shop_list.php?'.$qstr."&cate=".$cate);

View file

@ -0,0 +1,195 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['side_table']} ";
$sql_search = " where (1) ";
if (!$sst) {
$sst = "si_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = $config['cf_side_title'] . ' 관리';
include_once './admin.head.php';
$colspan = 7;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">' . $config['cf_side_title'] . ' 목록</a></li>
<li><a href="#anc_002">' . $config['cf_side_title'] . ' 등록</a></li>
</ul>';
?>
<section id="anc_001">
<h2 class="h2_frm"><?= $config['cf_side_title'] ?> 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fsidelist" id="fsidelist" method="post" action="./side_list_delete.php"
onsubmit="return fsidelist_submit(this);" enctype="multipart/form-data">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 50px;" />
<col style="width: 120px;" />
<col class="grid_5" />
<col />
<col class="grid_3" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only"><?= $config['cf_side_title'] ?> 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">IDX</th>
<th scope="col" colspan="2">이미지</th>
<th scope="col"><?= $config['cf_side_title'] ?>명</th>
<th scope="col">선택권한</th>
<th scope="col">보기</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td style="text-align: center">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<input type="text" name="si_id[<?php echo $i ?>]" value="<?php echo $row['si_id'] ?>"
id="si_id_<?php echo $i ?>" readonly style="width: 30px;">
</td>
<td style="text-align: center">
<?php if ($row['si_img']) { ?>
<img class="side-image" src='<?= $row['si_img'] ?>' alt='<?= $row['si_name'] ?>'>
<input type="hidden" name="old_si_img[<?= $i ?>]" value="<?= $row['si_img'] ?>" />
<?php } ?>
</td>
<td>
<input type="file" name="si_img[<?= $i ?>]" id="si_img<?= $i ?>" />
</td>
<td>
<input type="text" name="si_name[<?php echo $i ?>]" value="<?php echo $row['si_name'] ?>"
class="frm_input" style="width: 98%;">
</td>
<td>
<?php echo get_member_level_select("si_auth[$i]", 2, $member['mb_level'], $row['si_auth']) ?>
</td>
<td>
<a href="<?= G5_URL ?>/member/index.php?side=<?= $row['si_id'] ?>" target="_blank">
멤버목록보기
</a>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<section id="anc_002">
<h2 class="h2_frm"><?= $config['cf_side_title'] ?>정보 등록</h2>
<?php echo $pg_anchor ?>
<form name="fsideform" method="post" id="fsideform" action="./side_update.php" autocomplete="off"
enctype="multipart/form-data">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="si_name"><?= $config['cf_side_title'] ?>명<strong
class="sound_only">필수</strong></label></th>
<td><input type="text" name="si_name" id="si_name" class="required frm_input" required></td>
</tr>
<tr>
<th scope="row"><label for="si_img">이미지<strong class="sound_only">필수</strong></label></th>
<td><input type="file" name="si_img" id="si_img"></td>
</tr>
<tr>
<th scope="row"><label for="si_auth">선택권한</label></th>
<td><?php echo get_member_level_select('si_auth', 2, $member['mb_level'], $mb['mb_level']) ?></td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fsidelist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';

View file

@ -0,0 +1,84 @@
<?php
include_once './_common.php';
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
auth_check($auth[$sub_menu], 'w');
$side_path = G5_DATA_PATH . "/side";
$side_url = G5_DATA_URL . "/side";
@mkdir($side_path, G5_DIR_PERMISSION);
@chmod($side_path, G5_DIR_PERMISSION);
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
$sql_common = "";
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$si = sql_fetch("select * from {$g5['side_table']} where si_id = '{$_POST['si_id'][$k]}'");
if (!$si['si_id']) {
$msg .= $si['si_id'] . ' : 기존 자료가 존재하지 않습니다.\\n';
} else {
if ($img = $_FILES['si_img']['name'][$k]) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("관련 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 기존 데이터 삭제
$prev_file_path = str_replace(G5_URL, G5_PATH, $si['si_img'][$k]);
@unlink($prev_file_path);
// 확장자 따기
$exp = explode(".", $_FILES['si_img']['name'][$k]);
$exp = $exp[count($exp) - 1];
$image_name = "side_" . time() . "." . $exp;
upload_file($_FILES['si_img']['tmp_name'][$k], $image_name, $side_path);
$image_url = $side_url . "/" . $image_name;
$sql_common .= " , si_img = '{$image_url}' ";
}
}
$sql = " update {$g5['side_table']}
set si_name = '{$_POST['si_name'][$k]}',
si_auth = '{$_POST['si_auth'][$k]}'
{$sql_common}
";
$sql .= " where si_id = '{$_POST['si_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
$count = count($_POST['chk']);
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 소속 내역삭제
$sql = " delete from {$g5['side_table']} where si_id = '{$_POST['si_id'][$k]}' ";
sql_query($sql);
// 소속 아이콘 이미지 삭제
if ($_POST['old_si_img'][$k]) {
// 기존 데이터 삭제
$prev_file_path = str_replace(G5_URL, G5_PATH, $_POST['old_si_img'][$k]);
@unlink($prev_file_path);
}
}
}
if ($msg)
alert($msg);
goto_url('./side_list.php?' . $qstr);

View file

@ -0,0 +1,41 @@
<?php
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
$side_path = G5_DATA_PATH . "/side";
$side_url = G5_DATA_URL . "/side";
@mkdir($side_path, G5_DIR_PERMISSION);
@chmod($side_path, G5_DIR_PERMISSION);
/** 소속 아이콘 등록 **/
$sql_common = "";
if ($img = $_FILES['si_img']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("타이틀 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 확장자 따기
$exp = explode(".", $_FILES['si_img']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "side_" . time() . "." . $exp;
upload_file($_FILES['si_img']['tmp_name'], $image_name, $side_path);
$image_url = $side_url . "/" . $image_name;
$sql_common .= " , si_img = '{$image_url}' ";
}
}
$sql = " insert into {$g5['side_table']}
set si_name = '{$_POST['si_name']}',
si_auth = '{$_POST['si_auth']}'
{$sql_common}
";
sql_query($sql);
goto_url('./side_list.php?' . $qstr);

View file

@ -0,0 +1,22 @@
<?php
$sub_menu = "400420";
include_once './_common.php';
auth_check($auth[$sub_menu], 'w');
check_token();
$st_help = htmlspecialchars($_POST['st_help'], ENT_QUOTES);
$sql = " insert into {$g5['status_config_table']}
set st_name = '{$_POST['st_name']}',
st_max = '{$_POST['st_max']}',
st_min = '{$_POST['st_min']}',
st_order = '{$_POST['st_order']}',
st_use_max = '{$_POST['st_use_max']}',
st_help = '{$st_help}'
";
sql_query($sql);
goto_url('./status_list.php?' . $qstr);
?>

View file

@ -0,0 +1,226 @@
<?php
$sub_menu = "400420";
include_once './_common.php';
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['status_config_table']} ";
$sql_search = " where (1) ";
$sql_order = " order by st_order asc ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '스탯설정 관리';
include_once './admin.head.php';
$colspan = 7;
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">스탯 설정 목록</a></li>
<li><a href="#anc_002">스탯 설정 등록</a></li>
</ul>';
?>
<div class="local_desc02 local_desc">
<p>캐릭터 생성 지급되는 전체 스탯포인트 설정은 [ <a href="./community_form.php">환경설정 > 커뮤니티 설정</a> ] 에서 설정해 주시길 바랍니다.</p>
</div>
<section id="anc_001">
<h2 class="h2_frm">스탯 설정 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fstatuslist" id="fstatuslist" method="post" action="./status_list_update.php"
onsubmit="return fstatuslist_submit(this);" enctype="multipart/form-data">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col />
<col style="width: 150px;" />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">스탯설정 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">스탯명</th>
<th scope="col">최대값</th>
<th scope="col">최소값</th>
<th scope="col">순서</th>
<th scope="col">도움말</th>
<th scope="col">기준</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td style="text-align: center">
<input type="hidden" name="st_id[<?php echo $i ?>]" value="<?php echo $row['st_id'] ?>"
id="st_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<input type="text" name="st_name[<?php echo $i ?>]" value="<?php echo $row['st_name'] ?>"
style="width: 98%;">
</td>
<td>
<input type="text" name="st_max[<?php echo $i ?>]" value="<?php echo $row['st_max'] ?>"
style="width: 98%;">
</td>
<td>
<input type="text" name="st_min[<?php echo $i ?>]" value="<?php echo $row['st_min'] ?>"
style="width: 98%;">
</td>
<td>
<input type="text" name="st_order[<?php echo $i ?>]" value="<?php echo $row['st_order'] ?>"
style="width: 98%;">
</td>
<td>
<input type="text" name="st_help[<?php echo $i ?>]" value="<?php echo $row['st_help'] ?>"
style="width: 98%;">
</td>
<td>
<input type="checkbox" name="st_use_max[<?php echo $i ?>]" id="st_use_max_<?= $i ?>" value="1"
<?= $row['st_use_max'] ? "checked" : "" ?> />
<label for="st_use_max_<?= $i ?>">최대값 기준으로 출력</label>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<section id="anc_002">
<h2 class="h2_frm">스탯 설정 등록</h2>
<?php echo $pg_anchor ?>
<form name="fstatuslist2" method="post" id="fstatuslist2" action="./status_form_update.php" autocomplete="off"
enctype="multipart/form-data">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="st_name">스탯명</label></th>
<td><input type="text" name="st_name" id="st_name" class="required" required></td>
</tr>
<tr>
<th scope="row"><label for="st_max">최대값</label></th>
<td><input type="text" name="st_max" /></td>
</tr>
<tr>
<th scope="row"><label for="st_min">최소값</label></th>
<td><input type="text" name="st_min" /></td>
</tr>
<tr>
<th scope="row"><label for="st_help">도움말</label></th>
<td><input type="text" name="st_help" style="width: 80%;" /></td>
</tr>
<tr>
<th scope="row"><label for="st_order">순서</label></th>
<td><input type="text" name="st_order" /></td>
</tr>
<tr>
<th scope="row"><label for="st_use_max">기준계산</label></th>
<td>
<?php echo help("※ 그래프 출력에 필요한 전체 기준값을 설정합니다."); ?>
<?php echo help("※ 최대값 기준 체크 시, 최대값을 기준으로 계산되며 체크하지 않을 시, 캐릭터가 보유 하고 있는 보유량과 소모량을 계산하여 설정됩니다."); ?>
<input type="checkbox" name="st_use_max" id="st_use_max" value="1" />
<label for="st_use_max">최대값 기준으로 출력</label>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit">
</div>
</form>
</section>
<script>
function fstatuslist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
</script>
<?php
include_once './admin.tail.php';
?>

View file

@ -0,0 +1,59 @@
<?php
$sub_menu = '400420';
include_once './_common.php';
check_demo();
if (!count($_POST['chk'])) {
alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
auth_check($auth[$sub_menu], 'w');
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
$sql_common = "";
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$lv = sql_fetch("select * from {$g5['status_config_table']} where st_id = '{$_POST['st_id'][$k]}'");
if (!$lv['st_id']) {
$msg .= $lv['st_id'] . ' : 기존 자료가 존재하지 않습니다.\\n';
} else {
$st_help_str = htmlspecialchars($_POST['st_help'][$k], ENT_QUOTES);
$sql = " update {$g5['status_config_table']}
set st_name = '{$_POST['st_name'][$k]}',
st_max = '{$_POST['st_max'][$k]}',
st_min = '{$_POST['st_min'][$k]}',
st_order = '{$_POST['st_order'][$k]}',
st_use_max = '{$_POST['st_use_max'][$k]}',
st_help = '{$st_help_str}'
";
$sql .= " where st_id = '{$_POST['st_id'][$k]}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
$count = count($_POST['chk']);
for ($i = 0; $i < $count; $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
// 스탯 설정값 제거
$sql = " delete from {$g5['status_config_table']} where st_id = '{$_POST['st_id'][$k]}' ";
sql_query($sql);
$sql = " delete from {$g5['status_table']} where st_id = '{$_POST['st_id'][$k]}' ";
sql_query($sql);
}
}
if ($msg)
alert($msg);
goto_url('./status_list.php?' . $qstr);
?>

View file

@ -0,0 +1,254 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g5['title_has_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "hi_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '타이틀 보유현황 관리';
include_once "./admin.head.php";
$colspan = 6;
if (strstr($sfl, "ch_id"))
$ch_id = $stx;
else
$ch_id = "";
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">타이틀 지급</a></li>
<li><a href="#anc_002">타이틀 보유 목록</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
?>
<form name="ftitlelist2" method="post" id="ftitlelist2" action="./title_has_update.php" autocomplete="off">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<section id="anc_001">
<h2 class="h2_frm">타이틀 지급</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">지급유형</th>
<td>
<input type="radio" id="take_type_01" name="take_type" value="P" checked
onclick="if(document.getElementById('take_type_01').checked) $('#take_member_name').show();" />
<label for="take_type_01">개별지급</label>
&nbsp;&nbsp;
<input type="radio" id="take_type_02" name="take_type" value="A"
onclick="if(document.getElementById('take_type_02').checked) $('#take_member_name').hide();" />
<label for="take_type_02">전체지급</label>
</td>
</tr>
<tr id="take_member_name">
<th scope="row">캐릭터 이름</th>
<td>
<?php echo help('개별지급 시 입력') ?>
<input type="hidden" name="ch_id" id="ch_id" value="" />
<input type="text" name="ch_name" value="" id="ch_name"
onkeyup="get_ajax_character(this, 'character_list', 'ch_id');" />
<div id="character_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th scope="row">타이틀 이름</th>
<td>
<input type="hidden" name="ti_id" id="ti_id" value="" />
<input type="text" name="ti_name" value="" id="ti_name"
onkeyup="get_ajax_title(this, 'title_list', 'ti_id');" />
<div id="title_list" class="ajax-list-box">
<div class="list"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" id="btn_submit">
</div>
</form>
<section id="anc_002">
<h2 class="h2_frm">타이틀 보유 현황</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
전체 <?php echo number_format($total_count) ?>
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl" id="sfl">
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
<option value="it_name" <?php echo get_selected($_GET['sfl'], "ti_title"); ?>>타이틀 이름</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" class="btn_submit" value="검색">
</form>
<br />
<form name="ftitlelist" id="ftitlelist" method="post" action="./title_has_list_delete.php"
onsubmit="return ftitlelist_submit(this);">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 50px;" />
<col style="width: 150px;" />
<col style="width: 150px;" />
<col />
<col style="width: 80px;" />
<col style="width: 80px;" />
</colgroup>
<thead>
<tr>
<th>
<label for="chkall" class="sound_only">타이틀 내역 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>&nbsp;</th>
<th>소유자</th>
<th>타이틀 이름</th>
<th>상태</th>
<th>사용여부</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
$ti = sql_fetch("select * from {$g5['title_table']} where ti_id = '{$row['ti_id']}'");
$ch = sql_fetch("select ch_name, ch_title from {$g5['character_table']} where ch_id = '{$row['ch_id']}'");
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="hi_id[<?php echo $i ?>]" value="<?php echo $row['hi_id'] ?>"
id="hi_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<img src="<?= $ti['ti_img'] ?>" />
</td>
<td class="txt-left">
<?php echo get_text($ch['ch_name']); ?>
</td>
<td class="txt-left">
<?php echo get_text($ti['ti_title']); ?>
</td>
<td>
<?= $ch['ch_title'] == $row['ti_id'] ? "착용" : "<span style='color: #cacaca;'>미착용</span>" ?>
</td>
<td>
<?php echo $row['hi_use'] == '1' ? 'Y' : 'N' ?>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page="); ?>
</section>
<script>
function ftitlelist_submit(f) {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
}
$(document).ready(function () {
});
</script>
<?php
include_once "./admin.tail.php";
?>

View file

@ -0,0 +1,19 @@
<?php
include_once "./_common.php";
check_demo();
auth_check($auth[$sub_menu], 'd');
check_token();
$count = count($_POST['chk']);
if (!$count)
alert($_POST['act_button'] . ' 하실 항목을 하나 이상 체크하세요.');
for ($i = 0; $i < $count; $i++) {
$k = $_POST['chk'][$i];
$sql = " delete from {$g5['title_has_table']} where hi_id = '{$_POST['hi_id'][$k]}' ";
sql_query($sql);
}
goto_url('./title_has_list.php?' . $qstr);

View file

@ -0,0 +1,73 @@
<?php
/**
* @var string $ti_name
* @var string $ch_name
*/
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
check_token();
if (!$ti_id && $ti_name) {
$ti = sql_fetch("select ti_id from {$g5['title_table']} where ti_title = '{$ti_name}'");
if (!$ti['ti_id']) {
alert("해당 타이틀의 정보가 없습니다.");
}
$ti_id = $ti['ti_id'];
} else {
$ti = sql_fetch("select ti_id from {$g5['title_table']} where ti_id = '{$ti_id}'");
}
if (!$ti['ti_id']) {
alert("등록된 자료가 없습니다.");
}
if ($take_type == 'A') {
// 전체지급
$sql_common = " from {$g5['character_table']} ";
$sql_search = " where ch_state = '승인' ";
$sql = " select ch_id, ch_name {$sql_common} {$sql_search} ";
$result = sql_query($sql);
for ($i = 0; $ch = sql_fetch_array($result); $i++) {
// 동일 타이틀 중복 지급 여부 체크
$m_ti = sql_fetch("select count(*) as cnt from {$g5['title_has_table']} where ti_id = '{$ti_id}' and ch_id = '{$ch['ch_id']}'");
if (!$m_ti['cnt']) {
$sql = " insert into {$g5['title_has_table']}
set ch_id = '{$ch['ch_id']}',
ch_name = '{$ch['ch_name']}',
ti_id = '{$ti['ti_id']}',
hi_use = '1'";
sql_query($sql);
}
}
} else {
// 개별지급
if (!$ch_id && $ch_name) {
$ch = sql_fetch("select ch_id, ch_name from {$g5['character_table']} where ch_name = '{$ch_name}'");
$ch_id = $ch['ch_id'];
} else {
$ch = sql_fetch("select ch_id, ch_name from {$g5['character_table']} where ch_id = '{$ch_id}'");
}
if (!$ch['ch_id'])
alert('존재하는 캐릭터가 아닙니다.');
// 동일 타이틀 중복 지급 여부 체크
$m_ti = sql_fetch("select count(*) as cnt from {$g5['title_has_table']} where ti_id = '{$ti_id}' and ch_id = '{$ch['ch_id']}'");
if (!$m_ti['cnt']) {
$sql = " insert into {$g5['title_has_table']}
set ch_id = '{$ch['ch_id']}',
ch_name = '{$ch['ch_name']}',
ti_id = '{$ti['ti_id']}',
hi_use = '1'";
sql_query($sql);
}
}
goto_url('./title_has_list.php?' . $qstr);

View file

@ -0,0 +1,214 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'r');
$sql_common = " from {$g5['title_table']} ";
$sql_search = " where (1) ";
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
default:
$sql_search .= " ({$sfl} like '%{$stx}%') ";
break;
}
$sql_search .= " ) ";
}
if (!$sst) {
$sst = "ti_id";
$sod = "desc";
}
$sql_order = " order by {$sst} {$sod} ";
$sql = " select count(*) as cnt
{$sql_common}
{$sql_search}
{$sql_order} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_search}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '<a href="' . $_SERVER['SCRIPT_NAME'] . '" class="ov_listall">전체목록</a>';
$g5['title'] = '타이틀 관리';
include_once "./admin.head.php";
$pg_anchor = '<ul class="anchor">
<li><a href="#anc_001">타이틀 목록</a></li>
<li><a href="#anc_002">타이틀 등록</a></li>
</ul>';
$frm_submit = '<div class="list_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>';
$colspan = 5;
?>
<section id="anc_001">
<h2 class="h2_frm">타이틀 목록</h2>
<?php echo $pg_anchor ?>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
타이틀 <?php echo number_format($total_count) ?>
</div>
<form name="ftitlelist" id="ftitlelist" action="./title_list_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<colgroup>
<col style="width: 45px;" />
<col style="width: 200px;" />
<col style="width: 200px;" />
<col />
<col style="width: 80px;" />
<col />
</colgroup>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 타이틀 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th>이미지</th>
<th>이미지 수정</th>
<th>타이틀명</th>
<th>사용유무</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $ti = sql_fetch_array($result); $i++) {
$bg = 'bg' . ($i % 2);
?>
<tr class="<?php echo $bg; ?>">
<td>
<input type="hidden" name="ti_id[<?php echo $i ?>]" value="<?php echo $ti['ti_id'] ?>"
id="ti_id_<?php echo $i ?>">
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
<td>
<?php if ($ti['ti_img']) { ?>
<img src="<?= $ti['ti_img'] ?>" />
<input type="hidden" name="old_ti_img[<?= $i ?>]" value="<?= $ti['ti_img'] ?>" />
<?php } ?>
</td>
<td>
<input type="file" name="ti_img[<?= $i ?>]" id="ti_img<?= $i ?>" />
</td>
<td>
<input type="text" name="ti_title[<?php echo $i ?>]" value="<?php echo $ti['ti_title'] ?>"
class="frm_input" style="width: 98%;">
</td>
<td style="text-align: center;">
<select name="ti_use[<?php echo $i; ?>]">
<option value="">사용안함</option>
<option value="Y" <?php echo $ti['ti_use'] == 'Y' ? 'selected' : ''; ?>>사용</option>
</select>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
</div>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&amp;page="); ?>
<script>
$(function () {
$('#ftitlelist').submit(function () {
if (!is_checked("chk[]")) {
alert(document.pressed + " 하실 항목을 하나 이상 선택하세요.");
return false;
}
if (document.pressed == "선택삭제") {
if (!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
return false;
}
}
return true;
});
});
</script>
</section>
<section id="anc_002" style="margin-top: 0; margin-bottom: 50px;">
<form name="fpointlist2" method="post" id="fpointlist2" action="./title_update.php" autocomplete="off"
enctype="multipart/form-data">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<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 ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<input type="hidden" name="ch_id" id="ch_id" value="<?= $ch_id ?>" />
<input type="hidden" name="mb_id" value="<?php echo $ch['mb_id'] ?>">
<h2 class="h2_frm">타이틀 신규 등록</h2>
<?php echo $pg_anchor ?>
<div class="tbl_frm01 tbl_wrap">
<table>
<colgroup>
<col style="width: 150px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="ti_title">타이틀 </label></th>
<td>
<input type="text" name="ti_title" value="" id="ti_title" class="frm_input" />
</td>
</tr>
<tr>
<th scope="row"><label for="ti_img">타이틀 이미지<strong class="sound_only">필수</strong></label></th>
<td>
<input type="file" name="ti_img" id="ti_img" />
</td>
</tr>
<tr>
<th scope="row"><label for="ti_value">사용유무</label></th>
<td>
<select name="ti_use">
<option value="">사용안함</option>
<option value="Y" selected>사용</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list_confirm">
<input type="submit" value="등록" class="btn_submit" id="btn_submit">
</div>
</form>
</section>
<?php
include_once "./admin.tail.php";
?>

View file

@ -0,0 +1,75 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
check_token();
$title_path = G5_DATA_PATH . "/title";
$title_url = G5_DATA_URL . "/title";
@mkdir($title_path, G5_DIR_PERMISSION);
@chmod($title_path, G5_DIR_PERMISSION);
if ($_POST['act_button'] == "선택수정") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ti = sql_fetch("select * from {$g5['title_table']} where ti_id = '{$_POST['ti_id'][$k]}'");
if (!$ti['ti_id']) {
$msg .= $ti['ti_id'] . ' : 타이틀 자료가 존재하지 않습니다.\\n';
} else {
$sql_common = "";
if ($img = $_FILES['ti_img']['name'][$k]) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("타이틀 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
$prev_file_path = str_replace(G5_URL, G5_PATH, $ti['ti_img']);
// 기존 데이터 삭제
@unlink($prev_file_path);
// 확장자 따기
$exp = explode(".", $_FILES['ti_img']['name'][$k]);
$exp = $exp[count($exp) - 1];
$image_name = "tlt_" . time() . "." . $exp;
upload_file($_FILES['ti_img']['tmp_name'][$k], $image_name, $title_path);
$sql_common .= " , ti_img = '" . $title_url . "/" . $image_name . "' ";
}
}
$sql = " update {$g5['title_table']}
set ti_title = '{$_POST['ti_title'][$k]}',
ti_use = '{$_POST['ti_use'][$k]}',
ti_value = '{$_POST['ti_value'][$k]}'
{$sql_common}
where ti_id = '{$ti['ti_id']}' ";
sql_query($sql);
}
}
} else if ($_POST['act_button'] == "선택삭제") {
for ($i = 0; $i < count($_POST['chk']); $i++) {
// 실제 번호를 넘김
$k = $_POST['chk'][$i];
$ti = sql_fetch("select * from {$g5['title_table']} where ti_id = '{$_POST['ti_id'][$k]}'");
if (!$ti['ti_id']) {
$msg .= $ti['ti_id'] . ' : 타이틀 자료가 존재하지 않습니다.\\n';
} else {
$prev_file_path = str_replace(G5_URL, G5_PATH, $ti['ti_img']);
// 기존 데이터 삭제
@unlink($prev_file_path);
sql_query(" delete from {$g5['title_table']} where ti_id = '{$ti['ti_id']}' ");
sql_query(" delete from {$g5['title_has_table']} where ti_id = '{$ti['ti_id']}' ");
}
}
}
if ($msg)
alert($msg);
goto_url('./title_list.php?' . $qstr);

View file

@ -0,0 +1,37 @@
<?php
include_once "./_common.php";
auth_check($auth[$sub_menu], 'w');
check_token();
$title_path = G5_DATA_PATH . "/title";
$title_url = G5_DATA_URL . "/title";
@mkdir($title_path, G5_DIR_PERMISSION);
@chmod($title_path, G5_DIR_PERMISSION);
/** 타이틀 등록 **/
$sql_common = "";
if ($img = $_FILES['ti_img']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("타이틀 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 확장자 따기
$exp = explode(".", $_FILES['ti_img']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "tlt_" . time() . "." . $exp;
upload_file($_FILES['ti_img']['tmp_name'], $image_name, $title_path);
$sql_common .= " , ti_img = '" . $title_url . "/" . $image_name . "' ";
}
}
$sql = " insert into {$g5['title_table']}
set ti_title = '{$_POST['ti_title']}',
ti_use = '{$_POST['ti_use']}',
ti_value = '{$_POST['ti_value']}'
{$sql_common}
";
sql_query($sql);
goto_url('./title_list.php?' . $qstr);

View file

@ -16,9 +16,6 @@ $file_data = basename($_SERVER['PHP_SELF']);
$qstr = "fr_date=" . $fr_date . "&amp;to_date=" . $to_date;
$query_string = $qstr ? '?' . $qstr : '';
?>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<div class="sch_last">
<strong>기간별검색</strong>&nbsp;&nbsp;
@ -32,7 +29,7 @@ $query_string = $qstr ? '?' . $qstr : '';
<input type="submit" value="검색" class="btn_submit">
</div>
</form>
<br />
<br>
<ul class="anchor">
<li <?= $file_data == 'visit_list.php' ? "class='on'" : "" ?>><a
href="./visit_list.php<?php echo $query_string ?>">접속자</a>

View file

@ -27,7 +27,6 @@ while ($row = sql_fetch_array($result)) {
$sum_count++;
}
?>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -92,7 +91,5 @@ while ($row = sql_fetch_array($result)) {
</tbody>
</table>
</div>
<?php
include_once "./admin.tail.php";
?>

View file

@ -29,7 +29,6 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
$sum_count += $row['cnt'];
}
?>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -87,7 +86,5 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
</tbody>
</table>
</div>
<?php
include_once "./admin.tail.php";
?>

View file

@ -14,14 +14,11 @@ $row = sql_fetch($sql);
$min_year = (int) substr($row['min_date'], 0, 4);
$now_year = (int) substr(G5_TIME_YMD, 0, 4);
?>
<div class="local_ov01 local_ov">
접속자 로그를 삭제할 년도와 방법을 선택해주십시오.
</div>
<form name="fvisitdelete" class="local_sch02 local_sch" method="post" action="./visit_delete_update.php"
onsubmit="return form_submit(this);">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption></caption>
@ -54,8 +51,6 @@ $now_year = (int) substr(G5_TIME_YMD, 0, 4);
}
?>
</select>
</td>
</tr>
<tr>
@ -76,16 +71,13 @@ $now_year = (int) substr(G5_TIME_YMD, 0, 4);
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<div class="btn">
<span class="material-icons">save</span>
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>
</div>
</form>
<script>
function form_submit(f) {
var year = $("#year").val();
@ -118,7 +110,5 @@ $now_year = (int) substr(G5_TIME_YMD, 0, 4);
return confirm(msg);
}
</script>
<?php
include_once "./admin.tail.php";
?>

View file

@ -27,7 +27,6 @@ while ($row = sql_fetch_array($result)) {
$sum_count++;
}
?>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -96,7 +95,5 @@ while ($row = sql_fetch_array($result)) {
</tbody>
</table>
</div>
<?php
include_once "./admin.tail.php";
?>

View file

@ -27,7 +27,6 @@ while ($row = sql_fetch_array($result)) {
$sum_count++;
}
?>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -99,7 +98,6 @@ while ($row = sql_fetch_array($result)) {
</tbody>
</table>
</div>
<?php
include_once "./admin.tail.php";
?>

View file

@ -26,7 +26,6 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
$sum_count += $row['cnt'];
}
?>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -77,7 +76,5 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
</tbody>
</table>
</div>
<?php
include_once "./admin.tail.php";
?>

View file

@ -34,7 +34,6 @@ $sql = " select *
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
?>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
@ -111,7 +110,6 @@ $result = sql_query($sql);
</tbody>
</table>
</div>
<?php
if (isset($domain))
$qstr .= "&amp;domain=$domain";
@ -121,4 +119,4 @@ $pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER
echo $pagelist;
include_once "./admin.tail.php";
?>

Some files were not shown because too many files have changed in this diff Show more