36293-vm/index.php
2025-11-26 16:18:35 +00:00

65 lines
2.7 KiB
PHP

<?php
require_once __DIR__ . '/db/config.php';
try {
$pdo = db();
$migration_files = glob(__DIR__ . '/db/migrations/*.sql');
sort($migration_files);
foreach ($migration_files as $file) {
$sql = file_get_contents($file);
$pdo->exec($sql);
}
} catch (PDOException $e) {
// If the table already exists, ignore the error
if (strpos($e->getMessage(), 'already exists') === false) {
die("Database migration failed: " . $e->getMessage());
}
}
?>
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Project Financial Management</title>
<meta name="description" content="Project Financial Management Tool">
<meta property="og:title" content="Project Financial Management">
<meta property="og:description" content="Manage your project financials, roster, and budget.">
<meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? ''); ?>">
<meta name="twitter:card" content="summary_large_image">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<div class="top-navbar">
Project Financial Management
</div>
<div class="main-wrapper">
<nav class="sidebar">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link" href="roster.php"><i class="bi bi-people-fill me-2"></i>Roster</a>
</li>
<li class="nav-item">
<a class="nav-link" href="projects.php"><i class="bi bi-briefcase-fill me-2"></i>Projects</a>
</li>
</ul>
</nav>
<main class="content-wrapper">
<div class="page-header">
<h1 class="h2">Welcome to Project Financial Management</h1>
</div>
<div class="card">
<div class="card-body">
<p>This is the landing page. You can navigate to the Roster or Projects page using the sidebar.</p>
</div>
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>