1 |
4
|
ryan
|
<?php
|
2 |
1376
|
FrankH
|
/**
|
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$
|
13 |
2070
|
darkviper
|
* @filesource $HeadURL$
|
14 |
|
|
* @lastmodified $Date$
|
15 |
1376
|
FrankH
|
*
|
16 |
|
|
*/
|
17 |
4
|
ryan
|
|
18 |
|
|
require('../../config.php');
|
19 |
|
|
|
20 |
1457
|
Luisehahne
|
$admin_header = false;
|
21 |
|
|
// Tells script to update when this page was last updated
|
22 |
|
|
$update_when_modified = true;
|
23 |
4
|
ryan
|
// Include WB admin wrapper script
|
24 |
|
|
require(WB_PATH.'/modules/admin.php');
|
25 |
1376
|
FrankH
|
if (!$admin->checkFTAN())
|
26 |
|
|
{
|
27 |
1457
|
Luisehahne
|
$admin->print_header();
|
28 |
1376
|
FrankH
|
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
|
29 |
|
|
}
|
30 |
1457
|
Luisehahne
|
$admin->print_header();
|
31 |
1376
|
FrankH
|
|
32 |
4
|
ryan
|
// Update the mod_wrapper table with the contents
|
33 |
|
|
if(isset($_POST['url'])) {
|
34 |
656
|
thorn
|
$url = $admin->add_slashes(strip_tags($_POST['url']));
|
35 |
4
|
ryan
|
$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 |
1457
|
Luisehahne
|
$database->query($query);
|
41 |
4
|
ryan
|
}
|
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();
|