Files
willes_AI/home.php

74 lines
2.6 KiB
PHP

<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/auth.php');
requireLogin(); // only logged-in users can pass
require_once($_SERVER['DOCUMENT_ROOT'] . '/db.php');
$conn = getConnection();
include($_SERVER['DOCUMENT_ROOT'] . '/inc/php/header.php');
?>
<body>
<div class="dashboard">
<!-- Sidebar -->
<aside class="sidebar">
<h2 class="logo">📧 AI Email</h2>
<nav>
<ul>
<li><a href="/inc/php/generate.php">✍️ Generate</a></li>
<li><a href="/saved_emails.php">💾 Saved Emails</a></li>
<li><a href="/settings.php">⚙️ Settings</a></li>
<li><a href="/logout.php">🚪 Logout</a></li>
</ul>
</nav>
</aside>
<!-- Main Content -->
<main class="main-content">
<header>
<h1>Welcome to AI Email Generator</h1>
<p>Effortlessly craft polished, professional emails in seconds.</p>
<button id="darkModeBtn">🌙 Toggle Dark Mode</button>
</header>
<section class="quick-actions">
<h2>⚡ Quick Actions</h2>
<div class="actions">
<a href="/inc/php/generate.php"><button>Start Generating Emails</button></a>
</div>
</section>
<section class="connected-accounts">
<h2>📧 Connected Accounts</h2>
<p>Link your email provider to read & send directly:</p>
<div class="connect-buttons">
<a href="/connect/gmail.php"><button>Connect Gmail</button></a>
<a href="/connect/outlook.php"><button>Connect Outlook</button></a>
<a href="/connect/imap.php"><button>Other (IMAP/SMTP)</button></a>
</div>
</section>
<section class="inbox">
<h2>📥 Inbox</h2>
<p>(This will show your connected emails once integration is done)</p>
<table>
<tr><th>From</th><th>Subject</th><th>Date</th><th>Action</th></tr>
<tr>
<td>Alice</td>
<td>Hello about our meeting</td>
<td>2025-08-20</td>
<td><a href="/inbox/view.php?id=1"><button>View</button></a></td>
</tr>
<tr>
<td>Bob</td>
<td>Invoice Reminder</td>
<td>2025-08-19</td>
<td><a href="/inbox/view.php?id=2"><button>View</button></a></td>
</tr>
</table>
</section>
</main>
</div>
<?php include($_SERVER['DOCUMENT_ROOT'] . '/inc/php/footer.php'); ?>