new commit and update
This commit is contained in:
@@ -7,13 +7,13 @@ error_reporting(E_ALL);
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
// Recupera l'id utente loggato
|
||||
$iduserlogin = $_SESSION['iduserlogin'];
|
||||
|
||||
//echo $iduserlogin;
|
||||
// Recupera l'id della casa dall'URL
|
||||
$idhome = isset($_GET['idhome']) ? intval($_GET['idhome']) : 0;
|
||||
|
||||
// Recupera lo sharing_type e le sezioni condivise per questa casa
|
||||
$querySharing = $conn->prepare("
|
||||
SELECT sharing_type, shared_sections
|
||||
SELECT sharing_type, shared_sections , iduser
|
||||
FROM home_sharing
|
||||
WHERE idhome = ? AND idshareduser = ? AND status = 'accepted'
|
||||
");
|
||||
@@ -29,6 +29,7 @@ if (!$sharingData) {
|
||||
|
||||
// Ottieni i dati di condivisione
|
||||
$sharingType = $sharingData['sharing_type'];
|
||||
$sharingIdUser = $sharingData['iduser'];
|
||||
$sharedSections = json_decode($sharingData['shared_sections'], true); // Decodifica il JSON
|
||||
?>
|
||||
<?php
|
||||
@@ -37,7 +38,7 @@ $sharedSections = json_decode($sharingData['shared_sections'], true); // Decodif
|
||||
|
||||
// Recupera i dettagli della casa
|
||||
$queryHome = $conn->prepare("SELECT * FROM home WHERE idhome = ? AND iduser = ?");
|
||||
$queryHome->bind_param('ii', $idhome, $iduserlogin);
|
||||
$queryHome->bind_param('ii', $idhome, $sharingIdUser);
|
||||
$queryHome->execute();
|
||||
$resultHome = $queryHome->get_result();
|
||||
$homeData = $resultHome->fetch_assoc();
|
||||
|
||||
Reference in New Issue
Block a user