1 |
1289
|
kweitzel
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category modules
|
5 |
|
|
* @package news
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright 2004-2009, Ryan Djurovich
|
8 |
|
|
* @copyright 2009-2010, Website Baker Org. e.V.
|
9 |
|
|
* @link http://www.websitebaker2.org/
|
10 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
11 |
|
|
* @platform WebsiteBaker 2.8.x
|
12 |
|
|
* @requirements PHP 4.3.4 and higher
|
13 |
|
|
* @version $Id$
|
14 |
|
|
* @filesource $HeadURL$
|
15 |
|
|
* @lastmodified $Date$
|
16 |
|
|
*
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
require('../../config.php');
|
20 |
|
|
|
21 |
|
|
// Include WB admin wrapper script
|
22 |
|
|
$update_when_modified = true; // Tells script to update when this page was last updated
|
23 |
|
|
require(WB_PATH.'/modules/admin.php');
|
24 |
|
|
|
25 |
|
|
// This code removes any <?php tags and adds slashes
|
26 |
|
|
$friendly = array('<', '>', '?php');
|
27 |
|
|
$raw = array('<', '>', '');
|
28 |
|
|
$header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['header']));
|
29 |
|
|
$post_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_loop']));
|
30 |
|
|
$footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['footer']));
|
31 |
|
|
$post_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_header']));
|
32 |
|
|
$post_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_footer']));
|
33 |
|
|
$comments_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_header']));
|
34 |
|
|
$comments_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_loop']));
|
35 |
|
|
$comments_footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_footer']));
|
36 |
|
|
$comments_page = $admin->add_slashes(str_replace($friendly, $raw, $_POST['comments_page']));
|
37 |
|
|
$commenting = $admin->add_slashes($_POST['commenting']);
|
38 |
|
|
$posts_per_page = $admin->add_slashes($_POST['posts_per_page']);
|
39 |
|
|
$use_captcha = $admin->add_slashes($_POST['use_captcha']);
|
40 |
|
|
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) {
|
41 |
|
|
$resize = $_POST['resize'];
|
42 |
|
|
} else {
|
43 |
|
|
$resize = '';
|
44 |
|
|
}
|
45 |
|
|
|
46 |
|
|
// Update settings
|
47 |
|
|
$database->query("UPDATE ".TABLE_PREFIX."mod_news_settings SET header = '$header', post_loop = '$post_loop', footer = '$footer', posts_per_page = '$posts_per_page', post_header = '$post_header', post_footer = '$post_footer', comments_header = '$comments_header', comments_loop = '$comments_loop', comments_footer = '$comments_footer', comments_page = '$comments_page', commenting = '$commenting', resize = '$resize', use_captcha = '$use_captcha' WHERE section_id = '$section_id'");
|
48 |
|
|
|
49 |
|
|
// Check if there is a db error, otherwise say successful
|
50 |
|
|
if($database->is_error()) {
|
51 |
|
|
$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
|
52 |
|
|
} else {
|
53 |
|
|
$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
|
54 |
|
|
}
|
55 |
|
|
|
56 |
|
|
// Print admin footer
|
57 |
|
|
$admin->print_footer();
|
58 |
|
|
|
59 |
562
|
Ruebenwurz
|
?>
|