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: intro.php 1386 2011-01-16 09:56:53Z Luisehahne $
14
 * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/admin/users/save.php $
15
 * @lastmodified    $Date: 2011-01-10 13:21:47 +0100 (Mo, 10. Jan 2011) $
16
 *
17
 */
18

    
19
// Create new admin object
20
require('../../config.php');
21
require_once(WB_PATH.'/framework/class.admin.php');
22
$admin = new admin('Pages', 'pages_intro');
23

    
24
// Get page content
25
$filename = WB_PATH.PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION;
26
if(file_exists($filename)) {
27
	$handle = fopen($filename, "r");
28
	$content = fread($handle, filesize($filename));
29
	fclose($handle);
30
} else {
31
	$content = '';
32
}
33

    
34
if(!isset($_GET['wysiwyg']) OR $_GET['wysiwyg'] != 'no') {
35
	if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
36
		function show_wysiwyg_editor($name,$id,$content,$width,$height) {
37
			echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
38
		}
39
	} else {
40
		$id_list=array('content');
41
		require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
42
	}
43
}
44
?>
45

    
46

    
47
<form action="intro2.php" method="post">
48

    
49
<input type="hidden" name="page_id" value="{PAGE_ID}" />
50

    
51
<?php
52
show_wysiwyg_editor('content','content',$content,'100%','500px');
53
?>
54

    
55
<table cellpadding="0" cellspacing="0" border="0" class="form_submit">
56
<tr>
57
	<td class="left">
58
		<input type="submit" value="<?php echo $TEXT['SAVE'];?>" class="submit" />
59
	</td>
60
	<td class="right">
61
		<input type="button" value="<?php echo $TEXT['CANCEL'];?>" onclick="javascript: window.location = 'index.php';" class="submit" />
62
	</td>
63
</tr>
64
</table>
65

    
66
</form>
67
<?php
68
// Print admin footer
69
$admin->print_footer();
70

    
71
?>
(6-6/21)