Browse Source

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

Ivan Tcholakov 15 năm trước cách đây
mục cha
commit
84f8d984e7
100 tập tin đã thay đổi với 2040 bổ sung2040 xóa
  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
 ==============================================================================
 */
-// 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';
 
@@ -198,13 +198,13 @@ if($is_allowed_to_edit) // TEACHER ONLY
 	  ======================================*/
 
 	if ( isset($_GET['delete']) )
-	{	
+	{
 		include_once(api_get_path(LIBRARY_PATH) . 'fileManage.lib.php');
 		if(DocumentManager::delete_document($_course,$_GET['delete'],$base_work_dir))
 		{
 			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));
 		}
@@ -218,10 +218,10 @@ if($is_allowed_to_edit) // TEACHER ONLY
 				foreach($_POST['path'] as $index => $path)
 				{
 					DocumentManager::delete_document($_course,$path,$base_work_dir);
-				}	
+				}
 				Display::display_normal_message(api_convert_encoding(get_lang('DocDeleted'), 'UTF-8', $charset));
 				break;
-		}	
+		}
 	}
 }
 
@@ -267,7 +267,7 @@ if($docs_and_folders)
 		{
 			 $document_name=$id['title'];
 		}
-		else 
+		else
 		{
 			$document_name=basename($id['path']);
 		}
@@ -286,17 +286,17 @@ if($docs_and_folders)
 		//comments => display comment under the document name
 		//$row[] = $invisibility_span_open.nl2br(htmlspecialchars($id['comment'])).$invisibility_span_close;
 		$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
 		$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;
 	}
 	//*******************************************************************************************
 
 }
