-
Notifications
You must be signed in to change notification settings - Fork 0
/
media.php
68 lines (54 loc) · 1.65 KB
/
media.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php require_once('connect.php'); check_account();?>
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nuovo contenuto</title>
<style>
label {
display: inline-block;
font-size: large;
}
* {
font-family: Arial, Helvetica, sans-serif;
}
form {
display: flex;
flex-direction: column;
text-align: start;
}
input,
textarea {
padding: 10px;
margin-bottom: 20px;
font-size: 15px;
}
</style>
</head>
<body>
<?php include('header.php'); ?>
<div style="display: flex;">
<?php
$sql = "SELECT * FROM media WHERE proprietario = " . $_SESSION['id'];
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
foreach ($result as $row) {
echo '<div style="padding: 10px">';
echo 'ID: ' . $row['id'] . '<br>';
echo 'Nome media: ' . $row['nome_media'] . '<br>';
echo 'Titolo: ' . $row['titolo'] . '<br>';
echo 'Descrizione: ' . $row['descrizione'] . '<br>';
echo 'Materia: ' . $row['materia'] . '<br>';
echo 'Visualizza: ' . '<a target="_blank" href="media/'.$row['nome_file'].'">'.$row['nome_file'].'</a>' . '<br>';
echo '<a href="delete-media.php?id='.$row['id'].'">Elimina</a>';
echo '</div>';
}
} else {
echo "Non ci sono media";
}
?>
</div>
</body>
</html>