update document page
This commit is contained in:
+67
-49
@@ -1,16 +1,9 @@
|
||||
<?php include('include/headscript.php'); ?>
|
||||
<?php
|
||||
// Connessione al database e avvio sessione
|
||||
// Connessione al database
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
|
||||
// Verifica connessione
|
||||
if ($conn->connect_error) {
|
||||
die("Errore di connessione: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
// Recupera l'id utente loggato
|
||||
$iduserlogin = $_SESSION['iduserlogin'];
|
||||
|
||||
// Calcolo del numero di immobili
|
||||
$queryHomes = $conn->prepare("SELECT COUNT(*) AS total_homes FROM home WHERE iduser = ?");
|
||||
$queryHomes->bind_param('i', $iduserlogin);
|
||||
@@ -37,13 +30,8 @@ $queryDocuments->bind_param('i', $iduserlogin);
|
||||
$queryDocuments->execute();
|
||||
$resultDocuments = $queryDocuments->get_result();
|
||||
$totalDocuments = $resultDocuments->fetch_assoc()['total_documents'];
|
||||
?>
|
||||
<?php
|
||||
// Connessione al database
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
|
||||
// Recupera l'id utente loggato
|
||||
$iduserlogin = $_SESSION['iduserlogin'];
|
||||
|
||||
|
||||
// Query per ottenere le case dell'utente
|
||||
$sql = "
|
||||
@@ -90,7 +78,7 @@ $result = $stmt->get_result();
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Elenco delle tue case</title>
|
||||
<title>Elenco dei tuoi immobili</title>
|
||||
|
||||
<!-- Bootstrap 4 CSS -->
|
||||
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
|
||||
@@ -303,6 +291,39 @@ $result = $stmt->get_result();
|
||||
.box-home:hover .action-menu {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Stile per il nuovo banner */
|
||||
.header-banner {
|
||||
position: relative;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
border-radius: 10px;
|
||||
height: 150px;
|
||||
/* Altezza del banner */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header-banner-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, rgba(30, 58, 138, 0.8), rgba(255, 255, 255, 0.2));
|
||||
/* Gradiente sovrapposto */
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-banner-title {
|
||||
color: #ffffff;
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -324,7 +345,7 @@ $result = $stmt->get_result();
|
||||
<li class="breadcrumb-item active">Elenco Case</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Elenco dei tuoi immobili</h4>
|
||||
<h4 class="page-title">Elenco delle tue case</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -394,10 +415,21 @@ $result = $stmt->get_result();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Nuovo Banner -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
<div class="header-banner" style="background-image: url('path/to/your/image.jpg');">
|
||||
<div class="header-banner-overlay">
|
||||
<h3 class="header-banner-title">Immobili</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-12 d-flex justify-content-start align-items-center gap-3">
|
||||
<a href="manage-home.php" class="btn btn-success">
|
||||
<i class="fas fa-plus"></i> Aggiungi Casa/Terreno
|
||||
<i class="fas fa-plus"></i> Aggiungi Nuovo
|
||||
</a>
|
||||
|
||||
<button id="toggleViewBtn" class="btn btn-info ms-2">
|
||||
@@ -405,8 +437,6 @@ $result = $stmt->get_result();
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- table view -->
|
||||
<div id="tableView" style="display: none;">
|
||||
|
||||
@@ -421,21 +451,16 @@ $result = $stmt->get_result();
|
||||
<tr>
|
||||
<th>Foto</th>
|
||||
<th>Nome di Riferimento</th>
|
||||
<th>Città / Nazione</th>
|
||||
<th>Indirizzo</th>
|
||||
<th>Proprietari</th>
|
||||
<th>Città / Nazione</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<!-- Campi di input per i filtri -->
|
||||
<th></th>
|
||||
<th><input type="text" placeholder="Cerca Nome" class="form-control form-control-sm"></th>
|
||||
|
||||
<th><input type="text" placeholder="Cerca Città" class="form-control form-control-sm"></th>
|
||||
<th><input type="text" placeholder="Cerca Indirizzo" class="form-control form-control-sm"></th>
|
||||
<th><input type="text" placeholder="Cerca Proprietari" class="form-control form-control-sm"></th>
|
||||
|
||||
<th><input type="text" placeholder="Cerca Città" class="form-control form-control-sm"></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -444,25 +469,17 @@ $result = $stmt->get_result();
|
||||
<tr>
|
||||
<!-- Thumbnail immagine -->
|
||||
<td>
|
||||
<img src="mainphoto/<?php echo htmlspecialchars($row['mainphoto'] ?? 'default.jpg'); ?>"
|
||||
class="img-thumbnail open-photo"
|
||||
style="width: 80px; height: 80px; object-fit: cover; cursor: pointer;"
|
||||
alt="<?php echo htmlspecialchars($row['name']); ?>"
|
||||
data-toggle="modal" data-target="#photoModal"
|
||||
data-src="mainphoto/<?php echo htmlspecialchars($row['mainphoto'] ?? 'default.jpg'); ?>">
|
||||
<a href="manage-home.php?idhome=<?php echo $row['idhome']; ?>">
|
||||
<img src="mainphoto/<?php echo htmlspecialchars($row['mainphoto'] ?? 'default.jpg'); ?>"
|
||||
class="img-thumbnail open-photo"
|
||||
style="width: 80px; height: 80px; object-fit: cover; cursor: pointer;"
|
||||
alt="<?php echo htmlspecialchars($row['name']); ?>">
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<!-- Nome immobile -->
|
||||
<td><?php echo htmlspecialchars($row['name']); ?></td>
|
||||
|
||||
<!-- Città e Nazione -->
|
||||
<td><?php echo htmlspecialchars($row['city']); ?>, <?php echo htmlspecialchars($row['country']); ?></td>
|
||||
|
||||
<!-- Indirizzo -->
|
||||
<td><?php echo htmlspecialchars($row['address']); ?></td>
|
||||
|
||||
<!-- Proprietari + Bottone -->
|
||||
<td>
|
||||
<?php echo nl2br(htmlspecialchars($row['owner_names'])); ?>
|
||||
@@ -485,7 +502,10 @@ $result = $stmt->get_result();
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<!-- azioni -->
|
||||
<!-- Città e Nazione -->
|
||||
<td><?php echo htmlspecialchars($row['city']); ?>, <?php echo htmlspecialchars($row['country']); ?></td>
|
||||
|
||||
<!-- Azioni -->
|
||||
<td class="text-nowrap">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
@@ -510,12 +530,7 @@ $result = $stmt->get_result();
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -536,9 +551,12 @@ $result = $stmt->get_result();
|
||||
while ($row = $result->fetch_assoc()) { ?>
|
||||
<div class="col-md-3 col-sm-6 mb-4"> <!-- 4 per riga su desktop, 2 su tablet -->
|
||||
<div class="card shadow-sm border-0 position-relative box-home">
|
||||
<img src="mainphoto/<?php echo htmlspecialchars($row['mainphoto'] ?? 'default.jpg'); ?>"
|
||||
class="card-img-top"
|
||||
alt="<?php echo htmlspecialchars($row['name']); ?>">
|
||||
<a href="manage-home.php?idhome=<?php echo $row['idhome']; ?>">
|
||||
<img src="mainphoto/<?php echo htmlspecialchars($row['mainphoto'] ?? 'default.jpg'); ?>"
|
||||
class="card-img-top"
|
||||
alt="<?php echo htmlspecialchars($row['name']); ?>">
|
||||
</a>
|
||||
|
||||
|
||||
<!-- Pulsante 3 puntini -->
|
||||
<!-- Contenitore per i bottoni (Proprietari + Menu Azioni) -->
|
||||
|
||||
Reference in New Issue
Block a user