verifica
This commit is contained in:
parent
2c82d90dd4
commit
5f80048cec
20 changed files with 999 additions and 1 deletions
4
moro_detto_rocco_andrea_biciclette/includes/css/pico.min.css
vendored
Normal file
4
moro_detto_rocco_andrea_biciclette/includes/css/pico.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
moro_detto_rocco_andrea_biciclette/includes/footer.php
Normal file
2
moro_detto_rocco_andrea_biciclette/includes/footer.php
Normal file
|
@ -0,0 +1,2 @@
|
|||
<script src="/moro_detto_rocco_verifica_php/includes/js/bootstrap.bundle.js"
|
||||
crossorigin="anonymous"></script>
|
24
moro_detto_rocco_andrea_biciclette/includes/functions.php
Normal file
24
moro_detto_rocco_andrea_biciclette/includes/functions.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
$host = "127.0.0.1";
|
||||
$database = "biciclette";
|
||||
$user = "pdo";
|
||||
$password = "";
|
||||
|
||||
function getDbConnection()
|
||||
{
|
||||
global $host, $database, $user, $password, $database;
|
||||
return new PDO("mysql:host=$host;dbname=$database", $user, $password);
|
||||
}
|
||||
|
||||
function checkSession()
|
||||
{
|
||||
if (empty($_SESSION["llivello"]) || empty($_SESSION["login"])) {
|
||||
if($_SESSION["llivello"] != 0){
|
||||
$_SESSION["error"] = "Errore interno (Sessione non trovata)";
|
||||
header("Location: login.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
1
moro_detto_rocco_andrea_biciclette/includes/head.php
Normal file
1
moro_detto_rocco_andrea_biciclette/includes/head.php
Normal file
|
@ -0,0 +1 @@
|
|||
<link rel="stylesheet" href="includes/css/pico.min.css" >
|
Loading…
Add table
Add a link
Reference in a new issue