-else 
+else
 {
 	$sortable_data=array();
 	//$table_footer='<div style="text-align:center;"><strong>'.get_lang('NoDocsInFolder').'</strong></div>';
@@ -367,7 +367,7 @@ function getlist ($directory) {
 		}
 
 		return $files;
-	} 
+	}
 	else
 	{
 		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
 */
 class WCAG_Rendering {
-	
+
 	function editor_header() {
 		return '<div id="WCAG-editor"><div class="title">'.get_lang('WCAGEditor').'</div><div class="body">';
 	}
-	
+
 	function editor_footer() {
 		return '</div></div>';
 	}
-	
+
 	function prepareXHTML() {
 		$text = $_POST['text'];
 		$text = WCAG_Rendering::text_to_HTML ( $text );
-		$imageFile = $_POST['imagefile'];				
+		$imageFile = $_POST['imagefile'];
 		$imageLabel = $_POST['imageLabel'];
-		$link = $_POST['link'];				
+		$link = $_POST['link'];
 		$linkLabel = $_POST['linkLabel'];
 		if (strlen($linkLabel) == 0) {
 			$linkLabel = $link;
@@ -55,20 +55,20 @@ class WCAG_Rendering {
 		$home_top=$home_top."<div style=\"clear:both;\"><span></span></div></div>";
 		return $home_top;
 	}
-	
+
 	/**
 	* this method validate the content of current request (from WCAG editor).
 	* this function return the error msg.
 	*/
 	function request_validation() {
-		$imageFile = $_POST['imagefile'];				
+		$imageFile = $_POST['imagefile'];
 		$imageLabel = $_POST['imageLabel'];
 		if ((strlen($imageFile) > 0) and (strlen($imageLabel) == 0)) {
 			return get_lang('errorNoLabel');
 		}
 		return '';
 	}
-	
+
 /**
 * Converter Plaintext to (x)HTML
 */
@@ -98,13 +98,13 @@ function extract_data ($xhtml) {
 		$startP = stripos ($xhtml, "<p>");
 		$endP =  stripos ($xhtml, "</p>");
 		$text = substr ($xhtml, $startP+3, $endP-$startP-3 );
-	}	
-	
+	}
+
 	// convert HTML to text.
 	$text = WCAG_Rendering::HTML_to_text($text);
 
 	$url='';
-	if (stripos($xhtml, '<img')) {	
+	if (stripos($xhtml, '<img')) {
 		$startImgURL = stripos ($xhtml, "src=\"");
 		$endImgURL = stripos ($xhtml, "\" ");
 		$url = substr ($xhtml, $startImgURL+5, $endImgURL-$startImgURL-5 );
@@ -113,12 +113,12 @@ function extract_data ($xhtml) {
 		$endImgLabel = stripos ($subxhtml, "\" ");
 		$label = substr ($subxhtml, $startImgLabel+5, $endImgLabel-$startImgLabel-5 );
 	}
-	
+
 	$subxhtml = substr ($xhtml, $endImgURL+2, $startP);
 	$startImgLabel = stripos ($subxhtml, "alt=\"");
 	$endImgLabel = stripos ($subxhtml, "\" ");
 	$label = substr ($subxhtml, $startImgLabel+5, $endImgLabel-$startImgLabel-5 );
-	
+
 	$subxhtml = substr ($xhtml, $endP+2, 9999999999);
 	$link="";
 	$linkLabel="";
@@ -126,11 +126,11 @@ function extract_data ($xhtml) {
 		$startLinkURL = stripos ($subxhtml, "ref=\"");
 		$endLinkURL = stripos ($subxhtml, "\">");
 		$link = substr ($subxhtml, $startLinkURL+5, $endLinkURL-$startLinkURL-5 );
-		
+
 		$endLinkLabel = stripos ($subxhtml, "</a>");
 		$linkLabel = substr ( $subxhtml, $endLinkURL+2, $endLinkLabel-$endLinkURL-2 );
 	}
-	
+
 	$values = array("text"=>$text,
                     "imagefile"=>$url,
                     "imageLabel"=>$label,
@@ -155,14 +155,14 @@ function &prepare_admin_form( $xhtml, &$form )
 	$form->addElement('text','imageLabel',get_lang('WCAGLabel'));
 	$form->addElement('text','link',get_lang('WCAGLink'));
 	$form->addElement('text','linkLabel',get_lang('WCAGLinkLabel'));
-	
+
 	$form->setDefaults($values);
-	
+
 	$renderer =& $form->defaultRenderer();
 	$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 />';
 	$renderer->setElementTemplate($element_template);
-	
+
 	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
 // 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
 // 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"
 // 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>');

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

@@ -5,12 +5,12 @@ include_once('class.pdf.php');
 class Cezpdf extends Cpdf {
 //==============================================================================
 // 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.
 //
 // IMPORTANT NOTE
 // there is no warranty, implied or otherwise with this software.
-// 
+//
 // version 009 (versioning is linked to class.pdf.php)
 //
 // released under a public domain licence.
@@ -31,12 +31,12 @@ function Cezpdf($paper='a4',$orientation='portrait'){
 	// orientation can be 'portrait' or 'landscape'
 	// or, to actually set the coordinates, then pass an array in as the first parameter.
 	// the defaults are as shown.
-	// 
+	//
 	// -------------------------
 	// 2002-07-24 - Nicola Asuni (info@tecnick.com):
 	// 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
-	// 
+	//
 	// 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->ez['pageWidth']=$size[2];
 	$this->ez['pageHeight']=$size[3];
-	
+
 	// also set the margins to some reasonable defaults
 	$this->ez['topMargin']=30;
 	$this->ez['bottomMargin']=30;
 	$this->ez['leftMargin']=30;
 	$this->ez['rightMargin']=30;
-	
+
 	// set the current writing position to the top of the first page
 	$this->y = $this->ez['pageHeight']-$this->ez['topMargin'];
 	// 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'];
   $this->ez['columns']['width']=$width;
   $this->ez['rightMargin']=$this->ez['pageWidth']-$this->ez['leftMargin']-$width;
-  
+
 }
 // ------------------------------------------------------------------------------
 function ezColumnsStop(){
@@ -249,7 +249,7 @@ function ezSetMargins($top,$bottom,$left,$right){
   $this->ez['bottomMargin']=$bottom;
   $this->ez['leftMargin']=$left;
   $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
   if ($this->y > $this->ez['pageHeight']-$top){
     // then move y down
@@ -259,7 +259,7 @@ function ezSetMargins($top,$bottom,$left,$right){
     // then make a new page
     $this->ezNewPage();
   }
-}  
+}
 
 // ------------------------------------------------------------------------------
 
@@ -480,7 +480,7 @@ function ezSetDy($dy,$mod=''){
   // used to change the vertical position of the writing point.
   // changes up by a positive increment, so enter a negative number to go
   // 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.
   $this->y += $dy;
   if ( $this->y < $this->ez['bottomMargin']){
@@ -533,17 +533,17 @@ function ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$gap,$
   } else {
     $options = array();
   }
-  
+
   $mx=0;
   $startPage = $this->ezPageCount;
   $secondGo=0;
 
   // $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
-  
+
   // the return from this function is the total cell height, including gaps, and $y is adjusted
   // to be the postion of the bottom line
-  
+
   // begin the transaction
   $this->transaction('start');
   $ok=0;
@@ -565,7 +565,7 @@ function ezPrvtTableColumnHeadings($cols,$pos,$maxWidth,$height,$decender,$gap,$
     }
     $y = $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
     // do not check on the second time around, to avoid an infinite loop
     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
   // '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
-  // '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
   //    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.
@@ -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
   //                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.
-  
+
   if (!is_array($data)){
     return;
   }
-  
+
   if (!is_array($cols)){
     // take the columns from the first row of the data set
     reset($data);
@@ -658,7 +658,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
       $cols[$k1]=$k1;
     }
   }
-  
+
   if (!is_array($options)){
     $options=array();
   }
@@ -682,7 +682,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     }
   }
   $options['gap']=2*$options['colGap'];
-  
+
   $middle = ($this->ez['pageWidth']-$this->ez['rightMargin'])/2+($this->ez['leftMargin'])/2;
   // figure out the maximum widths of the text within each column
   $maxWidth=array();
@@ -705,7 +705,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
       $maxWidth[$colName]=$w;
     }
   }
-  
+
   // calculate the start positions of each of the columns
   $pos=array();
   $x=0;
@@ -762,7 +762,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         $cols0[$colName]+= ($neededWidth-$presentWidth)/count($cols0);
       }
     } else {
-    
+
       $cnt=0;
       while ($presentWidth>$neededWidth && $cnt<100){
         $cnt++; // insurance policy
@@ -858,7 +858,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
   $basePos = $pos;
   $baseX0 = $x0;
   $baseX1 = $x1;
-  
+
   // ok, just about ready to make me a table
   $this->setColor($options['textCol'][0],$options['textCol'][1],$options['textCol'][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;
         $x1=$baseX1+$dm;
-  
+
   $y=$this->y; // to simplify the code a bit
-  
+
   // make the table
   $height = $this->getFontHeight($options['fontSize']);
   $decender = $this->getFontDecender($options['fontSize']);
 
-  
-  
+
+
   $y0=$y+$decender;
   $dy=0;
   if ($options['showHeadings']){
@@ -940,7 +940,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
   }
   $firstLine=1;
 
-  
+
   // open an object here so that the text can be put in over the shading
   if ($options['shaded']){
     $this->saveState();
@@ -949,7 +949,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     $this->addObject($textObjectId);
     $this->reopenObject($textObjectId);
   }
-  
+
   $cnt=0;
   $newPage=0;
   foreach($data as $row){
@@ -973,7 +973,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
     $mx=0;
     $newRow=1;
     while(!$abortTable && ($newPage || $newRow)){
-      
+
       $y-=$height;
       if ($newPage || $y<$this->ez['bottomMargin'] || (isset($options['minRowSpace']) && $y<($this->ez['bottomMargin']+$options['minRowSpace'])) ){
         // check that enough rows are with the heading
@@ -982,7 +982,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
           $movedOnce = 1;
           $abortTable = 1;
         }
-      
+
         $y2=$y-$mx+2*$height+$decender-$newRow*$height;
         if ($options['showLines']){
           if (!$options['showHeadings']){
@@ -1006,7 +1006,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
 //        $x1=$x1+$dm;
         $x0=$baseX0+$dm;
         $x1=$baseX1+$dm;
-  
+
         if ($options['shaded']){
           $this->saveState();
           $textObjectId = $this->openObject();
@@ -1039,7 +1039,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         $colNewPage=0;
         if (isset($row[$colName])){
           if (isset($options['cols'][$colName]) && isset($options['cols'][$colName]['link']) && strlen($options['cols'][$colName]['link'])){
-            
+
             $lines = explode("\n",$row[$colName]);
             if (isset($row[$options['cols'][$colName]['link']]) && strlen($row[$options['cols'][$colName]['link']])){
               foreach($lines as $k=>$v){
@@ -1085,7 +1085,7 @@ function ezTable(&$data,$cols='',$title='',$options=''){
             }
           }
         }
-  
+
         $dy=$y+$height-$this->y+$options['rowGap'];
         if ($dy-$height*$newPage>$mx){
           $mx=$dy-$height*$newPage;
@@ -1124,9 +1124,9 @@ function ezTable(&$data,$cols='',$title='',$options=''){
         $this->restoreState();
 //        $this->reopenObject($textObjectId);
       }
-    } // end of while 
+    } // end of while
     $y=$y-$mx+$height;
-    
+
     // checking row split over pages
     if ($options['splitRows']==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 {
       $ok=1;  // don't go round the loop if splitting rows is allowed
     }
-    
+
     }  // end of while to check for row splitting
     if ($abortTable){
       if ($ok==0){
@@ -1165,9 +1165,9 @@ function ezTable(&$data,$cols='',$title='',$options=''){
       $this->ezNewPage();
       break;
     }
-    
+
   } // end of foreach ($data as $row)
-  
+
   } // end of while ($abortTable)
 
   // 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->restoreState();
   }
-  
+
   $this->y=$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)
   // '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)
-  
+
   // 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.
   $text = $this->ezProcessText($text);
-  
+
   $newPage=false;
   $store_y = $this->y;
-  
+
   if (is_array($options) && isset($options['aleft'])){
     $left=$options['aleft'];
   } else {
@@ -1243,13 +1243,13 @@ function ezText($text,$size=0,$options=array(),$test=0){
   } else {
     $this->ez['fontSize']=$size;
   }
-  
+
   if (is_array($options) && isset($options['justification'])){
     $just = $options['justification'];
   } else {
     $just = 'left';
   }
-  
+
   // 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
     $height = $options['leading'];
@@ -1259,7 +1259,7 @@ function ezText($text,$size=0,$options=array(),$test=0){
 		$height = $this->getFontHeight($size);
 	}
 
-  
+
   $lines = explode("\n",$text);
   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
       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)
         {
           //we are on a new page, nothing to do
           $newPage=true;
         }
-        else 
+        else
         {
           //else start new page
           $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['cap']))) $border['cap'] = 'round';
 	if (!(isset($border['join']))) $border['join'] = 'round';
-	
+
 
 	$this->setStrokeColor($border['color']['red'],$border['color']['green'],$border['color']['blue']);
 	$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.
 function loadTemplate($templateFile){
   // 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
   // The id of the template will be returned for the user to operate on it later
   if (!file_exists($templateFile)){
@@ -1534,7 +1534,7 @@ function uline($info){
   switch($info['status']){
     case 'start':
     case 'sol':
-    
+
       // the beginning of the underline zone
       if (!isset($this->ez['links'])){
         $this->ez['links']=array();

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

@@ -12,7 +12,7 @@
 *
 * IMPORTANT NOTE
 * there is no warranty, implied or otherwise with this software.
-* 
+*
 * LICENCE
 * 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
 * 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
 */
@@ -52,7 +52,7 @@ var $currentBaseFont='';
 */
 var $currentFontNum=0;
 /**
-* 
+*
 */
 var $currentNode;
 /**
@@ -145,7 +145,7 @@ var $fontFamilies = array();
 /**
 * 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
 */
@@ -184,7 +184,7 @@ var $nCallback = 0;
 */
 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)
 * 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)){
   $this->newDocument($pageSize);
-  
+
   // also initialize the font families that are known about already
   $this->setFontFamily('init');
 //  $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
 * $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'.
 */
 
@@ -383,7 +383,7 @@ function o_pages($id,$action,$options=''){
               $o['info']['pages'][$k]=$options['id'];
             }
           }
-        } 
+        }
       }
       break;
     case 'procset':
@@ -764,7 +764,7 @@ function o_action($id,$action,$options=''){
 
 /**
 * 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=''){
   if ($action!='new'){
@@ -1055,7 +1055,7 @@ function o_encryption($id,$action,$options=''){
 
       $this->objects[$id]['info']['U']=$uvalue;
       $this->encryptionKey=$ukey;
-     
+
       // initialize the arc4 array
       break;
     case 'out':
@@ -1069,12 +1069,12 @@ function o_encryption($id,$action,$options=''){
       $o['info']['p'] = (($o['info']['p']^255)+1)*-1;
       $res.="\n/P ".($o['info']['p']);
       $res.="\n>>\nendobj\n";
-      
+
       return $res;
       break;
   }
 }
-      
+
 /**
 * ARC4 functions
 * 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){
   $tmp = $this->encryptionKey;
@@ -1129,7 +1129,7 @@ function ARC4_init($key=''){
     $j = ($j + ord($t) + ord($k[$i]))%256;
     $this->arc4[$i]=$this->arc4[$j];
     $this->arc4[$j]=$t;
-  }    
+  }
 }
 
 /**
@@ -1150,7 +1150,7 @@ function ARC4($text){
     $k = ord($c[(ord($c[$a])+ord($c[$b]))%256]);
     $out.=chr(ord($text[$i]) ^ $k);
   }
-  
+
   return $out;
 }
 
@@ -1289,7 +1289,7 @@ function newDocument($pageSize=array(0,0,612,792)){
   $this->numObj++;
   $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
   $this->firstPageId = $this->currentContents;
 }
@@ -1455,7 +1455,7 @@ function selectFont($fontName,$encoding='',$set=1){
         $fbtype='';
       }
       $fbfile = $basefile.'.'.$fbtype;
-      
+
 //      $pfbfile = substr($fontName,0,strlen($fontName)-4).'.pfb';
 //      $ttffile = substr($fontName,0,strlen($fontName)-4).'.ttf';
       $this->addMessage('selectFont: checking for - '.$fbfile);
@@ -1507,7 +1507,7 @@ function selectFont($fontName,$encoding='',$set=1){
         $widthid = $this->numObj;
 
         // 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.
         $fp = fopen($fbfile,'rb');
         $tmp = get_magic_quotes_runtime();
@@ -1544,7 +1544,7 @@ function selectFont($fontName,$encoding='',$set=1){
         } else if ($fbtype=='ttf'){
           $fdopt['FontFile2']=$pfbid;
         }
-        $this->o_fontDescriptor($fontDescriptorId,'new',$fdopt);        
+        $this->o_fontDescriptor($fontDescriptorId,'new',$fdopt);
 
         // embed the font program
         $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
       if (isset($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
 * 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
-* 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.
 *
 * @access private
@@ -1615,7 +1615,7 @@ function setCurrentFont(){
   }
   $cf = substr($this->currentBaseFont,strrpos($this->currentBaseFont,'/')+1);
   if (strlen($this->currentTextState)
-    && isset($this->fontFamilies[$cf]) 
+    && isset($this->fontFamilies[$cf])
       && isset($this->fontFamilies[$cf][$this->currentTextState])){
     // then we are in some state or another
     // 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
     // simply assume the base font
     $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
 * centered at $x0,$y0, radii $r1,$r2
 * 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.
 */
 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;
     $b0=$b1;
     $c0=$c1;
-    $d0=$d1;    
+    $d0=$d1;
   }
   if ($fill){
     $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.
 *   (2) represents 2 on, 2 off, 2 on , 2 off ...
 *   (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){
 
@@ -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
   // then on the new page, re-open them with the right setings
-  
+
   if ($this->nStateStack){
     for ($i=$this->nStateStack;$i>=1;$i--){
       $this->restoreState($i);
@@ -1874,7 +1874,7 @@ function newPage($insert=0,$id=0,$pos='after'){
     for ($i=1;$i<=$this->nStateStack;$i++){
       $this->saveState($i);
     }
-  }  
+  }
   // and if there has been a stroke or fill colour set, then transfer them
   if ($this->currentColour['r']>=0){
     $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=''){
   // setting the options allows the adjustment of the headers
   // 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
   // '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
@@ -1918,7 +1918,7 @@ function stream($options=''){
   $fileName = (isset($options['Content-Disposition'])?$options['Content-Disposition']:'file.pdf');
   header("Content-Disposition: inline; filename=".$fileName);
   if (isset($options['Accept-Ranges']) && $options['Accept-Ranges']==1){
-    header("Accept-Ranges: ".strlen(ltrim($tmp))); 
+    header("Accept-Ranges: ".strlen(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
 *
 * @access private
@@ -2146,7 +2146,7 @@ function PRVTcheckTextDirective1(&$text,$i,&$f,$final,&$x,&$y,$size=0,$angle=0,$
         }
         break;
     }
-  } 
+  }
   return $directive;
 }
 
@@ -2199,7 +2199,7 @@ function addText($x,$y,$size,$text,$angle=0,$wordSpaceAdjust=0){
         $xp=$x;
         $yp=$y;
         $directive = $this->PRVTcheckTextDirective1($text,$i,$f,1,$xp,$yp,$size,$angle,$wordSpaceAdjust);
-        
+
         // restart the text object
           if ($angle==0){
             $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;
       $start=$i+1;
     }
-    
+
   }
   if ($start<$len){
     $part = substr($text,$start);
@@ -2284,7 +2284,7 @@ function getTextWidth($size,$text){
       }
     }
   }
-  
+
   $this->currentTextState = $store_currentTextState;
   $this->setCurrentFont();
 
@@ -2328,7 +2328,7 @@ function PRVTadjustWrapText($text,$actual,$width,&$x,&$adjust,$justification){
 * justification and angle can also be specified for the text
 */
 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.
   // $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 {
         $cOrd2 = $cOrd;
       }
-  
+
       if (isset($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
 * This is to get around not being able to have open 'q' across pages
 *
 */
 function saveState($pageEnd=0){
   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
     // 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
@@ -2492,7 +2492,7 @@ function openObject(){
   $this->o_contents($this->numObj,'new');
   $this->currentContents=$this->numObj;
   $this->looseObjects[$this->numObj]=1;
-  
+
   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
     switch($options){
       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';
       case 'add':
         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;
   }
   set_magic_quotes_runtime($tmp);
-  
+
   if (!$error){
     $header = chr(137).chr(80).chr(78).chr(71).chr(13).chr(10).chr(26).chr(10);
     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);
       $chunkType = substr($data,$p+4,4);
 //      echo $chunkType.' - '.$chunkLen.'<br>';
-    
+
       switch($chunkType){
         case 'IHDR':
           // this is where all the file information comes from
@@ -2698,16 +2698,16 @@ function addPngFromFile($file,$x,$y,$w=0,$h=0){
         case 'IDAT':
           $idata.=substr($data,$p+8,$chunkLen);
           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();
-          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.
             // set up an array, stretching over all palette entries which will be o (opaque) or 1 (transparent)
             $transparency['type']='indexed';
@@ -2719,37 +2719,37 @@ function addPngFromFile($file,$x,$y,$w=0,$h=0){
               }
             }
             $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['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:
           break;
       }
-    
+
       $p += $chunkLen+12;
     }
-    
+
     if(!$haveHeader){
       $error = 1;
       $errormsg = 'information header is missing';
@@ -2853,7 +2853,7 @@ function addJpegFromFile($img,$x,$y,$w=0,$h=0){
   set_magic_quotes_runtime(0);
   $data = fread($fp,filesize($img));
   set_magic_quotes_runtime($tmp);
-  
+
   fclose($fp);
 
   $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
-* 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
 */
 function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
   // 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
-  
+
   // 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.
-  
+
   // 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){
     $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 :)
   $imageWidth=imagesx($img);
   $imageHeight=imagesy($img);
-  
+
   if ($w<=0 && $h<=0){
     return;
   }
@@ -2891,7 +2891,7 @@ function addImage(&$img,$x,$y,$w=0,$h=0,$quality=75){
   if ($h==0){
     $h=$w*$imageHeight/$imageWidth;
   }
-  
+
   // gotta get the data out of the img..
 
   // 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.
 		$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;
 		$sExtension = strtolower( $sExtension ) ;
-		
+
 		if ( isset( $Config['SecureImageUploads'] ) )
 		{
 			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.
 	$sResourceTypePath = GetResourceTypeDirectory( $resourceType, $sCommand ) ;
-	
+
 	// Ensure that the directory exists.
 	$sErrorMsg = CreateServerFolder( $sResourceTypePath ) ;
 	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
  * @subpackage files
  */
-class Files 
+class Files
 {
-	
+
 	/**
 	 * 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.
 	 * @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
@@ -32,29 +32,29 @@ class Files
 	 * @param boolean $unique create unique destination file if true.
 	 * @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;
 
 		$destination_dir = Files::fixPath($destination_dir);
 
-		if(!is_dir($destination_dir)) 
+		if(!is_dir($destination_dir))
 			Return FILE_ERROR_DST_DIR_FAILED;
 
 		$filename = Files::escape($destination_file);
 
-		if($unique) 
+		if($unique)
 		{
 			$dotIndex = strrpos($destination_file, '.');
 			$ext = '';
-			if(is_int($dotIndex)) 
+			if(is_int($dotIndex))
 			{
 				$ext = substr($destination_file, $dotIndex);
 				$base = substr($destination_file, 0, $dotIndex);
 			}
 			$counter = 0;
-			while(is_file($destination_dir.$filename)) 
+			while(is_file($destination_dir.$filename))
 			{
 				$counter++;
 				$filename = $base.'_'.$counter.$ext;
@@ -63,7 +63,7 @@ class Files
 
 		if (!copy($source, $destination_dir.$filename))
 			return FILE_ERROR_COPY_FAILED;
-		
+
 		global $permissions_for_new_files;
 
 		//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.
 	 * @return boolean true if the new folder is created, false otherwise.
 	 */
-	function createFolder($newFolder) 
+	function createFolder($newFolder)
 	{
 		//mkdir ($newFolder, 0777);
 		//return chmod($newFolder, 0777);
 
-		global $permissions_for_new_directories;		
+		global $permissions_for_new_directories;
 		mkdir ($newFolder, $permissions_for_new_directories);
 		return @chmod($newFolder, $permissions_for_new_directories);
 	}
@@ -98,7 +98,7 @@ class Files
 	 * @param string $filename the orginal filename
 	 * @return string the escaped safe filename
 	 */
-	function escape($filename) 
+	function escape($filename)
 	{
 		Return preg_replace('/[^\w\._]/', '_', $filename);
 	}
@@ -108,9 +108,9 @@ class Files
 	 * @param string $file file to be deleted
 	 * @return boolean true if deleted, false otherwise.
 	 */
-	function delFile($file) 
+	function delFile($file)
 	{
-		if(is_file($file)) 
+		if(is_file($file))
 			Return unlink($file);
 		else
 			Return false;
@@ -124,13 +124,13 @@ class Files
 	 * error if the directory is not empty.
 	 * @return boolean true if deleted.
 	 */
-	function delFolder($folder, $recursive=false) 
+	function delFolder($folder, $recursive=false)
 	{
 		$deleted = true;
-		if($recursive) 
+		if($recursive)
 		{
 			$d = dir($folder);
-			while (false !== ($entry = $d->read())) 
+			while (false !== ($entry = $d->read()))
 			{
 				if ($entry != '.' && $entry != '..')
 				{
@@ -138,13 +138,13 @@ class Files
 					//var_dump($obj);
 					if (is_file($obj))
 					{
-						$deleted &= Files::delFile($obj);					
+						$deleted &= Files::delFile($obj);
 					}
 					else if(is_dir($obj))
 					{
 						$deleted &= Files::delFolder($obj, $recursive);
 					}
-					
+
 				}
 			}
 			$d->close();
@@ -153,7 +153,7 @@ class Files
 
 		//$folder= $folder.'/thumbs';
 		//var_dump($folder);
-		if(is_dir($folder)) 
+		if(is_dir($folder))
 			$deleted &= rmdir($folder);
 		else
 			$deleted &= false;
@@ -166,7 +166,7 @@ class Files
 	 * @param string $path the path
 	 * @return string path with trailing /
 	 */
-	function fixPath($path) 
+	function fixPath($path)
 	{
 		//append a slash to the path if it doesn't exists.
 		if(!(substr($path,-1) == '/'))
@@ -180,7 +180,7 @@ class Files
 	 * @param string $pathB path two
 	 * @return string a trailing slash combinded path.
 	 */
-	function makePath($pathA, $pathB) 
+	function makePath($pathA, $pathB)
 	{
 		$pathA = Files::fixPath($pathA);
 		if(substr($pathB,0,1)=='/')
@@ -195,29 +195,29 @@ class Files
 	 * @param string $pathB the ending path with file
 	 * @return string combined file path.
 	 */
-	function makeFile($pathA, $pathB) 
-	{		
+	function makeFile($pathA, $pathB)
+	{
 		$pathA = Files::fixPath($pathA);
 		if(substr($pathB,0,1)=='/')
 			$pathB = substr($pathB,1);
-		
+
 		Return $pathA.$pathB;
 	}
 
-	
+
 	/**
 	 * Format the file size, limits to Mb.
 	 * @param int $size the raw filesize
 	 * @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
-			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
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  GD.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
 **/
 // +----------------------------------------------------------------------+
@@ -244,7 +244,7 @@ Class Image_Transform_Driver_GD extends Image_Transform
         } else {
             $img2 =ImageCreate($width2,$height2);
         }
-	
+
 
         if ( !is_resource($img2) ){
             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_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')){
             $new_img =ImageCreateTrueColor($new_width,$new_height);
@@ -394,7 +394,7 @@ Class Image_Transform_Driver_GD extends Image_Transform
         $this->new_y = $new_y;
         return true;
     }
-   
+
     /**
      * Flip the image horizontally or vertically
      *
@@ -406,22 +406,22 @@ Class Image_Transform_Driver_GD extends Image_Transform
             $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>";
-                    $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;

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

@@ -5,7 +5,7 @@
 ** Version.......:  1.0
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  IM.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** 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_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_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
      */
-    function flip($horizontal) 
+    function flip($horizontal)
     {
         if($horizontal)
             $this->command['flop'] = "-flop";
@@ -212,7 +212,7 @@ Class Image_Transform_Driver_IM extends Image_Transform
         $cmd = '' . IMAGE_TRANSFORM_LIB_PATH . 'convert ';
 		$cmd .= implode(' ', $this->command) . " -quality $quality ";
 		$cmd .= '"'.($this->image) . '" "' . ($filename) . '" 2>&1';
-        
+
         //$cmd = str_replace('/', '\\', $cmd);
 		//echo($cmd.'<br>');
         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
  * @subpackage Editor
  */
-class ImageEditor 
+class ImageEditor
 {
 	/**
 	 * ImageManager instance.
@@ -36,7 +36,7 @@ class ImageEditor
 	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
 	 * 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
@@ -45,18 +45,18 @@ class ImageEditor
 	 * @param ImageManager $manager the image manager, we need this
 	 * for some file and path handling functions.
 	 */
-	function ImageEditor($manager) 
+	function ImageEditor($manager)
 	{
 		$this->manager = $manager;
 		$this->_uid = md5($_SERVER['REMOTE_ADDR']);
 	}
-	
+
 	/**
 	 * 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.
 	 */
-	function isFileSaved() 
+	function isFileSaved()
 	{
 		Return $this->filesaved;
 	}
@@ -84,7 +84,7 @@ class ImageEditor
 
 		$imgURL = $this->manager->getFileURL($relative);
 		$fullpath = $this->manager->getFullPath($relative);
-		
+
 		$imgInfo = @getImageSize($fullpath);
 		if(!is_array($imgInfo))
 			Return array();
@@ -121,7 +121,7 @@ class ImageEditor
 	 * <code>array('src'=>'url of the image', 'dimensions'=>'width="xx" height="yy"',
 	 * 'file'=>'image file, relative', 'fullpath'=>'full path to the image');</code>
 	 */
-	function processAction($action, $relative, $fullpath) 
+	function processAction($action, $relative, $fullpath)
 	{
 		$params = '';
 
@@ -134,7 +134,7 @@ class ImageEditor
 		$img = Image_Transform::factory(IMAGE_CLASS);
 		$img->load($fullpath);
 
-		switch ($action) 
+		switch ($action)
 		{
 			case 'replace':
 
@@ -226,7 +226,7 @@ class ImageEditor
 			case 'flip':
 				if ($values[0] == 'hoz')
 					$img->flip(true);
-				else if($values[0] == 'ver') 
+				else if($values[0] == 'ver')
 					$img->flip(false);
 				break;
 			case 'save':
@@ -255,7 +255,7 @@ class ImageEditor
 					{
 						$this->forcedNewName = false;
 					}
-						
+
 					$newSaveFullpath = $this->manager->getFullPath($newSaveFile);
 					$img->save($newSaveFullpath, $values[0], $quality);
 					if(is_file($newSaveFullpath))
@@ -265,7 +265,7 @@ class ImageEditor
 				}
 				break;
 		}
-		
+
 		//create the tmp image file
 		$filename = $this->createUnique($fullpath);
 		$newRelative = $this->makeRelative($relative, $filename);
@@ -320,7 +320,7 @@ class ImageEditor
 
 
 		Return $image;
-	
+
 	}
 
 
@@ -331,7 +331,7 @@ class ImageEditor
 	 * @param string $type image type, 'jpeg', 'png', or 'gif'
 	 * @return string the filename according to save type
 	 */
-	function getSaveFileName($type) 
+	function getSaveFileName($type)
 	{
 		if(!isset($_GET['file']))
 			Return null;
@@ -357,7 +357,7 @@ class ImageEditor
 	 * Get the default save file name, used by editor.php.
 	 * @return string a suggestive filename, this should be unique
 	 */
-	function getDefaultSaveFile() 
+	function getDefaultSaveFile()
 	{
 		if(isset($_GET['img']))
 			$relative = rawurldecode($_GET['img']);
@@ -373,35 +373,35 @@ class ImageEditor
 	 * @param string $relative the relative filename to the base_dir
 	 * @return string a unique filename in the current path
 	 */
-	function getUniqueFilename($relative) 
+	function getUniqueFilename($relative)
 	{
 		$fullpath = $this->manager->getFullPath($relative);
-		
+
 		$pathinfo = pathinfo($fullpath);
 
 		$path = Files::fixPath($pathinfo['dirname']);
 		$file = Files::escape($pathinfo['basename']);
-		
+
 		$filename = $file;
 
 		$dotIndex = strrpos($file, '.');
 		$ext = '';
 
-		if(is_int($dotIndex)) 
+		if(is_int($dotIndex))
 		{
 			$ext = substr($file, $dotIndex);
 			$base = substr($file, 0, $dotIndex);
 		}
 
 		$counter = 0;
-		while(is_file($path.$filename)) 
+		while(is_file($path.$filename))
 		{
 			$counter++;
 			$filename = $base.'_'.$counter.$ext;
 		}
-		
+
 		Return $filename;
-		
+
 	}
 
 	/**
@@ -412,7 +412,7 @@ class ImageEditor
 	 * @param string $file the new filename
 	 * @return string relative path with the new filename
 	 */
-	function makeRelative($pathA, $file) 
+	function makeRelative($pathA, $file)
 	{
 		$index = strrpos($pathA,'/');
 		if(!is_int($index))
@@ -426,10 +426,10 @@ class ImageEditor
 	 * Get the action GET parameter
 	 * @return string action parameter
 	 */
-	function getAction() 
+	function getAction()
 	{
 		$action = null;
-		if(isset($_GET['action']))			 
+		if(isset($_GET['action']))
 			$action = str_replace('"','',$_GET['action']);
 		Return $action;
 	}
@@ -447,7 +447,7 @@ class ImageEditor
 	/**
 	 * Create unique tmp image file name.
 	 * 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)
 	 * and some random 6 character string.
 	 * This function also calls to clean up the tmp files.
@@ -455,7 +455,7 @@ class ImageEditor
 	 * @return string a unique filename for that path
 	 * NOTE: it only returns the filename, path no included.
 	 */
-	function createUnique($file) 
+	function createUnique($file)
 	{
 		$pathinfo = pathinfo($file);
 		$path = Files::fixPath($pathinfo['dirname']);
@@ -476,10 +476,10 @@ class ImageEditor
 
 	/**
 	 * Delete any tmp image files.
-	 * @param string $path the full path 
+	 * @param string $path the full path
 	 * where the clean should take place.
 	 */
-	function cleanUp($path,$file) 
+	function cleanUp($path,$file)
 	{
 		$path = Files::fixPath($path);
 
@@ -487,14 +487,14 @@ class ImageEditor
 			Return false;
 
 		$d = @dir($path);
-		
+
 		$tmp = $this->manager->getTmpPrefix();
 		$tmpLen = strlen($tmp);
 
 		$prefix = $tmp.$this->_uid;
 		$len = strlen($prefix);
 
-		while (false !== ($entry = $d->read())) 
+		while (false !== ($entry = $d->read()))
 		{
 			//echo $entry."<br>";
 			if(is_file($path.$entry) && $this->manager->isTmpFile($entry))
@@ -517,14 +517,14 @@ class ImageEditor
 	 * @return string of either 'gif', 'jpeg', 'png' or 'bmp'
 	 * otherwise it will return null.
 	 */
-	function getImageType($file) 
+	function getImageType($file)
 	{
 		$imageInfo = @getImageSize($file);
 
 		if(!is_array($imageInfo))
 			Return null;
 
-		switch($imageInfo[2]) 
+		switch($imageInfo[2])
 		{
 			case 1:
 				Return 'gif';
@@ -544,7 +544,7 @@ class ImageEditor
 	 * 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.
 	 */
-	function isGDEditable() 
+	function isGDEditable()
 	{
 		if(isset($_GET['img']))
 			$relative = rawurldecode($_GET['img']);
@@ -570,7 +570,7 @@ class ImageEditor
 	 * 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.
 	 */
-	function isGDGIFAble() 
+	function isGDGIFAble()
 	{
 		if(IMAGE_CLASS != 'GD')
 			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
  * @version $Id: ImageManager.php,v 1.4 2006/12/21 21:28:00 thierrybo Exp $
  */
-class ImageManager 
+class ImageManager
 {
 	/**
 	 * Configuration array.
@@ -33,7 +33,7 @@ class ImageManager
 	 * Constructor. Create a new Image Manager instance.
 	 * @param array $config configuration array, see config.inc.php
 	 */
-	function ImageManager($config) 
+	function ImageManager($config)
 	{
 		$this->config = $config;
 	}
@@ -42,7 +42,7 @@ class ImageManager
 	 * Get the base directory.
 	 * @return string base dir, see config.inc.php
 	 */
-	function getBaseDir() 
+	function getBaseDir()
 	{
 		Return $this->config['base_dir'];
 	}
@@ -51,11 +51,11 @@ class ImageManager
 	 * Get the base URL.
 	 * @return string base url, see config.inc.php
 	 */
-	function getBaseURL() 
+	function getBaseURL()
 	{
 		Return $this->config['base_url'];
 	}
-	
+
 	function isValidBase()
 	{
 		return is_dir($this->getBaseDir());
@@ -65,7 +65,7 @@ class ImageManager
 	 * Get the tmp file prefix.
      * @return string tmp file prefix.
 	 */
-	function getTmpPrefix() 
+	function getTmpPrefix()
 	{
 		Return $this->config['tmp_prefix'];
 	}
@@ -73,12 +73,12 @@ class ImageManager
 	/**
 	 * Get the sub directories in the base dir.
 	 * 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.
 	 * @return array of sub directries
 	 * <code>array('path name' => 'full directory path', ...)</code>
 	 */
-	function getDirs() 
+	function getDirs()
 	{
 		if(is_null($this->dirs))
 		{
@@ -98,7 +98,7 @@ class ImageManager
 	 * @return array of accessiable sub-directories
 	 * <code>array('path name' => 'full directory path', ...)</code>
 	 */
-	function _dirs($base, $path) 
+	function _dirs($base, $path)
 	{
 		$base = Files::fixPath($base);
 		$dirs = array();
@@ -107,7 +107,7 @@ class ImageManager
 			return $dirs;
 
 		$d = @dir($base);
-		
+
 		$in_group = api_is_in_group();
 		if ($in_group)
 		{
@@ -117,18 +117,18 @@ class ImageManager
 		}
 
 		$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
 			// a dot, and if is it not the thumbnail directory
-			if(is_dir($base.$entry) 
+			if(is_dir($base.$entry)
 				&& substr($entry,0,1) != '.'
 				&& strpos($entry, '_DELETED_') === false
 				&& strpos($entry, 'chat_files') === false
 				&& strpos($entry, 'css') === false
 				&& strpos($entry, 'HotPotatoes_files') === false
 				&& ($in_group || (!$in_group && strpos($entry, '_groupdocs') === false))
-				&& $this->isThumbDir($entry) == false) 
+				&& $this->isThumbDir($entry) == false)
 			{
 				$relative = Files::fixPath($path.$entry);
 				$fullpath = Files::fixPath($base.$entry);
@@ -139,17 +139,17 @@ class ImageManager
 				}
 				global $_course;
 				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 );
 					$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
-			    /*				
-				if ($visible_status=='0' || $visible_status=='-1') {					 
+			    /*
+				if ($visible_status=='0' || $visible_status=='-1') {
 					continue;
-				}				
+				}
 				*/
 
 				/* if (strpos($fullpath, '/shared_folder/') !== false) {
@@ -175,13 +175,13 @@ class ImageManager
 	 * @param string $path relative path to be base path.
 	 * @return array of file and path information.
 	 * <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,
 	 *                        'stat' => filestat)</code>
 	 */
-	function getFiles($path) 
+	function getFiles($path)
 	{
 		$files = array();
 		$dirs = array();
@@ -208,17 +208,17 @@ class ImageManager
 
 		// check templates files in bd
 		$tbl_system_template = Database :: get_main_table(TABLE_MAIN_SYSTEM_TEMPLATE);
-			
+
 		$sql = "SELECT image FROM $tbl_system_template ";
 		$res = Database::query($sql,__FILE__,__LINE__);
 
-		$files_templates = array();	
-		
+		$files_templates = array();
+
 		while ($row = Database::fetch_row($res)) {
 			$files_templates[] = $row[0];
-		}				
-		
-		while (false !== ($entry = $d->read())) 
+		}
+
+		while (false !== ($entry = $d->read()))
 		{
 
 			if (in_array($entry,$files_templates)) continue;
@@ -252,16 +252,16 @@ class ImageManager
 				if($is_dir && $this->isThumbDir($entry) == false) {
 				    global $_course;
 					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 );
-						$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
 					/*
-					if ($visible_status=='0' || $visible_status=='-1') {					 
+					if ($visible_status=='0' || $visible_status=='-1') {
 						continue;
 					}
 					*/
@@ -270,7 +270,7 @@ class ImageManager
 					$count = $this->countFiles($full);
 					$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);
 
@@ -279,15 +279,15 @@ class ImageManager
 					    global $_course;
 					    if (isset($_course['dbName']) && $_course<>'-1') {
 							//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 );
-							$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
 					    /*
-						if ($visible_status=='0' || $visible_status=='-1') {					 
+						if ($visible_status=='0' || $visible_status=='-1') {
 							continue;
 						}
 						*/
@@ -305,29 +305,29 @@ class ImageManager
 		$d->close();
 		ksort($dirs);
 		ksort($files);
-		
+
 		Return array($dirs, $files);
-	}	
+	}
 
 	/**
 	 * Count the number of files and directories in a given folder
 	 * minus the thumbnail folders and thumbnails.
 	 */
-	function countFiles($path) 
+	function countFiles($path)
 	{
 		$total = 0;
 
-		if(is_dir($path)) 
+		if(is_dir($path))
 		{
 			$d = @dir($path);
 
-			while (false !== ($entry = $d->read())) 
+			while (false !== ($entry = $d->read()))
 			{
 				//echo $entry."<br>";
 				if(substr($entry,0,1) != '.'
 					&& $this->isThumbDir($entry) == false
 					&& $this->isTmpFile($entry) == false
-					&& $this->isThumb($entry) == false) 
+					&& $this->isThumb($entry) == false)
 				{
 					$total++;
 				}
@@ -340,10 +340,10 @@ class ImageManager
 	/**
 	 * Get image size information.
 	 * @param string $file the image file
-	 * @return array of getImageSize information, 
+	 * @return array of getImageSize information,
 	 *  false if the file is not an image.
 	 */
-	function getImageInfo($file) 
+	function getImageInfo($file)
 	{
 		Return @getImageSize($file);
 	}
@@ -353,7 +353,7 @@ class ImageManager
 	 * @param string $file filename to be checked
 	 * @return true if the file contains the thumbnail prefix, false otherwise.
 	 */
-	function isThumb($file) 
+	function isThumb($file)
 	{
 		$len = strlen($this->config['thumbnail_prefix']);
 		if(substr($file,0,$len)==$this->config['thumbnail_prefix'])
@@ -367,11 +367,11 @@ class ImageManager
 	 * @param string $entry directory name
 	 * @return true if it is a thumbnail directory, false otherwise
 	 */
-	function isThumbDir($entry) 
+	function isThumbDir($entry)
 	{
 		if($this->config['thumbnail_dir'] == false
 			|| strlen(trim($this->config['thumbnail_dir'])) == 0)
-			Return false;		
+			Return false;
 		else
 			Return ($entry == $this->config['thumbnail_dir']);
 	}
@@ -381,13 +381,13 @@ class ImageManager
 	 * @param string $file file name
 	 * @return boolean true if it is a tmp file, false otherwise
 	 */
-	function isTmpFile($file) 
+	function isTmpFile($file)
 	{
 		$len = strlen($this->config['tmp_prefix']);
 		if(substr($file,0,$len)==$this->config['tmp_prefix'])
 			Return true;
 		else
-			Return false;	 	
+			Return false;
 	}
 
 	/**
@@ -396,10 +396,10 @@ class ImageManager
 	 * @param string $fullpathfile the full path to the image file
 	 * @return string of the thumbnail file
 	 */
-	function getThumbName($fullpathfile) 
+	function getThumbName($fullpathfile)
 	{
 		$path_parts = pathinfo($fullpathfile);
-		
+
 		$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
 
 		if($this->config['safe_mode'] == true
@@ -422,15 +422,15 @@ class ImageManager
 			}
 		}
 	}
-	
+
 	/**
 	 * Similar to getThumbName, but returns the URL, base on the
 	 * 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
 	 * @return string the url of the thumbnail
 	 */
-	function getThumbURL($relative) 
+	function getThumbURL($relative)
 	{
 		$path_parts = pathinfo($relative);
 		$thumbnail = $this->config['thumbnail_prefix'].$path_parts['basename'];
@@ -465,12 +465,12 @@ class ImageManager
 	 * @param string $path the relative path to be checked
 	 * @return boolean true if the path exists, false otherwise
 	 */
-	function validRelativePath($path) 
+	function validRelativePath($path)
 	{
 		$dirs = $this->getDirs();
 		if($path == '/' || $path == '')
 			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.
 		for($i = 0; $i < count($dirs); $i++)
 		{
@@ -478,28 +478,28 @@ class ImageManager
 			//we found the path
 			if($key == $path)
 				Return true;
-		
+
 			next($dirs);
-		}		
+		}
 		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.
 	 * The dir must be relative to the base_dir and exists.
 	 * If 'validate_images' is set to true, only file with
 	 * image dimensions will be accepted.
 	 * @return null
 	 */
-	function processUploads() 
+	function processUploads()
 	{
 		if($this->isValidBase() == false)
 			return;
 
 		$relative = null;
 
-		if(isset($_POST['dir'])) 
+		if(isset($_POST['dir']))
 			$relative = rawurldecode($_POST['dir']);
 		else
 			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
 	 * true, only images will be processed. Any duplicate
 	 * file will be renamed. See Files::copyFile for details
@@ -520,12 +520,12 @@ class ImageManager
 	 * @param string $relative the relative path where the file
 	 * should be copied to.
 	 * @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
 	 */
 	function _processFiles($relative, $file)
 	{
-		global $_course; 
+		global $_course;
 		if($file['error']!=0)
 		{
 			return false;
@@ -587,29 +587,29 @@ class ImageManager
 
 		//no copy error
 		if (!is_int($result)) {
-       	     	
+
 	   	    if (isset($_course['dbName']) && $_course<>'-1') {
 				//adding the document to the DB
 				global $to_group_id;
-				
+
 				// looking for the /document/ folder
 				$document_path = substr($path, strpos($path,'/document/')+9, strlen($path)); //   /shared_folder/4/name
 				$document_path.= $result;
-				
-				$dokeosFile = $file['name'];	
+
+				$dokeosFile = $file['name'];
 				$dokeosFileSize = $file['size'];
 				if(!empty($group_properties['directory'])) {
 					$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())) {
 				//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;
@@ -638,12 +638,12 @@ class ImageManager
 
 	/**
 	 * 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
 	 * @param string $relative a file the relative to the base_dir
 	 * @return string the URL of the relative file.
 	 */
-	function getFileURL($relative) 
+	function getFileURL($relative)
 	{
 		Return Files::makeFile($this->getBaseURL(),$relative);
 	}
@@ -653,32 +653,32 @@ class ImageManager
 	 * @param string $relative the relative file.
 	 * @return string the full path, .ie. the base_dir + relative.
 	 */
-	function getFullPath($relative) 
+	function getFullPath($relative)
 	{
 		Return Files::makeFile($this->getBaseDir(),$relative);;
 	}
 
 	/**
 	 * Get the default thumbnail.
-	 * @return string default thumbnail, empty string if 
+	 * @return string default thumbnail, empty string if
 	 * the thumbnail doesn't exist.
 	 */
-	function getDefaultThumb() 
+	function getDefaultThumb()
 	{
 		if(is_file($this->config['default_thumbnail']))
 			Return $this->config['default_thumbnail'];
-		else 
+		else
 			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
-	 * 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.
-	 * 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)
 	 * then a thumbs.php?img=filename.jpg is returned.
 	 * The thumbs.php url will generate a new thumbnail
@@ -689,7 +689,7 @@ class ImageManager
 	 * actually thumbnail or a script to generate the
 	 * thumbnail on the fly.
 	 */
-	function getThumbnail($relative) 
+	function getThumbnail($relative)
 	{
 		$fullpath = Files::makeFile($this->getBaseDir(),$relative);
 
@@ -698,7 +698,7 @@ class ImageManager
 			Return $this->getDefaultThumb();
 
 		$imgInfo = @getImageSize($fullpath);
-		
+
 		//not an image
 		if(!is_array($imgInfo))
 			Return $this->getDefaultThumb();
@@ -710,7 +710,7 @@ class ImageManager
 			Return $this->getFileURL($relative);
 
 		$thumbnail = $this->getThumbName($fullpath);
-		
+
 		//check for thumbnails, if exists and
 		// it is up-to-date, return the thumbnail url
 		if(is_file($thumbnail))
@@ -728,7 +728,7 @@ class ImageManager
 	 * Delete and specified files.
 	 * @return boolean true if delete, false otherwise
 	 */
-	function deleteFiles() 
+	function deleteFiles()
 	{
 		if(isset($_GET['delf']))
 			$this->_delFile(rawurldecode($_GET['delf']));
@@ -738,10 +738,10 @@ class ImageManager
 	 * Delete and specified directories.
 	 * @return boolean true if delete, false otherwise
 	 */
-	function deleteDirs() 
+	function deleteDirs()
 	{
 		 if(isset($_GET['deld']))
-			return $this->_delDir(rawurldecode($_GET['deld']));		
+			return $this->_delDir(rawurldecode($_GET['deld']));
 		 else
 			 Return false;
 	}
@@ -751,7 +751,7 @@ class ImageManager
 	 * @param string $relative the relative file.
 	 * @return boolean true if deleted, false otherwise.
 	 */
-	function _delFile($relative) 
+	function _delFile($relative)
 	{
 		$fullpath = Files::makeFile($this->getBaseDir(),$relative);
 		//check that the file is an image
@@ -767,7 +767,7 @@ class ImageManager
 			//deleting from the DB
 			global $_course;
 			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);
 			}
 			Return Files::delFile($thumbnail);
@@ -781,17 +781,17 @@ class ImageManager
 	 * @param string $relative the relative path to be deleted.
 	 * @return boolean true if deleted, false otherwise.
 	 */
-	function _delDir($relative) 
+	function _delDir($relative)
 	{
 		$fullpath = Files::makePath($this->getBaseDir(),$relative);
 		//we can delete recursively	even if there are images in the dir
-		 
+
 		//if($this->countFiles($fullpath) <= 0) {
 		// now we use the default delete_document function
 		//return Files::delFolder($fullpath,true); //delete recursively.
 		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)); //
 			return DocumentManager::delete_document($_course,$path_dir,$base_dir);
 		}
@@ -804,9 +804,9 @@ class ImageManager
 			{
 				Return false;
 			}
-			 
-		} 
-		/*	
+
+		}
+		/*
 		}
 		else
 			Return false;
@@ -818,8 +818,8 @@ class ImageManager
 	 * If in safe_mode, nothing happens.
 	 * @return boolean true if created, false otherwise.
 	 */
-	function processNewDir() 
-	{		
+	function processNewDir()
+	{
 		if($this->config['safe_mode'] == true)
 			Return false;
 
@@ -827,29 +827,29 @@ class ImageManager
 		{
 			$newDir = rawurldecode($_GET['newDir']);
 			$dir = rawurldecode($_GET['dir']);
-			$path = Files::makePath($this->getBaseDir(),$dir);			
+			$path = Files::makePath($this->getBaseDir(),$dir);
 			$fullpath = Files::makePath($path, Files::escape($newDir));
 			if(is_dir($fullpath)) {
 				Return false;
 			} else {
 				//adding to the DB
 				// now the create_unexisting_directory will create the folder
-				//$result = Files::createFolder($fullpath);	
-									
+				//$result = Files::createFolder($fullpath);
+
 					global $_course;
-					if (isset($_course['dbName']) && $_course<>'-1') {	
+					if (isset($_course['dbName']) && $_course<>'-1') {
 					//@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());
 				}
 				else
 				{
 				 	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
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  NetPBM.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
 **/
 
@@ -45,7 +45,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
     function Image_Transform_Driver_NetPBM()
     {
         $this->uid = md5($_SERVER['REMOTE_ADDR']);
-            
+
         return true;
     } // 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_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 .
                             "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);
 
         if($angle > 90)
-        {   
+        {
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmrotate -noantialias 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
      */
-    function flip($horizontal) 
+    function flip($horizontal)
     {
-        if($horizontal) 
+        if($horizontal)
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmflip -lr";
         else
             $this->command[] = IMAGE_TRANSFORM_LIB_PATH . "pnmflip -tb";
@@ -200,7 +200,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
                 break;
         } // switch
         return implode('|', $this->command);
-    } 
+    }
 
     /**
      * Save the image file
@@ -213,7 +213,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
     function save($filename, $type=null, $quality = 85)
     {
         $cmd = $this->_postProcess('', $quality, $type) . ">$filename";
-            
+
 		//if we have windows server
         if(isset($_ENV['OS']) && eregi('window',$_ENV['OS']))
 			$cmd = ereg_replace('/','\\',$cmd);
@@ -236,7 +236,7 @@ Class Image_Transform_Driver_NetPBM extends Image_Transform
     {
         header('Content-type: image/' . $type);
         $cmd = $this->_postProcess($type, $quality);
-        
+
         passthru($cmd);
         $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
  * @subpackage Images
  */
-class Thumbnail 
+class Thumbnail
 {
 	/**
 	 * Graphics driver, GD, NetPBM or ImageMagick.
@@ -53,7 +53,7 @@ class Thumbnail
 	 * @param int $width thumbnail width
 	 * @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->width = $width;
@@ -67,16 +67,16 @@ class Thumbnail
 	 * as this parameter value.
 	 * @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;
 
 		//error_log('Creating Thumbs: '.$file);
 
 		$this->driver->load($file);
 
-		if($this->proportional) 
+		if($this->proportional)
 		{
 			$width = $this->driver->img_x;
 			$height = $this->driver->img_y;
@@ -89,7 +89,7 @@ class Thumbnail
 
 		$this->driver->resize($this->width, $this->height);
 
-		if(is_null($thumbnail)) 
+		if(is_null($thumbnail))
 			$this->save($file);
 		else
 			$this->save($thumbnail);
@@ -97,7 +97,7 @@ class Thumbnail
 
 		$this->free();
 
-		if(is_file($thumbnail)) 
+		if(is_file($thumbnail))
 			Return true;
 		else
 			Return false;
@@ -107,7 +107,7 @@ class Thumbnail
 	 * Save the thumbnail file.
 	 * @param string $file file name to be saved as.
 	 */
-	function save($file) 
+	function save($file)
 	{
 		$this->driver->save($file);
 	}
@@ -115,7 +115,7 @@ class Thumbnail
 	/**
 	 * Free up the graphic driver resources.
 	 */
-	function free() 
+	function free()
 	{
 		$this->driver->free();
 	}

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

@@ -4,9 +4,9 @@
 ** Version.......:  1.0
 ** Author........:  Xiang Wei ZHUO <wei@zhuo.org>
 ** Filename......:  Transform.php
-** Last changed..:  30 Aug 2003 
+** Last changed..:  30 Aug 2003
 ** Notes.........:  Orginal is from PEAR
-                    
+
                     Added a few extra,
                         - create unique filename in a particular directory,
                           used for temp image files.
@@ -345,7 +345,7 @@ Class Image_Transform
         while (false !== ($entry = $d->read())) {
             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();
 
                 if (filemtime($dir.'/'.$entry) + $this->lapse_time < time())
@@ -365,13 +365,13 @@ Class Image_Transform
     function createUnique($dir)
     {
        $unique_str = '.'.$this->uid.'_'.$this->uniqueStr().".".$this->type;
-        
+
        //make sure the the unique temp file does not exists
         while (file_exists($dir.$unique_str))
         {
             $unique_str = '.'.$this->uid.'_'.$this->uniqueStr().".".$this->type;
         }
-        
+
       $this->cleanUp($this->uid, $dir);
 
        return $unique_str;
@@ -556,7 +556,7 @@ Class Image_Transform
         return null; //PEAR::raiseError("No crop method exists", true);
     }
 
-    function flip() 
+    function flip()
     {
         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
 	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
-	
+
 		# calculate our images dimensions
 		$main_img_obj_w	= imagesx( $main_img_obj );
 		$main_img_obj_h	= imagesy( $main_img_obj );
 		$watermark_img_obj_w	= imagesx( $watermark_img_obj );
 		$watermark_img_obj_h	= imagesy( $watermark_img_obj );
-		
+
 		# determine watermark area for given coordinates
 		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( $x = $main_img_obj_min_x; $x < $main_img_obj_max_x; $x++ ) {
 				$return_color	= NULL;
-				
+
 				# determine the correct pixel location within our watermark
 				$watermark_x	= $x - $main_img_obj_min_x;
 				$watermark_y	= $y - $main_img_obj_min_y;
-				
+
 				# fetch color information for both of our images
 				$main_rgb = imagecolorsforindex( $main_img_obj, imagecolorat( $main_img_obj, $x, $y ) );
-				
+
 				# if our watermark has a non-transparent value at this pixel intersection
 				# and we're still within the bounds of the watermark image
 				if (	$watermark_x >= 0 && $watermark_x < $watermark_img_obj_w &&
 							$watermark_y >= 0 && $watermark_y < $watermark_img_obj_h ) {
 					$watermark_rbg = imagecolorsforindex( $watermark_img_obj, imagecolorat( $watermark_img_obj, $watermark_x, $watermark_y ) );
-					
+
 					# using image alpha, and user specified alpha, calculate average
 					$watermark_alpha	= round( ( ( 127 - $watermark_rbg['alpha'] ) / 127 ), 2 );
 					$watermark_alpha	= $watermark_alpha * $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_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
 					$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
 				} else {
 					$return_color	= imagecolorat( $main_img_obj, $x, $y );
-					
+
 				} # END if watermark
-		
+
 				# draw the appropriate color onto the return image
 				imagesetpixel( $return_img, $x, $y, $return_color );
-		
+
 			} # END for each X pixel
 		} # END for each Y pixel
-			
+
 		# return the resulting, watermarked image for display
 		return $return_img;
-	
+
 	} # END create_watermark()
-	
+
 	# average two colors given an alpha
 	function _get_ave_color( $color_a, $color_b, $alpha_level ) {
 		return round( ( ( $color_a * ( 1 - $alpha_level ) ) + ( $color_b	* $alpha_level ) ) );
 	} # END _get_ave_color()
-		
+
 	# return closest pallette-color match for RGB values
 	function _get_image_color($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
  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.
 	   Able to create directories is nice, but not necessary.
 */
@@ -94,11 +94,11 @@ $IMConfig['demo'] = false;
 */
 $IMConfig['safe_mode'] = false;
 
-/* 
+/*
  Possible values: 'GD', 'IM', 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.
 */
 define('IMAGE_CLASS', 'GD');
@@ -126,7 +126,7 @@ $IMConfig['thumbnail_prefix'] = '.';
 /*
   Thumbnail can also be stored in a directory, this directory
   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
   to false or empty string '';
@@ -237,8 +237,8 @@ $IMConfig['accepted_extensions'] = array('gif', 'jpg', 'png', 'bmp', 'jpeg');
 /*
  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.
 
  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);
 $clean_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>
 <head>
 <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">
 /*<![CDATA[*/
@@ -156,9 +156,9 @@ body {
 			</td>
 		</tr>
 		</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>
-	</div>	
+	</div>
 	<div id="tools_watermark" style="display:none;">
 		<div id="watermarkControls">
 			<div id="tool_inputs">
@@ -168,13 +168,13 @@ body {
 				<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 					<tr>
 					<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="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>
 					</tr>
-				</table>				
+				</table>
 				<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">
 					<tr>
@@ -192,7 +192,7 @@ body {
 						</div>
 					</td>
 					</tr>
-				</table>		
+				</table>
 				<table style="display: inline; vertical-align: bottom; margin: 0px 10px 0px 5px;" cellpadding="0" cellspacing="0">
 					<tr>
 					<td>
@@ -208,15 +208,15 @@ body {
 						</div>
 					</td>
 					</tr>
-				</table>		
+				</table>
 				<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>
-		</div>	
+		</div>
 		<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>
-		</div>	
-	</div>	
+		</div>
+	</div>
 	<div id="tools_crop" style="display:none;">
 		<div id="tool_inputs">
 			<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="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="|" />
-		</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.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="tool_inputs">
 			<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()"/>
 			<label for="constProp">Constrain Proportions</label>
 			<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.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="tool_inputs">
 			<select id="flip" name="flip" style="margin-left: 10px; vertical-align: middle;">
@@ -258,9 +258,9 @@ body {
          </select>
 			<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="|" />
-		</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>
-	</div>		
+	</div>
 	<div id="tools_measure" style="display:none;">
 		<div id="tool_inputs">
 			<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("diagonalLabel").title = i18n("diagonal length");
 			</script>
-		</div>	
+		</div>
 	</div>
 	<div id="tools_save" style="display:none;">
 
@@ -318,27 +318,27 @@ body {
 			<table style="display: inline; vertical-align: middle;" cellpadding="0" cellspacing="0">
 				<tr>
 				<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="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>
 				</tr>
-			</table>				
+			</table>
 			<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="|" />
-		</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>
 
 	<?php }else{ ?>
 
 		<div id="tool_inputs" style="text-align: center; width: 90%; font-size: 150%; font-weight: bold; letter-spacing: 3px; color: #474767;">
 			<label>Demo</label>
-		</div>	
+		</div>
 
 	<?php } ?>
 
-	</div>	
+	</div>
 </div>
 <div id="toolbar">
 	<div id="buttons">

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

@@ -116,7 +116,7 @@
 		else
 			return str;
 	};
-	
+
 </script>
 
 <script type="text/javascript">
@@ -125,7 +125,7 @@
 	{
 ?>
 	// 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")))
 	{
 		// 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 $IMConfig;
 
-	foreach($list as $entry => $file) 
+	foreach($list as $entry => $file)
 	{ ?>
 		<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>
@@ -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>
 		<?php } ?>
 		<?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
 }//function drawFiles
 
@@ -72,7 +72,7 @@ function drawFiles($list, &$manager)
 /**
  * Draw the directory.
  */
-function drawDirs($list, &$manager) 
+function drawDirs($list, &$manager)
 {
 	global $relative;
 
@@ -108,7 +108,7 @@ function drawNoResults()
 /**
  * No directories and no files.
  */
-function drawErrorBase(&$manager) 
+function drawErrorBase(&$manager)
 {
 ?>
 <table width="100%">
@@ -116,7 +116,7 @@ function drawErrorBase(&$manager)
     <td class="error">Invalid base directory: <?php echo $manager->config['base_dir']; ?></td>
   </tr>
 </table>
-<?php	
+<?php
 }
 
 ?>
@@ -150,26 +150,26 @@ function drawErrorBase(&$manager)
 		//var topDoc = window.top.document;
 		var topDoc = window.parent.document;
 
-<?php 
+<?php
 	//we need to refesh the drop directory list
 	//save the current dir, delete all select options
 	//add the new list, re-select the saved dir.
-	if($refreshDir) 
-	{ 
+	if($refreshDir)
+	{
 		$dirs = $manager->getDirs();
-		
+
 ?>
 		var selection = topDoc.getElementById('dirPath');
 		var currentDir = selection.options[selection.selectedIndex].text;
 
 		while(selection.length > 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) { ?>
-		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 } ?>
-		
+
 		for(var i = 0; i < selection.length; i++)
 		{
 			var thisDir = selection.options[i].text;
@@ -178,16 +178,16 @@ function drawErrorBase(&$manager)
 				selection.selectedIndex = i;
 				break;
 			}
-		}		
+		}
 <?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;
 		if ( window.parent.opener )
 		{
-			Dialog(url, function(param) 
+			Dialog(url, function(param)
 			{
 				if (!param) // user must have pressed Cancel
 					return false;
@@ -209,7 +209,7 @@ function drawErrorBase(&$manager)
 </head>
 
 <body>
-<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); } 
+<?php if ($manager->isValidBase() == false) { drawErrorBase($manager); }
 	elseif(count($list[0]) > 0 || count($list[1]) > 0) { ?>
 <table>
 	<tr>

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

@@ -6,22 +6,22 @@
  * @package ImageManager
  */
 
-	require_once('config.inc.php'); 
+	require_once('config.inc.php');
 	require_once('Classes/ImageManager.php');
-	
+
 	$manager = new ImageManager($IMConfig);
 	$dirs = $manager->getDirs();
 	$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())
-	{ 
+	{
 		$IMConfig['allow_upload']=false;
-	}	
+	}
 	*/
 	//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">
 
@@ -143,13 +143,13 @@ body {
 	<label for="dirPath">Directory</label>
 	<select name="dir" class="dirWidth" id="dirPath" onchange="javascript: updateDir(this);" style="width: 400px;">
 	<option value="/">/</option>
-<?php 		
+<?php
 	  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>
 		<?php } else {?>
 		<option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option>
-		<?php } ?>	
+		<?php } ?>
 <?php } ?>
 	</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>
@@ -172,7 +172,7 @@ body {
 			<td rowspan="3" align="right">&nbsp;</td>
 			<td align="right"><label for="f_vert">V Space</label></td>
 			<td><input type="text" id="f_vert" class="smallWidth" value="" /></td>
-		</tr>		
+		</tr>
 		<tr>
 			<td align="right"><label for="f_alt">Alt</label></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><input type="text" id="f_border" class="smallWidth" value="" /></td>
 		</tr>
-		<tr> 
+		<tr>
 <?php if (count($IMConfig['maxWidth']) > 1 && $IMConfig['allow_upload']){ ?>
 			<td align="right"><label for="uploadSize" style="white-space: nowrap;">Upload Size</label></td>
 			<td>

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

@@ -1,5 +1,5 @@
 <?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');
 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 content="noindex, nofollow" name="robots">
 		<script type="text/javascript">
-		/*<![CDATA[*/		
+		/*<![CDATA[*/
 		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 = 'Info' ;
@@ -28,7 +28,7 @@ include('../../../../../../inc/global.inc.php');
 					<td>
 						<table cellspacing="0" cellpadding="0" width="100%" border="0">
 							<tr>
-							<td valign="top" width="100%">								
+							<td valign="top" width="100%">
 								<span fckLang="DlgMP3URL">URL</span><br>
 								<input id="mpUrl" onBlur="javascript:updatePreview();" style="width: 100%" type="text">
 							</td>
@@ -50,34 +50,34 @@ include('../../../../../../inc/global.inc.php');
 		  //if (api_is_in_course() || api_is_platform_admin())
 		  //{
 		 	 include(api_get_path(INCLUDE_PATH).'course_document.inc.php');
-		  //}		  
+		  //}
 		  ?>
 		        </td>
 		      </tr>
 		    </table>
 		  </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');
-			$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('file','NewFile','','id="txtUploadFile" size="40"');
-			$form->addElement('html','</td></tr>');			
+			$form->addElement('html','</td></tr>');
 			$form->addElement('html','<tr><td>');
 			//$renderer = & $form->defaultRenderer();
 			//$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('html','</td></tr>');			
+			$form->addElement('html','</td></tr>');
 			$form->addElement('html','<tr><td>');
 			$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->add_real_progress_bar('fckMP3','NewFile');			
-			$form->display();			
-		?>		
+
+			$form->add_real_progress_bar('fckMP3','NewFile');
+			$form->display();
+		?>
 		</div>
 		<script type="text/javascript">window_onload(tab_to_select);</script>
 	</body>

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

@@ -11,78 +11,78 @@
 						</tr>
 					</thead>
 					<tbody id="fileList">
-						<?php					
-						
+						<?php
+
 							$count = 1;
 							$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')));
 							foreach($fileList as $file)
 							{
 								$css = ($css == "" || $css == "even"?"odd":"even");
 								$strDisabled = ($file['is_writable']?"":" disabled");
 								$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
-									$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_';
 									$css_folder_dokeos='css';
 									$hotpotatoes_folder_dokeos='HotPotatoes_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';
-									
-									$show_doc_group=true;								
+
+									$show_doc_group=true;
 									if(ereg($group_folder, $file['path']))
 									{
 										$show_doc_group=false;
 										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
-									$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
-								//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($file['type'] == 'file')
-									{		
-								
+									{
+
 									?>
 									<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" 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="tdth<?php echo $count; ?>"><?php echo @date(DATE_TIME_FORMAT,$file['mtime']); ?></td>
 									</tr>
 									<?php
 									}else
-									{											
-									
+									{
+
 										?>
 										<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>
-                                                                             
+
                                             <?php
                                             if(ereg($shared_folder, $file['name']))
                                             {
 											//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
                                             }
                                             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>
                                             <?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="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>
 										</tr>
 										<?php
 									}
-									
+
 								}//end if hidden files and folders deleted by Dokeos
-								
+
 								$count++;
 							}
-						?>	
+						?>
 					</tbody>
 				</table>
 </div>

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

@@ -1,67 +1,67 @@
 <div id="content">
-<?php 
+<?php
 
 		$count = 1;
 		$thumbnailBaseUrl = appendQueryString(CONFIG_URL_IMG_THUMBNAIL, makeQueryString(array('path')));
 		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
-				
-				$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_';
 				$css_folder_dokeos='css';
 				$hotpotatoes_folder_dokeos='HotPotatoes_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';
-				
-				
+
+
 				//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']))
 				{
 					$show_doc_group=false;
 					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
 				 $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
-			//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]!='.')
 			{
-						
+
 				?>
 				<dl class="thumbnailListing" id="dl<?php echo $count; ?>">
-                
+
                 <?php
                  if(ereg($shared_folder, $file['name']))
                  { //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']; ?>">
                 <?php
 				}
 				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']; ?>">
-                
+
 				<?php
 				}
-				?>       
-                					
-                    
+				?>
+
+
 					<?php
 						switch($file['cssClass'])
 						{
@@ -77,16 +77,16 @@
 								echo '&nbsp;';
 						}
 					?>
-					
+
 					</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']; ?>" />
-					<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>
 				<?php
-				
+
 				}//end if hidden files and folders deleted by Dokeos
-				
+
 			$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");
 ?>
 <select class="input inputSearch" name="search_folder" id="search_folder">
-	<?php 
-	
+	<?php
+
 					foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 					{
 						?>
       <option value="<?php echo $v; ?>" ><?php echo shortenFileName($k, 30); ?></option>
-      <?php 
+      <?php
 					}
-		
-				?>            	
+
+				?>
 </select>

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

@@ -6,21 +6,21 @@
 	 * @since 22/May/2007
 	 *
 	 * Modify for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @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 "{";
 	$error = "";
-	$info = "";	
+	$info = "";
 /*	$_POST['new_folder'] = substr(md5(time()), 1, 5);
 	$_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['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)
 	{
 		$error = SYS_DISABLED;
@@ -42,35 +42,35 @@
 	{
 	include_once(CLASS_FILE);
 		$file = new file();
-		
+
 		if($file->mkdir(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], 0775))
 		{
 					include_once(CLASS_MANAGER);
 					$manager = new manager(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'], false);
 					$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']))
 					{
-					//only inside courses				
+					//only inside courses
 						$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);
 						$_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
-						
-						$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, 'invisible', api_get_user_id(),$to_group_id);//get Dokeos
 					}
 					// end bridge to Dokeos
 					foreach($pathInfo as $k=>$v)
-					{				
+					{
 						switch ($k)
 						{
 
 
-							case "ctime";								
+							case "ctime";
 							case "mtime":
 							case "atime":
 								$v = date(DATE_TIME_FORMAT, $v);
@@ -81,10 +81,10 @@
 							case 'cssClass':
 								$v = 'folderEmpty';
 								break;
-						}							
+						}
 						$info .= sprintf(", %s:'%s'", $k, $v);
 					}
-		}else 
+		}else
 		{
 			$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
      *
 	 * Modify for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @since 19/March/2009
 	 */
-	
+
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	$error = "";
-	
+
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_DELETE)
 	{
 		$error = SYS_DISABLED;
@@ -31,29 +31,29 @@
 				include_once(CLASS_FILE);
 				$file = new file();
 				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'])))
 					{
-						/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+						/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 						if(!empty($_course['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);
 							//find base_work_dir
 							$course_dir   = $_course['path']."/document";//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
 							//delete directory
-							
-							   //check protect directories 
+
+							   //check protect directories
 							   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))
-								   {		
+								   {
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-								   }							   
+								   }
 								   else
 								   {
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
@@ -70,84 +70,84 @@
 							$file->delete(addTrailingSlash(backslashToSlash($doc)));//deleted by ajaxfilemanager
 						}
 							//////end bridge to Dokeos
-						
-					}elseif(is_file($_GET['delete']) 
+
+					}elseif(is_file($_GET['delete'])
 					&& isValidPattern(CONFIG_SYS_INC_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']))
 						{
 							//find path
-							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos					
+							$mainPath='../../../../../../../courses/'.$_course['path'].'/document/';//get Dokeos
 							$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
 							$course_dir   = $_course['path']."/document";//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
 							//delete file
-														   
+
 								   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
-								   {		
+								   {
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-								   }							   
+								   }
 								   else
 								   {
-								   
+
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 										//$file->delete(($_GET['delete'])); // disabled deleted by ajaxfilemanager
-										
-								   }								   
+
+								   }
 						}
 						else
 						{
 							$file->delete(($_GET['delete']));//deleted by ajaxfilemanager
-						}   
+						}
 						//////end bridge to Dokeos
-					}			
+					}
 		}
-	}else 
+	}else
 	{
 		if(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1)
 		{
 			$error = ERR_NOT_FILE_SELECTED;
 		}
-		else 
+		else
 		{
 
 			include_once(CLASS_FILE);
 			$file = new file();
-			
+
 			foreach($_POST['selectedDoc'] as $doc)
 			{
 				if(file_exists($doc) && isUnderRoot($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))
 					{
-						/////////////bridge to Dokeos by Juan Carlos Raña Trabado
+						/////////////bridge to Dokeos by Juan Carlos Ra�a Trabado
 						if(!empty($_course['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);
 							//find base_work_dir
 							$course_dir   = $_course['path']."/document";//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
 							//delete directory
-							
-							   //check protect directories 
+
+							   //check protect directories
 							   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))
-								   {		
+								   {
 										$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-								   }							   
+								   }
 								   else
 								   {
 										$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
@@ -164,35 +164,35 @@
 							$file->delete(addTrailingSlash(backslashToSlash($doc)));//deleted by ajaxfilemanager
 						}
 						//////end bridge to Dokeos
-						
-					}elseif(is_file($doc) 
+
+					}elseif(is_file($doc)
 					&& isValidPattern(CONFIG_SYS_INC_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']))
 						{
 						//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);
 						//find base_work_dir
 						$course_dir   = $_course['path']."/document";//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
 						//delete file
-													   
+
 							   if(! $is_allowed_to_edit && DocumentManager::check_readonly($_course,api_get_user_id(),$dokeosPath))
-							   {		
+							   {
 									$error=get_lang('CantDeleteReadonlyFiles'); //From Dokeos to Ajaxfilemanager
-							   }							   
+							   }
 							   else
 							   {
-							   
+
 									$deleted= DocumentManager::delete_document($_course,$dokeosPath,$base_work_dir); //deleted by Dokeos
 									//$file->delete($doc); // disabled deleted by ajaxfilemanager
-									
+
 							   }
 						}
 						else
@@ -200,12 +200,12 @@
 							$file->delete($doc); //deleted by ajaxfilemanager
 						}
 						//////end bridge to Dokeos
-					}					
+					}
 				}
 
-				
+
 			}
-		}		
+		}
 	}
 
 	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");
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path']))
 	{
-			
+
 			$path = $_GET['path'];
 			//check if the file size
 			$fileSize = @filesize($path);
-			
+
 			if($fileSize > getMemoryLimit())
 			{//larger then the php memory limit, redirect to the file
-				
+
 				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);
 	}

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

@@ -6,7 +6,7 @@
 	 * @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']))
 	{
 		$_POST['path'] = "uploaded/Winter.jpg" .  "?" . makeQueryString(array('path'));
@@ -17,14 +17,14 @@
 		$imageInfo = @GetImageSize($_POST['path']);
 		$_POST['width'] = $imageInfo[0];
 		$_POST['height'] = $imageInfo[1];
-		
+
 	}
 	initSessionHistory($_POST['path']);
-	
+
 	echo "{";
 	$error = "";
 	$info = "";
-	
+
 	if(empty($_POST['path']))
 	{
 		$error  =  IMG_SAVE_EMPTY_PATH;
@@ -39,25 +39,25 @@
 	{
 		if(!empty($_POST['mode']))
 		{
-			
+
 			include_once(CLASS_IMAGE);
 			$image = new Image();
 			$image->loadImage($_POST['path']);
-			
+
 			switch($_POST['mode'])
 			{
-				case "resize":					
+				case "resize":
 					if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false)))
 					{
 						$error = IMG_SAVE_RESIZE_FAILED;
-					}					
+					}
 					break;
 				case "crop":
 					if(!$image->cropToDimensions($_POST['x'], $_POST['y'], intval($_POST['x']) + intval($_POST['width']), intval($_POST['y']) + intval($_POST['height'])))
 					{
 						$error = IMG_SAVE_CROP_FAILED;
 					}
-					
+
 					break;
 				case "flip":
 					if(!$image->flip($_POST['flip_angle']))
@@ -76,35 +76,35 @@
 			}
 			if(empty($error))
 			{
-				
+
 				$sessionNewPath = $session->getSessionDir() . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 				if(!@copy($_POST['path'], $sessionNewPath))
 				{
 					$error = IMG_SAVE_BACKUP_FAILED;
-				}else 
+				}else
 				{
 					addSessionHistory($_POST['path'], $sessionNewPath);
 					if($image->saveImage($_POST['path']))
-					{						
-						$imageInfo = $image->getFinalImageInfo();	
+					{
+						$imageInfo = $image->getFinalImageInfo();
 						$info .= ",width:" . $imageInfo['width'] . "\n";
 						$info .= ",height:" . $imageInfo['height'] . "\n";
 						$info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
-					}else 
+					}else
 					{
 						$error = IMG_SAVE_FAILED;
-					}			
-				}				
-			}else 
+					}
+				}
+			}else
 			{
 				//$image->DestroyImages();
 			}
-		}else 
+		}else
 		{
 			$error = IMG_SAVE_UNKNOWN_MODE;
 		}
 	}
-	
+
 	echo "error:'" . $error . "'\n";
 	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']))
 	{
 		$error = ERR_FOLDER_PATH_NOT_ALLOWED;
-	}else 
-	{		
+	}else
+	{
 		require_once(CLASS_SESSION_ACTION);
 		$sessionAction = new SessionAction();
 		$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']))
 	{
 		$error = ERR_FOLDER_PATH_NOT_ALLOWED;
-	}else 
-	{		
+	}else
+	{
 		require_once(CLASS_SESSION_ACTION);
 		$sessionAction = new SessionAction();
 		$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 = '';
 		$fileMoved = array();
 		$unmovedDocDueToSamePath = array();
@@ -16,20 +16,20 @@
 		}elseif(!isUnderRoot($_GET['current_folder_path']))
 		{
 			$error = ERR_DEST_FOLDER_NOT_ALLOWED;
-		}else 
+		}else
 		{
-			
+
 			include_once(CLASS_MANAGER);
 			include_once(CLASS_SESSION_ACTION);
 			$sessionAction = new SessionAction();
-			include_once(DIR_AJAX_INC . "class.manager.php");	
+			include_once(DIR_AJAX_INC . "class.manager.php");
 			$manager = new manager();
 			$manager->setSessionAction($sessionAction);
 			$selectedDocuments = $sessionAction->get();
-			
+
 			$destFolderPath = addTrailingSlash(backslashToSlash($_GET['current_folder_path']));
-			
-			
+
+
 			if(sizeof($selectedDocuments))
 			{
 				//get all files within the destination folder
@@ -50,7 +50,7 @@
 				{
 					if(file_exists($doc) && isUnderRoot($doc) )
 					{
-						
+
 						if( array_search(getRealPath($doc), $allDocs) === false || CONFIG_OVERWRITTEN)
 						{
 							if(CONFIG_OVERWRITTEN)
@@ -59,19 +59,19 @@
 							}
 							if($file->copyTo($doc, $_GET['current_folder_path']))
 							{
-								
+
 								$finalPath = $destFolderPath . basename($doc);
 								$objFile = new file($finalPath);
 								$tem = $objFile->getFileInfo();
-								$obj = new manager($finalPath, false);			
-													
+								$obj = new manager($finalPath, false);
+
 								$fileType = $obj->getFileType($finalPath, (is_dir($finalPath)?true:false));
-								
+
 								foreach($fileType as $k=>$v)
 								{
 									$tem[$k] = $v;
 								}
-								
+
 /*								foreach ($folderInfo as $k=>$v)
 								{
 									$tem['i_' . $k] = $v;
@@ -80,16 +80,16 @@
 								{
 									$tem['cssClass'] = 'folderEmpty';
 								}*/
-								
+
 								$tem['final_path'] = $finalPath;
-								$tem['path'] = backslashToSlash($finalPath);		
+								$tem['path'] = backslashToSlash($finalPath);
 								$tem['type'] = (is_dir($finalPath)?'folder':'file');
 								$tem['size'] = @transformFileSize($tem['size']);
 								$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 								$tem['mtime'] = date(DATE_TIME_FORMAT, $tem['mtime']);
 								$tem['flag'] = 'noFlag';
 								$tem['url'] = getFileUrl($doc);
-		
+
 								$manager = null;
 								if($sessionAction->getAction() == "cut")
 								{
@@ -97,12 +97,12 @@
 								}
 								$fileMoved[sizeof($fileMoved)] = $tem;
 								$tem = null;
-							}							
-						}else 
+							}
+						}else
 						{
 							$unmovedDocDueToSamePath[] = $doc;
 						}
-							
+
 					}
 				}
 
@@ -111,7 +111,7 @@
 			if(sizeof($unmovedDocDueToSamePath) == sizeof($selectedDocuments))
 			{
 				$error = ERR_DEST_FOLDER_NOT_ALLOWED;
-			}elseif(sizeof($unmovedDocDueToSamePath)) 
+			}elseif(sizeof($unmovedDocDueToSamePath))
 			{
 				foreach($unmovedDocDueToSamePath as $v)
 				{
@@ -119,20 +119,20 @@
 				}
 			}
 		}
-		
+
 		echo "{'error':'" . $error . "', 'unmoved_files':" . sizeof($unmovedDocDueToSamePath) . ", 'files':{";
 		foreach($fileMoved as  $i=>$file)
 		{
-			
+
 			echo ($i>0?', ':' ') . $i . ": { ";
 			$j = 0;
 			foreach($file as $k=>$v)
 			{
-				echo ($j++ > 0? ", ":'') . "'" . $k . "':'" . $v . "'"; 
-				
+				echo ($j++ > 0? ", ":'') . "'" . $k . "':'" . $v . "'";
+
 			}
 			echo "} ";
 		}
 		echo "} }";
-	
+
 ?>

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

@@ -5,16 +5,16 @@
 	 * @link www.phpletter.com
 	 * @since 22/May/2007
 	 *
-	 */	
+	 */
 	sleep(3);
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 	echo "{";
 	$error = "";
 	$info = "";
-	
+
 	include_once(CLASS_UPLOAD);
 	$upload = new Upload();
-								
+
 	$upload->setInvalidFileExt(explode(",", CONFIG_UPLOAD_INVALID_EXTS));
 	if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_UPLOAD)
 	{
@@ -29,52 +29,52 @@
 	}else if(!$upload->moveUploadedFile($_GET['folder']))
 	{
 		$error = ERR_FILE_MOVE_FAILED;
-	}	
+	}
 	elseif(!$upload->isPermittedFileExt(explode(",", CONFIG_UPLOAD_VALID_EXTS)))
-	{		
+	{
 		$error = ERR_FILE_TYPE_NOT_ALLOWED;
 	}elseif(defined('CONFIG_UPLOAD_MAXSIZE') && CONFIG_UPLOAD_MAXSIZE && $upload->isSizeTooBig(CONFIG_UPLOAD_MAXSIZE))
-	{		
+	{
 		 $error = sprintf(ERROR_FILE_TOO_BID, transformFileSize(CONFIG_UPLOAD_MAXSIZE));
 	}else
 	{
 							include_once(CLASS_FILE);
 							$path = $upload->getFilePath();
 							$obj = new file($path);
-							$tem = $obj->getFileInfo();							
+							$tem = $obj->getFileInfo();
 							if(sizeof($tem))
-							{	
+							{
 								include_once(CLASS_MANAGER);
-							
-								$manager = new manager($upload->getFilePath(), false);			
-															
+
+								$manager = new manager($upload->getFilePath(), false);
+
 								$fileType = $manager->getFileType($upload->getFileName());
 
 								foreach($fileType as $k=>$v)
 								{
 									$tem[$k] = $v;
 								}
-								
-								$tem['path'] = backslashToSlash($path);		
+
+								$tem['path'] = backslashToSlash($path);
 								$tem['type'] = "file";
 								$tem['size'] = transformFileSize($tem['size']);
 								$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
 								$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
-								* @author Juan Carlos Raña Trabado
-								*/							
-								
+								* @author Juan Carlos Ra�a Trabado
+								*/
+
 								if(!empty($_course['path']))
 								{
 									//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/
-									$dokeosFolder = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);	
+									$dokeosFolder = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 									$dokeosFile = $tem['name'];	//get	ajaxmanager
 									$dokeosFileSize = $tem['size'];//get ajaxmanager
 									if(!empty($group_properties['directory'])) //get Dokeos
@@ -86,27 +86,27 @@
 										if(!api_is_allowed_to_edit())
 										{
 											$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
 								}
-								
+
 								// end bridge
-																
+
 								$obj->close();
 								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(", tipedit:'%s'",  TIP_DOC_RENAME);		
+								$info .= sprintf(", tipedit:'%s'",  TIP_DOC_RENAME);
 
-																				
-							}else 
+
+							}else
 							{
 								$error = ERR_FILE_NOT_AVAILABLE;
 							}
@@ -116,5 +116,5 @@
 	echo "error:'" . $error . "'";
 	echo $info;
 	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
@@ -10,25 +10,25 @@
 	 * @author Juan Carlos Ra�a
 	 * @since 31/December/2008
 	 */
-	 
+
  	include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
 
 	if(!isset($manager))
 	{
 		/**
-		 *  this is part of  script for processing file paste 
+		 *  this is part of  script for processing file paste
 		 */
 		//$_GET = $_POST;
 		include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 		include_once(CLASS_PAGINATION);
 		$pagination = new pagination(false);
-						
-		$search_folder = str_replace("'","",$_GET['search_folder']);				
-		
+
+		$search_folder = str_replace("'","",$_GET['search_folder']);
+
 		if(!empty($_GET['search']))
 		{
 			include_once(CLASS_SEARCH);
-			
+
 			$search  = new Search($search_folder);
 			$search->addSearchKeyword('recursive', @$_GET['search_recursively']);
 			$search->addSearchKeyword('mtime_from', @$_GET['search_mtime_from']);
@@ -39,31 +39,31 @@
 			$search->addSearchKeyword('name', @$_GET['search_name']);
 			$search->doSearch();
 			$fileList = $search->getFoundFiles();
-			$folderInfo = $search->getRootFolderInfo();			
-			
-		}else 
+			$folderInfo = $search->getRootFolderInfo();
+
+		}else
 		{
 			include_once(CLASS_MANAGER);
 			include_once(CLASS_SESSION_ACTION);
 			$sessionAction = new SessionAction();
 			include_once(DIR_AJAX_INC . "class.manager.php");
-		
+
 			$manager = new manager();
 			$manager->setSessionAction($sessionAction);
-		
+
 			$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);
-		$pagination = new pagination(false);			
+		$pagination = new pagination(false);
 	}
 
-		
+
 		$pagination->setTotal(sizeof($fileList));
 		$pagination->setFirstText(PAGINATION_FIRST);
 		$pagination->setPreviousText(PAGINATION_PREVIOUS);
@@ -71,65 +71,65 @@
 		$pagination->setLastText(PAGINATION_LAST);
 		$pagination->setLimit(!empty($_GET['limit'])?intval($_GET['limit']):CONFIG_DEFAULT_PAGINATION_LIMIT);
 		echo $pagination->getPaginationHTML();
-		
-		///////Dokeos fix for count hidden folders		
+
+		///////Dokeos fix for count hidden folders
 			$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_folder='_DELETED_';
 			$css_folder_dokeos='css';
 			$hotpotatoes_folder_dokeos='HotPotatoes_files';
 			$chat_files_dokeos='chat_files';
-			
+
 		//end previous fix for count hidden folders
-		
+
 		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;
-		
+
 		foreach($folderInfo as $k=>$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 "files = {\n";
-		$count = 1;		
-		
+		$count = 1;
+
 		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']))
 			{
 				$hide_doc_group=true;
 				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.
 			{
-			
+
 				$count_hideItem=$count_hideItem+1;
 			}
-		
+
 			echo (($count > 1)?",":'').$count++ . ":{";
 			$j = 1;
 			foreach($file as $k=>$v)
 			{
-				
+
 				if($k  == 'ctime' || $k == 'mtime')
 				{
 					$v = @date(DATE_TIME_FORMAT, $v);
-				}	
+				}
 				if($k == 'size')
 				{
 					$v = transformFileSize($v);
@@ -137,10 +137,10 @@
 				echo (($j++ > 1)?",":'') . "'" . $k . "':'" . $v . "'";
 			}
 			echo (($j++ > 1)?",":'') . "'url':'" . getFileUrl($file['path']) . "'";
-			echo "}\n";				
+			echo "}\n";
 		}
 		echo  "};";
-		
+
 		$fileList = array_slice($fileList, $pagination->getPageOffset(), $pagination->getLimit()+$count_hideItem);////Dokeos fix for hidden files added +$count_hideItem
 
         echo "</script>\n";
@@ -150,16 +150,16 @@
 		{
 			case 'detail':
 			case 'thumbnail':
-			case 'text':	
+			case 'text':
 				$view = $_GET['view'];
 				break;
 			default:
 				$view = CONFIG_DEFAULT_VIEW;
 		}
-	}else 
+	}else
 	{
 		$view = CONFIG_DEFAULT_VIEW;
-	}	
+	}
 	switch($view)
 	{
 		case 'text':

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

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

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

@@ -11,12 +11,12 @@
 	{
 		die(SYS_DISABLED);
 	}
-		
+
 		$_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']))
 		{
 				$path = $_GET['path'];
-		}else 
+		}else
 		{
 			die(IMG_GEN_IMG_NOT_EXISTS);
 		}
@@ -33,7 +33,7 @@
 		}
 		require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "class.image.php");
 		$image = new Image();
-		
+
 		$imageInfo = $image->getImageInfo($path);
 
 	?>
@@ -83,7 +83,7 @@
 			initDisabledButtons(true);
 		}
 	);
-	
+
 </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/jqModal.css" type="text/css" rel="stylesheet" />
@@ -92,25 +92,25 @@
 <body>
 <?php
 	//displayArray($_SESSION);
-	 
+
 ?>
 <div id="controls">
 	<fieldset id="modes">
 		<legend>Modes</legend>
 		<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']; ?>" />
-			
+
 			<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_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_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;" />-->
-			
+
 			<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="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="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>
@@ -133,18 +133,18 @@
 <!--			<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_ANGLE; ?></label> <input type="text" name="angle" id="angle" value="" class="input imageInput" />
-			
+
 			</p>
 		</form>
 	</fieldset>
 </div>
 <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 -->
-        
-        
-        
-        
+
+
+
+
     </div>
     <div id="resizeMe">
     	<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
 	 *
 	 */
-	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");	
-	
+	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
+
 
 	$error = "";
 	$info = "";
@@ -19,7 +19,7 @@
 	{
 		$error  =  IMG_SAVE_EMPTY_PATH;
 	}elseif(!file_exists($_POST['path']))
-	{		
+	{
 		$error  =  IMG_SAVE_NOT_EXISTS;
 	}elseif(!isUnderRoot($_POST['path']))
 	{
@@ -29,7 +29,7 @@
 		$error = SESSION_PERSONAL_DIR_NOT_FOUND;
 	}
 	else
-	{	
+	{
 		require_once(CLASS_HISTORY);
 		$history = new History($_POST['path'], $session);
 		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
 			$lastestSessionImageInfo = $history->getLastestRestorable();
 			if(sizeof($lastestSessionImageInfo) && CONFIG_SYS_DEMO_ENABLE)
-			{				
+			{
 				$originalSessionImageInfo = $history->getOriginalImage();
 				if(sizeof($originalSessionImageInfo))
-				{					
+				{
 					$originalImage = $sessionDir . $originalSessionImageInfo['info']['name'];
-				}				
+				}
 			}
 			if(empty($originalImage))
 			{
 				$originalImage = $_POST['path'];
 			}
-			
+
 			include_once(CLASS_IMAGE);
 			$image = new Image();
 			if($image->loadImage($originalImage))
-			{				
-				
+			{
+
 				switch($_POST['mode'])
 				{
-					case "resize":					
+					case "resize":
 						if(!$image->resize($_POST['width'], $_POST['height'], (!empty($_POST['constraint'])?true:false)))
 						{
 							$error = IMG_SAVE_RESIZE_FAILED;
-						}					
+						}
 						break;
-					case "crop":	
+					case "crop":
 						if(!$image->crop($_POST['x'], $_POST['y'], $_POST['width'], $_POST['height']))
 						{
 							$error = IMG_SAVE_CROP_FAILED;
@@ -75,27 +75,27 @@
 						}
 						break;
 					case "rotate":
-						
+
 						if(!$image->rotate(intval($_POST['angle'])))
 						{
 							$error = IMG_SAVE_ROTATE_FAILED;
 						}
-						
+
 						break;
 					default:
 						$error = IMG_SAVE_UNKNOWN_MODE;
 				}
-				
-				
+
+
 				if(empty($error))
-				{					
-					$sessionNewPath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);					
+				{
+					$sessionNewPath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 					if(!@copy($originalImage, $sessionNewPath))
 					{//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);
 						//save the modified image
 						$sessionImageInfo = array('name'=>basename($sessionNewPath), 'restorable'=>1);
@@ -105,51 +105,51 @@
 							if(isset($originalSessionImageInfo) && sizeof($originalSessionImageInfo))
 							{
 								$imagePath = $sessionDir . $originalSessionImageInfo['info']['name'];
-							}else 
-							{	
+							}else
+							{
 								$imagePath = $sessionDir  . uniqid(md5(time())) . "." . getFileExt($_POST['path']);
 							}
-						}else 
-						{	
+						}else
+						{
 							if($isSaveAsRequest)
 							{//save as request
 								//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']))
 								{
 									$error = IMG_SAVE_AS_FOLDER_NOT_FOUND;
-								}elseif(file_exists($imagePath)) 
+								}elseif(file_exists($imagePath))
 								{
 									$error = IMG_SAVE_AS_NEW_IMAGE_EXISTS;
 								}elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_name']))
 								{
 									$error = IMG_SAVE_AS_ERR_NAME_INVALID;
 								}
-								
-							}else 
+
+							}else
 							{//save request
-								$imagePath = $originalImage;	
+								$imagePath = $originalImage;
 							}
-												
+
 						}
 
 						if($image->saveImage($imagePath))
-						{		
-									
+						{
+
 							if(CONFIG_SYS_DEMO_ENABLE)
 							{
 								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);
 									$history->add($originalSessionImageInfo);
 								}
 							}
-							$imageInfo = $image->getFinalImageInfo();								
-						}else 
+							$imageInfo = $image->getFinalImageInfo();
+						}else
 						{
 							$error = IMG_SAVE_FAILED;
-							
-						}							
+
+						}
 						if(isset($imageInfo))
 						{
 								$info .= ",width:" . $imageInfo['width'] . "";
@@ -158,29 +158,29 @@
 								if($isSaveAsRequest)
 								{
 									$info .= ",save_as:'1'";
-								}else 
+								}else
 								{
 									$info .= ",save_as:'0'";
 								}
 								$info .= ",folder_path:'" . dirname($imagePath) . "'";
-								$info .= ",path:'" . backslashToSlash($imagePath) . "'";	
-													
-						}				
-			
-					}				
-								
-				}			
-			}else 
+								$info .= ",path:'" . backslashToSlash($imagePath) . "'";
+
+						}
+
+					}
+
+				}
+			}else
 			{
 				$error = IMG_SAVE_IMG_OPEN_FAILED;
-			}		
+			}
 
-		}else 
+		}else
 		{
 			$error = IMG_SAVE_UNKNOWN_MODE;
 		}
 	}
-	echo "{";	
+	echo "{";
 	echo "error:'" . $error . "'";
 	if(isset($image) && is_object($image))
 	{
@@ -189,6 +189,6 @@
 	echo $info;
 	echo ",history:" . (isset($history) && is_object($history)?($history->getNumRestorable()):0)  . "";
 	echo "}";
-	
-	
+
+
 ?>

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

@@ -6,7 +6,7 @@
 	 * @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']))
 	{
 		include_once(CLASS_IMAGE);
@@ -16,17 +16,17 @@
 			if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true))
 			{
 				$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 . "...";
 	}

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

@@ -6,7 +6,7 @@
 	 * @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);
 	$history = new History($_POST['file_path'], $session);
 	$lastestSessionImageInfo = $history->getLastestRestorable();
@@ -31,18 +31,18 @@
 		$error = IMG_UNDO_NO_HISTORY_AVAIALBE;
 	}
 	else
-	{		
+	{
 			//get the original image which is the lastest session image if any when the system is in demo
 			$sessionImage = $session->getSessionDir() . $lastestSessionImageInfo['name'];
 			$originalSessionImageInfo = $history->getOriginalImage();
 			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'];
-			}		
-			 
+			}
+
 				include_once(CLASS_IMAGE);
 				$image = new Image();
 				if($image->loadImage($sessionImage))
@@ -51,25 +51,25 @@
 					if(!@copy($sessionImage, $originalImage))
 					{
 						$error = IMG_UNDO_COPY_FAILED;
-					}else 
+					}else
 					{
-						
+
 						//remove the session image
 						if(@unlink($sessionImage))
 						{
 							$history->restore();
 						}
 						//only one left, remove the session original if demo
-						
+
 						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'];
 						}
 					}
 					$imagePath = $originalImage;
-					
-				}else 
+
+				}else
 				{
 					$error = IMG_SAVE_IMG_OPEN_FAILED;
 				}
@@ -78,11 +78,11 @@
 							$info .= ",width:" . $imageInfo['width'] . "\n";
 							$info .= ",height:" . $imageInfo['height'] . "\n";
 							$info .= ",size:'" . transformFileSize($imageInfo['size']) . "'\n";
-							$info .= ",path:'" . backslashToSlash($imagePath) . "'\n";						
-					}	
+							$info .= ",path:'" . backslashToSlash($imagePath) . "'\n";
+					}
 
 	}
-	
+
 	echo "error:'" . $error . "'\n";
 	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())
 	{
 		header('Location: ' . appendQueryString(CONFIG_URL_HOME, makeQueryString()));
-		exit;		
+		exit;
 	}
 }
 ?>
@@ -47,7 +47,7 @@ if(isset($_POST['username']))
 			            <tr>
 			            	<td>&nbsp;</td>
 			              <td><input type="submit" class="button" value="Login" /></td>
-			            </tr>			        
+			            </tr>
 			        </tfoot>
 			    </table>
 			</form>

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

@@ -6,11 +6,11 @@
 	 * @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']);
 	if(!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']))
 	{
-		
+
 		include_once(CLASS_MANAGER);
 		$manager = new manager($_GET['path'], false);
 		$fileTypes = $manager->getFileType(basename($_GET['path']));
@@ -24,8 +24,8 @@
 					{
 						$thumInfo = getThumbWidthHeight($imageInfo[0], $imageInfo[1], 400, 135);
 						printf("<img src=\"%s\" width=\"%s\" height=\"%s\" />", getFileUrl($_GET['path']), $thumInfo['width'], $thumInfo['height']);
-													
-					}else 
+
+					}else
 					{
 						echo PREVIEW_IMAGE_LOAD_FAILED;
 					}
@@ -36,21 +36,21 @@
 					{
 						echo @fread($fp, @filesize($_GET['path']));
 						@fclose($fp);
-					}else 
+					}else
 					{
 						echo PREVIEW_OPEN_FAILED . ".";
 					}
 					break;
-					
+
 				case "video":
 					break;
 			}
-		}else 
+		}else
 		{
 			echo PREVIEW_NOT_PREVIEW . "..";
-		}		
-			
-	}else 
+		}
+
+	}else
 	{
 		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");
-	
+
 ?>
 <!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">
@@ -33,7 +33,7 @@
             </th>
             <td>
             	<select class="input" name="save_to">
-              	
+
               </select>
             </td>
           </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']))
 	{
 		$error = ERR_RENAME_FAILED;
-	}else 
+	}else
 	{
 		//update record of session if image exists in session for cut or copy
 		include_once(CLASS_SESSION_ACTION);
-		$sessionAction = new SessionAction();		
+		$sessionAction = new SessionAction();
 		$selectedDocuments = $sessionAction->get();
 		if(removeTrailingSlash($sessionAction->getFolder()) == getParentPath($_POST['original_path']) && sizeof($selectedDocuments))
 		{
@@ -46,13 +46,13 @@
 			{
 				$selectedDocuments[$key] = $_POST['name'];
 				$sessionAction->set($selectedDocuments);
-				
+
 			}
-			
+
 		}elseif(removeTrailingSlash($sessionAction->getFolder()) == removeTrailingSlash($_POST['original_path']))
 		{
 			$sessionAction->setFolder($_POST['original_path']);
-		}	
+		}
 		$path = addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name'];
 		if(is_file($path))
 		{
@@ -66,7 +66,7 @@
 			$fileInfo = $manager->getFolderInfo();
 		}
 	}
-	
+
 	echo "{";
 	echo "error:'" . $error . "' ";
 	foreach ($fileInfo as $k=>$v)
@@ -74,6 +74,6 @@
 		echo "," . $k . ":'" . $v . "' ";
 	}
 	echo "}";
-	
-	
+
+
 ?>

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

@@ -14,7 +14,7 @@
 		$error = SYS_DISABLED;
 	}
 	elseif(isset($_POST['save_as_request']))
-	{		
+	{
 		if(!preg_match('/^[a-zA-Z0-9_\-.]+$/', $_POST['name']))
 		{
 			$error = TXT_SAVE_AS_ERR_NAME_INVALID;
@@ -27,56 +27,56 @@
 		}
 		else
 		{
-			
+
 			if(!empty($_POST['save_as_request']))
 			{//save as request
 				if(file_exists($path))
 				{
 					$error = TXT_FILE_EXIST;
-				}else 
+				}else
 				{
 					if(($fp = @fopen($path, 'w+')) !== false)
 					{
 						if(@fwrite($fp, $_POST['text']))
 						{
 							@fclose($fp);
-						}else 
+						}else
 						{
 							$error = TXT_CONTENT_WRITE_FAILED;
 						}
-					}else 
+					}else
 					{
 						$error = TXT_CREATE_FAILED;
-					}					
+					}
 				}
 
-				
-			}else 
+
+			}else
 			{
 				if(!file_exists($path))
 				{
 					$error = TXT_FILE_NOT_EXIST;
-				}else 
+				}else
 				{
 					if(($fp = @fopen($path, 'w')) !== false)
 					{
 						if(@fwrite($fp, $_POST['text']))
 						{
 							@fclose($fp);
-						}else 
+						}else
 						{
 							$error = TXT_CONTENT_UPDATE_FAILED;
 						}
-					}else 
+					}else
 					{
 						$error = TXT_FILE_OPEN_FAILED;
-					}						
+					}
 				}
 			}
-			
+
 		}
 
