1 |
2
|
Manuela
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category admin
|
5 |
|
|
* @package pages
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright Ryan Djurovich
|
8 |
|
|
* @copyright WebsiteBaker Org. e.V.
|
9 |
|
|
* @link http://websitebaker.org/
|
10 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
11 |
|
|
* @platform WebsiteBaker 2.8.3
|
12 |
|
|
* @requirements PHP 5.3.6 and higher
|
13 |
|
|
* @version $Id$
|
14 |
|
|
* @filesource $HeadURL$
|
15 |
|
|
* @lastmodified $Date$
|
16 |
|
|
*
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
// Create new admin object
|
20 |
|
|
if ( !defined( 'WB_PATH' ) ){ require( dirname(dirname((__DIR__))).'/config.php' ); }
|
21 |
|
|
if ( !class_exists('admin', false) ) { require(WB_PATH.'/framework/class.admin.php'); }
|
22 |
|
|
$admin = new admin('Pages', 'pages_intro');
|
23 |
|
|
$content = '';
|
24 |
|
|
|
25 |
|
|
$filename = WB_PATH.PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION;
|
26 |
|
|
|
27 |
|
|
if(file_exists($filename) && filesize($filename) > 0) {
|
28 |
|
|
$content = file_get_contents( $filename ) ;
|
29 |
|
|
} else {
|
30 |
|
|
$content = file_get_contents( ADMIN_PATH.'/pages/html.php' ) ;
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
require_once(WB_PATH . '/include/editarea/wb_wrapper_edit_area.php');
|
34 |
|
|
$toolbar = 'search, fullscreen, |, undo, redo, |, select_font, syntax_selection,|,word_wrap, highlight, reset_highlight, |,charmap, |, help';
|
35 |
|
|
echo registerEditArea ('content','php',true,'both',true,true,600,450,$toolbar);
|
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 |
|
|
?>
|
40 |
|
|
<form action="intro2.php" method="post">
|
41 |
|
|
<?php print $admin->getFTAN(); ?>
|
42 |
|
|
<input type="hidden" name="page_id" value="{PAGE_ID}" />
|
43 |
|
|
<table cellpadding="0" cellspacing="0" border="0" class="form_submit">
|
44 |
|
|
<tr>
|
45 |
|
|
<td colspan="2">
|
46 |
|
|
<?php
|
47 |
|
|
show_wysiwyg_editor('content','content',$content,'100%','500px');
|
48 |
|
|
?>
|
49 |
|
|
</td>
|
50 |
|
|
</tr>
|
51 |
|
|
<tr>
|
52 |
|
|
<td class="left">
|
53 |
|
|
<input type="submit" value="<?php echo $TEXT['SAVE'];?>" class="submit" />
|
54 |
|
|
</td>
|
55 |
|
|
<td class="right">
|
56 |
|
|
<input type="button" value="<?php echo $TEXT['CANCEL'];?>" onclick="javascript: window.location = 'index.php';" class="submit" />
|
57 |
|
|
</td>
|
58 |
|
|
</tr>
|
59 |
|
|
</table>
|
60 |
|
|
|
61 |
|
|
</form>
|
62 |
|
|
<?php
|
63 |
|
|
// Print admin footer
|
64 |
|
|
$admin->print_footer();
|