Index: trunk/LICENSE
===================================================================
--- trunk/LICENSE	(revision 316)
+++ trunk/LICENSE	(revision 317)
@@ -1,5 +1,5 @@
-License
-=======
+License
+=======
 Website Baker is released under the GNU General Public License,
-Copyright (C) 2004-2005 Ryan Djurovich.
+Copyright (C) 2004-2005 Ryan Djurovich.
 Please refer to the COPYING file for a copy of the license.
\ No newline at end of file
Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 316)
+++ trunk/CHANGELOG	(revision 317)
@@ -10,6 +10,12 @@
 # = Bugfix
 ! = Update/Change
 
+------------------------------------- 2.6.3 -------------------------------------
+01-Mar-2006 Stefan Braunewell
+#	Fixed ticket #136 - mailing forgotten password in admin login screen leads 
+	to fatal error.
++	Added support for tag [MEMORY_USAGE] in page footer.
+!	Renamed tag [PROCESSTIME] to [PROCESS_TIME]
 ------------------------------------- 2.6.2 -------------------------------------
 03-Feb-2006 Stefan Braunewell (very big special thanks to John and Alex)
 #	Fixed ticket #104 - commas in form field descriptions not allowed.
Index: trunk/wb/include/pclzip/readme.txt
===================================================================
--- trunk/wb/include/pclzip/readme.txt	(revision 316)
+++ trunk/wb/include/pclzip/readme.txt	(revision 317)
@@ -1,276 +1,276 @@
-// --------------------------------------------------------------------------------
-// PclZip 2.1 - readme.txt
-// --------------------------------------------------------------------------------
-// License GNU/LGPL - December 2003
-// Vincent Blavet - vincent@phpconcept.net
-// http://www.phpconcept.net
-// --------------------------------------------------------------------------------
-// $Id: readme.txt,v 1.1.1.1 2005/01/30 10:31:46 rdjurovich Exp $
-// --------------------------------------------------------------------------------
-
-
-
-0 - Sommaire
-============
-    1 - Introduction
-    2 - What's new
-    3 - Corrected bugs
-    4 - Known bugs or limitations
-    5 - License
-    6 - Warning
-    7 - Author
-    8 - Contribute
-
-1 - Introduction
-================
-
-  PclZip is a library that allow you to manage a Zip archive.
-
-  Full documentation about PclZip can be found here : http://www.phpconcept.net/pclzip
-
-2 - What's new
-==============
-
-  Version 2.1 :
-    - Add the ability to abort the extraction by using a user callback function.
-      The user can now return the value '2' in its callback which indicates to stop the
-      extraction. For a pre call-back extract is stopped before the extration of the current
-      file. For a post call back, the extraction is stopped after.
-    - Add the ability to extract a file (or several files) directly in the standard output.
-      This is done by the new parameter PCLZIP_OPT_EXTRACT_IN_OUTPUT with method extract().
-    - Add support for parameters PCLZIP_OPT_COMMENT, PCLZIP_OPT_ADD_COMMENT,
-      PCLZIP_OPT_PREPEND_COMMENT. This will create, replace, add, or prepend comments
-      in the zip archive.
-    - When merging two archives, the comments are not any more lost, but merged, with a 
-      blank space separator.
-    - Corrected bug : Files are not deleted when all files are asked to be deleted.
-    - Corrected bug : Folders with name '0' made PclZip to abort the create or add feature.
-
-
-  Version 2.0 :
-    ***** Warning : Some new features may break the backward compatibility for your scripts.
-                    Please carefully read the readme file.
-    - Add the ability to delete by Index, name and regular expression. This feature is 
-      performed by the method delete(), which uses the optional parameters
-      PCLZIP_OPT_BY_INDEX, PCLZIP_OPT_BY_NAME, PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG.
-    - Add the ability to extract by regular expression. To extract by regexp you must use the method
-      extract(), with the option PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG 
-      (depending if you want to use ereg() or preg_match() syntax) followed by the 
-      regular expression pattern.
-    - Add the ability to extract by index, directly with the extract() method. This is a
-      code improvment of the extractByIndex() method.
-    - Add the ability to extract by name. To extract by name you must use the method
-      extract(), with the option PCLZIP_OPT_BY_NAME followed by the filename to
-      extract or an array of filenames to extract. To extract all a folder, use the folder
-      name rather than the filename with a '/' at the end.
-    - Add the ability to add files without compression. This is done with a new attribute
-      which is PCLZIP_OPT_NO_COMPRESSION.
-    - Add the attribute PCLZIP_OPT_EXTRACT_AS_STRING, which allow to extract a file directly
-      in a string without using any file (or temporary file).
-    - Add constant PCLZIP_SEPARATOR for static configuration of filename separators in a single string.
-      The default separator is now a comma (,) and not any more a blank space.
-      THIS BREAK THE BACKWARD COMPATIBILITY : Please check if this may have an impact with
-      your script.
-    - Improve algorythm performance by removing the use of temporary files when adding or 
-      extracting files in an archive.
-    - Add (correct) detection of empty filename zipping. This can occurs when the removed
-      path is the same
-      as a zipped dir. The dir is not zipped (['status'] = filtered), only its content.
-    - Add better support for windows paths (thanks for help from manus@manusfreedom.com).
-    - Corrected bug : When the archive file already exists with size=0, the add() method
-      fails. Corrected in 2.0.
-    - Remove the use of OS_WINDOWS constant. Use php_uname() function rather.
-    - Control the order of index ranges in extract by index feature.
-    - Change the internal management of folders (better handling of internal flag).
-
-
-  Version 1.3 :
-    - Removing the double include check. This is now done by include_once() and require_once()
-      PHP directives.
-    - Changing the error handling mecanism : Remove the use of an external error library.
-      The former PclError...() functions are replaced by internal equivalent methods.
-      By changing the environment variable PCLZIP_ERROR_EXTERNAL you can still use the former library.
-      Introducing the use of constants for error codes rather than integer values. This will help
-      in futur improvment.
-      Introduction of error handling functions like errorCode(), errorName() and errorInfo().
-    - Remove the deprecated use of calling function with arguments passed by reference.
-    - Add the calling of extract(), extractByIndex(), create() and add() functions
-      with variable options rather than fixed arguments.
-    - Add the ability to remove all the file path while extracting or adding,
-      without any need to specify the path to remove.
-      This is available for extract(), extractByIndex(), create() and add() functionS by using
-      the new variable options parameters :
-      - PCLZIP_OPT_REMOVE_ALL_PATH : by indicating this option while calling the fct.
-    - Ability to change the mode of a file after the extraction (chmod()).
-      This is available for extract() and extractByIndex() functionS by using
-      the new variable options parameters.
-      - PCLZIP_OPT_SET_CHMOD : by setting the value of this option.
-    - Ability to definition call-back options. These call-back will be called during the adding,
-      or the extracting of file (extract(), extractByIndex(), create() and add() functions) :
-      - PCLZIP_CB_PRE_EXTRACT : will be called before each extraction of a file. The user
-        can trigerred the change the filename of the extracted file. The user can triggered the
-        skip of the extraction. This is adding a 'skipped' status in the file list result value.
-      - PCLZIP_CB_POST_EXTRACT : will be called after each extraction of a file.
-        Nothing can be triggered from that point.
-      - PCLZIP_CB_PRE_ADD : will be called before each add of a file. The user
-        can trigerred the change the stored filename of the added file. The user can triggered the
-        skip of the add. This is adding a 'skipped' status in the file list result value.
-      - PCLZIP_CB_POST_ADD : will be called after each add of a file.
-        Nothing can be triggered from that point.
-    - Two status are added in the file list returned as function result : skipped & filename_too_long
-      'skipped' is used when a call-back function ask for skipping the file.
-      'filename_too_long' is used while adding a file with a too long filename to archive (the file is
-      not added)
-    - Adding the function PclZipUtilPathInclusion(), that check the inclusion of a path into
-      a directory.
-    - Add a check of the presence of the archive file before some actions (like list, ...)
-    - Add the initialisation of field "index" in header array. This means that by
-      default index will be -1 when not explicitly set by the methods.
-
-  Version 1.2 :
-    - Adding a duplicate function.
-    - Adding a merge function. The merge function is a "quick merge" function,
-      it just append the content of an archive at the end of the first one. There
-      is no check for duplicate files or more recent files.
-    - Improve the search of the central directory end.
-
-  Version 1.1.2 :
-
-    - Changing the license of PclZip. PclZip is now released under the GNU / LGPL license
-      (see License section).
-    - Adding the optional support of a static temporary directory. You will need to configure
-      the constant PCLZIP_TEMPORARY_DIR if you want to use this feature.
-    - Improving the rename() function. In some cases rename() does not work (different
-      Filesystems), so it will be replaced by a copy() + unlink() functions.
-
-  Version 1.1.1 :
-
-    - Maintenance release, no new feature.
-
-  Version 1.1 :
-
-    - New method Add() : adding files in the archive
-    - New method ExtractByIndex() : partial extract of the archive, files are identified by
-      their index in the archive
-    - New method DeleteByIndex() : delete some files/folder entries from the archive,
-      files are identified by their index in the archive.
-    - Adding a test of the zlib extension presence. If not present abort the script.
-
-  Version 1.0.1 :
-
-    - No new feature
-
-
-3 - Corrected bugs
-==================
-
-  Corrected in Version 2.0 :
-    - Corrected : During an extraction, if a call-back fucntion is used and try to skip
-                  a file, all the extraction process is stopped. 
-
-  Corrected in Version 1.3 :
-    - Corrected : Support of static synopsis for method extract() is broken.
-    - Corrected : invalid size of archive content field (0xFF) should be (0xFFFF).
-    - Corrected : When an extract is done with a remove_path parameter, the entry for
-      the directory with exactly the same path is not skipped/filtered.
-    - Corrected : extractByIndex() and deleteByIndex() were not managing index in the
-      right way. For example indexes '1,3-5,11' will only extract files 1 and 11. This
-      is due to a sort of the index resulting table that puts 11 before 3-5 (sort on
-      string and not interger). The sort is temporarilly removed, this means that
-      you must provide a sorted list of index ranges.
-
-  Corrected in Version 1.2 :
-
-    - Nothing.
-
-  Corrected in Version 1.1.2 :
-
-    - Corrected : Winzip is unable to delete or add new files in a PclZip created archives.
-
-  Corrected in Version 1.1.1 :
-
-    - Corrected : When archived file is not compressed (0% compression), the
-      extract method fails.
-
-  Corrected in Version 1.1 :
-
-    - Corrected : Adding a complete tree of folder may result in a bad archive
-      creation.
-
-  Corrected in Version 1.0.1 :
-
-    - Corrected : Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024).
-
-
-4 - Known bugs or limitations
-=============================
-
-  Please publish bugs reports in SourceForge :
-    http://sourceforge.net/tracker/?group_id=40254&atid=427564
-
-  In Version 1.2 :
-
-    - merge() methods does not check for duplicate files or last date of modifications.
-
-  In Version 1.1 :
-
-    - Limitation : Using 'extract' fields in the file header in the zip archive is not supported.
-    - WinZip is unable to delete a single file in a PclZip created archive. It is also unable to
-      add a file in a PclZip created archive. (Corrected in v.1.2)
-
-  In Version 1.0.1 :
-
-    - Adding a complete tree of folder may result in a bad archive
-      creation. (Corrected in V.1.1).
-    - Path given to methods must be in the unix format (/) and not the Windows format (\).
-      Workaround : Use only / directory separators.
-    - PclZip is using temporary files that are sometime the name of the file with a .tmp or .gz
-      added suffix. Files with these names may already exist and may be overwritten.
-      Workaround : none.
-    - PclZip does not check if the zlib extension is present. If it is absent, the zip
-      file is not created and the lib abort without warning.
-      Workaround : enable the zlib extension on the php install
-
-  In Version 1.0 :
-
-    - Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024).
-      (Corrected in v.1.0.1)
-    - Limitation : Multi-disk zip archive are not supported.
-
-
-5 - License
-===========
-
-  Since version 1.1.2, PclZip Library is released under GNU/LGPL license.
-  This library is free, so you can use it at no cost.
-
-  HOWEVER, if you release a script, an application, a library or any kind of
-  code using PclZip library (or a part of it), YOU MUST :
-  - Indicate in the documentation (or a readme file), that your work
-    uses PclZip Library, and make a reference to the author and the web site
-    http://www.phpconcept.net
-  - Gives the ability to the final user to update the PclZip libary.
-
-  I will also appreciate that you send me a mail (vincent@phpconcept.net), just to
-  be aware that someone is using PclZip.
-
-  For more information about GNU/LGPL license : http://www.gnu.org
-
-6 - Warning
-=================
-
-  This library and the associated files are non commercial, non professional work.
-  It should not have unexpected results. However if any damage is caused by this software
-  the author can not be responsible.
-  The use of this software is at the risk of the user.
-
-7 - Author
-==========
-
-  This software was written by Vincent Blavet (vincent@phpconcept.net) on its leasure time.
-
-8 - Contribute
-==============
-  If you want to contribute to the development of PclZip, please contact vincent@phpconcept.net.
-  If you can help in financing PhpConcept hosting service, please go to
+// --------------------------------------------------------------------------------
+// PclZip 2.1 - readme.txt
+// --------------------------------------------------------------------------------
+// License GNU/LGPL - December 2003
+// Vincent Blavet - vincent@phpconcept.net
+// http://www.phpconcept.net
+// --------------------------------------------------------------------------------
+// $Id: readme.txt,v 1.1.1.1 2005/01/30 10:31:46 rdjurovich Exp $
+// --------------------------------------------------------------------------------
+
+
+
+0 - Sommaire
+============
+    1 - Introduction
+    2 - What's new
+    3 - Corrected bugs
+    4 - Known bugs or limitations
+    5 - License
+    6 - Warning
+    7 - Author
+    8 - Contribute
+
+1 - Introduction
+================
+
+  PclZip is a library that allow you to manage a Zip archive.
+
+  Full documentation about PclZip can be found here : http://www.phpconcept.net/pclzip
+
+2 - What's new
+==============
+
+  Version 2.1 :
+    - Add the ability to abort the extraction by using a user callback function.
+      The user can now return the value '2' in its callback which indicates to stop the
+      extraction. For a pre call-back extract is stopped before the extration of the current
+      file. For a post call back, the extraction is stopped after.
+    - Add the ability to extract a file (or several files) directly in the standard output.
+      This is done by the new parameter PCLZIP_OPT_EXTRACT_IN_OUTPUT with method extract().
+    - Add support for parameters PCLZIP_OPT_COMMENT, PCLZIP_OPT_ADD_COMMENT,
+      PCLZIP_OPT_PREPEND_COMMENT. This will create, replace, add, or prepend comments
+      in the zip archive.
+    - When merging two archives, the comments are not any more lost, but merged, with a 
+      blank space separator.
+    - Corrected bug : Files are not deleted when all files are asked to be deleted.
+    - Corrected bug : Folders with name '0' made PclZip to abort the create or add feature.
+
+
+  Version 2.0 :
+    ***** Warning : Some new features may break the backward compatibility for your scripts.
+                    Please carefully read the readme file.
+    - Add the ability to delete by Index, name and regular expression. This feature is 
+      performed by the method delete(), which uses the optional parameters
+      PCLZIP_OPT_BY_INDEX, PCLZIP_OPT_BY_NAME, PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG.
+    - Add the ability to extract by regular expression. To extract by regexp you must use the method
+      extract(), with the option PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG 
+      (depending if you want to use ereg() or preg_match() syntax) followed by the 
+      regular expression pattern.
+    - Add the ability to extract by index, directly with the extract() method. This is a
+      code improvment of the extractByIndex() method.
+    - Add the ability to extract by name. To extract by name you must use the method
+      extract(), with the option PCLZIP_OPT_BY_NAME followed by the filename to
+      extract or an array of filenames to extract. To extract all a folder, use the folder
+      name rather than the filename with a '/' at the end.
+    - Add the ability to add files without compression. This is done with a new attribute
+      which is PCLZIP_OPT_NO_COMPRESSION.
+    - Add the attribute PCLZIP_OPT_EXTRACT_AS_STRING, which allow to extract a file directly
+      in a string without using any file (or temporary file).
+    - Add constant PCLZIP_SEPARATOR for static configuration of filename separators in a single string.
+      The default separator is now a comma (,) and not any more a blank space.
+      THIS BREAK THE BACKWARD COMPATIBILITY : Please check if this may have an impact with
+      your script.
+    - Improve algorythm performance by removing the use of temporary files when adding or 
+      extracting files in an archive.
+    - Add (correct) detection of empty filename zipping. This can occurs when the removed
+      path is the same
+      as a zipped dir. The dir is not zipped (['status'] = filtered), only its content.
+    - Add better support for windows paths (thanks for help from manus@manusfreedom.com).
+    - Corrected bug : When the archive file already exists with size=0, the add() method
+      fails. Corrected in 2.0.
+    - Remove the use of OS_WINDOWS constant. Use php_uname() function rather.
+    - Control the order of index ranges in extract by index feature.
+    - Change the internal management of folders (better handling of internal flag).
+
+
+  Version 1.3 :
+    - Removing the double include check. This is now done by include_once() and require_once()
+      PHP directives.
+    - Changing the error handling mecanism : Remove the use of an external error library.
+      The former PclError...() functions are replaced by internal equivalent methods.
+      By changing the environment variable PCLZIP_ERROR_EXTERNAL you can still use the former library.
+      Introducing the use of constants for error codes rather than integer values. This will help
+      in futur improvment.
+      Introduction of error handling functions like errorCode(), errorName() and errorInfo().
+    - Remove the deprecated use of calling function with arguments passed by reference.
+    - Add the calling of extract(), extractByIndex(), create() and add() functions
+      with variable options rather than fixed arguments.
+    - Add the ability to remove all the file path while extracting or adding,
+      without any need to specify the path to remove.
+      This is available for extract(), extractByIndex(), create() and add() functionS by using
+      the new variable options parameters :
+      - PCLZIP_OPT_REMOVE_ALL_PATH : by indicating this option while calling the fct.
+    - Ability to change the mode of a file after the extraction (chmod()).
+      This is available for extract() and extractByIndex() functionS by using
+      the new variable options parameters.
+      - PCLZIP_OPT_SET_CHMOD : by setting the value of this option.
+    - Ability to definition call-back options. These call-back will be called during the adding,
+      or the extracting of file (extract(), extractByIndex(), create() and add() functions) :
+      - PCLZIP_CB_PRE_EXTRACT : will be called before each extraction of a file. The user
+        can trigerred the change the filename of the extracted file. The user can triggered the
+        skip of the extraction. This is adding a 'skipped' status in the file list result value.
+      - PCLZIP_CB_POST_EXTRACT : will be called after each extraction of a file.
+        Nothing can be triggered from that point.
+      - PCLZIP_CB_PRE_ADD : will be called before each add of a file. The user
+        can trigerred the change the stored filename of the added file. The user can triggered the
+        skip of the add. This is adding a 'skipped' status in the file list result value.
+      - PCLZIP_CB_POST_ADD : will be called after each add of a file.
+        Nothing can be triggered from that point.
+    - Two status are added in the file list returned as function result : skipped & filename_too_long
+      'skipped' is used when a call-back function ask for skipping the file.
+      'filename_too_long' is used while adding a file with a too long filename to archive (the file is
+      not added)
+    - Adding the function PclZipUtilPathInclusion(), that check the inclusion of a path into
+      a directory.
+    - Add a check of the presence of the archive file before some actions (like list, ...)
+    - Add the initialisation of field "index" in header array. This means that by
+      default index will be -1 when not explicitly set by the methods.
+
+  Version 1.2 :
+    - Adding a duplicate function.
+    - Adding a merge function. The merge function is a "quick merge" function,
+      it just append the content of an archive at the end of the first one. There
+      is no check for duplicate files or more recent files.
+    - Improve the search of the central directory end.
+
+  Version 1.1.2 :
+
+    - Changing the license of PclZip. PclZip is now released under the GNU / LGPL license
+      (see License section).
+    - Adding the optional support of a static temporary directory. You will need to configure
+      the constant PCLZIP_TEMPORARY_DIR if you want to use this feature.
+    - Improving the rename() function. In some cases rename() does not work (different
+      Filesystems), so it will be replaced by a copy() + unlink() functions.
+
+  Version 1.1.1 :
+
+    - Maintenance release, no new feature.
+
+  Version 1.1 :
+
+    - New method Add() : adding files in the archive
+    - New method ExtractByIndex() : partial extract of the archive, files are identified by
+      their index in the archive
+    - New method DeleteByIndex() : delete some files/folder entries from the archive,
+      files are identified by their index in the archive.
+    - Adding a test of the zlib extension presence. If not present abort the script.
+
+  Version 1.0.1 :
+
+    - No new feature
+
+
+3 - Corrected bugs
+==================
+
+  Corrected in Version 2.0 :
+    - Corrected : During an extraction, if a call-back fucntion is used and try to skip
+                  a file, all the extraction process is stopped. 
+
+  Corrected in Version 1.3 :
+    - Corrected : Support of static synopsis for method extract() is broken.
+    - Corrected : invalid size of archive content field (0xFF) should be (0xFFFF).
+    - Corrected : When an extract is done with a remove_path parameter, the entry for
+      the directory with exactly the same path is not skipped/filtered.
+    - Corrected : extractByIndex() and deleteByIndex() were not managing index in the
+      right way. For example indexes '1,3-5,11' will only extract files 1 and 11. This
+      is due to a sort of the index resulting table that puts 11 before 3-5 (sort on
+      string and not interger). The sort is temporarilly removed, this means that
+      you must provide a sorted list of index ranges.
+
+  Corrected in Version 1.2 :
+
+    - Nothing.
+
+  Corrected in Version 1.1.2 :
+
+    - Corrected : Winzip is unable to delete or add new files in a PclZip created archives.
+
+  Corrected in Version 1.1.1 :
+
+    - Corrected : When archived file is not compressed (0% compression), the
+      extract method fails.
+
+  Corrected in Version 1.1 :
+
+    - Corrected : Adding a complete tree of folder may result in a bad archive
+      creation.
+
+  Corrected in Version 1.0.1 :
+
+    - Corrected : Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024).
+
+
+4 - Known bugs or limitations
+=============================
+
+  Please publish bugs reports in SourceForge :
+    http://sourceforge.net/tracker/?group_id=40254&atid=427564
+
+  In Version 1.2 :
+
+    - merge() methods does not check for duplicate files or last date of modifications.
+
+  In Version 1.1 :
+
+    - Limitation : Using 'extract' fields in the file header in the zip archive is not supported.
+    - WinZip is unable to delete a single file in a PclZip created archive. It is also unable to
+      add a file in a PclZip created archive. (Corrected in v.1.2)
+
+  In Version 1.0.1 :
+
+    - Adding a complete tree of folder may result in a bad archive
+      creation. (Corrected in V.1.1).
+    - Path given to methods must be in the unix format (/) and not the Windows format (\).
+      Workaround : Use only / directory separators.
+    - PclZip is using temporary files that are sometime the name of the file with a .tmp or .gz
+      added suffix. Files with these names may already exist and may be overwritten.
+      Workaround : none.
+    - PclZip does not check if the zlib extension is present. If it is absent, the zip
+      file is not created and the lib abort without warning.
+      Workaround : enable the zlib extension on the php install
+
+  In Version 1.0 :
+
+    - Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024).
+      (Corrected in v.1.0.1)
+    - Limitation : Multi-disk zip archive are not supported.
+
+
+5 - License
+===========
+
+  Since version 1.1.2, PclZip Library is released under GNU/LGPL license.
+  This library is free, so you can use it at no cost.
+
+  HOWEVER, if you release a script, an application, a library or any kind of
+  code using PclZip library (or a part of it), YOU MUST :
+  - Indicate in the documentation (or a readme file), that your work
+    uses PclZip Library, and make a reference to the author and the web site
+    http://www.phpconcept.net
+  - Gives the ability to the final user to update the PclZip libary.
+
+  I will also appreciate that you send me a mail (vincent@phpconcept.net), just to
+  be aware that someone is using PclZip.
+
+  For more information about GNU/LGPL license : http://www.gnu.org
+
+6 - Warning
+=================
+
+  This library and the associated files are non commercial, non professional work.
+  It should not have unexpected results. However if any damage is caused by this software
+  the author can not be responsible.
+  The use of this software is at the risk of the user.
+
+7 - Author
+==========
+
+  This software was written by Vincent Blavet (vincent@phpconcept.net) on its leasure time.
+
+8 - Contribute
+==============
+  If you want to contribute to the development of PclZip, please contact vincent@phpconcept.net.
+  If you can help in financing PhpConcept hosting service, please go to
   http://www.phpconcept.net/soutien.php
\ No newline at end of file
Index: trunk/wb/include/pclzip/pclzip.lib.php
===================================================================
--- trunk/wb/include/pclzip/pclzip.lib.php	(revision 316)
+++ trunk/wb/include/pclzip/pclzip.lib.php	(revision 317)
@@ -1,4970 +1,4970 @@
-<?php
-// --------------------------------------------------------------------------------
-// PhpConcept Library - Zip Module 2.1
-// --------------------------------------------------------------------------------
-// License GNU/LGPL - Vincent Blavet - December 2003
-// http://www.phpconcept.net
-// --------------------------------------------------------------------------------
-//
-// Presentation :
-//   PclZip is a PHP library that manage ZIP archives.
-//   So far tests show that archives generated by PclZip are readable by
-//   WinZip application and other tools.
-//
-// Description :
-//   See readme.txt and http://www.phpconcept.net
-//
-// Warning :
-//   This library and the associated files are non commercial, non professional
-//   work.
-//   It should not have unexpected results. However if any damage is caused by
-//   this software the author can not be responsible.
-//   The use of this software is at the risk of the user.
-//
-// --------------------------------------------------------------------------------
-// $Id: pclzip.lib.php,v 1.1.1.1 2005/01/30 10:31:59 rdjurovich Exp $
-// --------------------------------------------------------------------------------
-
-  // ----- Constants
-  define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
-  
-  // ----- File list separator
-  // In version 1.x of PclZip, the separator for file list is a space
-  // (which is not a very smart choice, specifically for windows paths !).
-  // A better separator should be a comma (,). This constant gives you the
-  // abilty to change that.
-  // However notice that changing this value, may have impact on existing
-  // scripts, using space separated filenames.
-  // Recommanded values for compatibility with older versions :
-  //define( 'PCLZIP_SEPARATOR', ' ' );
-  // Recommanded values for smart separation of filenames.
-  define( 'PCLZIP_SEPARATOR', ',' );
-
-  // ----- Error configuration
-  // 0 : PclZip Class integrated error handling
-  // 1 : PclError external library error handling. By enabling this
-  //     you must ensure that you have included PclError library.
-  // [2,...] : reserved for futur use
-  define( 'PCLZIP_ERROR_EXTERNAL', 0 );
-
-  // ----- Optional static temporary directory
-  //       By default temporary files are generated in the script current
-  //       path.
-  //       If defined :
-  //       - MUST BE terminated by a '/'.
-  //       - MUST be a valid, already created directory
-  //       Samples :
-  // define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
-  // define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
-  define( 'PCLZIP_TEMPORARY_DIR', '' );
-
-// --------------------------------------------------------------------------------
-// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
-// --------------------------------------------------------------------------------
-
-  // ----- Global variables
-  $g_pclzip_version = "2.1";
-
-  // ----- Error codes
-  //   -1 : Unable to open file in binary write mode
-  //   -2 : Unable to open file in binary read mode
-  //   -3 : Invalid parameters
-  //   -4 : File does not exist
-  //   -5 : Filename is too long (max. 255)
-  //   -6 : Not a valid zip file
-  //   -7 : Invalid extracted file size
-  //   -8 : Unable to create directory
-  //   -9 : Invalid archive extension
-  //  -10 : Invalid archive format
-  //  -11 : Unable to delete file (unlink)
-  //  -12 : Unable to rename file (rename)
-  //  -13 : Invalid header checksum
-  //  -14 : Invalid archive size
-  define( 'PCLZIP_ERR_USER_ABORTED', 2 );
-  define( 'PCLZIP_ERR_NO_ERROR', 0 );
-  define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
-  define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
-  define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
-  define( 'PCLZIP_ERR_MISSING_FILE', -4 );
-  define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
-  define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
-  define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
-  define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
-  define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
-  define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
-  define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
-  define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
-  define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
-  define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
-  define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
-  define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
-
-  // ----- Options values
-  define( 'PCLZIP_OPT_PATH', 77001 );
-  define( 'PCLZIP_OPT_ADD_PATH', 77002 );
-  define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
-  define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
-  define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
-  define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
-  define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
-  define( 'PCLZIP_OPT_BY_NAME', 77008 );
-  define( 'PCLZIP_OPT_BY_INDEX', 77009 );
-  define( 'PCLZIP_OPT_BY_EREG', 77010 );
-  define( 'PCLZIP_OPT_BY_PREG', 77011 );
-  define( 'PCLZIP_OPT_COMMENT', 77012 );
-  define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
-  define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
-  define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
-
-  // ----- Call backs values
-  define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
-  define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
-  define( 'PCLZIP_CB_PRE_ADD', 78003 );
-  define( 'PCLZIP_CB_POST_ADD', 78004 );
-  /* For futur use
-  define( 'PCLZIP_CB_PRE_LIST', 78005 );
-  define( 'PCLZIP_CB_POST_LIST', 78006 );
-  define( 'PCLZIP_CB_PRE_DELETE', 78007 );
-  define( 'PCLZIP_CB_POST_DELETE', 78008 );
-  */
-
-  // --------------------------------------------------------------------------------
-  // Class : PclZip
-  // Description :
-  //   PclZip is the class that represent a Zip archive.
-  //   The public methods allow the manipulation of the archive.
-  // Attributes :
-  //   Attributes must not be accessed directly.
-  // Methods :
-  //   PclZip() : Object creator
-  //   create() : Creates the Zip archive
-  //   listContent() : List the content of the Zip archive
-  //   extract() : Extract the content of the archive
-  //   properties() : List the properties of the archive
-  // --------------------------------------------------------------------------------
-  class PclZip
-  {
-    // ----- Filename of the zip file
-    var $zipname = '';
-
-    // ----- File descriptor of the zip file
-    var $zip_fd = 0;
-
-    // ----- Internal error handling
-    var $error_code = 1;
-    var $error_string = '';
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZip()
-  // Description :
-  //   Creates a PclZip object and set the name of the associated Zip archive
-  //   filename.
-  //   Note that no real action is taken, if the archive does not exist it is not
-  //   created. Use create() for that.
-  // --------------------------------------------------------------------------------
-  function PclZip($p_zipname)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::PclZip', "zipname=$p_zipname");
-
-    // ----- Tests the zlib
-    if (!function_exists('gzopen'))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 1, "zlib extension seems to be missing");
-      die('Abort '.basename(__FILE__).' : Missing zlib extensions');
-    }
-
-    // ----- Set the attributes
-    $this->zipname = $p_zipname;
-    $this->zip_fd = 0;
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1);
-    return;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function :
-  //   create($p_filelist, $p_add_dir="", $p_remove_dir="")
-  //   create($p_filelist, $p_option, $p_option_value, ...)
-  // Description :
-  //   This method supports two different synopsis. The first one is historical.
-  //   This method creates a Zip Archive. The Zip file is created in the
-  //   filesystem. The files and directories indicated in $p_filelist
-  //   are added in the archive. See the parameters description for the
-  //   supported format of $p_filelist.
-  //   When a directory is in the list, the directory and its content is added
-  //   in the archive.
-  //   In this synopsis, the function takes an optional variable list of
-  //   options. See bellow the supported options.
-  // Parameters :
-  //   $p_filelist : An array containing file or directory names, or
-  //                 a string containing one filename or one directory name, or
-  //                 a string containing a list of filenames and/or directory
-  //                 names separated by spaces.
-  //   $p_add_dir : A path to add before the real path of the archived file,
-  //                in order to have it memorized in the archive.
-  //   $p_remove_dir : A path to remove from the real path of the file to archive,
-  //                   in order to have a shorter path memorized in the archive.
-  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
-  //                   is removed first, before $p_add_dir is added.
-  // Options :
-  //   PCLZIP_OPT_ADD_PATH :
-  //   PCLZIP_OPT_REMOVE_PATH :
-  //   PCLZIP_OPT_REMOVE_ALL_PATH :
-  //   PCLZIP_OPT_COMMENT :
-  //   PCLZIP_CB_PRE_ADD :
-  //   PCLZIP_CB_POST_ADD :
-  // Return Values :
-  //   0 on failure,
-  //   The list of the added files, with a status of the add action.
-  //   (see PclZip::listContent() for list entry format)
-  // --------------------------------------------------------------------------------
-//  function create($p_filelist, $p_add_dir="", $p_remove_dir="")
-  function create($p_filelist /*, options */)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$p_filelist', ...");
-    $v_result=1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Set default values
-    $v_options = array();
-    $v_add_path = "";
-    $v_remove_path = "";
-    $v_remove_all_path = false;
-    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
-
-    // ----- Look for variable options arguments
-    $v_size = func_num_args();
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
-    // ----- Look for arguments
-    if ($v_size > 1) {
-      // ----- Get the arguments
-      $v_arg_list = &func_get_args();
-
-      // ----- Remove form the options list the first argument
-      array_shift($v_arg_list);
-      $v_size--;
-
-      // ----- Look for first arg
-      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
-
-        // ----- Parse the options
-        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
-                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
-                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
-                                                   PCLZIP_OPT_ADD_PATH => 'optional',
-                                                   PCLZIP_CB_PRE_ADD => 'optional',
-                                                   PCLZIP_CB_POST_ADD => 'optional',
-                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
-                                                   PCLZIP_OPT_COMMENT => 'optional' ));
-        if ($v_result != 1) {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-          return 0;
-        }
-
-        // ----- Set the arguments
-        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
-          $v_add_path = $v_options[PCLZIP_OPT_ADD_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
-          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
-          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
-        }
-      }
-
-      // ----- Look for 2 args
-      // Here we need to support the first historic synopsis of the
-      // method.
-      else {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
-        // ----- Get the first argument
-        $v_add_path = $v_arg_list[0];
-
-        // ----- Look for the optional second argument
-        if ($v_size == 2) {
-          $v_remove_path = $v_arg_list[1];
-        }
-        else if ($v_size > 2) {
-          // ----- Error log
-          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
-		                       "Invalid number / type of arguments");
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-          return 0;
-        }
-      }
-    }
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "add_path='$v_add_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_all_path?'true':'false')."'");
-
-    // ----- Look if the $p_filelist is really an array
-    $p_result_list = array();
-    if (is_array($p_filelist))
-    {
-      // ----- Call the create fct
-      $v_result = $this->privCreate($p_filelist, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
-    }
-
-    // ----- Look if the $p_filelist is a string
-    else if (is_string($p_filelist))
-    {
-      // ----- Create a list with the elements from the string
-      $v_list = explode(PCLZIP_SEPARATOR, $p_filelist);
-
-      // ----- Call the create fct
-      $v_result = $this->privCreate($v_list, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
-    }
-
-    // ----- Invalid variable
-    else
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
-      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
-    }
-
-    if ($v_result != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return 0;
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
-    return $p_result_list;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function :
-  //   add($p_filelist, $p_add_dir="", $p_remove_dir="")
-  //   add($p_filelist, $p_option, $p_option_value, ...)
-  // Description :
-  //   This method supports two synopsis. The first one is historical.
-  //   This methods add the list of files in an existing archive.
-  //   If a file with the same name already exists, it is added at the end of the
-  //   archive, the first one is still present.
-  //   If the archive does not exist, it is created.
-  // Parameters :
-  //   $p_filelist : An array containing file or directory names, or
-  //                 a string containing one filename or one directory name, or
-  //                 a string containing a list of filenames and/or directory
-  //                 names separated by spaces.
-  //   $p_add_dir : A path to add before the real path of the archived file,
-  //                in order to have it memorized in the archive.
-  //   $p_remove_dir : A path to remove from the real path of the file to archive,
-  //                   in order to have a shorter path memorized in the archive.
-  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
-  //                   is removed first, before $p_add_dir is added.
-  // Options :
-  //   PCLZIP_OPT_ADD_PATH :
-  //   PCLZIP_OPT_REMOVE_PATH :
-  //   PCLZIP_OPT_REMOVE_ALL_PATH :
-  //   PCLZIP_OPT_COMMENT :
-  //   PCLZIP_OPT_ADD_COMMENT :
-  //   PCLZIP_OPT_PREPEND_COMMENT :
-  //   PCLZIP_CB_PRE_ADD :
-  //   PCLZIP_CB_POST_ADD :
-  // Return Values :
-  //   0 on failure,
-  //   The list of the added files, with a status of the add action.
-  //   (see PclZip::listContent() for list entry format)
-  // --------------------------------------------------------------------------------
-//  function add($p_filelist, $p_add_dir="", $p_remove_dir="")
-  function add($p_filelist /* options */)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$p_filelist', ...");
-    $v_result=1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Set default values
-    $v_options = array();
-    $v_add_path = "";
-    $v_remove_path = "";
-    $v_remove_all_path = false;
-    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
-
-    // ----- Look for variable options arguments
-    $v_size = func_num_args();
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
-    // ----- Look for arguments
-    if ($v_size > 1) {
-      // ----- Get the arguments
-      $v_arg_list = &func_get_args();
-
-      // ----- Remove form the options list the first argument
-      array_shift($v_arg_list);
-      $v_size--;
-
-      // ----- Look for first arg
-      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
-
-        // ----- Parse the options
-        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
-                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
-                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
-                                                   PCLZIP_OPT_ADD_PATH => 'optional',
-                                                   PCLZIP_CB_PRE_ADD => 'optional',
-                                                   PCLZIP_CB_POST_ADD => 'optional',
-                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
-                                                   PCLZIP_OPT_COMMENT => 'optional',
-                                                   PCLZIP_OPT_ADD_COMMENT => 'optional',
-                                                   PCLZIP_OPT_PREPEND_COMMENT => 'optional' ));
-        if ($v_result != 1) {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-          return 0;
-        }
-
-        // ----- Set the arguments
-        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
-          $v_add_path = $v_options[PCLZIP_OPT_ADD_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
-          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
-          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
-        }
-      }
-
-      // ----- Look for 2 args
-      // Here we need to support the first historic synopsis of the
-      // method.
-      else {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
-        // ----- Get the first argument
-        $v_add_path = $v_arg_list[0];
-
-        // ----- Look for the optional second argument
-        if ($v_size == 2) {
-          $v_remove_path = $v_arg_list[1];
-        }
-        else if ($v_size > 2) {
-          // ----- Error log
-          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-          return 0;
-        }
-      }
-    }
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "add_path='$v_add_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_all_path?'true':'false')."'");
-
-    // ----- Look if the $p_filelist is really an array
-    $p_result_list = array();
-    if (is_array($p_filelist))
-    {
-      // ----- Call the create fct
-      $v_result = $this->privAdd($p_filelist, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
-    }
-
-    // ----- Look if the $p_filelist is a string
-    else if (is_string($p_filelist))
-    {
-      // ----- Create a list with the elements from the string
-      $v_list = explode(PCLZIP_SEPARATOR, $p_filelist);
-
-      // ----- Call the create fct
-      $v_result = $this->privAdd($v_list, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
-    }
-
-    // ----- Invalid variable
-    else
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
-      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
-    }
-
-    if ($v_result != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return 0;
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
-    return $p_result_list;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : listContent()
-  // Description :
-  //   This public method, gives the list of the files and directories, with their
-  //   properties.
-  //   The properties of each entries in the list are (used also in other functions) :
-  //     filename : Name of the file. For a create or add action it is the filename
-  //                given by the user. For an extract function it is the filename
-  //                of the extracted file.
-  //     stored_filename : Name of the file / directory stored in the archive.
-  //     size : Size of the stored file.
-  //     compressed_size : Size of the file's data compressed in the archive
-  //                       (without the headers overhead)
-  //     mtime : Last known modification date of the file (UNIX timestamp)
-  //     comment : Comment associated with the file
-  //     folder : true | false
-  //     index : index of the file in the archive
-  //     status : status of the action (depending of the action) :
-  //              Values are :
-  //                ok : OK !
-  //                filtered : the file / dir is not extracted (filtered by user)
-  //                already_a_directory : the file can not be extracted because a
-  //                                      directory with the same name already exists
-  //                write_protected : the file can not be extracted because a file
-  //                                  with the same name already exists and is
-  //                                  write protected
-  //                newer_exist : the file was not extracted because a newer file exists
-  //                path_creation_fail : the file is not extracted because the folder
-  //                                     does not exists and can not be created
-  //                write_error : the file was not extracted because there was a
-  //                              error while writing the file
-  //                read_error : the file was not extracted because there was a error
-  //                             while reading the file
-  //                invalid_header : the file was not extracted because of an archive
-  //                                 format error (bad file header)
-  //   Note that each time a method can continue operating when there
-  //   is an action error on a file, the error is only logged in the file status.
-  // Return Values :
-  //   0 on an unrecoverable failure,
-  //   The list of the files in the archive.
-  // --------------------------------------------------------------------------------
-  function listContent()
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', "");
-    $v_result=1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Check archive
-    if (!$this->privCheckFormat()) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return(0);
-    }
-
-    // ----- Call the extracting fct
-    $p_list = array();
-    if (($v_result = $this->privList($p_list)) != 1)
-    {
-      unset($p_list);
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-      return(0);
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
-    return $p_list;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function :
-  //   extract($p_path="./", $p_remove_path="")
-  //   extract([$p_option, $p_option_value, ...])
-  // Description :
-  //   This method supports two synopsis. The first one is historical.
-  //   This method extract all the files / directories from the archive to the
-  //   folder indicated in $p_path.
-  //   If you want to ignore the 'root' part of path of the memorized files
-  //   you can indicate this in the optional $p_remove_path parameter.
-  //   By default, if a newer file with the same name already exists, the
-  //   file is not extracted.
-  //
-  //   If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
-  //   are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
-  //   at the end of the path value of PCLZIP_OPT_PATH.
-  // Parameters :
-  //   $p_path : Path where the files and directories are to be extracted
-  //   $p_remove_path : First part ('root' part) of the memorized path
-  //                    (if any similar) to remove while extracting.
-  // Options :
-  //   PCLZIP_OPT_PATH :
-  //   PCLZIP_OPT_ADD_PATH :
-  //   PCLZIP_OPT_REMOVE_PATH :
-  //   PCLZIP_OPT_REMOVE_ALL_PATH :
-  //   PCLZIP_CB_PRE_EXTRACT :
-  //   PCLZIP_CB_POST_EXTRACT :
-  // Return Values :
-  //   0 or a negative value on failure,
-  //   The list of the extracted files, with a status of the action.
-  //   (see PclZip::listContent() for list entry format)
-  // --------------------------------------------------------------------------------
-  //function extract($p_path="./", $p_remove_path="")
-  function extract(/* options */)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", "");
-    $v_result=1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Check archive
-    if (!$this->privCheckFormat()) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return(0);
-    }
-
-    // ----- Set default values
-    $v_options = array();
-    $v_path = "./";
-    $v_remove_path = "";
-    $v_remove_all_path = false;
-
-    // ----- Look for variable options arguments
-    $v_size = func_num_args();
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
-    // ----- Default values for option
-    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
-
-    // ----- Look for arguments
-    if ($v_size > 0) {
-      // ----- Get the arguments
-      $v_arg_list = &func_get_args();
-
-      // ----- Look for first arg
-      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
-
-        // ----- Parse the options
-        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
-                                            array (PCLZIP_OPT_PATH => 'optional',
-                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
-                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
-                                                   PCLZIP_OPT_ADD_PATH => 'optional',
-                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
-                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
-                                                   PCLZIP_OPT_SET_CHMOD => 'optional',
-                                                   PCLZIP_OPT_BY_NAME => 'optional',
-                                                   PCLZIP_OPT_BY_EREG => 'optional',
-                                                   PCLZIP_OPT_BY_PREG => 'optional',
-                                                   PCLZIP_OPT_BY_INDEX => 'optional',
-                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
-                                                   PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional' ));
-        if ($v_result != 1) {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-          return 0;
-        }
-
-        // ----- Set the arguments
-        if (isset($v_options[PCLZIP_OPT_PATH])) {
-          $v_path = $v_options[PCLZIP_OPT_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
-          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
-          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
-          // ----- Check for '/' in last path char
-          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
-            $v_path .= '/';
-          }
-          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
-        }
-      }
-
-      // ----- Look for 2 args
-      // Here we need to support the first historic synopsis of the
-      // method.
-      else {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
-        // ----- Get the first argument
-        $v_path = $v_arg_list[0];
-
-        // ----- Look for the optional second argument
-        if ($v_size == 2) {
-          $v_remove_path = $v_arg_list[1];
-        }
-        else if ($v_size > 2) {
-          // ----- Error log
-          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-          return 0;
-        }
-      }
-    }
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
-
-    // ----- Call the extracting fct
-    $p_list = array();
-    $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,
-	                                     $v_remove_all_path, $v_options);
-    if ($v_result < 1) {
-      unset($p_list);
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-      return(0);
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
-    return $p_list;
-  }
-  // --------------------------------------------------------------------------------
-
-
-  // --------------------------------------------------------------------------------
-  // Function :
-  //   extractByIndex($p_index, $p_path="./", $p_remove_path="")
-  //   extractByIndex($p_index, [$p_option, $p_option_value, ...])
-  // Description :
-  //   This method supports two synopsis. The first one is historical.
-  //   This method is doing a partial extract of the archive.
-  //   The extracted files or folders are identified by their index in the
-  //   archive (from 0 to n).
-  //   Note that if the index identify a folder, only the folder entry is
-  //   extracted, not all the files included in the archive.
-  // Parameters :
-  //   $p_index : A single index (integer) or a string of indexes of files to
-  //              extract. The form of the string is "0,4-6,8-12" with only numbers
-  //              and '-' for range or ',' to separate ranges. No spaces or ';'
-  //              are allowed.
-  //   $p_path : Path where the files and directories are to be extracted
-  //   $p_remove_path : First part ('root' part) of the memorized path
-  //                    (if any similar) to remove while extracting.
-  // Options :
-  //   PCLZIP_OPT_PATH :
-  //   PCLZIP_OPT_ADD_PATH :
-  //   PCLZIP_OPT_REMOVE_PATH :
-  //   PCLZIP_OPT_REMOVE_ALL_PATH :
-  //   PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
-  //     not as files.
-  //     The resulting content is in a new field 'content' in the file
-  //     structure.
-  //     This option must be used alone (any other options are ignored).
-  //   PCLZIP_CB_PRE_EXTRACT :
-  //   PCLZIP_CB_POST_EXTRACT :
-  // Return Values :
-  //   0 on failure,
-  //   The list of the extracted files, with a status of the action.
-  //   (see PclZip::listContent() for list entry format)
-  // --------------------------------------------------------------------------------
-  function extractByIndex($p_index /* $options */)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ...");
-    $v_result=1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Check archive
-    if (!$this->privCheckFormat()) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return(0);
-    }
-
-    // ----- Set default values
-    $v_options = array();
-    $v_path = "./";
-    $v_remove_path = "";
-    $v_remove_all_path = false;
-
-    // ----- Look for variable options arguments
-    $v_size = func_num_args();
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
-    // ----- Default values for option
-    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
-
-    // ----- Look for arguments
-    if ($v_size > 1) {
-      // ----- Get the arguments
-      $v_arg_list = &func_get_args();
-
-      // ----- Remove form the options list the first argument
-      array_shift($v_arg_list);
-      $v_size--;
-
-      // ----- Look for first arg
-      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
-
-        // ----- Parse the options
-        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
-                                            array (PCLZIP_OPT_PATH => 'optional',
-                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
-                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
-                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
-                                                   PCLZIP_OPT_ADD_PATH => 'optional',
-                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
-                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
-                                                   PCLZIP_OPT_SET_CHMOD => 'optional' ));
-        if ($v_result != 1) {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-          return 0;
-        }
-
-        // ----- Set the arguments
-        if (isset($v_options[PCLZIP_OPT_PATH])) {
-          $v_path = $v_options[PCLZIP_OPT_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
-          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
-          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
-        }
-        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
-          // ----- Check for '/' in last path char
-          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
-            $v_path .= '/';
-          }
-          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
-        }
-        if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
-          $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set.");
-        }
-        else {
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set.");
-        }
-      }
-
-      // ----- Look for 2 args
-      // Here we need to support the first historic synopsis of the
-      // method.
-      else {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
-        // ----- Get the first argument
-        $v_path = $v_arg_list[0];
-
-        // ----- Look for the optional second argument
-        if ($v_size == 2) {
-          $v_remove_path = $v_arg_list[1];
-        }
-        else if ($v_size > 2) {
-          // ----- Error log
-          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-          return 0;
-        }
-      }
-    }
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
-
-    // ----- Trick
-    // Here I want to reuse extractByRule(), so I need to parse the $p_index
-    // with privParseOptions()
-    $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index);
-    $v_options_trick = array();
-    $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick,
-                                        array (PCLZIP_OPT_BY_INDEX => 'optional' ));
-    if ($v_result != 1) {
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-        return 0;
-    }
-    $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX];
-
-    // ----- Call the extracting fct
-    if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-        return(0);
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
-    return $p_list;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function :
-  //   delete([$p_option, $p_option_value, ...])
-  // Description :
-  // Parameters :
-  //   None
-  // Options :
-  //   PCLZIP_OPT_BY_INDEX :
-  // Return Values :
-  //   0 on failure,
-  //   The list of the files which are still present in the archive.
-  //   (see PclZip::listContent() for list entry format)
-  // --------------------------------------------------------------------------------
-  function delete(/* options */)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", "");
-    $v_result=1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Check archive
-    if (!$this->privCheckFormat()) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return(0);
-    }
-
-    // ----- Set default values
-    $v_options = array();
-
-    // ----- Look for variable options arguments
-    $v_size = func_num_args();
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
-    // ----- Look for no arguments
-    if ($v_size <= 0) {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing arguments");
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-        return 0;
-    }
-
-    // ----- Get the arguments
-    $v_arg_list = &func_get_args();
-
-    // ----- Parse the options
-    $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
-                                        array (PCLZIP_OPT_BY_NAME => 'optional',
-                                               PCLZIP_OPT_BY_EREG => 'optional',
-                                               PCLZIP_OPT_BY_PREG => 'optional',
-                                               PCLZIP_OPT_BY_INDEX => 'optional' ));
-    if ($v_result != 1) {
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-        return 0;
-    }
-
-    // ----- Check that at least one rule is set
-    if (   (!isset($v_options[PCLZIP_OPT_BY_NAME]))
-        && (!isset($v_options[PCLZIP_OPT_BY_EREG]))
-        && (!isset($v_options[PCLZIP_OPT_BY_PREG]))
-        && (!isset($v_options[PCLZIP_OPT_BY_INDEX]))) {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "At least one filtering rule must be set");
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-        return 0;
-    }
-
-    // ----- Call the delete fct
-    $v_list = array();
-    if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1)
-    {
-      unset($v_list);
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
-      return(0);
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list);
-    return $v_list;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : deleteByIndex()
-  // Description :
-  //   ***** Deprecated *****
-  //   delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
-  // --------------------------------------------------------------------------------
-  function deleteByIndex($p_index)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
-    
-    $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
-    return $p_list;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : properties()
-  // Description :
-  //   This method gives the properties of the archive.
-  //   The properties are :
-  //     nb : Number of files in the archive
-  //     comment : Comment associated with the archive file
-  //     status : not_exist, ok
-  // Parameters :
-  //   None
-  // Return Values :
-  //   0 on failure,
-  //   An array with the archive properties.
-  // --------------------------------------------------------------------------------
-  function properties()
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", "");
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Check archive
-    if (!$this->privCheckFormat()) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return(0);
-    }
-
-    // ----- Default properties
-    $v_prop = array();
-    $v_prop['comment'] = '';
-    $v_prop['nb'] = 0;
-    $v_prop['status'] = 'not_exist';
-
-    // ----- Look if file exists
-    if (@is_file($this->zipname))
-    {
-      // ----- Open the zip file
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
-      {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0);
-        return 0;
-      }
-
-      // ----- Read the central directory informations
-      $v_central_dir = array();
-      if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-        return 0;
-      }
-
-      // ----- Close the zip file
-      $this->privCloseFd();
-
-      // ----- Set the user attributes
-      $v_prop['comment'] = $v_central_dir['comment'];
-      $v_prop['nb'] = $v_central_dir['entries'];
-      $v_prop['status'] = 'ok';
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop);
-    return $v_prop;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : duplicate()
-  // Description :
-  //   This method creates an archive by copying the content of an other one. If
-  //   the archive already exist, it is replaced by the new one without any warning.
-  // Parameters :
-  //   $p_archive : The filename of a valid archive, or
-  //                a valid PclZip object.
-  // Return Values :
-  //   1 on success.
-  //   0 or a negative value on error (error code).
-  // --------------------------------------------------------------------------------
-  function duplicate($p_archive)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", "");
-    $v_result = 1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Look if the $p_archive is a PclZip object
-    if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'");
-
-      // ----- Duplicate the archive
-      $v_result = $this->privDuplicate($p_archive->zipname);
-    }
-
-    // ----- Look if the $p_archive is a string (so a filename)
-    else if (is_string($p_archive))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$p_archive'");
-
-      // ----- Check that $p_archive is a valid zip file
-      // TBC : Should also check the archive format
-      if (!is_file($p_archive)) {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
-        $v_result = PCLZIP_ERR_MISSING_FILE;
-      }
-      else {
-        // ----- Duplicate the archive
-        $v_result = $this->privDuplicate($p_archive);
-      }
-    }
-
-    // ----- Invalid variable
-    else
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
-      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : merge()
-  // Description :
-  //   This method merge the $p_archive_to_add archive at the end of the current
-  //   one ($this).
-  //   If the archive ($this) does not exist, the merge becomes a duplicate.
-  //   If the $p_archive_to_add archive does not exist, the merge is a success.
-  // Parameters :
-  //   $p_archive_to_add : It can be directly the filename of a valid zip archive,
-  //                       or a PclZip object archive.
-  // Return Values :
-  //   1 on success,
-  //   0 or negative values on error (see below).
-  // --------------------------------------------------------------------------------
-  function merge($p_archive_to_add)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", "");
-    $v_result = 1;
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Check archive
-    if (!$this->privCheckFormat()) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
-      return(0);
-    }
-
-    // ----- Look if the $p_archive_to_add is a PclZip object
-    if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object");
-
-      // ----- Merge the archive
-      $v_result = $this->privMerge($p_archive_to_add);
-    }
-
-    // ----- Look if the $p_archive_to_add is a string (so a filename)
-    else if (is_string($p_archive_to_add))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename");
-
-      // ----- Create a temporary archive
-      $v_object_archive = new PclZip($p_archive_to_add);
-
-      // ----- Merge the archive
-      $v_result = $this->privMerge($v_object_archive);
-    }
-
-    // ----- Invalid variable
-    else
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
-      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-
-
-  // --------------------------------------------------------------------------------
-  // Function : errorCode()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function errorCode()
-  {
-    if (PCLZIP_ERROR_EXTERNAL == 1) {
-      return(PclErrorCode());
-    }
-    else {
-      return($this->error_code);
-    }
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : errorName()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function errorName($p_with_code=false)
-  {
-    $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
-                      PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
-                      PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
-                      PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER',
-                      PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE',
-                      PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG',
-                      PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP',
-                      PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE',
-                      PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL',
-                      PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION',
-                      PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT',
-                      PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL',
-                      PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL',
-                      PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM',
-                      PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP',
-                      PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE',
-                      PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE' );
-
-    if (isset($v_name[$this->error_code])) {
-      $v_value = $v_name[$this->error_code];
-    }
-    else {
-      $v_value = 'NoName';
-    }
-
-    if ($p_with_code) {
-      return($v_value.' ('.$this->error_code.')');
-    }
-    else {
-      return($v_value);
-    }
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : errorInfo()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function errorInfo($p_full=false)
-  {
-    if (PCLZIP_ERROR_EXTERNAL == 1) {
-      return(PclErrorString());
-    }
-    else {
-      if ($p_full) {
-        return($this->errorName(true)." : ".$this->error_string);
-      }
-      else {
-        return($this->error_string." [code ".$this->error_code."]");
-      }
-    }
-  }
-  // --------------------------------------------------------------------------------
-
-
-// --------------------------------------------------------------------------------
-// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
-// *****                                                        *****
-// *****       THESES FUNCTIONS MUST NOT BE USED DIRECTLY       *****
-// --------------------------------------------------------------------------------
-
-
-
-  // --------------------------------------------------------------------------------
-  // Function : privCheckFormat()
-  // Description :
-  //   This method check that the archive exists and is a valid zip archive.
-  //   Several level of check exists. (futur)
-  // Parameters :
-  //   $p_level : Level of check. Default 0.
-  //              0 : Check the first bytes (magic codes) (default value))
-  //              1 : 0 + Check the central directory (futur)
-  //              2 : 1 + Check each file header (futur)
-  // Return Values :
-  //   true on success,
-  //   false on error, the error code is set.
-  // --------------------------------------------------------------------------------
-  function privCheckFormat($p_level=0)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", "");
-    $v_result = true;
-
-	// ----- Reset the file system cache
-    clearstatcache();
-
-    // ----- Reset the error handler
-    $this->privErrorReset();
-
-    // ----- Look if the file exits
-    if (!is_file($this->zipname)) {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'");
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
-      return(false);
-    }
-
-    // ----- Check that the file is readeable
-    if (!is_readable($this->zipname)) {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
-      return(false);
-    }
-
-    // ----- Check the magic code
-    // TBC
-
-    // ----- Check the central header
-    // TBC
-
-    // ----- Check each file header
-    // TBC
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privParseOptions()
-  // Description :
-  //   This internal methods reads the variable list of arguments ($p_options_list,
-  //   $p_size) and generate an array with the options and values ($v_result_list).
-  //   $v_requested_options contains the options that can be present and those that
-  //   must be present.
-  //   $v_requested_options is an array, with the option value as key, and 'optional',
-  //   or 'mandatory' as value.
-  // Parameters :
-  //   See above.
-  // Return Values :
-  //   1 on success.
-  //   0 on failure.
-  // --------------------------------------------------------------------------------
-  function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
-    $v_result=1;
-
-    // ----- Read the options
-    $i=0;
-    while ($i<$p_size) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'");
-
-      // ----- Check if the option is requested
-      if (!isset($v_requested_options[$p_options_list[$i]])) {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-
-      // ----- Look for next option
-      switch ($p_options_list[$i]) {
-        // ----- Look for options that request a path value
-        case PCLZIP_OPT_PATH :
-        case PCLZIP_OPT_REMOVE_PATH :
-        case PCLZIP_OPT_ADD_PATH :
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
-          $i++;
-        break;
-
-        // ----- Look for options that request an array of string for value
-        case PCLZIP_OPT_BY_NAME :
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          if (is_string($p_options_list[$i+1])) {
-              $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
-          }
-          else if (is_array($p_options_list[$i+1])) {
-              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
-          }
-          else {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-          ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
-          $i++;
-        break;
-
-        // ----- Look for options that request an EREG or PREG expression
-        case PCLZIP_OPT_BY_EREG :
-        case PCLZIP_OPT_BY_PREG :
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          if (is_string($p_options_list[$i+1])) {
-              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
-          }
-          else {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
-          $i++;
-        break;
-
-        // ----- Look for options that takes a string
-        case PCLZIP_OPT_COMMENT :
-        case PCLZIP_OPT_ADD_COMMENT :
-        case PCLZIP_OPT_PREPEND_COMMENT :
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
-			                     "Missing parameter value for option '"
-								 .PclZipUtilOptionText($p_options_list[$i])
-								 ."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          if (is_string($p_options_list[$i+1])) {
-              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
-          }
-          else {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE,
-			                     "Wrong parameter value for option '"
-								 .PclZipUtilOptionText($p_options_list[$i])
-								 ."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
-          $i++;
-        break;
-
-        // ----- Look for options that request an array of index
-        case PCLZIP_OPT_BY_INDEX :
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          $v_work_list = array();
-          if (is_string($p_options_list[$i+1])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a string '".$p_options_list[$i+1]."'");
-
-              // ----- Remove spaces
-              $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');
-
-              // ----- Parse items
-              $v_work_list = explode(",", $p_options_list[$i+1]);
-          }
-          else if (is_integer($p_options_list[$i+1])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an integer '".$p_options_list[$i+1]."'");
-              $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
-          }
-          else if (is_array($p_options_list[$i+1])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array");
-              $v_work_list = $p_options_list[$i+1];
-          }
-          else {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-          
-          // ----- Reduce the index list
-          // each index item in the list must be a couple with a start and
-          // an end value : [0,3], [5-5], [8-10], ...
-          // ----- Check the format of each item
-          $v_sort_flag=false;
-          $v_sort_value=0;
-          for ($j=0; $j<sizeof($v_work_list); $j++) {
-              // ----- Explode the item
-              $v_item_list = explode("-", $v_work_list[$j]);
-              $v_size_item_list = sizeof($v_item_list);
-              
-              // ----- TBC : Here we might check that each item is a
-              // real integer ...
-              
-              // ----- Look for single value
-              if ($v_size_item_list == 1) {
-                  // ----- Set the option value
-                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
-                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
-              }
-              elseif ($v_size_item_list == 2) {
-                  // ----- Set the option value
-                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
-                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
-              }
-              else {
-                  // ----- Error log
-                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-                  // ----- Return
-                  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-                  return PclZip::errorCode();
-              }
-
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extracted index item = [".$v_result_list[$p_options_list[$i]][$j]['start'].",".$v_result_list[$p_options_list[$i]][$j]['end']."]");
-
-              // ----- Look for list sort
-              if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The list should be sorted ...");
-                  $v_sort_flag=true;
-
-                  // ----- TBC : An automatic sort should be writen ...
-                  // ----- Error log
-                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-                  // ----- Return
-                  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-                  return PclZip::errorCode();
-              }
-              $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
-          }
-          
-          // ----- Sort the items
-          if ($v_sort_flag) {
-              // TBC : To Be Completed
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "List sorting is not yet write ...");
-          }
-
-          // ----- Next option
-          $i++;
-        break;
-
-        // ----- Look for options that request no value
-        case PCLZIP_OPT_REMOVE_ALL_PATH :
-        case PCLZIP_OPT_EXTRACT_AS_STRING :
-        case PCLZIP_OPT_NO_COMPRESSION :
-        case PCLZIP_OPT_EXTRACT_IN_OUTPUT :
-          $v_result_list[$p_options_list[$i]] = true;
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
-        break;
-
-        // ----- Look for options that request an octal value
-        case PCLZIP_OPT_SET_CHMOD :
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
-          $i++;
-        break;
-
-        // ----- Look for options that request a call-back
-        case PCLZIP_CB_PRE_EXTRACT :
-        case PCLZIP_CB_POST_EXTRACT :
-        case PCLZIP_CB_PRE_ADD :
-        case PCLZIP_CB_POST_ADD :
-        /* for futur use
-        case PCLZIP_CB_PRE_DELETE :
-        case PCLZIP_CB_POST_DELETE :
-        case PCLZIP_CB_PRE_LIST :
-        case PCLZIP_CB_POST_LIST :
-        */
-          // ----- Check the number of parameters
-          if (($i+1) >= $p_size) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Get the value
-          $v_function_name = $p_options_list[$i+1];
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'");
-
-          // ----- Check that the value is a valid existing function
-          if (!function_exists($v_function_name)) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-
-          // ----- Set the attribute
-          $v_result_list[$p_options_list[$i]] = $v_function_name;
-          $i++;
-        break;
-
-        default :
-          // ----- Error log
-          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
-		                       "Unknown parameter '"
-							   .$p_options_list[$i]."'");
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-          return PclZip::errorCode();
-      }
-
-      // ----- Next options
-      $i++;
-    }
-
-    // ----- Look for mandatory options
-    if ($v_requested_options !== false) {
-      for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
-        // ----- Look for mandatory option
-        if ($v_requested_options[$key] == 'mandatory') {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")");
-          // ----- Look if present
-          if (!isset($v_result_list[$key])) {
-            // ----- Error log
-            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-            return PclZip::errorCode();
-          }
-        }
-      }
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privCreate()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privCreate($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list, result_list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
-    $v_result=1;
-    $v_list_detail = array();
-
-    // ----- Open the file in write mode
-    if (($v_result = $this->privOpenFd('wb')) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Add the list of files
-    $v_result = $this->privAddList($p_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
-
-    // ----- Close
-    $this->privCloseFd();
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privAdd()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privAdd($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list, result_list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
-    $v_result=1;
-    $v_list_detail = array();
-
-    // ----- Look if the archive exists or is empty
-    if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it.");
-
-      // ----- Do a create
-      $v_result = $this->privCreate($p_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_result=$this->privOpenFd('rb')) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Read the central directory informations
-    $v_central_dir = array();
-    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
-    {
-      $this->privCloseFd();
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Go to beginning of File
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
-    @rewind($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
-
-    // ----- Creates a temporay file
-    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
-
-    // ----- Open the temporary file in write mode
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
-    {
-      $this->privCloseFd();
-
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Copy the files from the archive to the temporary file
-    // TBC : Here I should better append the file and go back to erase the central dir
-    $v_size = $v_central_dir['offset'];
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-      $v_buffer = fread($this->zip_fd, $v_read_size);
-      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Swap the file descriptor
-    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
-    // the following methods on the temporary fil and not the real archive
-    $v_swap = $this->zip_fd;
-    $this->zip_fd = $v_zip_temp_fd;
-    $v_zip_temp_fd = $v_swap;
-
-    // ----- Add the files
-    $v_header_list = array();
-    if (($v_result = $this->privAddFileList($p_list, $v_header_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
-    {
-      fclose($v_zip_temp_fd);
-      $this->privCloseFd();
-      @unlink($v_zip_temp_name);
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Store the offset of the central dir
-    $v_offset = @ftell($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
-
-    // ----- Copy the block of file headers from the old archive
-    $v_size = $v_central_dir['size'];
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-      $v_buffer = @fread($v_zip_temp_fd, $v_read_size);
-      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Create the Central Dir files header
-    for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
-    {
-      // ----- Create the file header
-      if ($v_header_list[$i]['status'] == 'ok') {
-        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
-          fclose($v_zip_temp_fd);
-          $this->privCloseFd();
-          @unlink($v_zip_temp_name);
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-        $v_count++;
-      }
-
-      // ----- Transform the header to a 'usable' info
-      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
-    }
-
-    // ----- Zip file comment
-    $v_comment = $v_central_dir['comment'];
-    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
-      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
-    }
-    if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) {
-      $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT];
-    }
-    if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) {
-      $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment;
-    }
-
-    // ----- Calculate the size of the central header
-    $v_size = @ftell($this->zip_fd)-$v_offset;
-
-    // ----- Create the central dir footer
-    if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
-    {
-      // ----- Reset the file list
-      unset($v_header_list);
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Swap back the file descriptor
-    $v_swap = $this->zip_fd;
-    $this->zip_fd = $v_zip_temp_fd;
-    $v_zip_temp_fd = $v_swap;
-
-    // ----- Close
-    $this->privCloseFd();
-
-    // ----- Close the temporary file
-    @fclose($v_zip_temp_fd);
-
-    // ----- Delete the zip file
-    // TBC : I should test the result ...
-    @unlink($this->zipname);
-
-    // ----- Rename the temporary file
-    // TBC : I should test the result ...
-    //@rename($v_zip_temp_name, $this->zipname);
-    PclZipUtilRename($v_zip_temp_name, $this->zipname);
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privOpenFd()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function privOpenFd($p_mode)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$p_mode);
-    $v_result=1;
-
-    // ----- Look if already open
-    if ($this->zip_fd != 0)
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode');
-    if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privCloseFd()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function privCloseFd()
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", "");
-    $v_result=1;
-
-    if ($this->zip_fd != 0)
-      @fclose($this->zip_fd);
-    $this->zip_fd = 0;
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privAddList()
-  // Description :
-  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
-  //   different from the real path of the file. This is usefull if you want to have PclTar
-  //   running in any directory, and memorize relative path from an other directory.
-  // Parameters :
-  //   $p_list : An array containing the file or directory names to add in the tar
-  //   $p_result_list : list of added files with their properties (specially the status field)
-  //   $p_add_dir : Path to add in the filename path archived
-  //   $p_remove_dir : Path to remove in the filename path archived
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
-    $v_result=1;
-
-    // ----- Add the files
-    $v_header_list = array();
-    if (($v_result = $this->privAddFileList($p_list, $v_header_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Store the offset of the central dir
-    $v_offset = @ftell($this->zip_fd);
-
-    // ----- Create the Central Dir files header
-    for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
-    {
-      // ----- Create the file header
-      if ($v_header_list[$i]['status'] == 'ok') {
-        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-        $v_count++;
-      }
-
-      // ----- Transform the header to a 'usable' info
-      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
-    }
-
-    // ----- Zip file comment
-    $v_comment = '';
-    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
-      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
-    }
-
-    // ----- Calculate the size of the central header
-    $v_size = @ftell($this->zip_fd)-$v_offset;
-
-    // ----- Create the central dir footer
-    if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1)
-    {
-      // ----- Reset the file list
-      unset($v_header_list);
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privAddFileList()
-  // Description :
-  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
-  //   different from the real path of the file. This is usefull if you want to
-  //   run the lib in any directory, and memorize relative path from an other directory.
-  // Parameters :
-  //   $p_list : An array containing the file or directory names to add in the tar
-  //   $p_result_list : list of added files with their properties (specially the status field)
-  //   $p_add_dir : Path to add in the filename path archived
-  //   $p_remove_dir : Path to remove in the filename path archived
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privAddFileList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
-    $v_result=1;
-    $v_header = array();
-
-    // ----- Recuperate the current number of elt in list
-    $v_nb = sizeof($p_result_list);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have $v_nb elements");
-
-    // ----- Loop on the files
-    for ($j=0; ($j<count($p_list)) && ($v_result==1); $j++)
-    {
-      // ----- Recuperate the filename
-      $p_filename = PclZipUtilTranslateWinPath($p_list[$j], false);
-
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file [$p_filename]");
-
-      // ----- Skip empty file names
-      if ($p_filename == "")
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Skip empty filename");
-        continue;
-      }
-
-      // ----- Check the filename
-      if (!file_exists($p_filename))
-      {
-        // ----- Error log
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '$p_filename' does not exists");
-        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '$p_filename' does not exists");
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-
-      /* This test is done later
-      // ----- Check the path length
-      if (strlen($p_filename) > 0xFF)
-      {
-        // ----- Error log
-        PclZip::privErrorLog(-5, "File name is too long (max. 255) : '$p_filename'");
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-      */
-
-      // ----- Look if it is a file or a dir with no all pathnre move
-      if ((is_file($p_filename)) || ((is_dir($p_filename)) && !$p_remove_all_dir)) {
-        // ----- Add the file
-        if (($v_result = $this->privAddFile($p_filename, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
-        {
-          // ----- Return status
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-
-        // ----- Store the file infos
-        $p_result_list[$v_nb++] = $v_header;
-      }
-
-      // ----- Look for directory
-      if (is_dir($p_filename))
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "$p_filename is a directory");
-
-        // ----- Look for path
-        if ($p_filename != ".")
-          $v_path = $p_filename."/";
-        else
-          $v_path = "";
-
-        // ----- Read the directory for files and sub-directories
-        $p_hdir = opendir($p_filename);
-        $p_hitem = readdir($p_hdir); // '.' directory
-        $p_hitem = readdir($p_hdir); // '..' directory
-        while (($p_hitem = readdir($p_hdir)) !== false)
-        {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for $p_hitem in the directory");
-
-          // ----- Look for a file
-          if (is_file($v_path.$p_hitem))
-          {
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'");
-
-            // ----- Add the file
-            if (($v_result = $this->privAddFile($v_path.$p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
-            {
-              // ----- Return status
-              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-              return $v_result;
-            }
-
-            // ----- Store the file infos
-            $p_result_list[$v_nb++] = $v_header;
-          }
-
-          // ----- Recursive call to privAddFileList()
-          else
-          {
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Add the directory '".$v_path.$p_hitem."'");
-
-            // ----- Need an array as parameter
-            $p_temp_list[0] = $v_path.$p_hitem;
-            $v_result = $this->privAddFileList($p_temp_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
-
-            // ----- Update the number of elements of the list
-            $v_nb = sizeof($p_result_list);
-          }
-        }
-
-        // ----- Free memory for the recursive loop
-        unset($p_temp_list);
-        unset($p_hdir);
-        unset($p_hitem);
-      }
-    }
-
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have $v_nb elements");
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privAddFile()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privAddFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='$p_filename', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
-    $v_result=1;
-
-    if ($p_filename == "")
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Calculate the stored filename
-    $v_stored_filename = $p_filename;
-
-    // ----- Look for all path to remove
-    if ($p_remove_all_dir) {
-      $v_stored_filename = basename($p_filename);
-    }
-    // ----- Look for partial path remove
-    else if ($p_remove_dir != "")
-    {
-      if (substr($p_remove_dir, -1) != '/')
-        $p_remove_dir .= "/";
-
-      if ((substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./"))
-      {
-        if ((substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./"))
-          $p_remove_dir = "./".$p_remove_dir;
-        if ((substr($p_filename, 0, 2) != "./") && (substr($p_remove_dir, 0, 2) == "./"))
-          $p_remove_dir = substr($p_remove_dir, 2);
-      }
-
-      $v_compare = PclZipUtilPathInclusion($p_remove_dir, $p_filename);
-      if ($v_compare > 0)
-//      if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir)
-      {
-
-        if ($v_compare == 2) {
-          $v_stored_filename = "";
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder");
-        }
-        else {
-          $v_stored_filename = substr($p_filename, strlen($p_remove_dir));
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$p_filename' = '$v_stored_filename'");
-        }
-      }
-    }
-    // ----- Look for path to add
-    if ($p_add_dir != "")
-    {
-      if (substr($p_add_dir, -1) == "/")
-        $v_stored_filename = $p_add_dir.$v_stored_filename;
-      else
-        $v_stored_filename = $p_add_dir."/".$v_stored_filename;
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'");
-    }
-
-    // ----- Filename (reduce the path of stored name)
-    $v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
-
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_stored_filename', strlen ".strlen($v_stored_filename));
-
-    /* filename length moved after call-back in release 1.3
-    // ----- Check the path length
-    if (strlen($v_stored_filename) > 0xFF)
-    {
-      // ----- Error log
-      PclZip::privErrorLog(-5, "Stored file name is too long (max. 255) : '$v_stored_filename'");
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-    */
-
-    // ----- Set the file properties
-    clearstatcache();
-    $p_header['version'] = 20;
-    $p_header['version_extracted'] = 10;
-    $p_header['flag'] = 0;
-    $p_header['compression'] = 0;
-    $p_header['mtime'] = filemtime($p_filename);
-    $p_header['crc'] = 0;
-    $p_header['compressed_size'] = 0;
-    $p_header['size'] = filesize($p_filename);
-    $p_header['filename_len'] = strlen($p_filename);
-    $p_header['extra_len'] = 0;
-    $p_header['comment_len'] = 0;
-    $p_header['disk'] = 0;
-    $p_header['internal'] = 0;
-    $p_header['external'] = (is_file($p_filename)?0xFE49FFE0:0x41FF0010);
-    $p_header['offset'] = 0;
-    $p_header['filename'] = $p_filename;
-    $p_header['stored_filename'] = $v_stored_filename;
-    $p_header['extra'] = '';
-    $p_header['comment'] = '';
-    $p_header['status'] = 'ok';
-    $p_header['index'] = -1;
-
-    // ----- Look for pre-add callback
-    if (isset($p_options[PCLZIP_CB_PRE_ADD])) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction");
-
-      // ----- Generate a local information
-      $v_local_header = array();
-      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
-
-      // ----- Call the callback
-      // Here I do not use call_user_func() because I need to send a reference to the
-      // header.
-      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);');
-      if ($v_result == 0) {
-        // ----- Change the file status
-        $p_header['status'] = "skipped";
-        $v_result = 1;
-      }
-
-      // ----- Update the informations
-      // Only some fields can be modified
-      if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
-        $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_header['stored_filename']."'");
-      }
-    }
-
-    // ----- Look for empty stored filename
-    if ($p_header['stored_filename'] == "") {
-      $p_header['status'] = "filtered";
-    }
-    
-    // ----- Check the path length
-    if (strlen($p_header['stored_filename']) > 0xFF) {
-      $p_header['status'] = 'filename_too_long';
-    }
-
-    // ----- Look if no error, or file not skipped
-    if ($p_header['status'] == 'ok') {
-
-      // ----- Look for a file
-      if (is_file($p_filename))
-      {
-        // ----- Open the source file
-        if (($v_file = @fopen($p_filename, "rb")) == 0) {
-          PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-          return PclZip::errorCode();
-        }
-
-        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
-          // ----- Read the file content
-          $v_content_compressed = @fread($v_file, $p_header['size']);
-
-          // ----- Calculate the CRC
-          $p_header['crc'] = crc32($v_content_compressed);
-        }
-        else {
-          // ----- Read the file content
-          $v_content = @fread($v_file, $p_header['size']);
-
-          // ----- Calculate the CRC
-          $p_header['crc'] = crc32($v_content);
-
-          // ----- Compress the file
-          $v_content_compressed = gzdeflate($v_content);
-        }
-
-        // ----- Set header parameters
-        $p_header['compressed_size'] = strlen($v_content_compressed);
-        $p_header['compression'] = 8;
-
-        // ----- Call the header generation
-        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
-          @fclose($v_file);
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-
-        // ----- Write the compressed content
-        $v_binary_data = pack('a'.$p_header['compressed_size'], $v_content_compressed);
-        @fwrite($this->zip_fd, $v_binary_data, $p_header['compressed_size']);
-        
-        // ----- Close the file
-        @fclose($v_file);
-      }
-
-      // ----- Look for a directory
-      else
-      {
-        // ----- Set the file properties
-        $p_header['filename'] .= '/';
-        $p_header['filename_len']++;
-        $p_header['size'] = 0;
-        $p_header['external'] = 0x41FF0010;   // Value for a folder : to be checked
-
-        // ----- Call the header generation
-        if (($v_result = $this->privWriteFileHeader($p_header)) != 1)
-        {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-      }
-    }
-
-    // ----- Look for pre-add callback
-    if (isset($p_options[PCLZIP_CB_POST_ADD])) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction");
-
-      // ----- Generate a local information
-      $v_local_header = array();
-      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
-
-      // ----- Call the callback
-      // Here I do not use call_user_func() because I need to send a reference to the
-      // header.
-      eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);');
-      if ($v_result == 0) {
-        // ----- Ignored
-        $v_result = 1;
-      }
-
-      // ----- Update the informations
-      // Nothing can be modified
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privWriteFileHeader()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privWriteFileHeader(&$p_header)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
-    $v_result=1;
-
-    // TBC
-    //for(reset($p_header); $key = key($p_header); next($p_header)) {
-    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
-    //}
-
-    // ----- Store the offset position of the file
-    $p_header['offset'] = ftell($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']);
-
-    // ----- Transform UNIX mtime to DOS format mdate/mtime
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
-    $v_date = getdate($p_header['mtime']);
-    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
-    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
-
-    // ----- Packed data
-    $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, $p_header['version'], $p_header['flag'],
-                          $p_header['compression'], $v_mtime, $v_mdate,
-                          $p_header['crc'], $p_header['compressed_size'], $p_header['size'],
-                          strlen($p_header['stored_filename']), $p_header['extra_len']);
-
-    // ----- Write the first 148 bytes of the header in the archive
-    fputs($this->zip_fd, $v_binary_data, 30);
-
-    // ----- Write the variable fields
-    if (strlen($p_header['stored_filename']) != 0)
-    {
-      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
-    }
-    if ($p_header['extra_len'] != 0)
-    {
-      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privWriteCentralFileHeader()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privWriteCentralFileHeader(&$p_header)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
-    $v_result=1;
-
-    // TBC
-    //for(reset($p_header); $key = key($p_header); next($p_header)) {
-    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
-    //}
-
-    // ----- Transform UNIX mtime to DOS format mdate/mtime
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
-    $v_date = getdate($p_header['mtime']);
-    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
-    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
-
-    // ----- Packed data
-    $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, $p_header['version'], $p_header['version_extracted'],
-                          $p_header['flag'], $p_header['compression'], $v_mtime, $v_mdate, $p_header['crc'],
-                          $p_header['compressed_size'], $p_header['size'],
-                          strlen($p_header['stored_filename']), $p_header['extra_len'], $p_header['comment_len'],
-                          $p_header['disk'], $p_header['internal'], $p_header['external'], $p_header['offset']);
-
-    // ----- Write the 42 bytes of the header in the zip file
-    fputs($this->zip_fd, $v_binary_data, 46);
-
-    // ----- Write the variable fields
-    if (strlen($p_header['stored_filename']) != 0)
-    {
-      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
-    }
-    if ($p_header['extra_len'] != 0)
-    {
-      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
-    }
-    if ($p_header['comment_len'] != 0)
-    {
-      fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']);
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privWriteCentralHeader()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$p_comment.'"');
-    $v_result=1;
-
-    // ----- Packed data
-    $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, $p_nb_entries, $p_size, $p_offset, strlen($p_comment));
-
-    // ----- Write the 22 bytes of the header in the zip file
-    fputs($this->zip_fd, $v_binary_data, 22);
-
-    // ----- Write the variable fields
-    if (strlen($p_comment) != 0)
-    {
-      fputs($this->zip_fd, $p_comment, strlen($p_comment));
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privList()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privList(&$p_list)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list");
-    $v_result=1;
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Read the central directory informations
-    $v_central_dir = array();
-    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Go to beginning of Central Dir
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'");
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
-    @rewind($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
-    if (@fseek($this->zip_fd, $v_central_dir['offset']))
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
-
-    // ----- Read each entry
-    for ($i=0; $i<$v_central_dir['entries']; $i++)
-    {
-      // ----- Read the file header
-      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        return $v_result;
-      }
-      $v_header['index'] = $i;
-
-      // ----- Get the only interesting attributes
-      $this->privConvertHeader2FileInfo($v_header, $p_list[$i]);
-      unset($v_header);
-    }
-
-    // ----- Close the zip file
-    $this->privCloseFd();
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privConvertHeader2FileInfo()
-  // Description :
-  //   This function takes the file informations from the central directory
-  //   entries and extract the interesting parameters that will be given back.
-  //   The resulting file infos are set in the array $p_info
-  //     $p_info['filename'] : Filename with full path. Given by user (add),
-  //                           extracted in the filesystem (extract).
-  //     $p_info['stored_filename'] : Stored filename in the archive.
-  //     $p_info['size'] = Size of the file.
-  //     $p_info['compressed_size'] = Compressed size of the file.
-  //     $p_info['mtime'] = Last modification date of the file.
-  //     $p_info['comment'] = Comment associated with the file.
-  //     $p_info['folder'] = true/false : indicates if the entry is a folder or not.
-  //     $p_info['status'] = status of the action on the file.
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privConvertHeader2FileInfo($p_header, &$p_info)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'");
-    $v_result=1;
-
-    // ----- Get the interesting attributes
-    $p_info['filename'] = $p_header['filename'];
-    $p_info['stored_filename'] = $p_header['stored_filename'];
-    $p_info['size'] = $p_header['size'];
-    $p_info['compressed_size'] = $p_header['compressed_size'];
-    $p_info['mtime'] = $p_header['mtime'];
-    $p_info['comment'] = $p_header['comment'];
-    $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010);
-    $p_info['index'] = $p_header['index'];
-    $p_info['status'] = $p_header['status'];
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privExtractByRule()
-  // Description :
-  //   Extract a file or directory depending of rules (by index, by name, ...)
-  // Parameters :
-  //   $p_file_list : An array where will be placed the properties of each
-  //                  extracted file
-  //   $p_path : Path to add while writing the extracted files
-  //   $p_remove_path : Path to remove (from the file memorized path) while writing the
-  //                    extracted files. If the path does not match the file path,
-  //                    the file is extracted with its memorized path.
-  //                    $p_remove_path does not apply to 'list' mode.
-  //                    $p_path and $p_remove_path are commulative.
-  // Return Values :
-  //   1 on success,0 or less on error (see error code list)
-  // --------------------------------------------------------------------------------
-  function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
-    $v_result=1;
-
-    // ----- Check the path
-    if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../") && (substr($p_path,1,2)!=":/")))
-      $p_path = "./".$p_path;
-
-    // ----- Reduce the path last (and duplicated) '/'
-    if (($p_path != "./") && ($p_path != "/"))
-    {
-      // ----- Look for the path end '/'
-      while (substr($p_path, -1) == "/")
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'");
-        $p_path = substr($p_path, 0, strlen($p_path)-1);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]");
-      }
-    }
-
-    // ----- Look for path to remove format (should end by /)
-    if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/'))
-    {
-      $p_remove_path .= '/';
-    }
-    $p_remove_path_size = strlen($p_remove_path);
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_result = $this->privOpenFd('rb')) != 1)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Read the central directory informations
-    $v_central_dir = array();
-    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
-    {
-      // ----- Close the zip file
-      $this->privCloseFd();
-
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Start at beginning of Central Dir
-    $v_pos_entry = $v_central_dir['offset'];
-
-    // ----- Read each entry
-    $j_start = 0;
-    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'");
-
-      // ----- Read next Central dir entry
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'");
-      @rewind($this->zip_fd);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($this->zip_fd)."'");
-      if (@fseek($this->zip_fd, $v_pos_entry))
-      {
-        // ----- Close the zip file
-        $this->privCloseFd();
-
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'");
-
-      // ----- Read the file header
-      $v_header = array();
-      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
-      {
-        // ----- Close the zip file
-        $this->privCloseFd();
-
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        return $v_result;
-      }
-
-      // ----- Store the index
-      $v_header['index'] = $i;
-
-      // ----- Store the file position
-      $v_pos_entry = ftell($this->zip_fd);
-
-      // ----- Look for the specific extract rules
-      $v_extract = false;
-
-      // ----- Look for extract by name rule
-      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
-          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
-
-          // ----- Look if the filename is in the list
-          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
-
-              // ----- Look for a directory
-              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
-
-                  // ----- Look if the directory is in the filename path
-                  if (   (strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
-                      && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
-                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
-                      $v_extract = true;
-                  }
-              }
-              // ----- Look for a filename
-              elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
-                  $v_extract = true;
-              }
-          }
-      }
-
-      // ----- Look for extract by ereg rule
-      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
-               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
-
-          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
-              $v_extract = true;
-          }
-      }
-
-      // ----- Look for extract by preg rule
-      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
-               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
-
-          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
-              $v_extract = true;
-          }
-      }
-
-      // ----- Look for extract by index rule
-      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
-               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
-          
-          // ----- Look if the index is in the list
-          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
-
-              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
-                  $v_extract = true;
-              }
-              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
-                  $j_start = $j+1;
-              }
-
-              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
-                  break;
-              }
-          }
-      }
-
-      // ----- Look for no rule, which means extract all the archive
-      else {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)");
-          $v_extract = true;
-      }
-      
-
-      // ----- Look for real extraction
-      if ($v_extract)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'");
-
-        // ----- Go to the file position
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
-        @rewind($this->zip_fd);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
-        if (@fseek($this->zip_fd, $v_header['offset']))
-        {
-          // ----- Close the zip file
-          $this->privCloseFd();
-
-          // ----- Error log
-          PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
-          // ----- Return
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-          return PclZip::errorCode();
-        }
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
-
-        // ----- Look for extraction as string
-        if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
-
-          // ----- Extracting the file
-          $v_result1 = $this->privExtractFileAsString($v_header, $v_string);
-          if ($v_result1 < 1) {
-            $this->privCloseFd();
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
-            return $v_result1;
-          }
-
-          // ----- Get the only interesting attributes
-          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1)
-          {
-            // ----- Close the zip file
-            $this->privCloseFd();
-
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-          }
-
-          // ----- Set the file content
-          $p_file_list[$v_nb_extracted]['content'] = $v_string;
-
-          // ----- Next extracted file
-          $v_nb_extracted++;
-          
-          // ----- Look for user callback abort
-          if ($v_result1 == 2) {
-          	break;
-          }
-        }
-        // ----- Look for extraction in standard output
-        elseif (   (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT]))
-		        && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) {
-          // ----- Extracting the file in standard output
-          $v_result1 = $this->privExtractFileInOutput($v_header, $p_options);
-          if ($v_result1 < 1) {
-            $this->privCloseFd();
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
-            return $v_result1;
-          }
-
-          // ----- Get the only interesting attributes
-          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) {
-            $this->privCloseFd();
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-          }
-
-          // ----- Look for user callback abort
-          if ($v_result1 == 2) {
-          	break;
-          }
-        }
-        // ----- Look for normal extraction
-        else {
-          // ----- Extracting the file
-          $v_result1 = $this->privExtractFile($v_header,
-		                                      $p_path, $p_remove_path,
-											  $p_remove_all_path,
-											  $p_options);
-          if ($v_result1 < 1) {
-            $this->privCloseFd();
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
-            return $v_result1;
-          }
-
-          // ----- Get the only interesting attributes
-          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1)
-          {
-            // ----- Close the zip file
-            $this->privCloseFd();
-
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-          }
-
-          // ----- Look for user callback abort
-          if ($v_result1 == 2) {
-          	break;
-          }
-        }
-      }
-    }
-
-    // ----- Close the zip file
-    $this->privCloseFd();
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privExtractFile()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
-    $v_result=1;
-
-    // ----- Read the file header
-    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
-
-    // ----- Check that the file header is coherent with $p_entry info
-    // TBC
-
-    // ----- Look for all path to remove
-    if ($p_remove_all_path == true) {
-        // ----- Get the basename of the path
-        $p_entry['filename'] = basename($p_entry['filename']);
-    }
-
-    // ----- Look for path to remove
-    else if ($p_remove_path != "")
-    {
-      //if (strcmp($p_remove_path, $p_entry['filename'])==0)
-      if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'");
-
-        // ----- Change the file status
-        $p_entry['status'] = "filtered";
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        return $v_result;
-      }
-
-      $p_remove_path_size = strlen($p_remove_path);
-      if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'");
-
-        // ----- Remove the path
-        $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);
-
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'");
-      }
-    }
-
-    // ----- Add the path
-    if ($p_path != '')
-    {
-      $p_entry['filename'] = $p_path."/".$p_entry['filename'];
-    }
-
-    // ----- Look for pre-extract callback
-    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
-
-      // ----- Generate a local information
-      $v_local_header = array();
-      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
-      // ----- Call the callback
-      // Here I do not use call_user_func() because I need to send a reference to the
-      // header.
-      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
-      if ($v_result == 0) {
-        // ----- Change the file status
-        $p_entry['status'] = "skipped";
-        $v_result = 1;
-      }
-      
-      // ----- Look for abort result
-      if ($v_result == 2) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
-        // ----- This status is internal and will be changed in 'skipped'
-        $p_entry['status'] = "aborted";
-      	$v_result = PCLZIP_ERR_USER_ABORTED;
-      }
-
-      // ----- Update the informations
-      // Only some fields can be modified
-      $p_entry['filename'] = $v_local_header['filename'];
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
-    }
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
-
-    // ----- Look if extraction should be done
-    if ($p_entry['status'] == 'ok') {
-
-    // ----- Look for specific actions while the file exist
-    if (file_exists($p_entry['filename']))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists");
-
-      // ----- Look if file is a directory
-      if (is_dir($p_entry['filename']))
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory");
-
-        // ----- Change the file status
-        $p_entry['status'] = "already_a_directory";
-
-        // ----- Return
-        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        //return $v_result;
-      }
-      // ----- Look if file is write protected
-      else if (!is_writeable($p_entry['filename']))
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected");
-
-        // ----- Change the file status
-        $p_entry['status'] = "write_protected";
-
-        // ----- Return
-        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        //return $v_result;
-      }
-
-      // ----- Look if the extracted file is older
-      else if (filemtime($p_entry['filename']) > $p_entry['mtime'])
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")");
-
-        // ----- Change the file status
-        $p_entry['status'] = "newer_exist";
-
-        // ----- Return
-        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        //return $v_result;
-      }
-    }
-
-    // ----- Check the directory availability and create it if necessary
-    else {
-      if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
-        $v_dir_to_check = $p_entry['filename'];
-      else if (!strstr($p_entry['filename'], "/"))
-        $v_dir_to_check = "";
-      else
-        $v_dir_to_check = dirname($p_entry['filename']);
-
-      if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'");
-
-        // ----- Change the file status
-        $p_entry['status'] = "path_creation_fail";
-
-        // ----- Return
-        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        //return $v_result;
-        $v_result = 1;
-      }
-    }
-    }
-
-    // ----- Look if extraction should be done
-    if ($p_entry['status'] == 'ok') {
-
-      // ----- Do the extraction (if not a folder)
-      if (!(($p_entry['external']&0x00000010)==0x00000010))
-      {
-
-        // ----- Look for not compressed file
-        if ($p_entry['compressed_size'] == $p_entry['size'])
-        {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
-
-          // ----- Opening destination file
-          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
-          {
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
-
-            // ----- Change the file status
-            $p_entry['status'] = "write_error";
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-          }
-
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
-
-          // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
-          $v_size = $p_entry['compressed_size'];
-          while ($v_size != 0)
-          {
-            $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes");
-            $v_buffer = fread($this->zip_fd, $v_read_size);
-            $v_binary_data = pack('a'.$v_read_size, $v_buffer);
-            @fwrite($v_dest_file, $v_binary_data, $v_read_size);
-            $v_size -= $v_read_size;
-          }
-
-          // ----- Closing the destination file
-          fclose($v_dest_file);
-
-          // ----- Change the file mtime
-          touch($p_entry['filename'], $p_entry['mtime']);
-        }
-        else
-        {
-          // ----- Trace
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
-
-          // ----- Opening destination file
-          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
-
-            // ----- Change the file status
-            $p_entry['status'] = "write_error";
-
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-          }
-
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes");
-
-          // ----- Read the compressed file in a buffer (one shot)
-          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
-
-          // ----- Decompress the file
-          $v_file_content = gzinflate($v_buffer);
-          unset($v_buffer);
-
-          // ----- Write the uncompressed data
-          @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
-          unset($v_file_content);
-
-          // ----- Closing the destination file
-          @fclose($v_dest_file);
-
-          // ----- Change the file mtime
-          touch($p_entry['filename'], $p_entry['mtime']);
-        }
-
-        // ----- Look for chmod option
-        if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'");
-
-          // ----- Change the mode of the file
-          chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);
-        }
-
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
-      }
-    }
-
-	// ----- Change abort status
-	if ($p_entry['status'] == "aborted") {
-      $p_entry['status'] = "skipped";
-	}
-	
-    // ----- Look for post-extract callback
-    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
-
-      // ----- Generate a local information
-      $v_local_header = array();
-      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
-      // ----- Call the callback
-      // Here I do not use call_user_func() because I need to send a reference to the
-      // header.
-      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
-
-      // ----- Look for abort result
-      if ($v_result == 2) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
-      	$v_result = PCLZIP_ERR_USER_ABORTED;
-      }
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privExtractFileInOutput()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privExtractFileInOutput(&$p_entry, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', "");
-    $v_result=1;
-
-    // ----- Read the file header
-    if (($v_result = $this->privReadFileHeader($v_header)) != 1) {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
-
-    // ----- Check that the file header is coherent with $p_entry info
-    // TBC
-
-    // ----- Look for pre-extract callback
-    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
-
-      // ----- Generate a local information
-      $v_local_header = array();
-      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
-      // ----- Call the callback
-      // Here I do not use call_user_func() because I need to send a reference to the
-      // header.
-      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
-      if ($v_result == 0) {
-        // ----- Change the file status
-        $p_entry['status'] = "skipped";
-        $v_result = 1;
-      }
-
-      // ----- Look for abort result
-      if ($v_result == 2) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
-        // ----- This status is internal and will be changed in 'skipped'
-        $p_entry['status'] = "aborted";
-      	$v_result = PCLZIP_ERR_USER_ABORTED;
-      }
-
-      // ----- Update the informations
-      // Only some fields can be modified
-      $p_entry['filename'] = $v_local_header['filename'];
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
-    }
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
-
-    // ----- Look if extraction should be done
-    if ($p_entry['status'] == 'ok') {
-
-      // ----- Do the extraction (if not a folder)
-      if (!(($p_entry['external']&0x00000010)==0x00000010)) {
-        // ----- Look for not compressed file
-        if ($p_entry['compressed_size'] == $p_entry['size']) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
-
-          // ----- Read the file in a buffer (one shot)
-          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
-
-          // ----- Send the file to the output
-          echo $v_buffer;
-          unset($v_buffer);
-        }
-        else {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes");
-
-          // ----- Read the compressed file in a buffer (one shot)
-          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
-          
-          // ----- Decompress the file
-          $v_file_content = gzinflate($v_buffer);
-          unset($v_buffer);
-
-          // ----- Send the file to the output
-          echo $v_file_content;
-          unset($v_file_content);
-        }
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
-      }
-    }
-
-	// ----- Change abort status
-	if ($p_entry['status'] == "aborted") {
-      $p_entry['status'] = "skipped";
-	}
-
-    // ----- Look for post-extract callback
-    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
-
-      // ----- Generate a local information
-      $v_local_header = array();
-      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
-      // ----- Call the callback
-      // Here I do not use call_user_func() because I need to send a reference to the
-      // header.
-      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
-
-      // ----- Look for abort result
-      if ($v_result == 2) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
-      	$v_result = PCLZIP_ERR_USER_ABORTED;
-      }
-    }
-
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privExtractFileAsString()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privExtractFileAsString(&$p_entry, &$p_string)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'");
-    $v_result=1;
-
-    // ----- Read the file header
-    $v_header = array();
-    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
-
-    // ----- Check that the file header is coherent with $p_entry info
-    // TBC
-
-    // ----- Trace
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'");
-
-    // ----- Do the extraction (if not a folder)
-    if (!(($p_entry['external']&0x00000010)==0x00000010))
-    {
-      // ----- Look for not compressed file
-      if ($p_entry['compressed_size'] == $p_entry['size'])
-      {
-        // ----- Trace
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
-
-        // ----- Reading the file
-        $p_string = fread($this->zip_fd, $p_entry['compressed_size']);
-      }
-      else
-      {
-        // ----- Trace
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
-
-        // ----- Reading the file
-        $v_data = fread($this->zip_fd, $p_entry['compressed_size']);
-        
-        // ----- Decompress the file
-        $p_string = gzinflate($v_data);
-      }
-
-      // ----- Trace
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
-    }
-    else {
-        // TBC : error : can not extract a folder in a string
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privReadFileHeader()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privReadFileHeader(&$p_header)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", "");
-    $v_result=1;
-
-    // ----- Read the 4 bytes signature
-    $v_binary_data = @fread($this->zip_fd, 4);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
-    $v_data = unpack('Vid', $v_binary_data);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
-
-    // ----- Check signature
-    if ($v_data['id'] != 0x04034b50)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header");
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Read the first 42 bytes of the header
-    $v_binary_data = fread($this->zip_fd, 26);
-
-    // ----- Look for invalid block size
-    if (strlen($v_binary_data) != 26)
-    {
-      $p_header['filename'] = "";
-      $p_header['status'] = "invalid_header";
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Extract the values
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'");
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'");
-    $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
-
-    // ----- Get filename
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']);
-    $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\'');
-
-    // ----- Get extra_fields
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']);
-    if ($v_data['extra_len'] != 0) {
-      $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']);
-    }
-    else {
-      $p_header['extra'] = '';
-    }
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\'');
-
-    // ----- Extract properties
-    $p_header['compression'] = $v_data['compression'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.bin2hex($p_header['compression']).'\'');
-    $p_header['size'] = $v_data['size'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\'');
-    $p_header['compressed_size'] = $v_data['compressed_size'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
-    $p_header['crc'] = $v_data['crc'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.$p_header['crc'].'\'');
-    $p_header['flag'] = $v_data['flag'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\'');
-
-    // ----- Recuperate date in UNIX format
-    $p_header['mdate'] = $v_data['mdate'];
-    $p_header['mtime'] = $v_data['mtime'];
-    if ($p_header['mdate'] && $p_header['mtime'])
-    {
-      // ----- Extract time
-      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
-      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
-      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
-
-      // ----- Extract date
-      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
-      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
-      $v_day = $p_header['mdate'] & 0x001F;
-
-      // ----- Get UNIX date format
-      $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
-
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
-    }
-    else
-    {
-      $p_header['mtime'] = time();
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
-    }
-
-    // ----- Other informations
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compression type : ".$v_data['compression']);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Version : ".$v_data['version']);
-
-    // TBC
-    //for(reset($v_data); $key = key($v_data); next($v_data)) {
-    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]);
-    //}
-
-    // ----- Set the stored filename
-    $p_header['stored_filename'] = $p_header['filename'];
-
-    // ----- Set the status field
-    $p_header['status'] = "ok";
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privReadCentralFileHeader()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privReadCentralFileHeader(&$p_header)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", "");
-    $v_result=1;
-
-    // ----- Read the 4 bytes signature
-    $v_binary_data = @fread($this->zip_fd, 4);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
-    $v_data = unpack('Vid', $v_binary_data);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
-
-    // ----- Check signature
-    if ($v_data['id'] != 0x02014b50)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature");
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Read the first 42 bytes of the header
-    $v_binary_data = fread($this->zip_fd, 42);
-
-    // ----- Look for invalid block size
-    if (strlen($v_binary_data) != 42)
-    {
-      $p_header['filename'] = "";
-      $p_header['status'] = "invalid_header";
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Extract the values
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'");
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'");
-    $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);
-
-    // ----- Get filename
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']);
-    if ($p_header['filename_len'] != 0)
-      $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']);
-    else
-      $p_header['filename'] = '';
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\'');
-
-    // ----- Get extra
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']);
-    if ($p_header['extra_len'] != 0)
-      $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']);
-    else
-      $p_header['extra'] = '';
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\'');
-
-    // ----- Get comment
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']);
-    if ($p_header['comment_len'] != 0)
-      $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']);
-    else
-      $p_header['comment'] = '';
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\'');
-
-    // ----- Extract properties
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\'');
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\'');
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\'');
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.$p_header['crc'].'\'');
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\'');
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\'');
-
-    // ----- Recuperate date in UNIX format
-    if ($p_header['mdate'] && $p_header['mtime'])
-    {
-      // ----- Extract time
-      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
-      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
-      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
-
-      // ----- Extract date
-      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
-      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
-      $v_day = $p_header['mdate'] & 0x001F;
-
-      // ----- Get UNIX date format
-      $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
-
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
-    }
-    else
-    {
-      $p_header['mtime'] = time();
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
-    }
-
-    // ----- Set the stored filename
-    $p_header['stored_filename'] = $p_header['filename'];
-
-    // ----- Set default status to ok
-    $p_header['status'] = 'ok';
-
-    // ----- Look if it is a directory
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'");
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')');
-    if (substr($p_header['filename'], -1) == '/')
-    {
-      $p_header['external'] = 0x41FF0010;
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.$p_header['external'].'\'');
-    }
-
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\'');
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privReadEndCentralDir()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privReadEndCentralDir(&$p_central_dir)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", "");
-    $v_result=1;
-
-    // ----- Go to the end of the zip file
-    $v_size = filesize($this->zipname);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size");
-    @fseek($this->zip_fd, $v_size);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\'');
-    if (@ftell($this->zip_fd) != $v_size)
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- First try : look if this is an archive with no commentaries (most of the time)
-    // in this case the end of central dir is at 22 bytes of the file end
-    $v_found = 0;
-    if ($v_size > 26) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment');
-      @fseek($this->zip_fd, $v_size-22);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\'');
-      if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
-      {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-
-      // ----- Read for bytes
-      $v_binary_data = @fread($this->zip_fd, 4);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
-      $v_data = @unpack('Vid', $v_binary_data);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
-
-      // ----- Check signature
-      if ($v_data['id'] == 0x06054b50) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position.");
-        $v_found = 1;
-      }
-
-      $v_pos = ftell($this->zip_fd);
-    }
-
-    // ----- Go back to the maximum possible size of the Central Dir End Record
-    if (!$v_found) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir');
-      $v_maximum_size = 65557; // 0xFFFF + 22;
-      if ($v_maximum_size > $v_size)
-        $v_maximum_size = $v_size;
-      @fseek($this->zip_fd, $v_size-$v_maximum_size);
-      if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
-      {
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\'');
-
-      // ----- Read byte per byte in order to find the signature
-      $v_pos = ftell($this->zip_fd);
-      $v_bytes = 0x00000000;
-      while ($v_pos < $v_size)
-      {
-        // ----- Read a byte
-        $v_byte = @fread($this->zip_fd, 1);
-
-        // -----  Add the byte
-        $v_bytes = ($v_bytes << 8) | Ord($v_byte);
-
-        // ----- Compare the bytes
-        if ($v_bytes == 0x504b0506)
-        {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\'');
-          $v_pos++;
-          break;
-        }
-
-        $v_pos++;
-      }
-
-      // ----- Look if not found end of central dir
-      if ($v_pos == $v_size)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature");
-
-        // ----- Error log
-        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
-
-        // ----- Return
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-        return PclZip::errorCode();
-      }
-    }
-
-    // ----- Read the first 18 bytes of the header
-    $v_binary_data = fread($this->zip_fd, 18);
-
-    // ----- Look for invalid block size
-    if (strlen($v_binary_data) != 18)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Extract the values
-    ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'");
-    ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'");
-    $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data);
-
-    // ----- Check the global size
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']);
-    if (($v_pos + $v_data['comment_size'] + 18) != $v_size)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Fail to find the right signature");
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Fail to find the right signature");
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Get comment
-    if ($v_data['comment_size'] != 0)
-      $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']);
-    else
-      $p_central_dir['comment'] = '';
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\'');
-
-    $p_central_dir['entries'] = $v_data['entries'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\'');
-    $p_central_dir['disk_entries'] = $v_data['disk_entries'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\'');
-    $p_central_dir['offset'] = $v_data['offset'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\'');
-    $p_central_dir['size'] = $v_data['size'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\'');
-    $p_central_dir['disk'] = $v_data['disk'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\'');
-    $p_central_dir['disk_start'] = $v_data['disk_start'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\'');
-
-    // TBC
-    //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) {
-    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]);
-    //}
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privDeleteByRule()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privDeleteByRule(&$p_result_list, &$p_options)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", "");
-    $v_result=1;
-    $v_list_detail = array();
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_result=$this->privOpenFd('rb')) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Read the central directory informations
-    $v_central_dir = array();
-    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
-    {
-      $this->privCloseFd();
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Go to beginning of File
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
-    @rewind($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
-
-    // ----- Scan all the files
-    // ----- Start at beginning of Central Dir
-    $v_pos_entry = $v_central_dir['offset'];
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
-    @rewind($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
-    if (@fseek($this->zip_fd, $v_pos_entry))
-    {
-      // ----- Close the zip file
-      $this->privCloseFd();
-
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
-
-    // ----- Read each entry
-    $v_header_list = array();
-    $j_start = 0;
-    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$i')");
-
-      // ----- Read the file header
-      $v_header_list[$v_nb_extracted] = array();
-      if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1)
-      {
-        // ----- Close the zip file
-        $this->privCloseFd();
-
-        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-        return $v_result;
-      }
-
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'");
-
-      // ----- Store the index
-      $v_header_list[$v_nb_extracted]['index'] = $i;
-
-      // ----- Look for the specific extract rules
-      $v_found = false;
-
-      // ----- Look for extract by name rule
-      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
-          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
-
-          // ----- Look if the filename is in the list
-          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
-
-              // ----- Look for a directory
-              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
-
-                  // ----- Look if the directory is in the filename path
-                  if (   (strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
-                      && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
-                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
-                      $v_found = true;
-                  }
-                  elseif (   (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
-                          && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
-                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory");
-                      $v_found = true;
-                  }
-              }
-              // ----- Look for a filename
-              elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
-                  $v_found = true;
-              }
-          }
-      }
-
-      // ----- Look for extract by ereg rule
-      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
-               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
-
-          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
-              $v_found = true;
-          }
-      }
-
-      // ----- Look for extract by preg rule
-      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
-               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
-
-          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
-              $v_found = true;
-          }
-      }
-
-      // ----- Look for extract by index rule
-      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
-               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
-          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
-
-          // ----- Look if the index is in the list
-          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
-              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
-
-              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
-                  $v_found = true;
-              }
-              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
-                  $j_start = $j+1;
-              }
-
-              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
-                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
-                  break;
-              }
-          }
-      }
-
-      // ----- Look for deletion
-      if ($v_found)
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted");
-        unset($v_header_list[$v_nb_extracted]);
-      }
-      else
-      {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted");
-        $v_nb_extracted++;
-      }
-    }
-
-    // ----- Look if something need to be deleted
-    if ($v_nb_extracted > 0) {
-
-        // ----- Creates a temporay file
-        $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
-
-        // ----- Creates a temporary zip archive
-        $v_temp_zip = new PclZip($v_zip_temp_name);
-
-        // ----- Open the temporary zip file in write mode
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode");
-        if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) {
-            $this->privCloseFd();
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-        }
-
-        // ----- Look which file need to be kept
-        for ($i=0; $i<sizeof($v_header_list); $i++) {
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Keep entry index '$i' : '".$v_header_list[$i]['filename']."'");
-
-            // ----- Calculate the position of the header
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset='". $v_header_list[$i]['offset']."'");
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
-            @rewind($this->zip_fd);
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
-            if (@fseek($this->zip_fd,  $v_header_list[$i]['offset'])) {
-                // ----- Close the zip file
-                $this->privCloseFd();
-                $v_temp_zip->privCloseFd();
-                @unlink($v_zip_temp_name);
-
-                // ----- Error log
-                PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
-                // ----- Return
-                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-                return PclZip::errorCode();
-            }
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
-
-            // ----- Read the file header
-            if (($v_result = $this->privReadFileHeader($v_header_list[$i])) != 1) {
-                // ----- Close the zip file
-                $this->privCloseFd();
-                $v_temp_zip->privCloseFd();
-                @unlink($v_zip_temp_name);
-
-                // ----- Return
-                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-                return $v_result;
-            }
-
-            // ----- Write the file header
-            if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
-                // ----- Close the zip file
-                $this->privCloseFd();
-                $v_temp_zip->privCloseFd();
-                @unlink($v_zip_temp_name);
-
-                // ----- Return
-                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-                return $v_result;
-            }
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'");
-
-            // ----- Read/write the data block
-            if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
-                // ----- Close the zip file
-                $this->privCloseFd();
-                $v_temp_zip->privCloseFd();
-                @unlink($v_zip_temp_name);
-
-                // ----- Return
-                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-                return $v_result;
-            }
-        }
-
-        // ----- Store the offset of the central dir
-        $v_offset = @ftell($v_temp_zip->zip_fd);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset");
-
-        // ----- Re-Create the Central Dir files header
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory");
-        for ($i=0; $i<sizeof($v_header_list); $i++) {
-            // ----- Create the file header
-            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset of file : ".$v_header_list[$i]['offset']);
-            if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
-                $v_temp_zip->privCloseFd();
-                $this->privCloseFd();
-                @unlink($v_zip_temp_name);
-
-                // ----- Return
-                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-                return $v_result;
-            }
-
-            // ----- Transform the header to a 'usable' info
-            $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
-        }
-
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer");
-
-        // ----- Zip file comment
-        $v_comment = '';
-        if (isset($p_options[PCLZIP_OPT_COMMENT])) {
-          $v_comment = $p_options[PCLZIP_OPT_COMMENT];
-        }
-
-        // ----- Calculate the size of the central header
-        $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset;
-
-        // ----- Create the central dir footer
-        if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) {
-            // ----- Reset the file list
-            unset($v_header_list);
-            $v_temp_zip->privCloseFd();
-            $this->privCloseFd();
-            @unlink($v_zip_temp_name);
-
-            // ----- Return
-            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-            return $v_result;
-        }
-
-        // ----- Close
-        $v_temp_zip->privCloseFd();
-        $this->privCloseFd();
-
-        // ----- Delete the zip file
-        // TBC : I should test the result ...
-        @unlink($this->zipname);
-
-        // ----- Rename the temporary file
-        // TBC : I should test the result ...
-        //@rename($v_zip_temp_name, $this->zipname);
-        PclZipUtilRename($v_zip_temp_name, $this->zipname);
-    
-        // ----- Destroy the temporary archive
-        unset($v_temp_zip);
-    }
-    
-    // ----- Remove every files : reset the file
-    else if ($v_central_dir['entries'] != 0) {
-        $this->privCloseFd();
-
-        if (($v_result = $this->privOpenFd('wb')) != 1) {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-
-        if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-
-        $this->privCloseFd();
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privDirCheck()
-  // Description :
-  //   Check if a directory exists, if not it creates it and all the parents directory
-  //   which may be useful.
-  // Parameters :
-  //   $p_dir : Directory path to check.
-  // Return Values :
-  //    1 : OK
-  //   -1 : Unable to create directory
-  // --------------------------------------------------------------------------------
-  function privDirCheck($p_dir, $p_is_dir=false)
-  {
-    $v_result = 1;
-
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'");
-
-    // ----- Remove the final '/'
-    if (($p_is_dir) && (substr($p_dir, -1)=='/'))
-    {
-      $p_dir = substr($p_dir, 0, strlen($p_dir)-1);
-    }
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'");
-
-    // ----- Check the directory availability
-    if ((is_dir($p_dir)) || ($p_dir == ""))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory");
-      return 1;
-    }
-
-    // ----- Extract parent directory
-    $p_parent_dir = dirname($p_dir);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_dir'");
-
-    // ----- Just a check
-    if ($p_parent_dir != $p_dir)
-    {
-      // ----- Look for parent directory
-      if ($p_parent_dir != "")
-      {
-        if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)
-        {
-          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-          return $v_result;
-        }
-      }
-    }
-
-    // ----- Create the directory
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'");
-    if (!@mkdir($p_dir, 0777))
-    {
-      // ----- Error log
-      PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'");
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created");
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privMerge()
-  // Description :
-  //   If $p_archive_to_add does not exist, the function exit with a success result.
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privMerge(&$p_archive_to_add)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'");
-    $v_result=1;
-
-    // ----- Look if the archive_to_add exists
-    if (!is_file($p_archive_to_add->zipname))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge.");
-
-      // ----- Nothing to merge, so merge is a success
-      $v_result = 1;
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Look if the archive exists
-    if (!is_file($this->zipname))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add.");
-
-      // ----- Do a duplicate
-      $v_result = $this->privDuplicate($p_archive_to_add->zipname);
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_result=$this->privOpenFd('rb')) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Read the central directory informations
-    $v_central_dir = array();
-    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
-    {
-      $this->privCloseFd();
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Go to beginning of File
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
-    @rewind($this->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
-
-    // ----- Open the archive_to_add file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode");
-    if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)
-    {
-      $this->privCloseFd();
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Read the central directory informations
-    $v_central_dir_to_add = array();
-    if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
-    {
-      $this->privCloseFd();
-      $p_archive_to_add->privCloseFd();
-
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Go to beginning of File
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
-    @rewind($p_archive_to_add->zip_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
-
-    // ----- Creates a temporay file
-    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
-
-    // ----- Open the temporary file in write mode
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
-    {
-      $this->privCloseFd();
-      $p_archive_to_add->privCloseFd();
-
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Copy the files from the archive to the temporary file
-    // TBC : Here I should better append the file and go back to erase the central dir
-    $v_size = $v_central_dir['offset'];
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-      $v_buffer = fread($this->zip_fd, $v_read_size);
-      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Copy the files from the archive_to_add into the temporary file
-    $v_size = $v_central_dir_to_add['offset'];
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-      $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);
-      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Store the offset of the central dir
-    $v_offset = @ftell($v_zip_temp_fd);
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
-
-    // ----- Copy the block of file headers from the old archive
-    $v_size = $v_central_dir['size'];
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-      $v_buffer = @fread($this->zip_fd, $v_read_size);
-      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Copy the block of file headers from the archive_to_add
-    $v_size = $v_central_dir_to_add['size'];
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-      $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);
-      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Merge the file comments
-    $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];
-
-    // ----- Calculate the size of the (new) central header
-    $v_size = @ftell($v_zip_temp_fd)-$v_offset;
-
-    // ----- Swap the file descriptor
-    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
-    // the following methods on the temporary fil and not the real archive fd
-    $v_swap = $this->zip_fd;
-    $this->zip_fd = $v_zip_temp_fd;
-    $v_zip_temp_fd = $v_swap;
-
-    // ----- Create the central dir footer
-    if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)
-    {
-      $this->privCloseFd();
-      $p_archive_to_add->privCloseFd();
-      @fclose($v_zip_temp_fd);
-      $this->zip_fd = null;
-
-      // ----- Reset the file list
-      unset($v_header_list);
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Swap back the file descriptor
-    $v_swap = $this->zip_fd;
-    $this->zip_fd = $v_zip_temp_fd;
-    $v_zip_temp_fd = $v_swap;
-
-    // ----- Close
-    $this->privCloseFd();
-    $p_archive_to_add->privCloseFd();
-
-    // ----- Close the temporary file
-    @fclose($v_zip_temp_fd);
-
-    // ----- Delete the zip file
-    // TBC : I should test the result ...
-    @unlink($this->zipname);
-
-    // ----- Rename the temporary file
-    // TBC : I should test the result ...
-    //@rename($v_zip_temp_name, $this->zipname);
-    PclZipUtilRename($v_zip_temp_name, $this->zipname);
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privDuplicate()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function privDuplicate($p_archive_filename)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'");
-    $v_result=1;
-
-    // ----- Look if the $p_archive_filename exists
-    if (!is_file($p_archive_filename))
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate.");
-
-      // ----- Nothing to duplicate, so duplicate is a success.
-      $v_result = 1;
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Open the zip file
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_result=$this->privOpenFd('wb')) != 1)
-    {
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-      return $v_result;
-    }
-
-    // ----- Open the temporary file in write mode
-    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
-    if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
-    {
-      $this->privCloseFd();
-
-      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode');
-
-      // ----- Return
-      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
-      return PclZip::errorCode();
-    }
-
-    // ----- Copy the files from the archive to the temporary file
-    // TBC : Here I should better append the file and go back to erase the central dir
-    $v_size = filesize($p_archive_filename);
-    while ($v_size != 0)
-    {
-      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes");
-      $v_buffer = fread($v_zip_temp_fd, $v_read_size);
-      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
-      $v_size -= $v_read_size;
-    }
-
-    // ----- Close
-    $this->privCloseFd();
-
-    // ----- Close the temporary file
-    @fclose($v_zip_temp_fd);
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privErrorLog()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function privErrorLog($p_error_code=0, $p_error_string='')
-  {
-    if (PCLZIP_ERROR_EXTERNAL == 1) {
-      PclError($p_error_code, $p_error_string);
-    }
-    else {
-      $this->error_code = $p_error_code;
-      $this->error_string = $p_error_string;
-    }
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : privErrorReset()
-  // Description :
-  // Parameters :
-  // --------------------------------------------------------------------------------
-  function privErrorReset()
-  {
-    if (PCLZIP_ERROR_EXTERNAL == 1) {
-      PclErrorReset();
-    }
-    else {
-      $this->error_code = 1;
-      $this->error_string = '';
-    }
-  }
-  // --------------------------------------------------------------------------------
-
-  }
-  // End of class
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZipUtilPathReduction()
-  // Description :
-  // Parameters :
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function PclZipUtilPathReduction($p_dir)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$p_dir'");
-    $v_result = "";
-
-    // ----- Look for not empty path
-    if ($p_dir != "")
-    {
-      // ----- Explode path by directory names
-      $v_list = explode("/", $p_dir);
-
-      // ----- Study directories from last to first
-      for ($i=sizeof($v_list)-1; $i>=0; $i--)
-      {
-        // ----- Look for current path
-        if ($v_list[$i] == ".")
-        {
-          // ----- Ignore this directory
-          // Should be the first $i=0, but no check is done
-        }
-        else if ($v_list[$i] == "..")
-        {
-          // ----- Ignore it and ignore the $i-1
-          $i--;
-        }
-        else if (($v_list[$i] == "") && ($i!=(sizeof($v_list)-1)) && ($i!=0))
-        {
-          // ----- Ignore only the double '//' in path,
-          // but not the first and last '/'
-        }
-        else
-        {
-          $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:"");
-        }
-      }
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZipUtilPathInclusion()
-  // Description :
-  //   This function indicates if the path $p_path is under the $p_dir tree. Or,
-  //   said in an other way, if the file or sub-dir $p_path is inside the dir
-  //   $p_dir.
-  //   The function indicates also if the path is exactly the same as the dir.
-  //   This function supports path with duplicated '/' like '//', but does not
-  //   support '.' or '..' statements.
-  // Parameters :
-  // Return Values :
-  //   0 if $p_path is not inside directory $p_dir
-  //   1 if $p_path is inside directory $p_dir
-  //   2 if $p_path is exactly the same as $p_dir
-  // --------------------------------------------------------------------------------
-  function PclZipUtilPathInclusion($p_dir, $p_path)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
-    $v_result = 1;
-
-    // ----- Explode dir and path by directory separator
-    $v_list_dir = explode("/", $p_dir);
-    $v_list_dir_size = sizeof($v_list_dir);
-    $v_list_path = explode("/", $p_path);
-    $v_list_path_size = sizeof($v_list_path);
-
-    // ----- Study directories paths
-    $i = 0;
-    $j = 0;
-    while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'");
-
-      // ----- Look for empty dir (path reduction)
-      if ($v_list_dir[$i] == '') {
-        $i++;
-        continue;
-      }
-      if ($v_list_path[$j] == '') {
-        $j++;
-        continue;
-      }
-
-      // ----- Compare the items
-      if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != ''))  {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different");
-        $v_result = 0;
-      }
-
-      // ----- Next items
-      $i++;
-      $j++;
-    }
-
-    // ----- Look if everything seems to be the same
-    if ($v_result) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break");
-      // ----- Skip all the empty items
-      while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++;
-      while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++;
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'");
-
-      if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) {
-        // ----- There are exactly the same
-        $v_result = 2;
-      }
-      else if ($i < $v_list_dir_size) {
-        // ----- The path is shorter than the dir
-        $v_result = 0;
-      }
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZipUtilCopyBlock()
-  // Description :
-  // Parameters :
-  //   $p_mode : read/write compression mode
-  //             0 : src & dest normal
-  //             1 : src gzip, dest normal
-  //             2 : src normal, dest gzip
-  //             3 : src & dest gzip
-  // Return Values :
-  // --------------------------------------------------------------------------------
-  function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode");
-    $v_result = 1;
-
-    if ($p_mode==0)
-    {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src)));
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest)));
-      while ($p_size != 0)
-      {
-        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-        $v_buffer = @fread($p_src, $v_read_size);
-        @fwrite($p_dest, $v_buffer, $v_read_size);
-        $p_size -= $v_read_size;
-      }
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src)));
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest)));
-    }
-    else if ($p_mode==1)
-    {
-      while ($p_size != 0)
-      {
-        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-        $v_buffer = @gzread($p_src, $v_read_size);
-        @fwrite($p_dest, $v_buffer, $v_read_size);
-        $p_size -= $v_read_size;
-      }
-    }
-    else if ($p_mode==2)
-    {
-      while ($p_size != 0)
-      {
-        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-        $v_buffer = @fread($p_src, $v_read_size);
-        @gzwrite($p_dest, $v_buffer, $v_read_size);
-        $p_size -= $v_read_size;
-      }
-    }
-    else if ($p_mode==3)
-    {
-      while ($p_size != 0)
-      {
-        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
-        $v_buffer = @gzread($p_src, $v_read_size);
-        @gzwrite($p_dest, $v_buffer, $v_read_size);
-        $p_size -= $v_read_size;
-      }
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZipUtilRename()
-  // Description :
-  //   This function tries to do a simple rename() function. If it fails, it
-  //   tries to copy the $p_src file in a new $p_dest file and then unlink the
-  //   first one.
-  // Parameters :
-  //   $p_src : Old filename
-  //   $p_dest : New filename
-  // Return Values :
-  //   1 on success, 0 on failure.
-  // --------------------------------------------------------------------------------
-  function PclZipUtilRename($p_src, $p_dest)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest");
-    $v_result = 1;
-
-    // ----- Try to rename the files
-    if (!@rename($p_src, $p_dest)) {
-      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink");
-
-      // ----- Try to copy & unlink the src
-      if (!@copy($p_src, $p_dest)) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file");
-        $v_result = 0;
-      }
-      else if (!@unlink($p_src)) {
-        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename");
-        $v_result = 0;
-      }
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZipUtilOptionText()
-  // Description :
-  //   Translate option value in text. Mainly for debug purpose.
-  // Parameters :
-  //   $p_option : the option value.
-  // Return Values :
-  //   The option text value.
-  // --------------------------------------------------------------------------------
-  function PclZipUtilOptionText($p_option)
-  {
-    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
-
-    switch ($p_option) {
-      case PCLZIP_OPT_PATH :
-        $v_result = 'PCLZIP_OPT_PATH';
-      break;
-      case PCLZIP_OPT_ADD_PATH :
-        $v_result = 'PCLZIP_OPT_ADD_PATH';
-      break;
-      case PCLZIP_OPT_REMOVE_PATH :
-        $v_result = 'PCLZIP_OPT_REMOVE_PATH';
-      break;
-      case PCLZIP_OPT_REMOVE_ALL_PATH :
-        $v_result = 'PCLZIP_OPT_REMOVE_ALL_PATH';
-      break;
-      case PCLZIP_OPT_EXTRACT_AS_STRING :
-        $v_result = 'PCLZIP_OPT_EXTRACT_AS_STRING';
-      break;
-      case PCLZIP_OPT_SET_CHMOD :
-        $v_result = 'PCLZIP_OPT_SET_CHMOD';
-      break;
-      case PCLZIP_OPT_BY_NAME :
-        $v_result = 'PCLZIP_OPT_BY_NAME';
-      break;
-      case PCLZIP_OPT_BY_INDEX :
-        $v_result = 'PCLZIP_OPT_BY_INDEX';
-      break;
-      case PCLZIP_OPT_BY_EREG :
-        $v_result = 'PCLZIP_OPT_BY_EREG';
-      break;
-      case PCLZIP_OPT_BY_PREG :
-        $v_result = 'PCLZIP_OPT_BY_PREG';
-      break;
-
-
-      case PCLZIP_CB_PRE_EXTRACT :
-        $v_result = 'PCLZIP_CB_PRE_EXTRACT';
-      break;
-      case PCLZIP_CB_POST_EXTRACT :
-        $v_result = 'PCLZIP_CB_POST_EXTRACT';
-      break;
-      case PCLZIP_CB_PRE_ADD :
-        $v_result = 'PCLZIP_CB_PRE_ADD';
-      break;
-      case PCLZIP_CB_POST_ADD :
-        $v_result = 'PCLZIP_CB_POST_ADD';
-      break;
-
-      default :
-        $v_result = 'Unknown';
-    }
-
-    // ----- Return
-    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
-    return $v_result;
-  }
-  // --------------------------------------------------------------------------------
-
-  // --------------------------------------------------------------------------------
-  // Function : PclZipUtilTranslateWinPath()
-  // Description :
-  //   Translate windows path by replacing '\' by '/' and optionally removing
-  //   drive letter.
-  // Parameters :
-  //   $p_path : path to translate.
-  //   $p_remove_disk_letter : true | false
-  // Return Values :
-  //   The path translated.
-  // --------------------------------------------------------------------------------
-  function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
-  {
-    if (stristr(php_uname(), 'windows')) {
-      // ----- Look for potential disk letter
-      if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
-          $p_path = substr($p_path, $v_position+1);
-      }
-      // ----- Change potential windows directory separator
-      if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
-          $p_path = strtr($p_path, '\\', '/');
-      }
-    }
-    return $p_path;
-  }
-  // --------------------------------------------------------------------------------
-
-?>
+<?php
+// --------------------------------------------------------------------------------
+// PhpConcept Library - Zip Module 2.1
+// --------------------------------------------------------------------------------
+// License GNU/LGPL - Vincent Blavet - December 2003
+// http://www.phpconcept.net
+// --------------------------------------------------------------------------------
+//
+// Presentation :
+//   PclZip is a PHP library that manage ZIP archives.
+//   So far tests show that archives generated by PclZip are readable by
+//   WinZip application and other tools.
+//
+// Description :
+//   See readme.txt and http://www.phpconcept.net
+//
+// Warning :
+//   This library and the associated files are non commercial, non professional
+//   work.
+//   It should not have unexpected results. However if any damage is caused by
+//   this software the author can not be responsible.
+//   The use of this software is at the risk of the user.
+//
+// --------------------------------------------------------------------------------
+// $Id: pclzip.lib.php,v 1.1.1.1 2005/01/30 10:31:59 rdjurovich Exp $
+// --------------------------------------------------------------------------------
+
+  // ----- Constants
+  define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
+  
+  // ----- File list separator
+  // In version 1.x of PclZip, the separator for file list is a space
+  // (which is not a very smart choice, specifically for windows paths !).
+  // A better separator should be a comma (,). This constant gives you the
+  // abilty to change that.
+  // However notice that changing this value, may have impact on existing
+  // scripts, using space separated filenames.
+  // Recommanded values for compatibility with older versions :
+  //define( 'PCLZIP_SEPARATOR', ' ' );
+  // Recommanded values for smart separation of filenames.
+  define( 'PCLZIP_SEPARATOR', ',' );
+
+  // ----- Error configuration
+  // 0 : PclZip Class integrated error handling
+  // 1 : PclError external library error handling. By enabling this
+  //     you must ensure that you have included PclError library.
+  // [2,...] : reserved for futur use
+  define( 'PCLZIP_ERROR_EXTERNAL', 0 );
+
+  // ----- Optional static temporary directory
+  //       By default temporary files are generated in the script current
+  //       path.
+  //       If defined :
+  //       - MUST BE terminated by a '/'.
+  //       - MUST be a valid, already created directory
+  //       Samples :
+  // define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
+  // define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
+  define( 'PCLZIP_TEMPORARY_DIR', '' );
+
+// --------------------------------------------------------------------------------
+// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
+// --------------------------------------------------------------------------------
+
+  // ----- Global variables
+  $g_pclzip_version = "2.1";
+
+  // ----- Error codes
+  //   -1 : Unable to open file in binary write mode
+  //   -2 : Unable to open file in binary read mode
+  //   -3 : Invalid parameters
+  //   -4 : File does not exist
+  //   -5 : Filename is too long (max. 255)
+  //   -6 : Not a valid zip file
+  //   -7 : Invalid extracted file size
+  //   -8 : Unable to create directory
+  //   -9 : Invalid archive extension
+  //  -10 : Invalid archive format
+  //  -11 : Unable to delete file (unlink)
+  //  -12 : Unable to rename file (rename)
+  //  -13 : Invalid header checksum
+  //  -14 : Invalid archive size
+  define( 'PCLZIP_ERR_USER_ABORTED', 2 );
+  define( 'PCLZIP_ERR_NO_ERROR', 0 );
+  define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
+  define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
+  define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
+  define( 'PCLZIP_ERR_MISSING_FILE', -4 );
+  define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
+  define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
+  define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
+  define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
+  define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
+  define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
+  define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
+  define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
+  define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
+  define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
+  define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
+  define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
+
+  // ----- Options values
+  define( 'PCLZIP_OPT_PATH', 77001 );
+  define( 'PCLZIP_OPT_ADD_PATH', 77002 );
+  define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
+  define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
+  define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
+  define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
+  define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
+  define( 'PCLZIP_OPT_BY_NAME', 77008 );
+  define( 'PCLZIP_OPT_BY_INDEX', 77009 );
+  define( 'PCLZIP_OPT_BY_EREG', 77010 );
+  define( 'PCLZIP_OPT_BY_PREG', 77011 );
+  define( 'PCLZIP_OPT_COMMENT', 77012 );
+  define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
+  define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
+  define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
+
+  // ----- Call backs values
+  define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
+  define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
+  define( 'PCLZIP_CB_PRE_ADD', 78003 );
+  define( 'PCLZIP_CB_POST_ADD', 78004 );
+  /* For futur use
+  define( 'PCLZIP_CB_PRE_LIST', 78005 );
+  define( 'PCLZIP_CB_POST_LIST', 78006 );
+  define( 'PCLZIP_CB_PRE_DELETE', 78007 );
+  define( 'PCLZIP_CB_POST_DELETE', 78008 );
+  */
+
+  // --------------------------------------------------------------------------------
+  // Class : PclZip
+  // Description :
+  //   PclZip is the class that represent a Zip archive.
+  //   The public methods allow the manipulation of the archive.
+  // Attributes :
+  //   Attributes must not be accessed directly.
+  // Methods :
+  //   PclZip() : Object creator
+  //   create() : Creates the Zip archive
+  //   listContent() : List the content of the Zip archive
+  //   extract() : Extract the content of the archive
+  //   properties() : List the properties of the archive
+  // --------------------------------------------------------------------------------
+  class PclZip
+  {
+    // ----- Filename of the zip file
+    var $zipname = '';
+
+    // ----- File descriptor of the zip file
+    var $zip_fd = 0;
+
+    // ----- Internal error handling
+    var $error_code = 1;
+    var $error_string = '';
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZip()
+  // Description :
+  //   Creates a PclZip object and set the name of the associated Zip archive
+  //   filename.
+  //   Note that no real action is taken, if the archive does not exist it is not
+  //   created. Use create() for that.
+  // --------------------------------------------------------------------------------
+  function PclZip($p_zipname)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::PclZip', "zipname=$p_zipname");
+
+    // ----- Tests the zlib
+    if (!function_exists('gzopen'))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 1, "zlib extension seems to be missing");
+      die('Abort '.basename(__FILE__).' : Missing zlib extensions');
+    }
+
+    // ----- Set the attributes
+    $this->zipname = $p_zipname;
+    $this->zip_fd = 0;
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1);
+    return;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   create($p_filelist, $p_add_dir="", $p_remove_dir="")
+  //   create($p_filelist, $p_option, $p_option_value, ...)
+  // Description :
+  //   This method supports two different synopsis. The first one is historical.
+  //   This method creates a Zip Archive. The Zip file is created in the
+  //   filesystem. The files and directories indicated in $p_filelist
+  //   are added in the archive. See the parameters description for the
+  //   supported format of $p_filelist.
+  //   When a directory is in the list, the directory and its content is added
+  //   in the archive.
+  //   In this synopsis, the function takes an optional variable list of
+  //   options. See bellow the supported options.
+  // Parameters :
+  //   $p_filelist : An array containing file or directory names, or
+  //                 a string containing one filename or one directory name, or
+  //                 a string containing a list of filenames and/or directory
+  //                 names separated by spaces.
+  //   $p_add_dir : A path to add before the real path of the archived file,
+  //                in order to have it memorized in the archive.
+  //   $p_remove_dir : A path to remove from the real path of the file to archive,
+  //                   in order to have a shorter path memorized in the archive.
+  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+  //                   is removed first, before $p_add_dir is added.
+  // Options :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_COMMENT :
+  //   PCLZIP_CB_PRE_ADD :
+  //   PCLZIP_CB_POST_ADD :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the added files, with a status of the add action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+//  function create($p_filelist, $p_add_dir="", $p_remove_dir="")
+  function create($p_filelist /*, options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$p_filelist', ...");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Set default values
+    $v_options = array();
+    $v_add_path = "";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_ADD => 'optional',
+                                                   PCLZIP_CB_POST_ADD => 'optional',
+                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
+                                                   PCLZIP_OPT_COMMENT => 'optional' ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          $v_add_path = $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_add_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+		                       "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "add_path='$v_add_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_all_path?'true':'false')."'");
+
+    // ----- Look if the $p_filelist is really an array
+    $p_result_list = array();
+    if (is_array($p_filelist))
+    {
+      // ----- Call the create fct
+      $v_result = $this->privCreate($p_filelist, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Look if the $p_filelist is a string
+    else if (is_string($p_filelist))
+    {
+      // ----- Create a list with the elements from the string
+      $v_list = explode(PCLZIP_SEPARATOR, $p_filelist);
+
+      // ----- Call the create fct
+      $v_result = $this->privCreate($v_list, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    if ($v_result != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return 0;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
+    return $p_result_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   add($p_filelist, $p_add_dir="", $p_remove_dir="")
+  //   add($p_filelist, $p_option, $p_option_value, ...)
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This methods add the list of files in an existing archive.
+  //   If a file with the same name already exists, it is added at the end of the
+  //   archive, the first one is still present.
+  //   If the archive does not exist, it is created.
+  // Parameters :
+  //   $p_filelist : An array containing file or directory names, or
+  //                 a string containing one filename or one directory name, or
+  //                 a string containing a list of filenames and/or directory
+  //                 names separated by spaces.
+  //   $p_add_dir : A path to add before the real path of the archived file,
+  //                in order to have it memorized in the archive.
+  //   $p_remove_dir : A path to remove from the real path of the file to archive,
+  //                   in order to have a shorter path memorized in the archive.
+  //                   When $p_add_dir and $p_remove_dir are set, $p_remove_dir
+  //                   is removed first, before $p_add_dir is added.
+  // Options :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_COMMENT :
+  //   PCLZIP_OPT_ADD_COMMENT :
+  //   PCLZIP_OPT_PREPEND_COMMENT :
+  //   PCLZIP_CB_PRE_ADD :
+  //   PCLZIP_CB_POST_ADD :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the added files, with a status of the add action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+//  function add($p_filelist, $p_add_dir="", $p_remove_dir="")
+  function add($p_filelist /* options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$p_filelist', ...");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Set default values
+    $v_options = array();
+    $v_add_path = "";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+    $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_ADD => 'optional',
+                                                   PCLZIP_CB_POST_ADD => 'optional',
+                                                   PCLZIP_OPT_NO_COMPRESSION => 'optional',
+                                                   PCLZIP_OPT_COMMENT => 'optional',
+                                                   PCLZIP_OPT_ADD_COMMENT => 'optional',
+                                                   PCLZIP_OPT_PREPEND_COMMENT => 'optional' ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          $v_add_path = $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_add_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "add_path='$v_add_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_all_path?'true':'false')."'");
+
+    // ----- Look if the $p_filelist is really an array
+    $p_result_list = array();
+    if (is_array($p_filelist))
+    {
+      // ----- Call the create fct
+      $v_result = $this->privAdd($p_filelist, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Look if the $p_filelist is a string
+    else if (is_string($p_filelist))
+    {
+      // ----- Create a list with the elements from the string
+      $v_list = explode(PCLZIP_SEPARATOR, $p_filelist);
+
+      // ----- Call the create fct
+      $v_result = $this->privAdd($v_list, $p_result_list, $v_add_path, $v_remove_path, $v_remove_all_path, $v_options);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    if ($v_result != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return 0;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
+    return $p_result_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : listContent()
+  // Description :
+  //   This public method, gives the list of the files and directories, with their
+  //   properties.
+  //   The properties of each entries in the list are (used also in other functions) :
+  //     filename : Name of the file. For a create or add action it is the filename
+  //                given by the user. For an extract function it is the filename
+  //                of the extracted file.
+  //     stored_filename : Name of the file / directory stored in the archive.
+  //     size : Size of the stored file.
+  //     compressed_size : Size of the file's data compressed in the archive
+  //                       (without the headers overhead)
+  //     mtime : Last known modification date of the file (UNIX timestamp)
+  //     comment : Comment associated with the file
+  //     folder : true | false
+  //     index : index of the file in the archive
+  //     status : status of the action (depending of the action) :
+  //              Values are :
+  //                ok : OK !
+  //                filtered : the file / dir is not extracted (filtered by user)
+  //                already_a_directory : the file can not be extracted because a
+  //                                      directory with the same name already exists
+  //                write_protected : the file can not be extracted because a file
+  //                                  with the same name already exists and is
+  //                                  write protected
+  //                newer_exist : the file was not extracted because a newer file exists
+  //                path_creation_fail : the file is not extracted because the folder
+  //                                     does not exists and can not be created
+  //                write_error : the file was not extracted because there was a
+  //                              error while writing the file
+  //                read_error : the file was not extracted because there was a error
+  //                             while reading the file
+  //                invalid_header : the file was not extracted because of an archive
+  //                                 format error (bad file header)
+  //   Note that each time a method can continue operating when there
+  //   is an action error on a file, the error is only logged in the file status.
+  // Return Values :
+  //   0 on an unrecoverable failure,
+  //   The list of the files in the archive.
+  // --------------------------------------------------------------------------------
+  function listContent()
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', "");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Call the extracting fct
+    $p_list = array();
+    if (($v_result = $this->privList($p_list)) != 1)
+    {
+      unset($p_list);
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+      return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   extract($p_path="./", $p_remove_path="")
+  //   extract([$p_option, $p_option_value, ...])
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This method extract all the files / directories from the archive to the
+  //   folder indicated in $p_path.
+  //   If you want to ignore the 'root' part of path of the memorized files
+  //   you can indicate this in the optional $p_remove_path parameter.
+  //   By default, if a newer file with the same name already exists, the
+  //   file is not extracted.
+  //
+  //   If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
+  //   are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
+  //   at the end of the path value of PCLZIP_OPT_PATH.
+  // Parameters :
+  //   $p_path : Path where the files and directories are to be extracted
+  //   $p_remove_path : First part ('root' part) of the memorized path
+  //                    (if any similar) to remove while extracting.
+  // Options :
+  //   PCLZIP_OPT_PATH :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_CB_PRE_EXTRACT :
+  //   PCLZIP_CB_POST_EXTRACT :
+  // Return Values :
+  //   0 or a negative value on failure,
+  //   The list of the extracted files, with a status of the action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  //function extract($p_path="./", $p_remove_path="")
+  function extract(/* options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", "");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+    $v_path = "./";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Default values for option
+    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+
+    // ----- Look for arguments
+    if ($v_size > 0) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
+                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
+                                                   PCLZIP_OPT_SET_CHMOD => 'optional',
+                                                   PCLZIP_OPT_BY_NAME => 'optional',
+                                                   PCLZIP_OPT_BY_EREG => 'optional',
+                                                   PCLZIP_OPT_BY_PREG => 'optional',
+                                                   PCLZIP_OPT_BY_INDEX => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional' ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_PATH])) {
+          $v_path = $v_options[PCLZIP_OPT_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          // ----- Check for '/' in last path char
+          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
+            $v_path .= '/';
+          }
+          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
+
+    // ----- Call the extracting fct
+    $p_list = array();
+    $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,
+	                                     $v_remove_all_path, $v_options);
+    if ($v_result < 1) {
+      unset($p_list);
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+      return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   extractByIndex($p_index, $p_path="./", $p_remove_path="")
+  //   extractByIndex($p_index, [$p_option, $p_option_value, ...])
+  // Description :
+  //   This method supports two synopsis. The first one is historical.
+  //   This method is doing a partial extract of the archive.
+  //   The extracted files or folders are identified by their index in the
+  //   archive (from 0 to n).
+  //   Note that if the index identify a folder, only the folder entry is
+  //   extracted, not all the files included in the archive.
+  // Parameters :
+  //   $p_index : A single index (integer) or a string of indexes of files to
+  //              extract. The form of the string is "0,4-6,8-12" with only numbers
+  //              and '-' for range or ',' to separate ranges. No spaces or ';'
+  //              are allowed.
+  //   $p_path : Path where the files and directories are to be extracted
+  //   $p_remove_path : First part ('root' part) of the memorized path
+  //                    (if any similar) to remove while extracting.
+  // Options :
+  //   PCLZIP_OPT_PATH :
+  //   PCLZIP_OPT_ADD_PATH :
+  //   PCLZIP_OPT_REMOVE_PATH :
+  //   PCLZIP_OPT_REMOVE_ALL_PATH :
+  //   PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
+  //     not as files.
+  //     The resulting content is in a new field 'content' in the file
+  //     structure.
+  //     This option must be used alone (any other options are ignored).
+  //   PCLZIP_CB_PRE_EXTRACT :
+  //   PCLZIP_CB_POST_EXTRACT :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the extracted files, with a status of the action.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function extractByIndex($p_index /* $options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ...");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+    $v_path = "./";
+    $v_remove_path = "";
+    $v_remove_all_path = false;
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Default values for option
+    $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+
+    // ----- Look for arguments
+    if ($v_size > 1) {
+      // ----- Get the arguments
+      $v_arg_list = &func_get_args();
+
+      // ----- Remove form the options list the first argument
+      array_shift($v_arg_list);
+      $v_size--;
+
+      // ----- Look for first arg
+      if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
+
+        // ----- Parse the options
+        $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                            array (PCLZIP_OPT_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_PATH => 'optional',
+                                                   PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
+                                                   PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
+                                                   PCLZIP_OPT_ADD_PATH => 'optional',
+                                                   PCLZIP_CB_PRE_EXTRACT => 'optional',
+                                                   PCLZIP_CB_POST_EXTRACT => 'optional',
+                                                   PCLZIP_OPT_SET_CHMOD => 'optional' ));
+        if ($v_result != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+          return 0;
+        }
+
+        // ----- Set the arguments
+        if (isset($v_options[PCLZIP_OPT_PATH])) {
+          $v_path = $v_options[PCLZIP_OPT_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
+          $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
+          $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
+        }
+        if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
+          // ----- Check for '/' in last path char
+          if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
+            $v_path .= '/';
+          }
+          $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
+        }
+        if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
+          $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set.");
+        }
+        else {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set.");
+        }
+      }
+
+      // ----- Look for 2 args
+      // Here we need to support the first historic synopsis of the
+      // method.
+      else {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
+
+        // ----- Get the first argument
+        $v_path = $v_arg_list[0];
+
+        // ----- Look for the optional second argument
+        if ($v_size == 2) {
+          $v_remove_path = $v_arg_list[1];
+        }
+        else if ($v_size > 2) {
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return 0;
+        }
+      }
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
+
+    // ----- Trick
+    // Here I want to reuse extractByRule(), so I need to parse the $p_index
+    // with privParseOptions()
+    $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index);
+    $v_options_trick = array();
+    $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick,
+                                        array (PCLZIP_OPT_BY_INDEX => 'optional' ));
+    if ($v_result != 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+        return 0;
+    }
+    $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX];
+
+    // ----- Call the extracting fct
+    if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+        return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function :
+  //   delete([$p_option, $p_option_value, ...])
+  // Description :
+  // Parameters :
+  //   None
+  // Options :
+  //   PCLZIP_OPT_BY_INDEX :
+  // Return Values :
+  //   0 on failure,
+  //   The list of the files which are still present in the archive.
+  //   (see PclZip::listContent() for list entry format)
+  // --------------------------------------------------------------------------------
+  function delete(/* options */)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", "");
+    $v_result=1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Set default values
+    $v_options = array();
+
+    // ----- Look for variable options arguments
+    $v_size = func_num_args();
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
+
+    // ----- Look for no arguments
+    if ($v_size <= 0) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing arguments");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+        return 0;
+    }
+
+    // ----- Get the arguments
+    $v_arg_list = &func_get_args();
+
+    // ----- Parse the options
+    $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
+                                        array (PCLZIP_OPT_BY_NAME => 'optional',
+                                               PCLZIP_OPT_BY_EREG => 'optional',
+                                               PCLZIP_OPT_BY_PREG => 'optional',
+                                               PCLZIP_OPT_BY_INDEX => 'optional' ));
+    if ($v_result != 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+        return 0;
+    }
+
+    // ----- Check that at least one rule is set
+    if (   (!isset($v_options[PCLZIP_OPT_BY_NAME]))
+        && (!isset($v_options[PCLZIP_OPT_BY_EREG]))
+        && (!isset($v_options[PCLZIP_OPT_BY_PREG]))
+        && (!isset($v_options[PCLZIP_OPT_BY_INDEX]))) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "At least one filtering rule must be set");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+        return 0;
+    }
+
+    // ----- Call the delete fct
+    $v_list = array();
+    if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1)
+    {
+      unset($v_list);
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
+      return(0);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list);
+    return $v_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : deleteByIndex()
+  // Description :
+  //   ***** Deprecated *****
+  //   delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
+  // --------------------------------------------------------------------------------
+  function deleteByIndex($p_index)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
+    
+    $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
+    return $p_list;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : properties()
+  // Description :
+  //   This method gives the properties of the archive.
+  //   The properties are :
+  //     nb : Number of files in the archive
+  //     comment : Comment associated with the archive file
+  //     status : not_exist, ok
+  // Parameters :
+  //   None
+  // Return Values :
+  //   0 on failure,
+  //   An array with the archive properties.
+  // --------------------------------------------------------------------------------
+  function properties()
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", "");
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Default properties
+    $v_prop = array();
+    $v_prop['comment'] = '';
+    $v_prop['nb'] = 0;
+    $v_prop['status'] = 'not_exist';
+
+    // ----- Look if file exists
+    if (@is_file($this->zipname))
+    {
+      // ----- Open the zip file
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0);
+        return 0;
+      }
+
+      // ----- Read the central directory informations
+      $v_central_dir = array();
+      if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+        return 0;
+      }
+
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      // ----- Set the user attributes
+      $v_prop['comment'] = $v_central_dir['comment'];
+      $v_prop['nb'] = $v_central_dir['entries'];
+      $v_prop['status'] = 'ok';
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop);
+    return $v_prop;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : duplicate()
+  // Description :
+  //   This method creates an archive by copying the content of an other one. If
+  //   the archive already exist, it is replaced by the new one without any warning.
+  // Parameters :
+  //   $p_archive : The filename of a valid archive, or
+  //                a valid PclZip object.
+  // Return Values :
+  //   1 on success.
+  //   0 or a negative value on error (error code).
+  // --------------------------------------------------------------------------------
+  function duplicate($p_archive)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", "");
+    $v_result = 1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Look if the $p_archive is a PclZip object
+    if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'");
+
+      // ----- Duplicate the archive
+      $v_result = $this->privDuplicate($p_archive->zipname);
+    }
+
+    // ----- Look if the $p_archive is a string (so a filename)
+    else if (is_string($p_archive))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$p_archive'");
+
+      // ----- Check that $p_archive is a valid zip file
+      // TBC : Should also check the archive format
+      if (!is_file($p_archive)) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
+        $v_result = PCLZIP_ERR_MISSING_FILE;
+      }
+      else {
+        // ----- Duplicate the archive
+        $v_result = $this->privDuplicate($p_archive);
+      }
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : merge()
+  // Description :
+  //   This method merge the $p_archive_to_add archive at the end of the current
+  //   one ($this).
+  //   If the archive ($this) does not exist, the merge becomes a duplicate.
+  //   If the $p_archive_to_add archive does not exist, the merge is a success.
+  // Parameters :
+  //   $p_archive_to_add : It can be directly the filename of a valid zip archive,
+  //                       or a PclZip object archive.
+  // Return Values :
+  //   1 on success,
+  //   0 or negative values on error (see below).
+  // --------------------------------------------------------------------------------
+  function merge($p_archive_to_add)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", "");
+    $v_result = 1;
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Check archive
+    if (!$this->privCheckFormat()) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
+      return(0);
+    }
+
+    // ----- Look if the $p_archive_to_add is a PclZip object
+    if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object");
+
+      // ----- Merge the archive
+      $v_result = $this->privMerge($p_archive_to_add);
+    }
+
+    // ----- Look if the $p_archive_to_add is a string (so a filename)
+    else if (is_string($p_archive_to_add))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename");
+
+      // ----- Create a temporary archive
+      $v_object_archive = new PclZip($p_archive_to_add);
+
+      // ----- Merge the archive
+      $v_result = $this->privMerge($v_object_archive);
+    }
+
+    // ----- Invalid variable
+    else
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
+      $v_result = PCLZIP_ERR_INVALID_PARAMETER;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+
+
+  // --------------------------------------------------------------------------------
+  // Function : errorCode()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorCode()
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      return(PclErrorCode());
+    }
+    else {
+      return($this->error_code);
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : errorName()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorName($p_with_code=false)
+  {
+    $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
+                      PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
+                      PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
+                      PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER',
+                      PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE',
+                      PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG',
+                      PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP',
+                      PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE',
+                      PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL',
+                      PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION',
+                      PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT',
+                      PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL',
+                      PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL',
+                      PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM',
+                      PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP',
+                      PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE',
+                      PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE' );
+
+    if (isset($v_name[$this->error_code])) {
+      $v_value = $v_name[$this->error_code];
+    }
+    else {
+      $v_value = 'NoName';
+    }
+
+    if ($p_with_code) {
+      return($v_value.' ('.$this->error_code.')');
+    }
+    else {
+      return($v_value);
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : errorInfo()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function errorInfo($p_full=false)
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      return(PclErrorString());
+    }
+    else {
+      if ($p_full) {
+        return($this->errorName(true)." : ".$this->error_string);
+      }
+      else {
+        return($this->error_string." [code ".$this->error_code."]");
+      }
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+
+// --------------------------------------------------------------------------------
+// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
+// *****                                                        *****
+// *****       THESES FUNCTIONS MUST NOT BE USED DIRECTLY       *****
+// --------------------------------------------------------------------------------
+
+
+
+  // --------------------------------------------------------------------------------
+  // Function : privCheckFormat()
+  // Description :
+  //   This method check that the archive exists and is a valid zip archive.
+  //   Several level of check exists. (futur)
+  // Parameters :
+  //   $p_level : Level of check. Default 0.
+  //              0 : Check the first bytes (magic codes) (default value))
+  //              1 : 0 + Check the central directory (futur)
+  //              2 : 1 + Check each file header (futur)
+  // Return Values :
+  //   true on success,
+  //   false on error, the error code is set.
+  // --------------------------------------------------------------------------------
+  function privCheckFormat($p_level=0)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", "");
+    $v_result = true;
+
+	// ----- Reset the file system cache
+    clearstatcache();
+
+    // ----- Reset the error handler
+    $this->privErrorReset();
+
+    // ----- Look if the file exits
+    if (!is_file($this->zipname)) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'");
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
+      return(false);
+    }
+
+    // ----- Check that the file is readeable
+    if (!is_readable($this->zipname)) {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
+      return(false);
+    }
+
+    // ----- Check the magic code
+    // TBC
+
+    // ----- Check the central header
+    // TBC
+
+    // ----- Check each file header
+    // TBC
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privParseOptions()
+  // Description :
+  //   This internal methods reads the variable list of arguments ($p_options_list,
+  //   $p_size) and generate an array with the options and values ($v_result_list).
+  //   $v_requested_options contains the options that can be present and those that
+  //   must be present.
+  //   $v_requested_options is an array, with the option value as key, and 'optional',
+  //   or 'mandatory' as value.
+  // Parameters :
+  //   See above.
+  // Return Values :
+  //   1 on success.
+  //   0 on failure.
+  // --------------------------------------------------------------------------------
+  function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
+    $v_result=1;
+
+    // ----- Read the options
+    $i=0;
+    while ($i<$p_size) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'");
+
+      // ----- Check if the option is requested
+      if (!isset($v_requested_options[$p_options_list[$i]])) {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+
+      // ----- Look for next option
+      switch ($p_options_list[$i]) {
+        // ----- Look for options that request a path value
+        case PCLZIP_OPT_PATH :
+        case PCLZIP_OPT_REMOVE_PATH :
+        case PCLZIP_OPT_ADD_PATH :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request an array of string for value
+        case PCLZIP_OPT_BY_NAME :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
+          }
+          else if (is_array($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request an EREG or PREG expression
+        case PCLZIP_OPT_BY_EREG :
+        case PCLZIP_OPT_BY_PREG :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that takes a string
+        case PCLZIP_OPT_COMMENT :
+        case PCLZIP_OPT_ADD_COMMENT :
+        case PCLZIP_OPT_PREPEND_COMMENT :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
+			                     "Missing parameter value for option '"
+								 .PclZipUtilOptionText($p_options_list[$i])
+								 ."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          if (is_string($p_options_list[$i+1])) {
+              $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE,
+			                     "Wrong parameter value for option '"
+								 .PclZipUtilOptionText($p_options_list[$i])
+								 ."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request an array of index
+        case PCLZIP_OPT_BY_INDEX :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_work_list = array();
+          if (is_string($p_options_list[$i+1])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a string '".$p_options_list[$i+1]."'");
+
+              // ----- Remove spaces
+              $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');
+
+              // ----- Parse items
+              $v_work_list = explode(",", $p_options_list[$i+1]);
+          }
+          else if (is_integer($p_options_list[$i+1])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an integer '".$p_options_list[$i+1]."'");
+              $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
+          }
+          else if (is_array($p_options_list[$i+1])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array");
+              $v_work_list = $p_options_list[$i+1];
+          }
+          else {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+          
+          // ----- Reduce the index list
+          // each index item in the list must be a couple with a start and
+          // an end value : [0,3], [5-5], [8-10], ...
+          // ----- Check the format of each item
+          $v_sort_flag=false;
+          $v_sort_value=0;
+          for ($j=0; $j<sizeof($v_work_list); $j++) {
+              // ----- Explode the item
+              $v_item_list = explode("-", $v_work_list[$j]);
+              $v_size_item_list = sizeof($v_item_list);
+              
+              // ----- TBC : Here we might check that each item is a
+              // real integer ...
+              
+              // ----- Look for single value
+              if ($v_size_item_list == 1) {
+                  // ----- Set the option value
+                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
+                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
+              }
+              elseif ($v_size_item_list == 2) {
+                  // ----- Set the option value
+                  $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
+                  $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
+              }
+              else {
+                  // ----- Error log
+                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+                  // ----- Return
+                  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                  return PclZip::errorCode();
+              }
+
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extracted index item = [".$v_result_list[$p_options_list[$i]][$j]['start'].",".$v_result_list[$p_options_list[$i]][$j]['end']."]");
+
+              // ----- Look for list sort
+              if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The list should be sorted ...");
+                  $v_sort_flag=true;
+
+                  // ----- TBC : An automatic sort should be writen ...
+                  // ----- Error log
+                  PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+                  // ----- Return
+                  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                  return PclZip::errorCode();
+              }
+              $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
+          }
+          
+          // ----- Sort the items
+          if ($v_sort_flag) {
+              // TBC : To Be Completed
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "List sorting is not yet write ...");
+          }
+
+          // ----- Next option
+          $i++;
+        break;
+
+        // ----- Look for options that request no value
+        case PCLZIP_OPT_REMOVE_ALL_PATH :
+        case PCLZIP_OPT_EXTRACT_AS_STRING :
+        case PCLZIP_OPT_NO_COMPRESSION :
+        case PCLZIP_OPT_EXTRACT_IN_OUTPUT :
+          $v_result_list[$p_options_list[$i]] = true;
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+        break;
+
+        // ----- Look for options that request an octal value
+        case PCLZIP_OPT_SET_CHMOD :
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
+          $i++;
+        break;
+
+        // ----- Look for options that request a call-back
+        case PCLZIP_CB_PRE_EXTRACT :
+        case PCLZIP_CB_POST_EXTRACT :
+        case PCLZIP_CB_PRE_ADD :
+        case PCLZIP_CB_POST_ADD :
+        /* for futur use
+        case PCLZIP_CB_PRE_DELETE :
+        case PCLZIP_CB_POST_DELETE :
+        case PCLZIP_CB_PRE_LIST :
+        case PCLZIP_CB_POST_LIST :
+        */
+          // ----- Check the number of parameters
+          if (($i+1) >= $p_size) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Get the value
+          $v_function_name = $p_options_list[$i+1];
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'");
+
+          // ----- Check that the value is a valid existing function
+          if (!function_exists($v_function_name)) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+
+          // ----- Set the attribute
+          $v_result_list[$p_options_list[$i]] = $v_function_name;
+          $i++;
+        break;
+
+        default :
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
+		                       "Unknown parameter '"
+							   .$p_options_list[$i]."'");
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return PclZip::errorCode();
+      }
+
+      // ----- Next options
+      $i++;
+    }
+
+    // ----- Look for mandatory options
+    if ($v_requested_options !== false) {
+      for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
+        // ----- Look for mandatory option
+        if ($v_requested_options[$key] == 'mandatory') {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")");
+          // ----- Look if present
+          if (!isset($v_result_list[$key])) {
+            // ----- Error log
+            PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+            return PclZip::errorCode();
+          }
+        }
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCreate()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privCreate($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list, result_list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Open the file in write mode
+    if (($v_result = $this->privOpenFd('wb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Add the list of files
+    $v_result = $this->privAddList($p_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAdd()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAdd($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list, result_list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Look if the archive exists or is empty
+    if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it.");
+
+      // ----- Do a create
+      $v_result = $this->privCreate($p_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+
+    // ----- Creates a temporay file
+    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+    // ----- Open the temporary file in write mode
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
+    {
+      $this->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = $v_central_dir['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Swap the file descriptor
+    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
+    // the following methods on the temporary fil and not the real archive
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Add the files
+    $v_header_list = array();
+    if (($v_result = $this->privAddFileList($p_list, $v_header_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+    {
+      fclose($v_zip_temp_fd);
+      $this->privCloseFd();
+      @unlink($v_zip_temp_name);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
+
+    // ----- Copy the block of file headers from the old archive
+    $v_size = $v_central_dir['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = @fread($v_zip_temp_fd, $v_read_size);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Create the Central Dir files header
+    for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
+    {
+      // ----- Create the file header
+      if ($v_header_list[$i]['status'] == 'ok') {
+        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+          fclose($v_zip_temp_fd);
+          $this->privCloseFd();
+          @unlink($v_zip_temp_name);
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+        $v_count++;
+      }
+
+      // ----- Transform the header to a 'usable' info
+      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+    }
+
+    // ----- Zip file comment
+    $v_comment = $v_central_dir['comment'];
+    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+    }
+    if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) {
+      $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT];
+    }
+    if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment;
+    }
+
+    // ----- Calculate the size of the central header
+    $v_size = @ftell($this->zip_fd)-$v_offset;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
+    {
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Swap back the file descriptor
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Delete the zip file
+    // TBC : I should test the result ...
+    @unlink($this->zipname);
+
+    // ----- Rename the temporary file
+    // TBC : I should test the result ...
+    //@rename($v_zip_temp_name, $this->zipname);
+    PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privOpenFd()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privOpenFd($p_mode)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$p_mode);
+    $v_result=1;
+
+    // ----- Look if already open
+    if ($this->zip_fd != 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode');
+    if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privCloseFd()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privCloseFd()
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", "");
+    $v_result=1;
+
+    if ($this->zip_fd != 0)
+      @fclose($this->zip_fd);
+    $this->zip_fd = 0;
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddList()
+  // Description :
+  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
+  //   different from the real path of the file. This is usefull if you want to have PclTar
+  //   running in any directory, and memorize relative path from an other directory.
+  // Parameters :
+  //   $p_list : An array containing the file or directory names to add in the tar
+  //   $p_result_list : list of added files with their properties (specially the status field)
+  //   $p_add_dir : Path to add in the filename path archived
+  //   $p_remove_dir : Path to remove in the filename path archived
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+
+    // ----- Add the files
+    $v_header_list = array();
+    if (($v_result = $this->privAddFileList($p_list, $v_header_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($this->zip_fd);
+
+    // ----- Create the Central Dir files header
+    for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
+    {
+      // ----- Create the file header
+      if ($v_header_list[$i]['status'] == 'ok') {
+        if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+        $v_count++;
+      }
+
+      // ----- Transform the header to a 'usable' info
+      $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+    }
+
+    // ----- Zip file comment
+    $v_comment = '';
+    if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+      $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+    }
+
+    // ----- Calculate the size of the central header
+    $v_size = @ftell($this->zip_fd)-$v_offset;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1)
+    {
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFileList()
+  // Description :
+  //   $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
+  //   different from the real path of the file. This is usefull if you want to
+  //   run the lib in any directory, and memorize relative path from an other directory.
+  // Parameters :
+  //   $p_list : An array containing the file or directory names to add in the tar
+  //   $p_result_list : list of added files with their properties (specially the status field)
+  //   $p_add_dir : Path to add in the filename path archived
+  //   $p_remove_dir : Path to remove in the filename path archived
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFileList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "list, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+    $v_header = array();
+
+    // ----- Recuperate the current number of elt in list
+    $v_nb = sizeof($p_result_list);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have $v_nb elements");
+
+    // ----- Loop on the files
+    for ($j=0; ($j<count($p_list)) && ($v_result==1); $j++)
+    {
+      // ----- Recuperate the filename
+      $p_filename = PclZipUtilTranslateWinPath($p_list[$j], false);
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file [$p_filename]");
+
+      // ----- Skip empty file names
+      if ($p_filename == "")
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Skip empty filename");
+        continue;
+      }
+
+      // ----- Check the filename
+      if (!file_exists($p_filename))
+      {
+        // ----- Error log
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '$p_filename' does not exists");
+        PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '$p_filename' does not exists");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+
+      /* This test is done later
+      // ----- Check the path length
+      if (strlen($p_filename) > 0xFF)
+      {
+        // ----- Error log
+        PclZip::privErrorLog(-5, "File name is too long (max. 255) : '$p_filename'");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+      */
+
+      // ----- Look if it is a file or a dir with no all pathnre move
+      if ((is_file($p_filename)) || ((is_dir($p_filename)) && !$p_remove_all_dir)) {
+        // ----- Add the file
+        if (($v_result = $this->privAddFile($p_filename, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+        {
+          // ----- Return status
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        // ----- Store the file infos
+        $p_result_list[$v_nb++] = $v_header;
+      }
+
+      // ----- Look for directory
+      if (is_dir($p_filename))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "$p_filename is a directory");
+
+        // ----- Look for path
+        if ($p_filename != ".")
+          $v_path = $p_filename."/";
+        else
+          $v_path = "";
+
+        // ----- Read the directory for files and sub-directories
+        $p_hdir = opendir($p_filename);
+        $p_hitem = readdir($p_hdir); // '.' directory
+        $p_hitem = readdir($p_hdir); // '..' directory
+        while (($p_hitem = readdir($p_hdir)) !== false)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for $p_hitem in the directory");
+
+          // ----- Look for a file
+          if (is_file($v_path.$p_hitem))
+          {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Add the file '".$v_path.$p_hitem."'");
+
+            // ----- Add the file
+            if (($v_result = $this->privAddFile($v_path.$p_hitem, $v_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options)) != 1)
+            {
+              // ----- Return status
+              //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+              return $v_result;
+            }
+
+            // ----- Store the file infos
+            $p_result_list[$v_nb++] = $v_header;
+          }
+
+          // ----- Recursive call to privAddFileList()
+          else
+          {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Add the directory '".$v_path.$p_hitem."'");
+
+            // ----- Need an array as parameter
+            $p_temp_list[0] = $v_path.$p_hitem;
+            $v_result = $this->privAddFileList($p_temp_list, $p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, $p_options);
+
+            // ----- Update the number of elements of the list
+            $v_nb = sizeof($p_result_list);
+          }
+        }
+
+        // ----- Free memory for the recursive loop
+        unset($p_temp_list);
+        unset($p_hdir);
+        unset($p_hitem);
+      }
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have $v_nb elements");
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privAddFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privAddFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='$p_filename', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
+    $v_result=1;
+
+    if ($p_filename == "")
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Calculate the stored filename
+    $v_stored_filename = $p_filename;
+
+    // ----- Look for all path to remove
+    if ($p_remove_all_dir) {
+      $v_stored_filename = basename($p_filename);
+    }
+    // ----- Look for partial path remove
+    else if ($p_remove_dir != "")
+    {
+      if (substr($p_remove_dir, -1) != '/')
+        $p_remove_dir .= "/";
+
+      if ((substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./"))
+      {
+        if ((substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./"))
+          $p_remove_dir = "./".$p_remove_dir;
+        if ((substr($p_filename, 0, 2) != "./") && (substr($p_remove_dir, 0, 2) == "./"))
+          $p_remove_dir = substr($p_remove_dir, 2);
+      }
+
+      $v_compare = PclZipUtilPathInclusion($p_remove_dir, $p_filename);
+      if ($v_compare > 0)
+//      if (substr($p_filename, 0, strlen($p_remove_dir)) == $p_remove_dir)
+      {
+
+        if ($v_compare == 2) {
+          $v_stored_filename = "";
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder");
+        }
+        else {
+          $v_stored_filename = substr($p_filename, strlen($p_remove_dir));
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$p_filename' = '$v_stored_filename'");
+        }
+      }
+    }
+    // ----- Look for path to add
+    if ($p_add_dir != "")
+    {
+      if (substr($p_add_dir, -1) == "/")
+        $v_stored_filename = $p_add_dir.$v_stored_filename;
+      else
+        $v_stored_filename = $p_add_dir."/".$v_stored_filename;
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'");
+    }
+
+    // ----- Filename (reduce the path of stored name)
+    $v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Filename (reduced) '$v_stored_filename', strlen ".strlen($v_stored_filename));
+
+    /* filename length moved after call-back in release 1.3
+    // ----- Check the path length
+    if (strlen($v_stored_filename) > 0xFF)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(-5, "Stored file name is too long (max. 255) : '$v_stored_filename'");
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+    */
+
+    // ----- Set the file properties
+    clearstatcache();
+    $p_header['version'] = 20;
+    $p_header['version_extracted'] = 10;
+    $p_header['flag'] = 0;
+    $p_header['compression'] = 0;
+    $p_header['mtime'] = filemtime($p_filename);
+    $p_header['crc'] = 0;
+    $p_header['compressed_size'] = 0;
+    $p_header['size'] = filesize($p_filename);
+    $p_header['filename_len'] = strlen($p_filename);
+    $p_header['extra_len'] = 0;
+    $p_header['comment_len'] = 0;
+    $p_header['disk'] = 0;
+    $p_header['internal'] = 0;
+    $p_header['external'] = (is_file($p_filename)?0xFE49FFE0:0x41FF0010);
+    $p_header['offset'] = 0;
+    $p_header['filename'] = $p_filename;
+    $p_header['stored_filename'] = $v_stored_filename;
+    $p_header['extra'] = '';
+    $p_header['comment'] = '';
+    $p_header['status'] = 'ok';
+    $p_header['index'] = -1;
+
+    // ----- Look for pre-add callback
+    if (isset($p_options[PCLZIP_CB_PRE_ADD])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_header['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
+        $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_header['stored_filename']."'");
+      }
+    }
+
+    // ----- Look for empty stored filename
+    if ($p_header['stored_filename'] == "") {
+      $p_header['status'] = "filtered";
+    }
+    
+    // ----- Check the path length
+    if (strlen($p_header['stored_filename']) > 0xFF) {
+      $p_header['status'] = 'filename_too_long';
+    }
+
+    // ----- Look if no error, or file not skipped
+    if ($p_header['status'] == 'ok') {
+
+      // ----- Look for a file
+      if (is_file($p_filename))
+      {
+        // ----- Open the source file
+        if (($v_file = @fopen($p_filename, "rb")) == 0) {
+          PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return PclZip::errorCode();
+        }
+
+        if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
+          // ----- Read the file content
+          $v_content_compressed = @fread($v_file, $p_header['size']);
+
+          // ----- Calculate the CRC
+          $p_header['crc'] = crc32($v_content_compressed);
+        }
+        else {
+          // ----- Read the file content
+          $v_content = @fread($v_file, $p_header['size']);
+
+          // ----- Calculate the CRC
+          $p_header['crc'] = crc32($v_content);
+
+          // ----- Compress the file
+          $v_content_compressed = gzdeflate($v_content);
+        }
+
+        // ----- Set header parameters
+        $p_header['compressed_size'] = strlen($v_content_compressed);
+        $p_header['compression'] = 8;
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
+          @fclose($v_file);
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        // ----- Write the compressed content
+        $v_binary_data = pack('a'.$p_header['compressed_size'], $v_content_compressed);
+        @fwrite($this->zip_fd, $v_binary_data, $p_header['compressed_size']);
+        
+        // ----- Close the file
+        @fclose($v_file);
+      }
+
+      // ----- Look for a directory
+      else
+      {
+        // ----- Set the file properties
+        $p_header['filename'] .= '/';
+        $p_header['filename_len']++;
+        $p_header['size'] = 0;
+        $p_header['external'] = 0x41FF0010;   // Value for a folder : to be checked
+
+        // ----- Call the header generation
+        if (($v_result = $this->privWriteFileHeader($p_header)) != 1)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+      }
+    }
+
+    // ----- Look for pre-add callback
+    if (isset($p_options[PCLZIP_CB_POST_ADD])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_header, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Ignored
+        $v_result = 1;
+      }
+
+      // ----- Update the informations
+      // Nothing can be modified
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
+    $v_result=1;
+
+    // TBC
+    //for(reset($p_header); $key = key($p_header); next($p_header)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
+    //}
+
+    // ----- Store the offset position of the file
+    $p_header['offset'] = ftell($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']);
+
+    // ----- Transform UNIX mtime to DOS format mdate/mtime
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    $v_date = getdate($p_header['mtime']);
+    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, $p_header['version'], $p_header['flag'],
+                          $p_header['compression'], $v_mtime, $v_mdate,
+                          $p_header['crc'], $p_header['compressed_size'], $p_header['size'],
+                          strlen($p_header['stored_filename']), $p_header['extra_len']);
+
+    // ----- Write the first 148 bytes of the header in the archive
+    fputs($this->zip_fd, $v_binary_data, 30);
+
+    // ----- Write the variable fields
+    if (strlen($p_header['stored_filename']) != 0)
+    {
+      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
+    }
+    if ($p_header['extra_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteCentralFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteCentralFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
+    $v_result=1;
+
+    // TBC
+    //for(reset($p_header); $key = key($p_header); next($p_header)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
+    //}
+
+    // ----- Transform UNIX mtime to DOS format mdate/mtime
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    $v_date = getdate($p_header['mtime']);
+    $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
+    $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, $p_header['version'], $p_header['version_extracted'],
+                          $p_header['flag'], $p_header['compression'], $v_mtime, $v_mdate, $p_header['crc'],
+                          $p_header['compressed_size'], $p_header['size'],
+                          strlen($p_header['stored_filename']), $p_header['extra_len'], $p_header['comment_len'],
+                          $p_header['disk'], $p_header['internal'], $p_header['external'], $p_header['offset']);
+
+    // ----- Write the 42 bytes of the header in the zip file
+    fputs($this->zip_fd, $v_binary_data, 46);
+
+    // ----- Write the variable fields
+    if (strlen($p_header['stored_filename']) != 0)
+    {
+      fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
+    }
+    if ($p_header['extra_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
+    }
+    if ($p_header['comment_len'] != 0)
+    {
+      fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']);
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privWriteCentralHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$p_comment.'"');
+    $v_result=1;
+
+    // ----- Packed data
+    $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, $p_nb_entries, $p_size, $p_offset, strlen($p_comment));
+
+    // ----- Write the 22 bytes of the header in the zip file
+    fputs($this->zip_fd, $v_binary_data, 22);
+
+    // ----- Write the variable fields
+    if (strlen($p_comment) != 0)
+    {
+      fputs($this->zip_fd, $p_comment, strlen($p_comment));
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privList()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privList(&$p_list)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list");
+    $v_result=1;
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of Central Dir
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
+    if (@fseek($this->zip_fd, $v_central_dir['offset']))
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
+
+    // ----- Read each entry
+    for ($i=0; $i<$v_central_dir['entries']; $i++)
+    {
+      // ----- Read the file header
+      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+      $v_header['index'] = $i;
+
+      // ----- Get the only interesting attributes
+      $this->privConvertHeader2FileInfo($v_header, $p_list[$i]);
+      unset($v_header);
+    }
+
+    // ----- Close the zip file
+    $this->privCloseFd();
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privConvertHeader2FileInfo()
+  // Description :
+  //   This function takes the file informations from the central directory
+  //   entries and extract the interesting parameters that will be given back.
+  //   The resulting file infos are set in the array $p_info
+  //     $p_info['filename'] : Filename with full path. Given by user (add),
+  //                           extracted in the filesystem (extract).
+  //     $p_info['stored_filename'] : Stored filename in the archive.
+  //     $p_info['size'] = Size of the file.
+  //     $p_info['compressed_size'] = Compressed size of the file.
+  //     $p_info['mtime'] = Last modification date of the file.
+  //     $p_info['comment'] = Comment associated with the file.
+  //     $p_info['folder'] = true/false : indicates if the entry is a folder or not.
+  //     $p_info['status'] = status of the action on the file.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privConvertHeader2FileInfo($p_header, &$p_info)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'");
+    $v_result=1;
+
+    // ----- Get the interesting attributes
+    $p_info['filename'] = $p_header['filename'];
+    $p_info['stored_filename'] = $p_header['stored_filename'];
+    $p_info['size'] = $p_header['size'];
+    $p_info['compressed_size'] = $p_header['compressed_size'];
+    $p_info['mtime'] = $p_header['mtime'];
+    $p_info['comment'] = $p_header['comment'];
+    $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010);
+    $p_info['index'] = $p_header['index'];
+    $p_info['status'] = $p_header['status'];
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractByRule()
+  // Description :
+  //   Extract a file or directory depending of rules (by index, by name, ...)
+  // Parameters :
+  //   $p_file_list : An array where will be placed the properties of each
+  //                  extracted file
+  //   $p_path : Path to add while writing the extracted files
+  //   $p_remove_path : Path to remove (from the file memorized path) while writing the
+  //                    extracted files. If the path does not match the file path,
+  //                    the file is extracted with its memorized path.
+  //                    $p_remove_path does not apply to 'list' mode.
+  //                    $p_path and $p_remove_path are commulative.
+  // Return Values :
+  //   1 on success,0 or less on error (see error code list)
+  // --------------------------------------------------------------------------------
+  function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
+    $v_result=1;
+
+    // ----- Check the path
+    if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../") && (substr($p_path,1,2)!=":/")))
+      $p_path = "./".$p_path;
+
+    // ----- Reduce the path last (and duplicated) '/'
+    if (($p_path != "./") && ($p_path != "/"))
+    {
+      // ----- Look for the path end '/'
+      while (substr($p_path, -1) == "/")
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'");
+        $p_path = substr($p_path, 0, strlen($p_path)-1);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]");
+      }
+    }
+
+    // ----- Look for path to remove format (should end by /)
+    if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/'))
+    {
+      $p_remove_path .= '/';
+    }
+    $p_remove_path_size = strlen($p_remove_path);
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result = $this->privOpenFd('rb')) != 1)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Start at beginning of Central Dir
+    $v_pos_entry = $v_central_dir['offset'];
+
+    // ----- Read each entry
+    $j_start = 0;
+    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'");
+
+      // ----- Read next Central dir entry
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'");
+      @rewind($this->zip_fd);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($this->zip_fd)."'");
+      if (@fseek($this->zip_fd, $v_pos_entry))
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+      // ----- Read the file header
+      $v_header = array();
+      if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+
+      // ----- Store the index
+      $v_header['index'] = $i;
+
+      // ----- Store the file position
+      $v_pos_entry = ftell($this->zip_fd);
+
+      // ----- Look for the specific extract rules
+      $v_extract = false;
+
+      // ----- Look for extract by name rule
+      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
+          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
+
+          // ----- Look if the filename is in the list
+          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
+
+              // ----- Look for a directory
+              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
+
+                  // ----- Look if the directory is in the filename path
+                  if (   (strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
+                      && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
+                      $v_extract = true;
+                  }
+              }
+              // ----- Look for a filename
+              elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
+                  $v_extract = true;
+              }
+          }
+      }
+
+      // ----- Look for extract by ereg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
+               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
+
+          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_extract = true;
+          }
+      }
+
+      // ----- Look for extract by preg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
+               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
+
+          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_extract = true;
+          }
+      }
+
+      // ----- Look for extract by index rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
+               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
+          
+          // ----- Look if the index is in the list
+          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
+
+              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
+                  $v_extract = true;
+              }
+              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
+                  $j_start = $j+1;
+              }
+
+              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
+                  break;
+              }
+          }
+      }
+
+      // ----- Look for no rule, which means extract all the archive
+      else {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)");
+          $v_extract = true;
+      }
+      
+
+      // ----- Look for real extraction
+      if ($v_extract)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'");
+
+        // ----- Go to the file position
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
+        @rewind($this->zip_fd);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
+        if (@fseek($this->zip_fd, $v_header['offset']))
+        {
+          // ----- Close the zip file
+          $this->privCloseFd();
+
+          // ----- Error log
+          PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+          // ----- Return
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+          return PclZip::errorCode();
+        }
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+        // ----- Look for extraction as string
+        if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
+
+          // ----- Extracting the file
+          $v_result1 = $this->privExtractFileAsString($v_header, $v_string);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1)
+          {
+            // ----- Close the zip file
+            $this->privCloseFd();
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Set the file content
+          $p_file_list[$v_nb_extracted]['content'] = $v_string;
+
+          // ----- Next extracted file
+          $v_nb_extracted++;
+          
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+          	break;
+          }
+        }
+        // ----- Look for extraction in standard output
+        elseif (   (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT]))
+		        && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) {
+          // ----- Extracting the file in standard output
+          $v_result1 = $this->privExtractFileInOutput($v_header, $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+          	break;
+          }
+        }
+        // ----- Look for normal extraction
+        else {
+          // ----- Extracting the file
+          $v_result1 = $this->privExtractFile($v_header,
+		                                      $p_path, $p_remove_path,
+											  $p_remove_all_path,
+											  $p_options);
+          if ($v_result1 < 1) {
+            $this->privCloseFd();
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
+            return $v_result1;
+          }
+
+          // ----- Get the only interesting attributes
+          if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1)
+          {
+            // ----- Close the zip file
+            $this->privCloseFd();
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          // ----- Look for user callback abort
+          if ($v_result1 == 2) {
+          	break;
+          }
+        }
+      }
+    }
+
+    // ----- Close the zip file
+    $this->privCloseFd();
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFile()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
+    $v_result=1;
+
+    // ----- Read the file header
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
+
+    // ----- Check that the file header is coherent with $p_entry info
+    // TBC
+
+    // ----- Look for all path to remove
+    if ($p_remove_all_path == true) {
+        // ----- Get the basename of the path
+        $p_entry['filename'] = basename($p_entry['filename']);
+    }
+
+    // ----- Look for path to remove
+    else if ($p_remove_path != "")
+    {
+      //if (strcmp($p_remove_path, $p_entry['filename'])==0)
+      if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'");
+
+        // ----- Change the file status
+        $p_entry['status'] = "filtered";
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+
+      $p_remove_path_size = strlen($p_remove_path);
+      if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'");
+
+        // ----- Remove the path
+        $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);
+
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'");
+      }
+    }
+
+    // ----- Add the path
+    if ($p_path != '')
+    {
+      $p_entry['filename'] = $p_path."/".$p_entry['filename'];
+    }
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+      
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+    // ----- Look for specific actions while the file exist
+    if (file_exists($p_entry['filename']))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists");
+
+      // ----- Look if file is a directory
+      if (is_dir($p_entry['filename']))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory");
+
+        // ----- Change the file status
+        $p_entry['status'] = "already_a_directory";
+
+        // ----- Return
+        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        //return $v_result;
+      }
+      // ----- Look if file is write protected
+      else if (!is_writeable($p_entry['filename']))
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected");
+
+        // ----- Change the file status
+        $p_entry['status'] = "write_protected";
+
+        // ----- Return
+        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        //return $v_result;
+      }
+
+      // ----- Look if the extracted file is older
+      else if (filemtime($p_entry['filename']) > $p_entry['mtime'])
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")");
+
+        // ----- Change the file status
+        $p_entry['status'] = "newer_exist";
+
+        // ----- Return
+        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        //return $v_result;
+      }
+    }
+
+    // ----- Check the directory availability and create it if necessary
+    else {
+      if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
+        $v_dir_to_check = $p_entry['filename'];
+      else if (!strstr($p_entry['filename'], "/"))
+        $v_dir_to_check = "";
+      else
+        $v_dir_to_check = dirname($p_entry['filename']);
+
+      if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'");
+
+        // ----- Change the file status
+        $p_entry['status'] = "path_creation_fail";
+
+        // ----- Return
+        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        //return $v_result;
+        $v_result = 1;
+      }
+    }
+    }
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010))
+      {
+
+        // ----- Look for not compressed file
+        if ($p_entry['compressed_size'] == $p_entry['size'])
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
+
+          // ----- Opening destination file
+          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
+          {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
+
+            // ----- Change the file status
+            $p_entry['status'] = "write_error";
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
+
+          // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
+          $v_size = $p_entry['compressed_size'];
+          while ($v_size != 0)
+          {
+            $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes");
+            $v_buffer = fread($this->zip_fd, $v_read_size);
+            $v_binary_data = pack('a'.$v_read_size, $v_buffer);
+            @fwrite($v_dest_file, $v_binary_data, $v_read_size);
+            $v_size -= $v_read_size;
+          }
+
+          // ----- Closing the destination file
+          fclose($v_dest_file);
+
+          // ----- Change the file mtime
+          touch($p_entry['filename'], $p_entry['mtime']);
+        }
+        else
+        {
+          // ----- Trace
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
+
+          // ----- Opening destination file
+          if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
+
+            // ----- Change the file status
+            $p_entry['status'] = "write_error";
+
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+          }
+
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes");
+
+          // ----- Read the compressed file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+          // ----- Decompress the file
+          $v_file_content = gzinflate($v_buffer);
+          unset($v_buffer);
+
+          // ----- Write the uncompressed data
+          @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
+          unset($v_file_content);
+
+          // ----- Closing the destination file
+          @fclose($v_dest_file);
+
+          // ----- Change the file mtime
+          touch($p_entry['filename'], $p_entry['mtime']);
+        }
+
+        // ----- Look for chmod option
+        if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'");
+
+          // ----- Change the mode of the file
+          chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);
+        }
+
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
+      }
+    }
+
+	// ----- Change abort status
+	if ($p_entry['status'] == "aborted") {
+      $p_entry['status'] = "skipped";
+	}
+	
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileInOutput()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileInOutput(&$p_entry, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', "");
+    $v_result=1;
+
+    // ----- Read the file header
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1) {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
+
+    // ----- Check that the file header is coherent with $p_entry info
+    // TBC
+
+    // ----- Look for pre-extract callback
+    if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
+      if ($v_result == 0) {
+        // ----- Change the file status
+        $p_entry['status'] = "skipped";
+        $v_result = 1;
+      }
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+        // ----- This status is internal and will be changed in 'skipped'
+        $p_entry['status'] = "aborted";
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+
+      // ----- Update the informations
+      // Only some fields can be modified
+      $p_entry['filename'] = $v_local_header['filename'];
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
+    }
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
+
+    // ----- Look if extraction should be done
+    if ($p_entry['status'] == 'ok') {
+
+      // ----- Do the extraction (if not a folder)
+      if (!(($p_entry['external']&0x00000010)==0x00000010)) {
+        // ----- Look for not compressed file
+        if ($p_entry['compressed_size'] == $p_entry['size']) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
+
+          // ----- Read the file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+
+          // ----- Send the file to the output
+          echo $v_buffer;
+          unset($v_buffer);
+        }
+        else {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes");
+
+          // ----- Read the compressed file in a buffer (one shot)
+          $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
+          
+          // ----- Decompress the file
+          $v_file_content = gzinflate($v_buffer);
+          unset($v_buffer);
+
+          // ----- Send the file to the output
+          echo $v_file_content;
+          unset($v_file_content);
+        }
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
+      }
+    }
+
+	// ----- Change abort status
+	if ($p_entry['status'] == "aborted") {
+      $p_entry['status'] = "skipped";
+	}
+
+    // ----- Look for post-extract callback
+    elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
+
+      // ----- Generate a local information
+      $v_local_header = array();
+      $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
+
+      // ----- Call the callback
+      // Here I do not use call_user_func() because I need to send a reference to the
+      // header.
+      eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
+
+      // ----- Look for abort result
+      if ($v_result == 2) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
+      	$v_result = PCLZIP_ERR_USER_ABORTED;
+      }
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privExtractFileAsString()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privExtractFileAsString(&$p_entry, &$p_string)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'");
+    $v_result=1;
+
+    // ----- Read the file header
+    $v_header = array();
+    if (($v_result = $this->privReadFileHeader($v_header)) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
+
+    // ----- Check that the file header is coherent with $p_entry info
+    // TBC
+
+    // ----- Trace
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'");
+
+    // ----- Do the extraction (if not a folder)
+    if (!(($p_entry['external']&0x00000010)==0x00000010))
+    {
+      // ----- Look for not compressed file
+      if ($p_entry['compressed_size'] == $p_entry['size'])
+      {
+        // ----- Trace
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
+
+        // ----- Reading the file
+        $p_string = fread($this->zip_fd, $p_entry['compressed_size']);
+      }
+      else
+      {
+        // ----- Trace
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
+
+        // ----- Reading the file
+        $v_data = fread($this->zip_fd, $p_entry['compressed_size']);
+        
+        // ----- Decompress the file
+        $p_string = gzinflate($v_data);
+      }
+
+      // ----- Trace
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
+    }
+    else {
+        // TBC : error : can not extract a folder in a string
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", "");
+    $v_result=1;
+
+    // ----- Read the 4 bytes signature
+    $v_binary_data = @fread($this->zip_fd, 4);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
+    $v_data = unpack('Vid', $v_binary_data);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
+
+    // ----- Check signature
+    if ($v_data['id'] != 0x04034b50)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header");
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the first 42 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 26);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 26)
+    {
+      $p_header['filename'] = "";
+      $p_header['status'] = "invalid_header";
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'");
+    $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
+
+    // ----- Get filename
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']);
+    $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\'');
+
+    // ----- Get extra_fields
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']);
+    if ($v_data['extra_len'] != 0) {
+      $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']);
+    }
+    else {
+      $p_header['extra'] = '';
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\'');
+
+    // ----- Extract properties
+    $p_header['compression'] = $v_data['compression'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.bin2hex($p_header['compression']).'\'');
+    $p_header['size'] = $v_data['size'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\'');
+    $p_header['compressed_size'] = $v_data['compressed_size'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
+    $p_header['crc'] = $v_data['crc'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.$p_header['crc'].'\'');
+    $p_header['flag'] = $v_data['flag'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\'');
+
+    // ----- Recuperate date in UNIX format
+    $p_header['mdate'] = $v_data['mdate'];
+    $p_header['mtime'] = $v_data['mtime'];
+    if ($p_header['mdate'] && $p_header['mtime'])
+    {
+      // ----- Extract time
+      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
+      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
+      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
+
+      // ----- Extract date
+      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
+      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
+      $v_day = $p_header['mdate'] & 0x001F;
+
+      // ----- Get UNIX date format
+      $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+    else
+    {
+      $p_header['mtime'] = time();
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+
+    // ----- Other informations
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compression type : ".$v_data['compression']);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Version : ".$v_data['version']);
+
+    // TBC
+    //for(reset($v_data); $key = key($v_data); next($v_data)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]);
+    //}
+
+    // ----- Set the stored filename
+    $p_header['stored_filename'] = $p_header['filename'];
+
+    // ----- Set the status field
+    $p_header['status'] = "ok";
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadCentralFileHeader()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadCentralFileHeader(&$p_header)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", "");
+    $v_result=1;
+
+    // ----- Read the 4 bytes signature
+    $v_binary_data = @fread($this->zip_fd, 4);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
+    $v_data = unpack('Vid', $v_binary_data);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
+
+    // ----- Check signature
+    if ($v_data['id'] != 0x02014b50)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature");
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Read the first 42 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 42);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 42)
+    {
+      $p_header['filename'] = "";
+      $p_header['status'] = "invalid_header";
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'");
+    $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);
+
+    // ----- Get filename
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']);
+    if ($p_header['filename_len'] != 0)
+      $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']);
+    else
+      $p_header['filename'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\'');
+
+    // ----- Get extra
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']);
+    if ($p_header['extra_len'] != 0)
+      $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']);
+    else
+      $p_header['extra'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\'');
+
+    // ----- Get comment
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']);
+    if ($p_header['comment_len'] != 0)
+      $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']);
+    else
+      $p_header['comment'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\'');
+
+    // ----- Extract properties
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.$p_header['crc'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\'');
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\'');
+
+    // ----- Recuperate date in UNIX format
+    if ($p_header['mdate'] && $p_header['mtime'])
+    {
+      // ----- Extract time
+      $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
+      $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
+      $v_seconde = ($p_header['mtime'] & 0x001F)*2;
+
+      // ----- Extract date
+      $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
+      $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
+      $v_day = $p_header['mdate'] & 0x001F;
+
+      // ----- Get UNIX date format
+      $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+    else
+    {
+      $p_header['mtime'] = time();
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
+    }
+
+    // ----- Set the stored filename
+    $p_header['stored_filename'] = $p_header['filename'];
+
+    // ----- Set default status to ok
+    $p_header['status'] = 'ok';
+
+    // ----- Look if it is a directory
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'");
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')');
+    if (substr($p_header['filename'], -1) == '/')
+    {
+      $p_header['external'] = 0x41FF0010;
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.$p_header['external'].'\'');
+    }
+
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\'');
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privReadEndCentralDir()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privReadEndCentralDir(&$p_central_dir)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", "");
+    $v_result=1;
+
+    // ----- Go to the end of the zip file
+    $v_size = filesize($this->zipname);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size");
+    @fseek($this->zip_fd, $v_size);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\'');
+    if (@ftell($this->zip_fd) != $v_size)
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- First try : look if this is an archive with no commentaries (most of the time)
+    // in this case the end of central dir is at 22 bytes of the file end
+    $v_found = 0;
+    if ($v_size > 26) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment');
+      @fseek($this->zip_fd, $v_size-22);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\'');
+      if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+
+      // ----- Read for bytes
+      $v_binary_data = @fread($this->zip_fd, 4);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
+      $v_data = @unpack('Vid', $v_binary_data);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
+
+      // ----- Check signature
+      if ($v_data['id'] == 0x06054b50) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position.");
+        $v_found = 1;
+      }
+
+      $v_pos = ftell($this->zip_fd);
+    }
+
+    // ----- Go back to the maximum possible size of the Central Dir End Record
+    if (!$v_found) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir');
+      $v_maximum_size = 65557; // 0xFFFF + 22;
+      if ($v_maximum_size > $v_size)
+        $v_maximum_size = $v_size;
+      @fseek($this->zip_fd, $v_size-$v_maximum_size);
+      if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
+      {
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\'');
+
+      // ----- Read byte per byte in order to find the signature
+      $v_pos = ftell($this->zip_fd);
+      $v_bytes = 0x00000000;
+      while ($v_pos < $v_size)
+      {
+        // ----- Read a byte
+        $v_byte = @fread($this->zip_fd, 1);
+
+        // -----  Add the byte
+        $v_bytes = ($v_bytes << 8) | Ord($v_byte);
+
+        // ----- Compare the bytes
+        if ($v_bytes == 0x504b0506)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\'');
+          $v_pos++;
+          break;
+        }
+
+        $v_pos++;
+      }
+
+      // ----- Look if not found end of central dir
+      if ($v_pos == $v_size)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature");
+
+        // ----- Error log
+        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
+
+        // ----- Return
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+        return PclZip::errorCode();
+      }
+    }
+
+    // ----- Read the first 18 bytes of the header
+    $v_binary_data = fread($this->zip_fd, 18);
+
+    // ----- Look for invalid block size
+    if (strlen($v_binary_data) != 18)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Extract the values
+    ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'");
+    ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'");
+    $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data);
+
+    // ----- Check the global size
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']);
+    if (($v_pos + $v_data['comment_size'] + 18) != $v_size)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Fail to find the right signature");
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Fail to find the right signature");
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Get comment
+    if ($v_data['comment_size'] != 0)
+      $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']);
+    else
+      $p_central_dir['comment'] = '';
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\'');
+
+    $p_central_dir['entries'] = $v_data['entries'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\'');
+    $p_central_dir['disk_entries'] = $v_data['disk_entries'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\'');
+    $p_central_dir['offset'] = $v_data['offset'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\'');
+    $p_central_dir['size'] = $v_data['size'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\'');
+    $p_central_dir['disk'] = $v_data['disk'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\'');
+    $p_central_dir['disk_start'] = $v_data['disk_start'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\'');
+
+    // TBC
+    //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) {
+    //  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]);
+    //}
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDeleteByRule()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDeleteByRule(&$p_result_list, &$p_options)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", "");
+    $v_result=1;
+    $v_list_detail = array();
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
+
+    // ----- Scan all the files
+    // ----- Start at beginning of Central Dir
+    $v_pos_entry = $v_central_dir['offset'];
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
+    if (@fseek($this->zip_fd, $v_pos_entry))
+    {
+      // ----- Close the zip file
+      $this->privCloseFd();
+
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+    // ----- Read each entry
+    $v_header_list = array();
+    $j_start = 0;
+    for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$i')");
+
+      // ----- Read the file header
+      $v_header_list[$v_nb_extracted] = array();
+      if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1)
+      {
+        // ----- Close the zip file
+        $this->privCloseFd();
+
+        //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+        return $v_result;
+      }
+
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'");
+
+      // ----- Store the index
+      $v_header_list[$v_nb_extracted]['index'] = $i;
+
+      // ----- Look for the specific extract rules
+      $v_found = false;
+
+      // ----- Look for extract by name rule
+      if (   (isset($p_options[PCLZIP_OPT_BY_NAME]))
+          && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
+
+          // ----- Look if the filename is in the list
+          for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
+
+              // ----- Look for a directory
+              if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
+
+                  // ----- Look if the directory is in the filename path
+                  if (   (strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
+                      && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
+                      $v_found = true;
+                  }
+                  elseif (   (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
+                          && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
+                      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory");
+                      $v_found = true;
+                  }
+              }
+              // ----- Look for a filename
+              elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
+                  $v_found = true;
+              }
+          }
+      }
+
+      // ----- Look for extract by ereg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_EREG]))
+               && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
+
+          if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_found = true;
+          }
+      }
+
+      // ----- Look for extract by preg rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
+               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
+
+          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
+              $v_found = true;
+          }
+      }
+
+      // ----- Look for extract by index rule
+      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
+               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
+          //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
+
+          // ----- Look if the index is in the list
+          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
+              //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
+
+              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
+                  $v_found = true;
+              }
+              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
+                  $j_start = $j+1;
+              }
+
+              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
+                  //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
+                  break;
+              }
+          }
+      }
+
+      // ----- Look for deletion
+      if ($v_found)
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted");
+        unset($v_header_list[$v_nb_extracted]);
+      }
+      else
+      {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted");
+        $v_nb_extracted++;
+      }
+    }
+
+    // ----- Look if something need to be deleted
+    if ($v_nb_extracted > 0) {
+
+        // ----- Creates a temporay file
+        $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+        // ----- Creates a temporary zip archive
+        $v_temp_zip = new PclZip($v_zip_temp_name);
+
+        // ----- Open the temporary zip file in write mode
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode");
+        if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) {
+            $this->privCloseFd();
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+        }
+
+        // ----- Look which file need to be kept
+        for ($i=0; $i<sizeof($v_header_list); $i++) {
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Keep entry index '$i' : '".$v_header_list[$i]['filename']."'");
+
+            // ----- Calculate the position of the header
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset='". $v_header_list[$i]['offset']."'");
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
+            @rewind($this->zip_fd);
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
+            if (@fseek($this->zip_fd,  $v_header_list[$i]['offset'])) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Error log
+                PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+                return PclZip::errorCode();
+            }
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
+
+            // ----- Read the file header
+            if (($v_result = $this->privReadFileHeader($v_header_list[$i])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+
+            // ----- Write the file header
+            if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'");
+
+            // ----- Read/write the data block
+            if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
+                // ----- Close the zip file
+                $this->privCloseFd();
+                $v_temp_zip->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+        }
+
+        // ----- Store the offset of the central dir
+        $v_offset = @ftell($v_temp_zip->zip_fd);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset");
+
+        // ----- Re-Create the Central Dir files header
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory");
+        for ($i=0; $i<sizeof($v_header_list); $i++) {
+            // ----- Create the file header
+            //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset of file : ".$v_header_list[$i]['offset']);
+            if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
+                $v_temp_zip->privCloseFd();
+                $this->privCloseFd();
+                @unlink($v_zip_temp_name);
+
+                // ----- Return
+                //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+                return $v_result;
+            }
+
+            // ----- Transform the header to a 'usable' info
+            $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
+        }
+
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer");
+
+        // ----- Zip file comment
+        $v_comment = '';
+        if (isset($p_options[PCLZIP_OPT_COMMENT])) {
+          $v_comment = $p_options[PCLZIP_OPT_COMMENT];
+        }
+
+        // ----- Calculate the size of the central header
+        $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset;
+
+        // ----- Create the central dir footer
+        if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) {
+            // ----- Reset the file list
+            unset($v_header_list);
+            $v_temp_zip->privCloseFd();
+            $this->privCloseFd();
+            @unlink($v_zip_temp_name);
+
+            // ----- Return
+            //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+            return $v_result;
+        }
+
+        // ----- Close
+        $v_temp_zip->privCloseFd();
+        $this->privCloseFd();
+
+        // ----- Delete the zip file
+        // TBC : I should test the result ...
+        @unlink($this->zipname);
+
+        // ----- Rename the temporary file
+        // TBC : I should test the result ...
+        //@rename($v_zip_temp_name, $this->zipname);
+        PclZipUtilRename($v_zip_temp_name, $this->zipname);
+    
+        // ----- Destroy the temporary archive
+        unset($v_temp_zip);
+    }
+    
+    // ----- Remove every files : reset the file
+    else if ($v_central_dir['entries'] != 0) {
+        $this->privCloseFd();
+
+        if (($v_result = $this->privOpenFd('wb')) != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+
+        $this->privCloseFd();
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDirCheck()
+  // Description :
+  //   Check if a directory exists, if not it creates it and all the parents directory
+  //   which may be useful.
+  // Parameters :
+  //   $p_dir : Directory path to check.
+  // Return Values :
+  //    1 : OK
+  //   -1 : Unable to create directory
+  // --------------------------------------------------------------------------------
+  function privDirCheck($p_dir, $p_is_dir=false)
+  {
+    $v_result = 1;
+
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'");
+
+    // ----- Remove the final '/'
+    if (($p_is_dir) && (substr($p_dir, -1)=='/'))
+    {
+      $p_dir = substr($p_dir, 0, strlen($p_dir)-1);
+    }
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'");
+
+    // ----- Check the directory availability
+    if ((is_dir($p_dir)) || ($p_dir == ""))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory");
+      return 1;
+    }
+
+    // ----- Extract parent directory
+    $p_parent_dir = dirname($p_dir);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_dir'");
+
+    // ----- Just a check
+    if ($p_parent_dir != $p_dir)
+    {
+      // ----- Look for parent directory
+      if ($p_parent_dir != "")
+      {
+        if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)
+        {
+          //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+          return $v_result;
+        }
+      }
+    }
+
+    // ----- Create the directory
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'");
+    if (!@mkdir($p_dir, 0777))
+    {
+      // ----- Error log
+      PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'");
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created");
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privMerge()
+  // Description :
+  //   If $p_archive_to_add does not exist, the function exit with a success result.
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privMerge(&$p_archive_to_add)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'");
+    $v_result=1;
+
+    // ----- Look if the archive_to_add exists
+    if (!is_file($p_archive_to_add->zipname))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge.");
+
+      // ----- Nothing to merge, so merge is a success
+      $v_result = 1;
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Look if the archive exists
+    if (!is_file($this->zipname))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add.");
+
+      // ----- Do a duplicate
+      $v_result = $this->privDuplicate($p_archive_to_add->zipname);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('rb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir = array();
+    if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
+    {
+      $this->privCloseFd();
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
+    @rewind($this->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
+
+    // ----- Open the archive_to_add file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode");
+    if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)
+    {
+      $this->privCloseFd();
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Read the central directory informations
+    $v_central_dir_to_add = array();
+    if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Go to beginning of File
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
+    @rewind($p_archive_to_add->zip_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
+
+    // ----- Creates a temporay file
+    $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
+
+    // ----- Open the temporary file in write mode
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = $v_central_dir['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Copy the files from the archive_to_add into the temporary file
+    $v_size = $v_central_dir_to_add['offset'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Store the offset of the central dir
+    $v_offset = @ftell($v_zip_temp_fd);
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
+
+    // ----- Copy the block of file headers from the old archive
+    $v_size = $v_central_dir['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = @fread($this->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Copy the block of file headers from the archive_to_add
+    $v_size = $v_central_dir_to_add['size'];
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+      $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);
+      @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Merge the file comments
+    $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];
+
+    // ----- Calculate the size of the (new) central header
+    $v_size = @ftell($v_zip_temp_fd)-$v_offset;
+
+    // ----- Swap the file descriptor
+    // Here is a trick : I swap the temporary fd with the zip fd, in order to use
+    // the following methods on the temporary fil and not the real archive fd
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Create the central dir footer
+    if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)
+    {
+      $this->privCloseFd();
+      $p_archive_to_add->privCloseFd();
+      @fclose($v_zip_temp_fd);
+      $this->zip_fd = null;
+
+      // ----- Reset the file list
+      unset($v_header_list);
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Swap back the file descriptor
+    $v_swap = $this->zip_fd;
+    $this->zip_fd = $v_zip_temp_fd;
+    $v_zip_temp_fd = $v_swap;
+
+    // ----- Close
+    $this->privCloseFd();
+    $p_archive_to_add->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Delete the zip file
+    // TBC : I should test the result ...
+    @unlink($this->zipname);
+
+    // ----- Rename the temporary file
+    // TBC : I should test the result ...
+    //@rename($v_zip_temp_name, $this->zipname);
+    PclZipUtilRename($v_zip_temp_name, $this->zipname);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privDuplicate()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function privDuplicate($p_archive_filename)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'");
+    $v_result=1;
+
+    // ----- Look if the $p_archive_filename exists
+    if (!is_file($p_archive_filename))
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate.");
+
+      // ----- Nothing to duplicate, so duplicate is a success.
+      $v_result = 1;
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the zip file
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_result=$this->privOpenFd('wb')) != 1)
+    {
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+      return $v_result;
+    }
+
+    // ----- Open the temporary file in write mode
+    //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
+    if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
+    {
+      $this->privCloseFd();
+
+      PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode');
+
+      // ----- Return
+      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
+      return PclZip::errorCode();
+    }
+
+    // ----- Copy the files from the archive to the temporary file
+    // TBC : Here I should better append the file and go back to erase the central dir
+    $v_size = filesize($p_archive_filename);
+    while ($v_size != 0)
+    {
+      $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes");
+      $v_buffer = fread($v_zip_temp_fd, $v_read_size);
+      @fwrite($this->zip_fd, $v_buffer, $v_read_size);
+      $v_size -= $v_read_size;
+    }
+
+    // ----- Close
+    $this->privCloseFd();
+
+    // ----- Close the temporary file
+    @fclose($v_zip_temp_fd);
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privErrorLog()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privErrorLog($p_error_code=0, $p_error_string='')
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      PclError($p_error_code, $p_error_string);
+    }
+    else {
+      $this->error_code = $p_error_code;
+      $this->error_string = $p_error_string;
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : privErrorReset()
+  // Description :
+  // Parameters :
+  // --------------------------------------------------------------------------------
+  function privErrorReset()
+  {
+    if (PCLZIP_ERROR_EXTERNAL == 1) {
+      PclErrorReset();
+    }
+    else {
+      $this->error_code = 1;
+      $this->error_string = '';
+    }
+  }
+  // --------------------------------------------------------------------------------
+
+  }
+  // End of class
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilPathReduction()
+  // Description :
+  // Parameters :
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function PclZipUtilPathReduction($p_dir)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$p_dir'");
+    $v_result = "";
+
+    // ----- Look for not empty path
+    if ($p_dir != "")
+    {
+      // ----- Explode path by directory names
+      $v_list = explode("/", $p_dir);
+
+      // ----- Study directories from last to first
+      for ($i=sizeof($v_list)-1; $i>=0; $i--)
+      {
+        // ----- Look for current path
+        if ($v_list[$i] == ".")
+        {
+          // ----- Ignore this directory
+          // Should be the first $i=0, but no check is done
+        }
+        else if ($v_list[$i] == "..")
+        {
+          // ----- Ignore it and ignore the $i-1
+          $i--;
+        }
+        else if (($v_list[$i] == "") && ($i!=(sizeof($v_list)-1)) && ($i!=0))
+        {
+          // ----- Ignore only the double '//' in path,
+          // but not the first and last '/'
+        }
+        else
+        {
+          $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:"");
+        }
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilPathInclusion()
+  // Description :
+  //   This function indicates if the path $p_path is under the $p_dir tree. Or,
+  //   said in an other way, if the file or sub-dir $p_path is inside the dir
+  //   $p_dir.
+  //   The function indicates also if the path is exactly the same as the dir.
+  //   This function supports path with duplicated '/' like '//', but does not
+  //   support '.' or '..' statements.
+  // Parameters :
+  // Return Values :
+  //   0 if $p_path is not inside directory $p_dir
+  //   1 if $p_path is inside directory $p_dir
+  //   2 if $p_path is exactly the same as $p_dir
+  // --------------------------------------------------------------------------------
+  function PclZipUtilPathInclusion($p_dir, $p_path)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
+    $v_result = 1;
+
+    // ----- Explode dir and path by directory separator
+    $v_list_dir = explode("/", $p_dir);
+    $v_list_dir_size = sizeof($v_list_dir);
+    $v_list_path = explode("/", $p_path);
+    $v_list_path_size = sizeof($v_list_path);
+
+    // ----- Study directories paths
+    $i = 0;
+    $j = 0;
+    while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'");
+
+      // ----- Look for empty dir (path reduction)
+      if ($v_list_dir[$i] == '') {
+        $i++;
+        continue;
+      }
+      if ($v_list_path[$j] == '') {
+        $j++;
+        continue;
+      }
+
+      // ----- Compare the items
+      if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != ''))  {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different");
+        $v_result = 0;
+      }
+
+      // ----- Next items
+      $i++;
+      $j++;
+    }
+
+    // ----- Look if everything seems to be the same
+    if ($v_result) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break");
+      // ----- Skip all the empty items
+      while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++;
+      while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++;
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'");
+
+      if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) {
+        // ----- There are exactly the same
+        $v_result = 2;
+      }
+      else if ($i < $v_list_dir_size) {
+        // ----- The path is shorter than the dir
+        $v_result = 0;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilCopyBlock()
+  // Description :
+  // Parameters :
+  //   $p_mode : read/write compression mode
+  //             0 : src & dest normal
+  //             1 : src gzip, dest normal
+  //             2 : src normal, dest gzip
+  //             3 : src & dest gzip
+  // Return Values :
+  // --------------------------------------------------------------------------------
+  function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode");
+    $v_result = 1;
+
+    if ($p_mode==0)
+    {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src)));
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest)));
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @fread($p_src, $v_read_size);
+        @fwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src)));
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest)));
+    }
+    else if ($p_mode==1)
+    {
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @gzread($p_src, $v_read_size);
+        @fwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+    }
+    else if ($p_mode==2)
+    {
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @fread($p_src, $v_read_size);
+        @gzwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+    }
+    else if ($p_mode==3)
+    {
+      while ($p_size != 0)
+      {
+        $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
+        $v_buffer = @gzread($p_src, $v_read_size);
+        @gzwrite($p_dest, $v_buffer, $v_read_size);
+        $p_size -= $v_read_size;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilRename()
+  // Description :
+  //   This function tries to do a simple rename() function. If it fails, it
+  //   tries to copy the $p_src file in a new $p_dest file and then unlink the
+  //   first one.
+  // Parameters :
+  //   $p_src : Old filename
+  //   $p_dest : New filename
+  // Return Values :
+  //   1 on success, 0 on failure.
+  // --------------------------------------------------------------------------------
+  function PclZipUtilRename($p_src, $p_dest)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest");
+    $v_result = 1;
+
+    // ----- Try to rename the files
+    if (!@rename($p_src, $p_dest)) {
+      //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink");
+
+      // ----- Try to copy & unlink the src
+      if (!@copy($p_src, $p_dest)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file");
+        $v_result = 0;
+      }
+      else if (!@unlink($p_src)) {
+        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename");
+        $v_result = 0;
+      }
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilOptionText()
+  // Description :
+  //   Translate option value in text. Mainly for debug purpose.
+  // Parameters :
+  //   $p_option : the option value.
+  // Return Values :
+  //   The option text value.
+  // --------------------------------------------------------------------------------
+  function PclZipUtilOptionText($p_option)
+  {
+    //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
+
+    switch ($p_option) {
+      case PCLZIP_OPT_PATH :
+        $v_result = 'PCLZIP_OPT_PATH';
+      break;
+      case PCLZIP_OPT_ADD_PATH :
+        $v_result = 'PCLZIP_OPT_ADD_PATH';
+      break;
+      case PCLZIP_OPT_REMOVE_PATH :
+        $v_result = 'PCLZIP_OPT_REMOVE_PATH';
+      break;
+      case PCLZIP_OPT_REMOVE_ALL_PATH :
+        $v_result = 'PCLZIP_OPT_REMOVE_ALL_PATH';
+      break;
+      case PCLZIP_OPT_EXTRACT_AS_STRING :
+        $v_result = 'PCLZIP_OPT_EXTRACT_AS_STRING';
+      break;
+      case PCLZIP_OPT_SET_CHMOD :
+        $v_result = 'PCLZIP_OPT_SET_CHMOD';
+      break;
+      case PCLZIP_OPT_BY_NAME :
+        $v_result = 'PCLZIP_OPT_BY_NAME';
+      break;
+      case PCLZIP_OPT_BY_INDEX :
+        $v_result = 'PCLZIP_OPT_BY_INDEX';
+      break;
+      case PCLZIP_OPT_BY_EREG :
+        $v_result = 'PCLZIP_OPT_BY_EREG';
+      break;
+      case PCLZIP_OPT_BY_PREG :
+        $v_result = 'PCLZIP_OPT_BY_PREG';
+      break;
+
+
+      case PCLZIP_CB_PRE_EXTRACT :
+        $v_result = 'PCLZIP_CB_PRE_EXTRACT';
+      break;
+      case PCLZIP_CB_POST_EXTRACT :
+        $v_result = 'PCLZIP_CB_POST_EXTRACT';
+      break;
+      case PCLZIP_CB_PRE_ADD :
+        $v_result = 'PCLZIP_CB_PRE_ADD';
+      break;
+      case PCLZIP_CB_POST_ADD :
+        $v_result = 'PCLZIP_CB_POST_ADD';
+      break;
+
+      default :
+        $v_result = 'Unknown';
+    }
+
+    // ----- Return
+    //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
+    return $v_result;
+  }
+  // --------------------------------------------------------------------------------
+
+  // --------------------------------------------------------------------------------
+  // Function : PclZipUtilTranslateWinPath()
+  // Description :
+  //   Translate windows path by replacing '\' by '/' and optionally removing
+  //   drive letter.
+  // Parameters :
+  //   $p_path : path to translate.
+  //   $p_remove_disk_letter : true | false
+  // Return Values :
+  //   The path translated.
+  // --------------------------------------------------------------------------------
+  function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
+  {
+    if (stristr(php_uname(), 'windows')) {
+      // ----- Look for potential disk letter
+      if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
+          $p_path = substr($p_path, $v_position+1);
+      }
+      // ----- Change potential windows directory separator
+      if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
+          $p_path = strtr($p_path, '\\', '/');
+      }
+    }
+    return $p_path;
+  }
+  // --------------------------------------------------------------------------------
+
+?>
Index: trunk/wb/admin/media/browse.html
===================================================================
--- trunk/wb/admin/media/browse.html	(revision 316)
+++ trunk/wb/admin/media/browse.html	(revision 317)
@@ -35,7 +35,7 @@
 <script language="javascript" type="text/javascript">
 function confirm_link(message, url) {
 	if(confirm(message)) location.href = url;
-}
+}
 </script>
 
 </head>
Index: trunk/wb/modules/wrapper/modify.html
===================================================================
--- trunk/wb/modules/wrapper/modify.html	(revision 316)
+++ trunk/wb/modules/wrapper/modify.html	(revision 317)
@@ -1,41 +1,41 @@
-<!-- BEGIN main_block -->
-
-<form action="{WB_URL}/modules/wrapper/save.php" method="post">
-
-<input type="hidden" name="page_id" value="{PAGE_ID}" />
-<input type="hidden" name="section_id" value="{SECTION_ID}" />
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left" width="50">
-		{TEXT_URL}:
-	</td>
-	<td>
-		<input type="text" name="url" value="{URL}" style="width: 100%;" />
-	</td>
-</tr>
-<tr>
-	<td align="left" width="50">
-		{TEXT_HEIGHT}:
-	</td>
-	<td>
-		<input type="text" name="height" value="{HEIGHT}" maxlength="4" style="width: 100%;" />
-	</td>
-</tr>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left">
-		<input type="submit" value="{TEXT_SAVE}" style="width: 200px; margin-top: 5px;" />
-	</td>
-	<td align="right">
-		</form>
-		<input type="button" value="{TEXT_CANCEL}" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-</form>
-
-<!-- END main_block -->
+<!-- BEGIN main_block -->
+
+<form action="{WB_URL}/modules/wrapper/save.php" method="post">
+
+<input type="hidden" name="page_id" value="{PAGE_ID}" />
+<input type="hidden" name="section_id" value="{SECTION_ID}" />
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left" width="50">
+		{TEXT_URL}:
+	</td>
+	<td>
+		<input type="text" name="url" value="{URL}" style="width: 100%;" />
+	</td>
+</tr>
+<tr>
+	<td align="left" width="50">
+		{TEXT_HEIGHT}:
+	</td>
+	<td>
+		<input type="text" name="height" value="{HEIGHT}" maxlength="4" style="width: 100%;" />
+	</td>
+</tr>
+</table>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left">
+		<input type="submit" value="{TEXT_SAVE}" style="width: 200px; margin-top: 5px;" />
+	</td>
+	<td align="right">
+		</form>
+		<input type="button" value="{TEXT_CANCEL}" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+</form>
+
+<!-- END main_block -->
Index: trunk/wb/modules/menu_link/modify.html
===================================================================
--- trunk/wb/modules/menu_link/modify.html	(revision 316)
+++ trunk/wb/modules/menu_link/modify.html	(revision 317)
@@ -1,6 +1,6 @@
 <!-- BEGIN main_block -->
 
-<form action="{WB_URL}/modules/menu_link/save.php" method="post">
+<form action="{WB_URL}/modules/menu_link/save.php" method="post">
 
 <input type="hidden" name="page_id" value="{PAGE_ID}" />
 <input type="hidden" name="section_id" value="{SECTION_ID}" />
@@ -32,7 +32,7 @@
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
-	<td align="left">
+	<td align="left">
 		<input type="submit" value="{TEXT_SAVE}" style="width: 100px; margin-top: 5px;" />
 	</td>
 	<td align="right">
Index: trunk/wb/modules/form/modify_field.php
===================================================================
--- trunk/wb/modules/form/modify_field.php	(revision 316)
+++ trunk/wb/modules/form/modify_field.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -27,93 +27,93 @@
 The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
 for his contributions to this module - adding extra field types
 */
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
 	exit(0);
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
-$form = $query_content->fetchRow();
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
+$form = $query_content->fetchRow();
 $type = $form['type'];
 if($type == '') {
 	$type = 'none';
-}
-
-// Set raw html <'s and >'s to be replaced by friendly html code
-$raw = array('<', '>');
-$friendly = array('&lt;', '&gt;');
-?>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/form/save_field.php" method="post" style="margin: 0;">
-
-<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="field_id" value="<?php echo $field_id; ?>">
-
-<table cellpadding="4" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
-	<td>
-		<input type="text" name="title" value="<?php echo htmlspecialchars(($form['title'])); ?>" style="width: 100%;" maxlength="255" />
-	</td>
-</tr>
-<tr>
-	<td><?php echo $TEXT['TYPE']; ?>:</td>
-	<td>
-		<select name="type" style="width: 100%;">
-			<option value=""><?php echo $TEXT['PLEASE_SELECT']; ?>...</option>
-			<option value="heading"<?php if($type == 'heading') { echo ' selected'; } ?>><?php echo $TEXT['HEADING']; ?></option>
-			<option value="textfield"<?php if($type == 'textfield') { echo ' selected'; } ?>><?php echo $TEXT['SHORT'].' '.$TEXT['TEXT']; ?> (Textfield)</option>
-			<option value="textarea"<?php if($type == 'textarea') { echo ' selected'; } ?>><?php echo $TEXT['LONG'].' '.$TEXT['TEXT']; ?> (Textarea)</option>
-			<option value="select"<?php if($type == 'select') { echo ' selected'; } ?>><?php echo $TEXT['SELECT_BOX']; ?></option>
-			<option value="checkbox"<?php if($type == 'checkbox') { echo ' selected'; } ?>><?php echo $TEXT['CHECKBOX_GROUP']; ?></option>
+}
+
+// Set raw html <'s and >'s to be replaced by friendly html code
+$raw = array('<', '>');
+$friendly = array('&lt;', '&gt;');
+?>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/form/save_field.php" method="post" style="margin: 0;">
+
+<input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="field_id" value="<?php echo $field_id; ?>">
+
+<table cellpadding="4" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
+	<td>
+		<input type="text" name="title" value="<?php echo htmlspecialchars(($form['title'])); ?>" style="width: 100%;" maxlength="255" />
+	</td>
+</tr>
+<tr>
+	<td><?php echo $TEXT['TYPE']; ?>:</td>
+	<td>
+		<select name="type" style="width: 100%;">
+			<option value=""><?php echo $TEXT['PLEASE_SELECT']; ?>...</option>
+			<option value="heading"<?php if($type == 'heading') { echo ' selected'; } ?>><?php echo $TEXT['HEADING']; ?></option>
+			<option value="textfield"<?php if($type == 'textfield') { echo ' selected'; } ?>><?php echo $TEXT['SHORT'].' '.$TEXT['TEXT']; ?> (Textfield)</option>
+			<option value="textarea"<?php if($type == 'textarea') { echo ' selected'; } ?>><?php echo $TEXT['LONG'].' '.$TEXT['TEXT']; ?> (Textarea)</option>
+			<option value="select"<?php if($type == 'select') { echo ' selected'; } ?>><?php echo $TEXT['SELECT_BOX']; ?></option>
+			<option value="checkbox"<?php if($type == 'checkbox') { echo ' selected'; } ?>><?php echo $TEXT['CHECKBOX_GROUP']; ?></option>
 			<option value="radio"<?php if($type == 'radio') { echo ' selected'; } ?>><?php echo $TEXT['RADIO_BUTTON_GROUP']; ?></option>
-			<option value="email"<?php if($type == 'email') { echo ' selected'; } ?>><?php echo $TEXT['EMAIL_ADDRESS']; ?></option>
-		</select>
-	</td>
+			<option value="email"<?php if($type == 'email') { echo ' selected'; } ?>><?php echo $TEXT['EMAIL_ADDRESS']; ?></option>
+		</select>
+	</td>
 </tr>
-<?php if($type != 'none' AND $type != 'email') { ?>
-	<?php if($type == 'heading') { ?>
-	<tr>
-		<td valign="top"><?php echo $TEXT['TEMPLATE']; ?>:</td>
-		<td>
-		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars(($form['extra'])); ?></textarea>
-		</td>
-	</tr>
-	<?php } elseif($type == 'textfield') { ?>
-	<tr>
-		<td><?php echo $TEXT['LENGTH']; ?>:</td>
-		<td>
-			<input type="text" name="length" value="<?php echo $form['extra']; ?>" style="width: 100%;" maxlength="3" />
-		</td>
-	</tr>
-	<tr>
-		<td><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
-		<td>
-			<input type="text" name="value" value="<?php echo $form['value']; ?>" style="width: 100%;" />
-		</td>
-	</tr>
-	<?php } elseif($type == 'textarea') { ?>
-	<tr>
-		<td valign="top"><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
-		<td>
-			<textarea name="value" style="width: 100%; height: 100px;"><?php echo $form['value']; ?></textarea>
-		</td>
-	</tr>
-	<?php } elseif($type == 'select' OR $type = 'radio' OR $type = 'checkbox') { ?>
-	<tr>
-		<td valign="top"><?php echo 'List'; ?>:</td>
+<?php if($type != 'none' AND $type != 'email') { ?>
+	<?php if($type == 'heading') { ?>
+	<tr>
+		<td valign="top"><?php echo $TEXT['TEMPLATE']; ?>:</td>
 		<td>
+		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars(($form['extra'])); ?></textarea>
+		</td>
+	</tr>
+	<?php } elseif($type == 'textfield') { ?>
+	<tr>
+		<td><?php echo $TEXT['LENGTH']; ?>:</td>
+		<td>
+			<input type="text" name="length" value="<?php echo $form['extra']; ?>" style="width: 100%;" maxlength="3" />
+		</td>
+	</tr>
+	<tr>
+		<td><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
+		<td>
+			<input type="text" name="value" value="<?php echo $form['value']; ?>" style="width: 100%;" />
+		</td>
+	</tr>
+	<?php } elseif($type == 'textarea') { ?>
+	<tr>
+		<td valign="top"><?php echo $TEXT['DEFAULT_TEXT']; ?>:</td>
+		<td>
+			<textarea name="value" style="width: 100%; height: 100px;"><?php echo $form['value']; ?></textarea>
+		</td>
+	</tr>
+	<?php } elseif($type == 'select' OR $type = 'radio' OR $type = 'checkbox') { ?>
+	<tr>
+		<td valign="top"><?php echo 'List'; ?>:</td>
+		<td>
 			<?php
 			$option_count = 0;
 			$list = explode(',', $form['value']);
@@ -144,76 +144,76 @@
 				<?php
 			}
 			?>
-			<input type="hidden" name="list_count" value="<?php echo $option_count; ?>" />
-		</td>
+			<input type="hidden" name="list_count" value="<?php echo $option_count; ?>" />
+		</td>
 	</tr>
 	<?php } ?>
 	<?php if($type == 'select') { ?>
-	<tr>
-		<td><?php echo $TEXT['SIZE']; ?>:</td>
-		<td>
-			<?php $form['extra'] = explode(',',$form['extra']); ?>
-			<input type="text" name="size" value="<?php echo trim($form['extra'][0]); ?>" style="width: 100%;" maxlength="3" />
-		</td>
-	</tr>
-	<tr>
-		<td><?php echo $TEXT['ALLOW_MULTIPLE_SELECTIONS']; ?>:</td>
-		<td>
-			<input type="radio" name="multiselect" id="multiselect_true" value="multiple" <?php if($form['extra'][1] == 'multiple') { echo ' checked'; } ?> />
-			<a href="#" onclick="javascript: document.getElementById('multiselect_true').checked = true;">
-			<?php echo $TEXT['YES']; ?>
-			</a>
-			&nbsp;
-			<input type="radio" name="multiselect" id="multiselect_false" value="" <?php if($form['extra'][1] == '') { echo ' checked'; } ?> />
-			<a href="#" onclick="javascript: document.getElementById('multiselect_false').checked = true;">
-			<?php echo $TEXT['NO']; ?>
-			</a>
-		</td>
-	</tr>
-	<?php } elseif($type == 'checkbox' OR $type == 'radio') { ?>
-	<tr>
-		<td valign="top"><?php echo $TEXT['SEPERATOR']; ?>:</td>
-		<td>
-			<input type="text" name="seperator" value="<?php echo $form['extra']; ?>" style="width: 100%;" />
-		</td>
-	</tr>
+	<tr>
+		<td><?php echo $TEXT['SIZE']; ?>:</td>
+		<td>
+			<?php $form['extra'] = explode(',',$form['extra']); ?>
+			<input type="text" name="size" value="<?php echo trim($form['extra'][0]); ?>" style="width: 100%;" maxlength="3" />
+		</td>
+	</tr>
+	<tr>
+		<td><?php echo $TEXT['ALLOW_MULTIPLE_SELECTIONS']; ?>:</td>
+		<td>
+			<input type="radio" name="multiselect" id="multiselect_true" value="multiple" <?php if($form['extra'][1] == 'multiple') { echo ' checked'; } ?> />
+			<a href="#" onclick="javascript: document.getElementById('multiselect_true').checked = true;">
+			<?php echo $TEXT['YES']; ?>
+			</a>
+			&nbsp;
+			<input type="radio" name="multiselect" id="multiselect_false" value="" <?php if($form['extra'][1] == '') { echo ' checked'; } ?> />
+			<a href="#" onclick="javascript: document.getElementById('multiselect_false').checked = true;">
+			<?php echo $TEXT['NO']; ?>
+			</a>
+		</td>
+	</tr>
+	<?php } elseif($type == 'checkbox' OR $type == 'radio') { ?>
+	<tr>
+		<td valign="top"><?php echo $TEXT['SEPERATOR']; ?>:</td>
+		<td>
+			<input type="text" name="seperator" value="<?php echo $form['extra']; ?>" style="width: 100%;" />
+		</td>
+	</tr>
 	<?php } ?>
 <?php } ?>
-<?php if($type != 'heading' AND $type != 'none') { ?>
-<tr>
-	<td><?php echo $TEXT['REQUIRED']; ?>:</td>
-	<td>
-		<input type="radio" name="required" id="required_true" value="1" <?php if($form['required'] == 1) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('required_true').checked = true;">
-		<?php echo $TEXT['YES']; ?>
-		</a>
-		&nbsp;
-		<input type="radio" name="required" id="required_false" value="0" <?php if($form['required'] == 0) { echo ' checked'; } ?> />
-		<a href="#" onclick="javascript: document.getElementById('required_false').checked = true;">
-		<?php echo $TEXT['NO']; ?>
-		</a>
-	</td>
-</tr>
-<?php } ?>
-</table>
-
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td width="90">&nbsp;
-		
-	</td>
-	<td align="left">
-		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['FIELD']; ?>" style="width: 200px; margin-top: 5px;"></form>
-	</td>
-	<td align="right">
-		<input type="button" value="<?php echo $TEXT['CLOSE']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
-	</td>
-</tr>
-</table>
-
-<?php
-
-// Print admin footer
-$admin->print_footer();
-
+<?php if($type != 'heading' AND $type != 'none') { ?>
+<tr>
+	<td><?php echo $TEXT['REQUIRED']; ?>:</td>
+	<td>
+		<input type="radio" name="required" id="required_true" value="1" <?php if($form['required'] == 1) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('required_true').checked = true;">
+		<?php echo $TEXT['YES']; ?>
+		</a>
+		&nbsp;
+		<input type="radio" name="required" id="required_false" value="0" <?php if($form['required'] == 0) { echo ' checked'; } ?> />
+		<a href="#" onclick="javascript: document.getElementById('required_false').checked = true;">
+		<?php echo $TEXT['NO']; ?>
+		</a>
+	</td>
+</tr>
+<?php } ?>
+</table>
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td width="90">&nbsp;
+		
+	</td>
+	<td align="left">
+		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['FIELD']; ?>" style="width: 200px; margin-top: 5px;"></form>
+	</td>
+	<td align="right">
+		<input type="button" value="<?php echo $TEXT['CLOSE']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
+	</td>
+</tr>
+</table>
+
+<?php
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/add_field.php
===================================================================
--- trunk/wb/modules/form/add_field.php	(revision 316)
+++ trunk/wb/modules/form/add_field.php	(revision 317)
@@ -28,31 +28,31 @@
 for his contributions to this module - adding extra field types
 */
 
-require('../../config.php');
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-// Get new order
-$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
-$position = $order->get_new($section_id);
-
-// Insert new row into database
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (section_id,page_id,position,required) VALUES ('$section_id','$page_id','$position','0')");
-
-// Get the id
-$field_id = $database->get_one("SELECT LAST_INSERT_ID()");
-
-// Say that a new record has been added, then redirect to modify page
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+require('../../config.php');
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+// Get new order
+$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
+$position = $order->get_new($section_id);
+
+// Insert new row into database
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (section_id,page_id,position,required) VALUES ('$section_id','$page_id','$position','0')");
+
+// Get the id
+$field_id = $database->get_one("SELECT LAST_INSERT_ID()");
+
+// Say that a new record has been added, then redirect to modify page
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/move_down.php
===================================================================
--- trunk/wb/modules/form/move_down.php	(revision 316)
+++ trunk/wb/modules/form/move_down.php	(revision 317)
@@ -28,31 +28,31 @@
 for his contributions to this module - adding extra field types
 */
 
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: index.php");
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: index.php");
 	exit(0);
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-
-// Create new order object an reorder
-$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
-if($order->move_down($field_id)) {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+
+// Create new order object an reorder
+$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
+if($order->move_down($field_id)) {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/save_field.php
===================================================================
--- trunk/wb/modules/form/save_field.php	(revision 316)
+++ trunk/wb/modules/form/save_field.php	(revision 317)
@@ -28,33 +28,33 @@
 for his contributions to this module - adding extra field types
 */
 
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['field_id']) OR !is_numeric($_POST['field_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
 	exit(0);
-} else {
-	$field_id = $_POST['field_id'];
-	$field_id = $field_id;
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Validate all fields
-if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$type = $admin->get_post('type');
-	$required = $admin->get_post('required');
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET title = '$title', type = '$type', required = '$required' WHERE field_id = '$field_id'");
+} else {
+	$field_id = $_POST['field_id'];
+	$field_id = $field_id;
+}
 
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Validate all fields
+if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$type = $admin->get_post('type');
+	$required = $admin->get_post('required');
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET title = '$title', type = '$type', required = '$required' WHERE field_id = '$field_id'");
+
 // If field type has multiple options, get all values and implode them
 $list_count = $admin->get_post('list_count');
 if(is_numeric($list_count)) {
@@ -66,39 +66,39 @@
 	}
 	$value = implode(',', $values);
 }
-
-// Get extra fields for field-type-specific settings
-if($admin->get_post('type') == 'textfield') {
-	$length = $admin->get_post('length');
-	$value = $admin->get_post('value');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$length' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'textarea') {
-	$value = $admin->get_post('value');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'heading') {
-	$extra = $admin->get_post('template');
-	if(trim($extra) == '') $extra = '<tr><td class="field_heading" colspan="2">{TITLE}{FIELD}</td></tr>';
-	$extra = $admin->add_slashes($extra);
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '', extra = '$extra' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'select') {
-	$extra = $admin->get_post('size').','.$admin->get_post('multiselect');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'checkbox') {
-	$extra = $admin->get_post('seperator');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
-} elseif($admin->get_post('type') == 'radio') {
-	$extra = $admin->get_post('seperator');
-	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
-}
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+
+// Get extra fields for field-type-specific settings
+if($admin->get_post('type') == 'textfield') {
+	$length = $admin->get_post('length');
+	$value = $admin->get_post('value');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$length' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'textarea') {
+	$value = $admin->get_post('value');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'heading') {
+	$extra = $admin->get_post('template');
+	if(trim($extra) == '') $extra = '<tr><td class="field_heading" colspan="2">{TITLE}{FIELD}</td></tr>';
+	$extra = $admin->add_slashes($extra);
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '', extra = '$extra' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'select') {
+	$extra = $admin->get_post('size').','.$admin->get_post('multiselect');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'checkbox') {
+	$extra = $admin->get_post('seperator');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
+} elseif($admin->get_post('type') == 'radio') {
+	$extra = $admin->get_post('seperator');
+	$database->query("UPDATE ".TABLE_PREFIX."mod_form_fields SET value = '$value', extra = '$extra' WHERE field_id = '$field_id'");
+}
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
Index: trunk/wb/modules/form/delete_field.php
===================================================================
--- trunk/wb/modules/form/delete_field.php	(revision 316)
+++ trunk/wb/modules/form/delete_field.php	(revision 317)
@@ -27,32 +27,32 @@
 The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
 for his contributions to this module - adding extra field types
 */
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
 	exit(0);
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Delete row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Delete row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/install.php
===================================================================
--- trunk/wb/modules/form/install.php	(revision 316)
+++ trunk/wb/modules/form/install.php	(revision 317)
@@ -30,75 +30,75 @@
 
 if(defined('WB_URL')) {
 		
-	// Create tables
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
-	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,'
-	                 . ' `section_id` INT NOT NULL ,'
-	                 . ' `page_id` INT NOT NULL ,'
-	                 . ' `position` INT NOT NULL ,'
-	                 . ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-	                 . ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-	                 . ' `required` INT NOT NULL ,'
-	                 . ' `value` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' `extra` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' PRIMARY KEY ( `field_id` ) )'
-	                 . ' ';
-	$database->query($mod_form);
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
-	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_settings` ('
-						  . ' `section_id` INT NOT NULL,'
-						  . ' `page_id` INT NOT NULL,'
-	                 . ' `header` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' `field_loop` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' `footer` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' `email_to` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
-	                 . ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+	// Create tables
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_fields`");
+	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_fields` ( `field_id` INT NOT NULL AUTO_INCREMENT,'
+	                 . ' `section_id` INT NOT NULL ,'
+	                 . ' `page_id` INT NOT NULL ,'
+	                 . ' `position` INT NOT NULL ,'
+	                 . ' `title` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+	                 . ' `type` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+	                 . ' `required` INT NOT NULL ,'
+	                 . ' `value` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' `extra` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' PRIMARY KEY ( `field_id` ) )'
+	                 . ' ';
+	$database->query($mod_form);
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_settings`");
+	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_settings` ('
+						  . ' `section_id` INT NOT NULL,'
+						  . ' `page_id` INT NOT NULL,'
+	                 . ' `header` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' `field_loop` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' `footer` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' `email_to` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' `email_from` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
+	                 . ' `email_subject` VARCHAR(255) NOT NULL DEFAULT \'\' ,'
 	                 . ' `success_message` TEXT NOT NULL DEFAULT \'\' ,'
 					 . ' `stored_submissions` INT NOT NULL,'
 					 . ' `max_submissions` INT NOT NULL,'
-					 . ' `use_captcha` INT NOT NULL,'
-	                 . ' PRIMARY KEY ( `section_id` ) )'
-	                 . ' ';
-	$database->query($mod_form);
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
-	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,'
-						  . ' `section_id` INT NOT NULL,'
+					 . ' `use_captcha` INT NOT NULL,'
+	                 . ' PRIMARY KEY ( `section_id` ) )'
+	                 . ' ';
+	$database->query($mod_form);
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_form_submissions`");
+	$mod_form = 'CREATE TABLE `'.TABLE_PREFIX.'mod_form_submissions` ( `submission_id` INT NOT NULL AUTO_INCREMENT,'
+						  . ' `section_id` INT NOT NULL,'
 						  . ' `page_id` INT NOT NULL,'
 						  . ' `submitted_when` INT NOT NULL,'
-						  . ' `submitted_by` INT NOT NULL,'
-	                 . ' `body` TEXT NOT NULL DEFAULT \'\' ,'
-	                 . ' PRIMARY KEY ( `submission_id` ) )'
-	                 . ' ';
+						  . ' `submitted_by` INT NOT NULL,'
+	                 . ' `body` TEXT NOT NULL DEFAULT \'\' ,'
+	                 . ' PRIMARY KEY ( `submission_id` ) )'
+	                 . ' ';
 	$database->query($mod_form);
-		
-	// Insert info into the search table
-	// Module query info
-	$field_info = array();
-	$field_info['page_id'] = 'page_id';
-	$field_info['title'] = 'page_title';
+		
+	// Insert info into the search table
+	// Module query info
+	$field_info = array();
+	$field_info['page_id'] = 'page_id';
+	$field_info['title'] = 'page_title';
 	$field_info['link'] = 'link';
 	$field_info['description'] = 'description';
 	$field_info['modified_when'] = 'modified_when';
-	$field_info['modified_by'] = 'modified_by';
-	$field_info = serialize($field_info);
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
-	// Query start
-	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_form_fields, [TP]mod_form_settings, [TP]pages WHERE ";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
-	// Query body
-	$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
-	OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
-	OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
-	// Query end
-	$query_end_code = '';
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
-	
-	// Insert blank row (there needs to be at least on row for the search to work)
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
+	$field_info['modified_by'] = 'modified_by';
+	$field_info = serialize($field_info);
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'form', '$field_info')");
+	// Query start
+	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_form_fields, [TP]mod_form_settings, [TP]pages WHERE ";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'form')");
+	// Query body
+	$query_body_code = " [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.header [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
+	OR [TP]pages.page_id = [TP]mod_form_settings.page_id AND [TP]mod_form_settings.footer [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'
+	OR [TP]pages.page_id = [TP]mod_form_fields.page_id AND [TP]mod_form_fields.title [O] \'[W][STRING][W]\' AND [TP]pages.searching = \'1\'";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'form')");
+	// Query end
+	$query_end_code = '';
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'form')");
+	
+	// Insert blank row (there needs to be at least on row for the search to work)
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_fields (page_id,section_id) VALUES ('0','0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id) VALUES ('0','0')");
 
 }
-
+
 ?>
Index: trunk/wb/modules/form/move_up.php
===================================================================
--- trunk/wb/modules/form/move_up.php	(revision 316)
+++ trunk/wb/modules/form/move_up.php	(revision 317)
@@ -28,31 +28,31 @@
 for his contributions to this module - adding extra field types
 */
 
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
-	header("Location: index.php");
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['field_id']) OR !is_numeric($_GET['field_id'])) {
+	header("Location: index.php");
 	exit(0);
-} else {
-	$field_id = $_GET['field_id'];
-}
-
-// Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
-// Include the ordering class
-require(WB_PATH.'/framework/class.order.php');
-
-// Create new order object an reorder
-$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
-if($order->move_up($field_id)) {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+} else {
+	$field_id = $_GET['field_id'];
+}
+
+// Include WB admin wrapper script
+require(WB_PATH.'/modules/admin.php');
+
+// Include the ordering class
+require(WB_PATH.'/framework/class.order.php');
+
+// Create new order object an reorder
+$order = new order(TABLE_PREFIX.'mod_form_fields', 'position', 'field_id', 'section_id');
+if($order->move_up($field_id)) {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_error($TEXT['ERROR'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/delete_submission.php
===================================================================
--- trunk/wb/modules/form/delete_submission.php	(revision 316)
+++ trunk/wb/modules/form/delete_submission.php	(revision 317)
@@ -27,32 +27,32 @@
 The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
 for his contributions to this module - adding extra submission types
 */
-
-require('../../config.php');
-
-// Get id
-if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
+
+require('../../config.php');
+
+// Get id
+if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
 	exit(0);
-} else {
-	$submission_id = $_GET['submission_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Delete row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+} else {
+	$submission_id = $_GET['submission_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Delete row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/view_submission.php
===================================================================
--- trunk/wb/modules/form/view_submission.php	(revision 316)
+++ trunk/wb/modules/form/view_submission.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -27,23 +27,23 @@
 The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
 for his contributions to this module - adding extra field types
 */
-
-require('../../config.php');
-
+
+require('../../config.php');
+
 // Get id
-if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
+if(!isset($_GET['submission_id']) OR !is_numeric($_GET['submission_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
 	exit(0);
-} else {
-	$submission_id = $_GET['submission_id'];
-}
-
+} else {
+	$submission_id = $_GET['submission_id'];
+}
+
 // Include WB admin wrapper script
-require(WB_PATH.'/modules/admin.php');
-
+require(WB_PATH.'/modules/admin.php');
+
 // Get submission details
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
-$submission = $query_content->fetchRow();
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_form_submissions WHERE submission_id = '$submission_id'");
+$submission = $query_content->fetchRow();
 
 // Get the user details of whoever did this submission
 $query_user = "SELECT username,display_name FROM ".TABLE_PREFIX."users WHERE user_id = '".$submission['submitted_by']."'";
@@ -54,8 +54,8 @@
 	$user['display_name'] = 'Unknown';
 	$user['username'] = 'unknown';
 }
-
-?>
+
+?>
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
 	<td><?php echo $TEXT['SUBMISSION_ID']; ?>:</td>
@@ -84,10 +84,10 @@
 <br />
 
 <input type="button" value="<?php echo $TEXT['CLOSE']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 150px; margin-top: 5px;" />
-<input type="button" value="<?php echo $TEXT['DELETE']; ?>" onclick="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission_id; ?>');" style="width: 150px; margin-top: 5px;" />
-<?php
-
+<input type="button" value="<?php echo $TEXT['DELETE']; ?>" onclick="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission_id; ?>');" style="width: 150px; margin-top: 5px;" />
+<?php
+
 // Print admin footer
-$admin->print_footer();
-
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/form/modify.php
===================================================================
--- trunk/wb/modules/form/modify.php	(revision 316)
+++ trunk/wb/modules/form/modify.php	(revision 317)
@@ -28,48 +28,48 @@
 for his contributions to this module - adding extra field types
 */
 
-// Must include code to stop this file being access directly
-if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
-
-?>
-<table cellpadding="0" cellspacing="0" border="0" width="100%">
-<tr>
-	<td align="left" width="33%">
-		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-	<td align="right" width="33%">
-		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
-	</td>
-</tr>
-</table>
-
-<br />
-
-<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['FIELD']; ?></h2>
-<?php
-
-// Loop through existing fields
-$query_fields = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_fields` WHERE section_id = '$section_id' ORDER BY position ASC");
-if($query_fields->numRows() > 0) {
-	$num_fields = $query_fields->numRows();
-	$row = 'a';
-	?>
-	<table cellpadding="2" cellspacing="0" border="0" width="100%">
-	<?php
-	while($field = $query_fields->fetchRow()) {
-		?>
-		<tr class="row_<?php echo $row; ?>" height="20">
-			<td width="20" style="padding-left: 5px;">
-				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="^" />
-				</a>
-			</td>		
-			<td>
-				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
-					<?php echo $field['title']; ?>
-				</a>
-			</td>
-			<td width="175">
+// Must include code to stop this file being access directly
+if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
+
+?>
+<table cellpadding="0" cellspacing="0" border="0" width="100%">
+<tr>
+	<td align="left" width="33%">
+		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['FIELD']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/add_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+	<td align="right" width="33%">
+		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/form/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+	</td>
+</tr>
+</table>
+
+<br />
+
+<h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['FIELD']; ?></h2>
+<?php
+
+// Loop through existing fields
+$query_fields = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_fields` WHERE section_id = '$section_id' ORDER BY position ASC");
+if($query_fields->numRows() > 0) {
+	$num_fields = $query_fields->numRows();
+	$row = 'a';
+	?>
+	<table cellpadding="2" cellspacing="0" border="0" width="100%">
+	<?php
+	while($field = $query_fields->fetchRow()) {
+		?>
+		<tr class="row_<?php echo $row; ?>" height="20">
+			<td width="20" style="padding-left: 5px;">
+				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="^" />
+				</a>
+			</td>		
+			<td>
+				<a href="<?php echo WB_URL; ?>/modules/form/modify_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>">
+					<?php echo $field['title']; ?>
+				</a>
+			</td>
+			<td width="175">
 				<?php
 				echo $TEXT['TYPE'].':';
 				if($field['type'] == 'textfield') {
@@ -87,68 +87,68 @@
 				} elseif($field['type'] == 'email') {
 					echo $TEXT['EMAIL_ADDRESS'];
 				}
-				?>
+				?>
 			</td>
-			<td width="95">		-			<?php 
-			if ($field['type'] != 'group_begin') {
-				echo $TEXT['REQUIRED'].': '; if($field['required'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
+			<td width="95">		
+			<?php 
+			if ($field['type'] != 'group_begin') {
+				echo $TEXT['REQUIRED'].': '; if($field['required'] == 1) { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
 			}
 			?>
 			</td>
 			<td width="110">
-			<?php
-			if ($field['type'] == 'select') {
-				$field['extra'] = explode(',',$field['extra']);
-				echo $TEXT['MULTISELECT'].': '; if($field['extra'][1] == 'multiple') { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
-			}
+			<?php
+			if ($field['type'] == 'select') {
+				$field['extra'] = explode(',',$field['extra']);
+				echo $TEXT['MULTISELECT'].': '; if($field['extra'][1] == 'multiple') { echo $TEXT['YES']; } else { echo $TEXT['NO']; }
+			}
 			?>
-			</td>
-			<td width="20">
-			<?php if($field['position'] != 1) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-			<?php if($field['position'] != $num_fields) { ?>
-				<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
-				</a>
-			<?php } ?>
-			</td>
-			<td width="20">
-				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
-			</td>
-		</tr>
-		<?php
-		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
-		}
-	}
-	?>
-	</table>
-	<?php
-} else {
-	echo $TEXT['NONE_FOUND'];
-}
-
+			</td>
+			<td width="20">
+			<?php if($field['position'] != 1) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/form/move_up.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+			<?php if($field['position'] != $num_fields) { ?>
+				<a href="<?php echo WB_URL; ?>/modules/form/move_down.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
+				</a>
+			<?php } ?>
+			</td>
+			<td width="20">
+				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_field.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&field_id=<?php echo $field['field_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
+			</td>
+		</tr>
+		<?php
+		// Alternate row color
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
+		}
+	}
+	?>
+	</table>
+	<?php
+} else {
+	echo $TEXT['NONE_FOUND'];
+}
+
 ?>
-
+
 <br /><br />
 
-<h2><?php echo $TEXT['SUBMISSIONS']; ?></h2>
+<h2><?php echo $TEXT['SUBMISSIONS']; ?></h2>
 
 <?php
 
 // Query submissions table
-$query_submissions = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_submissions` WHERE section_id = '$section_id' ORDER BY submitted_when ASC");
+$query_submissions = $database->query("SELECT * FROM `".TABLE_PREFIX."mod_form_submissions` WHERE section_id = '$section_id' ORDER BY submitted_when ASC");
 if($query_submissions->numRows() > 0) {
 	?>
 	<table cellpadding="2" cellspacing="0" border="0" width="100%">
@@ -165,18 +165,18 @@
 			</td>
 			<td width="237"><?php echo $TEXT['SUBMISSION_ID'].': '.$submission['submission_id']; ?></td>
 			<td><?php echo $TEXT['SUBMITTED'].': '.gmdate(TIME_FORMAT.', '.DATE_FORMAT, $submission['submitted_when']+TIMEZONE); ?></td>
-			<td width="20">
-				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
-					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
-				</a>
+			<td width="20">
+				<a href="javascript: confirm_link('<?php echo $TEXT['ARE_YOU_SURE']; ?>', '<?php echo WB_URL; ?>/modules/form/delete_submission.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&submission_id=<?php echo $submission['submission_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>">
+					<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
+				</a>
 			</td>
 		</tr>
 		<?php
 		// Alternate row color
-		if($row == 'a') {
-			$row = 'b';
-		} else {
-			$row = 'a';
+		if($row == 'a') {
+			$row = 'b';
+		} else {
+			$row = 'a';
 		}
 	}
 	?>
@@ -187,5 +187,5 @@
 }
 
 ?>
-
+
 <br />
\ No newline at end of file
Index: trunk/wb/modules/form/add.php
===================================================================
--- trunk/wb/modules/form/add.php	(revision 316)
+++ trunk/wb/modules/form/add.php	(revision 317)
@@ -27,9 +27,9 @@
 The Website Baker Project would like to thank Rudolph Lartey <www.carbonect.com>
 for his contributions to this module - adding extra field types
 */
-
-// Insert an extra rows into the database
-$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
+
+// Insert an extra rows into the database
+$header = '<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
 $field_loop = '<tr><td class=\"field_title\">{TITLE}{REQUIRED}:</td><td>{FIELD}</td></tr>';
 $footer = '<tr><td>&nbsp;</td>
 <td>
@@ -36,10 +36,10 @@
 <input type=\"submit\" name=\"submit\" value=\"Submit Form\" />
 </td>
 </tr>
-</table>';
-$email_to = $admin->get_email();
-$email_from = '';
-$email_subject = 'Results from form on website...';
+</table>';
+$email_to = $admin->get_email();
+$email_from = '';
+$email_subject = 'Results from form on website...';
 $success_message = 'Thank-you.';
 $max_submissions = 50;
 $stored_submissions = 100;
@@ -48,6 +48,6 @@
 } else {
 	$use_captcha = false;
 }
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_subject,success_message,max_submissions,stored_submissions,use_captcha) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_subject','$success_message','$max_submissions','$stored_submissions','$use_captcha')");
-
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_form_settings (page_id,section_id,header,field_loop,footer,email_to,email_from,email_subject,success_message,max_submissions,stored_submissions,use_captcha) VALUES ('$page_id','$section_id','$header','$field_loop','$footer','$email_to','$email_from','$email_subject','$success_message','$max_submissions','$stored_submissions','$use_captcha')");
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/code/modify.html
===================================================================
--- trunk/wb/modules/code/modify.html	(revision 316)
+++ trunk/wb/modules/code/modify.html	(revision 317)
@@ -1,6 +1,6 @@
 <!-- BEGIN main_block -->
 
-<form action="{WB_URL}/modules/code/save.php" method="post">
+<form action="{WB_URL}/modules/code/save.php" method="post">
 
 <input type="hidden" name="page_id" value="{PAGE_ID}" />
 <input type="hidden" name="section_id" value="{SECTION_ID}" />
@@ -9,7 +9,7 @@
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
-	<td align="left">
+	<td align="left">
 		<input type="submit" value="{TEXT_SAVE}" style="width: 100px; margin-top: 5px;" />
 	</td>
 	<td align="right">
Index: trunk/wb/modules/news/info.php
===================================================================
--- trunk/wb/modules/news/info.php	(revision 316)
+++ trunk/wb/modules/news/info.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -29,7 +29,7 @@
 $module_version = '2.6';
 $module_platform = '2.6.x';
 $module_author = 'Ryan Djurovich';
-$module_license = 'GNU General Public License';
-$module_description = 'This page type is designed for making a news page.';
-
+$module_license = 'GNU General Public License';
+$module_description = 'This page type is designed for making a news page.';
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/move_down.php
===================================================================
--- trunk/wb/modules/news/move_down.php	(revision 316)
+++ trunk/wb/modules/news/move_down.php	(revision 317)
@@ -39,7 +39,7 @@
 	$id = $_GET['post_id'];
 	$id_field = 'post_id';
 	$table = TABLE_PREFIX.'mod_news_posts';
-}
+}
 
 // Include WB admin wrapper script
 require(WB_PATH.'/modules/admin.php');
Index: trunk/wb/modules/news/add_post.php
===================================================================
--- trunk/wb/modules/news/add_post.php	(revision 316)
+++ trunk/wb/modules/news/add_post.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Include WB admin wrapper script
 require(WB_PATH.'/modules/admin.php');
 
Index: trunk/wb/modules/news/delete.php
===================================================================
--- trunk/wb/modules/news/delete.php	(revision 316)
+++ trunk/wb/modules/news/delete.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -21,14 +21,14 @@
  along with Website Baker; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
-
+*/
+
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id'");
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE section_id = '$section_id'");
 $database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments WHERE section_id = '$section_id'");
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/save_post.php
===================================================================
--- trunk/wb/modules/news/save_post.php	(revision 316)
+++ trunk/wb/modules/news/save_post.php	(revision 317)
@@ -1,116 +1,116 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2006, Ryan Djurovich
-
- Website Baker 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.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-	exit(0);
-} else {
-	$id = $_POST['post_id'];
-	$post_id = $id;
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Validate all fields
-if($admin->get_post('title') == '' AND $admin->get_post('url') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$short = $admin->add_slashes($admin->get_post('short'));
-	$long = $admin->add_slashes($admin->get_post('long'));
-	$commenting = $admin->get_post('commenting');
-	$active = $admin->get_post('active');
-	$old_link = $admin->get_post('link');
-	$group_id = $admin->get_post('group');
-}
-
-// Get page link URL
-$query_page = $database->query("SELECT level,link FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
-$page = $query_page->fetchRow();
-$page_level = $page['level'];
-$page_link = $page['link'];
-
-// Include WB functions file
-require(WB_PATH.'/framework/functions.php');
-
-// Work-out what the link should be
-$post_link = '/posts/'.page_filename($title).$post_id;
-
-// Make sure the post link is set and exists
-// Make news post access files dir
-make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
-if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/posts/')) {
-	$admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCESS_FILE']);
-} elseif($old_link != $post_link OR !file_exists(WB_PATH.PAGES_DIRECTORY.$post_link.'.php')) {
-	// We need to create a new file
-	// First, delete old file if it exists
-	if(file_exists(WB_PATH.$old_link.'.php')) {
-		unlink(WB_PATH.$old_link.'.php');
-	}
-	// Specify the filename
-	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$post_link.'.php';
-	// The depth of the page directory in the directory hierarchy
-	// '/pages' is at depth 1
-	$pages_dir_depth=count(explode('/',PAGES_DIRECTORY))-1;
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2006, Ryan Djurovich
+
+ Website Baker 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.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
+} else {
+	$id = $_POST['post_id'];
+	$post_id = $id;
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Validate all fields
+if($admin->get_post('title') == '' AND $admin->get_post('url') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$short = $admin->add_slashes($admin->get_post('short'));
+	$long = $admin->add_slashes($admin->get_post('long'));
+	$commenting = $admin->get_post('commenting');
+	$active = $admin->get_post('active');
+	$old_link = $admin->get_post('link');
+	$group_id = $admin->get_post('group');
+}
+
+// Get page link URL
+$query_page = $database->query("SELECT level,link FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
+$page = $query_page->fetchRow();
+$page_level = $page['level'];
+$page_link = $page['link'];
+
+// Include WB functions file
+require(WB_PATH.'/framework/functions.php');
+
+// Work-out what the link should be
+$post_link = '/posts/'.page_filename($title).$post_id;
+
+// Make sure the post link is set and exists
+// Make news post access files dir
+make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
+if(!is_writable(WB_PATH.PAGES_DIRECTORY.'/posts/')) {
+	$admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCESS_FILE']);
+} elseif($old_link != $post_link OR !file_exists(WB_PATH.PAGES_DIRECTORY.$post_link.'.php')) {
+	// We need to create a new file
+	// First, delete old file if it exists
+	if(file_exists(WB_PATH.$old_link.'.php')) {
+		unlink(WB_PATH.$old_link.'.php');
+	}
+	// Specify the filename
+	$filename = WB_PATH.PAGES_DIRECTORY.'/'.$post_link.'.php';
+	// The depth of the page directory in the directory hierarchy
+	// '/pages' is at depth 1
+	$pages_dir_depth=count(explode('/',PAGES_DIRECTORY))-1;
 	// Work-out how many ../'s we need to get to the index page
-	$index_location = '../';
-	for($i = 0; $i < $pages_dir_depth; $i++) {
-		$index_location .= '../';
-	}
-	// Write to the filename
-	$content = ''.
-'<?php
-$page_id = '.$page_id.';
-$section_id = '.$section_id.';
-$post_id = '.$post_id.';
-define("POST_ID", $post_id);
-require("'.$index_location.'config.php");
-require(WB_PATH."/index.php");
-?>';
-	$handle = fopen($filename, 'w');
-	fwrite($handle, $content);
-	fclose($handle);
-	change_mode($filename);
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
+	$index_location = '../';
+	for($i = 0; $i < $pages_dir_depth; $i++) {
+		$index_location .= '../';
+	}
+	// Write to the filename
+	$content = ''.
+'<?php
+$page_id = '.$page_id.';
+$section_id = '.$section_id.';
+$post_id = '.$post_id.';
+define("POST_ID", $post_id);
+require("'.$index_location.'config.php");
+require(WB_PATH."/index.php");
+?>';
+	$handle = fopen($filename, 'w');
+	fwrite($handle, $content);
+	fclose($handle);
+	change_mode($filename);
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/modify_group.php
===================================================================
--- trunk/wb/modules/news/modify_group.php	(revision 316)
+++ trunk/wb/modules/news/modify_group.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Get id
 if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
@@ -36,17 +36,17 @@
 // Include WB admin wrapper script
 require(WB_PATH.'/modules/admin.php');
 
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
 $fetch_content = $query_content->fetchRow();
 
-?>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_group.php" method="post" enctype="multipart/form-data" style="margin: 0;">
-
+?>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_group.php" method="post" enctype="multipart/form-data" style="margin: 0;">
+
 <input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
 <input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
-<input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
+<input type="hidden" name="group_id" value="<?php echo $group_id; ?>">
 
 <table cellpadding="4" cellspacing="0" border="0" width="100%">
 <tr>
@@ -88,10 +88,10 @@
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
-	<td align="left">
+	<td align="left">
 		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
 	</td>
-	<td align="right">
+	<td align="right">
 		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
 	</td>
 </tr>
Index: trunk/wb/modules/news/add_group.php
===================================================================
--- trunk/wb/modules/news/add_group.php	(revision 316)
+++ trunk/wb/modules/news/add_group.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Include WB admin wrapper script
 require(WB_PATH.'/modules/admin.php');
 
Index: trunk/wb/modules/news/install.php
===================================================================
--- trunk/wb/modules/news/install.php	(revision 316)
+++ trunk/wb/modules/news/install.php	(revision 317)
@@ -1,137 +1,137 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2006, Ryan Djurovich
-
- Website Baker 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.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-if(defined('WB_URL')) {
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_posts` ( '
-					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`group_id` INT NOT NULL,'
-					 . '`active` INT NOT NULL,'
-					 . '`position` INT NOT NULL,'
-					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
-					 . '`link` TEXT NOT NULL DEFAULT \'\','
-					 . '`content_short` TEXT NOT NULL DEFAULT \'\','
-					 . '`content_long` TEXT NOT NULL DEFAULT \'\','
-					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
-		   	    	 . '`posted_when` INT NOT NULL ,'
-					 . '`posted_by` INT NOT NULL ,'
-					 . 'PRIMARY KEY (post_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_groups` ( '
-					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`active` INT NOT NULL,'
-					 . '`position` INT NOT NULL,'
-					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
-					 . 'PRIMARY KEY (group_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_comments` ( '
-					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`post_id` INT NOT NULL,'
-					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
-					 . '`comment` TEXT NOT NULL DEFAULT \'\','
-		   	    . '`commented_when` INT NOT NULL ,'
-					 . '`commented_by` INT NOT NULL ,'
-					 . 'PRIMARY KEY (comment_id)'
-                . ' )';
-	$database->query($mod_news);
-	
-	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
-	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( '
-					 . '`section_id` INT NOT NULL,'
-					 . '`page_id` INT NOT NULL,'
-					 . '`header` TEXT NOT NULL DEFAULT \'\','
-					 . '`post_loop` TEXT NOT NULL DEFAULT \'\','
-					 . '`footer` TEXT NOT NULL DEFAULT \'\','
-					 . '`posts_per_page` INT NOT NULL,'
-					 . '`post_header` TEXT NOT NULL DEFAULT \'\','
-					 . '`post_footer` TEXT NOT NULL DEFAULT \'\','
-					 . '`comments_header` TEXT NOT NULL DEFAULT \'\','
-					 . '`comments_loop` TEXT NOT NULL DEFAULT \'\','
-					 . '`comments_footer` TEXT NOT NULL DEFAULT \'\','
-					 . '`comments_page` TEXT NOT NULL DEFAULT \'\','
-					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
-					 . '`resize` INT NOT NULL,'
-					 . ' `use_captcha` INT NOT NULL,'
-					 . 'PRIMARY KEY (section_id)'
-                . ' )';
-	$database->query($mod_news);
-		
-	// Insert info into the search table
-	// Module query info
-	$field_info = array();
-	$field_info['page_id'] = 'page_id';
-	$field_info['title'] = 'page_title';
-	$field_info['link'] = 'link';
-	$field_info['description'] = 'description';
-	$field_info['modified_when'] = 'modified_when';
-	$field_info['modified_by'] = 'modified_by';
-	$field_info = serialize($field_info);
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')");
-	// Query start
-	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE ";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')");
-	// Query body
-	$query_body_code = "
-	[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\'
-	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'";
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')");
-	// Query end
-	$query_end_code = "";	
-	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')");
-	
-	// Insert blank row (there needs to be at least on row for the search to work)
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')");
-	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')");
-	
-	// Make news post access files dir
-	make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
-	
-}
-
-?>
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2006, Ryan Djurovich
+
+ Website Baker 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.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+if(defined('WB_URL')) {
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_posts`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_posts` ( '
+					 . '`post_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`group_id` INT NOT NULL,'
+					 . '`active` INT NOT NULL,'
+					 . '`position` INT NOT NULL,'
+					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
+					 . '`link` TEXT NOT NULL DEFAULT \'\','
+					 . '`content_short` TEXT NOT NULL DEFAULT \'\','
+					 . '`content_long` TEXT NOT NULL DEFAULT \'\','
+					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
+		   	    	 . '`posted_when` INT NOT NULL ,'
+					 . '`posted_by` INT NOT NULL ,'
+					 . 'PRIMARY KEY (post_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_groups`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_groups` ( '
+					 . '`group_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`active` INT NOT NULL,'
+					 . '`position` INT NOT NULL,'
+					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
+					 . 'PRIMARY KEY (group_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_comments`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_comments` ( '
+					 . '`comment_id` INT NOT NULL AUTO_INCREMENT,'
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`post_id` INT NOT NULL,'
+					 . '`title` VARCHAR(255) NOT NULL DEFAULT \'\','
+					 . '`comment` TEXT NOT NULL DEFAULT \'\','
+		   	    . '`commented_when` INT NOT NULL ,'
+					 . '`commented_by` INT NOT NULL ,'
+					 . 'PRIMARY KEY (comment_id)'
+                . ' )';
+	$database->query($mod_news);
+	
+	$database->query("DROP TABLE IF EXISTS `".TABLE_PREFIX."mod_news_settings`");
+	$mod_news = 'CREATE TABLE `'.TABLE_PREFIX.'mod_news_settings` ( '
+					 . '`section_id` INT NOT NULL,'
+					 . '`page_id` INT NOT NULL,'
+					 . '`header` TEXT NOT NULL DEFAULT \'\','
+					 . '`post_loop` TEXT NOT NULL DEFAULT \'\','
+					 . '`footer` TEXT NOT NULL DEFAULT \'\','
+					 . '`posts_per_page` INT NOT NULL,'
+					 . '`post_header` TEXT NOT NULL DEFAULT \'\','
+					 . '`post_footer` TEXT NOT NULL DEFAULT \'\','
+					 . '`comments_header` TEXT NOT NULL DEFAULT \'\','
+					 . '`comments_loop` TEXT NOT NULL DEFAULT \'\','
+					 . '`comments_footer` TEXT NOT NULL DEFAULT \'\','
+					 . '`comments_page` TEXT NOT NULL DEFAULT \'\','
+					 . '`commenting` VARCHAR(7) NOT NULL DEFAULT \'\','
+					 . '`resize` INT NOT NULL,'
+					 . ' `use_captcha` INT NOT NULL,'
+					 . 'PRIMARY KEY (section_id)'
+                . ' )';
+	$database->query($mod_news);
+		
+	// Insert info into the search table
+	// Module query info
+	$field_info = array();
+	$field_info['page_id'] = 'page_id';
+	$field_info['title'] = 'page_title';
+	$field_info['link'] = 'link';
+	$field_info['description'] = 'description';
+	$field_info['modified_when'] = 'modified_when';
+	$field_info['modified_by'] = 'modified_by';
+	$field_info = serialize($field_info);
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('module', 'news', '$field_info')");
+	// Query start
+	$query_start_code = "SELECT [TP]pages.page_id, [TP]pages.page_title,	[TP]pages.link, [TP]pages.description, [TP]pages.modified_when, [TP]pages.modified_by	FROM [TP]mod_news_posts, [TP]mod_news_groups, [TP]mod_news_comments, [TP]mod_news_settings, [TP]pages WHERE ";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_start', '$query_start_code', 'news')");
+	// Query body
+	$query_body_code = "
+	[TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.title LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_short LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_posts.page_id AND [TP]mod_news_posts.content_long LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.title LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_comments.page_id AND [TP]mod_news_comments.comment LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.header LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.footer LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_header LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.post_footer LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_header LIKE \'%[STRING]%\'
+	OR [TP]pages.page_id = [TP]mod_news_settings.page_id AND [TP]mod_news_settings.comments_footer LIKE \'%[STRING]%\'";
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_body', '$query_body_code', 'news')");
+	// Query end
+	$query_end_code = "";	
+	$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('query_end', '$query_end_code', 'news')");
+	
+	// Insert blank row (there needs to be at least on row for the search to work)
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_posts (section_id,page_id) VALUES ('0', '0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_groups (section_id,page_id) VALUES ('0', '0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id) VALUES ('0', '0')");
+	$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id) VALUES ('0', '0')");
+	
+	// Make news post access files dir
+	make_dir(WB_PATH.PAGES_DIRECTORY.'/posts/');
+	
+}
+
+?>
Index: trunk/wb/modules/news/modify_settings.php
===================================================================
--- trunk/wb/modules/news/modify_settings.php	(revision 316)
+++ trunk/wb/modules/news/modify_settings.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,14 +22,14 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Include WB admin wrapper script
 require(WB_PATH.'/modules/admin.php');
 
-// Get header and footer
-$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+// Get header and footer
+$query_content = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
 $fetch_content = $query_content->fetchRow();
 
 // Set raw html <'s and >'s to be replace by friendly html code
@@ -42,12 +42,12 @@
 .setting_name {
 	vertical-align: top;
 }
-</style>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_settings.php" method="post" style="margin: 0;">
-
+</style>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_settings.php" method="post" style="margin: 0;">
+
 <input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
-<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
+<input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
 
 <table cellpadding="2" cellspacing="0" border="0" width="100%">
 <tr>
@@ -164,10 +164,10 @@
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
 	<td width="105">&nbsp;</td>
-	<td align="left">
+	<td align="left">
 		<input name="save" type="submit" value="<?php echo $TEXT['SAVE'].' '.$TEXT['SETTINGS']; ?>" style="width: 200px; margin-top: 5px;"></form>
 	</td>
-	<td align="right">
+	<td align="right">
 		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" />
 	</td>
 </tr>
Index: trunk/wb/modules/news/delete_post.php
===================================================================
--- trunk/wb/modules/news/delete_post.php	(revision 316)
+++ trunk/wb/modules/news/delete_post.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Get id
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
@@ -50,8 +50,8 @@
 	unlink(WB_PATH.$get_details['link'].'.php');
 }
 
-// Delete post
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id' LIMIT 1");
+// Delete post
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id' LIMIT 1");
 
 // Clean up ordering
 require(WB_PATH.'/framework/class.order.php');
Index: trunk/wb/modules/news/index.php
===================================================================
--- trunk/wb/modules/news/index.php	(revision 316)
+++ trunk/wb/modules/news/index.php	(revision 317)
@@ -1,3 +1,3 @@
-<?php
-header("Location: ../../index.php");
+<?php
+header("Location: ../../index.php");
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/modify_comment.php
===================================================================
--- trunk/wb/modules/news/modify_comment.php	(revision 316)
+++ trunk/wb/modules/news/modify_comment.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Get id
 if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
@@ -36,18 +36,18 @@
 // Include WB admin wrapper script
 require(WB_PATH.'/modules/admin.php');
 
-// Get header and footer
-$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
+// Get header and footer
+$query_content = $database->query("SELECT post_id,title,comment FROM ".TABLE_PREFIX."mod_news_comments WHERE comment_id = '$comment_id'");
 $fetch_content = $query_content->fetchRow();
 
-?>
-
-<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
-
+?>
+
+<form name="modify" action="<?php echo WB_URL; ?>/modules/news/save_comment.php" method="post" style="margin: 0;">
+
 <input type="hidden" name="section_id" value="<?php echo $section_id; ?>">
 <input type="hidden" name="page_id" value="<?php echo $page_id; ?>">
 <input type="hidden" name="post_id" value="<?php echo $fetch_content['post_id']; ?>">
-<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>">
+<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>">
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
@@ -64,14 +64,14 @@
 </tr>
 </table>
 
-<br />
+<br />
 
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
-	<td align="left">
+	<td align="left">
 		<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 200px; margin-top: 5px;"></form>
 	</td>
-	<td align="right">
+	<td align="right">
 		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $fetch_content['post_id']; ?>';" style="width: 100px; margin-top: 5px;" />
 	</td>
 </tr>
Index: trunk/wb/modules/news/uninstall.php
===================================================================
--- trunk/wb/modules/news/uninstall.php	(revision 316)
+++ trunk/wb/modules/news/uninstall.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -21,18 +21,18 @@
  along with Website Baker; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+*/
 
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
 $database->query("DELETE FROM ".TABLE_PREFIX."search WHERE name = 'module' AND value = 'news'");
-$database->query("DELETE FROM ".TABLE_PREFIX."search WHERE extra = 'news'");
+$database->query("DELETE FROM ".TABLE_PREFIX."search WHERE extra = 'news'");
 $database->query("DROP TABLE ".TABLE_PREFIX."mod_news_posts");
 $database->query("DROP TABLE ".TABLE_PREFIX."mod_news_groups");
 $database->query("DROP TABLE ".TABLE_PREFIX."mod_news_comments");
-$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_settings");
+$database->query("DROP TABLE ".TABLE_PREFIX."mod_news_settings");
 require(WB_PATH.'/framework/functions.php');
 rm_full_dir(WB_PATH.PAGES_DIRECTORY.'/posts');
-
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/move_up.php
===================================================================
--- trunk/wb/modules/news/move_up.php	(revision 316)
+++ trunk/wb/modules/news/move_up.php	(revision 317)
@@ -23,7 +23,7 @@
 
 */
 
-require('../../config.php');
+require('../../config.php');
 
 // Get id
 if(!isset($_GET['post_id']) OR !is_numeric($_GET['post_id'])) {
Index: trunk/wb/modules/news/save_group.php
===================================================================
--- trunk/wb/modules/news/save_group.php	(revision 316)
+++ trunk/wb/modules/news/save_group.php	(revision 317)
@@ -1,100 +1,100 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2006, Ryan Djurovich
-
- Website Baker 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.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-require('../../config.php');
-
-// Get id
-if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id'])) {
-	header("Location: ".ADMIN_URL."/pages/index.php");
-	exit(0);
-} else {
-	$group_id = $_POST['group_id'];
-}
-
-// Include WB admin wrapper script
-$update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
-// Include WB functions file
-require(WB_PATH.'/framework/functions.php');
-
-// Vagroup_idate all fields
-if($admin->get_post('title') == '') {
-	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
-} else {
-	$title = $admin->add_slashes($admin->get_post('title'));
-	$active = $admin->get_post('active');
-}
-
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_groups SET title = '$title', active = '$active' WHERE group_id = '$group_id'");
-
-// Check if the user uploaded an image or wants to delete one
-if(isset($_FILES['image']['tmp_name']) AND $_FILES['image']['tmp_name'] != '') {
-	// Get real filename and set new filename
-	$filename = $_FILES['image']['name'];
-	$new_filename = WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
-	// Make sure the image is a jpg file
-	if(substr($filename, -3, 3) != 'jpg') {
-		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
-	} elseif(mime_content_type($_FILES['image']['tmp_name']) != 'image/jpeg' AND mime_content_type($_FILES['image']['tmp_name']) != 'image/jpg') {
-		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
-	}
-	// Make sure the target directory exists
-	make_dir(WB_PATH.MEDIA_DIRECTORY.'/.news');
-	// Upload image
-	move_uploaded_file($_FILES['image']['tmp_name'], $new_filename);
-	// Check if we need to create a thumb
-	$query_settings = $database->query("SELECT resize FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
-	$fetch_settings = $query_settings->fetchRow();
-	$resize = $fetch_settings['resize'];
-	if($resize != 0) {
-		// Resize the image
-		$thumb_location = WB_PATH.MEDIA_DIRECTORY.'/.news/thumb'.$group_id.'.jpg';
-		if(make_thumb($new_filename, $thumb_location, $resize)) {
-			// Delete the actual image and replace with the resized version
-			unlink($new_filename);
-			rename($thumb_location, $new_filename);
-		}
-	}
-}
-if(isset($_POST['delete_image']) AND $_POST['delete_image'] != '') {
-	// Try unlinking image
-	if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
-		unlink(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg');
-	}
-}
-
-// Check if there is a db error, otherwise say successful
-if($database->is_error()) {
-	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
-} else {
-	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
-}
-
-// Print admin footer
-$admin->print_footer();
-
-?>
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2006, Ryan Djurovich
+
+ Website Baker 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.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+require('../../config.php');
+
+// Get id
+if(!isset($_POST['group_id']) OR !is_numeric($_POST['group_id'])) {
+	header("Location: ".ADMIN_URL."/pages/index.php");
+	exit(0);
+} else {
+	$group_id = $_POST['group_id'];
+}
+
+// Include WB admin wrapper script
+$update_when_modified = true; // Tells script to update when this page was last updated
+require(WB_PATH.'/modules/admin.php');
+
+// Include WB functions file
+require(WB_PATH.'/framework/functions.php');
+
+// Vagroup_idate all fields
+if($admin->get_post('title') == '') {
+	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
+} else {
+	$title = $admin->add_slashes($admin->get_post('title'));
+	$active = $admin->get_post('active');
+}
+
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_groups SET title = '$title', active = '$active' WHERE group_id = '$group_id'");
+
+// Check if the user uploaded an image or wants to delete one
+if(isset($_FILES['image']['tmp_name']) AND $_FILES['image']['tmp_name'] != '') {
+	// Get real filename and set new filename
+	$filename = $_FILES['image']['name'];
+	$new_filename = WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
+	// Make sure the image is a jpg file
+	if(substr($filename, -3, 3) != 'jpg') {
+		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
+	} elseif(mime_content_type($_FILES['image']['tmp_name']) != 'image/jpeg' AND mime_content_type($_FILES['image']['tmp_name']) != 'image/jpg') {
+		$admin->print_error($MESSAGE['GENERIC']['FILE_TYPE'].' JPG (JPEG)');
+	}
+	// Make sure the target directory exists
+	make_dir(WB_PATH.MEDIA_DIRECTORY.'/.news');
+	// Upload image
+	move_uploaded_file($_FILES['image']['tmp_name'], $new_filename);
+	// Check if we need to create a thumb
+	$query_settings = $database->query("SELECT resize FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
+	$fetch_settings = $query_settings->fetchRow();
+	$resize = $fetch_settings['resize'];
+	if($resize != 0) {
+		// Resize the image
+		$thumb_location = WB_PATH.MEDIA_DIRECTORY.'/.news/thumb'.$group_id.'.jpg';
+		if(make_thumb($new_filename, $thumb_location, $resize)) {
+			// Delete the actual image and replace with the resized version
+			unlink($new_filename);
+			rename($thumb_location, $new_filename);
+		}
+	}
+}
+if(isset($_POST['delete_image']) AND $_POST['delete_image'] != '') {
+	// Try unlinking image
+	if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
+		unlink(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg');
+	}
+}
+
+// Check if there is a db error, otherwise say successful
+if($database->is_error()) {
+	$admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_group.php?page_id='.$page_id.'&section_id='.$section_id.'&group_id='.$group_id);
+} else {
+	$admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
+}
+
+// Print admin footer
+$admin->print_footer();
+
+?>
Index: trunk/wb/modules/news/delete_group.php
===================================================================
--- trunk/wb/modules/news/delete_group.php	(revision 316)
+++ trunk/wb/modules/news/delete_group.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Get id
 if(!isset($_GET['group_id']) OR !is_numeric($_GET['group_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
@@ -37,8 +37,8 @@
 $update_when_modified = true; // Tells script to update when this page was last updated
 require(WB_PATH.'/modules/admin.php');
 
-// Update row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
+// Update row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '$group_id'");
 
 // Check if there is a db error, otherwise say successful
 if($database->is_error()) {
Index: trunk/wb/modules/news/save_settings.php
===================================================================
--- trunk/wb/modules/news/save_settings.php	(revision 316)
+++ trunk/wb/modules/news/save_settings.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,17 +22,17 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Include WB admin wrapper script
 $update_when_modified = true; // Tells script to update when this page was last updated
-require(WB_PATH.'/modules/admin.php');
-
+require(WB_PATH.'/modules/admin.php');
+
 // This code removes any <?php tags and adds slashes
 $friendly = array('&lt;', '&gt;', '?php');
-$raw = array('<', '>', '');
-$header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['header']));
+$raw = array('<', '>', '');
+$header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['header']));
 $post_loop = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_loop']));
 $footer = $admin->add_slashes(str_replace($friendly, $raw, $_POST['footer']));
 $post_header = $admin->add_slashes(str_replace($friendly, $raw, $_POST['post_header']));
@@ -51,8 +51,8 @@
 	$use_captcha = false;
 }
 
-// Update settings
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_settings SET header = '$header', post_loop = '$post_loop', footer = '$footer', posts_per_page = '$posts_per_page', post_header = '$post_header', post_footer = '$post_footer', comments_header = '$comments_header', comments_loop = '$comments_loop', comments_footer = '$comments_footer', comments_page = '$comments_page', commenting = '$commenting', resize = '$resize', use_captcha = '$use_captcha' WHERE section_id = '$section_id'");
+// Update settings
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_settings SET header = '$header', post_loop = '$post_loop', footer = '$footer', posts_per_page = '$posts_per_page', post_header = '$post_header', post_footer = '$post_footer', comments_header = '$comments_header', comments_loop = '$comments_loop', comments_footer = '$comments_footer', comments_page = '$comments_page', commenting = '$commenting', resize = '$resize', use_captcha = '$use_captcha' WHERE section_id = '$section_id'");
 
 // Check if there is a db error, otherwise say successful
 if($database->is_error()) {
@@ -63,5 +63,5 @@
 
 // Print admin footer
 $admin->print_footer();
-
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/save_comment.php
===================================================================
--- trunk/wb/modules/news/save_comment.php	(revision 316)
+++ trunk/wb/modules/news/save_comment.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Get id
 if(!isset($_POST['comment_id']) OR !is_numeric($_POST['comment_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
@@ -46,8 +46,8 @@
 	$post_id = $admin->get_post('post_id');
 }
 
-// Update row
-$database->query("UPDATE ".TABLE_PREFIX."mod_news_comments SET title = '$title', comment = '$comment' WHERE comment_id = '$comment_id'");
+// Update row
+$database->query("UPDATE ".TABLE_PREFIX."mod_news_comments SET title = '$title', comment = '$comment' WHERE comment_id = '$comment_id'");
 
 // Check if there is a db error, otherwise say successful
 if($database->is_error()) {
Index: trunk/wb/modules/news/delete_comment.php
===================================================================
--- trunk/wb/modules/news/delete_comment.php	(revision 316)
+++ trunk/wb/modules/news/delete_comment.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,9 +22,9 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-require('../../config.php');
 
+require('../../config.php');
+
 // Get id
 if(!isset($_GET['comment_id']) OR !is_numeric($_GET['comment_id'])) {
 	header("Location: ".ADMIN_URL."/pages/index.php");
@@ -45,8 +45,8 @@
 $update_when_modified = true; // Tells script to update when this page was last updated
 require(WB_PATH.'/modules/admin.php');
 
-// Update row
-$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments  WHERE comment_id = '$comment_id'");
+// Update row
+$database->query("DELETE FROM ".TABLE_PREFIX."mod_news_comments  WHERE comment_id = '$comment_id'");
 
 // Check if there is a db error, otherwise say successful
 if($database->is_error()) {
Index: trunk/wb/modules/news/submit_comment.php
===================================================================
--- trunk/wb/modules/news/submit_comment.php	(revision 316)
+++ trunk/wb/modules/news/submit_comment.php	(revision 317)
@@ -1,81 +1,81 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2006, Ryan Djurovich
-
- Website Baker 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.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-// Include config file
-require('../../config.php');
-
-require_once(WB_PATH.'/framework/class.wb.php');
-$wb = new wb;
-
-// Check if we should show the form or add a comment
-if(is_numeric($_GET['page_id']) AND is_numeric($_GET['section_id']) AND isset($_GET['post_id']) AND is_numeric($_GET['post_id']) AND isset($_POST['comment']) AND $_POST['comment'] != '') {
-	
-	// Check captcha
-	$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
-	if($query_settings->numRows() == 0) { 
-		exit(header('Location: '.WB_URL.'/pages/'));
-	} else {
-		$settings = $query_settings->fetchRow();
-		if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg') AND $settings['use_captcha']) { /* Make's sure GD library is installed */
-			if(isset($_POST['captcha']) AND $_POST['captcha'] != ''){
-				// Check for a mismatch
-				if(!isset($_POST['captcha']) OR !isset($_SESSION['captcha']) OR $_POST['captcha'] != $_SESSION['captcha']) {
-					$_SESSION['captcha_error'] = $MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'];
-					$_SESSION['comment_title'] = $_POST['title'];
-					$_SESSION['comment_body'] = $_POST['comment'];
-					exit(header('Location: '.WB_URL.'/modules/news/comment.php?id='.$_GET['post_id']));
-				}
-			} else {
-				$_SESSION['captcha_error'] = $MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'];
-				$_SESSION['comment_title'] = $_POST['title'];
-				$_SESSION['comment_body'] = $_POST['comment'];
-				exit(header('Location: '.WB_URL.'/modules/news/comment.php?id='.$_GET['post_id']));
-			}
-		}
-	}
-	if(isset($_SESSION['captcha'])) { unset($_SESSION['captcha']); }
-	
-	// Insert the comment into db
-	$page_id = $_GET['page_id'];
-	$section_id = $_GET['section_id'];
-	$post_id = $_GET['post_id'];
-	$title = $wb->add_slashes(strip_tags($_POST['title']));
-	$comment = $wb->add_slashes(strip_tags($_POST['comment']));
-	$commented_when = mktime();
-	if($wb->is_authenticated() == true) {
-		$commented_by = $wb->get_user_id();
-	} else {
-		$commented_by = '';
-	}
-	$query = $database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id,post_id,title,comment,commented_when,commented_by) VALUES ('$section_id','$page_id','$post_id','$title','$comment','$commented_when','$commented_by')");
-	// Get page link
-	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
-	$page = $query_page->fetchRow();
-	header('Location: '.$wb->page_link($page['link']).'?id='.$post_id);
-} else {
-	header('Location: '.WB_URL.'/pages/');
-}
-
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2006, Ryan Djurovich
+
+ Website Baker 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.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+// Include config file
+require('../../config.php');
+
+require_once(WB_PATH.'/framework/class.wb.php');
+$wb = new wb;
+
+// Check if we should show the form or add a comment
+if(is_numeric($_GET['page_id']) AND is_numeric($_GET['section_id']) AND isset($_GET['post_id']) AND is_numeric($_GET['post_id']) AND isset($_POST['comment']) AND $_POST['comment'] != '') {
+	
+	// Check captcha
+	$query_settings = $database->query("SELECT use_captcha FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '".SECTION_ID."'");
+	if($query_settings->numRows() == 0) { 
+		exit(header('Location: '.WB_URL.'/pages/'));
+	} else {
+		$settings = $query_settings->fetchRow();
+		if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg') AND $settings['use_captcha']) { /* Make's sure GD library is installed */
+			if(isset($_POST['captcha']) AND $_POST['captcha'] != ''){
+				// Check for a mismatch
+				if(!isset($_POST['captcha']) OR !isset($_SESSION['captcha']) OR $_POST['captcha'] != $_SESSION['captcha']) {
+					$_SESSION['captcha_error'] = $MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'];
+					$_SESSION['comment_title'] = $_POST['title'];
+					$_SESSION['comment_body'] = $_POST['comment'];
+					exit(header('Location: '.WB_URL.'/modules/news/comment.php?id='.$_GET['post_id']));
+				}
+			} else {
+				$_SESSION['captcha_error'] = $MESSAGE['MOD_FORM']['INCORRECT_CAPTCHA'];
+				$_SESSION['comment_title'] = $_POST['title'];
+				$_SESSION['comment_body'] = $_POST['comment'];
+				exit(header('Location: '.WB_URL.'/modules/news/comment.php?id='.$_GET['post_id']));
+			}
+		}
+	}
+	if(isset($_SESSION['captcha'])) { unset($_SESSION['captcha']); }
+	
+	// Insert the comment into db
+	$page_id = $_GET['page_id'];
+	$section_id = $_GET['section_id'];
+	$post_id = $_GET['post_id'];
+	$title = $wb->add_slashes(strip_tags($_POST['title']));
+	$comment = $wb->add_slashes(strip_tags($_POST['comment']));
+	$commented_when = mktime();
+	if($wb->is_authenticated() == true) {
+		$commented_by = $wb->get_user_id();
+	} else {
+		$commented_by = '';
+	}
+	$query = $database->query("INSERT INTO ".TABLE_PREFIX."mod_news_comments (section_id,page_id,post_id,title,comment,commented_when,commented_by) VALUES ('$section_id','$page_id','$post_id','$title','$comment','$commented_when','$commented_by')");
+	// Get page link
+	$query_page = $database->query("SELECT link FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
+	$page = $query_page->fetchRow();
+	header('Location: '.$wb->page_link($page['link']).'?id='.$post_id);
+} else {
+	header('Location: '.WB_URL.'/pages/');
+}
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/modify.php
===================================================================
--- trunk/wb/modules/news/modify.php	(revision 316)
+++ trunk/wb/modules/news/modify.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -22,8 +22,8 @@
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 */
-
-// Must include code to stop this file being access directly
+
+// Must include code to stop this file being access directly
 if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
 
 ?>
@@ -36,13 +36,13 @@
 		<input type="button" value="<?php echo $TEXT['ADD'].' '.$TEXT['GROUP']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/add_group.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
 	</td>
 	<td align="right" width="33%">
-		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
+		<input type="button" value="<?php echo $TEXT['SETTINGS']; ?>" onclick="javascript: window.location = '<?php echo WB_URL; ?>/modules/news/modify_settings.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>';" style="width: 100%;" />
 	</td>
 </tr>
 </table>
 
 <br />
-
+
 <h2><?php echo $TEXT['MODIFY'].'/'.$TEXT['DELETE'].' '.$TEXT['POST']; ?></h2>
 
 <?php
Index: trunk/wb/modules/news/add.php
===================================================================
--- trunk/wb/modules/news/add.php	(revision 316)
+++ trunk/wb/modules/news/add.php	(revision 317)
@@ -1,7 +1,7 @@
 <?php
 
 // $Id$
-
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -21,11 +21,11 @@
  along with Website Baker; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-*/
-
-// Must include code to stop this file being access directly
-if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+*/
 
+// Must include code to stop this file being access directly
+if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
+
 $header = '<style type=\"text/css\">
 .post_title, .post_date { border-bottom: 1px solid #DDDDDD; }
 .post_title { font-weight: bold; font-size: 12px; color: #000000; }
@@ -90,6 +90,6 @@
 <br />';
 $commenting = 'none';
 $use_captcha = true;
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id,header,post_loop,footer,post_header,post_footer,comments_header,comments_loop,comments_footer,comments_page,commenting,use_captcha) VALUES ('$section_id','$page_id','$header','$post_loop','$footer','$post_header','$post_footer','$comments_header','$comments_loop','$comments_footer','$comments_page','$commenting','$use_captcha')");
-
+$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id,header,post_loop,footer,post_header,post_footer,comments_header,comments_loop,comments_footer,comments_page,commenting,use_captcha) VALUES ('$section_id','$page_id','$header','$post_loop','$footer','$post_header','$post_footer','$comments_header','$comments_loop','$comments_footer','$comments_page','$commenting','$use_captcha')");
+
 ?>
\ No newline at end of file
Index: trunk/wb/modules/htmlarea/htmlarea/lang/pt_br.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/pt_br.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/pt_br.js	(revision 317)
@@ -1,37 +1,37 @@
-// I18N constants
-// Brazilian Portuguese Translation by Alex Piaz <webmaster@globalmap.com>
-
-HTMLArea.I18N = {
+// I18N constants
+// Brazilian Portuguese Translation by Alex Piaz <webmaster@globalmap.com>
 
+HTMLArea.I18N = {
+
 	// the following should be the filename without .js extension
 	// it will be used for automatically load plugin language.
 	lang: "pt_br",
 
-	tooltips: {
-		bold:           "Negrito",
-		italic:         "Itálico",
-		underline:      "Sublinhado",
-		strikethrough:  "Tachado",
-		subscript:      "Subescrito",
-		superscript:    "Sobrescrito",
-		justifyleft:    "Alinhar à Esquerda",
-		justifycenter:  "Centralizar",
-		justifyright:   "Alinhar à Direita",
-		justifyfull:    "Justificar",
-		orderedlist:    "Lista Numerada",
-		unorderedlist:  "Lista Marcadores",
-		outdent:        "Diminuir Indentação",
-		indent:         "Aumentar Indentação",
-		forecolor:      "Cor da Fonte",
-		backcolor:      "Cor do Fundo",
-		horizontalrule: "Linha Horizontal",
-		createlink:     "Inserir Link",
-		insertimage:    "Inserir Imagem",
-		inserttable:    "Inserir Tabela",
-		htmlmode:       "Ver Código-Fonte",
-		popupeditor:    "Expandir Editor",
-		about:          "Sobre",
-		help:           "Ajuda",
-		textindicator:  "Estilo Atual"
-	}
-};
+	tooltips: {
+		bold:           "Negrito",
+		italic:         "Itálico",
+		underline:      "Sublinhado",
+		strikethrough:  "Tachado",
+		subscript:      "Subescrito",
+		superscript:    "Sobrescrito",
+		justifyleft:    "Alinhar à Esquerda",
+		justifycenter:  "Centralizar",
+		justifyright:   "Alinhar à Direita",
+		justifyfull:    "Justificar",
+		orderedlist:    "Lista Numerada",
+		unorderedlist:  "Lista Marcadores",
+		outdent:        "Diminuir Indentação",
+		indent:         "Aumentar Indentação",
+		forecolor:      "Cor da Fonte",
+		backcolor:      "Cor do Fundo",
+		horizontalrule: "Linha Horizontal",
+		createlink:     "Inserir Link",
+		insertimage:    "Inserir Imagem",
+		inserttable:    "Inserir Tabela",
+		htmlmode:       "Ver Código-Fonte",
+		popupeditor:    "Expandir Editor",
+		about:          "Sobre",
+		help:           "Ajuda",
+		textindicator:  "Estilo Atual"
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/se.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/se.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/se.js	(revision 317)
@@ -1,38 +1,38 @@
-// Swedish version for htmlArea v3.0 - Alpha Release
-// - translated by pat<pat@engvall.nu>
-// term´s and licenses are equal to htmlarea!
-
-HTMLArea.I18N = {
+// Swedish version for htmlArea v3.0 - Alpha Release
+// - translated by pat<pat@engvall.nu>
+// term´s and licenses are equal to htmlarea!
 
+HTMLArea.I18N = {
+
 	// the following should be the filename without .js extension
 	// it will be used for automatically load plugin language.
 	lang: "se",
 
-	tooltips: {
-		bold:           "Fet",
-		italic:         "Kursiv",
-		underline:      "Understruken",
-		strikethrough:  "Genomstruken",
-		subscript:      "Nedsänkt",
-		superscript:    "Upphöjd",
-		justifyleft:    "Vänsterjustera",
-		justifycenter:  "Centrera",
-		justifyright:   "Högerjustera",
-		justifyfull:    "Marginaljustera",
-		orderedlist:    "Numrerad lista",
-		unorderedlist:  "Punktlista",
-		outdent:        "Minska indrag",
-		indent:         "Öka indrag",
-		forecolor:      "Textfärg",
-		backcolor:      "Bakgrundsfärg",
-		horizontalrule: "Vågrät linje",
-		createlink:     "Infoga länk",
-		insertimage:    "Infoga bild",
-		inserttable:    "Infoga tabell",
-		htmlmode:       "Visa källkod",
-		popupeditor:    "Visa i eget fönster",
-		about:          "Om denna editor",
-		help:           "Hjälp",
-		textindicator:  "Nuvarande stil"
-	}
-};
+	tooltips: {
+		bold:           "Fet",
+		italic:         "Kursiv",
+		underline:      "Understruken",
+		strikethrough:  "Genomstruken",
+		subscript:      "Nedsänkt",
+		superscript:    "Upphöjd",
+		justifyleft:    "Vänsterjustera",
+		justifycenter:  "Centrera",
+		justifyright:   "Högerjustera",
+		justifyfull:    "Marginaljustera",
+		orderedlist:    "Numrerad lista",
+		unorderedlist:  "Punktlista",
+		outdent:        "Minska indrag",
+		indent:         "Öka indrag",
+		forecolor:      "Textfärg",
+		backcolor:      "Bakgrundsfärg",
+		horizontalrule: "Vågrät linje",
+		createlink:     "Infoga länk",
+		insertimage:    "Infoga bild",
+		inserttable:    "Infoga tabell",
+		htmlmode:       "Visa källkod",
+		popupeditor:    "Visa i eget fönster",
+		about:          "Om denna editor",
+		help:           "Hjälp",
+		textindicator:  "Nuvarande stil"
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/nl.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/nl.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/nl.js	(revision 317)
@@ -1,90 +1,90 @@
-// I18N constants
-
-// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
-// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "nl",
-
-	tooltips: {
-		bold:					"Vet",
-		italic:					"Cursief",
-		underline:				"Onderstrepen",
-		strikethrough:			"Doorhalen",
-		subscript:				"Subscript",
-		superscript:			"Superscript",
-		justifyleft:			"Links uitlijnen",
-		justifycenter:			"Centreren",
-		justifyright:			"Rechts uitlijnen",
-		justifyfull:			"Uitvullen",
-		insertorderedlist:		"Nummering",
-		insertunorderedlist:	"Opsommingstekens",
-		outdent:				"Inspringing verkleinen",
-		indent:					"Inspringing vergroten",
-		forecolor:				"Tekstkleur",
-		hilitecolor:			"Achtergrondkleur",
-		inserthorizontalrule:	"Horizontale lijn",
-		createlink:				"Hyperlink invoegen/aanpassen",
-		insertimage:			"Afbeelding invoegen/aanpassen",
-		inserttable:			"Tabel invoegen",
-		htmlmode:				"HTML broncode",
-		popupeditor:			"Vergroot Editor",
-		about:					"Over deze editor",
-		showhelp:				"HTMLArea help",
-		textindicator:			"Huidige stijl",
-		undo:					"Ongedaan maken",
-		redo:					"Herhalen",
-		cut:					"Knippen",
-		copy:					"Kopiëren",
-		paste:					"Plakken",
-		lefttoright:			"Tekstrichting links naar rechts",
-		righttoleft:			"Tekstrichting rechts naar links"
-	},
-
-	buttons: {
-		"ok":					"OK",
-		"cancel":				"Annuleren"
-	},
-
-	msg: {
-		"Path":					"Pad",
-		"TEXT_MODE":			"Je bent in TEKST-mode. Gebruik de [<>] knop om terug te keren naar WYSIWYG-mode.",
-      
-		"IE-sucks-full-screen" :
-		// translate here
-		"Fullscreen-mode veroorzaakt problemen met Internet Explorer door bugs in de webbrowser " +
-		"die we niet kunnen omzeilen. Hierdoor kunnen de volgende effecten optreden: verknoeide teksten, " +
-		"een verlies aan editor-functionaliteit en/of willekeurig vastlopen van de webbrowser. " +
-		"Als u Windows 95 of 98 gebruikt, is het zeer waarschijnlijk dat u een algemene beschermingsfout " +
-		"('General Protection Fault') krijgt en de computer opnieuw zal moeten opstarten.\n\n" +
-		"U bent gewaarschuwd. Druk OK als u toch nog de Fullscreen-editor wil gebruiken."
-	},
-
-	dialogs: {
-		"Cancel"                                            : "Annuleren",
-		"Insert/Modify Link"                                : "Hyperlink invoegen/aanpassen",
-		"New window (_blank)"                               : "Nieuw venster (_blank)",
-		"None (use implicit)"                               : "Geen",
-		"OK"                                                : "OK",
-		"Other"                                             : "Ander",
-		"Same frame (_self)"                                : "Zelfde frame (_self)",
-		"Target:"                                           : "Doel:",
-		"Title (tooltip):"                                  : "Titel (tooltip):",
-		"Top frame (_top)"                                  : "Bovenste frame (_top)",
-		"URL:"                                              : "URL:",
-		"You must enter the URL where this link points to"  : "Geef de URL in waar de link naar verwijst"
-	}
-};
-
+// I18N constants
+
+// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
+// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "nl",
+
+	tooltips: {
+		bold:					"Vet",
+		italic:					"Cursief",
+		underline:				"Onderstrepen",
+		strikethrough:			"Doorhalen",
+		subscript:				"Subscript",
+		superscript:			"Superscript",
+		justifyleft:			"Links uitlijnen",
+		justifycenter:			"Centreren",
+		justifyright:			"Rechts uitlijnen",
+		justifyfull:			"Uitvullen",
+		insertorderedlist:		"Nummering",
+		insertunorderedlist:	"Opsommingstekens",
+		outdent:				"Inspringing verkleinen",
+		indent:					"Inspringing vergroten",
+		forecolor:				"Tekstkleur",
+		hilitecolor:			"Achtergrondkleur",
+		inserthorizontalrule:	"Horizontale lijn",
+		createlink:				"Hyperlink invoegen/aanpassen",
+		insertimage:			"Afbeelding invoegen/aanpassen",
+		inserttable:			"Tabel invoegen",
+		htmlmode:				"HTML broncode",
+		popupeditor:			"Vergroot Editor",
+		about:					"Over deze editor",
+		showhelp:				"HTMLArea help",
+		textindicator:			"Huidige stijl",
+		undo:					"Ongedaan maken",
+		redo:					"Herhalen",
+		cut:					"Knippen",
+		copy:					"Kopiëren",
+		paste:					"Plakken",
+		lefttoright:			"Tekstrichting links naar rechts",
+		righttoleft:			"Tekstrichting rechts naar links"
+	},
+
+	buttons: {
+		"ok":					"OK",
+		"cancel":				"Annuleren"
+	},
+
+	msg: {
+		"Path":					"Pad",
+		"TEXT_MODE":			"Je bent in TEKST-mode. Gebruik de [<>] knop om terug te keren naar WYSIWYG-mode.",
+      
+		"IE-sucks-full-screen" :
+		// translate here
+		"Fullscreen-mode veroorzaakt problemen met Internet Explorer door bugs in de webbrowser " +
+		"die we niet kunnen omzeilen. Hierdoor kunnen de volgende effecten optreden: verknoeide teksten, " +
+		"een verlies aan editor-functionaliteit en/of willekeurig vastlopen van de webbrowser. " +
+		"Als u Windows 95 of 98 gebruikt, is het zeer waarschijnlijk dat u een algemene beschermingsfout " +
+		"('General Protection Fault') krijgt en de computer opnieuw zal moeten opstarten.\n\n" +
+		"U bent gewaarschuwd. Druk OK als u toch nog de Fullscreen-editor wil gebruiken."
+	},
+
+	dialogs: {
+		"Cancel"                                            : "Annuleren",
+		"Insert/Modify Link"                                : "Hyperlink invoegen/aanpassen",
+		"New window (_blank)"                               : "Nieuw venster (_blank)",
+		"None (use implicit)"                               : "Geen",
+		"OK"                                                : "OK",
+		"Other"                                             : "Ander",
+		"Same frame (_self)"                                : "Zelfde frame (_self)",
+		"Target:"                                           : "Doel:",
+		"Title (tooltip):"                                  : "Titel (tooltip):",
+		"Top frame (_top)"                                  : "Bovenste frame (_top)",
+		"URL:"                                              : "URL:",
+		"You must enter the URL where this link points to"  : "Geef de URL in waar de link naar verwijst"
+	}
+};
+
Index: trunk/wb/modules/htmlarea/htmlarea/lang/si.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/si.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/si.js	(revision 317)
@@ -1,63 +1,63 @@
-// I18N constants
-
-// LANG: "si", ENCODING: ISO-8859-2
-// Author: Tomaz Kregar, x_tomo_x@email.si
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "si",
-
-	tooltips: {
-		bold:           "Krepko",
-		italic:         "Le¾eèe",
-		underline:      "Podèrtano",
-		strikethrough:  "Preèrtano",
-		subscript:      "Podpisano",
-		superscript:    "Nadpisano",
-		justifyleft:    "Poravnaj levo",
-		justifycenter:  "Na sredino",
-		justifyright:   "Poravnaj desno",
-		justifyfull:    "Porazdeli vsebino",
-		orderedlist:    "O¹tevilèevanje",
-		unorderedlist:  "Oznaèevanje",
-		outdent:        "Zmanj¹aj zamik",
-		indent:         "Poveèaj zamik",
-		forecolor:      "Barva pisave",
-		hilitecolor:    "Barva ozadja",
-		horizontalrule: "Vodoravna èrta",
-		createlink:     "Vstavi hiperpovezavo",
-		insertimage:    "Vstavi sliko",
-		inserttable:    "Vstavi tabelo",
-		htmlmode:       "Preklopi na HTML kodo",
-		popupeditor:    "Poveèaj urejevalnik",
-		about:          "Vizitka za urejevalnik",
-		showhelp:       "Pomoè za urejevalnik",
-		textindicator:  "Trenutni slog",
-		undo:           "Razveljavi zadnjo akcijo",
-		redo:           "Uveljavi zadnjo akcijo",
-		cut:            "Izre¾i",
-		copy:           "Kopiraj",
-		paste:          "Prilepi"
-	},
-
-	buttons: {
-		"ok":           "V redu",
-		"cancel":       "Preklièi"
-	},
-
-	msg: {
-		"Path":         "Pot",
-		"TEXT_MODE":    "Si v tekstovnem naèinu.  Uporabi [<>] gumb za prklop nazaj na WYSIWYG."
-	}
-};
+// I18N constants
+
+// LANG: "si", ENCODING: ISO-8859-2
+// Author: Tomaz Kregar, x_tomo_x@email.si
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "si",
+
+	tooltips: {
+		bold:           "Krepko",
+		italic:         "Le¾eèe",
+		underline:      "Podèrtano",
+		strikethrough:  "Preèrtano",
+		subscript:      "Podpisano",
+		superscript:    "Nadpisano",
+		justifyleft:    "Poravnaj levo",
+		justifycenter:  "Na sredino",
+		justifyright:   "Poravnaj desno",
+		justifyfull:    "Porazdeli vsebino",
+		orderedlist:    "O¹tevilèevanje",
+		unorderedlist:  "Oznaèevanje",
+		outdent:        "Zmanj¹aj zamik",
+		indent:         "Poveèaj zamik",
+		forecolor:      "Barva pisave",
+		hilitecolor:    "Barva ozadja",
+		horizontalrule: "Vodoravna èrta",
+		createlink:     "Vstavi hiperpovezavo",
+		insertimage:    "Vstavi sliko",
+		inserttable:    "Vstavi tabelo",
+		htmlmode:       "Preklopi na HTML kodo",
+		popupeditor:    "Poveèaj urejevalnik",
+		about:          "Vizitka za urejevalnik",
+		showhelp:       "Pomoè za urejevalnik",
+		textindicator:  "Trenutni slog",
+		undo:           "Razveljavi zadnjo akcijo",
+		redo:           "Uveljavi zadnjo akcijo",
+		cut:            "Izre¾i",
+		copy:           "Kopiraj",
+		paste:          "Prilepi"
+	},
+
+	buttons: {
+		"ok":           "V redu",
+		"cancel":       "Preklièi"
+	},
+
+	msg: {
+		"Path":         "Pot",
+		"TEXT_MODE":    "Si v tekstovnem naèinu.  Uporabi [<>] gumb za prklop nazaj na WYSIWYG."
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/pl.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/pl.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/pl.js	(revision 317)
@@ -1,36 +1,36 @@
-// I18N constants
-
-HTMLArea.I18N = {
+// I18N constants
 
+HTMLArea.I18N = {
+
 	// the following should be the filename without .js extension
 	// it will be used for automatically load plugin language.
 	lang: "pl",
 
-	tooltips: {
-		bold:           "Pogrubienie",
-		italic:         "Pochylenie",
-		underline:      "Podkreœlenie",
-		strikethrough:  "Przekreœlenie",
-		subscript:      "Indeks dolny",
-		superscript:    "Indeks górny",
-		justifyleft:    "Wyrównaj do lewej",
-		justifycenter:  "Wyœrodkuj",
-		justifyright:   "Wyrównaj do prawej",
-		justifyfull:    "Wyjustuj",
-		orderedlist:    "Numerowanie",
-		unorderedlist:  "Wypunktowanie",
-		outdent:        "Zmniejsz wciêcie",
-		indent:         "Zwiêksz wciêcie",
-		forecolor:      "Kolor czcionki",
-		backcolor:      "Kolor t³a",
-		horizontalrule: "Linia pozioma",
-		createlink:     "Wstaw adres sieci Web",
-		insertimage:    "Wstaw obraz",
-		inserttable:    "Wstaw tabelê",
-		htmlmode:       "Edycja WYSIWYG/w Ÿródle strony",
-		popupeditor:    "Pe³ny ekran",
-		about:          "Informacje o tym edytorze",
-		help:           "Pomoc",
-		textindicator:  "Obecny styl"
-	}
-};
+	tooltips: {
+		bold:           "Pogrubienie",
+		italic:         "Pochylenie",
+		underline:      "Podkreœlenie",
+		strikethrough:  "Przekreœlenie",
+		subscript:      "Indeks dolny",
+		superscript:    "Indeks górny",
+		justifyleft:    "Wyrównaj do lewej",
+		justifycenter:  "Wyœrodkuj",
+		justifyright:   "Wyrównaj do prawej",
+		justifyfull:    "Wyjustuj",
+		orderedlist:    "Numerowanie",
+		unorderedlist:  "Wypunktowanie",
+		outdent:        "Zmniejsz wciêcie",
+		indent:         "Zwiêksz wciêcie",
+		forecolor:      "Kolor czcionki",
+		backcolor:      "Kolor t³a",
+		horizontalrule: "Linia pozioma",
+		createlink:     "Wstaw adres sieci Web",
+		insertimage:    "Wstaw obraz",
+		inserttable:    "Wstaw tabelê",
+		htmlmode:       "Edycja WYSIWYG/w Ÿródle strony",
+		popupeditor:    "Pe³ny ekran",
+		about:          "Informacje o tym edytorze",
+		help:           "Pomoc",
+		textindicator:  "Obecny styl"
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/no.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/no.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/no.js	(revision 317)
@@ -1,79 +1,79 @@
-// Norwegian version for htmlArea v3.0 - pre1
-// - translated by ses<ses@online.no>
-// Additional translations by Håvard Wigtil <havardw@extend.no>
-// term´s and licenses are equal to htmlarea!
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "no",
-
-	tooltips: {
-		bold:                 "Fet",
-		italic:               "Kursiv",
-		underline:            "Understreket",
-		strikethrough:        "Gjennomstreket",
-		subscript:            "Nedsenket",
-		superscript:          "Opphøyet",
-		justifyleft:          "Venstrejuster",
-		justifycenter:        "Midtjuster",
-		justifyright:         "Høyrejuster",
-		justifyfull:          "Blokkjuster",
-		insertorderedlist:    "Nummerert liste",
-		insertunorderedlist:  "Punktliste",
-		outdent:              "Reduser innrykk",
-		indent:               "Øke innrykk",
-		forecolor:            "Tekstfarge",
-		hilitecolor:          "Bakgrundsfarge",
-		inserthorizontalrule: "Vannrett linje",
-		createlink:           "Lag lenke",
-		insertimage:          "Sett inn bilde",
-		inserttable:          "Sett inn tabell",
-		htmlmode:             "Vis kildekode",
-		popupeditor:          "Vis i eget vindu",
-		about:                "Om denne editor",
-		showhelp:             "Hjelp",
-		textindicator:        "Nåværende stil",
-                undo:                 "Angrer siste redigering",
-		redo:                 "Gjør om siste angring",
-		cut:                  "Klipp ut område",
-		copy:                 "Kopier område",
-		paste:                "Lim inn",
-		lefttoright:          "Fra venstre mot høyre",
-		righttoleft:          "Fra høyre mot venstre"
-	},
-    
-	buttons: {
-		"ok":           "OK",
-		"cancel":       "Avbryt"
-	},
-
-	msg: {
-		"Path":         "Tekstvelger",
-		"TEXT_MODE":    "Du er i tekstmodus  Klikk på [<>] for å gå tilbake til WYSIWIG.",
-                "IE-sucks-full-screen" :
-		// translate here
-                "Visning i eget vindu har kjente problemer med Internet Explorer, " + 
-                "på grunn av problemer med denne nettleseren. Mulige problemer er et uryddig " + 
-                "skjermbilde, manglende editorfunksjoner og/eller at nettleseren crasher. Hvis du bruker Windows 95 eller Windows 98 " +
-                "er det også muligheter for at Windows will crashe.\n\n" +
-                "Trykk 'OK' hvis du vil bruke visning i eget vindu på tross av denne advarselen."
-	},
-
-	dialogs: {
-		"Cancel"                                            : "Avbryt",
-		"Insert/Modify Link"                                : "Rediger lenke",
-		"New window (_blank)"                               : "Eget vindu (_blank)",
-		"None (use implicit)"                               : "Ingen (bruk standardinnstilling)",
-		"OK"                                                : "OK",
-		"Other"                                             : "Annen",
-		"Same frame (_self)"                                : "Samme ramme (_self)",
-		"Target:"                                           : "Mål:",
-		"Title (tooltip):"                                  : "Tittel (tooltip):",
-		"Top frame (_top)"                                  : "Toppramme (_top)",
-		"URL:"                                              : "Adresse:",
-		"You must enter the URL where this link points to"  : "Du må skrive inn en adresse som denne lenken skal peke til"
-	}
-};
-
+// Norwegian version for htmlArea v3.0 - pre1
+// - translated by ses<ses@online.no>
+// Additional translations by Håvard Wigtil <havardw@extend.no>
+// term´s and licenses are equal to htmlarea!
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "no",
+
+	tooltips: {
+		bold:                 "Fet",
+		italic:               "Kursiv",
+		underline:            "Understreket",
+		strikethrough:        "Gjennomstreket",
+		subscript:            "Nedsenket",
+		superscript:          "Opphøyet",
+		justifyleft:          "Venstrejuster",
+		justifycenter:        "Midtjuster",
+		justifyright:         "Høyrejuster",
+		justifyfull:          "Blokkjuster",
+		insertorderedlist:    "Nummerert liste",
+		insertunorderedlist:  "Punktliste",
+		outdent:              "Reduser innrykk",
+		indent:               "Øke innrykk",
+		forecolor:            "Tekstfarge",
+		hilitecolor:          "Bakgrundsfarge",
+		inserthorizontalrule: "Vannrett linje",
+		createlink:           "Lag lenke",
+		insertimage:          "Sett inn bilde",
+		inserttable:          "Sett inn tabell",
+		htmlmode:             "Vis kildekode",
+		popupeditor:          "Vis i eget vindu",
+		about:                "Om denne editor",
+		showhelp:             "Hjelp",
+		textindicator:        "Nåværende stil",
+                undo:                 "Angrer siste redigering",
+		redo:                 "Gjør om siste angring",
+		cut:                  "Klipp ut område",
+		copy:                 "Kopier område",
+		paste:                "Lim inn",
+		lefttoright:          "Fra venstre mot høyre",
+		righttoleft:          "Fra høyre mot venstre"
+	},
+    
+	buttons: {
+		"ok":           "OK",
+		"cancel":       "Avbryt"
+	},
+
+	msg: {
+		"Path":         "Tekstvelger",
+		"TEXT_MODE":    "Du er i tekstmodus  Klikk på [<>] for å gå tilbake til WYSIWIG.",
+                "IE-sucks-full-screen" :
+		// translate here
+                "Visning i eget vindu har kjente problemer med Internet Explorer, " + 
+                "på grunn av problemer med denne nettleseren. Mulige problemer er et uryddig " + 
+                "skjermbilde, manglende editorfunksjoner og/eller at nettleseren crasher. Hvis du bruker Windows 95 eller Windows 98 " +
+                "er det også muligheter for at Windows will crashe.\n\n" +
+                "Trykk 'OK' hvis du vil bruke visning i eget vindu på tross av denne advarselen."
+	},
+
+	dialogs: {
+		"Cancel"                                            : "Avbryt",
+		"Insert/Modify Link"                                : "Rediger lenke",
+		"New window (_blank)"                               : "Eget vindu (_blank)",
+		"None (use implicit)"                               : "Ingen (bruk standardinnstilling)",
+		"OK"                                                : "OK",
+		"Other"                                             : "Annen",
+		"Same frame (_self)"                                : "Samme ramme (_self)",
+		"Target:"                                           : "Mål:",
+		"Title (tooltip):"                                  : "Tittel (tooltip):",
+		"Top frame (_top)"                                  : "Toppramme (_top)",
+		"URL:"                                              : "Adresse:",
+		"You must enter the URL where this link points to"  : "Du må skrive inn en adresse som denne lenken skal peke til"
+	}
+};
+
Index: trunk/wb/modules/htmlarea/htmlarea/lang/cz.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/cz.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/cz.js	(revision 317)
@@ -1,63 +1,63 @@
-ï»¿// I18N constants
-
-// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
-// Author: Jiri LÃ¶w, <jirilow@jirilow.com>
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "cz",
-
-	tooltips: {
-		bold:           "TuÄnÄ›",
-		italic:         "KurzÃ­va",
-		underline:      "PodtrÅ¾enÃ­",
-		strikethrough:  "PÅ™eÅ¡krtnutÃ­",
-		subscript:      "DolnÃ­ index",
-		superscript:    "HornÃ­ index",
-		justifyleft:    "Zarovnat doleva",
-		justifycenter:  "Na stÅ™ed",
-		justifyright:   "Zarovnat doprava",
-		justifyfull:    "Zarovnat do stran",
-		orderedlist:    "Seznam",
-		unorderedlist:  "OdrÃ¡Å¾ky",
-		outdent:        "PÅ™edsadit",
-		indent:         "Odsadit",
-		forecolor:      "Barva pÃ­sma",
-		hilitecolor:    "Barva pozadÃ­",
-		horizontalrule: "VodorovnÃ¡ ÄÃ¡ra",
-		createlink:     "VloÅ¾it odkaz",
-		insertimage:    "VloÅ¾it obrÃ¡zek",
-		inserttable:    "VloÅ¾it tabulku",
-		htmlmode:       "PÅ™epnout HTML",
-		popupeditor:    "NovÃ© okno editoru",
-		about:          "O tÃ©to aplikaci",
-		showhelp:       "NÃ¡povÄ›da aplikace",
-		textindicator:  "ZvolenÃ½ styl",
-		undo:           "VrÃ¡tÃ­ poslednÃ­ akci",
-		redo:           "Opakuje poslednÃ­ akci",
-		cut:            "Vyjmout",
-		copy:           "KopÃ­rovat",
-		paste:          "VloÅ¾it"
-	},
-
-	buttons: {
-		"ok":           "OK",
-		"cancel":       "ZruÅ¡it"
-	},
-
-	msg: {
-		"Path":         "Cesta",
-		"TEXT_MODE":    "Jste v TEXTOVÃ‰M REÅ½IMU.  PouÅ¾ijte tlaÄÃ­tko [<>] pro pÅ™epnutÃ­ do WYSIWIG."
-	}
-};
+ï»¿// I18N constants
+
+// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
+// Author: Jiri LÃ¶w, <jirilow@jirilow.com>
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "cz",
+
+	tooltips: {
+		bold:           "TuÄnÄ›",
+		italic:         "KurzÃ­va",
+		underline:      "PodtrÅ¾enÃ­",
+		strikethrough:  "PÅ™eÅ¡krtnutÃ­",
+		subscript:      "DolnÃ­ index",
+		superscript:    "HornÃ­ index",
+		justifyleft:    "Zarovnat doleva",
+		justifycenter:  "Na stÅ™ed",
+		justifyright:   "Zarovnat doprava",
+		justifyfull:    "Zarovnat do stran",
+		orderedlist:    "Seznam",
+		unorderedlist:  "OdrÃ¡Å¾ky",
+		outdent:        "PÅ™edsadit",
+		indent:         "Odsadit",
+		forecolor:      "Barva pÃ­sma",
+		hilitecolor:    "Barva pozadÃ­",
+		horizontalrule: "VodorovnÃ¡ ÄÃ¡ra",
+		createlink:     "VloÅ¾it odkaz",
+		insertimage:    "VloÅ¾it obrÃ¡zek",
+		inserttable:    "VloÅ¾it tabulku",
+		htmlmode:       "PÅ™epnout HTML",
+		popupeditor:    "NovÃ© okno editoru",
+		about:          "O tÃ©to aplikaci",
+		showhelp:       "NÃ¡povÄ›da aplikace",
+		textindicator:  "ZvolenÃ½ styl",
+		undo:           "VrÃ¡tÃ­ poslednÃ­ akci",
+		redo:           "Opakuje poslednÃ­ akci",
+		cut:            "Vyjmout",
+		copy:           "KopÃ­rovat",
+		paste:          "VloÅ¾it"
+	},
+
+	buttons: {
+		"ok":           "OK",
+		"cancel":       "ZruÅ¡it"
+	},
+
+	msg: {
+		"Path":         "Cesta",
+		"TEXT_MODE":    "Jste v TEXTOVÃ‰M REÅ½IMU.  PouÅ¾ijte tlaÄÃ­tko [<>] pro pÅ™epnutÃ­ do WYSIWIG."
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/lv.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/lv.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/lv.js	(revision 317)
@@ -1,55 +1,55 @@
-// I18N constants
-
-// LANG: "lv", ENCODING: UTF-8 | ISO-8859-1
-// Author: Mihai Bazon, http://dynarch.com/mishoo
-// Translated by: Janis Klavins, <janis.klavins@devia.lv>
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "lv",
-
-	tooltips: {
-		bold:           "Trekniem burtiem",
-		italic:         "Kursîvâ",
-		underline:      "Pasvîtrots",
-		strikethrough:  "Pârsvîtrots",
-		subscript:      "Novietot zem rindas",
-		superscript:    "Novietot virs rindas",
-		justifyleft:    "Izlîdzinât pa kreisi",
-		justifycenter:  "Izlîdzinât centrâ",
-		justifyright:   "Izlîdzinât pa labi",
-		justifyfull:    "Izlîdzinât pa visu lapu",
-		orderedlist:    "Numurçts saraksts",
-		unorderedlist:  "Saraksts",
-		outdent:        "Samazinât atkâpi",
-		indent:         "Palielinât atkâpi",
-		forecolor:      "Burtu krâsa",
-		hilitecolor:    "Fona krâsa",
-		horizontalrule: "Horizontâla atdalîtâjsvîtra",
-		createlink:     "Ievietot hipersaiti",
-		insertimage:    "Ievietot attçlu",
-		inserttable:    "Ievietot tabulu",
-		htmlmode:       "Skatît HTML kodu",
-		popupeditor:    "Palielinât Rediìçtâju",
-		about:          "Par ðo rediìçtâju",
-		showhelp:       "Rediìçtâja palîgs",
-		textindicator:  "Patreizçjais stils",
-		undo:           "Atcelt pçdçjo darbîbu",
-		redo:           "Atkârtot pçdçjo darbîbu",
-		cut:            "Izgriezt iezîmçto",
-		copy:           "Kopçt iezîmçto",
-		paste:          "Ievietot iezîmçto"
-	},
-
-	buttons: {
-		"ok":           "Labi",
-		"cancel":       "Atcelt"
-	},
-
-	msg: {
-		"Path":         "Ceïð",
-		"TEXT_MODE":    "Jûs patlaban darbojaties TEKSTA REÞÎMÂ. Lai pârietu atpakaï uz GRAFISKO REÞÎMU (WYSIWIG), lietojiet [<>] pogu."
-	}
-};
+// I18N constants
+
+// LANG: "lv", ENCODING: UTF-8 | ISO-8859-1
+// Author: Mihai Bazon, http://dynarch.com/mishoo
+// Translated by: Janis Klavins, <janis.klavins@devia.lv>
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "lv",
+
+	tooltips: {
+		bold:           "Trekniem burtiem",
+		italic:         "Kursîvâ",
+		underline:      "Pasvîtrots",
+		strikethrough:  "Pârsvîtrots",
+		subscript:      "Novietot zem rindas",
+		superscript:    "Novietot virs rindas",
+		justifyleft:    "Izlîdzinât pa kreisi",
+		justifycenter:  "Izlîdzinât centrâ",
+		justifyright:   "Izlîdzinât pa labi",
+		justifyfull:    "Izlîdzinât pa visu lapu",
+		orderedlist:    "Numurçts saraksts",
+		unorderedlist:  "Saraksts",
+		outdent:        "Samazinât atkâpi",
+		indent:         "Palielinât atkâpi",
+		forecolor:      "Burtu krâsa",
+		hilitecolor:    "Fona krâsa",
+		horizontalrule: "Horizontâla atdalîtâjsvîtra",
+		createlink:     "Ievietot hipersaiti",
+		insertimage:    "Ievietot attçlu",
+		inserttable:    "Ievietot tabulu",
+		htmlmode:       "Skatît HTML kodu",
+		popupeditor:    "Palielinât Rediìçtâju",
+		about:          "Par ðo rediìçtâju",
+		showhelp:       "Rediìçtâja palîgs",
+		textindicator:  "Patreizçjais stils",
+		undo:           "Atcelt pçdçjo darbîbu",
+		redo:           "Atkârtot pçdçjo darbîbu",
+		cut:            "Izgriezt iezîmçto",
+		copy:           "Kopçt iezîmçto",
+		paste:          "Ievietot iezîmçto"
+	},
+
+	buttons: {
+		"ok":           "Labi",
+		"cancel":       "Atcelt"
+	},
+
+	msg: {
+		"Path":         "Ceïð",
+		"TEXT_MODE":    "Jûs patlaban darbojaties TEKSTA REÞÎMÂ. Lai pârietu atpakaï uz GRAFISKO REÞÎMU (WYSIWIG), lietojiet [<>] pogu."
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/ru.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/ru.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/ru.js	(revision 317)
@@ -1,63 +1,63 @@
-ï»¿// I18N constants
-
-// LANG: "ru", ENCODING: UTF-8 | ISO-8859-1
-// Author: Yulya Shtyryakova, <yulya@vdcom.ru>
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "ru",
-
-	tooltips: {
-		bold:           "ÐŸÐ¾Ð»ÑƒÐ¶Ð¸Ñ€Ð½Ñ‹Ð¹",
-		italic:         "ÐÐ°ÐºÐ»Ð¾Ð½Ð½Ñ‹Ð¹",
-		underline:      "ÐŸÐ¾Ð´Ñ‡ÐµÑ€ÐºÐ½ÑƒÑ‚Ñ‹Ð¹",
-		strikethrough:  "ÐŸÐµÑ€ÐµÑ‡ÐµÑ€ÐºÐ½ÑƒÑ‚Ñ‹Ð¹",
-		subscript:      "ÐÐ¸Ð¶Ð½Ð¸Ð¹ Ð¸Ð½Ð´ÐµÐºÑ",
-		superscript:    "Ð’ÐµÑ€Ñ…Ð½Ð¸Ð¹ Ð¸Ð½Ð´ÐµÐºÑ",
-		justifyleft:    "ÐŸÐ¾ Ð»ÐµÐ²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ",
-		justifycenter:  "ÐŸÐ¾ Ñ†ÐµÐ½Ñ‚Ñ€Ñƒ",
-		justifyright:   "ÐŸÐ¾ Ð¿Ñ€Ð°Ð²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ",
-		justifyfull:    "ÐŸÐ¾ ÑˆÐ¸Ñ€Ð¸Ð½Ðµ",
-		insertorderedlist:    "ÐÑƒÐ¼ÐµÑ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ð¹ Ð»Ð¸ÑÑ‚",
-		insertunorderedlist:  "ÐœÐ°Ñ€ÐºÐ¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ð¹ Ð»Ð¸ÑÑ‚",
-		outdent:        "Ð£Ð¼ÐµÐ½ÑŒÑˆÐ¸Ñ‚ÑŒ Ð¾Ñ‚ÑÑ‚ÑƒÐ¿",
-		indent:         "Ð£Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ñ‚ÑŒ Ð¾Ñ‚ÑÑ‚ÑƒÐ¿",
-		forecolor:      "Ð¦Ð²ÐµÑ‚ ÑˆÑ€Ð¸Ñ„Ñ‚Ð°",
-		hilitecolor:    "Ð¦Ð²ÐµÑ‚ Ñ„Ð¾Ð½Ð°",
-		horizontalrule: "Ð“Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ñ‹Ð¹ Ñ€Ð°Ð·Ð´ÐµÐ»Ð¸Ñ‚ÐµÐ»ÑŒ",
-		createlink:     "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ Ð³Ð¸Ð¿ÐµÑ€ÑÑÑ‹Ð»ÐºÑƒ",
-		insertimage:    "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ðµ",
-		inserttable:    "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñƒ",
-		htmlmode:       "ÐŸÐ¾ÐºÐ°Ð·Ð°Ñ‚ÑŒ Html-ÐºÐ¾Ð´",
-		popupeditor:    "Ð£Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ñ‚ÑŒ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€",
-		about:          "Ðž Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€Ðµ",
-		showhelp:       "ÐŸÐ¾Ð¼Ð¾Ñ‰ÑŒ",
-		textindicator:  "Ð¢ÐµÐºÑƒÑ‰Ð¸Ð¹ ÑÑ‚Ð¸Ð»ÑŒ",
-		undo:           "ÐžÑ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ",
-		redo:           "ÐŸÐ¾Ð²Ñ‚Ð¾Ñ€Ð¸Ñ‚ÑŒ",
-		cut:            "Ð’Ñ‹Ñ€ÐµÐ·Ð°Ñ‚ÑŒ",
-		copy:           "ÐšÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ",
-		paste:          "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ"
-	},
-
-	buttons: {
-		"ok":           "OK",
-		"cancel":       "ÐžÑ‚Ð¼ÐµÐ½Ð°"
-	},
-
-	msg: {
-		"Path":         "ÐŸÑƒÑ‚ÑŒ",
-		"TEXT_MODE":    "Ð’Ñ‹ Ð² Ñ€ÐµÐ¶Ð¸Ð¼Ðµ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Html-ÐºÐ¾Ð´Ð°. Ð½Ð°Ð¶Ð¼Ð¸Ñ‚Ðµ ÐºÐ½Ð¾Ð¿ÐºÑƒ [<>], Ñ‡Ñ‚Ð¾Ð±Ñ‹ Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ Ð² Ð²Ð¸Ð·ÑƒÐ°Ð»ÑŒÐ½Ñ‹Ð¹ Ñ€ÐµÐ¶Ð¸Ð¼."
-	}
-};
+ï»¿// I18N constants
+
+// LANG: "ru", ENCODING: UTF-8 | ISO-8859-1
+// Author: Yulya Shtyryakova, <yulya@vdcom.ru>
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "ru",
+
+	tooltips: {
+		bold:           "ÐŸÐ¾Ð»ÑƒÐ¶Ð¸Ñ€Ð½Ñ‹Ð¹",
+		italic:         "ÐÐ°ÐºÐ»Ð¾Ð½Ð½Ñ‹Ð¹",
+		underline:      "ÐŸÐ¾Ð´Ñ‡ÐµÑ€ÐºÐ½ÑƒÑ‚Ñ‹Ð¹",
+		strikethrough:  "ÐŸÐµÑ€ÐµÑ‡ÐµÑ€ÐºÐ½ÑƒÑ‚Ñ‹Ð¹",
+		subscript:      "ÐÐ¸Ð¶Ð½Ð¸Ð¹ Ð¸Ð½Ð´ÐµÐºÑ",
+		superscript:    "Ð’ÐµÑ€Ñ…Ð½Ð¸Ð¹ Ð¸Ð½Ð´ÐµÐºÑ",
+		justifyleft:    "ÐŸÐ¾ Ð»ÐµÐ²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ",
+		justifycenter:  "ÐŸÐ¾ Ñ†ÐµÐ½Ñ‚Ñ€Ñƒ",
+		justifyright:   "ÐŸÐ¾ Ð¿Ñ€Ð°Ð²Ð¾Ð¼Ñƒ ÐºÑ€Ð°ÑŽ",
+		justifyfull:    "ÐŸÐ¾ ÑˆÐ¸Ñ€Ð¸Ð½Ðµ",
+		insertorderedlist:    "ÐÑƒÐ¼ÐµÑ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ð¹ Ð»Ð¸ÑÑ‚",
+		insertunorderedlist:  "ÐœÐ°Ñ€ÐºÐ¸Ñ€Ð¾Ð²Ð°Ð½Ð½Ñ‹Ð¹ Ð»Ð¸ÑÑ‚",
+		outdent:        "Ð£Ð¼ÐµÐ½ÑŒÑˆÐ¸Ñ‚ÑŒ Ð¾Ñ‚ÑÑ‚ÑƒÐ¿",
+		indent:         "Ð£Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ñ‚ÑŒ Ð¾Ñ‚ÑÑ‚ÑƒÐ¿",
+		forecolor:      "Ð¦Ð²ÐµÑ‚ ÑˆÑ€Ð¸Ñ„Ñ‚Ð°",
+		hilitecolor:    "Ð¦Ð²ÐµÑ‚ Ñ„Ð¾Ð½Ð°",
+		horizontalrule: "Ð“Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ñ‹Ð¹ Ñ€Ð°Ð·Ð´ÐµÐ»Ð¸Ñ‚ÐµÐ»ÑŒ",
+		createlink:     "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ Ð³Ð¸Ð¿ÐµÑ€ÑÑÑ‹Ð»ÐºÑƒ",
+		insertimage:    "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ðµ",
+		inserttable:    "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñƒ",
+		htmlmode:       "ÐŸÐ¾ÐºÐ°Ð·Ð°Ñ‚ÑŒ Html-ÐºÐ¾Ð´",
+		popupeditor:    "Ð£Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ñ‚ÑŒ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€",
+		about:          "Ðž Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¾Ñ€Ðµ",
+		showhelp:       "ÐŸÐ¾Ð¼Ð¾Ñ‰ÑŒ",
+		textindicator:  "Ð¢ÐµÐºÑƒÑ‰Ð¸Ð¹ ÑÑ‚Ð¸Ð»ÑŒ",
+		undo:           "ÐžÑ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ",
+		redo:           "ÐŸÐ¾Ð²Ñ‚Ð¾Ñ€Ð¸Ñ‚ÑŒ",
+		cut:            "Ð’Ñ‹Ñ€ÐµÐ·Ð°Ñ‚ÑŒ",
+		copy:           "ÐšÐ¾Ð¿Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ",
+		paste:          "Ð’ÑÑ‚Ð°Ð²Ð¸Ñ‚ÑŒ"
+	},
+
+	buttons: {
+		"ok":           "OK",
+		"cancel":       "ÐžÑ‚Ð¼ÐµÐ½Ð°"
+	},
+
+	msg: {
+		"Path":         "ÐŸÑƒÑ‚ÑŒ",
+		"TEXT_MODE":    "Ð’Ñ‹ Ð² Ñ€ÐµÐ¶Ð¸Ð¼Ðµ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Html-ÐºÐ¾Ð´Ð°. Ð½Ð°Ð¶Ð¼Ð¸Ñ‚Ðµ ÐºÐ½Ð¾Ð¿ÐºÑƒ [<>], Ñ‡Ñ‚Ð¾Ð±Ñ‹ Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ Ð² Ð²Ð¸Ð·ÑƒÐ°Ð»ÑŒÐ½Ñ‹Ð¹ Ñ€ÐµÐ¶Ð¸Ð¼."
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/lang/he.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/lang/he.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/lang/he.js	(revision 317)
@@ -1,63 +1,63 @@
-// I18N constants
-
-// LANG: "he", ENCODING: UTF-8
-// Author: Liron Newman, <plastish@ultinet.org>
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-HTMLArea.I18N = {
-
-	// the following should be the filename without .js extension
-	// it will be used for automatically load plugin language.
-	lang: "he",
-
-	tooltips: {
-		bold:           "×ž×•×“×’×©",
-		italic:         "× ×˜×•×™",
-		underline:      "×§×• ×ª×—×ª×™",
-		strikethrough:  "×§×• ××ž×¦×¢",
-		subscript:      "×›×ª×‘ ×¢×™×œ×™",
-		superscript:    "×›×ª×‘ ×ª×—×ª×™",
-		justifyleft:    " ×™×©×•×¨ ×œ×©×ž××œ",
-		justifycenter:  "×™×©×•×¨ ×œ×ž×¨×›×–",
-		justifyright:   "×™×©×•×¨ ×œ×™×ž×™×Ÿ",
-		justifyfull:    "×™×™×©×•×¨ ×œ×©×•×¨×” ×ž×œ××”",
-		orderedlist:    "×¨×©×™×ž×” ×ž×ž×•×¡×¤×¨×ª",
-		unorderedlist:  "×¨×©×™×ž×” ×œ× ×ž×ž×•×¡×¤×¨×ª",
-		outdent:        "×”×§×˜×Ÿ ×›× ×™×¡×”",
-		indent:         "×”×’×“×œ ×›× ×™×¡×”",
-		forecolor:      "×¦×‘×¢ ×’×•×¤×Ÿ",
-		hilitecolor:    "×¦×‘×¢ ×¨×§×¢",
-		horizontalrule: "×§×• ×× ×›×™",
-		createlink:     "×”×›× ×¡ ×”×™×¤×¨-×§×™×©×•×¨",
-		insertimage:    "×”×›× ×¡ ×ª×ž×•× ×”",
-		inserttable:    "×”×›× ×¡ ×˜×‘×œ×”",
-		htmlmode:       "×©× ×” ×ž×¦×‘ ×§×•×“ HTML",
-		popupeditor:    "×”×’×“×œ ××ª ×”×¢×•×¨×š",
-		about:          "××•×“×•×ª ×¢×•×¨×š ×–×”",
-		showhelp:       "×¢×–×¨×” ×œ×©×™×ž×•×© ×‘×¢×•×¨×š",
-		textindicator:  "×¡×’× ×•×Ÿ × ×•×›×—×™",
-		undo:           "×ž×‘×˜×œ ××ª ×¤×¢×•×œ×ª×š ×”××—×¨×•× ×”",
-		redo:           "×ž×‘×¦×¢ ×ž×—×“×© ××ª ×”×¤×¢×•×œ×” ×”××—×¨×•× ×” ×©×‘×™×˜×œ×ª",
-		cut:            "×’×–×•×¨ ×‘×—×™×¨×”",
-		copy:           "×”×¢×ª×§ ×‘×—×™×¨×”",
-		paste:          "×”×“×‘×§ ×ž×”×œ×•×—"
-	},
-
-	buttons: {
-		"ok":           "OK",
-		"cancel":       "×‘×™×˜×•×œ"
-	},
-
-	msg: {
-		"Path":         "× ×ª×™×‘ ×¢×™×¦×•×‘",
-		"TEXT_MODE":    "××ª×” ×‘×ž×¦×‘ ×˜×§×¡×˜ × ×§×™ (×§×•×“). ×”×©×ª×ž×© ×‘×›×¤×ª×•×¨ [<>] ×›×“×™ ×œ×—×–×•×¨ ×œ×ž×¦×‘ WYSIWYG (×ª×¦×•×’×ª ×¢×™×¦×•×‘)."
-	}
-};
+// I18N constants
+
+// LANG: "he", ENCODING: UTF-8
+// Author: Liron Newman, <plastish@ultinet.org>
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+HTMLArea.I18N = {
+
+	// the following should be the filename without .js extension
+	// it will be used for automatically load plugin language.
+	lang: "he",
+
+	tooltips: {
+		bold:           "×ž×•×“×’×©",
+		italic:         "× ×˜×•×™",
+		underline:      "×§×• ×ª×—×ª×™",
+		strikethrough:  "×§×• ××ž×¦×¢",
+		subscript:      "×›×ª×‘ ×¢×™×œ×™",
+		superscript:    "×›×ª×‘ ×ª×—×ª×™",
+		justifyleft:    " ×™×©×•×¨ ×œ×©×ž××œ",
+		justifycenter:  "×™×©×•×¨ ×œ×ž×¨×›×–",
+		justifyright:   "×™×©×•×¨ ×œ×™×ž×™×Ÿ",
+		justifyfull:    "×™×™×©×•×¨ ×œ×©×•×¨×” ×ž×œ××”",
+		orderedlist:    "×¨×©×™×ž×” ×ž×ž×•×¡×¤×¨×ª",
+		unorderedlist:  "×¨×©×™×ž×” ×œ× ×ž×ž×•×¡×¤×¨×ª",
+		outdent:        "×”×§×˜×Ÿ ×›× ×™×¡×”",
+		indent:         "×”×’×“×œ ×›× ×™×¡×”",
+		forecolor:      "×¦×‘×¢ ×’×•×¤×Ÿ",
+		hilitecolor:    "×¦×‘×¢ ×¨×§×¢",
+		horizontalrule: "×§×• ×× ×›×™",
+		createlink:     "×”×›× ×¡ ×”×™×¤×¨-×§×™×©×•×¨",
+		insertimage:    "×”×›× ×¡ ×ª×ž×•× ×”",
+		inserttable:    "×”×›× ×¡ ×˜×‘×œ×”",
+		htmlmode:       "×©× ×” ×ž×¦×‘ ×§×•×“ HTML",
+		popupeditor:    "×”×’×“×œ ××ª ×”×¢×•×¨×š",
+		about:          "××•×“×•×ª ×¢×•×¨×š ×–×”",
+		showhelp:       "×¢×–×¨×” ×œ×©×™×ž×•×© ×‘×¢×•×¨×š",
+		textindicator:  "×¡×’× ×•×Ÿ × ×•×›×—×™",
+		undo:           "×ž×‘×˜×œ ××ª ×¤×¢×•×œ×ª×š ×”××—×¨×•× ×”",
+		redo:           "×ž×‘×¦×¢ ×ž×—×“×© ××ª ×”×¤×¢×•×œ×” ×”××—×¨×•× ×” ×©×‘×™×˜×œ×ª",
+		cut:            "×’×–×•×¨ ×‘×—×™×¨×”",
+		copy:           "×”×¢×ª×§ ×‘×—×™×¨×”",
+		paste:          "×”×“×‘×§ ×ž×”×œ×•×—"
+	},
+
+	buttons: {
+		"ok":           "OK",
+		"cancel":       "×‘×™×˜×•×œ"
+	},
+
+	msg: {
+		"Path":         "× ×ª×™×‘ ×¢×™×¦×•×‘",
+		"TEXT_MODE":    "××ª×” ×‘×ž×¦×‘ ×˜×§×¡×˜ × ×§×™ (×§×•×“). ×”×©×ª×ž×© ×‘×›×¤×ª×•×¨ [<>] ×›×“×™ ×œ×—×–×•×¨ ×œ×ž×¦×‘ WYSIWYG (×ª×¦×•×’×ª ×¢×™×¦×•×‘)."
+	}
+};
Index: trunk/wb/modules/htmlarea/htmlarea/plugins/SpellChecker/lang/cz.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/plugins/SpellChecker/lang/cz.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/plugins/SpellChecker/lang/cz.js	(revision 317)
@@ -1,37 +1,37 @@
-ï»¿// I18N constants
-
-// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
-// Author: Jiri LÃ¶w, <jirilow@jirilow.com>
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-SpellChecker.I18N = {
-	"CONFIRM_LINK_CLICK"                    : "ProsÃ­m potvrÄte otevÅ™enÃ­ tohoto odkazu",
-	"Cancel"                                : "ZruÅ¡it",
-	"Dictionary"                            : "SlovnÃ­k",
-	"Finished list of mispelled words"      : "DokonÄen seznam chybnÃ½ch slov",
-	"I will open it in a new page."         : "Bude otevÅ™en jej v novÃ© strÃ¡nce.",
-	"Ignore all"                            : "Ignorovat vÅ¡e",
-	"Ignore"                                : "Ignorovat",
-	"NO_ERRORS"                             : "Podle zvolenÃ©ho slovnÃ­ku nebyla nalezena Å¾Ã¡dnÃ¡ chybnÃ¡ slova.",
-	"NO_ERRORS_CLOSING"                     : "Kontrola sprÃ¡vnosti slov dokonÄena, nebyla nalezena Å¾Ã¡dnÃ¡ chybnÃ¡ slova. UkonÄovÃ¡nÃ­ ...",
-	"OK"                                    : "OK",
-	"Original word"                         : "PÅ¯vodnÃ­ slovo",
-	"Please wait.  Calling spell checker."  : "ProsÃ­m Äekejte. Komunikuace s kontrolou sprÃ¡vnosti slov.",
-	"Please wait: changing dictionary to"   : "ProsÃ­m Äekejte: zmÄ›na adresÃ¡Å™e na",
-	"QUIT_CONFIRMATION"                     : "ZmÄ›ny budou zruÅ¡eny a kontrola sprÃ¡vnosti slov ukonÄena. ProsÃ­m potvrÄte.",
-	"Re-check"                              : "PÅ™ekontrolovat",
-	"Replace all"                           : "ZamÄ›nit vÅ¡echno",
-	"Replace with"                          : "ZamÄ›nit za",
-	"Replace"                               : "ZamÄ›nit",
-	"SC-spell-check"                        : "Kontrola sprÃ¡vnosti slov",
-	"Suggestions"                           : "DoporuÄenÃ­",
-	"pliz weit ;-)"                         : "strpenÃ­ prosÃ­m ;-)"
-};
+ï»¿// I18N constants
+
+// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
+// Author: Jiri LÃ¶w, <jirilow@jirilow.com>
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+SpellChecker.I18N = {
+	"CONFIRM_LINK_CLICK"                    : "ProsÃ­m potvrÄte otevÅ™enÃ­ tohoto odkazu",
+	"Cancel"                                : "ZruÅ¡it",
+	"Dictionary"                            : "SlovnÃ­k",
+	"Finished list of mispelled words"      : "DokonÄen seznam chybnÃ½ch slov",
+	"I will open it in a new page."         : "Bude otevÅ™en jej v novÃ© strÃ¡nce.",
+	"Ignore all"                            : "Ignorovat vÅ¡e",
+	"Ignore"                                : "Ignorovat",
+	"NO_ERRORS"                             : "Podle zvolenÃ©ho slovnÃ­ku nebyla nalezena Å¾Ã¡dnÃ¡ chybnÃ¡ slova.",
+	"NO_ERRORS_CLOSING"                     : "Kontrola sprÃ¡vnosti slov dokonÄena, nebyla nalezena Å¾Ã¡dnÃ¡ chybnÃ¡ slova. UkonÄovÃ¡nÃ­ ...",
+	"OK"                                    : "OK",
+	"Original word"                         : "PÅ¯vodnÃ­ slovo",
+	"Please wait.  Calling spell checker."  : "ProsÃ­m Äekejte. Komunikuace s kontrolou sprÃ¡vnosti slov.",
+	"Please wait: changing dictionary to"   : "ProsÃ­m Äekejte: zmÄ›na adresÃ¡Å™e na",
+	"QUIT_CONFIRMATION"                     : "ZmÄ›ny budou zruÅ¡eny a kontrola sprÃ¡vnosti slov ukonÄena. ProsÃ­m potvrÄte.",
+	"Re-check"                              : "PÅ™ekontrolovat",
+	"Replace all"                           : "ZamÄ›nit vÅ¡echno",
+	"Replace with"                          : "ZamÄ›nit za",
+	"Replace"                               : "ZamÄ›nit",
+	"SC-spell-check"                        : "Kontrola sprÃ¡vnosti slov",
+	"Suggestions"                           : "DoporuÄenÃ­",
+	"pliz weit ;-)"                         : "strpenÃ­ prosÃ­m ;-)"
+};
Index: trunk/wb/modules/htmlarea/htmlarea/plugins/ContextMenu/lang/nl.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/plugins/ContextMenu/lang/nl.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/plugins/ContextMenu/lang/nl.js	(revision 317)
@@ -1,66 +1,66 @@
-// I18N constants
-
-// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
-// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-ContextMenu.I18N = {
-	// Items that appear in menu.  Please note that an underscore (_)
-	// character in the translation (right column) will cause the following
-	// letter to become underlined and be shortcut for that menu option.
-
-	"Cut"                                                   : "Knippen",
-	"Copy"                                                  : "Kopiëren",
-	"Paste"                                                 : "Plakken",
-	"Image Properties"                                      : "Eigenschappen afbeelding...",
-	"Modify Link"                                           : "Hyperlin_k aanpassen...",
-	"Check Link"                                            : "Controleer hyperlin_k...",
-	"Remove Link"                                           : "Ve_rwijder hyperlink...",
-	"Cell Properties"                                       : "C_eleigenschappen...",
-	"Row Properties"                                        : "Rijeigenscha_ppen...",
-	"Insert Row Before"                                     : "Rij invoegen boven",
-	"Insert Row After"                                      : "Rij invoegen onder",
-	"Delete Row"                                            : "Rij _verwijderen",
-	"Table Properties"                                      : "_Tabeleigenschappen...",
-	"Insert Column Before"                                  : "Kolom invoegen voor",
-	"Insert Column After"                                   : "Kolom invoegen na",
-	"Delete Column"                                         : "Kolom verwijderen",
-	"Justify Left"                                          : "Links uitlijnen",
-	"Justify Center"                                        : "Centreren",
-	"Justify Right"                                         : "Rechts uitlijnen",
-	"Justify Full"                                          : "Uitvullen",
-	"Make link"                                             : "Maak hyperlin_k...",
-	"Remove the"                                            : "Verwijder het",
-	"Element"                                               : "element...",
-
-	// Other labels (tooltips and alert/confirm box messages)
-
-	"Please confirm that you want to remove this element:"  : "Is het werkelijk de bedoeling dit element te verwijderen:",
-	"Remove this node from the document"                    : "Verwijder dit punt van het document",
-	"How did you get here? (Please report!)"                : "Hoe kwam je hier? (A.U.B. doorgeven!)",
-	"Show the image properties dialog"                      : "Laat het afbeeldingseigenschappen dialog zien",
-	"Modify URL"                                            : "Aanpassen URL",
-	"Current URL is"                                        : "Huidig URL is",
-	"Opens this link in a new window"                       : "Opend deze hyperlink in een nieuw venster",
-	"Please confirm that you want to unlink this element."  : "Is het werkelijk de bedoeling dit element te unlinken.",
-	"Link points to:"                                       : "Hyperlink verwijst naar:",
-	"Unlink the current element"                            : "Unlink het huidige element",
-	"Show the Table Cell Properties dialog"                 : "Laat de tabel celeigenschappen dialog zien",
-	"Show the Table Row Properties dialog"                  : "Laat de tabel rijeigenschappen dialog zien",
-	"Insert a new row before the current one"               : "Voeg een nieuwe rij in boven de huidige",
-	"Insert a new row after the current one"                : "Voeg een nieuwe rij in onder de huidige",
-	"Delete the current row"                                : "Verwijder de huidige rij",
-	"Show the Table Properties dialog"                      : "Laat de tabel eigenschappen dialog zien",
-	"Insert a new column before the current one"            : "Voeg een nieuwe kolom in voor de huidige",
-	"Insert a new column after the current one"             : "Voeg een nieuwe kolom in na de huidige",
-	"Delete the current column"                             : "Verwijder de huidige kolom",
-	"Create a link"                                         : "Maak een hyperlink"
-};
+// I18N constants
+
+// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
+// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+ContextMenu.I18N = {
+	// Items that appear in menu.  Please note that an underscore (_)
+	// character in the translation (right column) will cause the following
+	// letter to become underlined and be shortcut for that menu option.
+
+	"Cut"                                                   : "Knippen",
+	"Copy"                                                  : "Kopiëren",
+	"Paste"                                                 : "Plakken",
+	"Image Properties"                                      : "Eigenschappen afbeelding...",
+	"Modify Link"                                           : "Hyperlin_k aanpassen...",
+	"Check Link"                                            : "Controleer hyperlin_k...",
+	"Remove Link"                                           : "Ve_rwijder hyperlink...",
+	"Cell Properties"                                       : "C_eleigenschappen...",
+	"Row Properties"                                        : "Rijeigenscha_ppen...",
+	"Insert Row Before"                                     : "Rij invoegen boven",
+	"Insert Row After"                                      : "Rij invoegen onder",
+	"Delete Row"                                            : "Rij _verwijderen",
+	"Table Properties"                                      : "_Tabeleigenschappen...",
+	"Insert Column Before"                                  : "Kolom invoegen voor",
+	"Insert Column After"                                   : "Kolom invoegen na",
+	"Delete Column"                                         : "Kolom verwijderen",
+	"Justify Left"                                          : "Links uitlijnen",
+	"Justify Center"                                        : "Centreren",
+	"Justify Right"                                         : "Rechts uitlijnen",
+	"Justify Full"                                          : "Uitvullen",
+	"Make link"                                             : "Maak hyperlin_k...",
+	"Remove the"                                            : "Verwijder het",
+	"Element"                                               : "element...",
+
+	// Other labels (tooltips and alert/confirm box messages)
+
+	"Please confirm that you want to remove this element:"  : "Is het werkelijk de bedoeling dit element te verwijderen:",
+	"Remove this node from the document"                    : "Verwijder dit punt van het document",
+	"How did you get here? (Please report!)"                : "Hoe kwam je hier? (A.U.B. doorgeven!)",
+	"Show the image properties dialog"                      : "Laat het afbeeldingseigenschappen dialog zien",
+	"Modify URL"                                            : "Aanpassen URL",
+	"Current URL is"                                        : "Huidig URL is",
+	"Opens this link in a new window"                       : "Opend deze hyperlink in een nieuw venster",
+	"Please confirm that you want to unlink this element."  : "Is het werkelijk de bedoeling dit element te unlinken.",
+	"Link points to:"                                       : "Hyperlink verwijst naar:",
+	"Unlink the current element"                            : "Unlink het huidige element",
+	"Show the Table Cell Properties dialog"                 : "Laat de tabel celeigenschappen dialog zien",
+	"Show the Table Row Properties dialog"                  : "Laat de tabel rijeigenschappen dialog zien",
+	"Insert a new row before the current one"               : "Voeg een nieuwe rij in boven de huidige",
+	"Insert a new row after the current one"                : "Voeg een nieuwe rij in onder de huidige",
+	"Delete the current row"                                : "Verwijder de huidige rij",
+	"Show the Table Properties dialog"                      : "Laat de tabel eigenschappen dialog zien",
+	"Insert a new column before the current one"            : "Voeg een nieuwe kolom in voor de huidige",
+	"Insert a new column after the current one"             : "Voeg een nieuwe kolom in na de huidige",
+	"Delete the current column"                             : "Verwijder de huidige kolom",
+	"Create a link"                                         : "Maak een hyperlink"
+};
Index: trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/nl.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/nl.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/nl.js	(revision 317)
@@ -1,90 +1,90 @@
-// I18N constants
-
-// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
-// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-TableOperations.I18N = {
-	"Align":											"Uitlijning",
-	"All four sides":									"Alle 4 zijden",
-	"Background":										"Achtergrond",
-	"Baseline":											"Basis",
-	"Border":											"Rand",
-	"Borders":											"Randen",
-	"Bottom":											"Onder",
-	"CSS Style":										"CSS Style",
-	"Caption":											"Opmerking",
-	"Cell Properties":									"Celeigenschappen",
-	"Center":											"Centreren",
-	"Char":												"Karakter",
-	"Collapsed borders":								"Geen randen",
-	"Color":											"Kleur",
-	"Description":										"Omschrijving",
-	"FG Color":											"Voorgrond",
-	"Float":											"Zwevend",
-	"Frames":											"Frames",
-	"Height":											"Hoogte",
-	"How many columns would you like to merge?":		"Hoeveel kolommen wilt u samenvoegen?",
-	"How many rows would you like to merge?":			"Hoeveel rijen wilt u samenvoegen?",
-	"Image URL":										"Afbeelding URL",
-	"Justify":											"Uitvullen",
-	"Layout":											"Opmaak",
-	"Left":												"Links",
-	"Margin":											"Marge",
-	"Middle":											"Midden",
-	"No rules":											"Geen regels",
-	"No sides":											"Geen zijlijnen",
-	"None":												"Geen",
-	"Padding":											"Celmarge",
-	"Please click into some cell":						"Klik in een cel a.u.b.",
-	"Right":											"Rechts",
-	"Row Properties":									"Rijeigenschappen",
-	"Rules will appear between all rows and columns":	"Regels verschijnen tussen alle rijen en kolommen",
-	"Rules will appear between columns only":	  		"Regels verschijnen enkel tussen de kolommen",
-	"Rules will appear between rows only":				"Regels verschijnen enkel tussen de rijen",
-	"Rules":					  						"Regels",
-	"Spacing and padding":                           	"Celmarge en afstand tussen cellen",
-	"Spacing":											"marge",
-	"Summary":											"Overzicht",
-	"TO-cell-delete":				  					"Cel verwijderen",
-	"TO-cell-insert-after":				  				"Voeg cel toe achter",
-	"TO-cell-insert-before":			  				"Voeg cel toe voor",
-	"TO-cell-merge":									"Cellen samenvoegen",
-	"TO-cell-prop":										"Celeigenschappen",
-	"TO-cell-split":									"Cel splitsen",
-	"TO-col-delete":									"Kolom verwijderen",
-	"TO-col-insert-after":								"Kolom invoegen achter",
-	"TO-col-insert-before":								"Kolom invoegen voor",
-	"TO-col-split":										"Kolom splitsen",
-	"TO-row-delete":									"Rij verwijderen",
-	"TO-row-insert-above":								"Rij invoegen boven",
-	"TO-row-insert-under":								"Rij invoegen onder",
-	"TO-row-prop":										"Rij eigenschappen",
-	"TO-row-split":										"Rij splitsen",
-	"TO-table-prop":				  					"Tabel eigenschappen",
-	"Table Properties":				  					"Tabel eigenschappen",
-	"Text align":                                     	"Text uitlijning",
-	"The bottom side only":				  				"Enkel aan de onderkant",
-	"The left-hand side only":			 				"Enkel aan de linkerkant",
-	"The right and left sides only":		 			"Enkel aan de linker en rechterkant",
-	"The right-hand side only":							"Enkel aan de rechterkant",
-	"The top and bottom sides only":					"Enkel aan de bovenen onderkant",
-	"The top side only":								"Enkel aan de bovenkant",
-	"Top":												"Boven",
-	"Unset color":										"Wis kleur",
-	"Vertical align":									"Vertikale uitlijning",
-	"Width":					 						"Breedte",
-	"not-del-last-cell":								"HTMLArea kan de laatste cel in deze tabel niet verwijderen.",
-	"not-del-last-col":									"HTMLArea kan de laatste kolom in deze tabel niet verwijderen.",
-	"not-del-last-row":									"HTMLArea kan de laatste rij in deze tabel niet verwijderen.",
-	"percent":											"procent",
-	"pixels":											"pixels"
-};
+// I18N constants
+
+// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
+// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+TableOperations.I18N = {
+	"Align":											"Uitlijning",
+	"All four sides":									"Alle 4 zijden",
+	"Background":										"Achtergrond",
+	"Baseline":											"Basis",
+	"Border":											"Rand",
+	"Borders":											"Randen",
+	"Bottom":											"Onder",
+	"CSS Style":										"CSS Style",
+	"Caption":											"Opmerking",
+	"Cell Properties":									"Celeigenschappen",
+	"Center":											"Centreren",
+	"Char":												"Karakter",
+	"Collapsed borders":								"Geen randen",
+	"Color":											"Kleur",
+	"Description":										"Omschrijving",
+	"FG Color":											"Voorgrond",
+	"Float":											"Zwevend",
+	"Frames":											"Frames",
+	"Height":											"Hoogte",
+	"How many columns would you like to merge?":		"Hoeveel kolommen wilt u samenvoegen?",
+	"How many rows would you like to merge?":			"Hoeveel rijen wilt u samenvoegen?",
+	"Image URL":										"Afbeelding URL",
+	"Justify":											"Uitvullen",
+	"Layout":											"Opmaak",
+	"Left":												"Links",
+	"Margin":											"Marge",
+	"Middle":											"Midden",
+	"No rules":											"Geen regels",
+	"No sides":											"Geen zijlijnen",
+	"None":												"Geen",
+	"Padding":											"Celmarge",
+	"Please click into some cell":						"Klik in een cel a.u.b.",
+	"Right":											"Rechts",
+	"Row Properties":									"Rijeigenschappen",
+	"Rules will appear between all rows and columns":	"Regels verschijnen tussen alle rijen en kolommen",
+	"Rules will appear between columns only":	  		"Regels verschijnen enkel tussen de kolommen",
+	"Rules will appear between rows only":				"Regels verschijnen enkel tussen de rijen",
+	"Rules":					  						"Regels",
+	"Spacing and padding":                           	"Celmarge en afstand tussen cellen",
+	"Spacing":											"marge",
+	"Summary":											"Overzicht",
+	"TO-cell-delete":				  					"Cel verwijderen",
+	"TO-cell-insert-after":				  				"Voeg cel toe achter",
+	"TO-cell-insert-before":			  				"Voeg cel toe voor",
+	"TO-cell-merge":									"Cellen samenvoegen",
+	"TO-cell-prop":										"Celeigenschappen",
+	"TO-cell-split":									"Cel splitsen",
+	"TO-col-delete":									"Kolom verwijderen",
+	"TO-col-insert-after":								"Kolom invoegen achter",
+	"TO-col-insert-before":								"Kolom invoegen voor",
+	"TO-col-split":										"Kolom splitsen",
+	"TO-row-delete":									"Rij verwijderen",
+	"TO-row-insert-above":								"Rij invoegen boven",
+	"TO-row-insert-under":								"Rij invoegen onder",
+	"TO-row-prop":										"Rij eigenschappen",
+	"TO-row-split":										"Rij splitsen",
+	"TO-table-prop":				  					"Tabel eigenschappen",
+	"Table Properties":				  					"Tabel eigenschappen",
+	"Text align":                                     	"Text uitlijning",
+	"The bottom side only":				  				"Enkel aan de onderkant",
+	"The left-hand side only":			 				"Enkel aan de linkerkant",
+	"The right and left sides only":		 			"Enkel aan de linker en rechterkant",
+	"The right-hand side only":							"Enkel aan de rechterkant",
+	"The top and bottom sides only":					"Enkel aan de bovenen onderkant",
+	"The top side only":								"Enkel aan de bovenkant",
+	"Top":												"Boven",
+	"Unset color":										"Wis kleur",
+	"Vertical align":									"Vertikale uitlijning",
+	"Width":					 						"Breedte",
+	"not-del-last-cell":								"HTMLArea kan de laatste cel in deze tabel niet verwijderen.",
+	"not-del-last-col":									"HTMLArea kan de laatste kolom in deze tabel niet verwijderen.",
+	"not-del-last-row":									"HTMLArea kan de laatste rij in deze tabel niet verwijderen.",
+	"percent":											"procent",
+	"pixels":											"pixels"
+};
Index: trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/cz.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/cz.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/cz.js	(revision 317)
@@ -1,90 +1,90 @@
-ï»¿// I18N constants
-
-// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
-// Author: Jiri LÃ¶w, <jirilow@jirilow.com>
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-TableOperations.I18N = {
-	"Align":					  "ZarovnÃ¡nÃ­",
-	"All four sides":				  "VÅ¡echny ÄtyÅ™i strany",
-	"Background":					  "PozadÃ­",
-	"Baseline":                                       "ZÃ¡kladnÃ­ linka",
-	"Border":					  "Obrys",
-	"Borders":					  "Obrysy",
-	"Bottom":                                         "DolÅ¯",
-	"CSS Style":					  "KaskÃ¡dovÃ© styly (CSS)",
-	"Caption":					  "Titulek",
-	"Cell Properties":                                "Vlastnosti buÅˆky",
-	"Center":					  "Na stÅ™ed",
-	"Char":                                           "Znak",
-	"Collapsed borders":                              "StlaÄenÃ© okraje",
-	"Color":					  "Barva",
-	"Description":					  "Popis",
-	"FG Color":					  "Barva popÅ™edÃ­",
-	"Float":                                          "ObtÃ©kÃ¡nÃ­",
-	"Frames":					  "RÃ¡meÄky",
-	"Height":                                         "VÃ½Å¡ka",
-	"How many columns would you like to merge?":      "Kolik sloupcÅ¯ si pÅ™ejete spojit?",
-	"How many rows would you like to merge?":         "Kolik Å™Ã¡dkÅ¯ si pÅ™ejete spojit?",
-	"Image URL":					  "Adresa obrÃ¡zku",
-	"Justify":                                        "Do stran",
-	"Layout":					  "RozloÅ¾enÃ­",
-	"Left":						  "Vlevo",
-	"Margin":                                         "Okraj",
-	"Middle":                                         "Na stÅ™ed",
-	"No rules":					  "Å½Ã¡dnÃ© ÄÃ¡ry",
-	"No sides":					  "Å½Ã¡dnÃ© strany",
-	"None":                                           "Å½Ã¡dnÃ©",
-	"Padding":					  "OdsazovÃ¡nÃ­",
-	"Please click into some cell":                    "ProsÃ­m kliknÄ›te do nÄ›kterÃ© buÅˆky",
-	"Right":					  "Vpravo",
-	"Row Properties":                                 "Vlastnosti Å™Ã¡dku",
-	"Rules will appear between all rows and columns": "ÄŒÃ¡ry mezi vÅ¡emi Å™Ã¡dky i sloupci",
-	"Rules will appear between columns only":	  "ÄŒÃ¡ry pouze mezi sloupci",
-	"Rules will appear between rows only":		  "ÄŒÃ¡ry pouze mezi Å™Ã¡dky",
-	"Rules":					  "ÄŒÃ¡ry",
-	"Spacing and padding":                            "Mezery a odsazovÃ¡nÃ­",
-	"Spacing":					  "Mezery",
-	"Summary":					  "ShrnutÃ­",
-	"TO-cell-delete":				  "Smazat buÅˆku",
-	"TO-cell-insert-after":				  "VloÅ¾it buÅˆku za",
-	"TO-cell-insert-before":			  "VloÅ¾it buÅˆku pÅ™ed",
-	"TO-cell-merge":				  "Spojit buÅˆky",
-	"TO-cell-prop":					  "Vlastnosti buÅˆky",
-	"TO-cell-split":				  "RozdÄ›lit buÅˆku",
-	"TO-col-delete":				  "Smazat sloupec",
-	"TO-col-insert-after":				  "VloÅ¾it sloupec za",
-	"TO-col-insert-before":				  "VloÅ¾it sloupec pÅ™ed",
-	"TO-col-split":					  "RozdÄ›lit sloupec",
-	"TO-row-delete":				  "Smazat Å™Ã¡dek",
-	"TO-row-insert-above":				  "Smazat Å™Ã¡dek nad",
-	"TO-row-insert-under":				  "Smazat Å™Ã¡dek pod",
-	"TO-row-prop":					  "Vlastnosti Å™Ã¡dku",
-	"TO-row-split":					  "RozdÄ›lit Å™Ã¡dek",
-	"TO-table-prop":				  "Vlastnosti tabulky",
-	"Table Properties":				  "Vlastnosti tabulky",
-	"Text align":                                     "ZarovnÃ¡nÃ­ textu",
-	"The bottom side only":				  "Pouze spodnÃ­ strana",
-	"The left-hand side only":			  "Pouze levÃ¡ strana",
-	"The right and left sides only":		  "Pouze levÃ¡ a pravÃ¡ strana",
-	"The right-hand side only":			  "Pouze pravÃ¡ strana",
-	"The top and bottom sides only":		  "Pouze hornÃ­ a dolnÃ­ strana",
-	"The top side only":				  "Pouze hornÃ­ strana",
-	"Top":                                            "Nahoru",	
-	"Unset color":                                    "ZruÅ¡it barvu",
-	"Vertical align":                                 "SvislÃ© zarovnÃ¡nÃ­",
-	"Width":					  "Å Ã­Å™ka",
-	"not-del-last-cell":				  "HTMLArea zbabÄ›le odmÃ­tÃ¡ smazat poslednÃ­ buÅˆku v Å™Ã¡dku.",
-	"not-del-last-col":				  "HTMLArea zbabÄ›le odmÃ­tÃ¡ smazat poslednÃ­ sloupec v tabulce.",
-	"not-del-last-row":				  "HTMLArea zbabÄ›le odmÃ­tÃ¡ smazat poslednÃ­ Å™Ã¡dek v tabulce.",
-	"percent":					  "procent",
-	"pixels":					  "pixelÅ¯"
-};
+ï»¿// I18N constants
+
+// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
+// Author: Jiri LÃ¶w, <jirilow@jirilow.com>
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+TableOperations.I18N = {
+	"Align":					  "ZarovnÃ¡nÃ­",
+	"All four sides":				  "VÅ¡echny ÄtyÅ™i strany",
+	"Background":					  "PozadÃ­",
+	"Baseline":                                       "ZÃ¡kladnÃ­ linka",
+	"Border":					  "Obrys",
+	"Borders":					  "Obrysy",
+	"Bottom":                                         "DolÅ¯",
+	"CSS Style":					  "KaskÃ¡dovÃ© styly (CSS)",
+	"Caption":					  "Titulek",
+	"Cell Properties":                                "Vlastnosti buÅˆky",
+	"Center":					  "Na stÅ™ed",
+	"Char":                                           "Znak",
+	"Collapsed borders":                              "StlaÄenÃ© okraje",
+	"Color":					  "Barva",
+	"Description":					  "Popis",
+	"FG Color":					  "Barva popÅ™edÃ­",
+	"Float":                                          "ObtÃ©kÃ¡nÃ­",
+	"Frames":					  "RÃ¡meÄky",
+	"Height":                                         "VÃ½Å¡ka",
+	"How many columns would you like to merge?":      "Kolik sloupcÅ¯ si pÅ™ejete spojit?",
+	"How many rows would you like to merge?":         "Kolik Å™Ã¡dkÅ¯ si pÅ™ejete spojit?",
+	"Image URL":					  "Adresa obrÃ¡zku",
+	"Justify":                                        "Do stran",
+	"Layout":					  "RozloÅ¾enÃ­",
+	"Left":						  "Vlevo",
+	"Margin":                                         "Okraj",
+	"Middle":                                         "Na stÅ™ed",
+	"No rules":					  "Å½Ã¡dnÃ© ÄÃ¡ry",
+	"No sides":					  "Å½Ã¡dnÃ© strany",
+	"None":                                           "Å½Ã¡dnÃ©",
+	"Padding":					  "OdsazovÃ¡nÃ­",
+	"Please click into some cell":                    "ProsÃ­m kliknÄ›te do nÄ›kterÃ© buÅˆky",
+	"Right":					  "Vpravo",
+	"Row Properties":                                 "Vlastnosti Å™Ã¡dku",
+	"Rules will appear between all rows and columns": "ÄŒÃ¡ry mezi vÅ¡emi Å™Ã¡dky i sloupci",
+	"Rules will appear between columns only":	  "ÄŒÃ¡ry pouze mezi sloupci",
+	"Rules will appear between rows only":		  "ÄŒÃ¡ry pouze mezi Å™Ã¡dky",
+	"Rules":					  "ÄŒÃ¡ry",
+	"Spacing and padding":                            "Mezery a odsazovÃ¡nÃ­",
+	"Spacing":					  "Mezery",
+	"Summary":					  "ShrnutÃ­",
+	"TO-cell-delete":				  "Smazat buÅˆku",
+	"TO-cell-insert-after":				  "VloÅ¾it buÅˆku za",
+	"TO-cell-insert-before":			  "VloÅ¾it buÅˆku pÅ™ed",
+	"TO-cell-merge":				  "Spojit buÅˆky",
+	"TO-cell-prop":					  "Vlastnosti buÅˆky",
+	"TO-cell-split":				  "RozdÄ›lit buÅˆku",
+	"TO-col-delete":				  "Smazat sloupec",
+	"TO-col-insert-after":				  "VloÅ¾it sloupec za",
+	"TO-col-insert-before":				  "VloÅ¾it sloupec pÅ™ed",
+	"TO-col-split":					  "RozdÄ›lit sloupec",
+	"TO-row-delete":				  "Smazat Å™Ã¡dek",
+	"TO-row-insert-above":				  "Smazat Å™Ã¡dek nad",
+	"TO-row-insert-under":				  "Smazat Å™Ã¡dek pod",
+	"TO-row-prop":					  "Vlastnosti Å™Ã¡dku",
+	"TO-row-split":					  "RozdÄ›lit Å™Ã¡dek",
+	"TO-table-prop":				  "Vlastnosti tabulky",
+	"Table Properties":				  "Vlastnosti tabulky",
+	"Text align":                                     "ZarovnÃ¡nÃ­ textu",
+	"The bottom side only":				  "Pouze spodnÃ­ strana",
+	"The left-hand side only":			  "Pouze levÃ¡ strana",
+	"The right and left sides only":		  "Pouze levÃ¡ a pravÃ¡ strana",
+	"The right-hand side only":			  "Pouze pravÃ¡ strana",
+	"The top and bottom sides only":		  "Pouze hornÃ­ a dolnÃ­ strana",
+	"The top side only":				  "Pouze hornÃ­ strana",
+	"Top":                                            "Nahoru",	
+	"Unset color":                                    "ZruÅ¡it barvu",
+	"Vertical align":                                 "SvislÃ© zarovnÃ¡nÃ­",
+	"Width":					  "Å Ã­Å™ka",
+	"not-del-last-cell":				  "HTMLArea zbabÄ›le odmÃ­tÃ¡ smazat poslednÃ­ buÅˆku v Å™Ã¡dku.",
+	"not-del-last-col":				  "HTMLArea zbabÄ›le odmÃ­tÃ¡ smazat poslednÃ­ sloupec v tabulce.",
+	"not-del-last-row":				  "HTMLArea zbabÄ›le odmÃ­tÃ¡ smazat poslednÃ­ Å™Ã¡dek v tabulce.",
+	"percent":					  "procent",
+	"pixels":					  "pixelÅ¯"
+};
Index: trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/no.js
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/no.js	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/plugins/TableOperations/lang/no.js	(revision 317)
@@ -1,91 +1,91 @@
-// I18N constants
-
-// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
-// Author: Mihai Bazon, <mishoo@infoiasi.ro>
-// translated into Norwegia: ses@online.no  11.11.03
-
-// FOR TRANSLATORS:
-//
-//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
-//      (at least a valid email address)
-//
-//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
-//      (if this is not possible, please include a comment
-//       that states what encoding is necessary.)
-
-TableOperations.I18N = {
-	"Align":					  	"Juster",
-	"All four sides":			  	"Alle fire sider",
-	"Background":					"Bakgrund",
-	"Baseline":                   	"Grunnlinje",
-	"Border":					  	"Kantlinje",
-	"Borders":					  	"Kantlinjer",
-	"Bottom":                     	"Bunn",
-	"CSS Style":					"Stil [CSS]",
-	"Caption":					  	"Overskrift",
-	"Cell Properties":              "Celleegenskaper",
-	"Center":					  	"Sentrer",
-	"Char":                         "Tegn",
-	"Collapsed borders":            "Fjern kantlinjer",
-	"Color":					  	"Farge",
-	"Description":					"Beskrivelse",
-	"FG Color":					  	"FG farge",
-	"Float":                        "Flytende",
-	"Frames":					  	"rammer",
-	"Height":                       "Høyde",
-	"How many columns would you like to merge?":      "Hvor mange kolonner vil du slå sammen?",
-	"How many rows would you like to merge?":         "Hvor mange rader vil du slå sammen?",
-	"Image URL":					"Bildets URL",
-	"Justify":                      "Juster",
-	"Layout":					  	"Layout",
-	"Left":						  	"Venstre",
-	"Margin":                       "Marg",
-	"Middle":                       "Midten",
-	"No rules":					  	"Ingen linjal",
-	"No sides":					  	"Ingen sider",
-	"None":                         "Ingen",
-	"Padding":					  	"Luft",
-	"Please click into some cell":  "Klikk i en eller annen celle",
-	"Right":					  	"Høyre",
-	"Row Properties":               "Egenskaper for rad",
-	"Rules will appear between all rows and columns": "Linjer vil synes mellom alle rader og kolonner",
-	"Rules will appear between columns only":	  "Linjer vil synes kun mellom kolonner",
-	"Rules will appear between rows only":		  "Linjer vil synes kun mellom rader",
-	"Rules":					  	"Linjer",
-	"Spacing and padding":          "Luft",
-	"Spacing":					  	"Luft",
-	"Summary":					  	"Sammendrag",
-	"TO-cell-delete":				"Slett celle",
-	"TO-cell-insert-after":			"Sett inn celle etter",
-	"TO-cell-insert-before":		"Sett inn celle foran",
-	"TO-cell-merge":				"Slå sammen celler",
-	"TO-cell-prop":					"Egenskaper for celle",
-	"TO-cell-split":				"Del celle",
-	"TO-col-delete":				"Slett kolonne",
-	"TO-col-insert-after":			"Skyt inn kolonne etter",
-	"TO-col-insert-before":			"Skyt inn kolonne før",
-	"TO-col-split":					"Del kolonne",
-	"TO-row-delete":				"Slett rad",
-	"TO-row-insert-above":			"Skyt inn rad foran",
-	"TO-row-insert-under":			"Skyt inn rad etter",
-	"TO-row-prop":					"Egenskaper for rad",
-	"TO-row-split":					"Del rad",
-	"TO-table-prop":				"Tabellegenskaper",
-	"Table Properties":				"Tabellegenskaper",
-	"Text align":                   "Juster tekst",
-	"The bottom side only":			"Bunnen kun",
-	"The left-hand side only":		"Venstresiden kun",
-	"The right and left sides only":	"Høyre- og venstresiden kun",
-	"The right-hand side only":			"Høyresiden kun",
-	"The top and bottom sides only":	"The top and bottom sides only",
-	"The top side only":				"Overkanten kun",
-	"Top":                          "Overkant",	
-	"Unset color":                  "Ikke-bestemt farge",
-	"Vertical align":               "Vertikal justering",
-	"Width":					  	"Bredde",
-	"not-del-last-cell":			"HTMLArea nekter å slette siste cellen i tabellen.",
-	"not-del-last-col":				"HTMLArea nekter å slette siste kolonnen i tabellen.",
-	"not-del-last-row":				"HTMLArea nekter å slette siste raden i tabellen.",
-	"percent":					  	"prosent",
-	"pixels":					  	"billedpunkter"
-};
+// I18N constants
+
+// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
+// Author: Mihai Bazon, <mishoo@infoiasi.ro>
+// translated into Norwegia: ses@online.no  11.11.03
+
+// FOR TRANSLATORS:
+//
+//   1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
+//      (at least a valid email address)
+//
+//   2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
+//      (if this is not possible, please include a comment
+//       that states what encoding is necessary.)
+
+TableOperations.I18N = {
+	"Align":					  	"Juster",
+	"All four sides":			  	"Alle fire sider",
+	"Background":					"Bakgrund",
+	"Baseline":                   	"Grunnlinje",
+	"Border":					  	"Kantlinje",
+	"Borders":					  	"Kantlinjer",
+	"Bottom":                     	"Bunn",
+	"CSS Style":					"Stil [CSS]",
+	"Caption":					  	"Overskrift",
+	"Cell Properties":              "Celleegenskaper",
+	"Center":					  	"Sentrer",
+	"Char":                         "Tegn",
+	"Collapsed borders":            "Fjern kantlinjer",
+	"Color":					  	"Farge",
+	"Description":					"Beskrivelse",
+	"FG Color":					  	"FG farge",
+	"Float":                        "Flytende",
+	"Frames":					  	"rammer",
+	"Height":                       "Høyde",
+	"How many columns would you like to merge?":      "Hvor mange kolonner vil du slå sammen?",
+	"How many rows would you like to merge?":         "Hvor mange rader vil du slå sammen?",
+	"Image URL":					"Bildets URL",
+	"Justify":                      "Juster",
+	"Layout":					  	"Layout",
+	"Left":						  	"Venstre",
+	"Margin":                       "Marg",
+	"Middle":                       "Midten",
+	"No rules":					  	"Ingen linjal",
+	"No sides":					  	"Ingen sider",
+	"None":                         "Ingen",
+	"Padding":					  	"Luft",
+	"Please click into some cell":  "Klikk i en eller annen celle",
+	"Right":					  	"Høyre",
+	"Row Properties":               "Egenskaper for rad",
+	"Rules will appear between all rows and columns": "Linjer vil synes mellom alle rader og kolonner",
+	"Rules will appear between columns only":	  "Linjer vil synes kun mellom kolonner",
+	"Rules will appear between rows only":		  "Linjer vil synes kun mellom rader",
+	"Rules":					  	"Linjer",
+	"Spacing and padding":          "Luft",
+	"Spacing":					  	"Luft",
+	"Summary":					  	"Sammendrag",
+	"TO-cell-delete":				"Slett celle",
+	"TO-cell-insert-after":			"Sett inn celle etter",
+	"TO-cell-insert-before":		"Sett inn celle foran",
+	"TO-cell-merge":				"Slå sammen celler",
+	"TO-cell-prop":					"Egenskaper for celle",
+	"TO-cell-split":				"Del celle",
+	"TO-col-delete":				"Slett kolonne",
+	"TO-col-insert-after":			"Skyt inn kolonne etter",
+	"TO-col-insert-before":			"Skyt inn kolonne før",
+	"TO-col-split":					"Del kolonne",
+	"TO-row-delete":				"Slett rad",
+	"TO-row-insert-above":			"Skyt inn rad foran",
+	"TO-row-insert-under":			"Skyt inn rad etter",
+	"TO-row-prop":					"Egenskaper for rad",
+	"TO-row-split":					"Del rad",
+	"TO-table-prop":				"Tabellegenskaper",
+	"Table Properties":				"Tabellegenskaper",
+	"Text align":                   "Juster tekst",
+	"The bottom side only":			"Bunnen kun",
+	"The left-hand side only":		"Venstresiden kun",
+	"The right and left sides only":	"Høyre- og venstresiden kun",
+	"The right-hand side only":			"Høyresiden kun",
+	"The top and bottom sides only":	"The top and bottom sides only",
+	"The top side only":				"Overkanten kun",
+	"Top":                          "Overkant",	
+	"Unset color":                  "Ikke-bestemt farge",
+	"Vertical align":               "Vertikal justering",
+	"Width":					  	"Bredde",
+	"not-del-last-cell":			"HTMLArea nekter å slette siste cellen i tabellen.",
+	"not-del-last-col":				"HTMLArea nekter å slette siste kolonnen i tabellen.",
+	"not-del-last-row":				"HTMLArea nekter å slette siste raden i tabellen.",
+	"percent":					  	"prosent",
+	"pixels":					  	"billedpunkter"
+};
Index: trunk/wb/modules/htmlarea/htmlarea/popups/select_color.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/select_color.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/select_color.html	(revision 317)
@@ -1,347 +1,347 @@
-<!-- note: this version of the color picker is optimized for IE 5.5+ only -->
-
-<html><head><title>Select Color</title>
-
-<script type="text/javascript" src="popup.js"></script>
-
-<script type="text/javascript">
-
-window.resizeTo(240, 182);
-function _CloseOnEsc() {
-  if (event.keyCode == 27) { window.close(); return; }
-}
-
-function Init() {                                                       // run on page load
-  __dlg_init();    // <!-- this can be found in popup.js -->
-  document.body.onkeypress = _CloseOnEsc;
-
-  var color = window.dialogArguments;
-  color = ValidateColor(color) || '000000';
-  View(color);                                                          // set default color
-}
-
-function View(color) {                  // preview color
-  document.getElementById("ColorPreview").style.backgroundColor = '#' + color;
-  document.getElementById("ColorHex").value = '#' + color;
-}
-
-function Set(string) {                   // select color
-  var color = ValidateColor(string);
-  if (color == null) { alert("Invalid color code: " + string); }        // invalid color
-  else {                                                                // valid color
-    View(color);                          // show selected color
-    __dlg_close(color);
-  }
-}
-
-function ValidateColor(string) {                // return valid color code
-  string = string || '';
-  string = string + "";
-  string = string.toUpperCase();
-  var chars = '0123456789ABCDEF';
-  var out   = '';
-
-  for (var i=0; i<string.length; i++) {             // remove invalid color chars
-    var schar = string.charAt(i);
-    if (chars.indexOf(schar) != -1) { out += schar; }
-  }
-
-  if (out.length != 6) { return null; }            // check length
-  return out;
-}
-
-</script>
-</head>
-<body style="background:ButtonFace; margin:0px; padding:0px" onload="Init()">
-
-<form method="get" style="margin:0px; padding:0px" onSubmit="Set(document.getElementById('ColorHex').value); return false;">
-<table border="0px" cellspacing="0px" cellpadding="4" width="100%">
- <tr>
-  <td style="background:buttonface" valign=center><div style="background-color: #000000; padding: 1; height: 21px; width: 50px"><div id="ColorPreview" style="height: 100%; width: 100%"></div></div></td>
-  <td style="background:buttonface" valign=center><input type="text" name="ColorHex"
-    id="ColorHex" value="" size=15 style="font-size: 12px"></td>
-  <td style="background:buttonface" width=100%></td>
- </tr>
-</table>
-</form>
-
-<table border="0" cellspacing="1px" cellpadding="0px" width="100%" bgcolor="#000000" style="cursor: hand;">
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#003300 onMouseOver=View('003300') onClick=Set('003300') height="10px" width="10px"></td>
-<td bgcolor=#006600 onMouseOver=View('006600') onClick=Set('006600') height="10px" width="10px"></td>
-<td bgcolor=#009900 onMouseOver=View('009900') onClick=Set('009900') height="10px" width="10px"></td>
-<td bgcolor=#00CC00 onMouseOver=View('00CC00') onClick=Set('00CC00') height="10px" width="10px"></td>
-<td bgcolor=#00FF00 onMouseOver=View('00FF00') onClick=Set('00FF00') height="10px" width="10px"></td>
-<td bgcolor=#330000 onMouseOver=View('330000') onClick=Set('330000') height="10px" width="10px"></td>
-<td bgcolor=#333300 onMouseOver=View('333300') onClick=Set('333300') height="10px" width="10px"></td>
-<td bgcolor=#336600 onMouseOver=View('336600') onClick=Set('336600') height="10px" width="10px"></td>
-<td bgcolor=#339900 onMouseOver=View('339900') onClick=Set('339900') height="10px" width="10px"></td>
-<td bgcolor=#33CC00 onMouseOver=View('33CC00') onClick=Set('33CC00') height="10px" width="10px"></td>
-<td bgcolor=#33FF00 onMouseOver=View('33FF00') onClick=Set('33FF00') height="10px" width="10px"></td>
-<td bgcolor=#660000 onMouseOver=View('660000') onClick=Set('660000') height="10px" width="10px"></td>
-<td bgcolor=#663300 onMouseOver=View('663300') onClick=Set('663300') height="10px" width="10px"></td>
-<td bgcolor=#666600 onMouseOver=View('666600') onClick=Set('666600') height="10px" width="10px"></td>
-<td bgcolor=#669900 onMouseOver=View('669900') onClick=Set('669900') height="10px" width="10px"></td>
-<td bgcolor=#66CC00 onMouseOver=View('66CC00') onClick=Set('66CC00') height="10px" width="10px"></td>
-<td bgcolor=#66FF00 onMouseOver=View('66FF00') onClick=Set('66FF00') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#333333 onMouseOver=View('333333') onClick=Set('333333') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#000033 onMouseOver=View('000033') onClick=Set('000033') height="10px" width="10px"></td>
-<td bgcolor=#003333 onMouseOver=View('003333') onClick=Set('003333') height="10px" width="10px"></td>
-<td bgcolor=#006633 onMouseOver=View('006633') onClick=Set('006633') height="10px" width="10px"></td>
-<td bgcolor=#009933 onMouseOver=View('009933') onClick=Set('009933') height="10px" width="10px"></td>
-<td bgcolor=#00CC33 onMouseOver=View('00CC33') onClick=Set('00CC33') height="10px" width="10px"></td>
-<td bgcolor=#00FF33 onMouseOver=View('00FF33') onClick=Set('00FF33') height="10px" width="10px"></td>
-<td bgcolor=#330033 onMouseOver=View('330033') onClick=Set('330033') height="10px" width="10px"></td>
-<td bgcolor=#333333 onMouseOver=View('333333') onClick=Set('333333') height="10px" width="10px"></td>
-<td bgcolor=#336633 onMouseOver=View('336633') onClick=Set('336633') height="10px" width="10px"></td>
-<td bgcolor=#339933 onMouseOver=View('339933') onClick=Set('339933') height="10px" width="10px"></td>
-<td bgcolor=#33CC33 onMouseOver=View('33CC33') onClick=Set('33CC33') height="10px" width="10px"></td>
-<td bgcolor=#33FF33 onMouseOver=View('33FF33') onClick=Set('33FF33') height="10px" width="10px"></td>
-<td bgcolor=#660033 onMouseOver=View('660033') onClick=Set('660033') height="10px" width="10px"></td>
-<td bgcolor=#663333 onMouseOver=View('663333') onClick=Set('663333') height="10px" width="10px"></td>
-<td bgcolor=#666633 onMouseOver=View('666633') onClick=Set('666633') height="10px" width="10px"></td>
-<td bgcolor=#669933 onMouseOver=View('669933') onClick=Set('669933') height="10px" width="10px"></td>
-<td bgcolor=#66CC33 onMouseOver=View('66CC33') onClick=Set('66CC33') height="10px" width="10px"></td>
-<td bgcolor=#66FF33 onMouseOver=View('66FF33') onClick=Set('66FF33') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#666666 onMouseOver=View('666666') onClick=Set('666666') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#000066 onMouseOver=View('000066') onClick=Set('000066') height="10px" width="10px"></td>
-<td bgcolor=#003366 onMouseOver=View('003366') onClick=Set('003366') height="10px" width="10px"></td>
-<td bgcolor=#006666 onMouseOver=View('006666') onClick=Set('006666') height="10px" width="10px"></td>
-<td bgcolor=#009966 onMouseOver=View('009966') onClick=Set('009966') height="10px" width="10px"></td>
-<td bgcolor=#00CC66 onMouseOver=View('00CC66') onClick=Set('00CC66') height="10px" width="10px"></td>
-<td bgcolor=#00FF66 onMouseOver=View('00FF66') onClick=Set('00FF66') height="10px" width="10px"></td>
-<td bgcolor=#330066 onMouseOver=View('330066') onClick=Set('330066') height="10px" width="10px"></td>
-<td bgcolor=#333366 onMouseOver=View('333366') onClick=Set('333366') height="10px" width="10px"></td>
-<td bgcolor=#336666 onMouseOver=View('336666') onClick=Set('336666') height="10px" width="10px"></td>
-<td bgcolor=#339966 onMouseOver=View('339966') onClick=Set('339966') height="10px" width="10px"></td>
-<td bgcolor=#33CC66 onMouseOver=View('33CC66') onClick=Set('33CC66') height="10px" width="10px"></td>
-<td bgcolor=#33FF66 onMouseOver=View('33FF66') onClick=Set('33FF66') height="10px" width="10px"></td>
-<td bgcolor=#660066 onMouseOver=View('660066') onClick=Set('660066') height="10px" width="10px"></td>
-<td bgcolor=#663366 onMouseOver=View('663366') onClick=Set('663366') height="10px" width="10px"></td>
-<td bgcolor=#666666 onMouseOver=View('666666') onClick=Set('666666') height="10px" width="10px"></td>
-<td bgcolor=#669966 onMouseOver=View('669966') onClick=Set('669966') height="10px" width="10px"></td>
-<td bgcolor=#66CC66 onMouseOver=View('66CC66') onClick=Set('66CC66') height="10px" width="10px"></td>
-<td bgcolor=#66FF66 onMouseOver=View('66FF66') onClick=Set('66FF66') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#999999 onMouseOver=View('999999') onClick=Set('999999') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#000099 onMouseOver=View('000099') onClick=Set('000099') height="10px" width="10px"></td>
-<td bgcolor=#003399 onMouseOver=View('003399') onClick=Set('003399') height="10px" width="10px"></td>
-<td bgcolor=#006699 onMouseOver=View('006699') onClick=Set('006699') height="10px" width="10px"></td>
-<td bgcolor=#009999 onMouseOver=View('009999') onClick=Set('009999') height="10px" width="10px"></td>
-<td bgcolor=#00CC99 onMouseOver=View('00CC99') onClick=Set('00CC99') height="10px" width="10px"></td>
-<td bgcolor=#00FF99 onMouseOver=View('00FF99') onClick=Set('00FF99') height="10px" width="10px"></td>
-<td bgcolor=#330099 onMouseOver=View('330099') onClick=Set('330099') height="10px" width="10px"></td>
-<td bgcolor=#333399 onMouseOver=View('333399') onClick=Set('333399') height="10px" width="10px"></td>
-<td bgcolor=#336699 onMouseOver=View('336699') onClick=Set('336699') height="10px" width="10px"></td>
-<td bgcolor=#339999 onMouseOver=View('339999') onClick=Set('339999') height="10px" width="10px"></td>
-<td bgcolor=#33CC99 onMouseOver=View('33CC99') onClick=Set('33CC99') height="10px" width="10px"></td>
-<td bgcolor=#33FF99 onMouseOver=View('33FF99') onClick=Set('33FF99') height="10px" width="10px"></td>
-<td bgcolor=#660099 onMouseOver=View('660099') onClick=Set('660099') height="10px" width="10px"></td>
-<td bgcolor=#663399 onMouseOver=View('663399') onClick=Set('663399') height="10px" width="10px"></td>
-<td bgcolor=#666699 onMouseOver=View('666699') onClick=Set('666699') height="10px" width="10px"></td>
-<td bgcolor=#669999 onMouseOver=View('669999') onClick=Set('669999') height="10px" width="10px"></td>
-<td bgcolor=#66CC99 onMouseOver=View('66CC99') onClick=Set('66CC99') height="10px" width="10px"></td>
-<td bgcolor=#66FF99 onMouseOver=View('66FF99') onClick=Set('66FF99') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#CCCCCC onMouseOver=View('CCCCCC') onClick=Set('CCCCCC') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#0000CC onMouseOver=View('0000CC') onClick=Set('0000CC') height="10px" width="10px"></td>
-<td bgcolor=#0033CC onMouseOver=View('0033CC') onClick=Set('0033CC') height="10px" width="10px"></td>
-<td bgcolor=#0066CC onMouseOver=View('0066CC') onClick=Set('0066CC') height="10px" width="10px"></td>
-<td bgcolor=#0099CC onMouseOver=View('0099CC') onClick=Set('0099CC') height="10px" width="10px"></td>
-<td bgcolor=#00CCCC onMouseOver=View('00CCCC') onClick=Set('00CCCC') height="10px" width="10px"></td>
-<td bgcolor=#00FFCC onMouseOver=View('00FFCC') onClick=Set('00FFCC') height="10px" width="10px"></td>
-<td bgcolor=#3300CC onMouseOver=View('3300CC') onClick=Set('3300CC') height="10px" width="10px"></td>
-<td bgcolor=#3333CC onMouseOver=View('3333CC') onClick=Set('3333CC') height="10px" width="10px"></td>
-<td bgcolor=#3366CC onMouseOver=View('3366CC') onClick=Set('3366CC') height="10px" width="10px"></td>
-<td bgcolor=#3399CC onMouseOver=View('3399CC') onClick=Set('3399CC') height="10px" width="10px"></td>
-<td bgcolor=#33CCCC onMouseOver=View('33CCCC') onClick=Set('33CCCC') height="10px" width="10px"></td>
-<td bgcolor=#33FFCC onMouseOver=View('33FFCC') onClick=Set('33FFCC') height="10px" width="10px"></td>
-<td bgcolor=#6600CC onMouseOver=View('6600CC') onClick=Set('6600CC') height="10px" width="10px"></td>
-<td bgcolor=#6633CC onMouseOver=View('6633CC') onClick=Set('6633CC') height="10px" width="10px"></td>
-<td bgcolor=#6666CC onMouseOver=View('6666CC') onClick=Set('6666CC') height="10px" width="10px"></td>
-<td bgcolor=#6699CC onMouseOver=View('6699CC') onClick=Set('6699CC') height="10px" width="10px"></td>
-<td bgcolor=#66CCCC onMouseOver=View('66CCCC') onClick=Set('66CCCC') height="10px" width="10px"></td>
-<td bgcolor=#66FFCC onMouseOver=View('66FFCC') onClick=Set('66FFCC') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#FFFFFF onMouseOver=View('FFFFFF') onClick=Set('FFFFFF') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#0000FF onMouseOver=View('0000FF') onClick=Set('0000FF') height="10px" width="10px"></td>
-<td bgcolor=#0033FF onMouseOver=View('0033FF') onClick=Set('0033FF') height="10px" width="10px"></td>
-<td bgcolor=#0066FF onMouseOver=View('0066FF') onClick=Set('0066FF') height="10px" width="10px"></td>
-<td bgcolor=#0099FF onMouseOver=View('0099FF') onClick=Set('0099FF') height="10px" width="10px"></td>
-<td bgcolor=#00CCFF onMouseOver=View('00CCFF') onClick=Set('00CCFF') height="10px" width="10px"></td>
-<td bgcolor=#00FFFF onMouseOver=View('00FFFF') onClick=Set('00FFFF') height="10px" width="10px"></td>
-<td bgcolor=#3300FF onMouseOver=View('3300FF') onClick=Set('3300FF') height="10px" width="10px"></td>
-<td bgcolor=#3333FF onMouseOver=View('3333FF') onClick=Set('3333FF') height="10px" width="10px"></td>
-<td bgcolor=#3366FF onMouseOver=View('3366FF') onClick=Set('3366FF') height="10px" width="10px"></td>
-<td bgcolor=#3399FF onMouseOver=View('3399FF') onClick=Set('3399FF') height="10px" width="10px"></td>
-<td bgcolor=#33CCFF onMouseOver=View('33CCFF') onClick=Set('33CCFF') height="10px" width="10px"></td>
-<td bgcolor=#33FFFF onMouseOver=View('33FFFF') onClick=Set('33FFFF') height="10px" width="10px"></td>
-<td bgcolor=#6600FF onMouseOver=View('6600FF') onClick=Set('6600FF') height="10px" width="10px"></td>
-<td bgcolor=#6633FF onMouseOver=View('6633FF') onClick=Set('6633FF') height="10px" width="10px"></td>
-<td bgcolor=#6666FF onMouseOver=View('6666FF') onClick=Set('6666FF') height="10px" width="10px"></td>
-<td bgcolor=#6699FF onMouseOver=View('6699FF') onClick=Set('6699FF') height="10px" width="10px"></td>
-<td bgcolor=#66CCFF onMouseOver=View('66CCFF') onClick=Set('66CCFF') height="10px" width="10px"></td>
-<td bgcolor=#66FFFF onMouseOver=View('66FFFF') onClick=Set('66FFFF') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#FF0000 onMouseOver=View('FF0000') onClick=Set('FF0000') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#990000 onMouseOver=View('990000') onClick=Set('990000') height="10px" width="10px"></td>
-<td bgcolor=#993300 onMouseOver=View('993300') onClick=Set('993300') height="10px" width="10px"></td>
-<td bgcolor=#996600 onMouseOver=View('996600') onClick=Set('996600') height="10px" width="10px"></td>
-<td bgcolor=#999900 onMouseOver=View('999900') onClick=Set('999900') height="10px" width="10px"></td>
-<td bgcolor=#99CC00 onMouseOver=View('99CC00') onClick=Set('99CC00') height="10px" width="10px"></td>
-<td bgcolor=#99FF00 onMouseOver=View('99FF00') onClick=Set('99FF00') height="10px" width="10px"></td>
-<td bgcolor=#CC0000 onMouseOver=View('CC0000') onClick=Set('CC0000') height="10px" width="10px"></td>
-<td bgcolor=#CC3300 onMouseOver=View('CC3300') onClick=Set('CC3300') height="10px" width="10px"></td>
-<td bgcolor=#CC6600 onMouseOver=View('CC6600') onClick=Set('CC6600') height="10px" width="10px"></td>
-<td bgcolor=#CC9900 onMouseOver=View('CC9900') onClick=Set('CC9900') height="10px" width="10px"></td>
-<td bgcolor=#CCCC00 onMouseOver=View('CCCC00') onClick=Set('CCCC00') height="10px" width="10px"></td>
-<td bgcolor=#CCFF00 onMouseOver=View('CCFF00') onClick=Set('CCFF00') height="10px" width="10px"></td>
-<td bgcolor=#FF0000 onMouseOver=View('FF0000') onClick=Set('FF0000') height="10px" width="10px"></td>
-<td bgcolor=#FF3300 onMouseOver=View('FF3300') onClick=Set('FF3300') height="10px" width="10px"></td>
-<td bgcolor=#FF6600 onMouseOver=View('FF6600') onClick=Set('FF6600') height="10px" width="10px"></td>
-<td bgcolor=#FF9900 onMouseOver=View('FF9900') onClick=Set('FF9900') height="10px" width="10px"></td>
-<td bgcolor=#FFCC00 onMouseOver=View('FFCC00') onClick=Set('FFCC00') height="10px" width="10px"></td>
-<td bgcolor=#FFFF00 onMouseOver=View('FFFF00') onClick=Set('FFFF00') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#00FF00 onMouseOver=View('00FF00') onClick=Set('00FF00') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#990033 onMouseOver=View('990033') onClick=Set('990033') height="10px" width="10px"></td>
-<td bgcolor=#993333 onMouseOver=View('993333') onClick=Set('993333') height="10px" width="10px"></td>
-<td bgcolor=#996633 onMouseOver=View('996633') onClick=Set('996633') height="10px" width="10px"></td>
-<td bgcolor=#999933 onMouseOver=View('999933') onClick=Set('999933') height="10px" width="10px"></td>
-<td bgcolor=#99CC33 onMouseOver=View('99CC33') onClick=Set('99CC33') height="10px" width="10px"></td>
-<td bgcolor=#99FF33 onMouseOver=View('99FF33') onClick=Set('99FF33') height="10px" width="10px"></td>
-<td bgcolor=#CC0033 onMouseOver=View('CC0033') onClick=Set('CC0033') height="10px" width="10px"></td>
-<td bgcolor=#CC3333 onMouseOver=View('CC3333') onClick=Set('CC3333') height="10px" width="10px"></td>
-<td bgcolor=#CC6633 onMouseOver=View('CC6633') onClick=Set('CC6633') height="10px" width="10px"></td>
-<td bgcolor=#CC9933 onMouseOver=View('CC9933') onClick=Set('CC9933') height="10px" width="10px"></td>
-<td bgcolor=#CCCC33 onMouseOver=View('CCCC33') onClick=Set('CCCC33') height="10px" width="10px"></td>
-<td bgcolor=#CCFF33 onMouseOver=View('CCFF33') onClick=Set('CCFF33') height="10px" width="10px"></td>
-<td bgcolor=#FF0033 onMouseOver=View('FF0033') onClick=Set('FF0033') height="10px" width="10px"></td>
-<td bgcolor=#FF3333 onMouseOver=View('FF3333') onClick=Set('FF3333') height="10px" width="10px"></td>
-<td bgcolor=#FF6633 onMouseOver=View('FF6633') onClick=Set('FF6633') height="10px" width="10px"></td>
-<td bgcolor=#FF9933 onMouseOver=View('FF9933') onClick=Set('FF9933') height="10px" width="10px"></td>
-<td bgcolor=#FFCC33 onMouseOver=View('FFCC33') onClick=Set('FFCC33') height="10px" width="10px"></td>
-<td bgcolor=#FFFF33 onMouseOver=View('FFFF33') onClick=Set('FFFF33') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#0000FF onMouseOver=View('0000FF') onClick=Set('0000FF') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#990066 onMouseOver=View('990066') onClick=Set('990066') height="10px" width="10px"></td>
-<td bgcolor=#993366 onMouseOver=View('993366') onClick=Set('993366') height="10px" width="10px"></td>
-<td bgcolor=#996666 onMouseOver=View('996666') onClick=Set('996666') height="10px" width="10px"></td>
-<td bgcolor=#999966 onMouseOver=View('999966') onClick=Set('999966') height="10px" width="10px"></td>
-<td bgcolor=#99CC66 onMouseOver=View('99CC66') onClick=Set('99CC66') height="10px" width="10px"></td>
-<td bgcolor=#99FF66 onMouseOver=View('99FF66') onClick=Set('99FF66') height="10px" width="10px"></td>
-<td bgcolor=#CC0066 onMouseOver=View('CC0066') onClick=Set('CC0066') height="10px" width="10px"></td>
-<td bgcolor=#CC3366 onMouseOver=View('CC3366') onClick=Set('CC3366') height="10px" width="10px"></td>
-<td bgcolor=#CC6666 onMouseOver=View('CC6666') onClick=Set('CC6666') height="10px" width="10px"></td>
-<td bgcolor=#CC9966 onMouseOver=View('CC9966') onClick=Set('CC9966') height="10px" width="10px"></td>
-<td bgcolor=#CCCC66 onMouseOver=View('CCCC66') onClick=Set('CCCC66') height="10px" width="10px"></td>
-<td bgcolor=#CCFF66 onMouseOver=View('CCFF66') onClick=Set('CCFF66') height="10px" width="10px"></td>
-<td bgcolor=#FF0066 onMouseOver=View('FF0066') onClick=Set('FF0066') height="10px" width="10px"></td>
-<td bgcolor=#FF3366 onMouseOver=View('FF3366') onClick=Set('FF3366') height="10px" width="10px"></td>
-<td bgcolor=#FF6666 onMouseOver=View('FF6666') onClick=Set('FF6666') height="10px" width="10px"></td>
-<td bgcolor=#FF9966 onMouseOver=View('FF9966') onClick=Set('FF9966') height="10px" width="10px"></td>
-<td bgcolor=#FFCC66 onMouseOver=View('FFCC66') onClick=Set('FFCC66') height="10px" width="10px"></td>
-<td bgcolor=#FFFF66 onMouseOver=View('FFFF66') onClick=Set('FFFF66') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#FFFF00 onMouseOver=View('FFFF00') onClick=Set('FFFF00') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#990099 onMouseOver=View('990099') onClick=Set('990099') height="10px" width="10px"></td>
-<td bgcolor=#993399 onMouseOver=View('993399') onClick=Set('993399') height="10px" width="10px"></td>
-<td bgcolor=#996699 onMouseOver=View('996699') onClick=Set('996699') height="10px" width="10px"></td>
-<td bgcolor=#999999 onMouseOver=View('999999') onClick=Set('999999') height="10px" width="10px"></td>
-<td bgcolor=#99CC99 onMouseOver=View('99CC99') onClick=Set('99CC99') height="10px" width="10px"></td>
-<td bgcolor=#99FF99 onMouseOver=View('99FF99') onClick=Set('99FF99') height="10px" width="10px"></td>
-<td bgcolor=#CC0099 onMouseOver=View('CC0099') onClick=Set('CC0099') height="10px" width="10px"></td>
-<td bgcolor=#CC3399 onMouseOver=View('CC3399') onClick=Set('CC3399') height="10px" width="10px"></td>
-<td bgcolor=#CC6699 onMouseOver=View('CC6699') onClick=Set('CC6699') height="10px" width="10px"></td>
-<td bgcolor=#CC9999 onMouseOver=View('CC9999') onClick=Set('CC9999') height="10px" width="10px"></td>
-<td bgcolor=#CCCC99 onMouseOver=View('CCCC99') onClick=Set('CCCC99') height="10px" width="10px"></td>
-<td bgcolor=#CCFF99 onMouseOver=View('CCFF99') onClick=Set('CCFF99') height="10px" width="10px"></td>
-<td bgcolor=#FF0099 onMouseOver=View('FF0099') onClick=Set('FF0099') height="10px" width="10px"></td>
-<td bgcolor=#FF3399 onMouseOver=View('FF3399') onClick=Set('FF3399') height="10px" width="10px"></td>
-<td bgcolor=#FF6699 onMouseOver=View('FF6699') onClick=Set('FF6699') height="10px" width="10px"></td>
-<td bgcolor=#FF9999 onMouseOver=View('FF9999') onClick=Set('FF9999') height="10px" width="10px"></td>
-<td bgcolor=#FFCC99 onMouseOver=View('FFCC99') onClick=Set('FFCC99') height="10px" width="10px"></td>
-<td bgcolor=#FFFF99 onMouseOver=View('FFFF99') onClick=Set('FFFF99') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#00FFFF onMouseOver=View('00FFFF') onClick=Set('00FFFF') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#9900CC onMouseOver=View('9900CC') onClick=Set('9900CC') height="10px" width="10px"></td>
-<td bgcolor=#9933CC onMouseOver=View('9933CC') onClick=Set('9933CC') height="10px" width="10px"></td>
-<td bgcolor=#9966CC onMouseOver=View('9966CC') onClick=Set('9966CC') height="10px" width="10px"></td>
-<td bgcolor=#9999CC onMouseOver=View('9999CC') onClick=Set('9999CC') height="10px" width="10px"></td>
-<td bgcolor=#99CCCC onMouseOver=View('99CCCC') onClick=Set('99CCCC') height="10px" width="10px"></td>
-<td bgcolor=#99FFCC onMouseOver=View('99FFCC') onClick=Set('99FFCC') height="10px" width="10px"></td>
-<td bgcolor=#CC00CC onMouseOver=View('CC00CC') onClick=Set('CC00CC') height="10px" width="10px"></td>
-<td bgcolor=#CC33CC onMouseOver=View('CC33CC') onClick=Set('CC33CC') height="10px" width="10px"></td>
-<td bgcolor=#CC66CC onMouseOver=View('CC66CC') onClick=Set('CC66CC') height="10px" width="10px"></td>
-<td bgcolor=#CC99CC onMouseOver=View('CC99CC') onClick=Set('CC99CC') height="10px" width="10px"></td>
-<td bgcolor=#CCCCCC onMouseOver=View('CCCCCC') onClick=Set('CCCCCC') height="10px" width="10px"></td>
-<td bgcolor=#CCFFCC onMouseOver=View('CCFFCC') onClick=Set('CCFFCC') height="10px" width="10px"></td>
-<td bgcolor=#FF00CC onMouseOver=View('FF00CC') onClick=Set('FF00CC') height="10px" width="10px"></td>
-<td bgcolor=#FF33CC onMouseOver=View('FF33CC') onClick=Set('FF33CC') height="10px" width="10px"></td>
-<td bgcolor=#FF66CC onMouseOver=View('FF66CC') onClick=Set('FF66CC') height="10px" width="10px"></td>
-<td bgcolor=#FF99CC onMouseOver=View('FF99CC') onClick=Set('FF99CC') height="10px" width="10px"></td>
-<td bgcolor=#FFCCCC onMouseOver=View('FFCCCC') onClick=Set('FFCCCC') height="10px" width="10px"></td>
-<td bgcolor=#FFFFCC onMouseOver=View('FFFFCC') onClick=Set('FFFFCC') height="10px" width="10px"></td>
-</tr>
-<tr>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#FF00FF onMouseOver=View('FF00FF') onClick=Set('FF00FF') height="10px" width="10px"></td>
-<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
-<td bgcolor=#9900FF onMouseOver=View('9900FF') onClick=Set('9900FF') height="10px" width="10px"></td>
-<td bgcolor=#9933FF onMouseOver=View('9933FF') onClick=Set('9933FF') height="10px" width="10px"></td>
-<td bgcolor=#9966FF onMouseOver=View('9966FF') onClick=Set('9966FF') height="10px" width="10px"></td>
-<td bgcolor=#9999FF onMouseOver=View('9999FF') onClick=Set('9999FF') height="10px" width="10px"></td>
-<td bgcolor=#99CCFF onMouseOver=View('99CCFF') onClick=Set('99CCFF') height="10px" width="10px"></td>
-<td bgcolor=#99FFFF onMouseOver=View('99FFFF') onClick=Set('99FFFF') height="10px" width="10px"></td>
-<td bgcolor=#CC00FF onMouseOver=View('CC00FF') onClick=Set('CC00FF') height="10px" width="10px"></td>
-<td bgcolor=#CC33FF onMouseOver=View('CC33FF') onClick=Set('CC33FF') height="10px" width="10px"></td>
-<td bgcolor=#CC66FF onMouseOver=View('CC66FF') onClick=Set('CC66FF') height="10px" width="10px"></td>
-<td bgcolor=#CC99FF onMouseOver=View('CC99FF') onClick=Set('CC99FF') height="10px" width="10px"></td>
-<td bgcolor=#CCCCFF onMouseOver=View('CCCCFF') onClick=Set('CCCCFF') height="10px" width="10px"></td>
-<td bgcolor=#CCFFFF onMouseOver=View('CCFFFF') onClick=Set('CCFFFF') height="10px" width="10px"></td>
-<td bgcolor=#FF00FF onMouseOver=View('FF00FF') onClick=Set('FF00FF') height="10px" width="10px"></td>
-<td bgcolor=#FF33FF onMouseOver=View('FF33FF') onClick=Set('FF33FF') height="10px" width="10px"></td>
-<td bgcolor=#FF66FF onMouseOver=View('FF66FF') onClick=Set('FF66FF') height="10px" width="10px"></td>
-<td bgcolor=#FF99FF onMouseOver=View('FF99FF') onClick=Set('FF99FF') height="10px" width="10px"></td>
-<td bgcolor=#FFCCFF onMouseOver=View('FFCCFF') onClick=Set('FFCCFF') height="10px" width="10px"></td>
-<td bgcolor=#FFFFFF onMouseOver=View('FFFFFF') onClick=Set('FFFFFF') height="10px" width="10px"></td>
-</tr>
-</table>
-
-</body></html>
+<!-- note: this version of the color picker is optimized for IE 5.5+ only -->
+
+<html><head><title>Select Color</title>
+
+<script type="text/javascript" src="popup.js"></script>
+
+<script type="text/javascript">
+
+window.resizeTo(240, 182);
+function _CloseOnEsc() {
+  if (event.keyCode == 27) { window.close(); return; }
+}
+
+function Init() {                                                       // run on page load
+  __dlg_init();    // <!-- this can be found in popup.js -->
+  document.body.onkeypress = _CloseOnEsc;
+
+  var color = window.dialogArguments;
+  color = ValidateColor(color) || '000000';
+  View(color);                                                          // set default color
+}
+
+function View(color) {                  // preview color
+  document.getElementById("ColorPreview").style.backgroundColor = '#' + color;
+  document.getElementById("ColorHex").value = '#' + color;
+}
+
+function Set(string) {                   // select color
+  var color = ValidateColor(string);
+  if (color == null) { alert("Invalid color code: " + string); }        // invalid color
+  else {                                                                // valid color
+    View(color);                          // show selected color
+    __dlg_close(color);
+  }
+}
+
+function ValidateColor(string) {                // return valid color code
+  string = string || '';
+  string = string + "";
+  string = string.toUpperCase();
+  var chars = '0123456789ABCDEF';
+  var out   = '';
+
+  for (var i=0; i<string.length; i++) {             // remove invalid color chars
+    var schar = string.charAt(i);
+    if (chars.indexOf(schar) != -1) { out += schar; }
+  }
+
+  if (out.length != 6) { return null; }            // check length
+  return out;
+}
+
+</script>
+</head>
+<body style="background:ButtonFace; margin:0px; padding:0px" onload="Init()">
+
+<form method="get" style="margin:0px; padding:0px" onSubmit="Set(document.getElementById('ColorHex').value); return false;">
+<table border="0px" cellspacing="0px" cellpadding="4" width="100%">
+ <tr>
+  <td style="background:buttonface" valign=center><div style="background-color: #000000; padding: 1; height: 21px; width: 50px"><div id="ColorPreview" style="height: 100%; width: 100%"></div></div></td>
+  <td style="background:buttonface" valign=center><input type="text" name="ColorHex"
+    id="ColorHex" value="" size=15 style="font-size: 12px"></td>
+  <td style="background:buttonface" width=100%></td>
+ </tr>
+</table>
+</form>
+
+<table border="0" cellspacing="1px" cellpadding="0px" width="100%" bgcolor="#000000" style="cursor: hand;">
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#003300 onMouseOver=View('003300') onClick=Set('003300') height="10px" width="10px"></td>
+<td bgcolor=#006600 onMouseOver=View('006600') onClick=Set('006600') height="10px" width="10px"></td>
+<td bgcolor=#009900 onMouseOver=View('009900') onClick=Set('009900') height="10px" width="10px"></td>
+<td bgcolor=#00CC00 onMouseOver=View('00CC00') onClick=Set('00CC00') height="10px" width="10px"></td>
+<td bgcolor=#00FF00 onMouseOver=View('00FF00') onClick=Set('00FF00') height="10px" width="10px"></td>
+<td bgcolor=#330000 onMouseOver=View('330000') onClick=Set('330000') height="10px" width="10px"></td>
+<td bgcolor=#333300 onMouseOver=View('333300') onClick=Set('333300') height="10px" width="10px"></td>
+<td bgcolor=#336600 onMouseOver=View('336600') onClick=Set('336600') height="10px" width="10px"></td>
+<td bgcolor=#339900 onMouseOver=View('339900') onClick=Set('339900') height="10px" width="10px"></td>
+<td bgcolor=#33CC00 onMouseOver=View('33CC00') onClick=Set('33CC00') height="10px" width="10px"></td>
+<td bgcolor=#33FF00 onMouseOver=View('33FF00') onClick=Set('33FF00') height="10px" width="10px"></td>
+<td bgcolor=#660000 onMouseOver=View('660000') onClick=Set('660000') height="10px" width="10px"></td>
+<td bgcolor=#663300 onMouseOver=View('663300') onClick=Set('663300') height="10px" width="10px"></td>
+<td bgcolor=#666600 onMouseOver=View('666600') onClick=Set('666600') height="10px" width="10px"></td>
+<td bgcolor=#669900 onMouseOver=View('669900') onClick=Set('669900') height="10px" width="10px"></td>
+<td bgcolor=#66CC00 onMouseOver=View('66CC00') onClick=Set('66CC00') height="10px" width="10px"></td>
+<td bgcolor=#66FF00 onMouseOver=View('66FF00') onClick=Set('66FF00') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#333333 onMouseOver=View('333333') onClick=Set('333333') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#000033 onMouseOver=View('000033') onClick=Set('000033') height="10px" width="10px"></td>
+<td bgcolor=#003333 onMouseOver=View('003333') onClick=Set('003333') height="10px" width="10px"></td>
+<td bgcolor=#006633 onMouseOver=View('006633') onClick=Set('006633') height="10px" width="10px"></td>
+<td bgcolor=#009933 onMouseOver=View('009933') onClick=Set('009933') height="10px" width="10px"></td>
+<td bgcolor=#00CC33 onMouseOver=View('00CC33') onClick=Set('00CC33') height="10px" width="10px"></td>
+<td bgcolor=#00FF33 onMouseOver=View('00FF33') onClick=Set('00FF33') height="10px" width="10px"></td>
+<td bgcolor=#330033 onMouseOver=View('330033') onClick=Set('330033') height="10px" width="10px"></td>
+<td bgcolor=#333333 onMouseOver=View('333333') onClick=Set('333333') height="10px" width="10px"></td>
+<td bgcolor=#336633 onMouseOver=View('336633') onClick=Set('336633') height="10px" width="10px"></td>
+<td bgcolor=#339933 onMouseOver=View('339933') onClick=Set('339933') height="10px" width="10px"></td>
+<td bgcolor=#33CC33 onMouseOver=View('33CC33') onClick=Set('33CC33') height="10px" width="10px"></td>
+<td bgcolor=#33FF33 onMouseOver=View('33FF33') onClick=Set('33FF33') height="10px" width="10px"></td>
+<td bgcolor=#660033 onMouseOver=View('660033') onClick=Set('660033') height="10px" width="10px"></td>
+<td bgcolor=#663333 onMouseOver=View('663333') onClick=Set('663333') height="10px" width="10px"></td>
+<td bgcolor=#666633 onMouseOver=View('666633') onClick=Set('666633') height="10px" width="10px"></td>
+<td bgcolor=#669933 onMouseOver=View('669933') onClick=Set('669933') height="10px" width="10px"></td>
+<td bgcolor=#66CC33 onMouseOver=View('66CC33') onClick=Set('66CC33') height="10px" width="10px"></td>
+<td bgcolor=#66FF33 onMouseOver=View('66FF33') onClick=Set('66FF33') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#666666 onMouseOver=View('666666') onClick=Set('666666') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#000066 onMouseOver=View('000066') onClick=Set('000066') height="10px" width="10px"></td>
+<td bgcolor=#003366 onMouseOver=View('003366') onClick=Set('003366') height="10px" width="10px"></td>
+<td bgcolor=#006666 onMouseOver=View('006666') onClick=Set('006666') height="10px" width="10px"></td>
+<td bgcolor=#009966 onMouseOver=View('009966') onClick=Set('009966') height="10px" width="10px"></td>
+<td bgcolor=#00CC66 onMouseOver=View('00CC66') onClick=Set('00CC66') height="10px" width="10px"></td>
+<td bgcolor=#00FF66 onMouseOver=View('00FF66') onClick=Set('00FF66') height="10px" width="10px"></td>
+<td bgcolor=#330066 onMouseOver=View('330066') onClick=Set('330066') height="10px" width="10px"></td>
+<td bgcolor=#333366 onMouseOver=View('333366') onClick=Set('333366') height="10px" width="10px"></td>
+<td bgcolor=#336666 onMouseOver=View('336666') onClick=Set('336666') height="10px" width="10px"></td>
+<td bgcolor=#339966 onMouseOver=View('339966') onClick=Set('339966') height="10px" width="10px"></td>
+<td bgcolor=#33CC66 onMouseOver=View('33CC66') onClick=Set('33CC66') height="10px" width="10px"></td>
+<td bgcolor=#33FF66 onMouseOver=View('33FF66') onClick=Set('33FF66') height="10px" width="10px"></td>
+<td bgcolor=#660066 onMouseOver=View('660066') onClick=Set('660066') height="10px" width="10px"></td>
+<td bgcolor=#663366 onMouseOver=View('663366') onClick=Set('663366') height="10px" width="10px"></td>
+<td bgcolor=#666666 onMouseOver=View('666666') onClick=Set('666666') height="10px" width="10px"></td>
+<td bgcolor=#669966 onMouseOver=View('669966') onClick=Set('669966') height="10px" width="10px"></td>
+<td bgcolor=#66CC66 onMouseOver=View('66CC66') onClick=Set('66CC66') height="10px" width="10px"></td>
+<td bgcolor=#66FF66 onMouseOver=View('66FF66') onClick=Set('66FF66') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#999999 onMouseOver=View('999999') onClick=Set('999999') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#000099 onMouseOver=View('000099') onClick=Set('000099') height="10px" width="10px"></td>
+<td bgcolor=#003399 onMouseOver=View('003399') onClick=Set('003399') height="10px" width="10px"></td>
+<td bgcolor=#006699 onMouseOver=View('006699') onClick=Set('006699') height="10px" width="10px"></td>
+<td bgcolor=#009999 onMouseOver=View('009999') onClick=Set('009999') height="10px" width="10px"></td>
+<td bgcolor=#00CC99 onMouseOver=View('00CC99') onClick=Set('00CC99') height="10px" width="10px"></td>
+<td bgcolor=#00FF99 onMouseOver=View('00FF99') onClick=Set('00FF99') height="10px" width="10px"></td>
+<td bgcolor=#330099 onMouseOver=View('330099') onClick=Set('330099') height="10px" width="10px"></td>
+<td bgcolor=#333399 onMouseOver=View('333399') onClick=Set('333399') height="10px" width="10px"></td>
+<td bgcolor=#336699 onMouseOver=View('336699') onClick=Set('336699') height="10px" width="10px"></td>
+<td bgcolor=#339999 onMouseOver=View('339999') onClick=Set('339999') height="10px" width="10px"></td>
+<td bgcolor=#33CC99 onMouseOver=View('33CC99') onClick=Set('33CC99') height="10px" width="10px"></td>
+<td bgcolor=#33FF99 onMouseOver=View('33FF99') onClick=Set('33FF99') height="10px" width="10px"></td>
+<td bgcolor=#660099 onMouseOver=View('660099') onClick=Set('660099') height="10px" width="10px"></td>
+<td bgcolor=#663399 onMouseOver=View('663399') onClick=Set('663399') height="10px" width="10px"></td>
+<td bgcolor=#666699 onMouseOver=View('666699') onClick=Set('666699') height="10px" width="10px"></td>
+<td bgcolor=#669999 onMouseOver=View('669999') onClick=Set('669999') height="10px" width="10px"></td>
+<td bgcolor=#66CC99 onMouseOver=View('66CC99') onClick=Set('66CC99') height="10px" width="10px"></td>
+<td bgcolor=#66FF99 onMouseOver=View('66FF99') onClick=Set('66FF99') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#CCCCCC onMouseOver=View('CCCCCC') onClick=Set('CCCCCC') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#0000CC onMouseOver=View('0000CC') onClick=Set('0000CC') height="10px" width="10px"></td>
+<td bgcolor=#0033CC onMouseOver=View('0033CC') onClick=Set('0033CC') height="10px" width="10px"></td>
+<td bgcolor=#0066CC onMouseOver=View('0066CC') onClick=Set('0066CC') height="10px" width="10px"></td>
+<td bgcolor=#0099CC onMouseOver=View('0099CC') onClick=Set('0099CC') height="10px" width="10px"></td>
+<td bgcolor=#00CCCC onMouseOver=View('00CCCC') onClick=Set('00CCCC') height="10px" width="10px"></td>
+<td bgcolor=#00FFCC onMouseOver=View('00FFCC') onClick=Set('00FFCC') height="10px" width="10px"></td>
+<td bgcolor=#3300CC onMouseOver=View('3300CC') onClick=Set('3300CC') height="10px" width="10px"></td>
+<td bgcolor=#3333CC onMouseOver=View('3333CC') onClick=Set('3333CC') height="10px" width="10px"></td>
+<td bgcolor=#3366CC onMouseOver=View('3366CC') onClick=Set('3366CC') height="10px" width="10px"></td>
+<td bgcolor=#3399CC onMouseOver=View('3399CC') onClick=Set('3399CC') height="10px" width="10px"></td>
+<td bgcolor=#33CCCC onMouseOver=View('33CCCC') onClick=Set('33CCCC') height="10px" width="10px"></td>
+<td bgcolor=#33FFCC onMouseOver=View('33FFCC') onClick=Set('33FFCC') height="10px" width="10px"></td>
+<td bgcolor=#6600CC onMouseOver=View('6600CC') onClick=Set('6600CC') height="10px" width="10px"></td>
+<td bgcolor=#6633CC onMouseOver=View('6633CC') onClick=Set('6633CC') height="10px" width="10px"></td>
+<td bgcolor=#6666CC onMouseOver=View('6666CC') onClick=Set('6666CC') height="10px" width="10px"></td>
+<td bgcolor=#6699CC onMouseOver=View('6699CC') onClick=Set('6699CC') height="10px" width="10px"></td>
+<td bgcolor=#66CCCC onMouseOver=View('66CCCC') onClick=Set('66CCCC') height="10px" width="10px"></td>
+<td bgcolor=#66FFCC onMouseOver=View('66FFCC') onClick=Set('66FFCC') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#FFFFFF onMouseOver=View('FFFFFF') onClick=Set('FFFFFF') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#0000FF onMouseOver=View('0000FF') onClick=Set('0000FF') height="10px" width="10px"></td>
+<td bgcolor=#0033FF onMouseOver=View('0033FF') onClick=Set('0033FF') height="10px" width="10px"></td>
+<td bgcolor=#0066FF onMouseOver=View('0066FF') onClick=Set('0066FF') height="10px" width="10px"></td>
+<td bgcolor=#0099FF onMouseOver=View('0099FF') onClick=Set('0099FF') height="10px" width="10px"></td>
+<td bgcolor=#00CCFF onMouseOver=View('00CCFF') onClick=Set('00CCFF') height="10px" width="10px"></td>
+<td bgcolor=#00FFFF onMouseOver=View('00FFFF') onClick=Set('00FFFF') height="10px" width="10px"></td>
+<td bgcolor=#3300FF onMouseOver=View('3300FF') onClick=Set('3300FF') height="10px" width="10px"></td>
+<td bgcolor=#3333FF onMouseOver=View('3333FF') onClick=Set('3333FF') height="10px" width="10px"></td>
+<td bgcolor=#3366FF onMouseOver=View('3366FF') onClick=Set('3366FF') height="10px" width="10px"></td>
+<td bgcolor=#3399FF onMouseOver=View('3399FF') onClick=Set('3399FF') height="10px" width="10px"></td>
+<td bgcolor=#33CCFF onMouseOver=View('33CCFF') onClick=Set('33CCFF') height="10px" width="10px"></td>
+<td bgcolor=#33FFFF onMouseOver=View('33FFFF') onClick=Set('33FFFF') height="10px" width="10px"></td>
+<td bgcolor=#6600FF onMouseOver=View('6600FF') onClick=Set('6600FF') height="10px" width="10px"></td>
+<td bgcolor=#6633FF onMouseOver=View('6633FF') onClick=Set('6633FF') height="10px" width="10px"></td>
+<td bgcolor=#6666FF onMouseOver=View('6666FF') onClick=Set('6666FF') height="10px" width="10px"></td>
+<td bgcolor=#6699FF onMouseOver=View('6699FF') onClick=Set('6699FF') height="10px" width="10px"></td>
+<td bgcolor=#66CCFF onMouseOver=View('66CCFF') onClick=Set('66CCFF') height="10px" width="10px"></td>
+<td bgcolor=#66FFFF onMouseOver=View('66FFFF') onClick=Set('66FFFF') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#FF0000 onMouseOver=View('FF0000') onClick=Set('FF0000') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#990000 onMouseOver=View('990000') onClick=Set('990000') height="10px" width="10px"></td>
+<td bgcolor=#993300 onMouseOver=View('993300') onClick=Set('993300') height="10px" width="10px"></td>
+<td bgcolor=#996600 onMouseOver=View('996600') onClick=Set('996600') height="10px" width="10px"></td>
+<td bgcolor=#999900 onMouseOver=View('999900') onClick=Set('999900') height="10px" width="10px"></td>
+<td bgcolor=#99CC00 onMouseOver=View('99CC00') onClick=Set('99CC00') height="10px" width="10px"></td>
+<td bgcolor=#99FF00 onMouseOver=View('99FF00') onClick=Set('99FF00') height="10px" width="10px"></td>
+<td bgcolor=#CC0000 onMouseOver=View('CC0000') onClick=Set('CC0000') height="10px" width="10px"></td>
+<td bgcolor=#CC3300 onMouseOver=View('CC3300') onClick=Set('CC3300') height="10px" width="10px"></td>
+<td bgcolor=#CC6600 onMouseOver=View('CC6600') onClick=Set('CC6600') height="10px" width="10px"></td>
+<td bgcolor=#CC9900 onMouseOver=View('CC9900') onClick=Set('CC9900') height="10px" width="10px"></td>
+<td bgcolor=#CCCC00 onMouseOver=View('CCCC00') onClick=Set('CCCC00') height="10px" width="10px"></td>
+<td bgcolor=#CCFF00 onMouseOver=View('CCFF00') onClick=Set('CCFF00') height="10px" width="10px"></td>
+<td bgcolor=#FF0000 onMouseOver=View('FF0000') onClick=Set('FF0000') height="10px" width="10px"></td>
+<td bgcolor=#FF3300 onMouseOver=View('FF3300') onClick=Set('FF3300') height="10px" width="10px"></td>
+<td bgcolor=#FF6600 onMouseOver=View('FF6600') onClick=Set('FF6600') height="10px" width="10px"></td>
+<td bgcolor=#FF9900 onMouseOver=View('FF9900') onClick=Set('FF9900') height="10px" width="10px"></td>
+<td bgcolor=#FFCC00 onMouseOver=View('FFCC00') onClick=Set('FFCC00') height="10px" width="10px"></td>
+<td bgcolor=#FFFF00 onMouseOver=View('FFFF00') onClick=Set('FFFF00') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#00FF00 onMouseOver=View('00FF00') onClick=Set('00FF00') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#990033 onMouseOver=View('990033') onClick=Set('990033') height="10px" width="10px"></td>
+<td bgcolor=#993333 onMouseOver=View('993333') onClick=Set('993333') height="10px" width="10px"></td>
+<td bgcolor=#996633 onMouseOver=View('996633') onClick=Set('996633') height="10px" width="10px"></td>
+<td bgcolor=#999933 onMouseOver=View('999933') onClick=Set('999933') height="10px" width="10px"></td>
+<td bgcolor=#99CC33 onMouseOver=View('99CC33') onClick=Set('99CC33') height="10px" width="10px"></td>
+<td bgcolor=#99FF33 onMouseOver=View('99FF33') onClick=Set('99FF33') height="10px" width="10px"></td>
+<td bgcolor=#CC0033 onMouseOver=View('CC0033') onClick=Set('CC0033') height="10px" width="10px"></td>
+<td bgcolor=#CC3333 onMouseOver=View('CC3333') onClick=Set('CC3333') height="10px" width="10px"></td>
+<td bgcolor=#CC6633 onMouseOver=View('CC6633') onClick=Set('CC6633') height="10px" width="10px"></td>
+<td bgcolor=#CC9933 onMouseOver=View('CC9933') onClick=Set('CC9933') height="10px" width="10px"></td>
+<td bgcolor=#CCCC33 onMouseOver=View('CCCC33') onClick=Set('CCCC33') height="10px" width="10px"></td>
+<td bgcolor=#CCFF33 onMouseOver=View('CCFF33') onClick=Set('CCFF33') height="10px" width="10px"></td>
+<td bgcolor=#FF0033 onMouseOver=View('FF0033') onClick=Set('FF0033') height="10px" width="10px"></td>
+<td bgcolor=#FF3333 onMouseOver=View('FF3333') onClick=Set('FF3333') height="10px" width="10px"></td>
+<td bgcolor=#FF6633 onMouseOver=View('FF6633') onClick=Set('FF6633') height="10px" width="10px"></td>
+<td bgcolor=#FF9933 onMouseOver=View('FF9933') onClick=Set('FF9933') height="10px" width="10px"></td>
+<td bgcolor=#FFCC33 onMouseOver=View('FFCC33') onClick=Set('FFCC33') height="10px" width="10px"></td>
+<td bgcolor=#FFFF33 onMouseOver=View('FFFF33') onClick=Set('FFFF33') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#0000FF onMouseOver=View('0000FF') onClick=Set('0000FF') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#990066 onMouseOver=View('990066') onClick=Set('990066') height="10px" width="10px"></td>
+<td bgcolor=#993366 onMouseOver=View('993366') onClick=Set('993366') height="10px" width="10px"></td>
+<td bgcolor=#996666 onMouseOver=View('996666') onClick=Set('996666') height="10px" width="10px"></td>
+<td bgcolor=#999966 onMouseOver=View('999966') onClick=Set('999966') height="10px" width="10px"></td>
+<td bgcolor=#99CC66 onMouseOver=View('99CC66') onClick=Set('99CC66') height="10px" width="10px"></td>
+<td bgcolor=#99FF66 onMouseOver=View('99FF66') onClick=Set('99FF66') height="10px" width="10px"></td>
+<td bgcolor=#CC0066 onMouseOver=View('CC0066') onClick=Set('CC0066') height="10px" width="10px"></td>
+<td bgcolor=#CC3366 onMouseOver=View('CC3366') onClick=Set('CC3366') height="10px" width="10px"></td>
+<td bgcolor=#CC6666 onMouseOver=View('CC6666') onClick=Set('CC6666') height="10px" width="10px"></td>
+<td bgcolor=#CC9966 onMouseOver=View('CC9966') onClick=Set('CC9966') height="10px" width="10px"></td>
+<td bgcolor=#CCCC66 onMouseOver=View('CCCC66') onClick=Set('CCCC66') height="10px" width="10px"></td>
+<td bgcolor=#CCFF66 onMouseOver=View('CCFF66') onClick=Set('CCFF66') height="10px" width="10px"></td>
+<td bgcolor=#FF0066 onMouseOver=View('FF0066') onClick=Set('FF0066') height="10px" width="10px"></td>
+<td bgcolor=#FF3366 onMouseOver=View('FF3366') onClick=Set('FF3366') height="10px" width="10px"></td>
+<td bgcolor=#FF6666 onMouseOver=View('FF6666') onClick=Set('FF6666') height="10px" width="10px"></td>
+<td bgcolor=#FF9966 onMouseOver=View('FF9966') onClick=Set('FF9966') height="10px" width="10px"></td>
+<td bgcolor=#FFCC66 onMouseOver=View('FFCC66') onClick=Set('FFCC66') height="10px" width="10px"></td>
+<td bgcolor=#FFFF66 onMouseOver=View('FFFF66') onClick=Set('FFFF66') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#FFFF00 onMouseOver=View('FFFF00') onClick=Set('FFFF00') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#990099 onMouseOver=View('990099') onClick=Set('990099') height="10px" width="10px"></td>
+<td bgcolor=#993399 onMouseOver=View('993399') onClick=Set('993399') height="10px" width="10px"></td>
+<td bgcolor=#996699 onMouseOver=View('996699') onClick=Set('996699') height="10px" width="10px"></td>
+<td bgcolor=#999999 onMouseOver=View('999999') onClick=Set('999999') height="10px" width="10px"></td>
+<td bgcolor=#99CC99 onMouseOver=View('99CC99') onClick=Set('99CC99') height="10px" width="10px"></td>
+<td bgcolor=#99FF99 onMouseOver=View('99FF99') onClick=Set('99FF99') height="10px" width="10px"></td>
+<td bgcolor=#CC0099 onMouseOver=View('CC0099') onClick=Set('CC0099') height="10px" width="10px"></td>
+<td bgcolor=#CC3399 onMouseOver=View('CC3399') onClick=Set('CC3399') height="10px" width="10px"></td>
+<td bgcolor=#CC6699 onMouseOver=View('CC6699') onClick=Set('CC6699') height="10px" width="10px"></td>
+<td bgcolor=#CC9999 onMouseOver=View('CC9999') onClick=Set('CC9999') height="10px" width="10px"></td>
+<td bgcolor=#CCCC99 onMouseOver=View('CCCC99') onClick=Set('CCCC99') height="10px" width="10px"></td>
+<td bgcolor=#CCFF99 onMouseOver=View('CCFF99') onClick=Set('CCFF99') height="10px" width="10px"></td>
+<td bgcolor=#FF0099 onMouseOver=View('FF0099') onClick=Set('FF0099') height="10px" width="10px"></td>
+<td bgcolor=#FF3399 onMouseOver=View('FF3399') onClick=Set('FF3399') height="10px" width="10px"></td>
+<td bgcolor=#FF6699 onMouseOver=View('FF6699') onClick=Set('FF6699') height="10px" width="10px"></td>
+<td bgcolor=#FF9999 onMouseOver=View('FF9999') onClick=Set('FF9999') height="10px" width="10px"></td>
+<td bgcolor=#FFCC99 onMouseOver=View('FFCC99') onClick=Set('FFCC99') height="10px" width="10px"></td>
+<td bgcolor=#FFFF99 onMouseOver=View('FFFF99') onClick=Set('FFFF99') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#00FFFF onMouseOver=View('00FFFF') onClick=Set('00FFFF') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#9900CC onMouseOver=View('9900CC') onClick=Set('9900CC') height="10px" width="10px"></td>
+<td bgcolor=#9933CC onMouseOver=View('9933CC') onClick=Set('9933CC') height="10px" width="10px"></td>
+<td bgcolor=#9966CC onMouseOver=View('9966CC') onClick=Set('9966CC') height="10px" width="10px"></td>
+<td bgcolor=#9999CC onMouseOver=View('9999CC') onClick=Set('9999CC') height="10px" width="10px"></td>
+<td bgcolor=#99CCCC onMouseOver=View('99CCCC') onClick=Set('99CCCC') height="10px" width="10px"></td>
+<td bgcolor=#99FFCC onMouseOver=View('99FFCC') onClick=Set('99FFCC') height="10px" width="10px"></td>
+<td bgcolor=#CC00CC onMouseOver=View('CC00CC') onClick=Set('CC00CC') height="10px" width="10px"></td>
+<td bgcolor=#CC33CC onMouseOver=View('CC33CC') onClick=Set('CC33CC') height="10px" width="10px"></td>
+<td bgcolor=#CC66CC onMouseOver=View('CC66CC') onClick=Set('CC66CC') height="10px" width="10px"></td>
+<td bgcolor=#CC99CC onMouseOver=View('CC99CC') onClick=Set('CC99CC') height="10px" width="10px"></td>
+<td bgcolor=#CCCCCC onMouseOver=View('CCCCCC') onClick=Set('CCCCCC') height="10px" width="10px"></td>
+<td bgcolor=#CCFFCC onMouseOver=View('CCFFCC') onClick=Set('CCFFCC') height="10px" width="10px"></td>
+<td bgcolor=#FF00CC onMouseOver=View('FF00CC') onClick=Set('FF00CC') height="10px" width="10px"></td>
+<td bgcolor=#FF33CC onMouseOver=View('FF33CC') onClick=Set('FF33CC') height="10px" width="10px"></td>
+<td bgcolor=#FF66CC onMouseOver=View('FF66CC') onClick=Set('FF66CC') height="10px" width="10px"></td>
+<td bgcolor=#FF99CC onMouseOver=View('FF99CC') onClick=Set('FF99CC') height="10px" width="10px"></td>
+<td bgcolor=#FFCCCC onMouseOver=View('FFCCCC') onClick=Set('FFCCCC') height="10px" width="10px"></td>
+<td bgcolor=#FFFFCC onMouseOver=View('FFFFCC') onClick=Set('FFFFCC') height="10px" width="10px"></td>
+</tr>
+<tr>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#FF00FF onMouseOver=View('FF00FF') onClick=Set('FF00FF') height="10px" width="10px"></td>
+<td bgcolor=#000000 onMouseOver=View('000000') onClick=Set('000000') height="10px" width="10px"></td>
+<td bgcolor=#9900FF onMouseOver=View('9900FF') onClick=Set('9900FF') height="10px" width="10px"></td>
+<td bgcolor=#9933FF onMouseOver=View('9933FF') onClick=Set('9933FF') height="10px" width="10px"></td>
+<td bgcolor=#9966FF onMouseOver=View('9966FF') onClick=Set('9966FF') height="10px" width="10px"></td>
+<td bgcolor=#9999FF onMouseOver=View('9999FF') onClick=Set('9999FF') height="10px" width="10px"></td>
+<td bgcolor=#99CCFF onMouseOver=View('99CCFF') onClick=Set('99CCFF') height="10px" width="10px"></td>
+<td bgcolor=#99FFFF onMouseOver=View('99FFFF') onClick=Set('99FFFF') height="10px" width="10px"></td>
+<td bgcolor=#CC00FF onMouseOver=View('CC00FF') onClick=Set('CC00FF') height="10px" width="10px"></td>
+<td bgcolor=#CC33FF onMouseOver=View('CC33FF') onClick=Set('CC33FF') height="10px" width="10px"></td>
+<td bgcolor=#CC66FF onMouseOver=View('CC66FF') onClick=Set('CC66FF') height="10px" width="10px"></td>
+<td bgcolor=#CC99FF onMouseOver=View('CC99FF') onClick=Set('CC99FF') height="10px" width="10px"></td>
+<td bgcolor=#CCCCFF onMouseOver=View('CCCCFF') onClick=Set('CCCCFF') height="10px" width="10px"></td>
+<td bgcolor=#CCFFFF onMouseOver=View('CCFFFF') onClick=Set('CCFFFF') height="10px" width="10px"></td>
+<td bgcolor=#FF00FF onMouseOver=View('FF00FF') onClick=Set('FF00FF') height="10px" width="10px"></td>
+<td bgcolor=#FF33FF onMouseOver=View('FF33FF') onClick=Set('FF33FF') height="10px" width="10px"></td>
+<td bgcolor=#FF66FF onMouseOver=View('FF66FF') onClick=Set('FF66FF') height="10px" width="10px"></td>
+<td bgcolor=#FF99FF onMouseOver=View('FF99FF') onClick=Set('FF99FF') height="10px" width="10px"></td>
+<td bgcolor=#FFCCFF onMouseOver=View('FFCCFF') onClick=Set('FFCCFF') height="10px" width="10px"></td>
+<td bgcolor=#FFFFFF onMouseOver=View('FFFFFF') onClick=Set('FFFFFF') height="10px" width="10px"></td>
+</tr>
+</table>
+
+</body></html>
Index: trunk/wb/modules/htmlarea/htmlarea/popups/old-fullscreen.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/old-fullscreen.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/old-fullscreen.html	(revision 317)
@@ -1,131 +1,131 @@
-<html>
-<head><title>Fullscreen Editor</title>
-<style type="text/css"> body {	margin: 0px; border: 0px; background-color: buttonface; } </style>
-
-<script>
-
-// if we pass the "window" object as a argument and then set opener to
-// equal that we can refer to dialogWindows and popupWindows the same way
-if (window.dialogArguments) { opener = window.dialogArguments; }
-
-var _editor_url = "../";
-document.write('<scr'+'ipt src="' +_editor_url+ 'editor.js" language="Javascript1.2"></scr'+'ipt>');
-
-var parent_objname = location.search.substring(1,location.search.length);  // parent editor objname
-var parent_config  = opener.document.all[parent_objname].config;
-
-var config         = cloneObject( parent_config );
-var objname        = 'editor'; // name of this editor
-
-//  DOMViewerObj = config;
-//  DOMViewerName = 'config';
-//  window.open('/innerHTML/domviewer.htm');  
-
-/* ---------------------------------------------------------------------- *\
-  Function    : 
-  Description : 
-\* ---------------------------------------------------------------------- */
-
-function _CloseOnEsc() {
-  if (event.keyCode == 27) {
-    update_parent();
-    window.close();
-    return;
-  }
-}
-
-/* ---------------------------------------------------------------------- *\
-  Function    : cloneObject
-  Description : copy an object by value instead of by reference
-  Usage       : var newObj = cloneObject(oldObj);
-\* ---------------------------------------------------------------------- */
-
-function cloneObject(obj) {
-  var newObj          = new Object; 
-
-  // check for array objects
-  if (obj.constructor.toString().indexOf('function Array(') == 1) {
-    newObj = obj.constructor();
-  }
-
-  for (var n in obj) {
-    var node = obj[n];
-    if (typeof node == 'object') { newObj[n] = cloneObject(node); }
-    else                         { newObj[n] = node; }
-  }
-  
-  return newObj;
-}
-
-/* ---------------------------------------------------------------------- *\
-  Function    : resize_editor
-  Description : resize the editor when the user resizes the popup
-\* ---------------------------------------------------------------------- */
-
-function resize_editor() {  // resize editor to fix window
-  var editor = document.all['_editor_editor'];
-
-  newWidth  = document.body.offsetWidth;
-  newHeight = document.body.offsetHeight - editor.offsetTop;
-
-  if (newWidth < 0) { newWidth = 0; }
-  if (newHeight < 0) { newHeight = 0; }
-
-  editor.style.width  = newWidth;
-  editor.style.height = newHeight;
-}
-
-/* ---------------------------------------------------------------------- *\
-  Function    : init
-  Description : run this code on page load
-\* ---------------------------------------------------------------------- */
-
-function init() {
-  // change maximize button to minimize button
-  config.btnList["popupeditor"] = ['popupeditor', 'Minimize Editor',  'update_parent(); window.close();', 'fullscreen_minimize.gif'];
-
-  // set htmlmode button to refer to THIS editor
-  config.btnList["htmlmode"]    = ['HtmlMode',    'View HTML Source', 'editor_setmode(\'editor\')',  'ed_html.gif'];
-
-  // change image url to be relative to current path
-  config.imgURL = "../images/";
-  
-  // generate editor and resize it
-  editor_generate('editor', config);
-  resize_editor();
-
-  // switch mode if needed
-  if (parent_config.mode == 'textedit') { editor_setmode(objname, 'textedit'); }
-
-  // set child window contents
-  var parentHTML = opener.editor_getHTML(parent_objname);
-  editor_setHTML(objname, parentHTML);
-
-  // continuously update parent editor window
-  window.setInterval(update_parent, 333);
-
-  // setup event handlers
-  document.body.onkeypress = _CloseOnEsc;
-  window.onresize = resize_editor;
-}
-
-/* ---------------------------------------------------------------------- *\
-  Function    : update_parent
-  Description : update parent window editor field with contents from child window
-\* ---------------------------------------------------------------------- */
-
-function update_parent() {
-  var childHTML = editor_getHTML(objname);
-  opener.editor_setHTML(parent_objname, childHTML);
-}
-
-
-</script>
-</head>
-<body scroll="no" onload="init()" onunload="update_parent()">
-
-<div style="margin: 0 0 0 0; border-width: 1; border-style: solid; border-color: threedshadow threedhighlight threedhighlight threedshadow; "></div>
-
-<textarea name="editor" style="width:100%; height:300px"></textarea><br>
-
+<html>
+<head><title>Fullscreen Editor</title>
+<style type="text/css"> body {	margin: 0px; border: 0px; background-color: buttonface; } </style>
+
+<script>
+
+// if we pass the "window" object as a argument and then set opener to
+// equal that we can refer to dialogWindows and popupWindows the same way
+if (window.dialogArguments) { opener = window.dialogArguments; }
+
+var _editor_url = "../";
+document.write('<scr'+'ipt src="' +_editor_url+ 'editor.js" language="Javascript1.2"></scr'+'ipt>');
+
+var parent_objname = location.search.substring(1,location.search.length);  // parent editor objname
+var parent_config  = opener.document.all[parent_objname].config;
+
+var config         = cloneObject( parent_config );
+var objname        = 'editor'; // name of this editor
+
+//  DOMViewerObj = config;
+//  DOMViewerName = 'config';
+//  window.open('/innerHTML/domviewer.htm');  
+
+/* ---------------------------------------------------------------------- *\
+  Function    : 
+  Description : 
+\* ---------------------------------------------------------------------- */
+
+function _CloseOnEsc() {
+  if (event.keyCode == 27) {
+    update_parent();
+    window.close();
+    return;
+  }
+}
+
+/* ---------------------------------------------------------------------- *\
+  Function    : cloneObject
+  Description : copy an object by value instead of by reference
+  Usage       : var newObj = cloneObject(oldObj);
+\* ---------------------------------------------------------------------- */
+
+function cloneObject(obj) {
+  var newObj          = new Object; 
+
+  // check for array objects
+  if (obj.constructor.toString().indexOf('function Array(') == 1) {
+    newObj = obj.constructor();
+  }
+
+  for (var n in obj) {
+    var node = obj[n];
+    if (typeof node == 'object') { newObj[n] = cloneObject(node); }
+    else                         { newObj[n] = node; }
+  }
+  
+  return newObj;
+}
+
+/* ---------------------------------------------------------------------- *\
+  Function    : resize_editor
+  Description : resize the editor when the user resizes the popup
+\* ---------------------------------------------------------------------- */
+
+function resize_editor() {  // resize editor to fix window
+  var editor = document.all['_editor_editor'];
+
+  newWidth  = document.body.offsetWidth;
+  newHeight = document.body.offsetHeight - editor.offsetTop;
+
+  if (newWidth < 0) { newWidth = 0; }
+  if (newHeight < 0) { newHeight = 0; }
+
+  editor.style.width  = newWidth;
+  editor.style.height = newHeight;
+}
+
+/* ---------------------------------------------------------------------- *\
+  Function    : init
+  Description : run this code on page load
+\* ---------------------------------------------------------------------- */
+
+function init() {
+  // change maximize button to minimize button
+  config.btnList["popupeditor"] = ['popupeditor', 'Minimize Editor',  'update_parent(); window.close();', 'fullscreen_minimize.gif'];
+
+  // set htmlmode button to refer to THIS editor
+  config.btnList["htmlmode"]    = ['HtmlMode',    'View HTML Source', 'editor_setmode(\'editor\')',  'ed_html.gif'];
+
+  // change image url to be relative to current path
+  config.imgURL = "../images/";
+  
+  // generate editor and resize it
+  editor_generate('editor', config);
+  resize_editor();
+
+  // switch mode if needed
+  if (parent_config.mode == 'textedit') { editor_setmode(objname, 'textedit'); }
+
+  // set child window contents
+  var parentHTML = opener.editor_getHTML(parent_objname);
+  editor_setHTML(objname, parentHTML);
+
+  // continuously update parent editor window
+  window.setInterval(update_parent, 333);
+
+  // setup event handlers
+  document.body.onkeypress = _CloseOnEsc;
+  window.onresize = resize_editor;
+}
+
+/* ---------------------------------------------------------------------- *\
+  Function    : update_parent
+  Description : update parent window editor field with contents from child window
+\* ---------------------------------------------------------------------- */
+
+function update_parent() {
+  var childHTML = editor_getHTML(objname);
+  opener.editor_setHTML(parent_objname, childHTML);
+}
+
+
+</script>
+</head>
+<body scroll="no" onload="init()" onunload="update_parent()">
+
+<div style="margin: 0 0 0 0; border-width: 1; border-style: solid; border-color: threedshadow threedhighlight threedhighlight threedshadow; "></div>
+
+<textarea name="editor" style="width:100%; height:300px"></textarea><br>
+
 </body></html>
\ No newline at end of file
Index: trunk/wb/modules/htmlarea/htmlarea/popups/blank.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/blank.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/blank.html	(revision 317)
@@ -1,2 +1,2 @@
-<html>
+<html>
 </html>
\ No newline at end of file
Index: trunk/wb/modules/htmlarea/htmlarea/popups/custom2.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/custom2.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/custom2.html	(revision 317)
@@ -1,35 +1,35 @@
-<html style="width:300px; Height: 60px;">
- <head>
-  <title>Select Phrase</title>
-<script language="javascript">
-
-var myTitle = window.dialogArguments;
-document.title = myTitle;
-
-
-function returnSelected() {
-  var idx  = document.all.textPulldown.selectedIndex;
-  var text = document.all.textPulldown[idx].text;
-
-  window.returnValue = text;          // set return value
-  window.close();                     // close dialog
-}
-
-</script>
-</head>
-<body bgcolor="#FFFFFF" topmargin=15 leftmargin=0>
-
-<form method=get onSubmit="Set(document.all.ColorHex.value); return false;">
-<div align=center>
-
-<select name="textPulldown">
-<option>The quick brown</option>
-<option>fox jumps over</option>
-<option>the lazy dog.</option>
-</select>
-
-<input type="button" value=" Go " onClick="returnSelected()">
-
-</div>
-</form>
+<html style="width:300px; Height: 60px;">
+ <head>
+  <title>Select Phrase</title>
+<script language="javascript">
+
+var myTitle = window.dialogArguments;
+document.title = myTitle;
+
+
+function returnSelected() {
+  var idx  = document.all.textPulldown.selectedIndex;
+  var text = document.all.textPulldown[idx].text;
+
+  window.returnValue = text;          // set return value
+  window.close();                     // close dialog
+}
+
+</script>
+</head>
+<body bgcolor="#FFFFFF" topmargin=15 leftmargin=0>
+
+<form method=get onSubmit="Set(document.all.ColorHex.value); return false;">
+<div align=center>
+
+<select name="textPulldown">
+<option>The quick brown</option>
+<option>fox jumps over</option>
+<option>the lazy dog.</option>
+</select>
+
+<input type="button" value=" Go " onClick="returnSelected()">
+
+</div>
+</form>
 </body></html>
\ No newline at end of file
Index: trunk/wb/modules/htmlarea/htmlarea/popups/editor_help.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/editor_help.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/editor_help.html	(revision 317)
@@ -1,16 +1,16 @@
-<html>
- <head>
-  <title>Editor Help</title>
-  <style>
-    body, td, p, div { font-family: arial; font-size: x-small; }
-  </style>
- </head>
-<body>
-
-<h2>Editor Help<hr></h2>
-
-Todo...
-
-
-</body>
+<html>
+ <head>
+  <title>Editor Help</title>
+  <style>
+    body, td, p, div { font-family: arial; font-size: x-small; }
+  </style>
+ </head>
+<body>
+
+<h2>Editor Help<hr></h2>
+
+Todo...
+
+
+</body>
 </html>
\ No newline at end of file
Index: trunk/wb/modules/htmlarea/htmlarea/popups/fullscreen.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/fullscreen.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/fullscreen.html	(revision 317)
@@ -1,133 +1,133 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html>
-  <head>
-    <title>Fullscreen HTMLArea</title>
-    <script type="text/javascript">
-      _editor_url = window.opener._editor_url;
-      _editor_lang = window.opener._editor_lang;
-      var BASE = window.opener.document.baseURI || window.opener.document.URL;
-      var head = document.getElementsByTagName("head")[0];
-      var base = document.createElement("base");
-      base.href = BASE;
-      head.appendChild(base);
-    </script>
-
-    <script type="text/javascript" src="../htmlarea.js"></script>
-
-    <script type="text/javascript">
-	// load HTMLArea scripts that are present in the opener frame
-	var scripts = window.opener.HTMLArea._scripts;
-	for (var i = 4; i < scripts.length; ++i) {
-           document.write("<scr" + "ipt type='text/javascript' src='" + scripts[i] + "'></scr" + "ipt>");
-        }
-    </script>
-
-    <!-- browser takes a coffee break here -->
-    <script type="text/javascript">
-var parent_object  = null;
-var editor	   = null;	// to be initialized later [ function init() ]
-
-/* ---------------------------------------------------------------------- *\
-   Function    : 
-   Description : 
-\* ---------------------------------------------------------------------- */
-
-function _CloseOnEsc(ev) {
-	ev || (ev = window.event);
-	if (ev.keyCode == 27) {
-		// update_parent();
-		window.close();
-		return;
-	}
-}
-
-/* ---------------------------------------------------------------------- *\
-   Function    : resize_editor
-   Description : resize the editor when the user resizes the popup
-\* ---------------------------------------------------------------------- */
-
-function resize_editor() {  // resize editor to fix window
-	var newHeight;
-	if (document.all) {
-		// IE
-		newHeight = document.body.offsetHeight - editor._toolbar.offsetHeight;
-		if (newHeight < 0) { newHeight = 0; }
-	} else {
-		// Gecko
-		newHeight = window.innerHeight - editor._toolbar.offsetHeight;
-	}
-	if (editor.config.statusBar) {
-		newHeight -= editor._statusBar.offsetHeight;
-	}
-	editor._textArea.style.height = editor._iframe.style.height = newHeight + "px";
-}
-
-/* ---------------------------------------------------------------------- *\
-   Function    : init
-   Description : run this code on page load
-\* ---------------------------------------------------------------------- */
-
-function init() {
-	parent_object	   = opener.HTMLArea._object;
-	var config	   = HTMLArea.cloneObject( parent_object.config );
-	config.width	   = "100%";
-	config.height	   = "auto";
-
-	// change maximize button to minimize button
-	config.btnList["popupeditor"] = [ 'Minimize Editor', _editor_url + 'images/fullscreen_minimize.gif', true,
-					  function() { window.close(); } ];
-
-	// generate editor and resize it
-	editor = new HTMLArea("editor", config);
-
-	// register the plugins, if any
-	for (var i in parent_object.plugins) {
-		var plugin = parent_object.plugins[i];
-		editor.registerPlugin2(plugin.name, plugin.args);
-	}
-	// and restore the original toolbar
-        config.toolbar = parent_object.config.toolbar;
-	editor.generate();
-	editor._iframe.style.width = "100%";
-	editor._textArea.style.width = "100%";
-	resize_editor();
-
-	editor.doctype = parent_object.doctype;
-
-	// set child window contents and event handlers, after a small delay
-	setTimeout(function() {
-			   editor.setHTML(parent_object.getInnerHTML());
-
-			   // switch mode if needed
-			   if (parent_object._mode == "textmode") { editor.setMode("textmode"); }
-
-			   // continuously update parent editor window
-			   setInterval(update_parent, 500);
-
-			   // setup event handlers
-			   document.body.onkeypress = _CloseOnEsc;
-			   editor._doc.body.onkeypress = _CloseOnEsc;
-			   editor._textArea.onkeypress = _CloseOnEsc;
-			   window.onresize = resize_editor;
-		   }, 333);			 // give it some time to meet the new frame
-}
-
-/* ---------------------------------------------------------------------- *\
-   Function    : update_parent
-   Description : update parent window editor field with contents from child window
-   \* ---------------------------------------------------------------------- */
-
-function update_parent() {
-	// use the fast version
-	parent_object.setHTML(editor.getInnerHTML());
-}
-
-    </script>
-    <style type="text/css"> html, body { height: 100%; margin: 0px; border: 0px; background-color: buttonface; } </style>
-  </head>
-  <body scroll="no" onload="setTimeout(function(){init();}, 500)" onunload="update_parent()">
-    <form style="margin: 0px; border: 1px solid; border-color: threedshadow threedhighlight threedhighlight threedshadow;">
-      <textarea name="editor" id="editor" style="width:100%; height:300px">&nbsp;</textarea>
-    </form>
-  </body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+  <head>
+    <title>Fullscreen HTMLArea</title>
+    <script type="text/javascript">
+      _editor_url = window.opener._editor_url;
+      _editor_lang = window.opener._editor_lang;
+      var BASE = window.opener.document.baseURI || window.opener.document.URL;
+      var head = document.getElementsByTagName("head")[0];
+      var base = document.createElement("base");
+      base.href = BASE;
+      head.appendChild(base);
+    </script>
+
+    <script type="text/javascript" src="../htmlarea.js"></script>
+
+    <script type="text/javascript">
+	// load HTMLArea scripts that are present in the opener frame
+	var scripts = window.opener.HTMLArea._scripts;
+	for (var i = 4; i < scripts.length; ++i) {
+           document.write("<scr" + "ipt type='text/javascript' src='" + scripts[i] + "'></scr" + "ipt>");
+        }
+    </script>
+
+    <!-- browser takes a coffee break here -->
+    <script type="text/javascript">
+var parent_object  = null;
+var editor	   = null;	// to be initialized later [ function init() ]
+
+/* ---------------------------------------------------------------------- *\
+   Function    : 
+   Description : 
+\* ---------------------------------------------------------------------- */
+
+function _CloseOnEsc(ev) {
+	ev || (ev = window.event);
+	if (ev.keyCode == 27) {
+		// update_parent();
+		window.close();
+		return;
+	}
+}
+
+/* ---------------------------------------------------------------------- *\
+   Function    : resize_editor
+   Description : resize the editor when the user resizes the popup
+\* ---------------------------------------------------------------------- */
+
+function resize_editor() {  // resize editor to fix window
+	var newHeight;
+	if (document.all) {
+		// IE
+		newHeight = document.body.offsetHeight - editor._toolbar.offsetHeight;
+		if (newHeight < 0) { newHeight = 0; }
+	} else {
+		// Gecko
+		newHeight = window.innerHeight - editor._toolbar.offsetHeight;
+	}
+	if (editor.config.statusBar) {
+		newHeight -= editor._statusBar.offsetHeight;
+	}
+	editor._textArea.style.height = editor._iframe.style.height = newHeight + "px";
+}
+
+/* ---------------------------------------------------------------------- *\
+   Function    : init
+   Description : run this code on page load
+\* ---------------------------------------------------------------------- */
+
+function init() {
+	parent_object	   = opener.HTMLArea._object;
+	var config	   = HTMLArea.cloneObject( parent_object.config );
+	config.width	   = "100%";
+	config.height	   = "auto";
+
+	// change maximize button to minimize button
+	config.btnList["popupeditor"] = [ 'Minimize Editor', _editor_url + 'images/fullscreen_minimize.gif', true,
+					  function() { window.close(); } ];
+
+	// generate editor and resize it
+	editor = new HTMLArea("editor", config);
+
+	// register the plugins, if any
+	for (var i in parent_object.plugins) {
+		var plugin = parent_object.plugins[i];
+		editor.registerPlugin2(plugin.name, plugin.args);
+	}
+	// and restore the original toolbar
+        config.toolbar = parent_object.config.toolbar;
+	editor.generate();
+	editor._iframe.style.width = "100%";
+	editor._textArea.style.width = "100%";
+	resize_editor();
+
+	editor.doctype = parent_object.doctype;
+
+	// set child window contents and event handlers, after a small delay
+	setTimeout(function() {
+			   editor.setHTML(parent_object.getInnerHTML());
+
+			   // switch mode if needed
+			   if (parent_object._mode == "textmode") { editor.setMode("textmode"); }
+
+			   // continuously update parent editor window
+			   setInterval(update_parent, 500);
+
+			   // setup event handlers
+			   document.body.onkeypress = _CloseOnEsc;
+			   editor._doc.body.onkeypress = _CloseOnEsc;
+			   editor._textArea.onkeypress = _CloseOnEsc;
+			   window.onresize = resize_editor;
+		   }, 333);			 // give it some time to meet the new frame
+}
+
+/* ---------------------------------------------------------------------- *\
+   Function    : update_parent
+   Description : update parent window editor field with contents from child window
+   \* ---------------------------------------------------------------------- */
+
+function update_parent() {
+	// use the fast version
+	parent_object.setHTML(editor.getInnerHTML());
+}
+
+    </script>
+    <style type="text/css"> html, body { height: 100%; margin: 0px; border: 0px; background-color: buttonface; } </style>
+  </head>
+  <body scroll="no" onload="setTimeout(function(){init();}, 500)" onunload="update_parent()">
+    <form style="margin: 0px; border: 1px solid; border-color: threedshadow threedhighlight threedhighlight threedshadow;">
+      <textarea name="editor" id="editor" style="width:100%; height:300px">&nbsp;</textarea>
+    </form>
+  </body>
+</html>
Index: trunk/wb/modules/htmlarea/htmlarea/popups/old_insert_image.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/old_insert_image.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/old_insert_image.html	(revision 317)
@@ -1,206 +1,206 @@
-<!-- based on insimage.dlg -->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
-<HTML  id=dlgImage STYLE="width: 432px; height: 194px; ">
-<HEAD>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta http-equiv="MSThemeCompatible" content="Yes">
-<TITLE>Insert Image</TITLE>
-<style>
-  html, body, button, div, input, select, fieldset { font-family: MS Shell Dlg; font-size: 8pt; position: absolute; };
-</style>
-<SCRIPT defer>
-
-function _CloseOnEsc() {
-  if (event.keyCode == 27) { window.close(); return; }
-}
-
-function _getTextRange(elm) {
-  var r = elm.parentTextEdit.createTextRange();
-  r.moveToElementText(elm);
-  return r;
-}
-
-window.onerror = HandleError
-
-function HandleError(message, url, line) {
-  var str = "An error has occurred in this dialog." + "\n\n"
-  + "Error: " + line + "\n" + message;
-  alert(str);
-  window.close();
-  return true;
-}
-
-function Init() {
-  var elmSelectedImage;
-  var htmlSelectionControl = "Control";
-  var globalDoc = window.dialogArguments;
-  var grngMaster = globalDoc.selection.createRange();
-  
-  // event handlers  
-  document.body.onkeypress = _CloseOnEsc;
-  btnOK.onclick = new Function("btnOKClick()");
-
-  txtFileName.fImageLoaded = false;
-  txtFileName.intImageWidth = 0;
-  txtFileName.intImageHeight = 0;
-
-  if (globalDoc.selection.type == htmlSelectionControl) {
-    if (grngMaster.length == 1) {
-      elmSelectedImage = grngMaster.item(0);
-      if (elmSelectedImage.tagName == "IMG") {
-        txtFileName.fImageLoaded = true;
-        if (elmSelectedImage.src) {
-          txtFileName.value          = elmSelectedImage.src.replace(/^[^*]*(\*\*\*)/, "$1");  // fix placeholder src values that editor converted to abs paths
-          txtFileName.intImageHeight = elmSelectedImage.height;
-          txtFileName.intImageWidth  = elmSelectedImage.width;
-          txtVertical.value          = elmSelectedImage.vspace;
-          txtHorizontal.value        = elmSelectedImage.hspace;
-          txtBorder.value            = elmSelectedImage.border;
-          txtAltText.value           = elmSelectedImage.alt;
-          selAlignment.value         = elmSelectedImage.align;
-        }
-      }
-    }
-  }
-  txtFileName.value = txtFileName.value || "http://";
-  txtFileName.focus();
-}
-
-function _isValidNumber(txtBox) {
-  var val = parseInt(txtBox);
-  if (isNaN(val) || val < 0 || val > 999) { return false; }
-  return true;
-}
-
-function btnOKClick() {
-  var elmImage;
-  var intAlignment;
-  var htmlSelectionControl = "Control";
-  var globalDoc = window.dialogArguments;
-  var grngMaster = globalDoc.selection.createRange();
-  
-  // error checking
-
-  if (!txtFileName.value || txtFileName.value == "http://") { 
-    alert("Image URL must be specified.");
-    txtFileName.focus();
-    return;
-  }
-  if (txtHorizontal.value && !_isValidNumber(txtHorizontal.value)) {
-    alert("Horizontal spacing must be a number between 0 and 999.");
-    txtHorizontal.focus();
-    return;
-  }
-  if (txtBorder.value && !_isValidNumber(txtBorder.value)) {
-    alert("Border thickness must be a number between 0 and 999.");
-    txtBorder.focus();
-    return;
-  }
-  if (txtVertical.value && !_isValidNumber(txtVertical.value)) {
-    alert("Vertical spacing must be a number between 0 and 999.");
-    txtVertical.focus();
-    return;
-  }
-
-  // delete selected content and replace with image
-  if (globalDoc.selection.type == htmlSelectionControl && !txtFileName.fImageLoaded) {
-    grngMaster.execCommand('Delete');
-    grngMaster = globalDoc.selection.createRange();
-  }
-    
-  idstr = "\" id=\"556e697175657e537472696e67";     // new image creation ID
-  if (!txtFileName.fImageLoaded) {
-    grngMaster.execCommand("InsertImage", false, idstr);
-    elmImage = globalDoc.all['556e697175657e537472696e67'];
-    elmImage.removeAttribute("id");
-    elmImage.removeAttribute("src");
-    grngMaster.moveStart("character", -1);
-  } else {
-    elmImage = grngMaster.item(0);
-    if (elmImage.src != txtFileName.value) {
-      grngMaster.execCommand('Delete');
-      grngMaster = globalDoc.selection.createRange();
-      grngMaster.execCommand("InsertImage", false, idstr);
-      elmImage = globalDoc.all['556e697175657e537472696e67'];
-      elmImage.removeAttribute("id");
-      elmImage.removeAttribute("src");
-      grngMaster.moveStart("character", -1);
-      txtFileName.fImageLoaded = false;
-    }
-    grngMaster = _getTextRange(elmImage);
-  }
-
-  if (txtFileName.fImageLoaded) {
-    elmImage.style.width = txtFileName.intImageWidth;
-    elmImage.style.height = txtFileName.intImageHeight;
-  }
-
-  if (txtFileName.value.length > 2040) {
-    txtFileName.value = txtFileName.value.substring(0,2040);
-  }
-  
-  elmImage.src = txtFileName.value;
-  
-  if (txtHorizontal.value != "") { elmImage.hspace = parseInt(txtHorizontal.value); }
-  else                           { elmImage.hspace = 0; }
-
-  if (txtVertical.value != "") { elmImage.vspace = parseInt(txtVertical.value); }
-  else                         { elmImage.vspace = 0; }
-  
-  elmImage.alt = txtAltText.value;
-
-  if (txtBorder.value != "") { elmImage.border = parseInt(txtBorder.value); }
-  else                       { elmImage.border = 0; }
-
-  elmImage.align = selAlignment.value;
-  grngMaster.collapse(false);
-  grngMaster.select();
-  window.close();
-}
-</SCRIPT>
-</HEAD>
-<BODY id=bdy onload="Init()" style="background: threedface; color: windowtext;" scroll=no>
-
-<DIV id=divFileName style="left: 0.98em; top: 1.2168em; width: 7em; height: 1.2168em; ">Image URL:</DIV>
-<INPUT ID=txtFileName type=text style="left: 8.54em; top: 1.0647em; width: 21.5em;height: 2.1294em; " tabIndex=10 onfocus="select()">
-
-<DIV id=divAltText style="left: 0.98em; top: 4.1067em; width: 6.58em; height: 1.2168em; ">Alternate Text:</DIV>
-<INPUT type=text ID=txtAltText tabIndex=15 style="left: 8.54em; top: 3.8025em; width: 21.5em; height: 2.1294em; " onfocus="select()">
-
-<FIELDSET id=fldLayout style="left: .9em; top: 7.1em; width: 17.08em; height: 7.6em;">
-<LEGEND id=lgdLayout>Layout</LEGEND>
-</FIELDSET>
-
-<FIELDSET id=fldSpacing style="left: 18.9em; top: 7.1em; width: 11em; height: 7.6em;">
-<LEGEND id=lgdSpacing>Spacing</LEGEND>
-</FIELDSET>
-
-<DIV id=divAlign style="left: 1.82em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Alignment:</DIV>
-<SELECT size=1 ID=selAlignment tabIndex=20 style="left: 10.36em; top: 8.8218em; width: 6.72em; height: 1.2168em; ">
-<OPTION id=optNotSet value=""> Not set </OPTION>
-<OPTION id=optLeft value=left> Left </OPTION>
-<OPTION id=optRight value=right> Right </OPTION>
-<OPTION id=optTexttop value=textTop> Texttop </OPTION>
-<OPTION id=optAbsMiddle value=absMiddle> Absmiddle </OPTION>
-<OPTION id=optBaseline value=baseline SELECTED> Baseline </OPTION>
-<OPTION id=optAbsBottom value=absBottom> Absbottom </OPTION>
-<OPTION id=optBottom value=bottom> Bottom </OPTION>
-<OPTION id=optMiddle value=middle> Middle </OPTION>
-<OPTION id=optTop value=top> Top </OPTION>
-</SELECT>
-
-<DIV id=divHoriz style="left: 19.88em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Horizontal:</DIV>
-<INPUT ID=txtHorizontal style="left: 24.92em; top: 8.8218em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=25 onfocus="select()">
-
-<DIV id=divBorder style="left: 1.82em; top: 12.0159em; width: 8.12em; height: 1.2168em; ">Border Thickness:</DIV>
-<INPUT ID=txtBorder style="left: 10.36em; top: 11.5596em; width: 6.72em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=21 onfocus="select()">
-
-<DIV id=divVert style="left: 19.88em; top: 12.0159em; width: 3.64em; height: 1.2168em; ">Vertical:</DIV>
-<INPUT ID=txtVertical style="left: 24.92em; top: 11.5596em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=30 onfocus="select()">
-
-<BUTTON ID=btnOK style="left: 31.36em; top: 1.0647em; width: 7em; height: 2.2em; " type=submit tabIndex=40>OK</BUTTON>
-<BUTTON ID=btnCancel style="left: 31.36em; top: 3.6504em; width: 7em; height: 2.2em; " type=reset tabIndex=45 onClick="window.close();">Cancel</BUTTON>
-
-</BODY>
+<!-- based on insimage.dlg -->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
+<HTML  id=dlgImage STYLE="width: 432px; height: 194px; ">
+<HEAD>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="MSThemeCompatible" content="Yes">
+<TITLE>Insert Image</TITLE>
+<style>
+  html, body, button, div, input, select, fieldset { font-family: MS Shell Dlg; font-size: 8pt; position: absolute; };
+</style>
+<SCRIPT defer>
+
+function _CloseOnEsc() {
+  if (event.keyCode == 27) { window.close(); return; }
+}
+
+function _getTextRange(elm) {
+  var r = elm.parentTextEdit.createTextRange();
+  r.moveToElementText(elm);
+  return r;
+}
+
+window.onerror = HandleError
+
+function HandleError(message, url, line) {
+  var str = "An error has occurred in this dialog." + "\n\n"
+  + "Error: " + line + "\n" + message;
+  alert(str);
+  window.close();
+  return true;
+}
+
+function Init() {
+  var elmSelectedImage;
+  var htmlSelectionControl = "Control";
+  var globalDoc = window.dialogArguments;
+  var grngMaster = globalDoc.selection.createRange();
+  
+  // event handlers  
+  document.body.onkeypress = _CloseOnEsc;
+  btnOK.onclick = new Function("btnOKClick()");
+
+  txtFileName.fImageLoaded = false;
+  txtFileName.intImageWidth = 0;
+  txtFileName.intImageHeight = 0;
+
+  if (globalDoc.selection.type == htmlSelectionControl) {
+    if (grngMaster.length == 1) {
+      elmSelectedImage = grngMaster.item(0);
+      if (elmSelectedImage.tagName == "IMG") {
+        txtFileName.fImageLoaded = true;
+        if (elmSelectedImage.src) {
+          txtFileName.value          = elmSelectedImage.src.replace(/^[^*]*(\*\*\*)/, "$1");  // fix placeholder src values that editor converted to abs paths
+          txtFileName.intImageHeight = elmSelectedImage.height;
+          txtFileName.intImageWidth  = elmSelectedImage.width;
+          txtVertical.value          = elmSelectedImage.vspace;
+          txtHorizontal.value        = elmSelectedImage.hspace;
+          txtBorder.value            = elmSelectedImage.border;
+          txtAltText.value           = elmSelectedImage.alt;
+          selAlignment.value         = elmSelectedImage.align;
+        }
+      }
+    }
+  }
+  txtFileName.value = txtFileName.value || "http://";
+  txtFileName.focus();
+}
+
+function _isValidNumber(txtBox) {
+  var val = parseInt(txtBox);
+  if (isNaN(val) || val < 0 || val > 999) { return false; }
+  return true;
+}
+
+function btnOKClick() {
+  var elmImage;
+  var intAlignment;
+  var htmlSelectionControl = "Control";
+  var globalDoc = window.dialogArguments;
+  var grngMaster = globalDoc.selection.createRange();
+  
+  // error checking
+
+  if (!txtFileName.value || txtFileName.value == "http://") { 
+    alert("Image URL must be specified.");
+    txtFileName.focus();
+    return;
+  }
+  if (txtHorizontal.value && !_isValidNumber(txtHorizontal.value)) {
+    alert("Horizontal spacing must be a number between 0 and 999.");
+    txtHorizontal.focus();
+    return;
+  }
+  if (txtBorder.value && !_isValidNumber(txtBorder.value)) {
+    alert("Border thickness must be a number between 0 and 999.");
+    txtBorder.focus();
+    return;
+  }
+  if (txtVertical.value && !_isValidNumber(txtVertical.value)) {
+    alert("Vertical spacing must be a number between 0 and 999.");
+    txtVertical.focus();
+    return;
+  }
+
+  // delete selected content and replace with image
+  if (globalDoc.selection.type == htmlSelectionControl && !txtFileName.fImageLoaded) {
+    grngMaster.execCommand('Delete');
+    grngMaster = globalDoc.selection.createRange();
+  }
+    
+  idstr = "\" id=\"556e697175657e537472696e67";     // new image creation ID
+  if (!txtFileName.fImageLoaded) {
+    grngMaster.execCommand("InsertImage", false, idstr);
+    elmImage = globalDoc.all['556e697175657e537472696e67'];
+    elmImage.removeAttribute("id");
+    elmImage.removeAttribute("src");
+    grngMaster.moveStart("character", -1);
+  } else {
+    elmImage = grngMaster.item(0);
+    if (elmImage.src != txtFileName.value) {
+      grngMaster.execCommand('Delete');
+      grngMaster = globalDoc.selection.createRange();
+      grngMaster.execCommand("InsertImage", false, idstr);
+      elmImage = globalDoc.all['556e697175657e537472696e67'];
+      elmImage.removeAttribute("id");
+      elmImage.removeAttribute("src");
+      grngMaster.moveStart("character", -1);
+      txtFileName.fImageLoaded = false;
+    }
+    grngMaster = _getTextRange(elmImage);
+  }
+
+  if (txtFileName.fImageLoaded) {
+    elmImage.style.width = txtFileName.intImageWidth;
+    elmImage.style.height = txtFileName.intImageHeight;
+  }
+
+  if (txtFileName.value.length > 2040) {
+    txtFileName.value = txtFileName.value.substring(0,2040);
+  }
+  
+  elmImage.src = txtFileName.value;
+  
+  if (txtHorizontal.value != "") { elmImage.hspace = parseInt(txtHorizontal.value); }
+  else                           { elmImage.hspace = 0; }
+
+  if (txtVertical.value != "") { elmImage.vspace = parseInt(txtVertical.value); }
+  else                         { elmImage.vspace = 0; }
+  
+  elmImage.alt = txtAltText.value;
+
+  if (txtBorder.value != "") { elmImage.border = parseInt(txtBorder.value); }
+  else                       { elmImage.border = 0; }
+
+  elmImage.align = selAlignment.value;
+  grngMaster.collapse(false);
+  grngMaster.select();
+  window.close();
+}
+</SCRIPT>
+</HEAD>
+<BODY id=bdy onload="Init()" style="background: threedface; color: windowtext;" scroll=no>
+
+<DIV id=divFileName style="left: 0.98em; top: 1.2168em; width: 7em; height: 1.2168em; ">Image URL:</DIV>
+<INPUT ID=txtFileName type=text style="left: 8.54em; top: 1.0647em; width: 21.5em;height: 2.1294em; " tabIndex=10 onfocus="select()">
+
+<DIV id=divAltText style="left: 0.98em; top: 4.1067em; width: 6.58em; height: 1.2168em; ">Alternate Text:</DIV>
+<INPUT type=text ID=txtAltText tabIndex=15 style="left: 8.54em; top: 3.8025em; width: 21.5em; height: 2.1294em; " onfocus="select()">
+
+<FIELDSET id=fldLayout style="left: .9em; top: 7.1em; width: 17.08em; height: 7.6em;">
+<LEGEND id=lgdLayout>Layout</LEGEND>
+</FIELDSET>
+
+<FIELDSET id=fldSpacing style="left: 18.9em; top: 7.1em; width: 11em; height: 7.6em;">
+<LEGEND id=lgdSpacing>Spacing</LEGEND>
+</FIELDSET>
+
+<DIV id=divAlign style="left: 1.82em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Alignment:</DIV>
+<SELECT size=1 ID=selAlignment tabIndex=20 style="left: 10.36em; top: 8.8218em; width: 6.72em; height: 1.2168em; ">
+<OPTION id=optNotSet value=""> Not set </OPTION>
+<OPTION id=optLeft value=left> Left </OPTION>
+<OPTION id=optRight value=right> Right </OPTION>
+<OPTION id=optTexttop value=textTop> Texttop </OPTION>
+<OPTION id=optAbsMiddle value=absMiddle> Absmiddle </OPTION>
+<OPTION id=optBaseline value=baseline SELECTED> Baseline </OPTION>
+<OPTION id=optAbsBottom value=absBottom> Absbottom </OPTION>
+<OPTION id=optBottom value=bottom> Bottom </OPTION>
+<OPTION id=optMiddle value=middle> Middle </OPTION>
+<OPTION id=optTop value=top> Top </OPTION>
+</SELECT>
+
+<DIV id=divHoriz style="left: 19.88em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Horizontal:</DIV>
+<INPUT ID=txtHorizontal style="left: 24.92em; top: 8.8218em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=25 onfocus="select()">
+
+<DIV id=divBorder style="left: 1.82em; top: 12.0159em; width: 8.12em; height: 1.2168em; ">Border Thickness:</DIV>
+<INPUT ID=txtBorder style="left: 10.36em; top: 11.5596em; width: 6.72em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=21 onfocus="select()">
+
+<DIV id=divVert style="left: 19.88em; top: 12.0159em; width: 3.64em; height: 1.2168em; ">Vertical:</DIV>
+<INPUT ID=txtVertical style="left: 24.92em; top: 11.5596em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=30 onfocus="select()">
+
+<BUTTON ID=btnOK style="left: 31.36em; top: 1.0647em; width: 7em; height: 2.2em; " type=submit tabIndex=40>OK</BUTTON>
+<BUTTON ID=btnCancel style="left: 31.36em; top: 3.6504em; width: 7em; height: 2.2em; " type=reset tabIndex=45 onClick="window.close();">Cancel</BUTTON>
+
+</BODY>
 </HTML>
\ No newline at end of file
Index: trunk/wb/modules/htmlarea/htmlarea/popups/insert_image.html
===================================================================
--- trunk/wb/modules/htmlarea/htmlarea/popups/insert_image.html	(revision 316)
+++ trunk/wb/modules/htmlarea/htmlarea/popups/insert_image.html	(revision 317)
@@ -1,106 +1,106 @@
 <!-- BEGIN main_block -->
-<html>
-
-<head>
-  <title>Insert Image</title>
-
-<script type="text/javascript" src="popup.js"></script>
-
-<script type="text/javascript">
-
-window.resizeTo(700, 100);
-
-function Init() {
-  __dlg_init();
-  var param = window.dialogArguments;
-  if (param) {
-      document.getElementById("f_url").value = param["f_url"];
-      document.getElementById("f_alt").value = param["f_alt"];
-      document.getElementById("f_border").value = param["f_border"];
-      document.getElementById("f_align").value = param["f_align"];
-      document.getElementById("f_vert").value = param["f_vert"];
-      document.getElementById("f_horiz").value = param["f_horiz"];
-      window.ipreview.location.replace(param.f_url);
-  }
-  document.getElementById("f_url").focus();
-};
-
-function onOK() {
-  var required = {
-    "f_url": "You must enter the URL"
-  };
-  for (var i in required) {
-    var el = document.getElementById(i);
-    if (!el.value) {
-      alert(required[i]);
-      el.focus();
-      return false;
-    }
-  }
-  // pass data back to the calling window
-  var fields = ["f_url", "f_alt", "f_align", "f_border",
-                "f_horiz", "f_vert"];
-  var param = new Object();
-  for (var i in fields) {
-    var id = fields[i];
-    var el = document.getElementById(id);
-    param[id] = el.value;
-  }
-  __dlg_close(param);
-  return false;
-};
-
-function onCancel() {
-  __dlg_close(null);
-  return false;
-};
-
-function onPreview() {
-  var f_url = document.getElementById("f_url");
-  var url = f_url.value;
-  if (!url) {
-    alert("You have to enter an URL first");
-    f_url.focus();
-    return false;
-  }
-  window.ipreview.location.replace(url);
-  return false;
-};
-</script>
-
-<style type="text/css">
-html, body {
-  background: #EEEEEE;
-  color: #000000;
-  font: 11px Tahoma,Verdana,sans-serif;
-  margin: 0px;
-  padding: 0px;
-}
-body { padding: 0px; }
-table {
-  font: 11px Tahoma,Verdana,sans-serif;
-}
-form p {
-  margin-top: 5px;
-  margin-bottom: 5px;
-}
-.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
-.fr { width: 6em; float: left; padding: 2px 5px; text-align: right; }
-fieldset { padding: 0px 10px 5px 5px; }
-select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
-button { width: 70px; }
-.space { padding: 2px; }
-
-.title { background: #336699; color: #FFFFFF; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
- letter-spacing: 2px;
-}
-form { padding: 0px; margin: 0px; }
-</style>
-
-</head>
-
-<body onload="Init()">
+<html>
 
+<head>
+  <title>Insert Image</title>
+
+<script type="text/javascript" src="popup.js"></script>
+
+<script type="text/javascript">
+
+window.resizeTo(700, 100);
+
+function Init() {
+  __dlg_init();
+  var param = window.dialogArguments;
+  if (param) {
+      document.getElementById("f_url").value = param["f_url"];
+      document.getElementById("f_alt").value = param["f_alt"];
+      document.getElementById("f_border").value = param["f_border"];
+      document.getElementById("f_align").value = param["f_align"];
+      document.getElementById("f_vert").value = param["f_vert"];
+      document.getElementById("f_horiz").value = param["f_horiz"];
+      window.ipreview.location.replace(param.f_url);
+  }
+  document.getElementById("f_url").focus();
+};
+
+function onOK() {
+  var required = {
+    "f_url": "You must enter the URL"
+  };
+  for (var i in required) {
+    var el = document.getElementById(i);
+    if (!el.value) {
+      alert(required[i]);
+      el.focus();
+      return false;
+    }
+  }
+  // pass data back to the calling window
+  var fields = ["f_url", "f_alt", "f_align", "f_border",
+                "f_horiz", "f_vert"];
+  var param = new Object();
+  for (var i in fields) {
+    var id = fields[i];
+    var el = document.getElementById(id);
+    param[id] = el.value;
+  }
+  __dlg_close(param);
+  return false;
+};
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+};
+
+function onPreview() {
+  var f_url = document.getElementById("f_url");
+  var url = f_url.value;
+  if (!url) {
+    alert("You have to enter an URL first");
+    f_url.focus();
+    return false;
+  }
+  window.ipreview.location.replace(url);
+  return false;
+};
+</script>
+
+<style type="text/css">
+html, body {
+  background: #EEEEEE;
+  color: #000000;
+  font: 11px Tahoma,Verdana,sans-serif;
+  margin: 0px;
+  padding: 0px;
+}
+body { padding: 0px; }
+table {
+  font: 11px Tahoma,Verdana,sans-serif;
+}
+form p {
+  margin-top: 5px;
+  margin-bottom: 5px;
+}
+.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
+.fr { width: 6em; float: left; padding: 2px 5px; text-align: right; }
+fieldset { padding: 0px 10px 5px 5px; }
+select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
+button { width: 70px; }
+.space { padding: 2px; }
+
+.title { background: #336699; color: #FFFFFF; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
+ letter-spacing: 2px;
+}
+form { padding: 0px; margin: 0px; }
+</style>
+
+</head>
+
+<body onload="Init()">
+
 <table cellpadding="0" cellspacing="0" border="0" width="100%">
 <tr>
 	<td style="background-color: #003366;" width="5">&nbsp;&nbsp;</td>
@@ -143,93 +143,93 @@
 	<td style="background-color: #003366;" width="5">&nbsp;&nbsp;</td>
 	<td style="background-color: #336699;" width="5">&nbsp;&nbsp;</td>
 	<td width="420" valign="top">
-
-		<div class="title">Insert Image</div>
-		<!--- new stuff --->
-		<form name="insert_image" action="" method="get" style="padding: 5px;">
-		<table border="0" width="100%" style="padding: 0px; margin: 0px">
-		  <tbody>
-		
-		  <tr>
-		    <td style="width: 7em; text-align: right">Image URL:</td>
-		    <td><input type="text" name="url" id="f_url" style="width:74%"
-		      title="Enter the image URL here" />
-		      <button name="preview" onclick="return onPreview();"
-		      title="Preview the image in a new window">Preview</button>
-		    </td>
-		  </tr>
-		  <tr>
-		    <td style="width: 80px; text-align: right">Alternate text:</td>
-		    <td><input type="text" name="alt" id="f_alt" style="width:74%"
-		      title="For browsers that don't support images" /></td>
-		  </tr>
-		
-		  </tbody>
-		</table>
-		
-		<p />
-		
-		<fieldset style="float: left; margin-left: 5px;">
-		<legend>Layout</legend>
-		
-		<div class="space"></div>
-		
-		<div class="fl">Alignment:</div>
-		<select size="1" name="align" id="f_align"
-		  title="Positioning of this image">
-		  <option value=""                             >Not set</option>
-		  <option value="left"                         >Left</option>
-		  <option value="right"                        >Right</option>
-		  <option value="texttop"                      >Texttop</option>
-		  <option value="absmiddle"                    >Absmiddle</option>
-		  <option value="baseline" selected="1"        >Baseline</option>
-		  <option value="absbottom"                    >Absbottom</option>
-		  <option value="bottom"                       >Bottom</option>
-		  <option value="middle"                       >Middle</option>
-		  <option value="top"                          >Top</option>
-		</select>
-		
-		<p />
-		
-		<div class="fl">Border thickness:</div>
-		<input type="text" name="border" id="f_border" size="5"
-		title="Leave empty for no border" />
-		
-		<div class="space"></div>
-		
-		</fieldset>
-		
-		<fieldset style="float:right; margin-right: 5px;">
-		<legend>Spacing</legend>
-		
-		<div class="space"></div>
-		
-		<div class="fr">Horizontal:</div>
-		<input type="text" name="horiz" id="f_horiz" size="5"
-		title="Horizontal padding" />
-		
-		<p />
-		
-		<div class="fr">Vertical:</div>
-		<input type="text" name="vert" id="f_vert" size="5"
-		title="Vertical padding" />
-		
-		<div class="space"></div>
-		
-		</fieldset>
-		<br clear="all" />
-		<table width="100%" style="margin-bottom: 0.2em">
-		 <tr>
-		  <td valign="bottom">
-		    Image Preview:<br />
-		    <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="300" src=""></iframe>
-		  </td>
-		  <td valign="bottom" style="text-align: left; padding-right: 5px;">
-		    <button type="button" name="ok" onclick="return onOK();">OK</button><br>
-		    <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
-		  </td>
-		 </tr>
-		</table>
+
+		<div class="title">Insert Image</div>
+		<!--- new stuff --->
+		<form name="insert_image" action="" method="get" style="padding: 5px;">
+		<table border="0" width="100%" style="padding: 0px; margin: 0px">
+		  <tbody>
+		
+		  <tr>
+		    <td style="width: 7em; text-align: right">Image URL:</td>
+		    <td><input type="text" name="url" id="f_url" style="width:74%"
+		      title="Enter the image URL here" />
+		      <button name="preview" onclick="return onPreview();"
+		      title="Preview the image in a new window">Preview</button>
+		    </td>
+		  </tr>
+		  <tr>
+		    <td style="width: 80px; text-align: right">Alternate text:</td>
+		    <td><input type="text" name="alt" id="f_alt" style="width:74%"
+		      title="For browsers that don't support images" /></td>
+		  </tr>
+		
+		  </tbody>
+		</table>
+		
+		<p />
+		
+		<fieldset style="float: left; margin-left: 5px;">
+		<legend>Layout</legend>
+		
+		<div class="space"></div>
+		
+		<div class="fl">Alignment:</div>
+		<select size="1" name="align" id="f_align"
+		  title="Positioning of this image">
+		  <option value=""                             >Not set</option>
+		  <option value="left"                         >Left</option>
+		  <option value="right"                        >Right</option>
+		  <option value="texttop"                      >Texttop</option>
+		  <option value="absmiddle"                    >Absmiddle</option>
+		  <option value="baseline" selected="1"        >Baseline</option>
+		  <option value="absbottom"                    >Absbottom</option>
+		  <option value="bottom"                       >Bottom</option>
+		  <option value="middle"                       >Middle</option>
+		  <option value="top"                          >Top</option>
+		</select>
+		
+		<p />
+		
+		<div class="fl">Border thickness:</div>
+		<input type="text" name="border" id="f_border" size="5"
+		title="Leave empty for no border" />
+		
+		<div class="space"></div>
+		
+		</fieldset>
+		
+		<fieldset style="float:right; margin-right: 5px;">
+		<legend>Spacing</legend>
+		
+		<div class="space"></div>
+		
+		<div class="fr">Horizontal:</div>
+		<input type="text" name="horiz" id="f_horiz" size="5"
+		title="Horizontal padding" />
+		
+		<p />
+		
+		<div class="fr">Vertical:</div>
+		<input type="text" name="vert" id="f_vert" size="5"
+		title="Vertical padding" />
+		
+		<div class="space"></div>
+		
+		</fieldset>
+		<br clear="all" />
+		<table width="100%" style="margin-bottom: 0.2em">
+		 <tr>
+		  <td valign="bottom">
+		    Image Preview:<br />
+		    <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="300" src=""></iframe>
+		  </td>
+		  <td valign="bottom" style="text-align: left; padding-right: 5px;">
+		    <button type="button" name="ok" onclick="return onOK();">OK</button><br>
+		    <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
+		  </td>
+		 </tr>
+		</table>
 		</form>
 
 	</td>
@@ -240,7 +240,7 @@
 	<td colspan="3" style="background-color: #336699;"></td>
 </tr>
 </table>
-
-</body>
-</html>
+
+</body>
+</html>
 <!-- END main_block -->
\ No newline at end of file
Index: trunk/wb/framework/class.wb.php
===================================================================
--- trunk/wb/framework/class.wb.php	(revision 316)
+++ trunk/wb/framework/class.wb.php	(revision 317)
@@ -1,262 +1,262 @@
-<?php
-
-// $Id$
-
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2006, Ryan Djurovich
-
- Website Baker 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.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-*/
-
-/*
-
-wb class
-
-This class is the basis for admin and frontend classes.
-
-*/
-
-// Include PHPLIB template class
-require_once(WB_PATH."/include/phplib/template.inc");
-
-require_once(WB_PATH.'/framework/class.database.php');
-
-class wb
-{
-	// General initialization function 
-	// performed when frontend or backend is loaded.
-	function wb() {
-	}
-
-	// Check whether we should show a page or not (for front-end)
-	function show_page($page) {
-		// First check if the page is set to private
-		if($page['visibility'] == 'private' OR $page['visibility'] == 'registered') {
-			// Check if the user is logged in
-			if($this->is_authenticated() == true) {
-				// Now check if the user has perms to view it
-				$viewing_groups = explode(',', $page['viewing_groups']);
-				$viewing_users = explode(',', $page['viewing_users']);
-				if(is_numeric(array_search($this->get_group_id(), $viewing_groups)) OR is_numeric(array_search($this->get_user_id(), $viewing_users))) {
-					return true;
-				} else {
-					return false;
-				}
-			} else {
-				return false;
-			}
-		} elseif($page['visibility'] == 'public') {
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	// Check if the user is already authenticated or not
-	function is_authenticated() {
-		if(isset($_SESSION['USER_ID']) AND $_SESSION['USER_ID'] != "" AND is_numeric($_SESSION['USER_ID'])) {
-			return true;
-		} else {
-			return false;
-		}
-	}
-	// Modified addslashes function which takes into account magic_quotes
-	function add_slashes($input) {
-		if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) {
-			return $input;
-		}
-		$output = addslashes($input);
-		return $output;
-	}
-
-	// Ditto for stripslashes
-	function strip_slashes($input) {
-		if ( !get_magic_quotes_gpc() || ( !is_string($input) ) ) {
-			return $input;
-		}
-		$output = stripslashes($input);
-		return $output;
-	}
-
-	// Escape backslashes for use with mySQL LIKE strings
-	function escape_backslashes($input) {
-		return str_replace("\\","\\\\",$input);
-	}
-
-	function page_link($link){
-		// Check for :// in the link (used in URL's) as well as mailto:
-		if(strstr($link, '://') == '' AND substr($link, 0, 7) != 'mailto:') {
-			return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
-		} else {
-			return $link;
-		}
-	}
-	
-	// Get POST data
-	function get_post($field) {
-		if(isset($_POST[$field])) {
-			return $_POST[$field];
-		} else {
-			return null;
-		}
-	}
-
-	// Get GET data
-	function get_get($field) {
-		if(isset($_GET[$field])) {
-			return $_GET[$field];
-		} else {
-			return null;
-		}
-	}
-
-	// Get SESSION data
-	function get_session($field) {
-		if(isset($_SESSION[$field])) {
-			return $_SESSION[$field];
-		} else {
-			return null;
-		}
-	}
-
-	// Get SERVER data
-	function get_server($field) {
-		if(isset($_SERVER[$field])) {
-			return $_SERVER[$field];
-		} else {
-			return null;
-		}
-	}
-
-	// Get the current users id
-	function get_user_id() {
-		return $_SESSION['USER_ID'];
-	}
-
-	// Get the current users group id
-	function get_group_id() {
-		return $_SESSION['GROUP_ID'];
-	}
-
-	// Get the current users group name
-	function get_group_name() {
-		return $_SESSION['GROUP_NAME'];
-	}
-
-	// Get the current users username
-	function get_username() {
-		return $_SESSION['USERNAME'];
-	}
-
-	// Get the current users display name
-	function get_display_name() {
-		return ($_SESSION['DISPLAY_NAME']);
-	}
-
-	// Get the current users email address
-	function get_email() {
-		return $_SESSION['EMAIL'];
-	}
-
-	// Get the current users home folder
-	function get_home_folder() {
-		return $_SESSION['HOME_FOLDER'];
-	}
-
-	// Get the current users timezone
-	function get_timezone() {
-		if(!isset($_SESSION['USE_DEFAULT_TIMEZONE'])) {
-			return $_SESSION['TIMEZONE'];
-		} else {
-			return '-72000';
-		}
-	}
-
-	// Validate supplied email address
-	function validate_email($email) {
-		if(eregi("^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$", $email)) {
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	// Print a success message which then automatically redirects the user to another page
-	function print_success($message, $redirect = 'index.php') {
-		global $TEXT;
-		$success_template = new Template(ADMIN_PATH.'/interface');
-		$success_template->set_file('page', 'success.html');
-		$success_template->set_block('page', 'main_block', 'main');
-		$success_template->set_var('MESSAGE', $message);
-		$success_template->set_var('REDIRECT', $redirect);
-		$success_template->set_var('NEXT', $TEXT['NEXT']);
-		$success_template->parse('main', 'main_block', false);
-		$success_template->pparse('output', 'page');
-	}
-	
-	// Print an error message
-	function print_error($message, $link = 'index.php', $auto_footer = true) {
-		global $TEXT;
-		$success_template = new Template(ADMIN_PATH.'/interface');
-		$success_template->set_file('page', 'error.html');
-		$success_template->set_block('page', 'main_block', 'main');
-		$success_template->set_var('MESSAGE', $message);
-		$success_template->set_var('LINK', $link);
-		$success_template->set_var('BACK', $TEXT['BACK']);
-		$success_template->parse('main', 'main_block', false);
-		$success_template->pparse('output', 'page');
-		if($auto_footer == true) {
-			$this->print_footer();
-		}
-		exit();
-	}
-	// Validate send email
-	function mail($fromaddress, $toaddress, $subject, $message) {
-		$fromaddress = preg_replace('/[\r\n]/', '', $fromaddress);
-		$toaddress = preg_replace('/[\r\n]/', '', $toaddress);
-		$subject = preg_replace('/[\r\n]/', '', $subject);
-		if ($fromaddress=='') {
-			$fromaddress = SERVER_EMAIL;
-		}
-		if(defined('DEFAULT_CHARSET')) { 
-			$charset = DEFAULT_CHARSET; 
-		} else {
-			$charset='utf-8';
-		}
-		$headers  = "MIME-Version: 1.0\n";
-		$headers .= "Content-type: text/plain; charset=".$charset."\n";
-		$headers .= "X-Priority: 3\n";
-		$headers .= "X-MSMail-Priority: Normal\n";
-		$headers .= "X-Mailer: Website Baker\n";
-		$headers .= "From: ".$fromaddress."\n";
-		$headers .= "Return-Path: ".$fromaddress."\n";
-		$headers .= "Reply-To: ".$fromaddress."\n";
-		$headers .= "\n"; // extra empty line needed??
-		if (OPERATING_SYSTEM=='windows') {
-			str_replace("\n","\r\n",$headers);
-			str_replace("\n","\r\n",$message);
-		}	
-		if(mail($toaddress, $subject, $message, $headers, "-f $fromaddress")) {
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-}
+<?php
+
+// $Id$
+
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2006, Ryan Djurovich
+
+ Website Baker 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.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+*/
+
+/*
+
+wb class
+
+This class is the basis for admin and frontend classes.
+
+*/
+
+// Include PHPLIB template class
+require_once(WB_PATH."/include/phplib/template.inc");
+
+require_once(WB_PATH.'/framework/class.database.php');
+
+class wb
+{
+	// General initialization function 
+	// performed when frontend or backend is loaded.
+	function wb() {
+	}
+
+	// Check whether we should show a page or not (for front-end)
+	function show_page($page) {
+		// First check if the page is set to private
+		if($page['visibility'] == 'private' OR $page['visibility'] == 'registered') {
+			// Check if the user is logged in
+			if($this->is_authenticated() == true) {
+				// Now check if the user has perms to view it
+				$viewing_groups = explode(',', $page['viewing_groups']);
+				$viewing_users = explode(',', $page['viewing_users']);
+				if(is_numeric(array_search($this->get_group_id(), $viewing_groups)) OR is_numeric(array_search($this->get_user_id(), $viewing_users))) {
+					return true;
+				} else {
+					return false;
+				}
+			} else {
+				return false;
+			}
+		} elseif($page['visibility'] == 'public') {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	// Check if the user is already authenticated or not
+	function is_authenticated() {
+		if(isset($_SESSION['USER_ID']) AND $_SESSION['USER_ID'] != "" AND is_numeric($_SESSION['USER_ID'])) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+	// Modified addslashes function which takes into account magic_quotes
+	function add_slashes($input) {
+		if ( get_magic_quotes_gpc() || ( !is_string($input) ) ) {
+			return $input;
+		}
+		$output = addslashes($input);
+		return $output;
+	}
+
+	// Ditto for stripslashes
+	function strip_slashes($input) {
+		if ( !get_magic_quotes_gpc() || ( !is_string($input) ) ) {
+			return $input;
+		}
+		$output = stripslashes($input);
+		return $output;
+	}
+
+	// Escape backslashes for use with mySQL LIKE strings
+	function escape_backslashes($input) {
+		return str_replace("\\","\\\\",$input);
+	}
+
+	function page_link($link){
+		// Check for :// in the link (used in URL's) as well as mailto:
+		if(strstr($link, '://') == '' AND substr($link, 0, 7) != 'mailto:') {
+			return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;
+		} else {
+			return $link;
+		}
+	}
+	
+	// Get POST data
+	function get_post($field) {
+		if(isset($_POST[$field])) {
+			return $_POST[$field];
+		} else {
+			return null;
+		}
+	}
+
+	// Get GET data
+	function get_get($field) {
+		if(isset($_GET[$field])) {
+			return $_GET[$field];
+		} else {
+			return null;
+		}
+	}
+
+	// Get SESSION data
+	function get_session($field) {
+		if(isset($_SESSION[$field])) {
+			return $_SESSION[$field];
+		} else {
+			return null;
+		}
+	}
+
+	// Get SERVER data
+	function get_server($field) {
+		if(isset($_SERVER[$field])) {
+			return $_SERVER[$field];
+		} else {
+			return null;
+		}
+	}
+
+	// Get the current users id
+	function get_user_id() {
+		return $_SESSION['USER_ID'];
+	}
+
+	// Get the current users group id
+	function get_group_id() {
+		return $_SESSION['GROUP_ID'];
+	}
+
+	// Get the current users group name
+	function get_group_name() {
+		return $_SESSION['GROUP_NAME'];
+	}
+
+	// Get the current users username
+	function get_username() {
+		return $_SESSION['USERNAME'];
+	}
+
+	// Get the current users display name
+	function get_display_name() {
+		return ($_SESSION['DISPLAY_NAME']);
+	}
+
+	// Get the current users email address
+	function get_email() {
+		return $_SESSION['EMAIL'];
+	}
+
+	// Get the current users home folder
+	function get_home_folder() {
+		return $_SESSION['HOME_FOLDER'];
+	}
+
+	// Get the current users timezone
+	function get_timezone() {
+		if(!isset($_SESSION['USE_DEFAULT_TIMEZONE'])) {
+			return $_SESSION['TIMEZONE'];
+		} else {
+			return '-72000';
+		}
+	}
+
+	// Validate supplied email address
+	function validate_email($email) {
+		if(eregi("^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$", $email)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	// Print a success message which then automatically redirects the user to another page
+	function print_success($message, $redirect = 'index.php') {
+		global $TEXT;
+		$success_template = new Template(ADMIN_PATH.'/interface');
+		$success_template->set_file('page', 'success.html');
+		$success_template->set_block('page', 'main_block', 'main');
+		$success_template->set_var('MESSAGE', $message);
+		$success_template->set_var('REDIRECT', $redirect);
+		$success_template->set_var('NEXT', $TEXT['NEXT']);
+		$success_template->parse('main', 'main_block', false);
+		$success_template->pparse('output', 'page');
+	}
+	
+	// Print an error message
+	function print_error($message, $link = 'index.php', $auto_footer = true) {
+		global $TEXT;
+		$success_template = new Template(ADMIN_PATH.'/interface');
+		$success_template->set_file('page', 'error.html');
+		$success_template->set_block('page', 'main_block', 'main');
+		$success_template->set_var('MESSAGE', $message);
+		$success_template->set_var('LINK', $link);
+		$success_template->set_var('BACK', $TEXT['BACK']);
+		$success_template->parse('main', 'main_block', false);
+		$success_template->pparse('output', 'page');
+		if($auto_footer == true) {
+			$this->print_footer();
+		}
+		exit();
+	}
+	// Validate send email
+	function mail($fromaddress, $toaddress, $subject, $message) {
+		$fromaddress = preg_replace('/[\r\n]/', '', $fromaddress);
+		$toaddress = preg_replace('/[\r\n]/', '', $toaddress);
+		$subject = preg_replace('/[\r\n]/', '', $subject);
+		if ($fromaddress=='') {
+			$fromaddress = SERVER_EMAIL;
+		}
+		if(defined('DEFAULT_CHARSET')) { 
+			$charset = DEFAULT_CHARSET; 
+		} else {
+			$charset='utf-8';
+		}
+		$headers  = "MIME-Version: 1.0\n";
+		$headers .= "Content-type: text/plain; charset=".$charset."\n";
+		$headers .= "X-Priority: 3\n";
+		$headers .= "X-MSMail-Priority: Normal\n";
+		$headers .= "X-Mailer: Website Baker\n";
+		$headers .= "From: ".$fromaddress."\n";
+		$headers .= "Return-Path: ".$fromaddress."\n";
+		$headers .= "Reply-To: ".$fromaddress."\n";
+		$headers .= "\n"; // extra empty line needed??
+		if (OPERATING_SYSTEM=='windows') {
+			str_replace("\n","\r\n",$headers);
+			str_replace("\n","\r\n",$message);
+		}	
+		if(mail($toaddress, $subject, $message, $headers, "-f $fromaddress")) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+}
 ?>
\ No newline at end of file
Index: trunk/wb/framework/convert.php
===================================================================
--- trunk/wb/framework/convert.php	(revision 316)
+++ trunk/wb/framework/convert.php	(revision 317)
@@ -2,25 +2,25 @@
 
 // $Id$
 
-/*
-
- Website Baker Project <http://www.websitebaker.org/>
- Copyright (C) 2004-2006, Ryan Djurovich
-
- Website Baker 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.
-
- Website Baker is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Website Baker; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+/*
+
+ Website Baker Project <http://www.websitebaker.org/>
+ Copyright (C) 2004-2006, Ryan Djurovich
+
+ Website Baker 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.
+
+ Website Baker is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Website Baker; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 */
 
 /*
Index: trunk/README
===================================================================
--- trunk/README	(revision 316)
+++ trunk/README	(revision 317)
@@ -1,46 +1,46 @@
-General Information
-===================
+General Information
+===================
 Website Baker is a PHP-based content management system
 which enables users to produce websites with ease.
 Features include a template-based front-end, modulated
 and multi-level page support, multi-user administration,
-and much much more!
+and much much more!
 
-
-License
-=======
+
+License
+=======
 Website Baker is released under the GNU General Public License,
-Copyright (C) 2004-2006 Ryan Djurovich.
-Please refer to the COPYING file for a copy of the license.
+Copyright (C) 2004-2006 Ryan Djurovich.
+Please refer to the COPYING file for a copy of the license.
 
-
-Installation
-============
-Please refer to the INSTALL file for instructions on installation.
 
+Installation
+============
+Please refer to the INSTALL file for instructions on installation.
 
+
 Usage
 =====
 Before using Website Baker please note: you must not remove/change any
-copyright notices in the any code contained in this package.
-Also, it is appreciated if you leave a link somewhere on your website,
+copyright notices in the any code contained in this package.
+Also, it is appreciated if you leave a link somewhere on your website,
 which links to the Website Baker website. (http://www.websitebaker.org/) 
 
 
 Support
 =======
-For information about finding help:
+For information about finding help:
 http://www.websitebaker.org/2/help
-
-
-Bugs
-====
-To submit a bug:
-http://www.websitebaker.org/2/bugs
-
-
-Contribute
-==========
-For information about how to contribute (donating, etc):
+
+
+Bugs
+====
+To submit a bug:
+http://www.websitebaker.org/2/bugs
+
+
+Contribute
+==========
+For information about how to contribute (donating, etc):
 http://www.websitebaker.org/2/contribute
-
+
