server()) {
echo("\n");
exit;
}
// print standard header
echo $_SESSION['header'];
echo ("\n");
echo ("
" . _("Delete User Profile") . "\n");
echo "\n";
echo ("\n\n
\n");
// check if admin has submited delete operation
if ($_POST['submit']) {
// delete user profile
if ($_POST['type'] == "user") {
if (!delUserProfile($_POST['del'])) {
StatusMessage("ERROR", "", _("Unable to delete profile!") . " " . $_POST['del']);
}
else StatusMessage("INFO", "", _("Deleted profile:") . " " . $_POST['del']);
}
// delete host profile
elseif ($_POST['type'] == "host") {
if (!delHostProfile($_POST['del'])) {
StatusMessage("ERROR", "", _("Unable to delete profile!") . " " . $_POST['del']);
}
else StatusMessage("INFO", "", _("Deleted profile:") . " " . $_POST['del']);
}
// wrong profile type
else {
StatusMessage("ERROR", "", _("Wrong or missing type!") . " " . $_POST['type']);
}
echo ("
" . _("Back to Profile Editor") . "");
echo ("\n");
exit;
}
// check if admin has aborted delete operation
if ($_POST['abort']) {
StatusMessage("INFO", "", _("Delete operation canceled."));
echo ("
" . _("Back to Profile Editor") . "");
echo ("