Files
jarvis/public_html/bridge.php
T

25 lines
682 B
PHP

<?php
// Reads the PHP session token set by login.php and hands it to the browser's
// sessionStorage, then redirects to the main app (index.html).
session_name('jarvis_main');
session_start();
$token = $_SESSION['jarvis_token'] ?? '';
$name = $_SESSION['jarvis_name'] ?? '';
if (!$token) {
header('Location: /login.php');
exit;
}
?><!DOCTYPE html>
<html><head><meta charset="UTF-8"/>
<title>JARVIS</title>
<style>body{background:#000810;margin:0}</style>
</head><body>
<script>
sessionStorage.setItem('jarvis_token', <?= json_encode($token) ?>);
sessionStorage.setItem('jarvis_user', <?= json_encode($name) ?>);
window.location.replace('/');
</script>
</body></html>