-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDashboard.php
67 lines (59 loc) · 2.6 KB
/
Dashboard.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
<?php
session_start();
$connessione=@mysqli_connect("localhost","root","","covid19");
if (mysqli_connect_errno()){
echo "Errore nella Connessione al Database.".die (mysqli_connect_error());
}
//Ultimo accesso registrato {data ip ora}
$lasthourdateip="select ora, data, ip from accessi where token=\"".$_SESSION['utente']."\"";
$lasth=mysqli_query($connessione,$lasthourdateip);
$fetchlast=mysqli_fetch_array($lasth);
if (empty($_SESSION['utente']) && empty($_SESSION['passwd'])){
header("location: LoginRegister.php");
}
?>
<head>
<?php include "include/header.php"?>
</head>
<body>
<div class="container-fluid">
<nav class="navbar navbar-light bg-light justify-content-center border rounded-lg">
<a class="navbar-brand" href="Homepage.php">Home</a>
<a class="navbar-brand">Benvenuto <?php echo $_SESSION['utente'];?></a>
</nav>
</div>
<div class="container-fluid">
<div class="alert alert-danger text-center" role="alert">
Ultimo accesso Il <?php echo $fetchlast[1];?> Ore <?php echo $fetchlast[0];?> IP: <?php echo $fetchlast[2]; ?>
</div>
</div>
<div class="container-fluid col-sm-4">
<h1 style="font-family: 'Open Sans', sans-serif;" class="text">Aggiornamento Dati</h1>
<form method="POST" action="backend/Dashboardlogic.php">
<div class="form-group">
<label for="data">Data</label>
<input class="form-control form-control-lg" type="date" id="data" name="data" placeholder="Data">
</div>
<div class="form-group">
<label for="positivi">Positivi</label>
<input class="form-control form-control-lg" type="text" id="positivi" name="positivi" placeholder="Inserisci il numero di Positivi">
</div>
<div class="form-group">
<label for="dimessi">Dimessi</label>
<input class="form-control form-control-lg" type="text" id="dimessi" name="dimessi" placeholder="Inserisci il numero di Dimessi">
</div>
<div class="form-group">
<label for="decessi">Decessi</label>
<input class="form-control form-control-lg" type="text" id="decessi" name="decessi" placeholder="Inserisci il numero di Decessi">
</div>
<div class="form-group">
<label for="tamponi">Tamponi</label>
<input class="form-control form-control-lg" type="text" id="tamponi" name="tamponi" placeholder="Inserisci il numero di Tamponi">
</div>
<input type="submit" class="btn btn-outline-success btn-lg btn-block" value="Inserisci">
</form>
</div>
<?php include "include/footer.php";
?>
</body>
</html>