Project

General

Profile

1 1296 Luisehahne
<?php
2
/**
3
 *
4
 * @category        module
5
 * @package         droplet
6
 * @author          Ruud Eisinga (Ruud) John (PCWacht)
7
 * @author          WebsiteBaker Project
8
 * @copyright       2004-2009, Ryan Djurovich
9 1349 Luisehahne
 * @copyright       2009-2011, Website Baker Org. e.V.
10 1296 Luisehahne
 * @link			http://www.websitebaker2.org/
11
 * @license         http://www.gnu.org/licenses/gpl.html
12
 * @platform        WebsiteBaker 2.8.x
13 1374 Luisehahne
 * @requirements    PHP 5.2.2 and higher
14 1296 Luisehahne
 * @version         $Id$
15
 * @filesource		$HeadURL$
16
 * @lastmodified    $Date$
17
 *
18
 */
19
20
require('../../config.php');
21
22
// Get id
23
if(!isset($_GET['droplet_id']) OR !is_numeric($_GET['droplet_id'])) {
24
	header("Location: ".ADMIN_URL."/pages/index.php");
25
} else {
26
	$droplet_id = $_GET['droplet_id'];
27
}
28
29
// Include WB admin wrapper script
30
require_once(WB_PATH.'/framework/class.admin.php');
31
require_once(WB_PATH.'/framework/functions.php');
32
33
// check website baker platform (with WB 2.7, Admin-Tools were moved out of settings dialogue)
34
if(file_exists(ADMIN_PATH .'/admintools/tool.php')) {
35
	$admintool_link = ADMIN_URL .'/admintools/index.php';
36
	$module_edit_link = ADMIN_URL .'/admintools/tool.php?tool=droplets';
37
	$admin = new admin('admintools', 'admintools');
38
} else {
39
	$admintool_link = ADMIN_URL .'/settings/index.php?advanced=yes#administration_tools"';
40
	$module_edit_link = ADMIN_URL .'/settings/tool.php?tool=droplets';
41
	$admin = new admin('Settings', 'settings_advanced');
42
}
43
44
// Delete droplet
45
$database->query("DELETE FROM ".TABLE_PREFIX."mod_droplets WHERE id = '$droplet_id' LIMIT 1");
46
47
// Check if there is a db error, otherwise say successful
48
if($database->is_error()) {
49
	$admin->print_error($database->get_error(), WB_URL.'/modules/droplets/modify_droplet.php?droplet_id='.$droplet_id);
50
} else {
51
    $admin->print_success($TEXT['SUCCESS'], $module_edit_link);
52
}
53
54
// Print admin footer
55
$admin->print_footer();
56
57 989 aldus
?>