34334-vm/home.php
Flatlogic Bot fa86852137 02
2025-09-24 06:32:27 +00:00

56 lines
2.2 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home - AI Resume Builder</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<div class="container text-center vh-100 d-flex flex-column justify-content-center">
<h1 class="text-light">Welcome to the AI Resume Builder</h1>
<p class="text-light">You are logged in. Template selection coming soon!</p>
<button id="signOutBtn" class="btn btn-danger mt-3 mx-auto" style="max-width: 200px;">Sign Out</button>
</div>
<script type="module">
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.1/firebase-app.js";
import { getAuth, signOut, onAuthStateChanged } from "https://www.gstatic.com/firebasejs/9.6.1/firebase-auth.js";
const firebaseConfig = {
apiKey: "AIzaSyAuabZynwAn8r91_toMzdN2_vCVOwLsAf8",
authDomain: "ai-resume-builder-90135.firebaseapp.com",
projectId: "ai-resume-builder-90135",
storageBucket: "ai-resume-builder-90135.firebasestorage.app",
messagingSenderId: "465451014283",
appId: "1:465451014283:web:355ddebe12bc8a2dfedc8e",
measurementId: "G-4B91V0ZY58"
};
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
// Redirect to login if not authenticated
onAuthStateChanged(auth, (user) => {
if (!user) {
window.location.href = 'index.php';
}
});
// Sign out functionality
const signOutBtn = document.getElementById('signOutBtn');
signOutBtn.addEventListener('click', () => {
signOut(auth).then(() => {
// Sign-out successful.
window.location.href = 'index.php';
}).catch((error) => {
// An error happened.
console.error('Sign out error:', error);
alert('Failed to sign out. Please try again.');
});
});
</script>
</body>
</html>