source: trunk/admin/inc/funzioni.php@ 2

Last change on this file since 2 was 2, checked in by root, 15 years ago

importo il progetto

File size: 1.4 KB
RevLine 
[2]1<?php
2
3###########################
4# FCKeditor
5###########################
6
7function js_textarea($name, $value, $config, $cols = 50, $rows = 10)
8{
9 global $editor,$ed_user;
10# $config=$ed_user;
11 # Don't waste bandwidth by loading WYSIWYG editor for crawlers
12 if ($editor == 0 or !isset($_COOKIE))
13 {
14 echo "<textarea name=\"$name\" cols=\"$cols\" rows=\"$rows\">$value</textarea>";
15 } else {
16 @include_once(INCLUDE_PATH."../../inc/FCKeditor/fckeditor.php");
17 $oFCKeditor = new FCKeditor($name) ;
18 $oFCKheight = $rows * 20;
19 $oFCKeditor->Height = "$oFCKheight";
20 $oFCKeditor->ToolbarSet = "$config" ;
21 $oFCKeditor->InstanceName = "$name" ;
22 $oFCKeditor->Value = "$value" ;
23 $oFCKeditor->Create() ;
24 }
25}
26
27
28function js_textarea_html($name, $value, $config, $cols = 50, $rows = 10)
29{
30 global $editor,$ed_user;
31# $config=$ed_user;
32
33 # Don't waste bandwidth by loading WYSIWYG editor for crawlers
34 if ($editor == 0 or !isset($_COOKIE))
35 {
36 echo "<textarea name=\"$name\" cols=\"$cols\" rows=\"$rows\">$value</textarea>";
37 } else {
38 @include_once(INCLUDE_PATH."../../inc/FCKeditor/fckeditor.php");
39 $oFCKeditor = new FCKeditor($name) ;
40 $oFCKheight = $rows * 20;
41 $oFCKeditor->Height = "$oFCKheight";
42 $oFCKeditor->ToolbarSet = "$config" ;
43 $oFCKeditor->InstanceName = "$name" ;
44 $oFCKeditor->Value = "$value" ;
45 $wysiwygHTML = $oFCKeditor->CreateHtml() ;
46 return $wysiwygHTML;
47 }
48}
49
50?>
Note: See TracBrowser for help on using the repository browser.