-	}else 
+	}else
 	{
 		$error = TXT_UNKNOWN_REQUEST;
 	}
@@ -84,5 +84,5 @@
 		echo "error:'" . $error . "',\n";
 		echo  "path:'" . $path . "'";
 		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)
 	{
 		die(SYS_DISABLED);
-	}	
+	}
 		$session->gc();
 		$_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']))
 		{
 				$path = $_GET['path'];
-		}else 
+		}else
 		{
 			die(TXT_FILE_NOT_FOUND);
 		}
 		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))
 			{
@@ -36,7 +36,7 @@
 		}
 		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">
@@ -64,8 +64,8 @@
 		jQuery(document).ready(
 		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
 				,allow_resize: "both"
 				,gecko_spellcheck:true
@@ -74,16 +74,16 @@
 				,save_callback:"save"
 				,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'); ?>"
-				,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>
 
 <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">
 	<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="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" />
-		<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>
 	<p><img src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/loading.gif" /></p>
 </div>
@@ -139,7 +139,7 @@
             </th>
             <td>
             	<select class="input" name="save_to" id="save_to">
-              	
+
               </select>
             </td>
           </tr>

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

@@ -10,40 +10,40 @@
 	 * @author Juan Carlos Raña
 	 * @since 31/December/2008
 	 */
-	
-	
+
+
 	include ('../../../../../../inc/global.inc.php'); // Integrating with Dokeos
 	api_block_anonymous_users();// from Dokeos
-		 
+
 	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
 
 	require_once(CLASS_SESSION_ACTION);
-	$sessionAction = new SessionAction();	
+	$sessionAction = new SessionAction();
 	if(CONFIG_LOAD_DOC_LATTER)
 	{
 		$fileList = array();
 		$folderInfo = array('path'=>getCurrentFolderPath());
-	}else 
+	}else
 	{
 		require_once(CLASS_MANAGER);
 
-	
+
 		$manager = new manager();
 		$manager->setSessionAction($sessionAction);
 		$fileList = $manager->getFileList();
-		$folderInfo = $manager->getFolderInfo();		
+		$folderInfo = $manager->getFolderInfo();
 	}
 	if(CONFIG_SYS_THUMBNAIL_VIEW_ENABLE)
 	{
 	$views = array(
 		'detail'=>LBL_BTN_VIEW_DETAILS,
 		'thumbnail'=>LBL_BTN_VIEW_THUMBNAIL,
-	);		
-	}else 
+	);
+	}else
 	{
 	$views = array(
 		'detail'=>LBL_BTN_VIEW_DETAILS,
-	);		
+	);
 	}
 
 	if(!empty($_GET['view']))
