LEPTON CMS 7.2.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
function.display_wysiwyg_editor.php
Go to the documentation of this file.
1<?php
2
19// include secure.php to protect this file and the whole CMS!
20if(!defined("SEC_FILE")){define("SEC_FILE",'/framework/secure.php' );}
21if (defined('LEPTON_PATH')) {
22 include LEPTON_PATH.SEC_FILE;
23} else {
24 $oneback = "../";
25 $root = $oneback;
26 $level = 1;
27 while (($level < 10) && (!file_exists($root.SEC_FILE))) {
28 $root .= $oneback;
29 $level += 1;
30 }
31 if (file_exists($root.SEC_FILE)) {
32 include $root.SEC_FILE;
33 } else {
34 trigger_error(sprintf("[ <b>%s</b> ] Can't include secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
35 }
36}
37// end include secure file
38
39
53 string $name,
54 string $id,
55 string $content,
56 string $width = null,
57 string $height = null,
58 bool $prompt = false
59): string
60{
61 ob_start();
62 $result = eval('return '.WYSIWYG_EDITOR.'::show_wysiwyg_editor("'.$name.'", "'.$id.'", "'.$content.'", '.$width.', '.$height.', true);');
63 $result = ob_get_clean();
64
65 if ($prompt == true)
66 {
67 echo $result;
68 return "";
69 }
70 else
71 {
72 return $result;
73 }
74}
display_wysiwyg_editor(string $name, string $id, string $content, string $width=null, string $height=null, bool $prompt=false)