Project

General

Profile

1 4 ryan
<?php
2 1386 Luisehahne
/**
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$
14 1457 Luisehahne
 * @filesource		$HeadURL$
15
 * @lastmodified    $Date$
16 1386 Luisehahne
 *
17
 */
18 4 ryan
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 1470 Luisehahne
$content = '';
24
if(file_exists($filename) && filesize($filename) > 0) {
25
$content = file_get_contents( $filename ) ;
26 4 ryan
}
27
28 1470 Luisehahne
29 4 ryan
if(!isset($_GET['wysiwyg']) OR $_GET['wysiwyg'] != 'no') {
30 69 stefan
	if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
31
		function show_wysiwyg_editor($name,$id,$content,$width,$height) {
32
			echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
33
		}
34 44 stefan
	} else {
35
		$id_list=array('content');
36
		require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
37
	}
38
}
39
?>
40
41
42
<form action="intro2.php" method="post">
43 1470 Luisehahne
<?php print $admin->getFTAN(); ?>
44 44 stefan
<input type="hidden" name="page_id" value="{PAGE_ID}" />
45
46
<?php
47
show_wysiwyg_editor('content','content',$content,'100%','500px');
48
?>
49
50 944 Ruebenwurz
<table cellpadding="0" cellspacing="0" border="0" class="form_submit">
51 44 stefan
<tr>
52 944 Ruebenwurz
	<td class="left">
53
		<input type="submit" value="<?php echo $TEXT['SAVE'];?>" class="submit" />
54 44 stefan
	</td>
55 944 Ruebenwurz
	<td class="right">
56
		<input type="button" value="<?php echo $TEXT['CANCEL'];?>" onclick="javascript: window.location = 'index.php';" class="submit" />
57 44 stefan
	</td>
58
</tr>
59
</table>
60
61
</form>
62
<?php
63 4 ryan
// Print admin footer
64
$admin->print_footer();
65
66 239 stefan
?>