100 lines
4.8 KiB
PHP
100 lines
4.8 KiB
PHP
<?php
|
|
require_once 'db/config.php';
|
|
|
|
$profile = null;
|
|
try {
|
|
$pdo = db();
|
|
$stmt = $pdo->query("SELECT * FROM gtm_profiles ORDER BY created_at DESC LIMIT 1");
|
|
$profile = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
} catch (PDOException $e) {
|
|
// Handle database connection error
|
|
error_log($e->getMessage());
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>My GTM Profile</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<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&family=Lora:wght@700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="index.php">GTM Maximizer</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarNav">
|
|
<ul class="navbar-nav ms-auto">
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#">Dashboard</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link active" aria-current="page" href="profile.php">Profile</a>
|
|
</li>
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
Tools
|
|
</a>
|
|
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
<li><a class="dropdown-item" href="#">Design</a></li>
|
|
<li><a class="dropdown-item" href="#">Diagram</a></li>
|
|
<li><a class="dropdown-item" href="#">Integrations</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#">Settings</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#">Account</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="container my-5 pt-5">
|
|
<h1 class="mb-4">My GTM Profile</h1>
|
|
<?php if ($profile): ?>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Business Name: <?php echo htmlspecialchars($profile['business_name']); ?></h5>
|
|
<p class="card-text"><strong>What we sell:</strong> <?php echo htmlspecialchars($profile['sells_what']); ?></p>
|
|
<hr>
|
|
<h6 class="card-subtitle mb-2 text-muted">Market & Sales</h6>
|
|
<p class="card-text"><strong>Ideal Customer Profile (ICP):</strong> <?php echo htmlspecialchars($profile['icp']); ?></p>
|
|
<p class="card-text"><strong>Market Size:</strong> <?php echo htmlspecialchars($profile['market_size']); ?></p>
|
|
<p class="card-text"><strong>Existing Sales Motions:</strong> <?php echo htmlspecialchars($profile['sales_motions']); ?></p>
|
|
<hr>
|
|
<h6 class="card-subtitle mb-2 text-muted">Team & Roles</h6>
|
|
<p class="card-text"><strong>Organization Size:</strong> <?php echo htmlspecialchars($profile['org_size']); ?></p>
|
|
<p class="card-text"><strong>Marketing and Sales Roles:</strong> <?php echo htmlspecialchars($profile['roles']); ?></p>
|
|
<hr>
|
|
<h6 class="card-subtitle mb-2 text-muted">Goals</h6>
|
|
<p class="card-text"><strong>Growth Goals:</strong> <?php echo htmlspecialchars($profile['goals']); ?></p>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="alert alert-warning" role="alert">
|
|
No GTM profile found. Please <a href="index.php">create one</a> first.
|
|
</div>
|
|
<?php endif; ?>
|
|
</main>
|
|
|
|
<footer class="text-center py-4">
|
|
<p>© <?php echo date("Y"); ?> GTM Maximizer. All Rights Reserved.</p>
|
|
</footer>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|