egroupware_official/admin/deleteaccount.php

69 lines
2.4 KiB
PHP
Raw Normal View History

2000-08-18 05:24:22 +02:00
<?php
/**************************************************************************\
* phpGroupWare - administration *
* http://www.phpgroupware.org *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
2000-09-26 00:27:40 +02:00
if ($confirm || ! $account_id) {
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
2000-08-18 05:24:22 +02:00
}
$phpgw_info["flags"]["currentapp"] = "admin";
2000-09-25 23:13:52 +02:00
$phpgw_info["flags"]["disable_message_class"] = True;
$phpgw_info["flags"]["disable_send_class"] = True;
2000-08-18 05:24:22 +02:00
include("../header.inc.php");
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
. $phpgw_info["server"]["auth_type"] . ".inc.php");
2000-08-18 05:24:22 +02:00
// Make sure they are not attempting to delete there own account.
// If they are, they should not reach this point anyway.
2000-09-26 00:27:40 +02:00
if ($phpgw_info["user"]["account_id"] == $account_id) {
2000-08-18 05:24:22 +02:00
Header("Location: " . $phpgw->link("accounts.php"));
exit;
}
2000-09-26 00:27:40 +02:00
if (($account_id) && (! $confirm)) {
// the account can have special chars/white spaces, if it is a ldap dn
$account_id = rawurlencode($account_id);
2000-08-18 05:24:22 +02:00
?>
<center>
<table border=0 with=65%>
<tr colspan=2>
<td align=center>
2000-09-07 22:49:55 +02:00
<?php echo lang("Are you sure you want to delete this account ?"); ?>
2000-08-18 05:24:22 +02:00
<td>
</tr>
<tr colspan=2>
<td align=center>
2000-09-07 22:49:55 +02:00
<?php echo lang("All records and account information will be lost!"); ?>
2000-08-18 05:24:22 +02:00
</td>
</tr>
<tr>
<td>
2000-09-07 22:49:55 +02:00
<a href="<?php echo $phpgw->link("accounts.php") . "\">" . lang("No"); ?></a>
2000-08-18 05:24:22 +02:00
</td>
<td>
2000-09-26 00:27:40 +02:00
<a href="<?php echo $phpgw->link("deleteaccount.php","account_id=$account_id&confirm=true") . "\">" . lang("Yes"); ?></a>
2000-08-18 05:24:22 +02:00
</td>
</tr>
</table>
</center>
2000-09-28 01:17:36 +02:00
<?php
$phpgw->common->phpgw_footer();
2000-08-18 05:24:22 +02:00
}
if ($confirm) {
$cd = account_delete($account_id);
2000-08-18 05:24:22 +02:00
Header("Location: " . $phpgw->link("accounts.php","cd=$cd"));
}
account_close();
?>