Path : /var/www/html/smart_kpp2_bk17 มีค 69/linebot/
File Upload :
Current File : /var/www/html/smart_kpp2_bk17 มีค 69/linebot/check.php

<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>User checking, Please wait...</title>
    <script src="https://static.line-scdn.net/liff/edge/versions/2.9.0/sdk.js"></script>
</head>

<body>
<!--
    <img id="pictureUrl" width="25%">
    <p id="userId"></p>
    <p id="displayName"></p>
    <p id="statusMessage"></p>
    <p id="getDecodedIDToken"></p>
-->
    <script>
    function runApp() {
        liff.getProfile().then(profile => {
            //document.getElementById("pictureUrl").src = profile.pictureUrl;
            //document.getElementById("userId").innerHTML = '<b>UserId:</b> ' + profile.userId;
            //document.getElementById("displayName").innerHTML = '<b>DisplayName:</b> ' + profile.displayName;
            //document.getElementById("statusMessage").innerHTML = '<b>StatusMessage:</b> ' + profile.statusMessage;
            //document.getElementById("getDecodedIDToken").innerHTML = '<b>Email:</b> ' + liff.getDecodedIDToken().email;
            window.location = "login.php?userId=" + profile.userId;
        }).catch(err => console.error(err));
    }

    liff.init({
        liffId: "1660827893-Yvv0Da6d"
    }, () => {
        if (liff.isLoggedIn()) {
            runApp();
        } else {
            liff.login();
        }
    }, err => console.error(err.code, error.message));
    </script>

</body>

</html>