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
Binary file added assets/assembler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/white.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions close_session.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

session_start();

if(isset($_SESSION["user"])){

session_destroy();

echo "<script>location.href='index.php'</script>";
}else{

echo "<script>location.href='index.php'</script>";
}

?>
9 changes: 9 additions & 0 deletions colors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
document.querySelector('.border').onmousemove = (e) => {

const x = e.pageX - e.target.offsetLeft
const y = e.pageY - e.target.offsetTop

e.target.style.setProperty('--x', `${ x }px`)
e.target.style.setProperty('--y', `${ y }px`)

}
48 changes: 48 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!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">
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto">
<title>Document</title>
</head>
<body>
<nav class="navbar">
<div class="container">
<img src="assets/assembler.png" width="200px">
</div>
</nav>
<?php
if(isset($_GET["error"]))echo $_GET["error"];
?>

<form action="validate.php" method="POST" class="form border">
<div class="form-div" id="userNameGroup">
<label class="form-label" for="username">Username</label>
<div class="form-input-div">
<input class="form-input" type="text" id="username" name="user" minlength="5" maxlength="20" required>
<i class="form-validation-state fa-solid fa-circle-xmark"></i>
</div>

</div>

<div class="form-div" id="passGroup">
<label class="form-label" for="password">Password</label>
<div class="form-input-div">
<input class="form-input" type="password" id="pass1" name="password" maxlength="20" required>
<i class="form-validation-state fa-solid fa-circle-xmark"></i>
</div>

<br>
<button class="button" type="submit" value="login" >
Login
<div class="button__horizontal"></div>
<div class="button__vertical"></div>
</button>

</form>
<script src='./colors.js'></script>
</body>
</html>
55 changes: 55 additions & 0 deletions panel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
session_start();
if(isset($_SESSION["user"])){
echo "<h1>Welcome ".$_SESSION["user"]."</h1>";
}
?>
<!DOCTYPE html>
<html>

<head>
<link rel="profile" href="style.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Assembler</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="https://kit.fontawesome.com/bb7f913e5c.js" crossorigin="anonymous"></script>
</head>

<body>
</a>
<header id="navigation">
<h1>Assembler</h1>
</header>
<div class="total">

<div id='div1'>
<article>
<h2> Profile</h2>
<p class="custom_p">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p>
<p class='custom_p'>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. <br> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<img alt="logo" src="assets/assembler.png" width=500 />
<p class="custom_p">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
<img src="assets/assembler.png" width=500xp />
<p class='custom_p'>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</article>
</div>
</div>
<footer>
<p>Copyright © 2022 | By Ynohe</p>
<div class="social">
<a href="https://www.instagram.com"><i class="fa-brands fa-instagram"></i></a>
<a href="https://www.discord.com"><i class="fa-brands fa-discord"></i></a>
<a href="https://www.youtube.com"><i class="fa-brands fa-youtube"></i></a>
</div>
</footer>
</body>

</html>
<?php

if(isset($_SESSION["user"])){
echo "<br><a href='close_session.php'><input type=button class='logg' value=logout name=logout</a>";
};

?>
5 changes: 5 additions & 0 deletions phpinfo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

phpinfo();

?>
9 changes: 9 additions & 0 deletions server_variables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

echo "<pre>";

print_r ($_SERVER);

echo "</pre>";

?>
19 changes: 19 additions & 0 deletions session_variables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
session_start();

$_SESSION['browser'] = $_SERVER['HTTP_USER_AGENT'];
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['time'] = time();
echo '<pre>';
print_r($_SESSION);
echo '</pre>';

$inipath = php_ini_loaded_file();

if ($inipath) {
echo 'Loaded php.ini: ' . $inipath;
} else {
echo 'A php.ini file is not loaded';
}

