- Joined
- Apr 5, 2021
- Messages
- 1,730
- Awards
- 5
Offline
will look to add this palUse a pin to view the webpage, yeah a simple php script added to the html page should work,
Before this amazing panel / appstore i was working on a web page to use in downloader which i added a pin to.
So this would be your index page:
<?php
session_start();
echo isset($_SESSION['login']);
if(isset($_SESSION['login'])) {
header('LOCATION:admin.php'); die();
}
?>
<!DOCTYPE html>
<html>
<style>
h1 {text-align: center;}
p {text-align: center;}
div {text-align: center;}
</style>
<head>
<meta http-equiv='content-type' content='text/html;charset=utf-8' />
<title>App Store</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h3 class="text-center">App Store Login</h3>
<?php
if(isset($_POST['submit'])){
$username = $_POST['username'];
if($username === '5678'){
$_SESSION['login'] = true; header('LOCATION:admin.php'); die();
} {
echo "<div class='alert alert-danger'>Pin Code Incorrect, Please contact an Admin.</div>";
}
}
?>
<form action="" method="post">
<div class="form-group" "text-center">
<label for="username">Please Enter Pin Code</label>
<input type="number" class="form-control" id="username" name="username" maxlength="4" width:150px required>
</div>
<button type="submit" name="submit" class="btn btn-default">Login</button>
</form>
</div>
</body>
</html>
Line 5: put the main page you want to re-direct to after putting pin in
Line 28: Enter the desired pin / text you want
Line 29: Enter the main re-direct page again, same as line 5
Hopefully this helps, i hasn't finished it but it did work. I know FTG is much better than me with php, a while ago i created something which he amended the login and added password hashing to make it more secure.