2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - addressbook *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* Written by Joseph Engo <jengo@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$ */
|
|
|
|
|
|
|
|
if ($confirm) {
|
2000-09-05 20:36:13 +02:00
|
|
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
2000-08-18 05:24:22 +02:00
|
|
|
}
|
|
|
|
|
2000-09-05 20:36:13 +02:00
|
|
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
2000-08-18 05:24:22 +02:00
|
|
|
include("../header.inc.php");
|
|
|
|
|
2000-10-04 19:49:36 +02:00
|
|
|
if (! $ab_id) {
|
2000-08-18 05:24:22 +02:00
|
|
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($confirm != "true") {
|
2000-10-04 19:49:36 +02:00
|
|
|
$phpgw->db->query("select ab_owner from addressbook where ab_id='$ab_id'");
|
2000-08-18 05:24:22 +02:00
|
|
|
$phpgw->db->next_record();
|
|
|
|
|
2000-10-04 19:49:36 +02:00
|
|
|
if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["userid"])
|
2000-08-18 05:24:22 +02:00
|
|
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
|
|
|
|
|
|
|
?>
|
|
|
|
<body bgcolor=FFFFFF aLink=0000EE link=0000EE vlink=0000EE>
|
2000-09-07 22:49:55 +02:00
|
|
|
<center><?php echo lang("Are you sure you want to delete this entry ?"); ?><center>
|
2000-08-18 05:24:22 +02:00
|
|
|
<br><center><a href="<?php
|
2000-10-04 19:49:36 +02:00
|
|
|
echo $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
|
2000-09-07 22:49:55 +02:00
|
|
|
?>"><?php echo lang("NO"); ?></a>
|
2000-10-04 19:49:36 +02:00
|
|
|
<a href="<?php echo $phpgw->link("delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
|
2000-09-07 22:49:55 +02:00
|
|
|
?>"><?php echo lang("YES"); ?></a><center>
|
2000-08-18 05:24:22 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
//exit;
|
|
|
|
} else {
|
|
|
|
|
2000-10-04 19:49:36 +02:00
|
|
|
$phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["userid"]
|
|
|
|
. "' and ab_id='$ab_id'");
|
2000-08-18 05:24:22 +02:00
|
|
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
|
|
|
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
|
|
|
}
|
2000-09-05 05:14:08 +02:00
|
|
|
?>
|
2000-08-18 05:24:22 +02:00
|
|
|
|