| 1 |
joko |
1.1 |
<?php |
| 2 |
|
|
/* |
| 3 |
|
|
* $Horde: turba/deleteobject.php,v 1.3.2.6 2002/03/19 01:59:25 chuck Exp $ |
| 4 |
|
|
* |
| 5 |
|
|
* Turba: Copyright 2000-2002 Charles J. Hagenbuch <chuck@horde.org> |
| 6 |
|
|
* |
| 7 |
|
|
* You should have received a copy of the GNU Public |
| 8 |
|
|
* License along with this package; if not, write to the |
| 9 |
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 10 |
|
|
* Boston, MA 02111-1307, USA. |
| 11 |
|
|
*/ |
| 12 |
|
|
|
| 13 |
|
|
define('TURBA_BASE', dirname(__FILE__)); |
| 14 |
|
|
require_once TURBA_BASE . '/lib/base.php'; |
| 15 |
|
|
require_once TURBA_BASE . '/lib/Source.php'; |
| 16 |
|
|
|
| 17 |
|
|
$source = Horde::getFormData('source'); |
| 18 |
|
|
$driver = &Turba_Source::singleton($source, $cfgSources[$source]); |
| 19 |
|
|
|
| 20 |
|
|
$key = Horde::getFormData('key'); |
| 21 |
|
|
if ($driver->removeObject($key)) { |
| 22 |
|
|
// was: go to "search.php" |
| 23 |
|
|
// header('Location: ' . Horde::url('search.php', true)); |
| 24 |
|
|
// is: go back where we came from |
| 25 |
|
|
header('Location: ' . $_SERVER['HTTP_REFERER']); |
| 26 |
|
|
} else { |
| 27 |
|
|
Horde::raiseMessage(_("There was an error deleting this object. Contact your system administrator for further help."), HORDE_ERROR); |
| 28 |
|
|
|
| 29 |
|
|
$title = _("Deletion failed"); |
| 30 |
|
|
$js_onLoad = null; |
| 31 |
|
|
include TURBA_TEMPLATES . '/common-header.inc'; |
| 32 |
|
|
include TURBA_BASE . '/menu.php'; |
| 33 |
|
|
include TURBA_BASE . '/status.php'; |
| 34 |
|
|
include TURBA_TEMPLATES . '/common-footer.inc'; |
| 35 |
|
|
} |
| 36 |
|
|
|
| 37 |
|
|
?> |