fix:영업관리 링크를 환경별로 동적 설정
- 로컬(sam.kr) → https://mng.sam.kr - 서버(codebridge-x.com) → https://mng.codebridge-x.com - PHP $mngUrl 변수로 환경 자동 감지 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
<?php
|
||||
// 환경에 따른 MNG URL 설정
|
||||
$currentHost = $_SERVER['HTTP_HOST'] ?? '';
|
||||
$mngUrl = (strpos($currentHost, 'sam.kr') !== false)
|
||||
? 'https://mng.sam.kr'
|
||||
: 'https://mng.codebridge-x.com';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
@@ -40,6 +47,10 @@
|
||||
<body class="bg-slate-50 text-slate-800 antialiased">
|
||||
<div id="root"></div>
|
||||
|
||||
<script>
|
||||
// PHP에서 전달받은 환경별 MNG URL
|
||||
const MNG_URL = '<?= $mngUrl ?>';
|
||||
</script>
|
||||
<script type="text/babel">
|
||||
const { useState, useEffect, useRef } = React;
|
||||
|
||||
@@ -78,7 +89,7 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<a href="https://mng.codebridge-x.com" target="_blank" className="text-sm font-medium text-slate-600 hover:text-blue-600 transition-colors">영업관리</a>
|
||||
<a href={MNG_URL} target="_blank" className="text-sm font-medium text-slate-600 hover:text-blue-600 transition-colors">영업관리</a>
|
||||
<a href="../../price/index.php" className="text-sm font-medium text-slate-600 hover:text-blue-600 transition-colors">가격정책</a>
|
||||
|
||||
<button
|
||||
|
||||
14
index.php
14
index.php
@@ -1,4 +1,12 @@
|
||||
<?php require_once 'session.php'; ?>
|
||||
<?php
|
||||
require_once 'session.php';
|
||||
|
||||
// 환경에 따른 MNG URL 설정
|
||||
$currentHost = $_SERVER['HTTP_HOST'] ?? '';
|
||||
$mngUrl = (strpos($currentHost, 'sam.kr') !== false)
|
||||
? 'https://mng.sam.kr'
|
||||
: 'https://mng.codebridge-x.com';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
@@ -174,7 +182,7 @@
|
||||
<div class="hidden md:flex items-center gap-4">
|
||||
<!-- <a href="sales_scenario/" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">영업 시나리오</a>
|
||||
<a href="sales_manager_scenario/" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">매니저 시나리오</a> -->
|
||||
<a href="https://mng.codebridge-x.com" target="_blank" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">영업관리</a>
|
||||
<a href="<?= $mngUrl ?>" target="_blank" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">영업관리</a>
|
||||
<a href="price/index.php" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">가격정책</a>
|
||||
|
||||
<!-- Corporate Analysis Hamburger Menu -->
|
||||
@@ -239,7 +247,7 @@
|
||||
<div class="flex flex-col gap-3">
|
||||
<a href="sales_scenario/" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors px-2 py-2 hover:bg-slate-50 rounded-lg" onclick="closeMobileMenu()">영업 시나리오</a>
|
||||
<a href="sales_manager_scenario/" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors px-2 py-2 hover:bg-slate-50 rounded-lg" onclick="closeMobileMenu()">매니저 시나리오</a>
|
||||
<a href="https://mng.codebridge-x.com" target="_blank" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors px-2 py-2 hover:bg-slate-50 rounded-lg" onclick="closeMobileMenu()">영업관리</a>
|
||||
<a href="<?= $mngUrl ?>" target="_blank" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors px-2 py-2 hover:bg-slate-50 rounded-lg" onclick="closeMobileMenu()">영업관리</a>
|
||||
<a href="price/index.php" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors px-2 py-2 hover:bg-slate-50 rounded-lg" onclick="closeMobileMenu()">가격정책</a>
|
||||
<a href="corp/kodata.php" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors px-2 py-2 hover:bg-slate-50 rounded-lg" onclick="closeMobileMenu()">기업분석</a>
|
||||
<?php if (isset($_SESSION['userid']) && $_SESSION['userid'] != ''): ?>
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
if (file_exists('../session.php')) {
|
||||
require_once '../session.php';
|
||||
}
|
||||
|
||||
// 환경에 따른 MNG URL 설정
|
||||
$currentHost = $_SERVER['HTTP_HOST'] ?? '';
|
||||
$mngUrl = (strpos($currentHost, 'sam.kr') !== false)
|
||||
? 'https://mng.sam.kr'
|
||||
: 'https://mng.codebridge-x.com';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
@@ -25,7 +31,7 @@ if (file_exists('../session.php')) {
|
||||
</a>
|
||||
|
||||
<div class="flex items-center gap-4">
|
||||
<a href="https://mng.codebridge-x.com" target="_blank" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">영업관리</a>
|
||||
<a href="<?= $mngUrl ?>" target="_blank" class="text-sm font-medium text-slate-600 hover:text-brand-600 transition-colors">영업관리</a>
|
||||
<a href="수당지급체계.md" class="px-4 py-2 bg-slate-100 text-slate-600 text-xs font-bold rounded-lg hover:bg-slate-200 transition-colors border border-slate-200">체계 문서 보기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user