PageRenderTime 545ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/mailz/lists/admin/fckphplist.php

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