@@ -57,7 +57,7 @@
 			default:
 				$view = CONFIG_DEFAULT_VIEW;
 		}
-	}else 
+	}else
 	{
 		$view = CONFIG_DEFAULT_VIEW;
 	}
@@ -107,21 +107,21 @@
 			'download':'<?php echo CONFIG_URL_DOWNLOAD; ?>',
 			'present':'<?php echo getCurrentUrl(); ?>',
 			'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 currentFolder = {};
 	var warningDelete = '<?php echo WARNING_DELETE; ?>';
 	var newFile = {'num':1, 'label':'<?php echo FILE_LABEL_SELECT; ?>', 'upload':'<?php echo FILE_LBL_UPLOAD; ?>'};
 	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; ?>',
 									'next':'<?php echo THICKBOX_NEXT; ?>',
 									'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 msgInvalidFolderName = '<?php echo ERR_FOLDER_FORMAT; ?>';
 	var msgInvalidFileName = '<?php echo ERR_FILE_NAME_FORMAT; ?>';
@@ -138,13 +138,13 @@
 	var action = '<?php echo $sessionAction->getAction(); ?>';
 	var numFiles = <?php echo $sessionAction->count(); ?>;
 	var warningCloseWindow = '<?php echo WARING_WINDOW_CLOSE; ?>';
-	var numRows = 0; 
+	var numRows = 0;
 
 	var wordCloseWindow = '<?php echo LBL_ACTION_CLOSE; ?>';
 	var wordPreviewClick = '<?php echo LBL_CLICK_PREVIEW; ?>';
 
 	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 elementId = <?php  echo (!empty($_GET['elementId'])?"'" . $_GET['elementId'] . "'":'null'); ?>;
 	var files = {};
@@ -156,7 +156,7 @@ $(document).ready(
 			if(code && code == 13) {// if enter is pressed
 	  			event.preventDefault(); //prevent browser from following the actual href
 			};
-		});		
+		});
 		if(typeof(cancelSelectFile) != 'undefined')
 		{
 			$('#linkClose').show();
@@ -174,7 +174,7 @@ $(document).ready(
 				}
 			}
 		);
-		
+
 		popUpCal.clearText = '<?php echo CALENDAR_CLEAR; ?>';
 		popUpCal.closeText = '<?php echo CALENDAR_CLOSE; ?>';
 		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.dateFormat = 'YMD-';
 		$('.inputMtime').calendar({autoPopUp:'both', buttonImage:'theme/<?php echo CONFIG_THEME_NAME; ?>/images/date_picker.png'});
-		
-		
+
+
 		initAfterListingLoaded();
 		//addMoreFile();
 
 	} );
 
-	
+
 </script>
 <?php
 	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>
   		</dl>
     	<div id="viewList">
-    		
-    	
+
+
     			<label><?php echo LBL_BTN_VIEW_OPTIONS; ?></label>
-					<?php 
+					<?php
 						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;
