/wp-content/plugins/mailz/lists/admin/fckphplist.php
PHP | 1104 lines | 775 code | 190 blank | 139 comment | 41 complexity | b6ca00a8030df7fbf529f82f3a437522 MD5 | raw file
1<?php
2require_once dirname(__FILE__).'/accesscheck.php';
3
4if ($_GET["action"] == "js") {
5 ob_end_clean();
6 $req = Sql_query("select name from {$tables["attribute"]} where type in ('textline','select') order by listorder");
7 $attnames = ';preferences url;unsubscribe url';
8 $attcodes = ';[PREFERENCES];[UNSUBSCRIBE]';
9 while ($row = Sql_Fetch_Row($req)) {
10 $attnames .= ';'.strtolower(substr($row[0],0,15));
11 $attcodes .= ';['.strtoupper($row[0]).']';
12 }
13
14 $imgdir = getenv("DOCUMENT_ROOT").$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
15 $enable_image_upload = is_dir($imgdir) && is_writeable ($imgdir) ? 'true':'false';
16
17 $smileypath = $_SERVER["DOCUMENT_ROOT"].$GLOBALS["pageroot"].'/images/smiley';
18 $smileyextensions = array('gif');
19 $smileys = '';
20 if ($dir = opendir($smileypath)) {
21 while (false !== ($file = readdir($dir)))
22 {
23 list($fname,$ext) = explode(".",$file);
24 if (in_array($ext,$smileyextensions)) {
25 $smileys .= '"'.$file.'",';
26 }
27 }
28 }
29 $smileys = substr($smileys,0,-1);
30
31?>
32oTB_Items.Attribute = new TBCombo( "Attributes" , "doAttribute(this)" , 'Attribute' , '<?php echo $attnames?>', '<?php echo $attcodes?>') ;
33
34function doAttribute(combo)
35{
36 if (combo.value != null && combo.value != "")
37 insertHtml(combo.value);
38 SetFocus();
39}
40
41config.BasePath = document.location.protocol + '//' + document.location.host +
42 document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1) ;
43config.EditorAreaCSS = config.BasePath + 'css/fck_editorarea.css' ;
44config.BaseUrl = document.location.protocol + '//' + document.location.host + '/' ;
45 config.EnableXHTML = false ;
46config.StartupShowBorders = false ;
47config.StartupShowDetails = false ;
48config.ForcePasteAsPlainText = false ;
49config.AutoDetectPasteFromWord = true ;
50config.UseBROnCarriageReturn = true ;
51config.TabSpaces = 4 ;
52config.AutoDetectLanguage = true ;
53config.DefaultLanguage = "en" ;
54config.SpellCheckerDownloadUrl = "http://www.rochen.com/ieSpellSetup201325.exe" ;
55config.ToolbarImagesPath = config.BasePath + "images/toolbar/" ;
56config.ToolbarSets["Default"] = [
57 ['EditSource','-','Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','Find','-','Undo','Redo','-','SelectAll','RemoveFormat','-','Link','RemoveLink','-','Image','Table','Rule','SpecialChar','Smiley','-','About'] ,
58 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','InsertOrderedList','InsertUnorderedList','-','Outdent','Indent','-','ShowTableBorders','ShowDetails','-','Zoom'] ,
59 ['Attribute','-','FontFormat','-','Font','-','FontSize','-','TextColor','BGColor']
60] ;
61
62// ['FontStyle','-','FontFormat','-','Font','-','Attribute','-','FontSize','-','TextColor','BGColor']
63config.StyleNames = ';Main Header;Blue Title;Centered Title' ;
64config.StyleValues = ';MainHeader;BlueTitle;CenteredTitle' ;
65config.ToolbarFontNames = ';Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
66config.LinkShowTargets = true ;
67config.LinkTargets = '_blank;_parent;_self;_top' ;
68config.LinkDefaultTarget = '_blank' ;
69config.ImageBrowser = <?php echo $enable_image_upload?> ;
70config.ImageBrowserURL = config.BasePath + "../?page=fckphplist&action=browseimage" ;
71config.ImageBrowserWindowWidth = 600 ;
72config.ImageBrowserWindowHeight = 480 ;
73
74config.ImageUpload = <?php echo $enable_image_upload?> ;
75// Page that effectivelly upload the image.
76config.ImageUploadURL = config.BasePath + "../?page=fckphplist&action=uploadimage" ;
77config.ImageUploadWindowWidth = 600 ;
78config.ImageUploadWindowHeight = 480 ;
79config.ImageUploadAllowedExtensions = ".gif .jpg .jpeg .png" ;
80
81config.LinkBrowser = false ;
82config.LinkBrowserURL = config.BasePath + "../?page=fckphplist&action=browsefile" ;
83config.LinkBrowserWindowWidth = 400 ;
84config.LinkBrowserWindowHeight = 250 ;
85
86config.LinkUpload = false ;
87config.LinkUploadURL = config.BasePath + "../?page=fckphplist&action=uploadfile" ;
88
89//config.SmileyPath = config.BasePath + "images/smiley/fun/" ;
90config.SmileyPath = document.location.protocol + '//' + document.location.host +'<?php echo $GLOBALS["pageroot"].'/images/smiley/'?>'
91
92config.SmileyImages = [<?php echo $smileys?>] ;
93config.SmileyColumns = 8 ;
94config.SmileyWindowWidth = 800 ;
95config.SmileyWindowHeight = 600 ;
96
97<?php exit;
98} elseif ($_GET["action"] == "browseimage") {
99/*
100 * FCKeditor - The text editor for internet
101 * Copyright (C) 2003 Frederico Caldeira Knabben
102 *
103 * Licensed under the terms of the GNU Lesser General Public License
104 * (http://www.opensource.org/licenses/lgpl-license.php)
105 *
106 * For further information go to http://www.fredck.com/FCKeditor/
107 * or contact fckeditor@fredck.com.
108 *
109 * browse.php: Browse function.
110 *
111 * Authors:
112 * Frederic TYNDIUK (http://www.ftls.org/ - tyndiuk[at]ftls.org)
113 */
114
115// Init var :
116
117 $IMAGES_BASE_URL = 'http://'.$_SERVER["SERVER_NAME"].$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
118 $IMAGES_BASE_DIR = getenv("DOCUMENT_ROOT").$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
119
120// End int var
121
122// Thanks : php dot net at phor dot net
123function walk_dir($path) {
124 if ($dir = opendir($path)) {
125 while (false !== ($file = readdir($dir)))
126 {
127 if ($file[0]==".") continue;
128 if (is_dir($path."/".$file))
129 $retval = array_merge($retval,walk_dir($path."/".$file));
130 else if (is_file($path."/".$file))
131 $retval[]=$path."/".$file;
132 }
133 closedir($dir);
134 }
135 return $retval;
136}
137
138function CheckImgExt($filename) {
139 $img_exts = array("gif","jpg", "jpeg","png");
140 foreach($img_exts as $this_ext) {
141 if (preg_match("/\.$this_ext$/", $filename)) {
142 return TRUE;
143 }
144 }
145 return FALSE;
146}
147$files = array();
148foreach (walk_dir($IMAGES_BASE_DIR) as $file) {
149 $file = preg_replace("#//+#", '/', $file);
150 $IMAGES_BASE_DIR = preg_replace("#//+#", '/', $IMAGES_BASE_DIR);
151 $file = preg_replace("#$IMAGES_BASE_DIR#", '', $file);
152 if (CheckImgExt($file)) {
153 $files[] = $file; //adding filenames to array
154 }
155}
156
157sort($files); //sorting array
158
159// generating $html_img_lst
160foreach ($files as $file) {
161 $html_img_lst .= "<a href=\"javascript:getImage('$file');\">$file</a><br>\n";
162}
163ob_end_clean();
164?>
165
166<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
167<HTML>
168 <HEAD>
169 <TITLE>Image Browser</TITLE>
170 <LINK rel="stylesheet" type="text/css" href="./FCKeditor/css/fck_dialog.css">
171 <SCRIPT language="javascript">
172var sImagesPath = "<?php echo $IMAGES_BASE_URL; ?>";
173var sActiveImage = "" ;
174
175function getImage(imageName)
176{
177 sActiveImage = sImagesPath + imageName ;
178 imgPreview.src = sActiveImage ;
179}
180
181function ok()
182{
183 window.setImage(sActiveImage) ;
184 window.close() ;
185}
186 </SCRIPT>
187 </HEAD>
188 <BODY bottommargin="5" leftmargin="5" topmargin="5" rightmargin="5">
189<TABLE cellspacing="1" cellpadding="1" border="0" width="100%" class="dlg" height="100%">
190 <TR height="100%">
191 <TD>
192 <TABLE cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
193 <TR>
194 <TD width="45%" valign="top">
195 <table cellpadding="0" cellspacing="0" height="100%" width="100%">
196 <tr>
197 <td width="100%">File : </td>
198 </tr>
199 <tr height="100%">
200 <td>
201 <DIV class="ImagePreviewArea"><?php echo $html_img_lst ?></DIV>
202 </td>
203 </tr>
204 </table>
205 </TD>
206 <TD width="10%" > </TD>
207 <TD>
208 <table cellpadding="0" cellspacing="0" height="100%" width="100%">
209 <tr>
210 <td width="100%">Preview : </td>
211 </tr>
212 <tr>
213 <td height="100%" align="center" valign="middle">
214 <DIV class="ImagePreviewArea"><IMG id="imgPreview" border=1"></DIV>
215 </td>
216 </tr>
217 </table>
218 </TD>
219 </TR>
220 </TABLE>
221 </TD>
222 </TR>
223 <TR>
224 <TD align="center">
225 <INPUT style="WIDTH: 80px" type="button" value="OK" onclick="ok();">
226 <INPUT style="WIDTH: 80px" type="button" value="Cancel" onclick="window.close();"><BR>
227 </TD>
228 </TR>
229</TABLE>
230 </BODY>
231</HTML>
232<?php
233exit;
234} elseif ($_GET["action"] == "uploadimage") {
235// ob_end_clean();
236
237/*
238 * FCKeditor - The text editor for internet
239 * Copyright (C) 2003 Frederico Caldeira Knabben
240 *
241 * Licensed under the terms of the GNU Lesser General Public License
242 * (http://www.opensource.org/licenses/lgpl-license.php)
243 *
244 * For further information go to http://www.fredck.com/FCKeditor/
245 * or contact fckeditor@fredck.com.
246 *
247 * upload.php: Basic file upload manager for the editor. You have
248 * to have set a directory called "userimages" in the root folder
249 * of your web site.
250 *
251 * Authors:
252 * Frederic TYNDIUK (http://www.ftls.org/ - tyndiuk[at]ftls.org)
253 */
254
255// Init var :
256
257 $UPLOAD_BASE_URL = 'http://'.$_SERVER["SERVER_NAME"].$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
258 $UPLOAD_BASE_DIR = getenv("DOCUMENT_ROOT").$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
259
260
261// End int var
262
263?>
264
265<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
266<HTML>
267 <HEAD>
268 <TITLE>File Uploader</TITLE>
269 <LINK rel="stylesheet" type="text/css" href="./FCKeditor/css/fck_dialog.css">
270 </HEAD>
271 <BODY><form>
272 <TABLE eight="100%" width="100%">
273 <TR>
274 <TD align=center valign=middle><B>
275 Upload in progress...
276<font color='red'><BR><BR>
277<?php
278
279if (file_exists($UPLOAD_BASE_DIR.$_FILES['FCKeditor_File']['name'])) {
280 echo "Error : File ".$_FILES['FCKeditor_File']['name']." exists, can't overwrite it...";
281 echo '<BR><BR><INPUT type="button" value=" Cancel " onclick="window.close()">';
282} else {
283 if (is_uploaded_file($_FILES['FCKeditor_File']['tmp_name'])) {
284 $savefile = $UPLOAD_BASE_DIR.$_FILES['FCKeditor_File']['name'];
285
286 if (move_uploaded_file($_FILES['FCKeditor_File']['tmp_name'], $savefile)) {
287 chmod($savefile, 0666);
288 ?>
289 <SCRIPT language=javascript>window.opener.setImage('<?php echo $UPLOAD_BASE_URL.$_FILES['FCKeditor_File']['name']; ?>') ; window.close();</SCRIPT>";
290 <?php
291 }
292 } else {
293 echo "Error : ";
294 switch($_FILES['FCKeditor_File']['error']) {
295 case 0: //no error; possible file attack!
296 echo "There was a problem with your upload.";
297 break;
298 case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
299 echo "The file you are trying to upload is too big.";
300 break;
301 case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
302 echo "The file you are trying to upload is too big.";
303 break;
304 case 3: //uploaded file was only partially uploaded
305 echo "The file you are trying upload was only partially uploaded.";
306 break;
307 case 4: //no file was uploaded
308 echo "You must select an image for upload.";
309 break;
310 default: //a default error, just in case! :)
311 echo "There was a problem with your upload.";
312 break;
313 }
314 }
315 echo '<BR><BR><INPUT type="button" value=" Cancel " onclick="window.close()">';
316} ?>
317 </font></B></TD>
318 </TR>
319 </TABLE>
320 </form></BODY>
321</HTML>
322<?php
323//exit;
324} elseif ($_GET['action'] == 'js2') {
325 ob_end_clean();
326 header('Content-type: text/plain');
327 $req = Sql_query(sprintf('select name from %s where type in ("textline","select") order by listorder',$GLOBALS['tables']['attribute']));
328 $attnames = ';preferences url;unsubscribe url';
329 $attcodes = ';[PREFERENCES];[UNSUBSCRIBE]';
330 while ($row = Sql_Fetch_Row($req)) {
331 $attnames .= ';'.strtolower(substr($row[0],0,15));
332 $attcodes .= ';['.strtoupper($row[0]).']';
333 }
334
335 $imgdir = $_SERVER['DOCUMENT_ROOT'].$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
336 $enable_image_upload = is_dir($imgdir) && is_writeable ($imgdir) ? 'true':'false';
337
338 $smileypath = $_SERVER["DOCUMENT_ROOT"].$GLOBALS["pageroot"].'/images/smiley';
339 $smileyextensions = array('gif');
340 $smileys = '';
341 if ($dir = opendir($smileypath)) {
342 while (false !== ($file = readdir($dir)))
343 {
344 if (ereg('\.',$file)) {
345 list($fname,$ext) = explode(".",$file);
346 if (in_array($ext,$smileyextensions)) {
347 $smileys .= '"'.$file.'",';
348 }
349 }
350 }
351 }
352 $smileys = substr($smileys,0,-1);
353
354?>
355/*
356 * FCKeditor - The text editor for internet
357 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
358 *
359 * Licensed under the terms of the GNU Lesser General Public License:
360 * http://www.opensource.org/licenses/lgpl-license.php
361 *
362 * For further information visit:
363 * http://www.fckeditor.net/
364 *
365 * File Name: fckconfig.js
366 * Editor configuration settings.
367 * See the documentation for more info.
368 *
369 * File Authors:
370 * Frederico Caldeira Knabben (fredck@fckeditor.net)
371 */
372
373FCKConfig.CustomConfigurationsPath = '' ;
374
375FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
376
377FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
378
379FCKConfig.BaseHref = '' ;
380
381FCKConfig.FullPage = false;
382
383FCKConfig.Debug = false ;
384
385FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
386
387FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
388
389// FCKConfig.Plugins.Add( 'placeholder', 'en,it' ) ;
390
391FCKConfig.AutoDetectLanguage = true ;
392FCKConfig.DefaultLanguage = 'en' ;
393FCKConfig.ContentLangDirection = 'ltr' ;
394
395FCKConfig.EnableXHTML = true ; // Unsupported: Do not change.
396FCKConfig.EnableSourceXHTML = true ; // Unsupported: Do not change.
397
398FCKConfig.ProcessHTMLEntities = true ;
399FCKConfig.IncludeLatinEntities = true ;
400FCKConfig.IncludeGreekEntities = true ;
401
402FCKConfig.FillEmptyBlocks = true ;
403
404FCKConfig.FormatSource = true ;
405FCKConfig.FormatOutput = true ;
406FCKConfig.FormatIndentator = '' ;
407
408FCKConfig.GeckoUseSPAN = true ;
409FCKConfig.StartupFocus = false ;
410FCKConfig.ForcePasteAsPlainText = false ;
411FCKConfig.ForceSimpleAmpersand = false ;
412FCKConfig.TabSpaces = 0 ;
413FCKConfig.ShowBorders = true ;
414FCKConfig.UseBROnCarriageReturn = false ;
415FCKConfig.ToolbarStartExpanded = true ;
416FCKConfig.ToolbarCanCollapse = true ;
417FCKConfig.IEForceVScroll = false ;
418FCKConfig.IgnoreEmptyParagraphValue = true ;
419
420FCKConfig.ToolbarSets["Default"] = [
421 ['Source','DocProps','-','NewPage','Preview'],
422 ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
423 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat','Link','Unlink','Anchor'],
424 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
425 ['OrderedList','UnorderedList','-','Outdent','Indent'],
426 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
427 ['Image','Flash','Table','Rule','Smiley','SpecialChar','UniversalKey','TextColor','BGColor'],
428 '/',
429 ['Style','FontFormat','FontName','FontSize'],
430 ['About']
431] ;
432
433// @@@ 'Save' taken out, gives the impression that the message is saved, but it isn't
434
435//@@@ need to add attribute selection
436
437FCKConfig.ToolbarSets["Basic"] = [
438 ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
439] ;
440
441FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
442
443FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
444
445FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
446FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
447FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
448
449FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
450FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
451
452FCKConfig.SpellChecker = '';//'ieSpell' ; // 'ieSpell' | 'SpellerPages'
453FCKConfig.IeSpellDownloadUrl = '';//'http://www.iespell.com/rel/ieSpellSetup211325.exe' ;
454
455FCKConfig.MaxUndoLevels = 15 ;
456
457FCKConfig.DisableImageHandles = false ;
458FCKConfig.DisableTableHandles = false ;
459
460FCKConfig.LinkDlgHideTarget = false ;
461FCKConfig.LinkDlgHideAdvanced = false ;
462
463FCKConfig.ImageDlgHideLink = false ;
464FCKConfig.ImageDlgHideAdvanced = false ;
465
466FCKConfig.FlashDlgHideAdvanced = false ;
467
468FCKConfig.LinkBrowser = false ;
469
470FCKConfig.ImageBrowser = <?php echo $enable_image_upload?> ;
471// PHP
472FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/phplist/connector.php'
473
474FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ;
475FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ;
476
477// @@@ disabled for now
478FCKConfig.FlashBrowser = false ;
479
480// PHP
481FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/phplist/connector.php' ;
482FCKConfig.FlashBrowserWindowWidth = screen.width * 0.7 ; //70% ;
483FCKConfig.FlashBrowserWindowHeight = screen.height * 0.7 ; //70% ;
484
485FCKConfig.LinkUpload = false ;
486FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp' ;
487// PHP // FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php' ;
488FCKConfig.LinkUploadAllowedExtensions = "" ; // empty for all
489FCKConfig.LinkUploadDeniedExtensions = ".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$" ; // empty for no one
490
491FCKConfig.ImageUpload = <?php echo $enable_image_upload?> ;
492FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/phplist/upload.php?Type=Image' ;
493FCKConfig.ImagePath = document.location.protocol + '//' + document.location.host +'<?php echo $GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/'?>'
494
495FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png)$" ; // empty for all
496FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
497
498FCKConfig.FlashUpload = false ;
499FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp?Type=Flash' ;
500// PHP // FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=Flash' ;
501
502FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ; // empty for all
503FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
504
505FCKConfig.SmileyPath = document.location.protocol + '//' + document.location.host +'<?php echo $GLOBALS["pageroot"].'/images/smiley/'?>'
506FCKConfig.SmileyImages = [<?php echo $smileys?>] ;
507FCKConfig.SmileyColumns = 8 ;
508FCKConfig.SmileyWindowWidth = 320 ;
509FCKConfig.SmileyWindowHeight = 240 ;
510
511if( window.console ) window.console.log( 'Config is loaded!' ) ; // @Packager.Compactor.RemoveLine
512<?php
513 exit;
514} elseif ($_GET['action'] == 'js3') {
515 ob_end_clean();
516 header('Content-type: text/plain');
517 $req = Sql_query(sprintf('select name from %s where type in ("textline","select") order by listorder',$GLOBALS['tables']['attribute']));
518 $attnames = ';preferences url;unsubscribe url';
519 $attcodes = ';[PREFERENCES];[UNSUBSCRIBE]';
520 while ($row = Sql_Fetch_Row($req)) {
521 $attnames .= ';'.strtolower(substr($row[0],0,15));
522 $attcodes .= ';['.strtoupper($row[0]).']';
523 }
524
525 $imgdir = $_SERVER['DOCUMENT_ROOT'].$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
526 $enable_image_upload = is_dir($imgdir) && is_writeable ($imgdir) ? 'true':'false';
527
528 $smileypath = $_SERVER["DOCUMENT_ROOT"].$GLOBALS["pageroot"].'/images/smiley';
529 $smileyextensions = array('gif');
530 $smileys = '';
531 if ($dir = opendir($smileypath)) {
532 while (false !== ($file = readdir($dir)))
533 {
534 if (ereg('\.',$file)) {
535 list($fname,$ext) = explode(".",$file);
536 if (in_array($ext,$smileyextensions)) {
537 $smileys .= '"'.$file.'",';
538 }
539 }
540 }
541 }
542 $smileys = substr($smileys,0,-1);
543
544?>
545/*
546 * FCKeditor - The text editor for internet
547 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
548 *
549 * Licensed under the terms of the GNU Lesser General Public License:
550 * http://www.opensource.org/licenses/lgpl-license.php
551 *
552 * For further information visit:
553 * http://www.fckeditor.net/
554 *
555 * "Support Open Source software. What about a donation today?"
556 *
557 * File Name: fckconfig.js
558 * Editor configuration settings.
559 *
560 * Follow this link for more information:
561 * http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings
562 *
563 * File Authors:
564 * Frederico Caldeira Knabben (fredck@fckeditor.net)
565 */
566
567FCKConfig.CustomConfigurationsPath = '' ;
568
569FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
570FCKConfig.ToolbarComboPreviewCSS = '' ;
571
572FCKConfig.DocType = '' ;
573
574FCKConfig.BaseHref = '' ;
575
576FCKConfig.FullPage = false ;
577
578FCKConfig.Debug = false ;
579FCKConfig.AllowQueryStringDebug = true ;
580
581FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
582FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
583
584FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
585
586// FCKConfig.Plugins.Add( 'autogrow' ) ;
587FCKConfig.AutoGrowMax = 400 ;
588
589// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
590// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
591// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
592
593FCKConfig.AutoDetectLanguage = true ;
594FCKConfig.DefaultLanguage = 'en' ;
595FCKConfig.ContentLangDirection = 'ltr' ;
596
597FCKConfig.ProcessHTMLEntities = true ;
598FCKConfig.IncludeLatinEntities = true ;
599FCKConfig.IncludeGreekEntities = true ;
600
601FCKConfig.ProcessNumericEntities = false ;
602
603FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'"
604
605FCKConfig.FillEmptyBlocks = true ;
606
607FCKConfig.FormatSource = true ;
608FCKConfig.FormatOutput = true ;
609FCKConfig.FormatIndentator = ' ' ;
610
611FCKConfig.ForceStrongEm = true ;
612FCKConfig.GeckoUseSPAN = false ;
613FCKConfig.StartupFocus = false ;
614FCKConfig.ForcePasteAsPlainText = false ;
615FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
616FCKConfig.ForceSimpleAmpersand = false ;
617FCKConfig.TabSpaces = 0 ;
618FCKConfig.ShowBorders = true ;
619FCKConfig.SourcePopup = false ;
620FCKConfig.UseBROnCarriageReturn = false ; // IE only.
621FCKConfig.ToolbarStartExpanded = true ;
622FCKConfig.ToolbarCanCollapse = true ;
623FCKConfig.IgnoreEmptyParagraphValue = true ;
624FCKConfig.PreserveSessionOnFileBrowser = false ;
625FCKConfig.FloatingPanelsZIndex = 10000 ;
626
627FCKConfig.TemplateReplaceAll = true ;
628FCKConfig.TemplateReplaceCheckbox = true ;
629
630FCKConfig.ToolbarLocation = 'In' ;
631
632FCKConfig.ToolbarSets["Default"] = [
633 ['Source','DocProps','-','NewPage','Preview','-','Templates'],
634 ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
635 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
636 ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
637 '/',
638 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
639 ['OrderedList','UnorderedList','-','Outdent','Indent'],
640 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
641 ['Link','Unlink','Anchor'],
642 ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak','UniversalKey'],
643 '/',
644 ['Style','FontFormat','FontName','FontSize'],
645 ['TextColor','BGColor'],
646 ['FitWindow','-','About']
647] ;
648
649FCKConfig.ToolbarSets["Basic"] = [
650 ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
651] ;
652
653FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;
654
655FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
656
657FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
658FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
659FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
660
661FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
662FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
663
664FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
665FCKConfig.IeSpellDownloadUrl = 'http://wcarchive.cdrom.com/pub/simtelnet/handheld/webbrow1/ieSpellSetup240428.exe' ;
666
667FCKConfig.MaxUndoLevels = 15 ;
668
669FCKConfig.DisableObjectResizing = false ;
670FCKConfig.DisableFFTableHandles = true ;
671
672FCKConfig.LinkDlgHideTarget = false ;
673FCKConfig.LinkDlgHideAdvanced = false ;
674
675FCKConfig.ImageDlgHideLink = false ;
676FCKConfig.ImageDlgHideAdvanced = false ;
677
678FCKConfig.FlashDlgHideAdvanced = false ;
679
680// The following value defines which File Browser connector and Quick Upload
681// "uploader" to use. It is valid for the default implementaion and it is here
682// just to make this configuration file cleaner.
683// It is not possible to change this value using an external file or even
684// inline when creating the editor instance. In that cases you must set the
685// values of LinkBrowserURL, ImageBrowserURL and so on.
686// Custom implementations should just ignore it.
687var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
688var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
689
690// Don't care about the following line. It just calculates the correct connector
691// extension to use for the default File Browser (Perl uses "cgi").
692var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
693
694FCKConfig.LinkBrowser = false ;
695FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
696FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70%
697FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%
698
699FCKConfig.ImageBrowser = <?php echo $enable_image_upload?> ;
700//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
701FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/phplist/connector.php'
702FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
703FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;
704
705FCKConfig.FlashBrowser = false ;
706FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
707FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
708FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
709
710FCKConfig.LinkUpload = false ;
711FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
712FCKConfig.LinkUploadAllowedExtensions = "" ; // empty for all
713FCKConfig.LinkUploadDeniedExtensions = ".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$" ; // empty for no one
714
715FCKConfig.ImageUpload = <?php echo $enable_image_upload?> ;
716FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/phplist/upload.php?Type=Image' ;
717FCKConfig.ImagePath = document.location.protocol + '//' + document.location.host +'<?php echo $GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/'?>'
718
719FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png)$" ; // empty for all
720FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
721
722FCKConfig.FlashUpload = false ;
723FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
724FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ; // empty for all
725FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
726
727FCKConfig.SmileyPath = document.location.protocol + '//' + document.location.host +'<?php echo $GLOBALS["pageroot"].'/images/smiley/'?>'
728FCKConfig.SmileyImages = [<?php echo $smileys?>] ;
729FCKConfig.SmileyColumns = 8 ;
730FCKConfig.SmileyWindowWidth = 320 ;
731FCKConfig.SmileyWindowHeight = 240 ;
732
733<?php
734 exit;
735} elseif ($_GET['action'] == 'js4') {
736 ob_end_clean();
737 header('Content-type: text/plain');
738 $req = Sql_query(sprintf('select name from %s where type in ("textline","select") order by listorder',$GLOBALS['tables']['attribute']));
739 $attnames = ';preferences url;unsubscribe url';
740 $attcodes = ';[PREFERENCES];[UNSUBSCRIBE]';
741 while ($row = Sql_Fetch_Row($req)) {
742 $attnames .= ';'.strtolower(substr($row[0],0,15));
743 $attcodes .= ';['.strtoupper($row[0]).']';
744 }
745
746 $imgdir = $_SERVER['DOCUMENT_ROOT'].$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
747 $enable_image_upload = is_dir($imgdir) && is_writeable ($imgdir) ? 'true':'false';
748
749 $smileypath = $_SERVER["DOCUMENT_ROOT"].$GLOBALS["pageroot"].'/images/smiley';
750 $smileyextensions = array('gif');
751 $smileys = '';
752 if (is_dir($smileypath)) {
753
754 if ($dir = opendir($smileypath)) {
755 while (false !== ($file = readdir($dir)))
756 {
757 if (ereg('\.',$file)) {
758 list($fname,$ext) = explode(".",$file);
759 if (in_array($ext,$smileyextensions)) {
760 $smileys .= '"'.$file.'",';
761 }
762 }
763 }
764 }
765 $smileys = substr($smileys,0,-1);
766 }
767
768?>
769/*
770 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
771 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
772 *
773 * == BEGIN LICENSE ==
774 *
775 * Licensed under the terms of any of the following licenses at your
776 * choice:
777 *
778 * - GNU General Public License Version 2 or later (the "GPL")
779 * http://www.gnu.org/licenses/gpl.html
780 *
781 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
782 * http://www.gnu.org/licenses/lgpl.html
783 *
784 * - Mozilla Public License Version 1.1 or later (the "MPL")
785 * http://www.mozilla.org/MPL/MPL-1.1.html
786 *
787 * == END LICENSE ==
788 *
789 * Editor configuration settings.
790 *
791 * Follow this link for more information:
792 * http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
793 */
794
795FCKConfig.CustomConfigurationsPath = '' ;
796
797FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
798FCKConfig.EditorAreaStyles = '' ;
799FCKConfig.ToolbarComboPreviewCSS = '' ;
800
801FCKConfig.DocType = '' ;
802
803FCKConfig.BaseHref = '' ;
804
805FCKConfig.FullPage = false ;
806
807// The following option determines whether the "Show Blocks" feature is enabled or not at startup.
808FCKConfig.StartupShowBlocks = false ;
809
810FCKConfig.Debug = false ;
811FCKConfig.AllowQueryStringDebug = true ;
812
813FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
814FCKConfig.SkinEditorCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
815FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
816
817FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
818
819FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
820
821// FCKConfig.Plugins.Add( 'autogrow' ) ;
822// FCKConfig.Plugins.Add( 'dragresizetable' );
823FCKConfig.AutoGrowMax = 400 ;
824
825// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
826// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
827// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
828
829FCKConfig.AutoDetectLanguage = true ;
830FCKConfig.DefaultLanguage = 'en' ;
831FCKConfig.ContentLangDirection = 'ltr' ;
832
833FCKConfig.ProcessHTMLEntities = true ;
834FCKConfig.IncludeLatinEntities = true ;
835FCKConfig.IncludeGreekEntities = true ;
836
837FCKConfig.ProcessNumericEntities = false ;
838
839FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'"
840
841FCKConfig.FillEmptyBlocks = true ;
842
843FCKConfig.FormatSource = true ;
844FCKConfig.FormatOutput = true ;
845FCKConfig.FormatIndentator = ' ' ;
846
847FCKConfig.EMailProtection = 'none' ; // none | encode | function
848FCKConfig.EMailProtectionFunction = 'mt(NAME,DOMAIN,SUBJECT,BODY)' ;
849
850FCKConfig.StartupFocus = false ;
851FCKConfig.ForcePasteAsPlainText = false ;
852FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
853FCKConfig.ShowDropDialog = true ;
854FCKConfig.ForceSimpleAmpersand = false ;
855FCKConfig.TabSpaces = 0 ;
856FCKConfig.ShowBorders = true ;
857FCKConfig.SourcePopup = false ;
858FCKConfig.ToolbarStartExpanded = true ;
859FCKConfig.ToolbarCanCollapse = true ;
860FCKConfig.IgnoreEmptyParagraphValue = true ;
861FCKConfig.FloatingPanelsZIndex = 10000 ;
862FCKConfig.HtmlEncodeOutput = false ;
863
864FCKConfig.TemplateReplaceAll = true ;
865FCKConfig.TemplateReplaceCheckbox = true ;
866
867FCKConfig.ToolbarLocation = 'In' ;
868
869FCKConfig.ToolbarSets["Default"] = [
870 ['Source','DocProps','-','NewPage','Preview'],
871 ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
872 ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat','Link','Unlink','Anchor'],
873 ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
874 ['OrderedList','UnorderedList','-','Outdent','Indent'],
875 ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
876 ['Image','Flash','Table','Rule','Smiley','SpecialChar','TextColor','BGColor'],
877 '/',
878 ['Style','FontFormat','FontName','FontSize'],
879 ['About']
880] ;
881
882FCKConfig.ToolbarSets["Basic"] = [
883 ['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
884] ;
885
886FCKConfig.EnterMode = 'p' ; // p | div | br
887FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
888
889FCKConfig.Keystrokes = [
890 [ CTRL + 65 /*A*/, true ],
891 [ CTRL + 67 /*C*/, true ],
892 [ CTRL + 70 /*F*/, true ],
893 [ CTRL + 83 /*S*/, true ],
894 [ CTRL + 84 /*T*/, true ],
895 [ CTRL + 88 /*X*/, true ],
896 [ CTRL + 86 /*V*/, 'Paste' ],
897 [ CTRL + 45 /*INS*/, true ],
898 [ SHIFT + 45 /*INS*/, 'Paste' ],
899 [ CTRL + 88 /*X*/, 'Cut' ],
900 [ SHIFT + 46 /*DEL*/, 'Cut' ],
901 [ CTRL + 90 /*Z*/, 'Undo' ],
902 [ CTRL + 89 /*Y*/, 'Redo' ],
903 [ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
904 [ CTRL + 76 /*L*/, 'Link' ],
905 [ CTRL + 66 /*B*/, 'Bold' ],
906 [ CTRL + 73 /*I*/, 'Italic' ],
907 [ CTRL + 85 /*U*/, 'Underline' ],
908 [ CTRL + SHIFT + 83 /*S*/, 'Save' ],
909 [ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
910 [ SHIFT + 32 /*SPACE*/, 'Nbsp' ]
911] ;
912
913FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form','DivContainer'] ;
914FCKConfig.BrowserContextMenuOnCtrl = false ;
915FCKConfig.BrowserContextMenu = false ;
916
917FCKConfig.EnableMoreFontColors = true ;
918FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
919
920FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
921FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
922FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
923
924FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
925FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
926
927FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
928FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ;
929FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl
930FCKConfig.FirefoxSpellChecker = false ;
931
932FCKConfig.MaxUndoLevels = 15 ;
933
934FCKConfig.DisableObjectResizing = false ;
935FCKConfig.DisableFFTableHandles = true ;
936
937FCKConfig.LinkDlgHideTarget = false ;
938FCKConfig.LinkDlgHideAdvanced = false ;
939
940FCKConfig.ImageDlgHideLink = false ;
941FCKConfig.ImageDlgHideAdvanced = false ;
942
943FCKConfig.FlashDlgHideAdvanced = false ;
944
945FCKConfig.ProtectedTags = '' ;
946
947// This will be applied to the body element of the editor
948FCKConfig.BodyId = '' ;
949FCKConfig.BodyClass = '' ;
950
951FCKConfig.DefaultStyleLabel = '' ;
952FCKConfig.DefaultFontFormatLabel = '' ;
953FCKConfig.DefaultFontLabel = '' ;
954FCKConfig.DefaultFontSizeLabel = '' ;
955
956FCKConfig.DefaultLinkTarget = '' ;
957
958// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
959FCKConfig.CleanWordKeepsStructure = false ;
960
961// Only inline elements are valid.
962FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
963
964// Attributes that will be removed
965FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ;
966
967FCKConfig.CustomStyles =
968{
969 'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } }
970};
971
972// Do not add, rename or remove styles here. Only apply definition changes.
973FCKConfig.CoreStyles =
974{
975 // Basic Inline Styles.
976 'Bold' : { Element : 'strong', Overrides : 'b' },
977 'Italic' : { Element : 'em', Overrides : 'i' },
978 'Underline' : { Element : 'u' },
979 'StrikeThrough' : { Element : 'strike' },
980 'Subscript' : { Element : 'sub' },
981 'Superscript' : { Element : 'sup' },
982
983 // Basic Block Styles (Font Format Combo).
984 'p' : { Element : 'p' },
985 'div' : { Element : 'div' },
986 'pre' : { Element : 'pre' },
987 'address' : { Element : 'address' },
988 'h1' : { Element : 'h1' },
989 'h2' : { Element : 'h2' },
990 'h3' : { Element : 'h3' },
991 'h4' : { Element : 'h4' },
992 'h5' : { Element : 'h5' },
993 'h6' : { Element : 'h6' },
994
995 // Other formatting features.
996 'FontFace' :
997 {
998 Element : 'span',
999 Styles : { 'font-family' : '#("Font")' },
1000 Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ]
1001 },
1002
1003 'Size' :
1004 {
1005 Element : 'span',
1006 Styles : { 'font-size' : '#("Size","fontSize")' },
1007 Overrides : [ { Element : 'font', Attributes : { 'size' : null } } ]
1008 },
1009
1010 'Color' :
1011 {
1012 Element : 'span',
1013 Styles : { 'color' : '#("Color","color")' },
1014 Overrides : [ { Element : 'font', Attributes : { 'color' : null } } ]
1015 },
1016
1017 'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } },
1018
1019 'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } }
1020};
1021
1022// The distance of an indentation step.
1023FCKConfig.IndentLength = 40 ;
1024FCKConfig.IndentUnit = 'px' ;
1025
1026// Alternatively, FCKeditor allows the use of CSS classes for block indentation.
1027// This overrides the IndentLength/IndentUnit settings.
1028FCKConfig.IndentClasses = [] ;
1029
1030// [ Left, Center, Right, Justified ]
1031FCKConfig.JustifyClasses = [] ;
1032
1033// The following value defines which File Browser connector and Quick Upload
1034// "uploader" to use. It is valid for the default implementaion and it is here
1035// just to make this configuration file cleaner.
1036// It is not possible to change this value using an external file or even
1037// inline when creating the editor instance. In that cases you must set the
1038// values of LinkBrowserURL, ImageBrowserURL and so on.
1039// Custom implementations should just ignore it.
1040var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
1041var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
1042
1043// Don't care about the following two lines. It just calculates the correct connector
1044// extension to use for the default File Browser (Perl uses "cgi").
1045var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
1046var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
1047
1048FCKConfig.LinkBrowser = false ;
1049FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
1050FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70%
1051FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%
1052
1053FCKConfig.ImageBrowser = <?php echo $enable_image_upload?> ;
1054
1055//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;
1056
1057FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/phplist/connector.' + _FileBrowserExtension ) ;
1058
1059FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
1060FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;
1061
1062FCKConfig.FlashBrowser = false ;
1063FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
1064FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
1065FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
1066
1067FCKConfig.LinkUpload = false ;
1068FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
1069FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ; // empty for all
1070FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one
1071
1072FCKConfig.ImageUpload = <?php echo $enable_image_upload?> ;
1073//FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
1074FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/phplist/upload.php?Type=Image' ;
1075FCKConfig.ImagePath = document.location.protocol + '//' + document.location.host +'<?php echo $GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/'?>'
1076
1077FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
1078FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
1079
1080FCKConfig.FlashUpload = false ;
1081FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
1082FCKConfig.FlashUploadAllowedExtensions = ".(swf|flv)$" ; // empty for all
1083FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
1084
1085FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
1086FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
1087FCKConfig.SmileyColumns = 8 ;
1088FCKConfig.SmileyWindowWidth = 320 ;
1089FCKConfig.SmileyWindowHeight = 210 ;
1090
1091FCKConfig.BackgroundBlockerColor = '#ffffff' ;
1092FCKConfig.BackgroundBlockerOpacity = 0.50 ;
1093
1094FCKConfig.MsWebBrowserControlCompat = false ;
1095
1096FCKConfig.PreventSubmitHandler = false ;
1097<?php
1098 exit;
1099
1100} elseif ($_GET["action"]) {
1101 print "Sorry, not implemented";
1102}
1103
1104?>