mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
UI update
This commit is contained in:
parent
0f7110b0e7
commit
527e4a9a62
139 changed files with 2046 additions and 124 deletions
|
@ -16,6 +16,12 @@ if ($_SESSION['user'] != 'admin') {
|
|||
// Check POST request
|
||||
if (!empty($_POST['ok'])) {
|
||||
|
||||
// Check token
|
||||
if ((!isset($_POST['token'])) || ($_SESSION['token'] != $_POST['token'])) {
|
||||
header('location: /login/');
|
||||
exit();
|
||||
}
|
||||
|
||||
// Check empty fields
|
||||
if (empty($_POST['v_username'])) $errors[] = __('user');
|
||||
if (empty($_POST['v_password'])) $errors[] = __('password');
|
||||
|
@ -93,8 +99,8 @@ if (!empty($_POST['ok'])) {
|
|||
|
||||
// Flush field values on success
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = __('USER_CREATED_OK',$_POST['v_username'],$_POST['v_username']);
|
||||
$_SESSION['ok_msg'] .= " / <a href=/login/?loginas=".$_POST['v_username'].">" . __('login as') ." ".$_POST['v_username']. "</a>";
|
||||
$_SESSION['ok_msg'] = __('USER_CREATED_OK',htmlentities($_POST['v_username']),htmlentities($_POST['v_username']));
|
||||
$_SESSION['ok_msg'] .= " / <a href=/login/?loginas=".htmlentities($_POST['v_username']).">" . __('login as') ." ".htmlentities($_POST['v_username']). "</a>";
|
||||
unset($v_username);
|
||||
unset($v_password);
|
||||
unset($v_email);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue