-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
737 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "general style Compile", | ||
"type": "shell", | ||
"command": "node-sass marco_biagini\\Styles\\general.scss marco_biagini\\Styles\\general.css", | ||
"group": "build" | ||
}, | ||
{ | ||
"label": "navbar style Compile", | ||
"type": "shell", | ||
"command": "node-sass marco_biagini\\Styles\\navbar.scss marco_biagini\\Styles\\navbar.css", | ||
"group": "build" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
|
||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Contacts</title> | ||
<link type="text/css" rel="stylesheet" href="Styles/Bundle.css"/> | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="Scripts/JavaScript/Bundle.js"></script> | ||
|
||
</head> | ||
<body> | ||
<?php include("Menu.php"); ?> | ||
|
||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
setActive("#menu", 1); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
include("Scripts/PHP/SessionManager.php"); | ||
|
||
if(!$_SESSION["login"]->logged){ | ||
header('location:Login.php'); | ||
exit(); | ||
} | ||
|
||
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
|
||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Sito Web Meraviglioso</title> | ||
<link type="text/css" rel="stylesheet" href="Styles/Bundle.css"/> | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="Scripts/JavaScript/Bundle.js"></script> | ||
|
||
</head> | ||
<body> | ||
<?php include("Menu.php"); ?> | ||
|
||
<div class="main-content"> | ||
<h1>Questa è la pagina HOME</h1> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
setActive("#menu", 0); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?php | ||
include("Scripts/PHP/SessionManager.php"); | ||
|
||
$login = new login("", false); | ||
|
||
$login_success = true; | ||
$login_message = ""; | ||
|
||
if(isset($_POST["name"]) && isset($_POST["pswd"])){ | ||
$check_access = "Marco" . md5("12345"); | ||
|
||
|
||
$nome = $_POST["name"]; | ||
$password = $_POST["pswd"]; | ||
|
||
$access = $nome . md5($password); | ||
|
||
// echo "$check_access = $access"; | ||
|
||
if($check_access != $access){ | ||
$login_success = false; | ||
} | ||
|
||
}else{ | ||
$login_success = false; | ||
} | ||
|
||
if($login_success){ | ||
|
||
$login->set_name($_POST["name"]); | ||
$login->set_logged(true); | ||
|
||
save_login($login); | ||
header('location:Home.php'); | ||
exit(); | ||
|
||
}else{ | ||
$login_message = "Utente non riconosciuto, il campo utente o la password non sono corretti."; | ||
} | ||
|
||
?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
|
||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Login</title> | ||
<link type="text/css" rel="stylesheet" href="Styles/Bundle.css" /> | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="Scripts/JavaScript/Bundle.js"></script> | ||
|
||
</head> | ||
|
||
<body> | ||
<?php include("Menu.php"); ?> | ||
|
||
<div class="main-content"> | ||
<form accept-charset="UTF-8" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST"> | ||
<fieldset> | ||
<legend>Login:</legend> | ||
<br /> | ||
<label for="name">Username: </label> | ||
<input name="name" type="text" value="" /> <br /> | ||
<br /> | ||
<label for="pswd">Password: </label> | ||
<input name="pswd" type="password" value="" /> <br /> | ||
<br /> | ||
<label for="ricordami">Ricordami:</label> | ||
<input name="ricordami" type="checkbox" value="1" /> <br /> | ||
<br /> | ||
<button class="btn-primary" type="submit" value="Submit">Accedi</button> | ||
</fieldset> | ||
<label style="color: red; margin-top: 1em;"><?php echo $login_message ?></label> | ||
</form> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
setActive("#menu", 0); | ||
$("#btn_contacts").hide(); | ||
$("#btn_user").hide(); | ||
}); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<nav class="nav-top" id="menu"> | ||
<a href="Home.php" id="btn_home" class="nav-item nav-logo">Sito Figo</a> | ||
<a href="Contacts.php" id="btn_contacts" class="nav-item">Contatti</a> | ||
<button id="btn_user" class="nav-user" onclick="toggleItem('#options')">U</button> | ||
<div class="user-options hide" id="options"> | ||
<ul> | ||
<li><a id="btn_theme" onclick="toggleTheme()">Cambia Tema</a></li> | ||
<li><a href="Scripts/PHP/Logout.php" id="btn_logout">Esci</a></li> | ||
</ul> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function toggleItem(item){ | ||
$(item).toggleClass("hide"); | ||
} | ||
|
||
function toggleTheme(){ | ||
$("body").toggleClass("dark-mode"); | ||
} | ||
|
||
function setActive(idnav, numchild){ | ||
var kids = $(idnav).children(); | ||
var i; | ||
for(i = 0; i<kids.length; i++){ | ||
if(i == numchild){ | ||
$(kids[i]).addClass("active"); | ||
}else{ | ||
$(kids[i]).removeClass("active"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
include("SessionManager.php"); | ||
|
||
session_destroy(); | ||
header('location:../../Login.php'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
session_start(); | ||
|
||
function save_login($login){ | ||
$_SESSION["login"]= $login; | ||
session_write_close(); | ||
} | ||
|
||
class login{ | ||
public $logged; | ||
public $username; | ||
|
||
function set_name($username){ | ||
$this->username = $username; | ||
} | ||
function get_name(){ | ||
return $this->username; | ||
} | ||
|
||
function set_logged($logged){ | ||
$this->logged = $logged; | ||
} | ||
function get_logged(){ | ||
return $this->logged; | ||
} | ||
|
||
function __construct($username, $logged){ | ||
$this->username = $username; | ||
$this->logged = $logged; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@import url("general.css"); | ||
@import url("navbar.css"); | ||
@import url("buttons.css"); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@import "resources.scss"; | ||
|
||
.btn{ | ||
|
||
@include button(); | ||
@include transition(.3s); | ||
&:hover{ | ||
background-color: $secondary; | ||
color: $dark; | ||
} | ||
|
||
&-primary{ | ||
@extend .btn; | ||
background-color: $primary; | ||
color: $light; | ||
} | ||
|
||
&-info{ | ||
@extend .btn; | ||
background-color: $info; | ||
color: $light; | ||
} | ||
|
||
&-success{ | ||
@extend .btn; | ||
background-color: $success; | ||
color: $light; | ||
} | ||
|
||
&-warning{ | ||
@extend .btn; | ||
background-color: $warning; | ||
color: $dark; | ||
} | ||
|
||
&-danger{ | ||
@extend .btn; | ||
background-color: $danger; | ||
color: $light; | ||
} | ||
} |
Oops, something went wrong.