Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         pages
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, 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 5.2.2 and higher
13
 * @version         $Id: intro2.php 1457 2011-06-25 17:18:50Z Luisehahne $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/admin/pages/intro2.php $
15
 * @lastmodified    $Date: 2011-06-25 19:18:50 +0200 (Sat, 25 Jun 2011) $
16
 *
17
 */
18

    
19
// Get posted content
20
if(!isset($_POST['content'])) {
21
	header("Location: intro".PAGE_EXTENSION."");
22
	exit(0);
23
} else {
24
	$content = $_POST['content'];
25
}
26

    
27
// Create new admin object
28
require('../../config.php');
29
require_once(WB_PATH.'/framework/class.admin.php');
30
$admin = new admin('Pages', 'pages_intro');
31

    
32
$content=$admin->strip_slashes($content);
33

    
34
// Include the WB functions file
35
require_once(WB_PATH.'/framework/functions.php');
36

    
37
// Write new content
38
$filename = WB_PATH.PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION;
39
$handle = fopen($filename, 'w');
40
if(is_writable($filename)) {
41
	if(fwrite($handle, $content)) {
42
		fclose($handle);
43
		change_mode($filename, 'file');
44
		$admin->print_success($MESSAGE['PAGES']['INTRO_SAVED']);
45
	} else {
46
		fclose($handle);
47
		$admin->print_error($MESSAGE['PAGES']['INTRO_NOT_WRITABLE']);
48
	}
49
} else {
50
	$admin->print_error($MESSAGE['PAGES']['INTRO_NOT_WRITABLE']);
51
}
52

    
53
// Print admin footer
54
$admin->print_footer();
55

    
56
?>
(7-7/21)