Revision 1511
Added by Dietmar about 13 years ago
intro.php | ||
---|---|---|
18 | 18 |
|
19 | 19 |
// Create new admin object |
20 | 20 |
require('../../config.php'); |
21 |
|
|
21 | 22 |
require_once(WB_PATH.'/framework/class.admin.php'); |
22 | 23 |
$admin = new admin('Pages', 'pages_intro'); |
23 | 24 |
$content = ''; |
25 |
|
|
24 | 26 |
$filename = WB_PATH.PAGES_DIRECTORY.'/intro'.PAGE_EXTENSION; |
27 |
|
|
25 | 28 |
if(file_exists($filename) && filesize($filename) > 0) { |
26 |
$content = file_get_contents( $filename ) ; |
|
29 |
$content = file_get_contents( $filename ) ; |
|
30 |
} else { |
|
31 |
$content = file_get_contents( ADMIN_PATH.'/pages/html.php' ) ; |
|
27 | 32 |
} |
28 | 33 |
|
29 |
|
|
30 |
if(!isset($_GET['wysiwyg']) OR $_GET['wysiwyg'] != 'no') { |
|
31 |
if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) { |
|
32 |
function show_wysiwyg_editor($name,$id,$content,$width,$height) { |
|
33 |
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>'; |
|
34 |
} |
|
35 |
} else { |
|
36 |
$id_list=array('content'); |
|
37 |
require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php'); |
|
38 |
} |
|
34 |
require_once(WB_PATH . '/include/editarea/wb_wrapper_edit_area.php'); |
|
35 |
$toolbar = 'search, fullscreen, |, undo, redo, |, select_font, syntax_selection,|,word_wrap, highlight, reset_highlight, |,charmap, |, help'; |
|
36 |
echo registerEditArea ('content','php',true,'both',true,true,600,450,$toolbar); |
|
37 |
function show_wysiwyg_editor($name,$id,$content,$width,$height) { |
|
38 |
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>'; |
|
39 | 39 |
} |
40 | 40 |
?> |
41 |
|
|
42 |
|
|
43 | 41 |
<form action="intro2.php" method="post"> |
44 | 42 |
<?php print $admin->getFTAN(); ?> |
45 | 43 |
<input type="hidden" name="page_id" value="{PAGE_ID}" /> |
46 |
|
|
47 |
<?php |
|
48 |
show_wysiwyg_editor('content','content',$content,'100%','500px'); |
|
49 |
?> |
|
50 |
|
|
51 | 44 |
<table cellpadding="0" cellspacing="0" border="0" class="form_submit"> |
52 |
<tr> |
|
53 |
<td class="left"> |
|
54 |
<input type="submit" value="<?php echo $TEXT['SAVE'];?>" class="submit" /> |
|
55 |
</td> |
|
56 |
<td class="right"> |
|
57 |
<input type="button" value="<?php echo $TEXT['CANCEL'];?>" onclick="javascript: window.location = 'index.php';" class="submit" /> |
|
58 |
</td> |
|
59 |
</tr> |
|
45 |
<tr> |
|
46 |
<td colspan="2"> |
|
47 |
<?php |
|
48 |
show_wysiwyg_editor('content','content',$content,'100%','500px'); |
|
49 |
?> |
|
50 |
</td> |
|
51 |
</tr> |
|
52 |
<tr> |
|
53 |
<td class="left"> |
|
54 |
<input type="submit" value="<?php echo $TEXT['SAVE'];?>" class="submit" /> |
|
55 |
</td> |
|
56 |
<td class="right"> |
|
57 |
<input type="button" value="<?php echo $TEXT['CANCEL'];?>" onclick="javascript: window.location = 'index.php';" class="submit" /> |
|
58 |
</td> |
|
59 |
</tr> |
|
60 | 60 |
</table> |
61 | 61 |
|
62 | 62 |
</form> |
63 | 63 |
<?php |
64 | 64 |
// Print admin footer |
65 | 65 |
$admin->print_footer(); |
66 |
|
|
67 |
?> |
Also available in: Unified diff
fixed strict notice warning in class.wb
change editor for intropage to editarea
add missing slash in themes