-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlock.php
More file actions
38 lines (38 loc) · 1.24 KB
/
Copy pathlock.php
File metadata and controls
38 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!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 rel="stylesheet" href="public/style.css">
<link rel="stylesheet" href="public/bootstrap-icons.css">
<title>Folders Lock</title>
</head>
<body class="<?= $_COOKIE['theme'] ?? "dark" ?>" style="font-family: <?= $_COOKIE['font'] ?? "system-ui" ?>">
<div class="page">
<?php
include "./header.php";
include "./sidebar.php";
?>
<div class="content">
<div class="container">
<h1><i class="bi bi-lock-fill"></i>Lock Folders</h1>
<form action="" method="post">
<div class="setting-box">
<div class="options">
<input type="text" class="lock-input" name="lock_token"/>
</div>
<input type="submit" class="btn" value="add" name='add'>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] === "POST") {
if (isset($_POST['add'])) {
$lock = $_POST["lock_token"];
$hashed_lock = sha1("$lock");
setcookie("lp", $hashed_lock, time() + (86400 * 30), "/");
}
}
?>
</form>
</div>
</div>