mirror of
https://codeberg.org/ThisIsMiseryy/techstore
synced 2026-05-14 17:02:06 +00:00
Implementazione base pagina account
This commit is contained in:
+15
-1
@@ -34,7 +34,21 @@ if ($result === false) {
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<?php if (isset($_SESSION['user'])): ?>
|
||||||
|
<div class="account-layout">
|
||||||
|
<div class="my-sidebar">
|
||||||
|
<ul>
|
||||||
|
<li><a href="account.php">Il mio account</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="my-container">
|
||||||
|
<h1>Il mio account</h1>
|
||||||
|
<p><strong>Nome utente:</strong> <?php echo htmlspecialchars($_SESSION['user']); ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php else: ?>
|
||||||
|
<?php header('Location: login.php'); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php $conn->close(); ?>
|
<?php $conn->close(); ?>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -209,3 +209,59 @@ form button:hover {
|
|||||||
.checkout-btn:hover {
|
.checkout-btn:hover {
|
||||||
background-color: #218838;
|
background-color: #218838;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Layout pagina account */
|
||||||
|
.account-layout {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 20px;
|
||||||
|
max-width: 1100px;
|
||||||
|
margin: 20px auto;
|
||||||
|
padding: 0 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-sidebar {
|
||||||
|
flex: 0 0 240px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-sidebar ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-sidebar li {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-sidebar a {
|
||||||
|
color: #007bff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-sidebar a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-container {
|
||||||
|
flex: 1 1 580px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.account-layout {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.my-sidebar,
|
||||||
|
.my-container {
|
||||||
|
flex: 1 1 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user