first commit 2
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 1. 현재 스킨 폴더명 정의 (config.php 로드 전에 설정)
|
||||
$current_page_skin = 'history';
|
||||
|
||||
// 2. 통합 설정 파일 로드
|
||||
$config_path = G5_THEME_PATH . '/skin/page/config.php';
|
||||
if (file_exists($config_path)) {
|
||||
include_once($config_path);
|
||||
} else {
|
||||
$page_skin_config = array('left_ad' => false, 'right_ad' => false);
|
||||
}
|
||||
$current_page_skin = 'history';
|
||||
// 3. 스킨 경로 정의
|
||||
$page_skin_url = G5_THEME_URL . '/skin/page/' . $current_page_skin;
|
||||
$page_skin_path = G5_THEME_PATH . '/skin/page/' . $current_page_skin;
|
||||
|
||||
// 4. CSS/JS 로드
|
||||
add_stylesheet('<link rel="stylesheet" href="' . $page_skin_url . '/css/style.css?ver=' . G5_SERVER_TIME . '">', 0);
|
||||
add_javascript('<script src="' . $page_skin_url . '/js/script.js?ver=' . G5_SERVER_TIME . '"></script>', 0);
|
||||
|
||||
// 5. 기본 데이터 정의
|
||||
$page_data = array(
|
||||
'title' => '회사 연혁',
|
||||
'subtitle' => '레이저월드가 걸어온 길',
|
||||
'content' => '
|
||||
<ul class="list-disc pl-5">
|
||||
<li><strong>1984</strong> - 월간 금형·공구 창간 (한국금형공업협동조합)</li>
|
||||
<li><strong>1991</strong> - (주)한국산업정보센타 설립</li>
|
||||
<li><strong>1993</strong> - 월간 레이저기술 창간</li>
|
||||
<li><strong>2025-09-03</strong> - (주)레이저월드 설립</li>
|
||||
</ul>
|
||||
<p class="mt-4">지속적인 콘텐츠 축적과 산업 네트워크를 바탕으로 전문 미디어로 성장해 왔습니다.</p>',
|
||||
'image_url' => '',
|
||||
'image_alt' => '',
|
||||
'sign_name' => '',
|
||||
'sign_company' => ''
|
||||
);
|
||||
|
||||
// 6. 모듈 설정 연동
|
||||
if (!isset($module_config) && isset($md_id) && $md_id) {
|
||||
$module_config = sql_fetch(" SELECT * FROM rb_module WHERE md_id = '{$md_id}' ");
|
||||
}
|
||||
|
||||
if (isset($module_config) && $module_config['md_type'] == 'page') {
|
||||
$target_bo_table = $module_config['md_bo_table_page'];
|
||||
$target_wr_id = $module_config['md_wr_id_page'];
|
||||
|
||||
if ($target_bo_table && $target_wr_id) {
|
||||
$write_table = $g5['write_prefix'] . $target_bo_table;
|
||||
$view = sql_fetch(" SELECT * FROM {$write_table} WHERE wr_id = '{$target_wr_id}' ");
|
||||
|
||||
if ($view) {
|
||||
$page_data['title'] = $view['wr_subject'];
|
||||
$page_data['subtitle'] = $view['wr_1'];
|
||||
$page_data['content'] = conv_content($view['wr_content'], 1);
|
||||
|
||||
$sql_file = " select bf_file, bf_source from {$g5['board_file_table']} where bo_table = '$target_bo_table' and wr_id = '$target_wr_id' order by bf_no limit 1 ";
|
||||
$row_file = sql_fetch($sql_file);
|
||||
if ($row_file['bf_file']) {
|
||||
$page_data['image_url'] = G5_DATA_URL.'/file/'.$target_bo_table.'/'.$row_file['bf_file'];
|
||||
$page_data['image_alt'] = $row_file['bf_source'];
|
||||
} else {
|
||||
$matches = get_editor_image($view['wr_content'], false);
|
||||
if($matches) {
|
||||
$img_src = $matches[1][0];
|
||||
if (!preg_match("/^(http|https):/i", $img_src)) {
|
||||
$page_data['image_url'] = G5_URL . $img_src;
|
||||
} else {
|
||||
$page_data['image_url'] = $img_src;
|
||||
}
|
||||
$page_data['image_alt'] = $view['wr_subject'];
|
||||
} else {
|
||||
$page_data['image_url'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$page_data['sign_name'] = $view['wr_2'];
|
||||
$page_data['sign_company'] = $view['wr_3'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="three-column-layout container">
|
||||
<?php if (isset($page_skin_config['left_ad']) && $page_skin_config['left_ad'] === true): ?>
|
||||
<aside class="layout-sidebar-left">
|
||||
<div class="sidebar-inner">
|
||||
<?php if($is_admin) { ?> <h3 class="sidebar-title">좌측 광고 영역</h3> <?php } ?>
|
||||
<div class="flex_box flex_box_l" data-layout="<?php echo $current_page_skin; ?>-left"></div>
|
||||
</div>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
<main class="layout-main-content">
|
||||
<div class="info-page-container">
|
||||
<header class="info-page-header">
|
||||
<h2 class="info-page-title"><?php echo $page_data['title']; ?></h2>
|
||||
<?php if($page_data['subtitle']): ?>
|
||||
<p class="info-page-subtitle"><?php echo $page_data['subtitle']; ?></p>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<div class="greeting-content-wrapper">
|
||||
<?php if($page_data['image_url']): ?>
|
||||
<figure class="greeting-figure">
|
||||
<img src="<?php echo $page_data['image_url']; ?>" alt="<?php echo $page_data['image_alt']; ?>" class="greeting-image">
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
<article class="prose">
|
||||
<?php echo $page_data['content']; ?>
|
||||
<?php if($page_data['sign_name'] || $page_data['sign_company']): ?>
|
||||
<div class="signature">
|
||||
<?php if($page_data['sign_name']): ?><strong><?php echo $page_data['sign_name']; ?></strong><?php endif; ?>
|
||||
<?php if($page_data['sign_company']): ?><span><?php echo $page_data['sign_company']; ?></span><?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php if (isset($page_skin_config['right_ad']) && $page_skin_config['right_ad'] === true): ?>
|
||||
<aside class="layout-sidebar-right">
|
||||
<div class="sidebar-inner">
|
||||
<?php if($is_admin) { ?> <h3 class="sidebar-title">우측 광고 영역</h3> <?php } ?>
|
||||
<div class="flex_box flex_box_r" data-layout="<?php echo $current_page_skin; ?>-right"></div>
|
||||
</div>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('History page loaded');
|
||||
});
|
||||
Reference in New Issue
Block a user