Browse Source

Feature #306 - Trimming whitespace from all the library files main/inc/lib. ~200 files are to be changed.

Ivan Tcholakov 15 years ago
parent
commit
84f8d984e7
100 changed files with 2040 additions and 2040 deletions
  1. 11 11
      main/inc/course_document.inc.php
  2. 18 18
      main/inc/lib/WCAG/WCAG_rendering.php
  3. 1 1
      main/inc/lib/asciimath/filter.php
  4. 1 1
      main/inc/lib/asciimath/javascript.php
  5. 52 52
      main/inc/lib/ezpdf/class.ezpdf.php
  6. 84 84
      main/inc/lib/ezpdf/class.pdf.php
  7. 1 1
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php
  8. 1 1
      main/inc/lib/fckeditor/editor/filemanager/connectors/php/io.php
  9. 33 33
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Files.php
  10. 16 16
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/GD.php
  11. 4 4
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/IM.php
  12. 35 35
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php
  13. 113 113
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php
  14. 9 9
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/NetPBM.php
  15. 9 9
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Thumbnail.php
  16. 6 6
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Transform.php
  17. 15 15
      main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/api.watermark.php
  18. 7 7
      main/inc/lib/fckeditor/editor/plugins/ImageManager/config.inc.php
  19. 28 28
      main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php
  20. 2 2
      main/inc/lib/fckeditor/editor/plugins/ImageManager/editorFrame.php
  21. 19 19
      main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php
  22. 12 12
      main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php
  23. 15 15
      main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.php
  24. 36 36
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_details_listing.php
  25. 30 30
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php
  26. 5 5
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_load_folders.php
  27. 18 18
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_create_folder.php
  28. 52 52
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_delete_file.php
  29. 9 9
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_download.php
  30. 19 19
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_editor_reset.php
  31. 2 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_copy.php
  32. 2 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_cut.php
  33. 25 25
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_paste.php
  34. 33 33
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_upload.php
  35. 45 45
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_file_listing.php
  36. 2 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_folder_listing.php
  37. 14 14
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_editor.php
  38. 53 53
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_save.php
  39. 7 7
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_thumbnail.php
  40. 15 15
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_undo.php
  41. 2 2
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_login.php
  42. 10 10
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_preview.php
  43. 3 3
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_save_as_form.php
  44. 8 8
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_save_name.php
  45. 15 15
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_save_text.php
  46. 18 18
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_text_editor.php
  47. 109 109
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php
  48. 5 5
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.auth.php
  49. 57 57
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.file.php
  50. 17 17
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.history.php
  51. 133 133
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.image.php
  52. 66 66
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.manager.php
  53. 3 3
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.pagination.php
  54. 28 28
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.search.php
  55. 38 38
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.session.php
  56. 4 4
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.sessionaction.php
  57. 32 32
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.upload.php
  58. 54 54
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php
  59. 14 14
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.php
  60. 29 29
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.tinymce.php
  61. 136 136
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/function.base.php
  62. 6 6
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/ar.php
  63. 48 48
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/bg.php
  64. 5 5
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/da.php
  65. 21 21
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/de.php
  66. 27 27
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/en.php
  67. 25 25
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/es.php
  68. 17 17
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/fi.php
  69. 18 18
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/fr.php
  70. 5 5
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/it.php
  71. 25 25
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/pl.php
  72. 33 33
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/pt_br.php
  73. 19 19
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/pt_pt.php
  74. 15 15
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/ru.php
  75. 18 18
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/sk.php
  76. 25 25
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/zh.php
  77. 31 31
      main/inc/lib/fckeditor/fcktemplates.xml.php
  78. 7 7
      main/inc/lib/fckeditor/repository.php
  79. 1 1
      main/inc/lib/fckeditor/toolbars/default/agenda.php
  80. 1 1
      main/inc/lib/fckeditor/toolbars/default/agenda_student.php
  81. 1 1
      main/inc/lib/fckeditor/toolbars/default/announcements_student.php
  82. 1 1
      main/inc/lib/fckeditor/toolbars/default/assessments_introduction.php
  83. 1 1
      main/inc/lib/fckeditor/toolbars/default/documents_student.php
  84. 1 1
      main/inc/lib/fckeditor/toolbars/default/forum_student.php
  85. 1 1
      main/inc/lib/fckeditor/toolbars/default/learning_path_documents.php
  86. 1 1
      main/inc/lib/fckeditor/toolbars/default/messages.php
  87. 1 1
      main/inc/lib/fckeditor/toolbars/default/notebook_student.php
  88. 1 1
      main/inc/lib/fckeditor/toolbars/default/profile.php
  89. 1 1
      main/inc/lib/fckeditor/toolbars/default/simple.php
  90. 1 1
      main/inc/lib/fckeditor/toolbars/default/test_description.php
  91. 1 1
      main/inc/lib/fckeditor/toolbars/default/test_free_answer.php
  92. 1 1
      main/inc/lib/fckeditor/toolbars/default/test_proposed_answer.php
  93. 1 1
      main/inc/lib/fckeditor/toolbars/default/test_question_description.php
  94. 1 1
      main/inc/lib/fckeditor/toolbars/default/training_description.php
  95. 9 9
      main/inc/lib/formvalidator/Element/calendar_popup.php
  96. 9 9
      main/inc/lib/formvalidator/Element/datepicker.php
  97. 6 6
      main/inc/lib/formvalidator/Element/datepickerdate.php
  98. 3 3
      main/inc/lib/formvalidator/Element/html_editor.php
  99. 5 5
      main/inc/lib/formvalidator/Element/receivers.php
  100. 7 7
      main/inc/lib/formvalidator/Element/select_language.php

+ 11 - 11
main/inc/course_document.inc.php

@@ -6,7 +6,7 @@ include_once('global.inc.php');
 		INIT SECTION
 		INIT SECTION
 ==============================================================================
 ==============================================================================
 */
 */
-// name of the language file that needs to be included 
+// name of the language file that needs to be included
 
 
 require_once api_get_path(INCLUDE_PATH).'lib/fckeditor/repository.php';
 require_once api_get_path(INCLUDE_PATH).'lib/fckeditor/repository.php';
 
 
@@ -198,13 +198,13 @@ if($is_allowed_to_edit) // TEACHER ONLY
 	  ======================================*/
 	  ======================================*/
 
 
 	if ( isset($_GET['delete']) )
 	if ( isset($_GET['delete']) )
-	{	
+	{
 		include_once(api_get_path(LIBRARY_PATH) . 'fileManage.lib.php');
 		include_once(api_get_path(LIBRARY_PATH) . 'fileManage.lib.php');
 		if(DocumentManager::delete_document($_course,$_GET['delete'],$base_work_dir))
 		if(DocumentManager::delete_document($_course,$_GET['delete'],$base_work_dir))
 		{
 		{
 			Display::display_normal_message(api_convert_encoding(get_lang('DocDeleted'), 'UTF-8', $charset));
 			Display::display_normal_message(api_convert_encoding(get_lang('DocDeleted'), 'UTF-8', $charset));
 		}
 		}
-		else 
+		else
 		{
 		{
 			Display::display_normal_message(api_convert_encoding(get_lang('DocDeleteError'), 'UTF-8', $charset));
 			Display::display_normal_message(api_convert_encoding(get_lang('DocDeleteError'), 'UTF-8', $charset));
 		}
 		}
@@ -218,10 +218,10 @@ if($is_allowed_to_edit) // TEACHER ONLY
 				foreach($_POST['path'] as $index => $path)
 				foreach($_POST['path'] as $index => $path)
 				{
 				{
 					DocumentManager::delete_document($_course,$path,$base_work_dir);
 					DocumentManager::delete_document($_course,$path,$base_work_dir);
-				}	
+				}
 				Display::display_normal_message(api_convert_encoding(get_lang('DocDeleted'), 'UTF-8', $charset));
 				Display::display_normal_message(api_convert_encoding(get_lang('DocDeleted'), 'UTF-8', $charset));
 				break;
 				break;
-		}	
+		}
 	}
 	}
 }
 }
 
 
@@ -267,7 +267,7 @@ if($docs_and_folders)
 		{
 		{
 			 $document_name=$id['title'];
 			 $document_name=$id['title'];
 		}
 		}
-		else 
+		else
 		{
 		{
 			$document_name=basename($id['path']);
 			$document_name=basename($id['path']);
 		}
 		}
@@ -286,17 +286,17 @@ if($docs_and_folders)
 		//comments => display comment under the document name
 		//comments => display comment under the document name
 		//$row[] = $invisibility_span_open.nl2br(htmlspecialchars($id['comment'])).$invisibility_span_close;
 		//$row[] = $invisibility_span_open.nl2br(htmlspecialchars($id['comment'])).$invisibility_span_close;
 		$display_size = format_file_size($size);
 		$display_size = format_file_size($size);
-		$row[] = '<span style="display:none;">'.$size.'</span>'.$invisibility_span_open.$display_size.$invisibility_span_close; 
+		$row[] = '<span style="display:none;">'.$size.'</span>'.$invisibility_span_open.$display_size.$invisibility_span_close;
 		//last edit date
 		//last edit date
 		$display_date = format_date(strtotime($id['lastedit_date']));
 		$display_date = format_date(strtotime($id['lastedit_date']));
-		$row[] = '<span style="display:none;">'.$id['lastedit_date'].'</span>'.$invisibility_span_open.$display_date.$invisibility_span_close; 
-		
+		$row[] = '<span style="display:none;">'.$id['lastedit_date'].'</span>'.$invisibility_span_open.$display_date.$invisibility_span_close;
+
 		$sortable_data[] = $row;
 		$sortable_data[] = $row;
 	}
 	}
 	//*******************************************************************************************
 	//*******************************************************************************************
 
 
 }
 }
-else 
+else
 {
 {
 	$sortable_data=array();
 	$sortable_data=array();
 	//$table_footer='<div style="text-align:center;"><strong>'.get_lang('NoDocsInFolder').'</strong></div>';
 	//$table_footer='<div style="text-align:center;"><strong>'.get_lang('NoDocsInFolder').'</strong></div>';
@@ -367,7 +367,7 @@ function getlist ($directory) {
 		}
 		}
 
 
 		return $files;
 		return $files;
-	} 
+	}
 	else
 	else
 	{
 	{
 		return false;
 		return false;

+ 18 - 18
main/inc/lib/WCAG/WCAG_rendering.php

@@ -29,21 +29,21 @@ include_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'
 * @version     1.0
 * @version     1.0
 */
 */
 class WCAG_Rendering {
 class WCAG_Rendering {
-	
+
 	function editor_header() {
 	function editor_header() {
 		return '<div id="WCAG-editor"><div class="title">'.get_lang('WCAGEditor').'</div><div class="body">';
 		return '<div id="WCAG-editor"><div class="title">'.get_lang('WCAGEditor').'</div><div class="body">';
 	}
 	}
-	
+
 	function editor_footer() {
 	function editor_footer() {
 		return '</div></div>';
 		return '</div></div>';
 	}
 	}
-	
+
 	function prepareXHTML() {
 	function prepareXHTML() {
 		$text = $_POST['text'];
 		$text = $_POST['text'];
 		$text = WCAG_Rendering::text_to_HTML ( $text );
 		$text = WCAG_Rendering::text_to_HTML ( $text );
-		$imageFile = $_POST['imagefile'];				
+		$imageFile = $_POST['imagefile'];
 		$imageLabel = $_POST['imageLabel'];
 		$imageLabel = $_POST['imageLabel'];
-		$link = $_POST['link'];				
+		$link = $_POST['link'];
 		$linkLabel = $_POST['linkLabel'];
 		$linkLabel = $_POST['linkLabel'];
 		if (strlen($linkLabel) == 0) {
 		if (strlen($linkLabel) == 0) {
 			$linkLabel = $link;
 			$linkLabel = $link;
@@ -55,20 +55,20 @@ class WCAG_Rendering {
 		$home_top=$home_top."<div style=\"clear:both;\"><span></span></div></div>";
 		$home_top=$home_top."<div style=\"clear:both;\"><span></span></div></div>";
 		return $home_top;
 		return $home_top;
 	}
 	}
-	
+
 	/**
 	/**
 	* this method validate the content of current request (from WCAG editor).
 	* this method validate the content of current request (from WCAG editor).
 	* this function return the error msg.
 	* this function return the error msg.
 	*/
 	*/
 	function request_validation() {
 	function request_validation() {
-		$imageFile = $_POST['imagefile'];				
+		$imageFile = $_POST['imagefile'];
 		$imageLabel = $_POST['imageLabel'];
 		$imageLabel = $_POST['imageLabel'];
 		if ((strlen($imageFile) > 0) and (strlen($imageLabel) == 0)) {
 		if ((strlen($imageFile) > 0) and (strlen($imageLabel) == 0)) {
 			return get_lang('errorNoLabel');
 			return get_lang('errorNoLabel');
 		}
 		}
 		return '';
 		return '';
 	}
 	}
-	
+
 /**
 /**
 * Converter Plaintext to (x)HTML
 * Converter Plaintext to (x)HTML
 */
 */
@@ -98,13 +98,13 @@ function extract_data ($xhtml) {
 		$startP = stripos ($xhtml, "<p>");
 		$startP = stripos ($xhtml, "<p>");
 		$endP =  stripos ($xhtml, "</p>");
 		$endP =  stripos ($xhtml, "</p>");
 		$text = substr ($xhtml, $startP+3, $endP-$startP-3 );
 		$text = substr ($xhtml, $startP+3, $endP-$startP-3 );
-	}	
-	
+	}
+
 	// convert HTML to text.
 	// convert HTML to text.
 	$text = WCAG_Rendering::HTML_to_text($text);
 	$text = WCAG_Rendering::HTML_to_text($text);
 
 
 	$url='';
 	$url='';
-	if (stripos($xhtml, '<img')) {	
+	if (stripos($xhtml, '<img')) {
 		$startImgURL = stripos ($xhtml, "src=\"");
 		$startImgURL = stripos ($xhtml, "src=\"");
 		$endImgURL = stripos ($xhtml, "\" ");
 		$endImgURL = stripos ($xhtml, "\" ");
 		$url = substr ($xhtml, $startImgURL+5, $endImgURL-$startImgURL-5 );
 		$url = substr ($xhtml, $startImgURL+5, $endImgURL-$startImgURL-5 );
@@ -113,12 +113,12 @@ function extract_data ($xhtml) {
 		$endImgLabel = stripos ($subxhtml, "\" ");
 		$endImgLabel = stripos ($subxhtml, "\" ");
 		$label = substr ($subxhtml, $startImgLabel+5, $endImgLabel-$startImgLabel-5 );
 		$label = substr ($subxhtml, $startImgLabel+5, $endImgLabel-$startImgLabel-5 );
 	}
 	}
-	
+
 	$subxhtml = substr ($xhtml, $endImgURL+2, $startP);
 	$subxhtml = substr ($xhtml, $endImgURL+2, $startP);
 	$startImgLabel = stripos ($subxhtml, "alt=\"");
 	$startImgLabel = stripos ($subxhtml, "alt=\"");
 	$endImgLabel = stripos ($subxhtml, "\" ");
 	$endImgLabel = stripos ($subxhtml, "\" ");
 	$label = substr ($subxhtml, $startImgLabel+5, $endImgLabel-$startImgLabel-5 );
 	$label = substr ($subxhtml, $startImgLabel+5, $endImgLabel-$startImgLabel-5 );
-	
+
 	$subxhtml = substr ($xhtml, $endP+2, 9999999999);
 	$subxhtml = substr ($xhtml, $endP+2, 9999999999);
 	$link="";
 	$link="";
 	$linkLabel="";
 	$linkLabel="";
@@ -126,11 +126,11 @@ function extract_data ($xhtml) {
 		$startLinkURL = stripos ($subxhtml, "ref=\"");
 		$startLinkURL = stripos ($subxhtml, "ref=\"");
 		$endLinkURL = stripos ($subxhtml, "\">");
 		$endLinkURL = stripos ($subxhtml, "\">");
 		$link = substr ($subxhtml, $startLinkURL+5, $endLinkURL-$startLinkURL-5 );
 		$link = substr ($subxhtml, $startLinkURL+5, $endLinkURL-$startLinkURL-5 );
-		
+
 		$endLinkLabel = stripos ($subxhtml, "</a>");
 		$endLinkLabel = stripos ($subxhtml, "</a>");
 		$linkLabel = substr ( $subxhtml, $endLinkURL+2, $endLinkLabel-$endLinkURL-2 );
 		$linkLabel = substr ( $subxhtml, $endLinkURL+2, $endLinkLabel-$endLinkURL-2 );
 	}
 	}
-	
+
 	$values = array("text"=>$text,
 	$values = array("text"=>$text,
                     "imagefile"=>$url,
                     "imagefile"=>$url,
                     "imageLabel"=>$label,
                     "imageLabel"=>$label,
@@ -155,14 +155,14 @@ function &prepare_admin_form( $xhtml, &$form )
 	$form->addElement('text','imageLabel',get_lang('WCAGLabel'));
 	$form->addElement('text','imageLabel',get_lang('WCAGLabel'));
 	$form->addElement('text','link',get_lang('WCAGLink'));
 	$form->addElement('text','link',get_lang('WCAGLink'));
 	$form->addElement('text','linkLabel',get_lang('WCAGLinkLabel'));
 	$form->addElement('text','linkLabel',get_lang('WCAGLinkLabel'));
-	
+
 	$form->setDefaults($values);
 	$form->setDefaults($values);
-	
+
 	$renderer =& $form->defaultRenderer();
 	$renderer =& $form->defaultRenderer();
 	$element_template = '<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}<br />
 	$element_template = '<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}<br />
 			<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error -->	{element}<br />';
 			<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error -->	{element}<br />';
 	$renderer->setElementTemplate($element_template);
 	$renderer->setElementTemplate($element_template);
-	
+
 	return $form;
 	return $form;
 }
 }
 
 

+ 1 - 1
main/inc/lib/asciimath/filter.php

@@ -25,7 +25,7 @@
 // or put    amath ... amathoff   around the whole text to use the
 // or put    amath ... amathoff   around the whole text to use the
 // experimental auto-math-recognize mode.
 // experimental auto-math-recognize mode.
 //
 //
-// The filter enables the ASCIIMathML.js code to do most of the work. 
+// The filter enables the ASCIIMathML.js code to do most of the work.
 //
 //
 // A copy of ASCIIMathML (version 2.0 or later) is included and
 // A copy of ASCIIMathML (version 2.0 or later) is included and
 // automatically loaded in the file asciimath/javascript.php
 // automatically loaded in the file asciimath/javascript.php

+ 1 - 1
main/inc/lib/asciimath/javascript.php

@@ -24,5 +24,5 @@
 // var wwwroot = "http://path/to/your/moodledir"
 // var wwwroot = "http://path/to/your/moodledir"
 // or copy the ASCIIMathML.js file into this file.
 // or copy the ASCIIMathML.js file into this file.
 
 
-var wwwroot = document.getElementsByTagName("script")[0].src.replace(/((.*?)\/lib\/.*)/,"$2"); 
+var wwwroot = document.getElementsByTagName("script")[0].src.replace(/((.*?)\/lib\/.*)/,"$2");
 document.write('<script src="'+wwwroot+'/filter/asciimath/ASCIIMathML.js"></script>');
 document.write('<script src="'+wwwroot+'/filter/asciimath/ASCIIMathML.js"></script>');

+ 52 - 52
main/inc/lib/ezpdf/class.ezpdf.php

@@ -5,12 +5,12 @@ include_once('class.pdf.php');
 class Cezpdf extends Cpdf {
 class Cezpdf extends Cpdf {
 //==============================================================================
 //==============================================================================
 // this class will take the basic interaction facilities of the Cpdf class
 // this class will take the basic interaction facilities of the Cpdf class
-// and make more useful functions so that the user does not have to 
+// and make more useful functions so that the user does not have to
 // know all the ins and outs of pdf presentation to produce something pretty.
 // know all the ins and outs of pdf presentation to produce something pretty.
 //
 //
 // IMPORTANT NOTE
 // IMPORTANT NOTE
 // there is no warranty, implied or otherwise with this software.
 // there is no warranty, implied or otherwise with this software.
-// 
+//
 // version 009 (versioning is linked to class.pdf.php)
 // version 009 (versioning is linked to class.pdf.php)
 //
 //
 // released under a public domain licence.
 // released under a public domain licence.
@@ -31,12 +31,12 @@ function Cezpdf($paper='a4',$orientation='portrait'){
 	// orientation can be 'portrait' or 'landscape'
 	// orientation can be 'portrait' or 'landscape'
 	// or, to actually set the coordinates, then pass an array in as the first parameter.
 	// or, to actually set the coordinates, then pass an array in as the first parameter.
 	// the defaults are as shown.
 	// the defaults are as shown.
-	// 
+	//
 	// -------------------------
 	// -------------------------
 	// 2002-07-24 - Nicola Asuni (info@tecnick.com):
 	// 2002-07-24 - Nicola Asuni (info@tecnick.com):
 	// Added new page formats (45 standard ISO paper formats and 4 american common formats)
 	// Added new page formats (45 standard ISO paper formats and 4 american common formats)
 	// paper cordinates are calculated in this way: (inches * 72) where 1 inch = 2.54 cm
 	// paper cordinates are calculated in this way: (inches * 72) where 1 inch = 2.54 cm
-	// 
+	//
 	// Now you may also pass a 2 values array containing the page width and height in centimeters
 	// Now you may also pass a 2 values array containing the page width and height in centimeters
 	// -------------------------
 	// -------------------------
 
 
@@ -114,13 +114,13 @@ function Cezpdf($paper='a4',$orientation='portrait'){
 	$this->Cpdf($size);
 	$this->Cpdf($size);
 	$this->ez['pageWidth']=$size[2];
 	$this->ez['pageWidth']=$size[2];
 	$this->ez['pageHeight']=$size[3];
 	$this->ez['pageHeight']=$size[3];
-	
+
 	// also set the margins to some reasonable defaults
 	// also set the margins to some reasonable defaults
 	$this->ez['topMargin']=30;
 	$this->ez['topMargin']=30;
 	$this->ez['bottomMargin']=30;
 	$this->ez['bottomMargin']=30;
 	$this->ez['leftMargin']=30;
 	$this->ez['leftMargin']=30;
 	$this->ez['rightMargin']=30;
 	$this->ez['rightMargin']=30;
-	
+
 	// set the current writing position to the top of the first page
 	// set the current writing position to the top of the first page
 	$this->y = $this->ez['pageHeight']-$this->ez['topMargin'];
 	$this->y = $this->ez['pageHeight']-$this->ez['topMargin'];
 	// and get the ID of the page that was created during the instancing process.
 	// and get the ID of the page that was created during the instancing process.
@@ -171,7 +171,7 @@ function ezColumnsStart($options=array()){
   $width=($this->ez['pageWidth']-$this->ez['leftMargin']-$this->ez['rightMargin']-($options['num']-1)*$options['gap'])/$options['num'];
   $width=($this->ez['pageWidth']-$this->ez['leftMargin']-$this->ez['rightMargin']-($options['num']-1)*$options['gap'])/$options['num'];
   $this->ez['columns']['width']=$width;
   $this->ez['columns']['width']=$width;
   $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width;
   $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width;
-  
+
 }
 }
 // ------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------
 function ezColumnsStop(){
 function ezColumnsStop(){
@@ -249,7 +249,7 @@ function ezSetMargins($top,$bottom,$left,$right){
   $this->ez['bottomMargin']=$bottom;
   $this->ez['bottomMargin']=$bottom;
   $this->ez['leftMargin']=$left;
   $this->ez['leftMargin']=$left;
   $this->ez['rightMargin']=$right;
   $this->ez['rightMargin']=$right;
-  // check to see if this means that the current writing position is outside the 
+  // check to see if this means that the current writing position is outside the
   // writable area
   // writable area
   if ($this->y > $this->ez['pageHeight']-$top){
   if ($this->y > $this->ez['pageHeight']-$top){
     // then move y down
     // then move y down
@@ -259,7 +259,7 @@ function ezSetMargins($top,$bottom,$left,$right){
     // then make a new page
     // then make a new page
     $this->ezNewPage();
     $this->ezNewPage();
   }
   }
-}  
+}
 
 
 // ------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------
 
 
@@ -480,7 +480,7 @@ function ezSetDy($dy,$mod=''){
   // used to change the vertical position of the writing point.
   // used to change the vertical position of the writing point.
   // changes up by a positive increment, so enter a negative number to go
   // changes up by a positive increment, so enter a negative number to go
   // down the page
   // down the page
-  // if $mod is set to 'makeSpace' and a new page is forced, then the pointed will be moved 
+  // if $mod is set to 'makeSpace' and a new page is forced, then the pointed will be moved
   // down on the new page, this will allow space to be reserved for graphics etc.
   // down on the new page, this will allow space to be reserved for graphics etc.
   $this->y += $dy;
   $this->y += $dy;
   if ( $this->y < $this->ez['bottomMargin']){
   if ( $this->y < $this->ez['bottomMargin']){
@@ -533,17 +533,17 @@ function ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$gap,$
   } else {
   } else {
     $options = array();
     $options = array();
   }
   }
-  
+
   $mx=0;
   $mx=0;
   $startPage = $this->ezPageCount;
   $startPage = $this->ezPageCount;
   $secondGo=0;
   $secondGo=0;
 
 
   // $y is the position at which the top of the table should start, so the base
   // $y is the position at which the top of the table should start, so the base
   // of the first text, is $y-$height-$gap-$decender, but ezText starts by dropping $height
   // of the first text, is $y-$height-$gap-$decender, but ezText starts by dropping $height
-  
+
   // the return from this function is the total cell height, including gaps, and $y is adjusted
   // the return from this function is the total cell height, including gaps, and $y is adjusted
   // to be the postion of the bottom line
   // to be the postion of the bottom line
-  
+
   // begin the transaction
   // begin the transaction
   $this->transaction('start');
   $this->transaction('start');
   $ok=0;
   $ok=0;
@@ -565,7 +565,7 @@ function ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$gap,$
     }
     }
     $y = $y - $mx - $gap + $decender;
     $y = $y - $mx - $gap + $decender;
 //    $y -= $mx-$gap+$decender;
 //    $y -= $mx-$gap+$decender;
-    
+
     // now, if this has moved to a new page, then abort the transaction, move to a new page, and put it there
     // now, if this has moved to a new page, then abort the transaction, move to a new page, and put it there
     // do not check on the second time around, to avoid an infinite loop
     // do not check on the second time around, to avoid an infinite loop
     if ($this->ezPageCount != $startPage && $secondGo==0){
     if ($this->ezPageCount != $startPage && $secondGo==0){
@@ -624,7 +624,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
   // 'colGap' => 5 , the space on the left and right sides of each cell
   // 'colGap' => 5 , the space on the left and right sides of each cell
   // 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black.
   // 'lineCol' => (r,g,b) array, defining the colour of the lines, default, black.
   // 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction
   // 'xPos' => 'left','right','center','centre',or coordinate, reference coordinate in the x-direction
-  // 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos' 
+  // 'xOrientation' => 'left','right','center','centre', position of the table w.r.t 'xPos'
   // 'width'=> <number> which will specify the width of the table, if it turns out to not be this
   // 'width'=> <number> which will specify the width of the table, if it turns out to not be this
   //    wide, then it will stretch the table to fit, if it is wider then each cell will be made
   //    wide, then it will stretch the table to fit, if it is wider then each cell will be made
   //    proportionalty smaller, and the content may have to wrap.
   //    proportionalty smaller, and the content may have to wrap.
@@ -639,13 +639,13 @@ function ezTable(&$data,$cols='',$title='',$options=''){
   // 'protectRows'=>number, the number of rows to hold with the heading on page, ie, if there less than this number of
   // 'protectRows'=>number, the number of rows to hold with the heading on page, ie, if there less than this number of
   //                rows on the page, then move the whole lot onto the next page, default=1
   //                rows on the page, then move the whole lot onto the next page, default=1
   //
   //
-  // note that the user will have had to make a font selection already or this will not 
+  // note that the user will have had to make a font selection already or this will not
   // produce a valid pdf file.
   // produce a valid pdf file.
-  
+
   if (!is_array($data)){
   if (!is_array($data)){
     return;
     return;
   }
   }
-  
+
   if (!is_array($cols)){
   if (!is_array($cols)){
     // take the columns from the first row of the data set
     // take the columns from the first row of the data set
     reset($data);
     reset($data);
@@ -658,7 +658,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
       $cols[$k1]=$k1;
       $cols[$k1]=$k1;
     }
     }
   }
   }
-  
+
   if (!is_array($options)){
   if (!is_array($options)){
     $options=array();
     $options=array();
   }
   }
@@ -682,7 +682,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     }
     }
   }
   }
   $options['gap']=2*$options['colGap'];
   $options['gap']=2*$options['colGap'];
-  
+
   $middle = ($this->ez['pageWidth']-$this->ez['rightMargin'])/2+($this->ez['leftMargin'])/2;
   $middle = ($this->ez['pageWidth']-$this->ez['rightMargin'])/2+($this->ez['leftMargin'])/2;
   // figure out the maximum widths of the text within each column
   // figure out the maximum widths of the text within each column
   $maxWidth=array();
   $maxWidth=array();
@@ -705,7 +705,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
       $maxWidth[$colName]=$w;
       $maxWidth[$colName]=$w;
     }
     }
   }
   }
-  
+
   // calculate the start positions of each of the columns
   // calculate the start positions of each of the columns
   $pos=array();
   $pos=array();
   $x=0;
   $x=0;
@@ -762,7 +762,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         $cols0[$colName]+= ($neededWidth-$presentWidth)/count($cols0);
         $cols0[$colName]+= ($neededWidth-$presentWidth)/count($cols0);
       }
       }
     } else {
     } else {
-    
+
       $cnt=0;
       $cnt=0;
       while ($presentWidth>$neededWidth && $cnt<100){
       while ($presentWidth>$neededWidth && $cnt<100){
         $cnt++; // insurance policy
         $cnt++; // insurance policy
@@ -858,7 +858,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
   $basePos = $pos;
   $basePos = $pos;
   $baseX0 = $x0;
   $baseX0 = $x0;
   $baseX1 = $x1;
   $baseX1 = $x1;
-  
+
   // ok, just about ready to make me a table
   // ok, just about ready to make me a table
   $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2]);
   $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][2]);
   $this->setStrokeColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2]);
   $this->setStrokeColor($options['shadeCol'][0],$options['shadeCol'][1],$options['shadeCol'][2]);
@@ -910,15 +910,15 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         }
         }
         $x0=$baseX0+$dm;
         $x0=$baseX0+$dm;
         $x1=$baseX1+$dm;
         $x1=$baseX1+$dm;
-  
+
   $y=$this->y; // to simplify the code a bit
   $y=$this->y; // to simplify the code a bit
-  
+
   // make the table
   // make the table
   $height = $this->getFontHeight($options['fontSize']);
   $height = $this->getFontHeight($options['fontSize']);
   $decender = $this->getFontDecender($options['fontSize']);
   $decender = $this->getFontDecender($options['fontSize']);
 
 
-  
-  
+
+
   $y0=$y+$decender;
   $y0=$y+$decender;
   $dy=0;
   $dy=0;
   if ($options['showHeadings']){
   if ($options['showHeadings']){
@@ -940,7 +940,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
   }
   }
   $firstLine=1;
   $firstLine=1;
 
 
-  
+
   // open an object here so that the text can be put in over the shading
   // open an object here so that the text can be put in over the shading
   if ($options['shaded']){
   if ($options['shaded']){
     $this->saveState();
     $this->saveState();
@@ -949,7 +949,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     $this->addObject($textObjectId);
     $this->addObject($textObjectId);
     $this->reopenObject($textObjectId);
     $this->reopenObject($textObjectId);
   }
   }
-  
+
   $cnt=0;
   $cnt=0;
   $newPage=0;
   $newPage=0;
   foreach($data as $row){
   foreach($data as $row){
@@ -973,7 +973,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     $mx=0;
     $mx=0;
     $newRow=1;
     $newRow=1;
     while(!$abortTable && ($newPage || $newRow)){
     while(!$abortTable && ($newPage || $newRow)){
-      
+
       $y-=$height;
       $y-=$height;
       if ($newPage || $y<$this->ez['bottomMargin'] || (isset($options['minRowSpace']) && $y<($this->ez['bottomMargin']+$options['minRowSpace'])) ){
       if ($newPage || $y<$this->ez['bottomMargin'] || (isset($options['minRowSpace']) && $y<($this->ez['bottomMargin']+$options['minRowSpace'])) ){
         // check that enough rows are with the heading
         // check that enough rows are with the heading
@@ -982,7 +982,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
           $movedOnce = 1;
           $movedOnce = 1;
           $abortTable = 1;
           $abortTable = 1;
         }
         }
-      
+
         $y2=$y-$mx+2*$height+$decender-$newRow*$height;
         $y2=$y-$mx+2*$height+$decender-$newRow*$height;
         if ($options['showLines']){
         if ($options['showLines']){
           if (!$options['showHeadings']){
           if (!$options['showHeadings']){
@@ -1006,7 +1006,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
 //        $x1=$x1+$dm;
 //        $x1=$x1+$dm;
         $x0=$baseX0+$dm;
         $x0=$baseX0+$dm;
         $x1=$baseX1+$dm;
         $x1=$baseX1+$dm;
-  
+
         if ($options['shaded']){
         if ($options['shaded']){
           $this->saveState();
           $this->saveState();
           $textObjectId = $this->openObject();
           $textObjectId = $this->openObject();
@@ -1039,7 +1039,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         $colNewPage=0;
         $colNewPage=0;
         if (isset($row[$colName])){
         if (isset($row[$colName])){
           if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['link']) && strlen($options['cols'][$colName]['link'])){
           if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['link']) && strlen($options['cols'][$colName]['link'])){
-            
+
             $lines = explode("\n",$row[$colName]);
             $lines = explode("\n",$row[$colName]);
             if (isset($row[$options['cols'][$colName]['link']]) && strlen($row[$options['cols'][$colName]['link']])){
             if (isset($row[$options['cols'][$colName]['link']]) && strlen($row[$options['cols'][$colName]['link']])){
               foreach($lines as $k=>$v){
               foreach($lines as $k=>$v){
@@ -1085,7 +1085,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
             }
             }
           }
           }
         }
         }
-  
+
         $dy=$y+$height-$this->y+$options['rowGap'];
         $dy=$y+$height-$this->y+$options['rowGap'];
         if ($dy-$height*$newPage>$mx){
         if ($dy-$height*$newPage>$mx){
           $mx=$dy-$height*$newPage;
           $mx=$dy-$height*$newPage;
@@ -1124,9 +1124,9 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         $this->restoreState();
         $this->restoreState();
 //        $this->reopenObject($textObjectId);
 //        $this->reopenObject($textObjectId);
       }
       }
-    } // end of while 
+    } // end of while
     $y=$y-$mx+$height;
     $y=$y-$mx+$height;
-    
+
     // checking row split over pages
     // checking row split over pages
     if ($options['splitRows']==0){
     if ($options['splitRows']==0){
       if ( ( ($this->ezPageCount != $pageStart) || (isset($this->ez['columns']) && $this->ez['columns']['on']==1 && $columnStart != $this->ez['columns']['colNum'] ))  && $secondTurn==0){
       if ( ( ($this->ezPageCount != $pageStart) || (isset($this->ez['columns']) && $this->ez['columns']['on']==1 && $columnStart != $this->ez['columns']['colNum'] ))  && $secondTurn==0){
@@ -1154,7 +1154,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     } else {
     } else {
       $ok=1;  // don't go round the loop if splitting rows is allowed
       $ok=1;  // don't go round the loop if splitting rows is allowed
     }
     }
-    
+
     }  // end of while to check for row splitting
     }  // end of while to check for row splitting
     if ($abortTable){
     if ($abortTable){
       if ($ok==0){
       if ($ok==0){
@@ -1165,9 +1165,9 @@ function ezTable(&$data,$cols='',$title='',$options=''){
       $this->ezNewPage();
       $this->ezNewPage();
       break;
       break;
     }
     }
-    
+
   } // end of foreach ($data as $row)
   } // end of foreach ($data as $row)
-  
+
   } // end of while ($abortTable)
   } // end of while ($abortTable)
 
 
   // table has been put on the page, the rows guarded as required, commit.
   // table has been put on the page, the rows guarded as required, commit.
@@ -1186,7 +1186,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     $this->closeObject();
     $this->closeObject();
     $this->restoreState();
     $this->restoreState();
   }
   }
-  
+
   $this->y=$y;
   $this->y=$y;
   return $y;
   return $y;
 }
 }
@@ -1219,15 +1219,15 @@ function ezText($text,$size=0,$options=array(),$test=0){
   // only set one of the next two items (leading overrides spacing)
   // only set one of the next two items (leading overrides spacing)
   // 'leading' => number, defines the total height taken by the line, independent of the font height.
   // 'leading' => number, defines the total height taken by the line, independent of the font height.
   // 'spacing' => a real number, though usually set to one of 1, 1.5, 2 (line spacing as used in word processing)
   // 'spacing' => a real number, though usually set to one of 1, 1.5, 2 (line spacing as used in word processing)
-  
+
   // if $test is set then this should just check if the text is going to flow onto a new page or not, returning true or false
   // if $test is set then this should just check if the text is going to flow onto a new page or not, returning true or false
-  
+
   // apply the filtering which will make the underlining function.
   // apply the filtering which will make the underlining function.
   $text = $this->ezProcessText($text);
   $text = $this->ezProcessText($text);
-  
+
   $newPage=false;
   $newPage=false;
   $store_y = $this->y;
   $store_y = $this->y;
-  
+
   if (is_array($options) && isset($options['aleft'])){
   if (is_array($options) && isset($options['aleft'])){
     $left=$options['aleft'];
     $left=$options['aleft'];
   } else {
   } else {
@@ -1243,13 +1243,13 @@ function ezText($text,$size=0,$options=array(),$test=0){
   } else {
   } else {
     $this->ez['fontSize']=$size;
     $this->ez['fontSize']=$size;
   }
   }
-  
+
   if (is_array($options) && isset($options['justification'])){
   if (is_array($options) && isset($options['justification'])){
     $just = $options['justification'];
     $just = $options['justification'];
   } else {
   } else {
     $just = 'left';
     $just = 'left';
   }
   }
-  
+
   // modifications to give leading and spacing based on those given by Craig Heydenburg 1/1/02
   // modifications to give leading and spacing based on those given by Craig Heydenburg 1/1/02
   if (is_array($options) && isset($options['leading'])) { ## use leading instead of spacing
   if (is_array($options) && isset($options['leading'])) { ## use leading instead of spacing
     $height = $options['leading'];
     $height = $options['leading'];
@@ -1259,7 +1259,7 @@ function ezText($text,$size=0,$options=array(),$test=0){
 		$height = $this->getFontHeight($size);
 		$height = $this->getFontHeight($size);
 	}
 	}
 
 
-  
+
   $lines = explode("\n",$text);
   $lines = explode("\n",$text);
   foreach ($lines as $line)
   foreach ($lines as $line)
   {
   {
@@ -1272,13 +1272,13 @@ function ezText($text,$size=0,$options=array(),$test=0){
       $this->y=$this->y-$height; //make Y position depend on font-size
       $this->y=$this->y-$height; //make Y position depend on font-size
       if ($this->y < $this->ez['bottomMargin'])
       if ($this->y < $this->ez['bottomMargin'])
       {
       {
-      	//if this vertical position (Y) is not out of the page 
+      	//if this vertical position (Y) is not out of the page
         if ($test)
         if ($test)
         {
         {
           //we are on a new page, nothing to do
           //we are on a new page, nothing to do
           $newPage=true;
           $newPage=true;
         }
         }
-        else 
+        else
         {
         {
           //else start new page
           //else start new page
           $this->ezNewPage();
           $this->ezNewPage();
@@ -1416,7 +1416,7 @@ function ezImage($image,$pad = 5,$width = 0,$resize = 'full',$just = 'center',$b
 	if (!(isset($border['width']))) $border['width'] = 1;
 	if (!(isset($border['width']))) $border['width'] = 1;
 	if (!(isset($border['cap']))) $border['cap'] = 'round';
 	if (!(isset($border['cap']))) $border['cap'] = 'round';
 	if (!(isset($border['join']))) $border['join'] = 'round';
 	if (!(isset($border['join']))) $border['join'] = 'round';
-	
+
 
 
 	$this->setStrokeColor($border['color']['red'],$border['color']['green'],$border['color']['blue']);
 	$this->setStrokeColor($border['color']['red'],$border['color']['green'],$border['color']['blue']);
 	$this->setLineStyle($border['width'],$border['cap'],$border['join']);
 	$this->setLineStyle($border['width'],$border['cap'],$border['join']);
@@ -1435,7 +1435,7 @@ function ezImage($image,$pad = 5,$width = 0,$resize = 'full',$just = 'center',$b
 // out a good way of doing this yet.
 // out a good way of doing this yet.
 function loadTemplate($templateFile){
 function loadTemplate($templateFile){
   // this function will load the requested template ($file includes full or relative pathname)
   // this function will load the requested template ($file includes full or relative pathname)
-  // the code for the template will be modified to make it name safe, and then stored in 
+  // the code for the template will be modified to make it name safe, and then stored in
   // an array for later use
   // an array for later use
   // The id of the template will be returned for the user to operate on it later
   // The id of the template will be returned for the user to operate on it later
   if (!file_exists($templateFile)){
   if (!file_exists($templateFile)){
@@ -1534,7 +1534,7 @@ function uline($info){
   switch($info['status']){
   switch($info['status']){
     case 'start':
     case 'start':
     case 'sol':
     case 'sol':
-    
+
       // the beginning of the underline zone
       // the beginning of the underline zone
       if (!isset($this->ez['links'])){
       if (!isset($this->ez['links'])){
         $this->ez['links']=array();
         $this->ez['links']=array();

+ 84 - 84
main/inc/lib/ezpdf/class.pdf.php

@@ -12,7 +12,7 @@
 *
 *
 * IMPORTANT NOTE
 * IMPORTANT NOTE
 * there is no warranty, implied or otherwise with this software.
 * there is no warranty, implied or otherwise with this software.
-* 
+*
 * LICENCE
 * LICENCE
 * This code has been placed in the Public Domain for all to enjoy.
 * This code has been placed in the Public Domain for all to enjoy.
 *
 *
@@ -38,7 +38,7 @@ var $catalogId;
 * array carrying information about the fonts that the system currently knows about
 * array carrying information about the fonts that the system currently knows about
 * used to ensure that a font is not loaded twice, among other things
 * used to ensure that a font is not loaded twice, among other things
 */
 */
-var $fonts=array(); 
+var $fonts=array();
 /**
 /**
 * a record of the current font
 * a record of the current font
 */
 */
@@ -52,7 +52,7 @@ var $currentBaseFont='';
 */
 */
 var $currentFontNum=0;
 var $currentFontNum=0;
 /**
 /**
-* 
+*
 */
 */
 var $currentNode;
 var $currentNode;
 /**
 /**
@@ -145,7 +145,7 @@ var $fontFamilies = array();
 /**
 /**
 * track if the current font is bolded or italicised
 * track if the current font is bolded or italicised
 */
 */
-var $currentTextState = ''; 
+var $currentTextState = '';
 /**
 /**
 * messages are stored here during processing, these can be selected afterwards to give some useful debug information
 * messages are stored here during processing, these can be selected afterwards to give some useful debug information
 */
 */
@@ -184,7 +184,7 @@ var $nCallback = 0;
 */
 */
 var $destinations = array();
 var $destinations = array();
 /**
 /**
-* store the stack for the transaction commands, each item in here is a record of the values of all the 
+* store the stack for the transaction commands, each item in here is a record of the values of all the
 * variables within the class, so that the user can rollback at will (from each 'start' command)
 * variables within the class, so that the user can rollback at will (from each 'start' command)
 * note that this includes the objects array, so these can be large.
 * note that this includes the objects array, so these can be large.
 */
 */
@@ -196,7 +196,7 @@ var $checkpoint = '';
 */
 */
 function Cpdf ($pageSize=array(0,0,612,792)){
 function Cpdf ($pageSize=array(0,0,612,792)){
   $this->newDocument($pageSize);
   $this->newDocument($pageSize);
-  
+
   // also initialize the font families that are known about already
   // also initialize the font families that are known about already
   $this->setFontFamily('init');
   $this->setFontFamily('init');
 //  $this->fileIdentifier = md5('xxxxxxxx'.time());
 //  $this->fileIdentifier = md5('xxxxxxxx'.time());
@@ -214,7 +214,7 @@ function Cpdf ($pageSize=array(0,0,612,792)){
 *           'out' - produce the output for the pdf object
 *           'out' - produce the output for the pdf object
 * $options = optional, a string or array containing the various parameters for the object
 * $options = optional, a string or array containing the various parameters for the object
 *
 *
-* These, in conjunction with the output function are the ONLY way for output to be produced 
+* These, in conjunction with the output function are the ONLY way for output to be produced
 * within the pdf 'file'.
 * within the pdf 'file'.
 */
 */
 
 
@@ -383,7 +383,7 @@ function o_pages($id,$action,$options=''){
               $o['info']['pages'][$k]=$options['id'];
               $o['info']['pages'][$k]=$options['id'];
             }
             }
           }
           }
-        } 
+        }
       }
       }
       break;
       break;
     case 'procset':
     case 'procset':
@@ -764,7 +764,7 @@ function o_action($id,$action,$options=''){
 
 
 /**
 /**
 * an annotation object, this will add an annotation to the current page.
 * an annotation object, this will add an annotation to the current page.
-* initially will support just link annotations 
+* initially will support just link annotations
 */
 */
 function o_annotation($id,$action,$options=''){
 function o_annotation($id,$action,$options=''){
   if ($action!='new'){
   if ($action!='new'){
@@ -1055,7 +1055,7 @@ function o_encryption($id,$action,$options=''){
 
 
       $this->objects[$id]['info']['U']=$uvalue;
       $this->objects[$id]['info']['U']=$uvalue;
       $this->encryptionKey=$ukey;
       $this->encryptionKey=$ukey;
-     
+
       // initialize the arc4 array
       // initialize the arc4 array
       break;
       break;
     case 'out':
     case 'out':
@@ -1069,12 +1069,12 @@ function o_encryption($id,$action,$options=''){
       $o['info']['p'] = (($o['info']['p']^255)+1)*-1;
       $o['info']['p'] = (($o['info']['p']^255)+1)*-1;
       $res.="\n/P ".($o['info']['p']);
       $res.="\n/P ".($o['info']['p']);
       $res.="\n>>\nendobj\n";
       $res.="\n>>\nendobj\n";
-      
+
       return $res;
       return $res;
       break;
       break;
   }
   }
 }
 }
-      
+
 /**
 /**
 * ARC4 functions
 * ARC4 functions
 * A series of function to implement ARC4 encoding in PHP
 * A series of function to implement ARC4 encoding in PHP
@@ -1093,7 +1093,7 @@ function md5_16($string){
 }
 }
 
 
 /**
 /**
-* initialize the encryption for processing a particular object 
+* initialize the encryption for processing a particular object
 */
 */
 function encryptInit($id){
 function encryptInit($id){
   $tmp = $this->encryptionKey;
   $tmp = $this->encryptionKey;
@@ -1129,7 +1129,7 @@ function ARC4_init($key=''){
     $j = ($j + ord($t) + ord($k[$i]))%256;
     $j = ($j + ord($t) + ord($k[$i]))%256;
     $this->arc4[$i]=$this->arc4[$j];
     $this->arc4[$i]=$this->arc4[$j];
     $this->arc4[$j]=$t;
     $this->arc4[$j]=$t;
-  }    
+  }
 }
 }
 
 
 /**
 /**
@@ -1150,7 +1150,7 @@ function ARC4($text){
     $k = ord($c[(ord($c[$a])+ord($c[$b]))%256]);
     $k = ord($c[(ord($c[$a])+ord($c[$b]))%256]);
     $out.=chr(ord($text[$i]) ^ $k);
     $out.=chr(ord($text[$i]) ^ $k);
   }
   }
-  
+
   return $out;
   return $out;
 }
 }
 
 
@@ -1289,7 +1289,7 @@ function newDocument($pageSize=array(0,0,612,792)){
   $this->numObj++;
   $this->numObj++;
   $this->o_page($this->numObj,'new');
   $this->o_page($this->numObj,'new');
 
 
-  // need to store the first page id as there is no way to get it to the user during 
+  // need to store the first page id as there is no way to get it to the user during
   // startup
   // startup
   $this->firstPageId = $this->currentContents;
   $this->firstPageId = $this->currentContents;
 }
 }
@@ -1455,7 +1455,7 @@ function selectFont($fontName,$encoding='',$set=1){
         $fbtype='';
         $fbtype='';
       }
       }
       $fbfile = $basefile.'.'.$fbtype;
       $fbfile = $basefile.'.'.$fbtype;
-      
+
 //      $pfbfile = substr($fontName,0,strlen($fontName)-4).'.pfb';
 //      $pfbfile = substr($fontName,0,strlen($fontName)-4).'.pfb';
 //      $ttffile = substr($fontName,0,strlen($fontName)-4).'.ttf';
 //      $ttffile = substr($fontName,0,strlen($fontName)-4).'.ttf';
       $this->addMessage('selectFont: checking for - '.$fbfile);
       $this->addMessage('selectFont: checking for - '.$fbfile);
@@ -1507,7 +1507,7 @@ function selectFont($fontName,$encoding='',$set=1){
         $widthid = $this->numObj;
         $widthid = $this->numObj;
 
 
         // load the pfb file, and put that into an object too.
         // load the pfb file, and put that into an object too.
-        // note that pdf supports only binary format type 1 font files, though there is a 
+        // note that pdf supports only binary format type 1 font files, though there is a
         // simple utility to convert them from pfa to pfb.
         // simple utility to convert them from pfa to pfb.
         $fp = fopen($fbfile,'rb');
         $fp = fopen($fbfile,'rb');
         $tmp = get_magic_quotes_runtime();
         $tmp = get_magic_quotes_runtime();
@@ -1544,7 +1544,7 @@ function selectFont($fontName,$encoding='',$set=1){
         } else if ($fbtype=='ttf'){
         } else if ($fbtype=='ttf'){
           $fdopt['FontFile2']=$pfbid;
           $fdopt['FontFile2']=$pfbid;
         }
         }
-        $this->o_fontDescriptor($fontDescriptorId,'new',$fdopt);        
+        $this->o_fontDescriptor($fontDescriptorId,'new',$fdopt);
 
 
         // embed the font program
         // embed the font program
         $this->o_contents($this->numObj,'new');
         $this->o_contents($this->numObj,'new');
@@ -1579,7 +1579,7 @@ function selectFont($fontName,$encoding='',$set=1){
       }
       }
 
 
 
 
-      // also set the differences here, note that this means that these will take effect only the 
+      // also set the differences here, note that this means that these will take effect only the
       //first time that a font is selected, else they are ignored
       //first time that a font is selected, else they are ignored
       if (isset($options['differences'])){
       if (isset($options['differences'])){
         $this->fonts[$fontName]['differences']=$options['differences'];
         $this->fonts[$fontName]['differences']=$options['differences'];
@@ -1603,7 +1603,7 @@ function selectFont($fontName,$encoding='',$set=1){
 * This function is to be called whenever the currentTextState is changed, it will update
 * This function is to be called whenever the currentTextState is changed, it will update
 * the currentFont setting to whatever the appropriatte family one is.
 * the currentFont setting to whatever the appropriatte family one is.
 * If the user calls selectFont themselves then that will reset the currentBaseFont, and the currentFont
 * If the user calls selectFont themselves then that will reset the currentBaseFont, and the currentFont
-* This function will change the currentFont to whatever it should be, but will not change the 
+* This function will change the currentFont to whatever it should be, but will not change the
 * currentBaseFont.
 * currentBaseFont.
 *
 *
 * @access private
 * @access private
@@ -1615,7 +1615,7 @@ function setCurrentFont(){
   }
   }
   $cf = substr($this->currentBaseFont,strrpos($this->currentBaseFont,'/')+1);
   $cf = substr($this->currentBaseFont,strrpos($this->currentBaseFont,'/')+1);
   if (strlen($this->currentTextState)
   if (strlen($this->currentTextState)
-    && isset($this->fontFamilies[$cf]) 
+    && isset($this->fontFamilies[$cf])
       && isset($this->fontFamilies[$cf][$this->currentTextState])){
       && isset($this->fontFamilies[$cf][$this->currentTextState])){
     // then we are in some state or another
     // then we are in some state or another
     // and this font has a family, and the current setting exists within it
     // and this font has a family, and the current setting exists within it
@@ -1628,7 +1628,7 @@ function setCurrentFont(){
     // the this font must not have the right family member for the current state
     // the this font must not have the right family member for the current state
     // simply assume the base font
     // simply assume the base font
     $this->currentFont = $this->currentBaseFont;
     $this->currentFont = $this->currentBaseFont;
-    $this->currentFontNum = $this->fonts[$this->currentFont]['fontNum'];    
+    $this->currentFontNum = $this->fonts[$this->currentFont]['fontNum'];
   }
   }
 }
 }
 
 
@@ -1707,7 +1707,7 @@ function filledEllipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360
 * draws an ellipse in the current line style
 * draws an ellipse in the current line style
 * centered at $x0,$y0, radii $r1,$r2
 * centered at $x0,$y0, radii $r1,$r2
 * if $r2 is not set, then a circle is drawn
 * if $r2 is not set, then a circle is drawn
-* nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a 
+* nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a
 * pretty crappy shape at 2, as we are approximating with bezier curves.
 * pretty crappy shape at 2, as we are approximating with bezier curves.
 */
 */
 function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0){
 function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0){
@@ -1757,7 +1757,7 @@ function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$clos
     $a0=$a1;
     $a0=$a1;
     $b0=$b1;
     $b0=$b1;
     $c0=$c1;
     $c0=$c1;
-    $d0=$d1;    
+    $d0=$d1;
   }
   }
   if ($fill){
   if ($fill){
     $this->objects[$this->currentContents]['c'].=' f';
     $this->objects[$this->currentContents]['c'].=' f';
@@ -1784,7 +1784,7 @@ function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$clos
 *   on and off dashes.
 *   on and off dashes.
 *   (2) represents 2 on, 2 off, 2 on , 2 off ...
 *   (2) represents 2 on, 2 off, 2 on , 2 off ...
 *   (2,1) is 2 on, 1 off, 2 on, 1 off.. etc
 *   (2,1) is 2 on, 1 off, 2 on, 1 off.. etc
-* phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts. 
+* phase is a modifier on the dash pattern which is used to shift the point at which the pattern starts.
 */
 */
 function setLineStyle($width=1,$cap='',$join='',$dash='',$phase=0){
 function setLineStyle($width=1,$cap='',$join='',$dash='',$phase=0){
 
 
@@ -1852,7 +1852,7 @@ function newPage($insert=0,$id=0,$pos='after'){
 
 
   // if there is a state saved, then go up the stack closing them
   // if there is a state saved, then go up the stack closing them
   // then on the new page, re-open them with the right setings
   // then on the new page, re-open them with the right setings
-  
+
   if ($this->nStateStack){
   if ($this->nStateStack){
     for ($i=$this->nStateStack;$i>=1;$i--){
     for ($i=$this->nStateStack;$i>=1;$i--){
       $this->restoreState($i);
       $this->restoreState($i);
@@ -1874,7 +1874,7 @@ function newPage($insert=0,$id=0,$pos='after'){
     for ($i=1;$i<=$this->nStateStack;$i++){
     for ($i=1;$i<=$this->nStateStack;$i++){
       $this->saveState($i);
       $this->saveState($i);
     }
     }
-  }  
+  }
   // and if there has been a stroke or fill colour set, then transfer them
   // and if there has been a stroke or fill colour set, then transfer them
   if ($this->currentColour['r']>=0){
   if ($this->currentColour['r']>=0){
     $this->setColor($this->currentColour['r'],$this->currentColour['g'],$this->currentColour['b'],1);
     $this->setColor($this->currentColour['r'],$this->currentColour['g'],$this->currentColour['b'],1);
@@ -1899,7 +1899,7 @@ function newPage($insert=0,$id=0,$pos='after'){
 function stream($options=''){
 function stream($options=''){
   // setting the options allows the adjustment of the headers
   // setting the options allows the adjustment of the headers
   // values at the moment are:
   // values at the moment are:
-  // 'Content-Disposition'=>'filename'  - sets the filename, though not too sure how well this will 
+  // 'Content-Disposition'=>'filename'  - sets the filename, though not too sure how well this will
   //        work as in my trial the browser seems to use the filename of the php file with .pdf on the end
   //        work as in my trial the browser seems to use the filename of the php file with .pdf on the end
   // 'Accept-Ranges'=>1 or 0 - if this is not set to 1, then this header is not included, off by default
   // 'Accept-Ranges'=>1 or 0 - if this is not set to 1, then this header is not included, off by default
   //    this header seems to have caused some problems despite tha fact that it is supposed to solve
   //    this header seems to have caused some problems despite tha fact that it is supposed to solve
@@ -1918,7 +1918,7 @@ function stream($options=''){
   $fileName = (isset($options['Content-Disposition'])?$options['Content-Disposition']:'file.pdf');
   $fileName = (isset($options['Content-Disposition'])?$options['Content-Disposition']:'file.pdf');
   header("Content-Disposition: inline; filename=".$fileName);
   header("Content-Disposition: inline; filename=".$fileName);
   if (isset($options['Accept-Ranges']) && $options['Accept-Ranges']==1){
   if (isset($options['Accept-Ranges']) && $options['Accept-Ranges']==1){
-    header("Accept-Ranges: ".strlen(ltrim($tmp))); 
+    header("Accept-Ranges: ".strlen(ltrim($tmp)));
   }
   }
   echo ltrim($tmp);
   echo ltrim($tmp);
 }
 }
@@ -1969,7 +1969,7 @@ function filterText($text){
 }
 }
 
 
 /**
 /**
-* given a start position and information about how text is to be laid out, calculate where 
+* given a start position and information about how text is to be laid out, calculate where
 * on the page the text will end
 * on the page the text will end
 *
 *
 * @access private
 * @access private
@@ -2146,7 +2146,7 @@ function PRVTcheckTextDirective1(&$text,$i,&$f,$final,&$x,&$y,$size=0,$angle=0,$
         }
         }
         break;
         break;
     }
     }
-  } 
+  }
   return $directive;
   return $directive;
 }
 }
 
 
@@ -2199,7 +2199,7 @@ function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
         $xp=$x;
         $xp=$x;
         $yp=$y;
         $yp=$y;
         $directive = $this->PRVTcheckTextDirective1($text,$i,$f,1,$xp,$yp,$size,$angle,$wordSpaceAdjust);
         $directive = $this->PRVTcheckTextDirective1($text,$i,$f,1,$xp,$yp,$size,$angle,$wordSpaceAdjust);
-        
+
         // restart the text object
         // restart the text object
           if ($angle==0){
           if ($angle==0){
             $this->objects[$this->currentContents]['c'].="\n".'BT '.sprintf('%.3f',$xp).' '.sprintf('%.3f',$yp).' Td';
             $this->objects[$this->currentContents]['c'].="\n".'BT '.sprintf('%.3f',$xp).' '.sprintf('%.3f',$yp).' Td';
@@ -2219,7 +2219,7 @@ function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
       $i=$i+$directive-1;
       $i=$i+$directive-1;
       $start=$i+1;
       $start=$i+1;
     }
     }
-    
+
   }
   }
   if ($start<$len){
   if ($start<$len){
     $part = substr($text,$start);
     $part = substr($text,$start);
@@ -2284,7 +2284,7 @@ function getTextWidth($size,$text){
       }
       }
     }
     }
   }
   }
-  
+
   $this->currentTextState = $store_currentTextState;
   $this->currentTextState = $store_currentTextState;
   $this->setCurrentFont();
   $this->setCurrentFont();
 
 
@@ -2328,7 +2328,7 @@ function PRVTadjustWrapText($text,$actual,$width,&$x,&$adjust,$justification){
 * justification and angle can also be specified for the text
 * justification and angle can also be specified for the text
 */
 */
 function addTextWrap($x,$y,$width,$size,$text,$justification='left',$angle=0,$test=0){
 function addTextWrap($x,$y,$width,$size,$text,$justification='left',$angle=0,$test=0){
-  // this will display the text, and if it goes beyond the width $width, will backtrack to the 
+  // this will display the text, and if it goes beyond the width $width, will backtrack to the
   // previous space or hyphen, and return the remainder of the text.
   // previous space or hyphen, and return the remainder of the text.
   // $justification can be set to 'left','right','center','centre','full'
   // $justification can be set to 'left','right','center','centre','full'
 
 
@@ -2363,7 +2363,7 @@ function addTextWrap($x,$y,$width,$size,$text,$justification='left',$angle=0,$te
       } else {
       } else {
         $cOrd2 = $cOrd;
         $cOrd2 = $cOrd;
       }
       }
-  
+
       if (isset($this->fonts[$cf]['C'][$cOrd2]['WX'])){
       if (isset($this->fonts[$cf]['C'][$cOrd2]['WX'])){
         $w+=$this->fonts[$cf]['C'][$cOrd2]['WX'];
         $w+=$this->fonts[$cf]['C'][$cOrd2]['WX'];
       }
       }
@@ -2436,14 +2436,14 @@ function addTextWrap($x,$y,$width,$size,$text,$justification='left',$angle=0,$te
 }
 }
 
 
 /**
 /**
-* this will be called at a new page to return the state to what it was on the 
+* this will be called at a new page to return the state to what it was on the
 * end of the previous page, before the stack was closed down
 * end of the previous page, before the stack was closed down
 * This is to get around not being able to have open 'q' across pages
 * This is to get around not being able to have open 'q' across pages
 *
 *
 */
 */
 function saveState($pageEnd=0){
 function saveState($pageEnd=0){
   if ($pageEnd){
   if ($pageEnd){
-    // this will be called at a new page to return the state to what it was on the 
+    // this will be called at a new page to return the state to what it was on the
     // end of the previous page, before the stack was closed down
     // end of the previous page, before the stack was closed down
     // This is to get around not being able to have open 'q' across pages
     // This is to get around not being able to have open 'q' across pages
     $opt = $this->stateStack[$pageEnd]; // ok to use this as stack starts numbering at 1
     $opt = $this->stateStack[$pageEnd]; // ok to use this as stack starts numbering at 1
@@ -2492,7 +2492,7 @@ function openObject(){
   $this->o_contents($this->numObj,'new');
   $this->o_contents($this->numObj,'new');
   $this->currentContents=$this->numObj;
   $this->currentContents=$this->numObj;
   $this->looseObjects[$this->numObj]=1;
   $this->looseObjects[$this->numObj]=1;
-  
+
   return $this->numObj;
   return $this->numObj;
 }
 }
 
 
@@ -2544,8 +2544,8 @@ function addObject($id,$options='add'){
     // then it is a valid object, and it is not being added to itself
     // then it is a valid object, and it is not being added to itself
     switch($options){
     switch($options){
       case 'all':
       case 'all':
-        // then this object is to be added to this page (done in the next block) and 
-        // all future new pages. 
+        // then this object is to be added to this page (done in the next block) and
+        // all future new pages.
         $this->addLooseObjects[$id]='all';
         $this->addLooseObjects[$id]='all';
       case 'add':
       case 'add':
         if (isset($this->objects[$this->currentContents]['onPage'])){
         if (isset($this->objects[$this->currentContents]['onPage'])){
@@ -2648,7 +2648,7 @@ function addPngFromFile($file,$x,$y,$w=0,$h=0){
     $errormsg = 'trouble opening file: '.$file;
     $errormsg = 'trouble opening file: '.$file;
   }
   }
   set_magic_quotes_runtime($tmp);
   set_magic_quotes_runtime($tmp);
-  
+
   if (!$error){
   if (!$error){
     $header = chr(137).chr(80).chr(78).chr(71).chr(13).chr(10).chr(26).chr(10);
     $header = chr(137).chr(80).chr(78).chr(71).chr(13).chr(10).chr(26).chr(10);
     if (substr($data,0,8)!=$header){
     if (substr($data,0,8)!=$header){
@@ -2670,7 +2670,7 @@ function addPngFromFile($file,$x,$y,$w=0,$h=0){
       $chunkLen = $this->PRVT_getBytes($data,$p,4);
       $chunkLen = $this->PRVT_getBytes($data,$p,4);
       $chunkType = substr($data,$p+4,4);
       $chunkType = substr($data,$p+4,4);
 //      echo $chunkType.' - '.$chunkLen.'<br>';
 //      echo $chunkType.' - '.$chunkLen.'<br>';
-    
+
       switch($chunkType){
       switch($chunkType){
         case 'IHDR':
         case 'IHDR':
           // this is where all the file information comes from
           // this is where all the file information comes from
@@ -2698,16 +2698,16 @@ function addPngFromFile($file,$x,$y,$w=0,$h=0){
         case 'IDAT':
         case 'IDAT':
           $idata.=substr($data,$p+8,$chunkLen);
           $idata.=substr($data,$p+8,$chunkLen);
           break;
           break;
-        case 'tRNS': 
-          //this chunk can only occur once and it must occur after the PLTE chunk and before IDAT chunk 
-          //print "tRNS found, color type = ".$info['colorType']."<BR>"; 
+        case 'tRNS':
+          //this chunk can only occur once and it must occur after the PLTE chunk and before IDAT chunk
+          //print "tRNS found, color type = ".$info['colorType']."<BR>";
           $transparency = array();
           $transparency = array();
-          if ($info['colorType'] == 3) { // indexed color, rbg 
-          /* corresponding to entries in the plte chunk 
-          Alpha for palette index 0: 1 byte 
-          Alpha for palette index 1: 1 byte 
-          ...etc... 
-          */ 
+          if ($info['colorType'] == 3) { // indexed color, rbg
+          /* corresponding to entries in the plte chunk
+          Alpha for palette index 0: 1 byte
+          Alpha for palette index 1: 1 byte
+          ...etc...
+          */
             // there will be one entry for each palette entry. up until the last non-opaque entry.
             // there will be one entry for each palette entry. up until the last non-opaque entry.
             // set up an array, stretching over all palette entries which will be o (opaque) or 1 (transparent)
             // set up an array, stretching over all palette entries which will be o (opaque) or 1 (transparent)
             $transparency['type']='indexed';
             $transparency['type']='indexed';
@@ -2719,37 +2719,37 @@ function addPngFromFile($file,$x,$y,$w=0,$h=0){
               }
               }
             }
             }
             $transparency['data'] = $trans;
             $transparency['data'] = $trans;
-            
-          } elseif($info['colorType'] == 0) { // grayscale 
-          /* corresponding to entries in the plte chunk 
-          Gray: 2 bytes, range 0 .. (2^bitdepth)-1 
-          */ 
-//            $transparency['grayscale']=$this->PRVT_getBytes($data,$p+8,2); // g = grayscale 
+
+          } elseif($info['colorType'] == 0) { // grayscale
+          /* corresponding to entries in the plte chunk
+          Gray: 2 bytes, range 0 .. (2^bitdepth)-1
+          */
+//            $transparency['grayscale']=$this->PRVT_getBytes($data,$p+8,2); // g = grayscale
             $transparency['type']='indexed';
             $transparency['type']='indexed';
             $transparency['data'] = ord($data[$p+8+1]);
             $transparency['data'] = ord($data[$p+8+1]);
-          
-          } elseif($info['colorType'] == 2) { // truecolor 
-          /* corresponding to entries in the plte chunk 
-          Red: 2 bytes, range 0 .. (2^bitdepth)-1 
-          Green: 2 bytes, range 0 .. (2^bitdepth)-1 
-          Blue: 2 bytes, range 0 .. (2^bitdepth)-1 
-          */ 
-            $transparency['r']=$this->PRVT_getBytes($data,$p+8,2); // r from truecolor 
-            $transparency['g']=$this->PRVT_getBytes($data,$p+10,2); // g from truecolor 
-            $transparency['b']=$this->PRVT_getBytes($data,$p+12,2); // b from truecolor 
-          
-          } else { 
-          //unsupported transparency type 
-          } 
-          // KS End new code 
-          break; 
+
+          } elseif($info['colorType'] == 2) { // truecolor
+          /* corresponding to entries in the plte chunk
+          Red: 2 bytes, range 0 .. (2^bitdepth)-1
+          Green: 2 bytes, range 0 .. (2^bitdepth)-1
+          Blue: 2 bytes, range 0 .. (2^bitdepth)-1
+          */
+            $transparency['r']=$this->PRVT_getBytes($data,$p+8,2); // r from truecolor
+            $transparency['g']=$this->PRVT_getBytes($data,$p+10,2); // g from truecolor
+            $transparency['b']=$this->PRVT_getBytes($data,$p+12,2); // b from truecolor
+
+          } else {
+          //unsupported transparency type
+          }
+          // KS End new code
+          break;
         default:
         default:
           break;
           break;
       }
       }
-    
+
       $p += $chunkLen+12;
       $p += $chunkLen+12;
     }
     }
-    
+
     if(!$haveHeader){
     if(!$haveHeader){
       $error = 1;
       $error = 1;
       $errormsg = 'information header is missing';
       $errormsg = 'information header is missing';
@@ -2853,7 +2853,7 @@ function addJpegFromFile($img,$x,$y,$w=0,$h=0){
   set_magic_quotes_runtime(0);
   set_magic_quotes_runtime(0);
   $data = fread($fp,filesize($img));
   $data = fread($fp,filesize($img));
   set_magic_quotes_runtime($tmp);
   set_magic_quotes_runtime($tmp);
-  
+
   fclose($fp);
   fclose($fp);
 
 
   $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight,$channels);
   $this->addJpegImage_common($data,$x,$y,$w,$h,$imageWidth,$imageHeight,$channels);
@@ -2861,18 +2861,18 @@ function addJpegFromFile($img,$x,$y,$w=0,$h=0){
 
 
 /**
 /**
 * add an image into the document, from a GD object
 * add an image into the document, from a GD object
-* this function is not all that reliable, and I would probably encourage people to use 
+* this function is not all that reliable, and I would probably encourage people to use
 * the file based functions
 * the file based functions
 */
 */
 function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
 function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
   // add a new image into the current location, as an external object
   // add a new image into the current location, as an external object
   // add the image at $x,$y, and with width and height as defined by $w & $h
   // add the image at $x,$y, and with width and height as defined by $w & $h
-  
+
   // note that this will only work with full colour images and makes them jpg images for display
   // note that this will only work with full colour images and makes them jpg images for display
   // later versions could present lossless image formats if there is interest.
   // later versions could present lossless image formats if there is interest.
-  
+
   // there seems to be some problem here in that images that have quality set above 75 do not appear
   // there seems to be some problem here in that images that have quality set above 75 do not appear
-  // not too sure why this is, but in the meantime I have restricted this to 75.  
+  // not too sure why this is, but in the meantime I have restricted this to 75.
   if ($quality>75){
   if ($quality>75){
     $quality=75;
     $quality=75;
   }
   }
@@ -2881,7 +2881,7 @@ function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
   // height/width ratio the same, if they are both zero, then give up :)
   // height/width ratio the same, if they are both zero, then give up :)
   $imageWidth=imagesx($img);
   $imageWidth=imagesx($img);
   $imageHeight=imagesy($img);
   $imageHeight=imagesy($img);
-  
+
   if ($w<=0 && $h<=0){
   if ($w<=0 && $h<=0){
     return;
     return;
   }
   }
@@ -2891,7 +2891,7 @@ function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
   if ($h==0){
   if ($h==0){
     $h=$w*$imageHeight/$imageWidth;
     $h=$w*$imageHeight/$imageWidth;
   }
   }
-  
+
   // gotta get the data out of the img..
   // gotta get the data out of the img..
 
 
   // so I write to a temp file, and then read it back.. soo ugly, my apologies.
   // so I write to a temp file, and then read it back.. soo ugly, my apologies.

+ 1 - 1
main/inc/lib/fckeditor/editor/filemanager/connectors/php/commands.php

@@ -214,7 +214,7 @@ function FileUpload( $resourceType, $currentFolder, $sCommand )
 		// Get the extension.
 		// Get the extension.
 		$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;
 		$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;
 		$sExtension = strtolower( $sExtension ) ;
 		$sExtension = strtolower( $sExtension ) ;
-		
+
 		if ( isset( $Config['SecureImageUploads'] ) )
 		if ( isset( $Config['SecureImageUploads'] ) )
 		{
 		{
 			if ( ( $isImageValid = IsImageValid( $oFile['tmp_name'], $sExtension ) ) === false )
 			if ( ( $isImageValid = IsImageValid( $oFile['tmp_name'], $sExtension ) ) === false )

+ 1 - 1
main/inc/lib/fckeditor/editor/filemanager/connectors/php/io.php

@@ -72,7 +72,7 @@ function ServerMapFolder( $resourceType, $folderPath, $sCommand )
 {
 {
 	// Get the resource type directory.
 	// Get the resource type directory.
 	$sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ;
 	$sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ;
-	
+
 	// Ensure that the directory exists.
 	// Ensure that the directory exists.
 	$sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
 	$sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
 	if ( $sErrorMsg != '' )
 	if ( $sErrorMsg != '' )

+ 33 - 33
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Files.php

@@ -18,12 +18,12 @@ define('FILE_COPY_OK', 103);
  * @package ImageManager
  * @package ImageManager
  * @subpackage files
  * @subpackage files
  */
  */
-class Files 
+class Files
 {
 {
-	
+
 	/**
 	/**
 	 * Copy a file from source to destination. If unique == true, then if
 	 * Copy a file from source to destination. If unique == true, then if
-	 * the destination exists, it will be renamed by appending an increamenting 
+	 * the destination exists, it will be renamed by appending an increamenting
 	 * counting number.
 	 * counting number.
 	 * @param string $source where the file is from, full path to the files required
 	 * @param string $source where the file is from, full path to the files required
 	 * @param string $destination_file name of the new file, just the filename
 	 * @param string $destination_file name of the new file, just the filename
@@ -32,29 +32,29 @@ class Files
 	 * @param boolean $unique create unique destination file if true.
 	 * @param boolean $unique create unique destination file if true.
 	 * @return string the new copied filename, else error if anything goes bad.
 	 * @return string the new copied filename, else error if anything goes bad.
 	 */
 	 */
-	function copyFile($source, $destination_dir, $destination_file, $unique=true) 
+	function copyFile($source, $destination_dir, $destination_file, $unique=true)
 	{
 	{
-		if(!(file_exists($source) && is_file($source))) 
+		if(!(file_exists($source) && is_file($source)))
 			return FILE_ERROR_NO_SOURCE;
 			return FILE_ERROR_NO_SOURCE;
 
 
 		$destination_dir = Files::fixPath($destination_dir);
 		$destination_dir = Files::fixPath($destination_dir);
 
 
-		if(!is_dir($destination_dir)) 
+		if(!is_dir($destination_dir))
 			Return FILE_ERROR_DST_DIR_FAILED;
 			Return FILE_ERROR_DST_DIR_FAILED;
 
 
 		$filename = Files::escape($destination_file);
 		$filename = Files::escape($destination_file);
 
 
-		if($unique) 
+		if($unique)
 		{
 		{
 			$dotIndex = strrpos($destination_file, '.');
 			$dotIndex = strrpos($destination_file, '.');
 			$ext = '';
 			$ext = '';
-			if(is_int($dotIndex)) 
+			if(is_int($dotIndex))
 			{
 			{
 				$ext = substr($destination_file, $dotIndex);
 				$ext = substr($destination_file, $dotIndex);
 				$base = substr($destination_file, 0, $dotIndex);
 				$base = substr($destination_file, 0, $dotIndex);
 			}
 			}
 			$counter = 0;
 			$counter = 0;
-			while(is_file($destination_dir.$filename)) 
+			while(is_file($destination_dir.$filename))
 			{
 			{
 				$counter++;
 				$counter++;
 				$filename = $base.'_'.$counter.$ext;
 				$filename = $base.'_'.$counter.$ext;
@@ -63,7 +63,7 @@ class Files
 
 
 		if (!copy($source, $destination_dir.$filename))
 		if (!copy($source, $destination_dir.$filename))
 			return FILE_ERROR_COPY_FAILED;
 			return FILE_ERROR_COPY_FAILED;
-		
+
 		global $permissions_for_new_files;
 		global $permissions_for_new_files;
 
 
 		//verify that it copied, new file must exists
 		//verify that it copied, new file must exists
@@ -81,12 +81,12 @@ class Files
 	 * @param string $newFolder specifiy the full path of the new folder.
 	 * @param string $newFolder specifiy the full path of the new folder.
 	 * @return boolean true if the new folder is created, false otherwise.
 	 * @return boolean true if the new folder is created, false otherwise.
 	 */
 	 */
-	function createFolder($newFolder) 
+	function createFolder($newFolder)
 	{
 	{
 		//mkdir ($newFolder, 0777);
 		//mkdir ($newFolder, 0777);
 		//return chmod($newFolder, 0777);
 		//return chmod($newFolder, 0777);
 
 
-		global $permissions_for_new_directories;		
+		global $permissions_for_new_directories;
 		mkdir ($newFolder, $permissions_for_new_directories);
 		mkdir ($newFolder, $permissions_for_new_directories);
 		return @chmod($newFolder, $permissions_for_new_directories);
 		return @chmod($newFolder, $permissions_for_new_directories);
 	}
 	}
@@ -98,7 +98,7 @@ class Files
 	 * @param string $filename the orginal filename
 	 * @param string $filename the orginal filename
 	 * @return string the escaped safe filename
 	 * @return string the escaped safe filename
 	 */
 	 */
-	function escape($filename) 
+	function escape($filename)
 	{
 	{
 		Return preg_replace('/[^\w\._]/', '_', $filename);
 		Return preg_replace('/[^\w\._]/', '_', $filename);
 	}
 	}
@@ -108,9 +108,9 @@ class Files
 	 * @param string $file file to be deleted
 	 * @param string $file file to be deleted
 	 * @return boolean true if deleted, false otherwise.
 	 * @return boolean true if deleted, false otherwise.
 	 */
 	 */
-	function delFile($file) 
+	function delFile($file)
 	{
 	{
-		if(is_file($file)) 
+		if(is_file($file))
 			Return unlink($file);
 			Return unlink($file);
 		else
 		else
 			Return false;
 			Return false;
@@ -124,13 +124,13 @@ class Files
 	 * error if the directory is not empty.
 	 * error if the directory is not empty.
 	 * @return boolean true if deleted.
 	 * @return boolean true if deleted.
 	 */
 	 */
-	function delFolder($folder, $recursive=false) 
+	function delFolder($folder, $recursive=false)
 	{
 	{
 		$deleted = true;
 		$deleted = true;
-		if($recursive) 
+		if($recursive)
 		{
 		{
 			$d = dir($folder);
 			$d = dir($folder);
-			while (false !== ($entry = $d->read())) 
+			while (false !== ($entry = $d->read()))
 			{
 			{
 				if ($entry != '.' && $entry != '..')
 				if ($entry != '.' && $entry != '..')
 				{
 				{
@@ -138,13 +138,13 @@ class Files
 					//var_dump($obj);
 					//var_dump($obj);
 					if (is_file($obj))
 					if (is_file($obj))
 					{
 					{
-						$deleted &= Files::delFile($obj);					
+						$deleted &= Files::delFile($obj);
 					}
 					}
 					else if(is_dir($obj))
 					else if(is_dir($obj))
 					{
 					{
 						$deleted &= Files::delFolder($obj, $recursive);
 						$deleted &= Files::delFolder($obj, $recursive);
 					}
 					}
-					
+
 				}
 				}
 			}
 			}
 			$d->close();
 			$d->close();
@@ -153,7 +153,7 @@ class Files
 
 
 		//$folder= $folder.'/thumbs';
 		//$folder= $folder.'/thumbs';
 		//var_dump($folder);
 		//var_dump($folder);
-		if(is_dir($folder)) 
+		if(is_dir($folder))
 			$deleted &= rmdir($folder);
 			$deleted &= rmdir($folder);
 		else
 		else
 			$deleted &= false;
 			$deleted &= false;
@@ -166,7 +166,7 @@ class Files
 	 * @param string $path the path
 	 * @param string $path the path
 	 * @return string path with trailing /
 	 * @return string path with trailing /
 	 */
 	 */
-	function fixPath($path) 
+	function fixPath($path)
 	{
 	{
 		//append a slash to the path if it doesn't exists.
 		//append a slash to the path if it doesn't exists.
 		if(!(substr($path,-1) == '/'))
 		if(!(substr($path,-1) == '/'))
@@ -180,7 +180,7 @@ class Files
 	 * @param string $pathB path two
 	 * @param string $pathB path two
 	 * @return string a trailing slash combinded path.
 	 * @return string a trailing slash combinded path.
 	 */
 	 */
-	function makePath($pathA, $pathB) 
+	function makePath($pathA, $pathB)
 	{
 	{
 		$pathA = Files::fixPath($pathA);
 		$pathA = Files::fixPath($pathA);
 		if(substr($pathB,0,1)=='/')
 		if(substr($pathB,0,1)=='/')
@@ -195,29 +195,29 @@ class Files
 	 * @param string $pathB the ending path with file
 	 * @param string $pathB the ending path with file
 	 * @return string combined file path.
 	 * @return string combined file path.
 	 */
 	 */
-	function makeFile($pathA, $pathB) 
-	{		
+	function makeFile($pathA, $pathB)
+	{
 		$pathA = Files::fixPath($pathA);
 		$pathA = Files::fixPath($pathA);
 		if(substr($pathB,0,1)=='/')
 		if(substr($pathB,0,1)=='/')
 			$pathB = substr($pathB,1);
 			$pathB = substr($pathB,1);
-		
+
 		Return $pathA.$pathB;
 		Return $pathA.$pathB;
 	}
 	}
 
 
-	
+
 	/**
 	/**
 	 * Format the file size, limits to Mb.
 	 * Format the file size, limits to Mb.
 	 * @param int $size the raw filesize
 	 * @param int $size the raw filesize
 	 * @return string formated file size.
 	 * @return string formated file size.
 	 */
 	 */
-	function formatSize($size) 
+	function formatSize($size)
 	{
 	{
-		if($size < 1024) 
-			return $size.' bytes';	
-		else if($size >= 1024 && $size < 1024*1024) 
-			return sprintf('%01.2f',$size/1024.0).' Kb';	
+		if($size < 1024)
+			return $size.' bytes';
+		else if($size >= 1024 && $size < 1024*1024)
+			return sprintf('%01.2f',$size/1024.0).' Kb';
 		else
 		else
-			return sprintf('%01.2f',$size/(1024.0*1024)).' Mb';	
+			return sprintf('%01.2f',$size/(1024.0*1024)).' Mb';
 	}
 	}
 }
 }
 
 

+ 16 - 16
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/GD.php

@@ -4,7 +4,7 @@
 ** Version.......:  1.0
 ** Version.......:  1.0
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  GD.php
 ** Filename......:  GD.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
 ** Notes.........:  Orginal is from PEAR
 **/
 **/
 // +----------------------------------------------------------------------+
 // +----------------------------------------------------------------------+
@@ -244,7 +244,7 @@ Class Image_Transform_Driver_GD extends Image_Transform
         } else {
         } else {
             $img2 =ImageCreate($width2,$height2);
             $img2 =ImageCreate($width2,$height2);
         }
         }
-	
+
 
 
         if ( !is_resource($img2) ){
         if ( !is_resource($img2) ){
             return false;/*PEAR::raiseError('Cannot create buffer for the rotataion.',
             return false;/*PEAR::raiseError('Cannot create buffer for the rotataion.',
@@ -374,7 +374,7 @@ Class Image_Transform_Driver_GD extends Image_Transform
      * @param int $crop_width new cropped image width
      * @param int $crop_width new cropped image width
      * @param int $crop_height new cropped image height
      * @param int $crop_height new cropped image height
      */
      */
-    function crop($new_x, $new_y, $new_width, $new_height) 
+    function crop($new_x, $new_y, $new_width, $new_height)
     {
     {
         if(function_exists('ImageCreateTrueColor')){
         if(function_exists('ImageCreateTrueColor')){
             $new_img =ImageCreateTrueColor($new_width,$new_height);
             $new_img =ImageCreateTrueColor($new_width,$new_height);
@@ -394,7 +394,7 @@ Class Image_Transform_Driver_GD extends Image_Transform
         $this->new_y = $new_y;
         $this->new_y = $new_y;
         return true;
         return true;
     }
     }
-   
+
     /**
     /**
      * Flip the image horizontally or vertically
      * Flip the image horizontally or vertically
      *
      *
@@ -406,22 +406,22 @@ Class Image_Transform_Driver_GD extends Image_Transform
             $this->rotate(180);
             $this->rotate(180);
         }
         }
 
 
-        $width = imagesx($this->imageHandle); 
-        $height = imagesy($this->imageHandle); 
+        $width = imagesx($this->imageHandle);
+        $height = imagesy($this->imageHandle);
 
 
-        for ($j = 0; $j < $height; $j++) { 
-                $left = 0; 
-                $right = $width-1; 
+        for ($j = 0; $j < $height; $j++) {
+                $left = 0;
+                $right = $width-1;
 
 
 
 
-                while ($left < $right) { 
+                while ($left < $right) {
                     //echo " j:".$j." l:".$left." r:".$right."\n<br>";
                     //echo " j:".$j." l:".$left." r:".$right."\n<br>";
-                    $t = imagecolorat($this->imageHandle, $left, $j); 
-                    imagesetpixel($this->imageHandle, $left, $j, imagecolorat($this->imageHandle, $right, $j)); 
-                    imagesetpixel($this->imageHandle, $right, $j, $t); 
-                    $left++; $right--; 
-                } 
-            
+                    $t = imagecolorat($this->imageHandle, $left, $j);
+                    imagesetpixel($this->imageHandle, $left, $j, imagecolorat($this->imageHandle, $right, $j));
+                    imagesetpixel($this->imageHandle, $right, $j, $t);
+                    $left++; $right--;
+                }
+
         }
         }
 
 
         return true;
         return true;

+ 4 - 4
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/IM.php

@@ -5,7 +5,7 @@
 ** Version.......:  1.0
 ** Version.......:  1.0
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  IM.php
 ** Filename......:  IM.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
 ** Notes.........:  Orginal is from PEAR
 **/
 **/
 
 
@@ -100,7 +100,7 @@ Class Image_Transform_Driver_IM extends Image_Transform
      * @param int $crop_width new cropped image width
      * @param int $crop_width new cropped image width
      * @param int $crop_height new cropped image height
      * @param int $crop_height new cropped image height
      */
      */
-    function crop($crop_x, $crop_y, $crop_width, $crop_height) 
+    function crop($crop_x, $crop_y, $crop_width, $crop_height)
     {
     {
 		if (!is_numeric($crop_x)) die("crop_x must be numeric");
 		if (!is_numeric($crop_x)) die("crop_x must be numeric");
 		if (!is_numeric($crop_y)) die("crop_y must be numeric");
 		if (!is_numeric($crop_y)) die("crop_y must be numeric");
@@ -114,7 +114,7 @@ Class Image_Transform_Driver_IM extends Image_Transform
      *
      *
      * @param boolean $horizontal true if horizontal flip, vertical otherwise
      * @param boolean $horizontal true if horizontal flip, vertical otherwise
      */
      */
-    function flip($horizontal) 
+    function flip($horizontal)
     {
     {
         if($horizontal)
         if($horizontal)
             $this->command['flop'] = "-flop";
             $this->command['flop'] = "-flop";
@@ -212,7 +212,7 @@ Class Image_Transform_Driver_IM extends Image_Transform
         $cmd = '' . IMAGE_TRANSFORM_LIB_PATH . 'convert ';
         $cmd = '' . IMAGE_TRANSFORM_LIB_PATH . 'convert ';
 		$cmd .= implode(' ', $this->command) . " -quality $quality ";
 		$cmd .= implode(' ', $this->command) . " -quality $quality ";
 		$cmd .= '"'.($this->image) . '" "' . ($filename) . '" 2>&1';
 		$cmd .= '"'.($this->image) . '" "' . ($filename) . '" 2>&1';
-        
+
         //$cmd = str_replace('/', '\\', $cmd);
         //$cmd = str_replace('/', '\\', $cmd);
 		//echo($cmd.'<br>');
 		//echo($cmd.'<br>');
         exec($cmd,$retval);
         exec($cmd,$retval);

+ 35 - 35
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageEditor.php

@@ -16,7 +16,7 @@ require_once('Transform.php');
  * @package ImageManager
  * @package ImageManager
  * @subpackage Editor
  * @subpackage Editor
  */
  */
-class ImageEditor 
+class ImageEditor
 {
 {
 	/**
 	/**
 	 * ImageManager instance.
 	 * ImageManager instance.
@@ -36,7 +36,7 @@ class ImageEditor
 	var $filesaved = 0;
 	var $filesaved = 0;
 
 
 	/**
 	/**
-	 * Create a new ImageEditor instance. Editing requires a 
+	 * Create a new ImageEditor instance. Editing requires a
 	 * tmp file, which is saved in the current directory where the
 	 * tmp file, which is saved in the current directory where the
 	 * image is edited. The tmp file is assigned by md5 hash of the
 	 * image is edited. The tmp file is assigned by md5 hash of the
 	 * user IP address. This hashed is used as an ID for cleaning up
 	 * user IP address. This hashed is used as an ID for cleaning up
@@ -45,18 +45,18 @@ class ImageEditor
 	 * @param ImageManager $manager the image manager, we need this
 	 * @param ImageManager $manager the image manager, we need this
 	 * for some file and path handling functions.
 	 * for some file and path handling functions.
 	 */
 	 */
-	function ImageEditor($manager) 
+	function ImageEditor($manager)
 	{
 	{
 		$this->manager = $manager;
 		$this->manager = $manager;
 		$this->_uid = md5($_SERVER['REMOTE_ADDR']);
 		$this->_uid = md5($_SERVER['REMOTE_ADDR']);
 	}
 	}
-	
+
 	/**
 	/**
 	 * Did we save a file?
 	 * Did we save a file?
-	 * @return int 1 if the file was saved sucessfully, 
+	 * @return int 1 if the file was saved sucessfully,
 	 * 0 no save operation, -1 file save error.
 	 * 0 no save operation, -1 file save error.
 	 */
 	 */
-	function isFileSaved() 
+	function isFileSaved()
 	{
 	{
 		Return $this->filesaved;
 		Return $this->filesaved;
 	}
 	}
@@ -84,7 +84,7 @@ class ImageEditor
 
 
 		$imgURL = $this->manager->getFileURL($relative);
 		$imgURL = $this->manager->getFileURL($relative);
 		$fullpath = $this->manager->getFullPath($relative);
 		$fullpath = $this->manager->getFullPath($relative);
-		
+
 		$imgInfo = @getImageSize($fullpath);
 		$imgInfo = @getImageSize($fullpath);
 		if(!is_array($imgInfo))
 		if(!is_array($imgInfo))
 			Return array();
 			Return array();
@@ -121,7 +121,7 @@ class ImageEditor
 	 * <code>array('src'=>'url of the image', 'dimensions'=>'width="xx" height="yy"',
 	 * <code>array('src'=>'url of the image', 'dimensions'=>'width="xx" height="yy"',
 	 * 'file'=>'image file, relative', 'fullpath'=>'full path to the image');</code>
 	 * 'file'=>'image file, relative', 'fullpath'=>'full path to the image');</code>
 	 */
 	 */
-	function processAction($action, $relative, $fullpath) 
+	function processAction($action, $relative, $fullpath)
 	{
 	{
 		$params = '';
 		$params = '';
 
 
@@ -134,7 +134,7 @@ class ImageEditor
 		$img = Image_Transform::factory(IMAGE_CLASS);
 		$img = Image_Transform::factory(IMAGE_CLASS);
 		$img->load($fullpath);
 		$img->load($fullpath);
 
 
-		switch ($action) 
+		switch ($action)
 		{
 		{
 			case 'replace':
 			case 'replace':
 
 
@@ -226,7 +226,7 @@ class ImageEditor
 			case 'flip':
 			case 'flip':
 				if ($values[0] == 'hoz')
 				if ($values[0] == 'hoz')
 					$img->flip(true);
 					$img->flip(true);
-				else if($values[0] == 'ver') 
+				else if($values[0] == 'ver')
 					$img->flip(false);
 					$img->flip(false);
 				break;
 				break;
 			case 'save':
 			case 'save':
@@ -255,7 +255,7 @@ class ImageEditor
 					{
 					{
 						$this->forcedNewName = false;
 						$this->forcedNewName = false;
 					}
 					}
-						
+
 					$newSaveFullpath = $this->manager->getFullPath($newSaveFile);
 					$newSaveFullpath = $this->manager->getFullPath($newSaveFile);
 					$img->save($newSaveFullpath, $values[0], $quality);
 					$img->save($newSaveFullpath, $values[0], $quality);
 					if(is_file($newSaveFullpath))
 					if(is_file($newSaveFullpath))
@@ -265,7 +265,7 @@ class ImageEditor
 				}
 				}
 				break;
 				break;
 		}
 		}
-		
+
 		//create the tmp image file
 		//create the tmp image file
 		$filename = $this->createUnique($fullpath);
 		$filename = $this->createUnique($fullpath);
 		$newRelative = $this->makeRelative($relative, $filename);
 		$newRelative = $this->makeRelative($relative, $filename);
@@ -320,7 +320,7 @@ class ImageEditor
 
 
 
 
 		Return $image;
 		Return $image;
-	
+
 	}
 	}
 
 
 
 
@@ -331,7 +331,7 @@ class ImageEditor
 	 * @param string $type image type, 'jpeg', 'png', or 'gif'
 	 * @param string $type image type, 'jpeg', 'png', or 'gif'
 	 * @return string the filename according to save type
 	 * @return string the filename according to save type
 	 */
 	 */
-	function getSaveFileName($type) 
+	function getSaveFileName($type)
 	{
 	{
 		if(!isset($_GET['file']))
 		if(!isset($_GET['file']))
 			Return null;
 			Return null;
@@ -357,7 +357,7 @@ class ImageEditor
 	 * Get the default save file name, used by editor.php.
 	 * Get the default save file name, used by editor.php.
 	 * @return string a suggestive filename, this should be unique
 	 * @return string a suggestive filename, this should be unique
 	 */
 	 */
-	function getDefaultSaveFile() 
+	function getDefaultSaveFile()
 	{
 	{
 		if(isset($_GET['img']))
 		if(isset($_GET['img']))
 			$relative = rawurldecode($_GET['img']);
 			$relative = rawurldecode($_GET['img']);
@@ -373,35 +373,35 @@ class ImageEditor
 	 * @param string $relative the relative filename to the base_dir
 	 * @param string $relative the relative filename to the base_dir
 	 * @return string a unique filename in the current path
 	 * @return string a unique filename in the current path
 	 */
 	 */
-	function getUniqueFilename($relative) 
+	function getUniqueFilename($relative)
 	{
 	{
 		$fullpath = $this->manager->getFullPath($relative);
 		$fullpath = $this->manager->getFullPath($relative);
-		
+
 		$pathinfo = pathinfo($fullpath);
 		$pathinfo = pathinfo($fullpath);
 
 
 		$path = Files::fixPath($pathinfo['dirname']);
 		$path = Files::fixPath($pathinfo['dirname']);
 		$file = Files::escape($pathinfo['basename']);
 		$file = Files::escape($pathinfo['basename']);
-		
+
 		$filename = $file;
 		$filename = $file;
 
 
 		$dotIndex = strrpos($file, '.');
 		$dotIndex = strrpos($file, '.');
 		$ext = '';
 		$ext = '';
 
 
-		if(is_int($dotIndex)) 
+		if(is_int($dotIndex))
 		{
 		{
 			$ext = substr($file, $dotIndex);
 			$ext = substr($file, $dotIndex);
 			$base = substr($file, 0, $dotIndex);
 			$base = substr($file, 0, $dotIndex);
 		}
 		}
 
 
 		$counter = 0;
 		$counter = 0;
-		while(is_file($path.$filename)) 
+		while(is_file($path.$filename))
 		{
 		{
 			$counter++;
 			$counter++;
 			$filename = $base.'_'.$counter.$ext;
 			$filename = $base.'_'.$counter.$ext;
 		}
 		}
-		
+
 		Return $filename;
 		Return $filename;
-		
+
 	}
 	}
 
 
 	/**
 	/**
@@ -412,7 +412,7 @@ class ImageEditor
 	 * @param string $file the new filename
 	 * @param string $file the new filename
 	 * @return string relative path with the new filename
 	 * @return string relative path with the new filename
 	 */
 	 */
-	function makeRelative($pathA, $file) 
+	function makeRelative($pathA, $file)
 	{
 	{
 		$index = strrpos($pathA,'/');
 		$index = strrpos($pathA,'/');
 		if(!is_int($index))
 		if(!is_int($index))
@@ -426,10 +426,10 @@ class ImageEditor
 	 * Get the action GET parameter
 	 * Get the action GET parameter
 	 * @return string action parameter
 	 * @return string action parameter
 	 */
 	 */
-	function getAction() 
+	function getAction()
 	{
 	{
 		$action = null;
 		$action = null;
-		if(isset($_GET['action']))			 
+		if(isset($_GET['action']))
 			$action = str_replace('"','',$_GET['action']);
 			$action = str_replace('"','',$_GET['action']);
 		Return $action;
 		Return $action;
 	}
 	}
@@ -447,7 +447,7 @@ class ImageEditor
 	/**
 	/**
 	 * Create unique tmp image file name.
 	 * Create unique tmp image file name.
 	 * The filename is based on the tmp file prefix
 	 * The filename is based on the tmp file prefix
-	 * specified in config.inc.php plus 
+	 * specified in config.inc.php plus
 	 * the UID (basically a md5 of the remote IP)
 	 * the UID (basically a md5 of the remote IP)
 	 * and some random 6 character string.
 	 * and some random 6 character string.
 	 * This function also calls to clean up the tmp files.
 	 * This function also calls to clean up the tmp files.
@@ -455,7 +455,7 @@ class ImageEditor
 	 * @return string a unique filename for that path
 	 * @return string a unique filename for that path
 	 * NOTE: it only returns the filename, path no included.
 	 * NOTE: it only returns the filename, path no included.
 	 */
 	 */
-	function createUnique($file) 
+	function createUnique($file)
 	{
 	{
 		$pathinfo = pathinfo($file);
 		$pathinfo = pathinfo($file);
 		$path = Files::fixPath($pathinfo['dirname']);
 		$path = Files::fixPath($pathinfo['dirname']);
@@ -476,10 +476,10 @@ class ImageEditor
 
 
 	/**
 	/**
 	 * Delete any tmp image files.
 	 * Delete any tmp image files.
-	 * @param string $path the full path 
+	 * @param string $path the full path
 	 * where the clean should take place.
 	 * where the clean should take place.
 	 */
 	 */
-	function cleanUp($path,$file) 
+	function cleanUp($path,$file)
 	{
 	{
 		$path = Files::fixPath($path);
 		$path = Files::fixPath($path);
 
 
@@ -487,14 +487,14 @@ class ImageEditor
 			Return false;
 			Return false;
 
 
 		$d = @dir($path);
 		$d = @dir($path);
-		
+
 		$tmp = $this->manager->getTmpPrefix();
 		$tmp = $this->manager->getTmpPrefix();
 		$tmpLen = strlen($tmp);
 		$tmpLen = strlen($tmp);
 
 
 		$prefix = $tmp.$this->_uid;
 		$prefix = $tmp.$this->_uid;
 		$len = strlen($prefix);
 		$len = strlen($prefix);
 
 
-		while (false !== ($entry = $d->read())) 
+		while (false !== ($entry = $d->read()))
 		{
 		{
 			//echo $entry."<br>";
 			//echo $entry."<br>";
 			if(is_file($path.$entry) && $this->manager->isTmpFile($entry))
 			if(is_file($path.$entry) && $this->manager->isTmpFile($entry))
@@ -517,14 +517,14 @@ class ImageEditor
 	 * @return string of either 'gif', 'jpeg', 'png' or 'bmp'
 	 * @return string of either 'gif', 'jpeg', 'png' or 'bmp'
 	 * otherwise it will return null.
 	 * otherwise it will return null.
 	 */
 	 */
-	function getImageType($file) 
+	function getImageType($file)
 	{
 	{
 		$imageInfo = @getImageSize($file);
 		$imageInfo = @getImageSize($file);
 
 
 		if(!is_array($imageInfo))
 		if(!is_array($imageInfo))
 			Return null;
 			Return null;
 
 
-		switch($imageInfo[2]) 
+		switch($imageInfo[2])
 		{
 		{
 			case 1:
 			case 1:
 				Return 'gif';
 				Return 'gif';
@@ -544,7 +544,7 @@ class ImageEditor
 	 * mainly to check that GD can read and save GIFs
 	 * mainly to check that GD can read and save GIFs
 	 * @return int 0 if it is not a GIF file, 1 is GIF is editable, -1 if not editable.
 	 * @return int 0 if it is not a GIF file, 1 is GIF is editable, -1 if not editable.
 	 */
 	 */
-	function isGDEditable() 
+	function isGDEditable()
 	{
 	{
 		if(isset($_GET['img']))
 		if(isset($_GET['img']))
 			$relative = rawurldecode($_GET['img']);
 			$relative = rawurldecode($_GET['img']);
@@ -570,7 +570,7 @@ class ImageEditor
 	 * Check if GIF can be edit by GD.
 	 * Check if GIF can be edit by GD.
 	 * @return int 0 if it is not using the GD library, 1 is GIF is editable, -1 if not editable.
 	 * @return int 0 if it is not using the GD library, 1 is GIF is editable, -1 if not editable.
 	 */
 	 */
-	function isGDGIFAble() 
+	function isGDGIFAble()
 	{
 	{
 		if(IMAGE_CLASS != 'GD')
 		if(IMAGE_CLASS != 'GD')
 			Return 0;
 			Return 0;

+ 113 - 113
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php

@@ -17,7 +17,7 @@ require_once('Transform.php');
  * @author Wei Zhuo
  * @author Wei Zhuo
  * @version $Id: ImageManager.php,v 1.4 2006/12/21 21:28:00 thierrybo Exp $
  * @version $Id: ImageManager.php,v 1.4 2006/12/21 21:28:00 thierrybo Exp $
  */
  */
-class ImageManager 
+class ImageManager
 {
 {
 	/**
 	/**
 	 * Configuration array.
 	 * Configuration array.
@@ -33,7 +33,7 @@ class ImageManager
 	 * Constructor. Create a new Image Manager instance.
 	 * Constructor. Create a new Image Manager instance.
 	 * @param array $config configuration array, see config.inc.php
 	 * @param array $config configuration array, see config.inc.php
 	 */
 	 */
-	function ImageManager($config) 
+	function ImageManager($config)
 	{
 	{
 		$this->config = $config;
 		$this->config = $config;
 	}
 	}
@@ -42,7 +42,7 @@ class ImageManager
 	 * Get the base directory.
 	 * Get the base directory.
 	 * @return string base dir, see config.inc.php
 	 * @return string base dir, see config.inc.php
 	 */
 	 */
-	function getBaseDir() 
+	function getBaseDir()
 	{
 	{
 		Return $this->config['base_dir'];
 		Return $this->config['base_dir'];
 	}
 	}
@@ -51,11 +51,11 @@ class ImageManager
 	 * Get the base URL.
 	 * Get the base URL.
 	 * @return string base url, see config.inc.php
 	 * @return string base url, see config.inc.php
 	 */
 	 */
-	function getBaseURL() 
+	function getBaseURL()
 	{
 	{
 		Return $this->config['base_url'];
 		Return $this->config['base_url'];
 	}
 	}
-	
+
 	function isValidBase()
 	function isValidBase()
 	{
 	{
 		return is_dir($this->getBaseDir());
 		return is_dir($this->getBaseDir());
@@ -65,7 +65,7 @@ class ImageManager
 	 * Get the tmp file prefix.
 	 * Get the tmp file prefix.
      * @return string tmp file prefix.
      * @return string tmp file prefix.
 	 */
 	 */
-	function getTmpPrefix() 
+	function getTmpPrefix()
 	{
 	{
 		Return $this->config['tmp_prefix'];
 		Return $this->config['tmp_prefix'];
 	}
 	}
@@ -73,12 +73,12 @@ class ImageManager
 	/**
 	/**
 	 * Get the sub directories in the base dir.
 	 * Get the sub directories in the base dir.
 	 * Each array element contain
 	 * Each array element contain
-	 * the relative path (relative to the base dir) as key and the 
+	 * the relative path (relative to the base dir) as key and the
 	 * full path as value.
 	 * full path as value.
 	 * @return array of sub directries
 	 * @return array of sub directries
 	 * <code>array('path name' => 'full directory path', ...)</code>
 	 * <code>array('path name' => 'full directory path', ...)</code>
 	 */
 	 */
-	function getDirs() 
+	function getDirs()
 	{
 	{
 		if(is_null($this->dirs))
 		if(is_null($this->dirs))
 		{
 		{
@@ -98,7 +98,7 @@ class ImageManager
 	 * @return array of accessiable sub-directories
 	 * @return array of accessiable sub-directories
 	 * <code>array('path name' => 'full directory path', ...)</code>
 	 * <code>array('path name' => 'full directory path', ...)</code>
 	 */
 	 */
-	function _dirs($base, $path) 
+	function _dirs($base, $path)
 	{
 	{
 		$base = Files::fixPath($base);
 		$base = Files::fixPath($base);
 		$dirs = array();
 		$dirs = array();
@@ -107,7 +107,7 @@ class ImageManager
 			return $dirs;
 			return $dirs;
 
 
 		$d = @dir($base);
 		$d = @dir($base);
-		
+
 		$in_group = api_is_in_group();
 		$in_group = api_is_in_group();
 		if ($in_group)
 		if ($in_group)
 		{
 		{
@@ -117,18 +117,18 @@ class ImageManager
 		}
 		}
 
 
 		$user_id = api_get_user_id();
 		$user_id = api_get_user_id();
-		while (false !== ($entry = $d->read())) 
+		while (false !== ($entry = $d->read()))
 		{
 		{
 			//If it is a directory, and it doesn't start with
 			//If it is a directory, and it doesn't start with
 			// a dot, and if is it not the thumbnail directory
 			// a dot, and if is it not the thumbnail directory
-			if(is_dir($base.$entry) 
+			if(is_dir($base.$entry)
 				&& substr($entry,0,1) != '.'
 				&& substr($entry,0,1) != '.'
 				&& strpos($entry, '_DELETED_') === false
 				&& strpos($entry, '_DELETED_') === false
 				&& strpos($entry, 'chat_files') === false
 				&& strpos($entry, 'chat_files') === false
 				&& strpos($entry, 'css') === false
 				&& strpos($entry, 'css') === false
 				&& strpos($entry, 'HotPotatoes_files') === false
 				&& strpos($entry, 'HotPotatoes_files') === false
 				&& ($in_group || (!$in_group && strpos($entry, '_groupdocs') === false))
 				&& ($in_group || (!$in_group && strpos($entry, '_groupdocs') === false))
-				&& $this->isThumbDir($entry) == false) 
+				&& $this->isThumbDir($entry) == false)
 			{
 			{
 				$relative = Files::fixPath($path.$entry);
 				$relative = Files::fixPath($path.$entry);
 				$fullpath = Files::fixPath($base.$entry);
 				$fullpath = Files::fixPath($base.$entry);
@@ -139,17 +139,17 @@ class ImageManager
 				}
 				}
 				global $_course;
 				global $_course;
 				if (isset($_course['dbName']) && $_course<>'-1') {
 				if (isset($_course['dbName']) && $_course<>'-1') {
-					$base_dir = substr($fullpath, 0, strpos($fullpath,'/document/')+9); //				  				
-					$new_dir  = substr($fullpath, strlen($base_dir),-1); //						
+					$base_dir = substr($fullpath, 0, strpos($fullpath,'/document/')+9); //
+					$new_dir  = substr($fullpath, strlen($base_dir),-1); //
 					$doc_id = DocumentManager::get_document_id($_course, $new_dir );
 					$doc_id = DocumentManager::get_document_id($_course, $new_dir );
 					$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
 					$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
 				}
 				}
 
 
 				//Teachers can access to hidden files and directories as they can in the tool documents
 				//Teachers can access to hidden files and directories as they can in the tool documents
-			    /*				
-				if ($visible_status=='0' || $visible_status=='-1') {					 
+			    /*
+				if ($visible_status=='0' || $visible_status=='-1') {
 					continue;
 					continue;
-				}				
+				}
 				*/
 				*/
 
 
 				/* if (strpos($fullpath, '/shared_folder/') !== false) {
 				/* if (strpos($fullpath, '/shared_folder/') !== false) {
@@ -175,13 +175,13 @@ class ImageManager
 	 * @param string $path relative path to be base path.
 	 * @param string $path relative path to be base path.
 	 * @return array of file and path information.
 	 * @return array of file and path information.
 	 * <code>array(0=>array('relative'=>'fullpath',...), 1=>array('filename'=>fileinfo array(),...)</code>
 	 * <code>array(0=>array('relative'=>'fullpath',...), 1=>array('filename'=>fileinfo array(),...)</code>
-	 * fileinfo array: <code>array('url'=>'full url', 
-	 *                       'relative'=>'relative to base', 
-	 *                        'fullpath'=>'full file path', 
+	 * fileinfo array: <code>array('url'=>'full url',
+	 *                       'relative'=>'relative to base',
+	 *                        'fullpath'=>'full file path',
 	 *                        'image'=>imageInfo array() false if not image,
 	 *                        'image'=>imageInfo array() false if not image,
 	 *                        'stat' => filestat)</code>
 	 *                        'stat' => filestat)</code>
 	 */
 	 */
-	function getFiles($path) 
+	function getFiles($path)
 	{
 	{
 		$files = array();
 		$files = array();
 		$dirs = array();
 		$dirs = array();
@@ -208,17 +208,17 @@ class ImageManager
 
 
 		// check templates files in bd
 		// check templates files in bd
 		$tbl_system_template = Database :: get_main_table(TABLE_MAIN_SYSTEM_TEMPLATE);
 		$tbl_system_template = Database :: get_main_table(TABLE_MAIN_SYSTEM_TEMPLATE);
-			
+
 		$sql = "SELECT image FROM $tbl_system_template ";
 		$sql = "SELECT image FROM $tbl_system_template ";
 		$res = Database::query($sql,__FILE__,__LINE__);
 		$res = Database::query($sql,__FILE__,__LINE__);
 
 
-		$files_templates = array();	
-		
+		$files_templates = array();
+
 		while ($row = Database::fetch_row($res)) {
 		while ($row = Database::fetch_row($res)) {
 			$files_templates[] = $row[0];
 			$files_templates[] = $row[0];
-		}				
-		
-		while (false !== ($entry = $d->read())) 
+		}
+
+		while (false !== ($entry = $d->read()))
 		{
 		{
 
 
 			if (in_array($entry,$files_templates)) continue;
 			if (in_array($entry,$files_templates)) continue;
@@ -252,16 +252,16 @@ class ImageManager
 				if($is_dir && $this->isThumbDir($entry) == false) {
 				if($is_dir && $this->isThumbDir($entry) == false) {
 				    global $_course;
 				    global $_course;
 					if (isset($_course['dbName']) && $_course<>'-1') {
 					if (isset($_course['dbName']) && $_course<>'-1') {
-						//checking visibility		
-						$base_dir = substr($dir_entry, 0, strpos($dir_entry,'/document/')+9); 
-						$new_dir  = substr($dir_entry, strlen($base_dir),-1); //											
+						//checking visibility
+						$base_dir = substr($dir_entry, 0, strpos($dir_entry,'/document/')+9);
+						$new_dir  = substr($dir_entry, strlen($base_dir),-1); //
 						$doc_id = DocumentManager::get_document_id($_course, $new_dir );
 						$doc_id = DocumentManager::get_document_id($_course, $new_dir );
-						$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);		
-					}	
-						
+						$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
+					}
+
 					//Teachers can access to hidden files and directories as they can in the tool documents
 					//Teachers can access to hidden files and directories as they can in the tool documents
 					/*
 					/*
-					if ($visible_status=='0' || $visible_status=='-1') {					 
+					if ($visible_status=='0' || $visible_status=='-1') {
 						continue;
 						continue;
 					}
 					}
 					*/
 					*/
@@ -270,7 +270,7 @@ class ImageManager
 					$count = $this->countFiles($full);
 					$count = $this->countFiles($full);
 					$dirs[$relative] = array('fullpath'=>$full,'entry'=>$entry,'count'=>$count);
 					$dirs[$relative] = array('fullpath'=>$full,'entry'=>$entry,'count'=>$count);
 				}
 				}
-				else if(is_file($fullpath.$entry) && $this->isThumb($entry)==false && $this->isTmpFile($entry) == false) 
+				else if(is_file($fullpath.$entry) && $this->isThumb($entry)==false && $this->isTmpFile($entry) == false)
 				{
 				{
 					$img = $this->getImageInfo($fullpath.$entry);
 					$img = $this->getImageInfo($fullpath.$entry);
 
 
@@ -279,15 +279,15 @@ class ImageManager
 					    global $_course;
 					    global $_course;
 					    if (isset($_course['dbName']) && $_course<>'-1') {
 					    if (isset($_course['dbName']) && $_course<>'-1') {
 							//checking visibility
 							//checking visibility
-							$base_dir = substr($fullpath.$entry, 0, strpos($fullpath.$entry,'/document/')+9); 
-							$new_dir  = substr($fullpath.$entry, strlen($base_dir));													
+							$base_dir = substr($fullpath.$entry, 0, strpos($fullpath.$entry,'/document/')+9);
+							$new_dir  = substr($fullpath.$entry, strlen($base_dir));
 							$doc_id = DocumentManager::get_document_id($_course, $new_dir );
 							$doc_id = DocumentManager::get_document_id($_course, $new_dir );
-							$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);										
+							$visible_status= api_get_item_visibility($_course,TOOL_DOCUMENT,$doc_id);
 						}
 						}
 
 
 						//Teachers can access to hidden files and directories as they can in the tool documents
 						//Teachers can access to hidden files and directories as they can in the tool documents
 					    /*
 					    /*
-						if ($visible_status=='0' || $visible_status=='-1') {					 
+						if ($visible_status=='0' || $visible_status=='-1') {
 							continue;
 							continue;
 						}
 						}
 						*/
 						*/
@@ -305,29 +305,29 @@ class ImageManager
 		$d->close();
 		$d->close();
 		ksort($dirs);
 		ksort($dirs);
 		ksort($files);
 		ksort($files);
-		
+
 		Return array($dirs, $files);
 		Return array($dirs, $files);
-	}	
+	}
 
 
 	/**
 	/**
 	 * Count the number of files and directories in a given folder
 	 * Count the number of files and directories in a given folder
 	 * minus the thumbnail folders and thumbnails.
 	 * minus the thumbnail folders and thumbnails.
 	 */
 	 */
-	function countFiles($path) 
+	function countFiles($path)
 	{
 	{
 		$total = 0;
 		$total = 0;
 
 
-		if(is_dir($path)) 
+		if(is_dir($path))
 		{
 		{
 			$d = @dir($path);
 			$d = @dir($path);
 
 
-			while (false !== ($entry = $d->read())) 
+			while (false !== ($entry = $d->read()))
 			{
 			{
 				//echo $entry."<br>";
 				//echo $entry."<br>";
 				if(substr($entry,0,1) != '.'
 				if(substr($entry,0,1) != '.'
 					&& $this->isThumbDir($entry) == false
 					&& $this->isThumbDir($entry) == false
 					&& $this->isTmpFile($entry) == false
 					&& $this->isTmpFile($entry) == false
-					&& $this->isThumb($entry) == false) 
+					&& $this->isThumb($entry) == false)
 				{
 				{
 					$total++;
 					$total++;
 				}
 				}
@@ -340,10 +340,10 @@ class ImageManager
 	/**
 	/**
 	 * Get image size information.
 	 * Get image size information.
 	 * @param string $file the image file
 	 * @param string $file the image file
-	 * @return array of getImageSize information, 
+	 * @return array of getImageSize information,
 	 *  false if the file is not an image.
 	 *  false if the file is not an image.
 	 */
 	 */
-	function getImageInfo($file) 
+	function getImageInfo($file)
 	{
 	{
 		Return @getImageSize($file);
 		Return @getImageSize($file);
 	}
 	}
@@ -353,7 +353,7 @@ class ImageManager
 	 * @param string $file filename to be checked
 	 * @param string $file filename to be checked
 	 * @return true if the file contains the thumbnail prefix, false otherwise.
 	 * @return true if the file contains the thumbnail prefix, false otherwise.
 	 */
 	 */
-	function isThumb($file) 
+	function isThumb($file)
 	{
 	{
 		$len = strlen($this->config['thumbnail_prefix']);
 		$len = strlen($this->config['thumbnail_prefix']);
 		if(substr($file,0,$len)==$this->config['thumbnail_prefix'])
 		if(substr($file,0,$len)==$this->config['thumbnail_prefix'])
@@ -367,11 +367,11 @@ class ImageManager
 	 * @param string $entry directory name
 	 * @param string $entry directory name
 	 * @return true if it is a thumbnail directory, false otherwise
 	 * @return true if it is a thumbnail directory, false otherwise
 	 */
 	 */
-	function isThumbDir($entry) 
+	function isThumbDir($entry)
 	{
 	{
 		if($this->config['thumbnail_dir'] == false
 		if($this->config['thumbnail_dir'] == false
 			|| strlen(trim($this->config['thumbnail_dir'])) == 0)
 			|| strlen(trim($this->config['thumbnail_dir'])) == 0)
-			Return false;		
+			Return false;
 		else
 		else
 			Return ($entry == $this->config['thumbnail_dir']);
 			Return ($entry == $this->config['thumbnail_dir']);
 	}
 	}
@@ -381,13 +381,13 @@ class ImageManager
 	 * @param string $file file name
 	 * @param string $file file name
 	 * @return boolean true if it is a tmp file, false otherwise
 	 * @return boolean true if it is a tmp file, false otherwise
 	 */
 	 */
-	function isTmpFile($file) 
+	function isTmpFile($file)
 	{
 	{
 		$len = strlen($this->config['tmp_prefix']);
 		$len = strlen($this->config['tmp_prefix']);
 		if(substr($file,0,$len)==$this->config['tmp_prefix'])
 		if(substr($file,0,$len)==$this->config['tmp_prefix'])
 			Return true;
 			Return true;
 		else
 		else
-			Return false;	 	
+			Return false;
 	}
 	}
 
 
 	/**
 	/**
@@ -396,10 +396,10 @@ class ImageManager
 	 * @param string $fullpathfile the full path to the image file
 	 * @param string $fullpathfile the full path to the image file
 	 * @return string of the thumbnail file
 	 * @return string of the thumbnail file
 	 */
 	 */
-	function getThumbName($fullpathfile) 
+	function getThumbName($fullpathfile)
 	{
 	{
 		$path_parts = pathinfo($fullpathfile);
 		$path_parts = pathinfo($fullpathfile);
-		
+
 		$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
 		$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
 
 
 		if($this->config['safe_mode'] == true
 		if($this->config['safe_mode'] == true
@@ -422,15 +422,15 @@ class ImageManager
 			}
 			}
 		}
 		}
 	}
 	}
-	
+
 	/**
 	/**
 	 * Similar to getThumbName, but returns the URL, base on the
 	 * Similar to getThumbName, but returns the URL, base on the
 	 * given base_url in config.inc.php
 	 * given base_url in config.inc.php
-	 * @param string $relative the relative image file name, 
+	 * @param string $relative the relative image file name,
 	 * relative to the base_dir path
 	 * relative to the base_dir path
 	 * @return string the url of the thumbnail
 	 * @return string the url of the thumbnail
 	 */
 	 */
-	function getThumbURL($relative) 
+	function getThumbURL($relative)
 	{
 	{
 		$path_parts = pathinfo($relative);
 		$path_parts = pathinfo($relative);
 		$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
 		$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
@@ -465,12 +465,12 @@ class ImageManager
 	 * @param string $path the relative path to be checked
 	 * @param string $path the relative path to be checked
 	 * @return boolean true if the path exists, false otherwise
 	 * @return boolean true if the path exists, false otherwise
 	 */
 	 */
-	function validRelativePath($path) 
+	function validRelativePath($path)
 	{
 	{
 		$dirs = $this->getDirs();
 		$dirs = $this->getDirs();
 		if($path == '/' || $path == '')
 		if($path == '/' || $path == '')
 			Return true;
 			Return true;
-		//check the path given in the url against the 
+		//check the path given in the url against the
 		//list of paths in the system.
 		//list of paths in the system.
 		for($i = 0; $i < count($dirs); $i++)
 		for($i = 0; $i < count($dirs); $i++)
 		{
 		{
@@ -478,28 +478,28 @@ class ImageManager
 			//we found the path
 			//we found the path
 			if($key == $path)
 			if($key == $path)
 				Return true;
 				Return true;
-		
+
 			next($dirs);
 			next($dirs);
-		}		
+		}
 		Return false;
 		Return false;
 	}
 	}
 
 
 	/**
 	/**
-	 * Process uploaded files, assumes the file is in 
+	 * Process uploaded files, assumes the file is in
 	 * $_FILES['upload'] and $_POST['dir'] is set.
 	 * $_FILES['upload'] and $_POST['dir'] is set.
 	 * The dir must be relative to the base_dir and exists.
 	 * The dir must be relative to the base_dir and exists.
 	 * If 'validate_images' is set to true, only file with
 	 * If 'validate_images' is set to true, only file with
 	 * image dimensions will be accepted.
 	 * image dimensions will be accepted.
 	 * @return null
 	 * @return null
 	 */
 	 */
-	function processUploads() 
+	function processUploads()
 	{
 	{
 		if($this->isValidBase() == false)
 		if($this->isValidBase() == false)
 			return;
 			return;
 
 
 		$relative = null;
 		$relative = null;
 
 
-		if(isset($_POST['dir'])) 
+		if(isset($_POST['dir']))
 			$relative = rawurldecode($_POST['dir']);
 			$relative = rawurldecode($_POST['dir']);
 		else
 		else
 			return;
 			return;
@@ -512,7 +512,7 @@ class ImageManager
 	}
 	}
 
 
 	/**
 	/**
-	 * Process upload files. The file must be an 
+	 * Process upload files. The file must be an
 	 * uploaded file. If 'validate_images' is set to
 	 * uploaded file. If 'validate_images' is set to
 	 * true, only images will be processed. Any duplicate
 	 * true, only images will be processed. Any duplicate
 	 * file will be renamed. See Files::copyFile for details
 	 * file will be renamed. See Files::copyFile for details
@@ -520,12 +520,12 @@ class ImageManager
 	 * @param string $relative the relative path where the file
 	 * @param string $relative the relative path where the file
 	 * should be copied to.
 	 * should be copied to.
 	 * @param array $file the uploaded file from $_FILES
 	 * @param array $file the uploaded file from $_FILES
-	 * @return boolean true if the file was processed successfully, 
+	 * @return boolean true if the file was processed successfully,
 	 * false otherwise
 	 * false otherwise
 	 */
 	 */
 	function _processFiles($relative, $file)
 	function _processFiles($relative, $file)
 	{
 	{
-		global $_course; 
+		global $_course;
 		if($file['error']!=0)
 		if($file['error']!=0)
 		{
 		{
 			return false;
 			return false;
@@ -587,29 +587,29 @@ class ImageManager
 
 
 		//no copy error
 		//no copy error
 		if (!is_int($result)) {
 		if (!is_int($result)) {
-       	     	
+
 	   	    if (isset($_course['dbName']) && $_course<>'-1') {
 	   	    if (isset($_course['dbName']) && $_course<>'-1') {
 				//adding the document to the DB
 				//adding the document to the DB
 				global $to_group_id;
 				global $to_group_id;
-				
+
 				// looking for the /document/ folder
 				// looking for the /document/ folder
 				$document_path = substr($path, strpos($path,'/document/')+9, strlen($path)); //   /shared_folder/4/name
 				$document_path = substr($path, strpos($path,'/document/')+9, strlen($path)); //   /shared_folder/4/name
 				$document_path.= $result;
 				$document_path.= $result;
-				
-				$dokeosFile = $file['name'];	
+
+				$dokeosFile = $file['name'];
 				$dokeosFileSize = $file['size'];
 				$dokeosFileSize = $file['size'];
 				if(!empty($group_properties['directory'])) {
 				if(!empty($group_properties['directory'])) {
 					$dokeosFolder=$group_properties['directory'].$dokeosFolder;//get Dokeos
 					$dokeosFolder=$group_properties['directory'].$dokeosFolder;//get Dokeos
 				}
 				}
-			
-				$doc_id = add_document($_course, $document_path,'file', $dokeosFileSize , $dokeosFile); //get Dokeos																								
-				api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', api_get_user_id(),$to_group_id);//get Dokeos	
+
+				$doc_id = add_document($_course, $document_path,'file', $dokeosFileSize , $dokeosFile); //get Dokeos
+				api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', api_get_user_id(),$to_group_id);//get Dokeos
 			}
 			}
 
 
 			/*
 			/*
 			if (!(api_is_platform_admin() || api_is_course_admin())) {
 			if (!(api_is_platform_admin() || api_is_course_admin())) {
 				//setting invisible by default for the students
 				//setting invisible by default for the students
-				api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id());					
+				api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id());
 			}
 			}
 			*/
 			*/
 		   $dimensionsIndex = isset($_REQUEST['uploadSize']) ? $_REQUEST['uploadSize'] : 0;
 		   $dimensionsIndex = isset($_REQUEST['uploadSize']) ? $_REQUEST['uploadSize'] : 0;
@@ -638,12 +638,12 @@ class ImageManager
 
 
 	/**
 	/**
 	 * Get the URL of the relative file.
 	 * Get the URL of the relative file.
-	 * basically appends the relative file to the 
+	 * basically appends the relative file to the
 	 * base_url given in config.inc.php
 	 * base_url given in config.inc.php
 	 * @param string $relative a file the relative to the base_dir
 	 * @param string $relative a file the relative to the base_dir
 	 * @return string the URL of the relative file.
 	 * @return string the URL of the relative file.
 	 */
 	 */
-	function getFileURL($relative) 
+	function getFileURL($relative)
 	{
 	{
 		Return Files::makeFile($this->getBaseURL(),$relative);
 		Return Files::makeFile($this->getBaseURL(),$relative);
 	}
 	}
@@ -653,32 +653,32 @@ class ImageManager
 	 * @param string $relative the relative file.
 	 * @param string $relative the relative file.
 	 * @return string the full path, .ie. the base_dir + relative.
 	 * @return string the full path, .ie. the base_dir + relative.
 	 */
 	 */
-	function getFullPath($relative) 
+	function getFullPath($relative)
 	{
 	{
 		Return Files::makeFile($this->getBaseDir(),$relative);;
 		Return Files::makeFile($this->getBaseDir(),$relative);;
 	}
 	}
 
 
 	/**
 	/**
 	 * Get the default thumbnail.
 	 * Get the default thumbnail.
-	 * @return string default thumbnail, empty string if 
+	 * @return string default thumbnail, empty string if
 	 * the thumbnail doesn't exist.
 	 * the thumbnail doesn't exist.
 	 */
 	 */
-	function getDefaultThumb() 
+	function getDefaultThumb()
 	{
 	{
 		if(is_file($this->config['default_thumbnail']))
 		if(is_file($this->config['default_thumbnail']))
 			Return $this->config['default_thumbnail'];
 			Return $this->config['default_thumbnail'];
-		else 
+		else
 			Return '';
 			Return '';
 	}
 	}
 
 
 
 
 	/**
 	/**
-	 * Get the thumbnail url to be displayed. 
+	 * Get the thumbnail url to be displayed.
 	 * If the thumbnail exists, and it is up-to-date
 	 * If the thumbnail exists, and it is up-to-date
-	 * the thumbnail url will be returns. If the 
+	 * the thumbnail url will be returns. If the
 	 * file is not an image, a default image will be returned.
 	 * file is not an image, a default image will be returned.
-	 * If it is an image file, and no thumbnail exists or 
-	 * the thumbnail is out-of-date (i.e. the thumbnail 
+	 * If it is an image file, and no thumbnail exists or
+	 * the thumbnail is out-of-date (i.e. the thumbnail
 	 * modified time is less than the original file)
 	 * modified time is less than the original file)
 	 * then a thumbs.php?img=filename.jpg is returned.
 	 * then a thumbs.php?img=filename.jpg is returned.
 	 * The thumbs.php url will generate a new thumbnail
 	 * The thumbs.php url will generate a new thumbnail
@@ -689,7 +689,7 @@ class ImageManager
 	 * actually thumbnail or a script to generate the
 	 * actually thumbnail or a script to generate the
 	 * thumbnail on the fly.
 	 * thumbnail on the fly.
 	 */
 	 */
-	function getThumbnail($relative) 
+	function getThumbnail($relative)
 	{
 	{
 		$fullpath = Files::makeFile($this->getBaseDir(),$relative);
 		$fullpath = Files::makeFile($this->getBaseDir(),$relative);
 
 
@@ -698,7 +698,7 @@ class ImageManager
 			Return $this->getDefaultThumb();
 			Return $this->getDefaultThumb();
 
 
 		$imgInfo = @getImageSize($fullpath);
 		$imgInfo = @getImageSize($fullpath);
-		
+
 		//not an image
 		//not an image
 		if(!is_array($imgInfo))
 		if(!is_array($imgInfo))
 			Return $this->getDefaultThumb();
 			Return $this->getDefaultThumb();
@@ -710,7 +710,7 @@ class ImageManager
 			Return $this->getFileURL($relative);
 			Return $this->getFileURL($relative);
 
 
 		$thumbnail = $this->getThumbName($fullpath);
 		$thumbnail = $this->getThumbName($fullpath);
-		
+
 		//check for thumbnails, if exists and
 		//check for thumbnails, if exists and
 		// it is up-to-date, return the thumbnail url
 		// it is up-to-date, return the thumbnail url
 		if(is_file($thumbnail))
 		if(is_file($thumbnail))
@@ -728,7 +728,7 @@ class ImageManager
 	 * Delete and specified files.
 	 * Delete and specified files.
 	 * @return boolean true if delete, false otherwise
 	 * @return boolean true if delete, false otherwise
 	 */
 	 */
-	function deleteFiles() 
+	function deleteFiles()
 	{
 	{
 		if(isset($_GET['delf']))
 		if(isset($_GET['delf']))
 			$this->_delFile(rawurldecode($_GET['delf']));
 			$this->_delFile(rawurldecode($_GET['delf']));
@@ -738,10 +738,10 @@ class ImageManager
 	 * Delete and specified directories.
 	 * Delete and specified directories.
 	 * @return boolean true if delete, false otherwise
 	 * @return boolean true if delete, false otherwise
 	 */
 	 */
-	function deleteDirs() 
+	function deleteDirs()
 	{
 	{
 		 if(isset($_GET['deld']))
 		 if(isset($_GET['deld']))
-			return $this->_delDir(rawurldecode($_GET['deld']));		
+			return $this->_delDir(rawurldecode($_GET['deld']));
 		 else
 		 else
 			 Return false;
 			 Return false;
 	}
 	}
@@ -751,7 +751,7 @@ class ImageManager
 	 * @param string $relative the relative file.
 	 * @param string $relative the relative file.
 	 * @return boolean true if deleted, false otherwise.
 	 * @return boolean true if deleted, false otherwise.
 	 */
 	 */
-	function _delFile($relative) 
+	function _delFile($relative)
 	{
 	{
 		$fullpath = Files::makeFile($this->getBaseDir(),$relative);
 		$fullpath = Files::makeFile($this->getBaseDir(),$relative);
 		//check that the file is an image
 		//check that the file is an image
@@ -767,7 +767,7 @@ class ImageManager
 			//deleting from the DB
 			//deleting from the DB
 			global $_course;
 			global $_course;
 			if (isset($_course['dbName']) && $_course<>'-1') {
 			if (isset($_course['dbName']) && $_course<>'-1') {
-				$document_path = substr($fullpath, strpos($fullpath,'/document/')+9, strlen($fullpath)); //   /shared_folder/4/name			
+				$document_path = substr($fullpath, strpos($fullpath,'/document/')+9, strlen($fullpath)); //   /shared_folder/4/name
 				DocumentManager::delete_document($_course,$document_path,$fullpath);
 				DocumentManager::delete_document($_course,$document_path,$fullpath);
 			}
 			}
 			Return Files::delFile($thumbnail);
 			Return Files::delFile($thumbnail);
@@ -781,17 +781,17 @@ class ImageManager
 	 * @param string $relative the relative path to be deleted.
 	 * @param string $relative the relative path to be deleted.
 	 * @return boolean true if deleted, false otherwise.
 	 * @return boolean true if deleted, false otherwise.
 	 */
 	 */
-	function _delDir($relative) 
+	function _delDir($relative)
 	{
 	{
 		$fullpath = Files::makePath($this->getBaseDir(),$relative);
 		$fullpath = Files::makePath($this->getBaseDir(),$relative);
 		//we can delete recursively	even if there are images in the dir
 		//we can delete recursively	even if there are images in the dir
-		 
+
 		//if($this->countFiles($fullpath) <= 0) {
 		//if($this->countFiles($fullpath) <= 0) {
 		// now we use the default delete_document function
 		// now we use the default delete_document function
 		//return Files::delFolder($fullpath,true); //delete recursively.
 		//return Files::delFolder($fullpath,true); //delete recursively.
 		global $_course;
 		global $_course;
-		if (isset($_course['dbName']) && $_course<>'-1') {			
-			$path_dir = substr($fullpath, strpos($fullpath,'/document/')+9,-1); //		
+		if (isset($_course['dbName']) && $_course<>'-1') {
+			$path_dir = substr($fullpath, strpos($fullpath,'/document/')+9,-1); //
 			$base_dir  = substr($fullpath, 0, strlen($fullpath) - strlen($path_dir)); //
 			$base_dir  = substr($fullpath, 0, strlen($fullpath) - strlen($path_dir)); //
 			return DocumentManager::delete_document($_course,$path_dir,$base_dir);
 			return DocumentManager::delete_document($_course,$path_dir,$base_dir);
 		}
 		}
@@ -804,9 +804,9 @@ class ImageManager
 			{
 			{
 				Return false;
 				Return false;
 			}
 			}
-			 
-		} 
-		/*	
+
+		}
+		/*
 		}
 		}
 		else
 		else
 			Return false;
 			Return false;
@@ -818,8 +818,8 @@ class ImageManager
 	 * If in safe_mode, nothing happens.
 	 * If in safe_mode, nothing happens.
 	 * @return boolean true if created, false otherwise.
 	 * @return boolean true if created, false otherwise.
 	 */
 	 */
-	function processNewDir() 
-	{		
+	function processNewDir()
+	{
 		if($this->config['safe_mode'] == true)
 		if($this->config['safe_mode'] == true)
 			Return false;
 			Return false;
 
 
@@ -827,29 +827,29 @@ class ImageManager
 		{
 		{
 			$newDir = rawurldecode($_GET['newDir']);
 			$newDir = rawurldecode($_GET['newDir']);
 			$dir = rawurldecode($_GET['dir']);
 			$dir = rawurldecode($_GET['dir']);
-			$path = Files::makePath($this->getBaseDir(),$dir);			
+			$path = Files::makePath($this->getBaseDir(),$dir);
 			$fullpath = Files::makePath($path, Files::escape($newDir));
 			$fullpath = Files::makePath($path, Files::escape($newDir));
 			if(is_dir($fullpath)) {
 			if(is_dir($fullpath)) {
 				Return false;
 				Return false;
 			} else {
 			} else {
 				//adding to the DB
 				//adding to the DB
 				// now the create_unexisting_directory will create the folder
 				// now the create_unexisting_directory will create the folder
-				//$result = Files::createFolder($fullpath);	
-									
+				//$result = Files::createFolder($fullpath);
+
 					global $_course;
 					global $_course;
-					if (isset($_course['dbName']) && $_course<>'-1') {	
+					if (isset($_course['dbName']) && $_course<>'-1') {
 					//@todo make this str to functions
 					//@todo make this str to functions
-					$base_dir = substr($path, 0, strpos($path,'/document/')+9); //  				
-					$new_dir  = substr($fullpath, strlen($base_dir),-1); //  			
-					$created_dir = create_unexisting_directory($_course, api_get_user_id(),0,0, $base_dir, $new_dir,$newDir);				
-					$doc_id = DocumentManager::get_document_id($_course, $new_dir );								
+					$base_dir = substr($path, 0, strpos($path,'/document/')+9); //
+					$new_dir  = substr($fullpath, strlen($base_dir),-1); //
+					$created_dir = create_unexisting_directory($_course, api_get_user_id(),0,0, $base_dir, $new_dir,$newDir);
+					$doc_id = DocumentManager::get_document_id($_course, $new_dir );
 					api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id());
 					api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id());
 				}
 				}
 				else
 				else
 				{
 				{
 				 	Return Files::createFolder($fullpath);
 				 	Return Files::createFolder($fullpath);
-				}				
-				return true;				
+				}
+				return true;
 			}
 			}
 		}
 		}
 	}
 	}

+ 9 - 9
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/NetPBM.php

@@ -4,7 +4,7 @@
 ** Version.......:  1.0
 ** Version.......:  1.0
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  NetPBM.php
 ** Filename......:  NetPBM.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
 ** Notes.........:  Orginal is from PEAR
 **/
 **/
 
 
@@ -45,7 +45,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
     function Image_Transform_Driver_NetPBM()
     function Image_Transform_Driver_NetPBM()
     {
     {
         $this->uid = md5($_SERVER['REMOTE_ADDR']);
         $this->uid = md5($_SERVER['REMOTE_ADDR']);
-            
+
         return true;
         return true;
     } // End function Image_NetPBM
     } // End function Image_NetPBM
 
 
@@ -90,7 +90,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
      * @param int $crop_width new cropped image width
      * @param int $crop_width new cropped image width
      * @param int $crop_height new cropped image height
      * @param int $crop_height new cropped image height
      */
      */
-    function crop($crop_x, $crop_y, $crop_width, $crop_height) 
+    function crop($crop_x, $crop_y, $crop_width, $crop_height)
     {
     {
         $this->command[] = IMAGE_TRANSFORM_LIB_PATH .
         $this->command[] = IMAGE_TRANSFORM_LIB_PATH .
                             "pnmcut -left $crop_x -top $crop_y -width $crop_width -height $crop_height";
                             "pnmcut -left $crop_x -top $crop_y -width $crop_width -height $crop_height";
@@ -106,7 +106,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
         $angle = -1*floatval($angle);
         $angle = -1*floatval($angle);
 
 
         if($angle > 90)
         if($angle > 90)
-        {   
+        {
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmrotate -noantialias 90";
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmrotate -noantialias 90";
             $this->rotate(-1*($angle-90));
             $this->rotate(-1*($angle-90));
         }
         }
@@ -124,9 +124,9 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
      *
      *
      * @param boolean $horizontal true if horizontal flip, vertical otherwise
      * @param boolean $horizontal true if horizontal flip, vertical otherwise
      */
      */
-    function flip($horizontal) 
+    function flip($horizontal)
     {
     {
-        if($horizontal) 
+        if($horizontal)
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmflip -lr";
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmflip -lr";
         else
         else
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmflip -tb";
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmflip -tb";
@@ -200,7 +200,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
                 break;
                 break;
         } // switch
         } // switch
         return implode('|', $this->command);
         return implode('|', $this->command);
-    } 
+    }
 
 
     /**
     /**
      * Save the image file
      * Save the image file
@@ -213,7 +213,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
     function save($filename, $type=null, $quality = 85)
     function save($filename, $type=null, $quality = 85)
     {
     {
         $cmd = $this->_postProcess('', $quality, $type) . ">$filename";
         $cmd = $this->_postProcess('', $quality, $type) . ">$filename";
-            
+
 		//if we have windows server
 		//if we have windows server
         if(isset($_ENV['OS']) && eregi('window',$_ENV['OS']))
         if(isset($_ENV['OS']) && eregi('window',$_ENV['OS']))
 			$cmd = ereg_replace('/','\\',$cmd);
 			$cmd = ereg_replace('/','\\',$cmd);
@@ -236,7 +236,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
     {
     {
         header('Content-type: image/' . $type);
         header('Content-type: image/' . $type);
         $cmd = $this->_postProcess($type, $quality);
         $cmd = $this->_postProcess($type, $quality);
-        
+
         passthru($cmd);
         passthru($cmd);
         $this->command = array();
         $this->command = array();
     }
     }

+ 9 - 9
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Thumbnail.php

@@ -16,7 +16,7 @@ require_once('Transform.php');
  * @package ImageManager
  * @package ImageManager
  * @subpackage Images
  * @subpackage Images
  */
  */
-class Thumbnail 
+class Thumbnail
 {
 {
 	/**
 	/**
 	 * Graphics driver, GD, NetPBM or ImageMagick.
 	 * Graphics driver, GD, NetPBM or ImageMagick.
@@ -53,7 +53,7 @@ class Thumbnail
 	 * @param int $width thumbnail width
 	 * @param int $width thumbnail width
 	 * @param int $height thumbnail height
 	 * @param int $height thumbnail height
 	 */
 	 */
-	function Thumbnail($width=96, $height=96) 
+	function Thumbnail($width=96, $height=96)
 	{
 	{
 		$this->driver = Image_Transform::factory(IMAGE_CLASS);
 		$this->driver = Image_Transform::factory(IMAGE_CLASS);
 		$this->width = $width;
 		$this->width = $width;
@@ -67,16 +67,16 @@ class Thumbnail
 	 * as this parameter value.
 	 * as this parameter value.
 	 * @return boolean true if thumbnail is created, false otherwise
 	 * @return boolean true if thumbnail is created, false otherwise
 	 */
 	 */
-	function createThumbnail($file, $thumbnail=null) 
+	function createThumbnail($file, $thumbnail=null)
 	{
 	{
-		if(!is_file($file)) 
+		if(!is_file($file))
 			Return false;
 			Return false;
 
 
 		//error_log('Creating Thumbs: '.$file);
 		//error_log('Creating Thumbs: '.$file);
 
 
 		$this->driver->load($file);
 		$this->driver->load($file);
 
 
-		if($this->proportional) 
+		if($this->proportional)
 		{
 		{
 			$width = $this->driver->img_x;
 			$width = $this->driver->img_x;
 			$height = $this->driver->img_y;
 			$height = $this->driver->img_y;
@@ -89,7 +89,7 @@ class Thumbnail
 
 
 		$this->driver->resize($this->width, $this->height);
 		$this->driver->resize($this->width, $this->height);
 
 
-		if(is_null($thumbnail)) 
+		if(is_null($thumbnail))
 			$this->save($file);
 			$this->save($file);
 		else
 		else
 			$this->save($thumbnail);
 			$this->save($thumbnail);
@@ -97,7 +97,7 @@ class Thumbnail
 
 
 		$this->free();
 		$this->free();
 
 
-		if(is_file($thumbnail)) 
+		if(is_file($thumbnail))
 			Return true;
 			Return true;
 		else
 		else
 			Return false;
 			Return false;
@@ -107,7 +107,7 @@ class Thumbnail
 	 * Save the thumbnail file.
 	 * Save the thumbnail file.
 	 * @param string $file file name to be saved as.
 	 * @param string $file file name to be saved as.
 	 */
 	 */
-	function save($file) 
+	function save($file)
 	{
 	{
 		$this->driver->save($file);
 		$this->driver->save($file);
 	}
 	}
@@ -115,7 +115,7 @@ class Thumbnail
 	/**
 	/**
 	 * Free up the graphic driver resources.
 	 * Free up the graphic driver resources.
 	 */
 	 */
-	function free() 
+	function free()
 	{
 	{
 		$this->driver->free();
 		$this->driver->free();
 	}
 	}

+ 6 - 6
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/Transform.php

@@ -4,9 +4,9 @@
 ** Version.......:  1.0
 ** Version.......:  1.0
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  Transform.php
 ** Filename......:  Transform.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
 ** Notes.........:  Orginal is from PEAR
-                    
+
                     Added a few extra,
                     Added a few extra,
                         - create unique filename in a particular directory,
                         - create unique filename in a particular directory,
                           used for temp image files.
                           used for temp image files.
@@ -345,7 +345,7 @@ Class Image_Transform
         while (false !== ($entry = $d->read())) {
         while (false !== ($entry = $d->read())) {
             if (is_file($dir.'/'.$entry) && substr($entry,0,1) == '.' && !ereg($entry, $this->image))
             if (is_file($dir.'/'.$entry) && substr($entry,0,1) == '.' && !ereg($entry, $this->image))
             {
             {
-                //echo filemtime($this->directory.'/'.$entry)."<br>"; 
+                //echo filemtime($this->directory.'/'.$entry)."<br>";
                 //echo time();
                 //echo time();
 
 
                 if (filemtime($dir.'/'.$entry) + $this->lapse_time < time())
                 if (filemtime($dir.'/'.$entry) + $this->lapse_time < time())
@@ -365,13 +365,13 @@ Class Image_Transform
     function createUnique($dir)
     function createUnique($dir)
     {
     {
        $unique_str = '.'.$this->uid.'_'.$this->uniqueStr().".".$this->type;
        $unique_str = '.'.$this->uid.'_'.$this->uniqueStr().".".$this->type;
-        
+
        //make sure the the unique temp file does not exists
        //make sure the the unique temp file does not exists
         while (file_exists($dir.$unique_str))
         while (file_exists($dir.$unique_str))
         {
         {
             $unique_str = '.'.$this->uid.'_'.$this->uniqueStr().".".$this->type;
             $unique_str = '.'.$this->uid.'_'.$this->uniqueStr().".".$this->type;
         }
         }
-        
+
       $this->cleanUp($this->uid, $dir);
       $this->cleanUp($this->uid, $dir);
 
 
        return $unique_str;
        return $unique_str;
@@ -556,7 +556,7 @@ Class Image_Transform
         return null; //PEAR::raiseError("No crop method exists", true);
         return null; //PEAR::raiseError("No crop method exists", true);
     }
     }
 
 
-    function flip() 
+    function flip()
     {
     {
         return null;
         return null;
     }
     }

+ 15 - 15
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/api.watermark.php

@@ -12,13 +12,13 @@ class watermark{
 	# given two images, return a blended watermarked image
 	# given two images, return a blended watermarked image
 	function create_watermark( $main_img_obj, $watermark_img_obj, $alpha_level = 100, $watermarkX = -1, $watermarkY = -1 ) {
 	function create_watermark( $main_img_obj, $watermark_img_obj, $alpha_level = 100, $watermarkX = -1, $watermarkY = -1 ) {
 		$alpha_level	/= 100;	# convert 0-100 (%) alpha to decimal
 		$alpha_level	/= 100;	# convert 0-100 (%) alpha to decimal
-	
+
 		# calculate our images dimensions
 		# calculate our images dimensions
 		$main_img_obj_w	= imagesx( $main_img_obj );
 		$main_img_obj_w	= imagesx( $main_img_obj );
 		$main_img_obj_h	= imagesy( $main_img_obj );
 		$main_img_obj_h	= imagesy( $main_img_obj );
 		$watermark_img_obj_w	= imagesx( $watermark_img_obj );
 		$watermark_img_obj_w	= imagesx( $watermark_img_obj );
 		$watermark_img_obj_h	= imagesy( $watermark_img_obj );
 		$watermark_img_obj_h	= imagesy( $watermark_img_obj );
-		
+
 		# determine watermark area for given coordinates
 		# determine watermark area for given coordinates
 		if ($watermarkX > - 1 && $watermarkY > -1)
 		if ($watermarkX > - 1 && $watermarkY > -1)
 		{
 		{
@@ -43,24 +43,24 @@ class watermark{
 		for( $y = $main_img_obj_min_y; $y < $main_img_obj_max_y; $y++ ) {
 		for( $y = $main_img_obj_min_y; $y < $main_img_obj_max_y; $y++ ) {
 			for( $x = $main_img_obj_min_x; $x < $main_img_obj_max_x; $x++ ) {
 			for( $x = $main_img_obj_min_x; $x < $main_img_obj_max_x; $x++ ) {
 				$return_color	= NULL;
 				$return_color	= NULL;
-				
+
 				# determine the correct pixel location within our watermark
 				# determine the correct pixel location within our watermark
 				$watermark_x	= $x - $main_img_obj_min_x;
 				$watermark_x	= $x - $main_img_obj_min_x;
 				$watermark_y	= $y - $main_img_obj_min_y;
 				$watermark_y	= $y - $main_img_obj_min_y;
-				
+
 				# fetch color information for both of our images
 				# fetch color information for both of our images
 				$main_rgb = imagecolorsforindex( $main_img_obj, imagecolorat( $main_img_obj, $x, $y ) );
 				$main_rgb = imagecolorsforindex( $main_img_obj, imagecolorat( $main_img_obj, $x, $y ) );
-				
+
 				# if our watermark has a non-transparent value at this pixel intersection
 				# if our watermark has a non-transparent value at this pixel intersection
 				# and we're still within the bounds of the watermark image
 				# and we're still within the bounds of the watermark image
 				if (	$watermark_x >= 0 && $watermark_x < $watermark_img_obj_w &&
 				if (	$watermark_x >= 0 && $watermark_x < $watermark_img_obj_w &&
 							$watermark_y >= 0 && $watermark_y < $watermark_img_obj_h ) {
 							$watermark_y >= 0 && $watermark_y < $watermark_img_obj_h ) {
 					$watermark_rbg = imagecolorsforindex( $watermark_img_obj, imagecolorat( $watermark_img_obj, $watermark_x, $watermark_y ) );
 					$watermark_rbg = imagecolorsforindex( $watermark_img_obj, imagecolorat( $watermark_img_obj, $watermark_x, $watermark_y ) );
-					
+
 					# using image alpha, and user specified alpha, calculate average
 					# using image alpha, and user specified alpha, calculate average
 					$watermark_alpha	= round( ( ( 127 - $watermark_rbg['alpha'] ) / 127 ), 2 );
 					$watermark_alpha	= round( ( ( 127 - $watermark_rbg['alpha'] ) / 127 ), 2 );
 					$watermark_alpha	= $watermark_alpha * $alpha_level;
 					$watermark_alpha	= $watermark_alpha * $alpha_level;
-				
+
 					# calculate the color 'average' between the two - taking into account the specified alpha level
 					# calculate the color 'average' between the two - taking into account the specified alpha level
 					$avg_red		= $this->_get_ave_color( $main_rgb['red'],		$watermark_rbg['red'],		$watermark_alpha );
 					$avg_red		= $this->_get_ave_color( $main_rgb['red'],		$watermark_rbg['red'],		$watermark_alpha );
 					$avg_green	= $this->_get_ave_color( $main_rgb['green'],	$watermark_rbg['green'],	$watermark_alpha );
 					$avg_green	= $this->_get_ave_color( $main_rgb['green'],	$watermark_rbg['green'],	$watermark_alpha );
@@ -68,29 +68,29 @@ class watermark{
 
 
 					# calculate a color index value using the average RGB values we've determined
 					# calculate a color index value using the average RGB values we've determined
 					$return_color	= $this->_get_image_color( $return_img, $avg_red, $avg_green, $avg_blue );
 					$return_color	= $this->_get_image_color( $return_img, $avg_red, $avg_green, $avg_blue );
-					
+
 				# if we're not dealing with an average color here, then let's just copy over the main color
 				# if we're not dealing with an average color here, then let's just copy over the main color
 				} else {
 				} else {
 					$return_color	= imagecolorat( $main_img_obj, $x, $y );
 					$return_color	= imagecolorat( $main_img_obj, $x, $y );
-					
+
 				} # END if watermark
 				} # END if watermark
-		
+
 				# draw the appropriate color onto the return image
 				# draw the appropriate color onto the return image
 				imagesetpixel( $return_img, $x, $y, $return_color );
 				imagesetpixel( $return_img, $x, $y, $return_color );
-		
+
 			} # END for each X pixel
 			} # END for each X pixel
 		} # END for each Y pixel
 		} # END for each Y pixel
-			
+
 		# return the resulting, watermarked image for display
 		# return the resulting, watermarked image for display
 		return $return_img;
 		return $return_img;
-	
+
 	} # END create_watermark()
 	} # END create_watermark()
-	
+
 	# average two colors given an alpha
 	# average two colors given an alpha
 	function _get_ave_color( $color_a, $color_b, $alpha_level ) {
 	function _get_ave_color( $color_a, $color_b, $alpha_level ) {
 		return round( ( ( $color_a * ( 1 - $alpha_level ) ) + ( $color_b	* $alpha_level ) ) );
 		return round( ( ( $color_a * ( 1 - $alpha_level ) ) + ( $color_b	* $alpha_level ) ) );
 	} # END _get_ave_color()
 	} # END _get_ave_color()
-		
+
 	# return closest pallette-color match for RGB values
 	# return closest pallette-color match for RGB values
 	function _get_image_color($im, $r, $g, $b) {
 	function _get_image_color($im, $r, $g, $b) {
 		$c=imagecolorexact($im, $r, $g, $b);
 		$c=imagecolorexact($im, $r, $g, $b);

+ 7 - 7
main/inc/lib/fckeditor/editor/plugins/ImageManager/config.inc.php

@@ -8,11 +8,11 @@
  */
  */
 
 
 
 
-/* 
+/*
  File system path to the directory you want to manage the images
  File system path to the directory you want to manage the images
  for multiple user systems, set it dynamically.
  for multiple user systems, set it dynamically.
 
 
- NOTE: This directory requires write access by PHP. That is, 
+ NOTE: This directory requires write access by PHP. That is,
        PHP must be able to create files in this directory.
        PHP must be able to create files in this directory.
 	   Able to create directories is nice, but not necessary.
 	   Able to create directories is nice, but not necessary.
 */
 */
@@ -94,11 +94,11 @@ $IMConfig['demo'] = false;
 */
 */
 $IMConfig['safe_mode'] = false;
 $IMConfig['safe_mode'] = false;
 
 
-/* 
+/*
  Possible values: 'GD', 'IM', or 'NetPBM'
  Possible values: 'GD', 'IM', or 'NetPBM'
 
 
  The image manipulation library to use, either GD or ImageMagick or NetPBM.
  The image manipulation library to use, either GD or ImageMagick or NetPBM.
- If you have safe mode ON, or don't have the binaries to other packages, 
+ If you have safe mode ON, or don't have the binaries to other packages,
  your choice is 'GD' only. Other packages require Safe Mode to be off.
  your choice is 'GD' only. Other packages require Safe Mode to be off.
 */
 */
 define('IMAGE_CLASS', 'GD');
 define('IMAGE_CLASS', 'GD');
@@ -126,7 +126,7 @@ $IMConfig['thumbnail_prefix'] = '.';
 /*
 /*
   Thumbnail can also be stored in a directory, this directory
   Thumbnail can also be stored in a directory, this directory
   will be created by PHP. If PHP is in safe mode, this parameter
   will be created by PHP. If PHP is in safe mode, this parameter
-  is ignored, you can not create directories. 
+  is ignored, you can not create directories.
 
 
   If you do not want to store thumbnails in a directory, set this
   If you do not want to store thumbnails in a directory, set this
   to false or empty string '';
   to false or empty string '';
@@ -237,8 +237,8 @@ $IMConfig['accepted_extensions'] = array('gif', 'jpg', 'png', 'bmp', 'jpeg');
 /*
 /*
  Possible values: true, false
  Possible values: true, false
 
 
- TRUE - If set to true, uploaded files will be validated based on the 
-        function getImageSize, if we can get the image dimensions then 
+ TRUE - If set to true, uploaded files will be validated based on the
+        function getImageSize, if we can get the image dimensions then
         I guess this should be a valid image. Otherwise the file will be rejected.
         I guess this should be a valid image. Otherwise the file will be rejected.
 
 
  FALSE - All uploaded files will be processed.
  FALSE - All uploaded files will be processed.

+ 28 - 28
main/inc/lib/fckeditor/editor/plugins/ImageManager/editor.php

@@ -15,7 +15,7 @@ $manager = new ImageManager($IMConfig);
 $editor = new ImageEditor($manager, $IMConfig);
 $editor = new ImageEditor($manager, $IMConfig);
 $clean_img = '';
 $clean_img = '';
 if (isset($_GET['img'])) {
 if (isset($_GET['img'])) {
-	$clean_img = Security::remove_XSS($_GET['img']);	
+	$clean_img = Security::remove_XSS($_GET['img']);
 }
 }
 
 
 ?>
 ?>
@@ -24,7 +24,7 @@ if (isset($_GET['img'])) {
 <html>
 <html>
 <head>
 <head>
 <title>Edit image</title>
 <title>Edit image</title>
-<link href="assets/editor.css" rel="stylesheet" type="text/css" />	
+<link href="assets/editor.css" rel="stylesheet" type="text/css" />
 
 
 <script type="text/javascript">
 <script type="text/javascript">
 /*<![CDATA[*/
 /*<![CDATA[*/
@@ -156,9 +156,9 @@ body {
 			</td>
 			</td>
 		</tr>
 		</tr>
 		</table>
 		</table>
-		</div>	
+		</div>
 		<a href="javascript: doUpload(); document.getElementById('uploadForm').submit();" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 		<a href="javascript: doUpload(); document.getElementById('uploadForm').submit();" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
-	</div>	
+	</div>
 	<div id="tools_watermark" style="display:none;">
 	<div id="tools_watermark" style="display:none;">
 		<div id="watermarkControls">
 		<div id="watermarkControls">
 			<div id="tool_inputs">
 			<div id="tool_inputs">
@@ -168,13 +168,13 @@ body {
 				<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 				<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 					<tr>
 					<tr>
 					<td>
 					<td>
-						<div id="slidercasingwatermark" class="slidercasing"> 
+						<div id="slidercasingwatermark" class="slidercasing">
 					<div id="slidertrackwatermark" class="slidertrack" style="width:100px"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
 					<div id="slidertrackwatermark" class="slidertrack" style="width:100px"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
 				<div id="sliderbarwatermark" class="sliderbar" style="left:100px" onmousedown="captureStart('watermark');"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
 				<div id="sliderbarwatermark" class="sliderbar" style="left:100px" onmousedown="captureStart('watermark');"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
-				</div>	
+				</div>
 					</td>
 					</td>
 					</tr>
 					</tr>
-				</table>				
+				</table>
 				<input type="text" id="sliderfieldwatermark" onchange="updateSlider(this.value, 'watermark')" style="width: 2em;" value="100"/>
 				<input type="text" id="sliderfieldwatermark" onchange="updateSlider(this.value, 'watermark')" style="width: 2em;" value="100"/>
 				<table style="display: inline; vertical-align: bottom; margin: 0px 5px 0px 20px;" cellpadding="0" cellspacing="0">
 				<table style="display: inline; vertical-align: bottom; margin: 0px 5px 0px 20px;" cellpadding="0" cellspacing="0">
 					<tr>
 					<tr>
@@ -192,7 +192,7 @@ body {
 						</div>
 						</div>
 					</td>
 					</td>
 					</tr>
 					</tr>
-				</table>		
+				</table>
 				<table style="display: inline; vertical-align: bottom; margin: 0px 10px 0px 5px;" cellpadding="0" cellspacing="0">
 				<table style="display: inline; vertical-align: bottom; margin: 0px 10px 0px 5px;" cellpadding="0" cellspacing="0">
 					<tr>
 					<tr>
 					<td>
 					<td>
@@ -208,15 +208,15 @@ body {
 						</div>
 						</div>
 					</td>
 					</td>
 					</tr>
 					</tr>
-				</table>		
+				</table>
 				<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 				<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
-			</div>	
+			</div>
 			<a href="javascript: editor.doSubmit('watermark');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 			<a href="javascript: editor.doSubmit('watermark');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
-		</div>	
+		</div>
 		<div id="watermarkMessage" style="display: none;">
 		<div id="watermarkMessage" style="display: none;">
 			<script>document.write("<div id=\"tool_inputs\" style=\"text-align: center; width: 90%; color: #474767;\"><label style=\" font-weight: bold; letter-spacing: 3px;\">" + i18n("Watermarking is disabled.") + "</label><br /><label>" + i18n("No watermarks were found or all watermarks are to big for the target image.") + "</label></div>");</script>
 			<script>document.write("<div id=\"tool_inputs\" style=\"text-align: center; width: 90%; color: #474767;\"><label style=\" font-weight: bold; letter-spacing: 3px;\">" + i18n("Watermarking is disabled.") + "</label><br /><label>" + i18n("No watermarks were found or all watermarks are to big for the target image.") + "</label></div>");</script>
-		</div>	
-	</div>	
+		</div>
+	</div>
 	<div id="tools_crop" style="display:none;">
 	<div id="tools_crop" style="display:none;">
 		<div id="tool_inputs">
 		<div id="tool_inputs">
 			<label for="cx">Start X:</label><input type="text" id="cx"  class="textInput" onchange="updateMarker('crop')"/>
 			<label for="cx">Start X:</label><input type="text" id="cx"  class="textInput" onchange="updateMarker('crop')"/>
@@ -224,10 +224,10 @@ body {
 			<label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/>
 			<label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/>
 			<label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/>
 			<label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/>
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
-		</div>	
+		</div>
 		<a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 		<a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
-		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>		
-	</div>	
+		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>
+	</div>
 	<div id="tools_scale" style="display:none;">
 	<div id="tools_scale" style="display:none;">
 		<div id="tool_inputs">
 		<div id="tool_inputs">
 			<label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/>
 			<label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/>
@@ -236,10 +236,10 @@ body {
 			<input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/>
 			<input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/>
 			<label for="constProp">Constrain Proportions</label>
 			<label for="constProp">Constrain Proportions</label>
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
-		</div>	
+		</div>
 		<a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 		<a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
-		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>		
-	</div>	
+		<a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>
+	</div>
 	<div id="tools_rotate" style="display:none;">
 	<div id="tools_rotate" style="display:none;">
 		<div id="tool_inputs">
 		<div id="tool_inputs">
 			<select id="flip" name="flip" style="margin-left: 10px; vertical-align: middle;">
 			<select id="flip" name="flip" style="margin-left: 10px; vertical-align: middle;">
@@ -258,9 +258,9 @@ body {
          </select>
          </select>
 			<label for="ra">Angle:</label><input type="text" id="ra" class="textInput" value="0"/>
 			<label for="ra">Angle:</label><input type="text" id="ra" class="textInput" value="0"/>
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
-		</div>	
+		</div>
 		<a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 		<a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
-	</div>		
+	</div>
 	<div id="tools_measure" style="display:none;">
 	<div id="tools_measure" style="display:none;">
 		<div id="tool_inputs">
 		<div id="tool_inputs">
 			<label id="xLabel">X:<input type="text" class="measureStats" id="sx" disabled /></label>
 			<label id="xLabel">X:<input type="text" class="measureStats" id="sx" disabled /></label>
@@ -282,7 +282,7 @@ body {
 				document.getElementById("angleLabel").title = i18n("angle");
 				document.getElementById("angleLabel").title = i18n("angle");
 				document.getElementById("diagonalLabel").title = i18n("diagonal length");
 				document.getElementById("diagonalLabel").title = i18n("diagonal length");
 			</script>
 			</script>
-		</div>	
+		</div>
 	</div>
 	</div>
 	<div id="tools_save" style="display:none;">
 	<div id="tools_save" style="display:none;">
 
 
@@ -318,27 +318,27 @@ body {
 			<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 			<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 				<tr>
 				<tr>
 				<td>
 				<td>
-					<div id="slidercasingsave" class="slidercasing"> 
+					<div id="slidercasingsave" class="slidercasing">
 				<div id="slidertracksave" class="slidertrack" style="width:100px"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
 				<div id="slidertracksave" class="slidertrack" style="width:100px"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
             <div id="sliderbarsave" class="sliderbar" style="left:85px" onmousedown="captureStart('save');"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
             <div id="sliderbarsave" class="sliderbar" style="left:85px" onmousedown="captureStart('save');"><img src="img/spacer.gif" width="1" height="1" border="0" alt="track"></div>
-			</div>	
+			</div>
 				</td>
 				</td>
 				</tr>
 				</tr>
-			</table>				
+			</table>
 			<input type="text" id="sliderfieldsave" onchange="updateSlider(this.value, 'save')" style="width: 2em;" value="85"/>
 			<input type="text" id="sliderfieldsave" onchange="updateSlider(this.value, 'save')" style="width: 2em;" value="85"/>
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
 			<img src="img/div.gif" height="30" width="2" class="div" alt="|" />
-		</div>	
+		</div>
 		<a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 		<a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="img/btn_ok.gif" height="30" width="30" alt="OK" /></a>
 
 
 	<?php }else{ ?>
 	<?php }else{ ?>
 
 
 		<div id="tool_inputs" style="text-align: center; width: 90%; font-size: 150%; font-weight: bold; letter-spacing: 3px; color: #474767;">
 		<div id="tool_inputs" style="text-align: center; width: 90%; font-size: 150%; font-weight: bold; letter-spacing: 3px; color: #474767;">
 			<label>Demo</label>
 			<label>Demo</label>
-		</div>	
+		</div>
 
 
 	<?php } ?>
 	<?php } ?>
 
 
-	</div>	
+	</div>
 </div>
 </div>
 <div id="toolbar">
 <div id="toolbar">
 	<div id="buttons">
 	<div id="buttons">

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/ImageManager/editorFrame.php

@@ -116,7 +116,7 @@
 		else
 		else
 			return str;
 			return str;
 	};
 	};
-	
+
 </script>
 </script>
 
 
 <script type="text/javascript">
 <script type="text/javascript">
@@ -125,7 +125,7 @@
 	{
 	{
 ?>
 ?>
 	// Reload the images in the imageframe of the Manager :
 	// Reload the images in the imageframe of the Manager :
-	// Is there a "imgManager" frame. 
+	// Is there a "imgManager" frame.
 	if ((popupWindow = parent.opener.parent) && (imgManager = parent.opener.parent.document.getElementById("imgManager")))
 	if ((popupWindow = parent.opener.parent) && (imgManager = parent.opener.parent.document.getElementById("imgManager")))
 	{
 	{
 		// refresh it - so it shows the edited image.
 		// refresh it - so it shows the edited image.

+ 19 - 19
main/inc/lib/fckeditor/editor/plugins/ImageManager/images.php

@@ -51,7 +51,7 @@ function drawFiles($list, &$manager)
 	global $relative;
 	global $relative;
 	global $IMConfig;
 	global $IMConfig;
 
 
-	foreach($list as $entry => $file) 
+	foreach($list as $entry => $file)
 	{ ?>
 	{ ?>
 		<td><table width="100" cellpadding="0" cellspacing="0"><tr><td class="block">
 		<td><table width="100" cellpadding="0" cellspacing="0"><tr><td class="block">
 		<a href="javascript: void(0);" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo $entry; ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);"title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"><img src="<?php echo $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/></a>
 		<a href="javascript: void(0);" onclick="selectImage('<?php echo $file['relative'];?>', '<?php echo $entry; ?>', <?php echo $file['image'][0];?>, <?php echo $file['image'][1]; ?>);"title="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"><img src="<?php echo $manager->getThumbnail($file['relative']); ?>" alt="<?php echo $entry; ?> - <?php echo Files::formatSize($file['stat']['size']); ?>"/></a>
@@ -63,8 +63,8 @@ function drawFiles($list, &$manager)
 			<a href="javascript: void(0);" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a>
 			<a href="javascript: void(0);" title="Edit" onclick="editImage('<?php echo rawurlencode($file['relative']);?>');"><img src="img/edit_pencil.gif" height="15" width="15" alt="Edit"/></a>
 		<?php } ?>
 		<?php } ?>
 		<?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?>
 		<?php if($file['image']){ echo $file['image'][0].'x'.$file['image'][1]; } else echo $entry;?>
-		</td></tr></table></td> 
-	  <?php 
+		</td></tr></table></td>
+	  <?php
 	}//foreach
 	}//foreach
 }//function drawFiles
 }//function drawFiles
 
 
@@ -72,7 +72,7 @@ function drawFiles($list, &$manager)
 /**
 /**
  * Draw the directory.
  * Draw the directory.
  */
  */
-function drawDirs($list, &$manager) 
+function drawDirs($list, &$manager)
 {
 {
 	global $relative;
 	global $relative;
 
 
@@ -108,7 +108,7 @@ function drawNoResults()
 /**
 /**
  * No directories and no files.
  * No directories and no files.
  */
  */
-function drawErrorBase(&$manager) 
+function drawErrorBase(&$manager)
 {
 {
 ?>
 ?>
 <table width="100%">
 <table width="100%">
@@ -116,7 +116,7 @@ function drawErrorBase(&$manager)
     <td class="error">Invalid base directory: <?php echo $manager->config['base_dir']; ?></td>
     <td class="error">Invalid base directory: <?php echo $manager->config['base_dir']; ?></td>
   </tr>
   </tr>
 </table>
 </table>
-<?php	
+<?php
 }
 }
 
 
 ?>
 ?>
@@ -150,26 +150,26 @@ function drawErrorBase(&$manager)
 		//var topDoc = window.top.document;
 		//var topDoc = window.top.document;
 		var topDoc = window.parent.document;
 		var topDoc = window.parent.document;
 
 
-<?php 
+<?php
 	//we need to refesh the drop directory list
 	//we need to refesh the drop directory list
 	//save the current dir, delete all select options
 	//save the current dir, delete all select options
 	//add the new list, re-select the saved dir.
 	//add the new list, re-select the saved dir.
-	if($refreshDir) 
-	{ 
+	if($refreshDir)
+	{
 		$dirs = $manager->getDirs();
 		$dirs = $manager->getDirs();
-		
+
 ?>
 ?>
 		var selection = topDoc.getElementById('dirPath');
 		var selection = topDoc.getElementById('dirPath');
 		var currentDir = selection.options[selection.selectedIndex].text;
 		var currentDir = selection.options[selection.selectedIndex].text;
 
 
 		while(selection.length > 0)
 		while(selection.length > 0)
 		{	selection.remove(0); }
 		{	selection.remove(0); }
-		
-		selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>");	
+
+		selection.options[selection.length] = new Option("/","<?php echo rawurlencode('/'); ?>");
 		<?php foreach($dirs as $relative=>$fullpath) { ?>
 		<?php foreach($dirs as $relative=>$fullpath) { ?>
-		selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>");		
+		selection.options[selection.length] = new Option("<?php echo $relative; ?>","<?php echo rawurlencode($relative); ?>");
 		<?php } ?>
 		<?php } ?>
-		
+
 		for(var i = 0; i < selection.length; i++)
 		for(var i = 0; i < selection.length; i++)
 		{
 		{
 			var thisDir = selection.options[i].text;
 			var thisDir = selection.options[i].text;
@@ -178,16 +178,16 @@ function drawErrorBase(&$manager)
 				selection.selectedIndex = i;
 				selection.selectedIndex = i;
 				break;
 				break;
 			}
 			}
-		}		
+		}
 <?php } ?>
 <?php } ?>
-	}	
+	}
 
 
-	function editImage(image) 
+	function editImage(image)
 	{
 	{
 		var url = "<?php echo api_get_path(REL_CODE_PATH).'inc/lib/fckeditor/editor/plugins/ImageManager/'; ?>editor.php?img="+image;
 		var url = "<?php echo api_get_path(REL_CODE_PATH).'inc/lib/fckeditor/editor/plugins/ImageManager/'; ?>editor.php?img="+image;
 		if ( window.parent.opener )
 		if ( window.parent.opener )
 		{
 		{
-			Dialog(url, function(param) 
+			Dialog(url, function(param)
 			{
 			{
 				if (!param) // user must have pressed Cancel
 				if (!param) // user must have pressed Cancel
 					return false;
 					return false;
@@ -209,7 +209,7 @@ function drawErrorBase(&$manager)
 </head>
 </head>
 
 
 <body>
 <body>
-<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); } 
+<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); }
 	elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?>
 	elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?>
 <table>
 <table>
 	<tr>
 	<tr>

+ 12 - 12
main/inc/lib/fckeditor/editor/plugins/ImageManager/manager.php

@@ -6,22 +6,22 @@
  * @package ImageManager
  * @package ImageManager
  */
  */
 
 
-	require_once('config.inc.php'); 
+	require_once('config.inc.php');
 	require_once('Classes/ImageManager.php');
 	require_once('Classes/ImageManager.php');
-	
+
 	$manager = new ImageManager($IMConfig);
 	$manager = new ImageManager($IMConfig);
 	$dirs = $manager->getDirs();
 	$dirs = $manager->getDirs();
 	$var = explode('/',$_GET['base_url_alt']);
 	$var = explode('/',$_GET['base_url_alt']);
 	/*
 	/*
-	// if the base_url_alt parameter there is a default_course_document we change the allow upload parameter	
+	// if the base_url_alt parameter there is a default_course_document we change the allow upload parameter
 	if (($var[count($var)-2] == 'default_course_document') && !api_is_platform_admin())
 	if (($var[count($var)-2] == 'default_course_document') && !api_is_platform_admin())
-	{ 
+	{
 		$IMConfig['allow_upload']=false;
 		$IMConfig['allow_upload']=false;
-	}	
+	}
 	*/
 	*/
 	//clean injection string (XSS)
 	//clean injection string (XSS)
-	$base_url_alt = str_replace('"','',$_GET['base_url_alt']);		
-		
+	$base_url_alt = str_replace('"','',$_GET['base_url_alt']);
+
 ?>
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 
@@ -143,13 +143,13 @@ body {
 	<label for="dirPath">Directory</label>
 	<label for="dirPath">Directory</label>
 	<select name="dir" class="dirWidth" id="dirPath" onchange="javascript: updateDir(this);" style="width: 400px;">
 	<select name="dir" class="dirWidth" id="dirPath" onchange="javascript: updateDir(this);" style="width: 400px;">
 	<option value="/">/</option>
 	<option value="/">/</option>
-<?php 		
+<?php
 	  foreach($dirs as $relative=>$fullpath) { ?>
 	  foreach($dirs as $relative=>$fullpath) { ?>
-	  	<?php if($relative == '/images/gallery/') {?>	    
+	  	<?php if($relative == '/images/gallery/') {?>
 		<option value="<?php echo rawurlencode($relative); ?>" selected="selected"><?php echo $relative; ?></option>
 		<option value="<?php echo rawurlencode($relative); ?>" selected="selected"><?php echo $relative; ?></option>
 		<?php } else {?>
 		<?php } else {?>
 		<option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option>
 		<option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option>
-		<?php } ?>	
+		<?php } ?>
 <?php } ?>
 <?php } ?>
 	</select>
 	</select>
 	<a href="javascript: void(0);" onclick="javascript: goUpDir();" title="Directory Up"><img src="img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" />&nbsp;<span>Directory Up</span></a>
 	<a href="javascript: void(0);" onclick="javascript: goUpDir();" title="Directory Up"><img src="img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" />&nbsp;<span>Directory Up</span></a>
@@ -172,7 +172,7 @@ body {
 			<td rowspan="3" align="right">&nbsp;</td>
 			<td rowspan="3" align="right">&nbsp;</td>
 			<td align="right"><label for="f_vert">V Space</label></td>
 			<td align="right"><label for="f_vert">V Space</label></td>
 			<td><input type="text" id="f_vert" class="smallWidth" value="" /></td>
 			<td><input type="text" id="f_vert" class="smallWidth" value="" /></td>
-		</tr>		
+		</tr>
 		<tr>
 		<tr>
 			<td align="right"><label for="f_alt">Alt</label></td>
 			<td align="right"><label for="f_alt">Alt</label></td>
 			<td><input type="text" id="f_alt" class="largelWidth" value="" /></td>
 			<td><input type="text" id="f_alt" class="largelWidth" value="" /></td>
@@ -213,7 +213,7 @@ body {
 			<td align="right"><label for="f_border">Border</label></td>
 			<td align="right"><label for="f_border">Border</label></td>
 			<td><input type="text" id="f_border" class="smallWidth" value="" /></td>
 			<td><input type="text" id="f_border" class="smallWidth" value="" /></td>
 		</tr>
 		</tr>
-		<tr> 
+		<tr>
 <?php if (count($IMConfig['maxWidth']) > 1 && $IMConfig['allow_upload']){ ?>
 <?php if (count($IMConfig['maxWidth']) > 1 && $IMConfig['allow_upload']){ ?>
 			<td align="right"><label for="uploadSize" style="white-space: nowrap;">Upload Size</label></td>
 			<td align="right"><label for="uploadSize" style="white-space: nowrap;">Upload Size</label></td>
 			<td>
 			<td>

+ 15 - 15
main/inc/lib/fckeditor/editor/plugins/MP3/fck_mp3.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-// name of the language file that needs to be included 
+// name of the language file that needs to be included
 $language_file = array('resourcelinker','document');
 $language_file = array('resourcelinker','document');
 include('../../../../../../inc/global.inc.php');
 include('../../../../../../inc/global.inc.php');
 ?>
 ?>
@@ -10,7 +10,7 @@ include('../../../../../../inc/global.inc.php');
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 		<meta content="noindex, nofollow" name="robots">
 		<meta content="noindex, nofollow" name="robots">
 		<script type="text/javascript">
 		<script type="text/javascript">
-		/*<![CDATA[*/		
+		/*<![CDATA[*/
 		var rel_path = "<?php  echo api_get_path(REL_CODE_PATH); ?>";
 		var rel_path = "<?php  echo api_get_path(REL_CODE_PATH); ?>";
 		//var tab_to_select = '<?php echo !empty($_SERVER['QUERY_STRING']) ? 'Info' : 'Upload'; ?>';
 		//var tab_to_select = '<?php echo !empty($_SERVER['QUERY_STRING']) ? 'Info' : 'Upload'; ?>';
 		var tab_to_select = 'Info' ;
 		var tab_to_select = 'Info' ;
@@ -28,7 +28,7 @@ include('../../../../../../inc/global.inc.php');
 					<td>
 					<td>
 						<table cellspacing="0" cellpadding="0" width="100%" border="0">
 						<table cellspacing="0" cellpadding="0" width="100%" border="0">
 							<tr>
 							<tr>
-							<td valign="top" width="100%">								
+							<td valign="top" width="100%">
 								<span fckLang="DlgMP3URL">URL</span><br>
 								<span fckLang="DlgMP3URL">URL</span><br>
 								<input id="mpUrl" onBlur="javascript:updatePreview();" style="width: 100%" type="text">
 								<input id="mpUrl" onBlur="javascript:updatePreview();" style="width: 100%" type="text">
 							</td>
 							</td>
@@ -50,34 +50,34 @@ include('../../../../../../inc/global.inc.php');
 		  //if (api_is_in_course() || api_is_platform_admin())
 		  //if (api_is_in_course() || api_is_platform_admin())
 		  //{
 		  //{
 		 	 include(api_get_path(INCLUDE_PATH).'course_document.inc.php');
 		 	 include(api_get_path(INCLUDE_PATH).'course_document.inc.php');
-		  //}		  
+		  //}
 		  ?>
 		  ?>
 		        </td>
 		        </td>
 		      </tr>
 		      </tr>
 		    </table>
 		    </table>
 		  </div>
 		  </div>
 		</div>
 		</div>
-		<div id="divUpload" style="display: none">		
-		<?php		
+		<div id="divUpload" style="display: none">
+		<?php
 			include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
 			include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
-			$form = new FormValidator('frmUpload','POST','','UploadWindow','id="frmUpload" enctype="multipart/form-data" onSubmit="javascript:return CheckUpload();"');			
-			$form->addElement('html','<table cellspacing="1" cellpadding="1" border="0" width="90%" align="center">');			
+			$form = new FormValidator('frmUpload','POST','','UploadWindow','id="frmUpload" enctype="multipart/form-data" onSubmit="javascript:return CheckUpload();"');
+			$form->addElement('html','<table cellspacing="1" cellpadding="1" border="0" width="90%" align="center">');
 			$form->addElement('html','<tr><td>&nbsp;</td><tr><td>');
 			$form->addElement('html','<tr><td>&nbsp;</td><tr><td>');
 			$form->addElement('file','NewFile','','id="txtUploadFile" size="40"');
 			$form->addElement('file','NewFile','','id="txtUploadFile" size="40"');
-			$form->addElement('html','</td></tr>');			
+			$form->addElement('html','</td></tr>');
 			$form->addElement('html','<tr><td>');
 			$form->addElement('html','<tr><td>');
 			//$renderer = & $form->defaultRenderer();
 			//$renderer = & $form->defaultRenderer();
 			//$renderer->setElementTemplate('<div style="margin-left:-4px;">{element} {label}</div>', 'autostart');
 			//$renderer->setElementTemplate('<div style="margin-left:-4px;">{element} {label}</div>', 'autostart');
 			$form->addElement('checkbox', 'autostart', '', '&nbsp;'.api_convert_encoding(get_lang('FckMp3Autostart'), 'UTF-8', $charset), array('id' => 'autostart'));
 			$form->addElement('checkbox', 'autostart', '', '&nbsp;'.api_convert_encoding(get_lang('FckMp3Autostart'), 'UTF-8', $charset), array('id' => 'autostart'));
-			$form->addElement('html','</td></tr>');			
+			$form->addElement('html','</td></tr>');
 			$form->addElement('html','<tr><td>');
 			$form->addElement('html','<tr><td>');
 			$form->addElement('submit','','Send it to the Server','id="btnUpload" fckLang="DlgLnkBtnUpload"');
 			$form->addElement('submit','','Send it to the Server','id="btnUpload" fckLang="DlgLnkBtnUpload"');
-			$form->addElement('html','</td></tr></table>');			
+			$form->addElement('html','</td></tr></table>');
 			$form->addElement('html','<iframe name="UploadWindow" style="display: none" src="../../fckblank.html"></iframe>');
 			$form->addElement('html','<iframe name="UploadWindow" style="display: none" src="../../fckblank.html"></iframe>');
-			
-			$form->add_real_progress_bar('fckMP3','NewFile');			
-			$form->display();			
-		?>		
+
+			$form->add_real_progress_bar('fckMP3','NewFile');
+			$form->display();
+		?>
 		</div>
 		</div>
 		<script type="text/javascript">window_onload(tab_to_select);</script>
 		<script type="text/javascript">window_onload(tab_to_select);</script>
 	</body>
 	</body>

+ 36 - 36
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_details_listing.php

@@ -11,78 +11,78 @@
 						</tr>
 						</tr>
 					</thead>
 					</thead>
 					<tbody id="fileList">
 					<tbody id="fileList">
-						<?php					
-						
+						<?php
+
 							$count = 1;
 							$count = 1;
 							$css = "";
 							$css = "";
-							//list all documents (files and folders) under this current folder, 
+							//list all documents (files and folders) under this current folder,
 							// echo appendQueryString(appendQueryString(CONFIG_URL_FILEnIMAGE_MANAGER, "path=" . $file['path']), makeQueryString(array('path')));
 							// echo appendQueryString(appendQueryString(CONFIG_URL_FILEnIMAGE_MANAGER, "path=" . $file['path']), makeQueryString(array('path')));
 							foreach($fileList as $file)
 							foreach($fileList as $file)
 							{
 							{
 								$css = ($css == "" || $css == "even"?"odd":"even");
 								$css = ($css == "" || $css == "even"?"odd":"even");
 								$strDisabled = ($file['is_writable']?"":" disabled");
 								$strDisabled = ($file['is_writable']?"":" disabled");
 								$strClass = ($file['is_writable']?"left":" leftDisabled");
 								$strClass = ($file['is_writable']?"left":" leftDisabled");
-								
-								///First step for hidden some type of Dokeos files and folders 
-								//Juan Carlos Raña
-								
+
+								///First step for hidden some type of Dokeos files and folders
+								//Juan Carlos Ra�a
+
 									//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat_files
 									//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat_files
-									$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php	
+									$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
 									$deleted_by_dokeos_folder='_DELETED_';
 									$deleted_by_dokeos_folder='_DELETED_';
 									$css_folder_dokeos='css';
 									$css_folder_dokeos='css';
 									$hotpotatoes_folder_dokeos='HotPotatoes_files';
 									$hotpotatoes_folder_dokeos='HotPotatoes_files';
 									$chat_files_dokeos='chat_files';
 									$chat_files_dokeos='chat_files';
-									
-									//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?				
+
+									//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?
 									$group_folder='_groupdocs';
 									$group_folder='_groupdocs';
-									
-									$show_doc_group=true;								
+
+									$show_doc_group=true;
 									if(ereg($group_folder, $file['path']))
 									if(ereg($group_folder, $file['path']))
 									{
 									{
 										$show_doc_group=false;
 										$show_doc_group=false;
 										if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 										if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 										{
 										{
-											$show_doc_group=true;					
+											$show_doc_group=true;
 										}
 										}
-										
+
 									}
 									}
-									
+
 									//show icon sharedfolder
 									//show icon sharedfolder
-									$shared_folder='shared folder';	 //'shared folder' not 'shared_folder' because  in $file['name'] _ is replaced with blank see class.manager.php						
-								
+									$shared_folder='shared folder';	 //'shared folder' not 'shared_folder' because  in $file['name'] _ is replaced with blank see class.manager.php
+
 								///Second step: hiding as the case
 								///Second step: hiding as the case
-								//Juan Carlos Raña
-								
+								//Juan Carlos Ra�a
+
 								if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) && !ereg($css_folder_dokeos, $file['path']) && !ereg($hotpotatoes_folder_dokeos, $file['path']) && !ereg($chat_files_dokeos, $file['path']) && $show_doc_group==true && $file['name'][0]!='.')
 								if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) && !ereg($css_folder_dokeos, $file['path']) && !ereg($hotpotatoes_folder_dokeos, $file['path']) && !ereg($chat_files_dokeos, $file['path']) && $show_doc_group==true && $file['name'][0]!='.')
 								{
 								{
 									if($file['type'] == 'file')
 									if($file['type'] == 'file')
-									{		
-								
+									{
+
 									?>
 									?>
 									<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>"  >
 									<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>"  >
 										<td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox"  name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?> /></td>
 										<td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox"  name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?> /></td>
-										<td align="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><span class="<?php echo $file['cssClass']; ?>">&nbsp;</span></a></td><!-- Juan Carlos Raña Fix for Dokeos: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
-										<td class="<?php echo $strClass; ?> docName"  id="tdnd<?php echo $count; ?>"><a id="aa<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><?php echo $file['name']; ?></a></td>                            
-                                        
+										<td align="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><span class="<?php echo $file['cssClass']; ?>">&nbsp;</span></a></td><!-- Juan Carlos Ra�a Fix for Dokeos: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
+										<td class="<?php echo $strClass; ?> docName"  id="tdnd<?php echo $count; ?>"><a id="aa<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><?php echo $file['name']; ?></a></td>
+
 										<td class="docInfo" id="tdrd<?php echo $count; ?>"><?php echo transformFileSize($file['size']); ?></td>
 										<td class="docInfo" id="tdrd<?php echo $count; ?>"><?php echo transformFileSize($file['size']); ?></td>
 										<td class="docInfo" id="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
 										<td class="docInfo" id="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
 									</tr>
 									</tr>
 									<?php
 									<?php
 									}else
 									}else
-									{											
-									
+									{
+
 										?>
 										?>
 										<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>" >
 										<tr class="<?php echo $css; ?>" id="row<?php echo $count; ?>" >
-                                        
+
 											<td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox" name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?>/>
 											<td align="center" id="tdz<?php echo $count; ?>"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input type="checkbox" name="check[]" id="cb<?php echo $count; ?>" value="<?php echo $file['path']; ?>" <?php echo $strDisabled; ?>/>
 											</td>
 											</td>
-                                                                             
+
                                             <?php
                                             <?php
                                             if(ereg($shared_folder, $file['name']))
                                             if(ereg($shared_folder, $file['name']))
                                             {
                                             {
 											//add icon in ajaxfilemanager if sharedfolder is in Dokeos
 											//add icon in ajaxfilemanager if sharedfolder is in Dokeos
-											?>                                            
-                                            	<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['file']&&$file['subdir']?$file['cssClass']:"folderShared"); ?>">&nbsp;</span></a></td>                                            
+											?>
+                                            	<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['file']&&$file['subdir']?$file['cssClass']:"folderShared"); ?>">&nbsp;</span></a></td>
                                             <?php
                                             <?php
                                             }
                                             }
                                             else
                                             else
@@ -90,22 +90,22 @@
 											?>
 											?>
                                             	<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['file']||$file['subdir']?$file['cssClass']:"folderEmpty"); ?>">&nbsp;</span></a></td>
                                             	<td  lign="center" class="fileColumns" id="tdst<?php echo $count; ?>">&nbsp;<a id="a<?php echo $count; ?>" href="<?php echo $file['path']; ?>" <?php echo $file['cssClass'] == 'filePicture'?'rel="ajaxPhotos"':''; ?>  ><span class="<?php echo ($file['file']||$file['subdir']?$file['cssClass']:"folderEmpty"); ?>">&nbsp;</span></a></td>
                                             <?php
                                             <?php
-                                            }																					
+                                            }
                                             ?>
                                             ?>
-                                            
-                                            
+
+
 											<td class="<?php echo $strClass; ?> docName" id="tdnd<?php echo $count; ?>"><a id="aa<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><?php echo $file['name']; ?></a></td>
 											<td class="<?php echo $strClass; ?> docName" id="tdnd<?php echo $count; ?>"><a id="aa<?php echo $count; ?>" href="<?php echo "../".$file['path']; ?>" target="_blank"><?php echo $file['name']; ?></a></td>
 											<td class="docInfo" id="tdrd<?php echo $count; ?>">&nbsp;</td>
 											<td class="docInfo" id="tdrd<?php echo $count; ?>">&nbsp;</td>
 											<td class="docInfo" id="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
 											<td class="docInfo" id="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
 										</tr>
 										</tr>
 										<?php
 										<?php
 									}
 									}
-									
+
 								}//end if hidden files and folders deleted by Dokeos
 								}//end if hidden files and folders deleted by Dokeos
-								
+
 								$count++;
 								$count++;
 							}
 							}
-						?>	
+						?>
 					</tbody>
 					</tbody>
 				</table>
 				</table>
 </div>
 </div>

+ 30 - 30
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_get_thumbnail_listing.php

@@ -1,67 +1,67 @@
 <div id="content">
 <div id="content">
-<?php 
+<?php
 
 
 		$count = 1;
 		$count = 1;
 		$thumbnailBaseUrl = appendQueryString(CONFIG_URL_IMG_THUMBNAIL, makeQueryString(array('path')));
 		$thumbnailBaseUrl = appendQueryString(CONFIG_URL_IMG_THUMBNAIL, makeQueryString(array('path')));
 		foreach($fileList as $file)
 		foreach($fileList as $file)
-		
+
 		{
 		{
-			///First step for hidden some type of Dokeos files and folders 
-			//Juan Carlos Raña
-			
+			///First step for hidden some type of Dokeos files and folders
+			//Juan Carlos Ra�a
+
 				//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat
 				//hidden files and folders deleted by Dokeos. Hidde folders css, hotpotatoes, chat
-				
-				$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php	
+
+				$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
 				$deleted_by_dokeos_folder='_DELETED_';
 				$deleted_by_dokeos_folder='_DELETED_';
 				$css_folder_dokeos='css';
 				$css_folder_dokeos='css';
 				$hotpotatoes_folder_dokeos='HotPotatoes_files';
 				$hotpotatoes_folder_dokeos='HotPotatoes_files';
 				$chat_files_dokeos='chat_files';
 				$chat_files_dokeos='chat_files';
-				
-				//hidden directory of the group if the user is not a member of the group						
+
+				//hidden directory of the group if the user is not a member of the group
 				$group_folder='_groupdocs';
 				$group_folder='_groupdocs';
-				
-				
+
+
 				//show group's directory only if I'm member. Or I'm a teacher
 				//show group's directory only if I'm member. Or I'm a teacher
-				$show_doc_group=true;								
+				$show_doc_group=true;
 				if(ereg($group_folder, $file['path']))
 				if(ereg($group_folder, $file['path']))
 				{
 				{
 					$show_doc_group=false;
 					$show_doc_group=false;
 					if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 					if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 					{
 					{
-						$show_doc_group=true;					
+						$show_doc_group=true;
 					}
 					}
-				}	
-		
+				}
+
 				//show icon sharedfolder
 				//show icon sharedfolder
 				 $shared_folder='shared folder';	 //'shared folder' not 'shared_folder' because  in $file['name'] _ is replaced with blank see class.manager.php
 				 $shared_folder='shared folder';	 //'shared folder' not 'shared_folder' because  in $file['name'] _ is replaced with blank see class.manager.php
-		
+
 			///Second step: hiding as the case
 			///Second step: hiding as the case
-			//Juan Carlos Raña
+			//Juan Carlos Ra�a
 			if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) && !ereg($css_folder_dokeos, $file['path']) && !ereg($hotpotatoes_folder_dokeos, $file['path']) && !ereg($chat_files_dokeos, $file['path']) && $show_doc_group==true && $file['name'][0]!='.')
 			if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) && !ereg($css_folder_dokeos, $file['path']) && !ereg($hotpotatoes_folder_dokeos, $file['path']) && !ereg($chat_files_dokeos, $file['path']) && $show_doc_group==true && $file['name'][0]!='.')
 			{
 			{
-						
+
 				?>
 				?>
 				<dl class="thumbnailListing" id="dl<?php echo $count; ?>">
 				<dl class="thumbnailListing" id="dl<?php echo $count; ?>">
-                
+
                 <?php
                 <?php
                  if(ereg($shared_folder, $file['name']))
                  if(ereg($shared_folder, $file['name']))
                  { //add icon in ajaxfilemanager if sharedfolder is in Dokeos
                  { //add icon in ajaxfilemanager if sharedfolder is in Dokeos
                 ?>
                 ?>
-                
+
                 	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) || empty($file['subdir'])?'folderShared':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
                 	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) || empty($file['subdir'])?'folderShared':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
                 <?php
                 <?php
 				}
 				}
 				else
 				else
 				{
 				{
 				?>
 				?>
-                
+
                 	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) && empty($file['subdir'])?'folderEmpty':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
                 	<dt id="dt<?php echo $count; ?>" class="<?php echo ($file['type'] == 'folder' && empty($file['file']) && empty($file['subdir'])?'folderEmpty':$file['cssClass']); ?>" class="<?php echo $file['cssClass']; ?>">
-                
+
 				<?php
 				<?php
 				}
 				}
-				?>       
-                					
-                    
+				?>
+
+
 					<?php
 					<?php
 						switch($file['cssClass'])
 						switch($file['cssClass'])
 						{
 						{
@@ -77,16 +77,16 @@
 								echo '&nbsp;';
 								echo '&nbsp;';
 						}
 						}
 					?>
 					?>
-					
+
 					</dt>
 					</dt>
 					<dd id="dd<?php echo $count; ?>" class="thumbnailListing_info"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input id="cb<?php echo $count; ?>" type="checkbox" name="check[]" <?php echo ($file['is_writable']?'':'disabled'); ?> class="radio" value="<?php echo $file['path']; ?>" />
 					<dd id="dd<?php echo $count; ?>" class="thumbnailListing_info"><span id="flag<?php echo $count; ?>" class="<?php echo $file['flag']; ?>">&nbsp;</span><input id="cb<?php echo $count; ?>" type="checkbox" name="check[]" <?php echo ($file['is_writable']?'':'disabled'); ?> class="radio" value="<?php echo $file['path']; ?>" />
-					<a <?php echo ($file['cssClass']== 'filePicture'?'rel="orgImg"':''); ?> href="<?php echo "../".$file['path']; ?>" title="<?php echo $file['name']; ?>" id="a<?php echo $count; ?>"><?php echo shortenFileName($file['name']); ?></a></dd><!-- Juan Carlos Raña Fix for Dokeos: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
-					
+					<a <?php echo ($file['cssClass']== 'filePicture'?'rel="orgImg"':''); ?> href="<?php echo "../".$file['path']; ?>" title="<?php echo $file['name']; ?>" id="a<?php echo $count; ?>"><?php echo shortenFileName($file['name']); ?></a></dd><!-- Juan Carlos Ra�a Fix for Dokeos: On the path I put a directory up echo "../".$ file [ 'path'], what makes good show when pressed next on window preview, don't only one image -->
+
 				</dl>
 				</dl>
 				<?php
 				<?php
-				
+
 				}//end if hidden files and folders deleted by Dokeos
 				}//end if hidden files and folders deleted by Dokeos
-				
+
 			$count++;
 			$count++;
 		}
 		}
 ?>
 ?>

+ 5 - 5
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/_ajax_load_folders.php

@@ -2,14 +2,14 @@
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 ?>
 ?>
 <select class="input inputSearch" name="search_folder" id="search_folder">
 <select class="input inputSearch" name="search_folder" id="search_folder">
-	<?php 
-	
+	<?php
+
 					foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 					foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 					{
 					{
 						?>
 						?>
       <option value="<?php echo $v; ?>" ><?php echo shortenFileName($k, 30); ?></option>
       <option value="<?php echo $v; ?>" ><?php echo shortenFileName($k, 30); ?></option>
-      <?php 
+      <?php
 					}
 					}
-		
-				?>            	
+
+				?>
 </select>
 </select>

+ 18 - 18
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_create_folder.php

@@ -6,21 +6,21 @@
 	 * @since 22/May/2007
 	 * @since 22/May/2007
 	 *
 	 *
 	 * Modify for Dokeos
 	 * Modify for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @since 18/January/2009
 	 * @since 18/January/2009
 	 */
 	 */
 
 
-	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
-	
+	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
+
 	echo "{";
 	echo "{";
 	$error = "";
 	$error = "";
-	$info = "";	
+	$info = "";
 /*	$_POST['new_folder'] = substr(md5(time()), 1, 5);
 /*	$_POST['new_folder'] = substr(md5(time()), 1, 5);
 	$_POST['currentFolderPath'] = "../../uploaded/";*/
 	$_POST['currentFolderPath'] = "../../uploaded/";*/
-	$_POST['new_folder']=htmlentities($_POST['new_folder'],ENT_QUOTES);//Dokeos improve security 
+	$_POST['new_folder']=htmlentities($_POST['new_folder'],ENT_QUOTES);//Dokeos improve security
 	$_POST['new_folder']=str_replace(' ','_',$_POST['new_folder']);//Interaction with Dokeos. Because fix long names. See: ajaxfilemanager/inc/class.manager.php
 	$_POST['new_folder']=str_replace(' ','_',$_POST['new_folder']);//Interaction with Dokeos. Because fix long names. See: ajaxfilemanager/inc/class.manager.php
-	$_POST['currentFolderPath']=htmlentities($_POST['currentFolderPath'],ENT_QUOTES);//Dokeos improve security 
-	
+	$_POST['currentFolderPath']=htmlentities($_POST['currentFolderPath'],ENT_QUOTES);//Dokeos improve security
+
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_NEWFOLDER)
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_NEWFOLDER)
 	{
 	{
 		$error = SYS_DISABLED;
 		$error = SYS_DISABLED;
@@ -42,35 +42,35 @@
 	{
 	{
 	include_once(CLASS_FILE);
 	include_once(CLASS_FILE);
 		$file = new file();
 		$file = new file();
-		
+
 		if($file->mkdir(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], 0775))
 		if($file->mkdir(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], 0775))
 		{
 		{
 					include_once(CLASS_MANAGER);
 					include_once(CLASS_MANAGER);
 					$manager = new manager(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], false);
 					$manager = new manager(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], false);
 					$pathInfo = $manager->getFolderInfo(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder']);
 					$pathInfo = $manager->getFolderInfo(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder']);
-					
-					/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+
+					/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 					if(!empty($_course['path']))
 					if(!empty($_course['path']))
 					{
 					{
-					//only inside courses				
+					//only inside courses
 						$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
 						$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
-						$fullPath = $_POST['currentFolderPath'].$_POST['new_folder']; //get Ajaxfilemanager						
+						$fullPath = $_POST['currentFolderPath'].$_POST['new_folder']; //get Ajaxfilemanager
 						$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 						$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 						$_POST['new_folder']=str_replace('_',' ',$_POST['new_folder']);//Restore for interaction with Dokeos. Because fix long names. See: ajaxfilemanager/inc/class.manager.php
 						$_POST['new_folder']=str_replace('_',' ',$_POST['new_folder']);//Restore for interaction with Dokeos. Because fix long names. See: ajaxfilemanager/inc/class.manager.php
 						$dokeosFile = $_POST['new_folder']; //get Ajaxfilemanager
 						$dokeosFile = $_POST['new_folder']; //get Ajaxfilemanager
-						
-						$doc_id = add_document($_course, $dokeosPath,'folder', 0, $dokeosFile); //get Dokeos	
+
+						$doc_id = add_document($_course, $dokeosPath,'folder', 0, $dokeosFile); //get Dokeos
 						api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id(),$to_group_id);//get Dokeos
 						api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id(),$to_group_id);//get Dokeos
 						api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(),$to_group_id);//get Dokeos
 						api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id(),$to_group_id);//get Dokeos
 					}
 					}
 					// end bridge to Dokeos
 					// end bridge to Dokeos
 					foreach($pathInfo as $k=>$v)
 					foreach($pathInfo as $k=>$v)
-					{				
+					{
 						switch ($k)
 						switch ($k)
 						{
 						{
 
 
 
 
-							case "ctime";								
+							case "ctime";
 							case "mtime":
 							case "mtime":
 							case "atime":
 							case "atime":
 								$v = date(DATE_TIME_FORMAT, $v);
 								$v = date(DATE_TIME_FORMAT, $v);
@@ -81,10 +81,10 @@
 							case 'cssClass':
 							case 'cssClass':
 								$v = 'folderEmpty';
 								$v = 'folderEmpty';
 								break;
 								break;
-						}							
+						}
 						$info .= sprintf(", %s:'%s'", $k, $v);
 						$info .= sprintf(", %s:'%s'", $k, $v);
 					}
 					}
-		}else 
+		}else
 		{
 		{
 			$error = ERR_FOLDER_CREATION_FAILED;
 			$error = ERR_FOLDER_CREATION_FAILED;
 		}
 		}

+ 52 - 52
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_delete_file.php

@@ -6,13 +6,13 @@
 	 * @since 22/April/2007
 	 * @since 22/April/2007
      *
      *
 	 * Modify for Dokeos
 	 * Modify for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @since 19/March/2009
 	 * @since 19/March/2009
 	 */
 	 */
-	
+
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	$error = "";
 	$error = "";
-	
+
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_DELETE)
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_DELETE)
 	{
 	{
 		$error = SYS_DISABLED;
 		$error = SYS_DISABLED;
@@ -31,29 +31,29 @@
 				include_once(CLASS_FILE);
 				include_once(CLASS_FILE);
 				$file = new file();
 				$file = new file();
 				if(is_dir($_GET['delete'])
 				if(is_dir($_GET['delete'])
-					 &&  isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, getBaseName($_GET['delete'])) 
+					 &&  isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, getBaseName($_GET['delete']))
 					 && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, getBaseName($_GET['delete'])))
 					 && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, getBaseName($_GET['delete'])))
 					{
 					{
-						/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+						/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 						if(!empty($_course['path']))
 						if(!empty($_course['path']))
-						{						
+						{
 							//find path
 							//find path
-							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos					
-							$fullPath = $_GET['delete']; //get Ajaxfilemanager	
+							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
+							$fullPath = $_GET['delete']; //get Ajaxfilemanager
 							$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1,-1);
 							$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1,-1);
 							//find base_work_dir
 							//find base_work_dir
 							$course_dir   = $_course['path']."/document";//get Dokeos
 							$course_dir   = $_course['path']."/document";//get Dokeos
 							$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 							$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 							$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 							$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 							//delete directory
 							//delete directory
-							
-							   //check protect directories 
+
+							   //check protect directories
 							   if ($dokeosPath!='/audio' && $dokeosPath!='/flash' && $dokeosPath!='/images' && $dokeosPath!='/shared_folder' && $dokeosPath!='/video')
 							   if ($dokeosPath!='/audio' && $dokeosPath!='/flash' && $dokeosPath!='/images' && $dokeosPath!='/shared_folder' && $dokeosPath!='/video')
-							   {							   
+							   {
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
-								   {		
+								   {
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-								   }							   
+								   }
 								   else
 								   else
 								   {
 								   {
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
@@ -70,84 +70,84 @@
 							$file->delete(addTrailingSlash(backslashToSlash($doc)));//deleted by ajaxfilemanager
 							$file->delete(addTrailingSlash(backslashToSlash($doc)));//deleted by ajaxfilemanager
 						}
 						}
 							//////end bridge to Dokeos
 							//////end bridge to Dokeos
-						
-					}elseif(is_file($_GET['delete']) 
+
+					}elseif(is_file($_GET['delete'])
 					&& isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, getBaseName($_GET['delete']))
 					&& isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, getBaseName($_GET['delete']))
 					&& !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, getBaseName($_GET['delete']))
 					&& !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, getBaseName($_GET['delete']))
 					)
 					)
-					{					
-						/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+					{
+						/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 						if(!empty($_course['path']))
 						if(!empty($_course['path']))
 						{
 						{
 							//find path
 							//find path
-							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos					
+							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
 							$fullPath = $_GET['delete']; //get Ajaxfilemanager
 							$fullPath = $_GET['delete']; //get Ajaxfilemanager
-							$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);					
+							$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 							//find base_work_dir
 							//find base_work_dir
 							$course_dir   = $_course['path']."/document";//get Dokeos
 							$course_dir   = $_course['path']."/document";//get Dokeos
 							$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 							$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 							$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 							$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 							//delete file
 							//delete file
-														   
+
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
-								   {		
+								   {
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-								   }							   
+								   }
 								   else
 								   else
 								   {
 								   {
-								   
+
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 										//$file->delete(($_GET['delete'])); // disabled deleted by ajaxfilemanager
 										//$file->delete(($_GET['delete'])); // disabled deleted by ajaxfilemanager
-										
-								   }								   
+
+								   }
 						}
 						}
 						else
 						else
 						{
 						{
 							$file->delete(($_GET['delete']));//deleted by ajaxfilemanager
 							$file->delete(($_GET['delete']));//deleted by ajaxfilemanager
-						}   
+						}
 						//////end bridge to Dokeos
 						//////end bridge to Dokeos
-					}			
+					}
 		}
 		}
-	}else 
+	}else
 	{
 	{
 		if(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1)
 		if(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1)
 		{
 		{
 			$error = ERR_NOT_FILE_SELECTED;
 			$error = ERR_NOT_FILE_SELECTED;
 		}
 		}
-		else 
+		else
 		{
 		{
 
 
 			include_once(CLASS_FILE);
 			include_once(CLASS_FILE);
 			$file = new file();
 			$file = new file();
-			
+
 			foreach($_POST['selectedDoc'] as $doc)
 			foreach($_POST['selectedDoc'] as $doc)
 			{
 			{
 				if(file_exists($doc) && isUnderRoot($doc))
 				if(file_exists($doc) && isUnderRoot($doc))
 				{
 				{
 					if(is_dir($doc)
 					if(is_dir($doc)
-					 &&  isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $doc) 
+					 &&  isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $doc)
 					 && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $doc))
 					 && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $doc))
 					{
 					{
-						/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+						/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 						if(!empty($_course['path']))
 						if(!empty($_course['path']))
 						{
 						{
 							//find path
 							//find path
-							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos					
-							$fullPath = $doc; //get Ajaxfilemanager				
+							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
+							$fullPath = $doc; //get Ajaxfilemanager
 							$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1,-1);
 							$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1,-1);
 							//find base_work_dir
 							//find base_work_dir
 							$course_dir   = $_course['path']."/document";//get Dokeos
 							$course_dir   = $_course['path']."/document";//get Dokeos
 							$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 							$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 							$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 							$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 							//delete directory
 							//delete directory
-							
-							   //check protect directories 
+
+							   //check protect directories
 							   if ($dokeosPath!='/audio' && $dokeosPath!='/flash' && $dokeosPath!='/images' && $dokeosPath!='/shared_folder' && $dokeosPath!='/video')
 							   if ($dokeosPath!='/audio' && $dokeosPath!='/flash' && $dokeosPath!='/images' && $dokeosPath!='/shared_folder' && $dokeosPath!='/video')
-							   {							   
+							   {
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
-								   {		
+								   {
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-								   }							   
+								   }
 								   else
 								   else
 								   {
 								   {
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
@@ -164,35 +164,35 @@
 							$file->delete(addTrailingSlash(backslashToSlash($doc)));//deleted by ajaxfilemanager
 							$file->delete(addTrailingSlash(backslashToSlash($doc)));//deleted by ajaxfilemanager
 						}
 						}
 						//////end bridge to Dokeos
 						//////end bridge to Dokeos
-						
-					}elseif(is_file($doc) 
+
+					}elseif(is_file($doc)
 					&& isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $doc)
 					&& isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $doc)
 					&& !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $doc)
 					&& !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $doc)
 					)
 					)
 					{
 					{
-						/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+						/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 						if(!empty($_course['path']))
 						if(!empty($_course['path']))
 						{
 						{
 						//find path
 						//find path
-						$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos					
-						$fullPath = $doc; //get Ajaxfilemanager	
+						$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
+						$fullPath = $doc; //get Ajaxfilemanager
 						$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 						$dokeosPath = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 						//find base_work_dir
 						//find base_work_dir
 						$course_dir   = $_course['path']."/document";//get Dokeos
 						$course_dir   = $_course['path']."/document";//get Dokeos
 						$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 						$sys_course_path = api_get_path(SYS_COURSE_PATH);//get Dokeos
 						$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 						$base_work_dir = $sys_course_path.$course_dir; // sample c:/xampp/htdocs/dokeos2009beta/courses/JUAN2009/document
 						//delete file
 						//delete file
-													   
+
 							   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
 							   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
-							   {		
+							   {
 									$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
 									$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-							   }							   
+							   }
 							   else
 							   else
 							   {
 							   {
-							   
+
 									$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 									$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 									//$file->delete($doc); // disabled deleted by ajaxfilemanager
 									//$file->delete($doc); // disabled deleted by ajaxfilemanager
-									
+
 							   }
 							   }
 						}
 						}
 						else
 						else
@@ -200,12 +200,12 @@
 							$file->delete($doc); //deleted by ajaxfilemanager
 							$file->delete($doc); //deleted by ajaxfilemanager
 						}
 						}
 						//////end bridge to Dokeos
 						//////end bridge to Dokeos
-					}					
+					}
 				}
 				}
 
 
-				
+
 			}
 			}
-		}		
+		}
 	}
 	}
 
 
 	echo "{error:'" . $error . "'}";
 	echo "{error:'" . $error . "'}";

+ 9 - 9
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_download.php

@@ -10,22 +10,22 @@
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 	{
 	{
-			
+
 			$path = $_GET['path'];
 			$path = $_GET['path'];
 			//check if the file size
 			//check if the file size
 			$fileSize = @filesize($path);
 			$fileSize = @filesize($path);
-			
+
 			if($fileSize > getMemoryLimit())
 			if($fileSize > getMemoryLimit())
 			{//larger then the php memory limit, redirect to the file
 			{//larger then the php memory limit, redirect to the file
-				
+
 				header('Location: ' . $path);
 				header('Location: ' . $path);
-				exit;				 
-			}else 
-			{//open it up and send out with php 
-				downloadFile($path);	
-				 			
+				exit;
+			}else
+			{//open it up and send out with php
+				downloadFile($path);
+
 			}
 			}
-	}else 
+	}else
 	{
 	{
 		die(ERR_DOWNLOAD_FILE_NOT_FOUND);
 		die(ERR_DOWNLOAD_FILE_NOT_FOUND);
 	}
 	}

+ 19 - 19
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_editor_reset.php

@@ -6,7 +6,7 @@
 	 * @since 22/May/2007
 	 * @since 22/May/2007
 	 *
 	 *
 	 */
 	 */
-	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
+	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	if(!isset($_POST['path']))
 	if(!isset($_POST['path']))
 	{
 	{
 		$_POST['path'] = "uploaded/Winter.jpg" .  "?" . makeQueryString(array('path'));
 		$_POST['path'] = "uploaded/Winter.jpg" .  "?" . makeQueryString(array('path'));
@@ -17,14 +17,14 @@
 		$imageInfo = @GetImageSize($_POST['path']);
 		$imageInfo = @GetImageSize($_POST['path']);
 		$_POST['width'] = $imageInfo[0];
 		$_POST['width'] = $imageInfo[0];
 		$_POST['height'] = $imageInfo[1];
 		$_POST['height'] = $imageInfo[1];
-		
+
 	}
 	}
 	initSessionHistory($_POST['path']);
 	initSessionHistory($_POST['path']);
-	
+
 	echo "{";
 	echo "{";
 	$error = "";
 	$error = "";
 	$info = "";
 	$info = "";
-	
+
 	if(empty($_POST['path']))
 	if(empty($_POST['path']))
 	{
 	{
 		$error  =  IMG_SAVE_EMPTY_PATH;
 		$error  =  IMG_SAVE_EMPTY_PATH;
@@ -39,25 +39,25 @@
 	{
 	{
 		if(!empty($_POST['mode']))
 		if(!empty($_POST['mode']))
 		{
 		{
-			
+
 			include_once(CLASS_IMAGE);
 			include_once(CLASS_IMAGE);
 			$image = new Image();
 			$image = new Image();
 			$image->loadImage($_POST['path']);
 			$image->loadImage($_POST['path']);
-			
+
 			switch($_POST['mode'])
 			switch($_POST['mode'])
 			{
 			{
-				case "resize":					
+				case "resize":
 					if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false)))
 					if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false)))
 					{
 					{
 						$error = IMG_SAVE_RESIZE_FAILED;
 						$error = IMG_SAVE_RESIZE_FAILED;
-					}					
+					}
 					break;
 					break;
 				case "crop":
 				case "crop":
 					if(!$image->cropToDimensions($_POST['x'], $_POST['y'], intval($_POST['x']) + intval($_POST['width']), intval($_POST['y']) + intval($_POST['height'])))
 					if(!$image->cropToDimensions($_POST['x'], $_POST['y'], intval($_POST['x']) + intval($_POST['width']), intval($_POST['y']) + intval($_POST['height'])))
 					{
 					{
 						$error = IMG_SAVE_CROP_FAILED;
 						$error = IMG_SAVE_CROP_FAILED;
 					}
 					}
-					
+
 					break;
 					break;
 				case "flip":
 				case "flip":
 					if(!$image->flip($_POST['flip_angle']))
 					if(!$image->flip($_POST['flip_angle']))
@@ -76,35 +76,35 @@
 			}
 			}
 			if(empty($error))
 			if(empty($error))
 			{
 			{
-				
+
 				$sessionNewPath = $session->getSessionDir() . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 				$sessionNewPath = $session->getSessionDir() . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 				if(!@copy($_POST['path'], $sessionNewPath))
 				if(!@copy($_POST['path'], $sessionNewPath))
 				{
 				{
 					$error = IMG_SAVE_BACKUP_FAILED;
 					$error = IMG_SAVE_BACKUP_FAILED;
-				}else 
+				}else
 				{
 				{
 					addSessionHistory($_POST['path'], $sessionNewPath);
 					addSessionHistory($_POST['path'], $sessionNewPath);
 					if($image->saveImage($_POST['path']))
 					if($image->saveImage($_POST['path']))
-					{						
-						$imageInfo = $image->getFinalImageInfo();	
+					{
+						$imageInfo = $image->getFinalImageInfo();
 						$info .= ",width:" . $imageInfo['width'] . "\n";
 						$info .= ",width:" . $imageInfo['width'] . "\n";
 						$info .= ",height:" . $imageInfo['height'] . "\n";
 						$info .= ",height:" . $imageInfo['height'] . "\n";
 						$info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
 						$info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
-					}else 
+					}else
 					{
 					{
 						$error = IMG_SAVE_FAILED;
 						$error = IMG_SAVE_FAILED;
-					}			
-				}				
-			}else 
+					}
+				}
+			}else
 			{
 			{
 				//$image->DestroyImages();
 				//$image->DestroyImages();
 			}
 			}
-		}else 
+		}else
 		{
 		{
 			$error = IMG_SAVE_UNKNOWN_MODE;
 			$error = IMG_SAVE_UNKNOWN_MODE;
 		}
 		}
 	}
 	}
-	
+
 	echo "error:'" . $error . "'\n";
 	echo "error:'" . $error . "'\n";
 	if(isset($image) && is_object($image))
 	if(isset($image) && is_object($image))
 	{
 	{

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_copy.php

@@ -21,8 +21,8 @@
 	elseif(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath']))
 	elseif(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath']))
 	{
 	{
 		$error = ERR_FOLDER_PATH_NOT_ALLOWED;
 		$error = ERR_FOLDER_PATH_NOT_ALLOWED;
-	}else 
-	{		
+	}else
+	{
 		require_once(CLASS_SESSION_ACTION);
 		require_once(CLASS_SESSION_ACTION);
 		$sessionAction = new SessionAction();
 		$sessionAction = new SessionAction();
 		$sessionAction->setAction($_POST['action_value']);
 		$sessionAction->setAction($_POST['action_value']);

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_cut.php

@@ -20,8 +20,8 @@
 	elseif(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath']))
 	elseif(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath']))
 	{
 	{
 		$error = ERR_FOLDER_PATH_NOT_ALLOWED;
 		$error = ERR_FOLDER_PATH_NOT_ALLOWED;
-	}else 
-	{		
+	}else
+	{
 		require_once(CLASS_SESSION_ACTION);
 		require_once(CLASS_SESSION_ACTION);
 		$sessionAction = new SessionAction();
 		$sessionAction = new SessionAction();
 		$sessionAction->setAction($_POST['action_value']);
 		$sessionAction->setAction($_POST['action_value']);

+ 25 - 25
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_paste.php

@@ -1,5 +1,5 @@
 <?
 <?
-		include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");		
+		include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 		$error = '';
 		$error = '';
 		$fileMoved = array();
 		$fileMoved = array();
 		$unmovedDocDueToSamePath = array();
 		$unmovedDocDueToSamePath = array();
@@ -16,20 +16,20 @@
 		}elseif(!isUnderRoot($_GET['current_folder_path']))
 		}elseif(!isUnderRoot($_GET['current_folder_path']))
 		{
 		{
 			$error = ERR_DEST_FOLDER_NOT_ALLOWED;
 			$error = ERR_DEST_FOLDER_NOT_ALLOWED;
-		}else 
+		}else
 		{
 		{
-			
+
 			include_once(CLASS_MANAGER);
 			include_once(CLASS_MANAGER);
 			include_once(CLASS_SESSION_ACTION);
 			include_once(CLASS_SESSION_ACTION);
 			$sessionAction = new SessionAction();
 			$sessionAction = new SessionAction();
-			include_once(DIR_AJAX_INC . "class.manager.php");	
+			include_once(DIR_AJAX_INC . "class.manager.php");
 			$manager = new manager();
 			$manager = new manager();
 			$manager->setSessionAction($sessionAction);
 			$manager->setSessionAction($sessionAction);
 			$selectedDocuments = $sessionAction->get();
 			$selectedDocuments = $sessionAction->get();
-			
+
 			$destFolderPath = addTrailingSlash(backslashToSlash($_GET['current_folder_path']));
 			$destFolderPath = addTrailingSlash(backslashToSlash($_GET['current_folder_path']));
-			
-			
+
+
 			if(sizeof($selectedDocuments))
 			if(sizeof($selectedDocuments))
 			{
 			{
 				//get all files within the destination folder
 				//get all files within the destination folder
@@ -50,7 +50,7 @@
 				{
 				{
 					if(file_exists($doc) && isUnderRoot($doc) )
 					if(file_exists($doc) && isUnderRoot($doc) )
 					{
 					{
-						
+
 						if( array_search(getRealPath($doc), $allDocs) === false || CONFIG_OVERWRITTEN)
 						if( array_search(getRealPath($doc), $allDocs) === false || CONFIG_OVERWRITTEN)
 						{
 						{
 							if(CONFIG_OVERWRITTEN)
 							if(CONFIG_OVERWRITTEN)
@@ -59,19 +59,19 @@
 							}
 							}
 							if($file->copyTo($doc, $_GET['current_folder_path']))
 							if($file->copyTo($doc, $_GET['current_folder_path']))
 							{
 							{
-								
+
 								$finalPath = $destFolderPath . basename($doc);
 								$finalPath = $destFolderPath . basename($doc);
 								$objFile = new file($finalPath);
 								$objFile = new file($finalPath);
 								$tem = $objFile->getFileInfo();
 								$tem = $objFile->getFileInfo();
-								$obj = new manager($finalPath, false);			
-													
+								$obj = new manager($finalPath, false);
+
 								$fileType = $obj->getFileType($finalPath, (is_dir($finalPath)?true:false));
 								$fileType = $obj->getFileType($finalPath, (is_dir($finalPath)?true:false));
-								
+
 								foreach($fileType as $k=>$v)
 								foreach($fileType as $k=>$v)
 								{
 								{
 									$tem[$k] = $v;
 									$tem[$k] = $v;
 								}
 								}
-								
+
 /*								foreach ($folderInfo as $k=>$v)
 /*								foreach ($folderInfo as $k=>$v)
 								{
 								{
 									$tem['i_' . $k] = $v;
 									$tem['i_' . $k] = $v;
@@ -80,16 +80,16 @@
 								{
 								{
 									$tem['cssClass'] = 'folderEmpty';
 									$tem['cssClass'] = 'folderEmpty';
 								}*/
 								}*/
-								
+
 								$tem['final_path'] = $finalPath;
 								$tem['final_path'] = $finalPath;
-								$tem['path'] = backslashToSlash($finalPath);		
+								$tem['path'] = backslashToSlash($finalPath);
 								$tem['type'] = (is_dir($finalPath)?'folder':'file');
 								$tem['type'] = (is_dir($finalPath)?'folder':'file');
 								$tem['size'] = @transformFileSize($tem['size']);
 								$tem['size'] = @transformFileSize($tem['size']);
 								$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 								$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 								$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);
 								$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);
 								$tem['flag'] = 'noFlag';
 								$tem['flag'] = 'noFlag';
 								$tem['url'] = getFileUrl($doc);
 								$tem['url'] = getFileUrl($doc);
-		
+
 								$manager = null;
 								$manager = null;
 								if($sessionAction->getAction() == "cut")
 								if($sessionAction->getAction() == "cut")
 								{
 								{
@@ -97,12 +97,12 @@
 								}
 								}
 								$fileMoved[sizeof($fileMoved)] = $tem;
 								$fileMoved[sizeof($fileMoved)] = $tem;
 								$tem = null;
 								$tem = null;
-							}							
-						}else 
+							}
+						}else
 						{
 						{
 							$unmovedDocDueToSamePath[] = $doc;
 							$unmovedDocDueToSamePath[] = $doc;
 						}
 						}
-							
+
 					}
 					}
 				}
 				}
 
 
@@ -111,7 +111,7 @@
 			if(sizeof($unmovedDocDueToSamePath) == sizeof($selectedDocuments))
 			if(sizeof($unmovedDocDueToSamePath) == sizeof($selectedDocuments))
 			{
 			{
 				$error = ERR_DEST_FOLDER_NOT_ALLOWED;
 				$error = ERR_DEST_FOLDER_NOT_ALLOWED;
-			}elseif(sizeof($unmovedDocDueToSamePath)) 
+			}elseif(sizeof($unmovedDocDueToSamePath))
 			{
 			{
 				foreach($unmovedDocDueToSamePath as $v)
 				foreach($unmovedDocDueToSamePath as $v)
 				{
 				{
@@ -119,20 +119,20 @@
 				}
 				}
 			}
 			}
 		}
 		}
-		
+
 		echo "{'error':'" . $error . "', 'unmoved_files':" . sizeof($unmovedDocDueToSamePath) . ", 'files':{";
 		echo "{'error':'" . $error . "', 'unmoved_files':" . sizeof($unmovedDocDueToSamePath) . ", 'files':{";
 		foreach($fileMoved as  $i=>$file)
 		foreach($fileMoved as  $i=>$file)
 		{
 		{
-			
+
 			echo ($i>0?', ':' ') . $i . ": { ";
 			echo ($i>0?', ':' ') . $i . ": { ";
 			$j = 0;
 			$j = 0;
 			foreach($file as $k=>$v)
 			foreach($file as $k=>$v)
 			{
 			{
-				echo ($j++ > 0? ", ":'') . "'" . $k . "':'" . $v . "'"; 
-				
+				echo ($j++ > 0? ", ":'') . "'" . $k . "':'" . $v . "'";
+
 			}
 			}
 			echo "} ";
 			echo "} ";
 		}
 		}
 		echo "} }";
 		echo "} }";
-	
+
 ?>
 ?>

+ 33 - 33
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_upload.php

@@ -5,16 +5,16 @@
 	 * @link www.phpletter.com
 	 * @link www.phpletter.com
 	 * @since 22/May/2007
 	 * @since 22/May/2007
 	 *
 	 *
-	 */	
+	 */
 	sleep(3);
 	sleep(3);
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	echo "{";
 	echo "{";
 	$error = "";
 	$error = "";
 	$info = "";
 	$info = "";
-	
+
 	include_once(CLASS_UPLOAD);
 	include_once(CLASS_UPLOAD);
 	$upload = new Upload();
 	$upload = new Upload();
-								
+
 	$upload->setInvalidFileExt(explode(",", CONFIG_UPLOAD_INVALID_EXTS));
 	$upload->setInvalidFileExt(explode(",", CONFIG_UPLOAD_INVALID_EXTS));
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_UPLOAD)
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_UPLOAD)
 	{
 	{
@@ -29,52 +29,52 @@
 	}else if(!$upload->moveUploadedFile($_GET['folder']))
 	}else if(!$upload->moveUploadedFile($_GET['folder']))
 	{
 	{
 		$error = ERR_FILE_MOVE_FAILED;
 		$error = ERR_FILE_MOVE_FAILED;
-	}	
+	}
 	elseif(!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS)))
 	elseif(!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS)))
-	{		
+	{
 		$error = ERR_FILE_TYPE_NOT_ALLOWED;
 		$error = ERR_FILE_TYPE_NOT_ALLOWED;
 	}elseif(defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE))
 	}elseif(defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE))
-	{		
+	{
 		 $error = sprintf(ERROR_FILE_TOO_BID, transformFileSize(CONFIG_UPLOAD_MAXSIZE));
 		 $error = sprintf(ERROR_FILE_TOO_BID, transformFileSize(CONFIG_UPLOAD_MAXSIZE));
 	}else
 	}else
 	{
 	{
 							include_once(CLASS_FILE);
 							include_once(CLASS_FILE);
 							$path = $upload->getFilePath();
 							$path = $upload->getFilePath();
 							$obj = new file($path);
 							$obj = new file($path);
-							$tem = $obj->getFileInfo();							
+							$tem = $obj->getFileInfo();
 							if(sizeof($tem))
 							if(sizeof($tem))
-							{	
+							{
 								include_once(CLASS_MANAGER);
 								include_once(CLASS_MANAGER);
-							
-								$manager = new manager($upload->getFilePath(), false);			
-															
+
+								$manager = new manager($upload->getFilePath(), false);
+
 								$fileType = $manager->getFileType($upload->getFileName());
 								$fileType = $manager->getFileType($upload->getFileName());
 
 
 								foreach($fileType as $k=>$v)
 								foreach($fileType as $k=>$v)
 								{
 								{
 									$tem[$k] = $v;
 									$tem[$k] = $v;
 								}
 								}
-								
-								$tem['path'] = backslashToSlash($path);		
+
+								$tem['path'] = backslashToSlash($path);
 								$tem['type'] = "file";
 								$tem['type'] = "file";
 								$tem['size'] = transformFileSize($tem['size']);
 								$tem['size'] = transformFileSize($tem['size']);
 								$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 								$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 								$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);
 								$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);
-								$tem['short_name'] = shortenFileName($tem['name']);						
-								$tem['flag'] = 'noFlag';													
-								
+								$tem['short_name'] = shortenFileName($tem['name']);
+								$tem['flag'] = 'noFlag';
+
 								/**
 								/**
 								* Bridge to Dokeos documents tool
 								* Bridge to Dokeos documents tool
-								* @author Juan Carlos Raña Trabado
-								*/							
-								
+								* @author Juan Carlos Ra�a Trabado
+								*/
+
 								if(!empty($_course['path']))
 								if(!empty($_course['path']))
 								{
 								{
 									//only inside courses
 									//only inside courses
-									$folderInfo = $manager->getFolderInfo(); //get	ajaxmanager							
-									$fullPath= $upload->getFilePath();		//get	ajaxmanager. Sample ../../../../../../../courses/TEST/document/Grupo_1_groupdocs/image.jpg						
+									$folderInfo = $manager->getFolderInfo(); //get	ajaxmanager
+									$fullPath= $upload->getFilePath();		//get	ajaxmanager. Sample ../../../../../../../courses/TEST/document/Grupo_1_groupdocs/image.jpg
 									$mainPath= getParentFolderPath($folderInfo['path']);//get	ajaxmanager. Sample ../../../../../../../courses/TEST/document/Grupo_1_groupdocs/
 									$mainPath= getParentFolderPath($folderInfo['path']);//get	ajaxmanager. Sample ../../../../../../../courses/TEST/document/Grupo_1_groupdocs/
-									$dokeosFolder = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);	
+									$dokeosFolder = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 									$dokeosFile = $tem['name'];	//get	ajaxmanager
 									$dokeosFile = $tem['name'];	//get	ajaxmanager
 									$dokeosFileSize = $tem['size'];//get ajaxmanager
 									$dokeosFileSize = $tem['size'];//get ajaxmanager
 									if(!empty($group_properties['directory'])) //get Dokeos
 									if(!empty($group_properties['directory'])) //get Dokeos
@@ -86,27 +86,27 @@
 										if(!api_is_allowed_to_edit())
 										if(!api_is_allowed_to_edit())
 										{
 										{
 											$dokeosFolder='/shared_folder/sf_user_'.api_get_user_id().$dokeosFolder;
 											$dokeosFolder='/shared_folder/sf_user_'.api_get_user_id().$dokeosFolder;
-										}						
+										}
 									}
 									}
-									
-									$doc_id = add_document($_course, $dokeosFolder,'file', $dokeosFileSize , $dokeosFile); //get Dokeos																		
-								
+
+									$doc_id = add_document($_course, $dokeosFolder,'file', $dokeosFileSize , $dokeosFile); //get Dokeos
+
 									api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', api_get_user_id(),$to_group_id);//get Dokeos
 									api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', api_get_user_id(),$to_group_id);//get Dokeos
 								}
 								}
-								
+
 								// end bridge
 								// end bridge
-																
+
 								$obj->close();
 								$obj->close();
 								foreach($tem as $k=>$v)
 								foreach($tem as $k=>$v)
 								{
 								{
-										$info .= sprintf(", %s:'%s'", $k, $v);									
+										$info .= sprintf(", %s:'%s'", $k, $v);
 								}
 								}
 
 
 								$info .= sprintf(", url:'%s'",  getFileUrl($path));
 								$info .= sprintf(", url:'%s'",  getFileUrl($path));
-								$info .= sprintf(", tipedit:'%s'",  TIP_DOC_RENAME);		
+								$info .= sprintf(", tipedit:'%s'",  TIP_DOC_RENAME);
 
 
-																				
-							}else 
+
+							}else
 							{
 							{
 								$error = ERR_FILE_NOT_AVAILABLE;
 								$error = ERR_FILE_NOT_AVAILABLE;
 							}
 							}
@@ -116,5 +116,5 @@
 	echo "error:'" . $error . "'";
 	echo "error:'" . $error . "'";
 	echo $info;
 	echo $info;
 	echo "}";
 	echo "}";
-	
+
 ?>
 ?>

+ 45 - 45
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_file_listing.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 
 
 		/**
 		/**
 	 * the php script used to get the list of file or folders under a specific folder
 	 * the php script used to get the list of file or folders under a specific folder
@@ -10,25 +10,25 @@
 	 * @author Juan Carlos Ra�a
 	 * @author Juan Carlos Ra�a
 	 * @since 31/December/2008
 	 * @since 31/December/2008
 	 */
 	 */
-	 
+
  	include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
  	include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
 
 
 	if(!isset($manager))
 	if(!isset($manager))
 	{
 	{
 		/**
 		/**
-		 *  this is part of  script for processing file paste 
+		 *  this is part of  script for processing file paste
 		 */
 		 */
 		//$_GET = $_POST;
 		//$_GET = $_POST;
 		include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 		include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 		include_once(CLASS_PAGINATION);
 		include_once(CLASS_PAGINATION);
 		$pagination = new pagination(false);
 		$pagination = new pagination(false);
-						
-		$search_folder = str_replace("'","",$_GET['search_folder']);				
-		
+
+		$search_folder = str_replace("'","",$_GET['search_folder']);
+
 		if(!empty($_GET['search']))
 		if(!empty($_GET['search']))
 		{
 		{
 			include_once(CLASS_SEARCH);
 			include_once(CLASS_SEARCH);
-			
+
 			$search  = new Search($search_folder);
 			$search  = new Search($search_folder);
 			$search->addSearchKeyword('recursive', @$_GET['search_recursively']);
 			$search->addSearchKeyword('recursive', @$_GET['search_recursively']);
 			$search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']);
 			$search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']);
@@ -39,31 +39,31 @@
 			$search->addSearchKeyword('name', @$_GET['search_name']);
 			$search->addSearchKeyword('name', @$_GET['search_name']);
 			$search->doSearch();
 			$search->doSearch();
 			$fileList = $search->getFoundFiles();
 			$fileList = $search->getFoundFiles();
-			$folderInfo = $search->getRootFolderInfo();			
-			
-		}else 
+			$folderInfo = $search->getRootFolderInfo();
+
+		}else
 		{
 		{
 			include_once(CLASS_MANAGER);
 			include_once(CLASS_MANAGER);
 			include_once(CLASS_SESSION_ACTION);
 			include_once(CLASS_SESSION_ACTION);
 			$sessionAction = new SessionAction();
 			$sessionAction = new SessionAction();
 			include_once(DIR_AJAX_INC . "class.manager.php");
 			include_once(DIR_AJAX_INC . "class.manager.php");
-		
+
 			$manager = new manager();
 			$manager = new manager();
 			$manager->setSessionAction($sessionAction);
 			$manager->setSessionAction($sessionAction);
-		
+
 			$fileList = $manager->getFileList();
 			$fileList = $manager->getFileList();
-			$folderInfo = $manager->getFolderInfo();	
-						
+			$folderInfo = $manager->getFolderInfo();
+
 		}
 		}
-		$pagination->setUrl(CONFIG_URL_FILEnIMAGE_MANAGER);	
+		$pagination->setUrl(CONFIG_URL_FILEnIMAGE_MANAGER);
 
 
-	}else 
+	}else
 	{
 	{
 		include_once(CLASS_PAGINATION);
 		include_once(CLASS_PAGINATION);
-		$pagination = new pagination(false);			
+		$pagination = new pagination(false);
 	}
 	}
 
 
-		
+
 		$pagination->setTotal(sizeof($fileList));
 		$pagination->setTotal(sizeof($fileList));
 		$pagination->setFirstText(PAGINATION_FIRST);
 		$pagination->setFirstText(PAGINATION_FIRST);
 		$pagination->setPreviousText(PAGINATION_PREVIOUS);
 		$pagination->setPreviousText(PAGINATION_PREVIOUS);
@@ -71,65 +71,65 @@
 		$pagination->setLastText(PAGINATION_LAST);
 		$pagination->setLastText(PAGINATION_LAST);
 		$pagination->setLimit(!empty($_GET['limit'])?intval($_GET['limit']):CONFIG_DEFAULT_PAGINATION_LIMIT);
 		$pagination->setLimit(!empty($_GET['limit'])?intval($_GET['limit']):CONFIG_DEFAULT_PAGINATION_LIMIT);
 		echo $pagination->getPaginationHTML();
 		echo $pagination->getPaginationHTML();
-		
-		///////Dokeos fix for count hidden folders		
+
+		///////Dokeos fix for count hidden folders
 			$count_hideItem =0;
 			$count_hideItem =0;
-			
+
 			$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
 			$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
 			$deleted_by_dokeos_folder='_DELETED_';
 			$deleted_by_dokeos_folder='_DELETED_';
 			$css_folder_dokeos='css';
 			$css_folder_dokeos='css';
 			$hotpotatoes_folder_dokeos='HotPotatoes_files';
 			$hotpotatoes_folder_dokeos='HotPotatoes_files';
 			$chat_files_dokeos='chat_files';
 			$chat_files_dokeos='chat_files';
-			
+
 		//end previous fix for count hidden folders
 		//end previous fix for count hidden folders
-		
+
 		echo "<script type=\"text/javascript\">\n";
 		echo "<script type=\"text/javascript\">\n";
-		
-        echo "parentFolder = {path:'" . getParentFolderPath($folderInfo['path']). "'};\n"; 		
-		echo 'currentFolder ={'; 
+
+        echo "parentFolder = {path:'" . getParentFolderPath($folderInfo['path']). "'};\n";
+		echo 'currentFolder ={';
 		$count =1;
 		$count =1;
-		
+
 		foreach($folderInfo as $k=>$v)
 		foreach($folderInfo as $k=>$v)
 		{
 		{
 
 
 			echo ($count++ == 1?'':',') . "'" . $k . "':'" . ($k=='ctime'|| $k=='mtime'?date(DATE_TIME_FORMAT, $v):$v)  . "'";
 			echo ($count++ == 1?'':',') . "'" . $k . "':'" . ($k=='ctime'|| $k=='mtime'?date(DATE_TIME_FORMAT, $v):$v)  . "'";
 
 
 		}
 		}
-		echo "};\n";	
+		echo "};\n";
 		echo 'numRows = ' . sizeof($fileList) . ";\n";
 		echo 'numRows = ' . sizeof($fileList) . ";\n";
 		echo "files = {\n";
 		echo "files = {\n";
-		$count = 1;		
-		
+		$count = 1;
+
 		foreach($fileList as $file)
 		foreach($fileList as $file)
 		{
 		{
-			//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?	
-			$group_folder='_groupdocs';			
-			$hide_doc_group=false;								
+			//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?
+			$group_folder='_groupdocs';
+			$hide_doc_group=false;
 			if(ereg($group_folder, $file['path']))
 			if(ereg($group_folder, $file['path']))
 			{
 			{
 				$hide_doc_group=true;
 				$hide_doc_group=true;
 				if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 				if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 				{
 				{
-					$hide_doc_group=false;				
+					$hide_doc_group=false;
 				}
 				}
-				
+
 			}
 			}
-					
+
 			if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) || ereg($css_folder_dokeos, $file['path']) || ereg($hotpotatoes_folder_dokeos, $file['path']) || ereg($chat_files_dokeos, $file['path']) || $hide_doc_group==true || $file['name'][0]=='.')//Dokeos fix for hidden items.
 			if((!ereg($deleted_by_dokeos_file, $file['name']) || !ereg($deleted_by_dokeos_folder, $file['path'])) || ereg($css_folder_dokeos, $file['path']) || ereg($hotpotatoes_folder_dokeos, $file['path']) || ereg($chat_files_dokeos, $file['path']) || $hide_doc_group==true || $file['name'][0]=='.')//Dokeos fix for hidden items.
 			{
 			{
-			
+
 				$count_hideItem=$count_hideItem+1;
 				$count_hideItem=$count_hideItem+1;
 			}
 			}
-		
+
 			echo (($count > 1)?",":'').$count++ . ":{";
 			echo (($count > 1)?",":'').$count++ . ":{";
 			$j = 1;
 			$j = 1;
 			foreach($file as $k=>$v)
 			foreach($file as $k=>$v)
 			{
 			{
-				
+
 				if($k  == 'ctime' || $k == 'mtime')
 				if($k  == 'ctime' || $k == 'mtime')
 				{
 				{
 					$v = @date(DATE_TIME_FORMAT, $v);
 					$v = @date(DATE_TIME_FORMAT, $v);
-				}	
+				}
 				if($k == 'size')
 				if($k == 'size')
 				{
 				{
 					$v = transformFileSize($v);
 					$v = transformFileSize($v);
@@ -137,10 +137,10 @@
 				echo (($j++ > 1)?",":'') . "'" . $k . "':'" . $v . "'";
 				echo (($j++ > 1)?",":'') . "'" . $k . "':'" . $v . "'";
 			}
 			}
 			echo (($j++ > 1)?",":'') . "'url':'" . getFileUrl($file['path']) . "'";
 			echo (($j++ > 1)?",":'') . "'url':'" . getFileUrl($file['path']) . "'";
-			echo "}\n";				
+			echo "}\n";
 		}
 		}
 		echo  "};";
 		echo  "};";
-		
+
 		$fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit()+$count_hideItem);////Dokeos fix for hidden files added +$count_hideItem
 		$fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit()+$count_hideItem);////Dokeos fix for hidden files added +$count_hideItem
 
 
         echo "</script>\n";
         echo "</script>\n";
@@ -150,16 +150,16 @@
 		{
 		{
 			case 'detail':
 			case 'detail':
 			case 'thumbnail':
 			case 'thumbnail':
-			case 'text':	
+			case 'text':
 				$view = $_GET['view'];
 				$view = $_GET['view'];
 				break;
 				break;
 			default:
 			default:
 				$view = CONFIG_DEFAULT_VIEW;
 				$view = CONFIG_DEFAULT_VIEW;
 		}
 		}
-	}else 
+	}else
 	{
 	{
 		$view = CONFIG_DEFAULT_VIEW;
 		$view = CONFIG_DEFAULT_VIEW;
-	}	
+	}
 	switch($view)
 	switch($view)
 	{
 	{
 		case 'text':
 		case 'text':

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_get_folder_listing.php

@@ -4,9 +4,9 @@
 	$count = 1;
 	$count = 1;
 	foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 	foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 	{
 	{
-		
+
 
 
-		echo (($count > 1)?', ':''). "'" . $v . "':'" . $k . "'"; 
+		echo (($count > 1)?', ':''). "'" . $v . "':'" . $k . "'";
 		$count++;
 		$count++;
 	}
 	}
 	echo "}";
 	echo "}";

+ 14 - 14
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_editor.php

@@ -11,12 +11,12 @@
 	{
 	{
 		die(SYS_DISABLED);
 		die(SYS_DISABLED);
 	}
 	}
-		
+
 		$_GET['path'] = empty($_GET['path'])?CONFIG_SYS_ROOT_PATH . "ajax_image_editor_demo.jpg":$_GET['path'];
 		$_GET['path'] = empty($_GET['path'])?CONFIG_SYS_ROOT_PATH . "ajax_image_editor_demo.jpg":$_GET['path'];
 		if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 		if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 		{
 		{
 				$path = $_GET['path'];
 				$path = $_GET['path'];
-		}else 
+		}else
 		{
 		{
 			die(IMG_GEN_IMG_NOT_EXISTS);
 			die(IMG_GEN_IMG_NOT_EXISTS);
 		}
 		}
@@ -33,7 +33,7 @@
 		}
 		}
 		require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "class.image.php");
 		require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "class.image.php");
 		$image = new Image();
 		$image = new Image();
-		
+
 		$imageInfo = $image->getImageInfo($path);
 		$imageInfo = $image->getImageInfo($path);
 
 
 	?>
 	?>
@@ -83,7 +83,7 @@
 			initDisabledButtons(true);
 			initDisabledButtons(true);
 		}
 		}
 	);
 	);
-	
+
 </script>
 </script>
 <link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/ajaximageeditor.css" type="text/css" rel="stylesheet" />
 <link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/ajaximageeditor.css" type="text/css" rel="stylesheet" />
 <link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/jqModal.css" type="text/css" rel="stylesheet" />
 <link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/jqModal.css" type="text/css" rel="stylesheet" />
@@ -92,25 +92,25 @@
 <body>
 <body>
 <?php
 <?php
 	//displayArray($_SESSION);
 	//displayArray($_SESSION);
-	 
+
 ?>
 ?>
 <div id="controls">
 <div id="controls">
 	<fieldset id="modes">
 	<fieldset id="modes">
 		<legend>Modes</legend>
 		<legend>Modes</legend>
 		<form name="formAction" id="formAction" method="post" action="<?php echo appendQueryString(CONFIG_URL_IMAGE_UNDO, makeQueryString(array('path'))); ?>">
 		<form name="formAction" id="formAction" method="post" action="<?php echo appendQueryString(CONFIG_URL_IMAGE_UNDO, makeQueryString(array('path'))); ?>">
 			<input type="hidden" name="file_path" id="file_path" value="<?php echo $_GET['path']; ?>" />
 			<input type="hidden" name="file_path" id="file_path" value="<?php echo $_GET['path']; ?>" />
-			
+
 			<p><label><?php echo IMG_MODE_RESIZE; ?></label> <input type="radio" name="mode" value="resize" class="input" checked="checked"  onclick="return changeMode();"/>
 			<p><label><?php echo IMG_MODE_RESIZE; ?></label> <input type="radio" name="mode" value="resize" class="input" checked="checked"  onclick="return changeMode();"/>
 			<label><?php echo IMG_MODE_CROP; ?></label> <input type="radio" name="mode" value="crop" class="input" onclick="return changeMode();" />
 			<label><?php echo IMG_MODE_CROP; ?></label> <input type="radio" name="mode" value="crop" class="input" onclick="return changeMode();" />
 			<label><?php echo IMG_MODE_ROTATE; ?></label> <input type="radio" name="mode" value="rotate" class="input" onclick="return changeMode();" />
 			<label><?php echo IMG_MODE_ROTATE; ?></label> <input type="radio" name="mode" value="rotate" class="input" onclick="return changeMode();" />
 			<label><?php echo IMG_MODE_FLIP; ?></label> <input type="radio" name="mode" value="flip" class="input" onclick="return changeMode();" />
 			<label><?php echo IMG_MODE_FLIP; ?></label> <input type="radio" name="mode" value="flip" class="input" onclick="return changeMode();" />
 			<label><?php echo IMG_CHECKBOX_CONSTRAINT; ?></label> <input type="checkbox" name="constraint" id="constraint" value="1" class="input" onclick="return toggleConstraint();" />
 			<label><?php echo IMG_CHECKBOX_CONSTRAINT; ?></label> <input type="checkbox" name="constraint" id="constraint" value="1" class="input" onclick="return toggleConstraint();" />
 			<!--			<label>Watermark:</label> <input type="radio" name="mode" value="watermark" class="input" onclick="return false;" />-->
 			<!--			<label>Watermark:</label> <input type="radio" name="mode" value="watermark" class="input" onclick="return false;" />-->
-			
+
 			<button id="actionRotateLeft" class="disabledButton" onclick="return leftRotate();" disabled><?php echo IMG_BTN_ROTATE_LEFT; ?></button>
 			<button id="actionRotateLeft" class="disabledButton" onclick="return leftRotate();" disabled><?php echo IMG_BTN_ROTATE_LEFT; ?></button>
 			<button id="actionRotateRight" class="disabledButton" onclick="return rightRotate();" disabled><?php echo IMG_BTN_ROTATE_RIGHT; ?></button>
 			<button id="actionRotateRight" class="disabledButton" onclick="return rightRotate();" disabled><?php echo IMG_BTN_ROTATE_RIGHT; ?></button>
 			<button id="actionFlipH" class="disabledButton" onclick="return flipHorizontal();" disabled><?php echo IMG_BTN_FLIP_H; ?></button>
 			<button id="actionFlipH" class="disabledButton" onclick="return flipHorizontal();" disabled><?php echo IMG_BTN_FLIP_H; ?></button>
-			<button id="actionFlipV" class="disabledButton" onclick="return flipVertical();" disabled><?php echo IMG_BTN_FLIP_V; ?></button>			
+			<button id="actionFlipV" class="disabledButton" onclick="return flipVertical();" disabled><?php echo IMG_BTN_FLIP_V; ?></button>
 			<button id="actionReset" class="button" onclick="return resetEditor();"><?php echo IMG_BTN_RESET; ?></button>
 			<button id="actionReset" class="button" onclick="return resetEditor();"><?php echo IMG_BTN_RESET; ?></button>
 			<button id="actionUndo" class="button" onclick="return undoImage();"><?php echo IMG_BTN_UNDO; ?></button>
 			<button id="actionUndo" class="button" onclick="return undoImage();"><?php echo IMG_BTN_UNDO; ?></button>
 			<button id="actionSave" class="button" onclick="return saveImage();"><?php echo IMG_BTN_SAVE; ?></button>
 			<button id="actionSave" class="button" onclick="return saveImage();"><?php echo IMG_BTN_SAVE; ?></button>
@@ -133,18 +133,18 @@
 <!--			<b>Percentage:</b> <input type="text" name="percentage" id="percentage" value="" class="input imageInput"/>-->
 <!--			<b>Percentage:</b> <input type="text" name="percentage" id="percentage" value="" class="input imageInput"/>-->
 			<label><?php echo IMG_LBL_RATIO; ?></label> <input type="text" name="ratio" id="ratio" value="" class="input imageInput"/>
 			<label><?php echo IMG_LBL_RATIO; ?></label> <input type="text" name="ratio" id="ratio" value="" class="input imageInput"/>
 			<label><?php echo IMG_LBL_ANGLE; ?></label> <input type="text" name="angle" id="angle" value="" class="input imageInput" />
 			<label><?php echo IMG_LBL_ANGLE; ?></label> <input type="text" name="angle" id="angle" value="" class="input imageInput" />
-			
+
 			</p>
 			</p>
 		</form>
 		</form>
 	</fieldset>
 	</fieldset>
 </div>
 </div>
 <div id="imageArea">
 <div id="imageArea">
-    <div id="imageContainer">    	  
+    <div id="imageContainer">
         <img src="<?php echo "../".$path; ?>" name="<?php echo basename($path); ?>" width="<?php echo $imageInfo['width']; ?>" height="<?php echo $imageInfo['height']; ?>" /><!-- For Dokeos integrating, enter a back directory "../" to avoid introducing main and can not read the image -->
         <img src="<?php echo "../".$path; ?>" name="<?php echo basename($path); ?>" width="<?php echo $imageInfo['width']; ?>" height="<?php echo $imageInfo['height']; ?>" /><!-- For Dokeos integrating, enter a back directory "../" to avoid introducing main and can not read the image -->
-        
-        
-        
-        
+
+
+
+
     </div>
     </div>
     <div id="resizeMe">
     <div id="resizeMe">
     	<div id="resizeSE"></div>
     	<div id="resizeSE"></div>

+ 53 - 53
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_save.php

@@ -6,8 +6,8 @@
 	 * @since 22/May/2007
 	 * @since 22/May/2007
 	 *
 	 *
 	 */
 	 */
-	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
-	
+	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
+
 
 
 	$error = "";
 	$error = "";
 	$info = "";
 	$info = "";
@@ -19,7 +19,7 @@
 	{
 	{
 		$error  =  IMG_SAVE_EMPTY_PATH;
 		$error  =  IMG_SAVE_EMPTY_PATH;
 	}elseif(!file_exists($_POST['path']))
 	}elseif(!file_exists($_POST['path']))
-	{		
+	{
 		$error  =  IMG_SAVE_NOT_EXISTS;
 		$error  =  IMG_SAVE_NOT_EXISTS;
 	}elseif(!isUnderRoot($_POST['path']))
 	}elseif(!isUnderRoot($_POST['path']))
 	{
 	{
@@ -29,7 +29,7 @@
 		$error = SESSION_PERSONAL_DIR_NOT_FOUND;
 		$error = SESSION_PERSONAL_DIR_NOT_FOUND;
 	}
 	}
 	else
 	else
-	{	
+	{
 		require_once(CLASS_HISTORY);
 		require_once(CLASS_HISTORY);
 		$history = new History($_POST['path'], $session);
 		$history = new History($_POST['path'], $session);
 		if(!empty($_POST['mode']))
 		if(!empty($_POST['mode']))
@@ -37,32 +37,32 @@
 			//get the original image which is the lastest session image if any when the system is in demo
 			//get the original image which is the lastest session image if any when the system is in demo
 			$lastestSessionImageInfo = $history->getLastestRestorable();
 			$lastestSessionImageInfo = $history->getLastestRestorable();
 			if(sizeof($lastestSessionImageInfo) && CONFIG_SYS_DEMO_ENABLE)
 			if(sizeof($lastestSessionImageInfo) && CONFIG_SYS_DEMO_ENABLE)
-			{				
+			{
 				$originalSessionImageInfo = $history->getOriginalImage();
 				$originalSessionImageInfo = $history->getOriginalImage();
 				if(sizeof($originalSessionImageInfo))
 				if(sizeof($originalSessionImageInfo))
-				{					
+				{
 					$originalImage = $sessionDir . $originalSessionImageInfo['info']['name'];
 					$originalImage = $sessionDir . $originalSessionImageInfo['info']['name'];
-				}				
+				}
 			}
 			}
 			if(empty($originalImage))
 			if(empty($originalImage))
 			{
 			{
 				$originalImage = $_POST['path'];
 				$originalImage = $_POST['path'];
 			}
 			}
-			
+
 			include_once(CLASS_IMAGE);
 			include_once(CLASS_IMAGE);
 			$image = new Image();
 			$image = new Image();
 			if($image->loadImage($originalImage))
 			if($image->loadImage($originalImage))
-			{				
-				
+			{
+
 				switch($_POST['mode'])
 				switch($_POST['mode'])
 				{
 				{
-					case "resize":					
+					case "resize":
 						if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false)))
 						if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false)))
 						{
 						{
 							$error = IMG_SAVE_RESIZE_FAILED;
 							$error = IMG_SAVE_RESIZE_FAILED;
-						}					
+						}
 						break;
 						break;
-					case "crop":	
+					case "crop":
 						if(!$image->crop($_POST['x'], $_POST['y'], $_POST['width'], $_POST['height']))
 						if(!$image->crop($_POST['x'], $_POST['y'], $_POST['width'], $_POST['height']))
 						{
 						{
 							$error = IMG_SAVE_CROP_FAILED;
 							$error = IMG_SAVE_CROP_FAILED;
@@ -75,27 +75,27 @@
 						}
 						}
 						break;
 						break;
 					case "rotate":
 					case "rotate":
-						
+
 						if(!$image->rotate(intval($_POST['angle'])))
 						if(!$image->rotate(intval($_POST['angle'])))
 						{
 						{
 							$error = IMG_SAVE_ROTATE_FAILED;
 							$error = IMG_SAVE_ROTATE_FAILED;
 						}
 						}
-						
+
 						break;
 						break;
 					default:
 					default:
 						$error = IMG_SAVE_UNKNOWN_MODE;
 						$error = IMG_SAVE_UNKNOWN_MODE;
 				}
 				}
-				
-				
+
+
 				if(empty($error))
 				if(empty($error))
-				{					
-					$sessionNewPath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);					
+				{
+					$sessionNewPath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 					if(!@copy($originalImage, $sessionNewPath))
 					if(!@copy($originalImage, $sessionNewPath))
 					{//keep a copy under the session folder
 					{//keep a copy under the session folder
-						$error = IMG_SAVE_BACKUP_FAILED;						
-					}else 
+						$error = IMG_SAVE_BACKUP_FAILED;
+					}else
 					{
 					{
-						
+
 						$isSaveAsRequest = (!empty($_POST['new_name']) && !empty($_POST['save_to'])?true:false);
 						$isSaveAsRequest = (!empty($_POST['new_name']) && !empty($_POST['save_to'])?true:false);
 						//save the modified image
 						//save the modified image
 						$sessionImageInfo = array('name'=>basename($sessionNewPath), 'restorable'=>1);
 						$sessionImageInfo = array('name'=>basename($sessionNewPath), 'restorable'=>1);
@@ -105,51 +105,51 @@
 							if(isset($originalSessionImageInfo) && sizeof($originalSessionImageInfo))
 							if(isset($originalSessionImageInfo) && sizeof($originalSessionImageInfo))
 							{
 							{
 								$imagePath = $sessionDir . $originalSessionImageInfo['info']['name'];
 								$imagePath = $sessionDir . $originalSessionImageInfo['info']['name'];
-							}else 
-							{	
+							}else
+							{
 								$imagePath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 								$imagePath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 							}
 							}
-						}else 
-						{	
+						}else
+						{
 							if($isSaveAsRequest)
 							if($isSaveAsRequest)
 							{//save as request
 							{//save as request
 								//check save to folder if exists
 								//check save to folder if exists
-								$imagePath = addTrailingSlash(backslashToSlash($_POST['save_to'])) . $_POST['new_name'] . "." . getFileExt($_POST['path']); 
+								$imagePath = addTrailingSlash(backslashToSlash($_POST['save_to'])) . $_POST['new_name'] . "." . getFileExt($_POST['path']);
 								if(!file_exists($_POST['save_to']) || !is_dir($_POST['save_to']))
 								if(!file_exists($_POST['save_to']) || !is_dir($_POST['save_to']))
 								{
 								{
 									$error = IMG_SAVE_AS_FOLDER_NOT_FOUND;
 									$error = IMG_SAVE_AS_FOLDER_NOT_FOUND;
-								}elseif(file_exists($imagePath)) 
+								}elseif(file_exists($imagePath))
 								{
 								{
 									$error = IMG_SAVE_AS_NEW_IMAGE_EXISTS;
 									$error = IMG_SAVE_AS_NEW_IMAGE_EXISTS;
 								}elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_name']))
 								}elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_name']))
 								{
 								{
 									$error = IMG_SAVE_AS_ERR_NAME_INVALID;
 									$error = IMG_SAVE_AS_ERR_NAME_INVALID;
 								}
 								}
-								
-							}else 
+
+							}else
 							{//save request
 							{//save request
-								$imagePath = $originalImage;	
+								$imagePath = $originalImage;
 							}
 							}
-												
+
 						}
 						}
 
 
 						if($image->saveImage($imagePath))
 						if($image->saveImage($imagePath))
-						{		
-									
+						{
+
 							if(CONFIG_SYS_DEMO_ENABLE)
 							if(CONFIG_SYS_DEMO_ENABLE)
 							{
 							{
 								if(!isset($originalSessionImageInfo) || !sizeof($originalSessionImageInfo))
 								if(!isset($originalSessionImageInfo) || !sizeof($originalSessionImageInfo))
-								{//keep this original image information on session for future reference if demo only	
+								{//keep this original image information on session for future reference if demo only
 									$originalSessionImageInfo = array('name'=>basename($imagePath), 'restorable'=>0, 'is_original'=>1);
 									$originalSessionImageInfo = array('name'=>basename($imagePath), 'restorable'=>0, 'is_original'=>1);
 									$history->add($originalSessionImageInfo);
 									$history->add($originalSessionImageInfo);
 								}
 								}
 							}
 							}
-							$imageInfo = $image->getFinalImageInfo();								
-						}else 
+							$imageInfo = $image->getFinalImageInfo();
+						}else
 						{
 						{
 							$error = IMG_SAVE_FAILED;
 							$error = IMG_SAVE_FAILED;
-							
-						}							
+
+						}
 						if(isset($imageInfo))
 						if(isset($imageInfo))
 						{
 						{
 								$info .= ",width:" . $imageInfo['width'] . "";
 								$info .= ",width:" . $imageInfo['width'] . "";
@@ -158,29 +158,29 @@
 								if($isSaveAsRequest)
 								if($isSaveAsRequest)
 								{
 								{
 									$info .= ",save_as:'1'";
 									$info .= ",save_as:'1'";
-								}else 
+								}else
 								{
 								{
 									$info .= ",save_as:'0'";
 									$info .= ",save_as:'0'";
 								}
 								}
 								$info .= ",folder_path:'" . dirname($imagePath) . "'";
 								$info .= ",folder_path:'" . dirname($imagePath) . "'";
-								$info .= ",path:'" . backslashToSlash($imagePath) . "'";	
-													
-						}				
-			
-					}				
-								
-				}			
-			}else 
+								$info .= ",path:'" . backslashToSlash($imagePath) . "'";
+
+						}
+
+					}
+
+				}
+			}else
 			{
 			{
 				$error = IMG_SAVE_IMG_OPEN_FAILED;
 				$error = IMG_SAVE_IMG_OPEN_FAILED;
-			}		
+			}
 
 
-		}else 
+		}else
 		{
 		{
 			$error = IMG_SAVE_UNKNOWN_MODE;
 			$error = IMG_SAVE_UNKNOWN_MODE;
 		}
 		}
 	}
 	}
-	echo "{";	
+	echo "{";
 	echo "error:'" . $error . "'";
 	echo "error:'" . $error . "'";
 	if(isset($image) && is_object($image))
 	if(isset($image) && is_object($image))
 	{
 	{
@@ -189,6 +189,6 @@
 	echo $info;
 	echo $info;
 	echo ",history:" . (isset($history) && is_object($history)?($history->getNumRestorable()):0)  . "";
 	echo ",history:" . (isset($history) && is_object($history)?($history->getNumRestorable()):0)  . "";
 	echo "}";
 	echo "}";
-	
-	
+
+
 ?>
 ?>

+ 7 - 7
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_thumbnail.php

@@ -6,7 +6,7 @@
 	 * @since 22/April/2007
 	 * @since 22/April/2007
 	 *
 	 *
 	 */
 	 */
-	include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
+	include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']))
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']))
 	{
 	{
 		include_once(CLASS_IMAGE);
 		include_once(CLASS_IMAGE);
@@ -16,17 +16,17 @@
 			if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true))
 			if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true))
 			{
 			{
 				$image->showImage();
 				$image->showImage();
-			}else 
+			}else
 			{
 			{
-				echo PREVIEW_NOT_PREVIEW . ".";	
+				echo PREVIEW_NOT_PREVIEW . ".";
 			}
 			}
-		}else 
+		}else
 		{
 		{
-			echo PREVIEW_NOT_PREVIEW . "..";			
+			echo PREVIEW_NOT_PREVIEW . "..";
 		}
 		}
 
 
-			
-	}else 
+
+	}else
 	{
 	{
 		echo PREVIEW_NOT_PREVIEW . "...";
 		echo PREVIEW_NOT_PREVIEW . "...";
 	}
 	}

+ 15 - 15
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_image_undo.php

@@ -6,7 +6,7 @@
 	 * @since 22/May/2007
 	 * @since 22/May/2007
 	 *
 	 *
 	 */
 	 */
-	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
+	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(CLASS_HISTORY);
 	require_once(CLASS_HISTORY);
 	$history = new History($_POST['file_path'], $session);
 	$history = new History($_POST['file_path'], $session);
 	$lastestSessionImageInfo = $history->getLastestRestorable();
 	$lastestSessionImageInfo = $history->getLastestRestorable();
@@ -31,18 +31,18 @@
 		$error = IMG_UNDO_NO_HISTORY_AVAIALBE;
 		$error = IMG_UNDO_NO_HISTORY_AVAIALBE;
 	}
 	}
 	else
 	else
-	{		
+	{
 			//get the original image which is the lastest session image if any when the system is in demo
 			//get the original image which is the lastest session image if any when the system is in demo
 			$sessionImage = $session->getSessionDir() . $lastestSessionImageInfo['name'];
 			$sessionImage = $session->getSessionDir() . $lastestSessionImageInfo['name'];
 			$originalSessionImageInfo = $history->getOriginalImage();
 			$originalSessionImageInfo = $history->getOriginalImage();
 			if(CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo))
 			if(CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo))
 			{
 			{
-				$originalImage = $session->getSessionDir() . $originalSessionImageInfo['info']['name'];				
-			}else 
+				$originalImage = $session->getSessionDir() . $originalSessionImageInfo['info']['name'];
+			}else
 			{
 			{
 				$originalImage = $_POST['file_path'];
 				$originalImage = $_POST['file_path'];
-			}		
-			 
+			}
+
 				include_once(CLASS_IMAGE);
 				include_once(CLASS_IMAGE);
 				$image = new Image();
 				$image = new Image();
 				if($image->loadImage($sessionImage))
 				if($image->loadImage($sessionImage))
@@ -51,25 +51,25 @@
 					if(!@copy($sessionImage, $originalImage))
 					if(!@copy($sessionImage, $originalImage))
 					{
 					{
 						$error = IMG_UNDO_COPY_FAILED;
 						$error = IMG_UNDO_COPY_FAILED;
-					}else 
+					}else
 					{
 					{
-						
+
 						//remove the session image
 						//remove the session image
 						if(@unlink($sessionImage))
 						if(@unlink($sessionImage))
 						{
 						{
 							$history->restore();
 							$history->restore();
 						}
 						}
 						//only one left, remove the session original if demo
 						//only one left, remove the session original if demo
-						
+
 						if($history->getNumRestorable() == 0 && CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo))
 						if($history->getNumRestorable() == 0 && CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo))
 						{
 						{
-							@unlink($session->getSessionDir() . $originalSessionImageInfo['info']['name']);	
+							@unlink($session->getSessionDir() . $originalSessionImageInfo['info']['name']);
 							$originalImage = $_POST['file_path'];
 							$originalImage = $_POST['file_path'];
 						}
 						}
 					}
 					}
 					$imagePath = $originalImage;
 					$imagePath = $originalImage;
-					
-				}else 
+
+				}else
 				{
 				{
 					$error = IMG_SAVE_IMG_OPEN_FAILED;
 					$error = IMG_SAVE_IMG_OPEN_FAILED;
 				}
 				}
@@ -78,11 +78,11 @@
 							$info .= ",width:" . $imageInfo['width'] . "\n";
 							$info .= ",width:" . $imageInfo['width'] . "\n";
 							$info .= ",height:" . $imageInfo['height'] . "\n";
 							$info .= ",height:" . $imageInfo['height'] . "\n";
 							$info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
 							$info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
-							$info .= ",path:'" . backslashToSlash($imagePath) . "'\n";						
-					}	
+							$info .= ",path:'" . backslashToSlash($imagePath) . "'\n";
+					}
 
 
 	}
 	}
-	
+
 	echo "error:'" . $error . "'\n";
 	echo "error:'" . $error . "'\n";
 	if(isset($image) && is_object($image))
 	if(isset($image) && is_object($image))
 	{
 	{

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_login.php

@@ -12,7 +12,7 @@ if(isset($_POST['username']))
 	if($auth->login())
 	if($auth->login())
 	{
 	{
 		header('Location: ' . appendQueryString(CONFIG_URL_HOME, makeQueryString()));
 		header('Location: ' . appendQueryString(CONFIG_URL_HOME, makeQueryString()));
-		exit;		
+		exit;
 	}
 	}
 }
 }
 ?>
 ?>
@@ -47,7 +47,7 @@ if(isset($_POST['username']))
 			            <tr>
 			            <tr>
 			            	<td>&nbsp;</td>
 			            	<td>&nbsp;</td>
 			              <td><input type="submit" class="button" value="Login" /></td>
 			              <td><input type="submit" class="button" value="Login" /></td>
-			            </tr>			        
+			            </tr>
 			        </tfoot>
 			        </tfoot>
 			    </table>
 			    </table>
 			</form>
 			</form>

+ 10 - 10
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_preview.php

@@ -6,11 +6,11 @@
 	 * @since 22/April/2007
 	 * @since 22/April/2007
 	 *
 	 *
 	 */
 	 */
-	include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
+	include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	echo getRealPath($_GET['path']);
 	echo getRealPath($_GET['path']);
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']))
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']))
 	{
 	{
-		
+
 		include_once(CLASS_MANAGER);
 		include_once(CLASS_MANAGER);
 		$manager = new manager($_GET['path'], false);
 		$manager = new manager($_GET['path'], false);
 		$fileTypes = $manager->getFileType(basename($_GET['path']));
 		$fileTypes = $manager->getFileType(basename($_GET['path']));
@@ -24,8 +24,8 @@
 					{
 					{
 						$thumInfo = getThumbWidthHeight($imageInfo[0], $imageInfo[1], 400, 135);
 						$thumInfo = getThumbWidthHeight($imageInfo[0], $imageInfo[1], 400, 135);
 						printf("<img src=\"%s\" width=\"%s\" height=\"%s\" />", getFileUrl($_GET['path']), $thumInfo['width'], $thumInfo['height']);
 						printf("<img src=\"%s\" width=\"%s\" height=\"%s\" />", getFileUrl($_GET['path']), $thumInfo['width'], $thumInfo['height']);
-													
-					}else 
+
+					}else
 					{
 					{
 						echo PREVIEW_IMAGE_LOAD_FAILED;
 						echo PREVIEW_IMAGE_LOAD_FAILED;
 					}
 					}
@@ -36,21 +36,21 @@
 					{
 					{
 						echo @fread($fp, @filesize($_GET['path']));
 						echo @fread($fp, @filesize($_GET['path']));
 						@fclose($fp);
 						@fclose($fp);
-					}else 
+					}else
 					{
 					{
 						echo PREVIEW_OPEN_FAILED . ".";
 						echo PREVIEW_OPEN_FAILED . ".";
 					}
 					}
 					break;
 					break;
-					
+
 				case "video":
 				case "video":
 					break;
 					break;
 			}
 			}
-		}else 
+		}else
 		{
 		{
 			echo PREVIEW_NOT_PREVIEW . "..";
 			echo PREVIEW_NOT_PREVIEW . "..";
-		}		
-			
-	}else 
+		}
+
+	}else
 	{
 	{
 		echo PREVIEW_NOT_PREVIEW . "...";
 		echo PREVIEW_NOT_PREVIEW . "...";
 	}
 	}

+ 3 - 3
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_save_as_form.php

@@ -1,6 +1,6 @@
-<?php 
+<?php
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
-	
+
 ?>
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <html xmlns="http://www.w3.org/1999/xhtml">
@@ -33,7 +33,7 @@
             </th>
             </th>
             <td>
             <td>
             	<select class="input" name="save_to">
             	<select class="input" name="save_to">
-              	
+
               </select>
               </select>
             </td>
             </td>
           </tr>
           </tr>

+ 8 - 8
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_save_name.php

@@ -34,11 +34,11 @@
 	}elseif(!rename(removeTrailingSlash($_POST['original_path']), addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name']))
 	}elseif(!rename(removeTrailingSlash($_POST['original_path']), addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name']))
 	{
 	{
 		$error = ERR_RENAME_FAILED;
 		$error = ERR_RENAME_FAILED;
-	}else 
+	}else
 	{
 	{
 		//update record of session if image exists in session for cut or copy
 		//update record of session if image exists in session for cut or copy
 		include_once(CLASS_SESSION_ACTION);
 		include_once(CLASS_SESSION_ACTION);
-		$sessionAction = new SessionAction();		
+		$sessionAction = new SessionAction();
 		$selectedDocuments = $sessionAction->get();
 		$selectedDocuments = $sessionAction->get();
 		if(removeTrailingSlash($sessionAction->getFolder()) == getParentPath($_POST['original_path']) && sizeof($selectedDocuments))
 		if(removeTrailingSlash($sessionAction->getFolder()) == getParentPath($_POST['original_path']) && sizeof($selectedDocuments))
 		{
 		{
@@ -46,13 +46,13 @@
 			{
 			{
 				$selectedDocuments[$key] = $_POST['name'];
 				$selectedDocuments[$key] = $_POST['name'];
 				$sessionAction->set($selectedDocuments);
 				$sessionAction->set($selectedDocuments);
-				
+
 			}
 			}
-			
+
 		}elseif(removeTrailingSlash($sessionAction->getFolder()) == removeTrailingSlash($_POST['original_path']))
 		}elseif(removeTrailingSlash($sessionAction->getFolder()) == removeTrailingSlash($_POST['original_path']))
 		{
 		{
 			$sessionAction->setFolder($_POST['original_path']);
 			$sessionAction->setFolder($_POST['original_path']);
-		}	
+		}
 		$path = addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name'];
 		$path = addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name'];
 		if(is_file($path))
 		if(is_file($path))
 		{
 		{
@@ -66,7 +66,7 @@
 			$fileInfo = $manager->getFolderInfo();
 			$fileInfo = $manager->getFolderInfo();
 		}
 		}
 	}
 	}
-	
+
 	echo "{";
 	echo "{";
 	echo "error:'" . $error . "' ";
 	echo "error:'" . $error . "' ";
 	foreach ($fileInfo as $k=>$v)
 	foreach ($fileInfo as $k=>$v)
@@ -74,6 +74,6 @@
 		echo "," . $k . ":'" . $v . "' ";
 		echo "," . $k . ":'" . $v . "' ";
 	}
 	}
 	echo "}";
 	echo "}";
-	
-	
+
+
 ?>
 ?>

+ 15 - 15
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_save_text.php

@@ -14,7 +14,7 @@
 		$error = SYS_DISABLED;
 		$error = SYS_DISABLED;
 	}
 	}
 	elseif(isset($_POST['save_as_request']))
 	elseif(isset($_POST['save_as_request']))
-	{		
+	{
 		if(!preg_match('/^[a-zA-Z0-9_\-.]+$/', $_POST['name']))
 		if(!preg_match('/^[a-zA-Z0-9_\-.]+$/', $_POST['name']))
 		{
 		{
 			$error = TXT_SAVE_AS_ERR_NAME_INVALID;
 			$error = TXT_SAVE_AS_ERR_NAME_INVALID;
@@ -27,56 +27,56 @@
 		}
 		}
 		else
 		else
 		{
 		{
-			
+
 			if(!empty($_POST['save_as_request']))
 			if(!empty($_POST['save_as_request']))
 			{//save as request
 			{//save as request
 				if(file_exists($path))
 				if(file_exists($path))
 				{
 				{
 					$error = TXT_FILE_EXIST;
 					$error = TXT_FILE_EXIST;
-				}else 
+				}else
 				{
 				{
 					if(($fp = @fopen($path, 'w+')) !== false)
 					if(($fp = @fopen($path, 'w+')) !== false)
 					{
 					{
 						if(@fwrite($fp, $_POST['text']))
 						if(@fwrite($fp, $_POST['text']))
 						{
 						{
 							@fclose($fp);
 							@fclose($fp);
-						}else 
+						}else
 						{
 						{
 							$error = TXT_CONTENT_WRITE_FAILED;
 							$error = TXT_CONTENT_WRITE_FAILED;
 						}
 						}
-					}else 
+					}else
 					{
 					{
 						$error = TXT_CREATE_FAILED;
 						$error = TXT_CREATE_FAILED;
-					}					
+					}
 				}
 				}
 
 
-				
-			}else 
+
+			}else
 			{
 			{
 				if(!file_exists($path))
 				if(!file_exists($path))
 				{
 				{
 					$error = TXT_FILE_NOT_EXIST;
 					$error = TXT_FILE_NOT_EXIST;
-				}else 
+				}else
 				{
 				{
 					if(($fp = @fopen($path, 'w')) !== false)
 					if(($fp = @fopen($path, 'w')) !== false)
 					{
 					{
 						if(@fwrite($fp, $_POST['text']))
 						if(@fwrite($fp, $_POST['text']))
 						{
 						{
 							@fclose($fp);
 							@fclose($fp);
-						}else 
+						}else
 						{
 						{
 							$error = TXT_CONTENT_UPDATE_FAILED;
 							$error = TXT_CONTENT_UPDATE_FAILED;
 						}
 						}
-					}else 
+					}else
 					{
 					{
 						$error = TXT_FILE_OPEN_FAILED;
 						$error = TXT_FILE_OPEN_FAILED;
-					}						
+					}
 				}
 				}
 			}
 			}
-			
+
 		}
 		}
 
 
-	}else 
+	}else
 	{
 	{
 		$error = TXT_UNKNOWN_REQUEST;
 		$error = TXT_UNKNOWN_REQUEST;
 	}
 	}
@@ -84,5 +84,5 @@
 		echo "error:'" . $error . "',\n";
 		echo "error:'" . $error . "',\n";
 		echo  "path:'" . $path . "'";
 		echo  "path:'" . $path . "'";
 		echo "}";
 		echo "}";
-	
+
 ?>
 ?>

+ 18 - 18
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_text_editor.php

@@ -10,20 +10,20 @@
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_EDITABLE)
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_EDITABLE)
 	{
 	{
 		die(SYS_DISABLED);
 		die(SYS_DISABLED);
-	}	
+	}
 		$session->gc();
 		$session->gc();
 		$_GET['path'] = empty($_GET['path'])?CONFIG_SYS_ROOT_PATH . "ajax_image_editor_demo.jpg":$_GET['path'];
 		$_GET['path'] = empty($_GET['path'])?CONFIG_SYS_ROOT_PATH . "ajax_image_editor_demo.jpg":$_GET['path'];
 		if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 		if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 		{
 		{
 				$path = $_GET['path'];
 				$path = $_GET['path'];
-		}else 
+		}else
 		{
 		{
 			die(TXT_FILE_NOT_FOUND);
 			die(TXT_FILE_NOT_FOUND);
 		}
 		}
 		if(file_exists(DIR_AJAX_EDIT_AREA . "reg_syntax" . DIRECTORY_SEPARATOR . getFileExt($path) . ".js"))
 		if(file_exists(DIR_AJAX_EDIT_AREA . "reg_syntax" . DIRECTORY_SEPARATOR . getFileExt($path) . ".js"))
 		{
 		{
-			$syntax = getFileExt($path);			
-		}else 
+			$syntax = getFileExt($path);
+		}else
 		{
 		{
 			switch (getFileExt($path))
 			switch (getFileExt($path))
 			{
 			{
@@ -36,7 +36,7 @@
 		}
 		}
 		if(array_search(getFileExt($path), getValidTextEditorExts())=== false)
 		if(array_search(getFileExt($path), getValidTextEditorExts())=== false)
 		{
 		{
-			die(TXT_DISALLOWED_EXT);	
+			die(TXT_DISALLOWED_EXT);
 		}
 		}
 	?>
 	?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -64,8 +64,8 @@
 		jQuery(document).ready(
 		jQuery(document).ready(
 		function()
 		function()
 		{
 		{
-				editAreaLoader.init({				
-				id: "content"	// id of the textarea to transform		
+				editAreaLoader.init({
+				id: "content"	// id of the textarea to transform
 				,start_highlight: false	// if start with highlight
 				,start_highlight: false	// if start with highlight
 				,allow_resize: "both"
 				,allow_resize: "both"
 				,gecko_spellcheck:true
 				,gecko_spellcheck:true
@@ -74,16 +74,16 @@
 				,save_callback:"save"
 				,save_callback:"save"
 				,save_as_callback:"save_as"
 				,save_as_callback:"save_as"
 				,language: "<?php echo (file_exists(DIR_AJAX_EDIT_AREA . 'langs' . DIRECTORY_SEPARATOR .CONFIG_LANG_INDEX . ".js")?CONFIG_LANG_INDEX:'en'); ?>"
 				,language: "<?php echo (file_exists(DIR_AJAX_EDIT_AREA . 'langs' . DIRECTORY_SEPARATOR .CONFIG_LANG_INDEX . ".js")?CONFIG_LANG_INDEX:'en'); ?>"
-				,syntax: "<?php echo $syntax; ?>"	
-			});				
-				jQuery('#windowSaveAs').jqm();		
-				jQuery('#windowProcessing').jqm({modal:true});				
+				,syntax: "<?php echo $syntax; ?>"
+			});
+				jQuery('#windowSaveAs').jqm();
+				jQuery('#windowProcessing').jqm({modal:true});
 		}
 		}
-	);		
+	);
 
 
-		
+
 
 
-			
+
 </script>
 </script>
 
 
 <link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/ajaxtexteditor.css" type="text/css" rel="stylesheet" />
 <link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/ajaxtexteditor.css" type="text/css" rel="stylesheet" />
@@ -98,10 +98,10 @@
 <div id="windowProcessing" class="jqmWindow" style="display:none">
 <div id="windowProcessing" class="jqmWindow" style="display:none">
 	<form name="frmProcessing" id="frmProcessing" method="POST" action="<?php echo appendQueryString(CONFIG_URL_SAVE_TEXT, makeQueryString(array('path')));?>">
 	<form name="frmProcessing" id="frmProcessing" method="POST" action="<?php echo appendQueryString(CONFIG_URL_SAVE_TEXT, makeQueryString(array('path')));?>">
 		<input type="hidden" name="folder" id="folder" value="<?php echo dirname($path); ?>" />
 		<input type="hidden" name="folder" id="folder" value="<?php echo dirname($path); ?>" />
-		<input type="hidden" name="name" id="name" value="<?php echo basename($path); ?>" />	
+		<input type="hidden" name="name" id="name" value="<?php echo basename($path); ?>" />
 		<input type="hidden" name="save_as_request" id="save_as_request" value="0" />
 		<input type="hidden" name="save_as_request" id="save_as_request" value="0" />
-		<div style="display:none"><textarea name="text" id="text"></textarea></div> 
-	</form> 
+		<div style="display:none"><textarea name="text" id="text"></textarea></div>
+	</form>
 	<a href="#" class="jqmClose" id="windowSaveClose"><?php echo IMG_BTN_CANCEL; ?></a>
 	<a href="#" class="jqmClose" id="windowSaveClose"><?php echo IMG_BTN_CANCEL; ?></a>
 	<p><img src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/loading.gif" /></p>
 	<p><img src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/loading.gif" /></p>
 </div>
 </div>
@@ -139,7 +139,7 @@
             </th>
             </th>
             <td>
             <td>
             	<select class="input" name="save_to" id="save_to">
             	<select class="input" name="save_to" id="save_to">
-              	
+
               </select>
               </select>
             </td>
             </td>
           </tr>
           </tr>

+ 109 - 109
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php

@@ -10,40 +10,40 @@
 	 * @author Juan Carlos Raña
 	 * @author Juan Carlos Raña
 	 * @since 31/December/2008
 	 * @since 31/December/2008
 	 */
 	 */
-	
-	
+
+
 	include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
 	include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
 	api_block_anonymous_users();// from Dokeos
 	api_block_anonymous_users();// from Dokeos
-		 
+
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 
 
 	require_once(CLASS_SESSION_ACTION);
 	require_once(CLASS_SESSION_ACTION);
-	$sessionAction = new SessionAction();	
+	$sessionAction = new SessionAction();
 	if(CONFIG_LOAD_DOC_LATTER)
 	if(CONFIG_LOAD_DOC_LATTER)
 	{
 	{
 		$fileList = array();
 		$fileList = array();
 		$folderInfo = array('path'=>getCurrentFolderPath());
 		$folderInfo = array('path'=>getCurrentFolderPath());
-	}else 
+	}else
 	{
 	{
 		require_once(CLASS_MANAGER);
 		require_once(CLASS_MANAGER);
 
 
-	
+
 		$manager = new manager();
 		$manager = new manager();
 		$manager->setSessionAction($sessionAction);
 		$manager->setSessionAction($sessionAction);
 		$fileList = $manager->getFileList();
 		$fileList = $manager->getFileList();
-		$folderInfo = $manager->getFolderInfo();		
+		$folderInfo = $manager->getFolderInfo();
 	}
 	}
 	if(CONFIG_SYS_THUMBNAIL_VIEW_ENABLE)
 	if(CONFIG_SYS_THUMBNAIL_VIEW_ENABLE)
 	{
 	{
 	$views = array(
 	$views = array(
 		'detail'=>LBL_BTN_VIEW_DETAILS,
 		'detail'=>LBL_BTN_VIEW_DETAILS,
 		'thumbnail'=>LBL_BTN_VIEW_THUMBNAIL,
 		'thumbnail'=>LBL_BTN_VIEW_THUMBNAIL,
-	);		
-	}else 
+	);
+	}else
 	{
 	{
 	$views = array(
 	$views = array(
 		'detail'=>LBL_BTN_VIEW_DETAILS,
 		'detail'=>LBL_BTN_VIEW_DETAILS,
-	);		
+	);
 	}
 	}
 
 
 	if(!empty($_GET['view']))
 	if(!empty($_GET['view']))
@@ -57,7 +57,7 @@
 			default:
 			default:
 				$view = CONFIG_DEFAULT_VIEW;
 				$view = CONFIG_DEFAULT_VIEW;
 		}
 		}
-	}else 
+	}else
 	{
 	{
 		$view = CONFIG_DEFAULT_VIEW;
 		$view = CONFIG_DEFAULT_VIEW;
 	}
 	}
@@ -107,21 +107,21 @@
 			'download':'<?php echo CONFIG_URL_DOWNLOAD; ?>',
 			'download':'<?php echo CONFIG_URL_DOWNLOAD; ?>',
 			'present':'<?php echo getCurrentUrl(); ?>',
 			'present':'<?php echo getCurrentUrl(); ?>',
 			'home':'<?php echo CONFIG_URL_HOME; ?>',
 			'home':'<?php echo CONFIG_URL_HOME; ?>',
-			'view':'<?php echo CONFIG_URL_LIST_LISTING; ?>'			
+			'view':'<?php echo CONFIG_URL_LIST_LISTING; ?>'
 		};
 		};
 	var permits = {'del':<?php echo (CONFIG_OPTIONS_DELETE?1:0); ?>, 'cut':<?php echo (CONFIG_OPTIONS_CUT?'1':'0'); ?>, 'copy':<?php echo (CONFIG_OPTIONS_COPY?1:0); ?>, 'newfolder':<?php echo (CONFIG_OPTIONS_NEWFOLDER?1:0); ?>, 'rename':<?php echo (CONFIG_OPTIONS_RENAME?1:0); ?>, 'upload':<?php echo (CONFIG_OPTIONS_UPLOAD?1:0); ?>, 'edit':<?php echo (CONFIG_OPTIONS_EDITABLE?1:0); ?>, 'view_only':<?php echo (CONFIG_SYS_VIEW_ONLY?1:0); ?>};
 	var permits = {'del':<?php echo (CONFIG_OPTIONS_DELETE?1:0); ?>, 'cut':<?php echo (CONFIG_OPTIONS_CUT?'1':'0'); ?>, 'copy':<?php echo (CONFIG_OPTIONS_COPY?1:0); ?>, 'newfolder':<?php echo (CONFIG_OPTIONS_NEWFOLDER?1:0); ?>, 'rename':<?php echo (CONFIG_OPTIONS_RENAME?1:0); ?>, 'upload':<?php echo (CONFIG_OPTIONS_UPLOAD?1:0); ?>, 'edit':<?php echo (CONFIG_OPTIONS_EDITABLE?1:0); ?>, 'view_only':<?php echo (CONFIG_SYS_VIEW_ONLY?1:0); ?>};
 	var currentFolder = {};
 	var currentFolder = {};
 	var warningDelete = '<?php echo WARNING_DELETE; ?>';
 	var warningDelete = '<?php echo WARNING_DELETE; ?>';
 	var newFile = {'num':1, 'label':'<?php echo FILE_LABEL_SELECT; ?>', 'upload':'<?php echo FILE_LBL_UPLOAD; ?>'};
 	var newFile = {'num':1, 'label':'<?php echo FILE_LABEL_SELECT; ?>', 'upload':'<?php echo FILE_LBL_UPLOAD; ?>'};
 	var counts = {'new_file':1};
 	var counts = {'new_file':1};
-	var thickbox = {'width':'<?php echo CONFIG_THICKBOX_MAX_WIDTH; ?>', 
+	var thickbox = {'width':'<?php echo CONFIG_THICKBOX_MAX_WIDTH; ?>',
 									'height':'<?php echo CONFIG_THICKBOX_MAX_HEIGHT; ?>',
 									'height':'<?php echo CONFIG_THICKBOX_MAX_HEIGHT; ?>',
 									'next':'<?php echo THICKBOX_NEXT; ?>',
 									'next':'<?php echo THICKBOX_NEXT; ?>',
 									'previous':'<?php echo THICKBOX_PREVIOUS; ?>',
 									'previous':'<?php echo THICKBOX_PREVIOUS; ?>',
-									'close':'<?php echo THICKBOX_CLOSE; ?>' 
-		
+									'close':'<?php echo THICKBOX_CLOSE; ?>'
+
 	};
 	};
-	
+
 	var tb_pathToImage = "theme/<?php echo CONFIG_THEME_NAME; ?>/images/loadingAnimation.gif";
 	var tb_pathToImage = "theme/<?php echo CONFIG_THEME_NAME; ?>/images/loadingAnimation.gif";
 	var msgInvalidFolderName = '<?php echo ERR_FOLDER_FORMAT; ?>';
 	var msgInvalidFolderName = '<?php echo ERR_FOLDER_FORMAT; ?>';
 	var msgInvalidFileName = '<?php echo ERR_FILE_NAME_FORMAT; ?>';
 	var msgInvalidFileName = '<?php echo ERR_FILE_NAME_FORMAT; ?>';
@@ -138,13 +138,13 @@
 	var action = '<?php echo $sessionAction->getAction(); ?>';
 	var action = '<?php echo $sessionAction->getAction(); ?>';
 	var numFiles = <?php echo $sessionAction->count(); ?>;
 	var numFiles = <?php echo $sessionAction->count(); ?>;
 	var warningCloseWindow = '<?php echo WARING_WINDOW_CLOSE; ?>';
 	var warningCloseWindow = '<?php echo WARING_WINDOW_CLOSE; ?>';
-	var numRows = 0; 
+	var numRows = 0;
 
 
 	var wordCloseWindow = '<?php echo LBL_ACTION_CLOSE; ?>';
 	var wordCloseWindow = '<?php echo LBL_ACTION_CLOSE; ?>';
 	var wordPreviewClick = '<?php echo LBL_CLICK_PREVIEW; ?>';
 	var wordPreviewClick = '<?php echo LBL_CLICK_PREVIEW; ?>';
 
 
 	var searchRequired = false;
 	var searchRequired = false;
-	var supporedPreviewExts = '<?php echo CONFIG_VIEWABLE_VALID_EXTS; ?>'; 
+	var supporedPreviewExts = '<?php echo CONFIG_VIEWABLE_VALID_EXTS; ?>';
 	var supportedUploadExts = '<?php echo CONFIG_UPLOAD_VALID_EXTS; ?>'
 	var supportedUploadExts = '<?php echo CONFIG_UPLOAD_VALID_EXTS; ?>'
 	var elementId = <?php  echo (!empty($_GET['elementId'])?"'" . $_GET['elementId'] . "'":'null'); ?>;
 	var elementId = <?php  echo (!empty($_GET['elementId'])?"'" . $_GET['elementId'] . "'":'null'); ?>;
 	var files = {};
 	var files = {};
@@ -156,7 +156,7 @@ $(document).ready(
 			if(code && code == 13) {// if enter is pressed
 			if(code && code == 13) {// if enter is pressed
 	  			event.preventDefault(); //prevent browser from following the actual href
 	  			event.preventDefault(); //prevent browser from following the actual href
 			};
 			};
-		});		
+		});
 		if(typeof(cancelSelectFile) != 'undefined')
 		if(typeof(cancelSelectFile) != 'undefined')
 		{
 		{
 			$('#linkClose').show();
 			$('#linkClose').show();
@@ -174,7 +174,7 @@ $(document).ready(
 				}
 				}
 			}
 			}
 		);
 		);
-		
+
 		popUpCal.clearText = '<?php echo CALENDAR_CLEAR; ?>';
 		popUpCal.clearText = '<?php echo CALENDAR_CLEAR; ?>';
 		popUpCal.closeText = '<?php echo CALENDAR_CLOSE; ?>';
 		popUpCal.closeText = '<?php echo CALENDAR_CLOSE; ?>';
 		popUpCal.prevText = '<?php echo CALENDAR_PREVIOUS; ?>';
 		popUpCal.prevText = '<?php echo CALENDAR_PREVIOUS; ?>';
@@ -185,14 +185,14 @@ $(document).ready(
 		popUpCal.monthNames = new Array('<?php echo CALENDAR_JAN; ?>','<?php echo CALENDAR_FEB; ?>','<?php echo CALENDAR_MAR; ?>','<?php echo CALENDAR_APR; ?>','<?php echo CALENDAR_MAY; ?>','<?php echo CALENDAR_JUN; ?>','<?php echo CALENDAR_JUL; ?>','<?php echo CALENDAR_AUG; ?>','<?php echo CALENDAR_SEP; ?>','<?php echo CALENDAR_OCT; ?>','<?php echo CALENDAR_NOV; ?>','<?php echo CALENDAR_DEC; ?>');
 		popUpCal.monthNames = new Array('<?php echo CALENDAR_JAN; ?>','<?php echo CALENDAR_FEB; ?>','<?php echo CALENDAR_MAR; ?>','<?php echo CALENDAR_APR; ?>','<?php echo CALENDAR_MAY; ?>','<?php echo CALENDAR_JUN; ?>','<?php echo CALENDAR_JUL; ?>','<?php echo CALENDAR_AUG; ?>','<?php echo CALENDAR_SEP; ?>','<?php echo CALENDAR_OCT; ?>','<?php echo CALENDAR_NOV; ?>','<?php echo CALENDAR_DEC; ?>');
 		popUpCal.dateFormat = 'YMD-';
 		popUpCal.dateFormat = 'YMD-';
 		$('.inputMtime').calendar({autoPopUp:'both', buttonImage:'theme/<?php echo CONFIG_THEME_NAME; ?>/images/date_picker.png'});
 		$('.inputMtime').calendar({autoPopUp:'both', buttonImage:'theme/<?php echo CONFIG_THEME_NAME; ?>/images/date_picker.png'});
-		
-		
+
+
 		initAfterListingLoaded();
 		initAfterListingLoaded();
 		//addMoreFile();
 		//addMoreFile();
 
 
 	} );
 	} );
 
 
-	
+
 </script>
 </script>
 <?php
 <?php
 	if(file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'jscripts' . DIRECTORY_SEPARATOR . 'for_' . CONFIG_EDITOR_NAME . ".js")
 	if(file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'jscripts' . DIRECTORY_SEPARATOR . 'for_' . CONFIG_EDITOR_NAME . ".js")
@@ -217,22 +217,22 @@ $(document).ready(
   			<dd id="currentFolderPath"><?php echo $folderInfo['path']; ?></dd>
   			<dd id="currentFolderPath"><?php echo $folderInfo['path']; ?></dd>
   		</dl>
   		</dl>
     	<div id="viewList">
     	<div id="viewList">
-    		
-    	
+
+
     			<label><?php echo LBL_BTN_VIEW_OPTIONS; ?></label>
     			<label><?php echo LBL_BTN_VIEW_OPTIONS; ?></label>
-					<?php 
+					<?php
 						foreach($views as $k=>$v)
 						foreach($views as $k=>$v)
 						{
 						{
 							?>
 							?>
 							<input type="radio" name="view"  class="radio" onclick="changeView(this);" value="<?php echo $k; ?>" <?php echo ($k==$view?'checked':''); ?>> <?php echo $v; ?> &nbsp;&nbsp;
 							<input type="radio" name="view"  class="radio" onclick="changeView(this);" value="<?php echo $k; ?>" <?php echo ($k==$view?'checked':''); ?>> <?php echo $v; ?> &nbsp;&nbsp;
-							
+
 							<?php
 							<?php
 						}
 						}
 					?></div>
 					?></div>
 				<ul id="actionHeader">
 				<ul id="actionHeader">
 					<li><a href="#" id="actionRefresh" onclick="return windowRefresh();"><span><?php echo LBL_ACTION_REFRESH; ?></span></a></li>
 					<li><a href="#" id="actionRefresh" onclick="return windowRefresh();"><span><?php echo LBL_ACTION_REFRESH; ?></span></a></li>
 					<li><a href="#" id="actionSelectAll" class="check_all" onclick="return checkAll(this);"><span><?php echo LBL_ACTION_SELECT_ALL; ?></span></a></li>
 					<li><a href="#" id="actionSelectAll" class="check_all" onclick="return checkAll(this);"><span><?php echo LBL_ACTION_SELECT_ALL; ?></span></a></li>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_DELETE)
 						if(CONFIG_OPTIONS_DELETE)
 						{
 						{
 							?>
 							?>
@@ -240,15 +240,15 @@ $(document).ready(
 							<?php
 							<?php
 						}
 						}
 					?>
 					?>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_CUT)
 						if(CONFIG_OPTIONS_CUT)
 						{
 						{
 							?>
 							?>
-							<li><a href="#" id="actionCut" onclick="return cutDocuments('<?php echo ERR_NOT_DOC_SELECTED_FOR_CUT; ?>');"><span><?php echo LBL_ACTION_CUT; ?></span></a></li>			
+							<li><a href="#" id="actionCut" onclick="return cutDocuments('<?php echo ERR_NOT_DOC_SELECTED_FOR_CUT; ?>');"><span><?php echo LBL_ACTION_CUT; ?></span></a></li>
 							<?php
 							<?php
 						}
 						}
 					?>
 					?>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_COPY)
 						if(CONFIG_OPTIONS_COPY)
 						{
 						{
 							?>
 							?>
@@ -256,16 +256,16 @@ $(document).ready(
 							<?php
 							<?php
 						}
 						}
 					?>
 					?>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_CUT || CONFIG_OPTIONS_COPY)
 						if(CONFIG_OPTIONS_CUT || CONFIG_OPTIONS_COPY)
 						{
 						{
 							?>
 							?>
 							<li><a href="#" id="actionPaste" onclick="return pasteDocuments('<?php echo ERR_NOT_DOC_SELECTED_FOR_PASTE; ?>');"><span><?php echo LBL_ACTION_PASTE; ?></span></a></li>
 							<li><a href="#" id="actionPaste" onclick="return pasteDocuments('<?php echo ERR_NOT_DOC_SELECTED_FOR_PASTE; ?>');"><span><?php echo LBL_ACTION_PASTE; ?></span></a></li>
 							<?php
 							<?php
 						}
 						}
-					?>															
-					
-					<?php 
+					?>
+
+					<?php
 						if(CONFIG_OPTIONS_NEWFOLDER)
 						if(CONFIG_OPTIONS_NEWFOLDER)
 						{
 						{
 							?>
 							?>
@@ -273,28 +273,28 @@ $(document).ready(
 							<?php
 							<?php
 						}
 						}
 					?>
 					?>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_UPLOAD)
 						if(CONFIG_OPTIONS_UPLOAD)
 						{
 						{
 							?>
 							?>
 							<li><a  id="actionUpload" href="#" onclick="return uploadFileWin(this);"><span><?php echo LBL_BTN_UPLOAD; ?></span></a></li>
 							<li><a  id="actionUpload" href="#" onclick="return uploadFileWin(this);"><span><?php echo LBL_BTN_UPLOAD; ?></span></a></li>
 							<?php
 							<?php
 						}
 						}
-					?>			
-		
-					
+					?>
+
+
 <!--					<li><a href="#" id="actionClose" onclick="closeWindow('<?php echo IMG_WARING_WIN_CLOSE; ?>');"><?php echo IMG_BTN_CLOSE; ?></a></li>-->
 <!--					<li><a href="#" id="actionClose" onclick="closeWindow('<?php echo IMG_WARING_WIN_CLOSE; ?>');"><?php echo IMG_BTN_CLOSE; ?></a></li>-->
 					<!--<li><a href="#" class="thickbox" id="actionInfo" onclick="return infoWin(this);"><span>Info</span></a></li> -->
 					<!--<li><a href="#" class="thickbox" id="actionInfo" onclick="return infoWin(this);"><span>Info</span></a></li> -->
 					<!-- thest functions will be added in the near future
 					<!-- thest functions will be added in the near future
  					<li ><a href="#" id="actionZip"><span>Zip</span></a><li>
  					<li ><a href="#" id="actionZip"><span>Zip</span></a><li>
 					<li ><a href="#" id="actionUnzip"><span>Unzip</span></a><li>-->
 					<li ><a href="#" id="actionUnzip"><span>Unzip</span></a><li>-->
-				</ul>    
-<form action="" method="POST" name="formAction" id="formAction"><input type="hidden" name="currentFolderPath" id="currentFolderPathVal" value="" /><select name="selectedDoc[]" id="selectedDoc" style="display:none;" multiple="multiple"></select><input type="hidden" name="action_value" value="" id="action_value" /></form>				  
+				</ul>
+<form action="" method="POST" name="formAction" id="formAction"><input type="hidden" name="currentFolderPath" id="currentFolderPathVal" value="" /><select name="selectedDoc[]" id="selectedDoc" style="display:none;" multiple="multiple"></select><input type="hidden" name="action_value" value="" id="action_value" /></form>
     </div>
     </div>
-    
+
     <div id="body">
     <div id="body">
-         
-         
+
+
       <div id="rightCol">
       <div id="rightCol">
 	      	<?php
 	      	<?php
 			if(CONFIG_LOAD_DOC_LATTER )
 			if(CONFIG_LOAD_DOC_LATTER )
@@ -302,16 +302,16 @@ $(document).ready(
 				$currentPath = getCurrentFolderPath();
 				$currentPath = getCurrentFolderPath();
 				?>
 				?>
 				<script type="text/javascript">
 				<script type="text/javascript">
-				parentFolder = {path:'<?php echo getParentFolderPath($currentPath); ?>'}; 
+				parentFolder = {path:'<?php echo getParentFolderPath($currentPath); ?>'};
 				currentFolder = {'friendly_path':'<?php echo transformFilePath($currentPath); ?>'};
 				currentFolder = {'friendly_path':'<?php echo transformFilePath($currentPath); ?>'};
 					$(document).ready(
 					$(document).ready(
 						function()
 						function()
 						{
 						{
 							var url = getUrl('view', false, false, false);
 							var url = getUrl('view', false, false, false);
 							$('#rightCol').empty();
 							$('#rightCol').empty();
-							ajaxStart('#rightCol');		
-							
-							$('#rightCol').load(url, 
+							ajaxStart('#rightCol');
+
+							$('#rightCol').load(url,
 										{},
 										{},
 										function(){
 										function(){
 												ajaxStop('#rightCol img.ajaxLoadingImg');
 												ajaxStop('#rightCol img.ajaxLoadingImg');
@@ -322,19 +322,19 @@ $(document).ready(
 					);
 					);
 				</script>
 				</script>
 				<?php
 				<?php
-			}else 
+			}else
 			{
 			{
 				include_once(CONFIG_URL_LIST_LISTING);
 				include_once(CONFIG_URL_LIST_LISTING);
 			}
 			}
 	      	 ?>
 	      	 ?>
-      </div> 
-      
+      </div>
+
       <div id="leftCol">
       <div id="leftCol">
-      
+
 
 
 
 
 				<fieldset id="folderFieldSet" >
 				<fieldset id="folderFieldSet" >
-					
+
 				<legend><?php echo LBL_FOLDER_INFO; ?></legend>
 				<legend><?php echo LBL_FOLDER_INFO; ?></legend>
 				<table cellpadding="0" cellspacing="0" class="tableSummary" id="folderInfo">
 				<table cellpadding="0" cellspacing="0" class="tableSummary" id="folderInfo">
 					<tbody>
 					<tbody>
@@ -358,15 +358,15 @@ $(document).ready(
 						</tr>
 						</tr>
 						<tr>
 						<tr>
 							<th><?php echo LBL_FOLDER_FIELS; ?></th>
 							<th><?php echo LBL_FOLDER_FIELS; ?></th>
-							<td  colspan="3" id="folderFile"><?php echo (isset($folderInfo['file'])?$folderInfo['file']:'&nbsp;'); ?></td>						
+							<td  colspan="3" id="folderFile"><?php echo (isset($folderInfo['file'])?$folderInfo['file']:'&nbsp;'); ?></td>
 						</tr>
 						</tr>
-						
+
 						<tr>
 						<tr>
 							<th><?php echo LBL_FOLDER_WRITABLE; ?></th>
 							<th><?php echo LBL_FOLDER_WRITABLE; ?></th>
 							<td id="folderWritable"><span class="<?php echo (isset($folderInfo['is_readable'])?($folderInfo['is_readable']?'flagYes':'flagNo'):'&nbsp;'); ?>">&nbsp;</span></td>
 							<td id="folderWritable"><span class="<?php echo (isset($folderInfo['is_readable'])?($folderInfo['is_readable']?'flagYes':'flagNo'):'&nbsp;'); ?>">&nbsp;</span></td>
 							<th><?php echo LBL_FOLDER_READABLE; ?></th>
 							<th><?php echo LBL_FOLDER_READABLE; ?></th>
-							<td  id="folderReadable"><span class="<?php echo (isset($folderInfo['is_writable'])?($folderInfo['is_writable']?'flagYes':'flagNo'):'&nbsp;'); ?>">&nbsp;</span></td>						
-						
+							<td  id="folderReadable"><span class="<?php echo (isset($folderInfo['is_writable'])?($folderInfo['is_writable']?'flagYes':'flagNo'):'&nbsp;'); ?>">&nbsp;</span></td>
+
 						</tr>
 						</tr>
 
 
 
 
@@ -398,29 +398,29 @@ $(document).ready(
 						</tr>
 						</tr>
 						<tr>
 						<tr>
 							<th><?php echo LBL_FILE_TYPE; ?></th>
 							<th><?php echo LBL_FILE_TYPE; ?></th>
-							<td  colspan="3" id="fileType"></td>						
+							<td  colspan="3" id="fileType"></td>
 						</tr>
 						</tr>
 						<tr>
 						<tr>
 							<th><?php echo LBL_FILE_WRITABLE; ?></th>
 							<th><?php echo LBL_FILE_WRITABLE; ?></th>
 							<td id="fileWritable"><span class="flagYes">&nbsp;</span></td>
 							<td id="fileWritable"><span class="flagYes">&nbsp;</span></td>
 							<th><?php echo LBL_FILE_READABLE; ?></th>
 							<th><?php echo LBL_FILE_READABLE; ?></th>
-							<td id="fileReadable"><span class="flagNo">&nbsp;</span></td>		
+							<td id="fileReadable"><span class="flagNo">&nbsp;</span></td>
 						</tr>
 						</tr>
 
 
 					</tbody>
 					</tbody>
 				</table>
 				</table>
-		
+
         <p class="searchButtons" id="returnCurrentUrl">
         <p class="searchButtons" id="returnCurrentUrl">
-  
+
         	<span class="right" id="linkSelect">
         	<span class="right" id="linkSelect">
         		<input type="button" value="<?php echo MENU_SELECT; ?>"  id="selectCurrentUrl" class="button">
         		<input type="button" value="<?php echo MENU_SELECT; ?>"  id="selectCurrentUrl" class="button">
         	</span>
         	</span>
-        	
-        </p>				
+
+        </p>
 			</fieldset>
 			</fieldset>
-			
-     
-      
+
+
+
       	<fieldset class="boxSearch">
       	<fieldset class="boxSearch">
       		<legend><?php echo LBL_SEARCH; ?></legend>
       		<legend><?php echo LBL_SEARCH; ?></legend>
 
 
@@ -446,18 +446,18 @@ $(document).ready(
 	          				$(document).ready(
 	          				$(document).ready(
 	          					function()
 	          					function()
 	          					{
 	          					{
-	          						ajaxStart('#searchFolderContainer');		
+	          						ajaxStart('#searchFolderContainer');
 	          						$('#searchFolderContainer').load('<?php echo CONFIG_URL_LOAD_FOLDERS; ?>');
 	          						$('#searchFolderContainer').load('<?php echo CONFIG_URL_LOAD_FOLDERS; ?>');
 	          					}
 	          					}
 	          				);
 	          				);
 	          			</script>
 	          			</script>
 	          			<?php
 	          			<?php
-	          		}else 
+	          		}else
 	          		{
 	          		{
 	          	?>
 	          	?>
 		            <select class="input inputSearch" name="search_folder" id="search_folder">
 		            <select class="input inputSearch" name="search_folder" id="search_folder">
-		            	<?php 
-		            		
+		            	<?php
+
 					foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 					foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 					{
 					{
                               	if(hideFolderName($k))
                               	if(hideFolderName($k))
@@ -467,20 +467,20 @@ $(document).ready(
 		                  		<option value="<?php echo $v; ?>" <?php echo (removeTrailingSlash(backslashToSlash(($folderInfo['path']))) == removeTrailingSlash(backslashToSlash(($v)))?' selected="selected"':''); ?>><?php echo hideFolderName(shortenFileName($k, 30)); // shows only those permitted by Dokeos
 		                  		<option value="<?php echo $v; ?>" <?php echo (removeTrailingSlash(backslashToSlash(($folderInfo['path']))) == removeTrailingSlash(backslashToSlash(($v)))?' selected="selected"':''); ?>><?php echo hideFolderName(shortenFileName($k, 30)); // shows only those permitted by Dokeos
 ?></option>
 ?></option>
 		                  	<?php
 		                  	<?php
-						} 
+						}
 					}
 					}
-		            		
-					?>            	
+
+					?>
 		            </select>
 		            </select>
 		      <?php
 		      <?php
 	          		}
 	          		}
 		      ?></span>
 		      ?></span>
 	          </td>
 	          </td>
-	         </tr>  
+	         </tr>
         		<tr>
         		<tr>
         			<td>
         			<td>
         		<b><?php echo LBL_SEARCH_MTIME; ?></b><br />
         		<b><?php echo LBL_SEARCH_MTIME; ?></b><br />
-        		<input type="text" class="input inputMtime" name="search_mtime_from" id="search_mtime_from" value="<?php echo (!empty($_GET['search_mtime_from'])?$_GET['search_mtime_from']:''); ?>" /> 
+        		<input type="text" class="input inputMtime" name="search_mtime_from" id="search_mtime_from" value="<?php echo (!empty($_GET['search_mtime_from'])?$_GET['search_mtime_from']:''); ?>" />
         		<span class="leftToRightArrow">&nbsp;</span>
         		<span class="leftToRightArrow">&nbsp;</span>
         		<input type="text" class="input inputMtime" name="search_mtime_to" id="search_mtime_to" value="<?php echo (!empty($_GET['search_mtime_to'])?$_GET['search_mtime_to']:''); ?>" />
         		<input type="text" class="input inputMtime" name="search_mtime_to" id="search_mtime_to" value="<?php echo (!empty($_GET['search_mtime_to'])?$_GET['search_mtime_to']:''); ?>" />
         	</td></tr>
         	</td></tr>
@@ -492,13 +492,13 @@ $(document).ready(
           	<input type="radio" name="search_recursively" value="1" id="search_recursively_1" class="radio" <?php echo (empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php echo LBL_RECURSIVELY_YES; ?>
           	<input type="radio" name="search_recursively" value="1" id="search_recursively_1" class="radio" <?php echo (empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php echo LBL_RECURSIVELY_YES; ?>
           	<input type="radio" name="search_recursively" value="0" id="search_recursively_0" class="radio" <?php echo (!empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php echo LBL_RECURSIVELY_NO; ?>
           	<input type="radio" name="search_recursively" value="0" id="search_recursively_0" class="radio" <?php echo (!empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php echo LBL_RECURSIVELY_NO; ?>
           	</td>
           	</td>
-          </tr>	                	
+          </tr>
           	</tbody>
           	</tbody>
 </table>
 </table>
 
 
 
 
 
 
-       	
+
         <p class="searchButtons">
         <p class="searchButtons">
         	<span class="left" id="linkClose" style="display:none">
         	<span class="left" id="linkClose" style="display:none">
         		<input  type="button" value="<?php echo LBL_ACTION_CLOSE; ?>" onclick="return cancelSelectFile();"  class="button">
         		<input  type="button" value="<?php echo LBL_ACTION_CLOSE; ?>" onclick="return cancelSelectFile();"  class="button">
@@ -506,21 +506,21 @@ $(document).ready(
         	<span class="right" id="linkSearch">
         	<span class="right" id="linkSearch">
         		<input type="button" value="<?php echo BTN_SEARCH; ?>" onclick="return search();" class="button">
         		<input type="button" value="<?php echo BTN_SEARCH; ?>" onclick="return search();" class="button">
         	</span>
         	</span>
-        	
+
         </p>
         </p>
         </fieldset>
         </fieldset>
-  
+
       </div>
       </div>
-      
+
       <div class="clear"></div>
       <div class="clear"></div>
     </div>
     </div>
-		
-  
+
+
   </div>
   </div>
   <div class="clear"></div>
   <div class="clear"></div>
 
 
 
 
-  
+
   <div id="ajaxLoading" style="display:none"><img class="ajaxLoadingImg" src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/ajaxLoading.gif" /></div>
   <div id="ajaxLoading" style="display:none"><img class="ajaxLoadingImg" src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/ajaxLoading.gif" /></div>
   <div id="winUpload" style="display:none">
   <div id="winUpload" style="display:none">
   	<div class="jqmContainer">
   	<div class="jqmContainer">
@@ -533,18 +533,18 @@ $(document).ready(
 		  		<thead>
 		  		<thead>
 		  			<tr>
 		  			<tr>
 		  				<th colspan="2">
 		  				<th colspan="2">
-		  					<?php echo FILE_FORM_TITLE; ?>		  					
+		  					<?php echo FILE_FORM_TITLE; ?>
 		  				</th>
 		  				</th>
 		  			</tr>
 		  			</tr>
 		  			<tr>
 		  			<tr>
-		  			<th colspan="2" align="left">		  			
+		  			<th colspan="2" align="left">
 		  				<label>
 		  				<label>
-		  				<a class="action" href="#" title="<?php echo FILE_LBL_MORE;  ?>" onclick="return addMoreFile();">			  				
+		  				<a class="action" href="#" title="<?php echo FILE_LBL_MORE;  ?>" onclick="return addMoreFile();">
 			  				<label><?php echo FILE_LBL_MORE;  ?></label><span class="addMore">&nbsp;</span></a>
 			  				<label><?php echo FILE_LBL_MORE;  ?></label><span class="addMore">&nbsp;</span></a>
-			  			</label>			  		
-		  			
+			  			</label>
+
 		  			</th>
 		  			</th>
-		  			</tr>		  			
+		  			</tr>
 		  		</thead>
 		  		</thead>
 		  		<tbody id="fileUploadBody">
 		  		<tbody id="fileUploadBody">
 		  			<tr style="display:none">
 		  			<tr style="display:none">
@@ -552,12 +552,12 @@ $(document).ready(
 		  				<td>
 		  				<td>
 		  					<input type="file" class="input" name="file"  />
 		  					<input type="file" class="input" name="file"  />
 		  					<input type="button" class="button" value="<?php echo FILE_LBL_UPLOAD; ?>" />
 		  					<input type="button" class="button" value="<?php echo FILE_LBL_UPLOAD; ?>" />
-		  					<a href="#" class="action" title="Cancel" style="display:none" >		  	
+		  					<a href="#" class="action" title="Cancel" style="display:none" >
 		  						<span class="cancel">&nbsp;</span>
 		  						<span class="cancel">&nbsp;</span>
-		  					</a>	  						
-		  					<span class="uploadProcessing" style="display:none">&nbsp;</span>		  					
+		  					</a>
+		  					<span class="uploadProcessing" style="display:none">&nbsp;</span>
 		  				</td>
 		  				</td>
-		  			</tr>		
+		  			</tr>
 		  		</tbody>
 		  		</tbody>
 		  		<tfoot>
 		  		<tfoot>
 		  			<tr>
 		  			<tr>
@@ -566,11 +566,11 @@ $(document).ready(
 		  			</tr>
 		  			</tr>
 		  		</tfoot>
 		  		</tfoot>
 		  	</table>
 		  	</table>
-		  	</form>  		
+		  	</form>
   		</div>
   		</div>
 
 
   	</div>
   	</div>
-  </div> 
+  </div>
   <div id="winNewFolder" style="display:none">
   <div id="winNewFolder" style="display:none">
   	<div class="jqmContainer">
   	<div class="jqmContainer">
   		<div class="jqmHeader">
   		<div class="jqmHeader">
@@ -589,9 +589,9 @@ $(document).ready(
 	  			<tr>
 	  			<tr>
 	  				<th><label><?php echo FOLDER_LBL_TITLE; ?></label></th>
 	  				<th><label><?php echo FOLDER_LBL_TITLE; ?></label></th>
 	  				<td><input type="text" name="new_folder" id="new_folder" value="" class="input"></td>
 	  				<td><input type="text" name="new_folder" id="new_folder" value="" class="input"></td>
-	  			</tr>    		
-	
-				
+	  			</tr>
+
+
 	  		</tbody>
 	  		</tbody>
 	  		<tfoot>
 	  		<tfoot>
 	  			<tr>
 	  			<tr>
@@ -599,14 +599,14 @@ $(document).ready(
 	  				<td><input type="button" value="<?php echo FOLDER_LBL_CREATE; ?>" class="button" onclick="return doCreateFolder();"  /></td>
 	  				<td><input type="button" value="<?php echo FOLDER_LBL_CREATE; ?>" class="button" onclick="return doCreateFolder();"  /></td>
 	  			</tr>
 	  			</tr>
 	  		</tfoot>
 	  		</tfoot>
-	  	</table>	
-	  	</form>	
+	  	</table>
+	  	</form>
   		</div>
   		</div>
 
 
-  	
-  	
+
+
   	</div>
   	</div>
-  </div>   
+  </div>
   <div id="winPlay" style="display:none">
   <div id="winPlay" style="display:none">
   	<div class="jqmContainer">
   	<div class="jqmContainer">
   		<div class="jqmHeader">
   		<div class="jqmHeader">
@@ -635,7 +635,7 @@ $(document).ready(
 		  		<tbody>
 		  		<tbody>
 		  			<tr>
 		  			<tr>
 		  				<th><label><?php echo RENAME_NEW_NAME; ?></label></th>
 		  				<th><label><?php echo RENAME_NEW_NAME; ?></label></th>
-		  				<td><input type="name" id="renameName" class="input" name="name" style="width:250px" /> 
+		  				<td><input type="name" id="renameName" class="input" name="name" style="width:250px" />
 		          </td>
 		          </td>
 		  			</tr>
 		  			</tr>
 		  		</tbody>
 		  		</tbody>
@@ -647,11 +647,11 @@ $(document).ready(
 		  		</tfoot>
 		  		</tfoot>
 		  	</table>
 		  	</table>
 		  	</form>
 		  	</form>
-  		</div>  	
+  		</div>
 
 
   	</div>
   	</div>
-  	
-  </div>        
+
+  </div>
   <div id="winInfo" style="display:none">
   <div id="winInfo" style="display:none">
   	<div class="jqmContainer">
   	<div class="jqmContainer">
   		<div class="jqmHeader">
   		<div class="jqmHeader">
@@ -697,12 +697,12 @@ $(document).ready(
   					<label>&copy;Copyright:</label>
   					<label>&copy;Copyright:</label>
   				</th>
   				</th>
   				<td>
   				<td>
-  					All copyright declarations in the source must remain unchange. Please contact us if you need to make changes to it, in order to avoid any Legal Issues.  
+  					All copyright declarations in the source must remain unchange. Please contact us if you need to make changes to it, in order to avoid any Legal Issues.
   				</td>
   				</td>
   			</tr>
   			</tr>
   		</tbody>
   		</tbody>
   	</table>
   	</table>
-  		</div>  	
+  		</div>
 
 
 
 
   	</div>
   	</div>

+ 5 - 5
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.auth.php

@@ -1,6 +1,6 @@
-<?php 
+<?php
 /**
 /**
- * the purpose I added this class is to make the file system much flexible 
+ * the purpose I added this class is to make the file system much flexible
  * for customization.
  * for customization.
  * Actually,  this is a kind of interface and you should modify it to fit your system
  * Actually,  this is a kind of interface and you should modify it to fit your system
  * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
  * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
@@ -12,9 +12,9 @@
 		var $__loginIndexInSession = 'ajax_user';
 		var $__loginIndexInSession = 'ajax_user';
 		function __construct()
 		function __construct()
 		{
 		{
-			
+
 		}
 		}
-		
+
 		function Auth()
 		function Auth()
 		{
 		{
 			$this->__construct();
 			$this->__construct();
@@ -39,7 +39,7 @@
 			{
 			{
 				$_SESSION[$this->__loginIndexInSession] = true;
 				$_SESSION[$this->__loginIndexInSession] = true;
 				return true;
 				return true;
-			}else 
+			}else
 			{
 			{
 				return false;
 				return false;
 			}
 			}

+ 57 - 57
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.file.php

@@ -31,7 +31,7 @@
 					$this->fileStat = @stat($path);
 					$this->fileStat = @stat($path);
 					$this->fileInfo['size'] = $this->fileStat[7];
 					$this->fileInfo['size'] = $this->fileStat[7];
 					$this->fileInfo['atime'] = $this->fileStat[8];
 					$this->fileInfo['atime'] = $this->fileStat[8];
-					$this->fileInfo['ctime'] = $this->fileStat[10];	
+					$this->fileInfo['ctime'] = $this->fileStat[10];
 					$this->fileInfo['mtime'] = $this->fileStat[9];
 					$this->fileInfo['mtime'] = $this->fileStat[9];
 					$this->fileInfo['path'] = $path;
 					$this->fileInfo['path'] = $path;
 					$this->fileInfo['name'] = str_replace('_',' ',basename($path));	//for Dokeos. Prevent long file name
 					$this->fileInfo['name'] = str_replace('_',' ',basename($path));	//for Dokeos. Prevent long file name
@@ -43,19 +43,19 @@
 					$this->fileInfo['name'] = str_replace('_',' ',basename($path));	//for Dokeos. Prevent long file name
 					$this->fileInfo['name'] = str_replace('_',' ',basename($path));	//for Dokeos. Prevent long file name
 					$this->fileInfo['path'] = $path;
 					$this->fileInfo['path'] = $path;
 					$this->fileInfo['atime'] = $this->fileStat[8];
 					$this->fileInfo['atime'] = $this->fileStat[8];
-					$this->fileInfo['ctime'] = $this->fileStat[10];	
+					$this->fileInfo['ctime'] = $this->fileStat[10];
 					$this->fileInfo['mtime'] = $this->fileStat[9];
 					$this->fileInfo['mtime'] = $this->fileStat[9];
 					$this->fileInfo['is_writable'] = $this->isWritable();
 					$this->fileInfo['is_writable'] = $this->isWritable();
-					$this->fileInfo['is_readable'] = $this->isReadable();					
+					$this->fileInfo['is_readable'] = $this->isReadable();
 				}
 				}
-			}else 
+			}else
 			{
 			{
-				trigger_error('No such file exists. ' . $path, E_USER_NOTICE);	
-			}				
+				trigger_error('No such file exists. ' . $path, E_USER_NOTICE);
+			}
 			}
 			}
 
 
 
 
-			
+
 		}
 		}
 		/**
 		/**
 		 * contructor
 		 * contructor
@@ -66,8 +66,8 @@
 		{
 		{
 			$this->__construct($path);
 			$this->__construct($path);
 		}
 		}
-		
-		
+
+
 		/**
 		/**
 		 * check if a file or folder writable
 		 * check if a file or folder writable
 		 *
 		 *
@@ -76,7 +76,7 @@
 		 */
 		 */
 	function isWritable($path=null)
 	function isWritable($path=null)
 	{
 	{
-		$path = (is_null($path)?$this->filePath:$path);		
+		$path = (is_null($path)?$this->filePath:$path);
 		if (DIRECTORY_SEPARATOR == "\\")
 		if (DIRECTORY_SEPARATOR == "\\")
 		{
 		{
 			$path = slashToBackslash($path);
 			$path = slashToBackslash($path);
@@ -92,14 +92,14 @@
 			{
 			{
 					$path = addTrailingSlash($path);
 					$path = addTrailingSlash($path);
 					$tmp = uniqid(time());
 					$tmp = uniqid(time());
-					if (@touch($path . $tmp)) 
+					if (@touch($path . $tmp))
 					{
 					{
 						@unlink($path . $tmp);
 						@unlink($path . $tmp);
 						return true;
 						return true;
-					}			
+					}
 			}
 			}
-			return false;			
-		}else 
+			return false;
+		}else
 		{
 		{
 			return @is_writable(slashToBackslash($path));
 			return @is_writable(slashToBackslash($path));
 		}
 		}
@@ -110,11 +110,11 @@
 	 *
 	 *
 	 * @return boolean true if the files is readable.
 	 * @return boolean true if the files is readable.
 	 */
 	 */
-	function isReadable($path =null) 
+	function isReadable($path =null)
 	{
 	{
 		$path = is_null($path)?$this->filePath:$path;
 		$path = is_null($path)?$this->filePath:$path;
 		return @is_readable(slashToBackslash($path));
 		return @is_readable(slashToBackslash($path));
-	}		
+	}
 	/**
 	/**
 	 * change the modified time
 	 * change the modified time
 	 *
 	 *
@@ -122,7 +122,7 @@
 	 * @param string $time
 	 * @param string $time
 	 * @return boolean
 	 * @return boolean
 	 */
 	 */
-	function setLastModified($path=null, $time) 
+	function setLastModified($path=null, $time)
 	{
 	{
 		$path = is_null($path)?$this->filePath:$path;
 		$path = is_null($path)?$this->filePath:$path;
 		$time = is_null($time)?time():$time;
 		$time = is_null($time)?time():$time;
@@ -137,33 +137,33 @@
 		 * @dirOwner
 		 * @dirOwner
 		 * @return boolean
 		 * @return boolean
 		 */
 		 */
-		function mkdir($path = null, $mask=null, $dirOwner='') 
+		function mkdir($path = null, $mask=null, $dirOwner='')
 		{
 		{
 			$path = is_null($path)?$this->filePath:$path;
 			$path = is_null($path)?$this->filePath:$path;
 			if(!file_exists($path))
 			if(!file_exists($path))
 			{
 			{
-				$mask = is_null($mask)?$this->mask:$mask;				
-				$status = @mkdir(slashToBackslash($path));			
+				$mask = is_null($mask)?$this->mask:$mask;
+				$status = @mkdir(slashToBackslash($path));
 				if ($mask)
 				if ($mask)
 				{
 				{
 					@chmod(slashToBackslash($path), intval($mask, 8));
 					@chmod(slashToBackslash($path), intval($mask, 8));
-				}					
+				}
 				if($dirOwner)
 				if($dirOwner)
 				{
 				{
 					$this->chown(slashToBackslash($path), $dirOwner);
 					$this->chown(slashToBackslash($path), $dirOwner);
 				}
 				}
-				return $status;				
+				return $status;
 			}
 			}
 			return true;
 			return true;
 
 
-		}	
+		}
 	/**
 	/**
 	 * change the own of a file or folder
 	 * change the own of a file or folder
 	 *
 	 *
 	 * @param the file path $path
 	 * @param the file path $path
 	 * @param  $owner
 	 * @param  $owner
 	 */
 	 */
-	function chown($path, $owner) 
+	function chown($path, $owner)
 	{
 	{
 		if(!empty($owner))
 		if(!empty($owner))
 		{
 		{
@@ -173,7 +173,7 @@
 			if(!empty($owners[1]))
 			if(!empty($owners[1]))
 				@chgrp($path, $owner[1]);
 				@chgrp($path, $owner[1]);
 		}
 		}
-	}	
+	}
 
 
     /**
     /**
          * Copy a file, or recursively copy a folder and its contents
          * Copy a file, or recursively copy a folder and its contents
@@ -194,34 +194,34 @@
 				{
 				{
 					$this->_debug('Unable to create folder (' . $dest . ")");
 					$this->_debug('Unable to create folder (' . $dest . ")");
 					return false;
 					return false;
-				}					
+				}
 			}
 			}
 					// Copy in to your self?
 					// Copy in to your self?
 				if (getAbsPath($source) ==  getAbsPath($dest))
 				if (getAbsPath($source) ==  getAbsPath($dest))
 				{
 				{
 					$this->_debug('Unable to copy itself. source: ' . getAbsPath($source) . "; dest: " . getAbsPath($dest));
 					$this->_debug('Unable to copy itself. source: ' . getAbsPath($source) . "; dest: " . getAbsPath($dest));
-					return false;		
+					return false;
 				}
 				}
         // Simple copy for a file
         // Simple copy for a file
         if (is_file($source))
         if (is_file($source))
-        {        	
+        {
         		$dest = addTrailingSlash($dest) . (basename($source));
         		$dest = addTrailingSlash($dest) . (basename($source));
         	if(file_exists($dest))
         	if(file_exists($dest))
         	{
         	{
         		return false;
         		return false;
         	}else {
         	}else {
-        		
+
         		return copy($source, $dest);
         		return copy($source, $dest);
         	}
         	}
-            
-            
+
+
         }elseif(is_dir($source))
         }elseif(is_dir($source))
         {
         {
 	        // Loop through the folder
 	        // Loop through the folder
 	           if(file_exists(addTrailingSlash($dest) . basename($source)))
 	           if(file_exists(addTrailingSlash($dest) . basename($source)))
 	           {
 	           {
 	           	return false;
 	           	return false;
-	           }else 
+	           }else
 	           {
 	           {
 			 		if(!file_exists(addTrailingSlash($dest) . basename($source)) || !is_dir(addTrailingSlash($dest) . basename($source)))
 			 		if(!file_exists(addTrailingSlash($dest) . basename($source)) || !is_dir(addTrailingSlash($dest) . basename($source)))
 					{
 					{
@@ -229,24 +229,24 @@
 						{
 						{
 							$this->_debug('Unable to create folder (' . addTrailingSlash($dest) . basename($source) . ")");
 							$this->_debug('Unable to create folder (' . addTrailingSlash($dest) . basename($source) . ")");
 							return false;
 							return false;
-						}					
-					}	        	
+						}
+					}
 		        $handle = opendir($source);
 		        $handle = opendir($source);
 		        while(false !== ($readdir = readdir($handle)))
 		        while(false !== ($readdir = readdir($handle)))
 		        {
 		        {
 		            if($readdir != '.' && $readdir != '..')
 		            if($readdir != '.' && $readdir != '..')
-		            {	  
-		            	$path = addTrailingSlash($source).'/'.$readdir;    
+		            {
+		            	$path = addTrailingSlash($source).'/'.$readdir;
 		            	$this->copyTo($path, addTrailingSlash($dest) . basename($source));
 		            	$this->copyTo($path, addTrailingSlash($dest) . basename($source));
 		            }
 		            }
 		        }
 		        }
 		         closedir($handle);
 		         closedir($handle);
-		        return true;	           	
+		        return true;
 	           }
 	           }
-	
-        }		   
+
+        }
         return false;
         return false;
-    }	
+    }
     /**
     /**
      * get next available file name
      * get next available file name
      *
      *
@@ -256,7 +256,7 @@
      */
      */
     function getNextAvailableFileName($fileToMove, $destFolder)
     function getNextAvailableFileName($fileToMove, $destFolder)
     {
     {
-    	
+
     	$folderPath = addslashes(backslashToSlash(getParentPath($fileToMove)));
     	$folderPath = addslashes(backslashToSlash(getParentPath($fileToMove)));
     	$destFolder = addslashes(backslashToSlash(getParentPath($destFolder)));
     	$destFolder = addslashes(backslashToSlash(getParentPath($destFolder)));
     	$finalPath = $destFolder . basename($fileToMove);
     	$finalPath = $destFolder . basename($fileToMove);
@@ -280,9 +280,9 @@
     			{
     			{
     				$count++;
     				$count++;
     			}
     			}
-    			$filePath = $destFolder . $fileBaseName . $count;   			
+    			$filePath = $destFolder . $fileBaseName . $count;
     		}
     		}
-    		
+
     	}
     	}
 		return $finalPath;
 		return $finalPath;
     }
     }
@@ -296,7 +296,7 @@
     	return $this->fileInfo;
     	return $this->fileInfo;
     }
     }
     /**
     /**
-     * close 
+     * close
      *
      *
      */
      */
     function close()
     function close()
@@ -322,7 +322,7 @@
 			{
 			{
 				return $this->__recursive_remove_directory($path);
 				return $this->__recursive_remove_directory($path);
 			}
 			}
-			
+
 		}
 		}
 		return false;
 		return false;
 	}
 	}
@@ -341,13 +341,13 @@
 		}
 		}
 		return false;
 		return false;
 	}
 	}
-	
+
 	function _debug($info)
 	function _debug($info)
 	{
 	{
 		if($this->debug)
 		if($this->debug)
 		{
 		{
 			echo $info . "<br>\n";
 			echo $info . "<br>\n";
-		}else 
+		}else
 		{
 		{
 			$this->errors[] = $info;
 			$this->errors[] = $info;
 		}
 		}
@@ -357,7 +357,7 @@
  * expects path to directory and optional TRUE / FALSE to empty
  * expects path to directory and optional TRUE / FALSE to empty
  * of course PHP has to have the rights to delete the directory
  * of course PHP has to have the rights to delete the directory
  * you specify and all files and folders inside the directory
  * you specify and all files and folders inside the directory
- * 
+ *
  * to use this function to totally remove a directory, write:
  * to use this function to totally remove a directory, write:
  * recursive_remove_directory('path/to/directory/to/delete');
  * recursive_remove_directory('path/to/directory/to/delete');
  * to use this function to empty a directory, write:
  * to use this function to empty a directory, write:
@@ -373,25 +373,25 @@
      {
      {
          $directory = substr($directory,0,-1);
          $directory = substr($directory,0,-1);
      }
      }
-  
+
      // if the path is not valid or is not a directory ...
      // if the path is not valid or is not a directory ...
      if(!file_exists($directory) || !is_dir($directory))
      if(!file_exists($directory) || !is_dir($directory))
      {
      {
          // ... we return false and exit the function
          // ... we return false and exit the function
          return FALSE;
          return FALSE;
-  
+
      // ... if the path is not readable
      // ... if the path is not readable
      }elseif(!is_readable($directory))
      }elseif(!is_readable($directory))
      {
      {
          // ... we return false and exit the function
          // ... we return false and exit the function
          return FALSE;
          return FALSE;
-  
+
      // ... else if the path is readable
      // ... else if the path is readable
      }else{
      }else{
-  
+
          // we open the directory
          // we open the directory
          $handle = @opendir($directory);
          $handle = @opendir($directory);
-  
+
          // and scan through the items inside
          // and scan through the items inside
          while (FALSE !== ($item = @readdir($handle)))
          while (FALSE !== ($item = @readdir($handle)))
          {
          {
@@ -401,12 +401,12 @@
              {
              {
                  // we build the new path to delete
                  // we build the new path to delete
                  $path = $directory.'/'.$item;
                  $path = $directory.'/'.$item;
-  
+
                  // if the new path is a directory
                  // if the new path is a directory
                  if(is_dir($path))                  {
                  if(is_dir($path))                  {
                      // we call this function with the new path
                      // we call this function with the new path
                      $this->__recursive_remove_directory($path);
                      $this->__recursive_remove_directory($path);
-  
+
                  // if the new path is a file
                  // if the new path is a file
                  }else{
                  }else{
                     // we remove the file
                     // we remove the file
@@ -416,7 +416,7 @@
          }
          }
          // close the directory
          // close the directory
          @closedir($handle);
          @closedir($handle);
-  
+
         // if the option to empty is not set to true
         // if the option to empty is not set to true
          if($empty == FALSE)
          if($empty == FALSE)
          {
          {
@@ -430,7 +430,7 @@
          // return success
          // return success
          return TRUE;
          return TRUE;
      }
      }
- }   		
+ }
 	}
 	}
 
 
 ?>
 ?>

+ 17 - 17
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.history.php

@@ -15,7 +15,7 @@
 		/**
 		/**
 		 * constructor
 		 * constructor
 		 *
 		 *
-		 * @param string $path the path to the image 
+		 * @param string $path the path to the image
 		 * @param object $session an instance of session class
 		 * @param object $session an instance of session class
 		 */
 		 */
 		function __construct($path, &$session)
 		function __construct($path, &$session)
@@ -26,14 +26,14 @@
 			{
 			{
 				$_SESSION[$this->path] = array();
 				$_SESSION[$this->path] = array();
 			}
 			}
-			
+
 		}
 		}
 		/**
 		/**
 		 * constructor
 		 * constructor
 		 *
 		 *
-		 * @param string $path the path to the image 
+		 * @param string $path the path to the image
 		 * @param object $session an instance of session class
 		 * @param object $session an instance of session class
-		 */		
+		 */
 		function History($path, &$session)
 		function History($path, &$session)
 		{
 		{
 			$this->__construct($path, $session);
 			$this->__construct($path, $session);
@@ -66,11 +66,11 @@
 						if(file_exists($this->session->getSessionDir() . $v['name']))
 						if(file_exists($this->session->getSessionDir() . $v['name']))
 						{
 						{
 							$output++;
 							$output++;
-						}else 
+						}else
 						{
 						{
-							
+
 						}
 						}
-						
+
 					}
 					}
 				}
 				}
 			}
 			}
@@ -85,7 +85,7 @@
 		function getLastestRestorable()
 		function getLastestRestorable()
 		{
 		{
 			if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path]) && sizeof($_SESSION[$this->path]))
 			if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path]) && sizeof($_SESSION[$this->path]))
-			{	
+			{
 				$sessionImages = array_reverse($_SESSION[$this->path], true);
 				$sessionImages = array_reverse($_SESSION[$this->path], true);
 				$lastestKey = '';
 				$lastestKey = '';
 				foreach($sessionImages as $k=>$v)
 				foreach($sessionImages as $k=>$v)
@@ -94,11 +94,11 @@
 					{
 					{
 						return $sessionImages[$k];
 						return $sessionImages[$k];
 					}
 					}
-				}							
-				
+				}
+
 			}
 			}
 			return  array();
 			return  array();
-			
+
 		}
 		}
 		/**
 		/**
 		 * get the original image which is kept in the session folder
 		 * get the original image which is kept in the session folder
@@ -119,12 +119,12 @@
 						{
 						{
 							return array('info'=>$_SESSION[$this->path][$k], 'key'=>$k);
 							return array('info'=>$_SESSION[$this->path][$k], 'key'=>$k);
 						}
 						}
-						
+
 					}
 					}
 				}
 				}
-			}	
+			}
 			return $outputs;
 			return $outputs;
-				
+
 		}
 		}
 		/**
 		/**
 		 * remove the lastest restorable state
 		 * remove the lastest restorable state
@@ -146,10 +146,10 @@
 					}
 					}
 				}
 				}
 			}
 			}
-			return false;		
+			return false;
 		}
 		}
 
 
-		
-		
+
+
 	}
 	}
 ?>
 ?>

+ 133 - 133
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.image.php

@@ -6,23 +6,23 @@
 	 * @version 0.9
 	 * @version 0.9
 	 * @since 14/May/2007
 	 * @since 14/May/2007
 	 * @name Image
 	 * @name Image
-	 * 
+	 *
 	 */
 	 */
-	
-	
-	
-	
+
+
+
+
 	class Image
 	class Image
 	{
 	{
-		var $_debug = false; 
+		var $_debug = false;
 		var $_errors = array();
 		var $_errors = array();
 		var $gdInfo = array(); //keep all information of GD extension
 		var $gdInfo = array(); //keep all information of GD extension
 		var $_imgOrig = null; //the hanlder of original image
 		var $_imgOrig = null; //the hanlder of original image
 		var $_imgFinal = null; //the handler of final image
 		var $_imgFinal = null; //the handler of final image
-		var $imageFile  = null;  
+		var $imageFile  = null;
     var $transparentColorRed = null;
     var $transparentColorRed = null;
     var $transparentColorGreen = null;
     var $transparentColorGreen = null;
-    var $transparentColorBlue = null;		 
+    var $transparentColorBlue = null;
     var $chmod = 0755;
     var $chmod = 0755;
     var $_imgInfoOrig = array(
     var $_imgInfoOrig = array(
     	'name'=>'',
     	'name'=>'',
@@ -32,16 +32,16 @@
     	'height'=>'',
     	'height'=>'',
     	'type'=>'',
     	'type'=>'',
     	'path'=>'',
     	'path'=>'',
-    );    
+    );
     var $_imgInfoFinal = array(
     var $_imgInfoFinal = array(
     	'name'=>'',
     	'name'=>'',
     	'ext'=>'',
     	'ext'=>'',
     	'size'=>'',
     	'size'=>'',
     	'width'=>'',
     	'width'=>'',
-    	'height'=>'', 
-    	'type'=>'',   
+    	'height'=>'',
+    	'type'=>'',
     	'path'=>'',
     	'path'=>'',
-    );		
+    );
 		var $_imgQuality = 90;
 		var $_imgQuality = 90;
 		/**
 		/**
 		 * constructor
 		 * constructor
@@ -49,11 +49,11 @@
 		 * @param boolean $debug
 		 * @param boolean $debug
 		 * @return Image
 		 * @return Image
 		 */
 		 */
-		
+
 		function __construct($debug = false)
 		function __construct($debug = false)
 		{
 		{
 			$this->enableDebug($debug);
 			$this->enableDebug($debug);
-			$this->gdInfo = $this->getGDInfo();			
+			$this->gdInfo = $this->getGDInfo();
 		}
 		}
 		function Image($debug = false)
 		function Image($debug = false)
 		{
 		{
@@ -78,21 +78,21 @@
 		}
 		}
 
 
 	    /**
 	    /**
-		 * append to errors array and shown the each error when the debug turned on  
-		 * 
+		 * append to errors array and shown the each error when the debug turned on
+		 *
 		 * @param  string $string
 		 * @param  string $string
 		 * @return void
 		 * @return void
      * @access private
      * @access private
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
 	 */
     function _debug($value)
     function _debug($value)
     {
     {
     		$this->_errors[] = $value;
     		$this->_errors[] = $value;
-        if ($this->_debug) 
+        if ($this->_debug)
         {
         {
             echo $value . "<br />\n";
             echo $value . "<br />\n";
         }
         }
-    }		
+    }
     /**
     /**
      * show erros
      * show erros
      *
      *
@@ -109,11 +109,11 @@
     }
     }
     /**
     /**
      * Load an image from the file system.
      * Load an image from the file system.
-     * 
+     *
      * @param  string $filename
      * @param  string $filename
-     * @return bool 
+     * @return bool
      * @access public
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
      */
     function loadImage($filename)
     function loadImage($filename)
     {
     {
@@ -139,13 +139,13 @@
                 $this->transparentColorBlue = ord(substr($result, $background * 3 + 2, 1));
                 $this->transparentColorBlue = ord(substr($result, $background * 3 + 2, 1));
             }
             }
             fclose($fp);
             fclose($fp);
-            // -- here ends the code related to transparency handling   	
+            // -- here ends the code related to transparency handling
         }
         }
         $this->_imgOrig = @$func($filename);
         $this->_imgOrig = @$func($filename);
         if ($this->_imgOrig == null) {
         if ($this->_imgOrig == null) {
             $this->_debug("The image could not be created from the '$filename' file using the '$func' function.");
             $this->_debug("The image could not be created from the '$filename' file using the '$func' function.");
             return false;
             return false;
-        }else 
+        }else
         {
         {
         	$this->imageFile = $filename;
         	$this->imageFile = $filename;
 			    $this->_imgInfoOrig = array(
 			    $this->_imgInfoOrig = array(
@@ -153,7 +153,7 @@
 			    	'ext'=>$ext,
 			    	'ext'=>$ext,
 			    	'size'=>filesize($filename),
 			    	'size'=>filesize($filename),
 			    	'path'=>$filename,
 			    	'path'=>$filename,
-			    );        	
+			    );
 			    $imgInfo = $this->_getImageInfo($filename);
 			    $imgInfo = $this->_getImageInfo($filename);
 			    if(sizeof($imgInfo))
 			    if(sizeof($imgInfo))
 			    {
 			    {
@@ -163,18 +163,18 @@
 			    		$this->_imgInfoFinal[$k] = $v;
 			    		$this->_imgInfoFinal[$k] = $v;
 			    	}
 			    	}
 			    }
 			    }
-			    
+
         }
         }
         return true;
         return true;
     }
     }
 
 
     /**
     /**
      * Load an image from a string (eg. from a database table)
      * Load an image from a string (eg. from a database table)
-     * 
+     *
      * @param  string $string
      * @param  string $string
-     * @return bool 
+     * @return bool
      * @access public
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
      */
     function loadImageFromString($string)
     function loadImageFromString($string)
     {
     {
@@ -185,18 +185,18 @@
             return false;
             return false;
         }
         }
         return true;
         return true;
-    }		
-    
+    }
+
 
 
     /**
     /**
      * Save the modified image
      * Save the modified image
-     * 
-     * @param  string $filename 
-     * @param  int    $quality 
-     * @param  string $forcetype 
-     * @return bool 
+     *
+     * @param  string $filename
+     * @param  int    $quality
+     * @param  string $forcetype
+     * @return bool
      * @access public
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
      */
     function saveImage($filename, $quality = 90, $forcetype = '')
     function saveImage($filename, $quality = 90, $forcetype = '')
     {
     {
@@ -207,15 +207,15 @@
 
 
         $ext  = ($forcetype == '') ? $this->_getExtension($filename) : strtolower($forcetype);
         $ext  = ($forcetype == '') ? $this->_getExtension($filename) : strtolower($forcetype);
         $func = 'image' . ($ext == 'jpg' ? 'jpeg' : $ext);
         $func = 'image' . ($ext == 'jpg' ? 'jpeg' : $ext);
-        if (!$this->_isSupported($filename, $ext, $func, true)) 
+        if (!$this->_isSupported($filename, $ext, $func, true))
         {
         {
             return false;
             return false;
         }
         }
         $saved = false;
         $saved = false;
-        switch($ext) 
+        switch($ext)
         {
         {
             case 'gif':
             case 'gif':
-                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) 
+                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
                 {
                 {
                     imagetruecolortopalette($this->_imgFinal, false, 255);
                     imagetruecolortopalette($this->_imgFinal, false, 255);
                 }
                 }
@@ -227,26 +227,26 @@
                 break;
                 break;
         }
         }
 
 
-        if ($saved === false) 
+        if ($saved === false)
         {
         {
             $this->_debug("The image could not be saved to the '$filename' file as the file type '$ext' using the '$func' function.");
             $this->_debug("The image could not be saved to the '$filename' file as the file type '$ext' using the '$func' function.");
             return false;
             return false;
-        }else 
+        }else
         {
         {
         	$this->_imgInfoFinal['size'] = @filesize($filename);
         	$this->_imgInfoFinal['size'] = @filesize($filename);
         	@chmod($filename, intval($this->chmod, 8));
         	@chmod($filename, intval($this->chmod, 8));
         }
         }
 
 
         return true;
         return true;
-    }    
+    }
     /**
     /**
      * Shows the masked image without any saving
      * Shows the masked image without any saving
-     * 
-     * @param  string $type 
-     * @param  int    $quality 
-     * @return bool 
+     *
+     * @param  string $type
+     * @param  int    $quality
+     * @return bool
      * @access public
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
      */
     function showImage($type = '', $quality = '')
     function showImage($type = '', $quality = '')
     {
     {
@@ -256,20 +256,20 @@
         }
         }
         $type = (!empty($type)?$type:$this->_imgInfoOrig['ext']);
         $type = (!empty($type)?$type:$this->_imgInfoOrig['ext']);
         $quality = (!empty($quality)?$quality:$this->_imgQuality);
         $quality = (!empty($quality)?$quality:$this->_imgQuality);
-				
+
         $type = strtolower($type);
         $type = strtolower($type);
         $func = 'image' . ($type == 'jpg' ? 'jpeg' : $type);
         $func = 'image' . ($type == 'jpg' ? 'jpeg' : $type);
         $head = 'image/' . ($type == 'jpg' ? 'jpeg' : $type);
         $head = 'image/' . ($type == 'jpg' ? 'jpeg' : $type);
-        
+
         if (!$this->_isSupported('[showing file]', $type, $func, false)) {
         if (!$this->_isSupported('[showing file]', $type, $func, false)) {
             return false;
             return false;
         }
         }
 
 
         header("Content-type: $head");
         header("Content-type: $head");
-        switch($type) 
+        switch($type)
         {
         {
             case 'gif':
             case 'gif':
-                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) 
+                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
                 {
                 {
                     @imagetruecolortopalette($this->_imgFinal, false, 255);
                     @imagetruecolortopalette($this->_imgFinal, false, 255);
                 }
                 }
@@ -281,19 +281,19 @@
                 break;
                 break;
         }
         }
         return true;
         return true;
-    }    
-    
+    }
+
     /**
     /**
 	 * Used for cropping image
 	 * Used for cropping image
-	 * 
+	 *
 	 * @param  int $dst_x
 	 * @param  int $dst_x
 	 * @param  int $dst_y
 	 * @param  int $dst_y
 	 * @param  int $dst_w
 	 * @param  int $dst_w
 	 * @param  int $dst_h
 	 * @param  int $dst_h
 	 * @return bool
 	 * @return bool
      * @access public
      * @access public
-     * @copyright this function originally come from Andy's php 
-	 */  
+     * @copyright this function originally come from Andy's php
+	 */
     function crop($dst_x, $dst_y, $dst_w, $dst_h)
     function crop($dst_x, $dst_y, $dst_w, $dst_h)
     {
     {
         if ($this->_imgOrig == null) {
         if ($this->_imgOrig == null) {
@@ -309,39 +309,39 @@
             return false;
             return false;
         }
         }
         $this->_createFinalImageHandler($dst_w, $dst_h);
         $this->_createFinalImageHandler($dst_w, $dst_h);
-        if ($this->gdInfo['Truecolor Support']) 
+        if ($this->gdInfo['Truecolor Support'])
         {
         {
             	if(!@imagecopyresampled($this->_imgFinal, $this->_imgOrig, 0, 0, $dst_x, $dst_y, $dst_w, $dst_h, $dst_w, $dst_h))
             	if(!@imagecopyresampled($this->_imgFinal, $this->_imgOrig, 0, 0, $dst_x, $dst_y, $dst_w, $dst_h, $dst_w, $dst_h))
             	{
             	{
             		$this->_debug('Unable crop the image.');
             		$this->_debug('Unable crop the image.');
             		return false;
             		return false;
-            	}            
-        } else 
+            	}
+        } else
         {
         {
           	if(!@imagecopyresized($this->_imgFinal, $this->_imgOrig, 0, 0, $dst_x, $dst_y, $dst_w, $dst_h, $dst_w, $dst_h))
           	if(!@imagecopyresized($this->_imgFinal, $this->_imgOrig, 0, 0, $dst_x, $dst_y, $dst_w, $dst_h, $dst_w, $dst_h))
           	{
           	{
            		$this->_debug('Unable crop the image.');
            		$this->_debug('Unable crop the image.');
-          		return false;           		
+          		return false;
           	}
           	}
-            
+
         }
         }
         $this->_imgInfoFinal['width'] = $dst_w;
         $this->_imgInfoFinal['width'] = $dst_w;
-        $this->_imgInfoFinal['height'] = $dst_h;   
-        return true; 	
+        $this->_imgInfoFinal['height'] = $dst_h;
+        return true;
     }
     }
-  
-    
+
+
 	/**
 	/**
      * Resize the Image in the X and/or Y direction
      * Resize the Image in the X and/or Y direction
      * If either is 0 it will be scaled proportionally
      * If either is 0 it will be scaled proportionally
      *
      *
      * @access public
      * @access public
      *
      *
-     * @param mixed $new_x 
-     * @param mixed $new_y 
+     * @param mixed $new_x
+     * @param mixed $new_y
      * @param boolean $constraint keep to resize the image proportionally
      * @param boolean $constraint keep to resize the image proportionally
      * @param boolean $unchangeIfsmaller keep the orignial size if the orignial smaller than the new size
      * @param boolean $unchangeIfsmaller keep the orignial size if the orignial smaller than the new size
-     * 
+     *
      *
      *
      * @return mixed none or PEAR_error
      * @return mixed none or PEAR_error
      */
      */
@@ -351,16 +351,16 @@
 		{
 		{
 			$this->_debug('No image fould.');
 			$this->_debug('No image fould.');
 			return false;
 			return false;
-		}		
-		
+		}
+
 		$new_x = intval($new_x);
 		$new_x = intval($new_x);
 		$new_y = intval($new_y);
 		$new_y = intval($new_y);
 		if($new_x <=0 || $new_y <= 0)
 		if($new_x <=0 || $new_y <= 0)
 		{
 		{
 			$this->_debug('either of new width or height can be zeor or less.');
 			$this->_debug('either of new width or height can be zeor or less.');
-		}else 
+		}else
 		{
 		{
-		
+
 			if($constraint)
 			if($constraint)
 			{
 			{
 				if($new_x < 1 && $new_y < 1)
 				if($new_x < 1 && $new_y < 1)
@@ -370,7 +370,7 @@
 				}elseif($new_x < 1)
 				}elseif($new_x < 1)
 				{
 				{
 					$new_x = floor($new_y / $this->_imgInfoOrig['height'] * $this->_imgInfoOrig['width']);
 					$new_x = floor($new_y / $this->_imgInfoOrig['height'] * $this->_imgInfoOrig['width']);
-	
+
 				}elseif($new_y < 1)
 				}elseif($new_y < 1)
 				{
 				{
 					$new_y = floor($new_x / $this->_imgInfoOrig['width'] * $this->_imgInfoOrig['height']);
 					$new_y = floor($new_x / $this->_imgInfoOrig['width'] * $this->_imgInfoOrig['height']);
@@ -379,7 +379,7 @@
 					$scale = min($new_x/$this->_imgInfoOrig['width'], $new_y/$this->_imgInfoOrig['height']) ;
 					$scale = min($new_x/$this->_imgInfoOrig['width'], $new_y/$this->_imgInfoOrig['height']) ;
 					$new_x = floor($scale*$this->_imgInfoOrig['width']);
 					$new_x = floor($scale*$this->_imgInfoOrig['width']);
 					$new_y = floor($scale*$this->_imgInfoOrig['height']);
 					$new_y = floor($scale*$this->_imgInfoOrig['height']);
-				}						
+				}
 			}
 			}
 			if($unchangeIfsmaller)
 			if($unchangeIfsmaller)
 			{
 			{
@@ -389,9 +389,9 @@
 					$new_y = $this->_imgInfoOrig['height'];
 					$new_y = $this->_imgInfoOrig['height'];
 				}
 				}
 			}
 			}
-		
-			
-			
+
+
+
 			if(is_null($this->_imgOrig))
 			if(is_null($this->_imgOrig))
 			{
 			{
 				$this->loadImage($filePath);
 				$this->loadImage($filePath);
@@ -399,68 +399,68 @@
 			if(sizeof($this->_errors) == 0)
 			if(sizeof($this->_errors) == 0)
 			{
 			{
 				return $this->_resize($new_x, $new_y);
 				return $this->_resize($new_x, $new_y);
-			}			
+			}
 		}
 		}
 
 
 		return false;
 		return false;
-		
-	} // End resize    
+
+	} // End resize
  	/**
  	/**
      * resize the image and return the thumbnail image  details array("width"=>, "height"=>, "name")
      * resize the image and return the thumbnail image  details array("width"=>, "height"=>, "name")
      *
      *
-     * @param string $fileName 
+     * @param string $fileName
      * @param int $new_x the thumbnail width
      * @param int $new_x the thumbnail width
      * @param int $new_y the thumbnail height
      * @param int $new_y the thumbnail height
      * @param string $mode can be save, view and both
      * @param string $mode can be save, view and both
      * @return unknown
      * @return unknown
      */
      */
-	function _resize( $new_x, $new_y) 
+	function _resize( $new_x, $new_y)
 	{
 	{
 		$this->_createFinalImageHandler($new_x, $new_y);
 		$this->_createFinalImageHandler($new_x, $new_y);
     // hacks fot transparency of png24 files
     // hacks fot transparency of png24 files
-    if ($this->_imgInfoOrig['type'] == 'png') 
-    {    
+    if ($this->_imgInfoOrig['type'] == 'png')
+    {
         @imagealphablending($this->_imgFinal, false);
         @imagealphablending($this->_imgFinal, false);
 				if(function_exists('ImageCopyResampled'))
 				if(function_exists('ImageCopyResampled'))
 				{
 				{
 					@ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 					@ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 				} else {
 				} else {
 					@ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 					@ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
-				} 
+				}
         @imagesavealpha($this->_imgFinal, true);
         @imagesavealpha($this->_imgFinal, true);
 
 
-    }else 
+    }else
     {//for the rest image
     {//for the rest image
 			if(function_exists('ImageCopyResampled'))
 			if(function_exists('ImageCopyResampled'))
 			{
 			{
 				@ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 				@ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 			} else {
 			} else {
 				@ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 				@ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
-			}    	
+			}
     }
     }
 
 
-		
+
 		$this->_imgInfoFinal['width'] = $new_x;
 		$this->_imgInfoFinal['width'] = $new_x;
 		$this->_imgInfoFinal['height'] = $new_y;
 		$this->_imgInfoFinal['height'] = $new_y;
 		$this->_imgInfoFinal['name'] = basename($this->_imgInfoOrig['name']);
 		$this->_imgInfoFinal['name'] = basename($this->_imgInfoOrig['name']);
-		$this->_imgInfoFinal['path'] = $this->_imgInfoOrig['path'];		
+		$this->_imgInfoFinal['path'] = $this->_imgInfoOrig['path'];
 		if($this->_imgFinal)
 		if($this->_imgFinal)
 		{
 		{
 			return true;
 			return true;
-		}else 
-		{			
+		}else
+		{
 			$this->_debug('Unable to resize the image on the fly.');
 			$this->_debug('Unable to resize the image on the fly.');
 			return false;
 			return false;
-							
+
 		}
 		}
 
 
-	}   
+	}
     /**
     /**
 	 * Get the extension of a file name
 	 * Get the extension of a file name
-	 * 
+	 *
 	 * @param  string $file
 	 * @param  string $file
  	 * @return string
  	 * @return string
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
 	 */
     function _getExtension($file)
     function _getExtension($file)
     {
     {
@@ -473,14 +473,14 @@
 
 
 	    /**
 	    /**
 		 * Validate whether image reading/writing routines are valid.
 		 * Validate whether image reading/writing routines are valid.
-		 * 
+		 *
 		 * @param  string $filename
 		 * @param  string $filename
 		 * @param  string $extension
 		 * @param  string $extension
 		 * @param  string $function
 		 * @param  string $function
 		 * @param  bool   $write
 		 * @param  bool   $write
 		 * @return bool
 		 * @return bool
      * @access private
      * @access private
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
 	 */
     function _isSupported($filename, $extension, $function, $write = false)
     function _isSupported($filename, $extension, $function, $write = false)
     {
     {
@@ -520,8 +520,8 @@
 				$dst_h = $this->_imgInfoOrig['height'];
 				$dst_h = $this->_imgInfoOrig['height'];
 				$src_w = 0 - $this->_imgInfoOrig['width'];
 				$src_w = 0 - $this->_imgInfoOrig['width'];
 				$src_h = $this->_imgInfoOrig['height'];
 				$src_h = $this->_imgInfoOrig['height'];
-				
-			}else 
+
+			}else
 			{
 			{
 				$dst_x = 0;
 				$dst_x = 0;
 				$dst_y = 0;
 				$dst_y = 0;
@@ -530,8 +530,8 @@
 				$dst_w = $this->_imgInfoOrig['width'];
 				$dst_w = $this->_imgInfoOrig['width'];
 				$dst_h = $this->_imgInfoOrig['height'];
 				$dst_h = $this->_imgInfoOrig['height'];
 				$src_w = $this->_imgInfoOrig['width'];
 				$src_w = $this->_imgInfoOrig['width'];
-				$src_h = 0 - $this->_imgInfoOrig['height'];				
-			}			
+				$src_h = 0 - $this->_imgInfoOrig['height'];
+			}
 				if(function_exists('ImageCopyResampled')){
 				if(function_exists('ImageCopyResampled')){
 					ImageCopyResampled($this->_imgFinal, $this->_imgOrig, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
 					ImageCopyResampled($this->_imgFinal, $this->_imgOrig, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
 				} else {
 				} else {
@@ -540,16 +540,16 @@
 				$this->_imgInfoFinal['width'] = $dst_w;
 				$this->_imgInfoFinal['width'] = $dst_w;
 				$this->_imgInfoFinal['height'] = $dst_h;
 				$this->_imgInfoFinal['height'] = $dst_h;
 				$this->_imgInfoFinal['name'] = basename($this->imageFile);
 				$this->_imgInfoFinal['name'] = basename($this->imageFile);
-				$this->_imgInfoFinal['path'] = $this->imageFile;		
+				$this->_imgInfoFinal['path'] = $this->imageFile;
 				if($this->_imgFinal)
 				if($this->_imgFinal)
 				{
 				{
 					return true;
 					return true;
-				}else 
-				{			
-					$this->_debug('Unable to resize the image on the fly.');	
+				}else
+				{
+					$this->_debug('Unable to resize the image on the fly.');
 					return false;
 					return false;
-								
-				}   	
+
+				}
     }
     }
     /**
     /**
      * flip vertically
      * flip vertically
@@ -577,15 +577,15 @@
      * @param  bool $versionOnly
      * @param  bool $versionOnly
      * @return array
      * @return array
      * @access private
      * @access private
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
      */
     function getGDInfo($versionOnly = false)
     function getGDInfo($versionOnly = false)
     {
     {
         $outputs = array();
         $outputs = array();
-        if (function_exists('gd_info')) 
+        if (function_exists('gd_info'))
         {
         {
             $outputs = gd_info();
             $outputs = gd_info();
-        } else 
+        } else
         {
         {
             $gd = array(
             $gd = array(
                     'GD Version'         => '',
                     'GD Version'         => '',
@@ -597,7 +597,7 @@
                     'FreeType Linkage'   => '',
                     'FreeType Linkage'   => '',
                     'T1Lib Support'      => false,
                     'T1Lib Support'      => false,
                     'WBMP Support'       => false,
                     'WBMP Support'       => false,
-                    'XBM Support'        => false       
+                    'XBM Support'        => false
                     );
                     );
             ob_start();
             ob_start();
             phpinfo();
             phpinfo();
@@ -639,29 +639,29 @@
         }
         }
 
 
         return ($versionOnly) ? $outputs['Version'] : $outputs;
         return ($versionOnly) ? $outputs['Version'] : $outputs;
-    }    
-    
+    }
+
     /**
     /**
 	 * Destroy the resources used by the images.
 	 * Destroy the resources used by the images.
-	 * 
+	 *
 	 * @param  bool $original
 	 * @param  bool $original
 	 * @return void
 	 * @return void
      * @access public
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
 	 */
     function DestroyImages($original = true)
     function DestroyImages($original = true)
     {
     {
     		if(!is_null($this->_imgFinal))
     		if(!is_null($this->_imgFinal))
     		{
     		{
     			@imagedestroy($this->_imgFinal);
     			@imagedestroy($this->_imgFinal);
-    		}        
+    		}
         $this->_imgFinal = null;
         $this->_imgFinal = null;
         if ($original && !is_null($this->_imgOrig)) {
         if ($original && !is_null($this->_imgOrig)) {
             @imagedestroy($this->_imgOrig);
             @imagedestroy($this->_imgOrig);
             $this->_imgOrig = null;
             $this->_imgOrig = null;
         }
         }
-    } 
-    
+    }
+
 	function getImageInfo($imagePath)
 	function getImageInfo($imagePath)
 	{
 	{
 		return $this->_getImageInfo($imagePath);
 		return $this->_getImageInfo($imagePath);
@@ -708,7 +708,7 @@
 			$this->_debug('Unable locate the image or read images information.');
 			$this->_debug('Unable locate the image or read images information.');
 		}
 		}
 		return $outputs;
 		return $outputs;
-		
+
 	}
 	}
 	  function rotate($angle, $bgColor=0)
 	  function rotate($angle, $bgColor=0)
     {
     {
@@ -717,17 +717,17 @@
     		{
     		{
     			$angle += 360;
     			$angle += 360;
     		}
     		}
- 
-		
+
+
          if($this->_imgFinal = imagerotate($this->_imgOrig, $angle))
          if($this->_imgFinal = imagerotate($this->_imgOrig, $angle))
          {
          {
          	return true;
          	return true;
-         }else 
+         }else
          {
          {
          	return false;
          	return false;
          }
          }
- 
-       
+
+
     }
     }
 	/**
 	/**
 	 * get the original image info
 	 * get the original image info
@@ -750,7 +750,7 @@
 			if(is_null($this->_imgFinal))
 			if(is_null($this->_imgFinal))
 			{
 			{
 				$this->_imgInfoFinal = $this->_imgInfoOrig;
 				$this->_imgInfoFinal = $this->_imgInfoOrig;
-			}else 
+			}else
 			{
 			{
 				$this->_imgInfoFinal['width'] = @imagesx($this->_imgFinal);
 				$this->_imgInfoFinal['width'] = @imagesx($this->_imgFinal);
 				$this->_imgInfoFinal['height'] = @imagesy($this->_imgFinal);
 				$this->_imgInfoFinal['height'] = @imagesy($this->_imgFinal);
@@ -758,7 +758,7 @@
 		}
 		}
 		return $this->_imgInfoFinal;
 		return $this->_imgInfoFinal;
 	}
 	}
-	
+
     /**
     /**
      *  create final image handler
      *  create final image handler
      *
      *
@@ -775,15 +775,15 @@
 					$this->_imgFinal = @ImageCreateTrueColor($dst_w,$dst_h);
 					$this->_imgFinal = @ImageCreateTrueColor($dst_w,$dst_h);
 				} else {
 				} else {
 					$this->_imgFinal = @ImageCreate($dst_w,$dst_h);
 					$this->_imgFinal = @ImageCreate($dst_w,$dst_h);
-				}   
+				}
         if (!is_null($this->transparentColorRed) && !is_null($this->transparentColorGreen) && !is_null($this->transparentColorBlue)) {
         if (!is_null($this->transparentColorRed) && !is_null($this->transparentColorGreen) && !is_null($this->transparentColorBlue)) {
-        
+
             $transparent = @imagecolorallocate($targetImageIdentifier, $this->transparentColorRed, $this->transparentColorGreen, $this->transparentColorBlue);
             $transparent = @imagecolorallocate($targetImageIdentifier, $this->transparentColorRed, $this->transparentColorGreen, $this->transparentColorBlue);
             @imagefilledrectangle($this->_imgFinal, 0, 0, $dst_w, $dst_h, $transparent);
             @imagefilledrectangle($this->_imgFinal, 0, 0, $dst_w, $dst_h, $transparent);
-            @imagecolortransparent($this->_imgFinal, $transparent);            
+            @imagecolortransparent($this->_imgFinal, $transparent);
         }
         }
-        
-    }	
+
+    }
 	}
 	}
-	
+
 ?>
 ?>

+ 66 - 66
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.manager.php

@@ -9,7 +9,7 @@
 	 * @author Juan Carlos Raña
 	 * @author Juan Carlos Raña
 	 * @since 31/December/2008
 	 * @since 31/December/2008
 	 */
 	 */
-	 
+
 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");
 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");
 class manager
 class manager
 {
 {
@@ -31,7 +31,7 @@ class manager
 	'flag'=>'noFlag',
 	'flag'=>'noFlag',
 	'friendly_path'=>'',
 	'friendly_path'=>'',
 	);
 	);
-	
+
 	var $lastVisitedFolderPathIndex = 'ajax_last_visited_folder';
 	var $lastVisitedFolderPathIndex = 'ajax_last_visited_folder';
 	var $folderPathIndex = "path";
 	var $folderPathIndex = "path";
 	var $calculateSubdir = true;
 	var $calculateSubdir = true;
@@ -52,12 +52,12 @@ class manager
 			array(array("txt"), "fileText", SEARCH_TYPE_TEXT, 1),
 			array(array("txt"), "fileText", SEARCH_TYPE_TEXT, 1),
 			array(array("xml", "xsl", "dtd"), "fileXml", SEARCH_TYPE_XML, 1)
 			array(array("xml", "xsl", "dtd"), "fileXml", SEARCH_TYPE_XML, 1)
 	);
 	);
-	
+
 	/**
 	/**
 		 * constructor
 		 * constructor
 		 * @path the path to a folder
 		 * @path the path to a folder
 		 * @calculateSubdir force to get the subdirectories information
 		 * @calculateSubdir force to get the subdirectories information
-		 */		
+		 */
 	function __construct($path = null, $calculateSubdir=true)
 	function __construct($path = null, $calculateSubdir=true)
 	{
 	{
 
 
@@ -81,11 +81,11 @@ class manager
 		{
 		{
 			$this->currentFolderPath = CONFIG_SYS_DEFAULT_PATH;
 			$this->currentFolderPath = CONFIG_SYS_DEFAULT_PATH;
 		}
 		}
-		
+
 		$this->currentFolderPath = (isUnderRoot($this->currentFolderPath)?backslashToSlash((addTrailingSlash($this->currentFolderPath))):CONFIG_SYS_DEFAULT_PATH);
 		$this->currentFolderPath = (isUnderRoot($this->currentFolderPath)?backslashToSlash((addTrailingSlash($this->currentFolderPath))):CONFIG_SYS_DEFAULT_PATH);
-		
+
 		if($this->calculateSubdir)
 		if($this->calculateSubdir)
-		{// keep track of this folder path in session 
+		{// keep track of this folder path in session
 			$_SESSION[$this->lastVisitedFolderPathIndex] = $this->currentFolderPath;
 			$_SESSION[$this->lastVisitedFolderPathIndex] = $this->currentFolderPath;
 		}
 		}
 		if(is_dir($this->currentFolderPath))
 		if(is_dir($this->currentFolderPath))
@@ -95,29 +95,29 @@ class manager
 			if(sizeof($folderInfo))
 			if(sizeof($folderInfo))
 			{
 			{
 			    //for Dokeos in a name folder, replace num user by user names
 			    //for Dokeos in a name folder, replace num user by user names
-				
+
 				if(ereg('sf_user_', basename($this->currentFolderPath)))
 				if(ereg('sf_user_', basename($this->currentFolderPath)))
 				{
 				{
-					$userinfo=Database::get_user_info_from_id(substr(basename($this->currentFolderPath), 8));		
+					$userinfo=Database::get_user_info_from_id(substr(basename($this->currentFolderPath), 8));
 					$this->currentFolderInfo['name']=api_get_person_name($userinfo['firstname'], $userinfo['lastname']);
 					$this->currentFolderInfo['name']=api_get_person_name($userinfo['firstname'], $userinfo['lastname']);
 				}
 				}
 				else
 				else
-				{			
-					$this->currentFolderInfo['name']=str_replace('_',' ',basename($this->currentFolderPath));//for Dokeos. Prevent long directory name								
+				{
+					$this->currentFolderInfo['name']=str_replace('_',' ',basename($this->currentFolderPath));//for Dokeos. Prevent long directory name
 				}
 				}
 				$this->currentFolderInfo['subdir']=0;
 				$this->currentFolderInfo['subdir']=0;
 				$this->currentFolderInfo['file']=0;
 				$this->currentFolderInfo['file']=0;
 				$this->currentFolderInfo['ctime']=$folderInfo['ctime'];
 				$this->currentFolderInfo['ctime']=$folderInfo['ctime'];
 				$this->currentFolderInfo['mtime']=$folderInfo['mtime'];
 				$this->currentFolderInfo['mtime']=$folderInfo['mtime'];
 				$this->currentFolderInfo['is_readable']=$folderInfo['is_readable'];
 				$this->currentFolderInfo['is_readable']=$folderInfo['is_readable'];
-				$this->currentFolderInfo['is_writable']=$folderInfo['is_writable'];	
+				$this->currentFolderInfo['is_writable']=$folderInfo['is_writable'];
 				$this->currentFolderInfo['path']  = $this->currentFolderPath;
 				$this->currentFolderInfo['path']  = $this->currentFolderPath;
 				$this->currentFolderInfo['friendly_path'] = transformFilePath($this->currentFolderPath);
 				$this->currentFolderInfo['friendly_path'] = transformFilePath($this->currentFolderPath);
 				$this->currentFolderInfo['type'] = "folder";
 				$this->currentFolderInfo['type'] = "folder";
 				$this->currentFolderInfo['cssClass']='folder';
 				$this->currentFolderInfo['cssClass']='folder';
-				
+
 				//$this->currentFolderInfo['flag'] = $folderInfo['flag'];
 				//$this->currentFolderInfo['flag'] = $folderInfo['flag'];
-			}			
+			}
 		}
 		}
 		if($calculateSubdir && !file_exists($this->currentFolderPath))
 		if($calculateSubdir && !file_exists($this->currentFolderPath))
 		{
 		{
@@ -125,12 +125,12 @@ class manager
 		}
 		}
 
 
 
 
-	
+
 	}
 	}
-	
+
 	function setSessionAction(&$session)
 	function setSessionAction(&$session)
 	{
 	{
-		$this->sessionAction = $session;	
+		$this->sessionAction = $session;
 	}
 	}
 	/**
 	/**
 		 * constructor
 		 * constructor
@@ -165,7 +165,7 @@ class manager
 				if($file != '.' && $file != '..')
 				if($file != '.' && $file != '..')
 				{
 				{
 					$flag = $this->flags['no'];
 					$flag = $this->flags['no'];
-				
+
 					if($this->sessionAction->getFolder() == $this->currentFolderPath)
 					if($this->sessionAction->getFolder() == $this->currentFolderPath)
 					{//check if any flag associated with this folder or file
 					{//check if any flag associated with this folder or file
 						$folder = addTrailingSlash(backslashToSlash($this->currentFolderPath));
 						$folder = addTrailingSlash(backslashToSlash($this->currentFolderPath));
@@ -174,53 +174,53 @@ class manager
 							if($this->sessionAction->getAction() == "copy")
 							if($this->sessionAction->getAction() == "copy")
 							{
 							{
 								$flag = $this->flags['copy'];
 								$flag = $this->flags['copy'];
-							}else 
+							}else
 							{
 							{
 								$flag = $this->flags['cut'];
 								$flag = $this->flags['cut'];
 							}
 							}
 						}
 						}
-					}					
+					}
 					$path=$this->currentFolderPath.$file;
 					$path=$this->currentFolderPath.$file;
 					if(is_dir($path) && isListingDocument($path) )
 					if(is_dir($path) && isListingDocument($path) )
 					{
 					{
 						$this->currentFolderInfo['subdir']++;
 						$this->currentFolderInfo['subdir']++;
-										
-						//fix count left folders for Dokeos				
+
+						//fix count left folders for Dokeos
 						$deleted_by_dokeos_folder='_DELETED_';
 						$deleted_by_dokeos_folder='_DELETED_';
 						$css_folder_dokeos='css';
 						$css_folder_dokeos='css';
 						$hotpotatoes_folder_dokeos='HotPotatoes_files';
 						$hotpotatoes_folder_dokeos='HotPotatoes_files';
 						$chat_files_dokeos='chat_files';
 						$chat_files_dokeos='chat_files';
-						//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?	
-						$group_folder='_groupdocs';			
-						$hide_doc_group=false;								
+						//show group's directory only if I'm member. Or if I'm a teacher. TODO: check groups not necessary because the student dont have access to main folder documents (only to document/group or document/shared_folder). Teachers can access to all groups ?
+						$group_folder='_groupdocs';
+						$hide_doc_group=false;
 						if(ereg($group_folder, $path))
 						if(ereg($group_folder, $path))
 						{
 						{
 							$hide_doc_group=true;
 							$hide_doc_group=true;
 							if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 							if($is_user_in_group ||( $to_group_id!=0 && api_is_allowed_to_edit()))
 							{
 							{
-								$hide_doc_group=false;				
+								$hide_doc_group=false;
 							}
 							}
-							
-						}		
+
+						}
 
 
 						if(ereg($deleted_by_dokeos_folder, $path)|| ereg($css_folder_dokeos, $path) || ereg($hotpotatoes_folder_dokeos, $path) || ereg($chat_files_dokeos, $path) || $hide_doc_group==true || $file[0]=='.')
 						if(ereg($deleted_by_dokeos_folder, $path)|| ereg($css_folder_dokeos, $path) || ereg($hotpotatoes_folder_dokeos, $path) || ereg($chat_files_dokeos, $path) || $hide_doc_group==true || $file[0]=='.')
 						{
 						{
 							$this->currentFolderInfo['subdir']=$this->currentFolderInfo['subdir']-1;
 							$this->currentFolderInfo['subdir']=$this->currentFolderInfo['subdir']-1;
 						}
 						}
 						///end fix for Dokeos
 						///end fix for Dokeos
-						
+
 						if(!$this->calculateSubdir)
 						if(!$this->calculateSubdir)
-						{			
-						}else 
+						{
+						}else
 						{
 						{
-							
+
 								$folder = $this->getFolderInfo($path);
 								$folder = $this->getFolderInfo($path);
 								$folder['flag'] = $flag;
 								$folder['flag'] = $flag;
 								$folders[$file] = $folder;
 								$folders[$file] = $folder;
-								$outputs[$file] = $folders[$file];							
+								$outputs[$file] = $folders[$file];
 						}
 						}
 
 
-						
+
 					}elseif(is_file($path) && isListingDocument($path))
 					}elseif(is_file($path) && isListingDocument($path))
 					{
 					{
 
 
@@ -235,28 +235,28 @@ class manager
 								}
 								}
 								$this->currentFolderInfo['size'] += $tem['size'];
 								$this->currentFolderInfo['size'] += $tem['size'];
 								$this->currentFolderInfo['file']++;
 								$this->currentFolderInfo['file']++;
-									
+
 								//fix count left files for Dokeos
 								//fix count left files for Dokeos
-								$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php							
+								$deleted_by_dokeos_file=' DELETED '; // ' DELETED ' not '_DELETED_' because in $file['name'] _ is replaced with blank see class.manager.php
 								if(ereg($deleted_by_dokeos_file, $tem['name']) || $tem['name'][0]=='.')
 								if(ereg($deleted_by_dokeos_file, $tem['name']) || $tem['name'][0]=='.')
 								{
 								{
 									$this->currentFolderInfo['file']=$this->currentFolderInfo['file']-1;
 									$this->currentFolderInfo['file']=$this->currentFolderInfo['file']-1;
 								}
 								}
 								///end fix for Dokeos
 								///end fix for Dokeos
-								
-								$tem['path'] = backslashToSlash($path);		
+
+								$tem['path'] = backslashToSlash($path);
 								$tem['type'] = "file";
 								$tem['type'] = "file";
 								$tem['flag'] = $flag;
 								$tem['flag'] = $flag;
 								$files[$file] = $tem;
 								$files[$file] = $tem;
 								$outputs[$file] = $tem;
 								$outputs[$file] = $tem;
 								$tem = array();
 								$tem = array();
 								$obj->close();
 								$obj->close();
-								
-							}							
+
+							}
 
 
-				
+
 					}
 					}
-					
+
 				}
 				}
 			}
 			}
 			if($this->forceFolderOnTop)
 			if($this->forceFolderOnTop)
@@ -272,11 +272,11 @@ class manager
 				{
 				{
 					$outputs[] = $v;
 					$outputs[] = $v;
 				}
 				}
-			}else 
+			}else
 			{
 			{
 				uksort($outputs, "strnatcasecmp");
 				uksort($outputs, "strnatcasecmp");
 			}
 			}
-			
+
 			@closedir($dirHandler);
 			@closedir($dirHandler);
 		}else
 		}else
 		{
 		{
@@ -297,12 +297,12 @@ class manager
 		if(is_null($path))
 		if(is_null($path))
 		{
 		{
 			return $this->currentFolderInfo;
 			return $this->currentFolderInfo;
-		}else 
+		}else
 		{
 		{
 			$obj = new manager($path, false);
 			$obj = new manager($path, false);
 			$obj->setSessionAction($this->sessionAction);
 			$obj->setSessionAction($this->sessionAction);
 			$obj->getFileList();
 			$obj->getFileList();
-			return $obj->getFolderInfo();			
+			return $obj->getFolderInfo();
 		}
 		}
 
 
 	}
 	}
@@ -313,12 +313,12 @@ class manager
 		 * @param string file name
 		 * @param string file name
 		 * @return array
 		 * @return array
 		 */
 		 */
-		function getFileType($fileName, $checkIfDir = false) 
+		function getFileType($fileName, $checkIfDir = false)
 		{
 		{
-			
+
 			$ext = strtolower($this->_getExtension($fileName, $checkIfDir));
 			$ext = strtolower($this->_getExtension($fileName, $checkIfDir));
-			
-			foreach ($this->fileTypes as $fileType) 
+
+			foreach ($this->fileTypes as $fileType)
 			{
 			{
 				if(in_array($ext, $fileType[0]))
 				if(in_array($ext, $fileType[0]))
 				{
 				{
@@ -333,21 +333,21 @@ class manager
 					{
 					{
 
 
 						return array("cssClass" => ($checkIfDir && $this->isDirEmpty($fileName)?'folderEmpty':"folder") , "fileType" => "Folder", "preview" => 0, 'test'=>1);
 						return array("cssClass" => ($checkIfDir && $this->isDirEmpty($fileName)?'folderEmpty':"folder") , "fileType" => "Folder", "preview" => 0, 'test'=>1);
-					}else 
+					}else
 					{
 					{
 						return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>2);
 						return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>2);
 					}
 					}
-				}else 
+				}else
 				{
 				{
 					return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>3, 'ext'=>$ext , 'filename'=>$fileName);
 					return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>3, 'ext'=>$ext , 'filename'=>$fileName);
 				}
 				}
-				
+
 			}else
 			}else
 			{//this is unknown file
 			{//this is unknown file
 				return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>4);
 				return array("cssClass" => "fileUnknown", "fileType" => SEARCH_TYPE_UNKNOWN, "preview" => 0, 'test'=>4);
 			}
 			}
-		
-		
+
+
 		}
 		}
 
 
 	/**
 	/**
@@ -379,23 +379,23 @@ class manager
 
 
     /**
     /**
 	 * Get the extension of a file name
 	 * Get the extension of a file name
-	 * 
+	 *
 	 * @param  string $file
 	 * @param  string $file
  	 * @return string
  	 * @return string
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
 	 */
     function _getExtension($file, $checkIfDir = false)
     function _getExtension($file, $checkIfDir = false)
     {
     {
     	if($checkIfDir && file_exists($file) && is_dir($file))
     	if($checkIfDir && file_exists($file) && is_dir($file))
     	{
     	{
     		return '';
     		return '';
-    	}else 
+    	}else
     	{
     	{
     		return @substr(@strrchr($file, "."), 1);
     		return @substr(@strrchr($file, "."), 1);
     	}
     	}
-    	
-    	
-    }	
+
+
+    }
 
 
 	function isDirEmpty($path)
 	function isDirEmpty($path)
 	{
 	{
@@ -408,14 +408,14 @@ class manager
 				{
 				{
 					@closedir($dirHandler);
 					@closedir($dirHandler);
 					return false;
 					return false;
-					
+
 				}
 				}
 			}
 			}
-			
+
 			@closedir($dirHandler);
 			@closedir($dirHandler);
-				
-		}	
-		return true;	
+
+		}
+		return true;
 	}
 	}
 }
 }
 ?>
 ?>

+ 3 - 3
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.pagination.php

@@ -527,7 +527,7 @@ class pagination
 		switch($type)
 		switch($type)
 		{
 		{
 			case "2":
 			case "2":
-				$output .= "<span class=\"pagination_summany\">" . $this->getFirstItem() . " to " . $this->getLastItem() . " of " . $this->getTotal() . " results.</span> ";	
+				$output .= "<span class=\"pagination_summany\">" . $this->getFirstItem() . " to " . $this->getLastItem() . " of " . $this->getTotal() . " results.</span> ";
 			if($previousUrl = $this->getPreviousUrl())
 			if($previousUrl = $this->getPreviousUrl())
 			{
 			{
 				$output .= " " . $previousUrl;
 				$output .= " " . $previousUrl;
@@ -536,7 +536,7 @@ class pagination
 			if($nextUrl = $this->getNextUrl())
 			if($nextUrl = $this->getNextUrl())
 			{
 			{
 				$output .= " " . $nextUrl;
 				$output .= " " . $nextUrl;
-			}							
+			}
 				break;
 				break;
 			case 1:
 			case 1:
 				//get full summary pagination
 				//get full summary pagination
@@ -569,7 +569,7 @@ class pagination
 			{
 			{
 				$itemPerPage .= "<option value=\"" . $v . "\" " . ($v==$this->itemsPerPage?'selected="selected"':'') . ">" . $v . "</option>\n";
 				$itemPerPage .= "<option value=\"" . $v . "\" " . ($v==$this->itemsPerPage?'selected="selected"':'') . ">" . $v . "</option>\n";
 			}
 			}
-			$itemPerPage .= "</select>\n"; 
+			$itemPerPage .= "</select>\n";
 			$output .= "<span class=\"pagination_items_per_page\">";
 			$output .= "<span class=\"pagination_items_per_page\">";
 			$output .= sprintf(PAGINATION_ITEMS_PER_PAGE, $itemPerPage);
 			$output .= sprintf(PAGINATION_ITEMS_PER_PAGE, $itemPerPage);
 			$output .= "</span>";
 			$output .= "</span>";

+ 28 - 28
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.search.php

@@ -14,7 +14,7 @@
 			'size_from'=>'',
 			'size_from'=>'',
 			'size_to'=>'',
 			'size_to'=>'',
 			'recursive'=>'0',
 			'recursive'=>'0',
-			
+
 		);
 		);
 		var $sessionAction = null;
 		var $sessionAction = null;
 		/**
 		/**
@@ -28,17 +28,17 @@
 			$this->sessionAction = new SessionAction();
 			$this->sessionAction = new SessionAction();
 			$objRootFolder = new file($this->rootFolder);
 			$objRootFolder = new file($this->rootFolder);
 			$tem = $objRootFolder->getFileInfo();
 			$tem = $objRootFolder->getFileInfo();
-			$obj = new manager($this->rootFolder, false);			
+			$obj = new manager($this->rootFolder, false);
 			$obj->setSessionAction($this->sessionAction);
 			$obj->setSessionAction($this->sessionAction);
-			$selectedDocuments = $this->sessionAction->get();					
+			$selectedDocuments = $this->sessionAction->get();
 			$fileType = $obj->getFolderInfo($this->rootFolder);
 			$fileType = $obj->getFolderInfo($this->rootFolder);
-			
+
 			foreach($fileType as $k=>$v)
 			foreach($fileType as $k=>$v)
 			{
 			{
 				$tem[$k] = $v;
 				$tem[$k] = $v;
 			}
 			}
-			
-			$tem['path'] = backslashToSlash($this->rootFolder);		
+
+			$tem['path'] = backslashToSlash($this->rootFolder);
 			$tem['type'] = (is_dir($this->rootFolder)?'folder':'file');
 			$tem['type'] = (is_dir($this->rootFolder)?'folder':'file');
 			$tem['size'] = (is_dir($this->rootFolder)?'':transformFileSize(@filesize($this->rootFolder)));
 			$tem['size'] = (is_dir($this->rootFolder)?'':transformFileSize(@filesize($this->rootFolder)));
 			//$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 			//$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
@@ -50,11 +50,11 @@
 			$tem['subdir'] = 0;
 			$tem['subdir'] = 0;
 			$manager = null;
 			$manager = null;
 			$this->rootFolderInfo = $tem;
 			$this->rootFolderInfo = $tem;
-			$tem = null;			
+			$tem = null;
 		}
 		}
-		
-		
-		
+
+
+
 		/**
 		/**
 		 * constructor
 		 * constructor
 		 *
 		 *
@@ -76,7 +76,7 @@
 			$this->searchkeywords[$key] = $value;
 			$this->searchkeywords[$key] = $value;
 		}
 		}
 		/**
 		/**
-		 * change the search keywords 
+		 * change the search keywords
 		 *
 		 *
 		 * @param array $keywords
 		 * @param array $keywords
 		 */
 		 */
@@ -96,9 +96,9 @@
 		 */
 		 */
 		function doSearch($baseFolderPath = null)
 		function doSearch($baseFolderPath = null)
 		{
 		{
-			
+
 			$baseFolderPath = addTrailingSlash(backslashToSlash((is_null($baseFolderPath)?$this->rootFolder:$baseFolderPath)));
 			$baseFolderPath = addTrailingSlash(backslashToSlash((is_null($baseFolderPath)?$this->rootFolder:$baseFolderPath)));
-			
+
 			$dirHandler = @opendir($baseFolderPath);
 			$dirHandler = @opendir($baseFolderPath);
 			if($dirHandler)
 			if($dirHandler)
 			{
 			{
@@ -112,7 +112,7 @@
 							$isValid = true;
 							$isValid = true;
 
 
 							$fileTime = @filemtime($path);
 							$fileTime = @filemtime($path);
-							$fileSize = @filesize($path);	
+							$fileSize = @filesize($path);
 							if($this->searchkeywords['name'] !== ''  && @eregi($this->searchkeywords['name'], $file) === false)
 							if($this->searchkeywords['name'] !== ''  && @eregi($this->searchkeywords['name'], $file) === false)
 							{
 							{
 								$isValid = false;
 								$isValid = false;
@@ -124,7 +124,7 @@
 							if($this->searchkeywords['mtime_to'] != '' && $fileTime > @strtotime($this->searchkeywords['mtime_to']))
 							if($this->searchkeywords['mtime_to'] != '' && $fileTime > @strtotime($this->searchkeywords['mtime_to']))
 							{
 							{
 								$isValid = false;
 								$isValid = false;
-							}							
+							}
 							if($this->searchkeywords['size_from'] != '' && $fileSize < @strtotime($this->searchkeywords['size_from']))
 							if($this->searchkeywords['size_from'] != '' && $fileSize < @strtotime($this->searchkeywords['size_from']))
 							{
 							{
 								$isValid = false;
 								$isValid = false;
@@ -132,50 +132,50 @@
 							if($this->searchkeywords['size_to'] != '' && $fileSize > @strtotime($this->searchkeywords['size_to']))
 							if($this->searchkeywords['size_to'] != '' && $fileSize > @strtotime($this->searchkeywords['size_to']))
 							{
 							{
 								$isValid = false;
 								$isValid = false;
-							}			
+							}
 							if($isValid && isListingDocument($path))
 							if($isValid && isListingDocument($path))
 							{
 							{
 								$finalPath = $path;
 								$finalPath = $path;
 								$objFile = new file($finalPath);
 								$objFile = new file($finalPath);
 								$tem = $objFile->getFileInfo();
 								$tem = $objFile->getFileInfo();
-								$obj = new manager($finalPath, false);			
+								$obj = new manager($finalPath, false);
 								$obj->setSessionAction($this->sessionAction);
 								$obj->setSessionAction($this->sessionAction);
-								$selectedDocuments = $this->sessionAction->get();													
+								$selectedDocuments = $this->sessionAction->get();
 								$fileType = $obj->getFileType($finalPath);
 								$fileType = $obj->getFileType($finalPath);
-								
+
 								foreach($fileType as $k=>$v)
 								foreach($fileType as $k=>$v)
 								{
 								{
 									$tem[$k] = $v;
 									$tem[$k] = $v;
 								}
 								}
-								
-								$tem['path'] = backslashToSlash($finalPath);		
+
+								$tem['path'] = backslashToSlash($finalPath);
 								$tem['type'] = (is_dir($finalPath)?'folder':'file');
 								$tem['type'] = (is_dir($finalPath)?'folder':'file');
 								$tem['size'] = transformFileSize($tem['size']);
 								$tem['size'] = transformFileSize($tem['size']);
-								//$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']); // Juan Carlos Raña. Comment to get a correct date when make a search
-								//$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']); // Juan Carlos Raña. Comment to get a correct date when make a search
+								//$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']); // Juan Carlos Ra�a. Comment to get a correct date when make a search
+								//$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']); // Juan Carlos Ra�a. Comment to get a correct date when make a search
 								$tem['flag'] = (array_search($tem['path'], $selectedDocuments) !== false?($this->sessionAction->getAction() == "copy"?'copyFlag':'cutFlag'):'noFlag');
 								$tem['flag'] = (array_search($tem['path'], $selectedDocuments) !== false?($this->sessionAction->getAction() == "copy"?'copyFlag':'cutFlag'):'noFlag');
 								$tem['url'] = getFileUrl($tem['path']);
 								$tem['url'] = getFileUrl($tem['path']);
 								$this->rootFolderInfo['file']++;
 								$this->rootFolderInfo['file']++;
 								$manager = null;
 								$manager = null;
 								$this->files[] = $tem;
 								$this->files[] = $tem;
-								$tem = null;								
+								$tem = null;
 							}
 							}
 						}elseif(is_dir($path) && $this->searchkeywords['recursive'])
 						}elseif(is_dir($path) && $this->searchkeywords['recursive'])
 						{
 						{
 							$this->doSearch($path); //// For Dokeos this line replaces the lower line to run the search recursively from the root directory
 							$this->doSearch($path); //// For Dokeos this line replaces the lower line to run the search recursively from the root directory
-							//$this->Search($baseFolderPath); //comment by Juan Carlos Raña							
+							//$this->Search($baseFolderPath); //comment by Juan Carlos Ra�a
 						}
 						}
 					}
 					}
 				}
 				}
 			}
 			}
-			 
+
 		}
 		}
-		
+
 		function getFoundFiles()
 		function getFoundFiles()
 		{
 		{
 			return $this->files;
 			return $this->files;
 		}
 		}
-		
+
 		function getRootFolderInfo()
 		function getRootFolderInfo()
 		{
 		{
 
 

+ 38 - 38
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.session.php

@@ -9,7 +9,7 @@
 	 */
 	 */
 
 
 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");
 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");
-class Session 
+class Session
 {
 {
     var $lifeTime;
     var $lifeTime;
     var $fp = null;
     var $fp = null;
@@ -24,8 +24,8 @@ class Session
 		var $gcLogFileName = 'gc_log.ajax.php';
 		var $gcLogFileName = 'gc_log.ajax.php';
 		var $gcLogFile = null;
 		var $gcLogFile = null;
 		var $debug = true; //turn it on when you want to see gc log
 		var $debug = true; //turn it on when you want to see gc log
-		
-		
+
+
     /**
     /**
      * constructor
      * constructor
      *
      *
@@ -44,37 +44,37 @@ class Session
     		if(!$dir->isReadable(CONFIG_SYS_DIR_SESSION_PATH))
     		if(!$dir->isReadable(CONFIG_SYS_DIR_SESSION_PATH))
     		{
     		{
     			die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not readable.");
     			die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not readable.");
-    		}    		
+    		}
     		if(!$dir->isWritable(CONFIG_SYS_DIR_SESSION_PATH))
     		if(!$dir->isWritable(CONFIG_SYS_DIR_SESSION_PATH))
     		{
     		{
     			die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not writable.");
     			die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not writable.");
     		}
     		}
     	$this->dir = backslashToSlash(addTrailingSlash(CONFIG_SYS_DIR_SESSION_PATH));
     	$this->dir = backslashToSlash(addTrailingSlash(CONFIG_SYS_DIR_SESSION_PATH));
-        $this->lifeTime = get_cfg_var("session.gc_maxlifetime");  
-        $this->gcCounterFile = $this->dir . $this->gcCounterFileName; 
+        $this->lifeTime = get_cfg_var("session.gc_maxlifetime");
+        $this->gcCounterFile = $this->dir . $this->gcCounterFileName;
         $this->gcLogFile = $this->dir  . $this->gcLogFileName;
         $this->gcLogFile = $this->dir  . $this->gcLogFileName;
        	$this->sessionDir = backslashToSlash($this->dir.session_id().DIRECTORY_SEPARATOR);
        	$this->sessionDir = backslashToSlash($this->dir.session_id().DIRECTORY_SEPARATOR);
-        $this->init();    	
+        $this->init();
     }
     }
      /**
      /**
      * constructor
      * constructor
      *
      *
-     */   
-    function Session() 
+     */
+    function Session()
     {
     {
-    		$this->__construct();        
+    		$this->__construct();
     }
     }
     /**
     /**
      * session init
      * session init
      * @return boolean
      * @return boolean
      */
      */
-    function init() 
+    function init()
     {
     {
 
 
-        
-        
+
+
     }
     }
-    
+
     function gc()
     function gc()
     {
     {
      		//init the counter file
      		//init the counter file
@@ -93,17 +93,17 @@ class Session
         		die(SESSION_COUNTER_FILE_WRITE_FAILED);
         		die(SESSION_COUNTER_FILE_WRITE_FAILED);
         	}
         	}
         	@fclose($fp);
         	@fclose($fp);
-        }else 
+        }else
         {
         {
         	die(SESSION_COUNTER_FILE_CREATE_FAILED);
         	die(SESSION_COUNTER_FILE_CREATE_FAILED);
-        }   	
+        }
     }
     }
 
 
     /**
     /**
      * garbage collection function
      * garbage collection function
      *
      *
      */
      */
-    function _gc() 
+    function _gc()
     {
     {
 			//remove expired file from session folder
 			//remove expired file from session folder
 	 		$dirHandler = @opendir($this->dir);
 	 		$dirHandler = @opendir($this->dir);
@@ -118,32 +118,32 @@ class Session
 					//if($file != '.' && $file != '..' && $file != $this->gcCounterFileName && $file != $this->gcLogFileName && $file != session_id() )
 					//if($file != '.' && $file != '..' && $file != $this->gcCounterFileName && $file != $this->gcLogFileName && $file != session_id() )
 					if($file != '.' && $file != '..' && $file != $this->gcCounterFileName && $file != $this->gcLogFileName && $file != session_id()
 					if($file != '.' && $file != '..' && $file != $this->gcCounterFileName && $file != $this->gcLogFileName && $file != session_id()
 						&& $file != 'index.html' && $file != '.svn')
 						&& $file != 'index.html' && $file != '.svn')
-					{						
+					{
 						$path=$this->dir.$file;
 						$path=$this->dir.$file;
 						$output .= $path ;
 						$output .= $path ;
 						//check if this is a expired session file
 						//check if this is a expired session file
 						if(filemtime($path) + $this->lifeTime < time())
 						if(filemtime($path) + $this->lifeTime < time())
-						{							
+						{
 							if($fo->delete($path))
 							if($fo->delete($path))
 							{
 							{
 								$output .= ' Deleted at ' . date('d/M/Y H:i:s');
 								$output .= ' Deleted at ' . date('d/M/Y H:i:s');
-							}else 
+							}else
 							{
 							{
 								$output .= " Failed at " . date('d/M/Y H:i:s');
 								$output .= " Failed at " . date('d/M/Y H:i:s');
-							}																			
+							}
 						}
 						}
 						$output .= "\n";
 						$output .= "\n";
-											
+
 					}
 					}
 				}
 				}
 				if($this->debug)
 				if($this->debug)
 				{
 				{
 					$this->_log($output);
 					$this->_log($output);
 				}
 				}
-				
+
 				@closedir($dirHandler);
 				@closedir($dirHandler);
 
 
-			} 
+			}
 			if(CONFIG_SYS_DEMO_ENABLE)
 			if(CONFIG_SYS_DEMO_ENABLE)
 			{
 			{
 				//remove expired files from uploaded folder
 				//remove expired files from uploaded folder
@@ -156,34 +156,34 @@ class Session
 					while(false !== ($file = readdir($dirHandler)))
 					while(false !== ($file = readdir($dirHandler)))
 					{
 					{
 						if($file != '.' && $file != '..')
 						if($file != '.' && $file != '..')
-						{						
+						{
 							$path=CONFIG_SYS_ROOT_PATH.$file;
 							$path=CONFIG_SYS_ROOT_PATH.$file;
 							$output .= $path ;
 							$output .= $path ;
 							//check if this is a expired session file
 							//check if this is a expired session file
 							if(filemtime($path) + $this->lifeTime < time())
 							if(filemtime($path) + $this->lifeTime < time())
-							{							
+							{
 								if($fo->delete($path))
 								if($fo->delete($path))
 								{
 								{
 									$output .= ' Deleted at ' . date('d/M/Y H:i:s');
 									$output .= ' Deleted at ' . date('d/M/Y H:i:s');
-								}else 
+								}else
 								{
 								{
 									$output .= " Failed at " . date('d/M/Y H:i:s');
 									$output .= " Failed at " . date('d/M/Y H:i:s');
-								}																			
+								}
 							}
 							}
 							$output .= "\n";
 							$output .= "\n";
-												
+
 						}
 						}
 					}
 					}
 					if($this->debug)
 					if($this->debug)
 					{
 					{
 						$this->_log($output);
 						$this->_log($output);
 					}
 					}
-					
+
 					@closedir($dirHandler);
 					@closedir($dirHandler);
-	
-				}					
+
+				}
 			}
 			}
-		    
+
     }
     }
     /**
     /**
      * log action taken by the gc
      * log action taken by the gc
@@ -201,7 +201,7 @@ class Session
     		@fclose($fp);
     		@fclose($fp);
     	}
     	}
     }
     }
-    
+
     /**
     /**
      * get the current session directory
      * get the current session directory
      *
      *
@@ -216,17 +216,17 @@ class Session
     		{
     		{
     			return '';
     			return '';
     		}
     		}
-    	}else 
+    	}else
     	{
     	{
 	     	if(!@is_dir($this->sessionDir))
 	     	if(!@is_dir($this->sessionDir))
 	    	{
 	    	{
 	    		return '';
 	    		return '';
-	    	}   		
+	    	}
     	}
     	}
     	return $this->sessionDir;
     	return $this->sessionDir;
     }
     }
-    
+
 
 
-    
+
 }
 }
 ?>
 ?>

+ 4 - 4
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.sessionaction.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 /**
 /**
-	 *Session Action Class 
+	 *Session Action Class
 	 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
 	 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
 	 * @link www.phpletter.com
 	 * @link www.phpletter.com
 	 * @since 22/May/2007
 	 * @since 22/May/2007
@@ -26,7 +26,7 @@
 				$_SESSION[$this->fromFolderIndex] = '';
 				$_SESSION[$this->fromFolderIndex] = '';
 			}
 			}
 		}
 		}
-		
+
 		function SessionAction()
 		function SessionAction()
 		{
 		{
 			$this->__construct();
 			$this->__construct();
@@ -57,10 +57,10 @@
 		{
 		{
 			return (isset($_SESSION[$this->selectedDocIndex])?$_SESSION[$this->selectedDocIndex]:array());
 			return (isset($_SESSION[$this->selectedDocIndex])?$_SESSION[$this->selectedDocIndex]:array());
 		}
 		}
-		
+
 		function setAction($action)
 		function setAction($action)
 		{
 		{
-			$_SESSION[$this->actionIndex] = $action;			
+			$_SESSION[$this->actionIndex] = $action;
 		}
 		}
 		/**
 		/**
 		 * get the action
 		 * get the action

+ 32 - 32
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/class.upload.php

@@ -39,16 +39,16 @@ class Upload
 		8=>'File upload stopped by extension',
 		8=>'File upload stopped by extension',
 		999=>'No error code avaiable',
 		999=>'No error code avaiable',
 	);
 	);
-	
+
 
 
 	function Upload()
 	function Upload()
 	{
 	{
 		//doing nothing
 		//doing nothing
 	}
 	}
-	
+
 	function isFileUploaded($indexInPost="file")
 	function isFileUploaded($indexInPost="file")
 	{
 	{
-		
+
 		$this->errCode = isset($_FILES[$indexInPost]['error'])?$_FILES[$indexInPost]['error']:999;
 		$this->errCode = isset($_FILES[$indexInPost]['error'])?$_FILES[$indexInPost]['error']:999;
 		if((isset($_FILES[$indexInPost]['error']) && $_FILES[$indexInPost] == 0) ||
 		if((isset($_FILES[$indexInPost]['error']) && $_FILES[$indexInPost] == 0) ||
 		(!empty($_FILES[$indexInPost]['tmp_name']) && $_FILES[$indexInPost]['tmp_name'] != 'none')
 		(!empty($_FILES[$indexInPost]['tmp_name']) && $_FILES[$indexInPost]['tmp_name'] != 'none')
@@ -58,16 +58,16 @@ class Upload
 			$this->fileSize = @filesize($this->_value['tmp_name']);
 			$this->fileSize = @filesize($this->_value['tmp_name']);
 			$this->originalFileName = $this->_value['name'];
 			$this->originalFileName = $this->_value['name'];
 			$this->fileType = $this->_value['type'];
 			$this->fileType = $this->_value['type'];
-			
+
 			return true;
 			return true;
-		}else 
+		}else
 		{
 		{
-			
+
 			array_push($this->errors, 'Unable to upload file');
 			array_push($this->errors, 'Unable to upload file');
 			return false;
 			return false;
-		}		
+		}
 	}
 	}
-	
+
 	function getErrorCodeMsg()
 	function getErrorCodeMsg()
 	{
 	{
 		return (isset($this->errorCodes[$this->errCode])?$this->errorCodes[$this->errCode]:"");
 		return (isset($this->errorCodes[$this->errCode])?$this->errorCodes[$this->errCode]:"");
@@ -102,10 +102,10 @@ class Upload
 				}
 				}
 			}
 			}
 		}
 		}
-		
-	
+
+
 
 
-		
+
 		if(sizeof($validFileExt))
 		if(sizeof($validFileExt))
 		{
 		{
 			if(array_search(strtolower($this->getFileExt()), $validFileExt) !== false)
 			if(array_search(strtolower($this->getFileExt()), $validFileExt) !== false)
@@ -117,10 +117,10 @@ class Upload
 			return true;
 			return true;
 		}
 		}
 
 
-		
+
 		$this->deleteUploadedFile();
 		$this->deleteUploadedFile();
 		return false;
 		return false;
-		
+
 	}
 	}
 	/**
 	/**
 	 * check if the uploaded file size is too big
 	 * check if the uploaded file size is too big
@@ -133,7 +133,7 @@ class Upload
 		{
 		{
 			$this->deleteUploadedFile();
 			$this->deleteUploadedFile();
 			return true;
 			return true;
-		}else 
+		}else
 		{
 		{
 			return false;
 			return false;
 		}
 		}
@@ -153,7 +153,7 @@ class Upload
 				$tem[$k]= strtolower(trim($v));
 				$tem[$k]= strtolower(trim($v));
 			}
 			}
 		}
 		}
-		
+
 		$this->invalidFileExt = $tem;
 		$this->invalidFileExt = $tem;
 	}
 	}
 	/**
 	/**
@@ -169,7 +169,7 @@ class Upload
 	 * get a file extension
 	 * get a file extension
 	 *
 	 *
 	 * @param string $fileName the path to a file or just the file name
 	 * @param string $fileName the path to a file or just the file name
-	 */	
+	 */
 	function getFileExt()
 	function getFileExt()
 	{
 	{
 		//return strtolower(substr(strrchr($this->fileName, "."), 1));
 		//return strtolower(substr(strrchr($this->fileName, "."), 1));
@@ -203,7 +203,7 @@ class Upload
 		{
 		{
 			$this->fileBaseName = $fileBaseName;
 			$this->fileBaseName = $fileBaseName;
 		}
 		}
-		$this->fileBaseName=str_replace(' ','_',$this->fileBaseName);// Juan Carlos Raña Because fix long names. See: ajaxfilemanager/inc/class.manager.php
+		$this->fileBaseName=str_replace(' ','_',$this->fileBaseName);// Juan Carlos Ra�a Because fix long names. See: ajaxfilemanager/inc/class.manager.php
 		$fileName = $this->fileBaseName . $this->fileExtension;
 		$fileName = $this->fileBaseName . $this->fileExtension;
 		$filePath = $dest . $fileName;
 		$filePath = $dest . $fileName;
 
 
@@ -236,7 +236,7 @@ class Upload
 		 *
 		 *
 		 * @param mixed $invalidImageExts invalid image extension
 		 * @param mixed $invalidImageExts invalid image extension
 		 * @param bool $delete force to delete the uploaded file
 		 * @param bool $delete force to delete the uploaded file
-		 */	
+		 */
 	function isImage($invalidImageExts = array(), $delete = true)
 	function isImage($invalidImageExts = array(), $delete = true)
 	{
 	{
 		if(!is_array($invalidImageExts) && !empty($invalidImageExts))
 		if(!is_array($invalidImageExts) && !empty($invalidImageExts))
@@ -286,15 +286,15 @@ class Upload
      *
      *
      * @access public
      * @access public
      *
      *
-     * @param mixed $new_x 
-     * @param mixed $new_y 
+     * @param mixed $new_x
+     * @param mixed $new_y
      * @param string $thumb_suffix
      * @param string $thumb_suffix
      *
      *
      * @return mixed none or PEAR_error
      * @return mixed none or PEAR_error
      */
      */
 	function resize($filePath, $thumb_suffix="", $new_x = 0, $new_y = 0)
 	function resize($filePath, $thumb_suffix="", $new_x = 0, $new_y = 0)
 	{
 	{
-		
+
 		if(empty($filePath))
 		if(empty($filePath))
 		{
 		{
 			$filePath = $this->dirPath . $this->fileBaseName . $thumb_suffix  . $this->fileExtension;
 			$filePath = $this->dirPath . $this->fileBaseName . $thumb_suffix  . $this->fileExtension;
@@ -311,7 +311,7 @@ class Upload
 	/**
 	/**
      * resize the image and return the thumbnail image  details array("width"=>, "height"=>, "name")
      * resize the image and return the thumbnail image  details array("width"=>, "height"=>, "name")
      *
      *
-     * @param string $fileName 
+     * @param string $fileName
      * @param int $new_x the thumbnail width
      * @param int $new_x the thumbnail width
      * @param int $new_y the thumbnail height
      * @param int $new_y the thumbnail height
      * @return unknown
      * @return unknown
@@ -421,9 +421,9 @@ class Upload
 		}
 		}
 	}
 	}
 	/**
 	/**
-	 * caculate the thumbnail details from the original image file 
+	 * caculate the thumbnail details from the original image file
 	 *
 	 *
-	 * @param string $originalImageName  
+	 * @param string $originalImageName
 	 * @param int $originaleImageWidth
 	 * @param int $originaleImageWidth
 	 * @param int $originalImageHeight
 	 * @param int $originalImageHeight
 	 * @param string $thumbnailSuffix
 	 * @param string $thumbnailSuffix
@@ -472,7 +472,7 @@ class Upload
 		return $outputs;
 		return $outputs;
 
 
 	}
 	}
-	
+
 
 
 	/**
 	/**
      * get the uploaded file
      * get the uploaded file
@@ -489,7 +489,7 @@ class Upload
 	{
 	{
 		@unlink($this->_value['tmp_name']);
 		@unlink($this->_value['tmp_name']);
 	}
 	}
-	
+
 	function displayError()
 	function displayError()
 	{
 	{
 		if(sizeof($this->errors))
 		if(sizeof($this->errors))
@@ -516,12 +516,12 @@ class Upload
 	{
 	{
 		return $this->dirPath;
 		return $this->dirPath;
 	}
 	}
-	
+
 	function getFileBaseName()
 	function getFileBaseName()
 	{
 	{
 		return $this->fileBaseName;
 		return $this->fileBaseName;
 	}
 	}
-	
+
 	function getFileName()
 	function getFileName()
 	{
 	{
 		return $this->fileName;
 		return $this->fileName;
@@ -565,7 +565,7 @@ class Upload
 		//ensure the directory path ending with /
 		//ensure the directory path ending with /
 		if ($dirPath != ''  && substr($dirPath, -1) != '/') {
 		if ($dirPath != ''  && substr($dirPath, -1) != '/') {
 			$dirPath .= '/';
 			$dirPath .= '/';
-		}			
+		}
 		if(!empty($originalImageName) && file_exists($dirPath . $originalImageName) && is_file($dirPath . $originalImageName))
 		if(!empty($originalImageName) && file_exists($dirPath . $originalImageName) && is_file($dirPath . $originalImageName))
 		{
 		{
 			@unlink($dirPath . $originalImageName);
 			@unlink($dirPath . $originalImageName);
@@ -580,10 +580,10 @@ class Upload
 					$fileExtension = substr($originalImageName, $dotIndex);
 					$fileExtension = substr($originalImageName, $dotIndex);
 					$fileBaseName = substr($originalImageName, 0, $dotIndex);
 					$fileBaseName = substr($originalImageName, 0, $dotIndex);
 				}
 				}
-				@unlink($dirPath . $fileBaseName . $v . $fileExtension);			
-			}			
+				@unlink($dirPath . $fileBaseName . $v . $fileExtension);
+			}
 		}
 		}
-	
+
 
 
 	}
 	}
 }
 }

+ 54 - 54
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php

@@ -7,38 +7,38 @@
 	 *
 	 *
 	 *
 	 *
 	 * Modify system config setting for Dokeos
 	 * Modify system config setting for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @since 31/December/2008
 	 * @since 31/December/2008
 	 */
 	 */
-	
+
 
 
-//error_reporting(E_ALL);	
-//error_reporting(E_ALL ^ E_NOTICE);	
-	
-	
+//error_reporting(E_ALL);
+//error_reporting(E_ALL ^ E_NOTICE);
+
+
 
 
 	//Access Control Setting
 	//Access Control Setting
 	/**
 	/**
 	 * turn off => false
 	 * turn off => false
 	 * by session => true
 	 * by session => true
 	 */
 	 */
-	define('CONFIG_ACCESS_CONTROL_MODE', false); 	
+	define('CONFIG_ACCESS_CONTROL_MODE', false);
 	define("CONFIG_LOGIN_USERNAME", 'ajax');
 	define("CONFIG_LOGIN_USERNAME", 'ajax');
 	define('CONFIG_LOGIN_PASSWORD', '123456');
 	define('CONFIG_LOGIN_PASSWORD', '123456');
 	define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page
 	define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page
-	
+
 	//SYSTEM MODE CONFIG
 	//SYSTEM MODE CONFIG
 		/**
 		/**
 		 * turn it on when you have this system for demo purpose
 		 * turn it on when you have this system for demo purpose
-		*  that means changes made to each image is not physically applied to it 
+		*  that means changes made to each image is not physically applied to it
 		*  and all uploaded files/created folders will be removed automatically
 		*  and all uploaded files/created folders will be removed automatically
 		*/
 		*/
-	define('CONFIG_SYS_DEMO_ENABLE', false); 
+	define('CONFIG_SYS_DEMO_ENABLE', false);
 	define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only
 	define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only
 	define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false
 	define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false
-	
+
 	//User Permissions
 	//User Permissions
-	//Hack by Juan Carlos Raña Trabado
+	//Hack by Juan Carlos Ra�a Trabado
 	if(empty($_course['path']))
 	if(empty($_course['path']))
 	{
 	{
 		define('CONFIG_OPTIONS_DELETE', true);
 		define('CONFIG_OPTIONS_DELETE', true);
@@ -47,12 +47,12 @@
 		define('CONFIG_OPTIONS_NEWFOLDER', true);
 		define('CONFIG_OPTIONS_NEWFOLDER', true);
 		define('CONFIG_OPTIONS_RENAME', true);
 		define('CONFIG_OPTIONS_RENAME', true);
 		define('CONFIG_OPTIONS_UPLOAD', true); //
 		define('CONFIG_OPTIONS_UPLOAD', true); //
-		define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor	
+		define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
 	}
 	}
 	else
 	else
 	{
 	{
 		if(api_is_allowed_to_edit())
 		if(api_is_allowed_to_edit())
-		{	
+		{
 		//api_is_allowed_to_edit() from Dokeos
 		//api_is_allowed_to_edit() from Dokeos
 			define('CONFIG_OPTIONS_DELETE', true);
 			define('CONFIG_OPTIONS_DELETE', true);
 			define('CONFIG_OPTIONS_CUT', false);
 			define('CONFIG_OPTIONS_CUT', false);
@@ -61,10 +61,10 @@
 			define('CONFIG_OPTIONS_RENAME', false);
 			define('CONFIG_OPTIONS_RENAME', false);
 			define('CONFIG_OPTIONS_UPLOAD', true); //
 			define('CONFIG_OPTIONS_UPLOAD', true); //
 			define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
 			define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
-	
+
 		}
 		}
 		else
 		else
-		{		
+		{
 			define('CONFIG_OPTIONS_DELETE', true);
 			define('CONFIG_OPTIONS_DELETE', true);
 			define('CONFIG_OPTIONS_CUT', false);
 			define('CONFIG_OPTIONS_CUT', false);
 			define('CONFIG_OPTIONS_COPY', false);
 			define('CONFIG_OPTIONS_COPY', false);
@@ -74,8 +74,8 @@
 			define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
 			define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
 		}
 		}
 	}
 	}
-		
-		
+
+
 	//FILESYSTEM CONFIG
 	//FILESYSTEM CONFIG
 		/*
 		/*
 		* CONFIG_SYS_DEFAULT_PATH is the default folder where the files would be uploaded to
 		* CONFIG_SYS_DEFAULT_PATH is the default folder where the files would be uploaded to
@@ -84,53 +84,53 @@
 		*/
 		*/
 			//define('CONFIG_SYS_DEFAULT_PATH', '../uploaded/'); //accept relative path only
 			//define('CONFIG_SYS_DEFAULT_PATH', '../uploaded/'); //accept relative path only
 			//define('CONFIG_SYS_ROOT_PATH', '../uploaded/');	//accept relative path only
 			//define('CONFIG_SYS_ROOT_PATH', '../uploaded/');	//accept relative path only
-		
+
 	/////////////// Integration for Dokeos
 	/////////////// Integration for Dokeos
-		
+
 	if(!empty($_course['path']))
 	if(!empty($_course['path']))
 	{
 	{
 		if(!empty($group_properties['directory']))
 		if(!empty($group_properties['directory']))
-		{		 
-			$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document'.$group_properties['directory'].'/';		   
+		{
+			$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document'.$group_properties['directory'].'/';
 		}
 		}
 		else
 		else
 		{
 		{
 			if(api_is_allowed_to_edit())
 			if(api_is_allowed_to_edit())
 			{
 			{
-				$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/';			   
+				$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/';
 			}
 			}
 			else
 			else
-			{					
-				$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/shared_folder/sf_user_'.api_get_user_id().'/';					
-			}		   
+			{
+				$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/shared_folder/sf_user_'.api_get_user_id().'/';
+			}
 		}
 		}
 	}
 	}
 	else
 	else
-	{	
+	{
 		if (api_is_platform_admin() && $_SESSION['this_section']=='platform_admin')
 		if (api_is_platform_admin() && $_SESSION['this_section']=='platform_admin')
 		{
 		{
 			//home page portal
 			//home page portal
 			$PathDokeosAjaxFileManager='../../../../../../../home/default_platform_document/';
 			$PathDokeosAjaxFileManager='../../../../../../../home/default_platform_document/';
 		}
 		}
 		else
 		else
-		{		
+		{
 			//my profile
 			//my profile
-			$PathDokeosAjaxFileManager='../../../../../../../main/upload/users/'.api_get_user_id().'/my_files/';	
+			$PathDokeosAjaxFileManager='../../../../../../../main/upload/users/'.api_get_user_id().'/my_files/';
 		}
 		}
 
 
 	}
 	}
-	
+
 	define('CONFIG_SYS_DEFAULT_PATH', $PathDokeosAjaxFileManager);
 	define('CONFIG_SYS_DEFAULT_PATH', $PathDokeosAjaxFileManager);
-	define('CONFIG_SYS_ROOT_PATH', $PathDokeosAjaxFileManager);		
-	
+	define('CONFIG_SYS_ROOT_PATH', $PathDokeosAjaxFileManager);
+
 	////////////// end dokeos
 	////////////// end dokeos
-	
-	define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name	
-	
-	
-	define("CONFIG_SYS_DIR_SESSION_PATH", session_save_path()); // Hack by Juan Carlos Raña 
+
+	define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name
+
+
+	define("CONFIG_SYS_DIR_SESSION_PATH", session_save_path()); // Hack by Juan Carlos Ra�a
 
 
-	
+
 	define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns
 	define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns
 		/**
 		/**
 		 * reg => regulare expression
 		 * reg => regulare expression
@@ -144,12 +144,12 @@
 	define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1
 	define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1
-	
+
 	//UPLOAD OPTIONS CONFIG
 	//UPLOAD OPTIONS CONFIG
 	define('CONFIG_UPLOAD_MAXSIZE', 50000 * 1024 ); //by bytes For Dokeos upgrade from 50 to 50000 (50MB)
 	define('CONFIG_UPLOAD_MAXSIZE', 50000 * 1024 ); //by bytes For Dokeos upgrade from 50 to 50000 (50MB)
-	
+
 	define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid. For Dokeos exclude original xml, js and css
 	define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid. For Dokeos exclude original xml, js and css
-	
+
 	define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
 	define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
 	define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,psd,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf, flv, mp4, aac, ppt,rtf,doc, pdf,xls,txt,flv,odt,ods,odp,odg,odc,odf,odb,odi,pps,docx,pptx,xlsx,accdb,xml');//For Dokeos updated
 	define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,psd,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf, flv, mp4, aac, ppt,rtf,doc, pdf,xls,txt,flv,odt,ods,odp,odg,odc,odf,odb,odi,pps,docx,pptx,xlsx,accdb,xml');//For Dokeos updated
 	define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,mp3, wav,wmv,wma,rm,rmvb,mov,swf,flv,mp4,aac,avi,mpg,mpeg,asf');//For Dokeos updated
 	define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,mp3, wav,wmv,wma,rm,rmvb,mov,swf,flv,mp4,aac,avi,mpg,mpeg,asf');//For Dokeos updated
@@ -159,27 +159,27 @@
 	define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100);
 	define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100);
 	define('CONFIG_THICKBOX_MAX_WIDTH', 700);
 	define('CONFIG_THICKBOX_MAX_WIDTH', 700);
 	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
 	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
-	
-	
+
+
 		/**
 		/**
 		 * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8
 		 * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8
 		 * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT
 		 * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT
-		 * Howerver, some Web Hosts do not have standard php.ini setting 
+		 * Howerver, some Web Hosts do not have standard php.ini setting
 		 * which you will find the file manager can not locate your files correctly
 		 * which you will find the file manager can not locate your files correctly
 		 * if you do have such issue, please change it to fit your system.
 		 * if you do have such issue, please change it to fit your system.
 		 * so what should you to do get it
 		 * so what should you to do get it
 		 *   1. create a php script file (let's call it document_root.php)
 		 *   1. create a php script file (let's call it document_root.php)
-		 *   2. add the following codes in in 
+		 *   2. add the following codes in in
 		 * 			<?php
 		 * 			<?php
 		 * 				echo dirname(__FILE__);
 		 * 				echo dirname(__FILE__);
 		 * 			?>
 		 * 			?>
 		 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
 		 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
-		 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that 
+		 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that
 		 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
 		 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
 		 *   6. enjoy it
 		 *   6. enjoy it
-		 * 		
+		 *
 		 */
 		 */
-		
+
 	// Modified by Ivan Tcholakov, JUN-2009.
 	// Modified by Ivan Tcholakov, JUN-2009.
 	//define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
 	//define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
 	define('CONFIG_WEBSITE_DOCUMENT_ROOT', rtrim(api_get_path(SYS_SERVER_ROOT_PATH), '/'));
 	define('CONFIG_WEBSITE_DOCUMENT_ROOT', rtrim(api_get_path(SYS_SERVER_ROOT_PATH), '/'));
@@ -191,18 +191,18 @@
 					tinymce
 					tinymce
 					fckeditor
 					fckeditor
 			*/
 			*/
-	//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8			
+	//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8
 	define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'fckeditor')); // run mode fckeditor (Dokeos editor)
 	define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'fckeditor')); // run mode fckeditor (Dokeos editor)
 	define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default'));  //change the theme to your custom theme rather than default
 	define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default'));  //change the theme to your custom theme rather than default
 	define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail
 	define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail
 	define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
 	define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
-	define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client 
-	
-	
+	define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client
+
+
 	//General Option Declarations
 	//General Option Declarations
 	//LANGAUGAE DECLARATIONNS
 	//LANGAUGAE DECLARATIONNS
 	/*
 	/*
-	$langdoktoajaxfile= api_get_language_isocode(); //from dokeos. return, en, es... 
+	$langdoktoajaxfile= api_get_language_isocode(); //from dokeos. return, en, es...
 	if ($langdoktoajaxfile=='en' || $langdoktoajaxfile=='zh' || $langdoktoajaxfile=='es') // ajaxfilemanager full translations (only with all variables translated).
 	if ($langdoktoajaxfile=='en' || $langdoktoajaxfile=='zh' || $langdoktoajaxfile=='es') // ajaxfilemanager full translations (only with all variables translated).
 	{
 	{
 	   $langajaxfilemanager=$langdoktoajaxfile;
 	   $langajaxfilemanager=$langdoktoajaxfile;
@@ -210,7 +210,7 @@
 	else
 	else
 	{
 	{
 		$langajaxfilemanager='en';//default
 		$langajaxfilemanager='en';//default
-	}	
+	}
 	*/
 	*/
 
 
 	@ $langajaxfilemanager = Database :: get_language_isocode($language_interface);
 	@ $langajaxfilemanager = Database :: get_language_isocode($language_interface);

+ 14 - 14
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.php

@@ -7,7 +7,7 @@
 	 * @since 22/April/2007
 	 * @since 22/April/2007
 	 *
 	 *
 	 * Modifications of system config setting for Dokeos
 	 * Modifications of system config setting for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @since 31/December/2008
 	 * @since 31/December/2008
 	 */
 	 */
 
 
@@ -25,7 +25,7 @@
 	{
 	{
 		header('Content-Type: text/html; charset=utf-8');
 		header('Content-Type: text/html; charset=utf-8');
 	}
 	}
-	
+
 	/**
 	/**
 	 * secure file name which retrieve from query string
 	 * secure file name which retrieve from query string
 	 *
 	 *
@@ -35,9 +35,9 @@
 	function secureFileName($input)
 	function secureFileName($input)
 	{
 	{
 		return preg_replace('/[^a-zA-Z0-9\-_]/', '', $input);
 		return preg_replace('/[^a-zA-Z0-9\-_]/', '', $input);
-	}	
-	//Directories Declarations	
-	
+	}
+	//Directories Declarations
+
 	define('DIR_AJAX_ROOT', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR) ; // the path to ajax file manager
 	define('DIR_AJAX_ROOT', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR) ; // the path to ajax file manager
 	define('DIR_AJAX_INC', DIR_AJAX_ROOT . "inc" . DIRECTORY_SEPARATOR);
 	define('DIR_AJAX_INC', DIR_AJAX_ROOT . "inc" . DIRECTORY_SEPARATOR);
 	define('DIR_AJAX_CLASSES', DIR_AJAX_ROOT .  "classes" . DIRECTORY_SEPARATOR);
 	define('DIR_AJAX_CLASSES', DIR_AJAX_ROOT .  "classes" . DIRECTORY_SEPARATOR);
@@ -46,7 +46,7 @@
 	define('DIR_AJAX_EDIT_AREA', DIR_AJAX_JS . 'edit_area' . DIRECTORY_SEPARATOR);
 	define('DIR_AJAX_EDIT_AREA', DIR_AJAX_JS . 'edit_area' . DIRECTORY_SEPARATOR);
 	define('DIR_LANG', DIR_AJAX_ROOT . 'langs' . DIRECTORY_SEPARATOR);
 	define('DIR_LANG', DIR_AJAX_ROOT . 'langs' . DIRECTORY_SEPARATOR);
 
 
-	
+
 	//Class Declarations
 	//Class Declarations
 	define('CLASS_FILE', DIR_AJAX_INC .'class.file.php');
 	define('CLASS_FILE', DIR_AJAX_INC .'class.file.php');
 	define("CLASS_UPLOAD", DIR_AJAX_INC .  'class.upload.php');
 	define("CLASS_UPLOAD", DIR_AJAX_INC .  'class.upload.php');
@@ -57,10 +57,10 @@
 	define('CLASS_PAGINATION', DIR_AJAX_INC . 'class.pagination.php');
 	define('CLASS_PAGINATION', DIR_AJAX_INC . 'class.pagination.php');
 	define('CLASS_SEARCH', DIR_AJAX_INC . "class.search.php");
 	define('CLASS_SEARCH', DIR_AJAX_INC . "class.search.php");
 	//SCRIPT FILES declarations
 	//SCRIPT FILES declarations
-	define('SPT_FUNCTION_BASE', DIR_AJAX_INC . 'function.base.php');	
+	define('SPT_FUNCTION_BASE', DIR_AJAX_INC . 'function.base.php');
 	//include different config base file according to query string "config"
 	//include different config base file according to query string "config"
 	$configBaseFileName = 'config.base.php';
 	$configBaseFileName = 'config.base.php';
-	
+
 	if(CONFIG_QUERY_STRING_ENABLE && !empty($_GET['config']) && file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'config.' . secureFileName($_GET['config']) . ".php")
 	if(CONFIG_QUERY_STRING_ENABLE && !empty($_GET['config']) && file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'config.' . secureFileName($_GET['config']) . ".php")
 	{
 	{
 		$configBaseFileName = 'config.' . secureFileName($_GET['config']) . ".php";
 		$configBaseFileName = 'config.' . secureFileName($_GET['config']) . ".php";
@@ -76,12 +76,12 @@
 		require_once(DIR_AJAX_LANGS . "en.php");
 		require_once(DIR_AJAX_LANGS . "en.php");
 	}
 	}
 
 
-	require_once(DIR_AJAX_INC . "function.base.php");	
-	
+	require_once(DIR_AJAX_INC . "function.base.php");
+
 	require_once(dirname(__FILE__) .  DIRECTORY_SEPARATOR . "class.session.php");
 	require_once(dirname(__FILE__) .  DIRECTORY_SEPARATOR . "class.session.php");
-	
+
 	$auth = new Auth();
 	$auth = new Auth();
-	
+
 	if(CONFIG_ACCESS_CONTROL_MODE == 1)
 	if(CONFIG_ACCESS_CONTROL_MODE == 1)
 	{//access control enabled
 	{//access control enabled
 		if(!$auth->isLoggedIn() && strtolower(basename($_SERVER['PHP_SELF']) != strtolower(basename(CONFIG_LOGIN_PAGE))))
 		if(!$auth->isLoggedIn() && strtolower(basename($_SERVER['PHP_SELF']) != strtolower(basename(CONFIG_LOGIN_PAGE))))
@@ -106,7 +106,7 @@
 	define('CONFIG_URL_CUT', 'ajax_file_cut.php');
 	define('CONFIG_URL_CUT', 'ajax_file_cut.php');
 	define('CONFIG_URL_COPY', 'ajax_file_copy.php');
 	define('CONFIG_URL_COPY', 'ajax_file_copy.php');
 	define('CONFIG_URL_LOAD_FOLDERS', '_ajax_load_folders.php');
 	define('CONFIG_URL_LOAD_FOLDERS', '_ajax_load_folders.php');
-	
+
 	define('CONFIG_URL_DOWNLOAD', 'ajax_download.php');
 	define('CONFIG_URL_DOWNLOAD', 'ajax_download.php');
 	define('CONFIG_URL_TEXT_EDITOR', 'ajax_text_editor.php');
 	define('CONFIG_URL_TEXT_EDITOR', 'ajax_text_editor.php');
 	define('CONFIG_URL_GET_FOLDER_LIST', 'ajax_get_folder_listing.php');
 	define('CONFIG_URL_GET_FOLDER_LIST', 'ajax_get_folder_listing.php');
@@ -115,6 +115,6 @@
 	define('CONFIG_URL_IMG_THUMBNAIL', 'ajax_image_thumbnail.php');
 	define('CONFIG_URL_IMG_THUMBNAIL', 'ajax_image_thumbnail.php');
 	define('CONFIG_URL_FILEnIMAGE_MANAGER', 'ajaxfilemanager.php');
 	define('CONFIG_URL_FILEnIMAGE_MANAGER', 'ajaxfilemanager.php');
 	define('CONFIG_URL_FILE_PASTE', 'ajax_file_paste.php');
 	define('CONFIG_URL_FILE_PASTE', 'ajax_file_paste.php');
-	
+
 
 
 ?>
 ?>

+ 29 - 29
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.tinymce.php

@@ -6,33 +6,33 @@
 	 * @since 1/August/2007
 	 * @since 1/August/2007
 	 *
 	 *
 	 */
 	 */
-	
 
 
-error_reporting(E_ALL);	
-//error_reporting(E_ALL ^ E_NOTICE);	
-	
-	
+
+error_reporting(E_ALL);
+//error_reporting(E_ALL ^ E_NOTICE);
+
+
 
 
 	//Access Control Setting
 	//Access Control Setting
 	/**
 	/**
 	 * turn off => false
 	 * turn off => false
 	 * by session => true
 	 * by session => true
 	 */
 	 */
-	define('CONFIG_ACCESS_CONTROL_MODE', false); 	
+	define('CONFIG_ACCESS_CONTROL_MODE', false);
 	define("CONFIG_LOGIN_USERNAME", 'ajax');
 	define("CONFIG_LOGIN_USERNAME", 'ajax');
 	define('CONFIG_LOGIN_PASSWORD', '123456');
 	define('CONFIG_LOGIN_PASSWORD', '123456');
 	define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page
 	define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page
-	
+
 	//SYSTEM MODE CONFIG
 	//SYSTEM MODE CONFIG
 		/**
 		/**
 		 * turn it on when you have this system for demo purpose
 		 * turn it on when you have this system for demo purpose
-		*  that means changes made to each image is not physically applied to it 
+		*  that means changes made to each image is not physically applied to it
 		*  and all uploaded files/created folders will be removed automatically
 		*  and all uploaded files/created folders will be removed automatically
 		*/
 		*/
-	define('CONFIG_SYS_DEMO_ENABLE', false); 
+	define('CONFIG_SYS_DEMO_ENABLE', false);
 	define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only
 	define('CONFIG_SYS_VIEW_ONLY', false); //diabled the system, view only
 	define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false
 	define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false
-	
+
 	//User Permissions
 	//User Permissions
 	define('CONFIG_OPTIONS_DELETE', true);
 	define('CONFIG_OPTIONS_DELETE', true);
 	define('CONFIG_OPTIONS_CUT', true);
 	define('CONFIG_OPTIONS_CUT', true);
@@ -47,10 +47,10 @@ error_reporting(E_ALL);
 			and it must be a folder under the CONFIG_SYS_ROOT_PATH or the same folder
 			and it must be a folder under the CONFIG_SYS_ROOT_PATH or the same folder
 			these two paths accept relative path only, don't use absolute path
 			these two paths accept relative path only, don't use absolute path
 		*/
 		*/
-		
+
 	define('CONFIG_SYS_DEFAULT_PATH', '../uploaded/'); //accept relative path only
 	define('CONFIG_SYS_DEFAULT_PATH', '../uploaded/'); //accept relative path only
 	define('CONFIG_SYS_ROOT_PATH', '../uploaded/');	//accept relative path only
 	define('CONFIG_SYS_ROOT_PATH', '../uploaded/');	//accept relative path only
-	define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name 
+	define('CONFIG_SYS_FOLDER_SHOWN_ON_TOP', true); //show your folders on the top of list if true or order by name
 	define("CONFIG_SYS_DIR_SESSION_PATH", 'session/');
 	define("CONFIG_SYS_DIR_SESSION_PATH", 'session/');
 	define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns
 	define("CONFIG_SYS_PATTERN_FORMAT", 'list'); //three options: reg ,csv, list, this option define the parttern format for the following patterns
 		/**
 		/**
@@ -65,19 +65,19 @@ error_reporting(E_ALL);
 	define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_INC_FILE_PATTERN', ''); //force listing of fiels with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_EXC_FILE_PATTERN', ''); //will prevent listing of files with such pattern(s). separated by , if multiple
 	define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1
 	define('CONFIG_SYS_DELETE_RECURSIVE', 1); //delete all contents within a specific folder if set to be 1
-	
+
 	//UPLOAD OPTIONS CONFIG
 	//UPLOAD OPTIONS CONFIG
 	define('CONFIG_UPLOAD_MAXSIZE', 50 * 1024 ); //by bytes
 	define('CONFIG_UPLOAD_MAXSIZE', 50 * 1024 ); //by bytes
 	//define('CONFIG_UPLOAD_MAXSIZE', 2048); //by bytes
 	//define('CONFIG_UPLOAD_MAXSIZE', 2048); //by bytes
 	//define('CONFIG_UPLOAD_VALID_EXTS', 'txt');//
 	//define('CONFIG_UPLOAD_VALID_EXTS', 'txt');//
 
 
 	define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid
 	define('CONFIG_EDITABLE_VALID_EXTS', 'txt,htm,html,xml,js,css'); //make you include all these extension in CONFIG_UPLOAD_VALID_EXTS if you want all valid
-	
+
 	define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
 	define('CONFIG_OVERWRITTEN', false); //overwirte when processing paste
-	define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // 
+	define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); //
 	//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');//
 	//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,bmp,tif,zip,sit,rar,gz,tar,htm,html,mov,mpg,avi,asf,mpeg,wmv,aif,aiff,wav,mp3,swf,ppt,rtf,doc,pdf,xls,txt,xml,xsl,dtd');//
 	define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf');
 	define("CONFIG_VIEWABLE_VALID_EXTS", 'gif,bmp,txt,jpg,png,tif,html,htm,js,css,xml,xsl,dtd,mp3,wav,wmv,wma,rm,rmvb,mov,swf');
-	//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); // 
+	//define('CONFIG_UPLOAD_VALID_EXTS', 'gif,jpg,png,txt'); //
 	define('CONFIG_UPLOAD_INVALID_EXTS', '');
 	define('CONFIG_UPLOAD_INVALID_EXTS', '');
 
 
 	//Preview
 	//Preview
@@ -85,31 +85,31 @@ error_reporting(E_ALL);
 	define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100);
 	define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100);
 	define('CONFIG_THICKBOX_MAX_WIDTH', 700);
 	define('CONFIG_THICKBOX_MAX_WIDTH', 700);
 	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
 	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
-	
-	
+
+
 		/**
 		/**
 		 * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8
 		 * CONFIG_URL_PREVIEW_ROOT was replaced by CONFIG_WEBSITE_DOCUMENT_ROOT since v0.8
 		 * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT
 		 * Normally, you don't need to bother with CONFIG_WEBSITE_DOCUMENT_ROOT
-		 * Howerver, some Web Hosts do not have standard php.ini setting 
+		 * Howerver, some Web Hosts do not have standard php.ini setting
 		 * which you will find the file manager can not locate your files correctly
 		 * which you will find the file manager can not locate your files correctly
 		 * if you do have such issue, please change it to fit your system.
 		 * if you do have such issue, please change it to fit your system.
 		 * so what should you to do get it
 		 * so what should you to do get it
 		 *   1. create a php script file (let's call it document_root.php)
 		 *   1. create a php script file (let's call it document_root.php)
-		 *   2. add the following codes in in 
+		 *   2. add the following codes in in
 		 * 			<?php
 		 * 			<?php
 		 * 				echo dirname(__FILE__);
 		 * 				echo dirname(__FILE__);
 		 * 			?>
 		 * 			?>
 		 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
 		 *   3. upload document_root.php to you website root folder which will only be reached when you visit http://www.domain-name.com or http://localhost/ at localhost computer
-		 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that 
+		 *   4. run it via http://www.domain-name.com/document_root.php or http://localhost/docuent_root.php if localhost computer, the url has to be exactly like that
 		 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
 		 *   5. the value shown on the screen is CONFIG_WEBSITE_DOCUMENT_ROOT should be
 		 *   6. enjoy it
 		 *   6. enjoy it
 
 
-		        
-		 * 		
+
+		 *
 		 */
 		 */
-		
 
 
-	define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');	
+
+	define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
 	//theme related setting
 	//theme related setting
 			/*
 			/*
 			*	options avaialbe for CONFIG_EDITOR_NAME are:
 			*	options avaialbe for CONFIG_EDITOR_NAME are:
@@ -117,13 +117,13 @@ error_reporting(E_ALL);
 					tinymce
 					tinymce
 					fckeditor
 					fckeditor
 			*/
 			*/
-	//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8			
-	define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'stand_alone')); 
+	//CONFIG_EDITOR_NAME replaced CONFIG_THEME_MODE since @version 0.8
+	define('CONFIG_EDITOR_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['editor'])?secureFileName($_GET['editor']):'stand_alone'));
 	define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default'));  //change the theme to your custom theme rather than default
 	define('CONFIG_THEME_NAME', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['theme'])?secureFileName($_GET['theme']):'default'));  //change the theme to your custom theme rather than default
 	define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail
 	define('CONFIG_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail
 	define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
 	define('CONFIG_DEFAULT_PAGINATION_LIMIT', 10);
-	define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client 
-	
+	define('CONFIG_LOAD_DOC_LATTER', false); //all documents will be loaded up after the template has been loaded to the client
+
 	//General Option Declarations
 	//General Option Declarations
 	//LANGAUGAE DECLARATIONNS
 	//LANGAUGAE DECLARATIONNS
 	define('CONFIG_LANG_INDEX', 'language'); //the index in the session
 	define('CONFIG_LANG_INDEX', 'language'); //the index in the session

+ 136 - 136
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/function.base.php

@@ -10,7 +10,7 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "config.php");
 /**
 /**
  * force to ensure existence of stripos
  * force to ensure existence of stripos
  */
  */
-if (!function_exists("stripos")) 
+if (!function_exists("stripos"))
 {
 {
   function stripos($str,$needle,$offset=0)
   function stripos($str,$needle,$offset=0)
   {
   {
@@ -103,14 +103,14 @@ function displayArray($array, $comments="")
 			if(array_search(strtolower(getFileExt($filePath)), $validExts) !== false)
 			if(array_search(strtolower(getFileExt($filePath)), $validExts) !== false)
 			{
 			{
 				return true;
 				return true;
-			}else 
+			}else
 			{
 			{
 				return false;
 				return false;
 			}
 			}
 		}elseif(array_search(strtolower(getFileExt($filePath)), $invalidExts) === false)
 		}elseif(array_search(strtolower(getFileExt($filePath)), $invalidExts) === false)
 		{
 		{
 			return true;
 			return true;
-		}else 
+		}else
 		{
 		{
 			return false;
 			return false;
 		}
 		}
@@ -123,9 +123,9 @@ function displayArray($array, $comments="")
 /**
 /**
  *  transform file relative path to absolute path
  *  transform file relative path to absolute path
  * @param  string $value the path to the file
  * @param  string $value the path to the file
- * @return string 
+ * @return string
  */
  */
-function relToAbs($value) 
+function relToAbs($value)
 {
 {
 	return backslashToSlash(preg_replace("/(\\\\)/","\\", getRealPath($value)));
 	return backslashToSlash(preg_replace("/(\\\\)/","\\", getRealPath($value)));
 
 
@@ -181,10 +181,10 @@ function removeTrailingSlash($value) {
 /**
 /**
  * append a trailing slash
  * append a trailing slash
  *
  *
- * @param string $value 
+ * @param string $value
  * @return string
  * @return string
  */
  */
-function addTrailingSlash($value) 
+function addTrailingSlash($value)
 {
 {
 	if(preg_match('@^.*[^/]{1}$@i', $value))
 	if(preg_match('@^.*[^/]{1}$@i', $value))
 	{
 	{
@@ -204,13 +204,13 @@ function transformFilePath($value) {
 	$value = addTrailingSlash(backslashToSlash(getRealPath($value)));
 	$value = addTrailingSlash(backslashToSlash(getRealPath($value)));
 	if(!empty($rootPath) && ($i = strpos($value, $rootPath)) !== false)
 	if(!empty($rootPath) && ($i = strpos($value, $rootPath)) !== false)
 	{
 	{
-		$value = ($i == 0?substr($value, strlen($rootPath)):"/");		
+		$value = ($i == 0?substr($value, strlen($rootPath)):"/");
 	}
 	}
 	$value = prependSlash($value);
 	$value = prependSlash($value);
 	return $value;
 	return $value;
 }
 }
 /**
 /**
- * prepend slash 
+ * prepend slash
  *
  *
  * @param string $value
  * @param string $value
  * @return string
  * @return string
@@ -220,8 +220,8 @@ function prependSlash($value)
 		if (($value && $value[0] != '/') || !$value )
 		if (($value && $value[0] != '/') || !$value )
 		{
 		{
 			$value = "/" . $value;
 			$value = "/" . $value;
-		}			
-		return $value;	
+		}
+		return $value;
 }
 }
 
 
 
 
@@ -235,7 +235,7 @@ function prependSlash($value)
 		{
 		{
 			die();
 			die();
 		}
 		}
-		
+
 	}
 	}
 
 
 /**
 /**
@@ -264,7 +264,7 @@ function addNoCacheHeaders() {
 			}else
 			}else
 			{
 			{
 				$output .= "?" . $extra;
 				$output .= "?" . $extra;
-			}			
+			}
 		}
 		}
 
 
 		return $output;
 		return $output;
@@ -335,10 +335,10 @@ function addNoCacheHeaders() {
 		{
 		{
 			return true;
 			return true;
 		}
 		}
-		return false;		
+		return false;
 	}
 	}
-	
-	
+
+
 	/**
 	/**
 	 * get thumbnail width and height
 	 * get thumbnail width and height
 	 *
 	 *
@@ -419,12 +419,12 @@ function myRealPath($path) {
 		}
 		}
     // check if path begins with "/" ie. is absolute
     // check if path begins with "/" ie. is absolute
     // if it isnt concat with script path
     // if it isnt concat with script path
-    
+
     if (strpos($path,"/") !== 0 ) {
     if (strpos($path,"/") !== 0 ) {
         $base=dirname($_SERVER['SCRIPT_FILENAME']);
         $base=dirname($_SERVER['SCRIPT_FILENAME']);
         $path=$base."/".$path;
         $path=$base."/".$path;
     }
     }
- 
+
     // canonicalize
     // canonicalize
     $path=explode('/', $path);
     $path=explode('/', $path);
     $newpath=array();
     $newpath=array();
@@ -457,12 +457,12 @@ function myRealPath($path) {
  	 if(($path = realpath($value)) && $path != $value)
  	 if(($path = realpath($value)) && $path != $value)
  	 {
  	 {
  	 	$output = $path;
  	 	$output = $path;
- 	 }else 
+ 	 }else
  	 {
  	 {
  	 	$output = myRealPath($value);
  	 	$output = myRealPath($value);
  	 }
  	 }
  	 return $output;
  	 return $output;
- 	
+
  }
  }
 	/**
 	/**
 	 * get file url
 	 * get file url
@@ -479,21 +479,21 @@ function myRealPath($path) {
 		$urlsuffix = "";
 		$urlsuffix = "";
 
 
 	$value = backslashToSlash(getRealPath($value));
 	$value = backslashToSlash(getRealPath($value));
-		
+
 
 
 		$pos = stripos($value, $wwwroot);
 		$pos = stripos($value, $wwwroot);
 		if ($pos !== false && $pos == 0)
 		if ($pos !== false && $pos == 0)
 		{
 		{
 			$output  = $urlprefix . substr($value, strlen($wwwroot)) . $urlsuffix;
 			$output  = $urlprefix . substr($value, strlen($wwwroot)) . $urlsuffix;
-		}else 
+		}else
 		{
 		{
 			$output = $value;
 			$output = $value;
 		}
 		}
 		return "http://" .  addTrailingSlash(backslashToSlash($_SERVER['HTTP_HOST'])) . removeBeginingSlash(backslashToSlash($output));
 		return "http://" .  addTrailingSlash(backslashToSlash($_SERVER['HTTP_HOST'])) . removeBeginingSlash(backslashToSlash($output));
 	}
 	}
-	
+
 /**
 /**
- * 
+ *
  *	transfer file size number to human friendly string
  *	transfer file size number to human friendly string
  * @param integer $size.
  * @param integer $size.
  * @return String
  * @return String
@@ -512,9 +512,9 @@ function transformFileSize($size) {
 	}else
 	}else
 	{
 	{
 		return $size . " b";
 		return $size . " b";
-	}	
+	}
 }
 }
-	
+
 	/**
 	/**
 	 * remove beginging slash
 	 * remove beginging slash
 	 *
 	 *
@@ -530,7 +530,7 @@ function transformFileSize($size) {
 		}
 		}
 		return $value;
 		return $value;
 	}
 	}
-	
+
 /**
 /**
  * get site root path
  * get site root path
  *
  *
@@ -551,44 +551,44 @@ function getRootPath() {
 		}elseif(isset($_SERVER["SCRIPT_NAME"]) && isset($_SERVER["PATH_TRANSLATED"]) && ($output = str_replace(backslashToSlash($_SERVER["SCRIPT_NAME"]), "", str_replace("//", "/", backslashToSlash($_SERVER["PATH_TRANSLATED"])))) && is_dir($output))
 		}elseif(isset($_SERVER["SCRIPT_NAME"]) && isset($_SERVER["PATH_TRANSLATED"]) && ($output = str_replace(backslashToSlash($_SERVER["SCRIPT_NAME"]), "", str_replace("//", "/", backslashToSlash($_SERVER["PATH_TRANSLATED"])))) && is_dir($output))
 		{
 		{
 			return $output;
 			return $output;
-		}else 
+		}else
 		{
 		{
 			return '';
 			return '';
-		}	
+		}
 
 
 	return null;
 	return null;
 }
 }
 
 
-	
+
 	/**
 	/**
 	 * add beginging slash
 	 * add beginging slash
 	 *
 	 *
 	 * @param string $value
 	 * @param string $value
 	 * @return string
 	 * @return string
-	 */	
+	 */
 	function addBeginingSlash($value)
 	function addBeginingSlash($value)
 	{
 	{
 		if(strpos($value, "/") !== 0 && !empty($value))
 		if(strpos($value, "/") !== 0 && !empty($value))
 		{
 		{
 			$value .= "/" . $value;
 			$value .= "/" . $value;
 		}
 		}
-		return $value;		
+		return $value;
 	}
 	}
 
 
 
 
-	
+
 
 
-	
+
 	/**
 	/**
 	 * get a file extension
 	 * get a file extension
 	 *
 	 *
 	 * @param string $fileName the path to a file or just the file name
 	 * @param string $fileName the path to a file or just the file name
-	 */	
+	 */
 	function getFileExt($filePath)
 	function getFileExt($filePath)
 	{
 	{
 		return @substr(@strrchr($filePath, "."), 1);
 		return @substr(@strrchr($filePath, "."), 1);
 	}
 	}
-	
+
 		/**
 		/**
 		 * reuturn the relative path between two url
 		 * reuturn the relative path between two url
 		 *
 		 *
@@ -651,8 +651,8 @@ function getRootPath() {
     {
     {
     	$output = intval($output) * 1024 * 1024;
     	$output = intval($output) * 1024 * 1024;
     }
     }
-    
-    return $output;  	
+
+    return $output;
   }
   }
 	/**
 	/**
 	 * get file content
 	 * get file content
@@ -684,35 +684,35 @@ function getRootPath() {
                    $fh = @opendir($path);
                    $fh = @opendir($path);
                    if($fh)
                    if($fh)
                    {
                    {
-                            $count = 1;                          
+                            $count = 1;
                             while($file = @readdir($fh))
                             while($file = @readdir($fh))
                             {
                             {
                                      $newPath = removeTrailingSlash(backslashToSlash($path . "/" . $file));
                                      $newPath = removeTrailingSlash(backslashToSlash($path . "/" . $file));
                                      if(isListingDocument($newPath) && $file != '.' && $file != '..' && is_dir($newPath))
                                      if(isListingDocument($newPath) && $file != '.' && $file != '..' && is_dir($newPath))
-                                     {                                          
+                                     {
                                                if(!empty($indexNumber))
                                                if(!empty($indexNumber))
                                                {//this is not root folder
                                                {//this is not root folder
-                                               					
+
                                                         $outputs[$prefixNumber . $indexNumber . "." . $count . $prefixName . $file] = $newPath;
                                                         $outputs[$prefixNumber . $indexNumber . "." . $count . $prefixName . $file] = $newPath;
-                                                        getFolderListing($newPath,  $prefixNumber . $indexNumber . "." . $count , $prefixNumber, $prefixName, $outputs);                                                 
-                                               }else 
+                                                        getFolderListing($newPath,  $prefixNumber . $indexNumber . "." . $count , $prefixNumber, $prefixName, $outputs);
+                                               }else
                                                {//this is root folder
                                                {//this is root folder
 
 
                                                         $outputs[$count . $prefixName . $file] = $newPath;
                                                         $outputs[$count . $prefixName . $file] = $newPath;
                                                         getFolderListing($newPath, $count, $prefixNumber, $prefixName, $outputs);
                                                         getFolderListing($newPath, $count, $prefixNumber, $prefixName, $outputs);
                                                }
                                                }
                                                $count++;
                                                $count++;
-                                     }                                    
+                                     }
                             }
                             }
                             @closedir($fh);
                             @closedir($fh);
                    }
                    }
                    return $outputs;
                    return $outputs;
          }
          }
 
 
-         
+
          /**
          /**
-          * get the valid text editor extension 
-          * which is calcualte from the CONFIG_EDITABALE_VALID_EXTS 
+          * get the valid text editor extension
+          * which is calcualte from the CONFIG_EDITABALE_VALID_EXTS
           * exclude those specified in CONFIG_UPLOAD_INVALID_EXTS
           * exclude those specified in CONFIG_UPLOAD_INVALID_EXTS
           * and those are not specified in CONFIG_UPLOAD_VALID_EXTS
           * and those are not specified in CONFIG_UPLOAD_VALID_EXTS
           *
           *
@@ -730,7 +730,7 @@ function getRootPath() {
          			{
          			{
          				unset($validEditorExts[$k]);
          				unset($validEditorExts[$k]);
          			}
          			}
-         		}        		
+         		}
          	}
          	}
          	if(CONFIG_UPLOAD_INVALID_EXTS)
          	if(CONFIG_UPLOAD_INVALID_EXTS)
          	{//exlcude those exists in CONFIG_UPLOAD_INVALID_EXTS
          	{//exlcude those exists in CONFIG_UPLOAD_INVALID_EXTS
@@ -743,11 +743,11 @@ function getRootPath() {
          			}
          			}
          		}
          		}
          	}
          	}
-         	return $validEditorExts;        	
-         	
+         	return $validEditorExts;
+
          }
          }
     /**
     /**
-     * check if file name or folder name is valid against a regular expression 
+     * check if file name or folder name is valid against a regular expression
      *
      *
      * @param string $pattern regular expression, separated by , if multiple
      * @param string $pattern regular expression, separated by , if multiple
      * @param string $string
      * @param string $string
@@ -768,19 +768,19 @@ function getRootPath() {
                     {
                     {
                         return true;
                         return true;
                     }
                     }
-                }               
+                }
             }
             }
             else if(eregi($pattern, $string))
             else if(eregi($pattern, $string))
             {
             {
                 return true;
                 return true;
             }
             }
             return false;
             return false;
-           
-        }       
+
+        }
 
 
-		
+
     /**
     /**
-     * check if file name or folder name is invalid against a regular expression 
+     * check if file name or folder name is invalid against a regular expression
      *
      *
      * @param string $pattern regular expression, separated by , if multiple
      * @param string $pattern regular expression, separated by , if multiple
      * @param string $string
      * @param string $string
@@ -801,16 +801,16 @@ function getRootPath() {
                     {
                     {
                         return true;
                         return true;
                     }
                     }
-                }               
+                }
             }
             }
             else if(eregi($pattern, $string))
             else if(eregi($pattern, $string))
             {
             {
                 return true;
                 return true;
             }
             }
             return false;
             return false;
-           
-        }  
-   			
+
+        }
+
 
 
 		/**
 		/**
 		 * cut the file down to fit the list page
 		 * cut the file down to fit the list page
@@ -824,9 +824,9 @@ function getRootPath() {
 				$fileName = substr($fileName, 0, $maxLeng - strlen($indicate)) . $indicate;
 				$fileName = substr($fileName, 0, $maxLeng - strlen($indicate)) . $indicate;
 			}
 			}
 			return $fileName;
 			return $fileName;
-			
+
 		}
 		}
-		if (!function_exists('mime_content_type')) 
+		if (!function_exists('mime_content_type'))
 		{
 		{
 		   function mime_content_type ( $f )
 		   function mime_content_type ( $f )
 		   {
 		   {
@@ -849,26 +849,26 @@ function getRootPath() {
 			$hotpotatoes_folder_dokeos='HotPotatoes_files';
 			$hotpotatoes_folder_dokeos='HotPotatoes_files';
 			$chat_files_dokeos='chat_files';
 			$chat_files_dokeos='chat_files';
 			$thumbs_folder='.thumbs';
 			$thumbs_folder='.thumbs';
-			
-			//hidden directory of the group if the user is not a member of the group					
+
+			//hidden directory of the group if the user is not a member of the group
 			$group_folder='_groupdocs';
 			$group_folder='_groupdocs';
-			
+
 			//show group's directory only if I'm member
 			//show group's directory only if I'm member
-			$show_doc_group=true;								
+			$show_doc_group=true;
 			if(ereg($group_folder, $folderName))
 			if(ereg($group_folder, $folderName))
 			{
 			{
 				$show_doc_group=false;
 				$show_doc_group=false;
 				if($is_user_in_group)
 				if($is_user_in_group)
 				{
 				{
-					$show_doc_group=true;					
+					$show_doc_group=true;
 				}
 				}
-			}		
-			
+			}
+
 			if(!ereg($deleted_by_dokeos, $folderName) && !ereg($css_folder_dokeos, $folderName) && !ereg($hotpotatoes_folder_dokeos, $folderName) && !ereg($chat_files_dokeos, $folderName) && !ereg($thumbs_folder, $folderName) && $show_doc_group==true)
 			if(!ereg($deleted_by_dokeos, $folderName) && !ereg($css_folder_dokeos, $folderName) && !ereg($hotpotatoes_folder_dokeos, $folderName) && !ereg($chat_files_dokeos, $folderName) && !ereg($thumbs_folder, $folderName) && $show_doc_group==true)
-			{			
+			{
 				return substr($folderName,strpos($folderName, '-'),strlen($folderName)); //hide the firsts numbers
 				return substr($folderName,strpos($folderName, '-'),strlen($folderName)); //hide the firsts numbers
 			}
 			}
-		
+
 		}
 		}
 
 
 
 
@@ -886,54 +886,54 @@ function getRootPath() {
 
 
 
 
 
 
-			    		
+
       			if(is_dir($path))
       			if(is_dir($path))
       			{
       			{
  				$includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN);
  				$includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN);
-				$excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN);     				
+				$excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN);
 				$found_includeDir = strpos($includeDir, $file);
 				$found_includeDir = strpos($includeDir, $file);
-				$found_excludeDir = strpos($excludeDir, $file);      				
+				$found_excludeDir = strpos($excludeDir, $file);
       				if((!CONFIG_SYS_INC_DIR_PATTERN || (!($found_includeDir === FALSE))) && (!CONFIG_SYS_EXC_DIR_PATTERN || (($found_excludeDir === FALSE))))
       				if((!CONFIG_SYS_INC_DIR_PATTERN || (!($found_includeDir === FALSE))) && (!CONFIG_SYS_EXC_DIR_PATTERN || (($found_excludeDir === FALSE))))
       				{
       				{
       					return true;
       					return true;
-      				}else 
+      				}else
       				{
       				{
       					return false;
       					return false;
       				}
       				}
       			}elseif(is_file($path))
       			}elseif(is_file($path))
       			{
       			{
 				$includeFile = trimlrm(CONFIG_SYS_INC_FILE_PATTERN);
 				$includeFile = trimlrm(CONFIG_SYS_INC_FILE_PATTERN);
-				$excludeFile = trimlrm(CONFIG_SYS_EXC_FILE_PATTERN);            				
+				$excludeFile = trimlrm(CONFIG_SYS_EXC_FILE_PATTERN);
 				$found_includeFile = strpos($includeFile, $file);
 				$found_includeFile = strpos($includeFile, $file);
-				$found_excludeFile = strpos($excludeFile, $file);	      				
+				$found_excludeFile = strpos($excludeFile, $file);
       				if((!CONFIG_SYS_INC_FILE_PATTERN || (!($found_includeFile === FALSE))) && (!CONFIG_SYS_EXC_FILE_PATTERN ||   (($found_excludeFile === FALSE))))
       				if((!CONFIG_SYS_INC_FILE_PATTERN || (!($found_includeFile === FALSE))) && (!CONFIG_SYS_EXC_FILE_PATTERN ||   (($found_excludeFile === FALSE))))
       				{
       				{
       					return true;
       					return true;
-      				}else 
+      				}else
       				{
       				{
       					return false;
       					return false;
       				}
       				}
       			}
       			}
          	}elseif(CONFIG_SYS_PATTERN_FORMAT == 'csv')
          	}elseif(CONFIG_SYS_PATTERN_FORMAT == 'csv')
          	{//comma delimited file/folder name
          	{//comma delimited file/folder name
-         		
+
          		if(is_dir($path))
          		if(is_dir($path))
          		{
          		{
-         		
+
 	 				$includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN);
 	 				$includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN);
 					$excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN);
 					$excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN);
-					        
+
 					if(!empty($includeDir) && !empty($excludeDir))
 					if(!empty($includeDir) && !empty($excludeDir))
 					{
 					{
-						
+
 						$validDir = explode(',', $includeDir);
 						$validDir = explode(',', $includeDir);
-						
+
 						$invalidDir = explode(",", $excludeDir);
 						$invalidDir = explode(",", $excludeDir);
 
 
 						if(array_search(basename($path), $validDir) !== false && array_search(basename($path), $invalidDir) === false)
 						if(array_search(basename($path), $validDir) !== false && array_search(basename($path), $invalidDir) === false)
 						{
 						{
 							return true;
 							return true;
-						}else 
+						}else
 						{
 						{
 							return false;
 							return false;
 						}
 						}
@@ -943,28 +943,28 @@ function getRootPath() {
 						if(array_search(basename($path), $validDir) !== false)
 						if(array_search(basename($path), $validDir) !== false)
 						{
 						{
 							return true;
 							return true;
-						}else 
+						}else
 						{
 						{
 							return false;
 							return false;
 						}
 						}
-						
+
 					}elseif(!empty($excludeFile))
 					}elseif(!empty($excludeFile))
 					{
 					{
 						$invalidDir = explode(",", $excludeDir);
 						$invalidDir = explode(",", $excludeDir);
 						if(array_search(basename($path), $invalidDir) === false)
 						if(array_search(basename($path), $invalidDir) === false)
 						{
 						{
 							return true;
 							return true;
-						}else 
+						}else
 						{
 						{
 							return false;
 							return false;
 						}
 						}
 					}
 					}
 					return true;
 					return true;
-					
+
          		}elseif(is_file($path))
          		}elseif(is_file($path))
          		{
          		{
 				$includeFile = trimlrm(CONFIG_SYS_INC_FILE_PATTERN);
 				$includeFile = trimlrm(CONFIG_SYS_INC_FILE_PATTERN);
-				$excludeFile = trimlrm(CONFIG_SYS_EXC_FILE_PATTERN);   
+				$excludeFile = trimlrm(CONFIG_SYS_EXC_FILE_PATTERN);
 				if(!empty($includeFile) && !empty($excludeFile))
 				if(!empty($includeFile) && !empty($excludeFile))
 				{
 				{
 					$validFile = explode(',', $includeFile);
 					$validFile = explode(',', $includeFile);
@@ -972,7 +972,7 @@ function getRootPath() {
 					if(array_search(basename($path), $validFile) !== false && array_search(basename($path), $invalidFile) === false)
 					if(array_search(basename($path), $validFile) !== false && array_search(basename($path), $invalidFile) === false)
 					{
 					{
 						return true;
 						return true;
-					}else 
+					}else
 					{
 					{
 						return false;
 						return false;
 					}
 					}
@@ -982,7 +982,7 @@ function getRootPath() {
 					if(array_search(basename($path), $validFile) !== false)
 					if(array_search(basename($path), $validFile) !== false)
 					{
 					{
 						return true;
 						return true;
-					}else 
+					}else
 					{
 					{
 						return false;
 						return false;
 					}
 					}
@@ -992,7 +992,7 @@ function getRootPath() {
 					if(array_search(basename($path), $invalidFile) === false)
 					if(array_search(basename($path), $invalidFile) === false)
 					{
 					{
 						return true;
 						return true;
-					}else 
+					}else
 					{
 					{
 						return false;
 						return false;
 					}
 					}
@@ -1000,24 +1000,24 @@ function getRootPath() {
 				return true;
 				return true;
          		}
          		}
          	}
          	}
-         	else 
+         	else
          	{//regular expression
          	{//regular expression
 	          	if(is_dir($path) )
 	          	if(is_dir($path) )
 	         	{
 	         	{
 	         		if(isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $path))
 	         		if(isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $path))
 	         		{
 	         		{
-	         			 return true;	
-	         		}else 
+	         			 return true;
+	         		}else
 	         		{
 	         		{
 	         			return false;
 	         			return false;
 	         		}
 	         		}
-	         	
+
 	         	}elseif(is_file($path))
 	         	}elseif(is_file($path))
 	         	{
 	         	{
 	         		if(isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $path)  )
 	         		if(isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $path)  )
 	         		{
 	         		{
 	         			return true;
 	         			return true;
-	         		}else 
+	         		}else
 	         		{
 	         		{
 	         			return false;
 	         			return false;
 	         		}
 	         		}
@@ -1025,18 +1025,18 @@ function getRootPath() {
          	}
          	}
          	return false;
          	return false;
 
 
-         }		
-		
+         }
+
 		/**
 		/**
 		 * force to down the specified file
 		 * force to down the specified file
 		 *
 		 *
 		 * @param string $path
 		 * @param string $path
-		 * 
+		 *
 		 */
 		 */
 		function downloadFile($path, $newFileName=null)
 		function downloadFile($path, $newFileName=null)
 		{
 		{
 				if(file_exists($path) && is_file($path))
 				if(file_exists($path) && is_file($path))
-				{	
+				{
 					$mimeContentType = 'application/octet-stream';
 					$mimeContentType = 'application/octet-stream';
 					if(function_exists('finfo_open'))
 					if(function_exists('finfo_open'))
 					{
 					{
@@ -1045,15 +1045,15 @@ function getRootPath() {
 							$mimeContentType = @finfo_file($fp, basename($path));
 							$mimeContentType = @finfo_file($fp, basename($path));
 							@finfo_close($fp);
 							@finfo_close($fp);
 						}
 						}
-						
+
 					}elseif(($temMimeContentType = @mime_content_type($path)) && !empty($temMimeContentType))
 					}elseif(($temMimeContentType = @mime_content_type($path)) && !empty($temMimeContentType))
 					{
 					{
 						$mimeContentType = $temMimeContentType;
 						$mimeContentType = $temMimeContentType;
 					}
 					}
-					
- 					
-					
-						
+
+
+
+
 
 
 			// START ANDR� SILVA DOWNLOAD CODE
 			// START ANDR� SILVA DOWNLOAD CODE
 			// required for IE, otherwise Content-disposition is ignored
 			// required for IE, otherwise Content-disposition is ignored
@@ -1062,37 +1062,37 @@ function getRootPath() {
 			header("Pragma: public"); // required
 			header("Pragma: public"); // required
 			header("Expires: 0");
 			header("Expires: 0");
 			header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
 			header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
-			header("Cache-Control: private",false); // required for certain browsers 
+			header("Cache-Control: private",false); // required for certain browsers
 			header("Content-Type: " . $mimeContentType );
 			header("Content-Type: " . $mimeContentType );
 			// change, added quotes to allow spaces in filenames, by Rajkumar Singh
 			// change, added quotes to allow spaces in filenames, by Rajkumar Singh
 			header("Content-Disposition: attachment; filename=\"".(is_null($newFileName)?basename($path):$newFileName)."\";" );
 			header("Content-Disposition: attachment; filename=\"".(is_null($newFileName)?basename($path):$newFileName)."\";" );
 			header("Content-Transfer-Encoding: binary");
 			header("Content-Transfer-Encoding: binary");
 			header("Content-Length: ".filesize($path));
 			header("Content-Length: ".filesize($path));
-		
+
 			readfile($path);
 			readfile($path);
 			exit();
 			exit();
-			// END ANDR� SILVA DOWNLOAD CODE												
+			// END ANDR� SILVA DOWNLOAD CODE
 				}
 				}
-		
+
 		}
 		}
 
 
   /**
   /**
    * remove all white spaces
    * remove all white spaces
    *
    *
-   * @param string $hayStack 
+   * @param string $hayStack
    * @param string $whiteSpaceChars
    * @param string $whiteSpaceChars
    * @return string
    * @return string
    */
    */
   function trimlrm ($hayStack, $whiteSpaceChars="\t\n\r\0\x0B")
   function trimlrm ($hayStack, $whiteSpaceChars="\t\n\r\0\x0B")
   {
   {
   	return str_replace($whiteSpaceChars, '', trim($hayStack));
   	return str_replace($whiteSpaceChars, '', trim($hayStack));
-  }		
-  
+  }
+
   /**
   /**
    * get the parent path of the specified path
    * get the parent path of the specified path
    *
    *
    * @param string $path
    * @param string $path
-   * @return string 
+   * @return string
    */
    */
   function getParentFolderPath($path)
   function getParentFolderPath($path)
   {
   {
@@ -1103,12 +1103,12 @@ function getRootPath() {
   	if(isUnderRoot($parentPath))
   	if(isUnderRoot($parentPath))
   	{
   	{
   		return $parentPath;
   		return $parentPath;
-  	}else 
+  	}else
   	{
   	{
   		return CONFIG_SYS_DEFAULT_PATH;
   		return CONFIG_SYS_DEFAULT_PATH;
   	}
   	}
   }
   }
-  
+
   function getCurrentFolderPath()
   function getCurrentFolderPath()
   {
   {
   		$folderPathIndex = 'path';
   		$folderPathIndex = 'path';
@@ -1124,41 +1124,41 @@ function getRootPath() {
 		{
 		{
 			$currentFolderPath = CONFIG_SYS_DEFAULT_PATH;
 			$currentFolderPath = CONFIG_SYS_DEFAULT_PATH;
 		}
 		}
-		
+
 		$currentFolderPath = (isUnderRoot($currentFolderPath)?backslashToSlash((addTrailingSlash($currentFolderPath))):CONFIG_SYS_DEFAULT_PATH);
 		$currentFolderPath = (isUnderRoot($currentFolderPath)?backslashToSlash((addTrailingSlash($currentFolderPath))):CONFIG_SYS_DEFAULT_PATH);
-		
-		//keep track of this folder path in session 
+
+		//keep track of this folder path in session
 		$_SESSION[$lastVisitedFolderPathIndex] = $currentFolderPath;
 		$_SESSION[$lastVisitedFolderPathIndex] = $currentFolderPath;
-		
+
 
 
 		if(!file_exists($currentFolderPath))
 		if(!file_exists($currentFolderPath))
 		{
 		{
 			die(ERR_FOLDER_NOT_FOUND . $currentFolderPath);
 			die(ERR_FOLDER_NOT_FOUND . $currentFolderPath);
-		}  	
+		}
   }
   }
-  
+
        if(!function_exists("imagerotate"))
        if(!function_exists("imagerotate"))
         {
         {
             function imagerotate($src_img, $angle, $bicubic=false)
             function imagerotate($src_img, $angle, $bicubic=false)
             {
             {
     // convert degrees to radians
     // convert degrees to radians
-    
+
     $angle =  (360 - $angle) + 180;
     $angle =  (360 - $angle) + 180;
     $angle = deg2rad($angle);
     $angle = deg2rad($angle);
-   
+
     $src_x = imagesx($src_img);
     $src_x = imagesx($src_img);
     $src_y = imagesy($src_img);
     $src_y = imagesy($src_img);
-   
+
     $center_x = floor($src_x/2);
     $center_x = floor($src_x/2);
     $center_y = floor($src_y/2);
     $center_y = floor($src_y/2);
-   
+
     $rotate = imagecreatetruecolor($src_x, $src_y);
     $rotate = imagecreatetruecolor($src_x, $src_y);
     imagealphablending($rotate, false);
     imagealphablending($rotate, false);
     imagesavealpha($rotate, true);
     imagesavealpha($rotate, true);
 
 
     $cosangle = cos($angle);
     $cosangle = cos($angle);
     $sinangle = sin($angle);
     $sinangle = sin($angle);
-   
+
     for ($y = 0; $y < $src_y; $y++) {
     for ($y = 0; $y < $src_y; $y++) {
       for ($x = 0; $x < $src_x; $x++) {
       for ($x = 0; $x < $src_x; $x++) {
     // rotate...
     // rotate...
@@ -1166,7 +1166,7 @@ function getRootPath() {
       + $center_x;
       + $center_x;
     $old_y = (($center_y-$y) * $cosangle - ($center_x-$x) * $sinangle)
     $old_y = (($center_y-$y) * $cosangle - ($center_x-$x) * $sinangle)
       + $center_y;
       + $center_y;
-   
+
     if ( $old_x >= 0 && $old_x < $src_x
     if ( $old_x >= 0 && $old_x < $src_x
          && $old_y >= 0 && $old_y < $src_y ) {
          && $old_y >= 0 && $old_y < $src_y ) {
       if ($bicubic == true) {
       if ($bicubic == true) {
@@ -1176,12 +1176,12 @@ function getRootPath() {
         $sX  = $old_x + 1;
         $sX  = $old_x + 1;
         $siX  = $old_x;
         $siX  = $old_x;
         $siX2 = $old_x - 1;
         $siX2 = $old_x - 1;
-       
+
         $c1 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY2));
         $c1 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY2));
         $c2 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY));
         $c2 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY));
         $c3 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY2));
         $c3 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY2));
         $c4 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY));
         $c4 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY));
-       
+
         $r = ($c1['red']  + $c2['red']  + $c3['red']  + $c4['red']  ) << 14;
         $r = ($c1['red']  + $c2['red']  + $c3['red']  + $c4['red']  ) << 14;
         $g = ($c1['green'] + $c2['green'] + $c3['green'] + $c4['green']) << 6;
         $g = ($c1['green'] + $c2['green'] + $c3['green'] + $c4['green']) << 6;
         $b = ($c1['blue']  + $c2['blue']  + $c3['blue']  + $c4['blue'] ) >> 2;
         $b = ($c1['blue']  + $c2['blue']  + $c3['blue']  + $c4['blue'] ) >> 2;
@@ -1197,7 +1197,7 @@ function getRootPath() {
     imagesetpixel($rotate, $x, $y, $color);
     imagesetpixel($rotate, $x, $y, $color);
       }
       }
     }
     }
-    return $rotate;          	
+    return $rotate;
 /*                $src_x = @imagesx($src_img);
 /*                $src_x = @imagesx($src_img);
                 $src_y = @imagesy($src_img);
                 $src_y = @imagesy($src_img);
                 if ($angle == 180)
                 if ($angle == 180)
@@ -1210,19 +1210,19 @@ function getRootPath() {
                     $dest_x = $src_y;
                     $dest_x = $src_y;
                     $dest_y = $src_x;
                     $dest_y = $src_x;
                 }
                 }
-                elseif ($src_x >= $src_y) 
+                elseif ($src_x >= $src_y)
                 {
                 {
                     $dest_x = $src_y;
                     $dest_x = $src_y;
                     $dest_y = $src_x;
                     $dest_y = $src_x;
-                }     
+                }
 		 		if(function_exists('ImageCreateTrueColor'))
 		 		if(function_exists('ImageCreateTrueColor'))
 		 		{
 		 		{
 					$rotate = @ImageCreateTrueColor($dst_w,$dst_h);
 					$rotate = @ImageCreateTrueColor($dst_w,$dst_h);
 				} else {
 				} else {
 					$rotate = @ImageCreate($dst_w,$dst_h);
 					$rotate = @ImageCreate($dst_w,$dst_h);
-				}                   
+				}
                 @imagealphablending($rotate, false);
                 @imagealphablending($rotate, false);
-               
+
                 switch ($angle)
                 switch ($angle)
                 {
                 {
                     case 270:
                     case 270:
@@ -1259,5 +1259,5 @@ function getRootPath() {
                 };
                 };
                 return $rotate;*/
                 return $rotate;*/
             }
             }
-        }  
+        }
 ?>
 ?>

+ 6 - 6
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/ar.php

@@ -17,7 +17,7 @@
 	define('LBL_MODIFIED', 'تعديل');
 	define('LBL_MODIFIED', 'تعديل');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'معلومات الملف');
 	define('LBL_FILE_INFO', 'معلومات الملف');
-	define('LBL_FILE_NAME', 'اسم الملف :');	
+	define('LBL_FILE_NAME', 'اسم الملف :');
 	define('LBL_FILE_CREATED', 'الأنشاء :');
 	define('LBL_FILE_CREATED', 'الأنشاء :');
 	define("LBL_FILE_MODIFIED", 'اخر تعديل :');
 	define("LBL_FILE_MODIFIED", 'اخر تعديل :');
 	define("LBL_FILE_SIZE", 'حجم الملف :');
 	define("LBL_FILE_SIZE", 'حجم الملف :');
@@ -62,7 +62,7 @@
 	define('ERR_FOLDER_EXISTS', 'يجب عليك اختيار اسم غير موجود في المجلد.');
 	define('ERR_FOLDER_EXISTS', 'يجب عليك اختيار اسم غير موجود في المجلد.');
 	define('ERR_FOLDER_CREATION_FAILED', 'لم يتم الأنشاء , الرجاء المحاولة مرة اخرى.');
 	define('ERR_FOLDER_CREATION_FAILED', 'لم يتم الأنشاء , الرجاء المحاولة مرة اخرى.');
 	define('ERR_FOLDER_NAME_EMPTY', 'يجب عليك كتابة الاسم.');
 	define('ERR_FOLDER_NAME_EMPTY', 'يجب عليك كتابة الاسم.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'يجب ان يحتوي الاسم على احرف , ارقام , فراغ , . , _ فقط');
 	define("ERR_FILE_NAME_FORMAT", 'يجب ان يحتوي الاسم على احرف , ارقام , فراغ , . , _ فقط');
 	define('ERR_FILE_NOT_UPLOADED', 'لم يتم اختيار اي ملف , الرجاء المحازلة مرة اخرى');
 	define('ERR_FILE_NOT_UPLOADED', 'لم يتم اختيار اي ملف , الرجاء المحازلة مرة اخرى');
@@ -70,7 +70,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'يمكننا ان نقو بتحريك الملف');
 	define('ERR_FILE_MOVE_FAILED', 'يمكننا ان نقو بتحريك الملف');
 	define('ERR_FILE_NOT_AVAILABLE', 'الملف غير متوفر');
 	define('ERR_FILE_NOT_AVAILABLE', 'الملف غير متوفر');
 	define('ERROR_FILE_TOO_BID', 'حجم الملف كبير جدا , (اقصى حجم : %s )');
 	define('ERROR_FILE_TOO_BID', 'حجم الملف كبير جدا , (اقصى حجم : %s )');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', ' اضغط للدخول الى المجلد...');
 	define('TIP_FOLDER_GO_DOWN', ' اضغط للدخول الى المجلد...');
@@ -90,7 +90,7 @@
 	define('LOGIN_FORM_TITLE', 'تسجيل الدخول');
 	define('LOGIN_FORM_TITLE', 'تسجيل الدخول');
 	define('LOGIN_USERNAME', 'أسم المستخدم:');
 	define('LOGIN_USERNAME', 'أسم المستخدم:');
 	define('LOGIN_PASSWORD', 'كلمة المرور :');
 	define('LOGIN_PASSWORD', 'كلمة المرور :');
-	define('LOGIN_FAILED', 'اسم مستخدم \ كلمة مرور خطا!'); 
-    	
-	
+	define('LOGIN_FAILED', 'اسم مستخدم \ كلمة مرور خطا!');
+
+
 ?>
 ?>

+ 48 - 48
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/bg.php

@@ -9,7 +9,7 @@
 	define('DATE_TIME_FORMAT', 'd.m.Y H:i:s');
 	define('DATE_TIME_FORMAT', 'd.m.Y H:i:s');
 	//Common
 	//Common
 	//Menu
 	//Menu
-	
+
 define('MENU_SELECT', 'Избери');
 define('MENU_SELECT', 'Избери');
 define('MENU_DOWNLOAD', 'Изтегли');
 define('MENU_DOWNLOAD', 'Изтегли');
 define('MENU_PREVIEW', 'Преглед');
 define('MENU_PREVIEW', 'Преглед');
@@ -20,8 +20,8 @@ define('MENU_COPY', 'Копирай');
 define('MENU_DELETE', 'Изтрий');
 define('MENU_DELETE', 'Изтрий');
 define('MENU_PLAY', 'Отвори');
 define('MENU_PLAY', 'Отвори');
 define('MENU_PASTE', 'Постави');
 define('MENU_PASTE', 'Постави');
-//Label 
-//Top Action 
+//Label
+//Top Action
 define('LBL_ACTION_REFRESH', 'Обнови');
 define('LBL_ACTION_REFRESH', 'Обнови');
 define('LBL_ACTION_DELETE', 'Изтрий');
 define('LBL_ACTION_DELETE', 'Изтрий');
 define('LBL_ACTION_CUT', 'Отрежи');
 define('LBL_ACTION_CUT', 'Отрежи');
@@ -29,11 +29,11 @@ define('LBL_ACTION_COPY', 'Копирай');
 define('LBL_ACTION_PASTE', 'Постави');
 define('LBL_ACTION_PASTE', 'Постави');
 define('LBL_ACTION_CLOSE', 'Затвори');
 define('LBL_ACTION_CLOSE', 'Затвори');
 define('LBL_ACTION_SELECT_ALL', 'Избери всички');
 define('LBL_ACTION_SELECT_ALL', 'Избери всички');
-//File Listing 
+//File Listing
 define('LBL_NAME', 'Име');
 define('LBL_NAME', 'Име');
 define('LBL_SIZE', 'Размер');
 define('LBL_SIZE', 'Размер');
 define('LBL_MODIFIED', 'Промяна');
 define('LBL_MODIFIED', 'Промяна');
-//File Information 
+//File Information
 define('LBL_FILE_INFO', 'Информация за файла:');
 define('LBL_FILE_INFO', 'Информация за файла:');
 define('LBL_FILE_NAME', 'Име:');
 define('LBL_FILE_NAME', 'Име:');
 define('LBL_FILE_CREATED', 'Създаване:');
 define('LBL_FILE_CREATED', 'Създаване:');
@@ -42,7 +42,7 @@ define('LBL_FILE_SIZE', 'Размер:');
 define('LBL_FILE_TYPE', 'Тип файл:');
 define('LBL_FILE_TYPE', 'Тип файл:');
 define('LBL_FILE_WRITABLE', 'За запис?');
 define('LBL_FILE_WRITABLE', 'За запис?');
 define('LBL_FILE_READABLE', 'За четене?');
 define('LBL_FILE_READABLE', 'За четене?');
-//Folder Information 
+//Folder Information
 define('LBL_FOLDER_INFO', 'Информация за папка');
 define('LBL_FOLDER_INFO', 'Информация за папка');
 define('LBL_FOLDER_PATH', 'Папка:');
 define('LBL_FOLDER_PATH', 'Папка:');
 define('LBL_CURRENT_FOLDER_PATH', 'Текуща папка:');
 define('LBL_CURRENT_FOLDER_PATH', 'Текуща папка:');
@@ -53,10 +53,10 @@ define('LBL_FOLDER_FIELS', 'Файлове:');
 define('LBL_FOLDER_WRITABLE', 'За запис');
 define('LBL_FOLDER_WRITABLE', 'За запис');
 define('LBL_FOLDER_READABLE', 'За четене');
 define('LBL_FOLDER_READABLE', 'За четене');
 define('LBL_FOLDER_ROOT', 'Главна папка');
 define('LBL_FOLDER_ROOT', 'Главна папка');
-//Preview 
+//Preview
 define('LBL_PREVIEW', 'Преглед');
 define('LBL_PREVIEW', 'Преглед');
 define('LBL_CLICK_PREVIEW', 'Щракнете тук, за преглед.');
 define('LBL_CLICK_PREVIEW', 'Щракнете тук, за преглед.');
-//Buttons 
+//Buttons
 define('LBL_BTN_SELECT', 'Избор');
 define('LBL_BTN_SELECT', 'Избор');
 define('LBL_BTN_CANCEL', 'Отказ');
 define('LBL_BTN_CANCEL', 'Отказ');
 define('LBL_BTN_UPLOAD', 'Качи на сървъра');
 define('LBL_BTN_UPLOAD', 'Качи на сървъра');
@@ -70,20 +70,20 @@ define('LBL_BTN_VIEW_TEXT', 'Текст');
 define('LBL_BTN_VIEW_DETAILS', 'Списък');
 define('LBL_BTN_VIEW_DETAILS', 'Списък');
 define('LBL_BTN_VIEW_THUMBNAIL', 'Икони');
 define('LBL_BTN_VIEW_THUMBNAIL', 'Икони');
 define('LBL_BTN_VIEW_OPTIONS', 'Изглед:&nbsp;&nbsp;');
 define('LBL_BTN_VIEW_OPTIONS', 'Изглед:&nbsp;&nbsp;');
-//pagination 
+//pagination
 define('PAGINATION_NEXT', 'Следваща');
 define('PAGINATION_NEXT', 'Следваща');
 define('PAGINATION_PREVIOUS', 'Назад');
 define('PAGINATION_PREVIOUS', 'Назад');
 define('PAGINATION_LAST', 'Последна');
 define('PAGINATION_LAST', 'Последна');
 define('PAGINATION_FIRST', 'Първа');
 define('PAGINATION_FIRST', 'Първа');
 define('PAGINATION_ITEMS_PER_PAGE', 'Покажи %s на страница');
 define('PAGINATION_ITEMS_PER_PAGE', 'Покажи %s на страница');
 define('PAGINATION_GO_PARENT', 'Върни към родителската папка');
 define('PAGINATION_GO_PARENT', 'Върни към родителската папка');
-//System 
+//System
 define('SYS_DISABLED', 'Системата е изключена.');
 define('SYS_DISABLED', 'Системата е изключена.');
-//Cut 
+//Cut
 define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'Няма избран документ.');
 define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'Няма избран документ.');
-//Copy 
+//Copy
 define('ERR_NOT_DOC_SELECTED_FOR_COPY', 'Няма избран документл.');
 define('ERR_NOT_DOC_SELECTED_FOR_COPY', 'Няма избран документл.');
-//Paste 
+//Paste
 define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Няма избран документ.');
 define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Няма избран документ.');
 define('WARNING_CUT_PASTE', 'Сигурни ли сте?');
 define('WARNING_CUT_PASTE', 'Сигурни ли сте?');
 define('WARNING_COPY_PASTE', 'Сигурни ли сте за копирането на избраните документи в текущата папка?');
 define('WARNING_COPY_PASTE', 'Сигурни ли сте за копирането на избраните документи в текущата папка?');
@@ -96,7 +96,7 @@ define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Неуспех да преместит
 
 
 define('ERR_NOT_FILES_PASTED', 'Файлът не е заместен.');
 define('ERR_NOT_FILES_PASTED', 'Файлът не е заместен.');
 
 
-//Search 
+//Search
 define('LBL_SEARCH', 'Търсене');
 define('LBL_SEARCH', 'Търсене');
 define('LBL_SEARCH_NAME', 'Име или част от име на файл:');
 define('LBL_SEARCH_NAME', 'Име или част от име на файл:');
 define('LBL_SEARCH_FOLDER', 'Търсене в:');
 define('LBL_SEARCH_FOLDER', 'Търсене в:');
@@ -122,14 +122,14 @@ define('SEARCH_TYPE_TEXT', 'Текст');
 define('SEARCH_TYPE_XML', 'XML');
 define('SEARCH_TYPE_XML', 'XML');
 define('SEARCH_ALL_FILE_TYPES', 'Всички типове файлове');
 define('SEARCH_ALL_FILE_TYPES', 'Всички типове файлове');
 define('LBL_SEARCH_RECURSIVELY', 'Търсене и в подпапки:');
 define('LBL_SEARCH_RECURSIVELY', 'Търсене и в подпапки:');
-define('LBL_RECURSIVELY_YES', 'Да'); 
+define('LBL_RECURSIVELY_YES', 'Да');
 define('LBL_RECURSIVELY_NO', 'Не');
 define('LBL_RECURSIVELY_NO', 'Не');
 define('BTN_SEARCH', 'Търси сега');
 define('BTN_SEARCH', 'Търси сега');
-//thickbox 
+//thickbox
 define('THICKBOX_NEXT', 'Следващ>');
 define('THICKBOX_NEXT', 'Следващ>');
 define('THICKBOX_PREVIOUS', '<Предишен');
 define('THICKBOX_PREVIOUS', '<Предишен');
 define('THICKBOX_CLOSE', 'Затвори');
 define('THICKBOX_CLOSE', 'Затвори');
-//Calendar 
+//Calendar
 define('CALENDAR_CLOSE', 'Затвори');
 define('CALENDAR_CLOSE', 'Затвори');
 define('CALENDAR_CLEAR', 'Изчисти');
 define('CALENDAR_CLEAR', 'Изчисти');
 define('CALENDAR_PREVIOUS', '<Предишен');
 define('CALENDAR_PREVIOUS', '<Предишен');
@@ -154,15 +154,15 @@ define('CALENDAR_SEP', 'Сеп');
 define('CALENDAR_OCT', 'Окт');
 define('CALENDAR_OCT', 'Окт');
 define('CALENDAR_NOV', 'Ное');
 define('CALENDAR_NOV', 'Ное');
 define('CALENDAR_DEC', 'Дек');
 define('CALENDAR_DEC', 'Дек');
-//ERROR MESSAGES 
-//deletion 
+//ERROR MESSAGES
+//deletion
 define('ERR_NOT_FILE_SELECTED', 'Моля, изберете файл.');
 define('ERR_NOT_FILE_SELECTED', 'Моля, изберете файл.');
 define('ERR_NOT_DOC_SELECTED', 'Няма избран документ.');
 define('ERR_NOT_DOC_SELECTED', 'Няма избран документ.');
 define('ERR_DELTED_FAILED', 'Не може да се изтрие избраният документ (и).');
 define('ERR_DELTED_FAILED', 'Не може да се изтрие избраният документ (и).');
 define('ERR_FOLDER_PATH_NOT_ALLOWED', ' Пътят към папката не е позволен.');
 define('ERR_FOLDER_PATH_NOT_ALLOWED', ' Пътят към папката не е позволен.');
-//class manager 
+//class manager
 define('ERR_FOLDER_NOT_FOUND', 'Папката не е намерена:');
 define('ERR_FOLDER_NOT_FOUND', 'Папката не е намерена:');
-//rename 
+//rename
 define('ERR_RENAME_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_RENAME_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_RENAME_EXISTS', 'Името се повтаря. Въведете име, което е уникално в рамките на тази папка.');
 define('ERR_RENAME_EXISTS', 'Името се повтаря. Въведете име, което е уникално в рамките на тази папка.');
 define('ERR_RENAME_FILE_NOT_EXISTS', 'Този файл или тази папка не съществува.');
 define('ERR_RENAME_FILE_NOT_EXISTS', 'Този файл или тази папка не съществува.');
@@ -170,7 +170,7 @@ define('ERR_RENAME_FAILED', 'Не може да го преименувате, 
 define('ERR_RENAME_EMPTY', 'Въведете име.');
 define('ERR_RENAME_EMPTY', 'Въведете име.');
 define('ERR_NO_CHANGES_MADE', 'Няма извършени промени.');
 define('ERR_NO_CHANGES_MADE', 'Няма извършени промени.');
 define('ERR_RENAME_FILE_TYPE_NOT_PERMITED', 'Вие нямате права за промяна на име на файл с такова разширение.');
 define('ERR_RENAME_FILE_TYPE_NOT_PERMITED', 'Вие нямате права за промяна на име на файл с такова разширение.');
-//folder creation 
+//folder creation
 define('ERR_FOLDER_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_FOLDER_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_FOLDER_EXISTS', 'Името се повтаря. Въведете име, което е уникално.');
 define('ERR_FOLDER_EXISTS', 'Името се повтаря. Въведете име, което е уникално.');
 define('ERR_FOLDER_CREATION_FAILED', 'Невъзможно е да се създаде папка, моля, опитайте отново.');
 define('ERR_FOLDER_CREATION_FAILED', 'Невъзможно е да се създаде папка, моля, опитайте отново.');
@@ -178,11 +178,11 @@ define('ERR_FOLDER_NAME_EMPTY', 'Въведете име.');
 define('FOLDER_FORM_TITLE', 'Нова папка');
 define('FOLDER_FORM_TITLE', 'Нова папка');
 define('FOLDER_LBL_TITLE', 'Име на папката:');
 define('FOLDER_LBL_TITLE', 'Име на папката:');
 define('FOLDER_LBL_CREATE', 'Създаване на папка');
 define('FOLDER_LBL_CREATE', 'Създаване на папка');
-//New File 
+//New File
 define('NEW_FILE_FORM_TITLE', 'Нов файл');
 define('NEW_FILE_FORM_TITLE', 'Нов файл');
 define('NEW_FILE_LBL_TITLE', 'Име на файла:');
 define('NEW_FILE_LBL_TITLE', 'Име на файла:');
 define('NEW_FILE_CREATE', 'Създаване на файл');
 define('NEW_FILE_CREATE', 'Създаване на файл');
-//file upload 
+//file upload
 define('ERR_FILE_NAME_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_FILE_NAME_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_FILE_NOT_UPLOADED', 'Не е избран файл за качване.');
 define('ERR_FILE_NOT_UPLOADED', 'Не е избран файл за качване.');
 define('ERR_FILE_TYPE_NOT_ALLOWED', 'Нямате права да качвате такъв тип файл.');
 define('ERR_FILE_TYPE_NOT_ALLOWED', 'Нямате права да качвате такъв тип файл.');
@@ -194,39 +194,39 @@ define('FILE_LABEL_SELECT', 'Избор на файл');
 define('FILE_LBL_MORE', 'Добавяне на файл за качване');
 define('FILE_LBL_MORE', 'Добавяне на файл за качване');
 define('FILE_CANCEL_UPLOAD', 'Отказ качване на файлове');
 define('FILE_CANCEL_UPLOAD', 'Отказ качване на файлове');
 define('FILE_LBL_UPLOAD', 'Качване');
 define('FILE_LBL_UPLOAD', 'Качване');
-//file download 
+//file download
 define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Няма избрани файлове за изтегляне. ');
 define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Няма избрани файлове за изтегляне. ');
-//Rename 
-define('RENAME_FORM_TITLE', 'Преименувай'); 
+//Rename
+define('RENAME_FORM_TITLE', 'Преименувай');
 define('RENAME_NEW_NAME', 'Ново име');
 define('RENAME_NEW_NAME', 'Ново име');
 define('RENAME_LBL_RENAME', 'Преименуване');
 define('RENAME_LBL_RENAME', 'Преименуване');
 
 
-//Tips 
+//Tips
 define('TIP_FOLDER_GO_DOWN', 'Щракнете веднъж за да стигнете до тази папка ...');
 define('TIP_FOLDER_GO_DOWN', 'Щракнете веднъж за да стигнете до тази папка ...');
 define('TIP_DOC_RENAME', 'Щракнете два пъти за да редактирате ...');
 define('TIP_DOC_RENAME', 'Щракнете два пъти за да редактирате ...');
 define('TIP_FOLDER_GO_UP', 'Щракнете веднъж за да стигнте до родителската папка ...');
 define('TIP_FOLDER_GO_UP', 'Щракнете веднъж за да стигнте до родителската папка ...');
 define('TIP_SELECT_ALL', 'Избери всички');
 define('TIP_SELECT_ALL', 'Избери всички');
 define('TIP_UNSELECT_ALL', 'Премахни всички');
 define('TIP_UNSELECT_ALL', 'Премахни всички');
-//WARNING 
+//WARNING
 define('WARNING_DELETE', 'Сигурни ли сте за изтриването?');
 define('WARNING_DELETE', 'Сигурни ли сте за изтриването?');
 define('WARNING_IMAGE_EDIT', 'Моля, изберете изображение за редактиране.');
 define('WARNING_IMAGE_EDIT', 'Моля, изберете изображение за редактиране.');
 define('WARNING_NOT_FILE_EDIT', 'Моля, изберете файла за редактиране.');
 define('WARNING_NOT_FILE_EDIT', 'Моля, изберете файла за редактиране.');
 define('WARING_WINDOW_CLOSE', 'Сигурни ли сте, че искате за да затворите прозореца?');
 define('WARING_WINDOW_CLOSE', 'Сигурни ли сте, че искате за да затворите прозореца?');
-//Preview 
+//Preview
 define('PREVIEW_NOT_PREVIEW', 'Невъзможен преглед.');
 define('PREVIEW_NOT_PREVIEW', 'Невъзможен преглед.');
 define('PREVIEW_OPEN_FAILED', 'Невъзможно е да отворите файла.');
 define('PREVIEW_OPEN_FAILED', 'Невъзможно е да отворите файла.');
 define('PREVIEW_IMAGE_LOAD_FAILED', 'Невъзможно е зареждане на изображението');
 define('PREVIEW_IMAGE_LOAD_FAILED', 'Невъзможно е зареждане на изображението');
 
 
-//Login 
+//Login
 define('LOGIN_PAGE_TITLE', 'Файлов мениджър, автентикация');
 define('LOGIN_PAGE_TITLE', 'Файлов мениджър, автентикация');
 define('LOGIN_FORM_TITLE', 'Вход');
 define('LOGIN_FORM_TITLE', 'Вход');
 define('LOGIN_USERNAME', 'Потребител:');
 define('LOGIN_USERNAME', 'Потребител:');
 define('LOGIN_PASSWORD', 'Парола:');
 define('LOGIN_PASSWORD', 'Парола:');
 define('LOGIN_FAILED', 'Невалидно потребителско име/парола.');
 define('LOGIN_FAILED', 'Невалидно потребителско име/парола.');
-//88888888888   Below for Image Editor   888888888888888888888 
-//Warning 
+//88888888888   Below for Image Editor   888888888888888888888
+//Warning
 define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'Няма промени в изображенията.');
 define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'Няма промени в изображенията.');
-//General 
+//General
 define('IMG_GEN_IMG_NOT_EXISTS', 'Изображението не съществува');
 define('IMG_GEN_IMG_NOT_EXISTS', 'Изображението не съществува');
 define('IMG_WARNING_LOST_CHANAGES', 'Всички незапазени промени, направени в изображението ще се загубят, сигурни ли сте, че искате да продължите?');
 define('IMG_WARNING_LOST_CHANAGES', 'Всички незапазени промени, направени в изображението ще се загубят, сигурни ли сте, че искате да продължите?');
 define('IMG_WARNING_REST', 'Всички незапазени промени, направени в изображението ще бъдат загубени, Сигурни ли сте, че искате да продължите?');
 define('IMG_WARNING_REST', 'Всички незапазени промени, направени в изображението ще бъдат загубени, Сигурни ли сте, че искате да продължите?');
@@ -236,12 +236,12 @@ define('IMG_WARNING_UNDO', 'Сигурни ли сте, че искате да 
 define('IMG_WARING_FLIP_H', 'Сигурни ли сте, че искате да завъртите изображението хоризонтално?');
 define('IMG_WARING_FLIP_H', 'Сигурни ли сте, че искате да завъртите изображението хоризонтално?');
 define('IMG_WARING_FLIP_V', 'Сигурни ли сте, че искате да завъртите изображението вертикално?');
 define('IMG_WARING_FLIP_V', 'Сигурни ли сте, че искате да завъртите изображението вертикално?');
 define('IMG_INFO', 'Информация за изображението');
 define('IMG_INFO', 'Информация за изображението');
-//Mode 
+//Mode
 define('IMG_MODE_RESIZE', 'Промяна на размера >>');
 define('IMG_MODE_RESIZE', 'Промяна на размера >>');
 define('IMG_MODE_CROP', 'Изрязване>>');
 define('IMG_MODE_CROP', 'Изрязване>>');
 define('IMG_MODE_ROTATE', 'Завъртане>>');
 define('IMG_MODE_ROTATE', 'Завъртане>>');
 define('IMG_MODE_FLIP', 'Огледално>>');
 define('IMG_MODE_FLIP', 'Огледално>>');
-//Button 
+//Button
 define('IMG_BTN_ROTATE_LEFT', '90 °наляво');
 define('IMG_BTN_ROTATE_LEFT', '90 °наляво');
 define('IMG_BTN_ROTATE_RIGHT', '90 ° надясно');
 define('IMG_BTN_ROTATE_RIGHT', '90 ° надясно');
 define('IMG_BTN_FLIP_H', 'Хоризонтално');
 define('IMG_BTN_FLIP_H', 'Хоризонтално');
@@ -252,9 +252,9 @@ define('IMG_BTN_SAVE', 'Запиши');
 define('IMG_BTN_CLOSE', 'Затвори');
 define('IMG_BTN_CLOSE', 'Затвори');
 define('IMG_BTN_SAVE_AS', 'Запиши като');
 define('IMG_BTN_SAVE_AS', 'Запиши като');
 define('IMG_BTN_CANCEL', 'Отказ');
 define('IMG_BTN_CANCEL', 'Отказ');
-//Checkbox 
+//Checkbox
 define('IMG_CHECKBOX_CONSTRAINT', 'Съразмерно >>');
 define('IMG_CHECKBOX_CONSTRAINT', 'Съразмерно >>');
-//Label 
+//Label
 define('IMG_LBL_WIDTH', 'Ширина:');
 define('IMG_LBL_WIDTH', 'Ширина:');
 define('IMG_LBL_HEIGHT', 'Височина:');
 define('IMG_LBL_HEIGHT', 'Височина:');
 define('IMG_LBL_X', 'X:');
 define('IMG_LBL_X', 'X:');
@@ -265,15 +265,15 @@ define('IMG_LBL_NEW_NAME', 'Ново име:');
 define('IMG_LBL_SAVE_AS', 'Запиши като');
 define('IMG_LBL_SAVE_AS', 'Запиши като');
 define('IMG_LBL_SAVE_TO', 'Записване в:');
 define('IMG_LBL_SAVE_TO', 'Записване в:');
 define('IMG_LBL_ROOT_FOLDER', 'Главна папка');
 define('IMG_LBL_ROOT_FOLDER', 'Главна папка');
-//Editor 
-//Save as 
+//Editor
+//Save as
 define('IMG_NEW_NAME_COMMENTS', 'Моля, не поставяйте разширение на името.');
 define('IMG_NEW_NAME_COMMENTS', 'Моля, не поставяйте разширение на името.');
 define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Няма избрана папка.');
 define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Няма избрана папка.');
 define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Папката не съществува.');
 define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Папката не съществува.');
 define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Съществува изображение със същото име.');
 define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Съществува изображение със същото име.');
 
 
-//Save 
+//Save
 define('IMG_SAVE_EMPTY_PATH', 'Няма път към изображението.');
 define('IMG_SAVE_EMPTY_PATH', 'Няма път към изображението.');
 define('IMG_SAVE_NOT_EXISTS', 'Изображението не съществува.');
 define('IMG_SAVE_NOT_EXISTS', 'Изображението не съществува.');
 define('IMG_SAVE_PATH_DISALLOWED', 'Вие нямате разрешение за достъп до този файл.');
 define('IMG_SAVE_PATH_DISALLOWED', 'Вие нямате разрешение за достъп до този файл.');
@@ -286,17 +286,17 @@ define('IMG_SAVE_ROTATE_FAILED', 'Невъзможна е промяната н
 define('IMG_SAVE_FLIP_FAILED', 'Невъзможна е промяната на изображението.');
 define('IMG_SAVE_FLIP_FAILED', 'Невъзможна е промяната на изображението.');
 define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Невъзможно е отварянето на изображението.');
 define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Невъзможно е отварянето на изображението.');
 define('IMG_SAVE_IMG_OPEN_FAILED', 'евъзможно е отварянето на изображението.');
 define('IMG_SAVE_IMG_OPEN_FAILED', 'евъзможно е отварянето на изображението.');
-//UNDO 
+//UNDO
 define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Няма записани предишни състояния.');
 define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Няма записани предишни състояния.');
 define('IMG_UNDO_COPY_FAILED', 'Невъзможно е да се направи.');
 define('IMG_UNDO_COPY_FAILED', 'Невъзможно е да се направи.');
 define('IMG_UNDO_DEL_FAILED', 'Невъзможно е да се направи.');
 define('IMG_UNDO_DEL_FAILED', 'Невъзможно е да се направи.');
-//88888888888   Above for Image Editor   888888888888888888888 
-//88888888888   Session   888888888888888888888 
+//88888888888   Above for Image Editor   888888888888888888888
+//88888888888   Session   888888888888888888888
 define('SESSION_PERSONAL_DIR_NOT_FOUND', 'Невъзможно е да се направи.');
 define('SESSION_PERSONAL_DIR_NOT_FOUND', 'Невъзможно е да се направи.');
 define('SESSION_COUNTER_FILE_CREATE_FAILED', 'Невъзможно е да се направи.');
 define('SESSION_COUNTER_FILE_CREATE_FAILED', 'Невъзможно е да се направи.');
 define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Невъзможно е да се направи.');
 define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Невъзможно е да се направи.');
-//88888888888   Session   888888888888888888888 
-//88888888888   Below for Text Editor   888888888888888888888 
+//88888888888   Session   888888888888888888888
+//88888888888   Below for Text Editor   888888888888888888888
 define('TXT_FILE_NOT_FOUND', 'Файлът не е намерен.');
 define('TXT_FILE_NOT_FOUND', 'Файлът не е намерен.');
 define('TXT_EXT_NOT_SELECTED', 'Моля, изберете файлово разширение.');
 define('TXT_EXT_NOT_SELECTED', 'Моля, изберете файлово разширение.');
 define('TXT_DEST_FOLDER_NOT_SELECTED', 'Моля, изберете папка.');
 define('TXT_DEST_FOLDER_NOT_SELECTED', 'Моля, изберете папка.');
@@ -311,6 +311,6 @@ define('TXT_CONTENT_UPDATE_FAILED', 'Неуспех да се актуализи
 define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 
 
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 5 - 5
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/da.php

@@ -17,7 +17,7 @@
 	define('LBL_MODIFIED', 'Ændret');
 	define('LBL_MODIFIED', 'Ændret');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Fil Information:');
 	define('LBL_FILE_INFO', 'Fil Information:');
-	define('LBL_FILE_NAME', 'Navn:');	
+	define('LBL_FILE_NAME', 'Navn:');
 	define('LBL_FILE_CREATED', 'Uploaded:');
 	define('LBL_FILE_CREATED', 'Uploaded:');
 	define("LBL_FILE_MODIFIED", 'Ændret:');
 	define("LBL_FILE_MODIFIED", 'Ændret:');
 	define("LBL_FILE_SIZE", 'Fil Str:');
 	define("LBL_FILE_SIZE", 'Fil Str:');
@@ -62,7 +62,7 @@
 	define('ERR_FOLDER_EXISTS', 'Giv venligst mappen et unikt navn.');
 	define('ERR_FOLDER_EXISTS', 'Giv venligst mappen et unikt navn.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Kan ikke oprette mappen, prøv igen.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Kan ikke oprette mappen, prøv igen.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Skriv venligst et navn.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Skriv venligst et navn.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Brug kun bogstaver, tal, mellemrum, bindestreg og understregning.');
 	define("ERR_FILE_NAME_FORMAT", 'Brug kun bogstaver, tal, mellemrum, bindestreg og understregning.');
 	define('ERR_FILE_NOT_UPLOADED', 'Vælg venligst en fil, der skal uploades.');
 	define('ERR_FILE_NOT_UPLOADED', 'Vælg venligst en fil, der skal uploades.');
@@ -70,7 +70,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Kan ikke flytte filen.');
 	define('ERR_FILE_MOVE_FAILED', 'Kan ikke flytte filen.');
 	define('ERR_FILE_NOT_AVAILABLE', 'Filen findes ikke.');
 	define('ERR_FILE_NOT_AVAILABLE', 'Filen findes ikke.');
 	define('ERROR_FILE_TOO_BID', 'Filen er for stor. (max: %s)');
 	define('ERROR_FILE_TOO_BID', 'Filen er for stor. (max: %s)');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Enkelt klik for at se denne mappe...');
 	define('TIP_FOLDER_GO_DOWN', 'Enkelt klik for at se denne mappe...');
@@ -91,6 +91,6 @@
 	define('LOGIN_USERNAME', 'Brugernavn:');
 	define('LOGIN_USERNAME', 'Brugernavn:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Forkert bruger/password.');
 	define('LOGIN_FAILED', 'Forkert bruger/password.');
-	
-	
+
+
 ?>
 ?>

+ 21 - 21
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/de.php

@@ -21,7 +21,7 @@
 	define('LBL_MODIFIED', 'Ge&auml;ndert am');
 	define('LBL_MODIFIED', 'Ge&auml;ndert am');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Datei Information:');
 	define('LBL_FILE_INFO', 'Datei Information:');
-	define('LBL_FILE_NAME', 'Name:');	
+	define('LBL_FILE_NAME', 'Name:');
 	define('LBL_FILE_CREATED', 'Erstellt am:');
 	define('LBL_FILE_CREATED', 'Erstellt am:');
 	define("LBL_FILE_MODIFIED", 'Ge&auml;ndert am:');
 	define("LBL_FILE_MODIFIED", 'Ge&auml;ndert am:');
 	define("LBL_FILE_SIZE", 'Datei Gr&ouml;&szlig;e:');
 	define("LBL_FILE_SIZE", 'Datei Gr&ouml;&szlig;e:');
@@ -56,7 +56,7 @@
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Kein(e) Dokument(e) ausgew&auml;hlt zum einf&uuml;gen.');
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Kein(e) Dokument(e) ausgew&auml;hlt zum einf&uuml;gen.');
 	define('WARNING_CUT_PASTE', 'Bist du sicher, dass du die ausgew&auml;hlten Dokumente in diesem Ordner verschieben willst?');
 	define('WARNING_CUT_PASTE', 'Bist du sicher, dass du die ausgew&auml;hlten Dokumente in diesem Ordner verschieben willst?');
 	define('WARNING_COPY_PASTE', 'Bist du sicher, dass du die ausgew&auml;hlten Dokumente in diesem Ordner kopieren willst?');
 	define('WARNING_COPY_PASTE', 'Bist du sicher, dass du die ausgew&auml;hlten Dokumente in diesem Ordner kopieren willst?');
-	
+
 	//ERROR MESSAGES
 	//ERROR MESSAGES
 		//deletion
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Bitte w&auml;hle eine Datei.');
 	define('ERR_NOT_FILE_SELECTED', 'Bitte w&auml;hle eine Datei.');
@@ -78,7 +78,7 @@
 	define('ERR_FOLDER_EXISTS', 'Bitte verwende einen Namen der in diesem Ordner noch nicht verwendet wird.');
 	define('ERR_FOLDER_EXISTS', 'Bitte verwende einen Namen der in diesem Ordner noch nicht verwendet wird.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Kann den Ordner nicht erstellen, bitte versuche es nochmals.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Kann den Ordner nicht erstellen, bitte versuche es nochmals.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Bitte gib ihm einen Namen.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Bitte gib ihm einen Namen.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
 	define("ERR_FILE_NAME_FORMAT", 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
 	define('ERR_FILE_NOT_UPLOADED', 'Es wurde keine Datei f&uuml;r den Upload ausgew&auml;hlt.');
 	define('ERR_FILE_NOT_UPLOADED', 'Es wurde keine Datei f&uuml;r den Upload ausgew&auml;hlt.');
@@ -88,7 +88,7 @@
 	define('ERROR_FILE_TOO_BID', 'Datei zu gro&szlig;. (max: %s)');
 	define('ERROR_FILE_TOO_BID', 'Datei zu gro&szlig;. (max: %s)');
 	//file download
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Keine Dateien zum herunterladen ausgew&auml;hlt.');
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Keine Dateien zum herunterladen ausgew&auml;hlt.');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Einfach klicken um zu diesem Ordner zu gelangen...');
 	define('TIP_FOLDER_GO_DOWN', 'Einfach klicken um zu diesem Ordner zu gelangen...');
@@ -100,7 +100,7 @@
 	define('WARNING_DELETE', 'Bist du sicher, dass die diese Dateien l&ouml;schen m&ouml;chtest?.');
 	define('WARNING_DELETE', 'Bist du sicher, dass die diese Dateien l&ouml;schen m&ouml;chtest?.');
 	define('WARNING_IMAGE_EDIT', 'Bitte w&auml;hle ein Bild zum editieren aus.');
 	define('WARNING_IMAGE_EDIT', 'Bitte w&auml;hle ein Bild zum editieren aus.');
 	define('WARNING_NOT_FILE_EDIT', 'Bitte w&auml;hle eine Datei zum editieren.');
 	define('WARNING_NOT_FILE_EDIT', 'Bitte w&auml;hle eine Datei zum editieren.');
-	define('WARING_WINDOW_CLOSE', 'Sicher, dass du dieses Fenster schließen möchtest?');
+	define('WARING_WINDOW_CLOSE', 'Sicher, dass du dieses Fenster schlie�en m�chtest?');
 	//Preview
 	//Preview
 	define('PREVIEW_NOT_PREVIEW', 'Keine Vorschau vorhanden.');
 	define('PREVIEW_NOT_PREVIEW', 'Keine Vorschau vorhanden.');
 	define('PREVIEW_OPEN_FAILED', 'Kann diese Datei nicht &ouml;ffnen.');
 	define('PREVIEW_OPEN_FAILED', 'Kann diese Datei nicht &ouml;ffnen.');
@@ -112,12 +112,12 @@
 	define('LOGIN_USERNAME', 'Benutzer:');
 	define('LOGIN_USERNAME', 'Benutzer:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Falscher Benutzer/Password.');
 	define('LOGIN_FAILED', 'Falscher Benutzer/Password.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Du hast keine &auml;nderungen an diesem Bild gemacht.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Du hast keine &auml;nderungen an diesem Bild gemacht.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Das Bild existiert nicht');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Das Bild existiert nicht');
 		define('IMG_WARNING_LOST_CHANAGES', 'Alle ungespeicherten &auml;nderungen an dem Bild gehen verloren. Bist du sicher, dass du fortfahren willst?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Alle ungespeicherten &auml;nderungen an dem Bild gehen verloren. Bist du sicher, dass du fortfahren willst?');
@@ -128,14 +128,14 @@
 		define('IMG_WARING_FLIP_H', 'Bist du siche, dass du das Bild horizontal spiegeln m&ouml;chtest?');
 		define('IMG_WARING_FLIP_H', 'Bist du siche, dass du das Bild horizontal spiegeln m&ouml;chtest?');
 		define('IMG_WARING_FLIP_V', 'Bist du sicher das du das Bild vertikal spiegeln m&ouml;chtest?');
 		define('IMG_WARING_FLIP_V', 'Bist du sicher das du das Bild vertikal spiegeln m&ouml;chtest?');
 		define('IMG_INFO', 'Bildinformation');
 		define('IMG_INFO', 'Bildinformation');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Gr&ouml;&szlig;e ver&Auml;ndern:');
 			define('IMG_MODE_RESIZE', 'Gr&ouml;&szlig;e ver&Auml;ndern:');
 			define('IMG_MODE_CROP', 'Beschneiden:');
 			define('IMG_MODE_CROP', 'Beschneiden:');
 			define('IMG_MODE_ROTATE', 'Drehen:');
 			define('IMG_MODE_ROTATE', 'Drehen:');
-			define('IMG_MODE_FLIP', 'Spiegeln:');		
+			define('IMG_MODE_FLIP', 'Spiegeln:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Horizontal spiegeln');
 			define('IMG_BTN_FLIP_H', 'Horizontal spiegeln');
@@ -160,10 +160,10 @@
 			define('IMG_LBL_SAVE_TO', 'Speichern in...:');
 			define('IMG_LBL_SAVE_TO', 'Speichern in...:');
 			define('IMG_LBL_ROOT_FOLDER', 'Haupt Ordner');
 			define('IMG_LBL_ROOT_FOLDER', 'Haupt Ordner');
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', 'Bitte schlie&szlig;e die Bilderweiterung  nicht mit ein.');
 		define('IMG_NEW_NAME_COMMENTS', 'Bitte schlie&szlig;e die Bilderweiterung  nicht mit ein.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Kein Zielordner ausgew&auml;hlt.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Kein Zielordner ausgew&auml;hlt.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Der Zielordner existiert nicht.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Der Zielordner existiert nicht.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Es existiert ein Bild mit dem selben Namen.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Es existiert ein Bild mit dem selben Namen.');
 
 
@@ -180,21 +180,21 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Das Bild kann nicht umgedreht werden.');
 		define('IMG_SAVE_FLIP_FAILED', 'Das Bild kann nicht umgedreht werden.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Kann das Bild nicht aus der Sitzung &ouml;ffnen.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Kann das Bild nicht aus der Sitzung &ouml;ffnen.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Kann das Bild nicht &ouml;ffnen');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Kann das Bild nicht &ouml;ffnen');
-		
-		
+
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Keine Chronik verf&uuml;gbar f&uuml;r die Undo-Funktion.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Keine Chronik verf&uuml;gbar f&uuml;r die Undo-Funktion.');
 		define('IMG_UNDO_COPY_FAILED', 'Das Bild kann nicht wiederhergestellt werden.');
 		define('IMG_UNDO_COPY_FAILED', 'Das Bild kann nicht wiederhergestellt werden.');
 		define('IMG_UNDO_DEL_FAILED', 'Kann das Sitzungs-Bild nicht l&ouml;schen');
 		define('IMG_UNDO_DEL_FAILED', 'Kann das Sitzungs-Bild nicht l&ouml;schen');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Kann den bestimmten Ordner nicht finden, welcher als Sitzungsordner erstellt wordens ein sollte');
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Kann den bestimmten Ordner nicht finden, welcher als Sitzungsordner erstellt wordens ein sollte');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Kann die "Sitzungsz&auml;hler-Datei" im Odner nicht &ouml;ffnen.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Kann die "Sitzungsz&auml;hler-Datei" im Odner nicht &ouml;ffnen.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Kann die "Sitzungsz&auml;hlerdatei nicht beschreiben.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Kann die "Sitzungsz&auml;hlerdatei nicht beschreiben.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'Datei wurde nicht gefunden.');
 		define('TXT_FILE_NOT_FOUND', 'Datei wurde nicht gefunden.');
 		define('TXT_EXT_NOT_SELECTED', 'Bitte w&auml;hle die Dateiwerweiterung');
 		define('TXT_EXT_NOT_SELECTED', 'Bitte w&auml;hle die Dateiwerweiterung');
@@ -209,6 +209,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', 'Konnte den Inhalt der Datei nicht aktualisieren.');
 		define('TXT_CONTENT_UPDATE_FAILED', 'Konnte den Inhalt der Datei nicht aktualisieren.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 27 - 27
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/en.php

@@ -9,10 +9,10 @@
 	define('DATE_TIME_FORMAT', 'd/M/Y H:i:s');
 	define('DATE_TIME_FORMAT', 'd/M/Y H:i:s');
 	//Common
 	//Common
 	//Menu
 	//Menu
-	
-	
-	
-	
+
+
+
+
 	define('MENU_SELECT', 'Select');
 	define('MENU_SELECT', 'Select');
 	define('MENU_DOWNLOAD', 'Download');
 	define('MENU_DOWNLOAD', 'Download');
 	define('MENU_PREVIEW', 'Preview');
 	define('MENU_PREVIEW', 'Preview');
@@ -23,7 +23,7 @@
 	define('MENU_DELETE', 'Delete');
 	define('MENU_DELETE', 'Delete');
 	define('MENU_PLAY', 'Play');
 	define('MENU_PLAY', 'Play');
 	define('MENU_PASTE', 'Paste');
 	define('MENU_PASTE', 'Paste');
-	
+
 	//Label
 	//Label
 		//Top Action
 		//Top Action
 		define('LBL_ACTION_REFRESH', 'Refresh');
 		define('LBL_ACTION_REFRESH', 'Refresh');
@@ -39,7 +39,7 @@
 	define('LBL_MODIFIED', 'Modified At');
 	define('LBL_MODIFIED', 'Modified At');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'File Information:');
 	define('LBL_FILE_INFO', 'File Information:');
-	define('LBL_FILE_NAME', 'Name:');	
+	define('LBL_FILE_NAME', 'Name:');
 	define('LBL_FILE_CREATED', 'Created:');
 	define('LBL_FILE_CREATED', 'Created:');
 	define('LBL_FILE_MODIFIED', 'Modified:');
 	define('LBL_FILE_MODIFIED', 'Modified:');
 	define('LBL_FILE_SIZE', 'File Size:');
 	define('LBL_FILE_SIZE', 'File Size:');
@@ -83,7 +83,7 @@
 	define('PAGINATION_GO_PARENT', 'Go Parent Folder');
 	define('PAGINATION_GO_PARENT', 'Go Parent Folder');
 	//System
 	//System
 	define('SYS_DISABLED', 'Permission denied: The system is disabled.');
 	define('SYS_DISABLED', 'Permission denied: The system is disabled.');
-	
+
 	//Cut
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'No document(s) selected for cut.');
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'No document(s) selected for cut.');
 	//Copy
 	//Copy
@@ -98,7 +98,7 @@
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', 'Failed to move this file (%s): Original path is same as destination path.');
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', 'Failed to move this file (%s): Original path is same as destination path.');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', 'Failed to move this file (%s): Original file does not exist.');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', 'Failed to move this file (%s): Original file does not exist.');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Failed to move this file (%s): Original file access denied.');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Failed to move this file (%s): Original file access denied.');
- 
+
 	define('ERR_NOT_FILES_PASTED', 'No file(s) has been pasted.');
 	define('ERR_NOT_FILES_PASTED', 'No file(s) has been pasted.');
 
 
 	//Search
 	//Search
@@ -111,7 +111,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', 'Advanced Options');
 	define('LBL_SEARCH_ADV_OPTIONS', 'Advanced Options');
 	define('LBL_SEARCH_FILE_TYPES', 'File Types:');
 	define('LBL_SEARCH_FILE_TYPES', 'File Types:');
 	define('SEARCH_TYPE_EXE', 'Application');
 	define('SEARCH_TYPE_EXE', 'Application');
-	
+
 	define('SEARCH_TYPE_IMG', 'Image');
 	define('SEARCH_TYPE_IMG', 'Image');
 	define('SEARCH_TYPE_ARCHIVE', 'Archive');
 	define('SEARCH_TYPE_ARCHIVE', 'Archive');
 	define('SEARCH_TYPE_HTML', 'HTML');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -201,8 +201,8 @@
 	define('FILE_LBL_MORE', 'Add file to upload');
 	define('FILE_LBL_MORE', 'Add file to upload');
 	define('FILE_CANCEL_UPLOAD', 'Cancel File Upload');
 	define('FILE_CANCEL_UPLOAD', 'Cancel File Upload');
 	define('FILE_LBL_UPLOAD', 'Upload');
 	define('FILE_LBL_UPLOAD', 'Upload');
-	
-	
+
+
 	//file download
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'No files selected for download.');
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'No files selected for download.');
 	//Rename
 	//Rename
@@ -232,12 +232,12 @@
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Invalid username/password.');
 	define('LOGIN_FAILED', 'Invalid username/password.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'You have not made any changes to the images.');
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'You have not made any changes to the images.');
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Image does not exist');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Image does not exist');
 		define('IMG_WARNING_LOST_CHANAGES', 'All unsaved changes made to the image will lost, are you sure you wish to continue?');
 		define('IMG_WARNING_LOST_CHANAGES', 'All unsaved changes made to the image will lost, are you sure you wish to continue?');
@@ -248,14 +248,14 @@
 		define('IMG_WARING_FLIP_H', 'Are you sure to flip the image horizotally?');
 		define('IMG_WARING_FLIP_H', 'Are you sure to flip the image horizotally?');
 		define('IMG_WARING_FLIP_V', 'Are you sure to flip the image vertically');
 		define('IMG_WARING_FLIP_V', 'Are you sure to flip the image vertically');
 		define('IMG_INFO', 'Image Information');
 		define('IMG_INFO', 'Image Information');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Resize:');
 			define('IMG_MODE_RESIZE', 'Resize:');
 			define('IMG_MODE_CROP', 'Crop:');
 			define('IMG_MODE_CROP', 'Crop:');
 			define('IMG_MODE_ROTATE', 'Rotate:');
 			define('IMG_MODE_ROTATE', 'Rotate:');
-			define('IMG_MODE_FLIP', 'Flip:');		
+			define('IMG_MODE_FLIP', 'Flip:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Flip Horizontal');
 			define('IMG_BTN_FLIP_H', 'Flip Horizontal');
@@ -280,10 +280,10 @@
 			define('IMG_LBL_SAVE_TO', 'Save To:');
 			define('IMG_LBL_SAVE_TO', 'Save To:');
 			define('IMG_LBL_ROOT_FOLDER', 'Root Folder');
 			define('IMG_LBL_ROOT_FOLDER', 'Root Folder');
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', 'Please do not contain the image extension.');
 		define('IMG_NEW_NAME_COMMENTS', 'Please do not contain the image extension.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Please give it a name which only contain letters, digits, space, hyphen and underscore.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Please give it a name which only contain letters, digits, space, hyphen and underscore.');
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'No distination folder selected.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'No distination folder selected.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'The destination folder doest not exist.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'The destination folder doest not exist.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'There exists an image with same name.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'There exists an image with same name.');
 
 
@@ -300,21 +300,21 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Unable to flip the image.');
 		define('IMG_SAVE_FLIP_FAILED', 'Unable to flip the image.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Unable to open image from session.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Unable to open image from session.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Unable to open image');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Unable to open image');
-		
-		
+
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'No history avaiable for undo.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'No history avaiable for undo.');
 		define('IMG_UNDO_COPY_FAILED', 'Unable to restore the image.');
 		define('IMG_UNDO_COPY_FAILED', 'Unable to restore the image.');
 		define('IMG_UNDO_DEL_FAILED', 'Unable to delete the session image');
 		define('IMG_UNDO_DEL_FAILED', 'Unable to delete the session image');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', 'Unable to find the dedicated folder which should have been created under session folder');
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', 'Unable to find the dedicated folder which should have been created under session folder');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', 'Unable to open the session counter file.');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', 'Unable to open the session counter file.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Unable to write the session counter file.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Unable to write the session counter file.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'File is not found.');
 		define('TXT_FILE_NOT_FOUND', 'File is not found.');
 		define('TXT_EXT_NOT_SELECTED', 'Please select file extension');
 		define('TXT_EXT_NOT_SELECTED', 'Please select file extension');
@@ -329,6 +329,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', 'Failed to update content to the file.');
 		define('TXT_CONTENT_UPDATE_FAILED', 'Failed to update content to the file.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Please give it a name which only contain letters, digits, space, hyphen and underscore.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Please give it a name which only contain letters, digits, space, hyphen and underscore.');
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 25 - 25
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/es.php

@@ -7,8 +7,8 @@
 	 */
 	 */
 	define('DATE_TIME_FORMAT', 'd/M/Y H:i:s');
 	define('DATE_TIME_FORMAT', 'd/M/Y H:i:s');
 	//Common
 	//Common
-	//Menu	
-	
+	//Menu
+
 	define('MENU_SELECT', 'Seleccionar');
 	define('MENU_SELECT', 'Seleccionar');
 	define('MENU_DOWNLOAD', 'Descargar');
 	define('MENU_DOWNLOAD', 'Descargar');
 	define('MENU_PREVIEW', 'Previsualizar');
 	define('MENU_PREVIEW', 'Previsualizar');
@@ -19,7 +19,7 @@
 	define('MENU_DELETE', 'Eliminar');
 	define('MENU_DELETE', 'Eliminar');
 	define('MENU_PLAY', 'Ejecutar');
 	define('MENU_PLAY', 'Ejecutar');
 	define('MENU_PASTE', 'Pegar');
 	define('MENU_PASTE', 'Pegar');
-	
+
 	//Label
 	//Label
 		//Top Action
 		//Top Action
 		define('LBL_ACTION_REFRESH', 'Actualizar');
 		define('LBL_ACTION_REFRESH', 'Actualizar');
@@ -35,7 +35,7 @@
 	define('LBL_MODIFIED', 'Modificado el');
 	define('LBL_MODIFIED', 'Modificado el');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Informaci&oacute;n del archivo:');
 	define('LBL_FILE_INFO', 'Informaci&oacute;n del archivo:');
-	define('LBL_FILE_NAME', 'Nombre:');	
+	define('LBL_FILE_NAME', 'Nombre:');
 	define('LBL_FILE_CREATED', 'Creado:');
 	define('LBL_FILE_CREATED', 'Creado:');
 	define('LBL_FILE_MODIFIED', 'Modificado:');
 	define('LBL_FILE_MODIFIED', 'Modificado:');
 	define('LBL_FILE_SIZE', 'Tama&ntilde;o:');
 	define('LBL_FILE_SIZE', 'Tama&ntilde;o:');
@@ -79,7 +79,7 @@
 	define('PAGINATION_GO_PARENT', 'Ir a la carpeta superior');
 	define('PAGINATION_GO_PARENT', 'Ir a la carpeta superior');
 	//System
 	//System
 	define('SYS_DISABLED', 'Permiso denegado: el sistema est&aacute; deshabilitado.');
 	define('SYS_DISABLED', 'Permiso denegado: el sistema est&aacute; deshabilitado.');
-	
+
 	//Cut
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'No hay seleccionado un documento para cortar.');
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'No hay seleccionado un documento para cortar.');
 	//Copy
 	//Copy
@@ -94,7 +94,7 @@
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', 'Error al mover el archivo (%s): El path de origen es el mismo que el de destino.');
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', 'Error al mover el archivo (%s): El path de origen es el mismo que el de destino.');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', 'Error al mover el archivo (%s): El archivo que quiere mover no existe.');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', 'Error al mover el archivo (%s): El archivo que quiere mover no existe.');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Error al mover el archivo (%s): Tiene denegado el acceso al archivo que quiere mover.');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Error al mover el archivo (%s): Tiene denegado el acceso al archivo que quiere mover.');
- 
+
 	define('ERR_NOT_FILES_PASTED', 'Los archivos no han sido pegados.');
 	define('ERR_NOT_FILES_PASTED', 'Los archivos no han sido pegados.');
 
 
 	//Search
 	//Search
@@ -107,7 +107,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', 'opciones avanzadas');
 	define('LBL_SEARCH_ADV_OPTIONS', 'opciones avanzadas');
 	define('LBL_SEARCH_FILE_TYPES', 'Tipos de archivo:');
 	define('LBL_SEARCH_FILE_TYPES', 'Tipos de archivo:');
 	define('SEARCH_TYPE_EXE', 'Aplicaci&oacute;n');
 	define('SEARCH_TYPE_EXE', 'Aplicaci&oacute;n');
-	
+
 	define('SEARCH_TYPE_IMG', 'Imagen');
 	define('SEARCH_TYPE_IMG', 'Imagen');
 	define('SEARCH_TYPE_ARCHIVE', 'Archivo');
 	define('SEARCH_TYPE_ARCHIVE', 'Archivo');
 	define('SEARCH_TYPE_HTML', 'HTML');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -166,7 +166,7 @@
 		//class manager
 		//class manager
 	define('ERR_FOLDER_NOT_FOUND', 'No se ha podido localizar la carpeta especificada: ');
 	define('ERR_FOLDER_NOT_FOUND', 'No se ha podido localizar la carpeta especificada: ');
 		//rename
 		//rename
-	define('ERR_RENAME_FORMAT', 'Por favor, introduzca un nombre que solamente contenga letras, numeros, espacios, guiones o subrayado.');	
+	define('ERR_RENAME_FORMAT', 'Por favor, introduzca un nombre que solamente contenga letras, numeros, espacios, guiones o subrayado.');
 	define('ERR_RENAME_EXISTS', 'Ya existe una carpeta con este nombre.');
 	define('ERR_RENAME_EXISTS', 'Ya existe una carpeta con este nombre.');
 	define('ERR_RENAME_FILE_NOT_EXISTS', 'El archivo/carpeta no existe.');
 	define('ERR_RENAME_FILE_NOT_EXISTS', 'El archivo/carpeta no existe.');
 	define('ERR_RENAME_FAILED', 'No se puede renombrar, por favor int&eacute;ntelo de nuevo.');
 	define('ERR_RENAME_FAILED', 'No se puede renombrar, por favor int&eacute;ntelo de nuevo.');
@@ -197,7 +197,7 @@
 	define('FILE_LBL_MORE', 'A&ntilde;adir m&aacute;s archivos para enviar');
 	define('FILE_LBL_MORE', 'A&ntilde;adir m&aacute;s archivos para enviar');
 	define('FILE_CANCEL_UPLOAD', 'Cancelar el env&iacute;o del archivo');
 	define('FILE_CANCEL_UPLOAD', 'Cancelar el env&iacute;o del archivo');
 	define('FILE_LBL_UPLOAD', 'Enviar');
 	define('FILE_LBL_UPLOAD', 'Enviar');
-	
+
 	//file download
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'No hay seleccionados archivos para descargar.');
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'No hay seleccionados archivos para descargar.');
 	//Rename
 	//Rename
@@ -227,12 +227,12 @@
 	define('LOGIN_USERNAME', 'Nombre de usuario:');
 	define('LOGIN_USERNAME', 'Nombre de usuario:');
 	define('LOGIN_PASSWORD', 'Contrase&ntilde;a:');
 	define('LOGIN_PASSWORD', 'Contrase&ntilde;a:');
 	define('LOGIN_FAILED', 'Nombre de usuario o contrase&ntilde;a no v&aacute;lidos.');
 	define('LOGIN_FAILED', 'Nombre de usuario o contrase&ntilde;a no v&aacute;lidos.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'No se han realizado cambios en la imagen.');
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'No se han realizado cambios en la imagen.');
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'La imagen no existe');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'La imagen no existe');
 		define('IMG_WARNING_LOST_CHANAGES', 'Todos los cambios de la imagen que no se hayan guardado se perder&aacute;n. &iquest; Est&aacute; seguro de querer continuar?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Todos los cambios de la imagen que no se hayan guardado se perder&aacute;n. &iquest; Est&aacute; seguro de querer continuar?');
@@ -243,14 +243,14 @@
 		define('IMG_WARING_FLIP_H', 'Seguro que quiere voltear horizontalmente la imagen?');
 		define('IMG_WARING_FLIP_H', 'Seguro que quiere voltear horizontalmente la imagen?');
 		define('IMG_WARING_FLIP_V', 'Seguro que quiere voltear verticalmente la imagen?');
 		define('IMG_WARING_FLIP_V', 'Seguro que quiere voltear verticalmente la imagen?');
 		define('IMG_INFO', 'Informaci&oacute;n de la imagen');
 		define('IMG_INFO', 'Informaci&oacute;n de la imagen');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Cambiar tama&ntilde;o:');
 			define('IMG_MODE_RESIZE', 'Cambiar tama&ntilde;o:');
 			define('IMG_MODE_CROP', 'Recortar:');
 			define('IMG_MODE_CROP', 'Recortar:');
 			define('IMG_MODE_ROTATE', 'Rotar:');
 			define('IMG_MODE_ROTATE', 'Rotar:');
-			define('IMG_MODE_FLIP', 'Voltear:');		
+			define('IMG_MODE_FLIP', 'Voltear:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Voltear horizontal');
 			define('IMG_BTN_FLIP_H', 'Voltear horizontal');
@@ -275,10 +275,10 @@
 			define('IMG_LBL_SAVE_TO', 'Guardar en:');
 			define('IMG_LBL_SAVE_TO', 'Guardar en:');
 			define('IMG_LBL_ROOT_FOLDER', 'Carpeta principal');
 			define('IMG_LBL_ROOT_FOLDER', 'Carpeta principal');
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', 'Por favor, no incluya la extensi&oacute;n de la imagen.');
 		define('IMG_NEW_NAME_COMMENTS', 'Por favor, no incluya la extensi&oacute;n de la imagen.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Por favor, introduzca un nombre que solamente contenga letras, numeros, espacios, guiones o subrayado.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Por favor, introduzca un nombre que solamente contenga letras, numeros, espacios, guiones o subrayado.');
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'No hay seleccionado una carpeta de destino.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'No hay seleccionado una carpeta de destino.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'La carpeta de destino no existe.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'La carpeta de destino no existe.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Ya existe una imagen con el mismo nombre.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Ya existe una imagen con el mismo nombre.');
 
 
@@ -295,21 +295,21 @@
 		define('IMG_SAVE_FLIP_FAILED', 'No se puede voltear la imagen.');
 		define('IMG_SAVE_FLIP_FAILED', 'No se puede voltear la imagen.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'No  se puede abrir la imagen desde la sesi&oacute;n.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'No  se puede abrir la imagen desde la sesi&oacute;n.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'No se puede abrir la imagen');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'No se puede abrir la imagen');
-		
-		
+
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'No hay cambios que deshacer.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'No hay cambios que deshacer.');
 		define('IMG_UNDO_COPY_FAILED', 'No se puede restaurar la imagen.');
 		define('IMG_UNDO_COPY_FAILED', 'No se puede restaurar la imagen.');
 		define('IMG_UNDO_DEL_FAILED', 'No se puede eliminar la imagen de sesi&oacute;n');
 		define('IMG_UNDO_DEL_FAILED', 'No se puede eliminar la imagen de sesi&oacute;n');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', 'No se puede encontrar la carpeta dedicada que deber&iacute;a haber sido creada bajo la carpeta de sesi&oacute;n');
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', 'No se puede encontrar la carpeta dedicada que deber&iacute;a haber sido creada bajo la carpeta de sesi&oacute;n');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', 'No se puede abrir un archivo contador de sesi&oacute;n.');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', 'No se puede abrir un archivo contador de sesi&oacute;n.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'No se puede escribir el archivo contador de sesi&oacute;n.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'No se puede escribir el archivo contador de sesi&oacute;n.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'El archivo no ha sido encontrado.');
 		define('TXT_FILE_NOT_FOUND', 'El archivo no ha sido encontrado.');
 		define('TXT_EXT_NOT_SELECTED', 'Por favor, seleccione una extensi&oacute;n de archivo');
 		define('TXT_EXT_NOT_SELECTED', 'Por favor, seleccione una extensi&oacute;n de archivo');
@@ -324,6 +324,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', 'Error al actualizar el contenido del archivo.');
 		define('TXT_CONTENT_UPDATE_FAILED', 'Error al actualizar el contenido del archivo.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Por favor, introduzca un nombre que solamente contenga letras, numeros, espacios, guiones o subrayado.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Por favor, introduzca un nombre que solamente contenga letras, numeros, espacios, guiones o subrayado.');
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 17 - 17
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/fi.php

@@ -20,7 +20,7 @@
 	define('LBL_MODIFIED', 'Muokattu');
 	define('LBL_MODIFIED', 'Muokattu');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Tietoa:');
 	define('LBL_FILE_INFO', 'Tietoa:');
-	define('LBL_FILE_NAME', 'Nimi:');	
+	define('LBL_FILE_NAME', 'Nimi:');
 	define('LBL_FILE_CREATED', 'Luotu:');
 	define('LBL_FILE_CREATED', 'Luotu:');
 	define("LBL_FILE_MODIFIED", 'Muokattu:');
 	define("LBL_FILE_MODIFIED", 'Muokattu:');
 	define("LBL_FILE_SIZE", 'Tiedostokoko:');
 	define("LBL_FILE_SIZE", 'Tiedostokoko:');
@@ -54,7 +54,7 @@
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Ei mitään valittuna liittämistä varten');
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Ei mitään valittuna liittämistä varten');
 	define('WARNING_CUT_PASTE', 'Haluatko varmasti siirtää valitut tiedostot/kansiot tähän kansioon?');
 	define('WARNING_CUT_PASTE', 'Haluatko varmasti siirtää valitut tiedostot/kansiot tähän kansioon?');
 	define('WARNING_COPY_PASTE', 'Haluatko varmasti kopioida valitut tiedostot/kansiot tähän kansioon?');
 	define('WARNING_COPY_PASTE', 'Haluatko varmasti kopioida valitut tiedostot/kansiot tähän kansioon?');
-	
+
 	//ERROR MESSAGES
 	//ERROR MESSAGES
 		//deletion
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Valitse ensin tiedosto.');
 	define('ERR_NOT_FILE_SELECTED', 'Valitse ensin tiedosto.');
@@ -76,7 +76,7 @@
 	define('ERR_FOLDER_EXISTS', 'Annettu nimi on jo olemassa.');
 	define('ERR_FOLDER_EXISTS', 'Annettu nimi on jo olemassa.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Ei voitu luoda kansiota. Yritä uudelleen.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Ei voitu luoda kansiota. Yritä uudelleen.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Kansion nimi ei voi olla tyhjä');
 	define('ERR_FOLDER_NAME_EMPTY', 'Kansion nimi ei voi olla tyhjä');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Uusi nimi voi sisältää vain kirjaimia, numeroita, välilyöntejä ja tavu- sekä alaviivoja.');
 	define("ERR_FILE_NAME_FORMAT", 'Uusi nimi voi sisältää vain kirjaimia, numeroita, välilyöntejä ja tavu- sekä alaviivoja.');
 	define('ERR_FILE_NOT_UPLOADED', 'Tiedostoa ei valittuna.');
 	define('ERR_FILE_NOT_UPLOADED', 'Tiedostoa ei valittuna.');
@@ -84,7 +84,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Lähetetyn tiedoston siirto epäonnistui');
 	define('ERR_FILE_MOVE_FAILED', 'Lähetetyn tiedoston siirto epäonnistui');
 	define('ERR_FILE_NOT_AVAILABLE', 'Tiedostoa ei ole saatavilla');
 	define('ERR_FILE_NOT_AVAILABLE', 'Tiedostoa ei ole saatavilla');
 	define('ERROR_FILE_TOO_BID', 'Tiedosto on liian suuri (suurin: %s)');
 	define('ERROR_FILE_TOO_BID', 'Tiedosto on liian suuri (suurin: %s)');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Klikkaa kerran avataksesi kansion...');
 	define('TIP_FOLDER_GO_DOWN', 'Klikkaa kerran avataksesi kansion...');
@@ -107,12 +107,12 @@
 	define('LOGIN_USERNAME', 'Käyttäjänimi:');
 	define('LOGIN_USERNAME', 'Käyttäjänimi:');
 	define('LOGIN_PASSWORD', 'Salasana:');
 	define('LOGIN_PASSWORD', 'Salasana:');
 	define('LOGIN_FAILED', 'Väärä käyttäjänimi tai salasana!');
 	define('LOGIN_FAILED', 'Väärä käyttäjänimi tai salasana!');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Et ole tehnyt kuvaan muutoksia.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Et ole tehnyt kuvaan muutoksia.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Kuvaa ei ole olemassa');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Kuvaa ei ole olemassa');
 		define('IMG_WARNING_LOST_CHANAGES', 'Kaikki tallentamattomat muutokset kuvaan menetetään. Haluatko jatkaa?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Kaikki tallentamattomat muutokset kuvaan menetetään. Haluatko jatkaa?');
@@ -123,14 +123,14 @@
 		define('IMG_WARING_FLIP_H', 'Käännetäänkö kuva vaakasuunnassa?');
 		define('IMG_WARING_FLIP_H', 'Käännetäänkö kuva vaakasuunnassa?');
 		define('IMG_WARING_FLIP_V', 'Käännetäänkö kuva pystysuunnassa?');
 		define('IMG_WARING_FLIP_V', 'Käännetäänkö kuva pystysuunnassa?');
 		define('IMG_INFO', 'Tietoa kuvasta');
 		define('IMG_INFO', 'Tietoa kuvasta');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Muuta kokoa:');
 			define('IMG_MODE_RESIZE', 'Muuta kokoa:');
 			define('IMG_MODE_CROP', 'Rajaa:');
 			define('IMG_MODE_CROP', 'Rajaa:');
 			define('IMG_MODE_ROTATE', 'Kierrä:');
 			define('IMG_MODE_ROTATE', 'Kierrä:');
-			define('IMG_MODE_FLIP', 'Käännä:');		
+			define('IMG_MODE_FLIP', 'Käännä:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg; Vastapäivään');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg; Vastapäivään');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg; Myötäpäivään');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg; Myötäpäivään');
 			define('IMG_BTN_FLIP_H', 'Käännä vaakasuunnassa');
 			define('IMG_BTN_FLIP_H', 'Käännä vaakasuunnassa');
@@ -150,7 +150,7 @@
 			define('IMG_LBL_ANGLE', 'Kulma:');
 			define('IMG_LBL_ANGLE', 'Kulma:');
 		//Editor
 		//Editor
 
 
-			
+
 		//Save
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Tyhjä polku.');
 		define('IMG_SAVE_EMPTY_PATH', 'Tyhjä polku.');
 		define('IMG_SAVE_NOT_EXISTS', 'Kuvaa ei ole olemassa.');
 		define('IMG_SAVE_NOT_EXISTS', 'Kuvaa ei ole olemassa.');
@@ -164,19 +164,19 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Kääntäminen epäonnistui.');
 		define('IMG_SAVE_FLIP_FAILED', 'Kääntäminen epäonnistui.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Kuvatiedoston avaaminen istunnosta epäonnistui.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Kuvatiedoston avaaminen istunnosta epäonnistui.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Kuvatiedoston avaaminen epäonnistui');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Kuvatiedoston avaaminen epäonnistui');
-		
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Ei muokkaushistoriaa');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Ei muokkaushistoriaa');
 		define('IMG_UNDO_COPY_FAILED', 'Palauttaminen epäonnistui');
 		define('IMG_UNDO_COPY_FAILED', 'Palauttaminen epäonnistui');
 		define('IMG_UNDO_DEL_FAILED', 'Kuvan poistaminen istunnosta epäonnistui.');
 		define('IMG_UNDO_DEL_FAILED', 'Kuvan poistaminen istunnosta epäonnistui.');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Unable to find the dedicated folder which should have been created under session folder');
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Unable to find the dedicated folder which should have been created under session folder');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Unable to open the session counter file.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Unable to open the session counter file.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Unable to write the session counter file.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Unable to write the session counter file.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 18 - 18
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/fr.php

@@ -22,7 +22,7 @@
     define('LBL_MODIFIED', "Modifi&eacute; le");
     define('LBL_MODIFIED', "Modifi&eacute; le");
         //File Information
         //File Information
     define('LBL_FILE_INFO', "Information sur le fichier :");
     define('LBL_FILE_INFO', "Information sur le fichier :");
-    define('LBL_FILE_NAME', "Nom :");    
+    define('LBL_FILE_NAME', "Nom :");
     define('LBL_FILE_CREATED', "Cr&eacute;&eacute; le :");
     define('LBL_FILE_CREATED', "Cr&eacute;&eacute; le :");
     define('LBL_FILE_MODIFIED', "Modifi&eacute; le :");
     define('LBL_FILE_MODIFIED', "Modifi&eacute; le :");
     define('LBL_FILE_SIZE', "Poids du fichier :");
     define('LBL_FILE_SIZE', "Poids du fichier :");
@@ -57,7 +57,7 @@
     define('ERR_NOT_DOC_SELECTED_FOR_PASTE', "Aucun document(s) selectionn&eacute; pour coller.");
     define('ERR_NOT_DOC_SELECTED_FOR_PASTE', "Aucun document(s) selectionn&eacute; pour coller.");
     define('WARNING_CUT_PASTE', "Voulez-vous vraiment d&eacute;placer les documents selectionn&eacute;s dans le dossier courant ?");
     define('WARNING_CUT_PASTE', "Voulez-vous vraiment d&eacute;placer les documents selectionn&eacute;s dans le dossier courant ?");
     define('WARNING_COPY_PASTE', "Voulez-vous vraiment copier les documents selectionn&eacute;s dans le dossier courant ?");
     define('WARNING_COPY_PASTE', "Voulez-vous vraiment copier les documents selectionn&eacute;s dans le dossier courant ?");
-    
+
     //ERROR MESSAGES
     //ERROR MESSAGES
         //deletion
         //deletion
     define('ERR_NOT_FILE_SELECTED', "Il faut choisir un fichier.");
     define('ERR_NOT_FILE_SELECTED', "Il faut choisir un fichier.");
@@ -79,7 +79,7 @@
     define('ERR_FOLDER_EXISTS', "Il faut saisir un nom qui n\'est pas d&eacute;j&agrave; pris dans ce dossier.");
     define('ERR_FOLDER_EXISTS', "Il faut saisir un nom qui n\'est pas d&eacute;j&agrave; pris dans ce dossier.");
     define('ERR_FOLDER_CREATION_FAILED', "Impossible de cr&eacute;er un dossier, merci de recommencer.");
     define('ERR_FOLDER_CREATION_FAILED', "Impossible de cr&eacute;er un dossier, merci de recommencer.");
     define('ERR_FOLDER_NAME_EMPTY', "Il faut pr&eacute;ciser un nom.");
     define('ERR_FOLDER_NAME_EMPTY', "Il faut pr&eacute;ciser un nom.");
-    
+
         //file upload
         //file upload
     define('ERR_FILE_NAME_FORMAT', "Il faut saisir un nom qui contient uniquement des lettres, chiffres, espaces, tirets et tirets-bas.");
     define('ERR_FILE_NAME_FORMAT', "Il faut saisir un nom qui contient uniquement des lettres, chiffres, espaces, tirets et tirets-bas.");
     define('ERR_FILE_NOT_UPLOADED', "Aucun fichier n\'a &eacute;t&eacute; selectionn&eacute; pour &ecirc;tre transf&eacute;r&eacute;.");
     define('ERR_FILE_NOT_UPLOADED', "Aucun fichier n\'a &eacute;t&eacute; selectionn&eacute; pour &ecirc;tre transf&eacute;r&eacute;.");
@@ -89,7 +89,7 @@
     define('ERROR_FILE_TOO_BID', "Le fichier est trop lourd. (max : %s)");
     define('ERROR_FILE_TOO_BID', "Le fichier est trop lourd. (max : %s)");
     //file download
     //file download
     define('ERR_DOWNLOAD_FILE_NOT_FOUND', "Aucun fichier selectionn&eacute; pour &ecirc;tre t&eacute;l&eacute;charg&eacute;.");
     define('ERR_DOWNLOAD_FILE_NOT_FOUND', "Aucun fichier selectionn&eacute; pour &ecirc;tre t&eacute;l&eacute;charg&eacute;.");
-    
+
 
 
     //Tips
     //Tips
     define('TIP_FOLDER_GO_DOWN', "Cliquer pour aller dans ce dossier ...");
     define('TIP_FOLDER_GO_DOWN', "Cliquer pour aller dans ce dossier ...");
@@ -113,12 +113,12 @@
     define('LOGIN_USERNAME', "Utilisateur :");
     define('LOGIN_USERNAME', "Utilisateur :");
     define('LOGIN_PASSWORD', "Mot de passe :");
     define('LOGIN_PASSWORD', "Mot de passe :");
     define('LOGIN_FAILED', "Utilisateur/Mot de passe erron&eacute;.");
     define('LOGIN_FAILED', "Utilisateur/Mot de passe erron&eacute;.");
-    
-    
+
+
     //88888888888   Below for Image Editor   888888888888888888888
     //88888888888   Below for Image Editor   888888888888888888888
-        //Warning 
+        //Warning
         define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "L'image n'a pas &eacute;t&eacute; modifi&eacute;e.");
         define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "L'image n'a pas &eacute;t&eacute; modifi&eacute;e.");
-        
+
         //General
         //General
         define('IMG_GEN_IMG_NOT_EXISTS', "L\'image n\'existe pas");
         define('IMG_GEN_IMG_NOT_EXISTS', "L\'image n\'existe pas");
         define('IMG_WARNING_LOST_CHANAGES', "Toutes les modifications qui n\'ont pas &eacute;t&eacute; sauvegard&eacute;es seront perdues, voulez-vous vraiment continuer ?");
         define('IMG_WARNING_LOST_CHANAGES', "Toutes les modifications qui n\'ont pas &eacute;t&eacute; sauvegard&eacute;es seront perdues, voulez-vous vraiment continuer ?");
@@ -128,14 +128,14 @@
         define('IMG_WARING_FLIP_H', "Voulez-vous vraiment basculer l\'image horizontalement ?");
         define('IMG_WARING_FLIP_H', "Voulez-vous vraiment basculer l\'image horizontalement ?");
         define('IMG_WARING_FLIP_V', "Voulez-vous vraiment basculer l\'image verticalement ?");
         define('IMG_WARING_FLIP_V', "Voulez-vous vraiment basculer l\'image verticalement ?");
         define('IMG_INFO', "Information sur l\'image");
         define('IMG_INFO', "Information sur l\'image");
-        
+
         //Mode
         //Mode
             define('IMG_MODE_RESIZE', "Redimensionner :");
             define('IMG_MODE_RESIZE', "Redimensionner :");
             define('IMG_MODE_CROP', "D&eacute;couper :");
             define('IMG_MODE_CROP', "D&eacute;couper :");
             define('IMG_MODE_ROTATE', "Rotation :");
             define('IMG_MODE_ROTATE', "Rotation :");
             define('IMG_MODE_FLIP', "Basculer :");
             define('IMG_MODE_FLIP', "Basculer :");
         //Button
         //Button
-        
+
             define('IMG_BTN_ROTATE_LEFT', "90&deg; vers la gauche");
             define('IMG_BTN_ROTATE_LEFT', "90&deg; vers la gauche");
             define('IMG_BTN_ROTATE_RIGHT', "90&deg; vers la droite");
             define('IMG_BTN_ROTATE_RIGHT', "90&deg; vers la droite");
             define('IMG_BTN_FLIP_H', "Miroir Horizontal");
             define('IMG_BTN_FLIP_H', "Miroir Horizontal");
@@ -160,7 +160,7 @@
             define('IMG_LBL_SAVE_TO', "Sauvegarder dans :");
             define('IMG_LBL_SAVE_TO', "Sauvegarder dans :");
             define('IMG_LBL_ROOT_FOLDER', "Dossier racine");
             define('IMG_LBL_ROOT_FOLDER', "Dossier racine");
         //Editor
         //Editor
-        //Save as 
+        //Save as
         define('IMG_NEW_NAME_COMMENTS', "Ne pas mettre l\'extension de l\'image.");
         define('IMG_NEW_NAME_COMMENTS', "Ne pas mettre l\'extension de l\'image.");
         define('IMG_SAVE_AS_ERR_NAME_INVALID', "Il faut saisir un nom qui contient uniquement des lettres, chiffres, espaces, tirets et tirets-bas.");
         define('IMG_SAVE_AS_ERR_NAME_INVALID', "Il faut saisir un nom qui contient uniquement des lettres, chiffres, espaces, tirets et tirets-bas.");
         define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', "Il faut pr&eacute;ciser le dossier de destination.");
         define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', "Il faut pr&eacute;ciser le dossier de destination.");
@@ -180,21 +180,21 @@
         define('IMG_SAVE_FLIP_FAILED', "Impossible de basculer l\'image.");
         define('IMG_SAVE_FLIP_FAILED', "Impossible de basculer l\'image.");
         define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', "Impossible d\'ouvrir l\'image de session.");
         define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', "Impossible d\'ouvrir l\'image de session.");
         define('IMG_SAVE_IMG_OPEN_FAILED', "Impossible d\'ouvrir l\'image");
         define('IMG_SAVE_IMG_OPEN_FAILED', "Impossible d\'ouvrir l\'image");
-        
-        
+
+
         //UNDO
         //UNDO
         define('IMG_UNDO_NO_HISTORY_AVAIALBE', "Aucun historique d\'annulation.");
         define('IMG_UNDO_NO_HISTORY_AVAIALBE', "Aucun historique d\'annulation.");
         define('IMG_UNDO_COPY_FAILED', "Impossible de restaurer l\'image.");
         define('IMG_UNDO_COPY_FAILED', "Impossible de restaurer l\'image.");
         define('IMG_UNDO_DEL_FAILED', "Impossible de supprimer l\'image de session");
         define('IMG_UNDO_DEL_FAILED', "Impossible de supprimer l\'image de session");
-    
+
     //88888888888   Above for Image Editor   888888888888888888888
     //88888888888   Above for Image Editor   888888888888888888888
-    
+
     //88888888888   Session   888888888888888888888
     //88888888888   Session   888888888888888888888
         define('SESSION_PERSONAL_DIR_NOT_FOUND', "Impossible de trouver le dossier d&eacute;di&eacute; qui aurait d&ucirc; &ecirc;tre cr&eacute;&eacute; dans le dossier session");
         define('SESSION_PERSONAL_DIR_NOT_FOUND', "Impossible de trouver le dossier d&eacute;di&eacute; qui aurait d&ucirc; &ecirc;tre cr&eacute;&eacute; dans le dossier session");
         define('SESSION_COUNTER_FILE_CREATE_FAILED', "Impossible d\'ouvrir le fichier de comptage de session.");
         define('SESSION_COUNTER_FILE_CREATE_FAILED', "Impossible d\'ouvrir le fichier de comptage de session.");
         define('SESSION_COUNTER_FILE_WRITE_FAILED', "Impossible d\'&eacute;crire dans le fichier de comptage de session.");
         define('SESSION_COUNTER_FILE_WRITE_FAILED', "Impossible d\'&eacute;crire dans le fichier de comptage de session.");
     //88888888888   Session   888888888888888888888
     //88888888888   Session   888888888888888888888
-    
+
     //88888888888   Below for Text Editor   888888888888888888888
     //88888888888   Below for Text Editor   888888888888888888888
         define('TXT_FILE_NOT_FOUND', "Le fichier n\'a pas &eacute;t&eacute; trouv&eacute;.");
         define('TXT_FILE_NOT_FOUND', "Le fichier n\'a pas &eacute;t&eacute; trouv&eacute;.");
         define('TXT_EXT_NOT_SELECTED', "Merci de choisir une extension au fichier.");
         define('TXT_EXT_NOT_SELECTED', "Merci de choisir une extension au fichier.");
@@ -209,6 +209,6 @@
         define('TXT_CONTENT_UPDATE_FAILED', "Echec de la mise &agrave; jour du contenu du fichier.");
         define('TXT_CONTENT_UPDATE_FAILED', "Echec de la mise &agrave; jour du contenu du fichier.");
         define('TXT_SAVE_AS_ERR_NAME_INVALID', "Il faut saisir un nom qui contient uniquement des lettres, chiffres, espaces, tirets et tirets-bas.");
         define('TXT_SAVE_AS_ERR_NAME_INVALID', "Il faut saisir un nom qui contient uniquement des lettres, chiffres, espaces, tirets et tirets-bas.");
     //88888888888   Above for Text Editor   888888888888888888888
     //88888888888   Above for Text Editor   888888888888888888888
-    
-    
+
+
 ?>
 ?>

+ 5 - 5
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/it.php

@@ -17,7 +17,7 @@
 	define('LBL_MODIFIED', 'Modificato');
 	define('LBL_MODIFIED', 'Modificato');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Info File:');
 	define('LBL_FILE_INFO', 'Info File:');
-	define('LBL_FILE_NAME', 'Nome:');	
+	define('LBL_FILE_NAME', 'Nome:');
 	define('LBL_FILE_CREATED', 'Creato:');
 	define('LBL_FILE_CREATED', 'Creato:');
 	define("LBL_FILE_MODIFIED", 'Modificato:');
 	define("LBL_FILE_MODIFIED", 'Modificato:');
 	define("LBL_FILE_SIZE", 'Dimensione:');
 	define("LBL_FILE_SIZE", 'Dimensione:');
@@ -62,7 +62,7 @@
 	define('ERR_FOLDER_EXISTS', 'Per favore usa un nome univoco in questa cartella.');
 	define('ERR_FOLDER_EXISTS', 'Per favore usa un nome univoco in questa cartella.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Impossibile creare la cartella, prova ancora.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Impossibile creare la cartella, prova ancora.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Per favore indica un nome.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Per favore indica un nome.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Per favore inserisci un nome che contiene solo lettere, cifre, spazi, underscore e trattini.');
 	define("ERR_FILE_NAME_FORMAT", 'Per favore inserisci un nome che contiene solo lettere, cifre, spazi, underscore e trattini.');
 	define('ERR_FILE_NOT_UPLOADED', 'Nessun file selezionato per il caricamento.');
 	define('ERR_FILE_NOT_UPLOADED', 'Nessun file selezionato per il caricamento.');
@@ -70,7 +70,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Errore spostamento file.');
 	define('ERR_FILE_MOVE_FAILED', 'Errore spostamento file.');
 	define('ERR_FILE_NOT_AVAILABLE', 'File non disponivile.');
 	define('ERR_FILE_NOT_AVAILABLE', 'File non disponivile.');
 	define('ERROR_FILE_TOO_BID', 'File troppo grande. (max: %s)');
 	define('ERROR_FILE_TOO_BID', 'File troppo grande. (max: %s)');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Click singolo per accedere alla Cartella...');
 	define('TIP_FOLDER_GO_DOWN', 'Click singolo per accedere alla Cartella...');
@@ -91,6 +91,6 @@
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Username/password non corretti.');
 	define('LOGIN_FAILED', 'Username/password non corretti.');
-	
-	
+
+
 ?>
 ?>

+ 25 - 25
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/pl.php

@@ -18,10 +18,10 @@
 	define('DATE_TIME_FORMAT', 'Y-M-d H:i:s');
 	define('DATE_TIME_FORMAT', 'Y-M-d H:i:s');
 	//Common
 	//Common
 	//Menu
 	//Menu
-	
-	
-	
-	
+
+
+
+
 	define('MENU_SELECT', 'Zaznacz');
 	define('MENU_SELECT', 'Zaznacz');
 	define('MENU_DOWNLOAD', 'Pobierz');
 	define('MENU_DOWNLOAD', 'Pobierz');
 	define('MENU_PREVIEW', 'Podgląd');
 	define('MENU_PREVIEW', 'Podgląd');
@@ -32,7 +32,7 @@
 	define('MENU_DELETE', 'Usuń');
 	define('MENU_DELETE', 'Usuń');
 	define('MENU_PLAY', 'Odtwórz');
 	define('MENU_PLAY', 'Odtwórz');
 	define('MENU_PASTE', 'Wklej');
 	define('MENU_PASTE', 'Wklej');
-	
+
 	//Label
 	//Label
 		//Top Action
 		//Top Action
 		define('LBL_ACTION_REFRESH', 'Odśwież');
 		define('LBL_ACTION_REFRESH', 'Odśwież');
@@ -48,7 +48,7 @@
 	define('LBL_MODIFIED', 'Ostatnia zmiana');
 	define('LBL_MODIFIED', 'Ostatnia zmiana');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Informacje o pliku:');
 	define('LBL_FILE_INFO', 'Informacje o pliku:');
-	define('LBL_FILE_NAME', 'Nazwa:');	
+	define('LBL_FILE_NAME', 'Nazwa:');
 	define('LBL_FILE_CREATED', 'Utworzony:');
 	define('LBL_FILE_CREATED', 'Utworzony:');
 	define("LBL_FILE_MODIFIED", 'Zmieniony:');
 	define("LBL_FILE_MODIFIED", 'Zmieniony:');
 	define("LBL_FILE_SIZE", 'Rozmiar pliku:');
 	define("LBL_FILE_SIZE", 'Rozmiar pliku:');
@@ -92,7 +92,7 @@
 	define('PAGINATION_GO_PARENT', 'Katalog nadrzędny');
 	define('PAGINATION_GO_PARENT', 'Katalog nadrzędny');
 	//System
 	//System
 	define('SYS_DISABLED', 'Brak dostępu: System nieaktywny');
 	define('SYS_DISABLED', 'Brak dostępu: System nieaktywny');
-	
+
 	//Cut
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'Nie wybrano żadnego dokumentu do wycięcia.');
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'Nie wybrano żadnego dokumentu do wycięcia.');
 	//Copy
 	//Copy
@@ -107,7 +107,7 @@
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', 'Błąd przeniesienia pliku (%s): Ścieżka do zapisu i orginalna są identyczne.');
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', 'Błąd przeniesienia pliku (%s): Ścieżka do zapisu i orginalna są identyczne.');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', 'Błąd przeniesienia pliku (%s): Orginał pliku nie istnieje.');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', 'Błąd przeniesienia pliku (%s): Orginał pliku nie istnieje.');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Błąd przeniesienia pliku (%s): Dostęp do pliku zabroniony.');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Błąd przeniesienia pliku (%s): Dostęp do pliku zabroniony.');
- 
+
 	define('ERR_NOT_FILES_PASTED', 'Żadne pliki nie zostały skopiowane.');
 	define('ERR_NOT_FILES_PASTED', 'Żadne pliki nie zostały skopiowane.');
 
 
 	//Search
 	//Search
@@ -120,7 +120,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', 'Opcje zaawansowane');
 	define('LBL_SEARCH_ADV_OPTIONS', 'Opcje zaawansowane');
 	define('LBL_SEARCH_FILE_TYPES', 'Rozszerzenie:');
 	define('LBL_SEARCH_FILE_TYPES', 'Rozszerzenie:');
 	define('SEARCH_TYPE_EXE', 'Plik wykonywalny exe');
 	define('SEARCH_TYPE_EXE', 'Plik wykonywalny exe');
-	
+
 	define('SEARCH_TYPE_IMG', 'Obraz');
 	define('SEARCH_TYPE_IMG', 'Obraz');
 	define('SEARCH_TYPE_ARCHIVE', 'Archiwum');
 	define('SEARCH_TYPE_ARCHIVE', 'Archiwum');
 	define('SEARCH_TYPE_HTML', 'HTML');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -239,12 +239,12 @@
 	define('LOGIN_USERNAME', 'Nazwa użytkownika:');
 	define('LOGIN_USERNAME', 'Nazwa użytkownika:');
 	define('LOGIN_PASSWORD', 'hasło:');
 	define('LOGIN_PASSWORD', 'hasło:');
 	define('LOGIN_FAILED', 'Błędna nazwa użytkownika lub hasło.');
 	define('LOGIN_FAILED', 'Błędna nazwa użytkownika lub hasło.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Nie można dokonać zmian w obrazku.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Nie można dokonać zmian w obrazku.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Obrazek nie istnieje');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Obrazek nie istnieje');
 		define('IMG_WARNING_LOST_CHANAGES', 'Wszystkie niezapisane zmiany w obrazku zostaną utracone, czy na pewno chcesz kontynuować?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Wszystkie niezapisane zmiany w obrazku zostaną utracone, czy na pewno chcesz kontynuować?');
@@ -255,14 +255,14 @@
 		define('IMG_WARING_FLIP_H', 'Czy na pewno chcesz odbić obrazek w poziomie ?');
 		define('IMG_WARING_FLIP_H', 'Czy na pewno chcesz odbić obrazek w poziomie ?');
 		define('IMG_WARING_FLIP_V', 'Czy na pewno chcesz odbić obrazek w pionie ?');
 		define('IMG_WARING_FLIP_V', 'Czy na pewno chcesz odbić obrazek w pionie ?');
 		define('IMG_INFO', 'Informacje o obrazku');
 		define('IMG_INFO', 'Informacje o obrazku');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Zmień rozmiar:');
 			define('IMG_MODE_RESIZE', 'Zmień rozmiar:');
 			define('IMG_MODE_CROP', 'Kadruj:');
 			define('IMG_MODE_CROP', 'Kadruj:');
 			define('IMG_MODE_ROTATE', 'Obróć:');
 			define('IMG_MODE_ROTATE', 'Obróć:');
-			define('IMG_MODE_FLIP', 'Odbij:');		
+			define('IMG_MODE_FLIP', 'Odbij:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;w lewo');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;w lewo');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;w prawo');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;w prawo');
 			define('IMG_BTN_FLIP_H', 'Odbij w poziomie');
 			define('IMG_BTN_FLIP_H', 'Odbij w poziomie');
@@ -287,10 +287,10 @@
 			define('IMG_LBL_SAVE_TO', 'Zapisz do:');
 			define('IMG_LBL_SAVE_TO', 'Zapisz do:');
 			define('IMG_LBL_ROOT_FOLDER', 'Katalog główny');
 			define('IMG_LBL_ROOT_FOLDER', 'Katalog główny');
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', 'Proszę nie podawać rozszerzenia pliku.');
 		define('IMG_NEW_NAME_COMMENTS', 'Proszę nie podawać rozszerzenia pliku.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Nazwa może zawierać tylko znaki alfabetu, liczby, spację, myślnik i podkreślenie.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Nazwa może zawierać tylko znaki alfabetu, liczby, spację, myślnik i podkreślenie.');
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Nie wybrano katalogu docelowego.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Nie wybrano katalogu docelowego.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Wybrany katalog nie istnieje.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Wybrany katalog nie istnieje.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Plik o podanej nazwie już istnieje.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Plik o podanej nazwie już istnieje.');
 
 
@@ -307,21 +307,21 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Nie można odbić obrazka.');
 		define('IMG_SAVE_FLIP_FAILED', 'Nie można odbić obrazka.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Nie można otworzyć obrazka z sesji.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Nie można otworzyć obrazka z sesji.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Nie można otworzyć obrazka');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Nie można otworzyć obrazka');
-		
-		
+
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Nie można cofnąć operacji - brak historii.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Nie można cofnąć operacji - brak historii.');
 		define('IMG_UNDO_COPY_FAILED', 'Nie można przywrócić obrazka.');
 		define('IMG_UNDO_COPY_FAILED', 'Nie można przywrócić obrazka.');
 		define('IMG_UNDO_DEL_FAILED', 'Nie można usunąć obrazka z sesji');
 		define('IMG_UNDO_DEL_FAILED', 'Nie można usunąć obrazka z sesji');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Nie można odnaleźć dedykowanego folderu, który powinien być utworzony podczas tworzenia sesji.');
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Nie można odnaleźć dedykowanego folderu, który powinien być utworzony podczas tworzenia sesji.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Nie można otworzyć pliku z licznikiem sesji.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Nie można otworzyć pliku z licznikiem sesji.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Nie można zapisać pliku z licznikiem sesji.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Nie można zapisać pliku z licznikiem sesji.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'Plik nie istnieje.');
 		define('TXT_FILE_NOT_FOUND', 'Plik nie istnieje.');
 		define('TXT_EXT_NOT_SELECTED', 'Proszę wybrać rozszerzenie pliku');
 		define('TXT_EXT_NOT_SELECTED', 'Proszę wybrać rozszerzenie pliku');
@@ -336,6 +336,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', 'Błąd przy aktualizacji zawartości pliku.');
 		define('TXT_CONTENT_UPDATE_FAILED', 'Błąd przy aktualizacji zawartości pliku.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Nazwa może zawierać tylko znaki alfabetu, liczby, spację, myślnik i podkreślenie.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Nazwa może zawierać tylko znaki alfabetu, liczby, spację, myślnik i podkreślenie.');
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 33 - 33
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/pt_br.php

@@ -20,7 +20,7 @@
 	define('LBL_MODIFIED', 'Modificado em');
 	define('LBL_MODIFIED', 'Modificado em');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Informa&ccedil;&otilde;es do arquivo:');
 	define('LBL_FILE_INFO', 'Informa&ccedil;&otilde;es do arquivo:');
-	define('LBL_FILE_NAME', 'Nome:');	
+	define('LBL_FILE_NAME', 'Nome:');
 	define('LBL_FILE_CREATED', 'Criado em:');
 	define('LBL_FILE_CREATED', 'Criado em:');
 	define("LBL_FILE_MODIFIED", 'Modificado em:');
 	define("LBL_FILE_MODIFIED", 'Modificado em:');
 	define("LBL_FILE_SIZE", 'Tamanho:');
 	define("LBL_FILE_SIZE", 'Tamanho:');
@@ -54,29 +54,29 @@
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Nenhum arquivo selecionado para colar.');
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Nenhum arquivo selecionado para colar.');
 	define('WARNING_CUT_PASTE', 'Tem certeza que deseja mover os arquivos selecionados para esta pasta?');
 	define('WARNING_CUT_PASTE', 'Tem certeza que deseja mover os arquivos selecionados para esta pasta?');
 	define('WARNING_COPY_PASTE', 'Tem certeza que deseja copiar os arquivos selecionados para esta pasta?');
 	define('WARNING_COPY_PASTE', 'Tem certeza que deseja copiar os arquivos selecionados para esta pasta?');
-	
+
 	//ERROR MESSAGES
 	//ERROR MESSAGES
 		//deletion
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Por favor, selecione um arquivo.');
 	define('ERR_NOT_FILE_SELECTED', 'Por favor, selecione um arquivo.');
 	define('ERR_NOT_DOC_SELECTED', 'Nenhum documento selecionado para deletar.');
 	define('ERR_NOT_DOC_SELECTED', 'Nenhum documento selecionado para deletar.');
-	define('ERR_DELTED_FAILED', 'Impossível deletar documento.');
+	define('ERR_DELTED_FAILED', 'Imposs�vel deletar documento.');
 	define('ERR_FOLDER_PATH_NOT_ALLOWED', 'O caminho desta pasta n&atilde;o &eacute; permitido.');
 	define('ERR_FOLDER_PATH_NOT_ALLOWED', 'O caminho desta pasta n&atilde;o &eacute; permitido.');
 		//class manager
 		//class manager
-	define("ERR_FOLDER_NOT_FOUND", 'Impossível encontrar a pasta: ');
+	define("ERR_FOLDER_NOT_FOUND", 'Imposs�vel encontrar a pasta: ');
 		//rename
 		//rename
 	define('ERR_RENAME_FORMAT', 'Por favor, digite um nome que contenha apenas letras, n&uacute;meros, espa&ccedil;os, h&iacute;fen e underscore.');
 	define('ERR_RENAME_FORMAT', 'Por favor, digite um nome que contenha apenas letras, n&uacute;meros, espa&ccedil;os, h&iacute;fen e underscore.');
 	define('ERR_RENAME_EXISTS', 'Por favor, digite um nome que ainda n&atilde;o exista dentro desta pasta.');
 	define('ERR_RENAME_EXISTS', 'Por favor, digite um nome que ainda n&atilde;o exista dentro desta pasta.');
 	define('ERR_RENAME_FILE_NOT_EXISTS', 'O arquivo/pasta n&atilde;o existe.');
 	define('ERR_RENAME_FILE_NOT_EXISTS', 'O arquivo/pasta n&atilde;o existe.');
-	define('ERR_RENAME_FAILED', 'Impossível renomear, tente novamente.');
+	define('ERR_RENAME_FAILED', 'Imposs�vel renomear, tente novamente.');
 	define('ERR_RENAME_EMPTY', 'Por favor, digite um nome.');
 	define('ERR_RENAME_EMPTY', 'Por favor, digite um nome.');
 	define("ERR_NO_CHANGES_MADE", 'Nenhuma mudan&ccedil;a foi feita.');
 	define("ERR_NO_CHANGES_MADE", 'Nenhuma mudan&ccedil;a foi feita.');
 	define('ERR_RENAME_FILE_TYPE_NOT_PERMITED', 'voc&ecirc; n&atilde;o tem permiss&otilde;es para alterar o arquivo para esta extensao.');
 	define('ERR_RENAME_FILE_TYPE_NOT_PERMITED', 'voc&ecirc; n&atilde;o tem permiss&otilde;es para alterar o arquivo para esta extensao.');
 		//folder creation
 		//folder creation
 	define('ERR_FOLDER_FORMAT', 'Por favor, digite um nome que contenha apenas letras, n&uacute;meros, espa&ccedil;os, h&iacute;fen e underscore.');
 	define('ERR_FOLDER_FORMAT', 'Por favor, digite um nome que contenha apenas letras, n&uacute;meros, espa&ccedil;os, h&iacute;fen e underscore.');
 	define('ERR_FOLDER_EXISTS', 'Por favor, digite um nome que ainda n&atilde;o exista dentro desta pasta.');
 	define('ERR_FOLDER_EXISTS', 'Por favor, digite um nome que ainda n&atilde;o exista dentro desta pasta.');
-	define('ERR_FOLDER_CREATION_FAILED', 'Impossível criar a pasta, tente novamente.');
+	define('ERR_FOLDER_CREATION_FAILED', 'Imposs�vel criar a pasta, tente novamente.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Por favor, de um nome.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Por favor, de um nome.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Por favor, digite um nome que contenha apenas letras, n&uacute;meros, espa&ccedil;os, h&iacute;fen e underscore.');
 	define("ERR_FILE_NAME_FORMAT", 'Por favor, digite um nome que contenha apenas letras, n&uacute;meros, espa&ccedil;os, h&iacute;fen e underscore.');
 	define('ERR_FILE_NOT_UPLOADED', 'Nenhum arquivo selecionado para a c&oacute;pia.');
 	define('ERR_FILE_NOT_UPLOADED', 'Nenhum arquivo selecionado para a c&oacute;pia.');
@@ -84,7 +84,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Falha ao mover o arquivo.');
 	define('ERR_FILE_MOVE_FAILED', 'Falha ao mover o arquivo.');
 	define('ERR_FILE_NOT_AVAILABLE', 'O arquivo n&atilde;o est&aacute; dispon&iacute;vel.');
 	define('ERR_FILE_NOT_AVAILABLE', 'O arquivo n&atilde;o est&aacute; dispon&iacute;vel.');
 	define('ERROR_FILE_TOO_BID', 'Arquivo muito grande. (max: %s)');
 	define('ERROR_FILE_TOO_BID', 'Arquivo muito grande. (max: %s)');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Clique para acessar esta pasta...');
 	define('TIP_FOLDER_GO_DOWN', 'Clique para acessar esta pasta...');
@@ -98,8 +98,8 @@
 	define('WARING_WINDOW_CLOSE', 'Tem certeza que deseja fechar esta janela?');
 	define('WARING_WINDOW_CLOSE', 'Tem certeza que deseja fechar esta janela?');
 	//Preview
 	//Preview
 	define('PREVIEW_NOT_PREVIEW', 'Imagem Pr&eacute;via n&atilde;o dispon&iacute;vel.');
 	define('PREVIEW_NOT_PREVIEW', 'Imagem Pr&eacute;via n&atilde;o dispon&iacute;vel.');
-	define('PREVIEW_OPEN_FAILED', 'Impossível abrir o arquivo.');
-	define('PREVIEW_IMAGE_LOAD_FAILED', 'Impossível carregar a imagem');
+	define('PREVIEW_OPEN_FAILED', 'Imposs�vel abrir o arquivo.');
+	define('PREVIEW_IMAGE_LOAD_FAILED', 'Imposs�vel carregar a imagem');
 
 
 	//Login
 	//Login
 	define('LOGIN_PAGE_TITLE', 'Ajax File Manager Login Form');
 	define('LOGIN_PAGE_TITLE', 'Ajax File Manager Login Form');
@@ -107,12 +107,12 @@
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Invalid username/password.');
 	define('LOGIN_FAILED', 'Invalid username/password.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "voc&ecirc; n&atilde;o fez modifica&ccedil;oes na imagem.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "voc&ecirc; n&atilde;o fez modifica&ccedil;oes na imagem.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Imagem n&atilde;o existe');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Imagem n&atilde;o existe');
 		define('IMG_WARNING_LOST_CHANAGES', 'Todas as altera&ccedil;oes feitas na imagem at&eacute; o momento serao perdidas, tem certeza que deseja continuar?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Todas as altera&ccedil;oes feitas na imagem at&eacute; o momento serao perdidas, tem certeza que deseja continuar?');
@@ -123,14 +123,14 @@
 		define('IMG_WARING_FLIP_H', 'Tem certeza que deseja espelhar a imagem horizontalmente?');
 		define('IMG_WARING_FLIP_H', 'Tem certeza que deseja espelhar a imagem horizontalmente?');
 		define('IMG_WARING_FLIP_V', 'Tem certeza que deseja espelhar a imagem verticalmente?');
 		define('IMG_WARING_FLIP_V', 'Tem certeza que deseja espelhar a imagem verticalmente?');
 		define('IMG_INFO', 'Informa&ccedil;oes sobre a imagem');
 		define('IMG_INFO', 'Informa&ccedil;oes sobre a imagem');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Redimensionar:');
 			define('IMG_MODE_RESIZE', 'Redimensionar:');
 			define('IMG_MODE_CROP', 'Cortar:');
 			define('IMG_MODE_CROP', 'Cortar:');
 			define('IMG_MODE_ROTATE', 'Rotacionar:');
 			define('IMG_MODE_ROTATE', 'Rotacionar:');
-			define('IMG_MODE_FLIP', 'Espelhar:');		
+			define('IMG_MODE_FLIP', 'Espelhar:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;Anti Hor&aacute;rio');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;Anti Hor&aacute;rio');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;Hor&aacute;rio');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;Hor&aacute;rio');
 			define('IMG_BTN_FLIP_H', 'Espelhar horizontalmente');
 			define('IMG_BTN_FLIP_H', 'Espelhar horizontalmente');
@@ -150,7 +150,7 @@
 			define('IMG_LBL_ANGLE', '&Acirc;ngulo:');
 			define('IMG_LBL_ANGLE', '&Acirc;ngulo:');
 		//Editor
 		//Editor
 
 
-			
+
 		//Save
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Caminho da imagem vazio.');
 		define('IMG_SAVE_EMPTY_PATH', 'Caminho da imagem vazio.');
 		define('IMG_SAVE_NOT_EXISTS', 'Imagem n&atilde;o existe.');
 		define('IMG_SAVE_NOT_EXISTS', 'Imagem n&atilde;o existe.');
@@ -159,24 +159,24 @@
 		define('IMG_SAVE_RESIZE_FAILED', 'Falha ao redimensionar.');
 		define('IMG_SAVE_RESIZE_FAILED', 'Falha ao redimensionar.');
 		define('IMG_SAVE_CROP_FAILED', 'Falha ao cortar.');
 		define('IMG_SAVE_CROP_FAILED', 'Falha ao cortar.');
 		define('IMG_SAVE_FAILED', 'Falha ao salvar.');
 		define('IMG_SAVE_FAILED', 'Falha ao salvar.');
-		define('IMG_SAVE_BACKUP_FAILED', 'Impossível efetuar backup da imagem original.');
-		define('IMG_SAVE_ROTATE_FAILED', 'Impossível rotacionar a imagem.');
-		define('IMG_SAVE_FLIP_FAILED', 'Impossível espelhar a imagem.');
-		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Impossível abrir imagem a partir da sess&atilde;o.');
-		define('IMG_SAVE_IMG_OPEN_FAILED', 'Impossível abrir a imagem');
-		
+		define('IMG_SAVE_BACKUP_FAILED', 'Imposs�vel efetuar backup da imagem original.');
+		define('IMG_SAVE_ROTATE_FAILED', 'Imposs�vel rotacionar a imagem.');
+		define('IMG_SAVE_FLIP_FAILED', 'Imposs�vel espelhar a imagem.');
+		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Imposs�vel abrir imagem a partir da sess&atilde;o.');
+		define('IMG_SAVE_IMG_OPEN_FAILED', 'Imposs�vel abrir a imagem');
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Sem hist&oacute;rico dispon&iacute;vel para desfazer.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Sem hist&oacute;rico dispon&iacute;vel para desfazer.');
-		define('IMG_UNDO_COPY_FAILED', 'Impossível restaurar a imagem.');
-		define('IMG_UNDO_DEL_FAILED', 'Impossível apagar a imagem da sess&atilde;o.');
-	
+		define('IMG_UNDO_COPY_FAILED', 'Imposs�vel restaurar a imagem.');
+		define('IMG_UNDO_DEL_FAILED', 'Imposs�vel apagar a imagem da sess&atilde;o.');
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Impossível achar a pasta dedicada que deve ser criada dentro da pasta sess&atilde;o');
-		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Impossível criar o arquivo contador de sess&atilde;o.');
-		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Impossível escrever no arquivo contador de sess&atilde;o.');
+		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Imposs�vel achar a pasta dedicada que deve ser criada dentro da pasta sess&atilde;o');
+		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Imposs�vel criar o arquivo contador de sess&atilde;o.');
+		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Imposs�vel escrever no arquivo contador de sess&atilde;o.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 19 - 19
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/pt_pt.php

@@ -21,7 +21,7 @@
 	define('LBL_MODIFIED', 'Modificado em');
 	define('LBL_MODIFIED', 'Modificado em');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Informações do ficheiro:');
 	define('LBL_FILE_INFO', 'Informações do ficheiro:');
-	define('LBL_FILE_NAME', 'Nome:');	
+	define('LBL_FILE_NAME', 'Nome:');
 	define('LBL_FILE_CREATED', 'Criado em:');
 	define('LBL_FILE_CREATED', 'Criado em:');
 	define("LBL_FILE_MODIFIED", 'Modificado em:');
 	define("LBL_FILE_MODIFIED", 'Modificado em:');
 	define("LBL_FILE_SIZE", 'Tamanho:');
 	define("LBL_FILE_SIZE", 'Tamanho:');
@@ -56,7 +56,7 @@
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Não foram seleccionado(s) documento(s) para colar.');
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Não foram seleccionado(s) documento(s) para colar.');
 	define('WARNING_CUT_PASTE', 'Tem a certeza que pretende mover os ficheiros seleccionados para a pasta actual?');
 	define('WARNING_CUT_PASTE', 'Tem a certeza que pretende mover os ficheiros seleccionados para a pasta actual?');
 	define('WARNING_COPY_PASTE', 'Tem a certeza que pretende copiar os ficheiros seleccionados para a pasta actual?');
 	define('WARNING_COPY_PASTE', 'Tem a certeza que pretende copiar os ficheiros seleccionados para a pasta actual?');
-	
+
 	//ERROR MESSAGES
 	//ERROR MESSAGES
 		//deletion
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Por favor, escolha um ficheiro.');
 	define('ERR_NOT_FILE_SELECTED', 'Por favor, escolha um ficheiro.');
@@ -78,7 +78,7 @@
 	define('ERR_FOLDER_EXISTS', 'Por favor, escolha um nome que seja único nesta pasta.');
 	define('ERR_FOLDER_EXISTS', 'Por favor, escolha um nome que seja único nesta pasta.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Não foi possível criar a pasta, tente novamente.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Não foi possível criar a pasta, tente novamente.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Por favor, escolha um nome.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Por favor, escolha um nome.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", "Por favor, escolha um nome que contenha apenas letras, dígitos, espaços, \'-\' e \'_\'.");
 	define("ERR_FILE_NAME_FORMAT", "Por favor, escolha um nome que contenha apenas letras, dígitos, espaços, \'-\' e \'_\'.");
 	define('ERR_FILE_NOT_UPLOADED', 'Não foi seleccionado nenhum ficheiro para ser enviado.');
 	define('ERR_FILE_NOT_UPLOADED', 'Não foi seleccionado nenhum ficheiro para ser enviado.');
@@ -88,7 +88,7 @@
 	define('ERROR_FILE_TOO_BID', 'Ficheiro muito grande. (máx: %s)');
 	define('ERROR_FILE_TOO_BID', 'Ficheiro muito grande. (máx: %s)');
 	//file download
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Não foram seleccionados ficheiros para download.');
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Não foram seleccionados ficheiros para download.');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Clique para ir para esta pasta...');
 	define('TIP_FOLDER_GO_DOWN', 'Clique para ir para esta pasta...');
@@ -112,12 +112,12 @@
 	define('LOGIN_USERNAME', 'ID do utilizador:');
 	define('LOGIN_USERNAME', 'ID do utilizador:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', ' ID do utilizador/password inválidos.');
 	define('LOGIN_FAILED', ' ID do utilizador/password inválidos.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Não fez qualquer alteração à imagem.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Não fez qualquer alteração à imagem.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'A imagem não existe');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'A imagem não existe');
 		define('IMG_WARNING_LOST_CHANAGES', 'Todas as alterações feitas á imagem que ainda não guardou, vão ser perdidas, tem a certeza que deseja continuar?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Todas as alterações feitas á imagem que ainda não guardou, vão ser perdidas, tem a certeza que deseja continuar?');
@@ -128,14 +128,14 @@
 		define('IMG_WARING_FLIP_H', 'Tem a certeza que pretende virar a imagem horizontalmente?');
 		define('IMG_WARING_FLIP_H', 'Tem a certeza que pretende virar a imagem horizontalmente?');
 		define('IMG_WARING_FLIP_V', 'Tem a certeza que pretende virar a imagem verticalmente?');
 		define('IMG_WARING_FLIP_V', 'Tem a certeza que pretende virar a imagem verticalmente?');
 		define('IMG_INFO', 'Informações da imagem');
 		define('IMG_INFO', 'Informações da imagem');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Redimensionar:');
 			define('IMG_MODE_RESIZE', 'Redimensionar:');
 			define('IMG_MODE_CROP', 'Recortar:');
 			define('IMG_MODE_CROP', 'Recortar:');
 			define('IMG_MODE_ROTATE', 'Rodar:');
 			define('IMG_MODE_ROTATE', 'Rodar:');
-			define('IMG_MODE_FLIP', 'Virar:');		
+			define('IMG_MODE_FLIP', 'Virar:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&graus;CCW');
 			define('IMG_BTN_ROTATE_LEFT', '90&graus;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&graus;CW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&graus;CW');
 			define('IMG_BTN_FLIP_H', 'Virar horizontalmente');
 			define('IMG_BTN_FLIP_H', 'Virar horizontalmente');
@@ -160,10 +160,10 @@
 			define('IMG_LBL_SAVE_TO', 'Guardar para:');
 			define('IMG_LBL_SAVE_TO', 'Guardar para:');
 			define('IMG_LBL_ROOT_FOLDER', 'Pasta raíz');
 			define('IMG_LBL_ROOT_FOLDER', 'Pasta raíz');
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', 'Por favor, não coloque a extensão da imagem.');
 		define('IMG_NEW_NAME_COMMENTS', 'Por favor, não coloque a extensão da imagem.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', "Por favor, escolha um nome que contenha apenas letras, dígitos, espaços, \'-\' e \'_\'.");
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', "Por favor, escolha um nome que contenha apenas letras, dígitos, espaços, \'-\' e \'_\'.");
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Não foi escolhida a pasta de destino.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Não foi escolhida a pasta de destino.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'A pasta de destino não existe.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'A pasta de destino não existe.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Já existe uma imagem com esse nome.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Já existe uma imagem com esse nome.');
 
 
@@ -180,20 +180,20 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Não foi possível virar a imagem.');
 		define('IMG_SAVE_FLIP_FAILED', 'Não foi possível virar a imagem.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Não foi possível abrir a imagem da sessão.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Não foi possível abrir a imagem da sessão.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Não foi possível abrir a imagem');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Não foi possível abrir a imagem');
-		
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Não existe história de anulações.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Não existe história de anulações.');
 		define('IMG_UNDO_COPY_FAILED', 'Não foi possível colocar a imagem no estado inicial.');
 		define('IMG_UNDO_COPY_FAILED', 'Não foi possível colocar a imagem no estado inicial.');
 		define('IMG_UNDO_DEL_FAILED', 'Não foi possível apagar a imagem da sessão');
 		define('IMG_UNDO_DEL_FAILED', 'Não foi possível apagar a imagem da sessão');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Não foi possível encontrar a pasta dedicada que deveria ter sido criada na pasta de sessões');
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Não foi possível encontrar a pasta dedicada que deveria ter sido criada na pasta de sessões');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Não foi possível abrir o ficheiro que tem o contador da sessão.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Não foi possível abrir o ficheiro que tem o contador da sessão.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Não foi possível escrever no ficheiro que tem o contador da sessão.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Não foi possível escrever no ficheiro que tem o contador da sessão.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'O ficheiro não foi encontrado.');
 		define('TXT_FILE_NOT_FOUND', 'O ficheiro não foi encontrado.');
 		define('TXT_EXT_NOT_SELECTED', 'Por favor, escolha a extensão do ficheiro');
 		define('TXT_EXT_NOT_SELECTED', 'Por favor, escolha a extensão do ficheiro');
@@ -208,6 +208,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', 'Não foi possível actualizar o ficheiro.');
 		define('TXT_CONTENT_UPDATE_FAILED', 'Não foi possível actualizar o ficheiro.');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', "Por favor, escolha um nome que contenha apenas letras, dígitos, espaços, \'-\' e \'_\'.");
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', "Por favor, escolha um nome que contenha apenas letras, dígitos, espaços, \'-\' e \'_\'.");
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 15 - 15
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/ru.php

@@ -54,7 +54,7 @@
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Выберите документ(ы), которые Вы хотите вставить.');
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Выберите документ(ы), которые Вы хотите вставить.');
 	define('WARNING_CUT_PASTE', 'Вы уверенны, что хотите переместить выбранные документы в эту папку?');
 	define('WARNING_CUT_PASTE', 'Вы уверенны, что хотите переместить выбранные документы в эту папку?');
 	define('WARNING_COPY_PASTE', 'Вы уверенны, что хотите скопировать выбранные документы в эту папку?');
 	define('WARNING_COPY_PASTE', 'Вы уверенны, что хотите скопировать выбранные документы в эту папку?');
-	
+
 	//ERROR MESSAGES
 	//ERROR MESSAGES
 		//deletion
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Пожалуйста, выберите файл.');
 	define('ERR_NOT_FILE_SELECTED', 'Пожалуйста, выберите файл.');
@@ -76,7 +76,7 @@
 	define('ERR_FOLDER_EXISTS', 'Это имя уже используется в данной папке. Пожалуйста, укажите другое имя.');
 	define('ERR_FOLDER_EXISTS', 'Это имя уже используется в данной папке. Пожалуйста, укажите другое имя.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Невозможно создать папку. Пожалуйста, повторите позже.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Невозможно создать папку. Пожалуйста, повторите позже.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Пожалуйста, укажите имя.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Пожалуйста, укажите имя.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Пожалуйста, укажите корректное имя. Разрешены буквы латинского алфавита, цифры, пробел, дефис и нижнее подчеркивание.');
 	define("ERR_FILE_NAME_FORMAT", 'Пожалуйста, укажите корректное имя. Разрешены буквы латинского алфавита, цифры, пробел, дефис и нижнее подчеркивание.');
 	define('ERR_FILE_NOT_UPLOADED', 'Не выбран файл для загрузки.');
 	define('ERR_FILE_NOT_UPLOADED', 'Не выбран файл для загрузки.');
@@ -84,7 +84,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Не удалось переместить файл.');
 	define('ERR_FILE_MOVE_FAILED', 'Не удалось переместить файл.');
 	define('ERR_FILE_NOT_AVAILABLE', 'Файл недоступен.');
 	define('ERR_FILE_NOT_AVAILABLE', 'Файл недоступен.');
 	define('ERROR_FILE_TOO_BID', 'Файл слишком большой. (Максимально допустимый размер: %s)');
 	define('ERROR_FILE_TOO_BID', 'Файл слишком большой. (Максимально допустимый размер: %s)');
-	
+
 
 
 	//Tips
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Кликните, чтобы войти в эту папку...');
 	define('TIP_FOLDER_GO_DOWN', 'Кликните, чтобы войти в эту папку...');
@@ -107,12 +107,12 @@
 	define('LOGIN_USERNAME', 'Имя:');
 	define('LOGIN_USERNAME', 'Имя:');
 	define('LOGIN_PASSWORD', 'Пароль:');
 	define('LOGIN_PASSWORD', 'Пароль:');
 	define('LOGIN_FAILED', 'Неверное имя или пароль..');
 	define('LOGIN_FAILED', 'Неверное имя или пароль..');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Не было сделано никаких изменений в изображении.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Не было сделано никаких изменений в изображении.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Изображение не существует.');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Изображение не существует.');
 		define('IMG_WARNING_LOST_CHANAGES', 'Все несохраненные изменения будут потеряны. Вы уверенны, что хотите продолжить?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Все несохраненные изменения будут потеряны. Вы уверенны, что хотите продолжить?');
@@ -123,14 +123,14 @@
 		define('IMG_WARING_FLIP_H', 'Вы уверены, что хотите отразить изображение горизонтально?');
 		define('IMG_WARING_FLIP_H', 'Вы уверены, что хотите отразить изображение горизонтально?');
 		define('IMG_WARING_FLIP_V', 'Вы уверены, что хотите отразить изображение вертикально?');
 		define('IMG_WARING_FLIP_V', 'Вы уверены, что хотите отразить изображение вертикально?');
 		define('IMG_INFO', 'Информация об изображении');
 		define('IMG_INFO', 'Информация об изображении');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Изменить размер');
 			define('IMG_MODE_RESIZE', 'Изменить размер');
 			define('IMG_MODE_CROP', 'Обрезать');
 			define('IMG_MODE_CROP', 'Обрезать');
 			define('IMG_MODE_ROTATE', 'Повернуть');
 			define('IMG_MODE_ROTATE', 'Повернуть');
 			define('IMG_MODE_FLIP', 'Отобразить зеркально');
 			define('IMG_MODE_FLIP', 'Отобразить зеркально');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg; против часовй');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg; против часовй');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg; по часовой');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg; по часовой');
 			define('IMG_BTN_FLIP_H', 'Отразить горизонтально');
 			define('IMG_BTN_FLIP_H', 'Отразить горизонтально');
@@ -150,7 +150,7 @@
 			define('IMG_LBL_ANGLE', 'Угол поворота:');
 			define('IMG_LBL_ANGLE', 'Угол поворота:');
 		//Editor
 		//Editor
 
 
-			
+
 		//Save
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Путь к изображению пуст.');
 		define('IMG_SAVE_EMPTY_PATH', 'Путь к изображению пуст.');
 		define('IMG_SAVE_NOT_EXISTS', 'Изображение не существует.');
 		define('IMG_SAVE_NOT_EXISTS', 'Изображение не существует.');
@@ -164,19 +164,19 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Не удалось зеркально отобразить изображение.');
 		define('IMG_SAVE_FLIP_FAILED', 'Не удалось зеркально отобразить изображение.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Не удалось открыть изображение из сессии.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Не удалось открыть изображение из сессии.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Не удалось открыть изображение.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Не удалось открыть изображение.');
-		
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Невозможно отменить операцию, так как история изменений отсутствует.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Невозможно отменить операцию, так как история изменений отсутствует.');
 		define('IMG_UNDO_COPY_FAILED', 'Невозможно восстановить изображение.');
 		define('IMG_UNDO_COPY_FAILED', 'Невозможно восстановить изображение.');
 		define('IMG_UNDO_DEL_FAILED', 'Невозможно удалить сессию изображения.');
 		define('IMG_UNDO_DEL_FAILED', 'Невозможно удалить сессию изображения.');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Невозможно найти папку, предназначенную для хранения сессии.');
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Невозможно найти папку, предназначенную для хранения сессии.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Невозможно открыть файл сессии.');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Невозможно открыть файл сессии.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Невозможно сделать запись в файл сессии.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Невозможно сделать запись в файл сессии.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 18 - 18
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/sk.php

@@ -22,7 +22,7 @@
 	define('LBL_MODIFIED', 'Dátum');
 	define('LBL_MODIFIED', 'Dátum');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', 'Info súboru:');
 	define('LBL_FILE_INFO', 'Info súboru:');
-	define('LBL_FILE_NAME', 'Názov:');	
+	define('LBL_FILE_NAME', 'Názov:');
 	define('LBL_FILE_CREATED', 'Vytvorene:');
 	define('LBL_FILE_CREATED', 'Vytvorene:');
 	define("LBL_FILE_MODIFIED", 'Upravene:');
 	define("LBL_FILE_MODIFIED", 'Upravene:');
 	define("LBL_FILE_SIZE", 'Veľkosť súbora:');
 	define("LBL_FILE_SIZE", 'Veľkosť súbora:');
@@ -57,7 +57,7 @@
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Nevybrali ste súbor(y) pre akiciu ´Vložiť´.');
 	define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Nevybrali ste súbor(y) pre akiciu ´Vložiť´.');
 	define('WARNING_CUT_PASTE', 'Ste si isty že chcete presunuť vybrane súbory do aktualného priečinku?');
 	define('WARNING_CUT_PASTE', 'Ste si isty že chcete presunuť vybrane súbory do aktualného priečinku?');
 	define('WARNING_COPY_PASTE', 'Ste si isty že chcete kopírovať vybrane súbory do aktualnáého priečinku?');
 	define('WARNING_COPY_PASTE', 'Ste si isty že chcete kopírovať vybrane súbory do aktualnáého priečinku?');
-	
+
 	//ERROR MESSAGES
 	//ERROR MESSAGES
 		//deletion
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Prosím, vyberte si súbor.');
 	define('ERR_NOT_FILE_SELECTED', 'Prosím, vyberte si súbor.');
@@ -79,7 +79,7 @@
 	define('ERR_FOLDER_EXISTS', 'Priečinok už existuje, skúste iný unikátny názov.');
 	define('ERR_FOLDER_EXISTS', 'Priečinok už existuje, skúste iný unikátny názov.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Nie je možne vytvoriť priečinok, skúste znovu.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Nie je možne vytvoriť priečinok, skúste znovu.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Vyplnte názov.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Vyplnte názov.');
-	
+
 		//file upload
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'Názov súboru/priečinku môže obsahovať iba písmena(BEZ DIAKRITIKY), číslice, medzery, pomlčky a podčiarkovniky.');
 	define("ERR_FILE_NAME_FORMAT", 'Názov súboru/priečinku môže obsahovať iba písmena(BEZ DIAKRITIKY), číslice, medzery, pomlčky a podčiarkovniky.');
 	define('ERR_FILE_NOT_UPLOADED', 'Vyberte si súbor pre upload.');
 	define('ERR_FILE_NOT_UPLOADED', 'Vyberte si súbor pre upload.');
@@ -87,7 +87,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Nepodarilo sa presunúť súbor.');
 	define('ERR_FILE_MOVE_FAILED', 'Nepodarilo sa presunúť súbor.');
 	define('ERR_FILE_NOT_AVAILABLE', 'The file is unavailable.');
 	define('ERR_FILE_NOT_AVAILABLE', 'The file is unavailable.');
 	define('ERROR_FILE_TOO_BID', 'Súbor je príliš veľký. (max: %s)');
 	define('ERROR_FILE_TOO_BID', 'Súbor je príliš veľký. (max: %s)');
-	
+
 		//file download
 		//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Nevybrali ste súbory pre stiahnutie.');
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Nevybrali ste súbory pre stiahnutie.');
 
 
@@ -113,12 +113,12 @@
 	define('LOGIN_USERNAME', 'Užívateľské meno:');
 	define('LOGIN_USERNAME', 'Užívateľské meno:');
 	define('LOGIN_PASSWORD', 'Heslo:');
 	define('LOGIN_PASSWORD', 'Heslo:');
 	define('LOGIN_FAILED', 'Neplatné užívateľské meno/heslo.');
 	define('LOGIN_FAILED', 'Neplatné užívateľské meno/heslo.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Obrázky neboli upravene.");
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Obrázky neboli upravene.");
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Obrázok neexistuje');
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Obrázok neexistuje');
 		define('IMG_WARNING_LOST_CHANAGES', 'Všetky neuložený úpravy budu stratene, naozaj chcete pokračovať?');
 		define('IMG_WARNING_LOST_CHANAGES', 'Všetky neuložený úpravy budu stratene, naozaj chcete pokračovať?');
@@ -129,14 +129,14 @@
 		define('IMG_WARING_FLIP_H', 'Naozaj chcete preklopiť obrázok vodorovne?');
 		define('IMG_WARING_FLIP_H', 'Naozaj chcete preklopiť obrázok vodorovne?');
 		define('IMG_WARING_FLIP_V', 'Naozaj chcete preklopiť obrázok zvisle?');
 		define('IMG_WARING_FLIP_V', 'Naozaj chcete preklopiť obrázok zvisle?');
 		define('IMG_INFO', 'Info obrázku');
 		define('IMG_INFO', 'Info obrázku');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', 'Zmena Veľkosti :');
 			define('IMG_MODE_RESIZE', 'Zmena Veľkosti :');
 			define('IMG_MODE_CROP', 'Odrezať :');
 			define('IMG_MODE_CROP', 'Odrezať :');
 			define('IMG_MODE_ROTATE', 'Otočiť :');
 			define('IMG_MODE_ROTATE', 'Otočiť :');
 			define('IMG_MODE_FLIP', 'Preklopiť:');
 			define('IMG_MODE_FLIP', 'Preklopiť:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Preklopiť Vodorovne');
 			define('IMG_BTN_FLIP_H', 'Preklopiť Vodorovne');
@@ -160,15 +160,15 @@
 			define('IMG_LBL_SAVE_AS', 'Uložiť ako formulár');
 			define('IMG_LBL_SAVE_AS', 'Uložiť ako formulár');
 			define('IMG_LBL_SAVE_TO', 'Uložiť kam:');
 			define('IMG_LBL_SAVE_TO', 'Uložiť kam:');
 			define('IMG_LBL_ROOT_FOLDER', 'Rodičovský priečinok');
 			define('IMG_LBL_ROOT_FOLDER', 'Rodičovský priečinok');
-		
+
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', 'Typ súboru sa automaticky priradí.');
 		define('IMG_NEW_NAME_COMMENTS', 'Typ súboru sa automaticky priradí.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Názov súboru môže obsahovať iba písmena(BEZ DIAKRITIKY), číslice, medzery, pomlčky a podčiarkovniky.');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Názov súboru môže obsahovať iba písmena(BEZ DIAKRITIKY), číslice, medzery, pomlčky a podčiarkovniky.');
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Nevybrali ste cieľový adresár.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Nevybrali ste cieľový adresár.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Cieľový adresár neexistuje.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Cieľový adresár neexistuje.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Taky súbor už existuje.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Taky súbor už existuje.');
-			
+
 		//Save
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Cesta obrázku je prázdna.');
 		define('IMG_SAVE_EMPTY_PATH', 'Cesta obrázku je prázdna.');
 		define('IMG_SAVE_NOT_EXISTS', 'Obrázok neexistuje.');
 		define('IMG_SAVE_NOT_EXISTS', 'Obrázok neexistuje.');
@@ -182,20 +182,20 @@
 		define('IMG_SAVE_FLIP_FAILED', 'Nie je schopný preklopiť obrázok.');
 		define('IMG_SAVE_FLIP_FAILED', 'Nie je schopný preklopiť obrázok.');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Nie je schopný otvoriť obrazok zo session(relácie).');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Nie je schopný otvoriť obrazok zo session(relácie).');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Nie je schopný otvoriť obrazok');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Nie je schopný otvoriť obrazok');
-		
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'História nie je dosptuná pre krok späť.');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'História nie je dosptuná pre krok späť.');
 		define('IMG_UNDO_COPY_FAILED', 'Nie je schopný obnoviť obrázok.');
 		define('IMG_UNDO_COPY_FAILED', 'Nie je schopný obnoviť obrázok.');
 		define('IMG_UNDO_DEL_FAILED', 'Nie je schopný odstrániť session obrázku');
 		define('IMG_UNDO_DEL_FAILED', 'Nie je schopný odstrániť session obrázku');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Nie je možne nájsť priradený priečinok, ktorý mal byť vytvorený počas priečinka relácie(session).');
 		define("SESSION_PERSONAL_DIR_NOT_FOUND", 'Nie je možne nájsť priradený priečinok, ktorý mal byť vytvorený počas priečinka relácie(session).');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Nie je možne otvoriť súbor relácie(session).');
 		define("SESSION_COUNTER_FILE_CREATE_FAILED", 'Nie je možne otvoriť súbor relácie(session).');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Nie je možne zapísať do súboru relácie(session).');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Nie je možne zapísať do súboru relácie(session).');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'Súbor nebol nájdený.');
 		define('TXT_FILE_NOT_FOUND', 'Súbor nebol nájdený.');
 		define('TXT_EXT_NOT_SELECTED', 'Vyberte si typ súboru, prosím.');
 		define('TXT_EXT_NOT_SELECTED', 'Vyberte si typ súboru, prosím.');

+ 25 - 25
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/langs/zh.php

@@ -9,10 +9,10 @@
 	define('DATE_TIME_FORMAT', 'Y/m/d H:i:s');
 	define('DATE_TIME_FORMAT', 'Y/m/d H:i:s');
 	//Common
 	//Common
 	//Menu
 	//Menu
-	
-	
-	
-	
+
+
+
+
 	define('MENU_SELECT', '选取');
 	define('MENU_SELECT', '选取');
 	define('MENU_DOWNLOAD', '下载');
 	define('MENU_DOWNLOAD', '下载');
 	define('MENU_PREVIEW', '预览');
 	define('MENU_PREVIEW', '预览');
@@ -23,7 +23,7 @@
 	define('MENU_DELETE', '删除');
 	define('MENU_DELETE', '删除');
 	define('MENU_PLAY', '播放');
 	define('MENU_PLAY', '播放');
 	define('MENU_PASTE', '粘贴');
 	define('MENU_PASTE', '粘贴');
-	
+
 	//Label
 	//Label
 		//Top Action
 		//Top Action
 		define('LBL_ACTION_REFRESH', '刷新');
 		define('LBL_ACTION_REFRESH', '刷新');
@@ -39,7 +39,7 @@
 	define('LBL_MODIFIED', '更改于');
 	define('LBL_MODIFIED', '更改于');
 		//File Information
 		//File Information
 	define('LBL_FILE_INFO', '文件信息:');
 	define('LBL_FILE_INFO', '文件信息:');
-	define('LBL_FILE_NAME', '文件名:');	
+	define('LBL_FILE_NAME', '文件名:');
 	define('LBL_FILE_CREATED', '创建于:');
 	define('LBL_FILE_CREATED', '创建于:');
 	define('LBL_FILE_MODIFIED', '更改于:');
 	define('LBL_FILE_MODIFIED', '更改于:');
 	define('LBL_FILE_SIZE', '大小:');
 	define('LBL_FILE_SIZE', '大小:');
@@ -83,7 +83,7 @@
 	define('PAGINATION_GO_PARENT', '返回上一层');
 	define('PAGINATION_GO_PARENT', '返回上一层');
 	//System
 	//System
 	define('SYS_DISABLED', '系统已关闭');
 	define('SYS_DISABLED', '系统已关闭');
-	
+
 	//Cut
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', '没有文档被选取.');
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', '没有文档被选取.');
 	//Copy
 	//Copy
@@ -98,7 +98,7 @@
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', '无法移动%s文件夹: 目标文件夹与被移动的相同');
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', '无法移动%s文件夹: 目标文件夹与被移动的相同');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', '无法移动%s文档: 被移动的文档已不存在');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', '无法移动%s文档: 被移动的文档已不存在');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', '无法移动%s文档: 被移动的文档无法访问');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', '无法移动%s文档: 被移动的文档无法访问');
- 
+
 	define('ERR_NOT_FILES_PASTED', '没有文档被粘贴');
 	define('ERR_NOT_FILES_PASTED', '没有文档被粘贴');
 
 
 	//Search
 	//Search
@@ -111,7 +111,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', '高级搜索');
 	define('LBL_SEARCH_ADV_OPTIONS', '高级搜索');
 	define('LBL_SEARCH_FILE_TYPES', '文件类型:');
 	define('LBL_SEARCH_FILE_TYPES', '文件类型:');
 	define('SEARCH_TYPE_EXE', '可执行文件');
 	define('SEARCH_TYPE_EXE', '可执行文件');
-	
+
 	define('SEARCH_TYPE_IMG', '图像');
 	define('SEARCH_TYPE_IMG', '图像');
 	define('SEARCH_TYPE_ARCHIVE', '压缩文档');
 	define('SEARCH_TYPE_ARCHIVE', '压缩文档');
 	define('SEARCH_TYPE_HTML', 'HTML');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -230,12 +230,12 @@
 	define('LOGIN_USERNAME', '用户名:');
 	define('LOGIN_USERNAME', '用户名:');
 	define('LOGIN_PASSWORD', '密码:');
 	define('LOGIN_PASSWORD', '密码:');
 	define('LOGIN_FAILED', '无效的用户名/密码.');
 	define('LOGIN_FAILED', '无效的用户名/密码.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', '没有任何对此图像的操作记录.');
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', '没有任何对此图像的操作记录.');
-		
+
 		//General
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', '图像不存在');
 		define('IMG_GEN_IMG_NOT_EXISTS', '图像不存在');
 		define('IMG_WARNING_LOST_CHANAGES', '所有未保存的操作将丢失,确定要继续?');
 		define('IMG_WARNING_LOST_CHANAGES', '所有未保存的操作将丢失,确定要继续?');
@@ -246,14 +246,14 @@
 		define('IMG_WARING_FLIP_H', '确定要水平翻转?');
 		define('IMG_WARING_FLIP_H', '确定要水平翻转?');
 		define('IMG_WARING_FLIP_V', '确定要垂直翻转?');
 		define('IMG_WARING_FLIP_V', '确定要垂直翻转?');
 		define('IMG_INFO', '图像信息');
 		define('IMG_INFO', '图像信息');
-		
+
 		//Mode
 		//Mode
 			define('IMG_MODE_RESIZE', '收放:');
 			define('IMG_MODE_RESIZE', '收放:');
 			define('IMG_MODE_CROP', '剪切:');
 			define('IMG_MODE_CROP', '剪切:');
 			define('IMG_MODE_ROTATE', '旋转:');
 			define('IMG_MODE_ROTATE', '旋转:');
-			define('IMG_MODE_FLIP', '翻转:');		
+			define('IMG_MODE_FLIP', '翻转:');
 		//Button
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;逆转');
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;逆转');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;顺转');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;顺转');
 			define('IMG_BTN_FLIP_H', '垂直翻转');
 			define('IMG_BTN_FLIP_H', '垂直翻转');
@@ -278,10 +278,10 @@
 			define('IMG_LBL_SAVE_TO', '保存至:');
 			define('IMG_LBL_SAVE_TO', '保存至:');
 			define('IMG_LBL_ROOT_FOLDER', '根文件夹');
 			define('IMG_LBL_ROOT_FOLDER', '根文件夹');
 		//Editor
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', '请别附加图像文档的扩展名');
 		define('IMG_NEW_NAME_COMMENTS', '请别附加图像文档的扩展名');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', '文件名只能含有英文字母,数字, - 和 _');
 		define('IMG_SAVE_AS_ERR_NAME_INVALID', '文件名只能含有英文字母,数字, - 和 _');
-		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', '没有选取目标文件夹.');	
+		define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', '没有选取目标文件夹.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', '目标文件夹不存在.');
 		define('IMG_SAVE_AS_FOLDER_NOT_FOUND', '目标文件夹不存在.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', '相同的文件名已存在.');
 		define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', '相同的文件名已存在.');
 
 
@@ -298,21 +298,21 @@
 		define('IMG_SAVE_FLIP_FAILED', '无法翻转图像');
 		define('IMG_SAVE_FLIP_FAILED', '无法翻转图像');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', '无法从进程文件夹打开图像文档');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', '无法从进程文件夹打开图像文档');
 		define('IMG_SAVE_IMG_OPEN_FAILED', '无法打开图像文档');
 		define('IMG_SAVE_IMG_OPEN_FAILED', '无法打开图像文档');
-		
-		
+
+
 		//UNDO
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', '没有记录可恢复');
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', '没有记录可恢复');
 		define('IMG_UNDO_COPY_FAILED', '无法恢复原来的图像文档');
 		define('IMG_UNDO_COPY_FAILED', '无法恢复原来的图像文档');
 		define('IMG_UNDO_DEL_FAILED', '无法删除进程文件夹中的图像文档');
 		define('IMG_UNDO_DEL_FAILED', '无法删除进程文件夹中的图像文档');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', '个人进程文件夹不存在');
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', '个人进程文件夹不存在');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', '无法打开进程计数文件.');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', '无法打开进程计数文件.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', '无法读写进程计数文件.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', '无法读写进程计数文件.');
 	//88888888888   Session   888888888888888888888
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', '文件不存在.');
 		define('TXT_FILE_NOT_FOUND', '文件不存在.');
 		define('TXT_EXT_NOT_SELECTED', '请选择文件扩展名');
 		define('TXT_EXT_NOT_SELECTED', '请选择文件扩展名');
@@ -327,6 +327,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', '无法更新文件内容');
 		define('TXT_CONTENT_UPDATE_FAILED', '无法更新文件内容');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', '文件名只能含有英文字母,数字, - 和 _');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', '文件名只能含有英文字母,数字, - 和 _');
 	//88888888888   Above for Text Editor   888888888888888888888
 	//88888888888   Above for Text Editor   888888888888888888888
-	
-	
+
+
 ?>
 ?>

+ 31 - 31
main/inc/lib/fckeditor/fcktemplates.xml.php

@@ -1,4 +1,4 @@
-<?php 
+<?php
 // setting the character set to UTF-8
 // setting the character set to UTF-8
 header('Content-Type: text/xml; charset=utf-8');
 header('Content-Type: text/xml; charset=utf-8');
 
 
@@ -11,7 +11,7 @@ require_once('../../global.inc.php');
 // outputting the opening tag of the xml file
 // outputting the opening tag of the xml file
 echo '<?xml version="1.0" encoding="utf-8" ?>';
 echo '<?xml version="1.0" encoding="utf-8" ?>';
 
 
-// is this needed? 
+// is this needed?
 $IMConfig['base_url'] = $_configuration['root_web'].'main/img/gallery/';
 $IMConfig['base_url'] = $_configuration['root_web'].'main/img/gallery/';
 
 
 // load a stylesheet
 // load a stylesheet
@@ -20,9 +20,9 @@ $css = loadCSS(api_get_setting('stylesheets'));
 
 
 // load libreries js
 // load libreries js
 $js = '';
 $js = '';
-if (api_get_setting('show_glossary_in_documents') != 'none') { 
+if (api_get_setting('show_glossary_in_documents') != 'none') {
 	$js .= '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"/>'.PHP_EOL;
 	$js .= '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"/>'.PHP_EOL;
-	if (api_get_setting('show_glossary_in_documents') == 'ismanual') {	
+	if (api_get_setting('show_glossary_in_documents') == 'ismanual') {
 		$js .= '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_manual.js"/>';
 		$js .= '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_manual.js"/>';
 	} else {
 	} else {
 		$js .= '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_automatic.js"/>';
 		$js .= '<script language="javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_automatic.js"/>';
@@ -98,19 +98,19 @@ function s2($var)
  */
  */
 function load_platform_templates() {
 function load_platform_templates() {
 	// Database table definition
 	// Database table definition
-	$table_template = Database::get_main_table('system_template');	
+	$table_template = Database::get_main_table('system_template');
 	global $css, $img_dir, $default_course_dir,$js;
 	global $css, $img_dir, $default_course_dir,$js;
 	$sql = "SELECT title, image, comment, content FROM $table_template";
 	$sql = "SELECT title, image, comment, content FROM $table_template";
-	
+
 	$result = api_sql_query($sql, __FILE__, __LINE__);
 	$result = api_sql_query($sql, __FILE__, __LINE__);
 	while ($row = Database::fetch_array($result)) {
 	while ($row = Database::fetch_array($result)) {
         if (!empty($row['image'])) {
         if (!empty($row['image'])) {
             $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/'.$row['image'];
             $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/'.$row['image'];
         } else {
         } else {
             $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/empty.gif';
             $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/empty.gif';
-        }        
-        
-      	$row['content'] =  str_replace('{CSS}',$css.$js, $row['content']);      	
+        }
+
+      	$row['content'] =  str_replace('{CSS}',$css.$js, $row['content']);
       	$row['content'] =  str_replace('{IMG_DIR}',$img_dir, $row['content']);
       	$row['content'] =  str_replace('{IMG_DIR}',$img_dir, $row['content']);
       	$row['content'] =  str_replace('{REL_PATH}', api_get_path(REL_PATH), $row['content']);
       	$row['content'] =  str_replace('{REL_PATH}', api_get_path(REL_PATH), $row['content']);
       	$row['content'] =  str_replace('{COURSE_DIR}',$default_course_dir, $row['content']);
       	$row['content'] =  str_replace('{COURSE_DIR}',$default_course_dir, $row['content']);
@@ -122,60 +122,60 @@ function load_platform_templates() {
 							    '.$row['content'].'
 							    '.$row['content'].'
 						]]>
 						]]>
 					</Html>
 					</Html>
-				</Template>';			
+				</Template>';
 	}
 	}
 }
 }
 
 
 /**
 /**
- * Load all the personal templates of the user when 
+ * Load all the personal templates of the user when
  *
  *
  * @param integer $user_id the id of the user
  * @param integer $user_id the id of the user
  * @return xml node
  * @return xml node
- * 
+ *
  * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
  * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
  * @version March 2009
  * @version March 2009
- * @since Dokeos 1.8.6 The code already existed but not in a function and a lot less performant. 
+ * @since Dokeos 1.8.6 The code already existed but not in a function and a lot less performant.
  */
  */
 function load_personal_templates($user_id=0) {
 function load_personal_templates($user_id=0) {
-	global $_course; 
+	global $_course;
 
 
 	// the templates that the user has defined are only available inside the course itself
 	// the templates that the user has defined are only available inside the course itself
 	if (empty($_course))
 	if (empty($_course))
 	{
 	{
 		return false;
 		return false;
 	}
 	}
-	
-	// For which user are we getting the templates? 
+
+	// For which user are we getting the templates?
 	if ($user_id==0)
 	if ($user_id==0)
 	{
 	{
 		$user_id = api_get_user_id();
 		$user_id = api_get_user_id();
 	}
 	}
 
 
 	// Database table definition
 	// Database table definition
-	$table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES);	
-	$table_document = Database::get_course_table(TABLE_DOCUMENT, $_course['dbName']);	
-	
-	
+	$table_template = Database::get_main_table(TABLE_MAIN_TEMPLATES);
+	$table_document = Database::get_course_table(TABLE_DOCUMENT, $_course['dbName']);
+
+
 	// The sql statement for getting all the user defined templates
 	// The sql statement for getting all the user defined templates
-	$sql = "SELECT template.id, template.title, template.description, template.image, template.ref_doc, document.path 
-			FROM ".$table_template." template, ".$table_document." document 
+	$sql = "SELECT template.id, template.title, template.description, template.image, template.ref_doc, document.path
+			FROM ".$table_template." template, ".$table_document." document
 			WHERE user_id='".Database::escape_string($user_id)."'
 			WHERE user_id='".Database::escape_string($user_id)."'
 			AND course_code='".Database::escape_string(api_get_course_id())."'
 			AND course_code='".Database::escape_string(api_get_course_id())."'
-			AND document.id = template.ref_doc"; 
+			AND document.id = template.ref_doc";
 	$result_template = api_sql_query($sql,__FILE__,__LINE__);
 	$result_template = api_sql_query($sql,__FILE__,__LINE__);
 	while ($row = Database::fetch_array($result_template))
 	while ($row = Database::fetch_array($result_template))
 	{
 	{
 		$row['content'] = file_get_contents(api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$row['path']);
 		$row['content'] = file_get_contents(api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$row['path']);
 		//$row['content'] = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$row['path'];
 		//$row['content'] = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$row['path'];
-		
+
 		if (!empty($row['image']))
 		if (!empty($row['image']))
 		{
 		{
 			$image = api_get_path(WEB_CODE_PATH).'upload/template_thumbnails/'.$row['image'];
 			$image = api_get_path(WEB_CODE_PATH).'upload/template_thumbnails/'.$row['image'];
-		} else {			
+		} else {
 			$image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/noimage.gif';
 			$image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/noimage.gif';
 		}
 		}
-		
-		
+
+
 		echo '	<Template title="'.s2($row['title']).'" image="'.$image.'">
 		echo '	<Template title="'.s2($row['title']).'" image="'.$image.'">
 					<Description>'.s2($row['Description']).'</Description>
 					<Description>'.s2($row['Description']).'</Description>
 					<Html>
 					<Html>
@@ -183,13 +183,13 @@ function load_personal_templates($user_id=0) {
 							    '.$row['content'].'
 							    '.$row['content'].'
 						]]>
 						]]>
 					</Html>
 					</Html>
-				</Template>';		
-	}	
+				</Template>';
+	}
 }
 }
 
 
 function load_empty_template()
 function load_empty_template()
 {
 {
-	global $css,$js;			
+	global $css,$js;
 	?>
 	?>
 <Template title="<?php echo s2('Empty'); ?>" image="<?php echo api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/empty.gif'; ?>">
 <Template title="<?php echo s2('Empty'); ?>" image="<?php echo api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/empty.gif'; ?>">
     <Description></Description>
     <Description></Description>
@@ -198,7 +198,7 @@ function load_empty_template()
 		   <html>
 		   <html>
 		   <head>
 		   <head>
 			<?php echo $css ?>
 			<?php echo $css ?>
-			<?php echo $js ?>			  
+			<?php echo $js ?>
 		   <body></body>
 		   <body></body>
 		   </head>
 		   </head>
 		   </html>
 		   </html>

+ 7 - 7
main/inc/lib/fckeditor/repository.php

@@ -37,8 +37,8 @@ if (!file_exists($user_folder)) {
 // Creation of repository used by paltform administrators if it does not exist.
 // Creation of repository used by paltform administrators if it does not exist.
 if (api_is_platform_admin()) {
 if (api_is_platform_admin()) {
 	$homepage_folder = api_get_path(SYS_PATH).'home/default_platform_document/';
 	$homepage_folder = api_get_path(SYS_PATH).'home/default_platform_document/';
-	if (!file_exists($homepage_folder)) {		 
-		@mkdir($homepage_folder);		
+	if (!file_exists($homepage_folder)) {
+		@mkdir($homepage_folder);
 		chmod($homepage_folder, $permissions_for_new_directories);
 		chmod($homepage_folder, $permissions_for_new_directories);
 	}
 	}
 }
 }
@@ -46,8 +46,8 @@ if (api_is_platform_admin()) {
 // Creation in the course document repository of a shared folder if it does not exist.
 // Creation in the course document repository of a shared folder if it does not exist.
 if (api_is_in_course()) {
 if (api_is_in_course()) {
 	$course_shared_folder = api_get_path(SYS_PATH).'courses/'.$_course['path'].'/document/shared_folder/';
 	$course_shared_folder = api_get_path(SYS_PATH).'courses/'.$_course['path'].'/document/shared_folder/';
-	if (!file_exists($course_shared_folder)) {		 
-		@mkdir($course_shared_folder);		
+	if (!file_exists($course_shared_folder)) {
+		@mkdir($course_shared_folder);
 		chmod($course_shared_folder, $permissions_for_new_directories);
 		chmod($course_shared_folder, $permissions_for_new_directories);
 		$doc_id = add_document($_course, '/shared_folder', 'folder', 0, 'shared_folder');
 		$doc_id = add_document($_course, '/shared_folder', 'folder', 0, 'shared_folder');
 		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id());
 		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id());
@@ -58,9 +58,9 @@ if (api_is_in_course()) {
 	// When the current user is inside a course, his/her own hidden folder is created (if it does not exist) under shared_folder.
 	// When the current user is inside a course, his/her own hidden folder is created (if it does not exist) under shared_folder.
 	if (!file_exists($course_shared_folder.'sf_user_'.api_get_user_id())) {
 	if (!file_exists($course_shared_folder.'sf_user_'.api_get_user_id())) {
 		//@todo call the create_unexisting_directory function and replace this code Julio Montoya
 		//@todo call the create_unexisting_directory function and replace this code Julio Montoya
-		$new_user_dir = api_get_path(SYS_PATH).'courses/'.$_course['path'].'/document/shared_folder/sf_user_'.api_get_user_id().'/';				
-		@mkdir($new_user_dir);		
-		chmod($new_user_dir,$permissions_for_new_directories);		
+		$new_user_dir = api_get_path(SYS_PATH).'courses/'.$_course['path'].'/document/shared_folder/sf_user_'.api_get_user_id().'/';
+		@mkdir($new_user_dir);
+		chmod($new_user_dir,$permissions_for_new_directories);
 		$doc_id = add_document($_course, '/shared_folder/sf_user_'.api_get_user_id(), 'folder', 0, api_get_person_name($_user['firstName'], $_user['lastName']));
 		$doc_id = add_document($_course, '/shared_folder/sf_user_'.api_get_user_id(), 'folder', 0, api_get_person_name($_user['firstName'], $_user['lastName']));
 		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id());
 		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', api_get_user_id());
 		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id());
 		api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'invisible', api_get_user_id());

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/agenda.php

@@ -13,7 +13,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Link','Unlink','Anchor'),
     array('Link','Unlink','Anchor'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
     array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/agenda_student.php

@@ -13,7 +13,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Link','Unlink','Anchor'),
     array('Link','Unlink','Anchor'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
-    '/',   
+    '/',
     array('FontFormat','FontName','FontSize'),
     array('FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
     array('JustifyLeft','JustifyCenter','JustifyRight','-','OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/announcements_student.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight'),
     array('JustifyLeft','JustifyCenter','JustifyRight'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/assessments_introduction.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),
     array('Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/documents_student.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath'),
 	array('Table','SpecialChar'),
 	array('Table','SpecialChar'),
 	array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'),
 	array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'),
-	'/',	
+	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
 	array('Bold','Italic','Underline'),
 	array('JustifyLeft','JustifyCenter','JustifyRight'),
 	array('JustifyLeft','JustifyCenter','JustifyRight'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/forum_student.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight'),
     array('JustifyLeft','JustifyCenter','JustifyRight'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/learning_path_documents.php

@@ -13,7 +13,7 @@ $config['ToolbarSets']['Normal'] = array(
 	array('Link','Unlink','Anchor','Glossary'),
 	array('Link','Unlink','Anchor','Glossary'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath','Table','SpecialChar'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath','Table','SpecialChar'),
 	array('Outdent','Indent','TextColor','BGColor','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight'),
 	array('Outdent','Indent','TextColor','BGColor','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight'),
-	'/',	
+	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline','-','Source'),
 	array('Bold','Italic','Underline','-','Source'),
 );//save, FitWindow don't run well here
 );//save, FitWindow don't run well here

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/messages.php

@@ -9,7 +9,7 @@
 
 
 // This is the visible toolbar set when the editor has "normal" size.
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),							   
+	array('FitWindow','-','PasteWord','-','Undo','Redo'),
 	array('Link','Unlink','Anchor'),
 	array('Link','Unlink','Anchor'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Table','Smiley'),
 	array('Table','Smiley'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/notebook_student.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight'),
     array('JustifyLeft','JustifyCenter','JustifyRight'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/profile.php

@@ -9,7 +9,7 @@
 
 
 // This is the visible toolbar set when the editor has "normal" size.
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),							   
+	array('FitWindow','-','PasteWord','-','Undo','Redo'),
 	array('Link','Unlink','Anchor'),
 	array('Link','Unlink','Anchor'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Table','Smiley'),
 	array('Table','Smiley'),

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/simple.php

@@ -1,5 +1,5 @@
 <?php
 <?php
-$config['ToolbarSets']['Normal'] = array(	
+$config['ToolbarSets']['Normal'] = array(
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
 	array('Bold','Italic','Underline'),
 	array('JustifyLeft','JustifyCenter','JustifyRight')
 	array('JustifyLeft','JustifyCenter','JustifyRight')

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/test_description.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight')
     array('JustifyLeft','JustifyCenter','JustifyRight')

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/test_free_answer.php

@@ -9,7 +9,7 @@
 
 
 // This is the visible toolbar set when the editor has "normal" size.
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
 $config['ToolbarSets']['Normal'] = array(
-    array('FitWindow','Bold','Image','Link','PasteWord','MP3','mimetex','Table','Subscript','Superscript','ShowBlocks')	
+    array('FitWindow','Bold','Image','Link','PasteWord','MP3','mimetex','Table','Subscript','Superscript','ShowBlocks')
 );
 );
 
 
 // This is the visible toolbar set when the editor is maximized.
 // This is the visible toolbar set when the editor is maximized.

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/test_proposed_answer.php

@@ -9,7 +9,7 @@
 
 
 // This is the visible toolbar set when the editor has "normal" size.
 // This is the visible toolbar set when the editor has "normal" size.
 $config['ToolbarSets']['Normal'] = array(
 $config['ToolbarSets']['Normal'] = array(
-    array('FitWindow','Bold','Image','Link','PasteWord','MP3','mimetex','Table','Subscript','Superscript','Source')	
+    array('FitWindow','Bold','Image','Link','PasteWord','MP3','mimetex','Table','Subscript','Superscript','Source')
 );
 );
 
 
 // This is the visible toolbar set when the editor is maximized.
 // This is the visible toolbar set when the editor is maximized.

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/test_question_description.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
     array('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     array('Bold','Italic','Underline'),
     array('JustifyLeft','JustifyCenter','JustifyRight')
     array('JustifyLeft','JustifyCenter','JustifyRight')

+ 1 - 1
main/inc/lib/fckeditor/toolbars/default/training_description.php

@@ -14,7 +14,7 @@ $config['ToolbarSets']['Normal'] = array(
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Table','SpecialChar'),
 	array('Table','SpecialChar'),
 	array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'),
 	array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'),
-	'/',	
+	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
 	array('Bold','Italic','Underline'),
 	array('JustifyLeft','JustifyCenter','JustifyRight')
 	array('JustifyLeft','JustifyCenter','JustifyRight')

+ 9 - 9
main/inc/lib/formvalidator/Element/calendar_popup.php

@@ -3,20 +3,20 @@
 /*
 /*
 ==============================================================================
 ==============================================================================
 	Dokeos - elearning and course management software
 	Dokeos - elearning and course management software
-	
+
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) Bart Mollet, Hogeschool Gent
 	Copyright (c) Bart Mollet, Hogeschool Gent
-	
+
 	For a full list of contributors, see "credits.txt".
 	For a full list of contributors, see "credits.txt".
 	The full license can be read in "license.txt".
 	The full license can be read in "license.txt".
-	
+
 	This program is free software; you can redistribute it and/or
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
 	modify it under the terms of the GNU General Public License
 	as published by the Free Software Foundation; either version 2
 	as published by the Free Software Foundation; either version 2
 	of the License, or (at your option) any later version.
 	of the License, or (at your option) any later version.
-	
+
 	See the GNU General Public License for more details.
 	See the GNU General Public License for more details.
-	
+
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Mail: info@dokeos.com
 	Mail: info@dokeos.com
 ==============================================================================
 ==============================================================================
@@ -43,7 +43,7 @@ if (empty ($iso_lang) )
 	$iso_lang = 'en';
 	$iso_lang = 'en';
 }
 }
 ?>
 ?>
-<!DOCTYPE html 
+<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $iso_lang; ?>" lang="<?php echo $iso_lang; ?>">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $iso_lang; ?>" lang="<?php echo $iso_lang; ?>">
@@ -55,7 +55,7 @@ if (empty ($iso_lang) )
 @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
 @import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
 table.calendar
 table.calendar
 {
 {
-	width: 100%;	
+	width: 100%;
 	font-size: 11px;
 	font-size: 11px;
 	font-family: verdana, arial, helvetica, sans-serif;
 	font-family: verdana, arial, helvetica, sans-serif;
 }
 }
@@ -74,12 +74,12 @@ table.calendar td
 {
 {
 	width: 25px;
 	width: 25px;
 	height: 25px;
 	height: 25px;
-	background-color: #f5f5f5;	
+	background-color: #f5f5f5;
 	text-align: center;
 	text-align: center;
 }
 }
 table.calendar td.selected
 table.calendar td.selected
 {
 {
-	border: 1px solid #ff0000; 
+	border: 1px solid #ff0000;
 	background-color: #FFCECE;
 	background-color: #FFCECE;
 }
 }
 table.calendar td a
 table.calendar td a

+ 9 - 9
main/inc/lib/formvalidator/Element/datepicker.php

@@ -3,20 +3,20 @@
 /*
 /*
 ==============================================================================
 ==============================================================================
 	Dokeos - elearning and course management software
 	Dokeos - elearning and course management software
-	
+
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) Bart Mollet, Hogeschool Gent
 	Copyright (c) Bart Mollet, Hogeschool Gent
-	
+
 	For a full list of contributors, see "credits.txt".
 	For a full list of contributors, see "credits.txt".
 	The full license can be read in "license.txt".
 	The full license can be read in "license.txt".
-	
+
 	This program is free software; you can redistribute it and/or
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
 	modify it under the terms of the GNU General Public License
 	as published by the Free Software Foundation; either version 2
 	as published by the Free Software Foundation; either version 2
 	of the License, or (at your option) any later version.
 	of the License, or (at your option) any later version.
-	
+
 	See the GNU General Public License for more details.
 	See the GNU General Public License for more details.
-	
+
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Mail: info@dokeos.com
 	Mail: info@dokeos.com
 ==============================================================================
 ==============================================================================
@@ -62,9 +62,9 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
 		$this->_options['minYear'] = date('Y')-7;
 		$this->_options['minYear'] = date('Y')-7;
 		$this->_options['maxYear'] = date('Y')+15;
 		$this->_options['maxYear'] = date('Y')+15;
 		$this->_options['language'] = $editor_lang;
 		$this->_options['language'] = $editor_lang;
-		//$this->_options['addEmptyOption'] = true; 
-		//$this->_options['emptyOptionValue'] = 0; 
-		//$this->_options['emptyOptionText'] = ' -- '; 
+		//$this->_options['addEmptyOption'] = true;
+		//$this->_options['emptyOptionValue'] = 0;
+		//$this->_options['emptyOptionText'] = ' -- ';
 	}
 	}
 	/**
 	/**
 	 * HTML code to display this datepicker
 	 * HTML code to display this datepicker
@@ -92,7 +92,7 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
 		return $js;
 		return $js;
 	}
 	}
 	/**
 	/**
-	 * Export the date value in MySQL format 
+	 * Export the date value in MySQL format
 	 * @return string YYYY-MM-DD HH:II:SS
 	 * @return string YYYY-MM-DD HH:II:SS
 	 */
 	 */
 	function exportValue()
 	function exportValue()

+ 6 - 6
main/inc/lib/formvalidator/Element/datepickerdate.php

@@ -2,20 +2,20 @@
 /*
 /*
 ==============================================================================
 ==============================================================================
 	Dokeos - elearning and course management software
 	Dokeos - elearning and course management software
-	
+
 	Copyright (c) 2004-2008 Dokeos SPRL.
 	Copyright (c) 2004-2008 Dokeos SPRL.
 	Copyright (c) Bart Mollet, Hogeschool Gent
 	Copyright (c) Bart Mollet, Hogeschool Gent
-	
+
 	For a full list of contributors, see "credits.txt".
 	For a full list of contributors, see "credits.txt".
 	The full license can be read in "license.txt".
 	The full license can be read in "license.txt".
-	
+
 	This program is free software; you can redistribute it and/or
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
 	modify it under the terms of the GNU General Public License
 	as published by the Free Software Foundation; either version 2
 	as published by the Free Software Foundation; either version 2
 	of the License, or (at your option) any later version.
 	of the License, or (at your option) any later version.
-	
+
 	See the GNU General Public License for more details.
 	See the GNU General Public License for more details.
-	
+
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Mail: info@dokeos.com
 	Mail: info@dokeos.com
 ==============================================================================
 ==============================================================================
@@ -89,7 +89,7 @@ class HTML_QuickForm_datepickerdate extends HTML_QuickForm_date
 		return $js;
 		return $js;
 	}
 	}
 	/**
 	/**
-	 * Export the date value in MySQL format 
+	 * Export the date value in MySQL format
 	 * @return string YYYY-MM-DD HH:II:SS
 	 * @return string YYYY-MM-DD HH:II:SS
 	 */
 	 */
 	function exportValue()
 	function exportValue()

+ 3 - 3
main/inc/lib/formvalidator/Element/html_editor.php

@@ -78,7 +78,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
 			}
 			}
 		}
 		}
 	}
 	}
-	
+
 	/**
 	/**
 	 * Check if the browser supports FCKeditor
 	 * Check if the browser supports FCKeditor
 	 *
 	 *
@@ -96,7 +96,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
 	function toHtml()
 	function toHtml()
 	{
 	{
 		$value = $this->getValue();
 		$value = $this->getValue();
-		
+
 		if ($this->fullPage)
 		if ($this->fullPage)
 		{
 		{
 			if (strlen(trim($value)) == 0)
 			if (strlen(trim($value)) == 0)
@@ -136,7 +136,7 @@ class HTML_QuickForm_html_editor extends HTML_QuickForm_textarea
 		$this -> fck_editor->Value = $this->getValue();
 		$this -> fck_editor->Value = $this->getValue();
 		$result .= $this->fck_editor->CreateHtml();
 		$result .= $this->fck_editor->CreateHtml();
 
 
-		//Add a link to open the allowed html tags window 
+		//Add a link to open the allowed html tags window
 		//$result .= '<small><a href="#" onclick="MyWindow=window.open('."'".api_get_path(WEB_CODE_PATH)."help/allowed_html_tags.php?fullpage=". ($this->fullPage ? '1' : '0')."','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=600,left=200,top=20'".'); return false;">'.get_lang('AllowedHTMLTags').'</a></small>';
 		//$result .= '<small><a href="#" onclick="MyWindow=window.open('."'".api_get_path(WEB_CODE_PATH)."help/allowed_html_tags.php?fullpage=". ($this->fullPage ? '1' : '0')."','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=600,left=200,top=20'".'); return false;">'.get_lang('AllowedHTMLTags').'</a></small>';
 		return $result;
 		return $result;
 	}
 	}

+ 5 - 5
main/inc/lib/formvalidator/Element/receivers.php

@@ -3,20 +3,20 @@
 /*
 /*
 ==============================================================================
 ==============================================================================
 	Dokeos - elearning and course management software
 	Dokeos - elearning and course management software
-	
+
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) Bart Mollet, Hogeschool Gent
 	Copyright (c) Bart Mollet, Hogeschool Gent
-	
+
 	For a full list of contributors, see "credits.txt".
 	For a full list of contributors, see "credits.txt".
 	The full license can be read in "license.txt".
 	The full license can be read in "license.txt".
-	
+
 	This program is free software; you can redistribute it and/or
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
 	modify it under the terms of the GNU General Public License
 	as published by the Free Software Foundation; either version 2
 	as published by the Free Software Foundation; either version 2
 	of the License, or (at your option) any later version.
 	of the License, or (at your option) any later version.
-	
+
 	See the GNU General Public License for more details.
 	See the GNU General Public License for more details.
-	
+
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Mail: info@dokeos.com
 	Mail: info@dokeos.com
 ==============================================================================
 ==============================================================================

+ 7 - 7
main/inc/lib/formvalidator/Element/select_language.php

@@ -3,20 +3,20 @@
 /*
 /*
 ==============================================================================
 ==============================================================================
 	Dokeos - elearning and course management software
 	Dokeos - elearning and course management software
-	
+
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) 2004-2005 Dokeos S.A.
 	Copyright (c) Bart Mollet, Hogeschool Gent
 	Copyright (c) Bart Mollet, Hogeschool Gent
-	
+
 	For a full list of contributors, see "credits.txt".
 	For a full list of contributors, see "credits.txt".
 	The full license can be read in "license.txt".
 	The full license can be read in "license.txt".
-	
+
 	This program is free software; you can redistribute it and/or
 	This program is free software; you can redistribute it and/or
 	modify it under the terms of the GNU General Public License
 	modify it under the terms of the GNU General Public License
 	as published by the Free Software Foundation; either version 2
 	as published by the Free Software Foundation; either version 2
 	of the License, or (at your option) any later version.
 	of the License, or (at your option) any later version.
-	
+
 	See the GNU General Public License for more details.
 	See the GNU General Public License for more details.
-	
+
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Contact address: Dokeos, 44 rue des palais, B-1030 Brussels, Belgium
 	Mail: info@dokeos.com
 	Mail: info@dokeos.com
 ==============================================================================
 ==============================================================================
@@ -40,10 +40,10 @@ class HTML_QuickForm_Select_Language extends HTML_QuickForm_select
 		foreach ($languages['name'] as $index => $name)
 		foreach ($languages['name'] as $index => $name)
 		{
 		{
 			if($languages['folder'][$index] == api_get_setting('platformLanguage')) {
 			if($languages['folder'][$index] == api_get_setting('platformLanguage')) {
-				$this->addOption($name,$languages['folder'][$index],array('selected'=>'selected'));	
+				$this->addOption($name,$languages['folder'][$index],array('selected'=>'selected'));
 			} else {
 			} else {
 				$this->addOption($name,$languages['folder'][$index]);
 				$this->addOption($name,$languages['folder'][$index]);
-			}			
+			}
 		}
 		}
 	}
 	}
 }
 }

Some files were not shown because too many files changed in this diff