<?php
// Session config for iframe
session_set_cookie_params([
    'lifetime' => 0,
    'path' => '/',
    'secure' => true,
    'httponly' => true,
    'samesite' => 'None'
]);

session_start();

// Handle form submit (user clicked "Continue")
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
  
    // Redirect to main application
    header("Location: https://integrations.notamedia.co.in/helpdesk-core-php/index.php");
    exit;
}
?>

<!DOCTYPE html>
<html>
<head>
    <title>Bitrix24 App Consent</title>
</head>
<body style="text-align:center; padding: 50px;">
    <h2>Welcome to Bitrix24 App</h2>
    <p>To continue, please confirm your presence by clicking below:</p>

    <form method="POST">
        <button type="submit" style="padding: 10px 25px;">Continue</button>
    </form>
</body>
</html>
