mail pages completed

This commit is contained in:
Serghey Rodin 2012-06-19 18:23:14 +03:00
commit 5d0c09e363
44 changed files with 253 additions and 955 deletions

View file

@ -1,48 +1,16 @@
<?php
// Init
//error_reporting(NULL);
error_reporting(NULL);
ob_start();
session_start();
$TAB = 'USER';
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Header
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
// Panel
top_panel($user,$TAB);
// Are you admin?
if ($_SESSION['user'] == 'admin') {
// Cancel
if (!empty($_POST['back'])) {
header("Location: /list/user/");
}
// Ok
if (!empty($_GET['user'])) {
$v_username = escapeshellarg($_GET['user']);
exec (VESTA_CMD."v_delete_user ".$v_username, $output, $return_var);
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = 'Error: vesta did not return any output.';
$_SESSION['error_msg'] = $error;
} else {
$_SESSION['ok_msg'] = "OK: user <b>".$_GET[user]."</b> has been deleted.";
unset($v_lname);
}
unset($output);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/menu_delete_user.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/delete_user.html');
unset($_SESSION['error_msg']);
unset($_SESSION['ok_msg']);
} else {
header("Location: /list/user/");
}
}
// Footer
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
header("Location: /list/user/");