update codes
This commit is contained in:
parent
4cc841ced1
commit
e44492d5fc
14 changed files with 291 additions and 251 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
.vscode
|
||||
.vscode/*
|
||||
[Aa]vocado[Ee]dition_[Ll]ight/data
|
||||
[Aa]vocado[Ee]dition_[Ll]ight/data/*
|
||||
error.log
|
||||
|
|
|
|||
49
AvocadoEdition_Light/adm/_menu.class.php
Normal file
49
AvocadoEdition_Light/adm/_menu.class.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_'))
|
||||
exit;
|
||||
|
||||
class Menu
|
||||
{
|
||||
public $mid;
|
||||
public $name;
|
||||
public $order;
|
||||
public $target;
|
||||
public $icon;
|
||||
public $gnb_grp_div;
|
||||
|
||||
public function __construct($mid, $name, $target, $order = 0, $icon = "", $gnb_grp_div = 0)
|
||||
{
|
||||
$this->mid = $mid;
|
||||
$this->name = $name;
|
||||
$this->order = $order;
|
||||
$this->target = $target;
|
||||
$this->icon = $icon;
|
||||
$this->gnb_grp_div = $gnb_grp_div;
|
||||
}
|
||||
}
|
||||
|
||||
class MenuCategory extends Menu
|
||||
{
|
||||
public $key;
|
||||
public $childmenu;
|
||||
|
||||
public function __construct($key, $mid, $name, $target, $order = 0, $icon = '', $gnb_grp_div = 0)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->childmenu = [];
|
||||
parent::__construct($mid, $name, $target, $order, $icon, $gnb_grp_div);
|
||||
}
|
||||
|
||||
public function addChildMenu($mid, $name, $target, $order = 0, $icon = '', $gnb_grp_div = 0)
|
||||
{
|
||||
$this->childmenu[] = new Menu($mid, $name, $target, $order, $icon, $gnb_grp_div);
|
||||
usort($this->childmenu, function($a, $b) {
|
||||
return $a->order - $b->order;
|
||||
});
|
||||
}
|
||||
|
||||
public function buildHtml()
|
||||
{
|
||||
global $g5, $is_admin, $auth, $menu, $auth_menu, $sub_menu;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,26 +5,23 @@ if (!defined('_GNUBOARD_'))
|
|||
function get_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
||||
{
|
||||
global $config;
|
||||
|
||||
$skins = array();
|
||||
|
||||
$skins = [];
|
||||
if (defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||
$dirs = get_skin_dir($skin_gubun, G5_THEME_PATH . '/' . G5_SKIN_DIR);
|
||||
if (!empty($dirs)) {
|
||||
foreach ($dirs as $dir) {
|
||||
$skins[] = 'theme/' . $dir;
|
||||
$skins[] = "theme/{$dir}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$skins = array_merge($skins, get_skin_dir($skin_gubun));
|
||||
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
for ($i = 0; $i < count($skins); $i++) {
|
||||
if ($i == 0)
|
||||
$str .= "<option value=\"\">선택</option>";
|
||||
if (preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||
$text = '(테마) ' . $match[1];
|
||||
$text = "(테마) {$match[1]}";
|
||||
else
|
||||
$text = $skins[$i];
|
||||
|
||||
|
|
@ -38,14 +35,12 @@ function get_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
|||
function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event = '')
|
||||
{
|
||||
global $config;
|
||||
|
||||
$skins = array();
|
||||
|
||||
$skins = [];
|
||||
if (defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||
$dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH . '/' . G5_SKIN_DIR);
|
||||
if (!empty($dirs)) {
|
||||
foreach ($dirs as $dir) {
|
||||
$skins[] = 'theme/' . $dir;
|
||||
$skins[] = "theme/{$dir}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -57,7 +52,7 @@ function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event
|
|||
if ($i == 0)
|
||||
$str .= "<option value=\"\">선택</option>";
|
||||
if (preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||
$text = '(테마) ' . $match[1];
|
||||
$text = "(테마) {$match[1]}";
|
||||
else
|
||||
$text = $skins[$i];
|
||||
|
||||
|
|
@ -72,10 +67,8 @@ function get_mobile_skin_select($skin_gubun, $id, $name, $selected = '', $event
|
|||
function get_skin_dir($skin, $skin_path = G5_SKIN_PATH)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$result_array = array();
|
||||
|
||||
$dirname = $skin_path . '/' . $skin . '/';
|
||||
$result_array = [];
|
||||
$dirname = implode(DIRECTORY_SEPARATOR, [$skin_path, $skin, ""]);
|
||||
if (!is_dir($dirname))
|
||||
return;
|
||||
|
||||
|
|
@ -96,7 +89,7 @@ function get_skin_dir($skin, $skin_path = G5_SKIN_PATH)
|
|||
// 테마
|
||||
function get_theme_dir()
|
||||
{
|
||||
$result_array = array();
|
||||
$result_array = [];
|
||||
|
||||
$dirname = G5_PATH . '/' . G5_THEME_DIR . '/';
|
||||
$handle = opendir($dirname);
|
||||
|
|
@ -121,7 +114,7 @@ function get_theme_select($id, $name, $selected = '', $event = '')
|
|||
{
|
||||
global $config;
|
||||
|
||||
$theme = array();
|
||||
$theme = [];
|
||||
$theme = array_merge($theme, get_theme_dir());
|
||||
|
||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||
|
|
@ -139,8 +132,8 @@ function get_theme_select($id, $name, $selected = '', $event = '')
|
|||
// 테마정보
|
||||
function get_theme_info($dir)
|
||||
{
|
||||
$info = array();
|
||||
$path = G5_PATH . '/' . G5_THEME_DIR . '/' . $dir;
|
||||
$info = [];
|
||||
$path = implode(DIRECTORY_SEPARATOR, [G5_PATH, G5_THEME_DIR, $dir]);
|
||||
|
||||
if (is_dir($path)) {
|
||||
$screenshot = $path . '/screenshot.png';
|
||||
|
|
@ -188,7 +181,7 @@ function get_theme_info($dir)
|
|||
// 테마설정 정보
|
||||
function get_theme_config_value($dir, $key = '*')
|
||||
{
|
||||
$tconfig = array();
|
||||
$tconfig = [];
|
||||
|
||||
$theme_config_file = G5_PATH . '/' . G5_THEME_DIR . '/' . $dir . '/theme.config.php';
|
||||
if (is_file($theme_config_file)) {
|
||||
|
|
@ -207,8 +200,6 @@ function get_theme_config_value($dir, $key = '*')
|
|||
return $tconfig;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 회원권한을 SELECT 형식으로 얻음
|
||||
function get_member_level_select($name, $start_id = 0, $end_id = 10, $selected = "", $event = "")
|
||||
{
|
||||
|
|
@ -236,7 +227,6 @@ function get_member_level_select($name, $start_id = 0, $end_id = 10, $selected =
|
|||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 회원아이디를 SELECT 형식으로 얻음
|
||||
function get_member_id_select($name, $level, $selected = "", $event = "")
|
||||
{
|
||||
|
|
@ -424,7 +414,7 @@ function admin_referer_check($return = false)
|
|||
if (!$member['mb_id']) {
|
||||
goto_url(G5_BBS_URL . '/login.php?url=' . urlencode(G5_ADMIN_URL));
|
||||
} else if ($is_admin != 'super') {
|
||||
$auth = array();
|
||||
$auth = [];
|
||||
$sql = " select au_menu, au_auth from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||
$result = sql_query($sql);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
|
|
@ -456,17 +446,20 @@ unset($auth_menu);
|
|||
unset($menu);
|
||||
unset($amenu);
|
||||
$tmp = dir(G5_ADMIN_PATH);
|
||||
while ($entry = $tmp->read()) {
|
||||
if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m))
|
||||
continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
|
||||
|
||||
$amenu[$m[1]] = $entry;
|
||||
include_once(G5_ADMIN_PATH . '/' . $entry);
|
||||
$menu = [];
|
||||
$amenu = [];
|
||||
|
||||
while ($entry = $tmp->read()) {
|
||||
if (preg_match('/(.*?)\.menu\.php$/', $entry, $m)) {
|
||||
include_once implode(DIRECTORY_SEPARATOR, [G5_ADMIN_PATH, $entry]);
|
||||
$amenu[$m[1]] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
@ksort($amenu);
|
||||
|
||||
$arr_query = array();
|
||||
$arr_query = [];
|
||||
if (isset($sst))
|
||||
$arr_query[] = 'sst=' . $sst;
|
||||
if (isset($sod))
|
||||
|
|
|
|||
|
|
@ -31,93 +31,93 @@ if ($copy_case == 'schema_only') {
|
|||
|
||||
// 게시판 정보
|
||||
$sql = " insert into {$g5['board_table']}
|
||||
set bo_table = '$target_table',
|
||||
bo_type = '{$board['bo_type']}',
|
||||
gr_id = '{$board['gr_id']}',
|
||||
bo_subject = '$target_subject',
|
||||
bo_device = '{$board['bo_device']}',
|
||||
bo_admin = '{$board['bo_admin']}',
|
||||
bo_list_level = '{$board['bo_list_level']}',
|
||||
bo_read_level = '{$board['bo_read_level']}',
|
||||
bo_write_level = '{$board['bo_write_level']}',
|
||||
bo_reply_level = '{$board['bo_reply_level']}',
|
||||
bo_comment_level = '{$board['bo_comment_level']}',
|
||||
bo_upload_level = '{$board['bo_upload_level']}',
|
||||
bo_download_level = '{$board['bo_download_level']}',
|
||||
bo_html_level = '{$board['bo_html_level']}',
|
||||
bo_link_level = '{$board['bo_link_level']}',
|
||||
bo_count_modify = '{$board['bo_count_modify']}',
|
||||
bo_count_delete = '{$board['bo_count_delete']}',
|
||||
bo_read_point = '{$board['bo_read_point']}',
|
||||
bo_write_point = '{$board['bo_write_point']}',
|
||||
bo_comment_point = '{$board['bo_comment_point']}',
|
||||
bo_download_point = '{$board['bo_download_point']}',
|
||||
bo_use_category = '{$board['bo_use_category']}',
|
||||
bo_category_list = '{$board['bo_category_list']}',
|
||||
bo_use_sideview = '{$board['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$board['bo_use_file_content']}',
|
||||
bo_use_secret = '{$board['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$board['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$board['bo_use_rss_view']}',
|
||||
bo_use_good = '{$board['bo_use_good']}',
|
||||
bo_use_nogood = '{$board['bo_use_nogood']}',
|
||||
bo_use_name = '{$board['bo_use_name']}',
|
||||
bo_use_signature = '{$board['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$board['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$board['bo_use_list_view']}',
|
||||
bo_use_list_content = '{$board['bo_use_list_content']}',
|
||||
bo_table_width = '{$board['bo_table_width']}',
|
||||
bo_subject_len = '{$board['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$board['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$board['bo_mobile_page_rows']}',
|
||||
bo_new = '{$board['bo_new']}',
|
||||
bo_hot = '{$board['bo_hot']}',
|
||||
bo_image_width = '{$board['bo_image_width']}',
|
||||
bo_skin = '{$board['bo_skin']}',
|
||||
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||
bo_include_head = '{$board['bo_include_head']}',
|
||||
bo_include_tail = '{$board['bo_include_tail']}',
|
||||
bo_content_head = '" . addslashes($board['bo_content_head']) . "',
|
||||
bo_content_tail = '" . addslashes($board['bo_content_tail']) . "',
|
||||
bo_mobile_content_head = '" . addslashes($board['bo_mobile_content_head']) . "',
|
||||
bo_mobile_content_tail = '" . addslashes($board['bo_mobile_content_tail']) . "',
|
||||
bo_insert_content = '" . addslashes($board['bo_insert_content']) . "',
|
||||
bo_gallery_cols = '{$board['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$board['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$board['bo_gallery_height']}',
|
||||
bo_mobile_gallery_width = '{$board['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height = '{$board['bo_mobile_gallery_height']}',
|
||||
bo_upload_size = '{$board['bo_upload_size']}',
|
||||
bo_reply_order = '{$board['bo_reply_order']}',
|
||||
bo_use_search = '{$board['bo_use_search']}',
|
||||
bo_order = '{$board['bo_order']}',
|
||||
bo_notice = '{$board['bo_notice']}',
|
||||
bo_upload_count = '{$board['bo_upload_count']}',
|
||||
bo_use_email = '{$board['bo_use_email']}',
|
||||
bo_use_cert = '{$board['bo_use_cert']}',
|
||||
bo_use_sns = '{$board['bo_use_sns']}',
|
||||
bo_sort_field = '{$board['bo_sort_field']}',
|
||||
bo_1_subj = '" . addslashes($board['bo_1_subj']) . "',
|
||||
bo_2_subj = '" . addslashes($board['bo_2_subj']) . "',
|
||||
bo_3_subj = '" . addslashes($board['bo_3_subj']) . "',
|
||||
bo_4_subj = '" . addslashes($board['bo_4_subj']) . "',
|
||||
bo_5_subj = '" . addslashes($board['bo_5_subj']) . "',
|
||||
bo_6_subj = '" . addslashes($board['bo_6_subj']) . "',
|
||||
bo_7_subj = '" . addslashes($board['bo_7_subj']) . "',
|
||||
bo_8_subj = '" . addslashes($board['bo_8_subj']) . "',
|
||||
bo_9_subj = '" . addslashes($board['bo_9_subj']) . "',
|
||||
bo_10_subj = '" . addslashes($board['bo_10_subj']) . "',
|
||||
bo_1 = '" . addslashes($board['bo_1']) . "',
|
||||
bo_2 = '" . addslashes($board['bo_2']) . "',
|
||||
bo_3 = '" . addslashes($board['bo_3']) . "',
|
||||
bo_4 = '" . addslashes($board['bo_4']) . "',
|
||||
bo_5 = '" . addslashes($board['bo_5']) . "',
|
||||
bo_6 = '" . addslashes($board['bo_6']) . "',
|
||||
bo_7 = '" . addslashes($board['bo_7']) . "',
|
||||
bo_8 = '" . addslashes($board['bo_8']) . "',
|
||||
bo_9 = '" . addslashes($board['bo_9']) . "',
|
||||
bo_10 = '" . addslashes($board['bo_10']) . "' ";
|
||||
set bo_table = '$target_table',
|
||||
bo_type = '{$board['bo_type']}',
|
||||
gr_id = '{$board['gr_id']}',
|
||||
bo_subject = '$target_subject',
|
||||
bo_device = '{$board['bo_device']}',
|
||||
bo_admin = '{$board['bo_admin']}',
|
||||
bo_list_level = '{$board['bo_list_level']}',
|
||||
bo_read_level = '{$board['bo_read_level']}',
|
||||
bo_write_level = '{$board['bo_write_level']}',
|
||||
bo_reply_level = '{$board['bo_reply_level']}',
|
||||
bo_comment_level = '{$board['bo_comment_level']}',
|
||||
bo_upload_level = '{$board['bo_upload_level']}',
|
||||
bo_download_level = '{$board['bo_download_level']}',
|
||||
bo_html_level = '{$board['bo_html_level']}',
|
||||
bo_link_level = '{$board['bo_link_level']}',
|
||||
bo_count_modify = '{$board['bo_count_modify']}',
|
||||
bo_count_delete = '{$board['bo_count_delete']}',
|
||||
bo_read_point = '{$board['bo_read_point']}',
|
||||
bo_write_point = '{$board['bo_write_point']}',
|
||||
bo_comment_point = '{$board['bo_comment_point']}',
|
||||
bo_download_point = '{$board['bo_download_point']}',
|
||||
bo_use_category = '{$board['bo_use_category']}',
|
||||
bo_category_list = '{$board['bo_category_list']}',
|
||||
bo_use_sideview = '{$board['bo_use_sideview']}',
|
||||
bo_use_file_content = '{$board['bo_use_file_content']}',
|
||||
bo_use_secret = '{$board['bo_use_secret']}',
|
||||
bo_use_dhtml_editor = '{$board['bo_use_dhtml_editor']}',
|
||||
bo_use_rss_view = '{$board['bo_use_rss_view']}',
|
||||
bo_use_good = '{$board['bo_use_good']}',
|
||||
bo_use_nogood = '{$board['bo_use_nogood']}',
|
||||
bo_use_name = '{$board['bo_use_name']}',
|
||||
bo_use_signature = '{$board['bo_use_signature']}',
|
||||
bo_use_ip_view = '{$board['bo_use_ip_view']}',
|
||||
bo_use_list_view = '{$board['bo_use_list_view']}',
|
||||
bo_use_list_content = '{$board['bo_use_list_content']}',
|
||||
bo_table_width = '{$board['bo_table_width']}',
|
||||
bo_subject_len = '{$board['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$board['bo_mobile_subject_len']}',
|
||||
bo_page_rows = '{$board['bo_page_rows']}',
|
||||
bo_mobile_page_rows = '{$board['bo_mobile_page_rows']}',
|
||||
bo_new = '{$board['bo_new']}',
|
||||
bo_hot = '{$board['bo_hot']}',
|
||||
bo_image_width = '{$board['bo_image_width']}',
|
||||
bo_skin = '{$board['bo_skin']}',
|
||||
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||
bo_include_head = '{$board['bo_include_head']}',
|
||||
bo_include_tail = '{$board['bo_include_tail']}',
|
||||
bo_content_head = '" . addslashes($board['bo_content_head']) . "',
|
||||
bo_content_tail = '" . addslashes($board['bo_content_tail']) . "',
|
||||
bo_mobile_content_head = '" . addslashes($board['bo_mobile_content_head']) . "',
|
||||
bo_mobile_content_tail = '" . addslashes($board['bo_mobile_content_tail']) . "',
|
||||
bo_insert_content = '" . addslashes($board['bo_insert_content']) . "',
|
||||
bo_gallery_cols = '{$board['bo_gallery_cols']}',
|
||||
bo_gallery_width = '{$board['bo_gallery_width']}',
|
||||
bo_gallery_height = '{$board['bo_gallery_height']}',
|
||||
bo_mobile_gallery_width = '{$board['bo_mobile_gallery_width']}',
|
||||
bo_mobile_gallery_height = '{$board['bo_mobile_gallery_height']}',
|
||||
bo_upload_size = '{$board['bo_upload_size']}',
|
||||
bo_reply_order = '{$board['bo_reply_order']}',
|
||||
bo_use_search = '{$board['bo_use_search']}',
|
||||
bo_order = '{$board['bo_order']}',
|
||||
bo_notice = '{$board['bo_notice']}',
|
||||
bo_upload_count = '{$board['bo_upload_count']}',
|
||||
bo_use_email = '{$board['bo_use_email']}',
|
||||
bo_use_cert = '{$board['bo_use_cert']}',
|
||||
bo_use_sns = '{$board['bo_use_sns']}',
|
||||
bo_sort_field = '{$board['bo_sort_field']}',
|
||||
bo_1_subj = '" . addslashes($board['bo_1_subj']) . "',
|
||||
bo_2_subj = '" . addslashes($board['bo_2_subj']) . "',
|
||||
bo_3_subj = '" . addslashes($board['bo_3_subj']) . "',
|
||||
bo_4_subj = '" . addslashes($board['bo_4_subj']) . "',
|
||||
bo_5_subj = '" . addslashes($board['bo_5_subj']) . "',
|
||||
bo_6_subj = '" . addslashes($board['bo_6_subj']) . "',
|
||||
bo_7_subj = '" . addslashes($board['bo_7_subj']) . "',
|
||||
bo_8_subj = '" . addslashes($board['bo_8_subj']) . "',
|
||||
bo_9_subj = '" . addslashes($board['bo_9_subj']) . "',
|
||||
bo_10_subj = '" . addslashes($board['bo_10_subj']) . "',
|
||||
bo_1 = '" . addslashes($board['bo_1']) . "',
|
||||
bo_2 = '" . addslashes($board['bo_2']) . "',
|
||||
bo_3 = '" . addslashes($board['bo_3']) . "',
|
||||
bo_4 = '" . addslashes($board['bo_4']) . "',
|
||||
bo_5 = '" . addslashes($board['bo_5']) . "',
|
||||
bo_6 = '" . addslashes($board['bo_6']) . "',
|
||||
bo_7 = '" . addslashes($board['bo_7']) . "',
|
||||
bo_8 = '" . addslashes($board['bo_8']) . "',
|
||||
bo_9 = '" . addslashes($board['bo_9']) . "',
|
||||
bo_10 = '" . addslashes($board['bo_10']) . "' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
// 게시판 폴더 생성
|
||||
|
|
@ -181,18 +181,18 @@ if ($copy_case == 'schema_data_both') {
|
|||
if (count($file_copy)) {
|
||||
for ($i = 0; $i < count($file_copy); $i++) {
|
||||
$sql = " insert into {$g5['board_file_table']}
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||
bf_source = '" . addslashes($file_copy[$i]['bf_source']) . "',
|
||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||
bf_content = '" . addslashes($file_copy[$i]['bf_content']) . "',
|
||||
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||
bf_source = '" . addslashes($file_copy[$i]['bf_source']) . "',
|
||||
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||
bf_content = '" . addslashes($file_copy[$i]['bf_content']) . "',
|
||||
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,24 +19,24 @@ if ($_POST['act_button'] == "선택수정") {
|
|||
|
||||
if ($is_admin != 'super') {
|
||||
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||
and a.gr_id = b.gr_id
|
||||
and b.gr_admin = '{$member['mb_id']}' ";
|
||||
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||
and a.gr_id = b.gr_id
|
||||
and b.gr_admin = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if (!$row['cnt'])
|
||||
alert('최고관리자가 아닌 경우 다른 관리자의 게시판(' . $board_table[$k] . ')은 수정이 불가합니다.');
|
||||
}
|
||||
|
||||
$sql = " update {$g5['board_table']}
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_list_level = '{$_POST['bo_list_level'][$k]}',
|
||||
bo_read_level = '{$_POST['bo_read_level'][$k]}',
|
||||
bo_write_level = '{$_POST['bo_write_level'][$k]}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level'][$k]}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level'][$k]}'
|
||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_list_level = '{$_POST['bo_list_level'][$k]}',
|
||||
bo_read_level = '{$_POST['bo_read_level'][$k]}',
|
||||
bo_write_level = '{$_POST['bo_write_level'][$k]}',
|
||||
bo_comment_level = '{$_POST['bo_comment_level'][$k]}',
|
||||
bo_reply_level = '{$_POST['bo_reply_level'][$k]}'
|
||||
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,4 +62,3 @@ if ($w == 'ld')
|
|||
goto_url('./boardgroupmember_list.php?gr_id=' . $gr_id);
|
||||
else
|
||||
goto_url('./boardgroupmember_form.php?mb_id=' . $mb_id);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -155,4 +155,4 @@ sql_query($sql);
|
|||
|
||||
//sql_query(" OPTIMIZE TABLE `$g5['config_table']` ");
|
||||
|
||||
goto_url('./config_form.php', false);
|
||||
goto_url('./config_form.php');
|
||||
|
|
|
|||
|
|
@ -8,28 +8,28 @@ auth_check($auth[$sub_menu], "w");
|
|||
// 상단, 하단 파일경로 필드 추가
|
||||
if (!sql_query(" select co_include_head from {$g5['content_table']} limit 1 ", false)) {
|
||||
$sql = " ALTER TABLE `{$g5['content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
|
||||
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
|
||||
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
// html purifier 사용여부 필드
|
||||
if (!sql_query(" select co_tag_filter_use from {$g5['content_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `co_content` ", true);
|
||||
ADD `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `co_content` ", true);
|
||||
sql_query(" update {$g5['content_table']} set co_tag_filter_use = '1' ");
|
||||
}
|
||||
|
||||
// 모바일 내용 추가
|
||||
if (!sql_query(" select co_mobile_content from {$g5['content_table']} limit 1", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_mobile_content` longtext NOT NULL AFTER `co_content` ", true);
|
||||
ADD `co_mobile_content` longtext NOT NULL AFTER `co_content` ", true);
|
||||
}
|
||||
|
||||
// 스킨 설정 추가
|
||||
if (!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_mobile_content`,
|
||||
ADD `co_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_skin` ", true);
|
||||
ADD `co_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_mobile_content`,
|
||||
ADD `co_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_skin` ", true);
|
||||
sql_query(" update {$g5['content_table']} set co_skin = 'basic', co_mobile_skin = 'basic' ");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,40 +86,40 @@ if ($new == 'new' || !$code) {
|
|||
var list = "";
|
||||
list += "<tr class=\"menu_list menu_group_<?php echo $code; ?>\" data-name='" + name + "'>";
|
||||
list += "<td" + sub_menu_class + ">";
|
||||
list += " <input type=\"hidden\" name=\"code[]\" value=\"<?php echo $code; ?>\" />";
|
||||
list += " <input type=\"hidden\" name=\"me_level[]\" value=\"\" />";
|
||||
list += " <input type=\"text\" name=\"me_name[]\" value=\"" + name + "\" id=\"me_name_" + ms + "\" required class=\"required frm_input full_input\" />";
|
||||
list += " <input type=\"hidden\" name=\"code[]\" value=\"<?php echo $code; ?>\" />";
|
||||
list += " <input type=\"hidden\" name=\"me_level[]\" value=\"\" />";
|
||||
list += " <input type=\"text\" name=\"me_name[]\" value=\"" + name + "\" id=\"me_name_" + ms + "\" required class=\"required frm_input full_input\" />";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall\">";
|
||||
list += " ";
|
||||
list += " ";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall\">";
|
||||
list += " <input type=\"text\" name=\"me_parent[]\" value=\"\" class=\"frm_input\" size=\"5\">";
|
||||
list += " <input type=\"text\" name=\"me_parent[]\" value=\"\" class=\"frm_input\" size=\"5\">";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall\">";
|
||||
list += " <input type=\"text\" name=\"me_depth[]\" value=\"0\" class=\"frm_input\" size=\"5\">";
|
||||
list += " <input type=\"text\" name=\"me_depth[]\" value=\"0\" class=\"frm_input\" size=\"5\">";
|
||||
list += "</td>";
|
||||
list += "<td></td>";
|
||||
list += "<td>";
|
||||
list += " <input type=\"text\" name=\"me_icon[]\" class=\"frm_input full_input\" />";
|
||||
list += " <input type=\"text\" name=\"me_icon[]\" class=\"frm_input full_input\" />";
|
||||
list += "</td>";
|
||||
list += "<td>";
|
||||
list += " <input type=\"text\" name=\"me_link[]\" value=\"" + link + "\" class=\"frm_input full_input\" />";
|
||||
list += " <input type=\"text\" name=\"me_link[]\" value=\"" + link + "\" class=\"frm_input full_input\" />";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mng\">";
|
||||
list += " <select name=\"me_target[]\">";
|
||||
list += " <option value=\"self\">현재창</option>";
|
||||
list += " <option value=\"blank\">새창</option>";
|
||||
list += " </select>";
|
||||
list += " <select name=\"me_target[]\">";
|
||||
list += " <option value=\"self\">현재창</option>";
|
||||
list += " <option value=\"blank\">새창</option>";
|
||||
list += " </select>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall order\">";
|
||||
list += " <input type=\"text\" name=\"me_order[]\" value=\"0\" required class=\"required frm_input\" size=\"5\">";
|
||||
list += " <input type=\"text\" name=\"me_order[]\" value=\"0\" required class=\"required frm_input\" size=\"5\">";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall\">";
|
||||
list += " <input type=\"checkbox\" name=\"me_use[]\" value=\"1\" class=\"frm_input\" checked>";
|
||||
list += " <input type=\"checkbox\" name=\"me_use[]\" value=\"1\" class=\"frm_input\" checked>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mngsmall\">";
|
||||
list += " <button type=\"button\" class=\"btn_del_menu\"><span class=''><span class='material-icons'>delete</span></button>";
|
||||
list += " <button type=\"button\" class=\"btn_del_menu\"><span class=''><span class='material-icons'>delete</span></button>";
|
||||
list += "</td>";
|
||||
list += "</tr>";
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ for ($i = 0; $i < $count; $i++) {
|
|||
$sub_code = '';
|
||||
if ($group_code == $code) {
|
||||
$sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code
|
||||
from {$g5['menu_table']}
|
||||
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
||||
from {$g5['menu_table']}
|
||||
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sub_code = base_convert($row['max_me_code'], 36, 10);
|
||||
|
|
@ -41,8 +41,8 @@ for ($i = 0; $i < $count; $i++) {
|
|||
$me_code = $primary_code . $sub_code;
|
||||
} else {
|
||||
$sql = " select MAX(SUBSTRING(me_code,1,2)) as max_me_code
|
||||
from {$g5['menu_table']}
|
||||
where LENGTH(me_code) = '2' ";
|
||||
from {$g5['menu_table']}
|
||||
where LENGTH(me_code) = '2' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$me_code = base_convert($row['max_me_code'], 36, 10);
|
||||
|
|
|
|||
|
|
@ -57,4 +57,3 @@ $row = sql_fetch($sql);
|
|||
$total_count2 = $row['cnt'];
|
||||
|
||||
alert('총 ' . number_format($total_count) . '건 중 ' . number_format($total_count - $total_count2) . '건 삭제 완료', './visit_delete.php');
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -136,4 +136,3 @@ if (is_file($skin_file)) {
|
|||
}
|
||||
|
||||
include_once('./qatail.php');
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -238,55 +238,55 @@ if ($w == '' || $w == 'r') {
|
|||
}
|
||||
|
||||
$sql = " insert into $write_table
|
||||
set wr_num = '$wr_num',
|
||||
wr_reply = '$wr_reply',
|
||||
wr_comment = 0,
|
||||
ca_name = '$ca_name',
|
||||
wr_option = '$html,$secret,$mail',
|
||||
wr_subject = '$wr_subject',
|
||||
wr_content = '$wr_content',
|
||||
wr_link1 = '$wr_link1',
|
||||
wr_link2 = '$wr_link2',
|
||||
wr_link1_hit = 0,
|
||||
wr_link2_hit = 0,
|
||||
wr_hit = 0,
|
||||
wr_good = 0,
|
||||
wr_nogood = 0,
|
||||
mb_id = '{$member['mb_id']}',
|
||||
wr_password = '$wr_password',
|
||||
wr_name = '$wr_name',
|
||||
wr_email = '$wr_email',
|
||||
wr_homepage = '$wr_homepage',
|
||||
wr_datetime = '" . G5_TIME_YMDHIS . "',
|
||||
wr_last = '" . G5_TIME_YMDHIS . "',
|
||||
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
set wr_num = '$wr_num',
|
||||
wr_reply = '$wr_reply',
|
||||
wr_comment = 0,
|
||||
ca_name = '$ca_name',
|
||||
wr_option = '$html,$secret,$mail',
|
||||
wr_subject = '$wr_subject',
|
||||
wr_content = '$wr_content',
|
||||
wr_link1 = '$wr_link1',
|
||||
wr_link2 = '$wr_link2',
|
||||
wr_link1_hit = 0,
|
||||
wr_link2_hit = 0,
|
||||
wr_hit = 0,
|
||||
wr_good = 0,
|
||||
wr_nogood = 0,
|
||||
mb_id = '{$member['mb_id']}',
|
||||
wr_password = '$wr_password',
|
||||
wr_name = '$wr_name',
|
||||
wr_email = '$wr_email',
|
||||
wr_homepage = '$wr_homepage',
|
||||
wr_datetime = '" . G5_TIME_YMDHIS . "',
|
||||
wr_last = '" . G5_TIME_YMDHIS . "',
|
||||
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
|
||||
ch_id = '{$character['ch_id']}',
|
||||
ch_side = '{$character['ch_side']}',
|
||||
ch_class = '{$character['ch_class']}',
|
||||
ti_id = '{$character['ch_title']}',
|
||||
wr_width = '$wr_width',
|
||||
wr_height = '$wr_height',
|
||||
wr_url = '$wr_url',
|
||||
wr_type = '$wr_type',
|
||||
ch_id = '{$character['ch_id']}',
|
||||
ch_side = '{$character['ch_side']}',
|
||||
ch_class = '{$character['ch_class']}',
|
||||
ti_id = '{$character['ch_title']}',
|
||||
wr_width = '$wr_width',
|
||||
wr_height = '$wr_height',
|
||||
wr_url = '$wr_url',
|
||||
wr_type = '$wr_type',
|
||||
|
||||
wr_secret = '$wr_secret',
|
||||
wr_adult = '$wr_adult',
|
||||
wr_wide = '$wr_wide',
|
||||
wr_plip = '$wr_plip',
|
||||
wr_secret = '$wr_secret',
|
||||
wr_adult = '$wr_adult',
|
||||
wr_wide = '$wr_wide',
|
||||
wr_plip = '$wr_plip',
|
||||
|
||||
wr_noname = '$wr_noname',
|
||||
wr_noname = '$wr_noname',
|
||||
|
||||
wr_1 = '$wr_1',
|
||||
wr_2 = '$wr_2',
|
||||
wr_3 = '$wr_3',
|
||||
wr_4 = '$wr_4',
|
||||
wr_5 = '$wr_5',
|
||||
wr_6 = '$wr_6',
|
||||
wr_7 = '$wr_7',
|
||||
wr_8 = '$wr_8',
|
||||
wr_9 = '$wr_9',
|
||||
wr_10 = '$wr_10' ";
|
||||
wr_1 = '$wr_1',
|
||||
wr_2 = '$wr_2',
|
||||
wr_3 = '$wr_3',
|
||||
wr_4 = '$wr_4',
|
||||
wr_5 = '$wr_5',
|
||||
wr_6 = '$wr_6',
|
||||
wr_7 = '$wr_7',
|
||||
wr_8 = '$wr_8',
|
||||
wr_9 = '$wr_9',
|
||||
wr_10 = '$wr_10' ";
|
||||
sql_query($sql);
|
||||
|
||||
$wr_id = sql_insert_id();
|
||||
|
|
@ -379,43 +379,43 @@ if ($w == '' || $w == 'r') {
|
|||
if (!$is_admin)
|
||||
$sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||
|
||||
$sql = " update {$write_table}
|
||||
set ca_name = '{$ca_name}',
|
||||
wr_option = '{$html},{$secret},{$mail}',
|
||||
wr_subject = '{$wr_subject}',
|
||||
wr_content = '{$wr_content}',
|
||||
wr_link1 = '{$wr_link1}',
|
||||
wr_link2 = '{$wr_link2}',
|
||||
mb_id = '{$mb_id}',
|
||||
wr_name = '{$wr_name}',
|
||||
wr_email = '{$wr_email}',
|
||||
wr_homepage = '{$wr_homepage}',
|
||||
$sql = "UPDATE {$write_table}
|
||||
SET ca_name = '{$ca_name}',
|
||||
wr_option = '{$html},{$secret},{$mail}',
|
||||
wr_subject = '{$wr_subject}',
|
||||
wr_content = '{$wr_content}',
|
||||
wr_link1 = '{$wr_link1}',
|
||||
wr_link2 = '{$wr_link2}',
|
||||
mb_id = '{$mb_id}',
|
||||
wr_name = '{$wr_name}',
|
||||
wr_email = '{$wr_email}',
|
||||
wr_homepage = '{$wr_homepage}',
|
||||
|
||||
wr_width = '$wr_width',
|
||||
wr_height = '$wr_height',
|
||||
wr_url = '$wr_url',
|
||||
wr_type = '$wr_type',
|
||||
wr_width = '$wr_width',
|
||||
wr_height = '$wr_height',
|
||||
wr_url = '$wr_url',
|
||||
wr_type = '$wr_type',
|
||||
|
||||
wr_secret = '$wr_secret',
|
||||
wr_adult = '$wr_adult',
|
||||
wr_wide = '$wr_wide',
|
||||
wr_plip = '$wr_plip',
|
||||
wr_secret = '$wr_secret',
|
||||
wr_adult = '$wr_adult',
|
||||
wr_wide = '$wr_wide',
|
||||
wr_plip = '$wr_plip',
|
||||
|
||||
wr_noname = '$wr_noname',
|
||||
wr_noname = '$wr_noname',
|
||||
|
||||
wr_1 = '{$wr_1}',
|
||||
wr_2 = '{$wr_2}',
|
||||
wr_3 = '{$wr_3}',
|
||||
wr_4 = '{$wr_4}',
|
||||
wr_5 = '{$wr_5}',
|
||||
wr_6 = '{$wr_6}',
|
||||
wr_7 = '{$wr_7}',
|
||||
wr_8 = '{$wr_8}',
|
||||
wr_9 = '{$wr_9}',
|
||||
wr_10= '{$wr_10}'
|
||||
{$sql_ip}
|
||||
{$sql_password}
|
||||
where wr_id = '{$wr['wr_id']}' ";
|
||||
wr_1 = '{$wr_1}',
|
||||
wr_2 = '{$wr_2}',
|
||||
wr_3 = '{$wr_3}',
|
||||
wr_4 = '{$wr_4}',
|
||||
wr_5 = '{$wr_5}',
|
||||
wr_6 = '{$wr_6}',
|
||||
wr_7 = '{$wr_7}',
|
||||
wr_8 = '{$wr_8}',
|
||||
wr_9 = '{$wr_9}',
|
||||
wr_10= '{$wr_10}'
|
||||
{$sql_ip}
|
||||
{$sql_password}
|
||||
WHERE wr_id = '{$wr['wr_id']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 분류가 수정되는 경우 해당되는 코멘트의 분류명도 모두 수정함
|
||||
|
|
@ -727,4 +727,3 @@ if ($file_upload_msg)
|
|||
alert($file_upload_msg, G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . '&wr_id=' . $wr_id . $qstr);
|
||||
else
|
||||
goto_url(G5_HTTP_BBS_URL . '/board.php?bo_table=' . $bo_table . '&wr_id=' . $wr_id . $qstr);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
Theme Name: 샘플
|
||||
Theme Name: 기본 테마
|
||||
Theme URI:
|
||||
Maker: Avocado
|
||||
Maker URI: https://avocado-edition-rout.postype.com/
|
||||
Version: 1.0.0
|
||||
Detail: 샘플 테마는 기본적인 부분만을 제공하는 테마입니다.
|
||||
Detail: 기본 테마는 기본적인 부분만을 제공하는 테마입니다.
|
||||
License: GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
|
||||
License URI: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
|
||||
Loading…
Reference in a new issue