lollipop

A PHP-framework
Log | Files | Refs

commit 8c4fc7abb809e282def7b039e1d4586ea77395a2
parent f5946c0dcedb7330fc3e283d0cf425bba734f536
Author: MoiBaguette <[email protected]>
Date:   Wed, 21 Jun 2023 02:42:38 +0200

new login page

Diffstat:
Atest.php | 12++++++++++++
Aviews/css/input.css | 35+++++++++++++++++++++++++++++++++++
Aviews/css/login.css | 47+++++++++++++++++++++++++++++++++++++++++++++++
Mviews/login.html | 68+++++++++++++++++++++++++++-----------------------------------------
Aviews/post_user.html | 0
5 files changed, 121 insertions(+), 41 deletions(-)

diff --git a/test.php b/test.php @@ -0,0 +1,11 @@ +<?php + + +var_dump(str_split(" !include \" logic/user/add_get.php \"; +!eval database_permissions ")); +include "logic/user/add_get.php"; +echo call(); +function call():string{ + $expr = "database_permissions()"; + return eval("return ($expr);"); +} +\ No newline at end of file diff --git a/views/css/input.css b/views/css/input.css @@ -0,0 +1,35 @@ +.form-title{ + width: 100%; + text-align: center; +} + +h2{ + font-size: 25px; +} + +input[type=text], input[type=password]{ + width: 100%; + padding: 6px 12px; + margin: 8px 0; + border-radius: 4px; + border: 3px solid #ccc; + outline: none; +} + +input[type=password]:focus, input[type=text]:focus{ + border: 3px solid #555; +} + +input[type=button], input[type=submit], input[type=reset]{ + width: 80%; + margin-left:10%; + margin-top:5px; + padding: 4px 8px; +} + +.form-response{ + width: 100%; + text-align: center; + margin-bottom: 5px; +} + diff --git a/views/css/login.css b/views/css/login.css @@ -0,0 +1,47 @@ +* { + box-sizing: border-box; + font-family: Verdana,sans-serif; + font-size: 15px; + line-height: 1.5; + +} + +body{ + padding: 0; + margin: 0; + background: #1abc9c; +} + +.header{ + padding: 40px; + background: #1abc9c; + text-align: center; +} + +h1{ + color: white; + font-size: 50px; +} + +.flex-row{ + display: flex; + align-items: stretch; +} + +.flex-middle{ + margin:1em; + padding: 25px; + flex-grow: 8; + max-width:350px; + background-color: #f1f1f1; + border-radius: 35px; +} + +.flex-side{ + flex-grow: 1; +} + +.form-label{ + position: center; +} + diff --git a/views/login.html b/views/login.html @@ -1,46 +1,32 @@ <!DOCTYPE html> <html> -<head> - <title>Login Page</title> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" - integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> -</head> -<body> - <div class="container mx-auto text-center"> - <div class="row"> - <div class="col-md-12 title"> - <h1>Welcome to Lollipop</h1> - <h4>Please log in</h4> - </div> - </div> - </div> - <div class="container mt-5"> - <div class="row justify-content-center"> - <div class="col-md-6"> - <div class="card"> - <div class="card-header">Login</div> - <div class="card-body"> - <form method="POST" action="/login"> - <div class="form-group"> - <label for="email">Email:</label> - <input type="email" class="form-control" id="email" name="email" - placeholder="Enter email"> - </div> - <div class="form-group"> - <label for="pwd">pwd:</label> - <input type="pwd" class="form-control" id="pwd" name="pwd" - placeholder="Enter pwd"> - </div> - <button type="submit" name='login_btn' class="btn btn-primary">Login</button> - </form> - </div> - <div class="row justify-content-center"> - {{$msg}} - </div> - </div> - </div> + <head> + <title>Login Page</title> + <link rel="stylesheet" href="css/login.css"> + <link rel="stylesheet" href="css/input.css"> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + </head> + <body> + <div class="header"> + <h1>Lollipop</h1> </div> - </div> -</body> + <div class="flex-row"> + <div class="flex-side"></div> + + <div class="flex-middle"> + <div class="form-title"><h2>Enter credentials:</h1></div> + <form method="POST" action="/login"> + <input type="text" name="credentials" placeholder="{{$credential_type}}"> + + <input type="password" name="password" placeholder="Password"> + + <div class="form-response"><p style="color:red;">{{$response}}</p></div> + + <input type="submit" value="Login"> + </form> + </div> + <div class="flex-side"></div> + </div> + </body> </html> \ No newline at end of file diff --git a/views/post_user.html b/views/post_user.html