/home/mjc1/public_html/html/m/app_install.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<style>
    #appInstall { background-color:#e6f3f1}
    .installWrap {display:flex; justify-content:center; gap:5px}
    .installWrap > div {display:flex; width:100%; padding:15px 0; max-width:175px; background-color:#fff; flex-direction:column; align-items: center; text-align:center}
    .installWrap > div > img {border-radius:15px; width:70px; margin-bottom:10px; }
    .installWrap > div > b {font-size:17px; margin-bottom:10px}
    .installWrap .downBtn {display:block; width:78px; font-size:14px; border:1px solid #ddd; padding:7px 0; border-radius:5px;}
    .installWrap .downBtn img {width:15px}
    .manual_area {margin: 0 auto;width: 50%;margin-top: 20px;}
    .manual_area .downBtnBox {text-align: center;}
    .manual_area .downBtnBox a {margin-bottom: 5px;display: block;width: 179px;font-size: 14px;border: 1px solid #ddd;padding: 7px 0;border-radius: 5px;background: #fff;}
    .manual_area .downBtnBox a img {width: 15px;margin-right: 5px;}
</style>

<?php
$userAgent 
$_SERVER['HTTP_USER_AGENT'];
?>
 
<section id="appInstall" class="section">
    <div class="secTitle"><h3>업무관리 <b>앱</b>(APP) <b>설치</b></h3></div>
    <div class="installWrap">
        <div class="3sBox">
            <img src="./images/intro/install_1.png" alt="">
            <b>스마트폰(PDA)<br>영업관리</b>
            <div class="downBtnBox"></div>
            <!-- <a href="https://play.google.com/store/apps/details?id=co.mjsoft.jego3s&hl=ko&gl=US" class="downBtn"><img src="./images/intro/down_1.png" alt=""> 설치</a> -->
        </div>
        <div class="smartQ">
            <img src="./images/intro/install_2.png" alt="">
            <b>스마트<br>수발주관리</b>
            <a href="https://play.google.com/store/apps/details?id=com.mijin.smartorder2&hl=ko&gl=US" class="downBtn"><img src="./images/intro/down_1.png" alt=""> 설치</a>
        </div>
    </div>

    <?php if (preg_match('/iPhone|iPad|iPod/'$userAgent)) { ?>
    <div class="manual_area">
        <div class="downBtnBox">
            <a href="./천년경영_ns_사용설명서.pdf" target="_blank" class="downBtn" style="margin-bottom:5px;">
                <img src="./images/intro/down_1.png" alt=""> 천년경영NS 메뉴얼
            </a>
        </div>
    </div>
    <?php ?>
</section>

<script>
$(document).ready(function() {
    $(document).ready(function () {
    const userAgent = navigator.userAgent || navigator.vendor || window.opera;

    // 이미지 & 링크 설정
    const iosLink = "https://apps.apple.com/kr/app/%EC%B2%9C%EB%85%84%EA%B2%BD%EC%98%81-ns/id6749216832"; // iOS 앱스토어 링크 (실제 앱 ID로 교체)
    const androidLink = "https://play.google.com/store/apps/details?id=co.mjsoft.jego3s&hl=ko&gl=US";

    const iosImg = "./images/intro/install_1_ios.jpg";      // iOS용 이미지 (예시)
    const androidImg = "./images/intro/install_1.png"; // Android용 이미지 (예시)
    const defaultImg = "./images/intro/install_1.png";       // 기본 이미지 (기존 이미지)

    let linkHTML = "";
    let imgSrc = defaultImg;

    if (/android/i.test(userAgent)) {
        imgSrc = androidImg;
        linkHTML = `
            <a href="${androidLink}" class="downBtn">
                <img src="./images/intro/down_1.png" alt=""> 설치
            </a>
        `;
    } else if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
        imgSrc = iosImg;
        linkHTML = `
            <a href="${iosLink}" class="downBtn" style="margin-bottom:5px;">
                <img src="./images/intro/down_1.png" alt=""> 설치
            </a>
        `;
    } else {
        imgSrc = defaultImg;
        linkHTML = `
            <a href="${androidLink}" class="downBtn" style="margin-bottom:5px;">
                <img src="./images/intro/down_1.png" alt=""> Android
            </a>
            <a href="${iosLink}" class="downBtn">
                <img src="./images/intro/down_1.png" alt=""> iOS
            </a>
        `;
    }

    // 이미지 변경
    $(".3sBox img").attr("src", imgSrc);

    // 버튼 링크 삽입
    $(".3sBox .downBtnBox").html(linkHTML);
});
});
</script>