Split HTML head, PHP, added searching tags
This commit is contained in:
parent
477efe8486
commit
340f500206
17 changed files with 262 additions and 216 deletions
18
routes/settings.php
Normal file
18
routes/settings.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
require __DIR__ . "/../helpers/settings_elements.php";
|
||||
use Steampixel\Route;
|
||||
|
||||
Route::add("/settings", function () use ($proxy_elements) {
|
||||
$latte = getLatte();
|
||||
$latte->render(getView('settings'), ["proxy_elements" => $proxy_elements]);
|
||||
});
|
||||
|
||||
Route::add("/settings", function () use ($proxy_elements) {
|
||||
if (in_array($proxy_elements, $_POST)) {
|
||||
foreach ($proxy_elements as $proxy_element) {
|
||||
setcookie($proxy_element, $_POST[$proxy_element], time()+60*60*24*30, '/', '', true, true);
|
||||
}
|
||||
}
|
||||
http_response_code(302);
|
||||
header('Location: ./home');
|
||||
}, 'POST');
|
||||
Loading…
Add table
Add a link
Reference in a new issue