Files
VestaCP/web/unsuspend/user/index.php

36 lines
718 B
PHP
Raw Normal View History

2013-01-19 23:57:58 +04:00
<?php
// Init
error_reporting(NULL);
ob_start();
session_start();
$TAB = 'USER';
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
2015-06-03 02:31:03 +03:00
// Check token
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
header('location: /login/');
exit();
2015-06-03 02:31:03 +03:00
}
2014-10-05 14:40:30 +03:00
// Check user
if ($_SESSION['user'] != 'admin') {
header("Location: /list/user");
exit;
}
if (!empty($_GET['user'])) {
$v_username = escapeshellarg($_GET['user']);
exec (VESTA_CMD."v-unsuspend-user ".$v_username, $output, $return_var);
2013-01-19 23:57:58 +04:00
}
check_return_code($return_var,$output);
unset($output);
2013-01-19 23:57:58 +04:00
$back=getenv("HTTP_REFERER");
2013-01-19 23:57:58 +04:00
if (!empty($back)) {
header("Location: ".$back);
2013-01-19 23:57:58 +04:00
exit;
}
2014-10-05 14:40:30 +03:00
2013-01-19 23:57:58 +04:00
header("Location: /list/user/");
exit;