old htb folders
This commit is contained in:
2023-08-29 21:53:22 +02:00
parent 62ab804867
commit 82b0759f1e
21891 changed files with 6277643 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
use app\models\User;
if(!is_auth())
{
die(redirect('/home'));
}
if(!isset($_POST['token']) or empty($_POST['token']) or $_POST['token'] != "ddac62a28254561001277727cb397baf")
{
die(redirect('/home'));
}
$user = new User;
$find = $user->find("username", $_SESSION['username']);
if($find)
{
$user->update_role($find->username, "admin");
set_session($find->username, "admin");
die(redirect('/admin'));
}