Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        modules
5
 * @package         wrapper
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2011, Website Baker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version      	$Id: save.php 2070 2014-01-03 01:21:42Z darkviper $
13
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/wrapper/save.php $
14
 * @lastmodified    $Date: 2014-01-03 02:21:42 +0100 (Fri, 03 Jan 2014) $
15
 *
16
 */
17

    
18
require('../../config.php');
19

    
20
$admin_header = false;
21
// Tells script to update when this page was last updated
22
$update_when_modified = true;
23
// Include WB admin wrapper script
24
require(WB_PATH.'/modules/admin.php');
25
if (!$admin->checkFTAN())
26
{
27
	$admin->print_header();
28
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
29
}
30
$admin->print_header();
31

    
32
// Update the mod_wrapper table with the contents
33
if(isset($_POST['url'])) {
34
	$url = $admin->add_slashes(strip_tags($_POST['url']));
35
	$height = $_POST['height'];
36
	if(!is_numeric($height)) {
37
		$height = 400;
38
	}
39
	$query = "UPDATE ".TABLE_PREFIX."mod_wrapper SET url = '$url', height = '$height' WHERE section_id = '$section_id'";
40
	$database->query($query);
41
}
42

    
43
// Check if there is a database error, otherwise say successful
44
if($database->is_error()) {
45
	$admin->print_error($database->get_error(), $js_back);
46
} else {
47
	$admin->print_success($MESSAGE['PAGES']['SAVED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
48
}
49

    
50
// Print admin footer
51
$admin->print_footer();
(8-8/10)