-							
+
 							<?php
 						}
 					?></div>
 				<ul id="actionHeader">
 					<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>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_DELETE)
 						{
 							?>
@@ -240,15 +240,15 @@ $(document).ready(
 							<?php
 						}
 					?>
-					<?php 
+					<?php
 						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
 						if(CONFIG_OPTIONS_COPY)
 						{
 							?>
@@ -256,16 +256,16 @@ $(document).ready(
 							<?php
 						}
 					?>
-					<?php 
+					<?php
 						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>
 							<?php
 						}
-					?>															
-					
-					<?php 
+					?>
+
+					<?php
 						if(CONFIG_OPTIONS_NEWFOLDER)
 						{
 							?>
@@ -273,28 +273,28 @@ $(document).ready(
 							<?php
 						}
 					?>
-					<?php 
+					<?php
 						if(CONFIG_OPTIONS_UPLOAD)
 						{
 							?>
 							<li><a  id="actionUpload" href="#" onclick="return uploadFileWin(this);"><span><?php echo LBL_BTN_UPLOAD; ?></span></a></li>
 							<?php
 						}
-					?>			
-		
-					
+					?>
+
+
 <!--					<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> -->
 					<!-- thest functions will be added in the near future
  					<li ><a href="#" id="actionZip"><span>Zip</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 id="body">
-         
-         
+
+
       <div id="rightCol">
 	      	<?php
 			if(CONFIG_LOAD_DOC_LATTER )
@@ -302,16 +302,16 @@ $(document).ready(
 				$currentPath = getCurrentFolderPath();
 				?>
 				<script type="text/javascript">
-				parentFolder = {path:'<?php echo getParentFolderPath($currentPath); ?>'}; 
+				parentFolder = {path:'<?php echo getParentFolderPath($currentPath); ?>'};
 				currentFolder = {'friendly_path':'<?php echo transformFilePath($currentPath); ?>'};
 					$(document).ready(
 						function()
 						{
 							var url = getUrl('view', false, false, false);
 							$('#rightCol').empty();
-							ajaxStart('#rightCol');		
-							
-							$('#rightCol').load(url, 
+							ajaxStart('#rightCol');
+
+							$('#rightCol').load(url,
 										{},
 										function(){
 												ajaxStop('#rightCol img.ajaxLoadingImg');
@@ -322,19 +322,19 @@ $(document).ready(
 					);
 				</script>
 				<?php
-			}else 
+			}else
 			{
 				include_once(CONFIG_URL_LIST_LISTING);
 			}
 	      	 ?>
-      </div> 
-      
+      </div>
+
       <div id="leftCol">
-      
+
 
 
 				<fieldset id="folderFieldSet" >
-					
+
 				<legend><?php echo LBL_FOLDER_INFO; ?></legend>
 				<table cellpadding="0" cellspacing="0" class="tableSummary" id="folderInfo">
 					<tbody>
@@ -358,15 +358,15 @@ $(document).ready(
 						</tr>
 						<tr>
 							<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>
 							<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>
 							<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>
 
 
@@ -398,29 +398,29 @@ $(document).ready(
 						</tr>
 						<tr>
 							<th><?php echo LBL_FILE_TYPE; ?></th>
-							<td  colspan="3" id="fileType"></td>						
+							<td  colspan="3" id="fileType"></td>
 						</tr>
 						<tr>
 							<th><?php echo LBL_FILE_WRITABLE; ?></th>
 							<td id="fileWritable"><span class="flagYes">&nbsp;</span></td>
 							<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>
 
 					</tbody>
 				</table>
-		
+
         <p class="searchButtons" id="returnCurrentUrl">
-  
+
         	<span class="right" id="linkSelect">
         		<input type="button" value="<?php echo MENU_SELECT; ?>"  id="selectCurrentUrl" class="button">
         	</span>
-        	
-        </p>				
+
+        </p>
 			</fieldset>
-			
-     
-      
+
+
+
       	<fieldset class="boxSearch">
       		<legend><?php echo LBL_SEARCH; ?></legend>
 
@@ -446,18 +446,18 @@ $(document).ready(
 	          				$(document).ready(
 	          					function()
 	          					{
-	          						ajaxStart('#searchFolderContainer');		
+	          						ajaxStart('#searchFolderContainer');
 	          						$('#searchFolderContainer').load('<?php echo CONFIG_URL_LOAD_FOLDERS; ?>');
 	          					}
 	          				);
 	          			</script>
 	          			<?php
-	          		}else 
+	          		}else
 	          		{
 	          	?>
 		            <select class="input inputSearch" name="search_folder" id="search_folder">
-		            	<?php 
-		            		
+		            	<?php
+
 					foreach(getFolderListing(CONFIG_SYS_ROOT_PATH) as $k=>$v)
 					{
                               	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>
 		                  	<?php
-						} 
+						}
 					}
-		            		
-					?>            	
+
+					?>
 		            </select>
 		      <?php
 	          		}
 		      ?></span>
 	          </td>
-	         </tr>  
+	         </tr>
         		<tr>
         			<td>
         		<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>
         		<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>
@@ -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="0" id="search_recursively_0" class="radio" <?php echo (!empty($_GET['search_recursively'])?'checked="checked"':''); ?> /> <?php echo LBL_RECURSIVELY_NO; ?>
           	</td>
-          </tr>	                	
+          </tr>
           	</tbody>
 </table>
 
 
 
-       	
+
         <p class="searchButtons">
         	<span class="left" id="linkClose" style="display:none">
         		<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">
         		<input type="button" value="<?php echo BTN_SEARCH; ?>" onclick="return search();" class="button">
         	</span>
-        	
+
         </p>
         </fieldset>
-  
+
       </div>
-      
+
       <div class="clear"></div>
     </div>
-		
-  
+
+
   </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="winUpload" style="display:none">
   	<div class="jqmContainer">
@@ -533,18 +533,18 @@ $(document).ready(
 		  		<thead>
 		  			<tr>
 		  				<th colspan="2">
-		  					<?php echo FILE_FORM_TITLE; ?>		  					
+		  					<?php echo FILE_FORM_TITLE; ?>
 		  				</th>
 		  			</tr>
 		  			<tr>
-		  			<th colspan="2" align="left">		  			
+		  			<th colspan="2" align="left">
 		  				<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>			  		
-		  			
+			  			</label>
+
 		  			</th>
-		  			</tr>		  			
+		  			</tr>
 		  		</thead>
 		  		<tbody id="fileUploadBody">
 		  			<tr style="display:none">
@@ -552,12 +552,12 @@ $(document).ready(
 		  				<td>
 		  					<input type="file" class="input" name="file"  />
 		  					<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>
-		  					</a>	  						
-		  					<span class="uploadProcessing" style="display:none">&nbsp;</span>		  					
+		  					</a>
+		  					<span class="uploadProcessing" style="display:none">&nbsp;</span>
 		  				</td>
-		  			</tr>		
+		  			</tr>
 		  		</tbody>
 		  		<tfoot>
 		  			<tr>
@@ -566,11 +566,11 @@ $(document).ready(
 		  			</tr>
 		  		</tfoot>
 		  	</table>
-		  	</form>  		
+		  	</form>
   		</div>
 
   	</div>
-  </div> 
+  </div>
   <div id="winNewFolder" style="display:none">
   	<div class="jqmContainer">
   		<div class="jqmHeader">
@@ -589,9 +589,9 @@ $(document).ready(
 	  			<tr>
 	  				<th><label><?php echo FOLDER_LBL_TITLE; ?></label></th>
 	  				<td><input type="text" name="new_folder" id="new_folder" value="" class="input"></td>
-	  			</tr>    		
-	
-				
+	  			</tr>
+
+
 	  		</tbody>
 	  		<tfoot>
 	  			<tr>
@@ -599,14 +599,14 @@ $(document).ready(
 	  				<td><input type="button" value="<?php echo FOLDER_LBL_CREATE; ?>" class="button" onclick="return doCreateFolder();"  /></td>
 	  			</tr>
 	  		</tfoot>
-	  	</table>	
-	  	</form>	
+	  	</table>
+	  	</form>
   		</div>
 
-  	
-  	
+
+
   	</div>
-  </div>   
+  </div>
   <div id="winPlay" style="display:none">
   	<div class="jqmContainer">
   		<div class="jqmHeader">
@@ -635,7 +635,7 @@ $(document).ready(
 		  		<tbody>
 		  			<tr>
 		  				<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>
 		  			</tr>
 		  		</tbody>
@@ -647,11 +647,11 @@ $(document).ready(
 		  		</tfoot>
 		  	</table>
 		  	</form>
-  		</div>  	
+  		</div>
 
   	</div>
-  	
-  </div>        
+
+  </div>
   <div id="winInfo" style="display:none">
   	<div class="jqmContainer">
   		<div class="jqmHeader">
@@ -697,12 +697,12 @@ $(document).ready(
   					<label>&copy;Copyright:</label>
   				</th>
   				<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>
   			</tr>
   		</tbody>
   	</table>
-  		</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.
  * 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)
@@ -12,9 +12,9 @@
 		var $__loginIndexInSession = 'ajax_user';
 		function __construct()
 		{
-			
+
 		}
-		
+
 		function Auth()
 		{
 			$this->__construct();
@@ -39,7 +39,7 @@
 			{
 				$_SESSION[$this->__loginIndexInSession] = true;
 				return true;
-			}else 
+			}else
 			{
 				return false;
 			}

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

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

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

@@ -15,7 +15,7 @@
 		/**
 		 * 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
 		 */
 		function __construct($path, &$session)
@@ -26,14 +26,14 @@
 			{
 				$_SESSION[$this->path] = array();
 			}
-			
+
 		}
 		/**
 		 * 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
-		 */		
+		 */
 		function History($path, &$session)
 		{
 			$this->__construct($path, $session);
@@ -66,11 +66,11 @@
 						if(file_exists($this->session->getSessionDir() . $v['name']))
 						{
 							$output++;
-						}else 
+						}else
 						{
-							
+
 						}
-						
+
 					}
 				}
 			}
@@ -85,7 +85,7 @@
 		function getLastestRestorable()
 		{
 			if(isset($_SESSION[$this->path]) && is_array($_SESSION[$this->path]) && sizeof($_SESSION[$this->path]))
-			{	
+			{
 				$sessionImages = array_reverse($_SESSION[$this->path], true);
 				$lastestKey = '';
 				foreach($sessionImages as $k=>$v)
@@ -94,11 +94,11 @@
 					{
 						return $sessionImages[$k];
 					}
-				}							
-				
+				}
+
 			}
 			return  array();
-			
+
 		}
 		/**
 		 * 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 $outputs;
-				
+
 		}
 		/**
 		 * 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
 	 * @since 14/May/2007
 	 * @name Image
-	 * 
+	 *
 	 */
-	
-	
-	
-	
+
+
+
+
 	class Image
 	{
-		var $_debug = false; 
+		var $_debug = false;
 		var $_errors = array();
 		var $gdInfo = array(); //keep all information of GD extension
 		var $_imgOrig = null; //the hanlder of original image
 		var $_imgFinal = null; //the handler of final image
-		var $imageFile  = null;  
+		var $imageFile  = null;
     var $transparentColorRed = null;
     var $transparentColorGreen = null;
-    var $transparentColorBlue = null;		 
+    var $transparentColorBlue = null;
     var $chmod = 0755;
     var $_imgInfoOrig = array(
     	'name'=>'',
@@ -32,16 +32,16 @@
     	'height'=>'',
     	'type'=>'',
     	'path'=>'',
-    );    
+    );
     var $_imgInfoFinal = array(
     	'name'=>'',
     	'ext'=>'',
     	'size'=>'',
     	'width'=>'',
-    	'height'=>'', 
-    	'type'=>'',   
+    	'height'=>'',
+    	'type'=>'',
     	'path'=>'',
-    );		
+    );
 		var $_imgQuality = 90;
 		/**
 		 * constructor
@@ -49,11 +49,11 @@
 		 * @param boolean $debug
 		 * @return Image
 		 */
-		
+
 		function __construct($debug = false)
 		{
 			$this->enableDebug($debug);
-			$this->gdInfo = $this->getGDInfo();			
+			$this->gdInfo = $this->getGDInfo();
 		}
 		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
 		 * @return void
      * @access private
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
     function _debug($value)
     {
     		$this->_errors[] = $value;
-        if ($this->_debug) 
+        if ($this->_debug)
         {
             echo $value . "<br />\n";
         }
-    }		
+    }
     /**
      * show erros
      *
@@ -109,11 +109,11 @@
     }
     /**
      * Load an image from the file system.
-     * 
+     *
      * @param  string $filename
-     * @return bool 
+     * @return bool
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
     function loadImage($filename)
     {
@@ -139,13 +139,13 @@
                 $this->transparentColorBlue = ord(substr($result, $background * 3 + 2, 1));
             }
             fclose($fp);
-            // -- here ends the code related to transparency handling   	
+            // -- here ends the code related to transparency handling
         }
         $this->_imgOrig = @$func($filename);
         if ($this->_imgOrig == null) {
             $this->_debug("The image could not be created from the '$filename' file using the '$func' function.");
             return false;
-        }else 
+        }else
         {
         	$this->imageFile = $filename;
 			    $this->_imgInfoOrig = array(
@@ -153,7 +153,7 @@
 			    	'ext'=>$ext,
 			    	'size'=>filesize($filename),
 			    	'path'=>$filename,
-			    );        	
+			    );
 			    $imgInfo = $this->_getImageInfo($filename);
 			    if(sizeof($imgInfo))
 			    {
@@ -163,18 +163,18 @@
 			    		$this->_imgInfoFinal[$k] = $v;
 			    	}
 			    }
-			    
+
         }
         return true;
     }
 
     /**
      * Load an image from a string (eg. from a database table)
-     * 
+     *
      * @param  string $string
-     * @return bool 
+     * @return bool
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
     function loadImageFromString($string)
     {
@@ -185,18 +185,18 @@
             return false;
         }
         return true;
-    }		
-    
+    }
+
 
     /**
      * 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
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
     function saveImage($filename, $quality = 90, $forcetype = '')
     {
@@ -207,15 +207,15 @@
 
         $ext  = ($forcetype == '') ? $this->_getExtension($filename) : strtolower($forcetype);
         $func = 'image' . ($ext == 'jpg' ? 'jpeg' : $ext);
-        if (!$this->_isSupported($filename, $ext, $func, true)) 
+        if (!$this->_isSupported($filename, $ext, $func, true))
         {
             return false;
         }
         $saved = false;
-        switch($ext) 
+        switch($ext)
         {
             case 'gif':
-                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) 
+                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
                 {
                     imagetruecolortopalette($this->_imgFinal, false, 255);
                 }
@@ -227,26 +227,26 @@
                 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.");
             return false;
-        }else 
+        }else
         {
         	$this->_imgInfoFinal['size'] = @filesize($filename);
         	@chmod($filename, intval($this->chmod, 8));
         }
 
         return true;
-    }    
+    }
     /**
      * 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
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
     function showImage($type = '', $quality = '')
     {
@@ -256,20 +256,20 @@
         }
         $type = (!empty($type)?$type:$this->_imgInfoOrig['ext']);
         $quality = (!empty($quality)?$quality:$this->_imgQuality);
-				
+
         $type = strtolower($type);
         $func = 'image' . ($type == 'jpg' ? 'jpeg' : $type);
         $head = 'image/' . ($type == 'jpg' ? 'jpeg' : $type);
-        
+
         if (!$this->_isSupported('[showing file]', $type, $func, false)) {
             return false;
         }
 
         header("Content-type: $head");
-        switch($type) 
+        switch($type)
         {
             case 'gif':
-                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) 
+                if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
                 {
                     @imagetruecolortopalette($this->_imgFinal, false, 255);
                 }
@@ -281,19 +281,19 @@
                 break;
         }
         return true;
-    }    
-    
+    }
+
     /**
 	 * Used for cropping image
-	 * 
+	 *
 	 * @param  int $dst_x
 	 * @param  int $dst_y
 	 * @param  int $dst_w
 	 * @param  int $dst_h
 	 * @return bool
      * @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)
     {
         if ($this->_imgOrig == null) {
@@ -309,39 +309,39 @@
             return false;
         }
         $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))
             	{
             		$this->_debug('Unable crop the image.');
             		return false;
-            	}            
-        } else 
+            	}
+        } else
         {
           	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.');
-          		return false;           		
+          		return false;
           	}
-            
+
         }
         $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
      * If either is 0 it will be scaled proportionally
      *
      * @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 $unchangeIfsmaller keep the orignial size if the orignial smaller than the new size
-     * 
+     *
      *
      * @return mixed none or PEAR_error
      */
@@ -351,16 +351,16 @@
 		{
 			$this->_debug('No image fould.');
 			return false;
-		}		
-		
+		}
+
 		$new_x = intval($new_x);
 		$new_y = intval($new_y);
 		if($new_x <=0 || $new_y <= 0)
 		{
 			$this->_debug('either of new width or height can be zeor or less.');
-		}else 
+		}else
 		{
-		
+
 			if($constraint)
 			{
 				if($new_x < 1 && $new_y < 1)
@@ -370,7 +370,7 @@
 				}elseif($new_x < 1)
 				{
 					$new_x = floor($new_y / $this->_imgInfoOrig['height'] * $this->_imgInfoOrig['width']);
-	
+
 				}elseif($new_y < 1)
 				{
 					$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']) ;
 					$new_x = floor($scale*$this->_imgInfoOrig['width']);
 					$new_y = floor($scale*$this->_imgInfoOrig['height']);
-				}						
+				}
 			}
 			if($unchangeIfsmaller)
 			{
@@ -389,9 +389,9 @@
 					$new_y = $this->_imgInfoOrig['height'];
 				}
 			}
-		
-			
-			
+
+
+
 			if(is_null($this->_imgOrig))
 			{
 				$this->loadImage($filePath);
@@ -399,68 +399,68 @@
 			if(sizeof($this->_errors) == 0)
 			{
 				return $this->_resize($new_x, $new_y);
-			}			
+			}
 		}
 
 		return false;
-		
-	} // End resize    
+
+	} // End resize
  	/**
      * 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_y the thumbnail height
      * @param string $mode can be save, view and both
      * @return unknown
      */
-	function _resize( $new_x, $new_y) 
+	function _resize( $new_x, $new_y)
 	{
 		$this->_createFinalImageHandler($new_x, $new_y);
     // hacks fot transparency of png24 files
-    if ($this->_imgInfoOrig['type'] == 'png') 
-    {    
+    if ($this->_imgInfoOrig['type'] == 'png')
+    {
         @imagealphablending($this->_imgFinal, false);
 				if(function_exists('ImageCopyResampled'))
 				{
 					@ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 				} else {
 					@ImageCopyResized($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
-				} 
+				}
         @imagesavealpha($this->_imgFinal, true);
 
-    }else 
+    }else
     {//for the rest image
 			if(function_exists('ImageCopyResampled'))
 			{
 				@ImageCopyResampled($this->_imgFinal, $this->_imgOrig, 0, 0, 0, 0, $new_x, $new_y, $this->_imgInfoOrig['width'], $this->_imgInfoOrig['height']);
 			} else {
 				@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['height'] = $new_y;
 		$this->_imgInfoFinal['name'] = basename($this->_imgInfoOrig['name']);
-		$this->_imgInfoFinal['path'] = $this->_imgInfoOrig['path'];		
+		$this->_imgInfoFinal['path'] = $this->_imgInfoOrig['path'];
 		if($this->_imgFinal)
 		{
 			return true;
-		}else 
-		{			
+		}else
+		{
 			$this->_debug('Unable to resize the image on the fly.');
 			return false;
-							
+
 		}
 
-	}   
+	}
     /**
 	 * Get the extension of a file name
-	 * 
+	 *
 	 * @param  string $file
  	 * @return string
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
     function _getExtension($file)
     {
@@ -473,14 +473,14 @@
 
 	    /**
 		 * Validate whether image reading/writing routines are valid.
-		 * 
+		 *
 		 * @param  string $filename
 		 * @param  string $extension
 		 * @param  string $function
 		 * @param  bool   $write
 		 * @return bool
      * @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)
     {
@@ -520,8 +520,8 @@
 				$dst_h = $this->_imgInfoOrig['height'];
 				$src_w = 0 - $this->_imgInfoOrig['width'];
 				$src_h = $this->_imgInfoOrig['height'];
-				
-			}else 
+
+			}else
 			{
 				$dst_x = 0;
 				$dst_y = 0;
@@ -530,8 +530,8 @@
 				$dst_w = $this->_imgInfoOrig['width'];
 				$dst_h = $this->_imgInfoOrig['height'];
 				$src_w = $this->_imgInfoOrig['width'];
-				$src_h = 0 - $this->_imgInfoOrig['height'];				
-			}			
+				$src_h = 0 - $this->_imgInfoOrig['height'];
+			}
 				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);
 				} else {
@@ -540,16 +540,16 @@
 				$this->_imgInfoFinal['width'] = $dst_w;
 				$this->_imgInfoFinal['height'] = $dst_h;
 				$this->_imgInfoFinal['name'] = basename($this->imageFile);
-				$this->_imgInfoFinal['path'] = $this->imageFile;		
+				$this->_imgInfoFinal['path'] = $this->imageFile;
 				if($this->_imgFinal)
 				{
 					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;
-								
-				}   	
+
+				}
     }
     /**
      * flip vertically
@@ -577,15 +577,15 @@
      * @param  bool $versionOnly
      * @return array
      * @access private
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
      */
     function getGDInfo($versionOnly = false)
     {
         $outputs = array();
-        if (function_exists('gd_info')) 
+        if (function_exists('gd_info'))
         {
             $outputs = gd_info();
-        } else 
+        } else
         {
             $gd = array(
                     'GD Version'         => '',
@@ -597,7 +597,7 @@
                     'FreeType Linkage'   => '',
                     'T1Lib Support'      => false,
                     'WBMP Support'       => false,
-                    'XBM Support'        => false       
+                    'XBM Support'        => false
                     );
             ob_start();
             phpinfo();
@@ -639,29 +639,29 @@
         }
 
         return ($versionOnly) ? $outputs['Version'] : $outputs;
-    }    
-    
+    }
+
     /**
 	 * Destroy the resources used by the images.
-	 * 
+	 *
 	 * @param  bool $original
 	 * @return void
      * @access public
-     * @copyright this function originally come from Andy's php 
+     * @copyright this function originally come from Andy's php
 	 */
     function DestroyImages($original = true)
     {
     		if(!is_null($this->_imgFinal))
     		{
     			@imagedestroy($this->_imgFinal);
-    		}        
+    		}
         $this->_imgFinal = null;
         if ($original && !is_null($this->_imgOrig)) {
             @imagedestroy($this->_imgOrig);
             $this->_imgOrig = null;
         }
-    } 
-    
+    }
+
 	function getImageInfo($imagePath)
 	{
 		return $this->_getImageInfo($imagePath);
@@ -708,7 +708,7 @@
 			$this->_debug('Unable locate the image or read images information.');
 		}
 		return $outputs;
-		
+
 	}
 	  function rotate($angle, $bgColor=0)
     {
@@ -717,17 +717,17 @@
     		{
     			$angle += 360;
     		}
- 
-		
+
+
          if($this->_imgFinal = imagerotate($this->_imgOrig, $angle))
          {
          	return true;
-         }else 
+         }else
          {
          	return false;
          }
- 
-       
+
+
     }
 	/**
 	 * get the original image info
@@ -750,7 +750,7 @@
 			if(is_null($this->_imgFinal))
 			{
 				$this->_imgInfoFinal = $this->_imgInfoOrig;
-			}else 
+			}else
 			{
 				$this->_imgInfoFinal['width'] = @imagesx($this->_imgFinal);
 				$this->_imgInfoFinal['height'] = @imagesy($this->_imgFinal);
@@ -758,7 +758,7 @@
 		}
 		return $this->_imgInfoFinal;
 	}
-	
+
     /**
      *  create final image handler
      *
@@ -775,15 +775,15 @@
 					$this->_imgFinal = @ImageCreateTrueColor($dst_w,$dst_h);
 				} else {
 					$this->_imgFinal = @ImageCreate($dst_w,$dst_h);
-				}   
+				}
         if (!is_null($this->transparentColorRed) && !is_null($this->transparentColorGreen) && !is_null($this->transparentColorBlue)) {
-        
+
             $transparent = @imagecolorallocate($targetImageIdentifier, $this->transparentColorRed, $this->transparentColorGreen, $this->transparentColorBlue);
             @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
 	 * @since 31/December/2008
 	 */
-	 
+
 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");
 class manager
 {
@@ -31,7 +31,7 @@ class manager
 	'flag'=>'noFlag',
 	'friendly_path'=>'',
 	);
-	
+
 	var $lastVisitedFolderPathIndex = 'ajax_last_visited_folder';
 	var $folderPathIndex = "path";
 	var $calculateSubdir = true;
@@ -52,12 +52,12 @@ class manager
 			array(array("txt"), "fileText", SEARCH_TYPE_TEXT, 1),
 			array(array("xml", "xsl", "dtd"), "fileXml", SEARCH_TYPE_XML, 1)
 	);
-	
+
 	/**
 		 * constructor
 		 * @path the path to a folder
 		 * @calculateSubdir force to get the subdirectories information
-		 */		
+		 */
 	function __construct($path = null, $calculateSubdir=true)
 	{
 
@@ -81,11 +81,11 @@ class manager
 		{
 			$this->currentFolderPath = CONFIG_SYS_DEFAULT_PATH;
 		}
-		
+
 		$this->currentFolderPath = (isUnderRoot($this->currentFolderPath)?backslashToSlash((addTrailingSlash($this->currentFolderPath))):CONFIG_SYS_DEFAULT_PATH);
-		
+
 		if($this->calculateSubdir)
-		{// keep track of this folder path in session 
+		{// keep track of this folder path in session
 			$_SESSION[$this->lastVisitedFolderPathIndex] = $this->currentFolderPath;
 		}
 		if(is_dir($this->currentFolderPath))
@@ -95,29 +95,29 @@ class manager
 			if(sizeof($folderInfo))
 			{
 			    //for Dokeos in a name folder, replace num user by user names
-				
+
 				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']);
 				}
 				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['file']=0;
 				$this->currentFolderInfo['ctime']=$folderInfo['ctime'];
 				$this->currentFolderInfo['mtime']=$folderInfo['mtime'];
 				$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['friendly_path'] = transformFilePath($this->currentFolderPath);
 				$this->currentFolderInfo['type'] = "folder";
 				$this->currentFolderInfo['cssClass']='folder';
-				
+
 				//$this->currentFolderInfo['flag'] = $folderInfo['flag'];
-			}			
+			}
 		}
 		if($calculateSubdir && !file_exists($this->currentFolderPath))
 		{
@@ -125,12 +125,12 @@ class manager
 		}
 
 
-	
+
 	}
-	
+
 	function setSessionAction(&$session)
 	{
-		$this->sessionAction = $session;	
+		$this->sessionAction = $session;
 	}
 	/**
 		 * constructor
@@ -165,7 +165,7 @@ class manager
 				if($file != '.' && $file != '..')
 				{
 					$flag = $this->flags['no'];
-				
+
 					if($this->sessionAction->getFolder() == $this->currentFolderPath)
 					{//check if any flag associated with this folder or file
 						$folder = addTrailingSlash(backslashToSlash($this->currentFolderPath));
@@ -174,53 +174,53 @@ class manager
 							if($this->sessionAction->getAction() == "copy")
 							{
 								$flag = $this->flags['copy'];
-							}else 
+							}else
 							{
 								$flag = $this->flags['cut'];
 							}
 						}
-					}					
+					}
 					$path=$this->currentFolderPath.$file;
 					if(is_dir($path) && isListingDocument($path) )
 					{
 						$this->currentFolderInfo['subdir']++;
-										
-						//fix count left folders for Dokeos				
+
+						//fix count left folders for Dokeos
 						$deleted_by_dokeos_folder='_DELETED_';
 						$css_folder_dokeos='css';
 						$hotpotatoes_folder_dokeos='HotPotatoes_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))
 						{
 							$hide_doc_group=true;
 							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]=='.')
 						{
 							$this->currentFolderInfo['subdir']=$this->currentFolderInfo['subdir']-1;
 						}
 						///end fix for Dokeos
-						
+
 						if(!$this->calculateSubdir)
-						{			
-						}else 
+						{
+						}else
 						{
-							
+
 								$folder = $this->getFolderInfo($path);
 								$folder['flag'] = $flag;
 								$folders[$file] = $folder;
-								$outputs[$file] = $folders[$file];							
+								$outputs[$file] = $folders[$file];
 						}
 
-						
+
 					}elseif(is_file($path) && isListingDocument($path))
 					{
 
@@ -235,28 +235,28 @@ class manager
 								}
 								$this->currentFolderInfo['size'] += $tem['size'];
 								$this->currentFolderInfo['file']++;
-									
+
 								//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]=='.')
 								{
 									$this->currentFolderInfo['file']=$this->currentFolderInfo['file']-1;
 								}
 								///end fix for Dokeos
-								
-								$tem['path'] = backslashToSlash($path);		
+
+								$tem['path'] = backslashToSlash($path);
 								$tem['type'] = "file";
 								$tem['flag'] = $flag;
 								$files[$file] = $tem;
 								$outputs[$file] = $tem;
 								$tem = array();
 								$obj->close();
-								
-							}							
+
+							}
 
-				
+
 					}
-					
+
 				}
 			}
 			if($this->forceFolderOnTop)
@@ -272,11 +272,11 @@ class manager
 				{
 					$outputs[] = $v;
 				}
-			}else 
+			}else
 			{
 				uksort($outputs, "strnatcasecmp");
 			}
-			
+
 			@closedir($dirHandler);
 		}else
 		{
@@ -297,12 +297,12 @@ class manager
 		if(is_null($path))
 		{
 			return $this->currentFolderInfo;
-		}else 
+		}else
 		{
 			$obj = new manager($path, false);
 			$obj->setSessionAction($this->sessionAction);
 			$obj->getFileList();
-			return $obj->getFolderInfo();			
+			return $obj->getFolderInfo();
 		}
 
 	}
@@ -313,12 +313,12 @@ class manager
 		 * @param string file name
 		 * @return array
 		 */
-		function getFileType($fileName, $checkIfDir = false) 
+		function getFileType($fileName, $checkIfDir = false)
 		{
-			
+
 			$ext = strtolower($this->_getExtension($fileName, $checkIfDir));
-			
-			foreach ($this->fileTypes as $fileType) 
+
+			foreach ($this->fileTypes as $fileType)
 			{
 				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);
-					}else 
+					}else
 					{
 						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);
 				}
-				
+
 			}else
 			{//this is unknown file
 				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
-	 * 
+	 *
 	 * @param  string $file
  	 * @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)
     {
     	if($checkIfDir && file_exists($file) && is_dir($file))
     	{
     		return '';
-    	}else 
+    	}else
     	{
     		return @substr(@strrchr($file, "."), 1);
     	}
-    	
-    	
-    }	
+
+
+    }
 
 	function isDirEmpty($path)
 	{
@@ -408,14 +408,14 @@ class manager
 				{
 					@closedir($dirHandler);
 					return false;
-					
+
 				}
 			}
-			
+
 			@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)
 		{
 			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())
 			{
 				$output .= " " . $previousUrl;
@@ -536,7 +536,7 @@ class pagination
 			if($nextUrl = $this->getNextUrl())
 			{
 				$output .= " " . $nextUrl;
-			}							
+			}
 				break;
 			case 1:
 				//get full summary pagination
@@ -569,7 +569,7 @@ class pagination
 			{
 				$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 .= sprintf(PAGINATION_ITEMS_PER_PAGE, $itemPerPage);
 			$output .= "</span>";

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

@@ -14,7 +14,7 @@
 			'size_from'=>'',
 			'size_to'=>'',
 			'recursive'=>'0',
-			
+
 		);
 		var $sessionAction = null;
 		/**
@@ -28,17 +28,17 @@
 			$this->sessionAction = new SessionAction();
 			$objRootFolder = new file($this->rootFolder);
 			$tem = $objRootFolder->getFileInfo();
-			$obj = new manager($this->rootFolder, false);			
+			$obj = new manager($this->rootFolder, false);
 			$obj->setSessionAction($this->sessionAction);
-			$selectedDocuments = $this->sessionAction->get();					
+			$selectedDocuments = $this->sessionAction->get();
 			$fileType = $obj->getFolderInfo($this->rootFolder);
-			
+
 			foreach($fileType as $k=>$v)
 			{
 				$tem[$k] = $v;
 			}
-			
-			$tem['path'] = backslashToSlash($this->rootFolder);		
+
+			$tem['path'] = backslashToSlash($this->rootFolder);
 			$tem['type'] = (is_dir($this->rootFolder)?'folder':'file');
 			$tem['size'] = (is_dir($this->rootFolder)?'':transformFileSize(@filesize($this->rootFolder)));
 			//$tem['ctime'] = date(DATE_TIME_FORMAT, $tem['ctime']);
@@ -50,11 +50,11 @@
 			$tem['subdir'] = 0;
 			$manager = null;
 			$this->rootFolderInfo = $tem;
-			$tem = null;			
+			$tem = null;
 		}
-		
-		
-		
+
+
+
 		/**
 		 * constructor
 		 *
@@ -76,7 +76,7 @@
 			$this->searchkeywords[$key] = $value;
 		}
 		/**
-		 * change the search keywords 
+		 * change the search keywords
 		 *
 		 * @param array $keywords
 		 */
@@ -96,9 +96,9 @@
 		 */
 		function doSearch($baseFolderPath = null)
 		{
-			
+
 			$baseFolderPath = addTrailingSlash(backslashToSlash((is_null($baseFolderPath)?$this->rootFolder:$baseFolderPath)));
-			
+
 			$dirHandler = @opendir($baseFolderPath);
 			if($dirHandler)
 			{
@@ -112,7 +112,7 @@
 							$isValid = true;
 
 							$fileTime = @filemtime($path);
-							$fileSize = @filesize($path);	
+							$fileSize = @filesize($path);
 							if($this->searchkeywords['name'] !== ''  && @eregi($this->searchkeywords['name'], $file) === false)
 							{
 								$isValid = false;
@@ -124,7 +124,7 @@
 							if($this->searchkeywords['mtime_to'] != '' && $fileTime > @strtotime($this->searchkeywords['mtime_to']))
 							{
 								$isValid = false;
-							}							
+							}
 							if($this->searchkeywords['size_from'] != '' && $fileSize < @strtotime($this->searchkeywords['size_from']))
 							{
 								$isValid = false;
@@ -132,50 +132,50 @@
 							if($this->searchkeywords['size_to'] != '' && $fileSize > @strtotime($this->searchkeywords['size_to']))
 							{
 								$isValid = false;
-							}			
+							}
 							if($isValid && isListingDocument($path))
 							{
 								$finalPath = $path;
 								$objFile = new file($finalPath);
 								$tem = $objFile->getFileInfo();
-								$obj = new manager($finalPath, false);			
+								$obj = new manager($finalPath, false);
 								$obj->setSessionAction($this->sessionAction);
-								$selectedDocuments = $this->sessionAction->get();													
+								$selectedDocuments = $this->sessionAction->get();
 								$fileType = $obj->getFileType($finalPath);
-								
+
 								foreach($fileType as $k=>$v)
 								{
 									$tem[$k] = $v;
 								}
-								
-								$tem['path'] = backslashToSlash($finalPath);		
+
+								$tem['path'] = backslashToSlash($finalPath);
 								$tem['type'] = (is_dir($finalPath)?'folder':'file');
 								$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['url'] = getFileUrl($tem['path']);
 								$this->rootFolderInfo['file']++;
 								$manager = null;
 								$this->files[] = $tem;
-								$tem = null;								
+								$tem = null;
 							}
 						}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->Search($baseFolderPath); //comment by Juan Carlos Raña							
+							//$this->Search($baseFolderPath); //comment by Juan Carlos Ra�a
 						}
 					}
 				}
 			}