?>
187 changes: 187 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
body {
background-image: url("assets/white.jpg");
}
form {
min-width: 350px;
max-width: 370px;
display: flex;
flex-direction: column;
margin: 20px auto;
align-items: center;
gap: 20px;
text-align: center;
font-size: 20px;
}

.form-input{
width: 80%;
height: 1.5rem;
margin: 0 auto;
display: block;
border-radius: 5px;
border: 1px solid grey;
}

.form-div {
display: flex;
flex-direction: column;
width: 100%;
}

#message {
font-size: 12px;
position: relative;
}

.error {
color: red;
display:none;
}

.notDisplayMessage{
display:none;
}
.border {
--x: 50%;
--y: 50%;
position: relative;
appearance: none;
padding: 1em 2em;
color: white;
outline: none;
border-radius: 20px;
border: 2px solid transparent;
background: linear-gradient(rgb(212, 109, 19), rgb(233, 230, 218)) padding-box, radial-gradient(farthest-corner at var(--x) var(--y), #0f0f0f, #db9c1e) border-box;
}

.button{
color:white;
background-color:#171716;
border-radius:10px;
height: 2rem;
border: 2px;
width: 30%;
cursor: pointer;
margin: 20px auto;
}


#navigation, #navigation h1, body, .sidebar ul{
margin:0;
padding:0;
}
.sidebar h2{
margin-bottom: 0px;
}
h2{
color: #E39653;
}
header{
background-color: rgba(203, 96, 29, 0.705);
color: #DCCAC5;
padding: 10px;
}
h1{
font-size: 70px;
text-align: center;
}
#div1{
width: 500px;
margin: 0 auto;
}
div article{
transition: box-shadow 0.4 ease;
background-color: rgba(212, 125, 32, 0.598);
margin: 1rem 0;
border-radius: 0.7rem;
color: #DCCAC5;
padding: 0.5px;
cursor: pointer;
}
div article h2, div article p{
margin: 1rem;
}
div article:hover{
box-shadow: 0 0.1rem 0.4rem rgba(200, 202, 197, 0.2);
}
footer{
background-color: rgba(203, 96, 29, 0.705);
color: #DCCAC5;
padding: 10px;
}
.symbol{
position: fixed;
top: 30px;
}
a{
color: #E29E64;
text-decoration: none;
}
.total .sidebar{
position: fixed;
left: 0;
top: 0;
width: 20vw;
height: 100vh;
background: rgba(212, 125, 32, 0.932);
}
.total .sidebar h2{
text-align: center;
line-height: 90px;
border-bottom: 1px solid #c5700f;
margin-bottom: 0px;
}
.total .sidebar ul li{
color:white;
list-style: none;
padding: 15px;
border-top: 1px solid rgba(0,0,0,01);
border-bottom: 1px solid rgba(220,202,197,01);
}
i{
margin-right: 8px;
}
.red{
position: absolute;
bottom: 10px;
width: 20vw;
text-align: center;
}
footer{
background: rgb(203, 96, 29);
}
.social{
display: flex;
position: relative;
place-content: flex-end;
}
.social a{
margin: 0px 10px;
font-size: 25px;
}
.social a:hover{
transition: 1.5s;
transform: rotate(360deg);
}
.social a i{
margin: 0 auto;
}
footer p{
text-align: center;
}
.total .sidebar ul li:hover{
padding-left: 40px;
background: grey;
cursor: pointer;
}

.logg{
color:white;
background-color:#171716;
border-radius:10px;
height: 2rem;
border: 2px;
width: 20%;
cursor: pointer;
margin: 20px auto;
}
18 changes: 18 additions & 0 deletions validate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

$user= "Ynohe";
$password= "Ynohe27";
session_start();


if($user===$_POST["user"] && $password===$_POST["password"]){

$_SESSION["user"] = $user;
echo "<script>location.href='panel.php'</script>";
}else{
header("Location: index.php?error= Did you forget your password?");

echo "<script>location.href='index.php'</script>";
}

?>