diff --git a/main/help/faq.php b/main/help/faq.php index 7a0a8ac4c9..33fe282031 100644 --- a/main/help/faq.php +++ b/main/help/faq.php @@ -1,127 +1,117 @@ - - - - - - -<?php echo get_lang('H'.$helpName); ?> - - -'') -{ - ?> - - - - -
-
-

-'; -} -?> -

- add_html_editor('faq_content',null, false); - $form -> addElement('submit','faq_submit', get_lang('Ok')); - $form -> setDefaults(array('faq_content'=>file_get_contents(api_get_path(SYS_PATH).'home/faq.html'))); - if($form -> validate()) - { - $content = $form -> getSubmitValue('faq_content'); - $fpath = api_get_path(SYS_PATH).'home/'.$faq_file; - if(is_file($fpath) && is_writeable($fpath)) - { - $fp = fopen(api_get_path(SYS_PATH).'home/'.$faq_file,'w'); - fwrite($fp, $content); - fclose($fp); - } - else - { - echo get_lang('WarningFaqFileNonWriteable').'
'; - } - echo $content; - } - else - { - $form -> display(); - } -} -else -{ - echo file_get_contents(api_get_path(SYS_PATH).'home/'.$faq_file); -} -?> -
-
- + + + + + + +<?php echo get_lang('H'.$helpName); ?> + + +'') +{ + ?> + + + + +
+
+

+'; +} +?> +

+ add_html_editor('faq_content', null, false, false, array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300')); + $form -> addElement('submit','faq_submit', get_lang('Ok')); + $form -> setDefaults(array('faq_content'=>file_get_contents(api_get_path(SYS_PATH).'home/faq.html'))); + if($form -> validate()) + { + $content = $form -> getSubmitValue('faq_content'); + $fpath = api_get_path(SYS_PATH).'home/'.$faq_file; + if(is_file($fpath) && is_writeable($fpath)) + { + $fp = fopen(api_get_path(SYS_PATH).'home/'.$faq_file,'w'); + fwrite($fp, $content); + fclose($fp); + } + else + { + echo get_lang('WarningFaqFileNonWriteable').'
'; + } + echo $content; + } + else + { + $form -> display(); + } +} +else +{ + echo file_get_contents(api_get_path(SYS_PATH).'home/'.$faq_file); +} +?> +
+
+ \ No newline at end of file