Files
dnssash/rb/rb.config/ajax.custom_config.php
2026-06-11 18:47:38 +09:00

43 lines
1.2 KiB
PHP

<?php
include_once('../../common.php');
if (!defined('_GNUBOARD_')) exit;
$module_name = isset($_POST['module_name']) ? clean_xss_tags($_POST['module_name']) : '';
$md_id = isset($_POST['md_id']) ? (int)$_POST['md_id'] : 0;
$md_layout = isset($_POST['md_layout']) ? clean_xss_tags($_POST['md_layout']) : '';
$md_theme = isset($_POST['md_theme']) ? clean_xss_tags($_POST['md_theme']) : '';
// 디버깅
error_log('ajax.custom_config.php called with: ' . print_r($_POST, true));
if (!$module_name) {
echo '<p class="text-muted">모듈을 선택해주세요.</p>';
exit;
}
// 커스텀 모듈 설정 파일 경로
$config_file = G5_THEME_PATH . '/rb.custom/' . $module_name . '/config.php';
if (!file_exists($config_file)) {
echo '<div class="alert alert-info">';
echo '<i class="fa fa-info-circle"></i> ';
echo '이 모듈에는 별도의 설정이 없습니다.';
echo '</div>';
exit;
}
// 현재 모듈 설정 가져오기
$row_mod = array();
if ($md_id && $md_layout && $md_theme) {
$row_mod = sql_fetch("SELECT * FROM rb_module WHERE md_id = '$md_id' AND md_layout = '$md_layout' AND md_theme = '$md_theme'");
}
// 설정 파일 포함
ob_start();
include $config_file;
$config_content = ob_get_clean();
echo $config_content;
?>