-			 
+
 		}
-		
+
 		function getFoundFiles()
 		{
 			return $this->files;
 		}
-		
+
 		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");
-class Session 
+class Session
 {
     var $lifeTime;
     var $fp = null;
@@ -24,8 +24,8 @@ class Session
 		var $gcLogFileName = 'gc_log.ajax.php';
 		var $gcLogFile = null;
 		var $debug = true; //turn it on when you want to see gc log
-		
-		
+
+
     /**
      * constructor
      *
@@ -44,37 +44,37 @@ class Session
     		if(!$dir->isReadable(CONFIG_SYS_DIR_SESSION_PATH))
     		{
     			die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not readable.");
-    		}    		
+    		}
     		if(!$dir->isWritable(CONFIG_SYS_DIR_SESSION_PATH))
     		{
     			die('Permission denied: ' . CONFIG_SYS_DIR_SESSION_PATH . " is not writable.");
     		}
     	$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->sessionDir = backslashToSlash($this->dir.session_id().DIRECTORY_SEPARATOR);
-        $this->init();    	
+        $this->init();
     }
      /**
      * constructor
      *
-     */   
-    function Session() 
+     */
+    function Session()
     {
-    		$this->__construct();        
+    		$this->__construct();
     }
     /**
      * session init
      * @return boolean
      */
-    function init() 
+    function init()
     {
 
-        
-        
+
+
     }
-    
+
     function gc()
     {
      		//init the counter file
@@ -93,17 +93,17 @@ class Session
         		die(SESSION_COUNTER_FILE_WRITE_FAILED);
         	}
         	@fclose($fp);
-        }else 
+        }else
         {
         	die(SESSION_COUNTER_FILE_CREATE_FAILED);
-        }   	
+        }
     }
 
     /**
      * garbage collection function
      *
      */
-    function _gc() 
+    function _gc()
     {
 			//remove expired file from session folder
 	 		$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()
 						&& $file != 'index.html' && $file != '.svn')
-					{						
+					{
 						$path=$this->dir.$file;
 						$output .= $path ;
 						//check if this is a expired session file
 						if(filemtime($path) + $this->lifeTime < time())
-						{							
+						{
 							if($fo->delete($path))
 							{
 								$output .= ' Deleted at ' . date('d/M/Y H:i:s');
-							}else 
+							}else
 							{
 								$output .= " Failed at " . date('d/M/Y H:i:s');
-							}																			
+							}
 						}
 						$output .= "\n";
-											
+
 					}
 				}
 				if($this->debug)
 				{
 					$this->_log($output);
 				}
-				
+
 				@closedir($dirHandler);
 
-			} 
+			}
 			if(CONFIG_SYS_DEMO_ENABLE)
 			{
 				//remove expired files from uploaded folder
@@ -156,34 +156,34 @@ class Session
 					while(false !== ($file = readdir($dirHandler)))
 					{
 						if($file != '.' && $file != '..')
-						{						
+						{
 							$path=CONFIG_SYS_ROOT_PATH.$file;
 							$output .= $path ;
 							//check if this is a expired session file
 							if(filemtime($path) + $this->lifeTime < time())
-							{							
+							{
 								if($fo->delete($path))
 								{
 									$output .= ' Deleted at ' . date('d/M/Y H:i:s');
-								}else 
+								}else
 								{
 									$output .= " Failed at " . date('d/M/Y H:i:s');
-								}																			
+								}
 							}
 							$output .= "\n";
-												
+
 						}
 					}
 					if($this->debug)
 					{
 						$this->_log($output);
 					}
-					
+
 					@closedir($dirHandler);
-	
-				}					
+
+				}
 			}
