Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 13 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,24 @@

## Index <!-- omit in toc -->

- [Requirements](#requirements)
- [Repository](#repository)
- [Technologies used](#technologies-used)
- [Project delivery](#project-delivery)
- [Resources](#resources)
- [How to create Users](#how-to-create-users)
- [Bootstrap Panel](#bootstrap-panel)
- [Author](#author)

## Requirements
## How to create users

- Learn how to use the $_SERVER
- Understand what a server-side language is and what it is used for
You could create Users in the folder 'app/resources/users.php/.

## Repository
You must need to create a new array at the bottom of the $user variable. It's important to follow the next structure:

First of all you must fork this project into your GitHub account.
- Must assign the key "user" to the new username and the your custom user.
- Must assign the key "pass" in the same array of the new user.

To create a fork on GitHub is as easy as clicking the “fork” button on the repository page.
If you don't accomplish this instructions your user won't work.

<img src="https://docs.github.com/assets/cb-23088/images/help/repository/fork_button.png" alt="Fork on GitHub" width='450'>
## Bootstrap Panel

## Technologies used
You could change the panel, since the page it's based on a bootstrap template.

\* PHP

## Project delivery

To deliver this project you must send a Pull Request as explained in the Students Handbook. Remember that the PR title must be with the format
- Solution: + NAME AND SURNAME or TEAM NAMES AND SURNAMES.
- For example: "Solution: Josep Riera", "Solution: Josep Riera, Toni Suárez, Marta Vázquez"

## Resources

- [$_SERVER](https://www.php.net/manual/en/reserved.variables.server.php)
- [PHP.ini](https://www.php.net/manual/es/configuration.file.php)
- [PHP Superglobals](https://code.tutsplus.com/es/tutorials/php-superglobals-explained-with-cheatsheet--cms-36598)
## Author
* **[Valentino Traverso](https://github.com/valentraverso)** - Developer
92 changes: 92 additions & 0 deletions app/dashboard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
body {
font-size: .875rem;
}

.feather {
width: 16px;
height: 16px;
vertical-align: text-bottom;
}

/*
* Sidebar
*/

.sidebar {
top: 0;
bottom: 0;
left: 0;
z-index: 100; /* Behind the navbar */
padding: 0;
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
top: 48px; /* Height of navbar */
height: calc(100vh - 48px);
padding-top: .5rem;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
font-weight: 500;
color: #333;
}

.sidebar .nav-link .feather {
margin-right: 4px;
color: #999;
}

.sidebar .nav-link.active {
color: #007bff;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}

.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}

/*
* Navbar
*/

.navbar-brand {
padding-top: .75rem;
padding-bottom: .75rem;
font-size: 1rem;
background-color: rgba(0, 0, 0, .25);
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .form-control {
padding: .75rem 1rem;
border-width: 0;
border-radius: 0;
}

.form-control-dark {
color: #fff;
background-color: rgba(255, 255, 255, .1);
border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
border-color: transparent;
box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

/*
* Utilities
*/

.border-top { border-top: 1px solid #e5e5e5; }
.border-bottom { border-bottom: 1px solid #e5e5e5; }
41 changes: 41 additions & 0 deletions app/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
session_start();

if(isset($_SESSION['logged'])){
header('location:./panel.php');
}
?>

<!DOCTYPE html>
<html lang="en">
<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>Document</title>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
</head>
<body>
<form action="./resources/validation.php" method="post">
<section class='container mt-5'>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Username</label>
<input type="text" name="username" class="form-control" id="exampleInputEmail1">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" name="psw" class="form-control" id="exampleInputPassword1">
</div>
<div class="mb-3">
<?php
if(isset($_GET['err'])){
echo '<p style="color:red">'.$_GET['msg'].'</p>';
}
?>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</section>
</body>
</html>
Loading