-		    
+
     }
     /**
      * log action taken by the gc
@@ -201,7 +201,7 @@ class Session
     		@fclose($fp);
     	}
     }
-    
+
     /**
      * get the current session directory
      *
@@ -216,17 +216,17 @@ class Session
     		{
     			return '';
     		}
-    	}else 
+    	}else
     	{
 	     	if(!@is_dir($this->sessionDir))
 	    	{
 	    		return '';
-	    	}   		
+	    	}
     	}
     	return $this->sessionDir;
     }
-    
+
 
-    
+
 }
 ?>

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

@@ -1,6 +1,6 @@
 <?php
 /**
-	 *Session Action Class 
+	 *Session Action Class
 	 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
 	 * @link www.phpletter.com
 	 * @since 22/May/2007
@@ -26,7 +26,7 @@
 				$_SESSION[$this->fromFolderIndex] = '';
 			}
 		}
-		
+
 		function SessionAction()
 		{
 			$this->__construct();
@@ -57,10 +57,10 @@
 		{
 			return (isset($_SESSION[$this->selectedDocIndex])?$_SESSION[$this->selectedDocIndex]:array());
 		}
-		
+
 		function setAction($action)
 		{
-			$_SESSION[$this->actionIndex] = $action;			
+			$_SESSION[$this->actionIndex] = $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',
 		999=>'No error code avaiable',
 	);
-	
+
 
 	function Upload()
 	{
 		//doing nothing
 	}
-	
+
 	function isFileUploaded($indexInPost="file")
 	{
-		
+
 		$this->errCode = isset($_FILES[$indexInPost]['error'])?$_FILES[$indexInPost]['error']:999;
 		if((isset($_FILES[$indexInPost]['error']) && $_FILES[$indexInPost] == 0) ||
 		(!empty($_FILES[$indexInPost]['tmp_name']) && $_FILES[$indexInPost]['tmp_name'] != 'none')
@@ -58,16 +58,16 @@ class Upload
 			$this->fileSize = @filesize($this->_value['tmp_name']);
 			$this->originalFileName = $this->_value['name'];
 			$this->fileType = $this->_value['type'];
-			
+
 			return true;
-		}else 
+		}else
 		{
-			
+
 			array_push($this->errors, 'Unable to upload file');
 			return false;
-		}		
+		}
 	}
-	
+
 	function getErrorCodeMsg()
 	{
 		return (isset($this->errorCodes[$this->errCode])?$this->errorCodes[$this->errCode]:"");
@@ -102,10 +102,10 @@ class Upload
 				}
 			}
 		}
-		
-	
+
+
 
-		
+
 		if(sizeof($validFileExt))
 		{
 			if(array_search(strtolower($this->getFileExt()), $validFileExt) !== false)
@@ -117,10 +117,10 @@ class Upload
 			return true;
 		}
 
-		
+
 		$this->deleteUploadedFile();
 		return false;
-		
+
 	}
 	/**
 	 * check if the uploaded file size is too big
@@ -133,7 +133,7 @@ class Upload
 		{
 			$this->deleteUploadedFile();
 			return true;
-		}else 
+		}else
 		{
 			return false;
 		}
@@ -153,7 +153,7 @@ class Upload
 				$tem[$k]= strtolower(trim($v));
 			}
 		}
-		
+
 		$this->invalidFileExt = $tem;
 	}
 	/**
@@ -169,7 +169,7 @@ class Upload
 	 * get a file extension
 	 *
 	 * @param string $fileName the path to a file or just the file name
-	 */	
+	 */
 	function getFileExt()
 	{
 		//return strtolower(substr(strrchr($this->fileName, "."), 1));
@@ -203,7 +203,7 @@ class Upload
 		{
 			$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;
 		$filePath = $dest . $fileName;
 
@@ -236,7 +236,7 @@ class Upload
 		 *
 		 * @param mixed $invalidImageExts invalid image extension
 		 * @param bool $delete force to delete the uploaded file
-		 */	
+		 */
 	function isImage($invalidImageExts = array(), $delete = true)
 	{
 		if(!is_array($invalidImageExts) && !empty($invalidImageExts))
@@ -286,15 +286,15 @@ class Upload
      *
      * @access public
      *
-     * @param mixed $new_x 
-     * @param mixed $new_y 
+     * @param mixed $new_x
+     * @param mixed $new_y
      * @param string $thumb_suffix
      *
      * @return mixed none or PEAR_error
      */
 	function resize($filePath, $thumb_suffix="", $new_x = 0, $new_y = 0)
 	{
-		
+
 		if(empty($filePath))
 		{
 			$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")
      *
-     * @param string $fileName 
+     * @param string $fileName
      * @param int $new_x the thumbnail width
      * @param int $new_y the thumbnail height
      * @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 $originalImageHeight
 	 * @param string $thumbnailSuffix
@@ -472,7 +472,7 @@ class Upload
 		return $outputs;
 
 	}
-	
+
 
 	/**
      * get the uploaded file
@@ -489,7 +489,7 @@ class Upload
 	{
 		@unlink($this->_value['tmp_name']);
 	}
-	
+
 	function displayError()
 	{
 		if(sizeof($this->errors))
@@ -516,12 +516,12 @@ class Upload
 	{
 		return $this->dirPath;
 	}
-	
+
 	function getFileBaseName()
 	{
 		return $this->fileBaseName;
 	}
-	
+
 	function getFileName()
 	{
 		return $this->fileName;
@@ -565,7 +565,7 @@ class Upload
 		//ensure the directory path ending with /
 		if ($dirPath != ''  && substr($dirPath, -1) != '/') {
 			$dirPath .= '/';
-		}			
+		}
 		if(!empty($originalImageName) && file_exists($dirPath . $originalImageName) && is_file($dirPath . $originalImageName))
 		{
 			@unlink($dirPath . $originalImageName);
@@ -580,10 +580,10 @@ class Upload
 					$fileExtension = substr($originalImageName, $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
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @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
 	/**
 	 * turn off => false
 	 * by session => true
 	 */
-	define('CONFIG_ACCESS_CONTROL_MODE', false); 	
+	define('CONFIG_ACCESS_CONTROL_MODE', false);
 	define("CONFIG_LOGIN_USERNAME", 'ajax');
 	define('CONFIG_LOGIN_PASSWORD', '123456');
 	define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page
-	
+
 	//SYSTEM MODE CONFIG
 		/**
 		 * 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
 		*/
-	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_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false
-	
+
 	//User Permissions
-	//Hack by Juan Carlos Raña Trabado
+	//Hack by Juan Carlos Ra�a Trabado
 	if(empty($_course['path']))
 	{
 		define('CONFIG_OPTIONS_DELETE', true);
@@ -47,12 +47,12 @@
 		define('CONFIG_OPTIONS_NEWFOLDER', true);
 		define('CONFIG_OPTIONS_RENAME', 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
 	{
 		if(api_is_allowed_to_edit())
-		{	
+		{
 		//api_is_allowed_to_edit() from Dokeos
 			define('CONFIG_OPTIONS_DELETE', true);
 			define('CONFIG_OPTIONS_CUT', false);
@@ -61,10 +61,10 @@
 			define('CONFIG_OPTIONS_RENAME', false);
 			define('CONFIG_OPTIONS_UPLOAD', true); //
 			define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
-	
+
 		}
 		else
-		{		
+		{
 			define('CONFIG_OPTIONS_DELETE', true);
 			define('CONFIG_OPTIONS_CUT', false);
 			define('CONFIG_OPTIONS_COPY', false);
@@ -74,8 +74,8 @@
 			define('CONFIG_OPTIONS_EDITABLE', false); //disable image editor and text editor
 		}
 	}
-		
-		
+
+
 	//FILESYSTEM CONFIG
 		/*
 		* 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_ROOT_PATH', '../uploaded/');	//accept relative path only
-		
+
 	/////////////// Integration for Dokeos
-		
+
 	if(!empty($_course['path']))
 	{
 		if(!empty($group_properties['directory']))
-		{		 
-			$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document'.$group_properties['directory'].'/';		   
+		{
+			$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document'.$group_properties['directory'].'/';
 		}
 		else
 		{
 			if(api_is_allowed_to_edit())
 			{
-				$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/';			   
+				$PathDokeosAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/';
 			}
 			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
-	{	
+	{
 		if (api_is_platform_admin() && $_SESSION['this_section']=='platform_admin')
 		{
 			//home page portal
 			$PathDokeosAjaxFileManager='../../../../../../../home/default_platform_document/';
 		}
 		else
-		{		
+		{
 			//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_ROOT_PATH', $PathDokeosAjaxFileManager);		
-	
+	define('CONFIG_SYS_ROOT_PATH', $PathDokeosAjaxFileManager);
+
 	////////////// 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
 		/**
 		 * 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_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
-	
+
 	//UPLOAD OPTIONS CONFIG
 	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_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_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_THICKBOX_MAX_WIDTH', 700);
 	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
-	
-	
+
+
 		/**
 		 * 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
-		 * 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
 		 * if you do have such issue, please change it to fit your system.
 		 * so what should you to do get it
 		 *   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
 		 * 				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
-		 *   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
 		 *   6. enjoy it
-		 * 		
+		 *
 		 */
-		
+
 	// Modified by Ivan Tcholakov, JUN-2009.
 	//define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
 	define('CONFIG_WEBSITE_DOCUMENT_ROOT', rtrim(api_get_path(SYS_SERVER_ROOT_PATH), '/'));
@@ -191,18 +191,18 @@
 					tinymce
 					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_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_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
 	//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).
 	{
 	   $langajaxfilemanager=$langdoktoajaxfile;
@@ -210,7 +210,7 @@
 	else
 	{
 		$langajaxfilemanager='en';//default
-	}	
+	}
 	*/
 
 	@ $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
 	 *
 	 * Modifications of system config setting for Dokeos
-	 * @author Juan Carlos Raña
+	 * @author Juan Carlos Ra�a
 	 * @since 31/December/2008
 	 */
 
@@ -25,7 +25,7 @@
 	{
 		header('Content-Type: text/html; charset=utf-8');
 	}
-	
+
 	/**
 	 * secure file name which retrieve from query string
 	 *
@@ -35,9 +35,9 @@
 	function secureFileName($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_INC', DIR_AJAX_ROOT . "inc" . 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_LANG', DIR_AJAX_ROOT . 'langs' . DIRECTORY_SEPARATOR);
 
-	
+
 	//Class Declarations
 	define('CLASS_FILE', DIR_AJAX_INC .'class.file.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_SEARCH', DIR_AJAX_INC . "class.search.php");
 	//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"
 	$configBaseFileName = 'config.base.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";
@@ -76,12 +76,12 @@
 		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");
-	
+
 	$auth = new Auth();
-	
+
 	if(CONFIG_ACCESS_CONTROL_MODE == 1)
 	{//access control enabled
 		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_COPY', 'ajax_file_copy.php');
 	define('CONFIG_URL_LOAD_FOLDERS', '_ajax_load_folders.php');
-	
+
 	define('CONFIG_URL_DOWNLOAD', 'ajax_download.php');
 	define('CONFIG_URL_TEXT_EDITOR', 'ajax_text_editor.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_FILEnIMAGE_MANAGER', 'ajaxfilemanager.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
 	 *
 	 */
-	
 
-error_reporting(E_ALL);	
-//error_reporting(E_ALL ^ E_NOTICE);	
-	
-	
+
+error_reporting(E_ALL);
+//error_reporting(E_ALL ^ E_NOTICE);
+
+
 
 	//Access Control Setting
 	/**
 	 * turn off => false
 	 * by session => true
 	 */
-	define('CONFIG_ACCESS_CONTROL_MODE', false); 	
+	define('CONFIG_ACCESS_CONTROL_MODE', false);
 	define("CONFIG_LOGIN_USERNAME", 'ajax');
 	define('CONFIG_LOGIN_PASSWORD', '123456');
 	define('CONFIG_LOGIN_PAGE', 'ajax_login.php'); //the url to the login page
-	
+
 	//SYSTEM MODE CONFIG
 		/**
 		 * 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
 		*/
-	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_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if false
-	
+
 	//User Permissions
 	define('CONFIG_OPTIONS_DELETE', 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
 			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_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_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_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
-	
+
 	//UPLOAD OPTIONS CONFIG
 	define('CONFIG_UPLOAD_MAXSIZE', 50 * 1024 ); //by bytes
 	//define('CONFIG_UPLOAD_MAXSIZE', 2048); //by bytes
 	//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_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_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', '');
 
 	//Preview
@@ -85,31 +85,31 @@ error_reporting(E_ALL);
 	define('CONFIG_IMG_THUMBNAIL_MAX_Y', 100);
 	define('CONFIG_THICKBOX_MAX_WIDTH', 700);
 	define('CONFIG_THICKBOX_MAX_HEIGHT', 430);
-	
-	
+
+
 		/**
 		 * 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
-		 * 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
 		 * if you do have such issue, please change it to fit your system.
 		 * so what should you to do get it
 		 *   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
 		 * 				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
-		 *   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
 		 *   6. enjoy it
 
-		        
-		 * 		
+
+		 *
 		 */
-		
 
-	define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');	
+
+	define('CONFIG_WEBSITE_DOCUMENT_ROOT', '');
 	//theme related setting
 			/*
 			*	options avaialbe for CONFIG_EDITOR_NAME are:
@@ -117,13 +117,13 @@ error_reporting(E_ALL);
 					tinymce
 					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_DEFAULT_VIEW', (CONFIG_SYS_THUMBNAIL_VIEW_ENABLE?'detail':'detail')); //thumnail or detail
 	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
 	//LANGAUGAE DECLARATIONNS
 	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
  */
-if (!function_exists("stripos")) 
+if (!function_exists("stripos"))
 {
   function stripos($str,$needle,$offset=0)
   {
@@ -103,14 +103,14 @@ function displayArray($array, $comments="")
 			if(array_search(strtolower(getFileExt($filePath)), $validExts) !== false)
 			{
 				return true;
-			}else 
+			}else
 			{
 				return false;
 			}
 		}elseif(array_search(strtolower(getFileExt($filePath)), $invalidExts) === false)
 		{
 			return true;
-		}else 
+		}else
 		{
 			return false;
 		}
@@ -123,9 +123,9 @@ function displayArray($array, $comments="")
 /**
  *  transform file relative path to absolute path
  * @param  string $value the path to the file
- * @return string 
+ * @return string
  */
-function relToAbs($value) 
+function relToAbs($value)
 {
 	return backslashToSlash(preg_replace("/(\\\\)/","\\", getRealPath($value)));
 
@@ -181,10 +181,10 @@ function removeTrailingSlash($value) {
 /**
  * append a trailing slash
  *
- * @param string $value 
+ * @param string $value
  * @return string
  */
-function addTrailingSlash($value) 
+function addTrailingSlash($value)
 {
 	if(preg_match('@^.*[^/]{1}$@i', $value))
 	{
@@ -204,13 +204,13 @@ function transformFilePath($value) {
 	$value = addTrailingSlash(backslashToSlash(getRealPath($value)));
 	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);
 	return $value;
 }
 /**
- * prepend slash 
+ * prepend slash
  *
  * @param string $value
  * @return string
@@ -220,8 +220,8 @@ function prependSlash($value)
 		if (($value && $value[0] != '/') || !$value )
 		{
 			$value = "/" . $value;
-		}			
-		return $value;	
+		}
+		return $value;
 }
 
 
@@ -235,7 +235,7 @@ function prependSlash($value)
 		{
 			die();
 		}
-		
+
 	}
 
 /**
@@ -264,7 +264,7 @@ function addNoCacheHeaders() {
 			}else
 			{
 				$output .= "?" . $extra;
-			}			
+			}
 		}
 
 		return $output;
@@ -335,10 +335,10 @@ function addNoCacheHeaders() {
 		{
 			return true;
 		}
-		return false;		
+		return false;
 	}
-	
-	
+
+
 	/**
 	 * get thumbnail width and height
 	 *
@@ -419,12 +419,12 @@ function myRealPath($path) {
 		}
     // check if path begins with "/" ie. is absolute
     // if it isnt concat with script path
-    
+
     if (strpos($path,"/") !== 0 ) {
         $base=dirname($_SERVER['SCRIPT_FILENAME']);
         $path=$base."/".$path;
     }
- 
+
     // canonicalize
     $path=explode('/', $path);
     $newpath=array();
@@ -457,12 +457,12 @@ function myRealPath($path) {
  	 if(($path = realpath($value)) && $path != $value)
  	 {
  	 	$output = $path;
- 	 }else 
+ 	 }else
  	 {
  	 	$output = myRealPath($value);
  	 }
  	 return $output;
- 	
+
  }
 	/**
 	 * get file url
@@ -479,21 +479,21 @@ function myRealPath($path) {
 		$urlsuffix = "";
 
 	$value = backslashToSlash(getRealPath($value));
-		
+
 
 		$pos = stripos($value, $wwwroot);
 		if ($pos !== false && $pos == 0)
 		{
 			$output  = $urlprefix . substr($value, strlen($wwwroot)) . $urlsuffix;
-		}else 
+		}else
 		{
 			$output = $value;
 		}
 		return "http://" .  addTrailingSlash(backslashToSlash($_SERVER['HTTP_HOST'])) . removeBeginingSlash(backslashToSlash($output));
 	}
-	
+
 /**
- * 
+ *
  *	transfer file size number to human friendly string
  * @param integer $size.
  * @return String
@@ -512,9 +512,9 @@ function transformFileSize($size) {
 	}else
 	{
 		return $size . " b";
-	}	
+	}
 }
-	
+
 	/**
 	 * remove beginging slash
 	 *
@@ -530,7 +530,7 @@ function transformFileSize($size) {
 		}
 		return $value;
 	}
-	
+
 /**
  * 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))
 		{
 			return $output;
-		}else 
+		}else
 		{
 			return '';
-		}	
+		}
 
 	return null;
 }
 
-	
+
 	/**
 	 * add beginging slash
 	 *
 	 * @param string $value
 	 * @return string
-	 */	
+	 */
 	function addBeginingSlash($value)
 	{
 		if(strpos($value, "/") !== 0 && !empty($value))
 		{
 			$value .= "/" . $value;
 		}
-		return $value;		
+		return $value;
 	}
 
 
-	
+
 
-	
+
 	/**
 	 * get a file extension
 	 *
 	 * @param string $fileName the path to a file or just the file name
-	 */	
+	 */
 	function getFileExt($filePath)
 	{
 		return @substr(@strrchr($filePath, "."), 1);
 	}
-	
+
 		/**
 		 * reuturn the relative path between two url
 		 *
@@ -651,8 +651,8 @@ function getRootPath() {
     {
     	$output = intval($output) * 1024 * 1024;
     }
-    
-    return $output;  	
+
+    return $output;
   }
 	/**
 	 * get file content
@@ -684,35 +684,35 @@ function getRootPath() {
                    $fh = @opendir($path);
                    if($fh)
                    {
-                            $count = 1;                          
+                            $count = 1;
                             while($file = @readdir($fh))
                             {
                                      $newPath = removeTrailingSlash(backslashToSlash($path . "/" . $file));
                                      if(isListingDocument($newPath) && $file != '.' && $file != '..' && is_dir($newPath))
-                                     {                                          
+                                     {
                                                if(!empty($indexNumber))
                                                {//this is not root folder
-                                               					
+
                                                         $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
 
                                                         $outputs[$count . $prefixName . $file] = $newPath;
                                                         getFolderListing($newPath, $count, $prefixNumber, $prefixName, $outputs);
                                                }
                                                $count++;
-                                     }                                    
+                                     }
                             }
                             @closedir($fh);
                    }
                    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
           * and those are not specified in CONFIG_UPLOAD_VALID_EXTS
           *
@@ -730,7 +730,7 @@ function getRootPath() {
          			{
          				unset($validEditorExts[$k]);
          			}
-         		}        		
+         		}
          	}
          	if(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 $string
@@ -768,19 +768,19 @@ function getRootPath() {
                     {
                         return true;
                     }
-                }               
+                }
             }
             else if(eregi($pattern, $string))
             {
                 return true;
             }
             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 $string
@@ -801,16 +801,16 @@ function getRootPath() {
                     {
                         return true;
                     }
-                }               
+                }
             }
             else if(eregi($pattern, $string))
             {
                 return true;
             }
             return false;
-           
-        }  
-   			
+
+        }
+
 
 		/**
 		 * cut the file down to fit the list page
@@ -824,9 +824,9 @@ function getRootPath() {
 				$fileName = substr($fileName, 0, $maxLeng - strlen($indicate)) . $indicate;
 			}
 			return $fileName;
-			
+
 		}
-		if (!function_exists('mime_content_type')) 
+		if (!function_exists('mime_content_type'))
 		{
 		   function mime_content_type ( $f )
 		   {
@@ -849,26 +849,26 @@ function getRootPath() {
 			$hotpotatoes_folder_dokeos='HotPotatoes_files';
 			$chat_files_dokeos='chat_files';
 			$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';
-			
+
 			//show group's directory only if I'm member
-			$show_doc_group=true;								
+			$show_doc_group=true;
 			if(ereg($group_folder, $folderName))
 			{
 				$show_doc_group=false;
 				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)
-			{			
+			{
 				return substr($folderName,strpos($folderName, '-'),strlen($folderName)); //hide the firsts numbers
 			}
-		
+
 		}
 
 
@@ -886,54 +886,54 @@ function getRootPath() {
 
 
 
-			    		
+
       			if(is_dir($path))
       			{
  				$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_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))))
       				{
       					return true;
-      				}else 
+      				}else
       				{
       					return false;
       				}
       			}elseif(is_file($path))
       			{
 				$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_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))))
       				{
       					return true;
-      				}else 
+      				}else
       				{
       					return false;
       				}
       			}
          	}elseif(CONFIG_SYS_PATTERN_FORMAT == 'csv')
          	{//comma delimited file/folder name
-         		
+
          		if(is_dir($path))
          		{
-         		
+
 	 				$includeDir = trimlrm(CONFIG_SYS_INC_DIR_PATTERN);
 					$excludeDir = trimlrm(CONFIG_SYS_EXC_DIR_PATTERN);
-					        
+
 					if(!empty($includeDir) && !empty($excludeDir))
 					{
-						
+
 						$validDir = explode(',', $includeDir);
-						
+
 						$invalidDir = explode(",", $excludeDir);
 
 						if(array_search(basename($path), $validDir) !== false && array_search(basename($path), $invalidDir) === false)
 						{
 							return true;
-						}else 
+						}else
 						{
 							return false;
 						}
@@ -943,28 +943,28 @@ function getRootPath() {
 						if(array_search(basename($path), $validDir) !== false)
 						{
 							return true;
-						}else 
+						}else
 						{
 							return false;
 						}
-						
+
 					}elseif(!empty($excludeFile))
 					{
 						$invalidDir = explode(",", $excludeDir);
 						if(array_search(basename($path), $invalidDir) === false)
 						{
 							return true;
-						}else 
+						}else
 						{
 							return false;
 						}
 					}
 					return true;
-					
+
          		}elseif(is_file($path))
          		{
 				$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))
 				{
 					$validFile = explode(',', $includeFile);
@@ -972,7 +972,7 @@ function getRootPath() {
 					if(array_search(basename($path), $validFile) !== false && array_search(basename($path), $invalidFile) === false)
 					{
 						return true;
-					}else 
+					}else
 					{
 						return false;
 					}
@@ -982,7 +982,7 @@ function getRootPath() {
 					if(array_search(basename($path), $validFile) !== false)
 					{
 						return true;
-					}else 
+					}else
 					{
 						return false;
 					}
@@ -992,7 +992,7 @@ function getRootPath() {
 					if(array_search(basename($path), $invalidFile) === false)
 					{
 						return true;
-					}else 
+					}else
 					{
 						return false;
 					}
@@ -1000,24 +1000,24 @@ function getRootPath() {
 				return true;
          		}
          	}
-         	else 
+         	else
          	{//regular expression
 	          	if(is_dir($path) )
 	         	{
 	         		if(isValidPattern(CONFIG_SYS_INC_DIR_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $path))
 	         		{
-	         			 return true;	
-	         		}else 
+	         			 return true;
+	         		}else
 	         		{
 	         			return false;
 	         		}
-	         	
+
 	         	}elseif(is_file($path))
 	         	{
 	         		if(isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $path) && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $path)  )
 	         		{
 	         			return true;
-	         		}else 
+	         		}else
 	         		{
 	         			return false;
 	         		}
@@ -1025,18 +1025,18 @@ function getRootPath() {
          	}
          	return false;
 
-         }		
-		
+         }
+
 		/**
 		 * force to down the specified file
 		 *
 		 * @param string $path
-		 * 
+		 *
 		 */
 		function downloadFile($path, $newFileName=null)
 		{
 				if(file_exists($path) && is_file($path))
-				{	
+				{
 					$mimeContentType = 'application/octet-stream';
 					if(function_exists('finfo_open'))
 					{
@@ -1045,15 +1045,15 @@ function getRootPath() {
 							$mimeContentType = @finfo_file($fp, basename($path));
 							@finfo_close($fp);
 						}
-						
+
 					}elseif(($temMimeContentType = @mime_content_type($path)) && !empty($temMimeContentType))
 					{
 						$mimeContentType = $temMimeContentType;
 					}
-					
- 					
-					
-						
+
+
+
+
 
 			// START ANDR� SILVA DOWNLOAD CODE
 			// required for IE, otherwise Content-disposition is ignored
@@ -1062,37 +1062,37 @@ function getRootPath() {
 			header("Pragma: public"); // required
 			header("Expires: 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 );
 			// change, added quotes to allow spaces in filenames, by Rajkumar Singh
 			header("Content-Disposition: attachment; filename=\"".(is_null($newFileName)?basename($path):$newFileName)."\";" );
 			header("Content-Transfer-Encoding: binary");
 			header("Content-Length: ".filesize($path));
-		
+
 			readfile($path);
 			exit();
-			// END ANDR� SILVA DOWNLOAD CODE												
+			// END ANDR� SILVA DOWNLOAD CODE
 				}
-		
+
 		}
 
   /**
    * remove all white spaces
    *
-   * @param string $hayStack 
+   * @param string $hayStack
    * @param string $whiteSpaceChars
    * @return string
    */
   function trimlrm ($hayStack, $whiteSpaceChars="\t\n\r\0\x0B")
   {
   	return str_replace($whiteSpaceChars, '', trim($hayStack));
-  }		
-  
+  }
+
   /**
    * get the parent path of the specified path
    *
    * @param string $path
-   * @return string 
+   * @return string
    */
   function getParentFolderPath($path)
   {
@@ -1103,12 +1103,12 @@ function getRootPath() {
   	if(isUnderRoot($parentPath))
   	{
   		return $parentPath;
-  	}else 
+  	}else
   	{
   		return CONFIG_SYS_DEFAULT_PATH;
   	}
   }
-  
+
   function getCurrentFolderPath()
   {
   		$folderPathIndex = 'path';
@@ -1124,41 +1124,41 @@ function getRootPath() {
 		{
 			$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;
-		
+
 
 		if(!file_exists($currentFolderPath))
 		{
 			die(ERR_FOLDER_NOT_FOUND . $currentFolderPath);
-		}  	
+		}
   }
-  
+
        if(!function_exists("imagerotate"))
         {
             function imagerotate($src_img, $angle, $bicubic=false)
             {
     // convert degrees to radians
-    
+
     $angle =  (360 - $angle) + 180;
     $angle = deg2rad($angle);
-   
+
     $src_x = imagesx($src_img);
     $src_y = imagesy($src_img);
-   
+
     $center_x = floor($src_x/2);
     $center_y = floor($src_y/2);
-   
+
     $rotate = imagecreatetruecolor($src_x, $src_y);
     imagealphablending($rotate, false);
     imagesavealpha($rotate, true);
 
     $cosangle = cos($angle);
     $sinangle = sin($angle);
-   
+
     for ($y = 0; $y < $src_y; $y++) {
       for ($x = 0; $x < $src_x; $x++) {
     // rotate...
@@ -1166,7 +1166,7 @@ function getRootPath() {
       + $center_x;
     $old_y = (($center_y-$y) * $cosangle - ($center_x-$x) * $sinangle)
       + $center_y;
-   
+
     if ( $old_x >= 0 && $old_x < $src_x
          && $old_y >= 0 && $old_y < $src_y ) {
       if ($bicubic == true) {
@@ -1176,12 +1176,12 @@ function getRootPath() {
         $sX  = $old_x + 1;
         $siX  = $old_x;
         $siX2 = $old_x - 1;
-       
+
         $c1 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY2));
         $c2 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX, $siY));
         $c3 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY2));
         $c4 = imagecolorsforindex($src_img, imagecolorat($src_img, $siX2, $siY));
-       
+
         $r = ($c1['red']  + $c2['red']  + $c3['red']  + $c4['red']  ) << 14;
         $g = ($c1['green'] + $c2['green'] + $c3['green'] + $c4['green']) << 6;
         $b = ($c1['blue']  + $c2['blue']  + $c3['blue']  + $c4['blue'] ) >> 2;
@@ -1197,7 +1197,7 @@ function getRootPath() {
     imagesetpixel($rotate, $x, $y, $color);
       }
     }
-    return $rotate;          	
+    return $rotate;
 /*                $src_x = @imagesx($src_img);
                 $src_y = @imagesy($src_img);
                 if ($angle == 180)
@@ -1210,19 +1210,19 @@ function getRootPath() {
                     $dest_x = $src_y;
                     $dest_y = $src_x;
                 }
-                elseif ($src_x >= $src_y) 
+                elseif ($src_x >= $src_y)
                 {
                     $dest_x = $src_y;
                     $dest_y = $src_x;
-                }     
+                }
 		 		if(function_exists('ImageCreateTrueColor'))
 		 		{
 					$rotate = @ImageCreateTrueColor($dst_w,$dst_h);
 				} else {
 					$rotate = @ImageCreate($dst_w,$dst_h);
-				}                   
+				}
                 @imagealphablending($rotate, false);
-               
+
                 switch ($angle)
                 {
                     case 270:
@@ -1259,5 +1259,5 @@ function getRootPath() {
                 };
                 return $rotate;*/
             }
-        }  
+        }
 ?>

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

@@ -17,7 +17,7 @@
 	define('LBL_MODIFIED', 'تعديل');
 		//File Information
 	define('LBL_FILE_INFO', 'معلومات الملف');
-	define('LBL_FILE_NAME', 'اسم الملف :');	
+	define('LBL_FILE_NAME', 'اسم الملف :');
 	define('LBL_FILE_CREATED', 'الأنشاء :');
 	define("LBL_FILE_MODIFIED", 'اخر تعديل :');
 	define("LBL_FILE_SIZE", 'حجم الملف :');
@@ -62,7 +62,7 @@
 	define('ERR_FOLDER_EXISTS', 'يجب عليك اختيار اسم غير موجود في المجلد.');
 	define('ERR_FOLDER_CREATION_FAILED', 'لم يتم الأنشاء , الرجاء المحاولة مرة اخرى.');
 	define('ERR_FOLDER_NAME_EMPTY', 'يجب عليك كتابة الاسم.');
-	
+
 		//file upload
 	define("ERR_FILE_NAME_FORMAT", 'يجب ان يحتوي الاسم على احرف , ارقام , فراغ , . , _ فقط');
 	define('ERR_FILE_NOT_UPLOADED', 'لم يتم اختيار اي ملف , الرجاء المحازلة مرة اخرى');
@@ -70,7 +70,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'يمكننا ان نقو بتحريك الملف');
 	define('ERR_FILE_NOT_AVAILABLE', 'الملف غير متوفر');
 	define('ERROR_FILE_TOO_BID', 'حجم الملف كبير جدا , (اقصى حجم : %s )');
-	
+
 
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', ' اضغط للدخول الى المجلد...');
@@ -90,7 +90,7 @@
 	define('LOGIN_FORM_TITLE', 'تسجيل الدخول');
 	define('LOGIN_USERNAME', 'أسم المستخدم:');
 	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');
 	//Common
 	//Menu
-	
+
 define('MENU_SELECT', 'Избери');
 define('MENU_DOWNLOAD', 'Изтегли');
 define('MENU_PREVIEW', 'Преглед');
@@ -20,8 +20,8 @@ define('MENU_COPY', 'Копирай');
 define('MENU_DELETE', 'Изтрий');
 define('MENU_PLAY', 'Отвори');
 define('MENU_PASTE', 'Постави');
-//Label 
-//Top Action 
+//Label
+//Top Action
 define('LBL_ACTION_REFRESH', 'Обнови');
 define('LBL_ACTION_DELETE', 'Изтрий');
 define('LBL_ACTION_CUT', 'Отрежи');
@@ -29,11 +29,11 @@ define('LBL_ACTION_COPY', 'Копирай');
 define('LBL_ACTION_PASTE', 'Постави');
 define('LBL_ACTION_CLOSE', 'Затвори');
 define('LBL_ACTION_SELECT_ALL', 'Избери всички');
-//File Listing 
+//File Listing
 define('LBL_NAME', 'Име');
 define('LBL_SIZE', 'Размер');
 define('LBL_MODIFIED', 'Промяна');
-//File Information 
+//File Information
 define('LBL_FILE_INFO', 'Информация за файла:');
 define('LBL_FILE_NAME', 'Име:');
 define('LBL_FILE_CREATED', 'Създаване:');
@@ -42,7 +42,7 @@ define('LBL_FILE_SIZE', 'Размер:');
 define('LBL_FILE_TYPE', 'Тип файл:');
 define('LBL_FILE_WRITABLE', 'За запис?');
 define('LBL_FILE_READABLE', 'За четене?');
-//Folder Information 
+//Folder Information
 define('LBL_FOLDER_INFO', 'Информация за папка');
 define('LBL_FOLDER_PATH', 'Папка:');
 define('LBL_CURRENT_FOLDER_PATH', 'Текуща папка:');
@@ -53,10 +53,10 @@ define('LBL_FOLDER_FIELS', 'Файлове:');
 define('LBL_FOLDER_WRITABLE', 'За запис');
 define('LBL_FOLDER_READABLE', 'За четене');
 define('LBL_FOLDER_ROOT', 'Главна папка');
-//Preview 
+//Preview
 define('LBL_PREVIEW', 'Преглед');
 define('LBL_CLICK_PREVIEW', 'Щракнете тук, за преглед.');
-//Buttons 
+//Buttons
 define('LBL_BTN_SELECT', 'Избор');
 define('LBL_BTN_CANCEL', 'Отказ');
 define('LBL_BTN_UPLOAD', 'Качи на сървъра');
@@ -70,20 +70,20 @@ define('LBL_BTN_VIEW_TEXT', 'Текст');
 define('LBL_BTN_VIEW_DETAILS', 'Списък');
 define('LBL_BTN_VIEW_THUMBNAIL', 'Икони');
 define('LBL_BTN_VIEW_OPTIONS', 'Изглед:&nbsp;&nbsp;');
-//pagination 
+//pagination
 define('PAGINATION_NEXT', 'Следваща');
 define('PAGINATION_PREVIOUS', 'Назад');
 define('PAGINATION_LAST', 'Последна');
 define('PAGINATION_FIRST', 'Първа');
 define('PAGINATION_ITEMS_PER_PAGE', 'Покажи %s на страница');
 define('PAGINATION_GO_PARENT', 'Върни към родителската папка');
-//System 
+//System
 define('SYS_DISABLED', 'Системата е изключена.');
-//Cut 
+//Cut
 define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'Няма избран документ.');
-//Copy 
+//Copy
 define('ERR_NOT_DOC_SELECTED_FOR_COPY', 'Няма избран документл.');
-//Paste 
+//Paste
 define('ERR_NOT_DOC_SELECTED_FOR_PASTE', 'Няма избран документ.');
 define('WARNING_CUT_PASTE', 'Сигурни ли сте?');
 define('WARNING_COPY_PASTE', 'Сигурни ли сте за копирането на избраните документи в текущата папка?');
@@ -96,7 +96,7 @@ define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', 'Неуспех да преместит
 
 define('ERR_NOT_FILES_PASTED', 'Файлът не е заместен.');
 
-//Search 
+//Search
 define('LBL_SEARCH', 'Търсене');
 define('LBL_SEARCH_NAME', 'Име или част от име на файл:');
 define('LBL_SEARCH_FOLDER', 'Търсене в:');
@@ -122,14 +122,14 @@ define('SEARCH_TYPE_TEXT', 'Текст');
 define('SEARCH_TYPE_XML', 'XML');
 define('SEARCH_ALL_FILE_TYPES', 'Всички типове файлове');
 define('LBL_SEARCH_RECURSIVELY', 'Търсене и в подпапки:');
-define('LBL_RECURSIVELY_YES', 'Да'); 
+define('LBL_RECURSIVELY_YES', 'Да');
 define('LBL_RECURSIVELY_NO', 'Не');
 define('BTN_SEARCH', 'Търси сега');
-//thickbox 
+//thickbox
 define('THICKBOX_NEXT', 'Следващ>');
 define('THICKBOX_PREVIOUS', '<Предишен');
 define('THICKBOX_CLOSE', 'Затвори');
-//Calendar 
+//Calendar
 define('CALENDAR_CLOSE', 'Затвори');
 define('CALENDAR_CLEAR', 'Изчисти');
 define('CALENDAR_PREVIOUS', '<Предишен');
@@ -154,15 +154,15 @@ define('CALENDAR_SEP', 'Сеп');
 define('CALENDAR_OCT', 'Окт');
 define('CALENDAR_NOV', 'Ное');
 define('CALENDAR_DEC', 'Дек');
-//ERROR MESSAGES 
-//deletion 
+//ERROR MESSAGES
+//deletion
 define('ERR_NOT_FILE_SELECTED', 'Моля, изберете файл.');
 define('ERR_NOT_DOC_SELECTED', 'Няма избран документ.');
 define('ERR_DELTED_FAILED', 'Не може да се изтрие избраният документ (и).');
 define('ERR_FOLDER_PATH_NOT_ALLOWED', ' Пътят към папката не е позволен.');
-//class manager 
+//class manager
 define('ERR_FOLDER_NOT_FOUND', 'Папката не е намерена:');
-//rename 
+//rename
 define('ERR_RENAME_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_RENAME_EXISTS', 'Името се повтаря. Въведете име, което е уникално в рамките на тази папка.');
 define('ERR_RENAME_FILE_NOT_EXISTS', 'Този файл или тази папка не съществува.');
@@ -170,7 +170,7 @@ define('ERR_RENAME_FAILED', 'Не може да го преименувате, 
 define('ERR_RENAME_EMPTY', 'Въведете име.');
 define('ERR_NO_CHANGES_MADE', 'Няма извършени промени.');
 define('ERR_RENAME_FILE_TYPE_NOT_PERMITED', 'Вие нямате права за промяна на име на файл с такова разширение.');
-//folder creation 
+//folder creation
 define('ERR_FOLDER_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_FOLDER_EXISTS', 'Името се повтаря. Въведете име, което е уникално.');
 define('ERR_FOLDER_CREATION_FAILED', 'Невъзможно е да се създаде папка, моля, опитайте отново.');
@@ -178,11 +178,11 @@ define('ERR_FOLDER_NAME_EMPTY', 'Въведете име.');
 define('FOLDER_FORM_TITLE', 'Нова папка');
 define('FOLDER_LBL_TITLE', 'Име на папката:');
 define('FOLDER_LBL_CREATE', 'Създаване на папка');
-//New File 
+//New File
 define('NEW_FILE_FORM_TITLE', 'Нов файл');
 define('NEW_FILE_LBL_TITLE', 'Име на файла:');
 define('NEW_FILE_CREATE', 'Създаване на файл');
-//file upload 
+//file upload
 define('ERR_FILE_NAME_FORMAT', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('ERR_FILE_NOT_UPLOADED', 'Не е избран файл за качване.');
 define('ERR_FILE_TYPE_NOT_ALLOWED', 'Нямате права да качвате такъв тип файл.');
@@ -194,39 +194,39 @@ define('FILE_LABEL_SELECT', 'Избор на файл');
 define('FILE_LBL_MORE', 'Добавяне на файл за качване');
 define('FILE_CANCEL_UPLOAD', 'Отказ качване на файлове');
 define('FILE_LBL_UPLOAD', 'Качване');
-//file download 
+//file download
 define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Няма избрани файлове за изтегляне. ');
-//Rename 
-define('RENAME_FORM_TITLE', 'Преименувай'); 
+//Rename
+define('RENAME_FORM_TITLE', 'Преименувай');
 define('RENAME_NEW_NAME', 'Ново име');
 define('RENAME_LBL_RENAME', 'Преименуване');
 
-//Tips 
+//Tips
 define('TIP_FOLDER_GO_DOWN', 'Щракнете веднъж за да стигнете до тази папка ...');
 define('TIP_DOC_RENAME', 'Щракнете два пъти за да редактирате ...');
 define('TIP_FOLDER_GO_UP', 'Щракнете веднъж за да стигнте до родителската папка ...');
 define('TIP_SELECT_ALL', 'Избери всички');
 define('TIP_UNSELECT_ALL', 'Премахни всички');
-//WARNING 
+//WARNING
 define('WARNING_DELETE', 'Сигурни ли сте за изтриването?');
 define('WARNING_IMAGE_EDIT', 'Моля, изберете изображение за редактиране.');
 define('WARNING_NOT_FILE_EDIT', 'Моля, изберете файла за редактиране.');
 define('WARING_WINDOW_CLOSE', 'Сигурни ли сте, че искате за да затворите прозореца?');
-//Preview 
+//Preview
 define('PREVIEW_NOT_PREVIEW', 'Невъзможен преглед.');
 define('PREVIEW_OPEN_FAILED', 'Невъзможно е да отворите файла.');
 define('PREVIEW_IMAGE_LOAD_FAILED', 'Невъзможно е зареждане на изображението');
 
-//Login 
+//Login
 define('LOGIN_PAGE_TITLE', 'Файлов мениджър, автентикация');
 define('LOGIN_FORM_TITLE', 'Вход');
 define('LOGIN_USERNAME', 'Потребител:');
 define('LOGIN_PASSWORD', 'Парола:');
 define('LOGIN_FAILED', 'Невалидно потребителско име/парола.');
-//88888888888   Below for Image Editor   888888888888888888888 
-//Warning 
+//88888888888   Below for Image Editor   888888888888888888888
+//Warning
 define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'Няма промени в изображенията.');
-//General 
+//General
 define('IMG_GEN_IMG_NOT_EXISTS', 'Изображението не съществува');
 define('IMG_WARNING_LOST_CHANAGES', 'Всички незапазени промени, направени в изображението ще се загубят, сигурни ли сте, че искате да продължите?');
 define('IMG_WARNING_REST', 'Всички незапазени промени, направени в изображението ще бъдат загубени, Сигурни ли сте, че искате да продължите?');
@@ -236,12 +236,12 @@ define('IMG_WARNING_UNDO', 'Сигурни ли сте, че искате да 
 define('IMG_WARING_FLIP_H', 'Сигурни ли сте, че искате да завъртите изображението хоризонтално?');
 define('IMG_WARING_FLIP_V', 'Сигурни ли сте, че искате да завъртите изображението вертикално?');
 define('IMG_INFO', 'Информация за изображението');
-//Mode 
+//Mode
 define('IMG_MODE_RESIZE', 'Промяна на размера >>');
 define('IMG_MODE_CROP', 'Изрязване>>');
 define('IMG_MODE_ROTATE', 'Завъртане>>');
 define('IMG_MODE_FLIP', 'Огледално>>');
-//Button 
+//Button
 define('IMG_BTN_ROTATE_LEFT', '90 °наляво');
 define('IMG_BTN_ROTATE_RIGHT', '90 ° надясно');
 define('IMG_BTN_FLIP_H', 'Хоризонтално');
@@ -252,9 +252,9 @@ define('IMG_BTN_SAVE', 'Запиши');
 define('IMG_BTN_CLOSE', 'Затвори');
 define('IMG_BTN_SAVE_AS', 'Запиши като');
 define('IMG_BTN_CANCEL', 'Отказ');
-//Checkbox 
+//Checkbox
 define('IMG_CHECKBOX_CONSTRAINT', 'Съразмерно >>');
-//Label 
+//Label
 define('IMG_LBL_WIDTH', 'Ширина:');
 define('IMG_LBL_HEIGHT', 'Височина:');
 define('IMG_LBL_X', 'X:');
@@ -265,15 +265,15 @@ define('IMG_LBL_NEW_NAME', 'Ново име:');
 define('IMG_LBL_SAVE_AS', 'Запиши като');
 define('IMG_LBL_SAVE_TO', 'Записване в:');
 define('IMG_LBL_ROOT_FOLDER', 'Главна папка');
-//Editor 
-//Save as 
+//Editor
+//Save as
 define('IMG_NEW_NAME_COMMENTS', 'Моля, не поставяйте разширение на името.');
 define('IMG_SAVE_AS_ERR_NAME_INVALID', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 define('IMG_SAVE_AS_NOT_FOLDER_SELECTED', 'Няма избрана папка.');
 define('IMG_SAVE_AS_FOLDER_NOT_FOUND', 'Папката не съществува.');
 define('IMG_SAVE_AS_NEW_IMAGE_EXISTS', 'Съществува изображение със същото име.');
 
-//Save 
+//Save
 define('IMG_SAVE_EMPTY_PATH', 'Няма път към изображението.');
 define('IMG_SAVE_NOT_EXISTS', 'Изображението не съществува.');
 define('IMG_SAVE_PATH_DISALLOWED', 'Вие нямате разрешение за достъп до този файл.');
@@ -286,17 +286,17 @@ define('IMG_SAVE_ROTATE_FAILED', 'Невъзможна е промяната н
 define('IMG_SAVE_FLIP_FAILED', 'Невъзможна е промяната на изображението.');
 define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', 'Невъзможно е отварянето на изображението.');
 define('IMG_SAVE_IMG_OPEN_FAILED', 'евъзможно е отварянето на изображението.');
-//UNDO 
+//UNDO
 define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Няма записани предишни състояния.');
 define('IMG_UNDO_COPY_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_COUNTER_FILE_CREATE_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_EXT_NOT_SELECTED', 'Моля, изберете файлово разширение.');
 define('TXT_DEST_FOLDER_NOT_SELECTED', 'Моля, изберете папка.');
@@ -311,6 +311,6 @@ define('TXT_CONTENT_UPDATE_FAILED', 'Неуспех да се актуализи
 define('TXT_SAVE_AS_ERR_NAME_INVALID', 'Въведете име, което да съдържа само букви, цифри, интервал, тире и подчертаване.');
 
 	//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');
 		//File 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_MODIFIED", 'Ændret:');
 	define("LBL_FILE_SIZE", 'Fil Str:');
@@ -62,7 +62,7 @@
 	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_NAME_EMPTY', 'Skriv venligst et navn.');
-	
+
 		//file upload
 	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.');
@@ -70,7 +70,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Kan ikke flytte filen.');
 	define('ERR_FILE_NOT_AVAILABLE', 'Filen findes ikke.');
 	define('ERROR_FILE_TOO_BID', 'Filen er for stor. (max: %s)');
-	
+
 
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Enkelt klik for at se denne mappe...');
@@ -91,6 +91,6 @@
 	define('LOGIN_USERNAME', 'Brugernavn:');
 	define('LOGIN_PASSWORD', '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');
 		//File 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_MODIFIED", 'Ge&auml;ndert am:');
 	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('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?');
-	
+
 	//ERROR MESSAGES
 		//deletion
 	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_CREATION_FAILED', 'Kann den Ordner nicht erstellen, bitte versuche es nochmals.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Bitte gib ihm einen Namen.');
-	
+
 		//file upload
 	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.');
@@ -88,7 +88,7 @@
 	define('ERROR_FILE_TOO_BID', 'Datei zu gro&szlig;. (max: %s)');
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Keine Dateien zum herunterladen ausgew&auml;hlt.');
-	
+
 
 	//Tips
 	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_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('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
 	define('PREVIEW_NOT_PREVIEW', 'Keine Vorschau vorhanden.');
 	define('PREVIEW_OPEN_FAILED', 'Kann diese Datei nicht &ouml;ffnen.');
@@ -112,12 +112,12 @@
 	define('LOGIN_USERNAME', 'Benutzer:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Falscher Benutzer/Password.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Du hast keine &auml;nderungen an diesem Bild gemacht.");
-		
+
 		//General
 		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?');
@@ -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_V', 'Bist du sicher das du das Bild vertikal spiegeln m&ouml;chtest?');
 		define('IMG_INFO', 'Bildinformation');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Gr&ouml;&szlig;e ver&Auml;ndern:');
 			define('IMG_MODE_CROP', 'Beschneiden:');
 			define('IMG_MODE_ROTATE', 'Drehen:');
-			define('IMG_MODE_FLIP', 'Spiegeln:');		
+			define('IMG_MODE_FLIP', 'Spiegeln:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Horizontal spiegeln');
@@ -160,10 +160,10 @@
 			define('IMG_LBL_SAVE_TO', 'Speichern in...:');
 			define('IMG_LBL_ROOT_FOLDER', 'Haupt Ordner');
 		//Editor
-		//Save as 
+		//Save as
 		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_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_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_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');
-		
-		
+
+
 		//UNDO
 		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_DEL_FAILED', 'Kann das Sitzungs-Bild nicht l&ouml;schen');
-	
+
 	//88888888888   Above for Image Editor   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_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.');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'Datei wurde nicht gefunden.');
 		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_SAVE_AS_ERR_NAME_INVALID', 'Bitte verwenden einen Namen, welcher nur Buchstaben, Punkte, Leerzeichen, Bindestriche und Unterstriche verwendet.');
 	//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');
 	//Common
 	//Menu
-	
-	
-	
-	
+
+
+
+
 	define('MENU_SELECT', 'Select');
 	define('MENU_DOWNLOAD', 'Download');
 	define('MENU_PREVIEW', 'Preview');
@@ -23,7 +23,7 @@
 	define('MENU_DELETE', 'Delete');
 	define('MENU_PLAY', 'Play');
 	define('MENU_PASTE', 'Paste');
-	
+
 	//Label
 		//Top Action
 		define('LBL_ACTION_REFRESH', 'Refresh');
@@ -39,7 +39,7 @@
 	define('LBL_MODIFIED', 'Modified At');
 		//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_MODIFIED', 'Modified:');
 	define('LBL_FILE_SIZE', 'File Size:');
@@ -83,7 +83,7 @@
 	define('PAGINATION_GO_PARENT', 'Go Parent Folder');
 	//System
 	define('SYS_DISABLED', 'Permission denied: The system is disabled.');
-	
+
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'No document(s) selected for cut.');
 	//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_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_NOT_FILES_PASTED', 'No file(s) has been pasted.');
 
 	//Search
@@ -111,7 +111,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', 'Advanced Options');
 	define('LBL_SEARCH_FILE_TYPES', 'File Types:');
 	define('SEARCH_TYPE_EXE', 'Application');
-	
+
 	define('SEARCH_TYPE_IMG', 'Image');
 	define('SEARCH_TYPE_ARCHIVE', 'Archive');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -201,8 +201,8 @@
 	define('FILE_LBL_MORE', 'Add file to upload');
 	define('FILE_CANCEL_UPLOAD', 'Cancel File Upload');
 	define('FILE_LBL_UPLOAD', 'Upload');
-	
-	
+
+
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'No files selected for download.');
 	//Rename
@@ -232,12 +232,12 @@
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Invalid username/password.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'You have not made any changes to the images.');
-		
+
 		//General
 		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?');
@@ -248,14 +248,14 @@
 		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_INFO', 'Image Information');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Resize:');
 			define('IMG_MODE_CROP', 'Crop:');
 			define('IMG_MODE_ROTATE', 'Rotate:');
-			define('IMG_MODE_FLIP', 'Flip:');		
+			define('IMG_MODE_FLIP', 'Flip:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Flip Horizontal');
@@ -280,10 +280,10 @@
 			define('IMG_LBL_SAVE_TO', 'Save To:');
 			define('IMG_LBL_ROOT_FOLDER', 'Root Folder');
 		//Editor
-		//Save as 
+		//Save as
 		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_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_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_SESSION_IMG_OPEN_FAILED', 'Unable to open image from session.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Unable to open image');
-		
-		
+
+
 		//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_DEL_FAILED', 'Unable to delete the session image');
-	
+
 	//88888888888   Above for Image Editor   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_COUNTER_FILE_CREATE_FAILED', 'Unable to open the session counter file.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Unable to write the session counter file.');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'File is not found.');
 		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_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
-	
-	
+
+
 ?>

+ 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');
 	//Common
-	//Menu	
-	
+	//Menu
+
 	define('MENU_SELECT', 'Seleccionar');
 	define('MENU_DOWNLOAD', 'Descargar');
 	define('MENU_PREVIEW', 'Previsualizar');
@@ -19,7 +19,7 @@
 	define('MENU_DELETE', 'Eliminar');
 	define('MENU_PLAY', 'Ejecutar');
 	define('MENU_PASTE', 'Pegar');
-	
+
 	//Label
 		//Top Action
 		define('LBL_ACTION_REFRESH', 'Actualizar');
@@ -35,7 +35,7 @@
 	define('LBL_MODIFIED', 'Modificado el');
 		//File Information
 	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_MODIFIED', 'Modificado:');
 	define('LBL_FILE_SIZE', 'Tama&ntilde;o:');
@@ -79,7 +79,7 @@
 	define('PAGINATION_GO_PARENT', 'Ir a la carpeta superior');
 	//System
 	define('SYS_DISABLED', 'Permiso denegado: el sistema est&aacute; deshabilitado.');
-	
+
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'No hay seleccionado un documento para cortar.');
 	//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_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_NOT_FILES_PASTED', 'Los archivos no han sido pegados.');
 
 	//Search
@@ -107,7 +107,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', 'opciones avanzadas');
 	define('LBL_SEARCH_FILE_TYPES', 'Tipos de archivo:');
 	define('SEARCH_TYPE_EXE', 'Aplicaci&oacute;n');
-	
+
 	define('SEARCH_TYPE_IMG', 'Imagen');
 	define('SEARCH_TYPE_ARCHIVE', 'Archivo');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -166,7 +166,7 @@
 		//class manager
 	define('ERR_FOLDER_NOT_FOUND', 'No se ha podido localizar la carpeta especificada: ');
 		//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_FILE_NOT_EXISTS', 'El archivo/carpeta no existe.');
 	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_CANCEL_UPLOAD', 'Cancelar el env&iacute;o del archivo');
 	define('FILE_LBL_UPLOAD', 'Enviar');
-	
+
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'No hay seleccionados archivos para descargar.');
 	//Rename
@@ -227,12 +227,12 @@
 	define('LOGIN_USERNAME', 'Nombre de usuario:');
 	define('LOGIN_PASSWORD', 'Contrase&ntilde;a:');
 	define('LOGIN_FAILED', 'Nombre de usuario o contrase&ntilde;a no v&aacute;lidos.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', 'No se han realizado cambios en la imagen.');
-		
+
 		//General
 		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?');
@@ -243,14 +243,14 @@
 		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_INFO', 'Informaci&oacute;n de la imagen');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Cambiar tama&ntilde;o:');
 			define('IMG_MODE_CROP', 'Recortar:');
 			define('IMG_MODE_ROTATE', 'Rotar:');
-			define('IMG_MODE_FLIP', 'Voltear:');		
+			define('IMG_MODE_FLIP', 'Voltear:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			define('IMG_BTN_FLIP_H', 'Voltear horizontal');
@@ -275,10 +275,10 @@
 			define('IMG_LBL_SAVE_TO', 'Guardar en:');
 			define('IMG_LBL_ROOT_FOLDER', 'Carpeta principal');
 		//Editor
-		//Save as 
+		//Save as
 		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_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_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_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');
-		
-		
+
+
 		//UNDO
 		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_DEL_FAILED', 'No se puede eliminar la imagen de sesi&oacute;n');
-	
+
 	//88888888888   Above for Image Editor   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_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.');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		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');
@@ -324,6 +324,6 @@
 		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.');
 	//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');
 		//File Information
 	define('LBL_FILE_INFO', 'Tietoa:');
-	define('LBL_FILE_NAME', 'Nimi:');	
+	define('LBL_FILE_NAME', 'Nimi:');
 	define('LBL_FILE_CREATED', 'Luotu:');
 	define("LBL_FILE_MODIFIED", 'Muokattu:');
 	define("LBL_FILE_SIZE", 'Tiedostokoko:');
@@ -54,7 +54,7 @@
 	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_COPY_PASTE', 'Haluatko varmasti kopioida valitut tiedostot/kansiot tähän kansioon?');
-	
+
 	//ERROR MESSAGES
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Valitse ensin tiedosto.');
@@ -76,7 +76,7 @@
 	define('ERR_FOLDER_EXISTS', 'Annettu nimi on jo olemassa.');
 	define('ERR_FOLDER_CREATION_FAILED', 'Ei voitu luoda kansiota. Yritä uudelleen.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Kansion nimi ei voi olla tyhjä');
-	
+
 		//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_NOT_UPLOADED', 'Tiedostoa ei valittuna.');
@@ -84,7 +84,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Lähetetyn tiedoston siirto epäonnistui');
 	define('ERR_FILE_NOT_AVAILABLE', 'Tiedostoa ei ole saatavilla');
 	define('ERROR_FILE_TOO_BID', 'Tiedosto on liian suuri (suurin: %s)');
-	
+
 
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Klikkaa kerran avataksesi kansion...');
@@ -107,12 +107,12 @@
 	define('LOGIN_USERNAME', 'Käyttäjänimi:');
 	define('LOGIN_PASSWORD', 'Salasana:');
 	define('LOGIN_FAILED', 'Väärä käyttäjänimi tai salasana!');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Et ole tehnyt kuvaan muutoksia.");
-		
+
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', 'Kuvaa ei ole olemassa');
 		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_V', 'Käännetäänkö kuva pystysuunnassa?');
 		define('IMG_INFO', 'Tietoa kuvasta');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Muuta kokoa:');
 			define('IMG_MODE_CROP', 'Rajaa:');
 			define('IMG_MODE_ROTATE', 'Kierrä:');
-			define('IMG_MODE_FLIP', 'Käännä:');		
+			define('IMG_MODE_FLIP', 'Käännä:');
 		//Button
-		
+
 			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_FLIP_H', 'Käännä vaakasuunnassa');
@@ -150,7 +150,7 @@
 			define('IMG_LBL_ANGLE', 'Kulma:');
 		//Editor
 
-			
+
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Tyhjä polku.');
 		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_SESSION_IMG_OPEN_FAILED', 'Kuvatiedoston avaaminen istunnosta epäonnistui.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Kuvatiedoston avaaminen epäonnistui');
-		
+
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', 'Ei muokkaushistoriaa');
 		define('IMG_UNDO_COPY_FAILED', 'Palauttaminen epäonnistui');
 		define('IMG_UNDO_DEL_FAILED', 'Kuvan poistaminen istunnosta epäonnistui.');
-	
+
 	//88888888888   Above for Image Editor   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_COUNTER_FILE_CREATE_FAILED", 'Unable to open the session counter file.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', 'Unable to write the session counter file.');
 	//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");
         //File Information
     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_MODIFIED', "Modifi&eacute; le :");
     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('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 ?");
-    
+
     //ERROR MESSAGES
         //deletion
     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_CREATION_FAILED', "Impossible de cr&eacute;er un dossier, merci de recommencer.");
     define('ERR_FOLDER_NAME_EMPTY', "Il faut pr&eacute;ciser un nom.");
-    
+
         //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_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)");
     //file download
     define('ERR_DOWNLOAD_FILE_NOT_FOUND', "Aucun fichier selectionn&eacute; pour &ecirc;tre t&eacute;l&eacute;charg&eacute;.");
-    
+
 
     //Tips
     define('TIP_FOLDER_GO_DOWN', "Cliquer pour aller dans ce dossier ...");
@@ -113,12 +113,12 @@
     define('LOGIN_USERNAME', "Utilisateur :");
     define('LOGIN_PASSWORD', "Mot de passe :");
     define('LOGIN_FAILED', "Utilisateur/Mot de passe erron&eacute;.");
-    
-    
+
+
     //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.");
-        
+
         //General
         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 ?");
@@ -128,14 +128,14 @@
         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_INFO', "Information sur l\'image");
-        
+
         //Mode
             define('IMG_MODE_RESIZE', "Redimensionner :");
             define('IMG_MODE_CROP', "D&eacute;couper :");
             define('IMG_MODE_ROTATE', "Rotation :");
             define('IMG_MODE_FLIP', "Basculer :");
         //Button
-        
+
             define('IMG_BTN_ROTATE_LEFT', "90&deg; vers la gauche");
             define('IMG_BTN_ROTATE_RIGHT', "90&deg; vers la droite");
             define('IMG_BTN_FLIP_H', "Miroir Horizontal");
@@ -160,7 +160,7 @@
             define('IMG_LBL_SAVE_TO', "Sauvegarder dans :");
             define('IMG_LBL_ROOT_FOLDER', "Dossier racine");
         //Editor
-        //Save as 
+        //Save as
         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_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_SESSION_IMG_OPEN_FAILED', "Impossible d\'ouvrir l\'image de session.");
         define('IMG_SAVE_IMG_OPEN_FAILED', "Impossible d\'ouvrir l\'image");
-        
-        
+
+
         //UNDO
         define('IMG_UNDO_NO_HISTORY_AVAIALBE', "Aucun historique d\'annulation.");
         define('IMG_UNDO_COPY_FAILED', "Impossible de restaurer l\'image.");
         define('IMG_UNDO_DEL_FAILED', "Impossible de supprimer l\'image de session");
-    
+
     //88888888888   Above for Image Editor   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_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.");
     //88888888888   Session   888888888888888888888
-    
+
     //88888888888   Below for Text Editor   888888888888888888888
         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.");
@@ -209,6 +209,6 @@
         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.");
     //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');
 		//File Information
 	define('LBL_FILE_INFO', 'Info File:');
-	define('LBL_FILE_NAME', 'Nome:');	
+	define('LBL_FILE_NAME', 'Nome:');
 	define('LBL_FILE_CREATED', 'Creato:');
 	define("LBL_FILE_MODIFIED", 'Modificato:');
 	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_CREATION_FAILED', 'Impossibile creare la cartella, prova ancora.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Per favore indica un nome.');
-	
+
 		//file upload
 	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.');
@@ -70,7 +70,7 @@
 	define('ERR_FILE_MOVE_FAILED', 'Errore spostamento file.');
 	define('ERR_FILE_NOT_AVAILABLE', 'File non disponivile.');
 	define('ERROR_FILE_TOO_BID', 'File troppo grande. (max: %s)');
-	
+
 
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Click singolo per accedere alla Cartella...');
@@ -91,6 +91,6 @@
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_PASSWORD', 'Password:');
 	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');
 	//Common
 	//Menu
-	
-	
-	
-	
+
+
+
+
 	define('MENU_SELECT', 'Zaznacz');
 	define('MENU_DOWNLOAD', 'Pobierz');
 	define('MENU_PREVIEW', 'Podgląd');
@@ -32,7 +32,7 @@
 	define('MENU_DELETE', 'Usuń');
 	define('MENU_PLAY', 'Odtwórz');
 	define('MENU_PASTE', 'Wklej');
-	
+
 	//Label
 		//Top Action
 		define('LBL_ACTION_REFRESH', 'Odśwież');
@@ -48,7 +48,7 @@
 	define('LBL_MODIFIED', 'Ostatnia zmiana');
 		//File Information
 	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_MODIFIED", 'Zmieniony:');
 	define("LBL_FILE_SIZE", 'Rozmiar pliku:');
@@ -92,7 +92,7 @@
 	define('PAGINATION_GO_PARENT', 'Katalog nadrzędny');
 	//System
 	define('SYS_DISABLED', 'Brak dostępu: System nieaktywny');
-	
+
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', 'Nie wybrano żadnego dokumentu do wycięcia.');
 	//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_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_NOT_FILES_PASTED', 'Żadne pliki nie zostały skopiowane.');
 
 	//Search
@@ -120,7 +120,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', 'Opcje zaawansowane');
 	define('LBL_SEARCH_FILE_TYPES', 'Rozszerzenie:');
 	define('SEARCH_TYPE_EXE', 'Plik wykonywalny exe');
-	
+
 	define('SEARCH_TYPE_IMG', 'Obraz');
 	define('SEARCH_TYPE_ARCHIVE', 'Archiwum');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -239,12 +239,12 @@
 	define('LOGIN_USERNAME', 'Nazwa użytkownika:');
 	define('LOGIN_PASSWORD', 'hasło:');
 	define('LOGIN_FAILED', 'Błędna nazwa użytkownika lub hasło.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Nie można dokonać zmian w obrazku.");
-		
+
 		//General
 		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ć?');
@@ -255,14 +255,14 @@
 		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_INFO', 'Informacje o obrazku');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Zmień rozmiar:');
 			define('IMG_MODE_CROP', 'Kadruj:');
 			define('IMG_MODE_ROTATE', 'Obróć:');
-			define('IMG_MODE_FLIP', 'Odbij:');		
+			define('IMG_MODE_FLIP', 'Odbij:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;w lewo');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;w prawo');
 			define('IMG_BTN_FLIP_H', 'Odbij w poziomie');
@@ -287,10 +287,10 @@
 			define('IMG_LBL_SAVE_TO', 'Zapisz do:');
 			define('IMG_LBL_ROOT_FOLDER', 'Katalog główny');
 		//Editor
-		//Save as 
+		//Save as
 		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_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_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_SESSION_IMG_OPEN_FAILED', 'Nie można otworzyć obrazka z sesji.');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Nie można otworzyć obrazka');
-		
-		
+
+
 		//UNDO
 		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_DEL_FAILED', 'Nie można usunąć obrazka z sesji');
-	
+
 	//88888888888   Above for Image Editor   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_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.');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'Plik nie istnieje.');
 		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_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
-	
-	
+
+
 ?>

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

@@ -20,7 +20,7 @@
 	define('LBL_MODIFIED', 'Modificado em');
 		//File Information
 	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_MODIFIED", 'Modificado em:');
 	define("LBL_FILE_SIZE", 'Tamanho:');
@@ -54,29 +54,29 @@
 	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_COPY_PASTE', 'Tem certeza que deseja copiar os arquivos selecionados para esta pasta?');
-	
+
 	//ERROR MESSAGES
 		//deletion
 	define('ERR_NOT_FILE_SELECTED', 'Por favor, selecione um arquivo.');
 	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.');
 		//class manager
-	define("ERR_FOLDER_NOT_FOUND", 'Impossível encontrar a pasta: ');
+	define("ERR_FOLDER_NOT_FOUND", 'Imposs�vel encontrar a pasta: ');
 		//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_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_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_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.');
 		//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_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.');
-	
+
 		//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_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_NOT_AVAILABLE', 'O arquivo n&atilde;o est&aacute; dispon&iacute;vel.');
 	define('ERROR_FILE_TOO_BID', 'Arquivo muito grande. (max: %s)');
-	
+
 
 	//Tips
 	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?');
 	//Preview
 	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
 	define('LOGIN_PAGE_TITLE', 'Ajax File Manager Login Form');
@@ -107,12 +107,12 @@
 	define('LOGIN_USERNAME', 'Username:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', 'Invalid username/password.');
-	
-	
+
+
 	//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.");
-		
+
 		//General
 		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?');
@@ -123,14 +123,14 @@
 		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_INFO', 'Informa&ccedil;oes sobre a imagem');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Redimensionar:');
 			define('IMG_MODE_CROP', 'Cortar:');
 			define('IMG_MODE_ROTATE', 'Rotacionar:');
-			define('IMG_MODE_FLIP', 'Espelhar:');		
+			define('IMG_MODE_FLIP', 'Espelhar:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;Anti Hor&aacute;rio');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;Hor&aacute;rio');
 			define('IMG_BTN_FLIP_H', 'Espelhar horizontalmente');
@@ -150,7 +150,7 @@
 			define('IMG_LBL_ANGLE', '&Acirc;ngulo:');
 		//Editor
 
-			
+
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Caminho da imagem vazio.');
 		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_CROP_FAILED', 'Falha ao cortar.');
 		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
 		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   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
-	
-	
+
+
 ?>

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

@@ -21,7 +21,7 @@
 	define('LBL_MODIFIED', 'Modificado em');
 		//File Information
 	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_MODIFIED", 'Modificado em:');
 	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('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?');
-	
+
 	//ERROR MESSAGES
 		//deletion
 	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_CREATION_FAILED', 'Não foi possível criar a pasta, tente novamente.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Por favor, escolha um nome.');
-	
+
 		//file upload
 	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.');
@@ -88,7 +88,7 @@
 	define('ERROR_FILE_TOO_BID', 'Ficheiro muito grande. (máx: %s)');
 	//file download
 	define('ERR_DOWNLOAD_FILE_NOT_FOUND', 'Não foram seleccionados ficheiros para download.');
-	
+
 
 	//Tips
 	define('TIP_FOLDER_GO_DOWN', 'Clique para ir para esta pasta...');
@@ -112,12 +112,12 @@
 	define('LOGIN_USERNAME', 'ID do utilizador:');
 	define('LOGIN_PASSWORD', 'Password:');
 	define('LOGIN_FAILED', ' ID do utilizador/password inválidos.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Não fez qualquer alteração à imagem.");
-		
+
 		//General
 		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?');
@@ -128,14 +128,14 @@
 		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_INFO', 'Informações da imagem');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Redimensionar:');
 			define('IMG_MODE_CROP', 'Recortar:');
 			define('IMG_MODE_ROTATE', 'Rodar:');
-			define('IMG_MODE_FLIP', 'Virar:');		
+			define('IMG_MODE_FLIP', 'Virar:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&graus;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&graus;CW');
 			define('IMG_BTN_FLIP_H', 'Virar horizontalmente');
@@ -160,10 +160,10 @@
 			define('IMG_LBL_SAVE_TO', 'Guardar para:');
 			define('IMG_LBL_ROOT_FOLDER', 'Pasta raíz');
 		//Editor
-		//Save as 
+		//Save as
 		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_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_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_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');
-		
+
 		//UNDO
 		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_DEL_FAILED', 'Não foi possível apagar a imagem da sessão');
-	
+
 	//88888888888   Above for Image Editor   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_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.');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'O ficheiro não foi encontrado.');
 		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_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
-	
-	
+
+
 ?>

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

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

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

@@ -22,7 +22,7 @@
 	define('LBL_MODIFIED', 'Dátum');
 		//File Information
 	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_MODIFIED", 'Upravene:');
 	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('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?');
-	
+
 	//ERROR MESSAGES
 		//deletion
 	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_CREATION_FAILED', 'Nie je možne vytvoriť priečinok, skúste znovu.');
 	define('ERR_FOLDER_NAME_EMPTY', 'Vyplnte názov.');
-	
+
 		//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_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_NOT_AVAILABLE', 'The file is unavailable.');
 	define('ERROR_FILE_TOO_BID', 'Súbor je príliš veľký. (max: %s)');
-	
+
 		//file download
 	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_PASSWORD', 'Heslo:');
 	define('LOGIN_FAILED', 'Neplatné užívateľské meno/heslo.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', "Obrázky neboli upravene.");
-		
+
 		//General
 		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ť?');
@@ -129,14 +129,14 @@
 		define('IMG_WARING_FLIP_H', 'Naozaj chcete preklopiť obrázok vodorovne?');
 		define('IMG_WARING_FLIP_V', 'Naozaj chcete preklopiť obrázok zvisle?');
 		define('IMG_INFO', 'Info obrázku');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', 'Zmena Veľkosti :');
 			define('IMG_MODE_CROP', 'Odrezať :');
 			define('IMG_MODE_ROTATE', 'Otočiť :');
 			define('IMG_MODE_FLIP', 'Preklopiť:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;CCW');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;CW');
 			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_TO', 'Uložiť kam:');
 			define('IMG_LBL_ROOT_FOLDER', 'Rodičovský priečinok');
-		
+
 		//Editor
-		//Save as 
+		//Save as
 		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_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_NEW_IMAGE_EXISTS', 'Taky súbor už existuje.');
-			
+
 		//Save
 		define('IMG_SAVE_EMPTY_PATH', 'Cesta obrázku je prázdna.');
 		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_SESSION_IMG_OPEN_FAILED', 'Nie je schopný otvoriť obrazok zo session(relácie).');
 		define('IMG_SAVE_IMG_OPEN_FAILED', 'Nie je schopný otvoriť obrazok');
-		
+
 		//UNDO
 		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_DEL_FAILED', 'Nie je schopný odstrániť session obrázku');
-	
+
 	//88888888888   Above for Image Editor   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_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).');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', 'Súbor nebol nájdený.');
 		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');
 	//Common
 	//Menu
-	
-	
-	
-	
+
+
+
+
 	define('MENU_SELECT', '选取');
 	define('MENU_DOWNLOAD', '下载');
 	define('MENU_PREVIEW', '预览');
@@ -23,7 +23,7 @@
 	define('MENU_DELETE', '删除');
 	define('MENU_PLAY', '播放');
 	define('MENU_PASTE', '粘贴');
-	
+
 	//Label
 		//Top Action
 		define('LBL_ACTION_REFRESH', '刷新');
@@ -39,7 +39,7 @@
 	define('LBL_MODIFIED', '更改于');
 		//File Information
 	define('LBL_FILE_INFO', '文件信息:');
-	define('LBL_FILE_NAME', '文件名:');	
+	define('LBL_FILE_NAME', '文件名:');
 	define('LBL_FILE_CREATED', '创建于:');
 	define('LBL_FILE_MODIFIED', '更改于:');
 	define('LBL_FILE_SIZE', '大小:');
@@ -83,7 +83,7 @@
 	define('PAGINATION_GO_PARENT', '返回上一层');
 	//System
 	define('SYS_DISABLED', '系统已关闭');
-	
+
 	//Cut
 	define('ERR_NOT_DOC_SELECTED_FOR_CUT', '没有文档被选取.');
 	//Copy
@@ -98,7 +98,7 @@
 	define('ERR_UNABLE_TO_MOVE_TO_SAME_DEST', '无法移动%s文件夹: 目标文件夹与被移动的相同');
 	define('ERR_UNABLE_TO_MOVE_NOT_FOUND', '无法移动%s文档: 被移动的文档已不存在');
 	define('ERR_UNABLE_TO_MOVE_NOT_ALLOWED', '无法移动%s文档: 被移动的文档无法访问');
- 
+
 	define('ERR_NOT_FILES_PASTED', '没有文档被粘贴');
 
 	//Search
@@ -111,7 +111,7 @@
 	define('LBL_SEARCH_ADV_OPTIONS', '高级搜索');
 	define('LBL_SEARCH_FILE_TYPES', '文件类型:');
 	define('SEARCH_TYPE_EXE', '可执行文件');
-	
+
 	define('SEARCH_TYPE_IMG', '图像');
 	define('SEARCH_TYPE_ARCHIVE', '压缩文档');
 	define('SEARCH_TYPE_HTML', 'HTML');
@@ -230,12 +230,12 @@
 	define('LOGIN_USERNAME', '用户名:');
 	define('LOGIN_PASSWORD', '密码:');
 	define('LOGIN_FAILED', '无效的用户名/密码.');
-	
-	
+
+
 	//88888888888   Below for Image Editor   888888888888888888888
-		//Warning 
+		//Warning
 		define('IMG_WARNING_NO_CHANGE_BEFORE_SAVE', '没有任何对此图像的操作记录.');
-		
+
 		//General
 		define('IMG_GEN_IMG_NOT_EXISTS', '图像不存在');
 		define('IMG_WARNING_LOST_CHANAGES', '所有未保存的操作将丢失,确定要继续?');
@@ -246,14 +246,14 @@
 		define('IMG_WARING_FLIP_H', '确定要水平翻转?');
 		define('IMG_WARING_FLIP_V', '确定要垂直翻转?');
 		define('IMG_INFO', '图像信息');
-		
+
 		//Mode
 			define('IMG_MODE_RESIZE', '收放:');
 			define('IMG_MODE_CROP', '剪切:');
 			define('IMG_MODE_ROTATE', '旋转:');
-			define('IMG_MODE_FLIP', '翻转:');		
+			define('IMG_MODE_FLIP', '翻转:');
 		//Button
-		
+
 			define('IMG_BTN_ROTATE_LEFT', '90&deg;逆转');
 			define('IMG_BTN_ROTATE_RIGHT', '90&deg;顺转');
 			define('IMG_BTN_FLIP_H', '垂直翻转');
@@ -278,10 +278,10 @@
 			define('IMG_LBL_SAVE_TO', '保存至:');
 			define('IMG_LBL_ROOT_FOLDER', '根文件夹');
 		//Editor
-		//Save as 
+		//Save as
 		define('IMG_NEW_NAME_COMMENTS', '请别附加图像文档的扩展名');
 		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_NEW_IMAGE_EXISTS', '相同的文件名已存在.');
 
@@ -298,21 +298,21 @@
 		define('IMG_SAVE_FLIP_FAILED', '无法翻转图像');
 		define('IMG_SAVE_SESSION_IMG_OPEN_FAILED', '无法从进程文件夹打开图像文档');
 		define('IMG_SAVE_IMG_OPEN_FAILED', '无法打开图像文档');
-		
-		
+
+
 		//UNDO
 		define('IMG_UNDO_NO_HISTORY_AVAIALBE', '没有记录可恢复');
 		define('IMG_UNDO_COPY_FAILED', '无法恢复原来的图像文档');
 		define('IMG_UNDO_DEL_FAILED', '无法删除进程文件夹中的图像文档');
-	
+
 	//88888888888   Above for Image Editor   888888888888888888888
-	
+
 	//88888888888   Session   888888888888888888888
 		define('SESSION_PERSONAL_DIR_NOT_FOUND', '个人进程文件夹不存在');
 		define('SESSION_COUNTER_FILE_CREATE_FAILED', '无法打开进程计数文件.');
 		define('SESSION_COUNTER_FILE_WRITE_FAILED', '无法读写进程计数文件.');
 	//88888888888   Session   888888888888888888888
-	
+
 	//88888888888   Below for Text Editor   888888888888888888888
 		define('TXT_FILE_NOT_FOUND', '文件不存在.');
 		define('TXT_EXT_NOT_SELECTED', '请选择文件扩展名');
@@ -327,6 +327,6 @@
 		define('TXT_CONTENT_UPDATE_FAILED', '无法更新文件内容');
 		define('TXT_SAVE_AS_ERR_NAME_INVALID', '文件名只能含有英文字母,数字, - 和 _');
 	//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
 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
 echo '<?xml version="1.0" encoding="utf-8" ?>';
 
-// is this needed? 
+// is this needed?
 $IMConfig['base_url'] = $_configuration['root_web'].'main/img/gallery/';
 
 // load a stylesheet
@@ -20,9 +20,9 @@ $css = loadCSS(api_get_setting('stylesheets'));
 
 // load libreries 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;
-	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"/>';
 	} else {
 		$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() {
 	// 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;
 	$sql = "SELECT title, image, comment, content FROM $table_template";
-	
+
 	$result = api_sql_query($sql, __FILE__, __LINE__);
 	while ($row = Database::fetch_array($result)) {
         if (!empty($row['image'])) {
             $image = api_get_path(WEB_PATH).'home/default_platform_document/template_thumb/'.$row['image'];
         } else {
             $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('{REL_PATH}', api_get_path(REL_PATH), $row['content']);
       	$row['content'] =  str_replace('{COURSE_DIR}',$default_course_dir, $row['content']);
@@ -122,60 +122,60 @@ function load_platform_templates() {
 							    '.$row['content'].'
 						]]>
 					</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
  * @return xml node
- * 
+ *
  * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
  * @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) {
-	global $_course; 
+	global $_course;
 
 	// the templates that the user has defined are only available inside the course itself
 	if (empty($_course))
 	{
 		return false;
 	}
-	
-	// For which user are we getting the templates? 
+
+	// For which user are we getting the templates?
 	if ($user_id==0)
 	{
 		$user_id = api_get_user_id();
 	}
 
 	// 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
-	$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)."'
 			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__);
 	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'] = api_get_path('SYS_COURSE_PATH').$_course['path'].'/document'.$row['path'];
-		
+
 		if (!empty($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';
 		}
-		
-		
+
+
 		echo '	<Template title="'.s2($row['title']).'" image="'.$image.'">
 					<Description>'.s2($row['Description']).'</Description>
 					<Html>
@@ -183,13 +183,13 @@ function load_personal_templates($user_id=0) {
 							    '.$row['content'].'
 						]]>
 					</Html>
-				</Template>';		
-	}	
+				</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'; ?>">
     <Description></Description>
@@ -198,7 +198,7 @@ function load_empty_template()
 		   <html>
 		   <head>
 			<?php echo $css ?>
-			<?php echo $js ?>			  
+			<?php echo $js ?>
 		   <body></body>
 		   </head>
 		   </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.
 if (api_is_platform_admin()) {
 	$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);
 	}
 }
@@ -46,8 +46,8 @@ if (api_is_platform_admin()) {
 // Creation in the course document repository of a shared folder if it does not exist.
 if (api_is_in_course()) {
 	$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);
 		$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());
@@ -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.
 	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
-		$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']));
 		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());

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

@@ -13,7 +13,7 @@ $config['ToolbarSets']['Normal'] = array(
     array('Link','Unlink','Anchor'),
     array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
     array('Table','SpecialChar'),
-    '/',   
+    '/',
     array('FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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('Table','SpecialChar'),
 	array('Outdent','Indent','-','TextColor','BGColor','-','OrderedList','UnorderedList'),
-	'/',	
+	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
 	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('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex','asciimath','Table','SpecialChar'),
 	array('Outdent','Indent','TextColor','BGColor','-','OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight'),
-	'/',	
+	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline','-','Source'),
 );//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.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),							   
+	array('FitWindow','-','PasteWord','-','Undo','Redo'),
 	array('Link','Unlink','Anchor'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	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('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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.
 $config['ToolbarSets']['Normal'] = array(
-	array('FitWindow','-','PasteWord','-','Undo','Redo'),							   
+	array('FitWindow','-','PasteWord','-','Undo','Redo'),
 	array('Link','Unlink','Anchor'),
 	array('Image','flvPlayer','Flash','EmbedMovies','YouTube','MP3','mimetex'),
 	array('Table','Smiley'),

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

@@ -1,5 +1,5 @@
 <?php
-$config['ToolbarSets']['Normal'] = array(	
+$config['ToolbarSets']['Normal'] = array(
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
 	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('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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.
 $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.

+ 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.
 $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.

+ 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('Table','SpecialChar'),
     array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','-','Source'),
-    '/',   
+    '/',
     array('Style','FontFormat','FontName','FontSize'),
     array('Bold','Italic','Underline'),
     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('Table','SpecialChar'),
 	array('OrderedList','UnorderedList','-','Outdent','Indent','-','TextColor','BGColor','Source'),
-	'/',	
+	'/',
 	array('Style','FontFormat','FontName','FontSize'),
 	array('Bold','Italic','Underline'),
 	array('JustifyLeft','JustifyCenter','JustifyRight')

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

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

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

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

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

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

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

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

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

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

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác