--- /dev/null
+The following people contributed to Diogenes :
+
+Jeremy Lainé <jeremy.laine@m4x.org>
+ * original author of Diogenes
+
+Matthew Palmer <mpalmer@debian.org>
+ * testing framework
+
+Michiel Alkemade <dropthestuff@hotmail.com>
+ * Dutch translations
+
+Jonas Johansson <fazer75@hotmail.com>
+ * Swedish translations
+
+Pablo Castellazzi <pcastell@adinet.com.uy>
+ * Spanish translations
+
+
+Many thanks to the following people for writing the Polytechnique.edu
+administration interface from which Diogenes's barrel administration
+interface is derived :
+
+Yann Chevalier <yann.chevalier@m4x.org>
+Jean-Sebastien Bedo <jean-sebastien.bedo@m4x.org>
+Denis Cabasson <denis.cabasson@m4x.org>
+
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+\f
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
--- /dev/null
+Diogenes 0.9.18
+ * improved - resync Textile plugin with Textpattern 4.0.2
+ * improved - merge page catalog and file browser with slicker layout
+ * improved - add "home", "up", "add a page" to file browser toolbar
+ * fixed - PHP5 compatibility fixes
+ * improved - refresh Dutch translations (thanks Michiel!)
+ * improved - add support for OMA DRM contents
+ * improved - switch to XHTML 1.0 strict
+ * improved - add debugging and W3C validation options in global options
+
+Diogenes 0.9.17.2
+ * fixed - handle log messages with quotes properly
+
+Diogenes 0.9.17.1
+ * improved - fix URL rewriting to allow access to barrel 'foo' via
+ (..)/site.php/foo/ as well as (..)/site/foo/
+
+Diogenes 0.9.17
+ * improved - recognise additional MIME types and associated icons
+ * added - add a generic plugin mechanism
+ * added - add MailForm plugin to display a mail form to a fixed recipient
+ * added - add FileList plugin to display a directory listing with icons
+ * added - add an option to create an empty file
+ * improved - use new icons to represent MIME types
+ * added - add WikiMarkup plugin to render Wiki markup
+ * added - add RenderPhp plugin to handle PHP execution of barrel pages
+ * improved - barrel-level templates do not apply to admin pages
+ * improved - merge all *_option tables into diogenes_option
+ * added - offer copy, move and rename file operations in file browser
+ * improved - add debugging options for WebDAV
+ * fixed - work around Apache 2 / HTTP_WebDAV_Server issue
+ * improved - add support for spaces in file names
+ * improved - add support for nested pages (abritary directory tree depth)
+ * fixed - correct WebDAV support for barrels on virtual hosts
+ * improved - directory tree is cached in a file to reduce database calls
+ * improved - add some icons to the admin interface
+ * added - add TextileMarkup plugin to handle Textile markup
+ * improved - beautify the barrel activity page
+ * improved - warn that $globals->rooturl must be full URL for some features
+ * added - add HttpHeader plugin to add custom HTTP headers to a page
+ * added - add HtmlHead plugin to add entries to a pages's <head> block
+ * added - add LinksMagic plugin to highlight external and secure links
+
+Diogenes 0.9.16
+ * improved - add a global option to control Word import
+ * improved - touchup the barrel activity summary
+ * improved - use unsigned ints instead of smallints for user/page/menu ids
+
+Diogenes 0.9.15
+ * improved - add Kafenio as the default HTML editor
+ * added - user accounts now have an 'email' field
+ * fixed - correct escaping of PHP code when using HTML editor
+ * added - new bootstrapping interface to create initial admin
+ * added - add a toplevel option to switch HTML editor (Ekit/Kafenio)
+ * improved - integrate user preferences menu into barrels
+ * added - add an option to hide the Diogenes part of a barrel's menu
+ * improved - order barrels by alias in toplevel interface
+
+Diogenes 0.9.14
+ * added - new expert mode for direct access to the global options table
+ * improved - new debugging toolbar and floating database trace
+ * fixed - always use custom function to determine mime type
+
+Diogenes 0.9.13
+ * improved - return a Content-Length header for static content
+ * fixed - various fixes in the Diogenes library (see library ChangeLog)
+ * fixed - correct the file revision browser's 'restore' function
+ * fixed - make sure the CVS wrapper exits when it has no children left
+ * added - full Spanish translation (Pablo Castellazzi)
+ * fixed - pass correct baseurl and stylesheet to Ekit
+
+Diogenes 0.9.12
+ * improved - mention what constitutes a valid barrel name
+ * added - allow admins to choose site-wide or page-specific templates
+ * improved - make PHP execution of pages more flexible
+ * fixed - correct handling of HTML entities in raw editor
+ * improved - replace unused 'visible' flag by a more flexible status selector
+ * improved - replace useless 'root' access level by 'forbidden'
+ * added - ability to add a log message to page file commits
+ * fixed - expand 'Edit this page' menu entry for publicly writable pages
+
+Diogenes 0.9.11
+ * improved - stop using tables so admins can control their site's appearance
+ * fixed - new JavaScript MD5 which supports accentuated characters
+ * improved - several updates to French translation (Nicolas Bertolissio)
+ * improved - improved cache-control for public, static content
+ * improved - various layout and stylesheet enhancements
+ * added - include a note about customising Diogenes
+ * improved - stop hardcoding charset in the pages
+ * added - full Dutch translation (Michiel Alkemade)
+ * added - full Swedish translation (Jonas Johansson)
+ * improved - send back appropriate HTTP status codes on error pages
+ * improved - offer to authenticate again after login failure
+
+Diogenes 0.9.10
+ * improved - changed DB structure for the menus for increased speed
+ * fixed - explicitly set magic_quotes_gpc On and register_globals Off
+ * added - barrels have their own set of options
+ * added - customisable menu expanding level
+ * added - integrated phpLayersMenu
+ * fixed - reworked Word import to make it safer and to handle images
+ * improved - make it possible to use a different WebDAV class
+ * improved - do not allow the creation of a barrel called CVSROOT
+ * added - selectable themes for the menu
+ * improved - allow customisation of the toplevel pages
+
+Diogenes 0.9.9.3
+ * improved - split document root into separate subdirectory
+ * fixed - do not escape special characters in raw editor
+ * improved - added some missing translations
+
+Diogenes 0.9.9.2
+ * improved - group WebDAV operations into sessions to declutter log
+ * improved - when logging in/out the user stays on the current page
+
+Diogenes 0.9.9.1
+ * fixed - do not start session when in WebDAV mode (possible file corruption)
+ * fixed - check validity of page location
+ * fixed - use UNIX_TIMESTAMP when retrieving dates in log browser
+ * fixed - Ekit must be within a barrel (Java security violation on vhosts)
+ * improved - use HTML import function when a page is PUT with WebDAV
+ * improved - check new barrel names against list of invalid names
+
+Diogenes 0.9.9
+ * address rewriting (mod_rewrite) is no longer required
+ * added support for WebDAV
+ * use page location exclusively for browsing (not page ID)
+ * fixed faulty date selection in log browser
+ * various code cleanups
+ * user-generated pages no longer have the "valid XHTML/CSS" logos
+
+Diogenes 0.9.8.3
+ * fixed a regexp that killed old PHP versions (Word import bug)
+ * large speed improvements for log browsing
+ * enhanced database debugging
+
+Diogenes 0.9.8.2
+ * fixed admin menu not always being displayed on public pages
+ * fixed distribution problems (Makefile & cvs.pl missing)
+
+Diogenes 0.9.8.1
+ * fixed bug in diff viewing
+ * tightened HTML import code
+
+Diogenes 0.9.8
+ * added customisable write access for pages
+ * added support for anonymous (Wiki-style) write access
+ * fixed extra checks on RCS operations
+ * added CVS support as an alternative to bare RCS (experimental)
+ * added toplevel page for RCS <-> CVS switching.
+ * fixed added missing stripslashes for page title
+
+Diogenes 0.9.7
+ * split fullname into firstname and lastname
+ * improved display of authentication method (native, etc.)
+ * added script to update database structure
+
+Diogenes 0.9.6
+ * reworked packaging
+
+Diogenes 0.9.5
+ * started ChangeLog
+ * Ekit WYSIWYG editor integration
+ * allow language selection
+ * links to Diogenes documentation
+ * improved Word document handling
+
--- /dev/null
+# definitions
+
+VERSION = 0.9.18
+PKG_DIST = diogenes-$(VERSION)
+LIB_DIST = libdiogenes-$(VERSION)
+
+PKG_FILES = AUTHORS ChangeLog COPYING README Makefile \
+ cvs.pl style.css
+
+PKG_DIRS = config htdocs include locale po plugins templates
+
+LIB_FILES = COPYING
+LIB_BASE = include/diogenes
+
+VCS_FILTER = ! -name .arch-ids ! -name CVS
+
+# global targets
+
+build: pkg-build lib-build
+
+dist: clean pkg-dist lib-dist
+
+clean:
+ rm -rf locale include/diogenes.globals.inc.php
+ for ext in php tpl css po; \
+ do \
+ find -type f -name *.$$ext~ -exec rm -f {} \; ; \
+ done
+
+%: %.in Makefile
+ sed -e 's,@VERSION@,$(VERSION),g' $< > $@
+
+
+# diogenes package targets
+
+pkg-build: include/diogenes.globals.inc.php
+ make -C po
+
+pkg-dist: pkg-build
+ rm -rf $(PKG_DIST) $(PKG_DIST).tar.gz
+ mkdir $(PKG_DIST)
+ cp -a $(PKG_FILES) $(PKG_DIST)
+ for dir in `find $(PKG_DIRS) -type d $(VCS_FILTER)`; \
+ do \
+ mkdir -p $(PKG_DIST)/$$dir; \
+ find $$dir -maxdepth 1 -type f -exec cp {} $(PKG_DIST)/$$dir \; ; \
+ done
+ tar czf $(PKG_DIST).tar.gz $(PKG_DIST)
+ rm -rf $(PKG_DIST)
+
+
+# diogenes library targets
+
+lib-build:
+
+lib-dist: lib-build
+ rm -rf $(LIB_DIST)
+ mkdir $(LIB_DIST)
+ cp -a $(LIB_FILES) $(LIB_DIST)
+ for dir in `cd $(LIB_BASE) && find -type d $(VCS_FILTER)`; \
+ do \
+ mkdir -p $(LIB_DIST)/$$dir; \
+ find $(LIB_BASE)/$$dir -maxdepth 1 -type f -exec cp {} $(LIB_DIST)/$$dir \; ; \
+ done
+ tar czf $(LIB_DIST).tar.gz $(LIB_DIST)
+ rm -rf $(LIB_DIST)
+
+
+.PHONY: build dist clean pkg-build pkg-dist lib-build lib-dist
+
--- /dev/null
+Notes for Diogenes
+
+PRESENTATION
+------------
+
+Diogenes is a content management system that allows you to quickly create and
+host web sites for communities. It was written by the Polytechnique.org
+team. More information can be found on the Diogenes project page :
+
+ http://opensource.polytechnique.org/diogenes/
+
+It is released under the terms of the GNU Public License (GPL) version 2. The
+full text of this license can be found in the COPYING file included in this
+distribution.
+
+
+DOCUMENTATION & INSTALLATION
+----------------------------
+
+The documentation for Diogenes, including installation instructions can
+be found here:
+
+ http://doc.polytechnique.org/diogenes/
+
+
+CUSTOMISING DIOGENES
+--------------------
+
+Diogenes provides several means of customising its look and behaviour.
+
+ * CONFIGURATION FILE
+
+The first thing you can modify is Diogenes's configuration file called
+"diogenes.config.inc.php". To have a list of the values you can assign, take a
+look at the file called "diogenes.globals.inc.php".
+
+ * SUBCLASSING DIOGENES'S CLASSES
+
+Diogenes is written in Object-Oriented Programming (OOP), and it is possible to
+specify the classes to use from the configuration file. For instance, if you
+want to change the look and/or behaviour of Diogenes's toplevel pages you would :
+
+- create a class called "CustomToplevel" for instance, which derives from
+ "DiogenesToplevel". Let us say this class is stored in a file called
+ "custom.toplevel.inc.php".
+
+- include "custom.toplevel.inc.php" from your configuration file like this :
+
+ require_once 'custom.toplevel.inc.php';
+
+- tell Diogenes to use your CustomToplevel class to display toplevel pages by
+ setting the following in your configuration file :
+
+ $globals->toplevel = "CustomToplevel";
+
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+ <dia:diagramdata>
+ <dia:attribute name="background">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="pagebreak">
+ <dia:color val="#000099"/>
+ </dia:attribute>
+ <dia:attribute name="paper">
+ <dia:composite type="paper">
+ <dia:attribute name="name">
+ <dia:string>#A4#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="tmargin">
+ <dia:real val="2.8222"/>
+ </dia:attribute>
+ <dia:attribute name="bmargin">
+ <dia:real val="2.8222"/>
+ </dia:attribute>
+ <dia:attribute name="lmargin">
+ <dia:real val="2.8222"/>
+ </dia:attribute>
+ <dia:attribute name="rmargin">
+ <dia:real val="2.8222"/>
+ </dia:attribute>
+ <dia:attribute name="is_portrait">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="scaling">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="fitto">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="grid">
+ <dia:composite type="grid">
+ <dia:attribute name="width_x">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="width_y">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="visible_x">
+ <dia:int val="1"/>
+ </dia:attribute>
+ <dia:attribute name="visible_y">
+ <dia:int val="1"/>
+ </dia:attribute>
+ <dia:composite type="color"/>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="color">
+ <dia:color val="#d8e5e5"/>
+ </dia:attribute>
+ <dia:attribute name="guides">
+ <dia:composite type="guides">
+ <dia:attribute name="hguides"/>
+ <dia:attribute name="vguides"/>
+ </dia:composite>
+ </dia:attribute>
+ </dia:diagramdata>
+ <dia:layer name="Background" visible="true">
+ <dia:object type="UML - Class" version="0" id="O0">
+ <dia:attribute name="obj_pos">
+ <dia:point val="22.1529,0.682353"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="22.1029,0.632353;27.0029,3.53235"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="22.1529,0.682353"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="4.8"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.8"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#LoggerView#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbh#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O1">
+ <dia:attribute name="obj_pos">
+ <dia:point val="13.6235,15.9647"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="13.5735,15.9147;18.3235,22.8147"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="13.6235,15.9647"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="4.65"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="6.8"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#TableEditor#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#actions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#autoinc#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#id#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#idfield#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#jtables#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#prefix#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O2">
+ <dia:attribute name="obj_pos">
+ <dia:point val="0.311765,1.06471"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="0.261765,1.01471;4.41176,3.31471"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="0.311765,1.06471"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="4.05"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#CorePage#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes"/>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O3">
+ <dia:attribute name="obj_pos">
+ <dia:point val="29.2971,12.7647"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="29.2471,12.7147;35.1971,19.6147"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="29.2971,12.7647"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="5.85"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="6.8"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#CoreLogger#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#uid#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#session#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#actions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_actions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_events#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_sessions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O4">
+ <dia:attribute name="obj_pos">
+ <dia:point val="9.47647,9.14118"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="9.42647,9.09118;15.2765,13.5912"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="9.47647,9.14118"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="5.75"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="4.4"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#DatabaseTable#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbh#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#vars#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O5">
+ <dia:attribute name="obj_pos">
+ <dia:point val="20.1029,4.63235"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="20.0529,4.58235;27.4029,17.0824"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="20.1029,4.63235"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="7.25"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="12.4"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#CoreGlobals#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#libroot#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#root#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#rooturl#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#db#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbdb#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbhost#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbuser#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbpwd#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_log_actions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_log_events#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_log_sessions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#session#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#gettext#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O6">
+ <dia:attribute name="obj_pos">
+ <dia:point val="8.81765,-2.76471"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="8.76765,-2.81471;11.8176,0.885294"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="8.81765,-2.76471"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="2.95"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="3.6"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#flagset#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#value#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#sep#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O7">
+ <dia:attribute name="obj_pos">
+ <dia:point val="15.5912,-1.99118"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="15.5412,-2.04118;20.4412,2.45882"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="15.5912,-1.99118"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="4.8"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="4.4"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Database#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#connect_id#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#_trace#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#_trace_data#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O8">
+ <dia:attribute name="obj_pos">
+ <dia:point val="8.82353,3.67941"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="8.77353,3.62941;11.6235,5.92941"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="8.82353,3.67941"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="2.75"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Query#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes"/>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O9">
+ <dia:attribute name="obj_pos">
+ <dia:point val="8.91765,1.10588"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="8.86765,1.05588;11.7176,3.35588"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="8.91765,1.10588"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="2.75"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Mailer#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes"/>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O10">
+ <dia:attribute name="obj_pos">
+ <dia:point val="28.4529,-1.59412"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="28.4029,-1.64412;33.6029,3.65588"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="28.4529,-1.59412"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="5.1"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="5.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#CoreSession#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#ff0000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#challenge#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#uid#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#username#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#perms#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O11">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-22.8941,0.317647"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-22.9441,0.267647;-14.0441,3.96765"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-22.8941,0.317647"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="8.8"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="3.6"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#HTTP_WebDAV_Server#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#path#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#http_auth_realm#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O12">
+ <dia:attribute name="obj_pos">
+ <dia:point val="29.1118,22.75"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="29.0618,22.7;35.4118,26.4"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="29.1118,22.75"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="6.25"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="3.6"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#WebDAVLogger#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#newsession#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#sessionlength#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O13">
+ <dia:attribute name="obj_pos">
+ <dia:point val="5.85,20.8353"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="5.8,20.7853;11.75,30.8853"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="5.85,20.8353"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="5.85"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="10"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#BarrelOptions#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_option#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#title#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#description#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#favicon#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#keywords#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_min_level#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_style#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_theme#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#template#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#template_dir#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O14">
+ <dia:attribute name="obj_pos">
+ <dia:point val="29.1294,7.43529"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="29.0794,7.38529;32.9294,11.8853"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="29.1294,7.43529"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="3.75"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="4.4"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Session#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#fullname#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#auth#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#log#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>#In $_SESSION#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O15">
+ <dia:attribute name="obj_pos">
+ <dia:point val="3.72647,13.0412"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="3.67647,12.9912;7.32647,15.2912"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="3.72647,13.0412"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="3.55"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Toplevel#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes"/>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O16">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-20.7206,6.68529"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-20.7706,6.63529;-16.2206,11.9353"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-20.7206,6.68529"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="4.45"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="5.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#WebDAV#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#alias#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#vhost#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_page#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#spool#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O17">
+ <dia:attribute name="obj_pos">
+ <dia:point val="1.16176,5.83824"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="1.11176,5.78824;3.56176,10.2882"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="1.16176,5.83824"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="2.35"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="4.4"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Page#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#dbh#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#head#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O18">
+ <dia:attribute name="obj_pos">
+ <dia:point val="20.4294,18.9735"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="20.3794,18.9235;27.0294,41.8235"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="20.4294,18.9735"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="6.55"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="22.8"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Globals#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#root#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#spoolroot#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#rcsroot#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#rooturl#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#version#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#cssfile#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#htmlfile#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#wordfile#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#rcs#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#toplevel#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#barrel#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#session#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#webdav#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#tauth#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#tlabel#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#validatepages#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#debugdatabase#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#invalidlocations#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#invalidaliases#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#locales#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_styles#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_themes#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_style#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#menu_theme#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#template_dir#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#template#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O19">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-2.24412,13.0853"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-2.29412,13.0353;2.25588,22.3353"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-2.24412,13.0853"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="4.45"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="9.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Barrel#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_menu#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#table_page#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#flags#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#options#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#pathinfo#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#PID#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#vhost#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#alias#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#canedit#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O20">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-10.8735,10.2882"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-10.9235,10.2382;-7.42353,14.7382"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-10.8735,10.2882"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="3.4"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="4.4"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Spool#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#alias#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#datadir#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#caller#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O21">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-10.6765,17.95"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-10.7265,17.9;-7.57647,20.8"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-10.6765,17.95"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="3.05"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.8"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Rcs#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#rcsdir#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O22">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-10.7,23.4735"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-10.75,23.4235;-7.6,27.1235"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-10.7,23.4735"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="3.05"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="3.6"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Cvs#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes">
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#cvsopt#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite type="umlattribute">
+ <dia:attribute name="name">
+ <dia:string>#port#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="type">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="value">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="visibility">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="class_scope">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O23">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-3.46471,-2.87059"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-3.51471,-2.92059;-0.314706,-0.620588"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-3.46471,-2.87059"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="3.1"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Smarty#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#1e90ff"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes"/>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O24">
+ <dia:attribute name="obj_pos">
+ <dia:point val="32.2221,19.5647"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="31.3721,19.5147;33.0721,22.8"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="32.2221,19.5647"/>
+ <dia:point val="32.2221,21.1574"/>
+ <dia:point val="32.2368,21.1574"/>
+ <dia:point val="32.2368,22.75"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O3" connection="6"/>
+ <dia:connection handle="1" to="O12" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O25">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-9.15147,20.75"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-10.0015,20.7;-8.30147,23.7118"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-9.15147,20.75"/>
+ <dia:point val="-9.15147,22.1118"/>
+ <dia:point val="-9.175,22.1118"/>
+ <dia:point val="-9.175,23.4735"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O21" connection="6"/>
+ <dia:connection handle="1" to="O22" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O26">
+ <dia:attribute name="obj_pos">
+ <dia:point val="2.33676,10.2382"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="1.48676,10.1882;5.55147,13.2397"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="2.33676,10.2382"/>
+ <dia:point val="2.33676,11.6397"/>
+ <dia:point val="5.50147,11.6397"/>
+ <dia:point val="5.50147,13.0412"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O17" connection="6"/>
+ <dia:connection handle="1" to="O15" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O27">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-9.17353,14.6882"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-10.0235,14.6382;-8.32353,18"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-9.17353,14.6882"/>
+ <dia:point val="-9.17353,16.3191"/>
+ <dia:point val="-9.15147,16.3191"/>
+ <dia:point val="-9.15147,17.95"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O20" connection="6"/>
+ <dia:connection handle="1" to="O21" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O28">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-18.4941,3.91765"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-19.3441,3.86765;-17.6441,6.90147"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-18.4941,3.91765"/>
+ <dia:point val="-18.4941,5.30147"/>
+ <dia:point val="-18.4956,5.30147"/>
+ <dia:point val="-18.4956,6.68529"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O11" connection="6"/>
+ <dia:connection handle="1" to="O16" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O29">
+ <dia:attribute name="obj_pos">
+ <dia:point val="23.7279,17.0324"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="22.8779,16.9824;24.5779,19.6029"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="23.7279,17.0324"/>
+ <dia:point val="23.7279,18.0029"/>
+ <dia:point val="23.7044,18.0029"/>
+ <dia:point val="23.7044,18.9735"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O5" connection="6"/>
+ <dia:connection handle="1" to="O18" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O30">
+ <dia:attribute name="obj_pos">
+ <dia:point val="2.33676,10.2382"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-0.0691176,10.1882;3.18676,13.2618"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="2.33676,10.2382"/>
+ <dia:point val="2.33676,11.6618"/>
+ <dia:point val="-0.0191176,11.6618"/>
+ <dia:point val="-0.0191176,13.0853"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O17" connection="6"/>
+ <dia:connection handle="1" to="O19" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Class" version="0" id="O31">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-1.58225,25.5412"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-1.63225,25.4912;1.36775,27.7912"/>
+ </dia:attribute>
+ <dia:attribute name="elem_corner">
+ <dia:point val="-1.58225,25.5412"/>
+ </dia:attribute>
+ <dia:attribute name="elem_width">
+ <dia:real val="2.9"/>
+ </dia:attribute>
+ <dia:attribute name="elem_height">
+ <dia:real val="2.2"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#Admin#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="comment">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="abstract">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_attributes">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="suppress_operations">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="visible_attributes">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_operations">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="visible_comments">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="foreground_color">
+ <dia:color val="#000000"/>
+ </dia:attribute>
+ <dia:attribute name="background_color">
+ <dia:color val="#ffffff"/>
+ </dia:attribute>
+ <dia:attribute name="normal_font">
+ <dia:font family="monospace" style="0" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font">
+ <dia:font family="monospace" style="88" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font">
+ <dia:font family="monospace" style="8" name="Courier"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font">
+ <dia:font family="sans" style="80" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font">
+ <dia:font family="sans" style="88" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font">
+ <dia:font family="sans" style="8" name="Helvetica"/>
+ </dia:attribute>
+ <dia:attribute name="font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="polymorphic_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_font_height">
+ <dia:real val="0.8"/>
+ </dia:attribute>
+ <dia:attribute name="classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="abstract_classname_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="comment_font_height">
+ <dia:real val="1"/>
+ </dia:attribute>
+ <dia:attribute name="attributes"/>
+ <dia:attribute name="operations"/>
+ <dia:attribute name="template">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="templates"/>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O32">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-0.364706,-2.17059"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-0.414706,-3.02059;2.38676,1.11471"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-0.364706,-2.17059"/>
+ <dia:point val="2.33676,-2.17059"/>
+ <dia:point val="2.33676,1.06471"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O23" connection="4"/>
+ <dia:connection handle="1" to="O2" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O33">
+ <dia:attribute name="obj_pos">
+ <dia:point val="12.3515,13.5412"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="11.5015,13.4912;15.9985,16.3529"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="12.3515,13.5412"/>
+ <dia:point val="12.3515,14.7529"/>
+ <dia:point val="15.9485,14.7529"/>
+ <dia:point val="15.9485,15.9647"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O4" connection="6"/>
+ <dia:connection handle="1" to="O1" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O34">
+ <dia:attribute name="obj_pos">
+ <dia:point val="2.33676,3.26471"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="2.28676,3.26471;2.43676,6.15147"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="2.33676,3.26471"/>
+ <dia:point val="2.33676,3.26471"/>
+ <dia:point val="2.33676,5.83824"/>
+ <dia:point val="2.33676,5.83824"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O2" connection="6"/>
+ <dia:connection handle="1" to="O17" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O35">
+ <dia:attribute name="obj_pos">
+ <dia:point val="31.0029,3.60588"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="30.1529,3.55588;31.8529,7.48529"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="31.0029,3.60588"/>
+ <dia:point val="31.0029,5.52059"/>
+ <dia:point val="31.0044,5.52059"/>
+ <dia:point val="31.0044,7.43529"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O10" connection="6"/>
+ <dia:connection handle="1" to="O14" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Generalization" version="0" id="O36">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-0.0191176,22.2853"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-0.869118,22.2353;0.830882,25.5912"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-0.0191176,22.2853"/>
+ <dia:point val="-0.0191176,23.9132"/>
+ <dia:point val="-0.132253,23.9132"/>
+ <dia:point val="-0.132253,25.5412"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="orth_autoroute">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="stereotype">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O19" connection="6"/>
+ <dia:connection handle="1" to="O31" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O37">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-16.2706,10.9853"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-16.3206,10.1882;-10.8235,12.5882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-16.2706,10.9853"/>
+ <dia:point val="-14.6912,10.9853"/>
+ <dia:point val="-14.6912,10.9882"/>
+ <dia:point val="-10.8735,10.9882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="autorouting">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#spool#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O16" connection="15"/>
+ <dia:connection handle="1" to="O20" connection="3"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O38">
+ <dia:attribute name="obj_pos">
+ <dia:point val="20.1029,8.93235"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="17.1912,2.35882;20.4529,10.5324"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="20.1029,8.93235"/>
+ <dia:point val="17.9912,8.93235"/>
+ <dia:point val="17.9912,2.40882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#db#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="2"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O5" connection="14"/>
+ <dia:connection handle="1" to="O7" connection="6"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O39">
+ <dia:attribute name="obj_pos">
+ <dia:point val="3.51176,7.73824"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="3.46176,2.35882;18.7912,9.33824"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="3.51176,7.73824"/>
+ <dia:point val="17.9912,7.73824"/>
+ <dia:point val="17.9912,2.40882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#dbh#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O17" connection="9"/>
+ <dia:connection handle="1" to="O7" connection="6"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O40">
+ <dia:attribute name="obj_pos">
+ <dia:point val="15.2265,11.0412"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="15.1765,2.35882;18.7912,12.6412"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="15.2265,11.0412"/>
+ <dia:point val="17.9912,11.0412"/>
+ <dia:point val="17.9912,2.40882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#dbh#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O4" connection="9"/>
+ <dia:connection handle="1" to="O7" connection="6"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O41">
+ <dia:attribute name="obj_pos">
+ <dia:point val="22.1529,2.58235"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="17.1912,2.35882;22.5029,4.80882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="22.1529,2.58235"/>
+ <dia:point val="21.1529,2.58235"/>
+ <dia:point val="21.1529,3.58235"/>
+ <dia:point val="17.9912,3.58235"/>
+ <dia:point val="17.9912,2.40882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#dbh#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="2"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O0" connection="8"/>
+ <dia:connection handle="1" to="O7" connection="6"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O42">
+ <dia:attribute name="obj_pos">
+ <dia:point val="2.20588,17.3853"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="2.15588,17.3353;9.575,20.8853"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="2.20588,17.3853"/>
+ <dia:point val="8.775,17.3853"/>
+ <dia:point val="8.775,20.8353"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#options#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O19" connection="15"/>
+ <dia:connection handle="1" to="O13" connection="1"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O43">
+ <dia:attribute name="obj_pos">
+ <dia:point val="-7.47353,13.7882"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="-7.52353,12.9853;-2.19412,15.3882"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="-7.47353,13.7882"/>
+ <dia:point val="-5.57353,13.7882"/>
+ <dia:point val="-5.57353,13.7853"/>
+ <dia:point val="-2.24412,13.7853"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="autorouting">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#caller#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O20" connection="13"/>
+ <dia:connection handle="1" to="O19" connection="3"/>
+ </dia:connections>
+ </dia:object>
+ <dia:object type="UML - Association" version="0" id="O44">
+ <dia:attribute name="obj_pos">
+ <dia:point val="32.8794,10.9353"/>
+ </dia:attribute>
+ <dia:attribute name="obj_bb">
+ <dia:rectangle val="32.8294,10.8853;37.7138,15.0647"/>
+ </dia:attribute>
+ <dia:attribute name="orth_points">
+ <dia:point val="32.8794,10.9353"/>
+ <dia:point val="36.5638,10.9353"/>
+ <dia:point val="36.5638,13.4647"/>
+ <dia:point val="35.1471,13.4647"/>
+ </dia:attribute>
+ <dia:attribute name="orth_orient">
+ <dia:enum val="0"/>
+ <dia:enum val="1"/>
+ <dia:enum val="0"/>
+ </dia:attribute>
+ <dia:attribute name="autorouting">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="name">
+ <dia:string>#log#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="direction">
+ <dia:enum val="1"/>
+ </dia:attribute>
+ <dia:attribute name="ends">
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="false"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ <dia:composite>
+ <dia:attribute name="role">
+ <dia:string>##</dia:string>
+ </dia:attribute>
+ <dia:attribute name="multiplicity">
+ <dia:string>#1#</dia:string>
+ </dia:attribute>
+ <dia:attribute name="arrow">
+ <dia:boolean val="true"/>
+ </dia:attribute>
+ <dia:attribute name="aggregate">
+ <dia:enum val="0"/>
+ </dia:attribute>
+ </dia:composite>
+ </dia:attribute>
+ <dia:connections>
+ <dia:connection handle="0" to="O14" connection="13"/>
+ <dia:connection handle="1" to="O3" connection="4"/>
+ </dia:connections>
+ </dia:object>
+ </dia:layer>
+</dia:diagram>
--- /dev/null
+Alias /diogenes /usr/share/diogenes/htdocs
+
+<Directory /usr/share/diogenes>
+ Options FollowSymLinks MultiViews
+ Order allow,deny
+ Allow from all
+ <IfModule mod_dir.c>
+ DirectoryIndex index.php
+ </IfModule>
+ <IfModule mod_php4.c>
+ php_value magic_quotes_gpc On
+ php_value register_globals Off
+ php_value include_path ".:/etc/diogenes:/usr/share/diogenes/include:/usr/share/php/smarty/libs:/usr/share/php"
+ </IfModule>
+ <IfModule mod_php5.c>
+ php_value magic_quotes_gpc On
+ php_value register_globals Off
+ php_value include_path ".:/etc/diogenes:/usr/share/diogenes/include:/usr/share/php/smarty/libs:/usr/share/php"
+ </IfModule>
+</Directory>
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+my $revision = '$Revision: 1.1 $';
+
+
+# compare two directories recursively
+sub scandir {
+ my ($rRoot,$oRoot,$rPat,$oPat,$curdir) = @_;
+
+ opendir(SPOOL,"$rRoot/$curdir") || die "can't open '$rRoot/$curdir'";
+ my @entries = grep { ! /^\.{1,2}$/ } readdir SPOOL;
+ closedir SPOOL;
+
+ my @children;
+
+ # process entries
+ foreach my $entry(@entries) {
+ my $fentry = $curdir ? "$curdir/$entry" : $entry;
+ if ( -d "$rRoot/$fentry" ) {
+ if ( -d "$oRoot/$fentry" ) {
+ push @children,$fentry;
+ } else {
+ print "[d] $fentry\n";
+ }
+ } else {
+ $fentry =~ s/$rPat/$oPat/;
+ ( -f "$oRoot/$fentry") or
+ print "[f] $fentry\n";
+ }
+ }
+
+ # recurse
+ foreach my $child(@children) {
+ &scandir($rRoot,$oRoot,$rPat,$oPat,$child);
+ }
+}
+
+
+# display usage
+sub syntax {
+ $revision =~ s/(\$)Revision: (.*) \$$/v\2/;
+
+ print "[ This is checkspool.pl ($revision), a checker for Diogenes's spool ]\n\n",
+ "Syntax:\n",
+ " checkspool.pl <rcs> <spool>\n\n",
+ " Arguments:\n",
+ " rcs - the RCS root\n",
+ " spool - the spool directory\n",
+ "\n";
+}
+
+
+# the main routine
+sub main {
+
+ if (@ARGV < 2) {
+ &syntax;
+ exit(1);
+ }
+
+ my $rcs = $ARGV[0];
+ my $spool = $ARGV[1];
+
+ # forward scan
+ print "\nNot in RCS (ignore templates_c) :\n";
+ &scandir($spool,$rcs,'$',',v');
+
+ # reverse scan
+ print "\nNot in spool :\n";
+ &scandir($rcs,$spool,',v$','');
+}
+
+&main
--- /dev/null
+# phpMyAdmin SQL Dump
+# version 2.5.4
+# http://www.phpmyadmin.net
+#
+# Host: localhost
+# Generation Time: Nov 17, 2003 at 02:35 AM
+# Server version: 4.0.16
+# PHP Version: 4.3.3
+#
+# Database : `diogenes`
+#
+
+#
+# Dumping data for table `diogenes_logactions`
+#
+
+INSERT INTO diogenes_logactions VALUES (3, 'auth_ok', 'successful password authentication');
+INSERT INTO diogenes_logactions VALUES (2, 'auth_logout', 'the user logged out');
+INSERT INTO diogenes_logactions VALUES (4, 'auth_fail', 'password authentication failed');
+INSERT INTO diogenes_logactions VALUES (5, 'page_create', 'the user created a new page');
+INSERT INTO diogenes_logactions VALUES (6, 'page_delete', 'the user deleted a page');
+INSERT INTO diogenes_logactions VALUES (7, 'rcs_commit', 'Commit to RCS');
+INSERT INTO diogenes_logactions VALUES (8, 'rcs_delete', 'An RCS-managed file was deleted');
+INSERT INTO diogenes_logactions VALUES (9, 'barrel_create', 'a new barrel was created');
+INSERT INTO diogenes_logactions VALUES (10, 'barrel_delete', 'a complete barrel was deleted');
+INSERT INTO diogenes_logactions VALUES (11, 'file_upload', 'a file was uploaded');
+INSERT INTO diogenes_logactions VALUES (12, 'file_delete', 'a file was deleted');
+INSERT INTO diogenes_logactions VALUES (13, 'barrel_options', 'the barrel options were updated');
+INSERT INTO diogenes_logactions VALUES (14, 'barrel_plugins', 'the barrel plugins were modified');
+INSERT INTO diogenes_logactions VALUES (15, 'page_props', 'the page properties were updated');
+INSERT INTO diogenes_logactions VALUES (16, 'page_plugins', 'the page plugins were modified');
--- /dev/null
+-- phpMyAdmin SQL Dump
+-- version 2.6.1-pl3
+-- http://www.phpmyadmin.net
+--
+-- Host: localhost
+-- Generation Time: Apr 09, 2005 at 01:25 AM
+-- Server version: 4.0.24
+-- PHP Version: 4.3.10-10
+--
+-- Database: `diogenes`
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_auth`
+--
+
+CREATE TABLE `diogenes_auth` (
+ `user_id` int(10) unsigned NOT NULL auto_increment,
+ `username` varchar(32) NOT NULL default '',
+ `firstname` varchar(127) NOT NULL default '',
+ `lastname` varchar(127) NOT NULL default '',
+ `password` varchar(32) NOT NULL default '',
+ `perms` enum('user','admin') NOT NULL default 'user',
+ `email` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`user_id`),
+ UNIQUE KEY `username` (`username`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_logactions`
+--
+
+CREATE TABLE `diogenes_logactions` (
+ `id` int(2) NOT NULL auto_increment,
+ `text` varchar(32) NOT NULL default '',
+ `description` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_logevents`
+--
+
+CREATE TABLE `diogenes_logevents` (
+ `stamp` timestamp(14) NOT NULL,
+ `session` int(6) NOT NULL default '0',
+ `action` int(2) NOT NULL default '0',
+ `data` varchar(255) NOT NULL default '',
+ KEY `session` (`session`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_logsessions`
+--
+
+CREATE TABLE `diogenes_logsessions` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `auth` enum('native','external') NOT NULL default 'native',
+ `uid` int(10) unsigned NOT NULL default '0',
+ `start` timestamp(14) NOT NULL,
+ `ip` varchar(64) NOT NULL default '',
+ `host` varchar(128) NOT NULL default '',
+ `sauth` enum('native','external') NOT NULL default 'native',
+ `suid` int(10) unsigned NOT NULL default '0',
+ `browser` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`id`),
+ KEY `uid` (`uid`),
+ KEY `start` (`start`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_option`
+--
+
+CREATE TABLE `diogenes_option` (
+ `barrel` VARCHAR( 16 ) NOT NULL default '',
+ `name` varchar(32) NOT NULL default '',
+ `value` text NOT NULL,
+ PRIMARY KEY (`barrel`, `name`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_perm`
+--
+
+CREATE TABLE `diogenes_perm` (
+ `alias` varchar(16) NOT NULL default '',
+ `auth` enum('native','external') NOT NULL default 'native',
+ `uid` int(10) unsigned NOT NULL default '0',
+ `perms` enum('admin','user') NOT NULL default 'user',
+ PRIMARY KEY (`alias`,`auth`,`uid`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_plugin`
+--
+
+CREATE TABLE `diogenes_plugin` (
+ `plugin` varchar(32) NOT NULL default '',
+ `barrel` varchar(16) NOT NULL default '',
+ `page` int(10) unsigned NOT NULL default '0',
+ `pos` int(10) unsigned NOT NULL default '0',
+ `params` text NOT NULL,
+ PRIMARY KEY (`plugin`,`barrel`,`page`),
+ KEY `pos` (`pos`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `diogenes_site`
+--
+
+CREATE TABLE `diogenes_site` (
+ `alias` varchar(16) NOT NULL default '',
+ `vhost` varchar(255) NOT NULL default '',
+ `flags` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`alias`)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Set the database format version
+--
+
+INSERT INTO `diogenes_option` SET name='dbversion', value='0.9.16+0.9.17pre21';
--- /dev/null
+<?php
+
+// locations
+$globals->spoolroot = "/var/spool/diogenes"
+$globals->rcsroot = "/var/lib/diogenes";
+$globals->root = "/var/www/diogenes";
+
+/* Base url for the Diogenes system, including trailing slash.
+ *
+ * In order to make use of virtualhosts or WebDAV, please set
+ * this to a full URL starting with http:// or https:// for instance:
+ *
+ * $globals->rooturl = "http://www.foo.org/diogenes/";
+*/
+$globals->rooturl = "http://diogenes.polytechnique.org/";
+
+// database access
+
+// $globals->dbdb = "diogenes";
+// $globals->dbhost = "localhost";
+// $globals->dbuser = "diogenes";
+$globals->dbpwd = "changeme";
+
+// Utility to use for Word file import.
+// set 'wvHtml' to make us of wv for Word import.
+// var $word_import = 'wvHtml';
+
+?>
--- /dev/null
+#!/bin/sh
+
+# Introductory text
+#
+cat << EOF
+This script will create the Diogenes spool and RCS directories
+and set the permissions so that the directories are writable
+by the web server.
+
+You can cancel this script at any time using Ctrl-C.
+
+EOF
+
+echo -n "Where do you want the Diogenes RCS repository? [/var/lib/diogenes] "
+read RCS_DIR
+if [ "x$RCS_DIR" = "x" ]; then
+ RCS_DIR="/var/lib/diogenes"
+fi
+
+echo -n "Where do you want the Diogenes spool? [/var/spool/diogenes] "
+read SPOOL_DIR
+if [ "x$SPOOL_DIR" = "x" ]; then
+ SPOOL_DIR="/var/spool/diogenes"
+fi
+
+# Get the web server's group.
+#
+echo -n "Under what user does the web process run? [www-data] "
+read OWNER
+if [ "x$OWNER" = "x" ]; then
+ OWNER="www-data"
+fi
+
+# Create directories.
+#
+echo
+echo -n "Creating directories... "
+mkdir -p $RCS_DIR
+mkdir -p $SPOOL_DIR
+mkdir -p $SPOOL_DIR/templates_c
+echo "done."
+
+# Set ownership
+#
+echo
+echo -n "Setting ownership recursively... "
+chown -R $OWNER $RCS_DIR
+chown -R $OWNER $SPOOL_DIR
+echo "done."
+
--- /dev/null
+#!/usr/bin/php -q
+<?php
+/* Script for updating the database structure.
+*/
+
+// Initialisation
+require_once("Console/Getopt.php");
+require_once("diogenes/diogenes.database-creator.inc.php");
+
+/** The DiogenesDbInit class handles database upgrades between
+ * Diogenes versions.
+ */
+class DiogenesDbInit extends DiogenesDatabaseCreator
+{
+ /** database versions history */
+ var $versions = array("0.9.9.3", "0.9.10", "0.9.12", "0.9.15", "0.9.16", "0.9.16+0.9.17pre15", "0.9.16+0.9.17pre19", "0.9.16+0.9.17pre21");
+
+ /**
+ * Upgrades the database from one version to the next
+ *
+ * @param $newversion
+ */
+ function upgradeDb($newversion)
+ {
+ // pre-upgrade master tables
+ $this->info("* Pre-upgrading master tables : diogenes_*");
+ $this->preupgradeMaster($newversion);
+
+ // upgrade barrels
+ $res = $this->dbh->query("select alias from diogenes_site");
+ while (list($alias) = mysql_fetch_row($res))
+ {
+ $this->info("* Upgrading barrel '$alias'");
+ $this->upgradeBarrel($alias, $newversion);
+ }
+ mysql_free_result($res);
+
+ // upgrade master tables
+ $this->info("* Upgrading master tables : diogenes_*");
+ $this->upgradeMaster($newversion);
+ }
+
+
+ /** Upgrades the master (i.e. common) tables before touching the barrel tables.
+ *
+ * @param $newversion
+ */
+ function preupgradeMaster($newversion)
+ {
+ switch($newversion) {
+ case "0.9.16+0.9.17pre15";
+ $this->info(" - adding 'barrel' field to 'diogenes_options' table");
+ $this->dbh->query("ALTER TABLE `diogenes_option` ADD `barrel` VARCHAR( 16 ) NOT NULL FIRST;");
+ $this->dbh->query(
+ "ALTER TABLE `diogenes_option` DROP PRIMARY KEY ,
+ ADD PRIMARY KEY ( `barrel` , `name` )");
+ break;
+
+ default:
+ break;
+ }
+ }
+
+
+ /** Upgrade a barrel's tables
+ *
+ * @param $alias
+ * @param $newversion
+ */
+ function upgradeBarrel($alias, $newversion)
+ {
+# $this->info("Processing : {$alias}_menu, {$alias}_page and {$alias}_option");
+
+ switch($newversion) {
+ case "0.9.10":
+ $this->info(" - upgrading : {$alias}_menu");
+ // these field where NULL, change to NOT NULL
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `link` `link` TEXT NOT NULL");
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `ordre` `ordre` SMALLINT( 6 ) UNSIGNED NOT NULL");
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `MIDpere` `MIDpere` SMALLINT( 6 ) UNSIGNED NOT NULL");
+
+ // break down old 'link' column into 'link' and 'PID'
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` ADD `PID` SMALLINT( 6 ) UNSIGNED NOT NULL");
+ $res2 = $this->dbh->query("select MID,link from {$alias}_menu");
+ while (list($MID,$link) = mysql_fetch_row($res2)) {
+ switch (substr($link,0,3)) {
+ case "PI:":
+ $pid = substr($link,3);
+ $this->dbh->query("UPDATE `{$alias}_menu` SET link='',PID='$pid' WHERE MID='$MID'");
+ break;
+ case "SE:":
+ $adr = substr($link,3);
+ $this->dbh->query("UPDATE `{$alias}_menu` SET link='$adr' WHERE MID='$MID'");
+ break;
+ }
+ }
+ mysql_free_result($res2);
+
+ $this->info(" - creating : {$alias}_option");
+ $this->dbh->query("CREATE TABLE `{$alias}_option` (name VARCHAR( 32 ) NOT NULL, value TEXT NOT NULL, PRIMARY KEY (`name`)) TYPE=MyISAM;");
+
+ $this->info(" - registering title, description and keywords");
+ $res2 = $this->dbh->query("select title,description,keywords from diogenes_site where alias='$alias'");
+ list($title,$description,$keywords) = mysql_fetch_row($res2);
+ $this->dbh->query("replace into `{$alias}_option` set name='title',value='$title'");
+ $this->dbh->query("replace into `{$alias}_option` set name='description',value='$description'");
+ $this->dbh->query("replace into `{$alias}_option` set name='keywords',value='$keywords'");
+ break;
+
+ case "0.9.12":
+ $this->info(" - adding 'template' field");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` ADD `template` VARCHAR(255) NOT NULL");
+ $this->info(" - dropping 'hits' field");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` DROP `hits`");
+ $this->info(" - replacing 'visible' field by 'status'");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` DROP `visible`");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` ADD `status` tinyint(1) unsigned NOT NULL");
+ $this->info(" - modifying 'perms' and 'wperms' to add 'forbidden' access");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` CHANGE `perms` `perms` ENUM( 'public', 'auth', 'user', 'admin', 'forbidden' ) DEFAULT 'public' NOT NULL");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` CHANGE `wperms` `wperms` ENUM( 'public', 'auth', 'user', 'admin', 'forbidden' ) DEFAULT 'admin' NOT NULL");
+ break;
+
+ case "0.9.16":
+ $this->info(" - changing page id fields to INT UNSIGNED");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` CHANGE `PID` `PID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `PID` `PID` INT( 10 ) UNSIGNED NOT NULL default '0'");
+ $this->info(" - changing menu id fields to INT UNSIGNED");
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `MID` `MID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `MIDpere` `MIDpere` INT( 10 ) UNSIGNED NOT NULL default '0'");
+ $this->dbh->query("ALTER TABLE `{$alias}_menu` CHANGE `ordre` `ordre` INT( 10 ) UNSIGNED NOT NULL default '0'");
+ break;
+
+ case "0.9.16+0.9.17pre15":
+ $this->info(" - merging '{$alias}_option' into 'diogenes_options'");
+ $res = $this->dbh->query("select name,value from `{$alias}_option`");
+ while (list($o_name,$o_value) = mysql_fetch_row($res))
+ {
+ $this->dbh->query("insert into `diogenes_option` set barrel='$alias',name='$o_name',value='".addslashes($o_value)."'");
+ }
+ mysql_free_result($res);
+ $this->info(" - dropping '{$alias}_option'");
+ $this->dbh->query("drop table `{$alias}_option`");
+
+ $this->info(" - adding 'parent' field to `{$alias}_page`");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` ADD `parent` INT( 10 ) UNSIGNED NOT NULL default '0' AFTER `PID`");
+ $res = $this->dbh->query("select PID from `{$alias}_page` where location=''");
+ list($homepage) = mysql_fetch_row($res);
+ $this->dbh->query("update `{$alias}_page` set parent='$homepage' where location!=''");
+
+ $this->info(" - ordering `{$alias}_page` entries by `location`");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` CHANGE `location` `location` VARCHAR( 255 ) NOT NULL");
+ $this->dbh->query("ALTER TABLE `{$alias}_page` ORDER BY `location`");
+ break;
+
+ default:
+ $this->info(" - no changes needed.");
+ break;
+ }
+ }
+
+
+ /** Upgrades the master (i.e. common) tables after the barrel tables have been updated.
+ *
+ * @param $newversion
+ */
+ function upgradeMaster($newversion)
+ {
+ // upgrade master tables
+ switch($newversion) {
+ case "0.9.10":
+ $this->info(" - dropping fields : title, description, keywords");
+ $this->dbh->query("ALTER TABLE `diogenes_site` DROP `title`");
+ $this->dbh->query("ALTER TABLE `diogenes_site` DROP `description`");
+ $this->dbh->query("ALTER TABLE `diogenes_site` DROP `keywords`");
+ break;
+
+ case "0.9.15":
+ $this->info(" - adding field : email");
+ $this->dbh->query("ALTER TABLE `diogenes_auth` ADD `email` VARCHAR( 255 ) NOT NULL");
+ break;
+
+ case "0.9.16":
+ $this->info(" - changing user id fields to INT UNSIGNED");
+ $this->dbh->query("ALTER TABLE `diogenes_auth` CHANGE `user_id` `user_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT");
+ $this->dbh->query("ALTER TABLE `diogenes_logsessions` CHANGE `uid` `uid` INT(10) UNSIGNED NOT NULL default '0'");
+ $this->dbh->query("ALTER TABLE `diogenes_logsessions` CHANGE `suid` `suid` INT(10) UNSIGNED NOT NULL default '0'");
+ $this->dbh->query("ALTER TABLE `diogenes_perm` CHANGE `uid` `uid` INT(10) UNSIGNED NOT NULL default '0'");
+ break;
+
+ case "0.9.16+0.9.17pre15":
+ $this->info(" - creating 'diogenes_plugin' table");
+ $this->dbh->query(
+ "CREATE TABLE `diogenes_plugin` (
+ `plugin` varchar(32) NOT NULL default '',
+ `barrel` varchar(16) NOT NULL default '',
+ `page` int(10) unsigned NOT NULL default '0',
+ `pos` int(10) unsigned NOT NULL default '0',
+ `params` text NOT NULL,
+ PRIMARY KEY (`plugin`,`barrel`,`page`),
+ KEY `pos` (`pos`)
+ ) TYPE=MyISAM;");
+ break;
+
+ case "0.9.16+0.9.17pre19":
+ $this->info(" - changing id of `diogenes_logsessions` to INT(10) UNSIGNED");
+ $this->dbh->query("ALTER TABLE `diogenes_logsessions` CHANGE `id` `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+ break;
+
+ case "0.9.16+0.9.17pre21":
+ $this->dbh->query("INSERT INTO diogenes_logactions VALUES (13, 'barrel_options', 'the barrel options were updated');");
+ $this->dbh->query("INSERT INTO diogenes_logactions VALUES (14, 'barrel_plugins', 'the barrel plugins were modified');");
+ $this->dbh->query("INSERT INTO diogenes_logactions VALUES (15, 'page_props', 'the page properties were updated');");
+ $this->dbh->query("INSERT INTO diogenes_logactions VALUES (16, 'page_plugins', 'the page plugins were modified');");
+ break;
+
+ default:
+ $this->info(" - no changes needed.");
+ break;
+ }
+ }
+}
+
+/*
+ * Main routine
+*/
+$creator = new DiogenesDbInit("diogenes_option");
+$creator->parseOptions($argv, "diogenes", "localhost", "diogenes", "");
+$creator->run();
+
+?>
--- /dev/null
+#!/usr/bin/perl
+#
+# Custom wrapper around the CVS pserver for Diogenes
+#
+# Copyright 2003-2004 Jeremy Lainé
+use strict;
+use IPC::Open2;
+use Socket;
+use Fcntl qw(:DEFAULT :flock);
+use Getopt::Std;
+use POSIX qw(strftime waitpid WNOHANG WIFEXITED);
+
+my $package = "cvs.pl";
+my $version = "0.3";
+my %opts;
+my $daemon;
+
+
+# get command-line arguments
+sub init {
+ if ( not getopts('dhp:r:fms:', \%opts) or $opts{'h'}) {
+ &syntax();
+ return 1;
+ }
+
+ # check we have a valid port
+ if ($opts{'p'} !~ /^[0-9]+$/) {
+ print("Error : no port or invalid port specified!\n");
+ &syntax;
+ return 1;
+ }
+
+ # check we have a cvsroot
+ if (!$opts{'r'}) {
+ print("Error : no CVS repository was specified!\n");
+ &syntax;
+ return 1;
+ }
+ $opts{'r'} =~ s/^(.*)\/$/$1/;
+ if (! -d "$opts{'r'}/CVSROOT") {
+ print("Error : no CVS repository found at $opts{'r'}\n");
+ return 1;
+ }
+
+ # check we have a valid suicide delay
+ if ($opts{'s'} !~ /^[0-9]*$/) {
+ print("Error : invalid suicide delay!\n");
+ &syntax;
+ return 1;
+ }
+
+ return 0;
+}
+
+
+# debugging information
+sub debug()
+{
+ if ($opts{'d'}) {
+ &log(@_);
+ }
+}
+
+
+# add a log entry
+sub log()
+{
+ my $msg = shift;
+ if (open(LOG,">> $opts{'r'}/CVSROOT/serverlog"))
+ {
+ my $hdr = strftime("%a %b %e %H:%M:%S",gmtime)." [$daemon]";
+ if ($$ != $daemon) {
+ $hdr .= "[$$]";
+ }
+ print LOG "$hdr $msg\n";
+ close LOG;
+ }
+}
+
+
+# add a user to the passwd file
+sub pwdUser()
+{
+ my $user = shift;
+ my $pwfile = $opts{'r'}."/CVSROOT/passwd";
+
+ # read the password file, strip out current user
+ my @lines;
+ if (open(FH,"< $pwfile")) {
+ @lines = <FH>;
+ @lines = grep !/^$user(:.*)?(:*)?$/,@lines;
+ close(FH);
+ }
+
+ # add user to password file
+ my @pwuid = getpwuid($<);
+ push @lines, $user . "::" . $pwuid[0] . "\n";
+ sysopen(FH, $pwfile, O_WRONLY | O_CREAT)
+ or die("Can't open passwd file!");
+ flock(FH, LOCK_EX)
+ or die("Can't lock passwd file!");
+ truncate(FH,0);
+ print FH @lines;
+ close(FH);
+ #die;
+}
+
+
+# the main loop of the server
+sub serve()
+{
+ # make the socket
+ socket(Server, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
+
+ # so we can restart our server quickly
+ setsockopt(Server, SOL_SOCKET, SO_REUSEADDR, 1);
+
+ # build socket address
+ my $addr = sockaddr_in($opts{'p'}, 127.0.0.1);
+
+ # bind and start listening
+ if (!bind(Server, $addr) or !listen(Server,SOMAXCONN)) {
+ print "Error : could not bind and listen to port $opts{'p'}!\n";
+ close Server;
+ exit(2);
+ }
+
+
+ # if necessary, fork to background
+ if ($opts{'f'} && fork) {
+ # close parent
+ exit;
+ }
+
+ # store the PID of the parent process
+ $daemon = $$;
+
+ # select single-shot or full server
+ if ($opts{'m'}) {
+ &log("forked daemon bound");
+
+ my $children = 0;
+ # set up zombie reaper and suicide timer
+ $SIG{CHLD} = sub {
+ while (waitpid(-1,&WNOHANG) != -1) {
+ &WIFEXITED($?) and $children--;
+ }
+
+ # if he have no more children, start suicide timer
+ if (($$ == $daemon) && ($children == 0)) {
+ alarm $opts{s};
+ }
+ };
+
+ $SIG{ALRM} = sub {
+ &log("reached inactivity limit of $opts{s} seconds, returning");
+ exit;
+ };
+
+ # if set, start suicide timer
+ alarm $opts{s};
+
+ # full-blown server that forks for each request
+ for (my $conn = 0;; $conn++) {
+ # we can get interrupted system calls
+ # ignore these and loop back
+ if (!accept(Client,Server)) {
+ next;
+ }
+
+ # stop inactivity timer
+ alarm 0;
+
+ &debug("forking child to handle request");
+
+ if (my $cpid = fork) {
+
+ # parent process, closes unused handle
+ $children++;
+ close Client;
+
+ } elsif (defined $cpid) {
+
+ # child process
+ close Server;
+ &serveClient(\*Client);
+ close Client;
+ exit;
+
+ } else {
+ print "Could not fork serveClient!";
+ exit(2);
+ }
+ }
+ close Server;
+
+ } else {
+
+ &log("single-request daemon bound");
+ # accepts a single connection, then returns
+ accept(Client,Server);
+ close Server;
+ &serveClient(\*Client);
+
+ }
+
+ &log("returning");
+}
+
+
+# wraps around an instance of "cvs pserver"
+sub serveClient()
+{
+ my $client = shift;
+ my $cvsroot = $opts{'r'};
+
+ # begin auth
+ chomp(my $in = <$client>);
+ if ($in !~ /^BEGIN AUTH REQUEST$/) {
+ &log("client did not send BEGIN AUTH REQUEST, returning!");
+ close $client;
+ return;
+ }
+ chomp($in = <$client>);
+ if ($in !~ /^$cvsroot$/) {
+ close $client;
+ return;
+ }
+ # user name
+ chomp(my $user = <$client>);
+
+ # password, discarded
+ <$client>;
+ # end auth
+ chomp($in = <$client>);
+ if ($in !~ /^END AUTH REQUEST$/) {
+ close $client;
+ return;
+ }
+
+ # add the user to the passwd file
+ &log("authenticated $user");
+ &pwdUser($user);
+
+
+ select($client);
+ $| = 1;
+
+
+ local(*Reader,*Writer);
+
+ # create bidirectional pipe
+ if ( !open2(\*Reader, \*Writer, "cvs -f --allow-root $cvsroot pserver") ) {
+ close $client;
+ return;
+ }
+
+ print Writer "BEGIN AUTH REQUEST\n$cvsroot\n$user\nA\nEND AUTH REQUEST\n";
+
+ # process input and output
+ if (my $pid = fork) {
+ close Reader;
+
+ # process client input
+ while (my $inn = <$client>)
+ {
+ print Writer $inn;
+ }
+
+ close Client;
+ close Writer;
+
+ } elsif (defined $pid) {
+ close Writer;
+
+ # feed output back to client
+ while (my $out = <Reader>)
+ {
+ print $client $out;
+ }
+
+ close Reader;
+ close Client;
+ exit;
+
+ } else {
+ die("Could not fork!");
+ }
+
+}
+
+
+# display program syntax
+sub syntax {
+ print "\n",
+ "[ This is $package (v$version), Diogenes's wrapper around the CVS pserver ]\n\n",
+ "Syntax:\n",
+ " $package (-h | -p <port> -r <cvsroot>) [options]\n\n",
+ " Help:\n",
+ " -h - display this help message\n",
+ " Required:\n",
+ " -p <port> - listen on port <port>\n",
+ " -r <cvsroot> - use the local CVS repository <cvsroot>\n",
+ " Options:\n",
+ " -d - debugging mode\n",
+ " -f - fork to background\n",
+ " -m - serve multiple client requests instead of dying after first client\n",
+ " -s <seconds> - suicide after <seconds> seconds of inactivity\n";
+}
+
+
+# execute program
+if (&init()) {
+ exit(1);
+} else {
+ &serve();
+ exit(0);
+}
--- /dev/null
+Diogenes for Debian
+-------------------
+
+GETTING STARTED WITH DIOGENES
+
+ Diogenes will be available at http://localhost/diogenes/ after installation.
+ To make any real use of Diogenes, you will most likely want to set Diogenes's
+ location to a proper URL which is accessible from remote hosts. You can set
+ this URL in the configuration file:
+
+ /etc/diogenes/diogenes.debian.inc.php
+
+ To start using Diogenes, you need to create a user account so that you
+ can log in. You can do so by visiting the following page:
+
+ http://localhost/diogenes/toplevel/boot.php
+
+ Alternatively, the following MySQL command will allow you to login with the
+ username "root" and no password. You can then change the password upon your
+ first login using Diogenes's user account manager.
+
+ use diogenes;
+ insert into diogenes_auth set username="root",password=MD5(""),perms="admin";
+
+
+MANUAL INSTALLATION NOTES
+
+ If during installation you selected not to automatically configure Apache
+ you will have to modify your Apache configuration to include
+ /etc/diogenes/apache.conf.
+
+ If during installation you selected not to automatically configure MySQL
+ you will have to create Diogenes's database by hand. To do so, you can use
+ the SQL files found in /usr/share/diogenes/scripts. If you select a manual
+ database installation you will also have to handle database structure
+ upgrades yourself by running the update.php script which is provided in
+ /usr/share/diogenes/scripts.
+
+
+ -- Jeremy Lainé <jeremy.laine@m4x.org> Mon, 29 Mar 2004 13:24:19 +0200
--- /dev/null
+diogenes (0.9.18-1) unstable; urgency=low
+
+ * New upstream release.
+ * Update dependencies to allow use with php5 instead of php4.
+
+ -- Jeremy Lainé <jeremy.laine@m4x.org> Wed, 5 Apr 2006 21:31:21 +0200
+
+diogenes (0.9.17.2-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Jeremy Lainé <jeremy.laine@m4x.org> Mon, 3 Oct 2005 19:29:45 +0200
+
+diogenes (0.9.17.1-2) unstable; urgency=low
+
+ * Remove hardcoded depends on debconf, let debhelper handle it
+ * Do not remove debian/compat on clean, fixes lintian warning
+ * Do not run 'make' manually, let cdbs handle it by using makefile.mk
+
+ -- Jeremy Lainé <jeremy.laine@m4x.org> Mon, 26 Sep 2005 21:40:19 +0200
+
+diogenes (0.9.17.1-1) unstable; urgency=low
+
+ * New upstream release.
+ - convert debian/* to utf8
+ - diogenes.postinst, diogenes.postrm : fix possible bashisms
+
+ -- Jeremy Lainé <jeremy.laine@m4x.org> Tue, 30 Aug 2005 01:31:49 +0200
+
+diogenes (0.9.17-2) unstable; urgency=low
+
+ * Update to Standards-Version 3.6.2
+ * Add Czech translation of debconf messages (Closes: #315827)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Sun, 26 Jun 2005 14:38:30 +0200
+
+diogenes (0.9.17-1) unstable; urgency=low
+
+ * New upstream release.
+ - disable custom templates on admin pages (Closes: #296125)
+ * Rework package dependencies
+ - add Depends on php4-mysql for libphp-diogenes
+ - change wv from Depends to Suggests for diogenes
+ * Add error information when enabling apache modules
+ * Purge Smarty template cache during configure
+ * Update German translation of debconf messages (Closes: #311718)
+ * Document the fact that $globals->rooturl defaults to
+ http://localhost/diogenes/ (Closes: #311673)
+ * Add Vietnamese translation of debconf messages (Closes: #313543)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 14 Jun 2005 21:01:44 +0200
+
+diogenes (0.9.16+0.9.17pre24-1) experimental; urgency=low
+
+ * New upstream release.
+ * Update German translation of debconf messages (Closes: #311718)
+ * Document the fact that $globals->rooturl defaults to
+ http://localhost/diogenes/ (Closes: #311673)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Sun, 5 Jun 2005 20:15:04 +0200
+
+diogenes (0.9.16+0.9.17pre23-1) experimental; urgency=low
+
+ * New upstream release
+ * Rework package dependencies
+ - add Depends on php4-mysql for libphp-diogenes
+ - change wv from Depends to Suggests for diogenes
+ * Add error information when enable apache modules
+ * Purge Smarty template cache during configure
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Sun, 29 May 2005 23:30:33 +0200
+
+diogenes (0.9.16-1) unstable; urgency=low
+
+ * New upstream release
+ - use unsigned ints instead of smallints for user ids (Closes: #299377)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Sun, 13 Mar 2005 23:54:48 +0100
+
+diogenes (0.9.15-3) unstable; urgency=low
+
+ * Update French translations (Closes: #296343)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 23 Feb 2005 20:11:23 +0100
+
+diogenes (0.9.15-1) unstable; urgency=low
+
+ * New upstream release
+ - control : add Depends on php-mail-mime for libphp-diogenes
+ - control : add Recommends on mysql-server
+ * Add support for apache2, apache-ssl and apache-perl
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Sat, 22 Jan 2005 13:18:39 +0100
+
+diogenes (0.9.14-2) unstable; urgency=low
+
+ * Use code contributed to wwwconfig-common
+ - diogenes.postinst : replace custom code by call to apache-php.sh
+ - diogenes.postinst : replace custom code by call to php-extensions.sh
+ - control : update Depends to wwwconfig-common (>= 0.0.41)
+ - control : change Depends from php4-cgi to php4-cli
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Mon, 15 Nov 2004 02:56:13 +0100
+
+diogenes (0.9.14-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 14 Oct 2004 23:14:45 +0200
+
+diogenes (0.9.13-2) unstable; urgency=low
+
+ * Mention all copyright holders in debian/copyright
+ * Add debian/watch file
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 17 Aug 2004 16:46:58 +0200
+
+diogenes (0.9.13-1) unstable; urgency=low
+
+ * New upstream release
+ * Add Pablo Castellazzi's Spanish debconf translation
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 21 Jul 2004 18:45:19 +0200
+
+diogenes (0.9.12-3) unstable; urgency=low
+
+ * Fix the revision browser's 'restore' function
+ * Fix incorrect mimetype for MS Office documents
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Fri, 2 Jul 2004 11:52:23 +0200
+
+diogenes (0.9.12-2) unstable; urgency=low
+
+ * Fix missing 'delete' button in the table editor
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 23 Jun 2004 18:07:46 +0200
+
+diogenes (0.9.12-1) unstable; urgency=low
+
+ * New upstream release
+ - explicitly state what barrel names are valid (Closes: #252788)
+ - added customisable templates (Closes: #252805)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 10 Jun 2004 14:57:09 +0200
+
+diogenes (0.9.11-1) unstable; urgency=low
+
+ * New upstream release
+ - fixed French translations (Closes: #250485, #250487)
+ * Packaging improvements
+ - added Nicolas Bertolissio's French debconf translation
+ - added Erik Schanze's German debconf translation (Closes: #252327)
+ - diogenes.postinst : check that upgradedb.php returns OK
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 1 Jun 2004 15:03:11 +0200
+
+diogenes (0.9.10-3) unstable; urgency=low
+
+ * Check that PHP has MySQL support activated
+ - diogenes.postinst : enable MySQL support if necessary (Closes: #250081)
+ * Fix incorrect MD5 hashing of accentuated characters (Closes: #250198)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Sun, 23 May 2004 14:15:37 +0200
+
+diogenes (0.9.10-2) unstable; urgency=low
+
+ * Improved debconf templates:
+ - "unpersonalise" computer (Closes: #249983)
+ - set untranslatable strings (Closes: #249984)
+ - be consistent, use "web server" (Closes: #249989)
+ - do not end templates with question mark (Closes: #249991)
+ - be more explicit about automatic password generation (Closes: #249987)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 20 May 2004 13:07:02 +0200
+
+diogenes (0.9.10-1) unstable; urgency=low
+
+ * New upstream release.
+ - apache.conf : add PEAR to the include_path
+ - diogenes.postinst : check whether database creation succeeds
+ - diogenes.postinst : call modules-config more cautiously
+ - diogenes.postinst : handle case where webserver does not restart
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 18 May 2004 10:29:22 +0200
+
+diogenes (0.9.9.3-7) unstable; urgency=low
+
+ * General improvements
+ - apache.conf : explicitly set magic_quotes_gpc and register_globals
+ - README.Debian : added a note about using updatedb.php
+ * Minimise changes to httpd.conf
+ - apache.conf : set index.php as the DirectoryIndex
+ - diogenes.postinst : do not touch DirectoryIndex in httpd.conf
+ - diogenes.postinst / diogenes.postrm : use a symlink to apache.conf
+ - diogenes.postinst : use modules-config to enable php4 support
+ * Better cleanup upon purge
+ - diogenes.config : ask the user whether to clear data on purge
+ - diogenes.postrm : remove /var/(lib|spool)/diogenes and drop database
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 5 May 2004 15:09:51 +0200
+
+diogenes (0.9.9.3-6) unstable; urgency=low
+
+ * Upload sponsored by Matthew Palmer <mpalmer@debian.org>.
+ * Initial upload to Debian. Closes: #243865.
+ * We also need the user that runs the webserver
+ - diogenes.config : retrieve webuser with getwwwoption or db_input
+ - diogenes.postinst : corrected chown of /var/(lib|spool)/diogenes
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Fri, 16 Apr 2004 11:52:24 +0200
+
+diogenes (0.9.9.3-5) unstable; urgency=low
+
+ * Server group gets determined during config
+ - diogenes.config : imported getwwwoption()
+ - diogenes.postinst : do not communicate via console
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Fri, 16 Apr 2004 10:04:20 +0200
+
+diogenes (0.9.9.3-4) unstable; urgency=low
+
+ * Stop trying to guess the MySQL user / password
+ - diogenes.config : to not use mysql-localadmpass.get
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 15 Apr 2004 19:26:39 +0200
+
+diogenes (0.9.9.3-3) unstable; urgency=low
+
+ * Better cleanup on remove
+ - rules : create /var/spool/diogenes/templates_c and /var/lib/diogenes
+ - diogenes.prerm : purge Smarty compiled templates cache
+ * Fix some issues pointed out by Matthew Palmer
+ - diogenes.templates : miscount of available options
+ - rules : moved install scripts out of /usr/share/doc
+ - diogenes.postinst : use wwwconfig-common to GRANT privileges
+ - diogenes.postinst : install ucf-managed files before configuring apache
+ - diogenes.postrm : removed .dpkg-dist files
+ * Fix potential problem with apache restart
+ - apache.conf : protect php_value with an IfModule
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 15 Apr 2004 19:13:01 +0200
+
+diogenes (0.9.9.3-2) unstable; urgency=low
+
+ * Use ucf to manage conffiles.
+ - diogenes.postinst : removed some cruft
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 14 Apr 2004 11:29:33 +0200
+
+diogenes (0.9.9.3-1) unstable; urgency=low
+
+ * New upstream release.
+ - rules : documents are now in 'htdocs'
+ - apache.conf : changed document root to 'htdocs'
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 13 Apr 2004 14:46:09 +0200
+
+diogenes (0.9.9.2-2) unstable; urgency=low
+
+ * Improved package description and notes.
+ - control : more explicit description
+ - README.Debian : corrected MySQL instructions
+ * Fixed bug when MySQL admin password is empty.
+ - diogenes.postinst : escape arguments passed to updatedb.php
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Mon, 29 Mar 2004 14:12:45 +0200
+
+diogenes (0.9.9.2-1) unstable; urgency=low
+
+ * New upstream release.
+ - rules : make use of dh_install instead of copying files
+ - rules : libphp-diogenes has its own ChangeLog
+ - README.Debian : added
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Fri, 26 Mar 2004 15:57:48 +0100
+
+diogenes (0.9.9.1-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 24 Mar 2004 12:22:58 +0100
+
+diogenes (0.9.9-1) unstable; urgency=low
+
+ * New upstream release.
+ - apache.conf : removed rewrite block
+ - control : use standard version 3.6.1
+ - control : use ${Source-Version} for Depends
+ - control : use po-debconf instead of debconf
+ - rules : distribute HTTP_WebDAV_Server files
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 16 Mar 2004 22:20:51 +0100
+
+diogenes (0.9.8.3-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Mon, 1 Mar 2004 14:40:43 +0100
+
+diogenes (0.9.8.2-1) unstable; urgency=low
+
+ * New upstream release.
+ - rules : cvs.pl needs to be installed
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 17 Dec 2003 11:18:27 +0100
+
+diogenes (0.9.8.1-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Fri, 12 Dec 2003 17:09:02 +0100
+
+diogenes (0.9.8-2) unstable; urgency=low
+
+ * Fixed Lintian warnings.
+ - copyright : added
+ - diogenes.postinst : removed a bashism
+ - diogenes.postinst : removed calls to db_input (already in diogenes.config)
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 11 Dec 2003 22:50:37 +0100
+
+diogenes (0.9.8-1) unstable; urgency=low
+
+ * New upstream release.
+ - control : added missing dependencies on php4-mysql and rcs
+ - control : added new dependency on cvs
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Thu, 11 Dec 2003 15:41:00 +0100
+
+diogenes (0.9.7-1) unstable; urgency=low
+
+ * New upstream release.
+ - rules : make call to updatedb.php
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 3 Dec 2003 19:23:01 +0100
+
+diogenes (0.9.6-3) unstable; urgency=low
+
+ * Better default for base url.
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 3 Dec 2003 07:23:45 +0100
+
+diogenes (0.9.6-2) unstable; urgency=low
+
+ * Fixed up MySQL initialisation.
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Wed, 3 Dec 2003 04:33:10 +0100
+
+diogenes (0.9.6-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Jeremy Laine <jeremy.laine@m4x.org> Tue, 2 Dec 2003 20:17:24 +0100
+
--- /dev/null
+Source: diogenes
+Section: web
+Priority: optional
+Maintainer: Jeremy Lainé <jeremy.laine@m4x.org>
+Standards-Version: 3.6.2
+Build-Depends-Indep: cdbs, debhelper (>= 4.1.16), po-debconf
+
+Package: diogenes
+Architecture: all
+Depends: ${misc:Depends}, libphp-diogenes (= ${Source-Version}), gettext, wwwconfig-common (>=0.0.41), apache | apache2 | httpd, php4-cli | php5-cli, php-pear, cvs, rcs, perl-modules, ucf (>=0.28)
+Recommends: mysql-server
+Suggests: wv
+Description: web content management system
+ The Diogenes content management system allows you to create, host and
+ manage web sites through a web interface and/or WebDAV. You can host several
+ independent sites on a single server and even have them run on separate
+ virtualhosts. Diogenes offers fine-grained control of the read and write
+ permissions of the pages making up a site.
+ .
+ Diogenes provides a number of options to customise the appearance of your
+ web sites. If you are familiar with PHP it is even possible to extend and
+ customise Diogenes's engine by subclassing its core classes. Diogenes's user
+ interface is available in Dutch, English, French, Spanish and Swedish.
+ .
+ Homepage: http://opensource.polytechnique.org/diogenes/
+
+Package: libphp-diogenes
+Architecture: all
+Depends: smarty, php-mail-mime, php4-mysql | php5-mysql
+Description: library for web site creation
+ A set of PHP classes used by the Diogenes content management system.
+ .
+ Homepage: http://opensource.polytechnique.org/libdiogenes/
+
--- /dev/null
+This package was debianized by Jeremy Lainé <jeremy.laine@m4x.org> on
+Tue, 2 Dec 2003 20:17:24 +0100
+
+It was downloaded from http://opensource.polytechnique.org/diogenes/
+
+Upstream Author: Jeremy Lainé
+
+* HTTP_WebDAV_Server is licensed under the terms of the
+ PHP license 2.02 and copyright (c) 1997-2003 The PHP Group.
+
+* PHPLIB is licensed under the terms of the LGPL and
+ is copyright (c) Kristian Koehntopp and the NetUSE AG.
+
+* PHP Layers Menu is licensed under the terms of the LGPL version 2.1
+ or later and is copyright (c) 2001-2004 Marco Pratesi.
+
+* Gartoon Gnome Icon Theme is licensed under the terms of the
+ GPL version 2 or later and is copyright (c) Zeus.
+
+* Text_Wiki is licensed under the terms of the LGPL version 2.1
+ or later and is copyright (c) 2003-2005 Paul M. Jones.
+
+* Textile is licensed under the terms put forth at
+ http://www.textism.com/tools/textile/license.html and is
+ copyright (c) 2003 Dean Allen.
+
+* Diogenes is licensed under the terms of the GPL version 2
+ or later and is copyright (c) 2003-2005 Jeremy Lainé.
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License may be found in `/usr/share/common-licenses/GPL'.
--- /dev/null
+#!/bin/bash -e
+
+RANDOMDEVICE=/dev/urandom
+allowed=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./
+declare -a RVAL
+
+second () {
+ echo $2
+}
+
+create-random-pw() {
+ if ! read -n 0 < $RANDOMDEVICE ; then
+ echo 1>&2 "Warning, no random device found, password might be insecure"
+ for i in 0 1 2 3 4 5 6 7; do
+ RVAL[i]=$RANDOM
+ done
+ else
+ for i in 0 1 2 3 4 5 6 7; do
+ RVAL[i]=$(second $(od -N 1 -t d $RANDOMDEVICE))
+ done
+ fi
+
+ PW=""
+ for i in 0 1 2 3 4 5 6 7; do
+ idx=$((${RVAL[i]} & 0x3F))
+ PW="${PW}${allowed:$idx:1}"
+ done
+
+ printf "%s" $PW
+}
+
+# this function comes from wwwconfig-common's apache.func script
+getwwwoption() {
+ getwwwoption=""
+ if [ -f $2 ] ; then
+ if grep $1 $2 | grep -v "#" > /dev/null 2>&1 ; then
+ getwwwoption=$(sed -ne "/^[[:space:]]*$1[[:space:]]\+/ s|[[:space:]]*$1[[:space:]]\+\([^[:space:]]\+\)[[:space:]]*$|\1|pg;" < $2)
+ fi
+ fi
+}
+
+
+# Use debconf baby
+. /usr/share/debconf/confmodule
+db_version 2.0
+db_title Diogenes
+
+db_input "low" "diogenes/welcome" || true
+db_go
+db_input "high" "diogenes/purge_removes_data" || true
+db_go
+
+### Required options no matter what ###
+db_input "high" "diogenes/webservers" || true
+db_go
+db_get "diogenes/webservers"
+webservers="$RET"
+
+# if a single webserver is selected,
+# try to get the user and group the webserver runs as
+nbsrv=0
+for i in $webservers ; do nbsrv=`expr $nbsrv + 1`; done
+
+if [ $nbsrv == 1 ]; then
+ server=$(echo $webservers | sed 's/,$//')
+ if [ -f /etc/$server/httpd.conf ]; then
+ getwwwoption User /etc/$server/httpd.conf
+ webuser=$(echo "$getwwwoption" | sed -e "q")
+ getwwwoption Group /etc/$server/httpd.conf
+ webgroup=$(echo "$getwwwoption" | sed -e "q")
+ fi
+fi
+
+if [ -z "$webuser" ]; then
+ db_input "high" "diogenes/webuser" || true
+ db_go
+else
+ db_set "diogenes/webuser" "$webuser"
+fi
+if [ -z "$webgroup" ]; then
+ db_input "high" "diogenes/webgroup" || true
+ db_go
+else
+ db_set "diogenes/webgroup" "$webgroup"
+fi
+
+db_input "high" "diogenes/databasemgr_type" || true
+db_go
+db_get "diogenes/databasemgr_type"
+dbtype="$RET"
+
+if [ "$dbtype" = "Automatic" ] ; then
+ db_input "high" "diogenes/databasemgr_server" || true
+ db_go
+ db_input "high" "diogenes/dbmyadmin" || true
+ db_go
+ db_input "critical" "diogenes/dbadmpass" || true
+ db_go
+ db_input "medium" "diogenes/database_name" || true
+ db_go
+ db_input "medium" "diogenes/database_user" || true
+ db_go
+ db_input "medium" "diogenes/database_pass" || true
+ db_go
+ db_get "diogenes/database_pass"
+ dbpass="$RET"
+ if [ "$dbpass" = "auto" ]; then
+ dbpass=$(create-random-pw)
+ elif [ "$dbpass" = "none" ]; then
+ dbpass=""
+ fi
+ db_set "diogenes/database_pass" "$dbpass"
+
+fi
--- /dev/null
+<?php
+// WARNING : DO NOT EDIT THIS FILE, IT IS GENERATED AUTOMATICALLY !
+// You can add your customisations in the "diogenes.debian.inc.php" file
+
+// locations
+$globals->spoolroot = "/var/spool/diogenes";
+$globals->rcsroot = "/var/lib/diogenes";
+$globals->root = "/usr/share/diogenes";
+$globals->libroot = "/usr/share/php/diogenes";
+
+// database access
+$globals->dbdb = "@dbname@";
+$globals->dbhost = "@dbserver@";
+$globals->dbuser = "@dbuser@";
+$globals->dbpwd = "@dbpass@";
+
+// include local configuration
+require("diogenes.debian.inc.php");
+
+?>
--- /dev/null
+<?php
+/* Base url for the Diogenes system, including trailing slash.
+ *
+ * In order to make use of virtualhosts or WebDAV, please set
+ * this to a full URL starting with http:// or https:// for instance:
+ *
+ * $globals->rooturl = "http://www.foo.org/diogenes/";
+*/
+$globals->rooturl = "http://localhost/diogenes/";
+
+?>
--- /dev/null
+#! /bin/sh
+# Horde postinst script using debconf
+# Written by Ola Lundqvist <opal@debian.org>
+# Adapted for Horde2 by Nils Rennebarth <nils@debian.org>
+# Adapted for Diogenes by Jeremy Lainé <jeremy.laine@m4x.org>
+#
+# All questions should have been asked via debconf
+# now we just go get those, build a temp file which we read in and
+# then build our config files and set everthing up
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+create_file_from_template() {
+ infile=$1
+ outfile=$2
+ # Password may contain anything, so we need to descend to quoting
+ # hell.
+ safepass="$dbpass"
+ # quote normal quote and final backslash because we need to write
+ # a single quoted PHP string
+ safepass=$(echo "$safepass" | sed -e "s/'/\\\\'/g" -e 's/\\$/\\\\'/)
+ # Now double backslashes because we will use sed
+ safepass=$(echo "$safepass" | sed -e 's/\\/\\\\/g')
+ # Finally escape an eventual hash sign with a backslash because
+ # we use the hash sign as a delimiter
+ safepass=$(echo "$safepass" | sed -e 's/#/\\#/g')
+ sed -e " \
+ s#@dbname@#$dbname#; \
+ s#@dbserver@#$dbserver#; \
+ s#@dbuser@#$dbuser#; \
+ s#@dbpass@#$safepass#; \
+ " <$infile >$outfile
+}
+
+
+case "$1" in
+ configure)
+
+# install ucf-managed files
+ucf --debconf-ok /usr/share/diogenes/config/diogenes.debian.inc.php /etc/diogenes/diogenes.debian.inc.php
+ucf --debconf-ok /usr/share/diogenes/config/apache.conf /etc/diogenes/apache.conf
+
+# get debconf started
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+###############################################################################
+############################### Configure database ############################
+###############################################################################
+
+# Type of the databasemgr to use.
+db_get "diogenes/databasemgr_type"
+dbtype="$RET"
+if [ "$dbtype" = "Automatic" ] ; then
+ # Where it is located.
+ db_get "diogenes/databasemgr_server"
+ dbserver="$RET"
+ # Name of the database
+ db_get "diogenes/database_name"
+ dbname="$RET"
+ # Name of the user to have access.
+ db_get "diogenes/database_user"
+ dbuser="$RET"
+ # Its password.
+ db_get "diogenes/database_pass"
+ dbpass="$RET"
+
+ if [ ! -z $(which mysql) ]; then
+
+ # retrieve admin user and password
+ db_get "diogenes/dbmyadmin"
+ dbadmin="$RET"
+ db_get "diogenes/dbadmpass"
+ dbadmpass="$RET"
+ db_reset "diogenes/dbadmpass"
+
+ . /usr/share/wwwconfig-common/mysql-createdb.sh
+ if [ "$status" = "create" ] ; then
+ sqlfile=/usr/share/diogenes/scripts/diogenes.tables.sql
+ create_file_from_template $sqlfile.in $sqlfile
+ . /usr/share/wwwconfig-common/mysql-exec.sh
+ rm $sqlfile
+ sqlfile=/usr/share/diogenes/scripts/diogenes.logactions.sql
+ create_file_from_template $sqlfile.in $sqlfile
+ . /usr/share/wwwconfig-common/mysql-exec.sh
+ rm $sqlfile
+ elif [ "$status" = "nothing" ] ; then
+ if ! /usr/share/diogenes/scripts/updatedb.php -q -s "$dbserver" -d "$dbname" -u "$dbadmin" -p "$dbadmpass" ; then
+ echo "There was an error while upgrading the Diogenes database."
+ fi
+ else
+ echo $error
+ fi
+ . /usr/share/wwwconfig-common/mysql-createuser.sh
+ else
+ echo "Not configuring MySQL database because we cannot locate"
+ echo "the mysql client executable (mysql-client package missing)."
+ fi
+else
+ echo "Not configuring MySQL database at your request."
+fi
+
+
+###############################################################################
+########################## Configure web servers ##############################
+###############################################################################
+
+db_get "diogenes/webservers"
+webservers="$RET"
+
+for server in $webservers; do
+ server=$(echo $server | sed 's/,$//')
+ servers="$server $servers"
+ # Make sure our web server has PHP support
+ phpver=php4
+ phpini=/etc/$phpver/$server/php.ini
+ . /usr/share/wwwconfig-common/apache-php.sh
+ if [ "$status" = "uncomment" ] ; then
+ restart="$server $restart"
+ elif [ "$status" = "error" ] ; then
+ echo "Error while trying to enable $phpver support for '$server' : $error."
+ fi
+
+ # Make sure that PHP has MySQL support enabled
+ checkextensions=mysql
+ . /usr/share/wwwconfig-common/php-extensions.sh
+
+ includefile=/etc/diogenes/apache.conf
+ # For old versions of Diogenes, remove the include of ourapache.conf
+ if dpkg --compare-versions "$2" le-nl "0.9.9.3-6" ; then
+ . /usr/share/wwwconfig-common/apache-uninclude_all.sh
+ if [ "$status" = "uncomment" ] ; then
+ restart="$server $restart"
+ fi
+ fi
+
+ # If necessary, add a symlink to our apache.conf
+ if [ -d /etc/$server/conf.d ] && [ ! -e /etc/$server/conf.d/diogenes ] ; then
+ ln -s $includefile /etc/$server/conf.d/diogenes
+ restart="$server $restart"
+ fi
+done
+
+
+###############################################################################
+########################## Configure Diogenes #################################
+###############################################################################
+
+db_get "diogenes/webuser"
+webuser="$RET"
+db_get "diogenes/webgroup"
+webgroup="$RET"
+
+( umask 0027 # File may contain passwords
+ create_file_from_template /usr/share/diogenes/config/diogenes.config.inc.php /etc/diogenes/diogenes.config.inc.php
+ chgrp $webgroup /etc/diogenes/diogenes.config.inc.php
+)
+
+# purge Smarty templates cache
+rm -rf /var/spool/diogenes/templates_c/*
+
+# correct ownership on Diogenes directories
+chown -R $webuser /var/lib/diogenes
+chown -R $webuser /var/spool/diogenes
+
+
+###############################################################################
+############################# Servers restart #################################
+###############################################################################
+if ! eval . /usr/share/wwwconfig-common/restart.sh ; then
+ echo "There was a problem restarting web server(s)."
+fi
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- /dev/null
+#!/bin/sh -e
+# Horde postrm script using debconf
+# Originally written for horde by Ola Lundqvist <opal@debian.org>
+# Adapted for horde2 by Nils Rennebarth <nils@debian.org>
+# Adapted for Diogenes by Jeremy Lainé <jeremy.laine@m4x.org>
+
+remove_from_webconfig () {
+ webservers="$RET"
+
+ # Remove symlink to our apache.conf
+ for server in $webservers ; do
+ server=$(echo $server | sed 's/,$//')
+ servers="$server $servers"
+ if [ -s /etc/$server/conf.d/diogenes ] ; then
+ rm -f /etc/$server/conf.d/diogenes
+ restart="$server $restart"
+ fi
+ done
+
+ # Restart servers
+ if [ -e /usr/share/wwwconfig-common/restart.sh ] ; then
+ . /usr/share/wwwconfig-common/restart.sh
+ fi
+}
+
+ACTION=$1
+case "$ACTION" in
+remove)
+ #
+ # Remove Diogenes from the webserver configuration
+ #
+ . /usr/share/debconf/confmodule
+ db_version 2.0
+
+ #
+ # Only try to remove Diogenes from the webserver configs if the db key
+ # diogenes/webservers exists. If not, Diogenes had not been installed
+ # correctly so we just skip the webserver part
+ #
+ if db_get "diogenes/webservers"; then
+ remove_from_webconfig
+ fi
+ ;;
+
+purge)
+ . /usr/share/debconf/confmodule
+ db_version 2.0
+
+ #
+ # Remove ucf-managed files
+ #
+ for myfile in /etc/diogenes/apache.conf /etc/diogenes/diogenes.debian.inc.php; do
+ ucf --purge $myfile
+ rm -f $myfile $myfile.dpkg-dist $myfile.dpkg-new $myfile.dpkg-old
+ done
+
+ #
+ # If we were asked to, purge Diogenes data
+ #
+ db_get "diogenes/purge_removes_data"
+ if [ "$RET" = "true" ]; then
+ # remove files
+ rm -rf /var/spool/diogenes /var/lib/diogenes
+
+ # drop the database if we are Automatic mode
+ db_get "diogenes/databasemgr_type"
+ if [ "$RET" = "Automatic" ] ; then
+ db_get "diogenes/databasemgr_server"
+ dbserver="$RET"
+ db_get "diogenes/database_name"
+ dbname="$RET"
+ # we use the Diogenes user as the "admin", as he is authorized to do a drop
+ db_get "diogenes/database_user"
+ dbadmin="$RET"
+ db_get "diogenes/database_pass"
+ dbadmpass="$RET"
+ if [ -f /usr/share/wwwconfig-common/mysql.get ] && [ -x $(which mysql) ] ; then
+ . /usr/share/wwwconfig-common/mysql.get
+ if eval $mysqlcmd -f -e "\"DROP DATABASE $dbname;\"" ; then
+ status=dropped
+ fi
+ fi
+ fi
+ fi
+ ;;
+
+*)
+ ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+
+ACTION=$1
+case "$ACTION" in
+remove)
+ #
+ # Remove the automatically generated diogenes.config.inc.php
+ #
+ rm -f /etc/diogenes/diogenes.config.inc.php
+
+ #
+ # Remove the compiled templates directory
+ #
+ rm -rf /var/spool/diogenes/templates_c
+ ;;
+*)
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- /dev/null
+Template: diogenes/welcome
+Type: note
+_Description: Welcome to the Diogenes setup program
+ You must have a database server already setup and ready to go if you are
+ going to have this program configure your database for you. If you are
+ not comfortable with this, you should tell the debconf process that you do
+ not have any database server. You will then need to configure Diogenes manually.
+ .
+ If debconf is set up in a way that you will not be asked questions
+ interactively (i.e. you do not see this note during installation but as a
+ mail to your root account), Diogenes will assume that your web server is
+ apache and your database server is MySQL and no MySQL root password is set. If
+ any of these do not apply, Diogenes will not run unless you configure it
+ manually by creating its database and editing the files in /etc/diogenes.
+
+Template: diogenes/purge_removes_data
+Type: boolean
+Default: true
+_Description: Remove web site data after "purging" the diogenes package?
+ Should the data that makes up Diogenes's web sites be removed when
+ the diogenes packages is purged with the "dpkg --purge diogenes" command
+ (i.e. remove everything including the configuration)?
+
+Template: diogenes/webservers
+Type: multiselect
+_Choices: apache, apache-ssl, apache-perl, apache2
+Default: apache
+_Description: Type of web server:
+ By default Diogenes supports any web server that php4 does. This config
+ process currently only supports Apache directly. If you use another one
+ you will have to handle the web ends manually. If you choose the first
+ option, this install process will manage the configuration (or attempt to)
+ of the Apache specific portions necessary to run Diogenes properly.
+
+Template: diogenes/webuser
+Type: string
+Default: www-data
+_Description: User your web server runs as:
+ Unable to obtain the user your web server runs as. This is needed in order
+ to allow the web server to write the files that make up the Diogenes-managed
+ web sites.
+
+Template: diogenes/webgroup
+Type: string
+Default: www-data
+_Description: Group your web server runs as:
+ Unable to obtain the group your web server runs as. This is needed in order
+ to allow the web server to read Diogenes's configuration files.
+
+Template: diogenes/databasemgr_type
+Type: select
+_Choices: Automatic, Manual
+Default: Automatic
+_Description: Type of database installation:
+ If you want the setup program to ask you questions and do the database
+ setup for you, select "Automatic". (Recommended)
+ .
+ If you want to configure your database by hand, select "Manual". In this
+ case you will have to create the Diogenes database and user by hand and
+ handle database upgrades manually.
+
+Template: diogenes/dbadmpass
+Type: password
+_Description: Database admin password:
+ Enter the password for your database admin user to access the database.
+ This password had been set when installing your database. It is most
+ likely NOT the same password that your Diogenes manager account will use.
+
+Template: diogenes/databasemgr_server
+Type: string
+Default: localhost
+_Description: Hostname of the database server:
+ If your database is on another machine besides the one that Diogenes is
+ running on then you need to change this value to the fully qualified
+ domain name for that system.
+
+Template: diogenes/database_name
+Type: string
+Default: diogenes
+_Description: Name for the Diogenes database:
+ By default this will be "diogenes". This is where all the Diogenes related
+ database items will be setup and stored.
+
+Template: diogenes/database_user
+Type: string
+Default: diogenes
+_Description: Database username:
+ What username will access the database for Diogenes? By default this is
+ it's own user "diogenes" so that permissions can be tightened down.
+
+Template: diogenes/database_pass
+Type: password
+Default: auto
+_Description: Password for the Diogenes user:
+ Enter a password for the database user which will be used along with
+ the database user name you have already supplied to connect to the
+ database.
+ .
+ If you wish to leave the password empty, type "none". If you wish to use
+ an automatically generated random password type "auto".
+
+Template: diogenes/dbmyadmin
+Type: string
+Default: root
+_Description: MySQL administrator username:
--- /dev/null
+[type: gettext/rfc822deb] diogenes.templates
--- /dev/null
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: diogenes\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-01-14 01:45+0100\n"
+"PO-Revision-Date: 2005-06-25 16:08+0200\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid "Welcome to the Diogenes setup program"
+msgstr "Vítejte v konfiguračním systému programu Diogenes"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"You must have a database server already setup and ready to go if you are "
+"going to have this program configure your database for you. If you are not "
+"comfortable with this, you should tell the debconf process that you do not "
+"have any database server. You will then need to configure Diogenes manually."
+msgstr ""
+"Chcete-li využít konfigurační systém pro automatické nastavení databáze, "
+"musíte již mít nastaven databázový server. Pokud vás automatické nastavení "
+"příliš neoslovuje, sdělte debconfu, že nemáte žádný databázový server a "
+"můžete si tak nastavit Diogenes ručně."
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"If debconf is set up in a way that you will not be asked questions "
+"interactively (i.e. you do not see this note during installation but as a "
+"mail to your root account), Diogenes will assume that your web server is "
+"apache and your database server is MySQL and no MySQL root password is set. "
+"If any of these do not apply, Diogenes will not run unless you configure it "
+"manually by creating its database and editing the files in /etc/diogenes."
+msgstr ""
+"Pokud je debconf nastavený tak, že se nemá ptát otázky interaktivně (tj. "
+"tuto poznámku nevidíte během instalace, ale byla vám zaslána poštou), "
+"bude Diogenes předpokládat, že je vaším webovým serverem apache, databázovým "
+"serverem MySQL a že v databázi není nastaveno žádné rootovské heslo. "
+"Pokud něco z toho není pravda, Diogenes se nespustí dokud jej nenastavíte "
+"ručně (tj. nevytvoříte databázi a neupravíte soubory v /etc/diogenes)."
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid "Remove web site data after \"purging\" the diogenes package?"
+msgstr "Odstranit data při vyčištění balíku diogenes ze systému?"
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid ""
+"Should the data that makes up Diogenes's web sites be removed when the "
+"diogenes packages is purged with the \"dpkg --purge diogenes\" command (i.e. "
+"remove everything including the configuration)?"
+msgstr ""
+"Vyberte si, zda se mají při kompletním odstranění balíku diogenes příkazem "
+"\"dpkg --purge diogenes\" odstranit i data tvořící webové stránky systému "
+"Diogenes (tj. vše včetně nastavení)."
+
+#. Type: multiselect
+#. Choices
+#: ../diogenes.templates:26
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr "apache, apache-ssl, apache-perl, apache2"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid "Type of web server:"
+msgstr "Typ webového serveru:"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid ""
+"By default Diogenes supports any web server that php4 does. This config "
+"process currently only supports Apache directly. If you use another one you "
+"will have to handle the web ends manually. If you choose the first option, "
+"this install process will manage the configuration (or attempt to) of the "
+"Apache specific portions necessary to run Diogenes properly."
+msgstr ""
+"Diogenes podporuje libovolný webový server, pod kterým běží php4, avšak "
+"tento konfigurační program zatím podporuje jenom Apache. "
+"Jestliže používáte jiný webový server, budete jej muset nastavit ručně. "
+"Zvolíte-li první možnost, postará se o automatické nastavení "
+"instalační program."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid "User your web server runs as:"
+msgstr "Uživatel, pod kterým běží webový server:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid ""
+"Unable to obtain the user your web server runs as. This is needed in order "
+"to allow the web server to write the files that make up the Diogenes-managed "
+"web sites."
+msgstr ""
+"Nemohu zjistit uživatele, pod kterým běží váš webový server. Tuto informaci "
+"potřebuji proto, abych povolil webovému serveru zapsat do souborů, "
+"které jsou uloženy ve webech kontrolovaných systémem Diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid "Group your web server runs as:"
+msgstr "Skupina, pod kterou běží webový server:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid ""
+"Unable to obtain the group your web server runs as. This is needed in order "
+"to allow the web server to read Diogenes's configuration files."
+msgstr ""
+"Nemohu zjistit skupinu, pod kterou běží váš webový server. Tuto informaci "
+"potřebuji proto, abych mohl webovému serveru povolit čtení konfiguračních "
+"souborů systému Diogenes."
+
+#. Type: select
+#. Choices
+#: ../diogenes.templates:52
+msgid "Automatic, Manual"
+msgstr "Automatická, Ruční"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid "Type of database installation:"
+msgstr "Typ databázové instalace:"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want the setup program to ask you questions and do the database setup "
+"for you, select \"Automatic\". (Recommended)"
+msgstr ""
+"Pokud chcete, aby se vás konfigurační program zeptal několik otázek a "
+"podle nich nastavil databázi automaticky, vyberte \"Automatická\". "
+"(Doporučeno)"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want to configure your database by hand, select \"Manual\". In this "
+"case you will have to create the Diogenes database and user by hand and "
+"handle database upgrades manually."
+msgstr ""
+"Chcete-li mít raději vše pod kontrolou, zvolte \"Ruční\". V tomto případě "
+"budete muset databázi a databázového uživatele vytvořit ručně a následně "
+"se také ručně starat o aktualizaci databáze."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid "Database admin password:"
+msgstr "Heslo správce databáze:"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid ""
+"Enter the password for your database admin user to access the database. This "
+"password had been set when installing your database. It is most likely NOT "
+"the same password that your Diogenes manager account will use."
+msgstr ""
+"Zadejte heslo administrátora databáze, které se použije pro přístup k "
+"databázi. Toto heslo jste nastavili při instalaci databáze. S největší "
+"pravděpodobností se NEJEDNÁ o stejné heslo, jaké bude používat správcovský "
+"účet systému Diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid "Hostname of the database server:"
+msgstr "Jméno počítače s databázovým serverem:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid ""
+"If your database is on another machine besides the one that Diogenes is "
+"running on then you need to change this value to the fully qualified domain "
+"name for that system."
+msgstr ""
+"Jestliže se vaše databáze nachází na jiném počítači než na kterém běží "
+"Diogenes, pak budete muset změnit tuto hodnotu na plně kvalifikované "
+"doménové jméno daného systému."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid "Name for the Diogenes database:"
+msgstr "Jméno Diogenes databáze:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid ""
+"By default this will be \"diogenes\". This is where all the Diogenes "
+"related database items will be setup and stored."
+msgstr ""
+"Implicitně se použije \"diogenes\". V této databázi se budou ukládat všechny "
+"záznamy systému Diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid "Database username:"
+msgstr "Databázové uživatelské jméno:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid ""
+"What username will access the database for Diogenes? By default this is "
+"it's own user \"diogenes\" so that permissions can be tightened down."
+msgstr ""
+"Jaké uživatelské jméno budete používat pro přístup k databázi Diogenes? "
+"Implicitně se použije vestavěný uživatel \"diogenes\", což dovolí zpřísnit "
+"přístupová oprávnění."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid "Password for the Diogenes user:"
+msgstr "Heslo uživatele Diogenes:"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"Enter a password for the database user which will be used along with the "
+"database user name you have already supplied to connect to the database."
+msgstr ""
+"Zadejte heslo pro databázového uživatele, které se použije společně se "
+"jménem databázového uživatele (již jste jej zadali) pro připojení do "
+"databáze."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"If you wish to leave the password empty, type \"none\". If you wish to use "
+"an automatically generated random password type \"auto\"."
+msgstr ""
+"Pokud chcete použít prázdné heslo, napište \"none\". Chcete-li vygenerovat "
+"náhodné heslo, zadejte \"auto\"."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:105
+msgid "MySQL administrator username:"
+msgstr "Uživatelské jméno administrátora databáze:"
--- /dev/null
+# translation of diogenes_0.9.10-3_templates.po to German
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+# Developers do not need to manually edit POT or PO files.
+# Erik Schanze <mail@erikschanze.de>, 2004, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: diogenes_0.9.16-1_de\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-01-14 01:45+0100\n"
+"PO-Revision-Date: 2005-06-02 22:51+0200\n"
+"Last-Translator: Erik Schanze <mail@erikschanze.de>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.9.1\n"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid "Welcome to the Diogenes setup program"
+msgstr "Willkommen zum Einrichtungsprogramm von Diogenes"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"You must have a database server already setup and ready to go if you are "
+"going to have this program configure your database for you. If you are not "
+"comfortable with this, you should tell the debconf process that you do not "
+"have any database server. You will then need to configure Diogenes manually."
+msgstr ""
+"Es muss ein Datenbank-Server eingerichtet und betriebsbereit sein, "
+"wenn dieses Programm die Datenbank für Sie einrichten soll. Wenn Sie das "
+"nicht möchten, geben Sie an, dass Sie keinen Datenbank-Server haben. Sie "
+"müssen Diogenes dann manuell einrichten."
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"If debconf is set up in a way that you will not be asked questions "
+"interactively (i.e. you do not see this note during installation but as a "
+"mail to your root account), Diogenes will assume that your web server is "
+"apache and your database server is MySQL and no MySQL root password is set. "
+"If any of these do not apply, Diogenes will not run unless you configure it "
+"manually by creating its database and editing the files in /etc/diogenes."
+msgstr ""
+"Wenn debconf so eingerichtet ist, dass es interaktiv keine Fragen stellt "
+"(z. B. Sie sehen diesen Hinweis nicht während der Installation, sondern als "
+"E-Mail in Ihrem root-Postfach), hat Diogenes angenommen, dass Ihr Web-Server "
+"Apache ist, als Datenbank MySQL verwendet wird und kein MySQL-root-Passwort "
+"vergeben ist. Wenn etwas davon nicht zutrifft, wird Diogenes nicht "
+"funktionieren bis Sie die Datenbank manuell eingerichtet und die Dateien in "
+"/etc/diogenes angepasst haben."
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid "Remove web site data after \"purging\" the diogenes package?"
+msgstr "Daten der Web-Seiten beim restlosen Entfernen des Pakets Diogenes löschen?"
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid ""
+"Should the data that makes up Diogenes's web sites be removed when the "
+"diogenes packages is purged with the \"dpkg --purge diogenes\" command (i.e. "
+"remove everything including the configuration)?"
+msgstr ""
+"Sollen die Daten, aus denen die Web-Seiten von Diogenes zusammengebaut "
+"werden, gelöscht werden, wenn das Paket mit dem Kommando \"dpkg --purge "
+"diogenes\" (alles incl. Konfigurationsdateien löschen) entfernt wird?"
+
+#. Type: multiselect
+#. Choices
+#: ../diogenes.templates:26
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr "apache, apache-ssl, apache-perl, apache2"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid "Type of web server:"
+msgstr "Web-Server:"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid ""
+"By default Diogenes supports any web server that php4 does. This config "
+"process currently only supports Apache directly. If you use another one you "
+"will have to handle the web ends manually. If you choose the first option, "
+"this install process will manage the configuration (or attempt to) of the "
+"Apache specific portions necessary to run Diogenes properly."
+msgstr ""
+"Standardmäßig unterstützt Diogenes jeden Web-Server, der PHP4 kann. Dieses "
+"Einrichtungsprogramm unterstützt nur Apache direkt. Wenn Sie einen anderen "
+"benutzen, müssen Sie die Einrichtung manuell vornehmen. Wenn Sie den ersten "
+"Eintrag auswählen, werden jetzt die Einstellungen der Apache-spezifischen "
+"Teile, die für Diogenes nötig sind, vorgenommen (oder zumindest versucht). "
+"Wenn Sie das nicht wollen, wählen Sie den Eintrag \"Anderer\" aus."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid "User your web server runs as:"
+msgstr "Web-Server läuft unter Benutzer:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid ""
+"Unable to obtain the user your web server runs as. This is needed in order "
+"to allow the web server to write the files that make up the Diogenes-managed "
+"web sites."
+msgstr ""
+"Der Benutzer, unter dem Ihr Web-Server läuft, konnte nicht festgestellt "
+"werden. Das ist nötig, um dem Web-Server das Schreiben der Dateien zu "
+"ermöglichen, aus denen die von Diogenes verwalteten Web-Seiten "
+"zusammengebaut werden."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid "Group your web server runs as:"
+msgstr "Web-Server läuft unter Gruppe:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid ""
+"Unable to obtain the group your web server runs as. This is needed in order "
+"to allow the web server to read Diogenes's configuration files."
+msgstr ""
+"Die Gruppe, unter der Ihr Web-Server läuft, konnte nicht festgestellt "
+"werden. Das ist nötig, um dem Web-Server das Lesen der Konfigurationsdateien "
+"von Diogenes zu ermöglichen."
+
+#. Type: select
+#. Choices
+#: ../diogenes.templates:52
+msgid "Automatic, Manual"
+msgstr "Automatisch, Manuell"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid "Type of database installation:"
+msgstr "Art der Datenbank-Installation:"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want the setup program to ask you questions and do the database setup "
+"for you, select \"Automatic\". (Recommended)"
+msgstr ""
+"Wenn das Einrichtungsprogramm Sie befragen und die Datenbank für Sie "
+"einrichten soll, dann wählen Sie \"Automatisch\" aus. (empfohlen)"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want to configure your database by hand, select \"Manual\". In this "
+"case you will have to create the Diogenes database and user by hand and "
+"handle database upgrades manually."
+msgstr ""
+"Wenn Sie Ihre Datenbank selbst einrichten wollen, dann wählen Sie \"Manuell"
+"\" aus. In diesem Fall müssen Sie die Datenbank und den Benutzer für "
+"Diogenes manuell anlegen und Datenbank-Aktualisierungen selbst durchführen."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid "Database admin password:"
+msgstr "Passwort des Datenbank-Administrators:"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid ""
+"Enter the password for your database admin user to access the database. This "
+"password had been set when installing your database. It is most likely NOT "
+"the same password that your Diogenes manager account will use."
+msgstr ""
+"Geben Sie das Passwort des Datenbank-Administrators für den Zugriff auf die "
+"Datenbank ein. Dieses Passwort wurde bei der Installation der Datenbank "
+"vergeben. Es ist höchstwahrscheinlich NICHT das selbe Passwort wie das des "
+"Diogenes Manager Zugangs."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid "Hostname of the database server:"
+msgstr "Rechnername des Datenbank-Servers:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid ""
+"If your database is on another machine besides the one that Diogenes is "
+"running on then you need to change this value to the fully qualified domain "
+"name for that system."
+msgstr ""
+"Wenn Ihre Datenbank auf einem anderen Rechner installiert ist, als der, auf "
+"dem Diogenes läuft, dann sollten Sie hier den vollständigen Rechnernamen "
+"(FQDN) dieses Systems eingeben."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid "Name for the Diogenes database:"
+msgstr "Name der Datenbank für Diogenes:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid ""
+"By default this will be \"diogenes\". This is where all the Diogenes "
+"related database items will be setup and stored."
+msgstr ""
+"Standard ist \"diogenes\". Dort werden alle Datenbankeinträge gespeichert, "
+"die Diogenes betreffen."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid "Database username:"
+msgstr "Datenbank-Benutzername:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid ""
+"What username will access the database for Diogenes? By default this is "
+"it's own user \"diogenes\" so that permissions can be tightened down."
+msgstr ""
+"Mit welchem Benutzernamen wird Diogenes auf die Datenbank zugreifen? "
+"Standardmäßig hat es seinen eigenen Benutzer \"diogenes\", damit die "
+"Zugriffsrechte eingeschränkt werden können."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid "Password for the Diogenes user:"
+msgstr "Passwort für den Benutzer:"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"Enter a password for the database user which will be used along with the "
+"database user name you have already supplied to connect to the database."
+msgstr ""
+"Vergeben Sie ein Passwort für den Datenbank-Benutzer, das zusammen mit dem "
+"Benutzernamen, den Sie gerade eingegeben haben, verwendet wird, um sich mit "
+"der Datenbank zu verbinden."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"If you wish to leave the password empty, type \"none\". If you wish to use "
+"an automatically generated random password type \"auto\"."
+msgstr ""
+"Wenn Sie dieses Passwort leer lassen wollen, geben Sie \"none\" ein. Wenn "
+"Sie ein automatisch erzeugtes, zufälliges Passwort wünschen, geben Sie "
+"\"auto\" ein."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:105
+msgid "MySQL administrator username:"
+msgstr "Benutzername des MySQL-Administrators:"
+
--- /dev/null
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: diogenes 0.9.12-3\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-01-14 01:45+0100\n"
+"PO-Revision-Date: 2004-07-04 21:54-0300\n"
+"Last-Translator: Pablo Castellazzi <pcastell@adinet.com.uy>\n"
+"Language-Team: Pablo Castellazzi <pcastell@adinet.com.uy>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid "Welcome to the Diogenes setup program"
+msgstr "Bienvenido al programa de instalación de Diogenes"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"You must have a database server already setup and ready to go if you are "
+"going to have this program configure your database for you. If you are not "
+"comfortable with this, you should tell the debconf process that you do not "
+"have any database server. You will then need to configure Diogenes manually."
+msgstr ""
+"Debe tener un servidor de base de datos configurado y funcionando si desea "
+"que este programa configure su base de datos por Ud. Si no está de acuerdo "
+"debe decirle a debconf que no tiene ningun servidor de base de datos. Tendrá "
+"entonces que configurar Diogenes manualmente."
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"If debconf is set up in a way that you will not be asked questions "
+"interactively (i.e. you do not see this note during installation but as a "
+"mail to your root account), Diogenes will assume that your web server is "
+"apache and your database server is MySQL and no MySQL root password is set. "
+"If any of these do not apply, Diogenes will not run unless you configure it "
+"manually by creating its database and editing the files in /etc/diogenes."
+msgstr ""
+"Si debconf está configurado en una forma en la que Ud. no responde a sus "
+"preguntas interactivamente (ej. no ve esta nota durante la instalación, la "
+"ve en un correo electrónico en la cuenta de root), Diogenes asumirá que su "
+"servidor web es Apache, que su servidor de base de datos es MySQL y que noy "
+"hay contraseña de root en MySQL. Si alguna de estas condiciones no se "
+"cumple, Diogenes no funcionará hasta que sea configurado manualmente creando "
+"su base de datos y modificando los archivos en /etc/diogenes."
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid "Remove web site data after \"purging\" the diogenes package?"
+msgstr ""
+"¿Eliminar la información de los sitios web después de \"purgar\" el paquete "
+"diogenes?"
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid ""
+"Should the data that makes up Diogenes's web sites be removed when the "
+"diogenes packages is purged with the \"dpkg --purge diogenes\" command (i.e. "
+"remove everything including the configuration)?"
+msgstr ""
+"¿La información de los sitios web de Diogenes deberá ser eliminada cuando el "
+"paquete diogenes es purgado con el comando \"dpkg --purge diogenes\" (ej. "
+"eliminar todo incluída la configuración)?"
+
+#. Type: multiselect
+#. Choices
+#: ../diogenes.templates:26
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid "Type of web server:"
+msgstr "Tipo del servidor web:"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+#, fuzzy
+msgid ""
+"By default Diogenes supports any web server that php4 does. This config "
+"process currently only supports Apache directly. If you use another one you "
+"will have to handle the web ends manually. If you choose the first option, "
+"this install process will manage the configuration (or attempt to) of the "
+"Apache specific portions necessary to run Diogenes properly."
+msgstr ""
+"Por omisión Diogenes soporta cualquier servidor web con php4. Este proceso "
+"de configuración solo soporta Apache directamente. Si utiliza otro servidor "
+"deberá manejarlo manualmente. Si selecciona la primera opción, este proceso "
+"de instalación manejará las porciones necesarias de la configuración de "
+"Apache (o intentará) para ejecutar Diogenes como es debido. Si no desea que "
+"esto ocurra por favor seleccione la opción \"Otros\"."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid "User your web server runs as:"
+msgstr "Usuario bajo el que su servidor web es ejecutado:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid ""
+"Unable to obtain the user your web server runs as. This is needed in order "
+"to allow the web server to write the files that make up the Diogenes-managed "
+"web sites."
+msgstr ""
+"Imposible obtener el usuario bajo el que su servidor web es ejecutado. Esto "
+"es necesario para permitirle escribir los archivos de los sitios manejados "
+"por Diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid "Group your web server runs as:"
+msgstr "Grupo bajo el que su servidor web es ejecutado:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid ""
+"Unable to obtain the group your web server runs as. This is needed in order "
+"to allow the web server to read Diogenes's configuration files."
+msgstr ""
+"Imposible obtener el grupo bajo el que su servidor web es ejecutado. Esto es "
+"necesario para permitirle escribir los archivos de los sitios manejados por "
+"Diogenes."
+
+#. Type: select
+#. Choices
+#: ../diogenes.templates:52
+msgid "Automatic, Manual"
+msgstr "Automático, Manual"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid "Type of database installation:"
+msgstr "Tipo de la instalación de la base de datos:"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want the setup program to ask you questions and do the database setup "
+"for you, select \"Automatic\". (Recommended)"
+msgstr ""
+"Si quiere que este programa le consule y configure la base de datos por Ud. "
+"seleccione \"Automático\". (Recomendado)"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want to configure your database by hand, select \"Manual\". In this "
+"case you will have to create the Diogenes database and user by hand and "
+"handle database upgrades manually."
+msgstr ""
+"Si quiere configurar su base de datos manualmente seleccione \"Manual\". En "
+"este caso tendrá que crear el usuario y la base de datos de Diogenes a mano, "
+"y manejar las actualizaciones de la base de datos de igual manera."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid "Database admin password:"
+msgstr "Contraseña del administrador de la base datos:"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid ""
+"Enter the password for your database admin user to access the database. This "
+"password had been set when installing your database. It is most likely NOT "
+"the same password that your Diogenes manager account will use."
+msgstr ""
+"Ingrese la contraseña del usuario administrador de la base de datos. Esta "
+"contraseña fue puesta cuando instaló la base de datos. Se recomienda que NO "
+"sea la misma que la del usuario administrador de Diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid "Hostname of the database server:"
+msgstr "Nombre del servidor de base de datos:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid ""
+"If your database is on another machine besides the one that Diogenes is "
+"running on then you need to change this value to the fully qualified domain "
+"name for that system."
+msgstr ""
+"Si su base de datos se encuentra en otra maquina distinta a la que Diogenes "
+"se está ejecutando debe cambiar este valor a un nombre de dominio válido "
+"para su sistema."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid "Name for the Diogenes database:"
+msgstr "Nombre para la base de datos de Diogenes:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid ""
+"By default this will be \"diogenes\". This is where all the Diogenes "
+"related database items will be setup and stored."
+msgstr ""
+"Por omisión será \"diogenes\". Esto es donde Diogenes configurará y guardará "
+"todos los elementos relacionados con su base datos."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid "Database username:"
+msgstr "Usuario de la base de datos:"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid ""
+"What username will access the database for Diogenes? By default this is "
+"it's own user \"diogenes\" so that permissions can be tightened down."
+msgstr ""
+"¿Cual usuario accederá a la base de datos de Diogenes? Por omisión es su "
+"propio usuario \"diogenes\", asi los permisos pueden ser reforzados."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid "Password for the Diogenes user:"
+msgstr "Contraseña para el usuario Diogenes:"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"Enter a password for the database user which will be used along with the "
+"database user name you have already supplied to connect to the database."
+msgstr ""
+"Ingrese una contraseña para el usuario de la base de datos anteriormente "
+"mencionado."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"If you wish to leave the password empty, type \"none\". If you wish to use "
+"an automatically generated random password type \"auto\"."
+msgstr ""
+"Si desea dejar la contraseña vacía ingrese \"none\". Si desea que se genere "
+"de forma aleatoria ingrese \"auto\"."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:105
+msgid "MySQL administrator username:"
+msgstr "Usuario administrador de MySQL:"
--- /dev/null
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: diogenes 0.9.15-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-01-14 01:45+0100\n"
+"PO-Revision-Date: 2005-02-21 22:06+0100\n"
+"Last-Translator: Nicolas Bertolissio <nico.bertol@free.fr>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid "Welcome to the Diogenes setup program"
+msgstr "Bienvenue dans le programme de paramétrage de diogenes"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"You must have a database server already setup and ready to go if you are "
+"going to have this program configure your database for you. If you are not "
+"comfortable with this, you should tell the debconf process that you do not "
+"have any database server. You will then need to configure Diogenes manually."
+msgstr ""
+"Vous devez déjà avoir un serveur de bases de données paramétré et prêt si "
+"vous souhaitez que ce programme configure la base de données pour vous. Si "
+"cela ne vous convient pas, vous devriez indiquer au processus debconf que "
+"vous n'avez pas de serveur de bases de données. Vous devrez ensuite "
+"configurer diogenes vous-même."
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"If debconf is set up in a way that you will not be asked questions "
+"interactively (i.e. you do not see this note during installation but as a "
+"mail to your root account), Diogenes will assume that your web server is "
+"apache and your database server is MySQL and no MySQL root password is set. "
+"If any of these do not apply, Diogenes will not run unless you configure it "
+"manually by creating its database and editing the files in /etc/diogenes."
+msgstr ""
+"Si debconf est paramétré pour ne pas vous poser de questions de façon "
+"interactive (c'est-à-dire que vous ne voyez pas cette note pendant "
+"l'installation mais dans un courriel adressé au super-utilisateur), diogenes "
+"supposera que votre serveur web est apache, que votre serveur de bases de "
+"données est MySQL et qu'il n'y a pas de mot de passe pour l'administrateur "
+"de MySQL. Si l'une de ces conditions ne s'applique pas, diogenes ne "
+"fonctionnera pas tant que vous ne l'aurez pas configuré vous-même en créant "
+"sa base de données et en modifiant les fichiers dans /etc/diogenes."
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid "Remove web site data after \"purging\" the diogenes package?"
+msgstr "Supprimer les données du site lors de la purge du paquet ?"
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid ""
+"Should the data that makes up Diogenes's web sites be removed when the "
+"diogenes packages is purged with the \"dpkg --purge diogenes\" command (i.e. "
+"remove everything including the configuration)?"
+msgstr ""
+"Veuillez choisir si vous souhaitez supprimer les données créées pour les "
+"sites de diogenes lors de la purge du paquet par la commande « dpkg --purge "
+"diogenes » (c'est-à-dire tout supprimer y compris la configuration)."
+
+#. Type: multiselect
+#. Choices
+#: ../diogenes.templates:26
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr "apache, apache-ssl, apache-perl, apache2"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid "Type of web server:"
+msgstr "Type de serveur web :"
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid ""
+"By default Diogenes supports any web server that php4 does. This config "
+"process currently only supports Apache directly. If you use another one you "
+"will have to handle the web ends manually. If you choose the first option, "
+"this install process will manage the configuration (or attempt to) of the "
+"Apache specific portions necessary to run Diogenes properly."
+msgstr ""
+"Par défaut, diogenes gère les mêmes serveurs web que PHP4. Le processus de "
+"configuration actuel ne supporte directement qu'apache. Si vous en utilisez "
+"un autre, vous devrez vous occuper de la partie web vous-même. Si vous "
+"choisissez la première option, le processus d'installation gérera (ou "
+"essayera de gérer) la configuration des parties d'apache spécifiques "
+"nécessaires au fonctionnement correct de diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid "User your web server runs as:"
+msgstr "Identifiant utilisé par le serveur web :"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid ""
+"Unable to obtain the user your web server runs as. This is needed in order "
+"to allow the web server to write the files that make up the Diogenes-managed "
+"web sites."
+msgstr ""
+"Il s'est avéré impossible d'obtenir l'identifiant qu'utilise le serveur web "
+"pour fonctionner. Cet identifiant est nécessaire pour permettre au serveur "
+"web de gérer les fichiers qui composent les sites gérés par diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid "Group your web server runs as:"
+msgstr "Groupe utilisé par le serveur web :"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid ""
+"Unable to obtain the group your web server runs as. This is needed in order "
+"to allow the web server to read Diogenes's configuration files."
+msgstr ""
+"Il s'est avéré impossible d'obtenir le groupe utilisé par le serveur web "
+"pour fonctionner. Ce groupe est nécessaire pour permettre au serveur web de "
+"lire les fichiers de configuration de diogenes."
+
+#. Type: select
+#. Choices
+#: ../diogenes.templates:52
+msgid "Automatic, Manual"
+msgstr "Automatique, Manuelle"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid "Type of database installation:"
+msgstr "Type d'installation de la base de données :"
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want the setup program to ask you questions and do the database setup "
+"for you, select \"Automatic\". (Recommended)"
+msgstr ""
+"Si vous souhaitez que le programme de paramétrage vous pose des questions et "
+"paramètre la base de données pour vous, veuillez choisir "
+"« Automatique » (option recommandée)."
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want to configure your database by hand, select \"Manual\". In this "
+"case you will have to create the Diogenes database and user by hand and "
+"handle database upgrades manually."
+msgstr ""
+"Si vous souhaitez configurer la base de données vous-même, veuillez choisir "
+"« Manuelle ». Dans ce cas vous devrez créer l'utilisateur et la base de "
+"données de diogenes et vous occuper des mises à jour de la base de données "
+"vous-même."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid "Database admin password:"
+msgstr "Mot de passe de l'administrateur du serveur de bases de données :"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid ""
+"Enter the password for your database admin user to access the database. This "
+"password had been set when installing your database. It is most likely NOT "
+"the same password that your Diogenes manager account will use."
+msgstr ""
+"Veuillez indiquer le mot de passe de l'administrateur de votre serveur de "
+"bases de données. Ce mot de passe a été établi lors de l'installation de "
+"votre serveur de bases de données. Il y a de fortes chances qu'il ne soit "
+"PAS le même que celui utilisé pour le compte du gestionnaire de diogenes."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid "Hostname of the database server:"
+msgstr "Nom d'hôte du serveur de bases de données :"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid ""
+"If your database is on another machine besides the one that Diogenes is "
+"running on then you need to change this value to the fully qualified domain "
+"name for that system."
+msgstr ""
+"Si votre serveur de bases de données est sur une machine autre que celle où "
+"fonctionne diogenes, vous devez modifier cette valeur et indiquer le nom de "
+"domaine complètement qualifié de ce système."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid "Name for the Diogenes database:"
+msgstr "Nom de la base de données de diogenes :"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid ""
+"By default this will be \"diogenes\". This is where all the Diogenes "
+"related database items will be setup and stored."
+msgstr ""
+"Par défaut, il s'agit de « diogenes ». C'est l'endroit où tous les objets de "
+"base de données liés à diogenes sont paramétrés et conservés."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid "Database username:"
+msgstr "Propriétaire de la base de données :"
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid ""
+"What username will access the database for Diogenes? By default this is "
+"it's own user \"diogenes\" so that permissions can be tightened down."
+msgstr ""
+"Veuillez indiquer l'identifiant qu'utilisera diogenes pour accéder à la base "
+"de données pour diogenes. Par défaut, il s'agit de l'utilisateur "
+"« diogenes » lui-même, ce qui permet de restreindre les permissions."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid "Password for the Diogenes user:"
+msgstr "Mot de passe du propriétaire de la base de données :"
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"Enter a password for the database user which will be used along with the "
+"database user name you have already supplied to connect to the database."
+msgstr ""
+"Veuillez indiquer un mot de passe pour le propriétaire de la base de données."
+"Il s'agit du mot de passe qui sera utilisé avec l'identifiant du "
+"propriétaire pour se connecter à la base de données."
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"If you wish to leave the password empty, type \"none\". If you wish to use "
+"an automatically generated random password type \"auto\"."
+msgstr ""
+"Si vous souhaitez ne pas utiliser de mot de passe, veuillez indiquer "
+"« none », aucun. Si vous souhaitez utiliser un mot de passe généré de "
+"manière aléatoire, veuillez indiquer « auto »."
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:105
+msgid "MySQL administrator username:"
+msgstr "Nom de l'administrateur de MySQL :"
--- /dev/null
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-01-14 01:45+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid "Welcome to the Diogenes setup program"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"You must have a database server already setup and ready to go if you are "
+"going to have this program configure your database for you. If you are not "
+"comfortable with this, you should tell the debconf process that you do not "
+"have any database server. You will then need to configure Diogenes manually."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../diogenes.templates:3
+msgid ""
+"If debconf is set up in a way that you will not be asked questions "
+"interactively (i.e. you do not see this note during installation but as a "
+"mail to your root account), Diogenes will assume that your web server is "
+"apache and your database server is MySQL and no MySQL root password is set. "
+"If any of these do not apply, Diogenes will not run unless you configure it "
+"manually by creating its database and editing the files in /etc/diogenes."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid "Remove web site data after \"purging\" the diogenes package?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../diogenes.templates:19
+msgid ""
+"Should the data that makes up Diogenes's web sites be removed when the "
+"diogenes packages is purged with the \"dpkg --purge diogenes\" command (i.e. "
+"remove everything including the configuration)?"
+msgstr ""
+
+#. Type: multiselect
+#. Choices
+#: ../diogenes.templates:26
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid "Type of web server:"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../diogenes.templates:28
+msgid ""
+"By default Diogenes supports any web server that php4 does. This config "
+"process currently only supports Apache directly. If you use another one you "
+"will have to handle the web ends manually. If you choose the first option, "
+"this install process will manage the configuration (or attempt to) of the "
+"Apache specific portions necessary to run Diogenes properly."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid "User your web server runs as:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:38
+msgid ""
+"Unable to obtain the user your web server runs as. This is needed in order "
+"to allow the web server to write the files that make up the Diogenes-managed "
+"web sites."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid "Group your web server runs as:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:46
+msgid ""
+"Unable to obtain the group your web server runs as. This is needed in order "
+"to allow the web server to read Diogenes's configuration files."
+msgstr ""
+
+#. Type: select
+#. Choices
+#: ../diogenes.templates:52
+msgid "Automatic, Manual"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid "Type of database installation:"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want the setup program to ask you questions and do the database setup "
+"for you, select \"Automatic\". (Recommended)"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../diogenes.templates:54
+msgid ""
+"If you want to configure your database by hand, select \"Manual\". In this "
+"case you will have to create the Diogenes database and user by hand and "
+"handle database upgrades manually."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid "Database admin password:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:64
+msgid ""
+"Enter the password for your database admin user to access the database. This "
+"password had been set when installing your database. It is most likely NOT "
+"the same password that your Diogenes manager account will use."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid "Hostname of the database server:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:72
+msgid ""
+"If your database is on another machine besides the one that Diogenes is "
+"running on then you need to change this value to the fully qualified domain "
+"name for that system."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid "Name for the Diogenes database:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:80
+msgid ""
+"By default this will be \"diogenes\". This is where all the Diogenes "
+"related database items will be setup and stored."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid "Database username:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:87
+msgid ""
+"What username will access the database for Diogenes? By default this is "
+"it's own user \"diogenes\" so that permissions can be tightened down."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid "Password for the Diogenes user:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"Enter a password for the database user which will be used along with the "
+"database user name you have already supplied to connect to the database."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../diogenes.templates:94
+msgid ""
+"If you wish to leave the password empty, type \"none\". If you wish to use "
+"an automatically generated random password type \"auto\"."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../diogenes.templates:105
+msgid "MySQL administrator username:"
+msgstr ""
--- /dev/null
+# Vietnamese translation for diogenes.
+# Copyright © 2005 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: diogenes 0.9.16-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-01-14 01:45+0100\n"
+"PO-Revision-Date: 2005-06-14 18:28+0930\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#.Type: note
+#.Description
+#:../diogenes.templates:3
+msgid "Welcome to the Diogenes setup program"
+msgstr "Chúc mừng bạn dùng chương trình thiết lập Diogenes"
+
+#.Type: note
+#.Description
+#:../diogenes.templates:3
+msgid ""
+"You must have a database server already setup and ready to go if you are "
+"going to have this program configure your database for you. If you are not "
+"comfortable with this, you should tell the debconf process that you do not "
+"have any database server. You will then need to configure Diogenes manually."
+msgstr "Nếu bạn muốn trình này cấu hình cơ sở dữ liệu cho bạn, cần phải đã thiết lập một trình phục vụ cơ sở dữ liệu trước này. Nếu bạn chưa sẵn sàng, hãy báo tiến trình debconf bạn không có trình phục vụ cơ sở dữ liệu. Như thế thì bạn sẽ cần phải tự cấu hình trình Diogenes."
+
+#.Type: note
+#.Description
+#:../diogenes.templates:3
+msgid ""
+"If debconf is set up in a way that you will not be asked questions "
+"interactively (i.e. you do not see this note during installation but as a "
+"mail to your root account), Diogenes will assume that your web server is "
+"apache and your database server is MySQL and no MySQL root password is set. "
+"If any of these do not apply, Diogenes will not run unless you configure it "
+"manually by creating its database and editing the files in /etc/diogenes."
+msgstr "Nếu bạn đã lập trình debconf không tương tác với bạn (tức là bạn không xem thông điệp này trong khi cài đặt, có xem nó trong một thư được gửi cho tài khoản người chủ) thì trình Diogenes sẽ giả sử trình phục vụ Mạng là Apache, trình phục vụ cơ sở dữ liệu là MySQL, và chưa lập mật khẩu người chủ MySQL. Nếu bất cứ điều nào trong những giá trị này không phải đúng, trình Diogenes sẽ không chạy, cho đến khi bạn tự cấu hình nó bằng cách tạo một cơ sở dữ liệu cho nó và hiệu chỉnh những tập tin trong «/etc/diogenes»."
+
+#.Type: boolean
+#.Description
+#:../diogenes.templates:19
+msgid "Remove web site data after \"purging\" the diogenes package?"
+msgstr "Loại bỏ các dữ liệu trong nơi Mạng sau khi tẩy gói tin Diogenes không?"
+
+#.Type: boolean
+#.Description
+#:../diogenes.templates:19
+msgid ""
+"Should the data that makes up Diogenes's web sites be removed when the "
+"diogenes packages is purged with the \"dpkg --purge diogenes\" command (i.e. "
+"remove everything including the configuration)?"
+msgstr "Bạn có muốn xóa bỏ các dữ liệu trong các bộ trang Mạng Diogenes vào cùng lúc với lúc tẩy những gói tin Diogenes dùng lệnh «dpkg --purge diogenes» (tức là loại bỏ mọi điều gồm cấu hình) không?"
+
+#.Type: multiselect
+#.Choices
+#:../diogenes.templates:26
+msgid "apache, apache-ssl, apache-perl, apache2"
+msgstr "apache, apache-ssl, apache-perl, apache2"
+
+#.Type: multiselect
+#.Description
+#:../diogenes.templates:28
+msgid "Type of web server:"
+msgstr "Loại trình phục vụ Mạng:"
+
+#.Type: multiselect
+#.Description
+#:../diogenes.templates:28
+msgid ""
+"By default Diogenes supports any web server that php4 does. This config "
+"process currently only supports Apache directly. If you use another one you "
+"will have to handle the web ends manually. If you choose the first option, "
+"this install process will manage the configuration (or attempt to) of the "
+"Apache specific portions necessary to run Diogenes properly."
+msgstr "Mặc định là trình Diogenes hỗ trợ cùng mọi trình phục vụ Mạng với PHP4. Tuy nhiên, tiến trình cấu hình này hiện thời hỗ trợ chỉ Apache một cách trực tiếp. Nếu bạn sử dụng một trình phục vụ Mạng khác, thì cần phải tự cấu hình nó. Nếu bạn chọn tùy chọn thứ nhất, tiến trình cài đặt này sẽ (cố) quản lý cấu hình các phần Apache cần thiết để chạy trình Diogenes cho đúng."
+
+#.Type: string
+#.Description
+#:../diogenes.templates:38
+msgid "User your web server runs as:"
+msgstr "Trình phục vụ Mạng chạy với tư cách người dùng nào?"
+
+#.Type: string
+#.Description
+#:../diogenes.templates:38
+msgid ""
+"Unable to obtain the user your web server runs as. This is needed in order "
+"to allow the web server to write the files that make up the Diogenes-managed "
+"web sites."
+msgstr "Không thể gọi người dùng có chạy trình phục vụ Mạng. Cần đến thông tin này để cho phép trình phục vụ Mạng ghi những tập tin là những bộ trang Mạng do Diogenes quản lý."
+
+#.Type: string
+#.Description
+#:../diogenes.templates:46
+msgid "Group your web server runs as:"
+msgstr "Trình phục vụ Mạng chạy với tư cách nhóm nào?"
+
+#.Type: string
+#.Description
+#:../diogenes.templates:46
+msgid ""
+"Unable to obtain the group your web server runs as. This is needed in order "
+"to allow the web server to read Diogenes's configuration files."
+msgstr "Không thể gọi nhóm có chạy trình phục vụ Mạng. Cần đến thông tin này để cho phép trình phục vụ Mạng đọc những tập tin cấu hình Diogenes."
+
+#.Type: select
+#.Choices
+#:../diogenes.templates:52
+msgid "Automatic, Manual"
+msgstr "Tự động, Thủ công"
+
+#.Type: select
+#.Description
+#:../diogenes.templates:54
+msgid "Type of database installation:"
+msgstr "Cách cài đặt cơ sở dữ liệu:"
+
+#.Type: select
+#.Description
+#:../diogenes.templates:54
+msgid ""
+"If you want the setup program to ask you questions and do the database setup "
+"for you, select \"Automatic\". (Recommended)"
+msgstr "Nếu bạn muốn chương trình thiết lập thiết lập cơ sở dữ liệu cho bạn, hỏi bạn nhập thông tin cần thiết, thì bạn hãy chọn «Tự động» (có khuyên tùy chọn này)."
+
+#.Type: select
+#.Description
+#:../diogenes.templates:54
+msgid ""
+"If you want to configure your database by hand, select \"Manual\". In this "
+"case you will have to create the Diogenes database and user by hand and "
+"handle database upgrades manually."
+msgstr "Nếu bạn muốn tự cấu hình cơ sở dữ liệu, hãy chọn «Thủ công». Như thế thì bạn sẽ cần phải tạo cơ sở dữ liệu và người dùng Diogenes, và cũng hãy tự quản lý mỗi lần nâng cấp cơ sở dữ liệu."
+
+#.Type: password
+#.Description
+#:../diogenes.templates:64
+msgid "Database admin password:"
+msgstr "Mật khẩu quản trị cơ sở dữ liệu:"
+
+#.Type: password
+#.Description
+#:../diogenes.templates:64
+msgid ""
+"Enter the password for your database admin user to access the database. This "
+"password had been set when installing your database. It is most likely NOT "
+"the same password that your Diogenes manager account will use."
+msgstr "Hãy nhập mật khẩu cho phép người dùng quản lý cơ sở dữ liệu truy cập cơ sở dữ liệu ấy. Mật khẩu này được lập trong khi cài đặt cơ sở dữ liệu ấy. Rất có thể là nó • không phải • là cùng một mật khẩu với điều trong tài khoản quản trị Diogenes."
+
+#.Type: string
+#.Description
+#:../diogenes.templates:72
+msgid "Hostname of the database server:"
+msgstr "Tên máy của máy phục vụ cơ sở dữ liệu:"
+
+#.Type: string
+#.Description
+#:../diogenes.templates:72
+msgid ""
+"If your database is on another machine besides the one that Diogenes is "
+"running on then you need to change this value to the fully qualified domain "
+"name for that system."
+msgstr "Nếu cơ sở dữ liệu bạn có trên một máy khác với máy có chạy trình Diogenes, thì bạn cần phải thay đổi giá trị này thành tên miền khả năng đầy đủ (FQDN) cho hệ thống ấy."
+
+#.Type: string
+#.Description
+#:../diogenes.templates:80
+msgid "Name for the Diogenes database:"
+msgstr "Tên cho cơ sở dữ liệu Diogenes:"
+
+#.Type: string
+#.Description
+#:../diogenes.templates:80
+msgid ""
+"By default this will be \"diogenes\". This is where all the Diogenes "
+"related database items will be setup and stored."
+msgstr "Tên mặc định là «diogenes». Sẽ thiết lập và cất giữ các mục cơ sở dữ liệu liên quan đến Diogenes tại đây."
+
+#.Type: string
+#.Description
+#:../diogenes.templates:87
+msgid "Database username:"
+msgstr "Tên người dùng cơ sở dữ liệu:"
+
+#.Type: string
+#.Description
+#:../diogenes.templates:87
+msgid ""
+"What username will access the database for Diogenes? By default this is "
+"it's own user \"diogenes\" so that permissions can be tightened down."
+msgstr "Diogenes sẽ dùng tên người dùng nào để truy cập cơ sở dữ liệu ấy? Mặc định là người dùng của chính nó, «diogenes», để bản quản hệ thống bảo mật hơn."
+
+#.Type: password
+#.Description
+#:../diogenes.templates:94
+msgid "Password for the Diogenes user:"
+msgstr "Mật khẩu cho người dùng Diogenes:"
+
+#.Type: password
+#.Description
+#:../diogenes.templates:94
+msgid ""
+"Enter a password for the database user which will be used along with the "
+"database user name you have already supplied to connect to the database."
+msgstr "Hãy nhập một mật khẩu cho người dùng cơ sở dữ liệu. Cũng với tên người dùng cơ sở dữ liệu đã cung cấp, mật khẩu này sẽ được dùng để kết nối đến cơ sở dữ liệu ấy."
+
+#.Type: password
+#.Description
+#:../diogenes.templates:94
+msgid ""
+"If you wish to leave the password empty, type \"none\". If you wish to use "
+"an automatically generated random password type \"auto\"."
+msgstr "Nếu bạn chưa muốn lập một mật khẩu, hãy gõ «none» (không có). Nếu bạn muốn sử dụng một mật khẩu sẽ được tạo ra tự động, hãy gõ «auto» (tự động)."
+
+#.Type: string
+#.Description
+#:../diogenes.templates:105
+msgid "MySQL administrator username:"
+msgstr "Tên người dùng của quản trị MySQL:"
--- /dev/null
+# establish connection to database
+
+connect @dbname@;
+
--- /dev/null
+#!/usr/bin/make -f
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/makefile.mk
+
+# definitions
+SCRIPTDIR := usr/share/diogenes/scripts
+
+# documentation
+DEB_INSTALL_DOCS_ALL :=
+DEB_INSTALL_DOCS_diogenes := AUTHORS README
+DEB_INSTALL_DOCS_libphp-diogenes := include/diogenes/AUTHORS
+
+# changelogs
+DEB_INSTALL_CHANGELOGS_ALL :=
+DEB_INSTALL_CHANGELOGS_diogenes := ChangeLog
+DEB_INSTALL_CHANGELOGS_libphp-diogenes := include/diogenes/ChangeLog
+
+#directories
+DEB_INSTALL_DIRS_diogenes := etc/diogenes var/lib/diogenes var/spool/diogenes/templates_c var/spool/diogenes/diogenes_c
+
+binary-install/diogenes::
+ # config
+ dh_install -X.arch-ids -pdiogenes debian/diogenes.debian.inc.php \
+ debian/diogenes.config.inc.php \
+ config/apache.conf \
+ usr/share/diogenes/config
+
+ # files for db installation
+ dh_install -X.arch-ids -pdiogenes config/updatedb.php $(SCRIPTDIR)
+ cat debian/prefix.sql config/db/diogenes.sql > debian/diogenes/$(SCRIPTDIR)/diogenes.tables.sql.in
+ cat debian/prefix.sql config/db/diogenes.logactions.sql > debian/diogenes/$(SCRIPTDIR)/diogenes.logactions.sql.in
+
+ # PHP files, templates, locales et al.
+ dh_install -X.arch-ids -pdiogenes -Xdiogenes.globals.inc.php.in \
+ cvs.pl style.css \
+ htdocs include locale plugins templates \
+ usr/share/diogenes
+
+ # remove library files
+ rm -rf debian/diogenes/usr/share/diogenes/include/diogenes
+
+binary-install/libphp-diogenes::
+
+ # PHP files and templates
+ dh_install -X.arch-ids -plibphp-diogenes include/diogenes/*.php usr/share/php/diogenes
+ dh_install -X.arch-ids -plibphp-diogenes include/diogenes/templates usr/share/php/diogenes
+
--- /dev/null
+version=2
+# Site/Directory Pattern Version Script
+http://opensource.polytechnique.org/dist/ diogenes-([\d\.]+)\.tar\.gz debian uupdate
--- /dev/null
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author>Jeremy Laine</author>
+ <email>jeremy.laine@m4x.org</email>
+ <version>$VERSION$</version>
+ <projectmanagement>KDevScriptProject</projectmanagement>
+ <primarylanguage>PHP</primarylanguage>
+ <ignoreparts>
+ <part>KDevClearCase</part>
+ <part>CvsService</part>
+ <part>KDevDebugger</part>
+ <part>KDevDoxygen</part>
+ <part>KDevdistpart</part>
+ <part>KDevPerforce</part>
+ <part>KDevsubversion</part>
+ <part>KDevVisualBoyAdvance</part>
+ </ignoreparts>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <description/>
+ <secondaryLanguages/>
+ </general>
+ <kdevscriptproject>
+ <general>
+ <includepatterns>*.php</includepatterns>
+ <excludepatterns>*{arch}/*</excludepatterns>
+ </general>
+ <run>
+ <directoryradio>executable</directoryradio>
+ </run>
+ </kdevscriptproject>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>gtk</toc>
+ <toc>kde</toc>
+ <toc>gnustep</toc>
+ <toc>python</toc>
+ <toc>perl</toc>
+ </ignoretocs>
+ </kdevdoctreeview>
+ <kdevphpsupport>
+ <codeHelp>
+ <codeCompletion>true</codeCompletion>
+ <codeHinting>true</codeHinting>
+ <realtimeParsing>false</realtimeParsing>
+ </codeHelp>
+ <general>
+ <invocationMode>0</invocationMode>
+ </general>
+ <webInvocation>
+ <weburl>http://localhost/</weburl>
+ <webFileMode>2</webFileMode>
+ <defaultFile/>
+ </webInvocation>
+ <shell>
+ <phpexe>/usr/local/bin/php</phpexe>
+ </shell>
+ </kdevphpsupport>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>c++_bugs_gcc</toc>
+ <toc>clanlib</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>libc</toc>
+ <toc>libstdc++</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>qt-kdev3</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>sw</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <ignoredoxygen>
+ <toc>KDE Libraries (Doxygen)</toc>
+ </ignoredoxygen>
+ </kdevdoctreeview>
+ <kdevfilecreate>
+ <useglobaltypes>
+ <type ext="php" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevfileview>
+ <groups>
+ <group pattern="htdocs/*.php" name="Web Documents" />
+ <group pattern="include/diogenes.*php" name="Include files" />
+ <group pattern="include/diogenes/*.php" name="Diogenes library" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ </tree>
+ </kdevfileview>
+</kdevelop>
--- /dev/null
+/* block definitions */
+
+/* header */
+
+#header {
+ color: white;
+ background-color: #444444;
+}
+
+#header .logo {
+ float: left;
+ width: 190px;
+}
+
+#header .titlebar {
+ margin-left: 210px;
+ padding: 5px;
+}
+
+#header .site {
+ display: inline;
+ font-size: 20pt;
+ font-weight: bold;
+ letter-spacing: 4px;
+}
+
+#header .page {
+ display: inline;
+ padding-left: 10px;
+ font-size: 16pt;
+ font-weight: bold;
+}
+
+/* the debugging banner */
+
+#debug {
+ background-color: #777777;
+ font-size: 11pt;
+}
+
+#debug .title {
+ display: inline;
+ padding-left: 5px;
+ padding-right: 10px;
+}
+
+#debug .item {
+ display: inline;
+ background-color: #999999;
+ padding-left: 5px;
+ padding-right: 5px;
+ border: 1px black solid;
+}
+
+#debug .item:hover {
+ background-color: #dddddd;
+}
+
+#debug .hide {
+ display: none;
+ background-color: white;
+ padding: 15px;
+ border: 1px black solid;
+ position: fixed;
+}
+
+#call-trace:hover div.hide { display: block; }
+
+#db-trace:hover div.hide { display: block; }
+
+#plugins-trace:hover div.hide { display: block; }
+
+/* the sidebar */
+
+#sidebar {
+ float: left;
+ margin: 5px;
+ padding: 5px;
+ font-size: 10pt;
+}
+
+/* the main display area */
+
+#main {
+ padding: 5px;
+ margin-right: 40px;
+ margin-left: 210px;
+ font-size: 11pt;
+}
+
+/* the footer */
+
+#footer {
+ clear: both;
+ text-align: center;
+ padding: 10px;
+ font-size: 9pt;
+}
+
+
+/* element redefinitions */
+body
+{
+ background-color:white;
+ border:0;
+ margin: 0;
+ font-family:verdana,arial,sans-serif;
+}
+
+a {
+ color: #70100c;
+}
+
+img {
+ border:0;
+}
+
+h2 {
+ font-size: 14pt;
+}
+
+h3 {
+ font-size: 12pt;
+}
+
+
+/* classic menu */
+.menu {
+ margin: 0px;
+ padding: 0px;
+ text-align: left;
+ width: 180px;
+}
+
+.menu a {
+ text-decoration: none;
+ display: block;
+}
+
+.menu .item a {
+ padding-top: 2px;
+ padding-bottom: 3px;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #fbd080;
+ color: black;
+}
+
+.menu .item a.odd {
+ background-color: #f9b550;
+ color: inherit;
+}
+
+.menu .item a:hover {
+ background-color: #c06040;
+ color: white;
+}
+
+.menu .item a.top {
+ padding-left: 20px;
+ font-weight: bold;
+ background-color: #901510;
+ color: white;
+}
+
+/* PHP layers menu styling */
+
+.phplmnormal img.imgs {
+ border: 0;
+ vertical-align: top;
+}
+
+/* element redefinitions */
+a.action
+{
+ font-size: 9pt;
+}
+
+table.light
+{
+ border-collapse: collapse;
+ border:1px #901510 solid;
+ background-color: #fbd080;
+ color: black;
+}
+
+table.light td
+{
+ padding:3px;
+ border:0;
+}
+
+table.light th
+{
+ background-color: #901510;
+ color: white;
+ padding: 2px 5px 2px 5px;
+}
+
+table.light tr.odd
+{
+ background-color: #f9b550;
+ color: inherit;
+}
+
+/* file viewing */
+img.fileicon {
+ padding-left: 6px;
+ padding-right: 6px;
+}
+
+/* diff viewing */
+.diff td {
+ vertical-align: top;
+}
+
+.diff .change {
+ background-color: #ffff77;
+}
+
+.diff .delete {
+ background-color: #ffaaaa;
+}
+
+.diff .add {
+ background-color: #aaffaa;
+}
+
+/* plugin viewer styles */
+.plugins .name {
+ font-weight: bold;
+}
+
+
+.plugins .description {
+ font-size: 9pt;
+}
+
+/* log browsing */
+.logdate {
+ font-size: 10pt;
+}
+
+.logauthor {
+ font-size: 10pt;
+ font-weight: bold;
+}
+
+.filesize {
+ font-size: 10pt;
+}
+
+
--- /dev/null
+icondef = gartoon.defs
+conv = sodipodi
+
+include .deps
+
+all: $(ICONS)
+
+.deps: Makefile $(icondef)
+ echo "boot: all" > .deps
+ echo >> .deps
+ rawicons=`cat $(icondef) | cut -f1`; \
+ allicons=""; \
+ for icon in $$rawicons; do \
+ allicons="$$allicons $$icon.png"; \
+ isrc=`cat $(icondef) | grep ^$$icon | cut -f2`; \
+ echo "$$icon.png: $$isrc" >> .deps; \
+ echo " $(conv) -z --file=$$isrc --export-png=$$icon.png --export-width=24 --export-height=24" >> .deps; \
+ echo >> .deps; \
+ done; \
+ echo "ICONS=$$allicons" >> .deps; \
+
+.PHONY: all deps
+
--- /dev/null
+action-add gartoon/scalable/stock/gtk-add.svg
+action-delete gartoon/scalable/stock/gtk-delete.svg
+action-edit gartoon/scalable/stock/gtk-edit.svg
+action-properties gartoon/scalable/stock/gtk-properties.svg
+action-plugins gartoon/scalable/stock/gtk-execute.svg
+action-rename gartoon/scalable/stock/gtk-jump-to-ltr.svg
+action-remove gartoon/scalable/stock/gtk-remove.svg
+action-revisions gartoon/scalable/emblems/emblem-cvs-modified.svg
+action-update gartoon/scalable/stock/gtk-compose.svg
+action-view gartoon/scalable/stock/gtk-screenshot.svg
+barrel-directory gartoon/scalable/filesystems/gnome-fs-directory.svg
+barrel-home gartoon/scalable/filesystems/gnome-fs-home.svg
+perm-public gartoon/scalable/apps/gnome-globe.svg
+perm-auth gartoon/scalable/stock/gtk-dialog-authentication.svg
+perm-admin gartoon/scalable/apps/administration.svg
+perm-user gartoon/scalable/apps/user_icon.svg
+perm-forbidden gartoon/scalable/stock/stock_dialog_error.svg
+mime-audio gartoon/scalable/mimetypes/gnome-mime-audio.svg
+mime-compressed gartoon/scalable/mimetypes/gnome-compressed.svg
+mime-deb gartoon/scalable/mimetypes/gnome-mime-application-x-deb.svg
+mime-drm gartoon/scalable/mimetypes/gnome-mime-application-pgp-encrypted.svg
+mime-html gartoon/scalable/mimetypes/gnome-mime-text-html.svg
+mime-xml gartoon/scalable/mimetypes/gnome-mime-text-xml.svg
+mime-image gartoon/scalable/mimetypes/gnome-mime-image.svg
+mime-msword gartoon/scalable/mimetypes/gnome-mime-application-msword.svg
+mime-pdf gartoon/scalable/mimetypes/gnome-mime-application-pdf.svg
+mime-lyx gartoon/scalable/mimetypes/gnome-mime-text-x-lyx.svg
+mime-postscript gartoon/scalable/mimetypes/gnome-mime-application-postscript.svg
+mime-excel gartoon/scalable/mimetypes/gnome-mime-application-vnd.ms-excel.svg
+mime-powerpoint gartoon/scalable/mimetypes/gnome-mime-application-vnd.ms-powerpoint.svg
+mime-text gartoon/scalable/mimetypes/gnome-mime-text.svg
+mime-unknown gartoon/scalable/apps/gnome-help.svg
+mime-video gartoon/scalable/mimetypes/gnome-mime-video.svg
--- /dev/null
+<?php
+// include common definitions
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'Barrel/Editor.php';
+
+$page = new $globals->toplevel;
+
+$editor = new Diogenes_Barrel_Editor();
+$editor->readonly = 1;
+$editor->run($page, 'viewer_content');
+
+$page->assign('greeting', __("Welcome to Diogenes")."!");
+$page->assign('about',
+ $globals->urlise(__("Welcome to the Diogenes content management system.")." ".
+ __("Diogenes was developed by the webmasters of the Polytechnique.org web site.")));
+$page->assign('available',__("The following barrels are currently available"));
+
+$page->display("index.tpl");
+?>
--- /dev/null
+/* external links */
+#main a[href ^="http://"],
+#main a[href ^="ftp://"] {
+ background: url("images/link-external.png") center right no-repeat;
+ padding-right: 13px;
+}
+
+/* secure links */
+#main a[href ^="https://"] {
+ background: url("images/link-secure.gif") center right no-repeat;
+ padding-right: 16px;
+}
--- /dev/null
+/* external links */
+.menu a[href ^="http://"],
+.menu a[href ^="ftp://"] {
+ background: url("images/link-external.png") center right no-repeat;
+}
+
+/* secure links */
+.menu a[href ^="https://"] {
+ background: url("images/link-secure.gif") center right no-repeat;
+}
--- /dev/null
+/*\r
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\r
+ * Digest Algorithm, as defined in RFC 1321.\r
+ * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.\r
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\r
+ * Distributed under the BSD License\r
+ * See http://pajhome.org.uk/crypt/md5 for more info.\r
+ */\r
+\r
+/*\r
+ * Configurable variables. You may need to tweak these to be compatible with\r
+ * the server-side, but the defaults work in most cases.\r
+ */\r
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */\r
+var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */\r
+var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */\r
+\r
+/*\r
+ * These are the functions you'll usually want to call\r
+ * They take string arguments and return either hex or base-64 encoded strings\r
+ */\r
+function MD5(s){ return hex_md5(s); }\r
+function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}\r
+function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}\r
+function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}\r
+function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }\r
+function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }\r
+function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }\r
+\r
+/*\r
+ * Perform a simple self-test to see if the VM is working\r
+ */\r
+function md5_vm_test()\r
+{\r
+ return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";\r
+}\r
+\r
+/*\r
+ * Calculate the MD5 of an array of little-endian words, and a bit length\r
+ */\r
+function core_md5(x, len)\r
+{\r
+ /* append padding */\r
+ x[len >> 5] |= 0x80 << ((len) % 32);\r
+ x[(((len + 64) >>> 9) << 4) + 14] = len;\r
+\r
+ var a = 1732584193;\r
+ var b = -271733879;\r
+ var c = -1732584194;\r
+ var d = 271733878;\r
+\r
+ for(var i = 0; i < x.length; i += 16)\r
+ {\r
+ var olda = a;\r
+ var oldb = b;\r
+ var oldc = c;\r
+ var oldd = d;\r
+\r
+ a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\r
+ d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\r
+ c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\r
+ b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\r
+ a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\r
+ d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\r
+ c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\r
+ b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\r
+ a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\r
+ d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\r
+ c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\r
+ b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\r
+ a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\r
+ d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\r
+ c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\r
+ b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\r
+\r
+ a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\r
+ d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\r
+ c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\r
+ b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\r
+ a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\r
+ d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\r
+ c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\r
+ b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\r
+ a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\r
+ d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\r
+ c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\r
+ b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\r
+ a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\r
+ d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\r
+ c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\r
+ b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\r
+\r
+ a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\r
+ d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\r
+ c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\r
+ b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\r
+ a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\r
+ d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\r
+ c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\r
+ b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\r
+ a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\r
+ d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\r
+ c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\r
+ b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\r
+ a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\r
+ d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\r
+ c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\r
+ b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\r
+\r
+ a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\r
+ d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\r
+ c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\r
+ b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\r
+ a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\r
+ d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\r
+ c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\r
+ b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\r
+ a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\r
+ d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\r
+ c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\r
+ b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\r
+ a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\r
+ d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\r
+ c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\r
+ b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\r
+\r
+ a = safe_add(a, olda);\r
+ b = safe_add(b, oldb);\r
+ c = safe_add(c, oldc);\r
+ d = safe_add(d, oldd);\r
+ }\r
+ return Array(a, b, c, d);\r
+\r
+}\r
+\r
+/*\r
+ * These functions implement the four basic operations the algorithm uses.\r
+ */\r
+function md5_cmn(q, a, b, x, s, t)\r
+{\r
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\r
+}\r
+function md5_ff(a, b, c, d, x, s, t)\r
+{\r
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\r
+}\r
+function md5_gg(a, b, c, d, x, s, t)\r
+{\r
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\r
+}\r
+function md5_hh(a, b, c, d, x, s, t)\r
+{\r
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);\r
+}\r
+function md5_ii(a, b, c, d, x, s, t)\r
+{\r
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\r
+}\r
+\r
+/*\r
+ * Calculate the HMAC-MD5, of a key and some data\r
+ */\r
+function core_hmac_md5(key, data)\r
+{\r
+ var bkey = str2binl(key);\r
+ if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);\r
+\r
+ var ipad = Array(16), opad = Array(16);\r
+ for(var i = 0; i < 16; i++)\r
+ {\r
+ ipad[i] = bkey[i] ^ 0x36363636;\r
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;\r
+ }\r
+\r
+ var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);\r
+ return core_md5(opad.concat(hash), 512 + 128);\r
+}\r
+\r
+/*\r
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally\r
+ * to work around bugs in some JS interpreters.\r
+ */\r
+function safe_add(x, y)\r
+{\r
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r
+ return (msw << 16) | (lsw & 0xFFFF);\r
+}\r
+\r
+/*\r
+ * Bitwise rotate a 32-bit number to the left.\r
+ */\r
+function bit_rol(num, cnt)\r
+{\r
+ return (num << cnt) | (num >>> (32 - cnt));\r
+}\r
+\r
+/*\r
+ * Convert a string to an array of little-endian words\r
+ * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.\r
+ */\r
+function str2binl(str)\r
+{\r
+ var bin = Array();\r
+ var mask = (1 << chrsz) - 1;\r
+ for(var i = 0; i < str.length * chrsz; i += chrsz)\r
+ bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);\r
+ return bin;\r
+}\r
+\r
+/*\r
+ * Convert an array of little-endian words to a string\r
+ */\r
+function binl2str(bin)\r
+{\r
+ var str = "";\r
+ var mask = (1 << chrsz) - 1;\r
+ for(var i = 0; i < bin.length * 32; i += chrsz)\r
+ str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);\r
+ return str;\r
+}\r
+\r
+/*\r
+ * Convert an array of little-endian words to a hex string.\r
+ */\r
+function binl2hex(binarray)\r
+{\r
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";\r
+ var str = "";\r
+ for(var i = 0; i < binarray.length * 4; i++)\r
+ {\r
+ str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +\r
+ hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);\r
+ }\r
+ return str;\r
+}\r
+\r
+/*\r
+ * Convert an array of little-endian words to a base-64 string\r
+ */\r
+function binl2b64(binarray)\r
+{\r
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\r
+ var str = "";\r
+ for(var i = 0; i < binarray.length * 4; i += 3)\r
+ {\r
+ var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16)\r
+ | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )\r
+ | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);\r
+ for(var j = 0; j < 4; j++)\r
+ {\r
+ if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;\r
+ else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);\r
+ }\r
+ }\r
+ return str;\r
+}\r
--- /dev/null
+// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
+
+function setLMCookie(name, value) {
+ document.cookie = name + "=" + value;
+}
+
+function getLMCookie(name) {
+ foobar = document.cookie.split(name + "=");
+ if (foobar.length < 2) {
+ return null;
+ }
+ tempString = foobar[1];
+ if (tempString.indexOf(";") == -1) {
+ return tempString;
+ }
+ yafoobar = tempString.split(";");
+ return yafoobar[0];
+}
+
+function parseExpandString() {
+ expandString = getLMCookie("expand");
+ expand = new Array();
+ if (expandString) {
+ expanded = expandString.split("|");
+ for (i=0; i<expanded.length-1; i++) {
+ expand[expanded[i]] = 1;
+ }
+ }
+}
+
+function parseCollapseString() {
+ collapseString = getLMCookie("collapse");
+ collapse = new Array();
+ if (collapseString) {
+ collapsed = collapseString.split("|");
+ for (i=0; i<collapsed.length-1; i++) {
+ collapse[collapsed[i]] = 1;
+ }
+ }
+}
+
+parseExpandString();
+parseCollapseString();
+
+function saveExpandString() {
+ expandString = "";
+ for (i=0; i<expand.length; i++) {
+ if (expand[i] == 1) {
+ expandString += i + "|";
+ }
+ }
+ setLMCookie("expand", expandString);
+}
+
+function saveCollapseString() {
+ collapseString = "";
+ for (i=0; i<collapse.length; i++) {
+ if (collapse[i] == 1) {
+ collapseString += i + "|";
+ }
+ }
+ setLMCookie("collapse", collapseString);
+}
+
--- /dev/null
+// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
+
+function parseExpandString() {
+ expand = new Array();
+}
+
+function parseCollapseString() {
+ collapse = new Array();
+}
+
+parseExpandString();
+parseCollapseString();
+
+function saveExpandString() {}
+
+function saveCollapseString() {}
+
--- /dev/null
+// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
+
+function {toggle_function_name}(nodeid) {
+ if ((!DOM || Opera56 || Konqueror22) && !IE4) {
+ return;
+ }
+ layersMoved = 0;
+ parseExpandString();
+ parseCollapseString();
+ if (!IE4) {
+ sonLayer = document.getElementById('jt' + nodeid + 'son');
+ nodeLayer = document.getElementById('jt' + nodeid + 'node');
+ folderLayer = document.getElementById('jt' + nodeid + 'folder');
+ } else {
+ sonLayer = document.all('jt' + nodeid + 'son');
+ nodeLayer = document.all('jt' + nodeid + 'node');
+ folderLayer = document.all('jt' + nodeid + 'folder');
+ }
+ if (sonLayer.style.display == "none") {
+ sonLayer.style.display = "block";
+ if (nodeLayer.src.indexOf("{img_expand}") > -1) {
+ nodeLayer.src = "{img_collapse}";
+ } else if (nodeLayer.src.indexOf("{img_expand_first}") > -1) {
+ nodeLayer.src = "{img_collapse_first}";
+ } else {
+ nodeLayer.src = "{img_collapse_corner}";
+ }
+ folderLayer.src = "{img_folder_open}";
+ expand[nodeid] = 1;
+ collapse[nodeid] = 0;
+ } else {
+ sonLayer.style.display = "none";
+ if (nodeLayer.src.indexOf("{img_collapse}") > -1) {
+ nodeLayer.src = "{img_expand}";
+ } else if (nodeLayer.src.indexOf("{img_collapse_first}") > -1) {
+ nodeLayer.src = "{img_expand_first}";
+ } else {
+ nodeLayer.src = "{img_expand_corner}";
+ }
+ folderLayer.src = "{img_folder_closed}";
+ expand[nodeid] = 0;
+ collapse[nodeid] = 1;
+ }
+ saveExpandString();
+ saveCollapseString();
+}
+
--- /dev/null
+<?php
+if (isset($_REQUEST['nlang'])) {
+ setcookie('lang',$_REQUEST['nlang'],(time()+25920000));
+ $_COOKIE['lang'] = $_REQUEST['nlang'];
+}
+
+// include common definitions
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+$page = new $globals->toplevel;
+$_SESSION['session']->doAuth($page);
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+$myuid = $_SESSION['session']->uid;
+
+switch ($action) {
+case "passwd":
+ if ($_SESSION['session']->auth == "native") {
+ $page->info(__("Changing password.."));
+ $newpass = $_REQUEST['newpass'];
+ $globals->db->query("update {$globals->tauth['native']} set password='$newpass' where user_id='$myuid'");
+ }
+ break;
+}
+
+
+$page->assign('md5',$page->url('md5.js'));
+$page->assign('native',$_SESSION['session']->auth == "native");
+$page->assign('username',$_SESSION['session']->username);
+$page->assign('fullname',$_SESSION['session']->fullname);
+$page->assign('langs', $globals->locales);
+
+$page->assign('page', __("User preferences"));
+$page->assign('greeting', __("Diogenes preferences"));
+
+$page->assign('msg_myinfo' ,__("my information"));
+$page->assign('msg_username' ,__("username"));
+$page->assign('msg_fullname' ,__("full name"));
+
+$page->assign('msg_lang', __("language"));
+$page->assign('msg_lang_blab', __("You can select your preferred language by clicking on the appropriate language below."));
+
+$page->assign('msg_mypassword' ,__("my password"));
+$page->assign('msg_password' ,__("new password"));
+$page->assign('msg_confirmation' ,__("confirmation"));
+
+$page->assign('submit', __("Change"));
+
+$page->display("prefs.tpl");
+?>
--- /dev/null
+<?php
+if (preg_match("/^\/([^\/]+)\/webdav(\/.*)?$/",$_SERVER['PATH_INFO'],$tmp)) {
+
+ // this is a WebDAV operation
+ require_once 'diogenes.common.inc.php';
+ require_once 'diogenes.webdav.inc.php';
+ $server = new $globals->webdav;
+ $server->ServeRequest();
+
+} elseif (preg_match("/^\/([^\/]+)\/admin\/(.*)/",$_SERVER['PATH_INFO'],$tmp)) {
+ $afile = $tmp[2];
+ if (preg_match("/^(ekitapplet|gnu-regexp-1.1.4|kafenio-config|kafenio-icons|kafenio)\.jar$/", $afile)) {
+ header("Content-Type: application/java-archive");
+ header("Last-modified:".gmdate("D, d M Y H:i:s T", filemtime($afile)));
+ readfile($afile);
+ } else {
+ // include the requested admin page
+ if (!$afile) $afile = "index";
+ require("admin/$afile.php");
+ }
+
+} else {
+
+ // post or get on a barrel file
+ require_once 'diogenes.common.inc.php';
+ require_once 'diogenes.barrel.inc.php';
+ $page = new $globals->barrel;
+
+ if (!$globals->validatepages)
+ $page->assign("skipvalidator",1);
+
+ $page->doContent();
+
+}
+?>
--- /dev/null
+#header {
+ background-color: #787878;
+ background-image: url(images/banner.png);
+ background-repeat: no-repeat;
+ background-attachment: scroll;
+ height: 55px;
+ background-position: right;
+ margin:0; padding:0;
+ border-bottom: 1px solid black;
+}
+
+#header .logo {
+ height: 55px;
+ background-image: url(images/barrel.gif);
+ background-repeat: no-repeat;
+ background-position: center;
+ margin:0;
+}
+
+#header .titlebar {
+ padding: 10px;
+}
+
+.menu a {
+ background-image: url(images/menu-back.gif);
+ background-position: right bottom;
+ background-repeat: no-repeat;
+}
+
+.logevents {
+ font-weight: bold;
+ font-size: 9pt;
+ text-align: right;
+}
+
+.logmain {
+ font-weight: bold;
+ font-size: 9pt;
+}
+
+.center {
+ text-align: center;
+}
+
+.auth {
+ font-weight: bold;
+ font-size: 9pt;
+}
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'diogenes/diogenes.table-editor.inc.php';
+
+$page = new $globals->toplevel(true);
+$page->assign('greeting',__("User accounts"));
+
+$editor = new DiogenesTableEditor("diogenes_auth","user_id");
+
+$editor->add_join_table("diogenes_perm","uid",true);
+
+$editor->describe("username", __("username"), true);
+$editor->describe("firstname", __("first name"), true);
+$editor->describe("lastname", __("last name"), true);
+$editor->describe("password", __("password"), false, "password");
+$editor->describe("perms", __("permissions"), true, "set");
+
+$editor->addAction(__("view log"), "logger.php?logauth=native&loguser=%username%");
+$editor->run($page,'page_content');
+$page->display('');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+
+$page = new $globals->toplevel(true);
+$page->assign('post',$page->script_self());
+$page->assign('greeting', __("Site administrators"));
+$page->assign('msg_site',__("site"));
+$page->assign('msg_admin',__("administrator"));
+$page->assign('msg_actions',__("actions"));
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+switch($action) {
+case "add":
+ if (isset($_REQUEST['target']) && isset($_REQUEST['auth']) && isset($_REQUEST['username'])) {
+ $auth = $_REQUEST['auth'];
+ if ($uid = call_user_func(array($globals->session,'getUserId'),$auth,$_REQUEST['username']))
+ $globals->db->query("replace into diogenes_perm set alias='{$_REQUEST['target']}',auth='$auth',uid='$uid',perms='admin'");
+ else
+ $page->info(__("Could not find requested user")." '{$_REQUEST['username']}'");
+ }
+ break;
+
+case "demote":
+ if (isset($_REQUEST['target']) && isset($_REQUEST['uid']))
+ $globals->db->query("replace into diogenes_perm set alias='{$_REQUEST['target']}',auth='{$_REQUEST['auth']}',uid='{$_REQUEST['uid']}',perms='user'");
+ break;
+
+case "remove":
+ if (isset($_REQUEST['target']) && isset($_REQUEST['uid']))
+ $globals->db->query("delete from diogenes_perm where alias='{$_REQUEST['target']}' and auth='{$_REQUEST['auth']}' and uid='{$_REQUEST['uid']}'");
+ break;
+}
+
+// add alias/username entries
+$odd = false;
+$res = $globals->db->query("select s.alias,s.vhost,auth,uid from diogenes_perm as p".
+ " left join diogenes_site as s on s.alias=p.alias".
+ " where p.perms='admin' order by alias,auth");
+while (list($target,$vhost,$auth,$uid) = mysql_fetch_row($res)) {
+ $username = call_user_func(array($globals->session,'getUsername'),$auth,$uid);
+ $actions = array(
+ array(__("site users"), $page->urlBarrel($target,$vhost,"admin/users")),
+ array(__("demote to user"),"?action=demote&target=$target&auth=$auth&uid=$uid"),
+ array(__("remove"),"?action=remove&target=$target&auth=$auth&uid=$uid"),
+ array(__("view log"),"logger.php?logauth=$auth&loguser=$username")
+
+ );
+ $page->append('entries',array($odd ? "odd" : "even",$target,$globals->tlabel[$auth],$username,$actions));
+ $odd = !$odd;
+}
+mysql_free_result($res);
+
+// add the sites
+$res = $globals->db->query("select alias from diogenes_site");
+$sites = array();
+while (list($target) = mysql_fetch_row($res))
+ $sites[$target]=$target;
+$page->assign('sites', $sites);
+mysql_free_result($res);
+
+// auth methods
+foreach ($globals->tauth as $key=>$val)
+ $auths[$key]=$globals->tlabel[$key];
+$page->assign('auths',$auths);
+
+$page->display('toplevel-admins.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'diogenes/diogenes.table-editor.inc.php';
+
+$page = new $globals->toplevel(false);
+$page->assign('greeting',__("Initial setup"));
+
+// check we are using native Diogenes authentication
+if ((count($globals->tauth) != 1) or empty($globals->tauth["native"])) {
+ $page->assign('page_content', __("Sorry, this feature is only available using native Diogenes authentication."));
+ $page->display('');
+ exit;
+}
+
+// check there are currently no admins
+$res = $globals->db->query("select username from {$globals->tauth["native"]} where perms='admin'");
+if (list($username) = mysql_fetch_row($res)) {
+ $page->assign('page_content', __("The database is already configured."));
+ $page->display('');
+ exit;
+}
+
+$editor = new DiogenesTableEditor("diogenes_auth","user_id");
+
+$editor->add_join_table("diogenes_perm","uid",true);
+
+$editor->describe("username", __("username"), true);
+$editor->describe("firstname", __("first name"), true);
+$editor->describe("lastname", __("last name"), true);
+$editor->describe("password", __("password"), false, "password");
+$editor->describe("perms", __("permissions"), true, "set");
+
+$editor->lock("username", "root");
+$editor->lock("perms", "admin");
+if (empty($_REQUEST['action']) or ($_REQUEST['action'] != 'update'))
+{
+ $_REQUEST['action'] = 'edit';
+}
+
+$editor->run($page,'page_content');
+
+// check if we have completed initial setup
+$res = $globals->db->query("select username from {$globals->tauth["native"]} where perms='admin'");
+if (list($username) = mysql_fetch_row($res)) {
+ $page->assign('page_content', __("The initial setup of the database was performed successfuly."));
+}
+
+$page->display('');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'Barrel/Editor.php';
+
+$page = new $globals->toplevel(true);
+
+$editor = new Diogenes_Barrel_Editor();
+$editor->run($page, 'sites_content');
+
+if (!$globals->checkRootUrl())
+{
+ $page->assign('msg_information', __('Warning : in order to make use of virtual hosts or WebDAV, you need to set $globals->rooturl to a full URL starting with http:// or https:// in your Diogenes configuration file.'));
+}
+
+$page->assign('greeting',__("List of sites"));
+$page->display('toplevel-sites.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'diogenes/diogenes.logger-view.inc.php';
+
+$page = new $globals->toplevel(true);
+$page->assign('greeting', __("User activity log"));
+
+$logview = new DiogenesLoggerView;
+$logview->run($page,'page_content');
+$page->display('');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'diogenes/diogenes.table-editor.inc.php';
+
+// set up the page
+$page = new $globals->toplevel(true);
+$page->assign("greeting",__("Logger actions"));
+
+// set up the editor
+$editor = new DiogenesTableEditor($globals->table_log_actions,"id");
+$editor->add_join_table($globals->table_log_events,"action",true);
+$editor->describe("text", __("title"), true);
+$editor->describe("description", __("description"), true);
+
+// run the editor
+$editor->run($page,'page_content');
+$page->display('');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'diogenes/diogenes.logger-view.inc.php';
+// dependency on PEAR
+require_once 'System.php';
+
+$page = new $globals->toplevel(true);
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+
+switch ($action) {
+case "options":
+ $globals->updateOption("menu_style", $_REQUEST['menu_style']);
+ if (isset($_REQUEST['menu_theme']))
+ $globals->updateOption("menu_theme", $_REQUEST['menu_theme']);
+ $globals->updateOption("template_dir", $_REQUEST['template_dir']);
+ $globals->updateOption("template", $_REQUEST['template']);
+ $globals->updateOption("html_editor", $_REQUEST['html_editor']);
+ $globals->updateOption("word_import", $_REQUEST['word_import']);
+ $globals->updateOption("debugdatabase", $_REQUEST['debugdatabase'] ? 1 : 0);
+ $globals->updateOption("debugplugins", $_REQUEST['debugplugins'] ? 1 : 0);
+ $globals->updateOption("validatepages", $_REQUEST['validatepages'] ? 1 : 0);
+ break;
+}
+
+
+// fill out values
+$page->assign('menu_styles', $globals->menu_styles);
+$page->assign('menu_style', $globals->menu_style);
+if ($globals->menu_style == 1 || $globals->menu_style == 2) {
+ $page->assign('menu_themes', $globals->menu_themes);
+ $page->assign('menu_theme', $globals->menu_theme);
+}
+$page->assign('template_dir', $globals->template_dir);
+$page->assign('template', $globals->template);
+$page->assign('templates', $page->getTemplates());
+
+$page->assign('validatepages', $globals->validatepages);
+
+$page->assign('html_editors', $globals->html_editors);
+$page->assign('html_editor', $globals->html_editor);
+
+$page->assign('word_imports', $globals->word_imports);
+$page->assign('word_import', $globals->word_import);
+
+$page->assign('debugdatabase', $globals->debugdatabase);
+$page->assign('debugplugins', $globals->debugplugins);
+
+// translations
+$page->assign('greeting', __("Global options"));
+$page->toolbar(__("Mode"), array( __("standard"), array(__("expert"), "options_expert.php")));
+$page->assign('msg_display_options', __("display options"));
+$page->assign('msg_menu_style', __("menu style"));
+$page->assign('msg_menu_theme', __("menu theme"));
+$page->assign('msg_site_template_dir', __("templates directory"));
+$page->assign('msg_site_template', __("default template"));
+$page->assign('msg_validate_pages', __("display W3C validator links for barrel pages"));
+$page->assign('msg_system_options', __("system options"));
+$page->assign('msg_html_editor', __("HTML editor"));
+$page->assign('msg_word_import', __("Word document import"));
+$page->assign('msg_debug_options', __("debugging options"));
+$page->assign('msg_debug_database', __("debug database"));
+$page->assign('msg_debug_plugins', __("debug plugins"));
+$page->assign('msg_submit', __("Submit"));
+
+$page->display('toplevel-options.tpl');
+
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'diogenes/diogenes.table-editor.inc.php';
+
+// set up the page
+$page = new $globals->toplevel(true);
+$page->assign("greeting",__("Global options"));
+$page->toolbar(__("Mode"), array( array( __("standard"), "options.php" ), __("expert")));
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+
+switch ($action) {
+case "cvs-rcs":
+ $page->info("converting spool from CVS to RCS..");
+ $res = $globals->db->query("select alias from diogenes_site");
+ while(list($site) = mysql_fetch_row($res)) {
+ $page->info("processing '$site'..");
+ $spool = new DiogenesSpool($page,$site);
+ $page->info("-> deleting 'CVS' subdirectories from spool..");
+ $goners = System::find($spool->datadir.' -type d');
+ foreach($goners as $goner) {
+ if (basename($goner) == "CVS")
+ System::rm("-r $goner");
+ }
+ $page->info("-> changing files in spool to read-only..");
+ $modfiles = System::find($spool->datadir.' -type f');
+ foreach($modfiles as $modfile) {
+ chmod($modfile,0444);
+ }
+ }
+ $globals->updateOption("rcs","DiogenesRcs");
+ break;
+
+case "rcs-cvs":
+ $page->info("converting spool from RCS to CVS..");
+ if (!is_dir("{$globals->rcsroot}/CVSROOT")) {
+ $page->info("-> no CVSROOT not found, running init..");
+ if ($ret = shell_exec(escapeshellcmd("cvs -d".escapeshellarg($globals->rcsroot)." init")))
+ $page->info($ret);
+ }
+
+ // remove current spool dirs and do a clean checkout of each site
+ $res = $globals->db->query("select alias from diogenes_site");
+ while(list($site) = mysql_fetch_row($res)) {
+ $page->info("processing '$site'..");
+ $page->info("-> removing '{$globals->spoolroot}/$site'..");
+ System::rm("-r {$globals->spoolroot}/$site");
+ $page->info("-> doing a checkout of module '$site'..");
+ $spool = new DiogenesCvs($page,$site,$_SESSION['session']->username,true);
+ }
+ $globals->updateOption("rcs","DiogenesCvs");
+ break;
+}
+
+$page->assign('msg_convert',__("Convert"));
+$page->assign('msg_vcs',__("version control system"));
+
+switch ($globals->rcs) {
+case "DiogenesRcs":
+ $page->assign('msg_current_vcs',__("You are currently using RCS as the version control system for your barrels."));
+ $page->append('conversions',array("rcs-cvs", __("You can switch to a full CVS repository by clicking here.")));
+ break;
+
+case "DiogenesCvs":
+ $page->assign('msg_current_vcs',__("You are currently using CVS as the version control system for your barrels."));
+ $page->append('conversions',array("cvs-rcs", __("You can switch back to RCS by clicking here.")));
+ break;
+}
+
+
+// set up the editor
+$editor = new DiogenesTableEditor($globals->table_global_options,"name",true);
+$editor->add_where_condition("barrel=''");
+$editor->hide('barrel', '');
+$editor->describe("name", __("option"), false);
+$editor->describe("value", __("value"), true);
+
+// run the editor
+$editor->table_style = "width:80%";
+$editor->run($page,'editor_content');
+
+$page->display('toplevel-options_expert.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.toplevel.inc.php';
+require_once 'Plugin/Editor.php';
+
+$page = new $globals->toplevel(true);
+$page->assign('post',$page->script_self());
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
+$barrel = isset($_REQUEST['plug_barrel']) ? $_REQUEST['plug_barrel'] : '';
+
+if ($action == "clean")
+{
+ $globals->plugins->clean_database($page);
+}
+
+if ($barrel)
+{
+ $page->assign('greeting',__("Barrel plugins") . " - $barrel");
+} else {
+ $page->assign('greeting',__("Global plugin settings"));
+}
+
+/* plugin editor */
+$editor = new Diogenes_Plugin_Editor($barrel, 0);
+$editor->hide_params(1);
+$editor->run($page,'editor_content');
+
+// if necessary, rebuild site plugin caches
+if ($action == "update" && !$barrel)
+{
+ $res = $globals->db->query("select alias,flags from diogenes_site");
+ while (list($p_alias, $p_flags) = mysql_fetch_row($res))
+ {
+ $flags = new flagset($p_flags);
+ if ($p_alias && $flags->hasFlag('plug'))
+ {
+ $page->info(sprintf( __("Rebuilding plugin cache for barrel '%s'"), $p_alias));
+ $cachefile = $globals->plugins->cacheFile($p_alias);
+ $globals->plugins->compileCache($cachefile, $p_alias);
+ }
+ }
+ mysql_free_result($res);
+}
+
+// translations
+$page->assign('msg_clean_database', __('Clean plugins database'));
+$page->assign('msg_clean_database_text', __("If you are having problems with references to plugins that no longer exist, you can have Diogenes remove such entries from the database."));
+$page->assign('msg_clean', __("Clean"));
+
+$page->assign('msg_enable_disable', __('Enable or disable plugins'));
+if ($barrel)
+{
+ $page->assign('msg_enable_disable_text', __("You can select the plugins you want to enable for this barrel."));
+} else {
+ $page->assign('msg_enable_disable_text', __("You can select the plugins you want to enable or disable globally, that is the plugins that can be used in the different barrels. Please note that for a plugin to be accessible from a barrel, you will need to activate that plugin for the barrel. To do this, from the <i>List of sites</i> click on 'plugins' next to the barrel of your choice."));
+}
+$page->display('toplevel-plugins.tpl');
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Barrel/Page.php';
+require_once 'Barrel/Options.php';
+require_once 'diogenes/diogenes.flagset.inc.php';
+
+
+/** This class describes a Diogenes Barrel.
+ */
+class Diogenes_Barrel
+{
+ /** The barrel's alias. */
+ var $alias;
+
+ /** The database table holding the menus */
+ var $table_menu;
+
+ /** The database table holding the pages */
+ var $table_page;
+
+ /** The site's flags. */
+ var $flags;
+
+ /** The site's options. */
+ var $options;
+
+ /** Cache of the homepage ID */
+ var $homepage;
+
+ /** Handle to the spool */
+ var $spool;
+
+ /** If the barrel is running on a virtualhost. */
+ var $vhost;
+
+ /** Cache of tree */
+ var $treeCache;
+
+ /** File containing the tree cache. */
+ var $treeCacheFile;
+
+ /** Cache of the plugins */
+ var $pluginsCache;
+
+ /** File containing the plugin cache. */
+ var $pluginsCacheFile;
+
+
+ /** Construct a Diogenes Barrel.
+ *
+ * @param $alias
+ */
+ function Diogenes_Barrel($alias)
+ {
+ global $globals;
+ $webdav = '';
+
+ // Retrieve site-wide info from database
+ $res = $globals->db->query("select alias,vhost,flags from diogenes_site where alias='$alias'");
+ if (!list($this->alias,$this->vhost,$flags) = mysql_fetch_row($res)) {
+ return;
+ }
+ mysql_free_result($res);
+
+ $this->table_menu = "{$this->alias}_menu";
+ $this->table_page = "{$this->alias}_page";
+ $this->treeCacheFile = $globals->spoolroot."/diogenes_c/". $this->alias.".tree";
+ $this->pluginsCacheFile = $globals->plugins->cacheFile($this->alias);
+
+ $this->flags = new flagset($flags);
+ $this->options = new Diogenes_Barrel_Options($this->alias);
+ $this->spool = new DiogenesSpool($this,$this->alias);
+
+ $this->readTree();
+ }
+
+
+ /** Create a new Diogenes barrel. This creates the database, RCS and
+ * spool entries for the new barrel.
+ *
+ * @param $alias
+ * @param $caller
+ */
+ function create($alias, &$caller)
+ {
+ global $globals;
+
+ /* sanity check */
+ if (!preg_match("/^[a-zA-Z0-9_]+$/",$alias) or
+ in_array($alias, $globals->invalidaliases))
+ {
+ $caller->info("Invalid barrel name!");
+ return;
+ }
+
+ $res = $globals->db->query("select alias from diogenes_site where alias='$alias'");
+ if (mysql_num_rows($res) > 0) {
+ $caller->info("Entry '{$alias}' already exists in table 'diogenes_site'!");
+ return;
+ }
+
+ if (file_exists("{$globals->rcsroot}/$alias")) {
+ $caller->info("Directory '{$globals->rcsroot}/$alias' already exists!");
+ return;
+ }
+
+ if (!is_dir($globals->rcsroot) || !is_writable($globals->rcsroot)) {
+ $caller->info("Directory '{$globals->rcsroot}' is not writable!");
+ return;
+ }
+
+ /* log this event */
+ $caller->log("barrel_create","$alias:*");
+
+ /* create DB entry */
+ $globals->db->query("insert into diogenes_site set alias='$alias'");
+
+ $globals->db->query("CREATE TABLE {$alias}_menu ("
+ . "MID int(10) unsigned NOT NULL auto_increment,"
+ . "MIDpere int(10) unsigned NOT NULL,"
+ . "ordre int(10) unsigned NOT NULL,"
+ . "title tinytext NOT NULL,"
+ . "link text NOT NULL,"
+ . "PID int(10) unsigned NOT NULL,"
+ . "PRIMARY KEY (MID)"
+ . ") TYPE=MyISAM;");
+
+ $globals->db->query("CREATE TABLE {$alias}_page ("
+ . "PID int(10) unsigned NOT NULL auto_increment,"
+ . "parent INT( 10 ) UNSIGNED NOT NULL default '0',"
+ . "location tinytext NOT NULL,"
+ . "title tinytext NOT NULL,"
+ . "status tinyint(1) unsigned NOT NULL default '0',"
+ . "perms enum('public','auth','user','admin','forbidden') NOT NULL default 'public',"
+ . "wperms enum('public','auth','user','admin','forbidden') NOT NULL default 'admin',"
+ . "template varchar(255) NOT NULL,"
+ . "PRIMARY KEY (PID)"
+ . ") TYPE=MyISAM;");
+
+ /* set the barrel's title */
+ $opt = new Diogenes_Barrel_Options($alias);
+ $opt->updateOption('title',$alias);
+
+ /* create entry for the homepage */
+ $globals->db->query("insert into {$alias}_page set location='temp'");
+ $homepage = mysql_insert_id();
+ $globals->db->query("update {$alias}_page set location='',title='Home',perms='public' where PID='$homepage'");
+
+ /* create home page & copy CSS template */
+ $rcs = new $globals->rcs($caller,$alias,$_SESSION['session']->username,true);
+ $rcs->newdir("",$homepage);
+ $rcs->commit($homepage,$globals->htmlfile,"");
+ $rcs->commit($homepage,$globals->cssfile,
+ file_get_contents("{$globals->root}/{$globals->cssfile}") );
+ }
+
+
+ /** Destroy a Diogenes barrel. This removes the related database, RCS
+ * and spool entries.
+ *
+ * @param $alias
+ * @param $caller
+ */
+ function destroy($alias, &$caller) {
+ global $globals;
+
+ /** Sanity check */
+ if (!$alias) {
+ $caller->info("Empty alias supplied!");
+ return;
+ }
+
+ /* log this event */
+ $caller->log("barrel_delete","$alias:*");
+
+ system(escapeshellcmd("rm -rf ".escapeshellarg("{$globals->spoolroot}/$alias")));
+ system(escapeshellcmd("rm -rf ".escapeshellarg("{$globals->rcsroot}/$alias")));
+ system(escapeshellcmd("rm -f ".escapeshellarg("{$globals->spoolroot}/diogenes_c/$alias.tree")));
+ system(escapeshellcmd("rm -f ".escapeshellarg($globals->plugins->cacheFile($alias))));
+ $globals->db->query("drop table {$alias}_menu");
+ $globals->db->query("drop table {$alias}_page");
+ $globals->db->query("delete from diogenes_perm where alias='$alias'");
+ $globals->db->query("delete from diogenes_site where alias='$alias'");
+ $globals->db->query("delete from diogenes_option where barrel='$alias'");
+ $globals->db->query("delete from diogenes_plugin where barrel='$alias'");
+ }
+
+
+ /** Return the location corresponding to a given page ID
+ *
+ * @param $PID
+ */
+ function getLocation($PID)
+ {
+ return array_search($PID, $this->treeCache);
+ }
+
+
+
+ /** Return all the barrel's pages.
+ */
+ function getPages()
+ {
+ global $globals;
+ $bpages = array();
+
+ $res = $globals->db->query("select * from {$this->table_page}");
+ while ($props = mysql_fetch_assoc($res)) {
+ $bpages[$props['PID']] = new Diogenes_Barrel_Page($this, $props);
+ }
+ mysql_free_result($res);
+ return $bpages;
+ }
+
+
+ /** Return the page ID matching a given directory location
+ *
+ * @param $dir
+ */
+ function getPID($dir)
+ {
+ if (isset($this->treeCache[$dir]))
+ return $this->treeCache[$dir];
+ else
+ return;
+ }
+
+
+ /** List the plugins that are active in a given context
+ *
+ * @param $page
+ */
+ function getPlugins($page = 0)
+ {
+ $plugins = array();
+ foreach ($this->pluginsCache as $plug)
+ {
+ if ($plug['page'] == $page)
+ {
+ array_push($plugins, $plug);
+ }
+ }
+ return $plugins;
+ }
+
+
+ /** Check whether the barrel has a given flag
+ *
+ * @param $flag
+ */
+ function hasFlag($flag)
+ {
+ return $this->flags->hasFlag($flag);
+ }
+
+
+ /** Compile the directory tree
+ */
+ function compileTree()
+ {
+ global $globals;
+
+ if (!$fp = fopen($this->treeCacheFile, "w")) {
+ trigger_error("failed to open '{$this->treeCacheFile}' for writing", E_USER_ERROR);
+ return;
+ }
+
+ // load all the pages
+ $res = $globals->db->query("select * from {$this->table_page}");
+ $tpages = array();
+ while ($props = mysql_fetch_assoc($res))
+ {
+ $tpage = new Diogenes_Barrel_Page($this, $props);
+ $tpages[$props['PID']] = $tpage;
+ if (!strlen($props['location']))
+ {
+ $homepage = $props['PID'];
+ }
+ }
+
+ // recursively build the tree, starting at the homepage
+ $str = $this->compilePageTree($tpages, $homepage, '');
+ fputs($fp, $str);
+ fclose($fp);
+ }
+
+
+ /** Compile a single page
+ */
+ function compilePageTree(&$tpages, $PID, $ploc)
+ {
+ global $globals;
+
+ $cpage = $tpages[$PID];
+ $ploc = ($ploc ? "$ploc/" : "") . $cpage->props['location'];
+
+ // add this page
+ $out = "$ploc\t$PID\t".$cpage->props['parent']."\n";
+
+ // add children
+ $res = $globals->db->query("select PID from {$this->table_page} where parent='$PID'");
+ while (list($child) = mysql_fetch_row($res))
+ {
+ $out .= $this->compilePageTree($tpages, $child, $ploc);
+ }
+ mysql_free_result($res);
+ return $out;
+ }
+
+
+ /** Load all plugins for the specified page.
+ *
+ * @param $bpage
+ */
+ function loadPlugins(&$bpage)
+ {
+ global $globals;
+
+ $plugins = $this->getPlugins($bpage->props['PID']);
+
+ $loaded = array();
+ foreach ($plugins as $plugentry)
+ {
+ $loaded[$plugentry['plugin']] =& $globals->plugins->load($plugentry);
+ }
+ return $loaded;
+ }
+
+
+ /** Read the compiled plugin cache
+ */
+ function readPlugins()
+ {
+ global $globals;
+
+ $this->pluginsCache = $globals->plugins->readCache($this->pluginsCacheFile, $this->alias);
+ }
+
+
+ /** Read the compiled directory tree
+ */
+ function readTree()
+ {
+ global $globals;
+
+ // if the tree cache does not exits, try to init it
+ if (!file_exists($this->treeCacheFile)) {
+ $this->compileTree();
+ }
+
+ if (!$fp = fopen($this->treeCacheFile, "r")) {
+ trigger_error("failed to open '{$this->treeCacheFile}' for reading", E_USER_ERROR);
+ return;
+ }
+
+ $locations = array();
+ while ($line = fgets($fp))
+ {
+ $line = substr($line, 0, -1);
+ $bits = explode("\t", $line);
+ list($loc, $pid, $parent) = $bits;
+ $locations[$loc] = $pid;
+ }
+ fclose($fp);
+
+ $this->treeCache = $locations;
+ }
+
+}
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'Barrel.php';
+require_once 'Barrel/Options.php';
+
+
+/** This class provides a viewer/editor for Diogenes's barrels
+ */
+class Diogenes_Barrel_Editor
+{
+ /** Is this barrel editor read only (i.e. a list) ? */
+ var $readonly = 0;
+
+
+ /** Adds a barrel to the list of barrels we display.
+ *
+ * @param $page
+ * @param $barrel
+ */
+ function addBarrel(&$page, $barrel)
+ {
+ global $page;
+
+ $actions = array();
+ if (!$this->readonly) {
+ array_push($actions, array(__("edit"), "?action=edit&target={$barrel['alias']}"));
+ }
+ array_push($actions, array(__("admin"), $page->urlBarrel($barrel['alias'],$barrel['vhost'],"admin/")));
+
+ if (!$this->readonly) {
+ $flags = new flagset($barrel['flags']);
+ if ($flags->hasFlag('plug')) {
+ array_push($actions, array(__("plugins"), "plugins?plug_barrel={$barrel['alias']}"));
+ }
+ array_push($actions, array(__("delete"), "javascript:del('{$barrel['alias']}');"));
+ }
+
+
+ $page->append('sites',array(
+ 'alias' => $barrel['alias'],
+ 'title' => array( $barrel['title'], $page->urlBarrel($barrel['alias'],$barrel['vhost']) ),
+ 'description' => $barrel['description'],
+ 'actions' => $actions )
+ );
+ }
+
+
+ /** Run the Barrel editor.
+ *
+ * @param $page
+ * @param $outputvar
+ */
+ function run(&$page, $outputvar = '')
+ {
+ global $globals;
+
+ $page->assign('post',$page->script_self());
+
+ $action = isset($_REQUEST["action"]) ? $_REQUEST["action"] : "list";
+ switch($action) {
+ case "create":
+ if ($this->readonly) die("Sorry, this barrel editor is read-only.");
+ if (isset($_REQUEST["target"])) {
+ Diogenes_Barrel::create($_REQUEST["target"], $page);
+ }
+ $action="list";
+ break;
+ case "update":
+ if ($this->readonly) die("Sorry, this barrel editor is read-only.");
+ if (isset($_REQUEST["target"])) {
+ // build flags
+ $flags = isset($_REQUEST['flags']) ? implode(",",array_values($_REQUEST['flags'])) : "";
+ $globals->db->query("update diogenes_site set vhost='{$_REQUEST['vhost']}',flags='$flags' where alias='{$_REQUEST['target']}'");
+ $opts = new Diogenes_Barrel_Options($_REQUEST['target']);
+ $opts->updateOption('description', $_REQUEST['description']);
+ $opts->updateOption('title', $_REQUEST['title']);
+ $opts->updateOption('keywords', $_REQUEST['keywords']);
+ }
+ $action="list";
+ break;
+ case "edit":
+ if ($this->readonly) die("Sorry, this barrel editor is read-only.");
+ if (isset($_REQUEST["target"])) {
+ $res = $globals->db->query("select alias,vhost,flags from diogenes_site where alias='{$_REQUEST['target']}'");
+ if (!list($target,$vhost,$flags) = mysql_fetch_row($res)) {
+ $page->info("Could not find specified site!");
+ $action = "list";
+ break;
+ }
+ mysql_free_result($res);
+ $page->assign('target',$target);
+ $page->assign('v_vhost',$vhost);
+ $flags = new flagset($flags);
+ $flag_opts = array('tpl' => __("custom templates"), 'plug' => __("plugins"));
+ $page->assign('v_flag_opts', $flag_opts);
+ foreach($flag_opts as $key=>$val) {
+ if ($flags->hasFlag($key))
+ $page->append('v_flags', $key);
+ }
+ $opts = new Diogenes_Barrel_Options($target);
+ $page->assign('v_desc',$opts->description);
+ $page->assign('v_title',$opts->title);
+ $page->assign('v_keywords',$opts->keywords);
+
+ }
+ break;
+ case "delete":
+ if ($this->readonly) die("Sorry, this barrel editor is read-only.");
+ if (isset($_REQUEST["target"])) {
+ Diogenes_Barrel::destroy($_REQUEST["target"], $page);
+ }
+ $action="list";
+ break;
+ default:
+ $action="list";
+ }
+
+ if ($action == "list") {
+ $res = $globals->db->query("select s.alias,s.vhost,s.flags,o.name,o.value from diogenes_site as s left join diogenes_option as o on s.alias=o.barrel order by s.alias");
+ $barrel = array('alias' => '');
+
+ while (list($s_alias,$s_vhost,$s_flags,$o_name,$o_value) = mysql_fetch_row($res)) {
+ if ($s_alias != $barrel['alias']) {
+ if ($barrel['alias']) $this->addBarrel($page, $barrel);
+ $barrel = array('alias' => $s_alias,'vhost' => $s_vhost, 'flags' => $s_flags, 'title' => '','description' => '');
+ }
+ $barrel[$o_name] = $o_value;
+ }
+ mysql_free_result($res);
+ if ($barrel['alias']) $this->addBarrel($page, $barrel);
+ } // $action == "list"
+
+ // values
+ $page->assign('action',$action);
+ $page->assign('readonly', $this->readonly);
+
+
+ // translations
+ $page->assign('msg_alias',__("alias"));
+ $page->assign('msg_title',__("site"));
+ $page->assign('msg_desc',__("description"));
+ $page->assign('msg_keywords',__("keywords"));
+ $page->assign('msg_create',__("Create a new site"));
+ $page->assign('msg_create_note',__("The site alias may only contain letters, numbers and underscores."));
+ $page->assign('msg_submit',__("Submit"));
+ $page->assign('msg_no_barrels', __("no barrels available"));
+ $page->assign('msg_vhost',__("vhost (see note)"));
+ $page->assign('msg_vhost_note', __("<b>vhost note</b>: If you intend to serve this site from a virtualhost, you should enter the name of the virtualhost in this field."));
+ $page->assign('msg_flags',__("flags"));
+
+ // if requested, assign the content to be displayed
+ if (!empty($outputvar)) {
+ $page->assign($outputvar, $page->fetch('barrel-editor.tpl'));
+ }
+ }
+}
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'diogenes.icons.inc.php';
+
+/** This class describes a Barrel File.
+ */
+class Diogenes_Barrel_File
+{
+ /** The Page this File belongs to */
+ var $page;
+
+ /** File properties */
+ var $props = array();
+
+ /** Constructs a new File.
+ *
+ * @param $page
+ * @param $file
+ */
+ function Diogenes_Barrel_File(&$page, $file)
+ {
+ if (!is_object($page))
+ {
+ trigger_error("\$page is not an object!", E_USER_ERROR);
+ }
+
+ $this->page =& $page;
+ $this->props = array(
+ 'file' => $file
+ );
+
+ /*
+ if (is_array($props))
+ {
+ foreach (array_keys($props) as $key)
+ {
+ $this->props[$key] = $props[$key];
+ }
+ }*/
+ }
+
+
+ /** Delete a file (not implemented)
+ *
+ * @param $barrel
+ * @param $dir
+ */
+ function delete(&$barrel, $dir)
+ {
+ global $globals;
+
+ }
+
+
+ /** Return the list of action applicable to the file
+ *
+ * @param $canedit
+ */
+ function make_actions($canedit)
+ {
+ global $globals;
+
+ $dir = $this->page->props['PID'];
+ $file = $this->props['file'];
+
+ $rev = "files?action=revs&dir=$dir&target=$file";
+ $edit = "edit?dir=$dir&file=$file";
+ $del = "javascript:file_delete('$dir','$file');";
+ $rename = "javascript:file_rename('$dir','$file');";
+ $view = "../". $this->page->getLocation($file);
+
+ $actions = array();
+ if ($view) array_push($actions, array(__("view"), $view, "view"));
+ if ($edit && $canedit) array_push($actions, array(__("edit"), $edit, "edit"));
+ if ($rev) array_push($actions, array(__("revisions"),$rev, "revisions"));
+ if ($rename && $canedit) array_push($actions, array(__("rename"), $rename, "rename"));
+ if ($del && $canedit) array_push($actions, array(__("delete"), $del, "delete"));
+
+ return $globals->icons->get_action_icons($actions);
+ }
+
+
+ /** Build the 'File' toolbar
+ *
+ * @param $canedit
+ */
+ function make_toolbar($canedit)
+ {
+ $dir = $this->page->props['PID'];
+ $file = $this->props['file'];
+ global $afile;
+
+ $filebar = array ();
+ if ($canedit)
+ {
+ array_push($filebar, array( __("raw editor"), ($afile == "edit") ? "" : "edit?dir=$dir&file=$file"));
+ array_push($filebar, array( __("HTML editor"), ($afile == "compose") ? "" : "compose?dir=$dir&file=$file"));
+ }
+ array_push($filebar, array( __("file revisions"), "files?action=revs&dir=$dir&target=$file"));
+
+ return $filebar;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/**
+ * This class is used to handle the preferences for a barrel.
+ *
+ * Upon construction these preferences are read from database. It is also
+ * possible to update the value of the preferences and write the new value
+ * to database.
+ *
+ * @see Diogenes_Barrel
+ */
+class Diogenes_Barrel_Options
+{
+ /** The barrel we are operating on */
+ var $barrel;
+
+ /** The table holding the options */
+ var $table_option = 'diogenes_option';
+
+ /** The site's title */
+ var $title = "";
+
+ /** The site's description */
+ var $description = "";
+
+ /** The relative url to the site's favicon (PNG) */
+ var $favicon = "";
+
+ /** The site's keywords */
+ var $keywords = "";
+
+ /** Hide the Diogenes-generated menu entries */
+ var $menu_hide_diogenes = 0;
+
+ /** Minimum menu level (0 means fully expanded) */
+ var $menu_min_level = 0;
+
+ /** Menu style (0=classical, 1=phpLayersMenu) */
+ var $menu_style = 0;
+
+ /** Menu theme */
+ var $menu_theme = "gorilla";
+
+ /** Site-wide default template */
+ var $template = "";
+
+ /** Directory that hold the site's template */
+ var $template_dir = "";
+
+ /** The constructor, reads the current preferences from database.
+ */
+ function Diogenes_Barrel_Options($alias)
+ {
+ $this->barrel = $alias;
+ $this->readOptions();
+ }
+
+
+ /** Read options from database.
+ */
+ function readOptions() {
+ global $globals;
+
+ // we only accept options which already exist in this class
+ $res = $globals->db->query("select name,value from {$this->table_option} where barrel='{$this->barrel}'");
+ while (list($key,$value) = mysql_fetch_row($res)) {
+ if (isset($this->$key) && ($key != "table_option"))
+ $this->$key = $value;
+ }
+ mysql_free_result($res);
+
+ }
+
+
+ /** Update an option's value and write the new value to database.
+ */
+ function updateOption($name, $value) {
+ global $globals;
+
+ $this->$name = stripslashes($value);
+ $globals->db->query("replace into {$this->table_option} set barrel='{$this->barrel}',name='$name',value='$value'");
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'diogenes.icons.inc.php';
+require_once 'Barrel/File.php';
+
+
+/** This class describes a Barrel Page.
+ */
+class Diogenes_Barrel_Page
+{
+ /** The Barrel this Page belongs to. */
+ var $barrel;
+
+ /** The Page's properties */
+ var $props = array();
+
+
+ /** Construct a Barrel Page object.
+ *
+ * @param $barrel
+ * @param $props
+ */
+ function Diogenes_Barrel_Page(&$barrel, $props)
+ {
+ if (!is_object($barrel))
+ {
+ trigger_error("\$barrel is not an object!", E_USER_ERROR);
+ }
+
+ $this->barrel =& $barrel;
+ $this->props = array(
+ 'PID' => 0,
+ 'parent' => 0,
+ 'location' => '',
+ 'title' => '',
+ 'perms' => 'public',
+ 'wperms' => 'admin',
+ 'status' => 0,
+ 'template' => ''
+ );
+
+ if (is_array($props))
+ {
+ foreach (array_keys($props) as $key)
+ {
+ $this->props[$key] = $props[$key];
+ }
+ }
+ //echo "[" . $this->props['PID'] . "][". $this->props['location'] . "], parent : [".$this->props['parent']."]<br/>";
+ }
+
+
+ /** Delete a Barrel Page.
+ *
+ * @param $barrel
+ * @param $dir
+ * @param $caller
+ */
+ function delete(&$barrel, $dir, &$caller)
+ {
+ global $globals;
+
+ $caller->info(__("Deleting page"). " $dir");
+
+ // check there are no child pages
+ $res = $globals->db->query("select PID from {$barrel->table_page} where parent=$dir");
+ $num = mysql_num_rows($res);
+ mysql_free_result($res);
+ if ($num > 0)
+ {
+ $caller->info(__("Not deleting page, it has child pages!"));
+ return;
+ }
+
+ $rcs = $caller->getRcs();
+ $globals->db->query("delete from {$barrel->table_page} where PID=$dir");
+ $caller->log("page_delete","{$barrel->alias}:$dir");
+ system("rm -rf ". escapeshellarg($rcs->rcsPath($dir)));
+ system("rm -rf ". escapeshellarg($rcs->spoolPath($dir)));
+ $barrel->compileTree();
+ $barrel->readTree();
+ }
+
+
+ /** Read a Page's properties from database.
+ *
+ * @param $barrel
+ * @param $dir
+ */
+ function fromDb(&$barrel, $dir)
+ {
+ global $globals;
+ $retval = '';
+
+ $res = $globals->db->query("select * from {$barrel->table_page} where PID='$dir'");
+ if ($props = mysql_fetch_assoc($res)) {
+ $retval = new Diogenes_Barrel_Page($barrel, $props);
+ }
+ mysql_free_result($res);
+ return $retval;
+ }
+
+
+ /** Returns the location of a given file
+ *
+ * @param $file
+ */
+ function getLocation($file = '')
+ {
+ $dirloc = $this->barrel->getLocation($this->props['PID']);
+ $floc = (strlen($dirloc) ? "$dirloc/" : '') . $file;
+ return $floc;
+ }
+
+
+ /** Return the list of action applicable to the page
+ */
+ function make_actions()
+ {
+ global $globals;
+ $props = $this->props;
+
+ $actions = array(
+ array( __("view"), "../". $this->getLocation(), "view" ),
+ array( __("edit"), "edit?dir={$props['PID']}&file=page.html", "edit"),
+ array( __("properties"), "pages?action=edit&dir={$props['PID']}", "properties"),
+ array( __("revisions"), "files?action=revs&dir={$props['PID']}&target={$globals->htmlfile}","revisions")
+ );
+
+ if ($this->barrel->flags->hasFlag('plug'))
+ {
+ array_push($actions, array( __("plugins"), "plugins?plug_page={$props['PID']}", "plugins"));
+ }
+ if ($props['location'] != '')
+ array_push($actions, array( __("delete"), "javascript:page_delete('{$props['PID']}','{$props['location']}');","delete"));
+
+ return $globals->icons->get_action_icons($actions);
+ }
+
+
+ /** Build the 'Page' toolbar
+ */
+ function make_toolbar()
+ {
+ global $globals;
+ $props = $this->props;
+
+ $topbar = array ();
+
+ if ($props['PID']) {
+ $hp = $this->barrel->getPID('');
+ array_push($topbar, array(__("home"), ($props['PID'] == $hp) ? "" : "files?dir=$hp"));
+ array_push($topbar, array(__("parent page"), $props['parent'] ? "files?dir=".$props['parent'] : ""));
+
+ array_push($topbar, array( __("browse files"), "files?dir={$props['PID']}" ));
+ array_push($topbar, array( __("page properties"), "pages?dir={$props['PID']}" ));
+ array_push($topbar, array( __("view page"), "../". $this->getLocation()));
+ array_push($topbar, array(__("add a page"), "pages?action=edit&parent=".$props['PID']) );
+ if ($this->barrel->flags->hasFlag("plug")) {
+ array_push($topbar, array( __("plugins"), "plugins?plug_page={$props['PID']}" ) );
+ }
+ }
+
+ return $topbar;
+
+ }
+
+
+ /** Build the 'File' toolbar
+ */
+ function make_doc_toolbar(&$rcs)
+ {
+ global $globals;
+
+ if ($globals->word_import && file_exists($rcs->spoolPath($this->props['PID'],$globals->wordfile)) ) {
+ $bfile = new Diogenes_Barrel_File($this, $globals->wordfile);
+ $toolbar = $bfile->make_toolbar(0);
+ } else {
+ $bfile = new Diogenes_Barrel_File($this, $globals->htmlfile);
+ $toolbar = $bfile->make_toolbar(1);
+ }
+ return $toolbar;
+ }
+
+
+ /** Write the page's properties to database
+ *
+ * @param $homepage
+ * @param $caller
+ */
+ function toDb($homepage, &$caller)
+ {
+ global $globals;
+
+ $props = $this->props;
+ // check we are not creating a publicly writable page
+ // on a barrel with PHP execution enabled!
+ if ($props['PID'])
+ {
+ $cache = $globals->plugins->readCache($this->barrel->pluginsCacheFile, $this->barrel->alias);
+ $plugs_active = $globals->plugins->cachedActive($cache, $this->barrel->alias, $props['PID']);
+ foreach($plugs_active as $plugentry)
+ {
+ $plug_h = $globals->plugins->load($plugentry);
+ if (!is_object($plug_h))
+ {
+ $caller->info("failed to load plugin '{$plugentry['plugin']}'");
+ return;
+ }
+ if (!$plug_h->allow_wperms($props['wperms']))
+ {
+ $caller->info("plugin '{$plugentry['plugin']}' is not allowed with write permissions '{$props['wperms']}'!");
+ return;
+ }
+ }
+ }
+
+
+ // check that the location is valid
+ if ($homepage)
+ {
+ // homepage
+ $props['location'] = '';
+
+ } else {
+
+ // check the location is well formatted
+ if (!preg_match("/^[a-zA-Z0-9_\-]*$/",$props['location']))
+ {
+ $caller->info(__("the page location cannot contain spaces or special characters"));
+ return;
+ }
+
+ // check this is not a forbidden location
+ if (in_array($props['location'], $globals->invalidlocations))
+ {
+ $caller->info(__("this location cannot be used, it is reserved by Diogenes"));
+ return;
+ }
+
+ }
+
+ // this is a new entry, initialise
+ if (!$props['PID']) {
+ // new entry
+ $globals->db->query("insert into {$this->barrel->table_page} set location='temp'");
+ $props['PID'] = mysql_insert_id();
+ $caller->info(__("Creating new page")." {$props['PID']}");
+
+ $caller->log("page_create","{$this->barrel->alias}:{$props['PID']}");
+
+ // initialise the page
+ $rcs = $caller->getRcs();
+ $rcs->newdir("",$props['PID']);
+ $rcs->commit($props['PID'],$globals->htmlfile,"");
+ } else {
+ $caller->log("page_props","{$this->barrel->alias}:{$props['PID']}");
+ }
+
+
+ // check we have a location
+ if (!$homepage and !strlen($props['location']))
+ {
+ $props['location'] = $props['PID'];
+ }
+
+
+ // check that the filiation is valid
+ if ($props['parent'])
+ {
+ // we need to insure that the parent is not already a child of the current page
+ $parent = $props['parent'];
+ while ($parent)
+ {
+ $oldparent = $parent;
+ $res = $globals->db->query("select parent from {$this->barrel->table_page} where PID=$parent");
+ list($parent) = mysql_fetch_row($res);
+ mysql_free_result($res);
+ if ($parent == $props['PID'])
+ {
+ $caller->info(__("A page cannot be its own parent (page $oldparent is a child of $parent)!"));
+ break;
+ }
+ }
+ }
+
+// $caller->info("setting parent to {$props['parent']}");
+
+ // update data fields
+ $sql =
+ "update {$this->barrel->table_page} set ".
+ "parent='{$props['parent']}',".
+ "location='{$props['location']}',".
+ "title='{$props['title']}',".
+ "perms='{$props['perms']}',".
+ "wperms='{$props['wperms']}',".
+ "status='{$props['status']}',".
+ "template='{$props['template']}' ".
+ "where PID='{$props['PID']}'";
+ //$caller->info($sql);
+ $globals->db->query($sql);
+
+ // order by location
+ $globals->db->query("alter table {$this->barrel->table_page} order by parent,location");
+
+ // recompile tree
+ $this->barrel->compileTree();
+ $this->barrel->readTree();
+ }
+}
+
+?>
--- /dev/null
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Hartmut Holzgraefe <hholzgra@php.net> |
+// | Christian Stocker <chregu@bitflux.ch> |
+// +----------------------------------------------------------------------+
+//
+// $Id: Server.php,v 1.21 2004/04/14 21:44:26 hholzgra Exp $
+//
+require_once "HTTP/WebDAV/Tools/_parse_propfind.php";
+require_once "HTTP/WebDAV/Tools/_parse_proppatch.php";
+require_once "HTTP/WebDAV/Tools/_parse_lockinfo.php";
+
+
+
+/**
+ * Virtual base class for implementing WebDAV servers
+ *
+ * WebDAV server base class, needs to be extended to do useful work
+ *
+ * @package HTTP_WebDAV_Server
+ * @author Hartmut Holzgraefe <hholzgra@php.net>
+ * @version 0.99.1dev
+ */
+class HTTP_WebDAV_Server
+{
+ // {{{ Member Variables
+
+ /**
+ * URI path for this request
+ *
+ * @var string
+ */
+ var $path;
+
+ /**
+ * Realm string to be used in authentification popups
+ *
+ * @var string
+ */
+ var $http_auth_realm = "PHP WebDAV";
+
+ /**
+ * String to be used in "X-Dav-Powered-By" header
+ *
+ * @var string
+ */
+ var $dav_powered_by = "";
+
+ /**
+ * Remember parsed If: (RFC2518/9.4) header conditions
+ *
+ * @var array
+ */
+ var $_if_header_uris = array();
+
+ /**
+ * HTTP response status/message
+ *
+ * @var string
+ */
+ var $_http_status = "200 OK";
+
+ /**
+ * encoding of property values passed in
+ *
+ * @var string
+ */
+ var $_prop_encoding = "utf-8";
+
+ // }}}
+
+ // {{{ Constructor
+
+ /**
+ * Constructor
+ *
+ * @param void
+ */
+ function HTTP_WebDAV_Server()
+ {
+ // PHP messages destroy XML output -> switch them off
+ ini_set("display_errors", 0);
+ }
+
+ // }}}
+
+ // {{{ ServeRequest()
+ /**
+ * Serve WebDAV HTTP request
+ *
+ * dispatch WebDAV HTTP request to the apropriate method handler
+ *
+ * @param void
+ * @return void
+ */
+ function ServeRequest()
+ {
+ // identify ourselves
+ if (empty($this->dav_powered_by)) {
+ header("X-Dav-Powered-By: PHP class: ".get_class($this));
+ } else {
+ header("X-Dav-Powered-By: ".$this->dav_powered_by );
+ }
+
+ // check authentication
+ if (!$this->_check_auth()) {
+ $this->http_status('401 Unauthorized');
+
+ // RFC2518 says we must use Digest instead of Basic
+ // but Microsoft Clients do not support Digest
+ // and we don't support NTLM and Kerberos
+ // so we are stuck with Basic here
+ header('WWW-Authenticate: Basic realm="'.($this->http_auth_realm).'"');
+
+ return;
+ }
+
+ // check
+ if(! $this->_check_if_header_conditions()) {
+ $this->http_status("412 Precondition failed");
+ return;
+ }
+
+ // set path
+ $this->path = $this->_urldecode(!empty($_SERVER["PATH_INFO"]) ? $_SERVER["PATH_INFO"] : "/");
+ if(ini_get("magic_quotes_gpc")) {
+ $this->path = stripslashes($this->path);
+ }
+
+
+ // detect requested method names
+ $method = strtolower($_SERVER["REQUEST_METHOD"]);
+ $wrapper = "http_".$method;
+
+ // activate HEAD emulation by GET if no HEAD method found
+ if ($method == "head" && !method_exists($this, "head")) {
+ $method = "get";
+ }
+
+ if (method_exists($this, $wrapper) && ($method == "options" || method_exists($this, $method))) {
+ $this->$wrapper(); // call method by name
+ } else { // method not found/implemented
+ if ($_SERVER["REQUEST_METHOD"] == "LOCK") {
+ $this->http_status("412 Precondition failed");
+ } else {
+ $this->http_status("405 Method not allowed");
+ header("Allow: ".join(", ", $this->_allow())); // tell client what's allowed
+ }
+ }
+ }
+
+ // }}}
+
+ // {{{ abstract WebDAV methods
+
+ // {{{ GET()
+ /**
+ * GET implementation
+ *
+ * overload this method to retrieve resources from your server
+ * <br>
+ *
+ *
+ * @abstract
+ * @param array &$params Array of input and output parameters
+ * <br><b>input</b><ul>
+ * <li> path -
+ * </ul>
+ * <br><b>output</b><ul>
+ * <li> size -
+ * </ul>
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function GET(&$params)
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // {{{ PUT()
+ /**
+ * PUT implementation
+ *
+ * PUT implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function PUT()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // {{{ COPY()
+
+ /**
+ * COPY implementation
+ *
+ * COPY implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function COPY()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // {{{ MOVE()
+
+ /**
+ * MOVE implementation
+ *
+ * MOVE implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function MOVE()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // {{{ DELETE()
+
+ /**
+ * DELETE implementation
+ *
+ * DELETE implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function DELETE()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+ // }}}
+
+ // {{{ PROPFIND()
+
+ /**
+ * PROPFIND implementation
+ *
+ * PROPFIND implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function PROPFIND()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // {{{ PROPPATCH()
+
+ /**
+ * PROPPATCH implementation
+ *
+ * PROPPATCH implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function PROPPATCH()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+ // }}}
+
+ // {{{ LOCK()
+
+ /**
+ * LOCK implementation
+ *
+ * LOCK implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function LOCK()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+ // }}}
+
+ // {{{ UNLOCK()
+
+ /**
+ * UNLOCK implementation
+ *
+ * UNLOCK implementation
+ *
+ * @abstract
+ * @param array &$params
+ * @returns int HTTP-Statuscode
+ */
+
+ /* abstract
+ function UNLOCK()
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+ // }}}
+
+ // }}}
+
+ // {{{ other abstract methods
+
+ // {{{ check_auth()
+
+ /**
+ * check authentication
+ *
+ * overload this method to retrieve and confirm authentication information
+ *
+ * @abstract
+ * @param string type Authentication type, e.g. "basic" or "digest"
+ * @param string username Transmitted username
+ * @param string passwort Transmitted password
+ * @returns bool Authentication status
+ */
+
+ /* abstract
+ function checkAuth($type, $username, $password)
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // {{{ checklock()
+
+ /**
+ * check lock status for a resource
+ *
+ * overload this method to return shared and exclusive locks
+ * active for this resource
+ *
+ * @abstract
+ * @param string resource Resource path to check
+ * @returns array An array of lock entries each consisting
+ * of 'type' ('shared'/'exclusive'), 'token' and 'timeout'
+ */
+
+ /* abstract
+ function checklock($resource)
+ {
+ // dummy entry for PHPDoc
+ }
+ */
+
+ // }}}
+
+ // }}}
+
+ // {{{ WebDAV HTTP method wrappers
+
+ // {{{ http_OPTIONS()
+
+ /**
+ * OPTIONS method handler
+ *
+ * The OPTIONS method handler creates a valid OPTIONS reply
+ * including Dav: and Allowed: heaers
+ * based on the implemented methods found in the actual instance
+ *
+ * @param void
+ * @return void
+ */
+ function http_OPTIONS()
+ {
+ // Microsoft clients default to the Frontpage protocol
+ // unless we tell them to use WebDAV
+ header("MS-Author-Via: DAV");
+
+ // get allowed methods
+ $allow = $this->_allow();
+
+ // dav header
+ $dav = array(1); // assume we are always dav class 1 compliant
+ if (isset($allow['LOCK'])) {
+ $dav[] = 2; // dav class 2 requires that locking is supported
+ }
+
+ // tell clients what we found
+ $this->http_status("200 OK");
+ header("DAV: " .join("," , $dav));
+ header("Allow: ".join(", ", $allow));
+ }
+
+ // }}}
+
+
+ // {{{ http_PROPFIND()
+
+ /**
+ * PROPFIND method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_PROPFIND()
+ {
+ $options = Array();
+ $options["path"] = $this->path;
+
+ // search depth from header (default is "infinity)
+ if (isset($_SERVER['HTTP_DEPTH'])) {
+ $options["depth"] = $_SERVER["HTTP_DEPTH"];
+ } else {
+ $options["depth"] = "infinity";
+ }
+
+ // analyze request payload
+ $propinfo = new _parse_propfind("php://input");
+ if (!$propinfo->success) {
+ $this->http_status("400 Error");
+ return;
+ }
+ $options['props'] = $propinfo->props;
+
+ // call user handler
+ if (!$this->propfind($options, $files)) {
+ $this->http_status("404 Not Found");
+ return;
+ }
+
+ // collect namespaces here
+ $ns_hash = array();
+
+ // Microsoft Clients need this special namespace for date and time values
+ $ns_defs = "xmlns:ns0=\"urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/\"";
+
+ // now we loop over all returned file entries
+ foreach($files["files"] as $filekey => $file) {
+
+ // nothing to do if no properties were returend for a file
+ if (!isset($file["props"]) || !is_array($file["props"])) {
+ continue;
+ }
+
+ // now loop over all returned properties
+ foreach($file["props"] as $key => $prop) {
+ // as a convenience feature we do not require that user handlers
+ // restrict returned properties to the requested ones
+ // here we strip all unrequested entries out of the response
+
+ switch($options['props']) {
+ case "all":
+ // nothing to remove
+ break;
+
+ case "names":
+ // only the names of all existing properties were requested
+ // so we remove all values
+ unset($files["files"][$filekey]["props"][$key]["val"]);
+ break;
+
+ default:
+ $found = false;
+
+ // search property name in requested properties
+ foreach((array)$options["props"] as $reqprop) {
+ if ( $reqprop["name"] == $prop["name"]
+ && $reqprop["xmlns"] == $prop["ns"]) {
+ $found = true;
+ break;
+ }
+ }
+
+ // unset property and continue with next one if not found/requested
+ if (!$found) {
+ $files["files"][$filekey]["props"][$key]="";
+ continue(2);
+ }
+ break;
+ }
+
+ // namespace handling
+ if (empty($prop["ns"])) continue; // no namespace
+ $ns = $prop["ns"];
+ if ($ns == "DAV:") continue; // default namespace
+ if (isset($ns_hash[$ns])) continue; // already known
+
+ // register namespace
+ $ns_name = "ns".(count($ns_hash) + 1);
+ $ns_hash[$ns] = $ns_name;
+ $ns_defs .= " xmlns:$ns_name=\"$ns\"";
+ }
+
+ // we also need to add empty entries for properties that were requested
+ // but for which no values where returned by the user handler
+ if (is_array($options['props'])) {
+ foreach($options["props"] as $reqprop) {
+ if($reqprop['name']=="") continue; // skip empty entries
+
+ $found = false;
+
+ // check if property exists in result
+ foreach($file["props"] as $prop) {
+ if ( $reqprop["name"] == $prop["name"]
+ && $reqprop["xmlns"] == $prop["ns"]) {
+ $found = true;
+ break;
+ }
+ }
+
+ if (!$found) {
+ if($reqprop["xmlns"]==="DAV:" && $reqprop["name"]==="lockdiscovery") {
+ // lockdiscovery is handled by the base class
+ $files["files"][$filekey]["props"][]
+ = $this->mkprop("DAV:",
+ "lockdiscovery" ,
+ $this->lockdiscovery($files["files"][$filekey]['path']));
+ } else {
+ // add empty value for this property
+ $files["files"][$filekey]["noprops"][] =
+ $this->mkprop($reqprop["xmlns"], $reqprop["name"], "");
+
+ // register property namespace if not known yet
+ if ($reqprop["xmlns"] != "DAV:" && !isset($ns_hash[$reqprop["xmlns"]])) {
+ $ns_name = "ns".(count($ns_hash) + 1);
+ $ns_hash[$reqprop["xmlns"]] = $ns_name;
+ $ns_defs .= " xmlns:$ns_name=\"$reqprop[xmlns]\"";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // now we generate the reply header ...
+ $this->http_status("207 Multi-Status");
+ header('Content-Type: text/xml; charset="utf-8"');
+
+ // ... and payload
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ echo "<D:multistatus xmlns:D=\"DAV:\">\n";
+
+ foreach($files["files"] as $file) {
+ // ignore empty or incomplete entries
+ if(!is_array($file) || empty($file) || !isset($file["path"])) continue;
+ $path = $file['path'];
+ if(!is_string($path) || $path==="") continue;
+
+ echo " <D:response $ns_defs>\n";
+
+ $href = (@$_SERVER["HTTPS"] === "on" ? "https:" : "http:");
+ $href.= "//".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
+ $href.= $path;
+ //TODO make sure collection resource pathes end in a trailing slash
+
+ echo " <D:href>$href</D:href>\n";
+
+ // report all found properties and their values (if any)
+ if (isset($file["props"]) && is_array($file["props"])) {
+ echo " <D:propstat>\n";
+ echo " <D:prop>\n";
+
+ foreach($file["props"] as $key => $prop) {
+
+ if (!is_array($prop)) continue;
+ if (!isset($prop["name"])) continue;
+
+ if (!isset($prop["val"]) || $prop["val"] === "" || $prop["val"] === false) {
+ // empty properties (cannot use empty() for check as "0" is a legal value here)
+ if($prop["ns"]=="DAV:") {
+ echo " <D:$prop[name]/>\n";
+ } else if(!empty($prop["ns"])) {
+ echo " <".$ns_hash[$prop["ns"]].":$prop[name]/>\n";
+ } else {
+ echo " <$prop[name] xmlns=\"\"/>";
+ }
+ } else if ($prop["ns"] == "DAV:") {
+ // some WebDAV properties need special treatment
+ switch ($prop["name"]) {
+ case "creationdate":
+ echo " <D:creationdate ns0:dt=\"dateTime.tz\">"
+ . gmdate("Y-m-d\\TH:i:s\\Z",$prop['val'])
+ . "</D:creationdate>\n";
+ break;
+ case "getlastmodified":
+ echo " <D:getlastmodified ns0:dt=\"dateTime.rfc1123\">"
+ . gmdate("D, d M Y H:i:s ", $prop['val'])
+ . "GMT</D:getlastmodified>\n";
+ break;
+ case "resourcetype":
+ echo " <D:resourcetype><D:$prop[val]/></D:resourcetype>\n";
+ break;
+ case "supportedlock":
+ echo " <D:supportedlock>$prop[val]</D:supportedlock>\n";
+ break;
+ case "lockdiscovery":
+ echo " <D:lockdiscovery>\n";
+ echo $prop["val"];
+ echo " </D:lockdiscovery>\n";
+ break;
+ default:
+ echo " <D:$prop[name]>"
+ . $this->_prop_encode(htmlspecialchars($prop['val']))
+ . "</D:$prop[name]>\n";
+ break;
+ }
+ } else {
+ // properties from namespaces != "DAV:" or without any namespace
+ if ($prop["ns"]) {
+ echo " <" . $ns_hash[$prop["ns"]] . ":$prop[name]>"
+ . $this->_prop_encode(htmlspecialchars($prop['val']))
+ . "</" . $ns_hash[$prop["ns"]] . ":$prop[name]>\n";
+ } else {
+ echo " <$prop[name] xmlns=\"\">"
+ . $this->_prop_encode(htmlspecialchars($prop['val']))
+ . "</$prop[name]>\n";
+ }
+ }
+ }
+
+ echo " </D:prop>\n";
+ echo " <D:status>HTTP/1.1 200 OK</D:status>\n";
+ echo " </D:propstat>\n";
+ }
+
+ // now report all properties requested bot not found
+ if (isset($file["noprops"])) {
+ echo " <D:propstat>\n";
+ echo " <D:prop>\n";
+
+ foreach($file["noprops"] as $key => $prop) {
+ if ($prop["ns"] == "DAV:") {
+ echo " <D:$prop[name]/>\n";
+ } else if ($prop["ns"] == "") {
+ echo " <$prop[name] xmlns=\"\"/>\n";
+ } else {
+ echo " <" . $ns_hash[$prop["ns"]] . ":$prop[name]/>\n";
+ }
+ }
+
+ echo " </D:prop>\n";
+ echo " <D:status>HTTP/1.1 404 Not Found</D:status>\n";
+ echo " </D:propstat>\n";
+ }
+
+ echo " </D:response>\n";
+ }
+
+ echo "</D:multistatus>\n";
+ }
+
+
+ // }}}
+
+ // {{{ http_PROPPATCH()
+
+ /**
+ * PROPPATCH method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_PROPPATCH()
+ {
+ if($this->_check_lock_status($this->path)) {
+ $options = Array();
+ $options["path"] = $this->path;
+
+ $propinfo = new _parse_proppatch("php://input");
+
+ if (!$propinfo->success) {
+ $this->http_status("400 Error");
+ return;
+ }
+
+ $options['props'] = $propinfo->props;
+
+ $responsedescr = $this->proppatch($options);
+
+ $this->http_status("207 Multi-Status");
+ header('Content-Type: text/xml; charset="utf-8"');
+
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+
+ echo "<D:multistatus xmlns:D=\"DAV:\">\n";
+ echo " <D:response>\n";
+ echo " <D:href>".$this->_urlencode($_SERVER["SCRIPT_NAME"].$this->path)."</D:href>\n";
+
+ foreach($options["props"] as $prop) {
+ echo " <D:propstat>\n";
+ echo " <D:prop><$prop[name] xmlns=\"$prop[ns]\"/></D:prop>\n";
+ echo " <D:status>HTTP/1.1 $prop[status]</D:status>\n";
+ echo " </D:propstat>\n";
+ }
+
+ if ($responsedescr) {
+ echo " <D:responsedescription>".
+ $this->_prop_encode(htmlspecialchars($responsedescr)).
+ "</D:responsedescription>\n";
+ }
+
+ echo " </D:response>\n";
+ echo "</D:multistatus>\n";
+ } else {
+ $this->http_status("423 Locked");
+ }
+ }
+
+ // }}}
+
+
+ // {{{ http_MKCOL()
+
+ /**
+ * MKCOL method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_MKCOL()
+ {
+ $options = Array();
+ $options["path"] = $this->path;
+
+ $stat = $this->mkcol($options);
+
+ $this->http_status($stat);
+ }
+
+ // }}}
+
+
+ // {{{ http_GET()
+
+ /**
+ * GET method handler
+ *
+ * @param void
+ * @returns void
+ */
+ function http_GET()
+ {
+ // TODO check for invalid stream
+ $options = Array();
+ $options["path"] = $this->path;
+
+ $this->_get_ranges($options);
+
+ if (true === ($status = $this->get($options))) {
+ if (!headers_sent()) {
+ $status = "200 OK";
+
+ if (!isset($options['mimetype'])) {
+ $options['mimetype'] = "application/octet-stream";
+ }
+ header("Content-type: $options[mimetype]");
+
+ if (isset($options['mtime'])) {
+ header("Last-modified:".gmdate("D, d M Y H:i:s ", $options['mtime'])."GMT");
+ }
+
+ if (isset($options['stream'])) {
+ // GET handler returned a stream
+ if (!empty($options['ranges']) && (0===fseek($options['stream'], 0, SEEK_SET))) {
+ // partial request and stream is seekable
+
+ if (count($options['ranges']) === 1) {
+ $range = $options['ranges'][0];
+
+ if (isset($range['start'])) {
+ fseek($options['stream'], $range['start'], SEEK_SET);
+ if (feof($options['stream'])) {
+ http_status("416 Requested range not satisfiable");
+ exit;
+ }
+
+ if (isset($range['end'])) {
+ $size = $range['end']-$range['start']+1;
+ http_status("206 partial");
+ header("Content-length: $size");
+ header("Content-range: $range[start]-$range[end]/"
+ . (isset($options['size']) ? $options['size'] : "*"));
+ while ($size && !feof($options['stream'])) {
+ $buffer = fread($options['stream'], 4096);
+ $size -= strlen($buffer);
+ echo $buffer;
+ }
+ } else {
+ http_status("206 partial");
+ if (isset($options['size'])) {
+ header("Content-length: ".($options['size'] - $range['start']));
+ header("Content-range: $start-$end/"
+ . (isset($options['size']) ? $options['size'] : "*"));
+ }
+ fpassthru($options['stream']);
+ }
+ } else {
+ header("Content-length: ".$range['last']);
+ fseek($options['stream'], -$range['last'], SEEK_END);
+ fpassthru($options['stream']);
+ }
+ } else {
+ $this->_multipart_byterange_header(); // init multipart
+ foreach ($options['ranges'] as $range) {
+ // TODO what if size unknown? 500?
+ if (isset($range['start'])) {
+ $from = $range['start'];
+ $to = !empty($range['end']) ? $range['end'] : $options['size']-1;
+ } else {
+ $from = $options['size'] - $range['last']-1;
+ $to = $options['size'] -1;
+ }
+ $total = isset($options['size']) ? $options['size'] : "*";
+ $size = $to - $from + 1;
+ $this->_multipart_byterange_header($options['mimetype'], $from, $to, $total);
+
+
+ fseek($options['stream'], $start, SEEK_SET);
+ while ($size && !feof($options['stream'])) {
+ $buffer = fread($options['stream'], 4096);
+ $size -= strlen($buffer);
+ echo $buffer;
+ }
+ }
+ $this->_multipart_byterange_header(); // end multipart
+ }
+ } else {
+ // normal request or stream isn't seekable, return full content
+ if (isset($options['size'])) {
+ header("Content-length: ".$options['size']);
+ }
+ fpassthru($options['stream']);
+ return; // no more headers
+ }
+ } elseif (isset($options['data'])) {
+ if (is_array($options['data'])) {
+ // reply to partial request
+ } else {
+ header("Content-length: ".strlen($options['data']));
+ echo $options['data'];
+ }
+ }
+ }
+ }
+
+ if (false === $status) {
+ $this->http_status("404 not found");
+ }
+
+ $this->http_status("$status");
+ }
+
+
+ /**
+ * parse HTTP Range: header
+ *
+ * @param array options array to store result in
+ * @return void
+ */
+ function _get_ranges(&$options)
+ {
+ // process Range: header if present
+ if (isset($_SERVER['HTTP_RANGE'])) {
+
+ // we only support standard "bytes" range specifications for now
+ if (ereg("bytes[[:space:]]*=[[:space:]]*(.+)", $_SERVER['HTTP_RANGE'], $matches)) {
+ $options["ranges"] = array();
+
+ // ranges are comma separated
+ foreach (explode(",", $matches[1]) as $range) {
+ // ranges are either from-to pairs or just end positions
+ list($start, $end) = explode("-", $range);
+ $options["ranges"][] = ($start==="")
+ ? array("last"=>$end)
+ : array("start"=>$start, "end"=>$end);
+ }
+ }
+ }
+ }
+
+ /**
+ * generate separator headers for multipart response
+ *
+ * first and last call happen without parameters to generate
+ * the initial header and closing sequence, all calls inbetween
+ * require content mimetype, start and end byte position and
+ * optionaly the total byte length of the requested resource
+ *
+ * @param string mimetype
+ * @param int start byte position
+ * @param int end byte position
+ * @param int total resource byte size
+ */
+ function _multipart_byterange_header($mimetype = false, $from = false, $to=false, $total=false)
+ {
+ if ($mimetype === false) {
+ if (!isset($this->multipart_separator)) {
+ // initial
+
+ // a little naive, this sequence *might* be part of the content
+ // but it's really not likely and rather expensive to check
+ $this->multipart_separator = "SEPARATOR_".md5(microtime());
+
+ // generate HTTP header
+ header("Content-type: multipart/byteranges; boundary=".$this->multipart_separator);
+ } else {
+ // final
+
+ // generate closing multipart sequence
+ echo "\n--{$this->multipart_separator}--";
+ }
+ } else {
+ // generate separator and header for next part
+ echo "\n--{$this->multipart_separator}\n";
+ echo "Content-type: $mimetype\n";
+ echo "Content-range: $from-$to/". ($total === false ? "*" : $total);
+ echo "\n\n";
+ }
+ }
+
+
+
+ // }}}
+
+ // {{{ http_HEAD()
+
+ /**
+ * HEAD method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_HEAD()
+ {
+ $status = false;
+ $options = Array();
+ $options["path"] = $this->path;
+
+ if (method_exists($this, "HEAD")) {
+ $status = $this->head($options);
+ } else if (method_exists($this, "GET")) {
+ ob_start();
+ $status = $this->GET($options);
+ ob_end_clean();
+ }
+
+ if($status===true) $status = "200 OK";
+ if($status===false) $status = "404 Not found";
+
+ $this->http_status($status);
+ }
+
+ // }}}
+
+ // {{{ http_PUT()
+
+ /**
+ * PUT method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_PUT()
+ {
+ if ($this->_check_lock_status($this->path)) {
+ $options = Array();
+ $options["path"] = $this->path;
+ $options["content_length"] = $_SERVER["CONTENT_LENGTH"];
+
+ // get the Content-type
+ if (isset($_SERVER["CONTENT_TYPE"])) {
+ // for now we do not support any sort of multipart requests
+ if (!strncmp($_SERVER["CONTENT_TYPE"], "multipart/", 10)) {
+ $this->http_status("501 not implemented");
+ echo "The service does not support mulipart PUT requests";
+ return;
+ }
+ $options["content_type"] = $_SERVER["CONTENT_TYPE"];
+ } else {
+ // default content type if none given
+ $options["content_type"] = "application/octet-stream";
+ }
+
+ /* RFC 2616 2.6 says: "The recipient of the entity MUST NOT
+ ignore any Content-* (e.g. Content-Range) headers that it
+ does not understand or implement and MUST return a 501
+ (Not Implemented) response in such cases."
+ */
+ foreach ($_SERVER as $key => $val) {
+ if (strncmp($key, "HTTP_CONTENT", 11)) continue;
+ switch ($key) {
+ case 'HTTP_CONTENT_ENCODING': // RFC 2616 14.11
+ // TODO support this if ext/zlib filters are available
+ $this->http_status("501 not implemented");
+ echo "The service does not support '$val' content encoding";
+ return;
+
+ case 'HTTP_CONTENT_LANGUAGE': // RFC 2616 14.12
+ // we assume it is not critical if this one is ignored
+ // in the actual PUT implementation ...
+ $options["content_language"] = $value;
+ break;
+
+ case 'HTTP_CONTENT_LOCATION': // RFC 2616 14.14
+ /* The meaning of the Content-Location header in PUT
+ or POST requests is undefined; servers are free
+ to ignore it in those cases. */
+ break;
+
+ case 'HTTP_CONTENT_RANGE': // RFC 2616 14.16
+ // single byte range requests are supported
+ // the header format is also specified in RFC 2616 14.16
+ // TODO we have to ensure that implementations support this or send 501 instead
+ if (!preg_match('@bytes\s+(\d+)-(\d+)/((\d+)|\*)@', $value, $matches)) {
+ $this->http_status("400 bad request");
+ echo "The service does only support single byte ranges";
+ return;
+ }
+
+ $range = array("start"=>$matches[1], "end"=>$matches[2]);
+ if (is_numeric($matches[3])) {
+ $range["total_length"] = $matches[3];
+ }
+ $option["ranges"][] = $range;
+
+ // TODO make sure the implementation supports partial PUT
+ // this has to be done in advance to avoid data being overwritten
+ // on implementations that do not support this ...
+ break;
+
+ case 'HTTP_CONTENT_MD5': // RFC 2616 14.15
+ // TODO: maybe we can just pretend here?
+ $this->http_status("501 not implemented");
+ echo "The service does not support content MD5 checksum verification";
+ return;
+
+ default:
+ // any other unknown Content-* headers
+ $this->http_status("501 not implemented");
+ echo "The service does not support '$key'";
+ return;
+ }
+ }
+
+ $options["stream"] = fopen("php://input", "r");
+
+ $stat = $this->PUT($options);
+
+ if (is_resource($stat) && get_resource_type($stat) == "stream") {
+ $stream = $stat;
+ if (!empty($options["ranges"])) {
+ // TODO multipart support is missing (see also above)
+ // TODO error checking
+ $stat = fseek($stream, $range[0]["start"], SEEK_SET);
+ fwrite($stream, fread($options["stream"], $range[0]["end"]-$range[0]["start"]+1));
+ } else {
+ while (!feof($options["stream"])) {
+ fwrite($stream, fread($options["stream"], 4096));
+ }
+ }
+ fclose($stream);
+
+ $stat = $options["new"] ? "201 Created" : "204 No Content";
+ }
+
+ $this->http_status($stat);
+ } else {
+ $this->http_status("423 Locked");
+ }
+ }
+
+ // }}}
+
+
+ // {{{ http_DELETE()
+
+ /**
+ * DELETE method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_DELETE()
+ {
+ // check RFC 2518 Section 9.2, last paragraph
+ if (isset($_SERVER["HTTP_DEPTH"])) {
+ if ($_SERVER["HTTP_DEPTH"] != "infinity") {
+ $this->http_status("400 Bad Request");
+ return;
+ }
+ }
+
+ // check lock status
+ if ($this->_check_lock_status($this->path)) {
+ // ok, proceed
+ $options = Array();
+ $options["path"] = $this->path;
+
+ $stat = $this->delete($options);
+
+ $this->http_status($stat);
+ } else {
+ // sorry, its locked
+ $this->http_status("423 Locked");
+ }
+ }
+
+ // }}}
+
+ // {{{ http_COPY()
+
+ /**
+ * COPY method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_COPY()
+ {
+ // no need to check source lock status here
+ // destination lock status is always checked by the helper method
+ $this->_copymove("copy");
+ }
+
+ // }}}
+
+ // {{{ http_MOVE()
+
+ /**
+ * MOVE method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_MOVE()
+ {
+ if ($this->_check_lock_status($this->path)) {
+ // destination lock status is always checked by the helper method
+ $this->_copymove("move");
+ } else {
+ $this->http_status("423 Locked");
+ }
+ }
+
+ // }}}
+
+
+ // {{{ http_LOCK()
+
+ /**
+ * LOCK method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_LOCK()
+ {
+ $options = Array();
+ $options["path"] = $this->path;
+
+ if (isset($_SERVER['HTTP_DEPTH'])) {
+ $options["depth"] = $_SERVER["HTTP_DEPTH"];
+ } else {
+ $options["depth"] = "infinity";
+ }
+
+ if (isset($_SERVER["HTTP_TIMEOUT"])) {
+ $options["timeout"] = explode(",", $_SERVER["HTTP_TIMEOUT"]);
+ }
+
+ if(empty($_SERVER['CONTENT_LENGTH']) && !empty($_SERVER['HTTP_IF'])) {
+ // check if locking is possible
+ if(!$this->_check_lock_status($this->path)) {
+ $this->http_status("423 Locked");
+ return;
+ }
+
+ // refresh lock
+ $options["update"] = substr($_SERVER['HTTP_IF'], 2, -2);
+ $stat = $this->lock($options);
+ } else {
+ // extract lock request information from request XML payload
+ $lockinfo = new _parse_lockinfo("php://input");
+ if (!$lockinfo->success) {
+ $this->http_status("400 bad request");
+ }
+
+ // check if locking is possible
+ if(!$this->_check_lock_status($this->path, $lockinfo->lockscope === "shared")) {
+ $this->http_status("423 Locked");
+ return;
+ }
+
+ // new lock
+ $options["scope"] = $lockinfo->lockscope;
+ $options["type"] = $lockinfo->locktype;
+ $options["owner"] = $lockinfo->owner;
+
+ $options["locktoken"] = $this->_new_locktoken();
+
+ $stat = $this->lock($options);
+ }
+
+ if(is_bool($stat)) {
+ $http_stat = $stat ? "200 OK" : "423 Locked";
+ } else {
+ $http_stat = $stat;
+ }
+
+ $this->http_status($http_stat);
+
+ if ($http_stat{0} == 2) { // 2xx states are ok
+ if($options["timeout"]) {
+ // more than a million is considered an absolute timestamp
+ // less is more likely a relative value
+ if($options["timeout"]>1000000) {
+ $timeout = "Second-".($options['timeout']-time());
+ } else {
+ $timeout = "Second-$options[timeout]";
+ }
+ } else {
+ $timeout = "Infinite";
+ }
+
+ header('Content-Type: text/xml; charset="utf-8"');
+ header("Lock-Token: <$options[locktoken]>");
+ echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
+ echo "<D:prop xmlns:D=\"DAV:\">\n";
+ echo " <D:lockdiscovery>\n";
+ echo " <D:activelock>\n";
+ echo " <D:lockscope><D:$options[scope]/></D:lockscope>\n";
+ echo " <D:locktype><D:$options[type]/></D:locktype>\n";
+ echo " <D:depth>$options[depth]</D:depth>\n";
+ echo " <D:owner>$options[owner]</D:owner>\n";
+ echo " <D:timeout>$timeout</D:timeout>\n";
+ echo " <D:locktoken><D:href>$options[locktoken]</D:href></D:locktoken>\n";
+ echo " </D:activelock>\n";
+ echo " </D:lockdiscovery>\n";
+ echo "</D:prop>\n\n";
+ }
+ }
+
+
+ // }}}
+
+ // {{{ http_UNLOCK()
+
+ /**
+ * UNLOCK method handler
+ *
+ * @param void
+ * @return void
+ */
+ function http_UNLOCK()
+ {
+ $options = Array();
+ $options["path"] = $this->path;
+
+ if (isset($_SERVER['HTTP_DEPTH'])) {
+ $options["depth"] = $_SERVER["HTTP_DEPTH"];
+ } else {
+ $options["depth"] = "infinity";
+ }
+
+ // strip surrounding <>
+ $options["token"] = substr(trim($_SERVER["HTTP_LOCK_TOKEN"]), 1, -1);
+
+ // call user method
+ $stat = $this->unlock($options);
+
+ $this->http_status($stat);
+ }
+
+ // }}}
+
+ // }}}
+
+ // {{{ _copymove()
+
+ function _copymove($what)
+ {
+ $options = Array();
+ $options["path"] = $this->path;
+
+ if (isset($_SERVER["HTTP_DEPTH"])) {
+ $options["depth"] = $_SERVER["HTTP_DEPTH"];
+ } else {
+ $options["depth"] = "infinity";
+ }
+
+ extract(parse_url($_SERVER["HTTP_DESTINATION"]));
+ $http_host = $host;
+ if (isset($port) && $port != 80)
+ $http_host.= ":$port";
+
+ list($http_header_host,$http_header_port) = explode(":",$_SERVER["HTTP_HOST"]);
+ if (isset($http_header_port) && $http_header_port != 80) {
+ $http_header_host .= ":".$http_header_port;
+ }
+
+ if ($http_host == $http_header_host &&
+ !strncmp($_SERVER["SCRIPT_NAME"], $path,
+ strlen($_SERVER["SCRIPT_NAME"]))) {
+ $options["dest"] = substr($path, strlen($_SERVER["SCRIPT_NAME"]));
+ if (!$this->_check_lock_status($options["dest"])) {
+ $this->http_status("423 Locked");
+ return;
+ }
+
+ } else {
+ $options["dest_url"] = $_SERVER["HTTP_DESTINATION"];
+ }
+
+ // see RFC 2518 Sections 9.6, 8.8.4 and 8.9.3
+ if (isset($_SERVER["HTTP_OVERWRITE"])) {
+ $options["overwrite"] = $_SERVER["HTTP_OVERWRITE"] == "T";
+ } else {
+ $options["overwrite"] = true;
+ }
+
+ $stat = $this->$what($options);
+ $this->http_status($stat);
+ }
+
+ // }}}
+
+ // {{{ _allow()
+
+ /**
+ * check for implemented HTTP methods
+ *
+ * @param void
+ * @return array something
+ */
+ function _allow()
+ {
+ // OPTIONS is always there
+ $allow = array("OPTIONS" =>"OPTIONS");
+
+ // all other METHODS need both a http_method() wrapper
+ // and a method() implementation
+ // the base class supplies wrappers only
+ foreach(get_class_methods($this) as $method) {
+ if (!strncmp("http_", $method, 5)) {
+ $method = strtoupper(substr($method, 5));
+ if (method_exists($this, $method)) {
+ $allow[$method] = $method;
+ }
+ }
+ }
+
+ // we can emulate a missing HEAD implemetation using GET
+ if (isset($allow["GET"]))
+ $allow["HEAD"] = "HEAD";
+
+ // no LOCK without checklok()
+ if (!method_exists($this, "checklock")) {
+ unset($allow["LOCK"]);
+ unset($allow["UNLOCK"]);
+ }
+
+ return $allow;
+ }
+
+ // }}}
+
+ /**
+ * helper for property element creation
+ *
+ * @param string XML namespace (optional)
+ * @param string property name
+ * @param string property value
+ * @return array property array
+ */
+ function mkprop()
+ {
+ $args = func_get_args();
+ if (count($args) == 3) {
+ return array("ns" => $args[0],
+ "name" => $args[1],
+ "val" => $args[2]);
+ } else {
+ return array("ns" => "DAV:",
+ "name" => $args[0],
+ "val" => $args[1]);
+ }
+ }
+
+ // {{{ _check_auth
+
+ /**
+ * check authentication if check is implemented
+ *
+ * @param void
+ * @return bool true if authentication succeded or not necessary
+ */
+ function _check_auth()
+ {
+ if (method_exists($this, "checkAuth")) {
+ // PEAR style method name
+ return $this->checkAuth(@$_SERVER["AUTH_TYPE"],
+ @$_SERVER["PHP_AUTH_USER"],
+ @$_SERVER["PHP_AUTH_PW"]);
+ } else if (method_exists($this, "check_auth")) {
+ // old (pre 1.0) method name
+ return $this->check_auth(@$_SERVER["AUTH_TYPE"],
+ @$_SERVER["PHP_AUTH_USER"],
+ @$_SERVER["PHP_AUTH_PW"]);
+ } else {
+ // no method found -> no authentication required
+ return true;
+ }
+ }
+
+ // }}}
+
+ // {{{ UUID stuff
+
+ /**
+ * generate Unique Universal IDentifier for lock token
+ *
+ * @param void
+ * @return string a new UUID
+ */
+ function _new_uuid()
+ {
+ // use uuid extension from PECL if available
+ if (function_exists("uuid_create")) {
+ return uuid_create();
+ }
+
+ // fallback
+ $uuid = md5(microtime().getmypid()); // this should be random enough for now
+
+ // set variant and version fields for 'true' random uuid
+ $uuid{12} = "4";
+ $n = 8 + (ord($uuid{16}) & 3);
+ $hex = "0123456789abcdef";
+ $uuid{16} = $hex{$n};
+
+ // return formated uuid
+ return substr($uuid, 0, 8)."-"
+ . substr($uuid, 8, 4)."-"
+ . substr($uuid, 12, 4)."-"
+ . substr($uuid, 16, 4)."-"
+ . substr($uuid, 20);
+ }
+
+ /**
+ * create a new opaque lock token as defined in RFC2518
+ *
+ * @param void
+ * @return string new RFC2518 opaque lock token
+ */
+ function _new_locktoken()
+ {
+ return "opaquelocktoken:".$this->_new_uuid();
+ }
+
+ // }}}
+
+ // {{{ WebDAV If: header parsing
+
+ /**
+ *
+ *
+ * @param string header string to parse
+ * @param int current parsing position
+ * @return array next token (type and value)
+ */
+ function _if_header_lexer($string, &$pos)
+ {
+ // skip whitespace
+ while (ctype_space($string{$pos})) {
+ ++$pos;
+ }
+
+ // already at end of string?
+ if (strlen($string) <= $pos) {
+ return false;
+ }
+
+ // get next character
+ $c = $string{$pos++};
+
+ // now it depends on what we found
+ switch ($c) {
+ case "<":
+ // URIs are enclosed in <...>
+ $pos2 = strpos($string, ">", $pos);
+ $uri = substr($string, $pos, $pos2 - $pos);
+ $pos = $pos2 + 1;
+ return array("URI", $uri);
+
+ case "[":
+ //Etags are enclosed in [...]
+ if ($string{$pos} == "W") {
+ $type = "ETAG_WEAK";
+ $pos += 2;
+ } else {
+ $type = "ETAG_STRONG";
+ }
+ $pos2 = strpos($string, "]", $pos);
+ $etag = substr($string, $pos + 1, $pos2 - $pos - 2);
+ $pos = $pos2 + 1;
+ return array($type, $etag);
+
+ case "N":
+ // "N" indicates negation
+ $pos += 2;
+ return array("NOT", "Not");
+
+ default:
+ // anything else is passed verbatim char by char
+ return array("CHAR", $c);
+ }
+ }
+
+ /**
+ * parse If: header
+ *
+ * @param string header string
+ * @return array URIs and their conditions
+ */
+ function _if_header_parser($str)
+ {
+ $pos = 0;
+ $len = strlen($str);
+
+ $uris = array();
+
+ // parser loop
+ while ($pos < $len) {
+ // get next token
+ $token = $this->_if_header_lexer($str, $pos);
+
+ // check for URI
+ if ($token[0] == "URI") {
+ $uri = $token[1]; // remember URI
+ $token = $this->_if_header_lexer($str, $pos); // get next token
+ } else {
+ $uri = "";
+ }
+
+ // sanity check
+ if ($token[0] != "CHAR" || $token[1] != "(") {
+ return false;
+ }
+
+ $list = array();
+ $level = 1;
+ $not = "";
+ while ($level) {
+ $token = $this->_if_header_lexer($str, $pos);
+ if ($token[0] == "NOT") {
+ $not = "!";
+ continue;
+ }
+ switch ($token[0]) {
+ case "CHAR":
+ switch ($token[1]) {
+ case "(":
+ $level++;
+ break;
+ case ")":
+ $level--;
+ break;
+ default:
+ return false;
+ }
+ break;
+
+ case "URI":
+ $list[] = $not."<$token[1]>";
+ break;
+
+ case "ETAG_WEAK":
+ $list[] = $not."[W/'$token[1]']>";
+ break;
+
+ case "ETAG_STRONG":
+ $list[] = $not."['$token[1]']>";
+ break;
+
+ default:
+ return false;
+ }
+ $not = "";
+ }
+
+ if (@is_array($uris[$uri])) {
+ $uris[$uri] = array_merge($uris[$uri],$list);
+ } else {
+ $uris[$uri] = $list;
+ }
+ }
+
+ return $uris;
+ }
+
+ /**
+ * check if conditions from "If:" headers are meat
+ *
+ * the "If:" header is an extension to HTTP/1.1
+ * defined in RFC 2518 section 9.4
+ *
+ * @param void
+ * @return void
+ */
+ function _check_if_header_conditions()
+ {
+ if (isset($_SERVER["HTTP_IF"])) {
+ $this->_if_header_uris =
+ $this->_if_header_parser($_SERVER["HTTP_IF"]);
+
+ foreach($this->_if_header_uris as $uri => $conditions) {
+ if ($uri == "") {
+ // default uri is the complete request uri
+ $uri = (@$_SERVER["HTTPS"] === "on" ? "https:" : "http:");
+ $uri.= "//$_SERVER[HTTP_HOST]$_SERVER[SCRIPT_NAME]$_SERVER[PATH_INFO]";
+ }
+ // all must match
+ $state = true;
+ foreach($conditions as $condition) {
+ // lock tokens may be free form (RFC2518 6.3)
+ // but if opaquelocktokens are used (RFC2518 6.4)
+ // we have to check the format (litmus tests this)
+ if (!strncmp($condition, "<opaquelocktoken:", strlen("<opaquelocktoken"))) {
+ if (!ereg("^<opaquelocktoken:[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}>$", $condition)) {
+ return false;
+ }
+ }
+ if (!$this->_check_uri_condition($uri, $condition)) {
+ $state = false;
+ break;
+ }
+ }
+
+ // any match is ok
+ if ($state == true) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check a single URI condition parsed from an if-header
+ *
+ * Check a single URI condition parsed from an if-header
+ *
+ * @abstract
+ * @param string $uri URI to check
+ * @param string $condition Condition to check for this URI
+ * @returns bool Condition check result
+ */
+ function _check_uri_condition($uri, $condition)
+ {
+ // not really implemented here,
+ // implementations must override
+ return true;
+ }
+
+
+ /**
+ *
+ *
+ * @param string path of resource to check
+ * @param bool exclusive lock?
+ */
+ function _check_lock_status($path, $exclusive_only = false)
+ {
+ // FIXME depth -> ignored for now
+ if (method_exists($this, "checkLock")) {
+ // is locked?
+ $lock = $this->checkLock($path);
+
+ // ... and lock is not owned?
+ if (is_array($lock) && count($lock)) {
+ // FIXME doesn't check uri restrictions yet
+ if (!strstr($_SERVER["HTTP_IF"], $lock["token"])) {
+ if (!$exclusive_only || ($lock["scope"] !== "shared"))
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+
+ // }}}
+
+
+ /**
+ * Generate lockdiscovery reply from checklock() result
+ *
+ * @param string resource path to check
+ * @return string lockdiscovery response
+ */
+ function lockdiscovery($path)
+ {
+ // no lock support without checklock() method
+ if (!method_exists($this, "checklock")) {
+ return "";
+ }
+
+ // collect response here
+ $activelocks = "";
+
+ // get checklock() reply
+ $lock = $this->checklock($path);
+
+ // generate <activelock> block for returned data
+ if (is_array($lock) && count($lock)) {
+ // check for 'timeout' or 'expires'
+ if (!empty($lock["expires"])) {
+ $timeout = "Second-".($lock["expires"] - time());
+ } else if (!empty($lock["timeout"])) {
+ $timeout = "Second-$lock[timeout]";
+ } else {
+ $timeout = "Infinite";
+ }
+
+ // genreate response block
+ $activelocks.= "
+ <D:activelock>
+ <D:lockscope><D:$lock[scope]/></D:lockscope>
+ <D:locktype><D:$lock[type]/></D:locktype>
+ <D:depth>$lock[depth]</D:depth>
+ <D:owner>$lock[owner]</D:owner>
+ <D:timeout>$timeout</D:timeout>
+ <D:locktoken><D:href>$lock[token]</D:href></D:locktoken>
+ </D:activelock>
+ ";
+ }
+
+ // return generated response
+ return $activelocks;
+ }
+
+ /**
+ * set HTTP return status and mirror it in a private header
+ *
+ * @param string status code and message
+ * @return void
+ */
+ function http_status($status)
+ {
+ // simplified success case
+ if($status === true) {
+ $status = "200 OK";
+ }
+
+ // remember status
+ $this->_http_status = $status;
+
+ // generate HTTP status response
+ header("HTTP/1.1 $status");
+ header("X-WebDAV-Status: $status", true);
+ }
+
+ /**
+ * private minimalistic version of PHP urlencode()
+ *
+ * only blanks and XML special chars must be encoded here
+ * full urlencode() encoding confuses some clients ...
+ *
+ * @param string URL to encode
+ * @return string encoded URL
+ */
+ function _urlencode($url)
+ {
+ return strtr($url, array(" "=>"%20",
+ "&"=>"%26",
+ "<"=>"%3C",
+ ">"=>"%3E",
+ ));
+ }
+
+ /**
+ * private version of PHP urldecode
+ *
+ * not really needed but added for completenes
+ *
+ * @param string URL to decode
+ * @return string decoded URL
+ */
+ function _urldecode($path)
+ {
+ return urldecode($path);
+ }
+
+ /**
+ * UTF-8 encode property values if not already done so
+ *
+ * @param string text to encode
+ * @return string utf-8 encoded text
+ */
+ function _prop_encode($text)
+ {
+ switch (strtolower($this->_prop_encoding)) {
+ case "utf-8":
+ return $text;
+ case "iso-8859-1":
+ case "iso-8859-15":
+ case "latin-1":
+ default:
+ return utf8_encode($text);
+ }
+ }
+}
+
+ /*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */
+?>
--- /dev/null
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Hartmut Holzgraefe <hholzgra@php.net> |
+// | Christian Stocker <chregu@bitflux.ch> |
+// +----------------------------------------------------------------------+
+//
+// $Id: _parse_lockinfo.php,v 1.2 2004/01/05 12:32:40 hholzgra Exp $
+//
+
+/**
+ * helper class for parsing LOCK request bodies
+ *
+ * @package HTTP_WebDAV_Server
+ * @author Hartmut Holzgraefe <hholzgra@php.net>
+ * @version 0.99.1dev
+ */
+class _parse_lockinfo
+{
+ /**
+ * success state flag
+ *
+ * @var bool
+ * @access public
+ */
+ var $success = false;
+
+ /**
+ * lock type, currently only "write"
+ *
+ * @var string
+ * @access public
+ */
+ var $locktype = "";
+
+ /**
+ * lock scope, "shared" or "exclusive"
+ *
+ * @var string
+ * @access public
+ */
+ var $lockscope = "";
+
+ /**
+ * lock owner information
+ *
+ * @var string
+ * @access public
+ */
+ var $owner = "";
+
+ /**
+ * flag that is set during lock owner read
+ *
+ * @var bool
+ * @access private
+ */
+ var $collect_owner = false;
+
+ /**
+ * constructor
+ *
+ * @param string path of stream to read
+ * @access public
+ */
+ function _parse_lockinfo($path)
+ {
+ // we assume success unless problems occur
+ $this->success = true;
+
+ // remember if any input was parsed
+ $had_input = false;
+
+ // open stream
+ $f_in = fopen($path, "r");
+ if (!$f_in) {
+ $this->success = false;
+ return;
+ }
+
+ // create namespace aware parser
+ $xml_parser = xml_parser_create_ns("UTF-8", " ");
+
+ // set tag and data handlers
+ xml_set_element_handler($xml_parser,
+ array(&$this, "_startElement"),
+ array(&$this, "_endElement"));
+ xml_set_character_data_handler($xml_parser,
+ array(&$this, "_data"));
+
+ // we want a case sensitive parser
+ xml_parser_set_option($xml_parser,
+ XML_OPTION_CASE_FOLDING, false);
+
+ // parse input
+ while($this->success && !feof($f_in)) {
+ $line = fgets($f_in);
+ if (is_string($line)) {
+ $had_input = true;
+ $this->success &= xml_parse($xml_parser, $line, false);
+ }
+ }
+
+ // finish parsing
+ if($had_input) {
+ $this->success &= xml_parse($xml_parser, "", true);
+ }
+
+ // check if required tags where found
+ $this->success &= !empty($this->locktype);
+ $this->success &= !empty($this->lockscope);
+
+ // free parser resource
+ xml_parser_free($xml_parser);
+
+ // close input stream
+ fclose($f_in);
+ }
+
+
+ /**
+ * tag start handler
+ *
+ * @param resource parser
+ * @param string tag name
+ * @param array tag attributes
+ * @return void
+ * @access private
+ */
+ function _startElement($parser, $name, $attrs)
+ {
+ // namespace handling
+ if (strstr($name, " ")) {
+ list($ns, $tag) = explode(" ", $name);
+ } else {
+ $ns = "";
+ $tag = $name;
+ }
+
+
+ if ($this->collect_owner) {
+ // everything within the <owner> tag needs to be collected
+ $ns_short = "";
+ $ns_attr = "";
+ if ($ns) {
+ if ($ns == "DAV:") {
+ $ns_short = "D:";
+ } else {
+ $ns_attr = " xmlns='$ns'";
+ }
+ }
+ $this->owner .= "<$ns_short$tag$ns_attr>";
+ } else if ($ns == "DAV:") {
+ // parse only the essential tags
+ switch ($tag) {
+ case "write":
+ $this->locktype = $tag;
+ break;
+ case "exclusive":
+ case "shared":
+ $this->lockscope = $tag;
+ break;
+ case "owner":
+ $this->collect_owner = true;
+ break;
+ }
+ }
+ }
+
+ /**
+ * data handler
+ *
+ * @param resource parser
+ * @param string data
+ * @return void
+ * @access private
+ */
+ function _data($parser, $data)
+ {
+ // only the <owner> tag has data content
+ if ($this->collect_owner) {
+ $this->owner .= $data;
+ }
+ }
+
+ /**
+ * tag end handler
+ *
+ * @param resource parser
+ * @param string tag name
+ * @return void
+ * @access private
+ */
+ function _endElement($parser, $name)
+ {
+ // namespace handling
+ if (strstr($name, " ")) {
+ list($ns, $tag) = explode(" ", $name);
+ } else {
+ $ns = "";
+ $tag = $name;
+ }
+
+ // <owner> finished?
+ if (($ns == "DAV:") && ($tag == "owner")) {
+ $this->collect_owner = false;
+ }
+
+ // within <owner> we have to collect everything
+ if ($this->collect_owner) {
+ $ns_short = "";
+ $ns_attr = "";
+ if ($ns) {
+ if ($ns == "DAV:") {
+ $ns_short = "D:";
+ } else {
+ $ns_attr = " xmlns='$ns'";
+ }
+ }
+ $this->owner .= "</$ns_short$tag$ns_attr>";
+ }
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Hartmut Holzgraefe <hholzgra@php.net> |
+// | Christian Stocker <chregu@bitflux.ch> |
+// +----------------------------------------------------------------------+
+//
+// $Id: _parse_propfind.php,v 1.2 2004/01/05 12:33:22 hholzgra Exp $
+//
+
+/**
+ * helper class for parsing PROPFIND request bodies
+ *
+ * @package HTTP_WebDAV_Server
+ * @author Hartmut Holzgraefe <hholzgra@php.net>
+ * @version 0.99.1dev
+ */
+class _parse_propfind
+{
+ /**
+ * success state flag
+ *
+ * @var bool
+ * @access public
+ */
+ var $success = false;
+
+ /**
+ * found properties are collected here
+ *
+ * @var array
+ * @access public
+ */
+ var $props = false;
+
+ /**
+ * internal tag nesting depth counter
+ *
+ * @var int
+ * @access private
+ */
+ var $depth = 0;
+
+
+ /**
+ * constructor
+ *
+ * @access public
+ */
+ function _parse_propfind($path)
+ {
+ // success state flag
+ $this->success = true;
+
+ // property storage array
+ $this->props = array();
+
+ // internal tag depth counter
+ $this->depth = 0;
+
+ // remember if any input was parsed
+ $had_input = false;
+
+ // open input stream
+ $f_in = fopen($path, "r");
+ if (!$f_in) {
+ $this->success = false;
+ return;
+ }
+
+ // create XML parser
+ $xml_parser = xml_parser_create_ns("UTF-8", " ");
+
+ // set tag and data handlers
+ xml_set_element_handler($xml_parser,
+ array(&$this, "_startElement"),
+ array(&$this, "_endElement"));
+
+ // we want a case sensitive parser
+ xml_parser_set_option($xml_parser,
+ XML_OPTION_CASE_FOLDING, false);
+
+
+ // parse input
+ while($this->success && !feof($f_in)) {
+ $line = fgets($f_in);
+ if (is_string($line)) {
+ $had_input = true;
+ $this->success &= xml_parse($xml_parser, $line, false);
+ }
+ }
+
+ // finish parsing
+ if($had_input) {
+ $this->success &= xml_parse($xml_parser, "", true);
+ }
+
+ // free parser
+ xml_parser_free($xml_parser);
+
+ // close input stream
+ fclose($f_in);
+
+ // if no input was parsed it was a request
+ if(!count($this->props)) $this->props = "all"; // default
+ }
+
+
+ /**
+ * start tag handler
+ *
+ * @access private
+ * @param resource parser
+ * @param string tag name
+ * @param array tag attributes
+ */
+ function _startElement($parser, $name, $attrs)
+ {
+ // name space handling
+ if (strstr($name, " ")) {
+ list($ns, $tag) = explode(" ", $name);
+ if ($ns == "")
+ $this->success = false;
+ } else {
+ $ns = "";
+ $tag = $name;
+ }
+
+ // special tags at level 1: <allprop> and <propname>
+ if ($this->depth == 1) {
+ if ($tag == "allprop")
+ $this->props = "all";
+
+ if ($tag == "propname")
+ $this->props = "names";
+ }
+
+ // requested properties are found at level 2
+ if ($this->depth == 2) {
+ $prop = array("name" => $tag);
+ if ($ns)
+ $prop["xmlns"] = $ns;
+ $this->props[] = $prop;
+ }
+
+ // increment depth count
+ $this->depth++;
+ }
+
+
+ /**
+ * end tag handler
+ *
+ * @access private
+ * @param resource parser
+ * @param string tag name
+ */
+ function _endElement($parser, $name)
+ {
+ // here we only need to decrement the depth count
+ $this->depth--;
+ }
+}
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Hartmut Holzgraefe <hholzgra@php.net> |
+// | Christian Stocker <chregu@bitflux.ch> |
+// +----------------------------------------------------------------------+
+//
+// $Id: _parse_proppatch.php,v 1.3 2004/01/05 12:41:34 hholzgra Exp $
+//
+
+/**
+ * helper class for parsing PROPPATCH request bodies
+ *
+ * @package HTTP_WebDAV_Server
+ * @author Hartmut Holzgraefe <hholzgra@php.net>
+ * @version 0.99.1dev
+ */
+class _parse_proppatch
+{
+ /**
+ *
+ *
+ * @var
+ * @access
+ */
+ var $success;
+
+ /**
+ *
+ *
+ * @var
+ * @access
+ */
+ var $props;
+
+ /**
+ *
+ *
+ * @var
+ * @access
+ */
+ var $depth;
+
+ /**
+ *
+ *
+ * @var
+ * @access
+ */
+ var $mode;
+
+ /**
+ *
+ *
+ * @var
+ * @access
+ */
+ var $current;
+
+ /**
+ * constructor
+ *
+ * @param string path of input stream
+ * @access public
+ */
+ function _parse_proppatch($path)
+ {
+ $this->success = true;
+
+ $this->depth = 0;
+ $this->props = array();
+ $had_input = false;
+
+ $f_in = fopen($path, "r");
+ if (!$f_in) {
+ $this->success = false;
+ return;
+ }
+
+ $xml_parser = xml_parser_create_ns("UTF-8", " ");
+
+ xml_set_element_handler($xml_parser,
+ array(&$this, "_startElement"),
+ array(&$this, "_endElement"));
+
+ xml_set_character_data_handler($xml_parser,
+ array(&$this, "_data"));
+
+ xml_parser_set_option($xml_parser,
+ XML_OPTION_CASE_FOLDING, false);
+
+ while($this->success && !feof($f_in)) {
+ $line = fgets($f_in);
+ if (is_string($line)) {
+ $had_input = true;
+ $this->success &= xml_parse($xml_parser, $line, false);
+ }
+ }
+
+ if($had_input) {
+ $this->success &= xml_parse($xml_parser, "", true);
+ }
+
+ xml_parser_free($xml_parser);
+
+ fclose($f_in);
+ }
+
+ /**
+ * tag start handler
+ *
+ * @param resource parser
+ * @param string tag name
+ * @param array tag attributes
+ * @return void
+ * @access private
+ */
+ function _startElement($parser, $name, $attrs)
+ {
+ if (strstr($name, " ")) {
+ list($ns, $tag) = explode(" ", $name);
+ if ($ns == "")
+ $this->success = false;
+ } else {
+ $ns = "";
+ $tag = $name;
+ }
+
+ if ($this->depth == 1) {
+ $this->mode = $tag;
+ }
+
+ if ($this->depth == 3) {
+ $prop = array("name" => $tag);
+ $this->current = array("name" => $tag, "ns" => $ns, "status"=> 200);
+ if ($this->mode == "set") {
+ $this->current["val"] = ""; // default set val
+ }
+ }
+
+ if ($this->depth >= 4) {
+ $this->current["val"] .= "<$tag";
+ foreach ($attr as $key => $val) {
+ $this->current["val"] .= ' '.$key.'="'.str_replace('"','"', $val).'"';
+ }
+ $this->current["val"] .= ">";
+ }
+
+
+
+ $this->depth++;
+ }
+
+ /**
+ * tag end handler
+ *
+ * @param resource parser
+ * @param string tag name
+ * @return void
+ * @access private
+ */
+ function _endElement($parser, $name)
+ {
+ if (strstr($name, " ")) {
+ list($ns, $tag) = explode(" ", $name);
+ if ($ns == "")
+ $this->success = false;
+ } else {
+ $ns = "";
+ $tag = $name;
+ }
+
+ $this->depth--;
+
+ if ($this->depth >= 4) {
+ $this->current["val"] .= "</$tag>";
+ }
+
+ if ($this->depth == 3) {
+ if (isset($this->current)) {
+ $this->props[] = $this->current;
+ unset($this->current);
+ }
+ }
+ }
+
+ /**
+ * input data handler
+ *
+ * @param resource parser
+ * @param string data
+ * @return void
+ * @access private
+ */
+ function _data($parser, $data) {
+ if (isset($this->current)) {
+ $this->current["val"] .= $data;
+ }
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// dependency on PEAR
+require_once 'System.php';
+
+
+/** This class provides a configuration tool for Diogenes plugins.
+ */
+class Diogenes_Plugin_Editor {
+ /** Should we show plugins parameters? */
+ var $show_params = 1;
+
+ /** Should editing functions be disabled? */
+ var $readonly = false;
+
+ /** The alias of the barrel we are working on. */
+ var $plug_barrel;
+
+ /** The PID of the page we are working on. */
+ var $plug_page;
+
+ /** The write permissions of the page we are working on. */
+ var $plug_page_wperms;
+
+ /** Construct a new plugin editor.
+ *
+ * @param $plug_barrel
+ * @param $plug_page
+ * @param $plug_page_wperms
+ */
+ function Diogenes_Plugin_Editor($plug_barrel, $plug_page, $plug_page_wperms = '')
+ {
+ $this->plug_barrel = $plug_barrel;
+ $this->plug_page = $plug_page;
+ $this->plug_page_wperms = $plug_page_wperms;
+ }
+
+
+ /** Run the plugin editor.
+ *
+ * @param $page
+ * @param $outputvar
+ */
+ function run(&$page, $outputvar = '')
+ {
+ global $globals;
+
+ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
+ $target = isset($_REQUEST['plug_target']) ? $_REQUEST['plug_target'] : '';
+
+ // load all available plugins
+ $cachefile = $globals->plugins->cacheFile($this->plug_barrel);
+
+ // if the tree cache does not exits, try to init it
+ if (!file_exists($cachefile)) {
+ $globals->plugins->compileCache($cachefile, $this->plug_barrel);
+ }
+ $cache = $globals->plugins->readCache($cachefile, $this->plug_barrel);
+ $available = $globals->plugins->cachedAvailable($cache, $this->plug_barrel, $this->plug_page);
+
+
+ // handle updates
+ switch ($action) {
+ case "move_up": case "move_down":
+ if ($this->readonly) die("Sorry, this plugin view is read-only.");
+
+ $delta = ($action == "move_down") ? 1 : -1;
+ //$page->info("moving plugin '$target'..");
+ $plugcache_a = $globals->plugins->cacheGet($cache, $this->plug_barrel, $this->plug_page, $target);
+ $plug_a =& $globals->plugins->load($plugcache_a);
+ //$plug_a =& $globals->plugins->get($target);
+
+ if (is_object($plug_a) && ($plug_a->active)) {
+ $old_pos = $plug_a->pos;
+ //$plug_b =& $globals->plugins->getAtPos($old_pos + $delta);
+ $plugcache_b = $globals->plugins->cacheGetAtPos($cache, $this->plug_barrel, $this->plug_page, $old_pos + $delta);
+
+ if (is_array($plugcache_b))
+ {
+ $plug_b =& $globals->plugins->load($plugcache_b);
+
+ // swap the current plugin and the next plugin
+ if (is_object($plug_b) && ($plug_b->active))
+ {
+ $plug_a->writeParams($this->plug_barrel, $this->plug_page, $old_pos + $delta);
+ $plug_b->writeParams($this->plug_barrel, $this->plug_page, $old_pos);
+ }
+ }
+ }
+ $globals->plugins->compileCache($cachefile, $this->plug_barrel);
+ $cache = $globals->plugins->readCache($cachefile, $this->plug_barrel);
+ $available = $globals->plugins->cachedAvailable($cache, $this->plug_barrel, $this->plug_page);
+ break;
+
+ case "update":
+ if ($this->readonly) die("Sorry, this plugin view is read-only.");
+
+ // list of active plugins
+ $active = array();
+ if (isset($_REQUEST['plugins_active'])) {
+ $active = array_values($_REQUEST['plugins_active']);
+ }
+
+ foreach ($available as $plugin) {
+ $plugentry =& $globals->plugins->cacheGet($cache, $this->plug_barrel, $this->plug_page, $plugin);
+ if (!is_array($plugentry) and $this->plug_page) {
+ $plugentry = $globals->plugins->cacheGet($cache, $this->plug_barrel, 0, $plugin);
+ if (is_array($plugentry))
+ {
+ $plugentry['active'] = 0;
+ }
+ }
+
+ // check we have a valid cache entry
+ if (!is_array($plugentry)) {
+ $page->info("could not find plugin '$plugin' in cache for barrel '{$this->plug_barrel}'");
+ return;
+ }
+
+ $plug_h =& $globals->plugins->load($plugentry);
+
+ if (is_object($plug_h) && is_array($plugentry)) {
+ $pos = array_search($plugin, $active);
+
+ if ($pos !== false) {
+ // check the plugin is allowed in the current context
+ if ($this->plug_barrel and $this->plug_page) {
+ $wperms = $this->plug_page_wperms;
+
+ // $page->info("checking plugin '$plugin' vs. write permissions '$wperms'..");
+ if (!$plug_h->allow_wperms($wperms))
+ {
+ $page->info("plugin '$plugin' is not allowed with write permissions '$wperms'!");
+ break;
+ }
+ }
+
+ // retrieve parameters from REQUEST
+ foreach ($plug_h->params as $key => $val)
+ {
+ if (isset($_REQUEST[$plug_h->name."_".$key])) {
+ $plug_h->params[$key] = $_REQUEST[$plug_h->name."_".$key];
+ }
+ }
+
+ // write parameters to database
+ $plug_h->writeParams($this->plug_barrel, $this->plug_page, $pos);
+ } else {
+ // erase parameters from database
+ $plug_h->eraseParams($this->plug_barrel, $this->plug_page);
+ }
+ }
+ }
+
+ // log this action
+ if ($this->plug_barrel)
+ {
+ if ($this->plug_page)
+ {
+ $page->log('page_plugins', $this->plug_barrel.":".$this->plug_page);
+ } else {
+ $page->log('barrel_plugins', $this->plug_barrel.":*");
+ }
+ }
+
+ $globals->plugins->compileCache($cachefile, $this->plug_barrel);
+ $cache = $globals->plugins->readCache($cachefile, $this->plug_barrel);
+ $available = $globals->plugins->cachedAvailable($cache, $this->plug_barrel, $this->plug_page);
+ break;
+ }
+
+ // get dump of plugins to fill out form
+ $page->assign('plug_barrel', $this->plug_barrel);
+ $page->assign('plug_page', $this->plug_page);
+
+ $plugs = array();
+
+ // start by adding the active plugins
+ foreach ($cache as $plugcache)
+ {
+ if (in_array($plugcache['plugin'], $available) and ($plugcache['page'] == $this->plug_page) and ($plugcache['active']))
+ {
+ // check we have a valid plugin handle
+ $plug_h = $globals->plugins->load($plugcache);
+ if (!is_object($plug_h)) {
+
+ $page->info("could not load disabled plugin '{$plugcache['plugin']}' in barrel '{$this->plug_barrel}'");
+
+ } else {
+
+ $plugentry = $plug_h->dump();
+ $plugentry['icon'] = $globals->icons->get_action_icon('plugins');
+ $type = $plugentry['type'];
+ if (!empty($plugs[$type])) {
+ $plugentry['move_up'] = 1;
+ $last = count($plugs[$type]) - 1;
+ $plugs[$type][$last]['move_down'] = 1;
+ } else {
+ $plugs[$type] = array();
+ }
+ array_push($plugs[$type], $plugentry);
+
+ }
+ }
+ }
+
+ // next we add the disabled plugins
+ if (!$this->readonly)
+ {
+ foreach ($available as $plugname)
+ {
+ $plugcache = $globals->plugins->cacheGet($cache, $this->plug_barrel, $this->plug_page, $plugname);
+ if (!is_array($plugcache) or !$plugcache['active'])
+ {
+ $plugcache = $globals->plugins->cacheGet($cache, $this->plug_barrel, 0, $plugname);
+ $plugcache['active'] = 0;
+ $plug_h = $globals->plugins->load($plugcache);
+ if (!is_object($plug_h)) {
+ $page->info("could not load disabled plugin '$plugname' in barrel '{$this->plug_barrel}'");
+ return;
+ }
+
+ $plugentry = $plug_h->dump();
+ $plugentry['icon'] = $globals->icons->get_action_icon('plugins');
+ $type = $plugentry['type'];
+ if (empty($plugs[$type])) {
+ $plugs[$type] = array();
+ }
+ array_push($plugs[$type], $plugentry);
+ }
+ }
+ }
+
+ /*
+ echo "plugins <pre>";
+ print_r($plugs);
+ echo "</pre>";
+ */
+ $page->assign('plugins', $plugs);
+
+ // values
+ $page->assign('show_params', $this->show_params);
+ $page->assign('readonly',$this->readonly);
+
+ // translations
+ $page->assign('msg_submit', __("Submit"));
+ $page->assign('msg_plugedit_plugin', __("plugin"));
+ $page->assign('msg_plugedit_plugins', __("plugins"));
+ $page->assign('msg_plugedit_description', __("description"));
+ $page->assign('msg_plugedit_parameters', __("parameters"));
+ $page->assign('msg_move_up', __("move up"));
+ $page->assign('msg_move_down', __("move down"));
+
+ // if requested, assign the content to be displayed
+ if (!empty($outputvar)) {
+ $page->assign($outputvar, $page->fetch('plugin-editor.tpl'));
+ }
+ }
+
+
+ /** Do not display plugin parameters.
+ *
+ * @param $hide boolean
+ */
+ function hide_params($hide)
+ {
+ $this->show_params = !$hide;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// dependency on PEAR
+require_once 'Plugin/Skel.php';
+
+/** This class describes a Diogenes filter plugin.
+ */
+class Diogenes_Plugin_Filter extends Diogenes_Plugin_Skel
+{
+ /** Plugin name */
+ var $name = "Plugin_Filter";
+
+ /** Plugin description */
+ var $description = "Filter plugin skeleton";
+
+ /** Plugin version */
+ var $version = "0.1";
+
+ /** Plugin type : filter */
+ var $type = "filter";
+
+
+ /** Apply filtering to the input and return an output.
+ *
+ * The default implementation searches for a tag whose name matches
+ * the plugin name and replaces it by the output of the show() method.
+ *
+ * @param $input
+ */
+ function filter($input)
+ {
+ $name = $this->name;
+
+ $mask = "/(\{$name(\s+[^\}]*)?\})/";
+ $bits = preg_split($mask, $input, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
+ $output = "";
+ while($bit = array_shift($bits)) {
+ if (preg_match($mask, $bit)) {
+ $argstr = array_shift($bits);
+ $argbits = preg_split("/\s/", trim($argstr));
+ $args = array();
+ foreach($argbits as $argbit)
+ {
+ if (preg_match('/([a-zA-Z]+)=([\'"])(.*)\2$/', $argbit, $matches)) {
+ $args[$matches[1]] = $matches[3];
+ }
+ }
+ $output .= $this->show($args);
+ } else {
+ $output .= $bit;
+ }
+ }
+ return $output;
+ }
+
+
+ /** Show an instance of the plugin. This is called by filter() every time
+ * a tag representing the plugin is found.
+ */
+ function show()
+ {
+ return '';
+ }
+
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// dependency on PEAR
+require_once 'Plugin/Skel.php';
+
+/** This class describes a Diogenes rendering plugin.
+ */
+class Diogenes_Plugin_Render extends Diogenes_Plugin_Skel
+{
+ var $name = "Plugin_Render";
+ var $description = "Rendering plugin skeleton";
+ var $version = "0.1";
+
+ /* types : render, filter */
+ var $type = "render";
+
+
+ /** Render a given file and return the output.
+ *
+ * The default implementation simply dumps the contents of the file.
+ */
+ function render($file)
+ {
+ if (file_exists($file)) {
+ return file_get_contents($file);
+ }
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// dependency on PEAR
+require_once 'System.php';
+
+/** Recursive stripslashes.
+ *
+ * @param $value
+ */
+function stripslashes_recurse($value)
+{
+ $value = is_array($value) ?
+ array_map('stripslashes_recurse', $value) :
+ stripslashes($value);
+ return $value;
+}
+
+
+/** This class describes a Diogenes plugin.
+ */
+class Diogenes_Plugin_Skel {
+ /** Plugin type (object, filter) */
+ var $type;
+
+ /** Array of plugin parameters */
+ var $params = array();
+
+ /** Plugin name */
+ var $name = "Plugin_Skel";
+
+ /** Plugin description */
+ var $description = "Plugin skeleton";
+
+ /** Plugin version */
+ var $version = "0.1";
+
+ /** Position of the plugin */
+ var $pos;
+
+ /** Is the plugin active ? */
+ var $active = 0;
+
+
+ /** Is the plugin allowed with respect to a given write permission on a page ?
+ *
+ * @param $wperms
+ */
+ function allow_wperms($wperms)
+ {
+ return ($wperms != 'public');
+ }
+
+
+ /** Set plugin parameters.
+ *
+ * @param $params
+ */
+ function setParams($params)
+ {
+ $bits = explode("\0", $params);
+ foreach ($bits as $bit)
+ {
+ $frags = explode("=", $bit, 2);
+ $key = $frags[0];
+ $val = isset($frags[1]) ? $frags[1] : '';
+ if (isset($this->params[$key])) {
+ $this->params[$key] = $val;
+ }
+ }
+ }
+
+
+ /** Erase parameters from database.
+ *
+ * @param $barrel
+ * @param $page
+ */
+ function eraseParams($barrel = '', $page = 0)
+ {
+ global $globals;
+
+ //echo $this->name . " : deleteParams($barrel, $page)<br/>\n";
+ $globals->db->query("delete from diogenes_plugin where plugin='{$this->name}' and barrel='$barrel' and page='$page'");
+
+ $this->active = 0;
+ unset($this->pos);
+ foreach ($this->params as $key => $val)
+ {
+ $this->params[$key] = '';
+ }
+ }
+
+
+ /** Store parameters to database.
+ *
+ * @param $barrel
+ * @param $page
+ * @param $pos
+ */
+ function writeParams($barrel = '', $page = 0, $pos = 0)
+ {
+ global $globals;
+
+ $this->pos = $pos;
+ $this->active = 1;
+
+ $params = '';
+ foreach ($this->params as $key => $val)
+ {
+ //echo $this->name . " $key=$val<br/>";
+ $params .= "$key=$val\0";
+ }
+ $globals->db->query("replace into diogenes_plugin set plugin='{$this->name}', barrel='$barrel', page='$page', pos='$pos', params='$params'");
+ }
+
+
+ /** Dump parameters to a table.
+ */
+ function dump()
+ {
+ $plugentr = array();
+
+ // copy over properties
+ $props = array('active', 'name', 'params', 'description', 'version', 'type', 'pos');
+ foreach ($props as $prop)
+ {
+ if (isset($this->$prop))
+ {
+ $plugentr[$prop] = stripslashes_recurse($this->$prop);
+ }
+ }
+ return $plugentr;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+// dependency on PEAR
+require_once 'System.php';
+
+/** This class describes Diogenes' plugins.
+ */
+class Diogenes_Plugins
+{
+ /** Array of currently loaded plugins */
+ var $loaded = array();
+
+ /** Directory that holds the plugins cache files */
+ var $cachedir;
+
+ /** Directory that holds the plugins */
+ var $plugdir;
+
+
+ /** Constructs a new holder for Diogenes plugins.
+ *
+ * @param $dbh
+ * @param $plugdir
+ * @param $cachedir
+ */
+ function Diogenes_Plugins(&$dbh, $plugdir, $cachedir)
+ {
+ $this->dbh =& $dbh;
+ $this->plugdir = $plugdir;
+ $this->cachedir = $cachedir;
+ }
+
+
+ /** Return the path of the cache file
+ *
+ * @param $barrel
+ */
+ function cacheFile($barrel)
+ {
+ $cachefile = $this->cachedir . "/" . ($barrel ? $barrel : "__diogenes__") . ".plugins";
+ return $cachefile;
+ }
+
+
+ /** Return the cache entry for specified plugin
+ *
+ * @param $cache
+ * @param $barrel
+ * @param $page
+ * @param $plugin
+ */
+ function cacheGet($cache, $barrel, $page, $plugin)
+ {
+ foreach ($cache as $plugentry)
+ {
+ if (($plugentry['plugin'] == $plugin) && ($plugentry['page'] == $page))
+ {
+ return $plugentry;
+ }
+ }
+ return;
+ }
+
+
+ /** Return the cache entry for a plugin at a specified position
+ *
+ * @param $cache
+ * @param $barrel
+ * @param $page
+ * @param $pos
+ */
+ function cacheGetAtPos($cache, $barrel, $page, $pos)
+ {
+ foreach ($cache as $plugentry)
+ {
+ if (($plugentry['pos'] == $pos) && ($plugentry['page'] == $page))
+ {
+ return $plugentry;
+ }
+ }
+ }
+
+
+ /** List the plugins that are active in a given context
+ *
+ * @param $cache
+ * @param $barrel
+ * @param $page
+ */
+ function cachedActive($cache, $barrel, $page)
+ {
+ $plugins = array();
+ foreach ($cache as $plug)
+ {
+ if ($plug['page'] == $page)
+ {
+ array_push($plugins, $plug);
+ }
+ }
+ return $plugins;
+ }
+
+
+ /** Returns an array of cache entries representing the available plugins
+ * in a given context
+ *
+ * @param $cache
+ * @param $barrel
+ * @param $page
+ */
+ function cachedAvailable($cache, $barrel, $page)
+ {
+ $available = array();
+ foreach ($cache as $plugentry)
+ {
+ $plugfile = $this->plugdir."/".$plugentry['plugin'].".php";
+ if (file_exists($plugfile) and ($plugentry['page'] == 0) and (!$page or $plugentry['active']))
+ {
+ array_push($available, $plugentry['plugin']);
+ }
+ }
+ return $available;
+ }
+
+
+ /** Remove database references to plugins that are not available.
+ */
+ function clean_database(&$page)
+ {
+ /*
+ $res = $this->dbh->query("select distinct plugin from diogenes_plugin");
+ while (list($plugname) = mysql_fetch_row($res))
+ {
+ $page->info("examining $plugname..");
+ $plug = $this->load($plugname);
+ if (!is_object($plug)) {
+ $page->info("plugin $plugname is broken, removing");
+ $this->dbh->query("delete from diogenes_plugin where plugin='$plugname'");
+ }
+ }
+ mysql_free_result($res);
+ */
+ }
+
+
+ /** Compile plugin cache.
+ *
+ * @param $cachefile
+ * @param $barrel
+ */
+ function compileCache($cachefile, $barrel)
+ {
+ if (!$fp = fopen($cachefile, "w")) {
+ trigger_error("failed to open '$cachefile' for writing", E_USER_ERROR);
+ }
+
+ // get the list of available plugins
+ $available = array();
+ if (!$barrel) {
+
+ $plugfiles = System::find($this->plugdir.' -type f -name *.php');
+ foreach ($plugfiles as $file) {
+ $name = basename($file);
+ $name = substr($name, 0, -4);
+ array_push($available, $name);
+ }
+
+ } else {
+
+ $sql = "select plugin from diogenes_plugin where page=0 AND barrel=''";
+ $res = $this->dbh->query($sql);
+ while (list($plugin) = mysql_fetch_row($res))
+ {
+ array_push($available, $plugin);
+ }
+ mysql_free_result($res);
+ }
+
+/*
+ echo "compile : available <pre>";
+ print_r($available);
+ echo "</pre>";
+*/
+ // get active plugins
+ $sql = "select page, pos, plugin, params from diogenes_plugin where barrel='{$barrel}' order by page, pos";
+ $res = $this->dbh->query($sql);
+ $active = array();
+ while ($row = mysql_fetch_row($res))
+ {
+ $plugin = $row[2];
+ if (in_array($plugin, $available)) {
+ array_unshift($row, 1);
+ fputs($fp, join("\t", $row) . "\n");
+ if (!$row[1]) {
+ array_push($active, $plugin);
+ //echo "compileCache : adding active plugin $plugin<br/>";
+ }
+ }
+ }
+ mysql_free_result($res);
+
+ // add inactive plugins
+ foreach ($available as $plugin)
+ {
+ if (!in_array($plugin, $active))
+ {
+ //echo "compileCache : adding inactive plugin $plugin<br/>";
+ $row = array(0, 0, 0, $plugin, '');
+ fputs($fp, join("\t", $row) . "\n");
+ }
+ }
+
+ fclose($fp);
+
+ //$this->log("rcs_commit","{$this->alias}:$dir/$file:$message");
+
+ }
+
+
+ /** Load the specified plugin
+ *
+ * @param $plugentry
+ */
+ function load($plugentry)
+ {
+ $plugin = $plugentry['plugin'];
+ $plugfile = $this->plugdir."/$plugin.php";
+ if (!file_exists($plugfile)) {
+ trigger_error("could not find plugin file '$plugfile'", E_USER_WARNING);
+ return;
+ }
+
+ include_once($plugfile);
+
+ if (!class_exists($plugin)) {
+ trigger_error("could not find class '$plugin'", E_USER_WARNING);
+ return;
+ }
+
+ // load and register plugin
+ $plug = new $plugin();
+ $plug->pos = $plugentry['pos'];
+ $plug->active = $plugentry['active'];
+ $plug->setParams($plugentry['params']);
+ $this->loaded[$plugin] =& $plug;
+
+ return $plug;
+ }
+
+
+ /** Read the compiled plugin cache
+ *
+ * @param $cachefile
+ * @param $barrel
+ */
+ function readCache($cachefile, $barrel)
+ {
+ if (!file_exists($cachefile)) {
+ return array();
+ }
+
+ if (!$fp = fopen($cachefile, "r")) {
+ trigger_error("failed to open '$cachefile' for reading", E_USER_WARNING);
+ return;
+ }
+
+ $plugins = array();
+ while ($line = fgets($fp))
+ {
+ // drop end of line
+ $line = substr($line, 0, -1);
+ $bits = explode("\t", $line);
+ $plug = array(
+ 'active' => $bits[0],
+ 'page' => $bits[1],
+ 'pos' => $bits[2],
+ 'plugin' => $bits[3],
+ 'params' => $bits[4],
+ );
+ array_push($plugins, $plug);
+ }
+
+ fclose($fp);
+
+ return $plugins;
+ }
+
+
+ /** Prepare plugins trace for output
+ */
+ function trace_format()
+ {
+ $out = "";
+ foreach ($this->loaded as $key => $val)
+ {
+ $out .= '<table class="light" style="width: 100%; font-family: monospace">';
+ $out .= '<tr><th colspan="2">'.$key.' v'.$val->version.'</th></tr>';
+ if (isset($val->pos)) {
+ $out .= '<tr><td>position</td><td>'.$val->pos.'</td></tr>';
+ }
+ $out .= '<tr><td>type</td><td>'.$val->type.'</td></tr>';
+ $out .= '<tr><td>description</td><td>'.$val->description.'</td></tr>';
+ if (empty($val->params)) {
+ $out .= '<tr class="odd"><td colspan="2">parameters</td></tr>';
+ foreach ($val->params as $skey => $sval)
+ {
+ $out .= "<tr><td>$skey</td><td>$sval</td></tr>";
+ }
+ }
+ $out .= "</table><br/>";
+ }
+ return $out;
+ }
+
+
+
+}
+
+?>
--- /dev/null
+<?php
+
+/**
+*
+* Parse structured wiki text and render into arbitrary formats such as XHTML.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Wiki.php,v 1.29 2005/02/24 17:26:29 pmjones Exp $
+*
+*/
+
+/**
+* The baseline abstract parser class.
+*/
+
+require_once 'Text/Wiki/Parse.php';
+
+/**
+* The baseline abstract render class.
+*/
+
+require_once 'Text/Wiki/Render.php';
+
+
+/**
+*
+* Parse structured wiki text and render into arbitrary formats such as XHTML.
+*
+* This is the "master" class for handling the management and convenience
+* functions to transform Wiki-formatted text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+<<<<<<< Wiki.php
+* @version 0.25.0
+*
+* @license LGPL
+=======
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @version @package_version@
+>>>>>>> 1.28
+*
+*/
+
+class Text_Wiki {
+
+ /**
+ *
+ * The default list of rules, in order, to apply to the source text.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $rules = array(
+ 'Prefilter',
+ 'Delimiter',
+ 'Code',
+ 'Function',
+ 'Html',
+ 'Raw',
+ 'Include',
+ 'Embed',
+ 'Anchor',
+ 'Heading',
+ 'Toc',
+ 'Horiz',
+ 'Break',
+ 'Blockquote',
+ 'List',
+ 'Deflist',
+ 'Table',
+ 'Image',
+ 'Phplookup',
+ 'Center',
+ 'Newline',
+ 'Paragraph',
+ 'Url',
+ 'Freelink',
+ 'Interwiki',
+ 'Wikilink',
+ 'Colortext',
+ 'Strong',
+ 'Bold',
+ 'Emphasis',
+ 'Italic',
+ 'Tt',
+ 'Superscript',
+ 'Subscript',
+ 'Revise',
+ 'Tighten'
+ );
+
+
+ /**
+ *
+ * The list of rules to not-apply to the source text.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $disable = array(
+ 'Html',
+ 'Include',
+ 'Embed'
+ );
+
+
+ /**
+ *
+ * Custom configuration for rules at the parsing stage.
+ *
+ * In this array, the key is the parsing rule name, and the value is
+ * an array of key-value configuration pairs corresponding to the $conf
+ * property in the target parsing rule.
+ *
+ * For example:
+ *
+ * <code>
+ * $parseConf = array(
+ * 'Include' => array(
+ * 'base' => '/path/to/scripts/'
+ * )
+ * );
+ * </code>
+ *
+ * Note that most default rules do not need any parsing configuration.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $parseConf = array();
+
+
+ /**
+ *
+ * Custom configuration for rules at the rendering stage.
+ *
+ * Because rendering may be different for each target format, the
+ * first-level element in this array is always a format name (e.g.,
+ * 'Xhtml').
+ *
+ * Within that first level element, the subsequent elements match the
+ * $parseConf format. That is, the sub-key is the rendering rule name,
+ * and the sub-value is an array of key-value configuration pairs
+ * corresponding to the $conf property in the target rendering rule.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $renderConf = array(
+ 'Docbook' => array(),
+ 'Latex' => array(),
+ 'Pdf' => array(),
+ 'Plain' => array(),
+ 'Rtf' => array(),
+ 'Xhtml' => array()
+ );
+
+
+ /**
+ *
+ * Custom configuration for the output format itself.
+ *
+ * Even though Text_Wiki will render the tokens from parsed text,
+ * the format itself may require some configuration. For example,
+ * RTF needs to know font names and sizes, PDF requires page layout
+ * information, and DocBook needs a section hierarchy. This array
+ * matches the $conf property of the the format-level renderer
+ * (e.g., Text_Wiki_Render_Xhtml).
+ *
+ * In this array, the key is the rendering format name, and the value is
+ * an array of key-value configuration pairs corresponding to the $conf
+ * property in the rendering format rule.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $formatConf = array(
+ 'Docbook' => array(),
+ 'Latex' => array(),
+ 'Pdf' => array(),
+ 'Plain' => array(),
+ 'Rtf' => array(),
+ 'Xhtml' => array()
+ );
+
+
+ /**
+ *
+ * The delimiter for token numbers of parsed elements in source text.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $delim = "\xFF";
+
+
+ /**
+ *
+ * The tokens generated by rules as the source text is parsed.
+ *
+ * As Text_Wiki applies rule classes to the source text, it will
+ * replace portions of the text with a delimited token number. This
+ * is the array of those tokens, representing the replaced text and
+ * any options set by the parser for that replaced text.
+ *
+ * The tokens array is sequential; each element is itself a sequential
+ * array where element 0 is the name of the rule that generated the
+ * token, and element 1 is an associative array where the key is an
+ * option name and the value is an option value.
+ *
+ * @access private
+ *
+ * @var array
+ *
+ */
+
+ var $tokens = array();
+
+
+ /**
+ *
+ * The source text to which rules will be applied.
+ *
+ * This text will be transformed in-place, which means that it will
+ * change as the rules are applied.
+ *
+ * @access private
+ *
+ * @var string
+ *
+ */
+
+ var $source = '';
+
+
+ /**
+ *
+ * Array of rule parsers.
+ *
+ * Text_Wiki creates one instance of every rule that is applied to
+ * the source text; this array holds those instances. The array key
+ * is the rule name, and the array value is an instance of the rule
+ * class.
+ *
+ * @access private
+ *
+ * @var array
+ *
+ */
+
+ var $parseObj = array();
+
+
+ /**
+ *
+ * Array of rule renderers.
+ *
+ * Text_Wiki creates one instance of every rule that is applied to
+ * the source text; this array holds those instances. The array key
+ * is the rule name, and the array value is an instance of the rule
+ * class.
+ *
+ * @access private
+ *
+ * @var array
+ *
+ */
+
+ var $renderObj = array();
+
+
+ /**
+ *
+ * Array of format renderers.
+ *
+ * @access private
+ *
+ * @var array
+ *
+ */
+
+ var $formatObj = array();
+
+
+ /**
+ *
+ * Array of paths to search, in order, for parsing and rendering rules.
+ *
+ * @access private
+ *
+ * @var array
+ *
+ */
+
+ var $path = array(
+ 'parse' => array(),
+ 'render' => array()
+ );
+
+
+
+ /**
+ *
+ * The directory separator character.
+ *
+ * @access private
+ *
+ * @var string
+ *
+ */
+
+ var $_dirSep = DIRECTORY_SEPARATOR;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @access public
+ *
+ * @param array $rules The set of rules to load for this object.
+ *
+ */
+
+ function Text_Wiki($rules = null)
+ {
+ if (is_array($rules)) {
+ $this->rules = $rules;
+ }
+
+ $this->addPath(
+ 'parse',
+ $this->fixPath(dirname(__FILE__)) . 'Wiki/Parse/Default/'
+ );
+
+ $this->addPath(
+ 'render',
+ $this->fixPath(dirname(__FILE__)) . 'Wiki/Render/'
+ );
+
+ }
+
+
+ /**
+ *
+ * Set parser configuration for a specific rule and key.
+ *
+ * @access public
+ *
+ * @param string $rule The parse rule to set config for.
+ *
+ * @param array|string $arg1 The full config array to use for the
+ * parse rule, or a conf key in that array.
+ *
+ * @param string $arg2 The config value for the key.
+ *
+ * @return void
+ *
+ */
+
+ function setParseConf($rule, $arg1, $arg2 = null)
+ {
+ $rule = ucwords(strtolower($rule));
+
+ if (! isset($this->parseConf[$rule])) {
+ $this->parseConf[$rule] = array();
+ }
+
+ // if first arg is an array, use it as the entire
+ // conf array for the rule. otherwise, treat arg1
+ // as a key and arg2 as a value for the rule conf.
+ if (is_array($arg1)) {
+ $this->parseConf[$rule] = $arg1;
+ } else {
+ $this->parseConf[$rule][$arg1] = $arg2;
+ }
+ }
+
+
+ /**
+ *
+ * Get parser configuration for a specific rule and key.
+ *
+ * @access public
+ *
+ * @param string $rule The parse rule to get config for.
+ *
+ * @param string $key A key in the conf array; if null,
+ * returns the entire conf array.
+ *
+ * @return mixed The whole conf array if no key is specified,
+ * or the specific conf key value.
+ *
+ */
+
+ function getParseConf($rule, $key = null)
+ {
+ $rule = ucwords(strtolower($rule));
+
+ // the rule does not exist
+ if (! isset($this->parseConf[$rule])) {
+ return null;
+ }
+
+ // no key requested, return the whole array
+ if (is_null($key)) {
+ return $this->parseConf[$rule];
+ }
+
+ // does the requested key exist?
+ if (isset($this->parseConf[$rule][$key])) {
+ // yes, return that value
+ return $this->parseConf[$rule][$key];
+ } else {
+ // no
+ return null;
+ }
+ }
+
+
+ /**
+ *
+ * Set renderer configuration for a specific format, rule, and key.
+ *
+ * @access public
+ *
+ * @param string $format The render format to set config for.
+ *
+ * @param string $rule The render rule to set config for in the format.
+ *
+ * @param array|string $arg1 The config array, or the config key
+ * within the render rule.
+ *
+ * @param string $arg2 The config value for the key.
+ *
+ * @return void
+ *
+ */
+
+ function setRenderConf($format, $rule, $arg1, $arg2 = null)
+ {
+ $format = ucwords(strtolower($format));
+ $rule = ucwords(strtolower($rule));
+
+ if (! isset($this->renderConf[$format])) {
+ $this->renderConf[$format] = array();
+ }
+
+ if (! isset($this->renderConf[$format][$rule])) {
+ $this->renderConf[$format][$rule] = array();
+ }
+
+ // if first arg is an array, use it as the entire
+ // conf array for the render rule. otherwise, treat arg1
+ // as a key and arg2 as a value for the render rule conf.
+ if (is_array($arg1)) {
+ $this->renderConf[$format][$rule] = $arg1;
+ } else {
+ $this->renderConf[$format][$rule][$arg1] = $arg2;
+ }
+ }
+
+
+ /**
+ *
+ * Get renderer configuration for a specific format, rule, and key.
+ *
+ * @access public
+ *
+ * @param string $format The render format to get config for.
+ *
+ * @param string $rule The render format rule to get config for.
+ *
+ * @param string $key A key in the conf array; if null,
+ * returns the entire conf array.
+ *
+ * @return mixed The whole conf array if no key is specified,
+ * or the specific conf key value.
+ *
+ */
+
+ function getRenderConf($format, $rule, $key = null)
+ {
+ $format = ucwords(strtolower($format));
+ $rule = ucwords(strtolower($rule));
+
+ if (! isset($this->renderConf[$format]) ||
+ ! isset($this->renderConf[$format][$rule])) {
+ return null;
+ }
+
+ // no key requested, return the whole array
+ if (is_null($key)) {
+ return $this->renderConf[$format][$rule];
+ }
+
+ // does the requested key exist?
+ if (isset($this->renderConf[$format][$rule][$key])) {
+ // yes, return that value
+ return $this->renderConf[$format][$rule][$key];
+ } else {
+ // no
+ return null;
+ }
+
+ }
+
+ /**
+ *
+ * Set format configuration for a specific rule and key.
+ *
+ * @access public
+ *
+ * @param string $format The format to set config for.
+ *
+ * @param string $key The config key within the format.
+ *
+ * @param string $val The config value for the key.
+ *
+ * @return void
+ *
+ */
+
+ function setFormatConf($format, $arg1, $arg2 = null)
+ {
+ if (! is_array($this->formatConf[$format])) {
+ $this->formatConf[$format] = array();
+ }
+
+ // if first arg is an array, use it as the entire
+ // conf array for the format. otherwise, treat arg1
+ // as a key and arg2 as a value for the format conf.
+ if (is_array($arg1)) {
+ $this->formatConf[$format] = $arg1;
+ } else {
+ $this->formatConf[$format][$arg1] = $arg2;
+ }
+ }
+
+
+
+ /**
+ *
+ * Get configuration for a specific format and key.
+ *
+ * @access public
+ *
+ * @param string $format The format to get config for.
+ *
+ * @param mixed $key A key in the conf array; if null,
+ * returns the entire conf array.
+ *
+ * @return mixed The whole conf array if no key is specified,
+ * or the specific conf key value.
+ *
+ */
+
+ function getFormatConf($format, $key = null)
+ {
+ // the format does not exist
+ if (! isset($this->formatConf[$format])) {
+ return null;
+ }
+
+ // no key requested, return the whole array
+ if (is_null($key)) {
+ return $this->formatConf[$format];
+ }
+
+ // does the requested key exist?
+ if (isset($this->formatConf[$format][$key])) {
+ // yes, return that value
+ return $this->formatConf[$format][$key];
+ } else {
+ // no
+ return null;
+ }
+ }
+
+
+ /**
+ *
+ * Inserts a rule into to the rule set.
+ *
+ * @access public
+ *
+ * @param string $name The name of the rule. Should be different from
+ * all other keys in the rule set.
+ *
+ * @param string $tgt The rule after which to insert this new rule. By
+ * default (null) the rule is inserted at the end; if set to '', inserts
+ * at the beginning.
+ *
+ * @return void
+ *
+ */
+
+ function insertRule($name, $tgt = null)
+ {
+ $name = ucwords(strtolower($name));
+ if (! is_null($tgt)) {
+ $tgt = ucwords(strtolower($tgt));
+ }
+
+ // does the rule name to be inserted already exist?
+ if (in_array($name, $this->rules)) {
+ // yes, return
+ return null;
+ }
+
+ // the target name is not null, and not '', but does not exist
+ // in the list of rules. this means we're trying to insert after
+ // a target key, but the target key isn't there.
+ if (! is_null($tgt) && $tgt != '' &&
+ ! in_array($tgt, $this->rules)) {
+ return false;
+ }
+
+ // if $tgt is null, insert at the end. We know this is at the
+ // end (instead of resetting an existing rule) becuase we exited
+ // at the top of this method if the rule was already in place.
+ if (is_null($tgt)) {
+ $this->rules[] = $name;
+ return true;
+ }
+
+ // save a copy of the current rules, then reset the rule set
+ // so we can insert in the proper place later.
+ // where to insert the rule?
+ if ($tgt == '') {
+ // insert at the beginning
+ array_unshift($this->rules, $name);
+ return true;
+ }
+
+ // insert after the named rule
+ $tmp = $this->rules;
+ $this->rules = array();
+
+ foreach ($tmp as $val) {
+ $this->rules[] = $val;
+ if ($val == $tgt) {
+ $this->rules[] = $name;
+ }
+ }
+
+ return true;
+
+ }
+
+
+ /**
+ *
+ * Delete (remove or unset) a rule from the $rules property.
+ *
+ * @access public
+ *
+ * @param string $rule The name of the rule to remove.
+ *
+ * @return void
+ *
+ */
+
+ function deleteRule($name)
+ {
+ $name = ucwords(strtolower($name));
+ $key = array_search($name, $this->rules);
+ if ($key !== false) {
+ unset($this->rules[$key]);
+ }
+ }
+
+
+ /**
+ *
+ * Change from one rule to another in-place.
+ *
+ * @access public
+ *
+ * @param string $old The name of the rule to change from.
+ *
+ * @param string $new The name of the rule to change to.
+ *
+ * @return void
+ *
+ */
+
+ function changeRule($old, $new)
+ {
+ $old = ucwords(strtolower($old));
+ $new = ucwords(strtolower($new));
+ $key = array_search($old, $this->rules);
+ if ($key !== false) {
+ $this->rules[$old] = $new;
+ }
+ }
+
+
+ /**
+ *
+ * Enables a rule so that it is applied when parsing.
+ *
+ * @access public
+ *
+ * @param string $rule The name of the rule to enable.
+ *
+ * @return void
+ *
+ */
+
+ function enableRule($name)
+ {
+ $name = ucwords(strtolower($name));
+ $key = array_search($name, $this->disable);
+ if ($key !== false) {
+ unset($this->disable[$key]);
+ }
+ }
+
+
+ /**
+ *
+ * Disables a rule so that it is not applied when parsing.
+ *
+ * @access public
+ *
+ * @param string $rule The name of the rule to disable.
+ *
+ * @return void
+ *
+ */
+
+ function disableRule($name)
+ {
+ $name = ucwords(strtolower($name));
+ $key = array_search($name, $this->disable);
+ if ($key === false) {
+ $this->disable[] = $name;
+ }
+ }
+
+
+ /**
+ *
+ * Parses and renders the text passed to it, and returns the results.
+ *
+ * First, the method parses the source text, applying rules to the
+ * text as it goes. These rules will modify the source text
+ * in-place, replacing some text with delimited tokens (and
+ * populating the $this->tokens array as it goes).
+ *
+ * Next, the method renders the in-place tokens into the requested
+ * output format.
+ *
+ * Finally, the method returns the transformed text. Note that the
+ * source text is transformed in place; once it is transformed, it is
+ * no longer the same as the original source text.
+ *
+ * @access public
+ *
+ * @param string $text The source text to which wiki rules should be
+ * applied, both for parsing and for rendering.
+ *
+ * @param string $format The target output format, typically 'xhtml'.
+ * If a rule does not support a given format, the output from that
+ * rule is rule-specific.
+ *
+ * @return string The transformed wiki text.
+ *
+ */
+
+ function transform($text, $format = 'Xhtml')
+ {
+ $this->parse($text);
+ return $this->render($format);
+ }
+
+
+ /**
+ *
+ * Sets the $_source text property, then parses it in place and
+ * retains tokens in the $_tokens array property.
+ *
+ * @access public
+ *
+ * @param string $text The source text to which wiki rules should be
+ * applied, both for parsing and for rendering.
+ *
+ * @return void
+ *
+ */
+
+ function parse($text)
+ {
+ // set the object property for the source text
+ $this->source = $text;
+
+ // reset the tokens.
+ $this->tokens = array();
+
+ // apply the parse() method of each requested rule to the source
+ // text.
+ foreach ($this->rules as $name) {
+ // do not parse the rules listed in $disable
+ if (! in_array($name, $this->disable)) {
+
+ // load the parsing object
+ $this->loadParseObj($name);
+
+ // load may have failed; only parse if
+ // an object is in the array now
+ if (is_object($this->parseObj[$name])) {
+ $this->parseObj[$name]->parse();
+ }
+ }
+ }
+ }
+
+
+ /**
+ *
+ * Renders tokens back into the source text, based on the requested format.
+ *
+ * @access public
+ *
+ * @param string $format The target output format, typically 'xhtml'.
+ * If a rule does not support a given format, the output from that
+ * rule is rule-specific.
+ *
+ * @return string The transformed wiki text.
+ *
+ */
+
+ function render($format = 'Xhtml')
+ {
+ // the rendering method we're going to use from each rule
+ $format = ucwords(strtolower($format));
+
+ // the eventual output text
+ $output = '';
+
+ // when passing through the parsed source text, keep track of when
+ // we are in a delimited section
+ $in_delim = false;
+
+ // when in a delimited section, capture the token key number
+ $key = '';
+
+ // load the format object
+ $this->loadFormatObj($format);
+
+ // pre-rendering activity
+ if (is_object($this->formatObj[$format])) {
+ $output .= $this->formatObj[$format]->pre();
+ }
+
+ // load the render objects
+ foreach (array_keys($this->parseObj) as $rule) {
+ $this->loadRenderObj($format, $rule);
+ }
+
+ // pass through the parsed source text character by character
+ $k = strlen($this->source);
+ for ($i = 0; $i < $k; $i++) {
+
+ // the current character
+ $char = $this->source{$i};
+
+ // are alredy in a delimited section?
+ if ($in_delim) {
+
+ // yes; are we ending the section?
+ if ($char == $this->delim) {
+
+ // yes, get the replacement text for the delimited
+ // token number and unset the flag.
+ $key = (int)$key;
+ $rule = $this->tokens[$key][0];
+ $opts = $this->tokens[$key][1];
+ $output .= $this->renderObj[$rule]->token($opts);
+ $in_delim = false;
+
+ } else {
+
+ // no, add to the dlimited token key number
+ $key .= $char;
+
+ }
+
+ } else {
+
+ // not currently in a delimited section.
+ // are we starting into a delimited section?
+ if ($char == $this->delim) {
+ // yes, reset the previous key and
+ // set the flag.
+ $key = '';
+ $in_delim = true;
+ } else {
+ // no, add to the output as-is
+ $output .= $char;
+ }
+ }
+ }
+
+ // post-rendering activity
+ if (is_object($this->formatObj[$format])) {
+ $output .= $this->formatObj[$format]->post();
+ }
+
+ // return the rendered source text.
+ return $output;
+ }
+
+
+ /**
+ *
+ * Returns the parsed source text with delimited token placeholders.
+ *
+ * @access public
+ *
+ * @return string The parsed source text.
+ *
+ */
+
+ function getSource()
+ {
+ return $this->source;
+ }
+
+
+ /**
+ *
+ * Returns tokens that have been parsed out of the source text.
+ *
+ * @access public
+ *
+ * @param array $rules If an array of rule names is passed, only return
+ * tokens matching these rule names. If no array is passed, return all
+ * tokens.
+ *
+ * @return array An array of tokens.
+ *
+ */
+
+ function getTokens($rules = null)
+ {
+ if (is_null($rules)) {
+ return $this->tokens;
+ } else {
+ settype($rules, 'array');
+ $result = array();
+ foreach ($this->tokens as $key => $val) {
+ if (in_array($val[0], $rules)) {
+ $result[] = $val;
+ }
+ }
+ return $result;
+ }
+ }
+
+
+ /**
+ *
+ * Add a token to the Text_Wiki tokens array, and return a delimited
+ * token number.
+ *
+ * @access public
+ *
+ * @param array $options An associative array of options for the new
+ * token array element. The keys and values are specific to the
+ * rule, and may or may not be common to other rule options. Typical
+ * options keys are 'text' and 'type' but may include others.
+ *
+ * @param boolean $id_only If true, return only the token number, not
+ * a delimited token string.
+ *
+ * @return string|int By default, return the number of the
+ * newly-created token array element with a delimiter prefix and
+ * suffix; however, if $id_only is set to true, return only the token
+ * number (no delimiters).
+ *
+ */
+
+ function addToken($rule, $options = array(), $id_only = false)
+ {
+ // increment the token ID number. note that if you parse
+ // multiple times with the same Text_Wiki object, the ID number
+ // will not reset to zero.
+ static $id;
+ if (! isset($id)) {
+ $id = 0;
+ } else {
+ $id ++;
+ }
+
+ // force the options to be an array
+ settype($options, 'array');
+
+ // add the token
+ $this->tokens[$id] = array(
+ 0 => $rule,
+ 1 => $options
+ );
+
+ // return a value
+ if ($id_only) {
+ // return the last token number
+ return $id;
+ } else {
+ // return the token number with delimiters
+ return $this->delim . $id . $this->delim;
+ }
+ }
+
+
+ /**
+ *
+ * Set or re-set a token with specific information, overwriting any
+ * previous rule name and rule options.
+ *
+ * @access public
+ *
+ * @param int $id The token number to reset.
+ *
+ * @param int $rule The rule name to use.
+ *
+ * @param array $options An associative array of options for the
+ * token array element. The keys and values are specific to the
+ * rule, and may or may not be common to other rule options. Typical
+ * options keys are 'text' and 'type' but may include others.
+ *
+ * @return void
+ *
+ */
+
+ function setToken($id, $rule, $options = array())
+ {
+ // reset the token
+ $this->tokens[$id] = array(
+ 0 => $rule,
+ 1 => $options
+ );
+ }
+
+
+ /**
+ *
+ * Load a rule parser class file.
+ *
+ * @access public
+ *
+ * @return bool True if loaded, false if not.
+ *
+ */
+
+ function loadParseObj($rule)
+ {
+ $rule = ucwords(strtolower($rule));
+ $file = $rule . '.php';
+ $class = "Text_Wiki_Parse_$rule";
+
+ if (! class_exists($class)) {
+ $loc = $this->findFile('parse', $file);
+ if ($loc) {
+ // found the class
+ include_once $loc;
+ } else {
+ // can't find the class
+ $this->parseObj[$rule] = null;
+ return false;
+ }
+ }
+
+ $this->parseObj[$rule] =& new $class($this);
+
+ }
+
+
+ /**
+ *
+ * Load a rule-render class file.
+ *
+ * @access public
+ *
+ * @return bool True if loaded, false if not.
+ *
+ */
+
+ function loadRenderObj($format, $rule)
+ {
+ $format = ucwords(strtolower($format));
+ $rule = ucwords(strtolower($rule));
+ $file = "$format/$rule.php";
+ $class = "Text_Wiki_Render_$format" . "_$rule";
+
+ if (! class_exists($class)) {
+ // load the class
+ $loc = $this->findFile('render', $file);
+ if ($loc) {
+ // found the class
+ include_once $loc;
+ } else {
+ // can't find the class
+ return false;
+ }
+ }
+
+ $this->renderObj[$rule] =& new $class($this);
+ }
+
+
+ /**
+ *
+ * Load a format-render class file.
+ *
+ * @access public
+ *
+ * @return bool True if loaded, false if not.
+ *
+ */
+
+ function loadFormatObj($format)
+ {
+ $format = ucwords(strtolower($format));
+ $file = $format . '.php';
+ $class = "Text_Wiki_Render_$format";
+
+ if (! class_exists($class)) {
+ $loc = $this->findFile('render', $file);
+ if ($loc) {
+ // found the class
+ include_once $loc;
+ } else {
+ // can't find the class
+ return false;
+ }
+ }
+
+ $this->formatObj[$format] =& new $class($this);
+ }
+
+
+ /**
+ *
+ * Add a path to a path array.
+ *
+ * @access public
+ *
+ * @param string $type The path-type to add (parse or render).
+ *
+ * @param string $dir The directory to add to the path-type.
+ *
+ * @return void
+ *
+ */
+
+ function addPath($type, $dir)
+ {
+ $dir = $this->fixPath($dir);
+ if (! isset($this->path[$type])) {
+ $this->path[$type] = array($dir);
+ } else {
+ array_unshift($this->path[$type], $dir);
+ }
+ }
+
+
+ /**
+ *
+ * Get the current path array for a path-type.
+ *
+ * @access public
+ *
+ * @param string $type The path-type to look up (plugin, filter, or
+ * template). If not set, returns all path types.
+ *
+ * @return array The array of paths for the requested type.
+ *
+ */
+
+ function getPath($type = null)
+ {
+ if (is_null($type)) {
+ return $this->path;
+ } elseif (! isset($this->path[$type])) {
+ return array();
+ } else {
+ return $this->path[$type];
+ }
+ }
+
+
+ /**
+ *
+ * Searches a series of paths for a given file.
+ *
+ * @param array $type The type of paths to search (template, plugin,
+ * or filter).
+ *
+ * @param string $file The file name to look for.
+ *
+ * @return string|bool The full path and file name for the target file,
+ * or boolean false if the file is not found in any of the paths.
+ *
+ */
+
+ function findFile($type, $file)
+ {
+ // get the set of paths
+ $set = $this->getPath($type);
+
+ // start looping through them
+ foreach ($set as $path) {
+ $fullname = $path . $file;
+ if (file_exists($fullname) && is_readable($fullname)) {
+ return $fullname;
+ }
+ }
+
+ // could not find the file in the set of paths
+ return false;
+ }
+
+
+ /**
+ *
+ * Append a trailing '/' to paths, unless the path is empty.
+ *
+ * @access private
+ *
+ * @param string $path The file path to fix
+ *
+ * @return string The fixed file path
+ *
+ */
+
+ function fixPath($path)
+ {
+ $len = strlen($this->_dirSep);
+
+ if (! empty($path) &&
+ substr($path, -1 * $len, $len) != $this->_dirSep) {
+ return $path . $this->_dirSep;
+ } else {
+ return $path;
+ }
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Baseline rule class for extension into a "real" parser component.
+*
+<<<<<<< Parse.php
+* Text_Wiki_Parse_* classes do not stand on their own; they are called by a
+* Text_Wiki object, typcially in the transform() method. Each rule class
+* performs two separate activities: parse and process.
+=======
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+*/
+
+/**
+*
+* Baseline rule class for extension into a "real" parser component.
+*
+* Text_Wiki_Rule classes do not stand on their own; they are called by a
+* Text_Wiki object, typcially in the transform() method. Each rule class
+* performs three main activities: parse, process, and render.
+>>>>>>> 1.4
+*
+* The parse() method takes a regex and applies it to the whole block of
+* source text at one time. Each match is sent as $matches to the
+* process() method.
+*
+* The process() method acts on the matched text from the source, and
+* then processes the source text is some way. This may mean the
+* creation of a delimited token using addToken(). In every case, the
+* process() method returns the text that should replace the matched text
+* from parse().
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse {
+
+
+ /**
+ *
+ * Configuration options for this parser rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $conf = array();
+
+
+ /**
+ *
+ * Regular expression to find matching text for this rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = null;
+
+
+ /**
+ *
+ * The name of this rule for new token array elements.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $rule = null;
+
+
+ /**
+ *
+ * A reference to the calling Text_Wiki object.
+ *
+ * This is needed so that each rule has access to the same source
+ * text, token set, URLs, interwiki maps, page names, etc.
+ *
+ * @access public
+ *
+ * @var object
+ */
+
+ var $wiki = null;
+
+
+ /**
+ *
+ * Constructor for this parser rule.
+ *
+ * @access public
+ *
+ * @param object &$obj The calling "parent" Text_Wiki object.
+ *
+ */
+
+ function Text_Wiki_Parse(&$obj)
+ {
+ // set the reference to the calling Text_Wiki object;
+ // this allows us access to the shared source text, token
+ // array, etc.
+ $this->wiki =& $obj;
+
+ // set the name of this rule; generally used when adding
+ // to the tokens array. strip off the Text_Wiki_Parse_ portion.
+ // text_wiki_parse_
+ // 0123456789012345
+ $tmp = substr(get_class($this), 16);
+ $this->rule = ucwords(strtolower($tmp));
+
+ // override config options for the rule if specified
+ if (isset($this->wiki->parseConf[$this->rule]) &&
+ is_array($this->wiki->parseConf[$this->rule])) {
+
+ $this->conf = array_merge(
+ $this->conf,
+ $this->wiki->parseConf[$this->rule]
+ );
+
+ }
+ }
+
+
+ /**
+ *
+ * Abstrct method to parse source text for matches.
+ *
+ * Applies the rule's regular expression to the source text, passes
+ * every match to the process() method, and replaces the matched text
+ * with the results of the processing.
+ *
+ * @access public
+ *
+ * @see Text_Wiki_Parse::process()
+ *
+ */
+
+ function parse()
+ {
+ $this->wiki->source = preg_replace_callback(
+ $this->regex,
+ array(&$this, 'process'),
+ $this->wiki->source
+ );
+ }
+
+
+ /**
+ *
+ * Abstract method to generate replacements for matched text.
+ *
+ * @access public
+ *
+ * @param array $matches An array of matches from the parse() method
+ * as generated by preg_replace_callback. $matches[0] is the full
+ * matched string, $matches[1] is the first matched pattern,
+ * $matches[2] is the second matched pattern, and so on.
+ *
+ * @return string The processed text replacement; defaults to the
+ * full matched string (i.e., no changes to the text).
+ *
+ * @see Text_Wiki_Parse::parse()
+ *
+ */
+
+ function process(&$matches)
+ {
+ return $matches[0];
+ }
+
+
+ /**
+ *
+ * Simple method to safely get configuration key values.
+ *
+ * @access public
+ *
+ * @param string $key The configuration key.
+ *
+ * @param mixed $default If the key does not exist, return this value
+ * instead.
+ *
+ * @return mixed The configuration key value (if it exists) or the
+ * default value (if not).
+ *
+ */
+
+ function getConf($key, $default = null)
+ {
+ if (isset($this->conf[$key])) {
+ return $this->conf[$key];
+ } else {
+ return $default;
+ }
+ }
+
+
+ /**
+ *
+ * Extract 'attribute="value"' portions of wiki markup.
+ *
+ * This kind of markup is typically used only in macros, but is useful
+ * anywhere.
+ *
+ * The syntax is pretty strict; there can be no spaces between the
+ * option name, the equals, and the first double-quote; the value
+ * must be surrounded by double-quotes. You can escape characters in
+ * the value with a backslash, and the backslash will be stripped for
+ * you.
+ *
+ * @access public
+ *
+ * @param string $text The "attributes" portion of markup.
+ *
+ * @return array An associative array of key-value pairs where the
+ * key is the option name and the value is the option value.
+ *
+ */
+
+ function getAttrs($text)
+ {
+ // find the =" sections;
+ $tmp = explode('="', trim($text));
+
+ // basic setup
+ $k = count($tmp) - 1;
+ $attrs = array();
+ $key = null;
+
+ // loop through the sections
+ foreach ($tmp as $i => $val) {
+
+ // first element is always the first key
+ if ($i == 0) {
+ $key = trim($val);
+ continue;
+ }
+
+ // find the last double-quote in the value.
+ // the part to the left is the value for the last key,
+ // the part to the right is the next key name
+ $pos = strrpos($val, '"');
+ $attrs[$key] = stripslashes(substr($val, 0, $pos));
+ $key = trim(substr($val, $pos+1));
+
+ }
+
+ return $attrs;
+
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for anchor targets.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Manuel Holtgrewe <purestorm at ggnore dot net>
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Anchor.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* This class implements a Text_Wiki_Parse to add an anchor target name
+* in the wiki page.
+*
+* @author Manuel Holtgrewe <purestorm at ggnore dot net>
+*
+* @author Paul M. Jones <pmjones at ciaweb dot net>
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Parse_Anchor extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule. Looks like a macro: [[# anchor_name]]
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/(\[\[# )([-_A-Za-z0-9.]+?)( .+)?(\]\])/i';
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'text' => The full matched text, not including the <code></code> tags.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches) {
+
+ $name = $matches[2];
+ $text = $matches[3];
+
+ $start = $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'start', 'name' => $name)
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'end', 'name' => $name)
+ );
+
+ // done, place the script output directly in the source
+ return $start . trim($text) . $end;
+ }
+}
+?>
--- /dev/null
+<?php
+
+/**
+*
+* Parse for block-quoted text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Blockquote.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parse for block-quoted text.
+*
+* Find source text marked as a blockquote, identified by any number of
+* greater-than signs '>' at the start of the line, followed by a space,
+* and then the quote text; each '>' indicates an additional level of
+* quoting.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Blockquote extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * Regex for parsing the source text.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/\n((\>).*\n)(?!(\>))/Us';
+
+
+ /**
+ *
+ * Generates a replacement for the matched text.
+ *
+ * Token options are:
+ *
+ * 'type' =>
+ * 'start' : the start of a blockquote
+ * 'end' : the end of a blockquote
+ *
+ * 'level' => the indent level (0 for the first level, 1 for the
+ * second, etc)
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A series of text and delimited tokens marking the different
+ * list text and list elements.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // the replacement text we will return to parse()
+ $return = '';
+
+ // the list of post-processing matches
+ $list = array();
+
+ // $matches[1] is the text matched as a list set by parse();
+ // create an array called $list that contains a new set of
+ // matches for the various list-item elements.
+ preg_match_all(
+ '=^(\>+) (.*\n)=Ums',
+ $matches[1],
+ $list,
+ PREG_SET_ORDER
+ );
+
+ // a stack of starts and ends; we keep this so that we know what
+ // indent level we're at.
+ $stack = array();
+
+ // loop through each list-item element.
+ foreach ($list as $key => $val) {
+
+ // $val[0] is the full matched list-item line
+ // $val[1] is the number of initial '>' chars (indent level)
+ // $val[2] is the quote text
+
+ // we number levels starting at 1, not zero
+ $level = strlen($val[1]);
+
+ // get the text of the line
+ $text = $val[2];
+
+ // add a level to the list?
+ while ($level > count($stack)) {
+
+ // the current indent level is greater than the number
+ // of stack elements, so we must be starting a new
+ // level. push the new level onto the stack with a
+ // dummy value (boolean true)...
+ array_push($stack, true);
+
+ $return .= "\n";
+
+ // ...and add a start token to the return.
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'start',
+ 'level' => $level - 1
+ )
+ );
+
+ $return .= "\n\n";
+ }
+
+ // remove a level?
+ while (count($stack) > $level) {
+
+ // as long as the stack count is greater than the
+ // current indent level, we need to end list types.
+ // continue adding end-list tokens until the stack count
+ // and the indent level are the same.
+ array_pop($stack);
+
+ $return .= "\n\n";
+
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array (
+ 'type' => 'end',
+ 'level' => count($stack)
+ )
+ );
+
+ $return .= "\n";
+ }
+
+ // add the line text.
+ $return .= $text;
+ }
+
+ // the last line may have been indented. go through the stack
+ // and create end-tokens until the stack is empty.
+ $return .= "\n";
+
+ while (count($stack) > 0) {
+ array_pop($stack);
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array (
+ 'type' => 'end',
+ 'level' => count($stack)
+ )
+ );
+ }
+
+ // we're done! send back the replacement text.
+ return "\n$return\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for bold text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Bold.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for bold text.
+*
+* This class implements a Text_Wiki_Rule to find source text marked for
+* strong emphasis (bold) as defined by text surrounded by three
+* single-quotes. On parsing, the text itself is left in place, but the
+* starting and ending instances of three single-quotes are replaced with
+* tokens.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Bold extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/'''(()|[^'].*)'''/U";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * emphasized text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A pair of delimited tokens to be used as a placeholder in
+ * the source text surrounding the text to be emphasized.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken($this->rule, array('type' => 'start'));
+ $end = $this->wiki->addToken($this->rule, array('type' => 'end'));
+ return $start . $matches[1] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for explicit line breaks.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Break.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for explicit line breaks.
+*
+* This class implements a Text_Wiki_Parse to mark forced line breaks in the
+* source text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Break extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/ _\n/';
+
+
+ /**
+ *
+ * Generates a replacement token for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A delimited token to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ return $this->wiki->addToken($this->rule);
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for centered lines of text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Center.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for centered lines of text.
+*
+* This class implements a Text_Wiki_Parse to find lines marked for centering.
+* The line must start with "= " (i.e., an equal-sign followed by a space).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Center extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/\n\= (.*?)\n/';
+
+ /**
+ *
+ * Generates a token entry for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'end')
+ );
+
+ return "\n" . $start . $matches[1] . $end . "\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for text marked as a code example block.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Code.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for text marked as a code example block.
+*
+* This class implements a Text_Wiki_Parse to find sections marked as code
+* examples. Blocks are marked as the string <code> on a line by itself,
+* followed by the inline code example, and terminated with the string
+* </code> on a line by itself. The code example is run through the
+* native PHP highlight_string() function to colorize it, then surrounded
+* with <pre>...</pre> tags when rendered as XHTML.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Code extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/^(\<code( .+)?\>)\n(.+)\n(\<\/code\>)(\s|$)/Umsi';
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'text' => The full matched text, not including the <code></code> tags.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // are there additional attribute arguments?
+ $args = trim($matches[2]);
+
+ if ($args == '') {
+ $options = array(
+ 'text' => $matches[3],
+ 'attr' => array('type' => '')
+ );
+ } else {
+ // get the attributes...
+ $attr = $this->getAttrs($args);
+
+ // ... and make sure we have a 'type'
+ if (! isset($attr['type'])) {
+ $attr['type'] = '';
+ }
+
+ // retain the options
+ $options = array(
+ 'text' => $matches[3],
+ 'attr' => $attr
+ );
+ }
+
+ return $this->wiki->addToken($this->rule, $options) . $matches[5];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for colorized text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Colortext.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for colorized text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Colortext extends Text_Wiki_Parse {
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/\#\#(.+?)\|(.+?)\#\#/";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * emphasized text. The text itself is left in the source.
+ *
+ * 'color' => the color indicator
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the text to be
+ * emphasized.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'start',
+ 'color' => $matches[1]
+ )
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'end',
+ 'color' => $matches[1]
+ )
+ );
+
+ return $start . $matches[2] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for definition lists.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Deflist.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for definition lists.
+*
+* This class implements a Text_Wiki_Parse to find source text marked as a
+* definition list. In short, if a line starts with ':' then it is a
+* definition list item; another ':' on the same line indicates the end
+* of the definition term and the beginning of the definition narrative.
+* The list items must be on sequential lines (no blank lines between
+* them) -- a blank line indicates the beginning of a new list.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Deflist extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/\n((: ).*\n)(?!(: |\n))/Us';
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' =>
+ * 'list_start' : the start of a definition list
+ * 'list_end' : the end of a definition list
+ * 'term_start' : the start of a definition term
+ * 'term_end' : the end of a definition term
+ * 'narr_start' : the start of definition narrative
+ * 'narr_end' : the end of definition narrative
+ * 'unknown' : unknown type of definition portion
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A series of text and delimited tokens marking the different
+ * list text and list elements.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // the replacement text we will return to parse()
+ $return = '';
+
+ // the list of post-processing matches
+ $list = array();
+
+ // start the deflist
+ $options = array('type' => 'list_start');
+ $return .= $this->wiki->addToken($this->rule, $options);
+
+ // $matches[1] is the text matched as a list set by parse();
+ // create an array called $list that contains a new set of
+ // matches for the various definition-list elements.
+ preg_match_all(
+ '/^(: )(.*)?( : )(.*)?$/Ums',
+ $matches[1],
+ $list,
+ PREG_SET_ORDER
+ );
+
+ // add each term and narrative
+ foreach ($list as $key => $val) {
+ $return .= (
+ $this->wiki->addToken($this->rule, array('type' => 'term_start')) .
+ trim($val[2]) .
+ $this->wiki->addToken($this->rule, array('type' => 'term_end')) .
+ $this->wiki->addToken($this->rule, array('type' => 'narr_start')) .
+ trim($val[4]) .
+ $this->wiki->addToken($this->rule, array('type' => 'narr_end'))
+ );
+ }
+
+
+ // end the deflist
+ $options = array('type' => 'list_end');
+ $return .= $this->wiki->addToken($this->rule, $options);
+
+ // done!
+ return "\n" . $return . "\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for Text_Wiki delimiter characters already in the source text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Delimiter.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for Text_Wiki delimiter characters already in the source text.
+*
+* This class implements a Text_Wiki_Parse to find instances of the delimiter
+* character already embedded in the source text; it extracts them and replaces
+* them with a delimited token, then renders them as the delimiter itself
+* when the target format is XHTML.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Delimiter extends Text_Wiki_Parse {
+
+ /**
+ *
+ * Constructor. Overrides the Text_Wiki_Parse constructor so that we
+ * can set the $regex property dynamically (we need to include the
+ * Text_Wiki $delim character.
+ *
+ * @param object &$obj The calling "parent" Text_Wiki object.
+ *
+ * @param string $name The token name to use for this rule.
+ *
+ */
+
+ function Text_Wiki_Parse_delimiter(&$obj)
+ {
+ parent::Text_Wiki_Parse($obj);
+ $this->regex = '/' . $this->wiki->delim . '/';
+ }
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'text' => The full matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ return $this->wiki->addToken(
+ $this->rule,
+ array('text' => $this->wiki->delim)
+ );
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Embeds the results of a PHP script at render-time.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Embed.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Embeds the results of a PHP script at render-time.
+*
+* This class implements a Text_Wiki_Parse to embed the contents of a URL
+* inside the page at render-time. Typically used to get script output.
+* This differs from the 'include' rule, which incorporates results at
+* parse-time; 'embed' output does not get parsed by Text_Wiki, while
+* 'include' ouput does.
+*
+* This rule is inherently not secure; it allows cross-site scripting to
+* occur if the embedded output has <script> or other similar tags. Be
+* careful.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Embed extends Text_Wiki_Parse {
+
+ var $conf = array(
+ 'base' => '/path/to/scripts/'
+ );
+
+ var $file = null;
+
+ var $output = null;
+
+ var $vars = null;
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/(\[\[embed )(.+?)( .+?)?(\]\])/i';
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'text' => The full matched text, not including the <code></code> tags.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // save the file location
+ $this->file = $this->getConf('base', './') . $matches[2];
+
+ // extract attribs as variables in the local space
+ $this->vars = $this->getAttrs($matches[3]);
+ unset($this->vars['this']);
+ extract($this->vars);
+
+ // run the script
+ ob_start();
+ include($this->file);
+ $this->output = ob_get_contents();
+ ob_end_clean();
+
+ // done, place the script output directly in the source
+ return $this->wiki->addToken(
+ $this->rule,
+ array('text' => $this->output)
+ );
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for emphasized text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Emphasis.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for emphasized text.
+*
+* This class implements a Text_Wiki_Parse to find source text marked for
+* emphasis (italics) as defined by text surrounded by two single-quotes.
+* On parsing, the text itself is left in place, but the starting and ending
+* instances of two single-quotes are replaced with tokens.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_emphasis extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/\/\/(.*?)\/\//";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * emphasized text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the text to be
+ * emphasized.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . $matches[1] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for wiki freelink text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Freelink.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for freelinked page links.
+*
+* This class implements a Text_Wiki_Parse to find source text marked as a
+* wiki freelink, and automatically create a link to that page.
+*
+* A freelink is any page name not conforming to the standard
+* StudlyCapsStyle for a wiki page name. For example, a page normally
+* named MyHomePage can be renamed and referred to as ((My Home Page)) --
+* note the spaces in the page name. You can also make a "nice-looking"
+* link without renaming the target page; e.g., ((MyHomePage|My Home
+* Page)). Finally, you can use named anchors on the target page:
+* ((MyHomePage|My Home Page#Section1)).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Freelink extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * Constructor. We override the Text_Wiki_Parse constructor so we can
+ * explicitly comment each part of the $regex property.
+ *
+ * @access public
+ *
+ * @param object &$obj The calling "parent" Text_Wiki object.
+ *
+ */
+
+ function Text_Wiki_Parse_Freelink(&$obj)
+ {
+ parent::Text_Wiki_Parse($obj);
+
+ $this->regex =
+ '/' . // START regex
+ "\\(\\(" . // double open-parens
+ "(" . // START freelink page patter
+ "[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+" . // 1 or more of just about any character
+ ")" . // END freelink page pattern
+ "(" . // START display-name
+ "\|" . // a pipe to start the display name
+ "[-A-Za-z0-9 _+\\/.,;:!?'\"\\[\\]\\{\\}&\xc0-\xff]+" . // 1 or more of just about any character
+ ")?" . // END display-name pattern 0 or 1
+ "(" . // START pattern for named anchors
+ "\#" . // a hash mark
+ "[A-Za-z]" . // 1 alpha
+ "[-A-Za-z0-9_:.]*" . // 0 or more alpha, digit, underscore
+ ")?" . // END named anchors pattern 0 or 1
+ "()\\)\\)" . // double close-parens
+ '/'; // END regex
+ }
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'page' => the wiki page name (e.g., HomePage).
+ *
+ * 'text' => alternative text to be displayed in place of the wiki
+ * page name.
+ *
+ * 'anchor' => a named anchor on the target wiki page
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token to be used as a placeholder in
+ * the source text, plus any text priot to the match.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // use nice variable names
+ $page = $matches[1];
+ $text = $matches[2];
+
+ // get rid of the leading # from the anchor, if any
+ $anchor = substr($matches[3], 1);
+
+ // is the page given a new text appearance?
+ if (trim($text) == '') {
+ // no
+ $text = $page;
+ } else {
+ // yes, strip the leading | character
+ $text = substr($text, 1);
+ }
+
+ // set the options
+ $options = array(
+ 'page' => $page,
+ 'text' => $text,
+ 'anchor' => $anchor
+ );
+
+ // return a token placeholder
+ return $this->wiki->addToken($this->rule, $options);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for an API function documentation block.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Function.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for an API function documentation block.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Function extends Text_Wiki_Parse {
+
+ var $regex = '/^(\<function\>)\n(.+)\n(\<\/function\>)(\s|$)/Umsi';
+
+ function process(&$matches)
+ {
+ // default options
+ $opts = array(
+ 'name' => null,
+ 'access' => null,
+ 'return' => null,
+ 'params' => array(),
+ 'throws' => array()
+ );
+
+ // split apart the markup lines and loop through them
+ $lines = explode("\n", $matches[2]);
+ foreach ($lines as $line) {
+
+ // skip blank lines
+ if (trim($line) == '') {
+ continue;
+ }
+
+ // find the first ':' on the line; the left part is the
+ // type, the right part is the value. skip lines without
+ // a ':' on them.
+ $pos = strpos($line, ':');
+ if ($pos === false) {
+ continue;
+ }
+
+ // $type is the line type: name, access, return, param, throws
+ // 012345678901234
+ // name: something
+ $type = trim(substr($line, 0, $pos));
+ $val = trim(substr($line, $pos+1));
+
+ switch($type) {
+
+ case 'a':
+ case 'access':
+ $opts['access'] = $val;
+ break;
+
+ case 'n':
+ case 'name':
+ $opts['name'] = $val;
+ break;
+
+ case 'p':
+ case 'param':
+ $tmp = explode(',', $val);
+ $k = count($tmp);
+ if ($k == 1) {
+ $opts['params'][] = array(
+ 'type' => $tmp[0],
+ 'descr' => null,
+ 'default' => null
+ );
+ } elseif ($k == 2) {
+ $opts['params'][] = array(
+ 'type' => $tmp[0],
+ 'descr' => $tmp[1],
+ 'default' => null
+ );
+ } else {
+ $opts['params'][] = array(
+ 'type' => $tmp[0],
+ 'descr' => $tmp[1],
+ 'default' => $tmp[2]
+ );
+ }
+ break;
+
+ case 'r':
+ case 'return':
+ case 'returns':
+ $opts['return'] = $val;
+ break;
+
+ case 't':
+ case 'throws':
+ $tmp = explode(',', $val);
+ $k = count($tmp);
+ if ($k == 1) {
+ $opts['throws'][] = array(
+ 'type' => $tmp[0],
+ 'descr' => null
+ );
+ } else {
+ $opts['throws'][] = array(
+ 'type' => $tmp[0],
+ 'descr' => $tmp[1]
+ );
+ }
+ break;
+
+ default:
+ $opts[$type] = $val;
+ break;
+
+ }
+ }
+
+ // add the token back in place
+ return $this->wiki->addToken($this->rule, $opts) . $matches[4];
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for heading text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Heading.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for heading text.
+*
+* This class implements a Text_Wiki_Parse to find source text marked to
+* be a heading element, as defined by text on a line by itself prefixed
+* with a number of plus signs (+). The heading text itself is left in
+* the source, but is prefixed and suffixed with delimited tokens marking
+* the start and end of the heading.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Heading extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/^(\+{1,6}) (.*)/m';
+
+ var $conf = array(
+ 'id_prefix' => 'toc'
+ );
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * heading text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the heading text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // keep a running count for header IDs. we use this later
+ // when constructing TOC entries, etc.
+ static $id;
+ if (! isset($id)) {
+ $id = 0;
+ }
+
+ $prefix = htmlspecialchars($this->getConf('id_prefix'));
+
+ $start = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'start',
+ 'level' => strlen($matches[1]),
+ 'text' => $matches[2],
+ 'id' => $prefix . $id ++
+ )
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'end',
+ 'level' => strlen($matches[1])
+ )
+ );
+
+ return $start . $matches[2] . $end . "\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for horizontal ruling lines.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Horiz.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for horizontal ruling lines.
+*
+* This class implements a Text_Wiki_Parse to find source text marked to
+* be a horizontal rule, as defined by four dashed on their own line.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Horiz extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/^([-]{4,})$/m';
+
+
+ /**
+ *
+ * Generates a replacement token for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A token marking the horizontal rule.
+ *
+ */
+
+ function process(&$matches)
+ {
+ return $this->wiki->addToken($this->rule);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for blocks of HTML code.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Html.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for blocks of HTML code.
+*
+* This class implements a Text_Wiki_Parse to find source text marked as
+* HTML to be redndred as-is. The block start is marked by <html> on its
+* own line, and the block end is marked by </html> on its own line.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Html extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/^\<html\>\n(.+)\n\<\/html\>(\s|$)/Umsi';
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'text' => The text of the HTML to be rendered as-is.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token to be used as a placeholder in
+ * the source text, plus any text following the HTML block.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $options = array('text' => $matches[1]);
+ return $this->wiki->addToken($this->rule, $options) . $matches[2];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for image placement.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Image.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for image placement.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Image extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/(\[\[image )(.+?)(\]\])/i';
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'src' => The image source, typically a relative path name.
+ *
+ * 'opts' => Any macro options following the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $pos = strpos($matches[2], ' ');
+
+ if ($pos === false) {
+ $options = array(
+ 'src' => $matches[2],
+ 'attr' => array());
+ } else {
+ // everything after the space is attribute arguments
+ $options = array(
+ 'src' => substr($matches[2], 0, $pos),
+ 'attr' => $this->getAttrs(substr($matches[2], $pos+1))
+ );
+ }
+
+ return $this->wiki->addToken($this->rule, $options);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Includes the contents of another PHP script into the source text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Include.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* This class implements a Text_Wiki_Parse to include the results of a
+* script directly into the source at parse-time; thus, the output of the
+* script will be parsed by Text_Wiki. This differs from the 'embed'
+* rule, which incorporates the results at render-time, meaning that the
+* 'embed' content is not parsed by Text_Wiki.
+*
+* DANGER!
+*
+* This rule is inherently not secure; it allows cross-site scripting to
+* occur if the embedded output has <script> or other similar tags. Be
+* careful.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Include extends Text_Wiki_Parse {
+
+ var $conf = array(
+ 'base' => '/path/to/scripts/'
+ );
+
+ var $file = null;
+
+ var $output = null;
+
+ var $vars = null;
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/(\[\[include )(.+?)( .+?)?(\]\])/i';
+
+
+ /**
+ *
+ * Includes the results of the script directly into the source; the output
+ * will subsequently be parsed by the remaining Text_Wiki rules.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return The results of the included script.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // save the file location
+ $this->file = $this->getConf('base', './') . $matches[2];
+
+ // extract attribs as variables in the local space
+ $this->vars = $this->getAttrs($matches[3]);
+ unset($this->vars['this']);
+ extract($this->vars);
+
+ // run the script
+ ob_start();
+ include($this->file);
+ $this->output = ob_get_contents();
+ ob_end_clean();
+
+ // done, place the script output directly in the source
+ return $this->output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for interwiki links.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Interwiki.php,v 1.4 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for interwiki links.
+*
+* This class implements a Text_Wiki_Parse to find source text marked as
+* an Interwiki link. See the regex for a detailed explanation of the
+* text matching procedure; e.g., "InterWikiName:PageName".
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Interwiki extends Text_Wiki_Parse {
+
+ // double-colons wont trip up now
+ var $regex = '([A-Za-z0-9_]+):((?!:)[A-Za-z0-9_\/=&~#.:;-]+)';
+
+
+ /**
+ *
+ * Parser. We override the standard parser so we can
+ * find both described interwiki links and standalone links.
+ *
+ * @access public
+ *
+ * @return void
+ *
+ */
+
+ function parse()
+ {
+ // described interwiki links
+ $tmp_regex = '/\[' . $this->regex . ' (.+?)\]/';
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'processDescr'),
+ $this->wiki->source
+ );
+
+ // standalone interwiki links
+ $tmp_regex = '/' . $this->regex . '/';
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'process'),
+ $this->wiki->source
+ );
+
+ }
+
+
+ /**
+ *
+ * Generates a replacement for the matched standalone interwiki text.
+ * Token options are:
+ *
+ * 'site' => The key name for the Text_Wiki interwiki array map,
+ * usually the name of the interwiki site.
+ *
+ * 'page' => The page on the target interwiki to link to.
+ *
+ * 'text' => The text to display as the link.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token to be used as a placeholder in
+ * the source text, plus any text priot to the match.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $options = array(
+ 'site' => $matches[1],
+ 'page' => $matches[2],
+ 'text' => $matches[0]
+ );
+
+ return $this->wiki->addToken($this->rule, $options);
+ }
+
+
+ /**
+ *
+ * Generates a replacement for described interwiki links. Token
+ * options are:
+ *
+ * 'site' => The key name for the Text_Wiki interwiki array map,
+ * usually the name of the interwiki site.
+ *
+ * 'page' => The page on the target interwiki to link to.
+ *
+ * 'text' => The text to display as the link.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token to be used as a placeholder in
+ * the source text, plus any text priot to the match.
+ *
+ */
+
+ function processDescr(&$matches)
+ {
+ $options = array(
+ 'site' => $matches[1],
+ 'page' => $matches[2],
+ 'text' => $matches[3]
+ );
+
+ return $this->wiki->addToken($this->rule, $options);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for italic text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Italic.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for italic text.
+*
+* This class implements a Text_Wiki_Parse to find source text marked for
+* emphasis (italics) as defined by text surrounded by two single-quotes.
+* On parsing, the text itself is left in place, but the starting and ending
+* instances of two single-quotes are replaced with tokens.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Italic extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/''(()|[^'].*)''/U";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * emphasized text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the text to be
+ * emphasized.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . $matches[1] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for bulleted and numbered lists.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: List.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for bulleted and numbered lists.
+*
+* This class implements a Text_Wiki_Parse to find source text marked as
+* a bulleted or numbered list. In short, if a line starts with '* ' then
+* it is a bullet list item; if a line starts with '# ' then it is a
+* number list item. Spaces in front of the * or # indicate an indented
+* sub-list. The list items must be on sequential lines, and may be
+* separated by blank lines to improve readability. Using a non-* non-#
+* non-whitespace character at the beginning of a line ends the list.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_List extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/\n((\*|#) .*\n)(?! {0,}(\* |# |\n))/Us';
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' =>
+ * 'bullet_start' : the start of a bullet list
+ * 'bullet_end' : the end of a bullet list
+ * 'number_start' : the start of a number list
+ * 'number_end' : the end of a number list
+ * 'item_start' : the start of item text (bullet or number)
+ * 'item_end' : the end of item text (bullet or number)
+ * 'unknown' : unknown type of list or item
+ *
+ * 'level' => the indent level (0 for the first level, 1 for the
+ * second, etc)
+ *
+ * 'count' => the list item number at this level. not needed for
+ * xhtml, but very useful for PDF and RTF.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A series of text and delimited tokens marking the different
+ * list text and list elements.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // the replacement text we will return
+ $return = '';
+
+ // the list of post-processing matches
+ $list = array();
+
+ // a stack of list-start and list-end types; we keep this
+ // so that we know what kind of list we're working with
+ // (bullet or number) and what indent level we're at.
+ $stack = array();
+
+ // the item count is the number of list items for any
+ // given list-type on the stack
+ $itemcount = array();
+
+ // have we processed the very first list item?
+ $pastFirst = false;
+
+ // populate $list with this set of matches. $matches[1] is the
+ // text matched as a list set by parse().
+ preg_match_all(
+ '=^( {0,})(\*|#) (.*)$=Ums',
+ $matches[1],
+ $list,
+ PREG_SET_ORDER
+ );
+
+ // loop through each list-item element.
+ foreach ($list as $key => $val) {
+
+ // $val[0] is the full matched list-item line
+ // $val[1] is the number of initial spaces (indent level)
+ // $val[2] is the list item type (* or #)
+ // $val[3] is the list item text
+
+ // how many levels are we indented? (1 means the "root"
+ // list level, no indenting.)
+ $level = strlen($val[1]) + 1;
+
+ // get the list item type
+ if ($val[2] == '*') {
+ $type = 'bullet';
+ } elseif ($val[2] == '#') {
+ $type = 'number';
+ } else {
+ $type = 'unknown';
+ }
+
+ // get the text of the list item
+ $text = $val[3];
+
+ // add a level to the list?
+ if ($level > count($stack)) {
+
+ // the current indent level is greater than the
+ // number of stack elements, so we must be starting
+ // a new list. push the new list type onto the
+ // stack...
+ array_push($stack, $type);
+
+ // ...and add a list-start token to the return.
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => $type . '_list_start',
+ 'level' => $level - 1
+ )
+ );
+ }
+
+ // remove a level from the list?
+ while (count($stack) > $level) {
+
+ // so we don't keep counting the stack, we set up a temp
+ // var for the count. -1 becuase we're going to pop the
+ // stack in the next command. $tmp will then equal the
+ // current level of indent.
+ $tmp = count($stack) - 1;
+
+ // as long as the stack count is greater than the
+ // current indent level, we need to end list types.
+ // continue adding end-list tokens until the stack count
+ // and the indent level are the same.
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array (
+ 'type' => array_pop($stack) . '_list_end',
+ 'level' => $tmp
+ )
+ );
+
+ // reset to the current (previous) list type so that
+ // the new list item matches the proper list type.
+ $type = $stack[$tmp - 1];
+
+ // reset the item count for the popped indent level
+ unset($itemcount[$tmp + 1]);
+ }
+
+ // add to the item count for this list (taking into account
+ // which level we are at).
+ if (! isset($itemcount[$level])) {
+ // first count
+ $itemcount[$level] = 0;
+ } else {
+ // increment count
+ $itemcount[$level]++;
+ }
+
+ // is this the very first item in the list?
+ if (! $pastFirst) {
+ $first = true;
+ $pastFirst = true;
+ } else {
+ $first = false;
+ }
+
+ // create a list-item starting token.
+ $start = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => $type . '_item_start',
+ 'level' => $level,
+ 'count' => $itemcount[$level],
+ 'first' => $first
+ )
+ );
+
+ // create a list-item ending token.
+ $end = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => $type . '_item_end',
+ 'level' => $level,
+ 'count' => $itemcount[$level]
+ )
+ );
+
+ // add the starting token, list-item text, and ending token
+ // to the return.
+ $return .= $start . $val[3] . $end;
+ }
+
+ // the last list-item may have been indented. go through the
+ // list-type stack and create end-list tokens until the stack
+ // is empty.
+ while (count($stack) > 0) {
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array (
+ 'type' => array_pop($stack) . '_list_end',
+ 'level' => count($stack)
+ )
+ );
+ }
+
+ // we're done! send back the replacement text.
+ return "\n" . $return . "\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for implied line breaks indicated by newlines.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Newline.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for implied line breaks indicated by newlines.
+*
+* This class implements a Text_Wiki_Parse to mark implied line breaks in the
+* source text, usually a single carriage return in the middle of a paragraph
+* or block-quoted text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Newline extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/([^\n])\n([^\n])/m';
+
+
+ /**
+ *
+ * Generates a replacement token for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A delimited token to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ return $matches[1] .
+ $this->wiki->addToken($this->rule) .
+ $matches[2];
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for paragraph blocks.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Paragraph.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for paragraph blocks.
+*
+* This class implements a Text_Wiki rule to find sections of the source
+* text that are paragraphs. A para is any line not starting with a token
+* delimiter, followed by two newlines.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Paragraph extends Text_Wiki_Parse {
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = "/^.*?\n\n/m";
+
+ var $conf = array(
+ 'skip' => array(
+ 'blockquote', // are we sure about this one?
+ 'code',
+ 'heading',
+ 'horiz',
+ 'deflist',
+ 'table',
+ 'list',
+ 'toc'
+ )
+ );
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'start' => The starting point of the paragraph.
+ *
+ * 'end' => The ending point of the paragraph.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $delim = $this->wiki->delim;
+
+ // was anything there?
+ if (trim($matches[0]) == '') {
+ return '';
+ }
+
+ // does the match start with a delimiter?
+ if (substr($matches[0], 0, 1) != $delim) {
+ // no.
+
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . trim($matches[0]) . $end;
+ }
+
+ // the line starts with a delimiter. read in the delimited
+ // token number, check the token, and see if we should
+ // skip it.
+
+ // loop starting at the second character (we already know
+ // the first is a delimiter) until we find another
+ // delimiter; the text between them is a token key number.
+ $key = '';
+ $len = strlen($matches[0]);
+ for ($i = 1; $i < $len; $i++) {
+ $char = $matches[0]{$i};
+ if ($char == $delim) {
+ break;
+ } else {
+ $key .= $char;
+ }
+ }
+
+ // look at the token and see if it's skippable (if we skip,
+ // it will not be marked as a paragraph)
+ $token_type = strtolower($this->wiki->tokens[$key][0]);
+ $skip = $this->getConf('skip', array());
+
+ if (in_array($token_type, $skip)) {
+ // this type of token should not have paragraphs applied to it.
+ // return the entire matched text.
+ return $matches[0];
+ } else {
+
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . trim($matches[0]) . $end;
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Find source text marked for lookup in the PHP online manual.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Phplookup.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Find source text marked for lookup in the PHP online manual.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Phplookup extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/\[\[php (.+?)\]\]/";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * teletype text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the teletype text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ return $this->wiki->addToken(
+ $this->rule, array('text' => $matches[1])
+ );
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* "Pre-filter" the source text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Prefilter.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* "Pre-filter" the source text.
+*
+* Convert DOS and Mac line endings to Unix, concat lines ending in a
+* backslash \ with the next line, convert tabs to 4-spaces, add newlines
+* to the top and end of the source text, compress 3 or more newlines to
+* 2 newlines.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Prefilter extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * Simple parsing method.
+ *
+ * @access public
+ *
+ */
+
+ function parse()
+ {
+ // convert DOS line endings
+ $this->wiki->source = str_replace("\r\n", "\n",
+ $this->wiki->source);
+
+ // convert Macintosh line endings
+ $this->wiki->source = str_replace("\r", "\n",
+ $this->wiki->source);
+
+ // concat lines ending in a backslash
+ $this->wiki->source = str_replace("\\\n", "",
+ $this->wiki->source);
+
+ // convert tabs to four-spaces
+ $this->wiki->source = str_replace("\t", " ",
+ $this->wiki->source);
+
+ // add extra newlines at the top and end; this
+ // seems to help many rules.
+ $this->wiki->source = "\n" . $this->wiki->source . "\n\n";
+
+ // finally, compress all instances of 3 or more newlines
+ // down to two newlines.
+ $find = "/\n{3,}/m";
+ $replace = "\n\n";
+ $this->wiki->source = preg_replace($find, $replace,
+ $this->wiki->source);
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for text marked as "raw" (i.e., to be rendered as-is).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Raw.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for text marked as "raw" (i.e., to be rendered as-is).
+*
+* This class implements a Text_Wiki rule to find sections of the source
+* text that are not to be processed by Text_Wiki. These blocks of "raw"
+* text will be rendered as they were found.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Raw extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = "/``(.*)``/U";
+
+
+ /**
+ *
+ * Generates a token entry for the matched text. Token options are:
+ *
+ * 'text' => The full matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $options = array('text' => $matches[1]);
+ return $this->wiki->addToken($this->rule, $options);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for text marked as revised (insert/delete).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Revise.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for text marked as revised (insert/delete).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Revise extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/\@\@({*?.*}*?)\@\@/U";
+
+
+ /**
+ *
+ * Config options.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $conf = array(
+ 'delmark' => '---',
+ 'insmark' => '+++'
+ );
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * inserted text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the teletype text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $output = '';
+ $src = $matches[1];
+ $delmark = $this->getConf('delmark'); // ---
+ $insmark = $this->getConf('insmark'); // +++
+
+ // '---' must be before '+++' (if they both appear)
+ $del = strpos($src, $delmark);
+ $ins = strpos($src, $insmark);
+
+ // if neither is found, return right away
+ if ($del === false && $ins === false) {
+ return $matches[0];
+ }
+
+ // handle text to be deleted
+ if ($del !== false) {
+
+ // move forward to the end of the deletion mark
+ $del += strlen($delmark);
+
+ if ($ins === false) {
+ // there is no insertion text following
+ $text = substr($src, $del);
+ } else {
+ // there is insertion text following,
+ // mitigate the length
+ $text = substr($src, $del, $ins - $del);
+ }
+
+ $output .= $this->wiki->addToken(
+ $this->rule, array('type' => 'del_start')
+ );
+
+ $output .= $text;
+
+ $output .= $this->wiki->addToken(
+ $this->rule, array('type' => 'del_end')
+ );
+ }
+
+ // handle text to be inserted
+ if ($ins !== false) {
+
+ // move forward to the end of the insert mark
+ $ins += strlen($insmark);
+ $text = substr($src, $ins);
+
+ $output .= $this->wiki->addToken(
+ $this->rule, array('type' => 'ins_start')
+ );
+
+ $output .= $text;
+
+ $output .= $this->wiki->addToken(
+ $this->rule, array('type' => 'ins_end')
+ );
+ }
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for strongly-emphasized text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Strong.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+
+/**
+*
+* Parses for strongly-emphasized text.
+*
+* This class implements a Text_Wiki_Parse to find source text marked for
+* strong emphasis (bold) as defined by text surrounded by three
+* single-quotes. On parsing, the text itself is left in place, but the
+* starting and ending instances of three single-quotes are replaced with
+* tokens.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Strong extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ // original
+ // var $regex = "/\*\*(.*?)\*\*/";
+
+ // alternatives:
+ // var $regex = "/\*\*(()|[^\n]*)\*\*/U";
+ var $regex = "/\*\*(()|.*)\*\*/U";
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * emphasized text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A pair of delimited tokens to be used as a placeholder in
+ * the source text surrounding the text to be emphasized.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . $matches[1] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for superscripted text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Superscript.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for superscripted text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Superscript extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/\^\^(()|.*)\^\^/U";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text. Token options are:
+ *
+ * 'type' => ['start'|'end'] The starting or ending point of the
+ * emphasized text. The text itself is left in the source.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A pair of delimited tokens to be used as a placeholder in
+ * the source text surrounding the text to be emphasized.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . $matches[1] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parses for table markup.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Table.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parses for table markup.
+*
+* This class implements a Text_Wiki_Parse to find source text marked as a
+* set of table rows, where a line start and ends with double-pipes (||)
+* and uses double-pipes to separate table cells. The rows must be on
+* sequential lines (no blank lines between them) -- a blank line
+* indicates the beginning of a new table.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Table extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = '/\n((\|\|).*)(\n)(?!(\|\|))/Us';
+
+
+ /**
+ *
+ * Generates a replacement for the matched text.
+ *
+ * Token options are:
+ *
+ * 'type' =>
+ * 'table_start' : the start of a bullet list
+ * 'table_end' : the end of a bullet list
+ * 'row_start' : the start of a number list
+ * 'row_end' : the end of a number list
+ * 'cell_start' : the start of item text (bullet or number)
+ * 'cell_end' : the end of item text (bullet or number)
+ *
+ * 'cols' => the number of columns in the table (for 'table_start')
+ *
+ * 'rows' => the number of rows in the table (for 'table_start')
+ *
+ * 'span' => column span (for 'cell_start')
+ *
+ * 'attr' => column attribute flag (for 'cell_start')
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A series of text and delimited tokens marking the different
+ * table elements and cell text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // our eventual return value
+ $return = '';
+
+ // the number of columns in the table
+ $num_cols = 0;
+
+ // the number of rows in the table
+ $num_rows = 0;
+
+ // rows are separated by newlines in the matched text
+ $rows = explode("\n", $matches[1]);
+
+ // loop through each row
+ foreach ($rows as $row) {
+
+ // increase the row count
+ $num_rows ++;
+
+ // start a new row
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'row_start')
+ );
+
+ // cells are separated by double-pipes
+ $cell = explode("||", $row);
+
+ // get the number of cells (columns) in this row
+ $last = count($cell) - 1;
+
+ // is this more than the current column count?
+ // (we decrease by 1 because we never use cell zero)
+ if ($last - 1 > $num_cols) {
+ // increase the column count
+ $num_cols = $last - 1;
+ }
+
+ // by default, cells span only one column (their own)
+ $span = 1;
+
+ // ignore cell zero, and ignore the "last" cell; cell zero
+ // is before the first double-pipe, and the "last" cell is
+ // after the last double-pipe. both are always empty.
+ for ($i = 1; $i < $last; $i ++) {
+
+ // if there is no content at all, then it's an instance
+ // of two sets of || next to each other, indicating a
+ // span.
+ if ($cell[$i] == '') {
+
+ // add to the span and loop to the next cell
+ $span += 1;
+ continue;
+
+ } else {
+
+ // this cell has content.
+
+ // find any special "attr"ibute cell markers
+ if (substr($cell[$i], 0, 2) == '> ') {
+ // right-align
+ $attr = 'right';
+ $cell[$i] = substr($cell[$i], 2);
+ } elseif (substr($cell[$i], 0, 2) == '= ') {
+ // center-align
+ $attr = 'center';
+ $cell[$i] = substr($cell[$i], 2);
+ } elseif (substr($cell[$i], 0, 2) == '< ') {
+ // left-align
+ $attr = 'left';
+ $cell[$i] = substr($cell[$i], 2);
+ } elseif (substr($cell[$i], 0, 2) == '~ ') {
+ $attr = 'header';
+ $cell[$i] = substr($cell[$i], 2);
+ } else {
+ $attr = null;
+ }
+
+ // start a new cell...
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array (
+ 'type' => 'cell_start',
+ 'attr' => $attr,
+ 'span' => $span
+ )
+ );
+
+ // ...add the content...
+ $return .= trim($cell[$i]);
+
+ // ...and end the cell.
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array (
+ 'type' => 'cell_end',
+ 'attr' => $attr,
+ 'span' => $span
+ )
+ );
+
+ // reset the span.
+ $span = 1;
+ }
+
+ }
+
+ // end the row
+ $return .= $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'row_end')
+ );
+
+ }
+
+ // wrap the return value in start and end tokens
+ $return =
+ $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'table_start',
+ 'rows' => $num_rows,
+ 'cols' => $num_cols
+ )
+ )
+ . $return .
+ $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'table_end'
+ )
+ );
+
+ // we're done!
+ return "\n$return\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* The rule removes all remaining newlines.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Tighten.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+
+/**
+*
+* The rule removes all remaining newlines.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Tighten extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * Apply tightening directly to the source text.
+ *
+ * @access public
+ *
+ */
+
+ function parse()
+ {
+ $this->wiki->source = str_replace("\n", '',
+ $this->wiki->source);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Looks through parsed text and builds a table of contents.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Toc.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Looks through parsed text and builds a table of contents.
+*
+* This class implements a Text_Wiki_Parse to find all heading tokens and
+* build a table of contents. The [[toc]] tag gets replaced with a list
+* of all the level-2 through level-6 headings.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+
+class Text_Wiki_Parse_Toc extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/\n\[\[toc( .*)?\]\]\n/m";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text.
+ *
+ * Token options are:
+ *
+ * 'type' => ['list_start'|'list_end'|'item_start'|'item_end'|'target']
+ *
+ * 'level' => The heading level (1-6).
+ *
+ * 'count' => Which entry number this is in the list.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A token indicating the TOC collection point.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $count = 0;
+
+ if (isset($matches[1])) {
+ $attr = $this->getAttrs(trim($matches[1]));
+ } else {
+ $attr = array();
+ }
+
+ $output = $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'list_start',
+ 'level' => 0,
+ 'attr' => $attr
+ )
+ );
+
+ foreach ($this->wiki->getTokens('Heading') as $key => $val) {
+
+ if ($val[1]['type'] != 'start') {
+ continue;
+ }
+
+ $options = array(
+ 'type' => 'item_start',
+ 'id' => $val[1]['id'],
+ 'level' => $val[1]['level'],
+ 'count' => $count ++
+ );
+
+ $output .= $this->wiki->addToken($this->rule, $options);
+
+ $output .= $val[1]['text'];
+
+ $output .= $this->wiki->addToken(
+ $this->rule,
+ array(
+ 'type' => 'item_end',
+ 'level' => $val[1]['level']
+ )
+ );
+ }
+
+ $output .= $this->wiki->addToken(
+ $this->rule, array(
+ 'type' => 'list_end',
+ 'level' => 0
+ )
+ );
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Find source text marked for teletype (monospace).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Tt.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Find source text marked for teletype (monospace).
+*
+* Defined by text surrounded by two curly braces. On parsing, the text
+* itself is left in place, but the starting and ending instances of
+* curly braces are replaced with tokens.
+*
+* Token options are:
+*
+* 'type' => ['start'|'end'] The starting or ending point of the
+* teletype text. The text itself is left in the source.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Tt extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ var $regex = "/{{({*?.*}*?)}}/U";
+
+
+ /**
+ *
+ * Generates a replacement for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A pair of delimited tokens to be used as a
+ * placeholder in the source text surrounding the teletype text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule, array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule, array('type' => 'end')
+ );
+
+ return $start . $matches[1] . $end;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parse for URLS in the source text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Url.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parse for URLS in the source text.
+*
+* Various URL markings are supported: inline (the URL by itself),
+* numbered or footnote reference (where the URL is enclosed in square
+* brackets), and named reference (where the URL is enclosed in square
+* brackets and has a name included inside the brackets). E.g.:
+*
+* inline -- http://example.com
+* numbered -- [http://example.com]
+* described -- [http://example.com Example Description]
+*
+* When rendering a URL token, this will convert URLs pointing to a .gif,
+* .jpg, or .png image into an inline <img /> tag (for the 'xhtml'
+* format).
+*
+* Token options are:
+*
+* 'type' => ['inline'|'footnote'|'descr'] the type of URL
+*
+* 'href' => the URL link href portion
+*
+* 'text' => the displayed text of the URL link
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Url extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * Keeps a running count of numbered-reference URLs.
+ *
+ * @access public
+ *
+ * @var int
+ *
+ */
+
+ var $footnoteCount = 0;
+
+
+ /**
+ *
+ * URL schemes recognized by this rule.
+ *
+ * @access public
+ *
+ * @var array
+ *
+ */
+
+ var $conf = array(
+ 'schemes' => array(
+ 'http://',
+ 'https://',
+ 'ftp://',
+ 'gopher://',
+ 'news://',
+ 'mailto:'
+ )
+ );
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * We override the constructor so we can comment the regex nicely.
+ *
+ * @access public
+ *
+ */
+
+ function Text_Wiki_Parse_Url(&$obj)
+ {
+ parent::Text_Wiki_Parse($obj);
+
+ // convert the list of recognized schemes to a regex-safe string,
+ // where the pattern delim is a slash
+ $tmp = array();
+ $list = $this->getConf('schemes', array());
+ foreach ($list as $val) {
+ $tmp[] = preg_quote($val, '/');
+ }
+ $schemes = implode('|', $tmp);
+
+ // build the regex
+ $this->regex =
+ "($schemes)" . // allowed schemes
+ "(" . // start pattern
+ "[^ \\/\"\'{$this->wiki->delim}]*\\/" . // no spaces, backslashes, slashes, double-quotes, single quotes, or delimiters;
+ ")*" . // end pattern
+ "[^ \\t\\n\\/\"\'{$this->wiki->delim}]*" .
+ "[A-Za-z0-9\\/?=&~_]";
+ }
+
+
+ /**
+ *
+ * Find three different kinds of URLs in the source text.
+ *
+ * @access public
+ *
+ */
+
+ function parse()
+ {
+ // -------------------------------------------------------------
+ //
+ // Described-reference (named) URLs.
+ //
+
+ // the regular expression for this kind of URL
+ $tmp_regex = '/\[(' . $this->regex . ') ([^\]]+)\]/';
+
+ // use a custom callback processing method to generate
+ // the replacement text for matches.
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'processDescr'),
+ $this->wiki->source
+ );
+
+
+ // -------------------------------------------------------------
+ //
+ // Numbered-reference (footnote-style) URLs.
+ //
+
+ // the regular expression for this kind of URL
+ $tmp_regex = '/\[(' . $this->regex . ')\]/U';
+
+ // use a custom callback processing method to generate
+ // the replacement text for matches.
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'processFootnote'),
+ $this->wiki->source
+ );
+
+
+ // -------------------------------------------------------------
+ //
+ // Normal inline URLs.
+ //
+
+ // the regular expression for this kind of URL
+
+ $tmp_regex = '/(^|[^A-Za-z])(' . $this->regex . ')(.*?)/';
+
+ // use the standard callback for inline URLs
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'process'),
+ $this->wiki->source
+ );
+ }
+
+
+ /**
+ *
+ * Process inline URLs.
+ *
+ * @param array &$matches
+ *
+ * @param array $matches An array of matches from the parse() method
+ * as generated by preg_replace_callback. $matches[0] is the full
+ * matched string, $matches[1] is the first matched pattern,
+ * $matches[2] is the second matched pattern, and so on.
+ *
+ * @return string The processed text replacement.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // set options
+ $options = array(
+ 'type' => 'inline',
+ 'href' => $matches[2],
+ 'text' => $matches[2]
+ );
+
+ // tokenize
+ return $matches[1] . $this->wiki->addToken($this->rule, $options) . $matches[5];
+ }
+
+
+ /**
+ *
+ * Process numbered (footnote) URLs.
+ *
+ * Token options are:
+ * @param array &$matches
+ *
+ * @param array $matches An array of matches from the parse() method
+ * as generated by preg_replace_callback. $matches[0] is the full
+ * matched string, $matches[1] is the first matched pattern,
+ * $matches[2] is the second matched pattern, and so on.
+ *
+ * @return string The processed text replacement.
+ *
+ */
+
+ function processFootnote(&$matches)
+ {
+ // keep a running count for footnotes
+ $this->footnoteCount++;
+
+ // set options
+ $options = array(
+ 'type' => 'footnote',
+ 'href' => $matches[1],
+ 'text' => $this->footnoteCount
+ );
+
+ // tokenize
+ return $this->wiki->addToken($this->rule, $options);
+ }
+
+
+ /**
+ *
+ * Process described-reference (named-reference) URLs.
+ *
+ * Token options are:
+ * 'type' => ['inline'|'footnote'|'descr'] the type of URL
+ * 'href' => the URL link href portion
+ * 'text' => the displayed text of the URL link
+ *
+ * @param array &$matches
+ *
+ * @param array $matches An array of matches from the parse() method
+ * as generated by preg_replace_callback. $matches[0] is the full
+ * matched string, $matches[1] is the first matched pattern,
+ * $matches[2] is the second matched pattern, and so on.
+ *
+ * @return string The processed text replacement.
+ *
+ */
+
+ function processDescr(&$matches)
+ {
+ // set options
+ $options = array(
+ 'type' => 'descr',
+ 'href' => $matches[1],
+ 'text' => $matches[4]
+ );
+
+ // tokenize
+ return $this->wiki->addToken($this->rule, $options);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Parse for links to wiki pages.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Wikilink.php,v 1.4 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Parse for links to wiki pages.
+*
+* Wiki page names are typically in StudlyCapsStyle made of
+* WordsSmashedTogether.
+*
+* You can also create described links to pages in this style:
+* [WikiPageName nice text link to use for display]
+*
+* The token options for this rule are:
+*
+* 'page' => the wiki page name.
+*
+* 'text' => the displayed link text.
+*
+* 'anchor' => a named anchor on the target wiki page.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Wikilink extends Text_Wiki_Parse {
+
+ var $conf = array (
+ 'ext_chars' => false
+ );
+
+ /**
+ *
+ * Constructor.
+ *
+ * We override the Text_Wiki_Parse constructor so we can
+ * explicitly comment each part of the $regex property.
+ *
+ * @access public
+ *
+ * @param object &$obj The calling "parent" Text_Wiki object.
+ *
+ */
+
+ function Text_Wiki_Parse_Wikilink(&$obj)
+ {
+ parent::Text_Wiki_Parse($obj);
+
+ if ($this->getConf('ext_chars')) {
+ // use an extended character set; this should
+ // allow for umlauts and so on. taken from the
+ // Tavi project defaults.php file.
+ $upper = "A-Z\xc0-\xde";
+ $lower = "a-z0-9\xdf-\xfe";
+ $either = "A-Za-z0-9\xc0-\xfe";
+ } else {
+ // the default character set, should be fine
+ // for most purposes.
+ $upper = "A-Z";
+ $lower = "a-z0-9";
+ $either = "A-Za-z0-9";
+ }
+
+ // build the regular expression for finding WikiPage names.
+ $this->regex =
+ "(!?" . // START WikiPage pattern (1)
+ "[$upper]" . // 1 upper
+ "[$either]*" . // 0+ alpha or digit
+ "[$lower]+" . // 1+ lower or digit
+ "[$upper]" . // 1 upper
+ "[$either]*" . // 0+ or more alpha or digit
+ ")" . // END WikiPage pattern (/1)
+ "((\#" . // START Anchor pattern (2)(3)
+ "[$either]" . // 1 alpha
+ "(" . // start sub pattern (4)
+ "[-_$either:.]*" . // 0+ dash, alpha, digit, underscore, colon, dot
+ "[-_$either]" . // 1 dash, alpha, digit, or underscore
+ ")?)?)"; // end subpatterns (/4)(/3)(/2)
+ }
+
+
+ /**
+ *
+ * First parses for described links, then for standalone links.
+ *
+ * @access public
+ *
+ * @return void
+ *
+ */
+
+ function parse()
+ {
+ // described wiki links
+ $tmp_regex = '/\[' . $this->regex . ' (.+?)\]/';
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'processDescr'),
+ $this->wiki->source
+ );
+
+ // standalone wiki links
+ if ($this->getConf('ext_chars')) {
+ $either = "A-Za-z0-9\xc0-\xfe";
+ } else {
+ $either = "A-Za-z0-9";
+ }
+
+ $tmp_regex = '/(^|[^$either\-_])' . $this->regex . '/';
+ $this->wiki->source = preg_replace_callback(
+ $tmp_regex,
+ array(&$this, 'process'),
+ $this->wiki->source
+ );
+ }
+
+
+ /**
+ *
+ * Generate a replacement for described links.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token to be used as a placeholder in
+ * the source text, plus any text priot to the match.
+ *
+ */
+
+ function processDescr(&$matches)
+ {
+ // set the options
+ $options = array(
+ 'page' => $matches[1],
+ 'text' => $matches[5],
+ 'anchor' => $matches[3]
+ );
+
+ // create and return the replacement token and preceding text
+ return $this->wiki->addToken($this->rule, $options); // . $matches[7];
+ }
+
+
+ /**
+ *
+ * Generate a replacement for standalone links.
+ *
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token to be used as a placeholder in
+ * the source text, plus any text prior to the match.
+ *
+ */
+
+ function process(&$matches)
+ {
+ // when prefixed with !, it's explicitly not a wiki link.
+ // return everything as it was.
+ if ($matches[2]{0} == '!') {
+ return $matches[1] . substr($matches[2], 1) . $matches[3];
+ }
+
+ // set the options
+ $options = array(
+ 'page' => $matches[2],
+ 'text' => $matches[2] . $matches[3],
+ 'anchor' => $matches[3]
+ );
+
+ // create and return the replacement token and preceding text
+ return $matches[1] . $this->wiki->addToken($this->rule, $options);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Base rendering class for parsed and tokenized text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Render.php,v 1.5 2005/02/23 17:38:29 pmjones Exp $
+*
+*/
+
+/**
+*
+* Base rendering class for parsed and tokenized text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+*/
+
+class Text_Wiki_Render {
+
+
+ /**
+ *
+ * Configuration options for this render rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $conf = array();
+
+
+ /**
+ *
+ * The name of this rule's format.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $format = null;
+
+
+ /**
+ *
+ * The name of this rule's token array elements.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $rule = null;
+
+
+ /**
+ *
+ * A reference to the calling Text_Wiki object.
+ *
+ * This is needed so that each rule has access to the same source
+ * text, token set, URLs, interwiki maps, page names, etc.
+ *
+ * @access public
+ *
+ * @var object
+ */
+
+ var $wiki = null;
+
+
+ /**
+ *
+ * Constructor for this render format or rule.
+ *
+ * @access public
+ *
+ * @param object &$obj The calling "parent" Text_Wiki object.
+ *
+ */
+
+ function Text_Wiki_Render(&$obj)
+ {
+ // keep a reference to the calling Text_Wiki object
+ $this->wiki =& $obj;
+
+ // get the config-key-name for this object,
+ // strip the Text_Wiki_Render_ part
+ // 01234567890123456
+ $tmp = get_class($this);
+ $tmp = substr($tmp, 17);
+
+ // split into pieces at the _ mark.
+ // first part is format, second part is rule.
+ $part = explode('_', $tmp);
+ $this->format = isset($part[0]) ? ucwords(strtolower($part[0])) : null;
+ $this->rule = isset($part[1]) ? ucwords(strtolower($part[1])) : null;
+
+ // is there a format but no rule?
+ // then this is the "main" render object, with
+ // pre() and post() methods.
+ if ($this->format && ! $this->rule &&
+ isset($this->wiki->formatConf[$this->format]) &&
+ is_array($this->wiki->formatConf[$this->format])) {
+
+ // this is a format render object
+ $this->conf = array_merge(
+ $this->conf,
+ $this->wiki->formatConf[$this->format]
+ );
+
+ }
+
+ // is there a format and a rule?
+ if ($this->format && $this->rule &&
+ isset($this->wiki->renderConf[$this->format][$this->rule]) &&
+ is_array($this->wiki->renderConf[$this->format][$this->rule])) {
+
+ // this is a rule render object
+ $this->conf = array_merge(
+ $this->conf,
+ $this->wiki->renderConf[$this->format][$this->rule]
+ );
+ }
+ }
+
+
+ /**
+ *
+ * Simple method to safely get configuration key values.
+ *
+ * @access public
+ *
+ * @param string $key The configuration key.
+ *
+ * @param mixed $default If the key does not exist, return this value
+ * instead.
+ *
+ * @return mixed The configuration key value (if it exists) or the
+ * default value (if not).
+ *
+ */
+
+ function getConf($key, $default = null)
+ {
+ if (isset($this->conf[$key])) {
+ return $this->conf[$key];
+ } else {
+ return $default;
+ }
+ }
+
+
+ /**
+ *
+ * Simple method to wrap a configuration in an sprintf() format.
+ *
+ * @access public
+ *
+ * @param string $key The configuration key.
+ *
+ * @param string $format The sprintf() format string.
+ *
+ * @return mixed The formatted configuration key value (if it exists)
+ * or null (if it does not).
+ *
+ */
+
+ function formatConf($format, $key)
+ {
+ if (isset($this->conf[$key])) {
+ return sprintf($format, $this->conf[$key]);
+ } else {
+ return null;
+ }
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* Formats parsed Text_Wiki for LaTeX rendering.
+*
+* $Id: Latex.php,v 1.2 2004/09/25 19:05:13 pmjones Exp $
+*
+* @author Jeremy Cowgar <jeremy@cowgar.com>
+*
+* @package Text_Wiki
+*
+* @todo [http://google.com] becomes 1 with a LaTeX footnote in subscript.
+* This should be a normal LaTeX footnote associated with the
+* previous word?
+*
+* @todo parse "..." to be ``...''
+*
+* @todo parse '...' to be `...'
+*
+* @todo move escape_latex to a static function, move escaping to the
+* individual .php files they are associated with
+*
+* @todo allow the user to add conf items to do things like
+* + A custom document header
+* + Custom page headings
+* + Include packages
+* + Set Title, Author, Date
+* + Include a title page
+* + Not output Document Head/Foot (maybe combinding many pages?)
+*
+*/
+
+class Text_Wiki_Render_Latex extends Text_Wiki_Render {
+ function escape_latex ($txt) {
+ $txt = str_replace("\\", "\\\\", $txt);
+ $txt = str_replace('#', '\#', $txt);
+ $txt = str_replace('$', '\$', $txt);
+ $txt = str_replace('%', '\%', $txt);
+ $txt = str_replace('^', '\^', $txt);
+ $txt = str_replace('&', '\&', $txt);
+ $txt = str_replace('_', '\_', $txt);
+ $txt = str_replace('{', '\{', $txt);
+ $txt = str_replace('}', '\}', $txt);
+
+ // Typeset things a bit prettier than normas
+ $txt = str_replace('~', '$\sim$', $txt);
+ $txt = str_replace('...', '\ldots', $txt);
+
+ return $txt;
+ }
+
+ function escape($tok, $ele) {
+ if (isset($tok[$ele])) {
+ $tok[$ele] = $this->escape_latex($tok[$ele]);
+ }
+
+ return $tok;
+ }
+
+ function pre()
+ {
+ foreach ($this->wiki->tokens as $k => $tok) {
+ if ($tok[0] == 'Code') {
+ continue;
+ }
+
+ $tok[1] = $this->escape($tok[1], 'text');
+ $tok[1] = $this->escape($tok[1], 'page');
+ $tok[1] = $this->escape($tok[1], 'href');
+
+ $this->wiki->tokens[$k] = $tok;
+ }
+
+ $this->wiki->source = $this->escape_latex($this->wiki->source);
+
+ return
+ "\\documentclass{article}\n".
+ "\\usepackage{ulem}\n".
+ "\\pagestyle{headings}\n".
+ "\\begin{document}\n";
+ }
+
+ function post()
+ {
+ return "\\end{document}\n";
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* This class renders an anchor target name in LaTeX.
+*
+* $Id: Anchor.php,v 1.2 2004/09/25 19:05:13 pmjones Exp $
+*
+* @author Jeremy Cowgar <jeremy@cowgar.com>
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Render_Latex_Anchor extends Text_Wiki_Render {
+
+ function token($options)
+ {
+ extract($options); // $type, $name
+
+ if ($type == 'start') {
+ //return sprintf('<a id="%s">',$name);
+ return '';
+ }
+
+ if ($type == 'end') {
+ //return '</a>';
+ return '';
+ }
+ }
+}
+
+?>
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Blockquote extends Text_Wiki_Render {
+
+ var $conf = array('css' => null);
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ $level = $options['level'];
+
+ // starting
+ if ($type == 'start') {
+ return "\\begin{quote}\n";
+ }
+
+ // ending
+ if ($type == 'end') {
+ return "\\end{quote}\n\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Bold extends Text_Wiki_Render_Latex_Strong {}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Break extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "\\newline\n";
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Center extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return 'Center: NI';
+
+ if ($options['type'] == 'start') {
+ //return "\n<center>\n";
+ return '<div style="text-align: center;">';
+ }
+
+ if ($options['type'] == 'end') {
+ //return "</center>\n";
+ return '</div>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Code extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $text = $options['text'];
+
+ return "\\begin{verbatim}\n$text\n\\end{verbatim}\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Colortext extends Text_Wiki_Render {
+
+ var $colors = array(
+ 'aqua',
+ 'black',
+ 'blue',
+ 'fuchsia',
+ 'gray',
+ 'green',
+ 'lime',
+ 'maroon',
+ 'navy',
+ 'olive',
+ 'purple',
+ 'red',
+ 'silver',
+ 'teal',
+ 'white',
+ 'yellow'
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return 'Colortext: NI';
+
+ $type = $options['type'];
+ $color = $options['color'];
+
+ if (! in_array($color, $this->colors)) {
+ $color = '#' . $color;
+ }
+
+ if ($type == 'start') {
+ return "<span style=\"color: $color;\">";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</span>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Deflist extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_dl' => null,
+ 'css_dt' => null,
+ 'css_dd' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ switch ($type)
+ {
+ case 'list_start':
+ return "\\begin{description}\n";
+
+ case 'list_end':
+ return "\\end{description}\n\n";
+
+ case 'term_start':
+ return '\item[';
+
+ case 'term_end':
+ return '] ';
+
+ case 'narr_start':
+ return '{';
+
+ case 'narr_end':
+ return "}\n";
+
+ default:
+ return '';
+
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Delimiter extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // TODO: Is this where I can do some LaTeX escaping for items
+ // such as $ { } _ ?
+ return "Delimiter: ".$options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Embed extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "Embed: ".$options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Emphasis extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ return '\textsl{';
+ }
+
+ if ($options['type'] == 'end') {
+ return '}';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Freelink extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'pages' => array(),
+ 'view_url' => 'http://example.com/index.php?page=%s',
+ 'new_url' => 'http://example.com/new.php?page=%s',
+ 'new_text' => '?'
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // get nice variable names (page, text, anchor)
+ extract($options);
+
+ return "$text\\footnote\{$anchor} ";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Function extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "Function: NI";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Heading extends Text_Wiki_Render {
+
+ function token($options)
+ {
+ // get nice variable names (type, level)
+ extract($options);
+
+ if ($type == 'start') {
+ switch ($level)
+ {
+ case '1':
+ return '\part{';
+ case '2':
+ return '\section{';
+ case '3':
+ return '\subsection{';
+ case '4':
+ return '\subsubsection{';
+ case '5':
+ return '\paragraph{';
+ case '6':
+ return '\subparagraph{';
+ }
+ }
+
+ if ($type == 'end') {
+ return "}\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Horiz extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "\n\\noindent\\rule{\\textwidth}{1pt}\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Html extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ print_r($this);
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Latex_Image extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'base' => '/'
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return 'Image: NI';
+
+ $src = '"' .
+ $this->getConf('base', '/') .
+ $options['src'] . '"';
+
+ if (isset($options['attr']['link'])) {
+
+ // this image has a link
+ if (strpos($options['attr']['link'], '://')) {
+ // it's a URL
+ $href = $options['attr']['link'];
+ } else {
+ $href = $this->wiki->getRenderConf('xhtml', 'wikilink', 'view_url') .
+ $options['attr']['link'];
+ }
+
+ } else {
+ // image is not linked
+ $href = null;
+ }
+
+ // unset these so they don't show up as attributes
+ unset($options['attr']['link']);
+
+ $attr = '';
+ $alt = false;
+ foreach ($options['attr'] as $key => $val) {
+ if (strtolower($key) == 'alt') {
+ $alt = true;
+ }
+ $attr .= " $key=\"$val\"";
+ }
+
+ // always add an "alt" attribute per Stephane Solliec
+ if (! $alt) {
+ $attr .= ' alt="' . basename($options['src']) . '"';
+ }
+
+ if ($href) {
+ return "<a href=\"$href\"><img src=$src$attr/></a>";
+ } else {
+ return "<img src=$src$attr/>";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Latex_Include extends Text_Wiki_Render {
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Interwiki extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'sites' => array(
+ 'MeatBall' => 'http://www.usemod.com/cgi-bin/mb.pl?%s',
+ 'Advogato' => 'http://advogato.org/%s',
+ 'Wiki' => 'http://c2.com/cgi/wiki?%s'
+ ),
+ 'target' => '_blank'
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $site = $options['site'];
+ $page = $options['page'];
+ $text = $options['text'];
+
+ if (isset($this->conf['sites'][$site])) {
+ $href = $this->conf['sites'][$site];
+ } else {
+ return $text;
+ }
+
+ // old form where page is at end,
+ // or new form with %s placeholder for sprintf()?
+ if (strpos($href, '%s') === false) {
+ // use the old form
+ $href = $href . $page;
+ } else {
+ // use the new form
+ $href = sprintf($href, $page);
+ }
+
+ // allow for alternative targets
+ $target = $this->getConf('target', '');
+
+ if ($target && trim($target) != '') {
+ $target = " target=\"$target\"";
+ }
+
+ return "$text\\footnote\{$href}";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Italic extends Text_Wiki_Render_Latex_Emphasis {
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+
+class Text_Wiki_Render_Latex_List extends Text_Wiki_Render {
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * This rendering method is syntactically and semantically compliant
+ * with XHTML 1.1 in that sub-lists are part of the previous list item.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variables (type, level, count)
+ extract($options);
+
+ switch ($type)
+ {
+ case 'bullet_list_start':
+ return "\\begin{itemize}\n";
+
+ case 'bullet_list_end':
+ return "\\end{itemize}\n";
+
+ case 'number_list_start':
+ return "\\begin{enumerate}\n";
+
+ case 'number_list_end':
+ return "\\end{enumerate}\n";
+
+ case 'bullet_item_start':
+ case 'number_item_start':
+ return "\\item{";
+
+ case 'bullet_item_end':
+ case 'number_item_end':
+ return "}\n";
+
+ default:
+ // ignore item endings and all other types.
+ // item endings are taken care of by the other types
+ // depending on their place in the list.
+ return '';
+ break;
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Newline extends Text_Wiki_Render {
+
+
+ function token($options)
+ {
+ return "\n";
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Paragraph extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ extract($options); //type
+
+ if ($type == 'start') {
+ return '';
+ }
+
+ if ($type == 'end') {
+ return "\n\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Phplookup extends Text_Wiki_Render {
+
+ var $conf = array('target' => '_blank');
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return 'Phplookup: NI';
+
+ $text = trim($options['text']);
+
+ $target = $this->getConf('target', '');
+ if ($target) {
+ $target = " target=\"$target\"";
+ }
+
+ return "<a$target href=\"http://php.net/$text\">$text</a>";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Jeremy Cowgar <jeremy@cowgar.com> |
+// +----------------------------------------------------------------------+
+//
+// $Id: Prefilter.php,v 1.2 2004/09/25 19:05:13 pmjones Exp $
+
+
+/**
+*
+* This class implements a Text_Wiki_Render_Latex to "pre-filter" source text so
+* that line endings are consistently \n, lines ending in a backslash \
+* are concatenated with the next line, and tabs are converted to spaces.
+*
+* @author Jeremy Cowgar <jeremy@cowgar.com>
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Render_Latex_Prefilter extends Text_Wiki_Render {
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Raw extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "Raw: ".$options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Revise extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'del_start') {
+ return '\sout{';
+ }
+
+ if ($options['type'] == 'del_end') {
+ return '}';
+ }
+
+ if ($options['type'] == 'ins_start') {
+ return '\underline{';
+ }
+
+ if ($options['type'] == 'ins_end') {
+ return '}';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Strong extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ return '\textbf{';
+ }
+
+ if ($options['type'] == 'end') {
+ return '}';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Superscript extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return 'Superscript: NI';
+
+ if ($options['type'] == 'start') {
+ return '<sup>';
+ }
+
+ if ($options['type'] == 'end') {
+ return '</sup>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Table extends Text_Wiki_Render {
+ var $cell_id = 0;
+ var $cell_count = 0;
+ var $is_spanning = false;
+
+ var $conf = array(
+ 'css_table' => null,
+ 'css_tr' => null,
+ 'css_th' => null,
+ 'css_td' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variable names (type, attr, span)
+ extract($options);
+
+ switch ($type)
+ {
+ case 'table_start':
+ $this->cell_count = $cols;
+
+ $tbl_start = '\begin{tabular}{|';
+ for ($a=0; $a < $this->cell_count; $a++) {
+ $tbl_start .= 'l|';
+ }
+ $tbl_start .= "}\n";
+
+ return $tbl_start;
+
+ case 'table_end':
+ return "\\hline\n\\end{tabular}\n";
+
+ case 'row_start':
+ $this->is_spanning = false;
+ $this->cell_id = 0;
+ return "\\hline\n";
+
+ case 'row_end':
+ return "\\\\\n";
+
+ case 'cell_start':
+ if ($span > 1) {
+ $col_spec = '';
+ if ($this->cell_id == 0) {
+ $col_spec = '|';
+ }
+ $col_spec .= 'l|';
+
+ $this->cell_id += $span;
+ $this->is_spanning = true;
+
+ return "\\multicolumn\{$span}\{$col_spec}{";
+ }
+
+ $this->cell_id += 1;
+ return '';
+
+ case 'cell_end':
+ $out = '';
+ if ($this->is_spanning) {
+ $this->is_spanning = false;
+ $out = '}';
+ }
+
+ if ($this->cell_id != $this->cell_count) {
+ $out .= ' & ';
+ }
+
+ return $out;
+
+ default:
+ return '';
+
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Latex_Tighten extends Text_Wiki_Render {
+
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Toc extends Text_Wiki_Render {
+
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if($options['type'] == 'list_start') {
+ return "\\tableofcontents\n\n";
+ }
+
+ return '';
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_tt extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ return '\texttt{';
+ }
+
+ if ($options['type'] == 'end') {
+ return '}';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+
+class Text_Wiki_Render_Latex_Url extends Text_Wiki_Render {
+
+
+ var $conf = array(
+ 'target' => false,
+ 'images' => true,
+ 'img_ext' => array('jpg', 'jpeg', 'gif', 'png')
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // create local variables from the options array (text,
+ // href, type)
+ extract($options);
+
+ return " $text\\footnote\{$href}";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Latex_Wikilink extends Text_Wiki_Render {
+ var $conf = array(
+ 'pages' => array(),
+ 'view_url' => 'http://example.com/index.php?page=%s',
+ 'new_url' => 'http://example.com/new.php?page=%s',
+ 'new_text' => '?'
+ );
+
+ /**
+ *
+ * Renders a token into XHTML.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variable names (page, anchor, text)
+ extract($options);
+
+ // are we checking page existence?
+ $list =& $this->getConf('pages');
+ if (is_array($list)) {
+ // yes, check against the page list
+ $exists = in_array($page, $list);
+ } else {
+ // no, assume it exists
+ $exists = true;
+ }
+
+ // convert *after* checking against page names so as not to mess
+ // up what the user typed and what we're checking.
+ $page = htmlspecialchars($page);
+ $anchor = htmlspecialchars($anchor);
+ $text = htmlspecialchars($text);
+
+ $href = $this->getConf('view_url');
+
+ if (strpos($href, '%s') === false) {
+ // use the old form (page-at-end)
+ $href = $href . $page . $anchor;
+ } else {
+ // use the new form (sprintf format string)
+ $href = sprintf($href, $page . $anchor);
+ }
+
+ // get the CSS class and generate output
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "$text\\footnote\{$href}";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain extends Text_Wiki_Render {
+
+ function pre()
+ {
+ return;
+ }
+
+ function post()
+ {
+ return;
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* This class renders an anchor target name in XHTML.
+*
+* @author Manuel Holtgrewe <purestorm at ggnore dot net>
+*
+* @author Paul M. Jones <pmjones at ciaweb dot net>
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Render_Plain_Anchor extends Text_Wiki_Render {
+
+ function token($options)
+ {
+ return $options['name'];
+ }
+}
+
+?>
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Blockquote extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ $level = $options['level'];
+
+ // set up indenting so that the results look nice; we do this
+ // in two steps to avoid str_pad mathematics. ;-)
+ $pad = str_pad('', $level + 1, "\t");
+ $pad = str_replace("\t", ' ', $pad);
+
+ // starting
+ if ($type == 'start') {
+ return "\n$pad";
+ }
+
+ // ending
+ if ($type == 'end') {
+ return "\n$pad";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Bold extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Break extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "\n";
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Center extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Code extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "\n" . $options['text'] . "\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Colortext extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Deflist extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ $pad = " ";
+
+ switch ($type) {
+
+ case 'list_start':
+ return "\n";
+ break;
+
+ case 'list_end':
+ return "\n\n";
+ break;
+
+ case 'term_start':
+
+ // done!
+ return $pad;
+ break;
+
+ case 'term_end':
+ return "\n";
+ break;
+
+ case 'narr_start':
+
+ // done!
+ return $pad . $pad;
+ break;
+
+ case 'narr_end':
+ return "\n";
+ break;
+
+ default:
+ return '';
+
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Delimiter extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Embed extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return strip_tags($options['text']);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Emphasis extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Freelink extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+// $Id: Function.php,v 1.3 2004/10/08 17:46:47 pmjones Exp $
+
+class Text_Wiki_Render_Plain_Function extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ extract($options); // access, return, name, params, throws
+
+ $output = "$access $return $name ( ";
+
+ foreach ($params as $key => $val) {
+ $output .= "{$val['type']} {$val['descr']} {$val['default']} ";
+ }
+
+ $output .= ') ';
+
+ foreach ($throws as $key => $val) {
+ $output .= "{$val['type']} {$val['descr']} ";
+ }
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Heading extends Text_Wiki_Render {
+
+ function token($options)
+ {
+ if ($options['type'] == 'end') {
+ return "\n\n";
+ } else {
+ return "\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Horiz extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return "\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Html extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return strip_tags($options['text']);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Plain_Image extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Plain_Include extends Text_Wiki_Render {
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Interwiki extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Italic extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+
+class Text_Wiki_Render_Plain_List extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * This rendering method is syntactically and semantically compliant
+ * with XHTML 1.1 in that sub-lists are part of the previous list item.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variables (type, level, count)
+ extract($options);
+
+ // set up indenting so that the results look nice; we do this
+ // in two steps to avoid str_pad mathematics. ;-)
+ $pad = str_pad('', $level, "\t");
+ $pad = str_replace("\t", ' ', $pad);
+
+ switch ($type) {
+
+ case 'bullet_list_start':
+ break;
+
+ case 'bullet_list_end':
+ if ($level == 0) {
+ return "\n\n";
+ }
+ break;
+
+ case 'number_list_start':
+ break;
+
+ case 'number_list_end':
+ if ($level == 0) {
+ return "\n\n";
+ }
+ break;
+
+ case 'bullet_item_start':
+ case 'number_item_start':
+ return "\n$pad";
+ break;
+
+ case 'bullet_item_end':
+ case 'number_item_end':
+ default:
+ // ignore item endings and all other types.
+ // item endings are taken care of by the other types
+ // depending on their place in the list.
+ return;
+ break;
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Newline extends Text_Wiki_Render {
+
+
+ function token($options)
+ {
+ return "\n";
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Paragraph extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ extract($options); //type
+
+ if ($type == 'start') {
+ return '';
+ }
+
+ if ($type == 'end') {
+ return "\n\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Phplookup extends Text_Wiki_Render {
+
+ var $conf = array('target' => '_blank');
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return trim($options['text']);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Paul M. Jones <pmjones@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: Prefilter.php,v 1.3 2005/02/22 19:12:58 pmjones Exp $
+
+
+/**
+*
+* This class implements a Text_Wiki_Render_Xhtml to "pre-filter" source text so
+* that line endings are consistently \n, lines ending in a backslash \
+* are concatenated with the next line, and tabs are converted to spaces.
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Render_Plain_Prefilter extends Text_Wiki_Render {
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Raw extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Revise extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Strong extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Superscript extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Table extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variable names (type, attr, span)
+ extract($options);
+
+ $pad = ' ';
+
+ switch ($type) {
+
+ case 'table_start':
+ return;
+ break;
+
+ case 'table_end':
+ return;
+ break;
+
+ case 'row_start':
+ return;
+ break;
+
+ case 'row_end':
+ return " ||\n";
+ break;
+
+ case 'cell_start':
+ return " || ";
+ break;
+
+ case 'cell_end':
+ return;
+ break;
+
+ default:
+ return '';
+
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Plain_Tighten extends Text_Wiki_Render {
+
+
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Toc extends Text_Wiki_Render {
+
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // type, count, level
+ extract($options);
+
+ if ($type == 'item_start') {
+
+ // build some indenting spaces for the text
+ $indent = ($level - 2) * 4;
+ $pad = str_pad('', $indent);
+ return $pad;
+ }
+
+ if ($type == 'item_end') {
+ return "\n";
+ }
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_tt extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+
+class Text_Wiki_Render_Plain_Url extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Plain_Wikilink extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into plain text.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml extends Text_Wiki_Render {
+
+ var $conf = array('translate' => HTML_ENTITIES);
+
+ function pre()
+ {
+ // attempt to translate HTML entities in the source before continuing.
+ $type = $this->getConf('translate', null);
+
+ // are we translating html?
+ if ($type !== false && $type !== null) {
+
+ // yes! get the translation table.
+ $xlate = get_html_translation_table($type);
+
+ // remove the delimiter character it doesn't get translated
+ unset($xlate[$this->wiki->delim]);
+
+ // translate!
+ $this->wiki->source = strtr($this->wiki->source, $xlate);
+ }
+
+ }
+
+ function post()
+ {
+ return;
+ }
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+/**
+*
+* This class renders an anchor target name in XHTML.
+*
+* @author Manuel Holtgrewe <purestorm at ggnore dot net>
+*
+* @author Paul M. Jones <pmjones at ciaweb dot net>
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Render_Xhtml_Anchor extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ function token($options)
+ {
+ extract($options); // $type, $name
+
+ if ($type == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ $format = "<a$css id=\"%s\">";
+ return sprintf($format ,$name);
+ }
+
+ if ($type == 'end') {
+ return '</a>';
+ }
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Blockquote extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ $level = $options['level'];
+
+ // set up indenting so that the results look nice; we do this
+ // in two steps to avoid str_pad mathematics. ;-)
+ $pad = str_pad('', $level, "\t");
+ $pad = str_replace("\t", ' ', $pad);
+
+ // pick the css type
+ $css = $this->formatConf(' class="%s"', 'css');
+
+ // starting
+ if ($type == 'start') {
+ return "$pad<blockquote$css>";
+ }
+
+ // ending
+ if ($type == 'end') {
+ return $pad . "</blockquote>\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Bold extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<b$css>";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</b>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Break extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<br$css />\n";
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Center extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ return '<div style="text-align: center;">';
+ }
+
+ if ($options['type'] == 'end') {
+ return '</div>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Code extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null, // class for <pre>
+ 'css_code' => null, // class for generic <code>
+ 'css_php' => null, // class for PHP <code>
+ 'css_html' => null // class for HTML <code>
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $text = $options['text'];
+ $attr = $options['attr'];
+ $type = strtolower($attr['type']);
+
+ $css = $this->formatConf(' class="%s"', 'css');
+ $css_code = $this->formatConf(' class="%s"', 'css_code');
+ $css_php = $this->formatConf(' class="%s"', 'css_php');
+ $css_html = $this->formatConf(' class="%s"', 'css_html');
+
+ if ($type == 'php') {
+
+ // PHP code example:
+ // add the PHP tags
+ $text = "<?php\n" . $options['text'] . "\n?>"; // <?php
+
+ // convert tabs to four spaces
+ $text = str_replace("\t", " ", $text);
+
+ // colorize the code block (also converts HTML entities and adds
+ // <code>...</code> tags)
+ ob_start();
+ highlight_string($text);
+ $text = ob_get_contents();
+ ob_end_clean();
+
+ // replace <br /> tags with simple newlines.
+ // replace non-breaking space with simple spaces.
+ // translate HTML <font> and color to XHTML <span> and style.
+ // courtesy of research by A. Kalin :-).
+ $map = array(
+ '<br />' => "\n",
+ ' ' => ' ',
+ '<font' => '<span',
+ '</font>' => '</span>',
+ 'color="' => 'style="color:'
+ );
+ $text = strtr($text, $map);
+
+ // get rid of the last newline inside the code block
+ // (becuase higlight_string puts one there)
+ if (substr($text, -8) == "\n</code>") {
+ $text = substr($text, 0, -8) . "</code>";
+ }
+
+ // replace all <code> tags with classed tags
+ if ($css_php) {
+ $text = str_replace('<code>', "<code$css_php>", $text);
+ }
+
+ // done
+ $text = "<pre$css>$text</pre>";
+
+ } elseif ($type == 'html' || $type == 'xhtml') {
+
+ // HTML code example:
+ // add <html> opening and closing tags,
+ // convert tabs to four spaces,
+ // convert entities.
+ $text = str_replace("\t", " ", $text);
+ $text = "<html>\n$text\n</html>";
+ $text = htmlentities($text);
+ $text = "<pre$css><code$css_html>$text</code></pre>";
+
+ } else {
+ // generic code example:
+ // convert tabs to four spaces,
+ // convert entities.
+ $text = str_replace("\t", " ", $text);
+ $text = htmlentities($text);
+ $text = "<pre$css><code$css_code>$text</code></pre>";
+ }
+
+ return "\n$text\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Colortext extends Text_Wiki_Render {
+
+ var $colors = array(
+ 'aqua',
+ 'black',
+ 'blue',
+ 'fuchsia',
+ 'gray',
+ 'green',
+ 'lime',
+ 'maroon',
+ 'navy',
+ 'olive',
+ 'purple',
+ 'red',
+ 'silver',
+ 'teal',
+ 'white',
+ 'yellow'
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ $color = $options['color'];
+
+ if (! in_array($color, $this->colors)) {
+ $color = '#' . $color;
+ }
+
+ if ($type == 'start') {
+ return "<span style=\"color: $color;\">";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</span>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Deflist extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_dl' => null,
+ 'css_dt' => null,
+ 'css_dd' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $type = $options['type'];
+ $pad = " ";
+
+ switch ($type) {
+
+ case 'list_start':
+ $css = $this->formatConf(' class="%s"', 'css_dl');
+ return "<dl$css>\n";
+ break;
+
+ case 'list_end':
+ return "</dl>\n\n";
+ break;
+
+ case 'term_start':
+ $css = $this->formatConf(' class="%s"', 'css_dt');
+ return $pad . "<dt$css>";
+ break;
+
+ case 'term_end':
+ return "</dt>\n";
+ break;
+
+ case 'narr_start':
+ $css = $this->formatConf(' class="%s"', 'css_dd');
+ return $pad . $pad . "<dd$css>";
+ break;
+
+ case 'narr_end':
+ return "</dd>\n";
+ break;
+
+ default:
+ return '';
+
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Delimiter extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Embed extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Emphasis extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<em$css>";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</em>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+require_once 'Text/Wiki/Render/Xhtml/Wikilink.php';
+
+class Text_Wiki_Render_Xhtml_Freelink extends Text_Wiki_Render_Xhtml_Wikilink {
+ // renders identically to wikilinks, only the parsing is different :-)
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+// $Id: Function.php,v 1.3 2004/10/08 17:46:47 pmjones Exp $
+
+class Text_Wiki_Render_Xhtml_Function extends Text_Wiki_Render {
+
+ var $conf = array(
+ // list separator for params and throws
+ 'list_sep' => ', ',
+
+ // the "main" format string
+ 'format_main' => '%access %return <b>%name</b> ( %params ) %throws',
+
+ // the looped format string for required params
+ 'format_param' => '%type <i>%descr</i>',
+
+ // the looped format string for params with default values
+ 'format_paramd' => '[%type <i>%descr</i> default %default]',
+
+ // the looped format string for throws
+ 'format_throws' => '<b>throws</b> %type <i>%descr</i>'
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ extract($options); // name, access, return, params, throws
+
+ // build the baseline output
+ $output = $this->conf['format_main'];
+ $output = str_replace('%access', htmlspecialchars($access), $output);
+ $output = str_replace('%return', htmlspecialchars($return), $output);
+ $output = str_replace('%name', htmlspecialchars($name), $output);
+
+ // build the set of params
+ $list = array();
+ foreach ($params as $key => $val) {
+
+ // is there a default value?
+ if ($val['default']) {
+ $tmp = $this->conf['format_paramd'];
+ } else {
+ $tmp = $this->conf['format_param'];
+ }
+
+ // add the param elements
+ $tmp = str_replace('%type', htmlspecialchars($val['type']), $tmp);
+ $tmp = str_replace('%descr', htmlspecialchars($val['descr']), $tmp);
+ $tmp = str_replace('%default', htmlspecialchars($val['default']), $tmp);
+ $list[] = $tmp;
+ }
+
+ // insert params into output
+ $tmp = implode($this->conf['list_sep'], $list);
+ $output = str_replace('%params', $tmp, $output);
+
+ // build the set of throws
+ $list = array();
+ foreach ($throws as $key => $val) {
+ $tmp = $this->conf['format_throws'];
+ $tmp = str_replace('%type', htmlspecialchars($val['type']), $tmp);
+ $tmp = str_replace('%descr', htmlspecialchars($val['descr']), $tmp);
+ $list[] = $tmp;
+ }
+
+ // insert throws into output
+ $tmp = implode($this->conf['list_sep'], $list);
+ $output = str_replace('%throws', $tmp, $output);
+
+ // close the div and return the output
+ $output .= '</div>';
+ return "\n$output\n\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Heading extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_h1' => null,
+ 'css_h2' => null,
+ 'css_h3' => null,
+ 'css_h4' => null,
+ 'css_h5' => null,
+ 'css_h6' => null
+ );
+
+ function token($options)
+ {
+ // get nice variable names (id, type, level)
+ extract($options);
+
+ if ($type == 'start') {
+ $css = $this->formatConf(' class="%s"', "css_h$level");
+ return "<h$level$css id=\"$id\">";
+ }
+
+ if ($type == 'end') {
+ return "</h$level>\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Horiz extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<hr$css />\n";
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Html extends Text_Wiki_Render {
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Xhtml_Image extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'base' => '/',
+ 'url_base' => null,
+ 'css' => null,
+ 'css_link' => null
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // note the image source
+ $src = $options['src'];
+
+ // is the source a local file or URL?
+ if (strpos($src, '://') === false) {
+ // the source refers to a local file.
+ // add the URL base to it.
+ $src = $this->getConf('base', '/') . $src;
+ }
+
+ // stephane@metacites.net
+ // is the image clickable?
+ if (isset($options['attr']['link'])) {
+ // yes, the image is clickable.
+ // are we linked to a URL or a wiki page?
+ if (strpos($options['attr']['link'], '://')) {
+ // it's a URL, prefix the URL base
+ $href = $this->getConf('url_base') . $options['attr']['link'];
+ } else {
+ // it's a WikiPage; assume it exists.
+ /** @todo This needs to honor sprintf wikilinks (pmjones) */
+ /** @todo This needs to honor interwiki (pmjones) */
+ /** @todo This needs to honor freelinks (pmjones) */
+ $href = $this->wiki->getRenderConf('xhtml', 'wikilink', 'view_url') .
+ $options['attr']['link'];
+ }
+ } else {
+ // image is not clickable.
+ $href = null;
+ }
+ // unset so it won't show up as an attribute
+ unset($options['attr']['link']);
+
+ // stephane@metacites.net -- 25/07/2004
+ // we make up an align="center" value for the <img> tag.
+ if (isset($options['attr']['align']) &&
+ $options['attr']['align'] == 'center') {
+
+ // unset so it won't show up as an attribute
+ unset($options['attr']['align']);
+
+ // make sure we have a style attribute
+ if (! isset($options['attr']['style'])) {
+ // no style, set up a blank one
+ $options['attr']['style'] = '';
+ } else {
+ // style exists, add a space
+ $options['attr']['style'] .= ' ';
+ }
+
+ // add a "center" style to the existing style.
+ $options['attr']['style'] .=
+ 'display: block; margin-left: auto; margin-right: auto;';
+ }
+
+ // stephane@metacites.net -- 25/07/2004
+ // try to guess width and height
+ if (! isset($options['attr']['width']) &&
+ ! isset($options['attr']['height'])) {
+
+ // does the source refer to a local file or a URL?
+ if (strpos($src,'://')) {
+ // is a URL link
+ $imageFile = $src;
+ } elseif ($src[0] == '.') {
+ // reg at dav-muz dot net -- 2005-03-07
+ // is a local file on relative path.
+ $imageFile = $src; # ...don't do anything because it's perfect!
+ } else {
+ // is a local file on absolute path.
+ $imageFile = $_SERVER['DOCUMENT_ROOT'] . $src;
+ }
+
+ // attempt to get the image size
+ $imageSize = @getimagesize($imageFile);
+
+ if (is_array($imageSize)) {
+ $options['attr']['width'] = $imageSize[0];
+ $options['attr']['height'] = $imageSize[1];
+ }
+
+ }
+
+ // start the HTML output
+ $output = '<img src="' . htmlspecialchars($src) . '"';
+
+ // get the CSS class but don't add it yet
+ $css = $this->formatConf(' class="%s"', 'css');
+
+ // add the attributes to the output, and be sure to
+ // track whether or not we find an "alt" attribute
+ $alt = false;
+ foreach ($options['attr'] as $key => $val) {
+
+ // track the 'alt' attribute
+ if (strtolower($key) == 'alt') {
+ $alt = true;
+ }
+
+ // the 'class' attribute overrides the CSS class conf
+ if (strtolower($key) == 'class') {
+ $css = null;
+ }
+
+ $key = htmlspecialchars($key);
+ $val = htmlspecialchars($val);
+ $output .= " $key=\"$val\"";
+ }
+
+ // always add an "alt" attribute per Stephane Solliec
+ if (! $alt) {
+ $alt = htmlspecialchars(basename($options['src']));
+ $output .= " alt=\"$alt\"";
+ }
+
+ // end the image tag with the automatic CSS class (if any)
+ $output .= "$css />";
+
+ // was the image clickable?
+ if ($href) {
+ // yes, add the href and return
+ $href = htmlspecialchars($href);
+ $css = $this->formatConf(' class="%s"', 'css_link');
+ $output = "<a$css href=\"$href\">$output</a>";
+ }
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Xhtml_Include extends Text_Wiki_Render {
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'sites' => array(
+ 'MeatBall' => 'http://www.usemod.com/cgi-bin/mb.pl?%s',
+ 'Advogato' => 'http://advogato.org/%s',
+ 'Wiki' => 'http://c2.com/cgi/wiki?%s'
+ ),
+ 'target' => '_blank',
+ 'css' => null
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $site = $options['site'];
+ $page = $options['page'];
+ $text = $options['text'];
+ $css = $this->formatConf(' class="%s"', 'css');
+
+ if (isset($this->conf['sites'][$site])) {
+ $href = $this->conf['sites'][$site];
+ } else {
+ return $text;
+ }
+
+ // old form where page is at end,
+ // or new form with %s placeholder for sprintf()?
+ if (strpos($href, '%s') === false) {
+ // use the old form
+ $href = $href . $page;
+ } else {
+ // use the new form
+ $href = sprintf($href, $page);
+ }
+
+ // allow for alternative targets
+ $target = $this->getConf('target');
+
+ // build base link
+ $text = htmlspecialchars($text);
+ $output = "<a$css href=\"$href\"";
+
+ // are we targeting a specific window?
+ if ($target) {
+ // this is XHTML compliant, suggested by Aaron Kalin.
+ // code tip is actually from youngpup.net, and it
+ // uses the $target as the new window name.
+ $target = htmlspecialchars($target);
+ $output .= " onClick=\"window.open(this.href, '$target');";
+ $output .= " return false;\"";
+ }
+
+ $output .= ">$text</a>";
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Italic extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<i$css>";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</i>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+
+class Text_Wiki_Render_Xhtml_List extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_ol' => null,
+ 'css_ol_li' => null,
+ 'css_ul' => null,
+ 'css_ul_li' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * This rendering method is syntactically and semantically compliant
+ * with XHTML 1.1 in that sub-lists are part of the previous list item.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variables (type, level, count)
+ extract($options);
+
+ // set up indenting so that the results look nice; we do this
+ // in two steps to avoid str_pad mathematics. ;-)
+ $pad = str_pad('', $level, "\t");
+ $pad = str_replace("\t", ' ', $pad);
+
+ switch ($type) {
+
+ case 'bullet_list_start':
+
+ // build the base HTML
+ $css = $this->formatConf(' class="%s"', 'css_ul');
+ $html = "<ul$css>";
+
+ // if this is the opening block for the list,
+ // put an extra newline in front of it so the
+ // output looks nice.
+ if ($level == 0) {
+ $html = "\n$html";
+ }
+
+ // done!
+ return $html;
+ break;
+
+ case 'bullet_list_end':
+
+ // build the base HTML
+ $html = "</li>\n$pad</ul>";
+
+ // if this is the closing block for the list,
+ // put extra newlines after it so the output
+ // looks nice.
+ if ($level == 0) {
+ $html .= "\n\n";
+ }
+
+ // done!
+ return $html;
+ break;
+
+ case 'number_list_start':
+
+ // build the base HTML
+ $css = $this->formatConf(' class="%s"', 'css_ol');
+ $html = "<ol$css>";
+
+ // if this is the opening block for the list,
+ // put an extra newline in front of it so the
+ // output looks nice.
+ if ($level == 0) {
+ $html = "\n$html";
+ }
+
+ // done!
+ return $html;
+ break;
+
+ case 'number_list_end':
+
+ // build the base HTML
+ $html = "</li>\n$pad</ol>";
+
+ // if this is the closing block for the list,
+ // put extra newlines after it so the output
+ // looks nice.
+ if ($level == 0) {
+ $html .= "\n\n";
+ }
+
+ // done!
+ return $html;
+ break;
+
+ case 'bullet_item_start':
+ case 'number_item_start':
+
+ // pick the proper CSS class
+ if ($type == 'bullet_item_start') {
+ $css = $this->formatConf(' class="%s"', 'css_ul_li');
+ } else {
+ $css = $this->formatConf(' class="%s"', 'css_ol_li');
+ }
+
+ // build the base HTML
+ $html = "\n$pad<li$css>";
+
+ // for the very first item in the list, do nothing.
+ // but for additional items, be sure to close the
+ // previous item.
+ if ($count > 0) {
+ $html = "</li>$html";
+ }
+
+ // done!
+ return $html;
+ break;
+
+ case 'bullet_item_end':
+ case 'number_item_end':
+ default:
+ // ignore item endings and all other types.
+ // item endings are taken care of by the other types
+ // depending on their place in the list.
+ return '';
+ break;
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Newline extends Text_Wiki_Render {
+
+
+ function token($options)
+ {
+ return "<br />\n";
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Paragraph extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ extract($options); //type
+
+ if ($type == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<p$css>";
+ }
+
+ if ($type == 'end') {
+ return "</p>\n\n";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+// $Id: Phplookup.php,v 1.7 2004/09/25 19:05:14 pmjones Exp $
+
+class Text_Wiki_Render_Xhtml_Phplookup extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'target' => '_blank',
+ 'css' => null
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ $text = trim($options['text']);
+ $css = $this->formatConf(' class="%s"', 'css');
+
+ // start the html
+ $output = "<a$css";
+
+ // are we targeting another window?
+ $target = $this->getConf('target', '');
+ if ($target) {
+ // use a "popup" window. this is XHTML compliant, suggested by
+ // Aaron Kalin. uses the $target as the new window name.
+ $target = htmlspecialchars($target);
+ $output .= " onclick=\"window.open(this.href, '$target');";
+ $output .= " return false;\"";
+ }
+
+ // take off the final parens for functions
+ if (substr($text, -2) == '()') {
+ $q = substr($text, 0, -2);
+ } else {
+ $q = $text;
+ }
+
+ $q = htmlspecialchars($q);
+ $text = htmlspecialchars($text);
+
+ // finish and return
+ $output .= " href=\"http://php.net/$q\">$text</a>";
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Paul M. Jones <pmjones@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: Prefilter.php,v 1.6 2005/02/22 19:12:58 pmjones Exp $
+
+
+/**
+*
+* This class implements a Text_Wiki_Render_Xhtml to "pre-filter" source text so
+* that line endings are consistently \n, lines ending in a backslash \
+* are concatenated with the next line, and tabs are converted to spaces.
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @package Text_Wiki
+*
+*/
+
+class Text_Wiki_Render_Xhtml_Prefilter extends Text_Wiki_Render {
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Raw extends Text_Wiki_Render {
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ return $options['text'];
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Revise extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_ins' => null,
+ 'css_del' => null
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'del_start') {
+ $css = $this->formatConf(' class="%s"', 'css_del');
+ return "<del$css>";
+ }
+
+ if ($options['type'] == 'del_end') {
+ return "</del>";
+ }
+
+ if ($options['type'] == 'ins_start') {
+ $css = $this->formatConf(' class="%s"', 'css_ins');
+ return "<ins$css>";
+ }
+
+ if ($options['type'] == 'ins_end') {
+ return "</ins>";
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Strong extends Text_Wiki_Render {
+
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<strong$css>";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</strong>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Superscript extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<sup$css>";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</sup>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Table extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_table' => null,
+ 'css_tr' => null,
+ 'css_th' => null,
+ 'css_td' => null
+ );
+
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variable names (type, attr, span)
+ extract($options);
+
+ $pad = ' ';
+
+ switch ($type) {
+
+ case 'table_start':
+ $css = $this->formatConf(' class="%s"', 'css_table');
+ return "\n\n<table$css>\n";
+ break;
+
+ case 'table_end':
+ return "</table>\n\n";
+ break;
+
+ case 'row_start':
+ $css = $this->formatConf(' class="%s"', 'css_tr');
+ return "$pad<tr$css>\n";
+ break;
+
+ case 'row_end':
+ return "$pad</tr>\n";
+ break;
+
+ case 'cell_start':
+
+ // base html
+ $html = $pad . $pad;
+
+ // is this a TH or TD cell?
+ if ($attr == 'header') {
+ // start a header cell
+ $css = $this->formatConf(' class="%s"', 'css_th');
+ $html .= "<th$css";
+ } else {
+ // start a normal cell
+ $css = $this->formatConf(' class="%s"', 'css_td');
+ $html .= "<td$css";
+ }
+
+ // add the column span
+ if ($span > 1) {
+ $html .= " colspan=\"$span\"";
+ }
+
+ // add alignment
+ if ($attr != 'header' && $attr != '') {
+ $html .= " style=\"text-align: $attr;\"";
+ }
+
+ // done!
+ $html .= '>';
+ return $html;
+ break;
+
+ case 'cell_end':
+ if ($attr == 'header') {
+ return "</th>\n";
+ } else {
+ return "</td>\n";
+ }
+ break;
+
+ default:
+ return '';
+
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+class Text_Wiki_Render_Xhtml_Tighten extends Text_Wiki_Render {
+
+
+ function token()
+ {
+ return '';
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+// $Id: Toc.php,v 1.7 2004/09/25 19:05:14 pmjones Exp $
+
+class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css_list' => null,
+ 'css_item' => null,
+ 'title' => '<strong>Table of Contents</strong>',
+ 'div_id' => 'toc'
+ );
+
+ var $min = 2;
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // type, id, level, count, attr
+ extract($options);
+
+ switch ($type) {
+
+ case 'list_start':
+
+ $html = '<div';
+
+ $css = $this->getConf('css_list');
+ if ($css) {
+ $html .= " class=\"$css\"";
+ }
+
+ $div_id = $this->getConf('div_id');
+ if ($div_id) {
+ $html .= " id=\"$div_id\"";
+ }
+
+ $html .= '>';
+ $html .= $this->getConf('title');
+ return $html;
+ break;
+
+ case 'list_end':
+ return "</div>\n";
+ break;
+
+ case 'item_start':
+ $html = '<div';
+
+ $css = $this->getConf('css_item');
+ if ($css) {
+ $html .= " class=\"$css\"";
+ }
+
+ $pad = ($level - $this->min);
+ $html .= " style=\"margin-left: {$pad}em;\">";
+
+ $html .= "<a href=\"#$id\">";
+ return $html;
+ break;
+
+ case 'item_end':
+ return "</a></div>\n";
+ break;
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_tt extends Text_Wiki_Render {
+
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->formatConf(' class="%s"', 'css');
+ return "<tt$css>";
+ }
+
+ if ($options['type'] == 'end') {
+ return '</tt>';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+
+class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render {
+
+
+ var $conf = array(
+ 'target' => '_blank',
+ 'images' => true,
+ 'img_ext' => array('jpg', 'jpeg', 'gif', 'png'),
+ 'css_inline' => null,
+ 'css_footnote' => null,
+ 'css_descr' => null,
+ 'css_img' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // create local variables from the options array (text,
+ // href, type)
+ extract($options);
+
+ // find the rightmost dot and determine the filename
+ // extension.
+ $pos = strrpos($href, '.');
+ $ext = strtolower(substr($href, $pos + 1));
+ $href = htmlspecialchars($href);
+
+ // does the filename extension indicate an image file?
+ if ($this->getConf('images') &&
+ in_array($ext, $this->getConf('img_ext', array()))) {
+
+ // create alt text for the image
+ if (! isset($text) || $text == '') {
+ $text = basename($href);
+ $text = htmlspecialchars($text);
+ }
+
+ // generate an image tag
+ $css = $this->formatConf(' class="%s"', 'css_img');
+ $output = "<img$css src=\"$href\" alt=\"$text\" />";
+
+ } else {
+
+ // should we build a target clause?
+ if ($href{0} == '#' ||
+ strtolower(substr($href, 0, 7)) == 'mailto:') {
+ // targets not allowed for on-page anchors
+ // and mailto: links.
+ $target = '';
+ } else {
+ // allow targets on non-anchor non-mailto links
+ $target = $this->getConf('target');
+ }
+
+ // generate a regular link (not an image)
+ $text = htmlspecialchars($text);
+ $css = $this->formatConf(' class="%s"', "css_$type");
+ $output = "<a$css href=\"$href\"";
+
+ if ($target) {
+ // use a "popup" window. this is XHTML compliant, suggested by
+ // Aaron Kalin. uses the $target as the new window name.
+ $target = htmlspecialchars($target);
+ $output .= " onclick=\"window.open(this.href, '$target');";
+ $output .= " return false;\"";
+ }
+
+ // finish up output
+ $output .= ">$text</a>";
+
+ // make numbered references look like footnotes when no
+ // CSS class specified, make them superscript by default
+ if ($type == 'footnote' && ! $css) {
+ $output = '<sup>' . $output . '</sup>';
+ }
+ }
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'pages' => array(), // set to null or false to turn off page checks
+ 'view_url' => 'http://example.com/index.php?page=%s',
+ 'new_url' => 'http://example.com/new.php?page=%s',
+ 'new_text' => '?',
+ 'new_text_pos' => 'after', // 'before', 'after', or null/false
+ 'css' => null,
+ 'css_new' => null,
+ 'exists_callback' => null // call_user_func() callback
+ );
+
+
+ /**
+ *
+ * Renders a token into XHTML.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ // make nice variable names (page, anchor, text)
+ extract($options);
+
+ // is there a "page existence" callback?
+ // we need to access it directly instead of through
+ // getConf() because we'll need a reference (for
+ // object instance method callbacks).
+ if (isset($this->conf['exists_callback'])) {
+ $callback =& $this->conf['exists_callback'];
+ } else {
+ $callback = false;
+ }
+
+ if ($callback) {
+ // use the callback function
+ $exists = call_user_func($callback, $page);
+ } else {
+ // no callback, go to the naive page array.
+ $list =& $this->getConf('pages');
+ if (is_array($list)) {
+ // yes, check against the page list
+ $exists = in_array($page, $list);
+ } else {
+ // no, assume it exists
+ $exists = true;
+ }
+ }
+
+ // convert *after* checking against page names so as not to mess
+ // up what the user typed and what we're checking.
+ $page = htmlspecialchars($page);
+ $anchor = htmlspecialchars($anchor);
+ $text = htmlspecialchars($text);
+
+ // does the page exist?
+ if ($exists) {
+
+ // PAGE EXISTS.
+
+ // link to the page view, but we have to build
+ // the HREF. we support both the old form where
+ // the page always comes at the end, and the new
+ // form that uses %s for sprintf()
+ $href = $this->getConf('view_url');
+
+ if (strpos($href, '%s') === false) {
+ // use the old form (page-at-end)
+ $href = $href . $page . $anchor;
+ } else {
+ // use the new form (sprintf format string)
+ $href = sprintf($href, $page . $anchor);
+ }
+
+ // get the CSS class and generate output
+ $css = $this->formatConf(' class="%s"', 'css');
+ $output = "<a$css href=\"$href\">$text</a>";
+
+ } else {
+
+ // PAGE DOES NOT EXIST.
+
+ // link to a create-page url, but only if new_url is set
+ $href = $this->getConf('new_url', null);
+
+ // set the proper HREF
+ if (! $href || trim($href) == '') {
+
+ // no useful href, return the text as it is
+ $output = $text;
+
+ } else {
+
+ // yes, link to the new-page href, but we have to build
+ // it. we support both the old form where
+ // the page always comes at the end, and the new
+ // form that uses sprintf()
+ if (strpos($href, '%s') === false) {
+ // use the old form
+ $href = $href . $page;
+ } else {
+ // use the new form
+ $href = sprintf($href, $page);
+ }
+ }
+
+ // get the appropriate CSS class and new-link text
+ $css = $this->formatConf(' class="%s"', 'css_new');
+ $new = $this->getConf('new_text');
+
+ // what kind of linking are we doing?
+ $pos = $this->getConf('new_text_pos');
+ if (! $pos || ! $new) {
+ // no position (or no new_text), use css only on the page name
+ $output = "<a$css href=\"$href\">$page</a>";
+ } elseif ($pos == 'before') {
+ // use the new_text BEFORE the page name
+ $output = "<a$css href=\"$href\">$new</a>$text";
+ } else {
+ // default, use the new_text link AFTER the page name
+ $output = "$text<a$css href=\"$href\">$new</a>";
+ }
+ }
+ return $output;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+require_once 'diogenes.compose.inc.php';
+require_once 'Barrel/Page.php';
+require_once 'Barrel/File.php';
+
+if (!isset($_REQUEST['dir']) && !isset($_REQUEST['file']))
+ exit;
+
+// retrieve directory & file info
+$dir = $_REQUEST["dir"];
+$file = $_REQUEST["file"];
+$page = new DiogenesAdmin($dir);
+
+$bbarrel = $page->barrel;
+$bpage = Diogenes_Barrel_Page::fromDb($bbarrel, $dir);
+$bfile = new Diogenes_Barrel_File($bpage, $file);
+
+// rcs handle
+$rcs = $page->getRcs();
+
+// file location & url
+$mydir = $bbarrel->spool->spoolPath($dir);
+$myfile = $bbarrel->spool->spoolPath($dir,$file);
+
+// process requested action
+$action = isset($_REQUEST["action"]) ? $_REQUEST["action"] : "";
+switch ($action)
+{
+case "update":
+ // update the current file with form contents
+ if (isset($_REQUEST['file_content'])) {
+ $page->info(__("Commiting changes to file") . " $file");
+ $content = trim(stripslashes($_REQUEST['file_content']));
+ $content = str_replace("\n ","\n",$content);
+ $content = phpUnprotect(htmltoXhtml($content));
+ $message = empty($_REQUEST['message']) ? "updated using HTML composer" : stripslashes($_REQUEST['message']);
+ $rcs->commit($dir,$file,$content,$message);
+ }
+
+ break;
+}
+
+$rev = array_shift($tmparr = $rcs->logParse($dir,$file));
+
+// protect PHP code and XHTML tags
+$rawdoc = file_get_contents($myfile);
+$protdoc = xhtmlToHtml(phpProtect($rawdoc));
+
+// smarty assignments
+$page->assign('post',$page->script_self());
+$page->assign('dir',$dir);
+$page->assign('dirloc',$page->urlBarrel($bbarrel->alias,$bbarrel->vhost,$bpage->getLocation()));
+
+$page->assign('file',$file);
+$page->assign('file_content',chunk_split(base64_encode($protdoc)));
+$page->assign('msg_log',__("log message"));
+
+// build toolbars
+$page->toolbar(__("Page"), $bpage->make_toolbar());
+$page->toolbar(__("File"), $bfile->make_toolbar(true));
+
+$auxpage = new DiogenesBarrel("/".$bbarrel->alias."/". $bpage->getLocation());
+
+switch ($globals->html_editor) {
+case "ekit":
+ $page->assign('greeting', "Ekit - ". $bpage->getLocation($file)." - {$rev['rev']}");
+ $page->assign('cssfiles', array_pop($auxpage->sheets));
+ $page->display('admin-ekit.tpl');
+ break;
+case "kafenio": default:
+ $page->assign('greeting', "Kafenio - ". $bpage->getLocation($file)." - {$rev['rev']}");
+ $page->assign('cssfiles', implode(",", $auxpage->sheets));
+ $page->display('admin-kafenio.tpl');
+ break;
+}
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+require_once 'Barrel/Page.php';
+require_once 'Barrel/File.php';
+
+if (empty($_REQUEST['dir']) && empty($_REQUEST['file']))
+ exit;
+
+// retrieve directory & file info
+$dir = $_REQUEST["dir"];
+$file = $_REQUEST["file"];
+$page = new DiogenesAdmin($dir);
+
+$bbarrel = $page->barrel;
+$bpage = Diogenes_Barrel_Page::fromDb($bbarrel, $dir);
+$bfile = new Diogenes_Barrel_File($bpage, $file);
+
+// rcs handle
+$rcs = $page->getRcs();
+
+// file location & url
+$mydir = $bbarrel->spool->spoolPath($dir);
+$myfile = $bbarrel->spool->spoolPath($dir,$file);
+
+// process requested action
+$action = isset($_REQUEST["action"]) ? $_REQUEST["action"] : "";
+switch($action)
+{
+case "update":
+ // update the current file with form contents
+ if (isset($_REQUEST['file_content'])) {
+ $page->info(__("Commiting changes to file") . " $file");
+ $message = empty($_REQUEST['message']) ? "updated using editor" : stripslashes($_REQUEST['message']);
+ $rcs->commit($dir,$file,stripslashes($_REQUEST['file_content']),$message);
+ }
+
+ break;
+}
+
+$rev = array_shift($tmparr = $rcs->logParse($dir,$file));
+
+$page->assign('greeting', __("File editor")." - ". $bpage->getLocation($file). " - {$rev['rev']}");
+$page->assign('post',$page->script_self());
+$page->assign('dir',$dir);
+$page->assign('file',$file);
+$page->assign('source',__("File source"));
+$page->assign('msg_log',__("log message"));
+$page->assign('file_content',htmlspecialchars(file_get_contents($myfile), ENT_NOQUOTES));
+$page->assign('submit',__("Submit"));
+
+// top toolbar
+$page->toolbar(__("Page"), $bpage->make_toolbar());
+$page->toolbar(__("File"), $bfile->make_toolbar(true));
+$page->display('admin-edit.tpl');
+?>
--- /dev/null
+<?php
+if (empty($_REQUEST['dir']))
+ exit;
+
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+require_once 'Barrel/Page.php';
+require_once 'Barrel/File.php';
+
+$page = new DiogenesAdmin($_REQUEST['dir']);
+$bbarrel =& $page->barrel;
+
+// retrieve all the barrel's pages
+$fpages = $bbarrel->getPages();
+
+$page->assign('post',$page->script_self());
+
+// rcs handle
+$rcs = $page->getRcs();
+
+/* 5Mb limit */
+$maxsize=5000000;
+
+$action = (isset($_REQUEST["action"])) ? $_REQUEST["action"] : "";
+$target = isset($_REQUEST["target"]) ? $_REQUEST["target"] : "";
+$newname = isset($_REQUEST["newname"]) ? $_REQUEST["newname"] : "";
+$fileop_sfile = isset($_REQUEST['fileop_sfile']) ? $_REQUEST['fileop_sfile'] : '';
+$fileop_ddir = isset($_REQUEST['fileop_ddir']) ? $_REQUEST['fileop_ddir'] : '';
+
+$fpage = $fpages[$_REQUEST['dir']];
+
+// legacy
+$canedit = $_SESSION['session']->hasPerms($fpage->props['wperms']);
+$page->assign('canedit', $canedit);
+
+// translations
+$page->assign('msg_import',__("Import file"));
+$page->assign('msg_btn_fileop',__("Submit"));
+$page->assign('msg_btn_send',__("Send"));
+$page->assign('msg_create',__("Create an empty file"));
+$page->assign('msg_copy_or_move', __("Copy or move a file"));
+$page->assign('msg_btn_create',__("Create"));
+$page->assign('msg_file',__("file"));
+$page->assign('msg_log',__("log"));
+$page->assign('msg_version',__("version"));
+$page->assign('msg_date',__("date"));
+$page->assign('msg_author',__("author"));
+$page->assign('msg_size',__("size"));
+$page->assign('msg_actions',__("actions"));
+$page->assign('msg_fileop_to', __("to"));
+// for pages
+$page->assign('msg_location',__("location"));
+$page->assign('msg_title',__("title"));
+$page->assign('msg_page_template',__("page template"));
+$page->assign('msg_status',__("status"));
+$page->assign('msg_access',__("access"));
+$page->assign('msg_read_perms',__("read access"));
+$page->assign('msg_write_perms',__("write access"));
+
+// build navigation toolbar
+$page->toolbar(__("Page"), $fpage->make_toolbar());
+
+
+switch ($action) {
+case "file_create":
+ if (!$canedit) break;
+ $createfile = isset($_REQUEST['createfile']) ? $_REQUEST['createfile'] : '';
+ if ($createfile) {
+ $page->info(__("Creating empty file") . " $createfile");
+ if ($rcs->checkFile($fpage->props['PID'], $createfile)) {
+ $page->info(__("The specified file already exists!"));
+ } else {
+ $rcs->commit($fpage->props['PID'], $createfile, '', "empty file creation of $createfile");
+ }
+ }
+ break;
+
+case "file_upload":
+ if (!$canedit) break;
+ $userfile = $_FILES['userfile']['name'];
+ if ( is_uploaded_file($_FILES['userfile']['tmp_name'])
+ && (filesize($_FILES['userfile']['tmp_name']) <= $maxsize) )
+ {
+ $rcs->commit($fpage->props['PID'], $userfile,
+ file_get_contents($_FILES['userfile']['tmp_name']),
+ "file manager upload of $userfile" );
+ } else {
+ $page->info(__("Error during file transfer!"));
+ }
+ break;
+
+case "file_delete":
+ if (!$canedit) break;
+ $page->info(__("Deleting file"). " ". $fpage->getLocation($target));
+ $rcs->del($fpage->props['PID'],$target);
+ break;
+
+case "file_rename":
+ if (!$canedit) break;
+ $page->info("Renaming file '$target' to '$newname'");
+ $rcs->move($fpage->props['PID'], $target, $fpage->props['PID'], $newname);
+ break;
+
+case "page_delete":
+ Diogenes_Barrel_Page::delete($bbarrel, $target, $page);
+ $fpages = $bbarrel->getPages();
+ break;
+
+case "restore":
+ if (!$canedit) break;
+ $rev = $_REQUEST["rev"];
+ $page->info("restore : $target,$rev");
+ $path = $rcs->checkout($fpage->props['PID'],$target,$rev,System::mktemp("-d"));
+ $contents = file_get_contents($path);
+ $rcs->commit($fpage->props['PID'],$target,$contents,"restored revision $rev");
+ break;
+
+case "diff":
+ $ffile = new Diogenes_Barrel_File($fpage, $target);
+ $page->assign('greeting', __("Revision differences"). " - ". $fpage->getLocation($target));
+ $page->assign('diff',$rcs->dispDiff($fpage->props['PID'], $target, $_REQUEST["r1"],$_REQUEST["r2"]));
+ $page->toolbar(__("File"), $ffile->make_toolbar(true));
+ $page->display('admin-revs.tpl');
+ exit;
+
+case "revs":
+ $ffile = new Diogenes_Barrel_File($fpage, $target);
+ $page->assign('greeting', __("File revisions"). " - " . $fpage->getLocation($target));
+
+ // build urls
+ $urlPage = $page->urlSite($fpage->props['location']);
+ $urlFile = $page->urlSite($fpage->props['location'], $target);
+
+ // parse log entries
+ $revs = $rcs->logParse($fpage->props['PID'], $target);
+
+ // process log entries
+ $head = $revs[0]['rev'];
+ $rentries = array();
+
+ $sz = count($revs);
+ for ($i = 0; $i < $sz; $i++) {
+ $rev = $revs[$i];
+ $actions = array(array(__("view"), "$urlFile?rev={$rev['rev']}"));
+ if ($target == $globals->htmlfile) {
+ array_push($actions, array(__("view page"),"$urlPage?rev={$rev['rev']}"));
+ }
+ if ($i != ($sz-1)) {
+ array_push($actions, array(__("diff to")." {$revs[$i+1]['rev']}",
+ "?action=diff&dir={$fpage->props['PID']}&target=$target&r1={$revs[$i+1]['rev']}&r2={$rev['rev']}&author={$rev['author']}"));
+ }
+ if (($i != 0) && $canedit) {
+ array_push($actions, array(__("restore"),
+ "javascript:restore('{$rev['rev']}');"));
+ }
+ array_push($rentries, array($rev['rev'],$rev['date'],
+ $rev['author'],$rev['log'], $actions));
+ }
+
+ $page->assign('entries', $rentries);
+ $page->toolbar(__("File"), $ffile->make_toolbar(true));
+ $page->display('admin-revs.tpl');
+ exit;
+
+case "fileop":
+ $fileop_dfile = $fileop_sfile;
+ $file_action = isset($_REQUEST['file_action']) ? $_REQUEST['file_action'] : '';
+ $page->info("$file_action '$fileop_sfile' to '$fileop_ddir'");
+ switch ($file_action)
+ {
+ case "file_copy":
+ $page->info("copying '$fileop_sfile' to '$fileop_ddir'");
+ if ($rcs->checkFile($fileop_ddir, $fileop_dfile))
+ {
+ $dfext = array_pop(explode('.', $fileop_dfile));
+ $dfname = basename($fileop_dfile, '.'.$dfext);
+ $fileop_dfile = $dfname."_copy.$dfext";
+ }
+ $rcs->copy($fpage->props['PID'], $fileop_sfile, $fileop_ddir, $fileop_dfile);
+ break;
+
+ case "file_move":
+ $page->info("moving '$fileop_sfile' to '$fileop_ddir'");
+ $rcs->move($fpage->props['PID'], $fileop_sfile, $fileop_ddir, $fileop_dfile);
+ break;
+ }
+ break;
+
+}
+
+// directory listing
+$page->toolbar(__("Document"), $fpage->make_doc_toolbar($rcs));
+$pageloc = $bbarrel->getLocation($fpage->props['PID']);
+$page->assign('greeting', __("File manager"). " - " .(strlen($pageloc) ? $pageloc : __("home")));
+$page->assign('maxsize',$maxsize);
+
+// retrieve child directories
+foreach($fpages as $pkey => $pval)
+{
+ if ($pval->props['parent'] == $fpage->props['PID'])
+ {
+ $arr = $pval->props;
+ $arr['actions'] = $pval->make_actions();
+ $arr['click'] = "files?dir={$pkey}";
+ $arr['icon'] = $globals->icons->get_icon('barrel', strlen($arr['location']) ? 'directory' : 'home');
+ $arr['iperms'] = $globals->icons->get_icon('perm', $arr['perms']);
+ $arr['iwperms'] = $globals->icons->get_icon('perm', $arr['wperms']);
+ $page->append('childpages', $arr);
+ }
+}
+
+// retrieve files in directory
+$tfentries = $rcs->dispDir($fpage->props['PID'], $pageloc, $canedit);
+$fentries = array();
+foreach ($tfentries as $fentry)
+{
+ $tbfile = new Diogenes_Barrel_File($fpage, $fentry['file']);
+ $fentry['actions'] = $tbfile->make_actions($canedit);
+ array_push($fentries, $fentry);
+}
+$page->assign('childfiles', $fentries);
+
+
+$page->assign('fileops', array("file_copy" => __("Copy"), "file_move" => __("Move")));
+$fileop_ddirs = array();
+foreach($fpages as $pkey => $ppage)
+{
+ $pageloc = $bbarrel->getLocation($pkey);
+ $fileop_ddirs[$pkey] = ( strlen($pageloc) ? "<$pageloc> " : "") . $ppage->props['title'];
+}
+$page->assign('fileop_ddirs', $fileop_ddirs);
+$page->display('admin-files.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+require_once 'diogenes.icons.inc.php';
+
+$page = new DiogenesAdmin;
+$bbarrel =& $page->barrel;
+$homepage = $bbarrel->getPID('');
+
+// filename transformations
+function makeFileLoc($log_file) {
+ global $homepage, $bbarrel;
+
+ if (stristr($log_file, '/') == FALSE ) {
+ // this is a directory
+ $mydir = $log_file;
+ $myfile = '';
+ } else {
+ $myfile = basename($log_file);
+ $mydir = dirname($log_file);
+ }
+
+ $myloc = $bbarrel->getLocation($mydir);
+ if ($myloc or ($mydir == $homepage))
+ {
+ $log_file = $myloc ? "$myloc/$myfile" : $myfile;
+ }
+
+ return array($log_file, $mydir, $myfile);
+}
+
+
+// retrieve recent events
+$res = $globals->db->query("select e.action,e.stamp,e.data,a.text,s.auth,s.uid "
+ ."from {$globals->table_log_events} as e "
+ ."left join {$globals->table_log_actions} as a on e.action=a.id "
+ ."left join {$globals->table_log_sessions} as s on e.session=s.id "
+ ."where e.data like '{$bbarrel->alias}:%' "
+ ."order by stamp desc limit 0,10");
+while ($myarr = mysql_fetch_array($res)) {
+ $myarr['username'] = call_user_func(array($globals->session,'getUsername'),$myarr['auth'],$myarr['uid']);
+ list($op_alias, $op_file) = split(":",$myarr['data']);
+
+ switch($myarr['text']) {
+ case "barrel_create":
+ $myarr['icon'] = $globals->icons->get_action_icon('add');
+ $myarr['desc'] = __("site created");
+ break;
+
+ case "barrel_options":
+ $myarr['icon'] = $globals->icons->get_action_icon('properties');
+ $myarr['desc'] = array(__("barrel options"), "options");
+ break;
+
+ case "barrel_plugins":
+ $myarr['icon'] = $globals->icons->get_action_icon('plugins');
+ $myarr['desc'] = array(__("barrel plugins"), "plugins");
+ break;
+
+ case "page_create":
+ $myarr['icon'] = $globals->icons->get_action_icon('add');
+ list($op_file, $mydir, $myfile) = makeFileLoc($op_file);
+ $myarr['desc'] = array(__("page created"), "pages?dir=$mydir");
+ break;
+
+ case "page_delete":
+ $myarr['icon'] = $globals->icons->get_action_icon('remove');
+ $myarr['desc'] = __("page removed");
+ break;
+
+ case "page_props":
+ $myarr['icon'] = $globals->icons->get_action_icon('properties');
+ list($op_file, $mydir, $myfile) = makeFileLoc($op_file);
+ $myarr['desc'] = array(__("page properties"), "pages?dir=$mydir");
+ break;
+
+ case "page_plugins":
+ $myarr['icon'] = $globals->icons->get_action_icon('plugins');
+ list($op_file, $mydir, $myfile) = makeFileLoc($op_file);
+ $myarr['desc'] = array(__("page plugins"), "plugins?plug_page=$mydir");
+ break;
+
+ case "rcs_commit":
+ $myarr['icon'] = $globals->icons->get_action_icon('update');
+ list($op_file, $mydir, $myfile) = makeFileLoc($op_file);
+ $myarr['desc'] = array(__("file updated"), "files?action=revs&dir=$mydir&target=$myfile");
+ break;
+
+ case "rcs_delete":
+ $myarr['icon'] = $globals->icons->get_action_icon('delete');
+ list($op_file, $mydir, $myfile) = makeFileLoc($op_file);
+ $myarr['desc'] = __("file deleted");
+ break;
+
+ }
+
+ $myarr['file'] = $op_file;
+
+ if (isset($myarr['desc']))
+ $page->append('events',$myarr);
+}
+mysql_free_result($res);
+
+// do display
+$page->assign('greeting',__("Welcome to the Diogenes backoffice"));
+$page->assign('msg_date',__("date"));
+$page->assign('msg_user',__("user"));
+$page->assign('msg_event',__("event"));
+$page->display('admin-index.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+
+$page = new DiogenesAdmin;
+$bbarrel =& $page->barrel;
+
+// the id of the parent menu
+$MIDpere = isset($_REQUEST['MIDpere']) ? $_REQUEST['MIDpere'] : 0;
+
+/**
+ * This function swaps entries $a and $b within $parent.
+ */
+function swapentries($parent,$a,$b,$table_menu)
+{
+ global $globals;
+ $res = $globals->db->query("SELECT MID from $table_menu where MIDpere=$parent and (ordre=$a or ordre=$b) ORDER BY ordre");
+ /* make sure that $a <= $b */
+ if ($a > $b)
+ {
+ $c = $a;
+ $a = $b;
+ $b = $c;
+ }
+ /* perform swap */
+ list($MIDa) = mysql_fetch_row($res);
+ list($MIDb) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ $globals->db->query("UPDATE $table_menu SET ordre=$b WHERE MID=$MIDa");
+ $globals->db->query("UPDATE $table_menu SET ordre=$a WHERE MID=$MIDb");
+}
+
+
+//// start constructing the page
+
+$page->assign('greeting',__("The site's menus"));
+$action = isset($_REQUEST['action']) ? $_REQUEST["action"] : "";
+switch ($action) {
+
+/* we want to erase the current entry */
+case "supprimer":
+ $MID = $_REQUEST['MID'];
+ if (mysql_num_rows($globals->db->query("SELECT MID FROM {$bbarrel->table_menu} WHERE MIDpere=$MID")) > 0) {
+ $page->info(__("The selected menu has child items, please remove them first."));
+ break;
+ }
+
+ /* erase the current entry */
+ $globals->db->query("DELETE FROM {$bbarrel->table_menu} WHERE MID=$MID");
+
+ /* renumber the other menu entries so that they are between 1 and the number of entries */
+ $res = $globals->db->query("SELECT MID FROM {$bbarrel->table_menu} WHERE MIDpere=$MIDpere ORDER BY ordre");
+ $i = 0;
+ while (list($MIDtoorder) = mysql_fetch_array($res)) {
+ $i++;
+ $globals->db->query("UPDATE {$bbarrel->table_menu} SET ordre=$i WHERE MID=$MIDtoorder");
+ }
+ mysql_free_result($res);
+ break;
+
+/* bring an entry up in the menu */
+case "remonter":
+ $ordre = $_REQUEST['ordre'];
+ swapentries($MIDpere,$ordre-1,$ordre,$bbarrel->table_menu);
+ break;
+
+/* push an entry down in the menu */
+case "descendre":
+ $ordre = $_REQUEST['ordre'];
+ swapentries($MIDpere,$ordre,$ordre+1,$bbarrel->table_menu);
+ break;
+
+/* create or update a menu entry */
+case "modifier":
+ $typelink = $_REQUEST['typelink'];
+ switch ($typelink) {
+ case "boutonPI" :
+ $pid = isset($_REQUEST['PIvaleur']) ? $_REQUEST['PIvaleur'] : 0;
+ $link = "";
+ break;
+ case "boutonSE" :
+ $pid = 0;
+ $link = $_REQUEST['SEvaleur'];
+ break;
+ default:
+ $pid = 0;
+ $link = "";
+ }
+ $MID = $_REQUEST['MID'];
+ $title = $_REQUEST['title'];
+ if ($MID == 0) {
+ $res=$globals->db->query("SELECT MAX(ordre) from {$bbarrel->table_menu} where MIDpere=$MIDpere");
+ list($ordre) = mysql_fetch_row($res);
+ $ordre++;
+ $globals->db->query("INSERT INTO {$bbarrel->table_menu} SET MIDpere='$MIDpere',ordre='$ordre',title='$title',link='$link',pid='$pid'");
+ $MID = mysql_insert_id();
+ } else {
+ $globals->db->query("UPDATE {$bbarrel->table_menu} SET title='$title',link='$link',pid='$pid' WHERE MID=$MID");
+ }
+
+ break;
+
+/* display the form to edit an entry */
+case "editer":
+ // initialisation
+ $link = "";
+ $title = "";
+ $pid = 0;
+ $MID = isset($_REQUEST['MID']) ? $_REQUEST['MID'] : 0;
+
+ // if this is an existing entry, retrieve data
+ if ($MID) {
+ $res = $globals->db->query("SELECT link,title,pid FROM {$bbarrel->table_menu} WHERE MID=$MID");
+ list($link, $title, $pid) = mysql_fetch_row($res);
+ mysql_free_result($res);
+ }
+
+ // fill out form data
+ $chk_pi = ($pid > 0);
+ $chk_se = ($link != "");
+ $chk_z = !$chk_pi && !$chk_se;
+ $chk = " checked=\"checked\"";
+
+ $page->assign('post',$page->script_self());
+ $page->assign('MID', $MID);
+ $page->assign('MIDpere',$_REQUEST['MIDpere']);
+ $page->assign('title',stripslashes($title));
+ $page->assign('chk_z',($chk_z ? $chk : ""));
+ $page->assign('chk_pi',($chk_pi ? $chk : ""));
+ $page->assign('chk_se',($chk_se ? $chk : ""));
+ $page->assign('SEvaleur', $link ? $link : "http://");
+ $page->assign('page_sel',$pid);
+
+ // retrieve all the barrel's pages
+ $fpages = $bbarrel->getPages();
+ $page_opts = array();
+ foreach($fpages as $pkey => $ppage)
+ {
+ $pageloc = $bbarrel->getLocation($pkey);
+ $page_opts[$pkey] = ( strlen($pageloc) ? "<$pageloc> " : "") . $ppage->props['title'];
+ }
+ $page->assign('page_opts', $page_opts);
+
+ $res = $globals->db->query("SELECT PID,title from {$bbarrel->table_page} ORDER BY title");
+ while (list($myPID,$myTITLE) = mysql_fetch_row($res)) {
+ //$pageloc = $bbarrel->getLocation($pkey);
+ //$page_opts[$pkey] = ( strlen($pageloc) ? "<$pageloc> " : "") . $ppage->props['title'];
+ $page->append('page_values',$myPID);
+ $page->append('page_names',stripslashes($myTITLE));
+ }
+ mysql_free_result($res);
+
+ $page->assign('doedit',1);
+
+ // translations
+ $page->assign('msg_prop',__("menu entry properties"));
+ $page->assign('msg_title',__("entry title"));
+ $page->assign('msg_type',__("type of link"));
+ $page->assign('msg_type_z',__("none"));
+ $page->assign('msg_type_pi',__("internal link"));
+ $page->assign('msg_type_se',__("external link"));
+
+ $page->assign('submit',__("Submit"));
+ $page->display('admin-menus.tpl');
+ exit;
+ break;
+}
+
+// get the maximum order
+$res=$globals->db->query("SELECT MAX(ordre) from {$bbarrel->table_menu} where MIDpere=$MIDpere");
+list($maxOrdre)=mysql_fetch_row($res);
+mysql_free_result($res);
+
+// retrieve the entries
+$res = $globals->db->query("SELECT m.MID,m.ordre,m.title,m.link,m.PID,p.title ".
+ "from {$bbarrel->table_menu} as m ".
+ "left join {$bbarrel->table_page} as p on m.PID=p.PID ".
+ "where MIDpere=$MIDpere order by ordre");
+while (list($MID,$ordre,$title,$link,$PID,$ptitle) = mysql_fetch_row($res)) {
+ $clickup="?action=remonter&MIDpere=$MIDpere&ordre=$ordre";
+ $clickdown="?action=descendre&MIDpere=$MIDpere&ordre=$ordre";
+
+ // do we offer an "up" link ?
+ $up = ($ordre != 1) ? array(__("move up"),$clickup) : _("move up");
+
+ // do we offer a "down" link ?
+ $down = ($ordre != $maxOrdre) ? array(__("move down"),$clickdown) : $down = __("move down");
+
+ $edit = array(__("edit"), "?action=editer&MIDpere=$MIDpere&MID=$MID");
+ $del = array(__("delete"), "?action=supprimer&MIDpere=$MIDpere&MID=$MID");
+
+ // describe the current link
+ if ($PID) {
+ $descr = "<a href=\"pages?dir=$PID\">$ptitle</a>";
+ } elseif ($link) {
+ $descr = "<a href=\"$link\">[ext] $link</a>";
+ } else {
+ $descr = "none";
+ }
+
+ // smarty assignments
+ $page->append('entries',
+ array($MID, array(stripslashes($title), "?MIDpere=$MID"),
+ stripslashes($descr),
+ $edit,$del,$up,$down));
+}
+mysql_free_result($res);
+
+$filiation = $page->menuToRoot($MIDpere,array());
+$menubar = array();
+foreach($filiation as $mykey=>$myval) {
+ if ($myval == 0) {
+ $blab = "<i>home</i>";
+ } else {
+ $res = $globals->db->query("SELECT title FROM {$bbarrel->table_menu} WHERE MID='$myval'");
+ list($blab) = mysql_fetch_row($res);
+ $blab = stripslashes($blab);
+ mysql_free_result($res);
+ }
+ array_unshift($menubar,$mykey ? array($blab,"?MIDpere=$myval") : array($blab));
+}
+$page->assign('menubar',$menubar);
+$page->assign('script',$page->script_self());
+$page->assign('MIDpere',$MIDpere);
+
+// translations
+$page->assign('msg_ext',__("External links are denoted with the [ext] prefix."));
+$page->assign('msg_menu',__("menu name"));
+$page->assign('msg_link',__("link"));
+$page->assign('msg_actions',__("actions"));
+$page->assign('msg_menubar',__("Menu"));
+$page->assign('submit',__("Add new entry"));
+$page->display('admin-menus.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+
+$page = new DiogenesAdmin;
+$bbarrel =& $page->barrel;
+$page->assign('greeting',__("Site options"));
+$page->assign('post',$page->script_self());
+
+// handle update request
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+switch ($action) {
+case "update":
+ $bbarrel->options->updateOption("title", $_REQUEST['title']);
+ $bbarrel->options->updateOption("description", $_REQUEST['description']);
+ $bbarrel->options->updateOption("keywords", $_REQUEST['keywords']);
+ $bbarrel->options->updateOption("favicon", $_REQUEST['favicon']);
+ if (isset($_REQUEST['template']))
+ $bbarrel->options->updateOption("template", $_REQUEST['template']);
+ if (isset($_REQUEST['template_dir']))
+ $bbarrel->options->updateOption("template_dir", $_REQUEST['template_dir']);
+ $bbarrel->options->updateOption("menu_min_level", $_REQUEST['menu_min_level']);
+ $bbarrel->options->updateOption("menu_style", $_REQUEST['menu_style']);
+ if (isset($_REQUEST['menu_theme']))
+ $bbarrel->options->updateOption("menu_theme", $_REQUEST['menu_theme']);
+ $bbarrel->options->updateOption("menu_hide_diogenes", $_REQUEST['menu_hide_diogenes']);
+
+ // log this action
+ $page->log('barrel_options', $bbarrel->alias.":*");
+ break;
+}
+
+// fill out values
+/* general options */
+$page->assign('title', $bbarrel->options->title);
+$page->assign('description', $bbarrel->options->description);
+$page->assign('keywords', $bbarrel->options->keywords);
+$page->assign('favicon', $bbarrel->options->favicon);
+/* template options */
+$page->assign('template', $bbarrel->options->template);
+$page->assign('templates', $page->getTemplates());
+if ($bbarrel->hasFlag('tpl')) {
+ $page->assign('template_dir', $bbarrel->options->template_dir);
+ $res = $globals->db->query("SELECT PID,location from {$bbarrel->table_page} ORDER BY location");
+ while (list($myPID,$myLocation) = mysql_fetch_row($res))
+ $template_dirs[$myPID] = $myLocation ? $myLocation : "<home>";
+ mysql_free_result($res);
+ $page->assign('template_dirs', $template_dirs);
+}
+/* menu options */
+$page->assign('menu_hide_diogeness', array(0 => __("no"), 1 => __("yes")));
+$page->assign('menu_hide_diogenes', $bbarrel->options->menu_hide_diogenes);
+$page->assign('menu_styles', $globals->menu_styles);
+$page->assign('menu_style', $bbarrel->options->menu_style);
+if ($bbarrel->options->menu_style == 1 || $bbarrel->options->menu_style == 2) {
+ $page->assign('menu_themes', $globals->menu_themes);
+ $page->assign('menu_theme', $bbarrel->options->menu_theme);
+}
+$page->assign('menu_levels',array(0=> __("fully expanded"), 1=>'1', 2=>'2', 3=>'3', 4=>'4'));
+$page->assign('menu_min_level', $bbarrel->options->menu_min_level);
+
+// translations
+$page->assign('msg_general_options', __("general options"));
+$page->assign('msg_title', __("title"));
+$page->assign('msg_description', __("description"));
+$page->assign('msg_keywords', __("keywords"));
+$page->assign('msg_favicon', __("favicon"));
+$page->assign('msg_favicon_hint', __("(relative url to a PNG image)"));
+$page->assign('msg_display_options', __("display options"));
+$page->assign('msg_site_template_dir', __("templates directory"));
+$page->assign('msg_site_template', __("default template"));
+$page->assign('msg_menu_hide_diogenes', __("hide Diogenes menu"));
+$page->assign('msg_menu_style', __("menu style"));
+$page->assign('msg_menu_theme', __("menu theme"));
+$page->assign('msg_menu_min_level', __("minimum menu levels to expand"));
+$page->assign('msg_submit', __("Submit"));
+$page->display('admin-options.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+require_once 'Barrel.php';
+require_once 'Barrel/Page.php';
+
+$page = new DiogenesAdmin;
+$bbarrel =& $page->barrel;
+
+// rcs handle
+$rcs = $page->getRcs();
+
+// translations
+$page->assign('msg_submit',__("Submit"));
+$page->assign('msg_reset',__("Reset"));
+$page->assign('msg_properties',__("Page properties"));
+$page->assign('msg_parent',__("parent page"));
+$page->assign('msg_location',__("location"));
+$page->assign('msg_title',__("title"));
+$page->assign('msg_page_template',__("page template"));
+$page->assign('msg_status',__("status"));
+$page->assign('msg_access',__("access"));
+$page->assign('msg_read_perms',__("read access"));
+$page->assign('msg_write_perms',__("write access"));
+$page->assign('msg_actions',__("actions"));
+$page->assign('msg_add_page', array(__("Add a page"),"?action=edit") );
+
+$page->assign('post', $page->script_self());
+$page->assign('table', $bbarrel->table_page);
+
+$action = isset($_REQUEST["action"]) ? $_REQUEST["action"] : "";
+$target = isset($_REQUEST["target"]) ? $_REQUEST["target"] : "";
+
+if (isset($_REQUEST["dir"])) {
+ $dir = $_REQUEST["dir"];
+ if (!$action) $action="edit";
+} else {
+ $dir = 0;
+}
+
+
+/* add or update a page */
+switch ($action) {
+case "import":
+
+ // if needed, import a file
+ if ($globals->word_import && isset($_FILES['wordfile']) && is_uploaded_file($_FILES['wordfile']['tmp_name'])) {
+ $userfile = strtolower($_FILES['wordfile']['name']);
+ if (!substr($userfile,-4,4) == ".doc") {
+ $page->info(__("Document name does not end in .doc"));
+ } else {
+ $mydir = $bbarrel->spool->spoolPath($dir);
+ $page->info(__("Checking in Word file") . " $userfile");
+ $rcs->commit($dir, $globals->wordfile,
+ file_get_contents($_FILES['wordfile']['tmp_name']),
+ "Word file update $userfile" );
+
+ $page->info(__("Importing Word file") . " $userfile");
+ $rcs->importWordFile($dir, $globals->htmlfile, $_FILES['wordfile']['tmp_name']);
+ }
+ } else if (isset($_FILES['htmlfile']) && is_uploaded_file($_FILES['htmlfile']['tmp_name'])) {
+ $userfile = strtolower($_FILES['htmlfile']['name']);
+ if ( (substr($userfile,-4,4) == ".htm") || (substr($userfile,-5,5) == ".html") ) {
+ $page->info(__("Importing HTML file") . " $userfile");
+ $rcs->commit( $dir, $globals->htmlfile,
+ $rcs->importHtmlString(file_get_contents($_FILES['htmlfile']['tmp_name'])),
+ "html file import of $userfile" );
+ } else {
+ $page->info(__("Raw file import") . " $userfile");
+ $rcs->commit( $dir, $globals->htmlfile,
+ file_get_contents($_FILES['htmlfile']['tmp_name']),
+ "raw file import of $userfile" );
+ }
+ }
+ break;
+
+case "update":
+ // page ID
+ $props['PID'] = $dir;
+
+ // page location
+ if (isset($_REQUEST['pedit_location'])) {
+ $homepage = 0;
+ $props['location'] = $_REQUEST['pedit_' . 'location'];
+ } else {
+ $homepage = 1;
+ $props['location'] = '';
+ }
+
+ // other properties
+ $kprops = array('parent', 'title', 'perms', 'wperms', 'status', 'template');
+ foreach ($kprops as $key) {
+ $props[$key] = $_REQUEST['pedit_' . $key];
+ }
+
+ $bpage = new Diogenes_Barrel_Page($bbarrel, $props);
+ $bpage->toDb($homepage, $page);
+ break;
+
+
+case "page_delete":
+ Diogenes_Barrel_Page::delete($bbarrel, $target, $page);
+ break;
+}
+
+// retrieve all the barrel's page
+$bpages = $bbarrel->getPages();
+
+
+if ($dir)
+{
+ $bpage = Diogenes_Barrel_Page::fromDb($bbarrel, $dir);
+} else {
+ $tparent = empty($_REQUEST['parent']) ? $bbarrel->getPID('') : $_REQUEST['parent'];
+ //$page->info("parent $tparent");
+ $bpage = new Diogenes_Barrel_Page($bbarrel, array('parent' => $tparent));
+}
+
+// "Page" toolbar
+//if (isset($bpage->props['PID'])) {
+if ($dir != 0) {
+ $page->toolbar(__("Page"), $bpage->make_toolbar());
+ $page->toolbar(__("File"), $bpage->make_doc_toolbar($rcs));
+}
+
+// retrieve suitable parents for the current page
+if (!$bpage->props['PID'] || strlen($bpage->props['location']))
+{
+ $parent_all = array();
+ foreach($bpages as $pkey => $pval)
+ {
+ if (!$dir or (($pval->props['PID'] != $dir) and ($pval->props['parent'] != $dir)))
+ {
+ $parent_all[$pkey] = $pval;
+ }
+ }
+
+ $parent_opts = array();
+ foreach (array_keys($parent_all) as $pkey)
+ {
+ $ppage = $parent_all[$pkey];
+ if (!$ppage->props['parent'] or isset($parent_all[$ppage->props['parent']]))
+ {
+ $pageloc = $bbarrel->getLocation($pkey);
+ $parent_opts[$pkey] = ( strlen($pageloc) ? "<$pageloc> " : "") . $ppage->props['title'];
+ }
+ }
+ $page->assign('parent_opts', $parent_opts);
+}
+
+// messages
+$gtitle = "";
+if ($dir)
+{
+ $gtitle = $bbarrel->getLocation($dir);
+ if (!$gtitle) $gtitle = __("home");
+}
+$page->assign('greeting',__("Page manager") . ($gtitle ? " - $gtitle" : "") );
+
+$page->assign('html',__("Import HTML"));
+$page->assign('htmlblab',__("You can replace the current page's contents by uploading an HTML file below."));
+$page->assign('htmlstrip',__("If the file name ends with .htm or .html, anything outside the <body></body> pair will be stripped."));
+$page->assign('send',__("Send"));
+
+$page->assign('dir',$dir);
+$page->assign('page_obj', $bpage->props);
+$page->assign('status_opts',array(0=>__("visible"), 1=>__("under construction"), 2=>__("disabled"), 3=>__("archived")));
+$page->assign('templates',$page->getTemplates());
+
+if ($globals->word_import) {
+
+ $page->assign('word',__("Import a Word document"));
+
+ if (file_exists($bbarrel->spool->spoolPath($dir,$globals->wordfile)) )
+ {
+ $page->assign('wordblab', __("This page's master document is currently a Word document."));
+ $page->assign('wordsend', __("You can upload a new version of the Word document below."));
+ $page->assign('wordfile', __("You can get the current version of the file here"));
+ $page->assign('wordlnk', array($globals->wordfile,$page->urlSite((strlen($bpage->props['location']) ? $bpage->props['location'].'/' : '') . $globals->wordfile)) );
+ } else {
+ $page->assign('wordblab', __("If you wish, you can set this page's content from a Word document."));
+ $page->assign('wordsend', __("To do so, simply upload the Word document below."));
+ }
+}
+
+$page->display('page-properties.tpl');
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+require_once 'Plugin/Editor.php';
+require_once 'Barrel/Page.php';
+
+$page = new DiogenesAdmin;
+
+$bbarrel = $page->barrel;
+
+if (!$bbarrel->hasFlag('plug')) {
+ return;
+}
+
+$page->assign('post',$page->script_self());
+
+$dir = isset($_REQUEST['plug_page']) ? $_REQUEST['plug_page'] : 0;
+
+if ($dir != 0)
+{
+ $bpage = Diogenes_Barrel_Page::fromDb($bbarrel, $dir);
+ $page->assign('greeting',__("Page plugins ") . " - " . ($bpage->props['location'] ? $bpage->props['location'] : __("home")) );
+ $page->toolbar(__("Page"), $bpage->make_toolbar());
+ $wperms = $bpage->props['wperms'];
+} else {
+ $page->assign('greeting',__("Available plugins"));
+ $wperms = '';
+}
+
+/* plugin editor */
+$editor = new Diogenes_Plugin_Editor($page->alias, $dir, $wperms);
+if ($dir == 0) {
+ $editor->readonly = 1;
+ $editor->hide_params(1);
+}
+$editor->run($page,'page_content');
+$page->display('');
+?>
--- /dev/null
+<?php
+if (isset($_REQUEST['nlang'])) {
+ setcookie('lang',$_REQUEST['nlang'],(time()+25920000));
+ $_COOKIE['lang'] = $_REQUEST['nlang'];
+}
+
+// include common definitions
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.barrel.inc.php';
+$page = new $globals->barrel;
+$page->startSession();
+$_SESSION['session']->doAuth($page);
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+$myuid = $_SESSION['session']->uid;
+
+$page->assign('langs', $globals->locales);
+$page->assign('global_prefs',$page->url('prefs.php'));
+
+$page->assign('page', __("User preferences"));
+$page->assign('greeting', __("Diogenes preferences"));
+
+$page->assign('msg_lang', __("language"));
+$page->assign('msg_lang_blab', __("You can select your preferred language by clicking on the appropriate language below."));
+
+$page->assign('submit', __("Change"));
+
+$page->assign('msg_global_prefs', __("account preferences"));
+
+$page->display("admin-prefs.tpl");
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+
+$page = new DiogenesAdmin;
+
+$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : "";
+switch($action) {
+case "add":
+ if (isset($_REQUEST['auth']) && isset($_REQUEST['username'])) {
+ $auth = $_REQUEST['auth'];
+ if ($uid = call_user_func(array($globals->session,'getUserId'),$auth,$_REQUEST['username']))
+ $globals->db->query("insert into diogenes_perm set alias='{$page->alias}',auth='$auth',uid='$uid',perms='user'");
+ else
+ $page->info(__("Could not find requested user")." '{$_REQUEST['username']}'");
+ }
+ break;
+case "remove":
+ if (isset($_REQUEST['auth']) && isset($_REQUEST['uid']))
+ $globals->db->query("delete from diogenes_perm where alias='{$page->alias}' and auth='{$_REQUEST['auth']}' and uid='{$_REQUEST['uid']}' and perms='user'");
+ break;
+}
+
+$page->assign('greeting',__("Users administration"));
+$page->assign('msg_users',__("Registered users"));
+$page->assign('msg_admins',__("Administrators"));
+$page->assign('post',$page->script_self());
+$page->assign('user',__("user"));
+$page->assign('action',__("action"));
+
+// retrieve the list of users
+$res = $globals->db->query("select uid,auth from diogenes_perm where alias='{$page->alias}' and perms='user'");
+while (list($uid,$auth) = mysql_fetch_row($res)) {
+ $username = call_user_func(array($globals->session,'getUsername'),$auth,$uid);
+ $page->append('users',array($username,$globals->tlabel[$auth],array(__("remove"),"?action=remove&auth=$auth&uid=$uid")));
+}
+mysql_free_result($res);
+
+// retrieve the list of admins
+$res = $globals->db->query("select uid,auth from diogenes_perm where alias='{$page->alias}' and perms='admin'");
+while (list($uid,$auth) = mysql_fetch_row($res)) {
+ $username = call_user_func(array($globals->session,'getUsername'),$auth,$uid);
+ $page->append('admins',array($username,$globals->tlabel[$auth]));
+}
+mysql_free_result($res);
+
+// auth methods
+foreach ($globals->tauth as $key=>$val)
+ $auths[$key]=$globals->tlabel[$key];
+$page->assign('auths',$auths);
+$page->display('admin-users.tpl');
+
+?>
--- /dev/null
+<?php
+require_once 'diogenes.common.inc.php';
+require_once 'diogenes.admin.inc.php';
+
+$page = new DiogenesAdmin;
+
+$page->assign('greeting',__("WebDAV"));
+
+if ($globals->checkRootUrl())
+{
+ $page->assign('msg_webdav',__("You can access your barrel's files using WebDAV by pointing your WebDAV client to the following address."));
+ $page->assign('url_webdav', $page->urlBarrel($page->alias, $page->barrel->vhost, "webdav/"));
+} else {
+ $page->assign('msg_webdav', __("In order to access your barrel's files using WebDAV, please ask your Diogenes administrator to enable this feature in the Diogenes configuration file."));
+
+}
+
+$page->display('admin-webdav.tpl');
+
+?>
--- /dev/null
+<?php
+
+/**
+ * Example: get XHTML from a given Textile-markup string ($string)
+ *
+ * $textile = new Textile;
+ * echo $textile->TextileThis($string);
+ *
+ */
+
+/*
+$HeadURL: http://svn.textpattern.com/development/4.0/textpattern/lib/classTextile.php $
+$LastChangedRevision: 1072 $
+*/
+
+/*
+
+_____________
+T E X T I L E
+
+A Humane Web Text Generator
+
+Version 2.0 beta
+
+Copyright (c) 2003-2004, Dean Allen <dean@textism.com>
+All rights reserved.
+
+Thanks to Carlo Zottmann <carlo@g-blog.net> for refactoring
+Textile's procedural code into a class framework
+
+_____________
+L I C E N S E
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name Textile nor the names of its contributors may be used to
+ endorse or promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+_________
+U S A G E
+
+Block modifier syntax:
+
+ Header: h(1-6).
+ Paragraphs beginning with 'hn. ' (where n is 1-6) are wrapped in header tags.
+ Example: h1. Header... -> <h1>Header...</h1>
+
+ Paragraph: p. (also applied by default)
+ Example: p. Text -> <p>Text</p>
+
+ Blockquote: bq.
+ Example: bq. Block quotation... -> <blockquote>Block quotation...</blockquote>
+
+ Blockquote with citation: bq.:http://citation.url
+ Example: bq.:http://textism.com/ Text...
+ -> <blockquote cite="http://textism.com">Text...</blockquote>
+
+ Footnote: fn(1-100).
+ Example: fn1. Footnote... -> <p id="fn1">Footnote...</p>
+
+ Numeric list: #, ##
+ Consecutive paragraphs beginning with # are wrapped in ordered list tags.
+ Example: <ol><li>ordered list</li></ol>
+
+ Bulleted list: *, **
+ Consecutive paragraphs beginning with * are wrapped in unordered list tags.
+ Example: <ul><li>unordered list</li></ul>
+
+Phrase modifier syntax:
+
+ _emphasis_ -> <em>emphasis</em>
+ __italic__ -> <i>italic</i>
+ *strong* -> <strong>strong</strong>
+ **bold** -> <b>bold</b>
+ ??citation?? -> <cite>citation</cite>
+ -deleted text- -> <del>deleted</del>
+ +inserted text+ -> <ins>inserted</ins>
+ ^superscript^ -> <sup>superscript</sup>
+ ~subscript~ -> <sub>subscript</sub>
+ @code@ -> <code>computer code</code>
+ %(bob)span% -> <span class="bob">span</span>
+
+ ==notextile== -> leave text alone (do not format)
+
+ "linktext":url -> <a href="url">linktext</a>
+ "linktext(title)":url -> <a href="url" title="title">linktext</a>
+
+ !imageurl! -> <img src="imageurl" />
+ !imageurl(alt text)! -> <img src="imageurl" alt="alt text" />
+ !imageurl!:linkurl -> <a href="linkurl"><img src="imageurl" /></a>
+
+ABC(Always Be Closing) -> <acronym title="Always Be Closing">ABC</acronym>
+
+
+Table syntax:
+
+ Simple tables:
+
+ |a|simple|table|row|
+ |And|Another|table|row|
+
+ |_. A|_. table|_. header|_.row|
+ |A|simple|table|row|
+
+ Tables with attributes:
+
+ table{border:1px solid black}.
+ {background:#ddd;color:red}. |{}| | | |
+
+
+Applying Attributes:
+
+ Most anywhere Textile code is used, attributes such as arbitrary css style,
+ css classes, and ids can be applied. The syntax is fairly consistent.
+
+ The following characters quickly alter the alignment of block elements:
+
+ < -> left align ex. p<. left-aligned para
+ > -> right align h3>. right-aligned header 3
+ = -> centred h4=. centred header 4
+ <> -> justified p<>. justified paragraph
+
+ These will change vertical alignment in table cells:
+
+ ^ -> top ex. |^. top-aligned table cell|
+ - -> middle |-. middle aligned|
+ ~ -> bottom |~. bottom aligned cell|
+
+ Plain (parentheses) inserted between block syntax and the closing dot-space
+ indicate classes and ids:
+
+ p(hector). paragraph -> <p class="hector">paragraph</p>
+
+ p(#fluid). paragraph -> <p id="fluid">paragraph</p>
+
+ (classes and ids can be combined)
+ p(hector#fluid). paragraph -> <p class="hector" id="fluid">paragraph</p>
+
+ Curly {brackets} insert arbitrary css style
+
+ p{line-height:18px}. paragraph -> <p style="line-height:18px">paragraph</p>
+
+ h3{color:red}. header 3 -> <h3 style="color:red">header 3</h3>
+
+ Square [brackets] insert language attributes
+
+ p[no]. paragraph -> <p lang="no">paragraph</p>
+
+ %[fr]phrase% -> <span lang="fr">phrase</span>
+
+ Usually Textile block element syntax requires a dot and space before the block
+ begins, but since lists don't, they can be styled just using braces
+
+ #{color:blue} one -> <ol style="color:blue">
+ # big <li>one</li>
+ # list <li>big</li>
+ <li>list</li>
+ </ol>
+
+ Using the span tag to style a phrase
+
+ It goes like this, %{color:red}the fourth the fifth%
+ -> It goes like this, <span style="color:red">the fourth the fifth</span>
+
+*/
+
+class Textile
+{
+ var $hlgn;
+ var $vlgn;
+ var $clas;
+ var $lnge;
+ var $styl;
+ var $cspn;
+ var $rspn;
+ var $a;
+ var $s;
+ var $c;
+ var $pnct;
+ var $rel;
+ var $fn;
+
+// -------------------------------------------------------------
+ function Textile()
+ {
+ $this->hlgn = "(?:\<(?!>)|(?<!<)\>|\<\>|\=|[()]+)";
+ $this->vlgn = "[\-^~]";
+ $this->clas = "(?:\([^)]+\))";
+ $this->lnge = "(?:\[[^]]+\])";
+ $this->styl = "(?:\{[^}]+\})";
+ $this->cspn = "(?:\\\\\d+)";
+ $this->rspn = "(?:\/\d+)";
+ $this->a = "(?:{$this->hlgn}?{$this->vlgn}?|{$this->vlgn}?{$this->hlgn}?)";
+ $this->s = "(?:{$this->cspn}?{$this->rspn}?|{$this->rspn}?{$this->cspn}?)";
+ $this->c = "(?:{$this->clas}?{$this->styl}?{$this->lnge}?|{$this->styl}?{$this->lnge}?{$this->clas}?|{$this->lnge}?{$this->styl}?{$this->clas}?)";
+ $this->pnct = '[\!"#\$%&\'()\*\+,\-\./:;<=>\?@\[\\\]\^_`{\|}\~]';
+
+ }
+
+// -------------------------------------------------------------
+ function TextileThis($text, $lite='', $encode='', $noimage='', $strict='', $rel='')
+ {
+ if ($rel)
+ $this->rel = ' rel="'.$rel.'" ';
+
+ $text = $this->incomingEntities($text);
+
+ if ($encode) {
+ $text = str_replace("x%x%", "&", $text);
+ return $text;
+ } else {
+
+ if(!$strict) {
+ $text = $this->fixEntities($text);
+ $text = $this->cleanWhiteSpace($text);
+ }
+
+ $text = $this->getRefs($text);
+
+ $text = $this->noTextile($text);
+ $text = $this->links($text);
+ if (!$noimage) {
+ $text = $this->image($text);
+ }
+ $text = $this->code($text);
+ $text = $this->span($text);
+ $text = $this->superscript($text);
+ $text = $this->footnoteRef($text);
+ $text = $this->glyphs($text);
+ $text = $this->retrieve($text);
+
+ if (!$lite) {
+ $text = $this->lists($text);
+ $text = $this->table($text);
+ $text = $this->block($text);
+ }
+
+ // clean up <notextile>
+ $text = preg_replace('/<\/?notextile>/', "", $text);
+
+ // turn the temp char back to an ampersand entity
+ $text = str_replace("x%x%", "&", $text);
+
+ // just to be tidy
+ $text = str_replace("<br />", "<br />\n", $text);
+
+ return $text;
+ }
+ }
+
+// -------------------------------------------------------------
+ function pba($in, $element = "") // "parse block attributes"
+ {
+ $style = '';
+ $class = '';
+ $lang = '';
+ $colspan = '';
+ $rowspan = '';
+ $id = '';
+ $atts = '';
+
+ if (!empty($in)) {
+ $matched = $in;
+ if ($element == 'td') {
+ if (preg_match("/\\\\(\d+)/", $matched, $csp)) $colspan = $csp[1];
+ if (preg_match("/\/(\d+)/", $matched, $rsp)) $rowspan = $rsp[1];
+
+ if (preg_match("/($this->vlgn)/", $matched, $vert))
+ $style[] = "vertical-align:" . $this->vAlign($vert[1]) . ";";
+ }
+
+ if (preg_match("/\{([^}]*)\}/", $matched, $sty)) {
+ $style[] = $sty[1] . ';';
+ $matched = str_replace($sty[0], '', $matched);
+ }
+
+ if (preg_match("/\[([^)]+)\]/U", $matched, $lng)) {
+ $lang = $lng[1];
+ $matched = str_replace($lng[0], '', $matched);
+ }
+
+ if (preg_match("/\(([^()]+)\)/U", $matched, $cls)) {
+ $class = $cls[1];
+ $matched = str_replace($cls[0], '', $matched);
+ }
+
+ if (preg_match("/([(]+)/", $matched, $pl)) {
+ $style[] = "padding-left:" . strlen($pl[1]) . "em;";
+ $matched = str_replace($pl[0], '', $matched);
+ }
+
+ if (preg_match("/([)]+)/", $matched, $pr)) {
+ // $this->dump($pr);
+ $style[] = "padding-right:" . strlen($pr[1]) . "em;";
+ $matched = str_replace($pr[0], '', $matched);
+ }
+
+ if (preg_match("/($this->hlgn)/", $matched, $horiz))
+ $style[] = "text-align:" . $this->hAlign($horiz[1]) . ";";
+
+ if (preg_match("/^(.*)#(.*)$/", $class, $ids)) {
+ $id = $ids[2];
+ $class = $ids[1];
+ }
+
+ return join('',array(
+ ($style) ? ' style="' . join("", $style) .'"':'',
+ ($class) ? ' class="' . $class .'"':'',
+ ($lang) ? ' lang="' . $lang .'"':'',
+ ($id) ? ' id="' . $id .'"':'',
+ ($colspan) ? ' colspan="' . $colspan .'"':'',
+ ($rowspan) ? ' rowspan="' . $rowspan .'"':''
+ ));
+ }
+ return '';
+ }
+
+// -------------------------------------------------------------
+ function table($text)
+ {
+ $text = $text . "\n\n";
+ return preg_replace_callback("/^(?:table(_?{$this->s}{$this->a}{$this->c})\. ?\n)?^({$this->a}{$this->c}\.? ?\|.*\|)\n\n/smU",
+ array(&$this, "fTable"), $text);
+ }
+
+// -------------------------------------------------------------
+ function fTable($matches)
+ {
+ $tatts = $this->pba($matches[1], 'table');
+
+ foreach(preg_split("/\|$/m", $matches[2], -1, PREG_SPLIT_NO_EMPTY) as $row) {
+ if (preg_match("/^($this->a$this->c\. )(.*)/m", $row, $rmtch)) {
+ $ratts = $this->pba($rmtch[1], 'tr');
+ $row = $rmtch[2];
+ } else $ratts = '';
+
+ foreach(explode("|", $row) as $cell) {
+ $ctyp = "d";
+ if (preg_match("/^_/", $cell)) $ctyp = "h";
+ if (preg_match("/^(_?$this->s$this->a$this->c\. )(.*)/", $cell, $cmtch)) {
+ $catts = $this->pba($cmtch[1], 'td');
+ $cell = $cmtch[2];
+ } else $catts = '';
+
+ if (trim($cell) != '')
+ $cells[] = "\t\t\t<t$ctyp$catts>$cell</t$ctyp>";
+ }
+ $rows[] = "\t\t<tr$ratts>\n" . join("\n", $cells) . "\n\t\t</tr>";
+ unset($cells, $catts);
+ }
+ return "\t<table$tatts>\n" . join("\n", $rows) . "\n\t</table>\n\n";
+ }
+
+// -------------------------------------------------------------
+ function lists($text)
+ {
+ return preg_replace_callback("/^([#*]+$this->c .*)$(?![^#*])/smU", array(&$this, "fList"), $text);
+ }
+
+// -------------------------------------------------------------
+ function fList($m)
+ {
+ $text = explode("\n", $m[0]);
+ foreach($text as $line) {
+ $nextline = next($text);
+ if (preg_match("/^([#*]+)($this->a$this->c) (.*)$/s", $line, $m)) {
+ list(, $tl, $atts, $content) = $m;
+ $nl = preg_replace("/^([#*]+)\s.*/", "$1", $nextline);
+ if (!isset($lists[$tl])) {
+ $lists[$tl] = true;
+ $atts = $this->pba($atts);
+ $line = "\t<" . $this->lT($tl) . "l$atts>\n\t\t<li>" . $content;
+ } else {
+ $line = "\t\t<li>" . $content;
+ }
+
+ if(strlen($nl) <= strlen($tl)) $line .= "</li>";
+ foreach(array_reverse($lists) as $k => $v) {
+ if(strlen($k) > strlen($nl)) {
+ $line .= "\n\t</" . $this->lT($k) . "l>";
+ if(strlen($k) > 1)
+ $line .= "</li>";
+ unset($lists[$k]);
+ }
+ }
+ }
+ $out[] = $line;
+ }
+ return join("\n", $out);
+ }
+
+// -------------------------------------------------------------
+ function lT($in)
+ {
+ return preg_match("/^#+/", $in) ? 'o' : 'u';
+ }
+
+// -------------------------------------------------------------
+ function block($text)
+ {
+ $pre = $php = $txp = false;
+ $find = array('bq', 'h[1-6]', 'fn\d+', 'p');
+
+ $text = preg_replace("/(.+)\n(?![#*\s|])/",
+ "$1<br />", $text);
+
+ $text = explode("\n", $text);
+ array_push($text, " ");
+
+ foreach($text as $line) {
+ if (preg_match('/<pre>/i', $line)) {
+ $pre = true;
+ }
+ elseif (preg_match('/<txp:php>/i', $line)) {
+ $php = true;
+ }
+ elseif (preg_match('/^\s*<txp:/i', $line)) {
+ $txp = true;
+ }
+
+
+ foreach($find as $tag) {
+ $line = ($pre == false and $php == false and $txp == false)
+ ? preg_replace_callback("/^($tag)($this->a$this->c)\.(?::(\S+))? (.*)$/",
+ array(&$this, "fBlock"), $line)
+ : $line;
+ }
+
+ $line = (!$php and !$txp) ? preg_replace('/^(?!\t|<\/?pre|<\/?code|$| )(.*)/', "\t<p>$1</p>", $line) : $line;
+
+ $line = ($pre or $php) ? str_replace("<br />", "\n", $line):$line;
+ if (preg_match('/<\/pre>/i', $line)) {
+ $pre = false;
+ }
+ elseif (preg_match('/<\/txp:php>/i', $line)) {
+ $php = false;
+ }
+ if ($txp == true) $txp = false;
+ $out[] = $line;
+ }
+ return join("\n", $out);
+ }
+
+// -------------------------------------------------------------
+ function fBlock($m)
+ {
+ // $this->dump($m);
+ list(, $tag, $atts, $cite, $content) = $m;
+
+ $atts = $this->pba($atts);
+
+ if (preg_match("/fn(\d+)/", $tag, $fns)) {
+ $tag = 'p';
+ $fnid = empty($this->fn[$fns[1]]) ? $fns[1] : $this->fn[$fns[1]];
+ $atts .= ' id="fn' . $fnid . '"';
+ $content = '<sup>' . $fns[1] . '</sup> ' . $content;
+ }
+
+ $start = "\t<$tag";
+ $end = "</$tag>";
+
+ if ($tag == "bq") {
+ $cite = $this->checkRefs($cite);
+ $cite = ($cite != '') ? ' cite="' . $cite . '"' : '';
+ $start = "\t<blockquote$cite>\n\t\t<p";
+ $end = "</p>\n\t</blockquote>";
+ }
+
+ return "$start$atts>$content$end";
+ }
+
+// -------------------------------------------------------------
+ function span($text)
+ {
+ $qtags = array('\*\*','\*','\?\?','-','__','_','%','\+','~');
+
+ foreach($qtags as $f) {
+ $text = preg_replace_callback("/
+ (?<=^|\s|[[:punct:]]|[{([])
+ ($f)
+ ($this->c)
+ (?::(\S+))?
+ ([\w<&].*)
+ ([[:punct:];]*)
+ $f
+ (?=[])}]|[[:punct:]]+|\s|$)
+ /xmU", array(&$this, "fSpan"), $text);
+ }
+ return $text;
+ }
+
+// -------------------------------------------------------------
+ function fSpan($m)
+ {
+ $qtags = array(
+ '*' => 'strong',
+ '**' => 'b',
+ '??' => 'cite',
+ '_' => 'em',
+ '__' => 'i',
+ '-' => 'del',
+ '%' => 'span',
+ '+' => 'ins',
+ '~' => 'sub'
+ );
+
+ list(, $tag, $atts, $cite, $content, $end) = $m;
+ $tag = $qtags[$tag];
+ $atts = $this->pba($atts);
+ $atts .= ($cite != '') ? 'cite="' . $cite . '"' : '';
+
+ $out = "<$tag$atts>$content$end</$tag>";
+
+// $this->dump($out);
+
+ return $out;
+
+ }
+
+// -------------------------------------------------------------
+ function links($text)
+ {
+ return preg_replace_callback('/
+ ([\s[{(]|[[:punct:]])? # $pre
+ " # start
+ (' . $this->c . ') # $atts
+ ([^"]+) # $text
+ \s?
+ (?:\(([^)]+)\)(?="))? # $title
+ ":
+ (\S+\b) # $url
+ (\/)? # $slash
+ ([^\w\/;]*) # $post
+ (?=\s|$)
+ /Ux', array(&$this, "fLink"), $text);
+ }
+
+// -------------------------------------------------------------
+ function fLink($m)
+ {
+ list(, $pre, $atts, $text, $title, $url, $slash, $post) = $m;
+
+ $url = $this->checkRefs($url);
+
+ $atts = $this->pba($atts);
+ $atts .= ($title != '') ? 'title="' . $title . '"' : '';
+
+ $atts = ($atts) ? $this->shelve($atts) : '';
+
+ $parts = parse_url($url);
+ if (empty($parts['host']) and preg_match('/^\w/', @$parts['path']))
+ $url = hu.$url;
+
+ $out = $pre . '<a href="' . $url . $slash . '"' . $atts . $this->rel . '>' . $text . '</a>' . $post;
+
+ // $this->dump($out);
+ return $out;
+
+ }
+
+// -------------------------------------------------------------
+ function getRefs($text)
+ {
+ return preg_replace_callback("/(?<=^|\s)\[(.+)\]((?:http:\/\/|\/)\S+)(?=\s|$)/U",
+ array(&$this, "refs"), $text);
+ }
+ // -------------------------------------------------------------
+
+function refs($m)
+ {
+ list(, $flag, $url) = $m;
+ $this->urlrefs[$flag] = $url;
+ return '';
+ }
+
+// -------------------------------------------------------------
+ function checkRefs($text)
+ {
+ return (isset($this->urlrefs[$text])) ? $this->urlrefs[$text] : $text;
+ }
+
+// -------------------------------------------------------------
+ function image($text)
+ {
+ return preg_replace_callback("/
+ \! # opening !
+ (\<|\=|\>)? # optional alignment atts
+ ($this->c) # optional style,class atts
+ (?:\. )? # optional dot-space
+ ([^\s(!]+) # presume this is the src
+ \s? # optional space
+ (?:\(([^\)]+)\))? # optional title
+ \! # closing
+ (?::(\S+))? # optional href
+ (?=\s|$) # lookahead: space or end of string
+ /Ux", array(&$this, "fImage"), $text);
+ }
+
+// -------------------------------------------------------------
+ function fImage($m)
+ {
+ list(, $algn, $atts, $url) = $m;
+ $atts = $this->pba($atts);
+ $atts .= ($algn != '') ? ' align="' . $this->iAlign($algn) . '"' : '';
+ $atts .= (isset($m[4])) ? ' title="' . $m[4] . '"' : '';
+ $atts .= (isset($m[4])) ? ' alt="' . $m[4] . '"' : ' alt=""';
+ $size = @getimagesize($url);
+ if ($size) $atts .= " $size[3]";
+
+ $href = (isset($m[5])) ? $this->checkRefs($m[5]) : '';
+ $url = $this->checkRefs($url);
+
+ $parts = parse_url($url);
+ if (empty($parts['host']) and preg_match('/^\w/', @$parts['path']))
+ $url = hu.$url;
+
+ $out = array(
+ ($href) ? '<a href="' . $href . '">' : '',
+ '<img src="' . $url . '"' . $atts . ' />',
+ ($href) ? '</a>' : ''
+ );
+
+ return join('',$out);
+ }
+
+// -------------------------------------------------------------
+ function code($text)
+ {
+ return preg_replace_callback("/
+ (?:^|(?<=[\s\(])|([[{])) # before
+ @
+ (?:\|(\w+)\|)? # lang
+ (.+) # code
+ @
+ (?:$|([\]}])|
+ (?=[[:punct:]]{1,2}|
+ \s|$)) # after
+ /Ux", array(&$this, "fCode"), $text);
+ }
+
+// -------------------------------------------------------------
+ function fCode($m)
+ {
+ @list(, $before, $lang, $code, $after) = $m;
+ $lang = ($lang) ? ' language="' . $lang . '"' : '';
+ return $before . '<code' . $lang . '>' . $code . '</code>' . $after;
+ }
+
+// -------------------------------------------------------------
+ function shelve($val)
+ {
+ $this->shelf[] = $val;
+ return ' <' . count($this->shelf) . '>';
+ }
+
+// -------------------------------------------------------------
+ function retrieve($text)
+ {
+ $i = 0;
+ if (isset($this->shelf) && is_array($this->shelf)) {
+ foreach($this->shelf as $r) {
+ $i++;
+ $text = str_replace("<$i>", $r, $text);
+ }
+ }
+ return $text;
+ }
+
+// -------------------------------------------------------------
+ function incomingEntities($text)
+ {
+ return preg_replace("/&(?![#a-z0-9]+;)/i", "x%x%", $text);
+ }
+
+// -------------------------------------------------------------
+ function encodeEntities($text)
+ {
+ return (function_exists('mb_encode_numericentity'))
+ ? $this->encode_high($text)
+ : htmlentities($text, ENT_NOQUOTES, "utf-8");
+ }
+
+// -------------------------------------------------------------
+ function fixEntities($text)
+ {
+ /* de-entify any remaining angle brackets or ampersands */
+ return str_replace(array(">", "<", "&"),
+ array(">", "<", "&"), $text);
+ }
+
+// -------------------------------------------------------------
+ function cleanWhiteSpace($text)
+ {
+ $out = str_replace(array("\r\n", "\t"), array("\n", ''), $text);
+ $out = preg_replace("/\n{3,}/", "\n\n", $out);
+ $out = preg_replace("/\n *\n/", "\n\n", $out);
+ $out = preg_replace('/"$/', "\" ", $out);
+ return $out;
+ }
+
+// -------------------------------------------------------------
+ function noTextile($text)
+ {
+ $text = preg_replace_callback('/(^|\s)<notextile>(.*)<\/notextile>(\s|$)?/msU',
+ array(&$this, "fTextile"), $text);
+ return preg_replace_callback('/(^|\s)==(.*)==(\s|$)?/msU',
+ array(&$this, "fTextile"), $text);
+ }
+
+// -------------------------------------------------------------
+ function fTextile($m)
+ {
+ $modifiers = array(
+ '"' => '"',
+ '%' => '%',
+ '*' => '*',
+ '+' => '+',
+ '-' => '-',
+ '<' => '<',
+ '=' => '=',
+ '>' => '>',
+ '?' => '?',
+ '^' => '^',
+ '_' => '_',
+ '~' => '~',
+ );
+
+ @list(, $before, $notextile, $after) = $m;
+ $notextile = str_replace(array_keys($modifiers), array_values($modifiers), $notextile);
+ return $before . '<notextile>' . $notextile . '</notextile>' . $after;
+ }
+
+// -------------------------------------------------------------
+ function superscript($text)
+ {
+ return preg_replace('/\^(.*)\^/mU', '<sup>$1</sup>', $text);
+ }
+
+// -------------------------------------------------------------
+ function footnoteRef($text)
+ {
+ return preg_replace('/\b\[([0-9]+)\](\s)?/Ue',
+ '$this->footnoteID(\'\1\',\'\2\')', $text);
+ }
+
+// -------------------------------------------------------------
+ function footnoteID($id, $t)
+ {
+ if (empty($this->fn[$id]))
+ $this->fn[$id] = uniqid(rand());
+ $fnid = $this->fn[$id];
+ return '<sup><a href="#fn'.$fnid.'">'.$id.'</a></sup>'.$t;
+ }
+
+// -------------------------------------------------------------
+ function glyphs($text)
+ {
+ // fix: hackish
+ $text = preg_replace('/"\z/', "\" ", $text);
+ $pnc = '[[:punct:]]';
+
+ $glyph_search = array(
+ '/([^\s[{(>_*])?\'(?(1)|(?=\s|s\b|'.$pnc.'))/', // single closing
+ '/\'/', // single opening
+ '/([^\s[{(>_*])?"(?(1)|(?=\s|'.$pnc.'))/', // double closing
+ '/"/', // double opening
+ '/\b( )?\.{3}/', // ellipsis
+ '/\b([A-Z][A-Z0-9]{2,})\b(?:[(]([^)]*)[)])/', // 3+ uppercase acronym
+ '/\s?--\s?/', // em dash
+ '/\s-\s/', // en dash
+ '/(\d+) ?x ?(\d+)/', // dimension sign
+ '/\b ?[([]TM[])]/i', // trademark
+ '/\b ?[([]R[])]/i', // registered
+ '/\b ?[([]C[])]/i'); // copyright
+
+ $glyph_replace = array('$1’$2', // single closing
+ '‘', // single opening
+ '$1”', // double closing
+ '“', // double opening
+ '$1…', // ellipsis
+ '<acronym title="$2">$1</acronym>', // 3+ uppercase acronym
+ '—', // em dash
+ ' – ', // en dash
+ '$1×$2', // dimension sign
+ '™', // trademark
+ '®', // registered
+ '©'); // copyright
+
+ $codepre = false;
+ /* if no html, do a simple search and replace... */
+ if (!preg_match("/<.*>/", $text)) {
+ $text = preg_replace($glyph_search, $glyph_replace, $text);
+ return $text;
+ }
+ else {
+ $text = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE);
+ foreach($text as $line) {
+ $offtags = ('code|pre|kbd|notextile|txp:php');
+
+ /* matches are off if we're between <code>, <pre> etc. */
+ if (preg_match('/<(' . $offtags . ')>/i', $line)) $codepre = true;
+ if (preg_match('/<\/(' . $offtags . ')>/i', $line)) $codepre = false;
+
+ if (!preg_match("/<.*>/", $line) && $codepre == false) {
+ $line = preg_replace($glyph_search, $glyph_replace, $line);
+ }
+
+ /* do htmlspecial if between <code> */
+ if ($codepre == true) {
+ $line = htmlspecialchars($line, ENT_NOQUOTES, "UTF-8");
+ $line = preg_replace('/<(\/?' . $offtags . ')>/', "<$1>", $line);
+ $line = str_replace("&#","&#",$line);
+ }
+
+ $glyph_out[] = $line;
+ }
+ return join('', $glyph_out);
+ }
+ }
+
+// -------------------------------------------------------------
+ function iAlign($in)
+ {
+ $vals = array(
+ '<' => 'left',
+ '=' => 'center',
+ '>' => 'right');
+ return (isset($vals[$in])) ? $vals[$in] : '';
+ }
+
+// -------------------------------------------------------------
+ function hAlign($in)
+ {
+ $vals = array(
+ '<' => 'left',
+ '=' => 'center',
+ '>' => 'right',
+ '<>' => 'justify');
+ return (isset($vals[$in])) ? $vals[$in] : '';
+ }
+
+// -------------------------------------------------------------
+ function vAlign($in)
+ {
+ $vals = array(
+ '^' => 'top',
+ '-' => 'middle',
+ '~' => 'bottom');
+ return (isset($vals[$in])) ? $vals[$in] : '';
+ }
+
+// -------------------------------------------------------------
+ function encode_high($text, $charset = "UTF-8")
+ {
+ return mb_encode_numericentity($text, $this->cmap(), $charset);
+ }
+
+// -------------------------------------------------------------
+ function decode_high($text, $charset = "UTF-8")
+ {
+ return mb_decode_numericentity($text, $this->cmap(), $charset);
+ }
+
+// -------------------------------------------------------------
+ function cmap()
+ {
+ $f = 0xffff;
+ $cmap = array(
+ 0x0080, 0xffff, 0, $f);
+ return $cmap;
+ }
+
+// -------------------------------------------------------------
+ function textile_popup_help($name, $helpvar, $windowW, $windowH)
+ {
+ return ' <a target="_blank" href="http://www.textpattern.com/help/?item=' . $helpvar . '" onclick="window.open(this.href, \'popupwindow\', \'width=' . $windowW . ',height=' . $windowH . ',scrollbars,resizable\'); return false;">' . $name . '</a><br />';
+
+ return $out;
+ }
+
+// -------------------------------------------------------------
+ function txtgps($thing)
+ {
+ if (isset($_POST[$thing])) {
+ if (get_magic_quotes_gpc()) {
+ return stripslashes($_POST[$thing]);
+ }
+ else {
+ return $_POST[$thing];
+ }
+ }
+ else {
+ return '';
+ }
+ }
+
+// -------------------------------------------------------------
+ function dump()
+ {
+ foreach (func_get_args() as $a)
+ echo "\n<pre>",(is_array($a)) ? print_r($a) : $a, "</pre>\n";
+ }
+
+// -------------------------------------------------------------
+ function blockLite($text)
+ {
+ $find = array('bq', 'p');
+
+ $text = preg_replace("/(.+)\n(?![#*\s|])/",
+ "$1<br />", $text);
+
+ $text = explode("\n", $text);
+ array_push($text, " ");
+
+ foreach($text as $line) {
+
+ foreach($find as $tag) {
+ $line = preg_replace_callback("/^($tag)($this->a$this->c)\.(?::(\S+))? (.*)$/",
+ array(&$this, "fBlock"), $line);
+ }
+
+ $line = preg_replace('/^(?!\t|<\/?pre|<\/?code|$| )(.*)/', "\t<p>$1</p>", $line);
+ $out[] = $line;
+ }
+ return join("\n", $out);
+ }
+
+
+} // end class
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes.barrel.inc.php';
+
+/** Page for administrators only.
+ */
+class DiogenesAdmin extends DiogenesBarrel
+{
+ /** The constructor. Creates an administrative page.
+ *
+ * @param dir the directory to operate on (optional)
+ */
+ function DiogenesAdmin($dir = "")
+ {
+ global $globals;
+
+ $this->DiogenesBarrel();
+ $this->assign('page',__("Administration"));
+
+ // check permissions
+ $this->startSession();
+ if (!empty($dir)) {
+ $res = $globals->db->query("select wperms from {$this->barrel->table_page} where PID='$dir'");
+ if (!list($wperms) = mysql_fetch_row($res))
+ $this->kill(__("Directory not found"));
+ $this->checkPerms($wperms);
+ } else {
+ $this->checkPerms('admin');
+ }
+ }
+
+
+ /** Returns the master template for the current context.
+ */
+ function getTemplate()
+ {
+ return DiogenesPage::getTemplate('master.tpl');
+ }
+
+
+ /** Build the admin menu.
+ */
+ function makeMenu() {
+ global $globals;
+
+ // retrieve homepage PID
+ $homepage = $this->barrel->getPID('');
+
+ array_push($this->menu, array( 1, __("Home"), $this->urlSite("") ) );
+ array_push($this->menu, array( 1, __("Admin manual"), __("http://diogenes-doc.polytechnique.org/en-admin/") ) );
+ array_push($this->menu, array( 0, __("Administration"), "", 1 ) );
+ array_push($this->menu, array( 1, __("Activity"), "./") );
+ array_push($this->menu, array( 1, __("Options"), "options") );
+ if ($this->barrel->hasFlag('plug'))
+ {
+ array_push($this->menu, array( 1, __("Plugins"), "plugins") );
+ }
+ array_push($this->menu, array( 1, __("Users"), "users") );
+ array_push($this->menu, array( 1, __("WebDAV"), "webdav") );
+ array_push($this->menu, array( 0, __("Content"), "", 1 ) );
+ array_push($this->menu, array( 1, __("Pages catalog"), "files?dir={$homepage}&file={$globals->cssfile}") );
+ array_push($this->menu, array( 1, __("Edit style sheet"), "edit?dir={$homepage}&file={$globals->cssfile}") );
+ array_push($this->menu, array( 1, __("Edit menu"), "menus") );
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes.page.inc.php';
+require_once 'Barrel.php';
+
+/** This class is used to display a page of a Diogenes barrel,
+ * that is an RCS-managed website with a virtual directory
+ * structure.
+ */
+class DiogenesBarrel extends DiogenesPage
+{
+ // barrel definition info
+
+ /** The database table holding the menus */
+ var $table_menu;
+
+ /** The barrel's alias. */
+ var $alias;
+
+ /** The Diogenes_Barrel representing the barrel */
+ var $barrel;
+
+ // context info
+ /** A Diogenes_Barrel_Page representing the current page */
+ var $curpage;
+
+ /** Information about the current location */
+ var $pathinfo;
+
+ /** Can the current user edit this page? */
+ var $canedit = false;
+
+
+ /** Constructs a Smarty-derived object to display contents within a barrel.
+ *
+ * @param $override_pathinfo
+ */
+ function DiogenesBarrel($override_pathinfo = null)
+ {
+ global $globals;
+
+ // call parent constructor
+ $this->DiogenesPage();
+
+ // break down PATH_INFO into site and location components
+ $mypathinfo = $override_pathinfo ? $override_pathinfo : $_SERVER['PATH_INFO'];
+ $this->pathinfo = $this->parsePathInfo($mypathinfo);
+ if (!$this->pathinfo)
+ $this->kill404("Invalid location specified!");
+
+ // Retrieve site-wide info from database
+ $this->barrel = new Diogenes_Barrel($this->pathinfo['alias']);
+ if (!$this->barrel->alias)
+ $this->kill404("Unknown barrel requested : {$this->pathinfo['alias']}");
+
+ // Legacy
+ $this->alias = $this->barrel->alias;
+ $this->table_menu = $this->barrel->table_menu;
+
+ // Build page head
+ $this->makeHead();
+
+ // Check the requested page exists
+ $tdir = $this->pathinfo['dir'];
+ if ($tdir != 'admin')
+ {
+ if (!$this->pathinfo['PID'] = $this->barrel->getPID($tdir))
+ {
+ $this->kill404("Unknown location specified '$tdir'!");
+ }
+ }
+ }
+
+ /** Check the user has the right permissions.
+ * Read the user's permissions for the current site from database.
+ *
+ * @param level the required permissions level
+ */
+ function checkPerms($level) {
+ global $globals;
+
+ if ($level != "public")
+ $_SESSION['session']->doAuth($this);
+
+ $_SESSION['session']->setBarrelPerms($this->alias);
+
+ if (!$_SESSION['session']->hasPerms($level))
+ $this->kill(__("You are not authorized to view this page!"), 403);
+ }
+
+
+ /** Read the contents for the current location.
+ */
+ function doContent()
+ {
+ global $globals;
+
+ // Retrieve information specific to the current page
+
+ // enable directory index
+ $file = $this->pathinfo['file'] ? $this->pathinfo['file'] : $globals->htmlfile;
+
+ // read from Db
+ if (!$bpage = Diogenes_Barrel_Page::fromDb($this->barrel, $this->pathinfo['PID']))
+ {
+ $this->kill404("Directory not found : '{$this->pathinfo['dir']}' ({$this->pathinfo['PID']}) !");
+ }
+ $this->curpage =& $bpage;
+
+ // check the permissions for the current location
+ if (!$this->pathinfo['file'] || $bpage->props['perms'] != 'public' || isset($_REQUEST['rev'])) {
+ $this->startSession();
+
+ // handle login/logout requests
+ if (isset($_REQUEST['dologout']))
+ $this->doLogout();
+ if (isset($_REQUEST['doauth']))
+ $this->checkPerms('auth');
+
+ $this->checkPerms($bpage->props['perms']);
+
+ // can we edit this page?
+ $this->canedit = $_SESSION['session']->hasPerms($bpage->props['wperms']);
+ }
+
+ // now we can display the page
+ // check the location is valid
+ if (!$this->barrel->spool->checkPath($bpage->props['PID'],$file,false))
+ $this->kill404("Malformed location!");
+
+ // check that the page is 'live'
+ switch ($bpage->props['status']) {
+ case 0:
+ break;
+ case 1:
+ $this->assign('page_content', "<p>".__("This page is currently under construction.")."<p>");
+ $this->display('');
+ exit;
+ default:
+ $this->assign('page_content', "<p>".__("This page is currently unavailable.")."<p>");
+ $this->display('');
+ exit;
+ }
+
+ // if necessary, do a checkout
+ if (isset($_REQUEST['rev'])) {
+ $rcs = $this->getRcs();
+ $path = $rcs->checkout($bpage->props['PID'],$file,$_REQUEST['rev'],System::mktemp("-d"));
+ } else {
+ $path = $this->barrel->spool->spoolPath($bpage->props['PID'],$file);
+ }
+
+ if (!is_file($path))
+ $this->kill404("File not found : $path!");
+
+ if (!$this->pathinfo['file']) {
+ // this is a page, display it within header/footer framework
+ $this->doPage($path, $bpage);
+ } else {
+ // otherwise, we send back the raw file
+ $type = get_mime_type($path);
+ if (is_mime_multipart($type)) {
+ $boundary = get_mime_boundary($path);
+ if ($boundary) $type = "$type; boundary=\"$boundary\"";
+ }
+ header("Content-Type:$type");
+ header("Content-Length:".filesize($path));
+ header("Last-modified:".gmdate("D, d M Y H:i:s T", filemtime($path)));
+ readfile($path);
+ }
+
+ }
+
+
+ /** Display a page within the header/footer framework.
+ *
+ * @param path the path of the file
+ * @param bpage a Diogenes_Barrel_Page representing the current page
+ */
+ function doPage($path, $bpage)
+ {
+ global $globals;
+
+ $this->assign('page',stripslashes($bpage->props['title']));
+
+ // load plugins
+ $this->barrel->readPlugins();
+ $active_plugins = $this->barrel->loadPlugins($bpage);
+
+ // search for rendering pluging
+ $render_plugin = '';
+ foreach ($active_plugins as $plugname => $plugobj) {
+ if (is_object($plugobj) && ($plugobj->type == "render")) {
+ $render_plugin = $plugobj;
+ }
+ }
+ // source page or pass it to a rendering plugin
+ if (is_object($render_plugin)) {
+ $content = $render_plugin->render($path);
+ } else {
+ $content = file_get_contents($path);
+ }
+
+ // apply plugin filtering
+ foreach ($active_plugins as $plugname => $plugobj) {
+ if (is_object($plugobj) && ($plugobj->type == "filter")) {
+ $content = $plugobj->filter($content);
+ }
+ }
+ $this->assign('page_content', $content);
+
+ parent::display('', $this->getTemplate($bpage->props['template']));
+ }
+
+
+ /** Return an RCS handle. */
+ function getRcs()
+ {
+ global $globals;
+ return new $globals->rcs($this,$this->alias,$_SESSION['session']->username);
+ }
+
+
+ /** Returns the master template for the current context.
+ *
+ * @param template
+ */
+ function getTemplate($template = '')
+ {
+ if ($template)
+ {
+ // we have a page-specific template, get its full path
+ $tpl = $this->templatePath($template);
+ } else if ($this->barrel->options->template) {
+ // we have default site template, get is full path
+ $tpl = $this->templatePath($this->barrel->options->template);
+ } else {
+ // fall back on the system-wide default template
+ $tpl = parent::getTemplate();
+ }
+ return $tpl;
+ }
+
+
+ /** Returns the available master templates. */
+ function getTemplates()
+ {
+ // the system-wide templates
+ $templates = parent::getTemplates();
+ $bbarrel =& $this->barrel;
+
+ // lookup templates in the template directory
+ if ($bbarrel->hasFlag('tpl') && $bbarrel->options->template_dir) {
+ $dir = $bbarrel->spool->spoolPath($bbarrel->options->template_dir);
+ $files = System::find($dir.' -maxdepth 1 -name *.tpl');
+ foreach ($files as $file)
+ $templates["barrel:".basename($file)] = "[barrel] ".basename($file);
+ }
+ return $templates;
+ }
+
+
+ /** Is the user an administrator for the current barrel ? */
+ function isAdmin() {
+ return isset($_SESSION['session']) && $_SESSION['session']->hasPerms('admin');
+ }
+
+
+ /** Build the page's "head" tag.
+ */
+ function makeHead() {
+ global $globals;
+ $bbarrel =& $this->barrel;
+
+ // site name
+ $this->assign('site', stripslashes($bbarrel->options->title));
+
+ // meta
+ array_push($this->head, '<meta name="description" content="'.stripslashes($bbarrel->options->description).'" />');
+ array_push($this->head, '<meta name="keywords" content="'.stripslashes($bbarrel->options->keywords).'" />');
+
+ // stylesheets
+ $this->sheets = array();
+ array_push($this->sheets, $this->url("common.css"));
+ if ($bbarrel->options->menu_style == 1 || $bbarrel->options->menu_style == 2)
+ array_push($this->sheets, $this->url("phplayersmenu/{$bbarrel->options->menu_theme}/style.css"));
+ array_push($this->sheets, $this->urlSite("", $globals->cssfile));
+
+ // add stylesheets to head
+ foreach ($this->sheets as $mysheet) {
+ array_push($this->head, '<link rel="stylesheet" href="'.$mysheet.'" type="text/css" />');
+ }
+ // favicon
+ if ($bbarrel->options->favicon)
+ array_push($this->head, '<link rel="icon" href="'.$this->urlSite("", $bbarrel->options->favicon).'" type="image/png" />');
+ }
+
+
+ /** Build the barrel's menu.
+ */
+ function makeMenu() {
+ global $globals;
+ $bbarrel =& $this->barrel;
+
+ // menu style & theme
+ $this->assign('menustyle', $bbarrel->options->menu_style);
+ $this->assign('menutheme', $bbarrel->options->menu_theme);
+
+ $PID = $this->curpage->props['PID'];
+
+ // build the Diogenes part of the menu
+ if (!$bbarrel->options->menu_hide_diogenes) {
+ array_push($this->menu,array(0,__("Home"),$this->urlSite(""), 1));
+ if ($this->isLogged()) {
+ array_push($this->menu, array(1,__("Logout"), "?dologout=1") );
+ array_push($this->menu, array(1,__("Preferences"), $this->urlSite("admin", "prefs")));
+ } else {
+ array_push($this->menu, array(1,__("Login"), "?doauth=1") );
+ }
+
+ if ($this->isAdmin()) {
+ array_push($this->menu, array(1, __("Administration"), $this->urlSite("admin")));
+ if ($PID)
+ array_push($this->menu, array(1, __("Page properties"), $this->urlSite("admin", "pages?dir=$PID")));
+ } elseif ($this->canedit && $PID) {
+ array_push($this->menu, array(0, __("Edit this page"), "", 1));
+ array_push($this->menu, array(1, __("Raw editor"), $this->urlSite("admin", "edit?dir=$PID&file={$globals->htmlfile}")));
+ array_push($this->menu, array(1, __("HTML editor"), $this->urlSite("admin" , "compose?dir=$PID&file={$globals->htmlfile}")));
+ }
+ }
+
+ // if this is an error page, we need to bail out here
+ if (!isset($this->table_menu))
+ return;
+
+ // try to figure out the current MID from the current PID
+ // and build filiation
+ $filiation = array();
+ $res = $this->dbh->query("select MID from {$this->table_menu} where PID='$PID'");
+ while (list($MID) = mysql_fetch_row($res))
+ $filiation = $this->menuToRoot($MID, $filiation);
+ mysql_free_result($res);
+
+ // add the user-defined part of the menu
+ $this->menu = array_merge($this->menu,$this->menuRecurse(0,$filiation,0));
+ }
+
+
+ /** Return the filiation to get to the root element.
+ *
+ * @param MID
+ * @param path
+ */
+ function menuToRoot($MID, $path) {
+ /* add ourself to the path */
+ array_push($path,$MID);
+
+ if ($MID) {
+ /* recursion */
+ $res = $this->dbh->query("select MIDpere from {$this->table_menu} where MID=$MID");
+ list($MIDpere) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ return $this->menuToRoot($MIDpere, $path);
+ } else {
+ /* termination */
+ return $path;
+ }
+ }
+
+
+ /** Recursively add menu entries
+ *
+ * @param MIDpere
+ * @param filiation
+ * @param level
+ */
+ function menuRecurse($MIDpere, $filiation, $level) {
+ // the produced output
+ $out = array();
+
+ $res = $this->dbh->query("select m.MID,m.title,m.link,m.PID ".
+ "from {$this->table_menu} as m ".
+ "where MIDpere=$MIDpere order by ordre");
+
+ while(list($mid,$title,$link,$pid) = mysql_fetch_row($res)) {
+ $location = $this->barrel->getLocation($pid);
+// echo "pid : $pid, location : $location<br/>";
+ $title = stripslashes($title);
+ $entry = htmlentities(stripslashes($title), ENT_QUOTES);
+ $link = $pid ? $this->urlSite($location) : $link;
+ // decide whether this menu should be expanded
+ $expanded = ($this->barrel->options->menu_min_level == 0) ||
+ ($level+1 < $this->barrel->options->menu_min_level) ||
+ in_array($mid, $filiation);
+ array_push($out, array($level, $entry, $link, $expanded));
+ $out = array_merge($out, $this->menuRecurse($mid, $filiation, $level+1));
+ }
+
+ // free MySQL result and return output
+ mysql_free_result($res);
+ return $out;
+ }
+
+
+ /**
+ * Break down a PATH_INFO into site, page id and file
+ * Directories *must* be accessed with a final slash.
+ *
+ * @param path the path to parse
+ */
+ function parsePathInfo($path) {
+ if (empty($path) || !preg_match("/^\/([^\/]+)\/((.+)\/)?([^\/]*)$/",$path,$asplit))
+ return false;
+
+ $split['alias'] = $asplit[1];
+ $split['dir'] = isset($asplit[3]) ? $asplit[3] : "";
+ $split['file'] = isset($asplit[4]) ? $asplit[4] : "";
+ return $split;
+ }
+
+
+ /** Return the current URI.
+ */
+ function script_uri()
+ {
+ if ($this->barrel->vhost)
+ return preg_replace("/^(.*)\/site(\.php)?\/{$this->alias}\/(.*)/", "/\$3",$_SERVER['REQUEST_URI']);
+ else
+ return $_SERVER['REQUEST_URI'];
+ }
+
+
+ /** Returns the path to a given template. */
+ function templatePath($template)
+ {
+ global $globals;
+
+ $bits = split(":", $template);
+ switch ($bits[0]) {
+ case "global":
+ $path = $globals->template_dir."/". $bits[1];
+ break;
+ case "barrel":
+ $path = $this->barrel->spool->spoolPath($this->barrel->options->template_dir, $bits[1]);
+ break;
+ default:
+ $path = parent::templatePath($template);
+ }
+ return $path;
+ }
+
+
+ /** Returns the URL to one of the barrel's pages relative to
+ * the current location.
+ *
+ * @param dir
+ * @param file
+ */
+ function urlSite($dir, $file = '') {
+ global $page;
+ $tosite = strlen($this->pathinfo['dir']) ? str_repeat("../",1+substr_count($this->pathinfo['dir'],"/")) : '';
+ $url = $tosite . (strlen($dir) ? "$dir/" : "") . $file;
+ return strlen($url) ? $url : "./";
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+ // define Diogenes core classes
+ require_once 'diogenes.globals.inc.php';
+ require_once 'diogenes/diogenes.database.inc.php';
+ require_once 'diogenes.session.inc.php';
+ require_once 'diogenes.cvs.inc.php';
+ require_once 'Plugins.php';
+
+ // get custom definitions
+ $globals = new DiogenesGlobals();
+ require_once 'diogenes.config.inc.php';
+
+ // location of the Diogenes library
+ if (!isset($globals->libroot))
+ $globals->libroot = $globals->root."/lib";
+
+ // connect to database
+ $globals->dbconnect();
+
+ // read extra options from database
+ $globals->readOptions();
+
+ // set up the plugin holder
+ $globals->plugins = new Diogenes_Plugins($globals->db, $globals->root . "/plugins", $globals->spoolroot . "/diogenes_c");
+
+ // set up the icons
+ $globals->icons = new DiogenesIcons();
+
+ // do we want to debug database calls ?
+ if ($globals->debugdatabase)
+ $globals->db->trace_on();
+
+ // environment variable for gettext
+ bindtextdomain("diogenes", "{$globals->root}/locale");
+ textdomain("diogenes");
+ if (isset($_COOKIE['lang'])) {
+ putenv("LANG={$_COOKIE['lang']}");
+ setlocale(LC_ALL,$_COOKIE['lang']);
+ }
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes/diogenes.misc.inc.php';
+
+/** Protect PHP code.
+ */
+function phpProtect($input)
+{
+ $splits = preg_split("/(<\?php|\?>)/",$input,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+ $output = "";
+
+ while ($block = array_shift($splits)) {
+ if ($block == "<?php") {
+ $code = array_shift($splits);
+ $end = array_shift($splits);
+ if ($end != "?>")
+ die("phpProtect : parse error");
+ $output .= "{PHP:".base64_encode($code).":PHP}";
+ } else {
+ $output .= $block;
+ }
+ }
+
+ return $output;
+}
+
+
+/** Unprotect PHP code.
+ */
+function phpUnprotect($input)
+{
+ $splits = preg_split("/({PHP:.+:PHP})/",$input,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+ $output = "";
+
+ foreach ($splits as $block) {
+ if (preg_match("/{PHP:(.+):PHP}/",$block,$match)) {
+ $output .= "<?php".base64_decode($match[1])."?>";
+ } else {
+ $output .= $block;
+ }
+ }
+
+ return $output;
+}
+
+
+/** Convert XHTML-compliant tags to plain HTML.
+ */
+function xhtmlToHtml($input)
+{
+ return html_accent(preg_replace("/<(br|img|input|p)( [^\/]*)?\/>/","<\$1\$2>",$input));
+}
+
+
+/** Restore XHTML-compliant tags.
+ */
+function htmlToXhtml($input)
+{
+ return preg_replace("/<(br|img|input)( [^>]+)?>/","<\$1\$2/>",$input);
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes.rcs.inc.php';
+
+/** This class handles Diogenes CVS operations.
+ */
+class DiogenesCvs extends DiogenesRcs {
+ /** CVS command options */
+ var $cvsopt;
+
+ /** Port for the pserver */
+ var $port = 9000;
+
+ /** The constructor.
+ *
+ * @param caller
+ * @param alias
+ * @param login the current user's login
+ * @param init should create this module?
+ */
+ function DiogenesCvs(&$caller,$alias,$login,$init = false) {
+ global $globals;
+ // call parent constructor
+ $this->DiogenesRcs($caller,$alias,$login,$init);
+
+ // set CVS environment, fire up pserver
+ // the pserver suicides after 5mn of inactivity
+ $this->cvsopt = "-d :pserver:{$this->login}@localhost:{$this->port}{$globals->rcsroot}";
+ putenv("CVS_PASSFILE={$globals->spoolroot}/.cvspass");
+ if ($fp = popen(escapeshellcmd("perl ".escapeshellarg("{$globals->root}/cvs.pl")." -p ".escapeshellarg($this->port)." -r ".escapeshellarg($globals->rcsroot)." -f -m -s 300"),"r"))
+ pclose($fp);
+
+ // if asked to, do checkout of the module
+ if ($init) {
+ chdir($globals->spoolroot);
+ if ($this->cmdExec("cvs {$this->cvsopt} co ".escapeshellarg($alias)))
+ {
+ $this->info($this->cmdStatus());
+ $this->kill("CVS : Error, checking out CVS module '$alias' failed!");
+ }
+ }
+
+ // check we have a correct checkout
+ if ( !is_dir($this->spoolPath("CVS"))
+ || !is_writable($this->spoolPath("CVS")) )
+ $this->kill("CVS : Error, checkout for CVS module '$alias' is invalid!");
+
+ }
+
+
+ /** Perform sanity check on a CVS directory
+ * and the corresponding checkout in the spool
+ *
+ * @param dir
+ */
+ function checkDir($dir) {
+ return is_dir($this->rcsPath($dir))
+ && is_writable($this->rcsPath($dir))
+ // spool check
+ && is_dir($this->spoolPath($dir))
+ && is_writable($this->spoolPath($dir))
+ && is_dir($this->spoolPath($dir,"CVS"))
+ && is_writable($this->spoolPath($dir,"CVS"));
+ }
+
+
+ /** Commit a CVS item. Returns true for succes, false for an error.
+ *
+ * @param dir parent directory
+ * @param file the CVS entry
+ * @param content the contents of the new revision
+ * @param message the log message for this revision
+ */
+ function commit($dir,$file,$content,$message="")
+ {
+ $this->info("CVS : checking in $file..");
+
+ // check directories
+ if (!$this->checkDir($dir)) {
+ // error
+ $this->info("CVS : Error, sanity check for '$dir' failed!");
+ return false;
+ }
+
+ // log commit attempt
+ $this->log("rcs_commit","{$this->alias}:$dir/$file:$message");
+
+ // write to spool file
+ $sfile = $this->spoolPath($dir,$file);
+ $rfile = $this->rcsFile($dir,$file);
+
+ $fp = fopen($sfile,"w");
+ if (!$fp) {
+ $this->info("CVS : Error, could not open spool file '$sfile' for writing!");
+ return false;
+ }
+ fwrite($fp,$content);
+ fclose($fp);
+
+ chdir($this->spoolPath($dir));
+
+ // if the RCS file does not exist, do a cvs add
+ if (!file_exists($rfile)) {
+ if ($this->cmdExec("cvs {$this->cvsopt} add ".escapeshellarg($file))) {
+ // error
+ $this->info("Error: could not do CVS add!");
+ $this->info($this->cmdStatus());
+ return false;
+ }
+ } else {
+ // do an update to make sure we are up to date
+ $this->cmdExec("cvs {$this->cvsopt} up ".escapeshellarg($file));
+ }
+
+ $this->cmdExec("cvs {$this->cvsopt} commit -m".escapeshellarg($message)." ".escapeshellarg($file));
+
+ return true;
+ }
+
+
+ /** Retrieve differences between two version of a file.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ * @param r1 the first revision
+ * @param r2 the second revision
+ */
+ function diff($dir,$file,$r1,$r2)
+ {
+ chdir($this->spoolPath($dir));
+ $this->info("CVS : diffing '$file' ($r1 to $r2)..");
+
+ $this->cmdExec("cvs {$this->cvsopt} diff -r".escapeshellarg($r1)." -r".escapeshellarg($r2)." ".escapeshellarg($file));
+ return $this->cmd_output;
+ }
+
+
+ /** Returns raw log entries for a CVS item.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ */
+ function logEntries($dir,$file) {
+ chdir($this->spoolPath($dir));
+ $this->cmdExec("cvs {$this->cvsopt} log ".escapeshellarg($file));
+ return $this->cmd_output;
+ }
+
+
+ /** Add a new RCS-managed directory.
+ *
+ * @param parent the parent directory
+ * @param dir the directory to add
+ */
+ function newdir($parent,$dir)
+ {
+ if (!$this->checkDir($parent))
+ return false;
+
+ @mkdir($this->spoolPath($parent,$dir),0700);
+ chdir($this->spoolPath($parent));
+ $ret = $this->cmdExec("cvs {$this->cvsopt} add ".escapeshellarg($dir));
+ return $ret;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes/diogenes.core.globals.inc.php';
+
+/** This class describes Diogenes' global settings.
+ */
+class DiogenesGlobals extends DiogenesCoreGlobals {
+ /** Absolute directory location of Diogenes root. */
+ var $root;
+ /** Absolute directory location of Diogenes spool directory. */
+ var $spoolroot;
+ /** Absolute directory location of Diogenes RCS. */
+ var $rcsroot;
+ /** The Diogenes root URL */
+ var $rooturl;
+ /** The Diogenes version */
+ var $version = "@VERSION@";
+
+ /** A barrel's stylesheet */
+ var $cssfile = "style.css";
+ /** The file containing a barrel page definition */
+ var $htmlfile = "page.html";
+ /** The Word file containing a barrel page definition */
+ var $wordfile = "page.doc";
+
+ /** The revision control system (DiogenesRcs or DiogenesCvs).
+ * This can be set from the toplevel interface
+ */
+ var $rcs = "DiogenesRcs";
+ /** The class for display toplevel pages. */
+ var $toplevel = 'DiogenesToplevel';
+ /** The class for displaying sites. */
+ var $barrel = 'DiogenesBarrel';
+ /** The class to use for session handling. */
+ var $session = 'DiogenesSession';
+ /** The class to use for WebDAV operations. */
+ var $webdav = 'DiogenesWebDAV';
+
+ /** The database table holding the global options */
+ var $table_global_options = "diogenes_option";
+
+ /** The database table holding the plugins */
+ var $table_plugins = "diogenes_plugin";
+
+ /** The tables for authentication */
+ var $tauth = array('native'=>"diogenes_auth");
+ /** Labels for the authentication tables */
+ var $tlabel = array('native'=>"Diogenes");
+
+ /** Should we display W3C validator links from user-created pages ? */
+ var $validatepages = 0;
+
+ /** Should we debug database calls ? */
+ var $debugdatabase = 0;
+
+ /** Should we show plugin debugging information ? */
+ var $debugplugins = 0;
+
+ /** What file should we write the WebDAV log to? (empty = none) */
+ var $debugwebdav = '';
+
+ /** Should we capture all WebDAV output to a log? */
+ var $debugwebdav_capture = 0;
+
+ /** Invalid locations for barrel pages */
+ var $invalidlocations = array("admin", "webdav");
+
+ /** Invalid barrel names */
+ var $invalidaliases = array("CVSROOT", "templates_c", "tree_c", "diogenes");
+
+ /** Available HTML editors */
+ var $html_editors = array(
+ 'kafenio' => "Kafenio",
+ 'ekit' => "Ekit"
+ );
+
+ /** Availables languages */
+ var $locales = array(
+ 'en_US'=> "English",
+ 'es_ES'=> "Español",
+ 'fr_FR'=> "Français",
+ 'nl_NL'=> "Nederlands",
+ 'sv_SE'=> "Svenska"
+ );
+
+ /** Available menu styles */
+ var $menu_styles = array(
+ 0=> "classic",
+ 1=> "dynamic tree",
+ 2=> "dynamic tree, save state"
+ );
+
+ /** Available menu themes */
+ var $menu_themes = array(
+ 'gnome' => 'gnome',
+ 'gorilla' => 'gorilla',
+ 'lush' => 'lush',
+ 'mozilla' => 'mozilla'
+ );
+
+ /** The HTML editor to use (ekit, kafenio) */
+ var $html_editor = "kafenio";
+
+ /** Toplevel menu style */
+ var $menu_style = 0;
+
+ /** Toplevel menu theme */
+ var $menu_theme = "gorilla";
+
+ /** Template directory */
+ var $template_dir = "";
+
+ /** Default template for barrel pages */
+ var $template = "";
+
+ /** Utility to use for Word file import.
+ * set 'wvHtml' to make us of wv for Word import
+ * otherwise leave empty to disable word import.
+ */
+ //var $word_import = 'wvHtml';
+ var $word_import = '';
+
+ /** Available Word import utilities */
+ var $word_imports = array(
+ '' => "disabled",
+ 'wvHtml' => "wvHtml"
+ );
+
+
+ /** Check that RootURL is a full URL */
+ function checkRootUrl()
+ {
+ return preg_match('/^http(s)?:\/\/.*/i', $this->rooturl);
+ }
+
+
+ /** Read extra options from database.
+ */
+ function readOptions()
+ {
+ $res = $this->db->query("select name,value from {$this->table_global_options} where barrel=''");
+
+ // we only accept options which already exist in this
+ // class
+ while (list($key,$value) = mysql_fetch_row($res)) {
+ if (isset($this->$key))
+ $this->$key = $value;
+ }
+ }
+
+
+ /** Store a preference to database.
+ */
+ function updateOption($name,$value)
+ {
+ $this->$name = stripslashes($value);
+ $this->db->query("replace into {$this->table_global_options} set barrel='',name='$name',value='$value'");
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** This class describes Diogenes' icons.
+ */
+class DiogenesIcons
+{
+ /** Construct an object to manipulate Diogenes's icons.
+ */
+ function DiogenesIcons($theme = 'gartoon')
+ {
+ $this->theme = $theme;
+ }
+
+
+ /** Return the available icon themes.
+ */
+ function get_icon_themes()
+ {
+ $themes = array(
+ 'gartoon' => array(
+ 'action' => array(
+ 'add' => 'action-add.png',
+ 'delete' => 'action-delete.png',
+ 'edit' => 'action-edit.png',
+ 'properties' => 'action-properties.png',
+ 'plugins' => 'action-plugins.png',
+ 'revisions' => 'action-revisions.png',
+ 'rename' => 'action-rename.png',
+ 'remove' => 'action-remove.png',
+ 'update' => 'action-update.png',
+ 'view' => 'action-view.png',
+ ),
+ 'barrel' => array(
+ 'home' => 'barrel-home.png',
+ 'directory' => 'barrel-directory.png'
+ ),
+ 'mime' => array(
+ 'audio' => 'mime-audio.png',
+ 'deb' => 'mime-deb.png',
+ 'drm' => 'mime-drm.png',
+ 'excel' => 'mime-excel.png',
+ 'html' => 'mime-html.png',
+ 'lyx' => 'mime-lyx.png',
+ 'msword' => 'mime-msword.png',
+ 'postscript' => 'mime-postscript.png',
+ 'powerpoint' => 'mime-powerpoint.png',
+ 'pdf' => 'mime-pdf.png',
+ 'image' => 'mime-image.png',
+ 'text' => 'mime-text.png',
+ 'video' => 'mime-video.png',
+ 'compressed' => 'mime-compressed.png',
+ 'unknown' => 'mime-unknown.png',
+ 'xml' => 'mime-xml.png',
+ ),
+ 'perm' => array(
+ 'public' => 'perm-public.png',
+ 'auth' => 'perm-auth.png',
+ 'user' => 'perm-user.png',
+ 'admin' => 'perm-admin.png',
+ 'forbidden' => 'perm-forbidden.png',
+ )
+ )
+ );
+
+ return $themes;
+ }
+
+
+ /** Return the icon associated with an action.
+ *
+ * @param $category the icon category
+ * @param $name the icon name
+ */
+ function get_icon($category, $name)
+ {
+ global $globals;
+ $maps = $this->get_icon_themes();
+
+ if (isset($maps[$this->theme][$category][$name])) {
+ return $globals->rooturl . "images/".$maps[$this->theme][$category][$name];
+ } else {
+ trigger_error("could not find icon for '$name' in category '$category'", E_USER_WARNING);
+ return false;
+ }
+ }
+
+
+ /** Return the icon associated with an action.
+ *
+ * @param $action the action we are describing
+ */
+ function get_action_icon($action)
+ {
+ return $this->get_icon('action', $action);
+ }
+
+
+ /** Return the icons associated with an array of actions
+ *
+ * @param $actions the actions we are describing
+ */
+ function get_action_icons($actions)
+ {
+ $oactions = array();
+ foreach ($actions as $action)
+ {
+ $oaction = $action;
+ if (isset($action[2]))
+ {
+ $oaction[2] = $this->get_action_icon($action[2]);
+ }
+ array_push($oactions, $oaction);
+ }
+ return $oactions;
+ }
+
+
+ /** Return the icon associated with a file's MIME content-type
+ *
+ * @param $filename the file we are describing
+ */
+ function get_mime_icon($filename)
+ {
+ global $globals;
+
+ $type = get_mime_type($filename);
+
+ if (preg_match('/^application\/msword$/', $type)) {
+ $itype = 'msword';
+ } elseif (preg_match('/^application\/vnd\.ms-powerpoint$/', $type)) {
+ $itype = 'powerpoint';
+ } elseif (preg_match('/^application\/vnd\.oma\.drm\.(content|message)$/', $type)) {
+ $itype = 'drm';
+ } elseif (preg_match('/^application\/(arj|x-bzip|x-bzip2|x-gzip|x-compressed|zip)$/', $type)) {
+ $itype = 'compressed';
+ } elseif (preg_match('/^application\/pdf$/', $type)) {
+ $itype = 'pdf';
+ } elseif (preg_match('/^application\/postscript$/', $type)) {
+ $itype = 'postscript';
+ } elseif (preg_match('/^application\/x-deb$/', $type)) {
+ $itype = 'deb';
+ } elseif (preg_match('/^audio\//', $type)) {
+ $itype = 'audio';
+ } elseif (preg_match('/^application\/vnd\.ms-excel$/', $type)) {
+ $itype = 'excel';
+ } elseif (preg_match('/^image\//', $type)) {
+ $itype = 'image';
+ } elseif (preg_match('/^text\/html$/', $type)) {
+ $itype = 'html';
+ } elseif (preg_match('/^text\/xml$/', $type)) {
+ $itype = 'xml';
+ } elseif (preg_match('/^text\/x-lyx$/', $type)) {
+ $itype = 'lyx';
+ } elseif (preg_match('/^text\//', $type)) {
+ $itype = 'text';
+ } elseif (preg_match('/^video\//', $type)) {
+ $itype = 'video';
+ } else {
+ $itype = 'unknown';
+ }
+
+ return $this->get_icon('mime', $itype);
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes/diogenes.core.page.inc.php';
+require_once 'diogenes/diogenes.misc.inc.php';
+
+/** This class describes a generic Diogenes page. This class
+ * is inherited to display barrel, admin or toplevel pages.
+ *
+ * @see DiogenesBarrel DiogenesAdmin DiogenesToplevel
+ */
+class DiogenesPage extends DiogenesCorePage
+ {
+
+ /** Handle to database */
+ var $dbh;
+
+ /** An array holding the contents of the 'head' tag */
+ var $head = array();
+
+ /** An array of items for the 'menu' area */
+ var $menu = array();
+
+ /** Whether we're into kill() or not */
+ var $_dying = false;
+
+ /** The constructor.
+ */
+ function DiogenesPage()
+ {
+ global $globals;
+ $this->dbh =& $globals->db;
+
+ // call parent constructor
+ $this->DiogenesCorePage();
+
+ // register Smarty functions
+ $this->register_function("menu","diogenes_func_menu");
+
+ // common Smarty assignments
+ $this->assign('poweredby', $globals->urlise(__("Powered by Diogenes") . " {$globals->version}"));
+ $this->assign('phplayersmenu', $this->url("phplayersmenu"));
+ $this->assign_by_ref('head', $this->head);
+ $this->assign_by_ref('menuitems', $this->menu);
+
+ // debugging assignments
+ $this->assign('msg_debug_bar', __("debugging"));
+ $this->assign('msg_debug_calltrace', __("call trace"));
+ $this->assign('msg_debug_dbtrace', __("database trace"));
+ $this->assign('msg_debug_plugins', __("plugins"));
+ }
+
+
+ /** Display a Smarty template.
+ *
+ * @param $template the template for the current page
+ * @param $master the master template
+ */
+ function display($template, $master = '') {
+ global $globals;
+
+ $this->assign('page_template', $template);
+ if ($globals->debugdatabase)
+ $this->assign('db_trace',$globals->db->trace_format($this));
+ if ($globals->debugplugins)
+ $this->assign('plugins_trace',$globals->plugins->trace_format($this));
+ if (($globals->debugplugins) || ($globals->debugdatabase))
+ $this->assign('debug_css', $this->url("common.css"));
+ $this->makeMenu();
+
+ if (!$master)
+ $master = $this->getTemplate();
+
+ parent::display($master);
+ }
+
+
+ /** Perform a logout. This should destroy both the session
+ * and the logger objects.
+ */
+ function doLogout()
+ {
+ global $globals;
+ $this->log('auth_logout', '');
+ unset($_SESSION['log']);
+ $_SESSION['session'] = new $globals->session;
+ }
+
+
+ /** Returns the master template for the current context.
+ */
+ function getTemplate()
+ {
+ global $globals;
+
+ if ($globals->template) {
+ // we have a system-wide default template, get its full path
+ $tpl = $this->templatePath($globals->template);
+ } else {
+ // fall back on the default template
+ $tpl = 'master.tpl';
+ }
+ return $tpl;
+ }
+
+
+ /** Returns the available master templates. */
+ function getTemplates()
+ {
+ global $globals;
+
+ // the default template
+ $templates[0] = "<default>";
+
+ // lookup templates in the template directory
+ if ($globals->template_dir && is_dir($globals->template_dir)) {
+ $files = System::find($globals->template_dir.' -maxdepth 1 -name *.tpl');
+ foreach ($files as $file)
+ $templates["global:".basename($file)] = "[global] ".basename($file);
+ }
+ return $templates;
+ }
+
+
+ /** Send an HTTP status header.
+ *
+ * @param code the HTTP status code
+ */
+ function httpStatus($code)
+ {
+ $message = array(
+ 400 => "HTTP/1.0 400 Bad Request",
+ 403 => "HTTP/1.0 403 Forbidden; Access Denied; Banned",
+ 404 => "HTTP/1.0 404 Not Found",
+ 500 => "HTTP/1.0 500 Internal Server Error",
+ );
+
+ if (!headers_sent())
+ header(isset($message[$code]) ? $message[$code] : "HTTP/1.0 $code");
+ }
+
+
+ /** Report an information.
+ *
+ * @param msg
+ */
+ function info($msg) {
+ $this->append('status',$msg);
+ }
+
+
+ /** Is the user logged in ? */
+ function isLogged() {
+ return isset($_SESSION['session']) && $_SESSION['session']->hasPerms('auth');
+ }
+
+
+ /** Is the user a root ("toplevel") admin ? */
+ function isRoot() {
+ return isset($_SESSION['session']) && $_SESSION['session']->hasPerms('root');
+ }
+
+
+ /** Die and display an error message.
+ *
+ * @param $msg the message to display
+ * @param $code the HTTP status code to send
+ */
+ function kill($msg, $code = 500) {
+ if ($this->_dying)
+ {
+ // We're in a loop of kills. This is very, very bad.
+ // We need to bale as quick as possible, because we can't rely on
+ // *any* system code to not be the source of the kill() call.
+ echo "<h1>Very fatal error: $msg</h1>\n";
+ exit;
+ }
+
+ $this->_dying = true;
+ $this->httpStatus($code);
+ $this->assign('greeting', __("Diogenes error"));
+ $this->assign('page', __("Error"));
+ $this->assign('page_content', "<p>$msg</p>");
+ $this->display('');
+ exit;
+ }
+
+
+ /** Display the dreaded "file not found page".
+ *
+ * @param msg optional extra error message
+ */
+ function kill404($msg = "") {
+ if ($msg)
+ $this->info($msg);
+ $this->kill( __("The requested document was not found."), 404);
+ }
+
+
+ /** Log an information.
+ *
+ * @param action
+ * @param data
+ */
+ function log($action,$data="") {
+ if (isset($_SESSION['log']) && is_object($_SESSION['log']))
+ $_SESSION['log']->log($action,$data);
+ }
+
+
+ /** Make the menu.
+ */
+ function makeMenu() {
+
+ }
+
+
+ /** Start session handling.
+ */
+ function startSession() {
+ global $globals;
+
+ session_start();
+ if (!isset($_SESSION['session']))
+ $_SESSION['session'] = new $globals->session;
+ }
+
+
+ /** Returns the path to a given template. */
+ function templatePath($template)
+ {
+ global $globals;
+
+ $bits = split(":", $template);
+ switch ($bits[0]) {
+ case "global":
+ $path = $globals->template_dir."/". $bits[1];
+ break;
+ default:
+ $this->kill("Unkown template type : '$template'");
+ }
+ return $path;
+ }
+
+
+ /** Adds a toolbar to the top of the page.
+ *
+ * @param title
+ * @param items
+ */
+ function toolbar($title, $items) {
+ $this->append('toolbars', array('title'=>$title, 'items'=>$items));
+ }
+
+
+ /** Returns the URL to a Diogenes barrel.
+ *
+ * @param alias
+ * @param vhost
+ * @param rel
+ */
+ function urlBarrel($alias,$vhost,$rel="") {
+ global $globals;
+ return $vhost ? "http://$vhost/$rel" : "{$globals->rooturl}site/$alias/$rel";
+ }
+
+}
+
+
+/** Displays a full menu.
+ *
+ * Parameters
+ * +items the menu items
+ * +style menu style (0, 1, 2)
+ * +theme menu theme
+ *
+ * @param params the function input
+ */
+function diogenes_func_menu($params)
+{
+ global $globals;
+
+ extract($params);
+ if (empty($items))
+ return;
+
+ switch($style) {
+ case 1: case 2:
+ include("phplayersmenu/PHPLIB.php");
+ include("phplayersmenu/layersmenu-common.inc.php");
+ include("phplayersmenu/treemenu.inc.php");
+ $tmp = "";
+ $firstlevel = 0;
+ $counter = 0;
+ foreach ($items as $item) {
+ $level = array_shift($item);
+ // remember the level of the first entry
+ if ($counter == 0)
+ $firstlevel = $level;
+ $dots = str_repeat(".",$level+1);
+ $link = array_shift($item);
+ $text = array_shift($item);
+ $expanded = array_shift($item);
+ $tmp .= "$dots|$link|$text||||$expanded\n";
+ $counter++;
+ }
+
+ $mid = new TreeMenu();
+ $mid->setLibjsdir($globals->root."/htdocs/phplayersmenu/");
+ $mid->setImgwww($globals->rooturl."phplayersmenu/$theme/");
+ $mid->setMenuStructureString($tmp);
+ $mid->parseStructureForMenu("diogenesmenu");
+ $out = $mid->newTreeMenu("diogenesmenu");
+
+ // this hack takes care of menus starting with 'orphan' child entries
+ if (($firstlevel > 0) && ($pos = strpos($out,"<div id=\"jt1\" class=\"treemenudiv\">"))) {
+ $insert = str_repeat("<div class=\"treemenudiv\">\n", $firstlevel);
+ $out = substr($out,0,$pos) . $insert . substr($out,$pos);
+ }
+ break;
+
+ case 0: default:
+ $out = "<div class=\"menu\">";
+ $oLevel = 0;
+ $oExpanded = 1;
+ foreach($items as $item) {
+ $level = $item[0];
+ $expanded = isset($item[3]) ? $item[3] : 0;
+ if ($oExpanded || $level <= $oLevel) {
+ $out .= diogenes_func_menu_item(compact("item"));
+ $oLevel = $level;
+ $oExpanded = $expanded;
+ }
+ }
+ $out .= "</div>";
+ break;
+ }
+ return $out;
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes.spool.inc.php';
+require_once 'diogenes.icons.inc.php';
+// dependency on PEAR
+require_once 'System.php';
+
+/** This class handles Diogenes RCS operations.
+ */
+class DiogenesRcs extends DiogenesSpool {
+ /** Absolute directory location for the barrel's RCS files. */
+ var $rcsdir;
+
+ /** The username */
+ var $login;
+ /** The constructor.
+ *
+ * @param caller
+ * @param alias
+ * @param login the current user's login
+ * @param init should create this module?
+ */
+ function DiogenesRcs(&$caller,$alias,$login,$init = false) {
+ global $globals;
+ $this->DiogenesSpool($caller,$alias);
+ $this->rcsdir = "{$globals->rcsroot}/$alias";
+ $this->login = $login;
+
+ // if we were asked to, created directories
+ if ($init) {
+ if (!is_dir($this->rcsdir))
+ mkdir($this->rcsdir, 0700);
+ if (!is_dir($this->datadir))
+ mkdir($this->datadir, 0700);
+ }
+
+ // check RCS directory
+ if (!is_dir($this->rcsdir) || !is_writable($this->rcsdir))
+ $this->kill("'{$this->rcsdir}' is not a writable directory");
+
+ // check spool directory
+ if (!is_dir($this->datadir) || !is_writable($this->datadir))
+ $this->kill("'{$this->datadir}' is not a writable directory");
+ }
+
+
+ /** Return the path of an RCS "item" (file or directory).
+ *
+ * @param parent parent directory (optional)
+ * @param entry the item
+ */
+ function rcsPath($parent="",$entry="") {
+ $this->checkPath($parent,$entry);
+ return $this->rcsdir.($parent ? "/$parent": "") . ($entry ? "/$entry" : "");
+ }
+
+
+ /** Return the path of an RCS file (something,v).
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ */
+ function rcsFile($dir,$file) {
+ return $this->rcsPath($dir,$file).",v";
+ }
+
+
+ /** Check whether a file is registered in RCS.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ */
+ function checkFile($dir, $file) {
+ return is_file($this->rcsFile($dir, $file));
+ }
+
+
+ /** Perform sanity check on an RCS directory
+ * and the corresponding checkout in the spool
+ *
+ * @param dir
+ */
+ function checkDir($dir) {
+ return is_dir($this->rcsPath($dir))
+ && is_writable($this->rcsPath($dir))
+ && is_dir($this->spoolPath($dir))
+ && is_writable($this->spoolPath($dir));
+ }
+
+
+ /** Do a checkout of an RCS item to a given location.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ * @param rev the revision to check out
+ * @param output the directory to which we want to perform the checkout
+ */
+ function checkout($dir,$file,$rev,$output)
+ {
+ $this->info("RCS : checkout out $file ($rev)..");
+ $rfile = $this->rcsFile($dir,$file);
+ if ($this->cmdExec("co -r".escapeshellarg($rev)." ".escapeshellarg($rfile)." ".escapeshellarg("$output/$file")))
+ {
+ $this->info("RCS : Error, checkout failed!");
+ $this->info($this->cmdStatus());
+ return;
+ }
+ return "$output/$file";
+ }
+
+
+ /** Commit an RCS item. Returns true for succes, false for an error.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ * @param content the contents of the new revision
+ * @param message the log message for this revision
+ */
+ function commit($dir,$file,$content,$message="")
+ {
+ $this->info("RCS : checking in '$file'..");
+
+ // check directories
+ if (!$this->checkDir($dir)) {
+ // error
+ $this->info("RCS : Error, RCS sanity check for '$dir' failed!");
+ return false;
+ }
+
+ // log commit attempt
+ $this->log("rcs_commit","{$this->alias}:$dir/$file:$message");
+
+ $sfile = $this->spoolPath($dir,$file);
+ $rfile = $this->rcsFile($dir,$file);
+
+ // if the RCS file does not exist, create it
+ if (!file_exists($rfile)) {
+ if ($this->cmdExec("rcs -i ".escapeshellarg($rfile)))
+ {
+ // error
+ $this->info("RCS : Error, could not initialise RCS file '$rfile'!");
+ $this->info($this->cmdStatus());
+ return false;
+ }
+ }
+
+ // lock the spool file
+ if ($this->cmdExec("co -l ".escapeshellarg($rfile)." ".escapeshellarg($sfile)))
+ {
+ // error
+ $this->info("RCS : Error, could not get RCS lock on file '$file'!");
+ $this->info($this->cmdStatus());
+ return false;
+ }
+ if ($fp = fopen($sfile,"w")) {
+ fwrite($fp,$content);
+ fclose($fp);
+
+ if ($this->cmdExec("ci -w".escapeshellarg($this->login). ($message ? " -m".escapeshellarg($message) : "").
+ " ". escapeshellarg($sfile). " ". escapeshellarg($rfile)))
+ {
+ // error
+ $this->info("RCS : Error, checkin failed!");
+ $this->info($this->cmdStatus());
+ return false;
+ }
+
+ if ($this->cmdExec("co ".escapeshellarg($rfile)." ".escapeshellarg($sfile)))
+ {
+ // error
+ $this->info("RCS : Error, checkout after checkin failed!");
+ $this->info($this->cmdStatus());
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+
+ /** Make a copy of an RCS item to a given location.
+ *
+ * @param sdir the source directory
+ * @param sfile the source RCS entry
+ * @param ddir the destination directory
+ * @param dfile the destination RCS entry
+ */
+ function copy($sdir,$sfile,$ddir,$dfile)
+ {
+ $this->info("RCS : copying '$sfile' to '$ddir/$dfile'..");
+
+ $spath = $this->spoolPath($sdir, $sfile);
+ if (!is_file($spath)) {
+ $this->info("Error: source file '$spath' does not exist!");
+ return false;
+ }
+ if (!$this->checkDir($ddir))
+ {
+ $this->info("Error: directory '$ddir' does not exist!");
+ return false;
+ }
+ if ($this->checkFile($ddir, $dfile))
+ {
+ $this->info("Error: file '$dfile' already exists in '$ddir'!");
+ return false;
+ }
+ return $this->commit($ddir,$dfile,
+ file_get_contents($spath),
+ "copied from '$ddir/$sfile'");
+ }
+
+
+ /** Delete an RCS file and its corresponding spool entry.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ */
+ function del($dir,$file) {
+ $this->info("RCS : deleting '$file'..");
+ $this->log("rcs_delete","{$this->alias}:$dir/$file");
+ @unlink($this->spoolPath($dir,$file));
+ @unlink($this->rcsFile($dir,$file));
+ }
+
+
+ /** Retrieve differences between two version of a file.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ * @param r1 the first revision
+ * @param r2 the second revision
+ */
+ function diff($dir,$file,$r1,$r2)
+ {
+ $rfile = $this->rcsFile($dir,$file);
+ $this->info("RCS : diffing '$file' ($r1 to $r2)..");
+ $this->cmdExec("rcsdiff -r".escapeshellarg($r1). " -r".escapeshellarg($r2)." ".escapeshellarg($rfile));
+ return $this->cmd_output;
+ }
+
+
+ /** Converts a Word document to HTML and commits the resulting
+ * HTML and images.
+ *
+ * @param dir
+ * @param htmlfile
+ * @param wordfile
+ */
+ function importWordFile($dir,$htmlfile,$wordfile)
+ {
+ global $globals;
+
+ if (!$globals->word_import) {
+ $this->info("Error : support for word import is disabled!");
+ return false;
+ }
+
+ $func = "importWordFile_{$globals->word_import}";
+
+ if (!method_exists($this, $func))
+ {
+ $this->info("Error : the utility '$globals->word_import' is not supported!");
+ return false;
+ }
+
+ return $this->$func($dir, $htmlfile, $wordfile);
+ }
+
+
+ /** Converts a Word document to HTML using wvHtml and commits the resulting
+ * HTML and images.
+ *
+ * @param dir
+ * @param htmlfile
+ * @param wordfile
+ */
+ function importWordFile_wvHtml($dir,$htmlfile,$wordfile)
+ {
+ $tmphtmlfile = "importWord.html";
+ if (($tmpdir = System::mktemp('-d')) == false) {
+ $this->info("Error : could not create temporary directory!");
+ return false;
+ }
+
+ if ($this->cmdExec("wvHtml --targetdir=".escapeshellarg($tmpdir).
+ " --charset=iso-8859-15 ".
+ escapeshellarg($wordfile)." ".escapeshellarg($tmphtmlfile)))
+ {
+ $this->info("Error : wvHtml returned an error!");
+ $this->info($this->cmdStatus());
+ return false;
+ }
+
+ if (!$dh = opendir($tmpdir)) {
+ $this->info("Error : could not find temporary directory '$tmpdir'!");
+ return false;
+ }
+
+ // process the files generated by wvHtml
+ $ok = true;
+ while (($myentry = readdir($dh)) != false) {
+ if (is_file($myfile = "$tmpdir/$myentry")) {
+ if ($myentry == $tmphtmlfile) {
+ $ok = $ok &&
+ $this->commit($dir,$htmlfile,
+ $this->importHtmlString(file_get_contents($myfile)),
+ "Word file import");
+ } else {
+ $ok = $ok &&
+ $this->commit($dir,$myentry,file_get_contents($myfile),
+ "Word file import");
+ }
+ }
+ }
+ closedir($dh);
+
+ return $ok;
+ }
+
+
+ /** Returns raw log entries for an RCS item.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ */
+ function logEntries($dir,$file) {
+ $rfile = $this->rcsFile($dir,$file);
+ $this->cmdExec("rlog ".escapeshellarg($rfile));
+ return $this->cmd_output;
+ }
+
+
+ /** Parse the log entries for an RCS item into an array.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ */
+ function logParse($dir,$file)
+ {
+ // get the log, drop last 2 lines
+ $lines = $this->logEntries($dir,$file);
+ array_pop($lines);
+ array_pop($lines);
+
+ // split into revision, drop first block
+ $revs = split("----------------------------\n", implode("\n",$lines));
+ array_shift($revs);
+
+ // parse info about the revisions
+ $revinfo = array();
+ foreach ($revs as $rev) {
+ $myrev = array();
+ $lines = explode("\n",$rev);
+ preg_match("/^revision (.+)$/",array_shift($lines),$res);
+ $myrev['rev'] = $res[1];
+ preg_match("/^date: ([^;]+); author: ([^;]+); .*$/",array_shift($lines),$res);
+ $myrev['date'] = $res[1];
+ $myrev['author'] = $res[2];
+ $myrev['log'] = implode("\n",$lines);
+ array_push($revinfo,$myrev);
+ }
+ return $revinfo;
+ }
+
+
+ /** Move an RCS item to a given location.
+ *
+ * @param sdir the source directory
+ * @param sfile the source RCS entry
+ * @param ddir the destination directory
+ * @param dfile the destination RCS entry
+ */
+ function move($sdir,$sfile,$ddir,$dfile)
+ {
+ $this->info("RCS : moving '$sfile' to '$ddir/$dfile'..");
+
+
+ // check source files
+ $spath = $this->spoolPath($sdir, $sfile);
+ $srpath = $this->rcsFile($sdir, $sfile);
+
+ if (!is_file($spath)) {
+ $this->info("Error: source file '$spath' does not exist!");
+ return false;
+ }
+
+ if (!is_file($srpath)) {
+ $this->info("Error: source RCS file '$srpath' does not exist!");
+ return false;
+ }
+
+ // check destination
+ $dpath = $this->spoolPath($ddir, $dfile);
+ $drpath = $this->rcsFile($ddir, $dfile);
+
+ if (!$this->checkDir($ddir))
+ {
+ $this->info("Error: directory '$ddir' does not exist!");
+ return false;
+ }
+
+ if (file_exists($dpath)) {
+ $this->info("Error: file '$dfile' already exists in '$ddir'!");
+ return false;
+ }
+
+ if (file_exists($drpath)) {
+ $this->info("Error: file '".basename($drpath)."' already exists in '$ddir'!");
+ return false;
+ }
+
+ if (!rename($spath, $dpath))
+ {
+ $this->info("Error: failed to move '".basename($spath)."' to '".basename($dpath)."' in '$ddir'!");
+ return false;
+ }
+
+ if (!rename($srpath, $drpath))
+ {
+ $this->info("Error: failed to move '".basename($srpath)."' to '".basename($drpath)."' in '$ddir'!");
+ return false;
+ }
+
+
+ //$this->log("rcs_move","{$this->alias}:$dir/$file");
+
+ return true;
+ }
+
+
+ /** Add a new RCS-managed directory.
+ *
+ * @param parent the parent directory
+ * @param dir the directory to add
+ */
+ function newdir($parent,$dir)
+ {
+ @mkdir($this->rcsPath($parent,$dir),0700);
+ @mkdir($this->spoolPath($parent,$dir),0700);
+ }
+
+
+ /** Retrieve differences between two version of a file and prepare for output.
+ *
+ * @param dir parent directory
+ * @param file the RCS entry
+ * @param r1 the first revision
+ * @param r2 the second revision
+ */
+ function dispDiff($dir,$file,$r1,$r2)
+ {
+ $lns = "[0-9]+|[0-9]+,[0-9]+";
+
+ // get diff, strip any leading comments
+ $lines = $this->diff($dir,$file,$r1,$r2);
+ $line = "";
+ while (!preg_match("/^($lns)([acd])($lns)/",$line))
+ $line = array_shift($lines);
+ array_unshift($lines,$line);
+ $raw = implode("\n",$lines);
+
+ $blocks = preg_split("/($lns)([acd])($lns)\n/",$raw,-1,PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
+ $out = array();
+
+ $lold = array_shift($blocks);
+ while ($lold!='')
+ {
+ $type = array_shift($blocks);
+ $lnew = array_shift($blocks);
+ $diff = array_shift($blocks);
+
+ switch ($type) {
+ case 'c':
+ list($a,$b) = split("---\n",$diff,2);
+ break;
+ case 'a':
+ $a = "";
+ $b = $diff;
+ break;
+ case 'd':
+ $a = $diff;
+ $b = "";
+ break;
+ }
+ array_push($out,array($lold,$type,$lnew,$a,$b));
+ $lold = array_shift($blocks);
+ }
+ //array_push($out,array($type,$a,$b));
+ return $out;
+ }
+
+
+ /** Return an RCS-managed directory.
+ *
+ * @param dir the directory
+ * @param loc the visible location for the directory
+ * @param canedit can we edit files in this directory?
+ */
+ function dispDir($dir,$loc,$canedit) {
+ $entries = array();
+
+ if ($pdir = @opendir($this->rcsPath($dir))) {
+ while ( ($file = readdir($pdir)) !== false) {
+ if ( ($file != ".") && ($file != "..") )
+ {
+ $entry = $this->dispEntry($dir,$loc,$file,$canedit);
+ if (!empty($entry))
+ array_push($entries, $entry);
+ }
+ }
+ closedir($pdir);
+ }
+ return $entries;
+ }
+
+
+ /** Returns an RCS "item" (file or directory).
+ *
+ * @param dir parent directory
+ * @param loc visible location for parent directory
+ * @param file the RCS "item"
+ * @param canedit can we edit files this entry?
+ */
+ function dispEntry($dir,$loc,$file,$canedit) {
+ global $globals;
+
+ $view = $edit = $del = $size = $rev = "";
+
+ $myitem = $this->rcsPath($dir,$file);
+
+ // check the RCS entry exists
+ if (!file_exists($myitem)) {
+ $this->info("RCS entry '$myitem' does not exist!");
+ return;
+ }
+
+ if (is_dir($myitem))
+ {
+ // this is a directory, this should not happen!
+ $this->info("Unexpected directory in RCS, skipping : '$myitem'");
+ return;
+ }
+ else if (substr($file,-2) == ",v")
+ {
+ // this is an RCS file
+ $file = substr($file,0,-2);
+
+ // check we have a working copy of this item
+ $spoolitem = $this->spoolPath($dir,$file);
+ if (!is_file($spoolitem))
+ {
+ $this->info("Could not find working copy '$spoolitem'!");
+ $size = "";
+ $icon = "";
+ } else {
+ $size = $this->dispSize(filesize($spoolitem));
+ $icon = $globals->icons->get_mime_icon($spoolitem);
+ }
+
+ // revision info
+ $myrev = array_shift($tmparr = $this->logParse($dir,$file));
+
+ return array(
+ "icon" => $icon,
+ "file" => $file,
+ "rev" => array($myrev['rev'],$rev),
+ "date" => $myrev['date'],
+ "author" => $myrev['author'],
+ "size" => $size
+ );
+
+ }
+ else
+ {
+ $this->info("Unknown RCS entry type : '$myitem'");
+ return;
+ }
+
+ }
+
+
+ /** Format a file size for display.
+ *
+ * @param size the size, in bytes
+ */
+ function dispSize($size)
+ {
+ if ($size < 1000)
+ return "$size B";
+ else if ($size < 1000000)
+ return floor($size/1000)." kB";
+ else
+ return floor($size/1000000)." MB";
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes/diogenes.core.session.inc.php';
+require_once 'diogenes/diogenes.core.logger.inc.php';
+
+/** This class describes a Diogenes session.
+ */
+class DiogenesSession extends DiogenesCoreSession {
+ /** full name */
+ var $fullname;
+ /** is this a native Diogenes account? */
+ var $auth = "native";
+
+
+ /** The constructor.
+ */
+ function DiogenesSession() {
+ $this->DiogenesCoreSession();
+ $this->username = "anonymous";
+ $this->perms->addFlag('public');
+ }
+
+
+ /** Try to do a Diogenes authentication.
+ *
+ * @param page the calling page (by reference)
+ */
+ function doAuth(&$page) {
+ global $globals;
+
+ if ($this->perms->hasflag("auth"))
+ return;
+
+ /* do we have authentication tokens for auth ? */
+ if (isset($_REQUEST['login']) && isset($_REQUEST['response'])) {
+ // remember login for a year
+ setcookie('DiogenesLogin',$_REQUEST['login'],(time()+25920000));
+
+ // check response
+ $res = $globals->db->query( "SELECT user_id,password FROM {$globals->tauth['native']} WHERE username='{$_REQUEST['login']}'");
+
+ if (!list($uid,$password) = mysql_fetch_row($res)) {
+ $page->info(__("Authentication error!"));
+ $this->doLogin($page);
+ }
+
+ if ($_REQUEST['response'] != md5("{$_REQUEST['login']}:$password:{$this->challenge}"))
+ {
+ // log the login failure
+ $logger = new DiogenesCoreLogger($uid);
+ $logger->log("auth_fail",$_REQUEST['login']);
+ $page->info(__("Authentication error!"));
+ $this->doLogin($page);
+ }
+
+ // retrieve user info
+ $res = $globals->db->query("select user_id,username,firstname,lastname,perms from {$globals->tauth['native']} where username='{$_REQUEST['login']}'");
+ list($this->uid,$this->username,$firstname,$lastname,$perms) = mysql_fetch_row($res);
+ $this->fullname = $firstname . ($lastname ? " $lastname" : "");
+
+ // create logger
+ $logstr = $this->username . (empty($page->alias) ? "" : "@{$page->alias}");
+ $_SESSION['log'] = new DiogenesCoreLogger($this->uid);
+ $_SESSION['log']->log("auth_ok",$logstr);
+
+ // set user permissions
+ $this->perms->addFlag('auth');
+ if ($perms == "admin") {
+ $this->perms->addflag('root');
+ }
+
+ } else {
+ $this->doLogin($page);
+ }
+ }
+
+
+ /** Try to login for WebDAV (plain-text password).
+ *
+ * Return true for success, false for failure.
+ */
+ function doAuthWebDAV($user,$pass)
+ {
+ global $globals;
+
+ if ($this->perms->hasflag("auth"))
+ return true;
+
+ // check credentials
+ $pass = md5($pass);
+ $res = $globals->db->query("select user_id,username,perms from {$globals->tauth['native']} where username='$user' and password='$pass'");
+ if (!list($uid,$user,$perms) = mysql_fetch_row($res))
+ return false;
+
+ // retrieve user info
+ $this->uid = $uid;
+ $this->username = $user;
+
+ // create logger
+ $_SESSION['log'] = new DiogenesWebDAVLogger($this->uid,$this->auth,$this->username);
+
+ // set user permissions
+ $this->perms->addFlag('auth');
+ if ($perms == "admin") {
+ $this->perms->addflag('root');
+ }
+
+ return true;
+ }
+
+
+ /** Display login screen.
+ */
+ function doLogin(&$page) {
+ $page->assign('greeting',__("Diogenes login"));
+ $page->assign('msg_connexion', __("Connexion"));
+ $page->assign('msg_password',__("password"));
+ $page->assign('msg_submit',__("Submit"));
+ $page->assign('msg_username', __("username"));
+
+ if (isset($_COOKIE['DiogenesLogin']))
+ $page->assign('username', $_COOKIE['DiogenesLogin']);
+ $page->assign('post',htmlentities($page->script_uri()));
+ $page->assign('challenge',$this->challenge);
+ $page->assign('md5',$page->url("md5.js"));
+ $page->display('login.tpl');
+ exit;
+ }
+
+
+ /** Read a user's permissions for a given barrel.
+ *
+ * @param alias the name of the barrel
+ */
+ function setBarrelPerms($alias) {
+ global $globals;
+
+ // if the user is logged in, refresh his/her permissions
+ if ($this->perms->hasflag('auth')) {
+ if ($this->perms->hasflag('root')) {
+ $this->perms->addflag('user');
+ $this->perms->addflag('admin');
+ } else {
+ $this->perms->rmflag('user');
+ $this->perms->rmflag('admin');
+ }
+
+ // read site specific permissions
+ $res = $globals->db->query("select perms from diogenes_perm where alias='{$alias}'".
+ " and auth='{$this->auth}' and uid='{$this->uid}'");
+ if (mysql_num_rows($res)>0) {
+ $this->perms->addflag('user');
+ list($tmp) = mysql_fetch_row($res);
+ $this->perms->addflag($tmp);
+ }
+ mysql_free_result($res);
+ }
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** This class handles Diogenes spool operations.
+ */
+class DiogenesSpool {
+ /** The barrel we are running on */
+ var $alias;
+ /** Absolute directory location for the barrel's spool. */
+ var $datadir;
+
+ /** The last command that was executed. */
+ var $cmd_call;
+
+ /** The output of the last command that was executed. */
+ var $cmd_output;
+
+ /** The return value of the last command. */
+ var $cmd_return;
+
+ /** The caller. It needs to define the 3 following methods :
+ *
+ * @see info, kill, log
+ */
+ var $caller;
+
+ /** The constructor.
+ *
+ * @param caller the caller
+ * @param alias the alias to work on
+ */
+ function DiogenesSpool(&$caller,$alias) {
+ global $globals;
+ $this->datadir = "{$globals->spoolroot}/$alias";
+ $this->caller =& $caller;
+ $this->alias = $alias;
+ }
+
+
+ /** Execute a shell command and store information about it.
+ *
+ * @param $cmd the command to execute
+ */
+ function cmdExec($cmd)
+ {
+ $this->cmd_call = $cmd;
+ unset($this->cmd_output);
+ unset($this->cmd_return);
+
+ exec($cmd, $this->cmd_output, $this->cmd_return);
+
+ return $this->cmd_return;
+ }
+
+
+ /** Return information about the last command that was executed.
+ */
+ function cmdStatus()
+ {
+ $out =
+ "-- [ command information ] -- \n".
+ "command : {$this->cmd_call}\n".
+ "return value : {$this->cmd_return}\n".
+ "-- [ command output ] --\n".
+ implode("\n", $this->cmd_output)."\n".
+ "--";
+ return $out;
+ }
+
+
+ /** Report an information.
+ *
+ * @param msg
+ */
+ function info($msg) {
+ $this->caller->info($msg);
+ }
+
+
+ /** Die with a given error message.
+ *
+ * @param msg
+ */
+ function kill($msg) {
+ $this->caller->kill($msg);
+ }
+
+
+ /** Record an action to the log.
+ *
+ * @param action
+ * @param data
+ */
+ function log($action,$data) {
+ $this->caller->log($action, $data);
+ }
+
+
+ /** Check that a path is valid.
+ *
+ * @param parent parent directory
+ * @param entry the item
+ * @param fatal should we consider a failure to be fatal?
+ */
+ function checkPath($parent,$entry,$fatal = true) {
+ $ret = preg_match("/^([a-zA-Z0-9\-_]+[\.,\/]?)*$/",$parent)
+ && preg_match("/^([a-zA-Z0-9\-_]+[\., ]?)*$/",$entry);
+
+ if (!$ret && $fatal)
+ $this->kill("malformed path ('$parent','$entry')");
+
+ return $ret;
+ }
+
+
+ /** Add missing tags to a Diogenes page to make it a proper HTML file
+ *
+ * @param html
+ * @see importHtmlString
+ */
+ function exportHtmlString($html)
+ {
+ // if we have the body open & close tags, return raw file
+ if (preg_match("/<body(\s[^>]*|)>(.*)<\/body>/si",$html))
+ return $html;
+
+ return "<html>\n<head><title>Diogenes page</title></head>\n<body>$html</body>\n</html>\n";
+ }
+
+
+ /** Makes a Diogenes page from a proper HTML file, that is return everything
+ * inside the "body" tags.
+ *
+ * @param html
+ * @see exportHtmlString
+ */
+ function importHtmlString($html)
+ {
+ // if we cannot find the body open & close tags, return raw file
+ if (!preg_match("/<body(\s[^>]*|)>(.*)<\/body>/si",$html,$matches))
+ return $html;
+
+ return $matches[2];
+ }
+
+
+ /** Return the path of a spool "item" (file or directory).
+ *
+ * @param parent parent directory (optional)
+ * @param entry the item
+ */
+ function spoolPath($parent="",$entry="") {
+ $this->checkPath($parent,$entry);
+ return $this->datadir.($parent ? "/$parent": "") . ($entry ? "/$entry" : "");
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes.page.inc.php';
+require_once 'Barrel/Options.php';
+
+/** This class describes a toplevel Diogenes page.
+ */
+class DiogenesToplevel extends DiogenesPage {
+
+ /** The constructor.
+ *
+ * @param admin is this an admin page?
+ */
+ function DiogenesToplevel($admin = false)
+ {
+ // page basics
+ $this->DiogenesPage();
+ $this->makeHead();
+ $this->assign('site',"Diogenes");
+ $this->assign('page', $admin ? __("Toplevel administration") : __("Home"));
+
+ // start session
+ $this->startSession();
+
+ // handle logout request
+ if (isset($_REQUEST['dologout']))
+ $this->doLogout();
+
+ // do auth
+ if ($admin || isset($_REQUEST['doauth']))
+ $_SESSION['session']->doAuth($this);
+
+ if ($admin && !$_SESSION['session']->hasPerms("root"))
+ $this->kill(__("You are not authorized to view this page!"), 403);
+ }
+
+
+
+ /** Build the contents of the page's "head" tag.
+ */
+ function makeHead()
+ {
+ array_push($this->head, '<meta name="description" content="Diogenes content management system" />');
+ array_push($this->head, '<meta name="keywords" content="Diogenes, Polytechnique.org, Jeremy Lainé" />');
+ array_push($this->head, '<link rel="stylesheet" href="'.$this->url("common.css").'" type="text/css" />');
+ array_push($this->head, '<link rel="stylesheet" href="'.$this->url("toplevel.css").'" type="text/css" />');
+ array_push($this->head, '<link rel="icon" href="'.$this->url("images/favicon.png").'" type="image/png" />');
+ }
+
+
+ /** Build the page's menu.
+ */
+ function makeMenu()
+ {
+ global $globals;
+
+ // menu style & theme
+ $this->assign('menustyle', $globals->menu_style);
+ $this->assign('menutheme', $globals->menu_theme);
+
+ // menu items
+ array_push($this->menu, array(0,"Diogenes", "", 1));
+ array_push($this->menu, array(1,__("Home"), $this->url("")));
+ array_push($this->menu, array(1,__("User manual"), __("http://diogenes-doc.polytechnique.org/en-user/")) );
+
+ if ($this->isLogged()) {
+ array_push($this->menu, array(1,__("Preferences"),$this->url("prefs.php")) );
+ array_push($this->menu, array(1,__("Logout"), $this->url("?dologout=1")) );
+ } else {
+ array_push($this->menu, array(1,__("Login"), $this->url("?doauth=1")) );
+ }
+ if ($this->isRoot()) {
+ array_push($this->menu, array(0,__("Sites"), "", 1));
+ array_push($this->menu, array(1, __("Root manual"), __("http://diogenes-doc.polytechnique.org/en-root/")) );
+ array_push($this->menu, array(1,__("List of sites"), $this->url("toplevel/")) );
+ array_push($this->menu, array(1,__("Administrators"),$this->url("toplevel/admins.php")) );
+ array_push($this->menu, array(1,__("Global options"),$this->url("toplevel/options.php")) );
+ array_push($this->menu, array(1,__("Plugins"),$this->url("toplevel/plugins.php")));
+ array_push($this->menu, array(0,__("Users"), "", 1));
+ array_push($this->menu, array(1,__("User accounts"),$this->url("toplevel/accounts.php")) );
+ array_push($this->menu, array(1,__("Browse user log"),$this->url("toplevel/logger.php")) );
+ array_push($this->menu, array(1,__("Logger actions"),$this->url("toplevel/logger_actions.php")) );
+ }
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'HTTP/WebDAV/Server.php';
+require_once 'diogenes/diogenes.misc.inc.php';
+require_once 'diogenes.webdav.logger.inc.php';
+require_once 'Barrel.php';
+require_once 'Barrel/Page.php';
+
+/**
+ * Filesystem access using WebDAV
+ *
+ */
+class DiogenesWebDAV extends HTTP_WebDAV_Server
+{
+ /** The Diogenes_Barrel representing the barrel */
+ var $barrel;
+
+ /** Debugging log file handle */
+ var $debug_handle;
+
+ /** Capture out to log ? */
+ var $debug_capture;
+
+ /**
+ * The constructor
+ */
+ function DiogenesWebDAV()
+ {
+ global $globals;
+
+ // call parent constructor
+ $this->HTTP_WebDAV_Server();
+
+ // construct new session each time, there is no practical way
+ // of tracking sessions with WebDAV clients
+ $_SESSION['session'] = new $globals->session;
+
+ $this->debug_capture = $globals->debugwebdav_capture;
+
+ // init debug log if necessary
+ if ($globals->debugwebdav)
+ {
+ $this->debugInit($globals->debugwebdav);
+ register_shutdown_function(array(&$this, 'debugClose'));
+ }
+
+ }
+
+
+ /**
+ * Hack to support barrels on virtualhosts.
+ *
+ * @param path
+ * @param for_html
+ */
+ function _urlencode($path, $for_html=false) {
+ if ($this->barrel->vhost) {
+ $path = preg_replace("/^(.*)\/site\/{$this->barrel->alias}\/(.*)/", "/\$2",$path);
+ }
+ return parent::_urlencode($path, $for_html);
+ }
+
+
+ /**
+ * Perform authentication
+ *
+ * @param type HTTP Authentication type (Basic, Digest, ...)
+ * @param user Username
+ * @param pass Password
+ */
+ function check_auth($type, $user, $pass)
+ {
+ global $globals;
+
+ // WebDAV access is only granted for users who log in
+ if (!$_SESSION['session']->doAuthWebDAV($user,$pass))
+ return false;
+
+ // we retrieve the user's permissions on the current barrel
+ $_SESSION['session']->setBarrelPerms($this->barrel->alias);
+
+ return true;
+ }
+
+
+
+ /**
+ * Handle a request to copy a file or directory.
+ *
+ * @param options
+ */
+ function copy($options)
+ {
+ // we do not allow copying files
+ return "403 Forbidden";
+ }
+
+
+
+
+ /**
+ * Open the debugging log file
+ */
+ function debugInit($debugfile)
+ {
+ if (empty($debugfile))
+ return;
+
+ // open the log file
+ if ($fp = fopen($debugfile, "a"))
+ {
+ $this->debug_handle = $fp;
+ }
+ }
+
+
+ /**
+ * Log a debugging message
+ */
+ function debug($func, $msg)
+ {
+ if (isset($this->debug_handle))
+ {
+ $out = sprintf("[%s] %s : %s\n",date("H:i:s"), $func, $msg);
+ fputs($this->debug_handle, $out);
+ }
+ }
+
+
+ /**
+ * Close the debugging log file
+ */
+ function debugClose()
+ {
+ if (isset($this->debug_handle))
+ {
+ fclose($this->debug_handle);
+ }
+ }
+
+
+ /**
+ * Handle a request to delete a file or directory.
+ *
+ * @param options
+ */
+ function delete($options)
+ {
+ global $globals;
+ $pathinfo = $this->parsePathInfo($options["path"]);
+
+ // get the page ID and write permissions for the current path
+ $pid = $this->barrel->getPID($pathinfo['dir']);
+ if (!$pid || !$bpage = Diogenes_Barrel_Page::fromDb($this->barrel, $pid))
+ {
+ $this->debug('delete', "Could not find directory {$pathinfo['dir']}");
+ return false;
+ }
+
+ // check permissions
+ if (!$_SESSION['session']->hasPerms($bpage->props['wperms']))
+ {
+ $this->debug('delete', "Insufficient privileges (needed : {$bpage->props['wperms']})");
+ return "403 Forbidden";
+ }
+
+ // create an RCS handle
+ $rcs = $this->getRcs();
+ $rcs->del($pid,$pathinfo['file']);
+ return "204 No content";
+ }
+
+
+ /**
+ * Return information about a file or directory.
+ *
+ * @param fspath path of the filesystem entry
+ * @param uri the address at which the item is visible
+ */
+ function fileinfo($fspath, $uri)
+ {
+ global $globals;
+
+ $file = array();
+ $file["path"]= $uri;
+
+ $file["props"][] = $this->mkprop("displayname", strtoupper($uri));
+
+ $file["props"][] = $this->mkprop("creationdate", filectime($fspath));
+ $file["props"][] = $this->mkprop("getlastmodified", filemtime($fspath));
+
+ if (is_dir($fspath)) {
+ $file["props"][] = $this->mkprop("getcontentlength", 0);
+ $file["props"][] = $this->mkprop("resourcetype", "collection");
+ $file["props"][] = $this->mkprop("getcontenttype", "httpd/unix-directory");
+ } else {
+ $file["props"][] = $this->mkprop("resourcetype", "");
+ $file["props"][] = $this->mkprop("getcontentlength", filesize($fspath));
+ if (is_readable($fspath)) {
+ $file["props"][] = $this->mkprop("getcontenttype", get_mime_type($fspath));
+ } else {
+ $file["props"][] = $this->mkprop("getcontenttype", "application/x-non-readable");
+ }
+ }
+ return $file;
+ }
+
+
+ /**
+ * Handle a GET request.
+ *
+ * @param options
+ */
+ function GET(&$options)
+ {
+ global $globals;
+ $pathinfo = $this->parsePathInfo($options["path"]);
+
+ // get the page ID and read permissions for the current path
+ $pid = $this->barrel->getPID($pathinfo['dir']);
+ if (!$pid || !$bpage = Diogenes_Barrel_Page::fromDb($this->barrel, $pid))
+ {
+ $this->debug('PROPFIND', "Could not find directory {$pathinfo['dir']}");
+ return false;
+ }
+
+ // check permissions
+ if (!$_SESSION['session']->hasPerms($bpage->props['perms']))
+ {
+ $this->debug('PROPFIND', "Insufficient privileges (needed : {$bpage->props['perms']})");
+ return "403 Forbidden";
+ }
+
+ // create stream
+ $fspath = $this->barrel->spool->spoolPath($pid,$pathinfo['file']);
+ if (file_exists($fspath)) {
+ $options['mimetype'] = get_mime_type($fspath);
+
+ // see rfc2518, section 13.7
+ // some clients seem to treat this as a reverse rule
+ // requiering a Last-Modified header if the getlastmodified header was set
+ $options['mtime'] = filemtime($fspath);
+ $options['size'] = filesize($fspath);
+
+ // TODO check permissions/result
+ $options['stream'] = fopen($fspath, "r");
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ /**
+ * Return an RCS handle.
+ */
+ function getRcs()
+ {
+ global $globals;
+ return new $globals->rcs($this,$this->barrel->alias,$_SESSION['session']->username);
+ }
+
+
+ /**
+ * PROPFIND method handler
+ *
+ * @return void
+ */
+ function http_PROPFIND()
+ {
+ $this->debug('http_PROPFIND', "called");
+ return parent::http_PROPFIND();
+ }
+
+
+ /** Report an information. Needed for RCS operations.
+ *
+ * @param msg
+ *
+ * @see DiogenesRcs
+ */
+ function info($msg) {
+ // we do nothing
+ }
+
+
+ /**
+ * Die with a given error message. Needed for RCS operations.
+ *
+ * @param msg
+ *
+ * @see DiogenesRcs
+ */
+ function kill($msg) {
+ $this->http_status("400 Error");
+ exit;
+ }
+
+
+ /**
+ * Record an action to the log. Needed for RCS operations.
+ *
+ * @param action
+ * @param data
+ *
+ * @see DiogenesRcs
+ */
+ function log($action,$data) {
+ if (isset($_SESSION['log']) && is_object($_SESSION['log']))
+ $_SESSION['log']->log($action,$data);
+ }
+
+
+ /**
+ * Handle an MKCOL (directory creation) request.
+ *
+ * @param options
+ */
+ function MKCOL($options)
+ {
+ // we do not allow directory creations
+ return "403 Forbidden";
+ }
+
+
+ /**
+ * Handle a request to move/rename a file or directory.
+ *
+ * @param options
+ */
+ function move($options)
+ {
+ // we do not allow moving files
+ return "403 Forbidden";
+ }
+
+
+ /**
+ * Break down a PATH_INFO into site, page id and file for WebDAV
+ * We accept a missing trailing slash after the directory name.
+ *
+ * @param path the path to parse
+ */
+ function parsePathInfo($path) {
+ global $globals;
+
+ $this->debug('parsePathInfo', "path : $path");
+ if (empty($path) || !preg_match("/^\/([^\/]+)\/webdav(\/((.+)\/)?([^\/]*))?$/",$path,$asplit))
+ return false;
+
+ $split['alias'] = $asplit[1];
+ $split['dir'] = isset($asplit[4]) ? $asplit[4] : "";
+ $split['file'] = isset($asplit[5]) ? $asplit[5] : "";
+
+ // check that what we considered as a file is not in fact a directory
+ // with a missing trailing slash
+ /*
+ if ( empty($split['dir']) and
+ !empty($split['file']) and
+ (mysql_num_rows($globals->db->query("select location from {$split['alias']}_page where location='{$split['file']}'"))>0))
+ {
+ $split['dir'] = $split['file'];
+ $split['file'] = "";
+ }
+ */
+ return $split;
+ }
+
+/**
+ * Handle a PROPFIND request.
+ *
+ * @param options
+ * @param files
+ */
+ function PROPFIND($options, &$files)
+ {
+ global $globals;
+ $pathinfo = $this->parsePathInfo($options["path"]);
+
+ // get the page ID and read permissions for the current path
+ $pid = $this->barrel->getPID($pathinfo['dir']);
+ if (!$pid || !$bpage = Diogenes_Barrel_Page::fromDb($this->barrel, $pid))
+ {
+ $this->debug('PROPFIND', "Could not find directory {$pathinfo['dir']}");
+ return false;
+ }
+
+ // check permissions
+ if (!$_SESSION['session']->hasPerms($bpage->props['perms']))
+ {
+ $this->debug('PROPFIND', "Insufficient privileges (needed : {$bpage->props['perms']})");
+ return "403 Forbidden";
+ }
+
+ // get absolute fs path to requested resource
+ $fspath = $this->barrel->spool->spoolPath($pid,$pathinfo['file']);
+
+ // sanity check
+ if (!file_exists($fspath)) {
+ return false;
+ }
+
+ // prepare property array
+ $files["files"] = array();
+
+ // store information for the requested path itself
+ $files["files"][] = $this->fileinfo($fspath, $options["path"]);
+
+ // information for contained resources requested?
+ if (!$pathinfo['file'] && !empty($options["depth"])) {
+
+ // make sure path ends with '/'
+ if (substr($options["path"],-1) != "/") {
+ $options["path"] .= "/";
+ }
+
+ // list the sub-directories
+ $res = $globals->db->query("select PID,location from {$this->barrel->table_page} where parent='$pid'");
+ while (list($dpid,$dloc) = mysql_fetch_row($res)) {
+ $dpath = $this->barrel->spool->spoolPath($dpid);
+ $duri = $options["path"].$dloc;
+ $files["files"][] = $this->fileinfo($dpath, $duri);
+ }
+ mysql_free_result($res);
+
+ // now list the files in the current directory
+ $handle = @opendir($fspath);
+ if ($handle) {
+ // ok, now get all its contents
+ while ($filename = readdir($handle)) {
+ if ($filename != "." && $filename != "..") {
+ $fpath = $this->barrel->spool->spoolPath($pid,$filename);
+ $furi = $options["path"].$filename;
+ if (!is_dir($fpath))
+ $files["files"][] = $this->fileinfo ($fpath, $furi);
+ }
+ }
+ }
+ }
+
+ // ok, all done
+ return true;
+ }
+
+ /**
+ * Handle a PROPPATCH request.
+ *
+ * @param options
+ */
+ function proppatch(&$options)
+ {
+ global $prefs, $tab;
+
+ $msg = "";
+
+ $path = $options["path"];
+
+ $dir = dirname($path)."/";
+ $base = basename($path);
+
+ foreach($options["props"] as $key => $prop) {
+ if($ns == "DAV:") {
+ $options["props"][$key][$status] = "403 Forbidden";
+ }
+ }
+
+ return "";
+ }
+
+ /**
+ * Handle a PUT request.
+ *
+ * @param options
+ */
+ function PUT(&$options)
+ {
+ global $globals;
+ $pathinfo = $this->parsePathInfo($options["path"]);
+
+ // we do not support multipart
+ if (!empty($options["ranges"]))
+ return "501";
+
+ // get the page ID and write permissions for the current path
+ $pid = $this->barrel->getPID($pathinfo['dir']);
+ if (!$pid || !$bpage = Diogenes_Barrel_Page::fromDb($this->barrel, $pid))
+ {
+ $this->debug('PROPFIND', "Could not find directory {$pathinfo['dir']}");
+ return false;
+ }
+
+ // check permissions
+ if (!$_SESSION['session']->hasPerms($bpage->props['wperms']))
+ {
+ $this->debug('PROPFIND', "Insufficient privileges (needed : {$bpage->props['wperms']})");
+ return "403 Forbidden";
+ }
+
+ // create an RCS handle
+ $rcs = $this->getRcs();
+ $options["new"] = !file_exists($rcs->rcsFile($pid,$pathinfo['file']));
+
+ // read content
+ $content = "";
+ while (!feof($options["stream"])) {
+ $content .= fread($options["stream"], 4096);
+ }
+
+ // if this is a barrel page, strip extraneous tags
+ if ($pathinfo['file'] == $globals->htmlfile)
+ $content = $rcs->importHtmlString($content);
+
+ // perform commit
+ if (!$rcs->commit($pid,$pathinfo['file'],$content,"WebDAV PUT of {$pathinfo['file']}"))
+ return "400 Error";
+
+ // if this is Word master document, do the HTML conversion
+ if ($globals->word_import && $pathinfo['file'] == $globals->wordfile) {
+ $myfile = $this->barrel->spool->spoolPath($pid,$globals->wordfile);
+ $rcs->importWordFile($pid, $globals->htmlfile, $myfile);
+ }
+
+ return $options["new"] ? "201 Created" : "204 No Content";
+ }
+
+
+ /**
+ * Serve a webdav request
+ */
+ function ServeRequest()
+ {
+ global $globals;
+
+ // break down path into site and location components
+ if (!($pathinfo = $this->parsePathInfo($_SERVER['PATH_INFO'])))
+ {
+ $this->http_status("404 not found");
+ exit;
+ }
+
+ // Retrieve site-wide info from database
+ $this->barrel = new Diogenes_Barrel($pathinfo['alias'], $this);
+ if (!$this->barrel->alias)
+ {
+ $this->debug("Could not find barrel '{$pathinfo['alias']}'");
+ $this->http_status("404 not found");
+ exit;
+ }
+ $this->debug('ServeRequest', "barrel : ".$this->barrel->alias);
+
+ // Debugging info
+ $props = array( 'REQUEST_METHOD', 'REQUEST_URI', 'SCRIPT_NAME', 'PATH_INFO');
+ foreach ($props as $prop) {
+ $this->debug('ServeRequest', "$prop : ". $_SERVER[$prop]);
+ }
+
+ // Here we perform some magic on the script name (on PHP 4.3.10)
+ // If the script is addressed by REQUEST_URI /site/foo/bar/ :
+ // - Apache 1.x returns /site as the SCRIPT_NAME
+ // - Apache 2.x returns /site.php as the SCRIPT_NAME
+ //
+ // We set SCRIPT_NAME to match the REQUEST_URI minus the PATH_INFO
+ //
+ $_SERVER['SCRIPT_NAME'] = substr($_SERVER['REQUEST_URI'], 0, - strlen($_SERVER['PATH_INFO']));
+ $this->debug('ServeRequest', "SCRIPT_NAME(mod) : ". $_SERVER['SCRIPT_NAME']);
+
+ // turn on output buffering
+ ob_start();
+
+ // let the base class do all the work
+ parent::ServeRequest();
+
+ // stop output buffering
+ $out = ob_get_contents();
+ ob_end_clean();
+
+ // to support barrels on virtualhosts, we rewrite the URLs
+ if ($this->barrel->vhost)
+ {
+ $ohref = (@$_SERVER["HTTPS"] === "on" ? "https:" : "http:");
+ $ohref.= "//".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
+ $ohref.= "/" . $this->barrel->alias . "/webdav/";
+ $this->debug('ServeRequest', "ohref : ".$ohref);
+
+ $vhref = (@$_SERVER['HTTPS'] === "on" ? "https:" : "http:");
+ $vhref.= "//".$this->barrel->vhost . "/webdav/";
+ $this->debug('ServeRequest', "vhref : ".$vhref);
+
+ $out = str_replace($ohref, $vhref, $out);
+ $out = str_replace('<D:displayname>/'.strtoupper($this->barrel->alias).'/WEBDAV/', '<D:displayname>/WEBDAV/', $out);
+ }
+
+ // send output
+ echo $out;
+
+ // if requested, log the output that is sent to the client
+ if ($this->debug_capture)
+ {
+ $this->debug('ServeRequest', "out\n--- begin --\n$out--- end ---\n");
+ }
+
+ }
+
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'diogenes/diogenes.core.logger.inc.php';
+
+/** Class for logging WebDAV activity.
+ *
+ * The difference with DiogenesCoreLogger is that we do not have
+ * PHP sessions in WebDAV mode so we need a small hack to avoid creating
+ * a new 'session' entry for each operation.
+ */
+class DiogenesWebDAVLogger extends DiogenesCoreLogger {
+
+ /** is this a new WebDAV 'session' ? */
+ var $newsession;
+
+ /** WebDAV 'session' duration in seconds */
+ var $sessionlength = 1800;
+
+ /** The constructor, creates a new entry in the sessions table
+ *
+ * @param $uid the id of the logged user
+ * @param $auth authentication method for the logged user
+ * @param $username the username of the logged user
+ * @return VOID
+ */
+ function DiogenesWebDAVLogger($uid,$auth,$username) {
+ global $globals;
+
+ $this->DiogenesCoreLogger($uid,'',$auth,'');
+
+ if ($this->newsession) {
+ $this->log("auth_ok","{$username}@WebDAV");
+ }
+ }
+
+
+ /** Try to pickup an existing session, otherwise create a new entry
+ *
+ * @param $uid the id of the logged user
+ * @param $suid the id of the administrator who has just su'd to the user
+ * @param $auth authentication method for the logged user
+ * @param $sauth authentication method for the su'er
+ * @return session the session id
+ */
+ function writeSession($uid,$suid,$auth,$sauth) {
+ global $globals;
+
+ // we look for a session with the same user, auth and browser that is less
+ // than $sessionlength seconds old
+ $browser = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '');
+ $stime = date("YmdHis",time()-$this->sessionlength);
+ $res = $globals->db->query("select id from {$this->table_sessions} where uid='$uid' and auth='$auth' and browser='$browser' and start > $stime");
+
+ if (list($session) = mysql_fetch_row($res)) {
+ // we have an existing session
+ $this->newsession = false;
+ } else {
+ // we do not have an existing session
+ $this->newsession = true;
+ $session = parent::writeSession($uid,$suid,$auth,$sauth);
+ }
+ mysql_free_result($res);
+ return $session;
+ }
+
+}
+
+?>
--- /dev/null
+The following people contributed to the Diogenes library.
+
+Pierre Habouzit <pierre.habouzit AT m4x.org>
+ * various database access optimisations
+ * database debugging code
+ * improvements in readability in case of sets, enums, or `JOIN' values
+
+Jeremy Lainé <jeremy.laine@m4x.org>
+ * original author of the Diogenes library
+ * flagset class
+ * log and log browsing system
+ * table viewer class
+
+Loïc Le Loarer
+ * original mailer code
+
+Polytechnique.org team
+ * various bits of code
+
--- /dev/null
+libdiogenes 0.9.18
+ * improved - (mime) recognise MIME type of OMA DRM content
+ * added - (mime) add function to retrieve a multipart content's boundary
+
+libdiogenes 0.9.17.2
+ * removed - drop checkLogger function in diogenes.core.page.inc.php
+
+libdiogenes 0.9.17
+ * improved - recognise MIME type of Java archives and descriptors
+ * improved - split MIME handling to diogenes.mime.inc.php
+ * improved - getUsername and getUserId perform caching of the results,
+ actual lookup is moved to lookupUsername and lookupUserId
+
+libdiogenes 0.9.16
+ * fixed - (hermes mailer) fix a typo in the addBcc method
+
+libdiogenes 0.9.15
+ * improved - make mysql_insert_id and such functions work with debug mode on
+ * added - (hermes mailer) add HermesMailer class to handle mail operations
+ * improved - use __FILE__ to guess where other includes are. we don't depend
+ of include_path anymore
+ * improved - rand_token improved again
+ * added - (db creator) add class to handle database upgrades
+ * improved - (table editor) refine locked / hidden fields handling
+ * improved - (table editor) use set_maxrows to chop results into pages
+
+libdiogenes 0.9.14
+ * improved - rand_token now generates pass without I/l/1 or 0/O wich are
+ confusing for users (those are replaced with !/;/? and %/&)
+ * improved - (table editor) make it possible to edit the id field
+ * improved - renamed mime_content_type to get_mime_type to avoid confusion
+ * added - (table editor) add support for lock and hidden fields
+ * added - (table editor) add support for additional WHERE conditions
+ * improved - (table editor) make it possible to hide id field in the summary
+ * improved - (table editor) add a read-only mode
+
+libdiogenes 0.9.13
+ * fixed - return correct mimetype for .xls and .ppt files
+ * improved - (log browser) reduce calls to getUsername by caching results
+ * improved - (log browser) display a message when search criteria are missing
+ * fixed - (table editor) restore the 'delete' button which had gone missing
+
+libdiogenes 0.9.11
+ * fixed - check that PHP has MySQL support
+ * improved - internationalisation support for the log browser
+ * improved - internationalisation support for the table editor
+ * added - diogenes_func_tag, to produce generic XHTML tags
+ * removed - diogenes_func_meta, does not serve any useful purpose
+
+libdiogenes 0.9.10
+ * improved - better handling of EXPLAIN results in database debugger
+ * improved - use require_once to prevent multiple inclusions
+ * improved - made getUserId/getUsername static members of DiogenesCoreSession
+ * improved - DiogenesTableEditor/DiogenesLoggerView do not display anything
+
+libdiogenes 0.9.9.3
+ * improved - database field type autodetection for timestamps/datetime
+ * improved - DiogenesTableEditor can now translate set and enum values in a
+ more human readable form
+ * added - DiogenesTableEditor::describe_join_value to describe values that
+ are some non human readable id, in order to provide selectable, and
+ readable values
+ * added - diogenes_func_extval, a template function 'extval' that do the same
+ as diogenes_func_flags for 'join_values' (see just above)
+ * improved - table-editor.tpl in order to use the preceding improvements
+
+libdiogenes 0.9.9.2
+ * fixed - added missing mysql_free_results in logger
+ * improved - break down logger constructor into functions
+
+libdiogenes 0.9.9.1
+ * fixed - use UNIX_TIMESTAMP when retrieving dates in log browser
+
+libdiogenes 0.9.9
+ * added - replacement for mime_content_type
+ * fixed - fix faulty date selection in log browser
+
+libdiogenes 0.9.8.3
+ * improved - large speed improvements for log browsing
+ * improved - made it possible to override getUserId and getUsername
+ * improved - enhanced database debugging
+
+libdiogenes 0.9.8.1
+ * fixed - bugfix for diff viewing
+
+libdiogenes 0.9.8
+ * fixed - stripped one too many characters in diff viewer
+
+libdiogenes 0.9.7
+ * improved - display of authentication method (native, etc.)
+
+libdiogenes 0.9.5
+ * started ChangeLog
+ * added - replacement for file_get_contents
+ * added - the table editor automatically probes the table
+
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** This class describes Diogenes' global settings.
+ */
+class DiogenesCoreGlobals {
+ /** Absolute directory location of the Diogenes library */
+ var $libroot;
+ /** Absolute directory location of Diogenes root. */
+ var $root;
+ /** The Diogenes root URL */
+ var $rooturl;
+
+ /** The database handler. */
+ var $db;
+
+ /** The database. */
+ var $dbdb = "diogenes";
+ /** The database server. */
+ var $dbhost = "localhost";
+ /** The user to access the database. */
+ var $dbuser = "diogenes";
+ /** The password to connect to the database. */
+ var $dbpwd;
+
+ /** The database table holding the logger actions */
+ var $table_log_actions = "diogenes_logactions";
+ /** The database table holding the logger events */
+ var $table_log_events = "diogenes_logevents";
+ /** The database table holding the logger sessions */
+ var $table_log_sessions = "diogenes_logsessions";
+ /** The class to use for session handling. */
+ var $session = 'DiogenesCoreSession';
+ /** The function to call for translation. */
+ var $gettext = 'gettext';
+
+
+ /** Connect to the database server.
+ */
+ function dbconnect()
+ {
+ $db = new DiogenesDatabase($this->dbdb, $this->dbhost, $this->dbuser, $this->dbpwd);
+ if (!$db->connect_id)
+ die("Could not connect to database (".mysql_error().")");
+ $this->db = $db;
+ }
+
+ /** Add some automatic hyperlinks to a text.
+ *
+ * @param in the text to beautify
+ */
+ function urlise($in)
+ {
+ $out = str_replace("Polytechnique.org","<a href=\"http://www.polytechnique.org/\">Polytechnique.org</a>",$in);
+ $out = str_replace("Diogenes","<a href=\"http://opensource.polytechnique.org/diogenes/\">Diogenes</a>",$out);
+ return $out;
+ }
+
+}
+
+
+/** Translation function.
+ *
+ * @param msg the message to translate
+ */
+function __($msg)
+{
+ global $globals;
+ $func = $globals->gettext;
+
+ if (function_exists($func))
+ return $func($msg);
+ else
+ return $msg;
+}
+
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** class for logging user activity
+ *
+ */
+class DiogenesCoreLogger {
+ /** user id */
+ var $uid;
+ /** id of the session */
+ var $session;
+ /** list of available actions */
+ var $actions;
+
+ /** db table holding the list of actions */
+ var $table_actions;
+ /** db table holding the list of actions */
+ var $table_events;
+ /** db table holding the list of actions */
+ var $table_sessions;
+
+ /** The constructor, creates a new entry in the sessions table
+ *
+ * @param $uid the id of the logged user
+ * @param $suid the id of the administrator who has just su'd to the user
+ * @param $auth authentication method for the logged user
+ * @param $sauth authentication method for the su'er
+ * @return VOID
+ */
+ function DiogenesCoreLogger($uid,$suid='',$auth='',$sauth='') {
+ global $globals;
+
+ // read database table names from globals
+ $this->table_actions = $globals->table_log_actions;
+ $this->table_events = $globals->table_log_events;
+ $this->table_sessions = $globals->table_log_sessions;
+
+ // write the session entry
+ $this->uid = $uid;
+ $this->session = $this->writeSession($uid,$suid,$auth,$sauth);
+
+ // retrieve available actions
+ $this->actions = $this->readActions();
+ }
+
+
+ /** Creates a new session entry in database and return its ID.
+ *
+ * @param $uid the id of the logged user
+ * @param $suid the id of the administrator who has just su'd to the user
+ * @param $auth authentication method for the logged user
+ * @param $sauth authentication method for the su'er
+ * @return session the session id
+ */
+ function writeSession($uid,$suid,$auth,$sauth) {
+ global $globals;
+
+ $ip = $_SERVER['REMOTE_ADDR'];
+ $host = strtolower(gethostbyaddr($_SERVER['REMOTE_ADDR']));
+ $browser = (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '');
+ $sql = "insert into {$this->table_sessions} set uid='$uid',host='$host',ip='$ip',browser='$browser'";
+ // optional parameters
+ if ($suid)
+ $sql .= ",suid='$suid'";
+ if ($auth)
+ $sql .= ",auth='$auth'";
+ if ($sauth)
+ $sql .= ",sauth='$sauth'";
+
+ $globals->db->query($sql);
+
+ return $globals->db->insert_id();
+ }
+
+
+ /** Reads available actions from database.
+ *
+ * @return actions the available actions
+ */
+ function readActions() {
+ global $globals;
+
+ $res=$globals->db->query("select id,text from {$this->table_actions}");
+ while(list($action_id,$action_text)=mysql_fetch_row($res))
+ $actions[$action_text] = $action_id;
+
+ mysql_free_result($res);
+
+ return $actions;
+ }
+
+
+ /** Logs an action and its related data.
+ *
+ * @param $action le type d'action
+ * @param $data les données (id de liste, etc.)
+ * @return VOID
+ */
+ function log($action,$data="") {
+ global $globals;
+
+ if (isset($this->actions[$action]))
+ $globals->db->query("insert into {$this->table_events} set session='{$this->session}',action='{$this->actions[$action]}',data='{$data}'");
+ else
+ echo "unknown action : $action<br />";
+ }
+
+ /** Print out the id for the current session
+ * @return VOID
+ */
+ function debug() {
+ echo "session=".$this->session."<br />";
+ echo "uid=".$this->uid."<br />";
+ print_r($this->actions);
+ echo "<br />";
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once 'Smarty.class.php';
+
+/** Base class for all of Diogenes' pages. This class is purposefully
+ * kept very generic as it is part of the Diogenes library which is
+ * also used by Lycee-vanGogh.net.
+ */
+class DiogenesCorePage extends Smarty {
+ /** The constructor.
+ */
+ function DiogenesCorePage() {
+ global $globals;
+
+ // smarty definitions
+ $this->Smarty();
+ $this->template_dir = $globals->root."/templates";
+ $this->config_dir = $globals->root."/configs";
+ $this->compile_dir = $globals->spoolroot."/templates_c";
+
+ $this->register_function("extval","diogenes_func_extval");
+ $this->register_function("flags","diogenes_func_flags");
+ $this->register_function("a","diogenes_func_a");
+ $this->register_function("checkbox","diogenes_func_checkbox");
+ $this->register_function("diff","diogenes_func_diff");
+ $this->register_function("menu_item","diogenes_func_menu_item");
+ $this->register_function("tag","diogenes_func_tag");
+ $this->register_function("toolbar","diogenes_func_toolbar");
+ $this->debugging_ctrl = true;
+
+ // smarty assignments
+ $this->assign('script_self',$this->script_self());
+ }
+
+
+ /** Check that $_SESSION['session'] is usable
+ */
+ function checkSession()
+ {
+ return isset($_SESSION['session']) && is_object($_SESSION['session']);
+ }
+
+
+ /** Return the current script location.
+ */
+ function script_self() {
+ $url = explode("?",$this->script_uri());
+ return $url[0];
+ }
+
+
+ /** Return the current URI.
+ */
+ function script_uri() {
+ return $_SERVER['REQUEST_URI'];
+ }
+
+
+ /** Returns the URL to a page relative to current location.
+ *
+ * @param rel
+ */
+ function url($rel) {
+ global $globals;
+
+ return $globals->rooturl.$rel;
+ }
+
+}
+
+
+/** Displays an anchor tag.
+ *
+ * Parameters:
+ * +lnk an array containing([href],text,icon)
+ * +class
+ *
+ * @param params the function input
+ */
+function diogenes_func_a($params)
+{
+ extract($params);
+ if (empty($lnk))
+ return;
+
+ if (is_array($lnk)) {
+ $text = $lnk[0];
+ $href = $lnk[1];
+ $icon = isset($lnk[2]) ? $lnk[2] : '';
+ } else {
+ $text = $lnk;
+ }
+
+ if (empty($href) && empty($class))
+ $class = "empty";
+
+ // we have either an href or a class
+ return "<a"
+ .( empty($class) ? "" : " class=\"$class\"")
+ .( empty($href) ? "" : " href=\"$href\"")
+ .">"
+ .( empty($icon) ? $text : "<img src=\"$icon\" alt=\"$text\" title=\"$text\" />" )
+ ."</a>";
+}
+
+
+/** Displays a checkbox.
+ *
+ * @param params the function input
+ */
+function diogenes_func_checkbox($params)
+{
+ extract($params);
+
+ if (empty($name)) $name = "";
+ if (empty($value)) $value = 1;
+ $checked = (!empty($checked));
+
+ return "<input type=\"checkbox\"".
+ ($name ? " name=\"$name\"" : "").
+ ($checked ? " checked=\"checked\"" : "").
+ " value=\"$value\" />";
+}
+
+
+/** Format some diff lines for output.
+ *
+ * @param params
+ */
+function diogenes_func_diff($params)
+{
+ extract($params);
+
+ if (empty($block) || empty($op))
+ return;
+ $lines=explode("\n",$block);
+ $out=$out2="";
+ foreach($lines as $line) {
+ switch(substr($line,0,2)) {
+ case "> ":
+ if ($op == "a")
+ $class = "add";
+ else
+ $class = "change";
+ break;
+ case "< ":
+ if ($op == "d")
+ $class = "delete";
+ else
+ $class = "change";
+ break;
+ default:
+ $class = "other";
+ }
+ // strip 2 leading chars
+ $line = substr($line,2);
+ // if necessary, drop trailing newline char
+ if (substr($line,-1) == "\n")
+ $line = substr($line,0,-1);
+
+ if (isset($old)) {
+ if ($old != $class)
+ $out .= "</div>";
+ else
+ $out .= "<br />\n";
+ }
+ if ($line) {
+ if (!isset($old) || ($old != $class))
+ $out .= "<div class=\"$class\">";
+ $out .= htmlentities($line);
+ }
+ $old = $class;
+ }
+ return $out;
+}
+
+
+/** Displays a set of external values from a database
+ *
+ * @params a set of options read from a database
+ */
+function diogenes_func_extval($params) {
+ global $globals,$diogenes_db_cache;
+ if(empty($diogenes_db_cache)) $diogenes_db_cache = Array();
+
+ extract($params);
+ if(empty($table) | empty($field) | empty($vtable) | empty($vjoinid) | empty($vfield))
+ return;
+
+ $cache_id = "$vtable,$vjoinid,$vfield";
+
+ if(empty($diogenes_db_cache[$cache_id])) {
+ $res = $globals->db->query("select $vjoinid,$vfield from $vtable order by $vfield");
+ $diogenes_db_cache[$cache_id] = Array();
+ while(list($id,$val) = mysql_fetch_row($res))
+ $diogenes_db_cache[$cache_id][$id] = $val;
+ }
+
+ $html_out = "";
+ // if we have a name, display opening select tag
+ if (isset($value))
+ return $diogenes_db_cache[$cache_id][$value];
+
+ if(empty($name))
+ return;
+
+ $html_out .= "<select name=\"$name\">\n";
+ foreach($diogenes_db_cache[$cache_id] as $id=>$val)
+ $html_out .= " <option value=\"$id\"".
+ ($selected==$id ? " selected=\"selected\"":"")
+ .">".htmlentities($val)."</option>\n";
+ $html_out .= "</select>\n";
+
+ return $html_out;
+}
+
+/** Displays a set of options read from a database.
+ *
+ * @param params the function input
+ */
+function diogenes_func_flags($params)
+{
+ global $globals;
+ extract($params);
+
+ if (empty($table) | empty($field))
+ return;
+ if (empty($selected))
+ $selected = "";
+
+ $res = $globals->db->query("show columns from $table like '$field'");
+ $set = mysql_fetch_row($res);
+ $set = $set[1];
+
+ // examine the type of field
+ if (substr($set,0,5)=="enum(") {
+ $multi = false;
+ $set = substr($set,5);
+ } else if (substr($set,0,4) == "set(") {
+ $multi = true;
+ $set = substr($set,4);
+ } else {
+ return "field neither set nor enum";
+ }
+
+ $html_out = "";
+ // if we have a name, display opening select tag
+ if (!empty($name))
+ $html_out .= "<select name=\"$name".($multi ? "[]\" multiple=\"multiple\"" : "\"").">\n";
+
+ $set = ereg_replace('\)$', '', $set);
+ $set = explode(',', $set);
+ for ($vals = explode(',', $selected); list(, $k) = each($vals);) {
+ $vset[$k] = 1;
+ }
+
+ $countset = count($set);
+ for($j=0; $j < $countset; $j++) {
+ $subset = substr($set[$j], 1, -1);
+ // Removes automatic MySQL escape format
+ $subset = str_replace('\'\'', '\'', str_replace('\\\\', '\\', $subset));
+ $html_out .= "<option value=\"$subset\""
+ . ((isset($vset[$subset]) && $vset[$subset]) ? " selected=\"selected\"" : "")
+ . ">".(isset($trans) ? $trans[$subset] : htmlspecialchars($subset))."</option>\n";
+ }
+
+ // if we have a name, display closing select tag
+ if (!empty($name))
+ $html_out .= "</select>\n";
+
+ return $html_out;
+}
+
+
+/** Displays a menu item.
+ *
+ * Parameters:
+ * +item a menu item, that is an array (item_level, item_link, item_text)
+ *
+ * @param params the function input
+ */
+function diogenes_func_menu_item($params)
+{
+ extract($params);
+ if (empty($item))
+ return;
+
+ $level = array_shift($item);
+ if ($level == 0)
+ $class = "top";
+ else
+ $class = ($level % 2) ? "odd" : "even";
+
+ // process link
+ $lnk = array( $item[0] );
+ if ( isset($item[1]) )
+ array_push($lnk, $item[1]);
+
+ $margin = $level * 20;
+ return "<div class=\"item\" style=\"margin-left: {$margin}px\">".
+ diogenes_func_a(array("lnk"=>$lnk,"class"=>$class))."</div>";
+
+}
+
+
+/** Displays a generic XHTML tag.
+ *
+ * Parameters
+ * +tag : the type of tag (required)
+ * +props : the tag's properties (optional)
+ * +content : the tag's contents (optional)
+ *
+ * OR
+ *
+ * +item : associative array containing (tag, props, content)
+ */
+function diogenes_func_tag($params)
+{
+ extract($params);
+
+ if (isset($item) && is_array($item))
+ extract($item);
+
+ if (empty($tag))
+ return;
+
+ $out = "<$tag";
+
+ if (is_array($props)) {
+ foreach($props as $key=>$val)
+ $out .= " $key=\"$val\"";
+ }
+
+ $out .= empty($content) ? " />" : ">$content</$tag>";
+
+ return $out;
+}
+
+
+/** Displays a toolbar from a collection of links.
+ *
+ * Parameters:
+ * +lnk a link or an array of links
+ * +class the CSS class for the links
+ *
+ * @param params the function input
+ */
+function diogenes_func_toolbar($params)
+{
+ extract($params);
+ if (empty($lnk))
+ return;
+
+ if (!is_array($lnk))
+ $lnk = array($lnk);
+
+ // the separator
+ $sep = " | ";
+ $out = $sep;
+ foreach($lnk as $mylnk) {
+ if (empty($class))
+ $out .= diogenes_func_a(array("lnk"=>$mylnk));
+ else
+ $out .= diogenes_func_a(array("lnk"=>$mylnk,"class"=>$class));
+ $out .= $sep;
+ }
+ return $out;
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once dirname(__FILE__).'/diogenes.core.logger.inc.php';
+require_once dirname(__FILE__).'/diogenes.flagset.inc.php';
+
+/** cache of user <=> id matches */
+$diogenes_core_usercache = array();
+
+/** This class describes a Diogenes session.
+ */
+class DiogenesCoreSession {
+ /** authentication challenge */
+ var $challenge;
+
+ /** unique user id */
+ var $uid;
+ /** username (login) */
+ var $username;
+ /** permissions */
+ var $perms;
+
+ /** The constructor.
+ */
+ function DiogenesCoreSession()
+ {
+ $this->challenge = md5(uniqid(rand(), 1));
+ $this->perms = new flagset("");
+ }
+
+
+ /** Does the user have a given permission level.
+ *
+ * @param level
+ */
+ function hasPerms($level)
+ {
+ return $this->perms->hasflag($level);
+ }
+
+
+ /** Perform authentication. This needs to be overriden to do
+ * anything useful.
+ *
+ * @param page the calling page (by reference)
+ */
+ function doAuth(&$page) {
+ global $globals;
+ echo "DiogenesCoreSession::doAuth needs to be overriden";
+ exit;
+
+ // if we are already autentified, return
+ if ($this->perms->hasflag("auth"))
+ return;
+
+ // do we have authentication tokens for auth ?
+ if (isset($_REQUEST['some_token_needed_for_auth'])) {
+ // here goes the authentication code
+ } else {
+ $this->doLogin($page);
+ }
+ }
+
+
+ /** Display login screen. Needs to be overriden!
+ *
+ * @param page the page asking for authentication
+ */
+ function doLogin(&$page) {
+ echo "DiogenesCoreSession::doLogin needs to be overriden";
+ exit;
+ }
+
+
+ /** Returns the user id associated with a given username.
+ * We use caching to avoid unnecessary database requests.
+ *
+ * Actual lookup is performed by the lookupUserId function.
+ *
+ * @param $auth the authentication method
+ * @param $username the username to look up
+ *
+ * @see DiogenesLoggerView
+ * @see lookupUserId
+ */
+ function getUserId($auth,$username) {
+ global $diogenes_core_usercache, $globals;
+
+ if (isset($diogenes_core_usercache[$auth]) and ($uid = array_search($username, $diogenes_core_usercache[$auth])))
+ {
+
+ // retrieve the result from cache
+ return $uid;
+
+ } else {
+
+ // lookup the user id in database
+ $uid = call_user_func(array($globals->session,'lookupUserId'),$auth,$username);
+
+ // cache this result
+ $diogenes_core_usercache[$auth][$uid] = $username;
+ return $uid;
+ }
+
+ }
+
+
+ /** Returns the username associated with a given user id.
+ * We use caching to avoid unnecessary database requests.
+ *
+ * Actual lookup is performed by the lookupUsername function.
+ *
+ * @param $auth the authentication method
+ * @param $uid the username to look up
+ *
+ * @see DiogenesLoggerView
+ * @see lookupUsername
+ */
+ function getUsername($auth,$uid) {
+ global $diogenes_core_usercache, $globals;
+
+ if (isset($diogenes_core_usercache[$auth][$uid])) {
+
+ // retrieve result from cache
+ return $diogenes_core_usercache[$auth][$uid];
+
+ } else {
+
+ // lookup the user id in database
+ $username = call_user_func(array($globals->session,'lookupUsername'),$auth,$uid);
+
+ // cache this result
+ $diogenes_core_usercache[$auth][$uid] = $username;
+
+ return $username;
+ }
+
+ }
+
+
+ /** Look up the user id associated with a given username.
+ *
+ * @param $auth the authentication method
+ * @param $username the username to look up
+ *
+ * @see DiogenesLoggerView
+ */
+ function lookupUserId($auth, $username)
+ {
+ global $globals;
+
+ $res = $globals->db->query("select user_id from {$globals->tauth[$auth]} where username='$username'");
+ list($uid) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ return $uid;
+ }
+
+
+ /** Looks up the username associated with a given user id.
+ *
+ * @param $auth the authentication method
+ * @param $uid the username to look up
+ *
+ * @see DiogenesLoggerView
+ */
+ function lookupUsername($auth, $uid)
+ {
+ global $globals;
+
+ $res = $globals->db->query("select username from {$globals->tauth[$auth]} where user_id='$uid'");
+ list($username) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ return $username;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once dirname(__FILE__).'/diogenes.database.inc.php';
+
+
+/** This class is used to create, update and remove databases
+ */
+class DiogenesDatabaseCreator {
+ /** Do we show information messages? */
+ var $opt_info = true;
+
+ /** Do we show debugging info? */
+ var $opt_debug = false;
+
+ /** table containing options */
+ var $opt_table;
+
+ /** database versions history */
+ var $versions = array();
+
+ /**
+ * Initialisation
+ *
+ * @param $opt_table
+ */
+ function DiogenesDatabaseCreator($opt_table)
+ {
+ $this->opt_table = $opt_table;
+ }
+
+
+ /**
+ * Connect to the database
+ */
+ function connect()
+ {
+ // debugging info
+ $this->debug("host : ".$this->dbhost);
+ $this->debug("user : ".$this->dbuser);
+ $this->debug("pass : ".(($this->dbpass != "") ? "true" : "false"));
+ $this->debug("database : ".$this->dbdb);
+
+ $this->dbh = new DiogenesDatabase($this->dbdb, $this->dbhost, $this->dbuser, $this->dbpass);
+
+ if (!$this->dbh->connect_id) {
+ $this->error("Unable to connect to the database!");
+ }
+
+ return $this->dbh->connect_id;
+ }
+
+
+ /**
+ * Displays a debugging message.
+ *
+ * @param $msg
+ */
+ function debug($msg)
+ {
+ if ($this->opt_debug)
+ echo "D: $msg\n";
+ }
+
+
+ /**
+ * Displays an info message.
+ *
+ * @param $msg
+ */
+ function info($msg)
+ {
+ if ($this->opt_info)
+ echo "I: $msg\n";
+ }
+
+
+ /**
+ * Displays an error message.
+ *
+ * @param $msg
+ */
+ function error($msg)
+ {
+ echo "E: $msg\n";
+ }
+
+
+ /**
+ * Upgrade the database from one version to the next
+ *
+ * @param $newversion
+ */
+ function upgradeDb($newversion)
+ {
+ $this->info("updrade to $newversion");
+ }
+
+
+ /**
+ * Retrieve the current database version
+ */
+ function getVersion()
+ {
+ $res = $this->dbh->query("SELECT value FROM {$this->opt_table} WHERE name='dbversion'");
+ if (list($dbversion) = mysql_fetch_row($res)) {
+ mysql_free_result($res);
+ } else {
+ $dbversion = $this->versions[0];
+ }
+ return $dbversion;
+ }
+
+
+ /**
+ * Set the current database version
+ *
+ * @param $newversion
+ */
+ function setVersion($newversion)
+ {
+ $this->dbh->query("REPLACE INTO {$this->opt_table} SET name='dbversion',value='$newversion'");
+ }
+
+
+ /**
+ * Parse command line options
+ *
+ * @param $argv
+ * @param $dbdb
+ * @param $dbhost
+ * @param $dbuser
+ * @param $dbpass
+ */
+ function parseOptions($argv, $dbdb, $dbhost, $dbuser, $dbpass)
+ {
+ // set default options
+ $this->dbdb = $dbdb;
+ $this->dbhost = $dbhost;
+ $this->dbuser = $dbuser;
+ $this->dbpass = $dbpass;
+
+ // parse options
+ $script = basename($argv[0]);
+ $opts = Console_GetOpt::getopt($argv, "d:hp:qs:u:v");
+
+ if ( PEAR::isError($opts) ) {
+ echo $opts->getMessage();
+ $this->syntax($script);
+ exit(1);
+ } else {
+ $opts = $opts[0];
+ foreach ( $opts as $opt) {
+ switch ($opt[0]) {
+ case "h":
+ $this->syntax($script);
+ exit(0);
+ case "q":
+ $this->opt_info = false;
+ $this->opt_debug = false;
+ break;
+ case "d":
+ $this->dbdb = $opt[1];
+ break;
+ case "u":
+ $this->dbuser = $opt[1];
+ break;
+ case "v":
+ $this->opt_info = true;
+ $this->opt_debug = true;
+ break;
+ case "s":
+ $this->dbhost = $opt[1];
+ break;
+ case "p":
+ $this->dbpass = $opt[1];
+ break;
+ }
+ }
+ }
+
+ }
+
+
+ /**
+ * Displays program usage.
+ */
+ function syntax($script)
+ {
+ echo
+ "\nSyntax\n".
+ " $script [options]\n\n".
+ "Options\n".
+ " -h display this help message\n".
+ " -q quiet mode\n".
+ " -v verbose mode\n\n".
+ " -d database\n".
+ " -s host\n".
+ " -u user\n".
+ " -p password\n\n";
+ }
+
+
+ /**
+ * Main routine
+ */
+ function run()
+ {
+ if (!$this->connect()) {
+ exit(1);
+ }
+
+ $versions = $this->versions;
+ $dbversion = $this->getVersion();
+ $this->info("Current database version is $dbversion");
+
+ // check we know the current database version
+ if (!in_array($dbversion, $versions)) {
+ $this->error("Unknown database format version '$dbversion'");
+ exit(1);
+ }
+
+ // runs the successive updates
+ $from = array_search($dbversion, $versions);
+ $to = sizeof($versions)-1;
+
+ for($pos = $from; $pos < $to; $pos++) {
+ $oldversion = $versions[$pos];
+ $newversion = $versions[$pos+1];
+ $this->info("Upgrading from DB format '$oldversion' to '$newversion'");
+
+ $this->upgradeDb($newversion);
+ $this->setVersion($newversion);
+ }
+
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** Class for handling database requests. It is a wrapper around a permanent
+ * MySQL database connection with some commonly used functions.
+ */
+class DiogenesDatabase {
+ /** The id of the permanent database connection.
+ */
+ var $connect_id;
+
+ /** Are we in debugging mode.
+ * This variable affects whether we make detailed records of everything
+ * we do. Useful for debugging, but I imagine it probably slows down
+ * regular use a bit.
+ *
+ * @see $_trace_data
+ */
+ var $_trace = false;
+
+ /** Historical trace data.
+ * If our queries are being logged, all of the relevant data will end up
+ * in this variable.
+ *
+ * @see $_trace
+ */
+ var $_trace_data = Array();
+
+ /** Whether database errors are fatal.
+ */
+ var $_fatal = false;
+
+ /** The numeric code of the last error that occured.
+ */
+ var $_errno = 0;
+
+ /** The string describing the last error that occured.
+ */
+ var $_errstr = '';
+
+ /** Extra info about what might have caused the error.
+ */
+ var $_errinfo = '';
+
+ /** The constructor.
+ *
+ * @param $database The name of the database to connect to
+ * @param $host The computer hosting the database server
+ * @param $user The username to use to authenticate to the database server
+ * @param $password The password to use in authenticating to the database server
+ */
+ function DiogenesDatabase($database, $host, $user, $password) {
+ global $globals;
+
+ // make sure that we have MySQL support, try loading it
+ if (!extension_loaded('mysql') && !dl('mysql.so'))
+ {
+ echo "MySQL support needs to be activated in your PHP configuration!<br>\n";
+ echo "Add a line with 'extension=mysql.so' in your php.ini file.\n";
+ exit(1);
+ }
+
+ $this->_fatal = @$this->database_error_fatal;
+
+ if(empty($user)){
+ $this->connect_id=@mysql_connect();
+ } else {
+ $this->connect_id=@mysql_connect($host, $user, $password);
+ }
+
+ if (!$this->connect_id) {
+ $this->_handleError("");
+ return;
+ }
+
+ if (!@mysql_select_db($database,$this->connect_id))
+ {
+ $this->_handleError("");
+ return;
+ }
+
+ // when the script exits, we close the connection to the DB
+ register_shutdown_function(array(&$this, 'close'));
+ }
+
+
+ /** Close connection to database
+ */
+ function close() {
+ mysql_close($this->connect_id);
+ $this->connect_id = FALSE;
+ }
+
+
+ /** Deactivate trace mode.
+ */
+ function trace_off() {
+ $this->_trace = false;
+ }
+
+
+ /** Activate trace mode.
+ */
+ function trace_on() {
+ $this->_trace = true;
+ }
+
+
+ /** Formats tracing information for output.
+ *
+ * @param $page
+ * @param $template
+ */
+ function trace_format(&$page,$template='') {
+ global $globals;
+ if(empty($template))
+ $template = $globals->libroot . '/templates/database-debug.tpl';
+ $page->assign_by_ref('trace_data', $this->_trace_data);
+ return $page->fetch($template);
+ }
+
+
+ /** Execute a database query.
+ *
+ * @param $query
+ */
+ function query($query) {
+ if (!empty($query)) {
+
+ if ($this->_trace) {
+ $_res = mysql_query("EXPLAIN $query", $this->connect_id);
+ $explain = Array();
+ while($row = @mysql_fetch_assoc($_res)) $explain[] = $row;
+ $trace_data = Array('query' => $query, 'explain' => $explain );
+ @mysql_free_result($_res);
+ }
+
+ $res = mysql_query($query, $this->connect_id);
+
+ if ($this->_trace) {
+ $trace_data['error'] = $this->error();
+ $this->_trace_data[] = $trace_data;
+ }
+
+ if (!$res)
+ {
+ $this->_handleError($query);
+ }
+
+ return $res;
+ }
+ }
+
+
+ /** Return insert_id
+ */
+ function insert_id()
+ {
+ return @mysql_insert_id($this->connect_id);
+ }
+
+
+ /** Return whether there is currently an error in effect.
+ *
+ * @return boolean true if error, false otherwise
+ */
+ function err()
+ {
+ return ($this->_errno != 0);
+ }
+
+
+ /** Return the last error string.
+ */
+ function error() {
+ return $this->_errstr;
+ }
+
+
+ /** Return the last error number.
+ */
+ function errno() {
+ return $this->_errno;
+ }
+
+
+ /** Return extra info which might help in determining the cause of the
+ * previous error.
+ */
+ function errinfo()
+ {
+ return $this->_errinfo;
+ }
+
+
+ /** Forget about any errors previously raised.
+ */
+ function ResetError()
+ {
+ $this->_errno = 0;
+ $this->_errstr = '';
+ $this->_errinfo = '';
+ }
+
+
+ /** Return the number rows affected by the last query.
+ */
+ function affected_rows() {
+ return @mysql_affected_rows($this->connect_id);
+ }
+
+
+ /** Return an array with the possibly values of a set column.
+ *
+ * @param $table
+ * @param $column
+ */
+ function get_set($table,$column) {
+ $res = $this->query("show columns from $table like '$column'");
+ $line = mysql_fetch_assoc($res);
+ $set = $line['Type'];
+ $set = substr($set,5,strlen($set)-7);
+ return preg_split("/','/",$set);
+ }
+
+
+ /** Handle an error in the database.
+ *
+ * Updates the error status information in the system, and possibly dies
+ * if we're doing that sort of thing.
+ *
+ * @param $extras
+ */
+ function _handleError($extras = '')
+ {
+ $this->_errinfo = $extras;
+
+ if ($this->connect_id)
+ {
+ $this->_errno = mysql_errno($this->connect_id);
+ $this->_errstr = mysql_error($this->connect_id);
+ }
+ else
+ {
+ $this->_errno = mysql_errno();
+ $this->_errstr = mysql_error();
+ }
+
+ if ($this->_fatal)
+ {
+ die(sprintf("Database error: (%i) %s\n%s\n", $this->_errno, $this->_errstr, $this->_errinfo));
+ }
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** Class for handling operations on MySQL database tables. Upon construction, the class
+ * probes the table to read its structure.
+ *
+ * @see DiogenesDatabase, DiogenesTableEditor
+ */
+class DiogenesDatabaseTable {
+ /** Handle to the database */
+ var $dbh;
+ /** Name of the table */
+ var $table;
+ /** The table's columns */
+ var $vars = array();
+
+ /** The constructor. It reads the table structure from database.
+ *
+ * @param dbh the handle to the database
+ * @param table the name of the table
+ */
+ function DiogenesDatabaseTable(&$dbh,$table)
+ {
+ $this->dbh =& $dbh;
+ $this->table = $table;
+
+ $res = $this->dbh->query("show columns from $table");
+ while (list($name,$ftype,,$key,$value,$extra) = mysql_fetch_row($res))
+ {
+ if (!preg_match("/^([a-z]+)(\(([^\)]*)\))?( [a-z]+)?$/",$ftype,$matches))
+ die("could not parse $ftype");
+
+ $dtype = $matches[1];
+ switch($dtype) {
+ case "set": case "enum":
+ $type = "set";
+ break;
+ case "timestamp":
+ case "datetime":
+ $type = "timestamp";
+ break;
+ default:
+ $type="text";
+ }
+ $this->vars[$name] = array("table" => $this->table, "field" => $name,
+ "type" => $type, "value" => $value, "desc" => $name, "sum" => false,
+ "key" => $key, "extra" => $extra, "edit" => true, "show" => true);
+ }
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** class for describing flags
+ */
+class flagset {
+ /** string that holds the flagset */
+ var $value;
+
+ /** the boundary between flags */
+ var $sep = ",";
+
+
+ /** set flag
+ * @param $flags services FROM coupures
+ * @return VOID
+ */
+ function flagset( $flags="" ) {
+ $this->value = $flags;
+ }
+
+
+ /** add flag
+ * @param $flag XXX
+ * @return VOID
+ */
+ function addflag($flag) {
+ if (!$flag) return;
+ if (!$this->hasflag($flag)) {
+ if ($this->value)
+ $this->value .= $this->sep;
+ $this->value .= $flag;
+ }
+ }
+
+
+ /** return all active flags
+ * @return array
+ */
+
+ function as_array()
+ {
+ if ($this->value) {
+ $arr = explode($this->sep, $this->value);
+ } else {
+ $arr = array();
+ }
+ return $arr;
+ }
+
+
+ /** test if a flag is set
+ * @param $flag XXX
+ * @return 1 || 0
+ */
+ function hasflag($flag) {
+ $tok = strtok($this->value,$this->sep);
+ while ($tok) {
+ if ($tok==$flag) return 1;
+ $tok = strtok($this->sep);
+ }
+ return 0;
+ }
+
+
+ /** remove flag
+ * @param $flag XXX
+ * @return VOID
+ */
+ function rmflag($flag) {
+ if (!$flag) return;
+ $newvalue = "";
+ $tok = strtok($this->value,$this->sep);
+ while ($tok) {
+ if ($tok!=$flag) {
+ if ($newvalue)
+ $newvalue .= $this->sep;
+ $newvalue .= $tok;
+ }
+ $tok = strtok($this->sep);
+ }
+ $this->value=$newvalue;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once('Mail.php');
+require_once('Mail/mime.php');
+
+// {{{ class HermesMailer
+/** Class for sending inline or multipart-emails.
+ */
+class HermesMailer extends Mail_Mime {
+
+ // {{{ properties
+
+ var $_mail;
+
+ // }}}
+ // {{{ constructor
+
+ function HermesMailer() {
+ $this->Mail_Mime("\n");
+ $this->_mail =& Mail::factory('sendmail', Array('-oi'));
+ }
+
+ // }}}
+ // {{{ function _correct_emails()
+
+ /**
+ * converts all : Foo Bar Baz <quux@foobar.org> into "Foo Bar Baz" <quux@foobar.org> wich is RFC compliant
+ */
+
+ function _correct_emails($email)
+ {
+ return preg_replace('!(^|, *)([^<"][^<"]*[^< "]) *(<[^>]*>)!', '\1"\2" \3', $email);
+ }
+
+ // }}}
+ // {{{ function addTo()
+
+ function addTo($email)
+ {
+ $email = $this->_correct_emails($email);
+ if (isset($this->_headers['To'])) {
+ $this->_headers['To'] .= ", $email";
+ } else {
+ $this->_headers['To'] = $email;
+ }
+ }
+
+ // }}}
+ // {{{ function addCc()
+
+ function addCc($email)
+ {
+ return parent::addCc($this->_correct_emails($email));
+ }
+
+ // }}}
+ // {{{ function addBcc()
+
+ function addBcc($email)
+ {
+ return parent::addBcc($this->_correct_emails($email));
+ }
+
+ // }}}
+ // {{{ function setFrom()
+
+ function setFrom($email)
+ {
+ return parent::setFrom($this->_correct_emails($email));
+ }
+
+ // }}}
+ // {{{ function addHeader()
+
+ function addHeader($hdr,$val)
+ {
+ switch($hdr) {
+ case 'From':
+ $this->setFrom($val);
+ break;
+
+ case 'To':
+ unset($this->_headers[$hdr]);
+ $this->addTo($val);
+ break;
+
+ case 'Cc':
+ unset($this->_headers[$hdr]);
+ $this->addCc($val);
+ break;
+
+ case 'Bcc':
+ unset($this->_headers[$hdr]);
+ $this->addBcc($val);
+ break;
+
+ default:
+ $this->headers(Array($hdr=>$val));
+ }
+ }
+
+ // }}}
+ // {{{ function send()
+
+ function send() {
+ $addrs = Array();
+ foreach(Array('To', 'Cc', 'Bcc') as $hdr) {
+ if(isset($this->_headers[$hdr])) {
+ require_once 'Mail/RFC822.php';
+ $addrs = array_merge($addrs, Mail_RFC822::parseAddressList($this->_headers[$hdr]));
+ }
+ }
+ if(empty($addrs)) return false;
+
+ $dests = Array();
+ foreach($addrs as $a) $dests[] = "{$a->mailbox}@{$a->host}";
+
+ // very important to do it in THIS order very precisely.
+ $body = $this->get();
+ $hdrs = $this->headers();
+ return $this->_mail->send($dests, $hdrs, $body);
+ }
+
+ // }}}
+}
+
+// }}}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** A class for viewing user activity.
+ * Allows the examination of user sessions. Can produce a list of sessions
+ * matching by date, user, or authentication method, and can drill down to
+ * a detailed list of actions performed in a session.
+ *
+ * TODO: give an example of how to use the class
+ */
+class DiogenesLoggerView {
+ /** Handle to the database.
+ */
+ var $dbh;
+
+ /** The constructor.
+ */
+ function DiogenesLoggerView()
+ {
+ global $globals;
+ if (!is_object($globals->db))
+ die("\$globals->db is not an object!");
+ $this->dbh =& $globals->db;
+ }
+
+
+ /** Retrieves the available authentication mechanisms.
+ * There are several different ways of authenticating users to diogenes,
+ * including doing it ourselves, and delegating the task to an external
+ * mechanism. This method gets the list of permissable methods.
+ *
+ * @return assoc array of (method => label) pairs.
+ * @private
+ */
+ function _getAuths()
+ {
+ global $globals;
+
+ // give a 'no filter' option
+ $auths[0] = __("all");
+
+ $res = $this->dbh->query("describe {$globals->table_log_sessions} auth");
+ list(,$type) = mysql_fetch_row($res);
+ mysql_free_result($res);
+ $types = preg_split("/(enum\\('|','|'\\))/", $type, -1, PREG_SPLIT_NO_EMPTY);
+ foreach ($types as $type)
+ $auths[$type] = isset($globals->tlabel[$type]) ? $globals->tlabel[$type] : $type;
+ return $auths;
+ }
+
+
+ /** Retrieves the available days for a given year and month.
+ * Obtain a list of days of the given month in the given year
+ * that are within the range of dates that we have log entries for.
+ *
+ * @param integer year
+ * @param integer month
+ * @return array days in that month we have log entries covering.
+ * @private
+ */
+ function _getDays($year,$month)
+ {
+ global $globals;
+
+ // give a 'no filter' option
+ $days[0] = __("all");
+
+ if ($year && $month) {
+ $day_max = Array(-1, 31,checkdate(2,29,$year) ? 29 : 28 ,31,30,31,30,31,31,30,31,30,31);
+ $res = $this->dbh->query("SELECT YEAR (MAX(start)), YEAR (MIN(start)),
+ MONTH(MAX(start)), MONTH(MIN(start)),
+ DAYOFMONTH(MAX(start)),
+ DAYOFMONTH(MIN(start))
+ FROM {$globals->table_log_sessions}");
+ list($ymax,$ymin,$mmax,$mmin,$dmax,$dmin) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ if (($year < $ymin) || ($year == $ymin && $month < $mmin))
+ {
+ return array();
+ }
+
+ if (($year > $ymax) || ($year == $ymax && $month > $mmax))
+ {
+ return array();
+ }
+
+ $min = ($year==$ymin && $month==$mmin) ? intval($dmin) : 1;
+ $max = ($year==$ymax && $month==$mmax) ? intval($dmax) : $day_max[$month];
+
+ for($i = $min; $i<=$max; $i++)
+ $days[$i] = $i;
+ }
+ return $days;
+ }
+
+
+ /** Retrieves the available months for a given year.
+ * Obtains a list of month numbers that are within the timeframe that
+ * we have log entries for.
+ *
+ * @param integer year
+ * @return array List of month numbers we have log info for.
+ * @private
+ */
+ function _getMonths($year)
+ {
+ global $globals;
+
+ // give a 'no filter' option
+ $months[0] = __("all");
+
+ if ($year) {
+ $res = $this->dbh->query("SELECT YEAR (MAX(start)), YEAR (MIN(start)),
+ MONTH(MAX(start)), MONTH(MIN(start))
+ FROM {$globals->table_log_sessions}");
+ list($ymax,$ymin,$mmax,$mmin) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ if (($year < $ymin) || ($year > $ymax))
+ {
+ return array();
+ }
+
+ $min = $year == $ymin ? intval($mmin) : 1;
+ $max = $year == $ymax ? intval($mmax) : 12;
+
+ for($i = $min; $i<=$max; $i++)
+ $months[$i] = $i;
+ }
+ return $months;
+ }
+
+
+ /** Retrieves the username for a given authentication method and user id.
+ * This function caches the results of the lookups to avoid uncecessary
+ * database requests.
+ *
+ * @return the matching username.
+ * @private
+ */
+ function _getUsername($auth, $uid) {
+ global $globals;
+ static $cache;
+
+ if (!isset($cache[$auth][$uid]))
+ $cache[$auth][$uid] = call_user_func(array($globals->session,'getUsername'),$auth,$uid);
+
+ return $cache[$auth][$uid];
+ }
+
+
+ /** Retrieves the available years.
+ * Obtains a list of years that we have log entries covering.
+ *
+ * @return array years we have log entries for.
+ * @private
+ */
+ function _getYears()
+ {
+ global $globals;
+
+ // give a 'no filter' option
+ $years[0] = __("all");
+
+ // retrieve available years
+ $res = $this->dbh->query("select YEAR(MAX(start)),YEAR(MIN(start)) FROM {$globals->table_log_sessions}");
+ list($max,$min) = mysql_fetch_row($res);
+ mysql_free_result($res);
+
+ for($i = intval($min); $i<=$max; $i++)
+ $years[$i] = $i;
+ return $years;
+ }
+
+
+ /** Make a where clause to get a user's sessions.
+ * Prepare the where clause request that will retrieve the sessions.
+ *
+ * @param $year INTEGER Only get log entries made during the given year.
+ * @param $month INTEGER Only get log entries made during the given month.
+ * @param $day INTEGER Only get log entries made during the given day.
+ * @param $auth INTEGER Only get log entries with the given authentication type.
+ * @param $uid INTEGER Only get log entries referring to the given user ID.
+ *
+ * @return STRING the WHERE clause of a query, including the 'WHERE' keyword
+ * @private
+ */
+ function _makeWhere($year,$month,$day,$auth,$uid)
+ {
+ global $globals;
+
+ // start constructing the "where" clause
+ $where = array();
+
+ if ($auth)
+ array_push($where, "auth='$auth'");
+
+ if ($uid)
+ array_push($where, "uid='$uid'");
+
+ // we were given at least a year
+ if ($year) {
+ if ($day) {
+ $dmin = mktime(0, 0, 0, $month, $day, $year);
+ $dmax = mktime(0, 0, 0, $month, $day+1,$year);
+ } elseif ($month) {
+ $dmin = mktime(0, 0, 0, $month, 1, $year);
+ $dmax = mktime(0, 0, 0, $month+1, 1, $year);
+ } else {
+ $dmin = mktime(0, 0, 0, 1, 1, $year);
+ $dmax = mktime(0, 0, 0, 1, 1, $year+1);
+ }
+ $where[] = "start >= " . date("Ymd000000",$dmin);
+ $where[] = "start < " . date("Ymd000000", $dmax);
+ }
+
+ if (!empty($where))
+ return ' WHERE ' . implode($where," AND ");
+ else
+ return '';
+ // WE know it's totally reversed, so better use array_reverse than a SORT BY start DESC
+ }
+
+
+ /** Run the log viewer and fill out the Smarty variables for display.
+ *
+ * @param page the page that will display the viewer's data
+ * @param outputvar the Smarty variable to which we should assign the output
+ * @param template the template to use for display
+ */
+ function run(&$page,$outputvar='',$template='')
+ {
+ global $globals;
+
+ if (isset($_REQUEST['logsess'])) {
+
+ // we are viewing a session
+ $res=$this->dbh->query("SELECT host,ip,browser,auth,uid,sauth,suid
+ FROM {$globals->table_log_sessions}
+ WHERE id =".$_REQUEST['logsess']);
+ $sarr = mysql_fetch_assoc($res);
+
+ $sarr['username'] = $this->_getUsername($sarr['auth'],$sarr['uid']);
+ if ($sarr['suid'])
+ $sarr['suer'] = $this->_getUsername($sarr['sauth'],$sarr['suid']);
+ $page->assign('session',$sarr);
+
+ $res=$this->dbh->query("SELECT a.text,e.data,UNIX_TIMESTAMP(e.stamp) AS stamp
+ FROM {$globals->table_log_events} AS e
+ LEFT JOIN {$globals->table_log_actions} AS a ON e.action=a.id
+ WHERE e.session='{$_REQUEST['logsess']}'");
+ while ($myarr = mysql_fetch_assoc($res))
+ $page->append('events',$myarr);
+ mysql_free_result($res);
+
+ } else {
+
+ // we are browsing the available sessions
+ $logauth = isset($_REQUEST['logauth']) ? $_REQUEST['logauth'] : '';
+ $loguser = isset($_REQUEST['loguser']) ? $_REQUEST['loguser'] : '';
+ $loguid = ($logauth && $loguser)? call_user_func(array($globals->session,'getUserId'),$logauth,$_REQUEST['loguser']) : '';
+ if (!$loguid) $loguser = '';
+
+ if ($loguid) {
+ $year = isset($_REQUEST['year']) ? $_REQUEST['year'] : 0;
+ $month = isset($_REQUEST['month']) ? $_REQUEST['month'] : 0;
+ $day = isset($_REQUEST['day']) ? $_REQUEST['day'] : 0;
+ } else {
+ $year = isset($_REQUEST['year']) ? $_REQUEST['year'] : date("Y");
+ $month = isset($_REQUEST['month']) ? $_REQUEST['month'] : date("m");
+ $day = isset($_REQUEST['day']) ? $_REQUEST['day'] : date("d");
+ }
+
+ if (!$year) $month = 0;
+ if (!$month) $day = 0;
+
+ // smarty assignments
+ // retrieve available years
+ $page->assign('years',$this->_getYears());
+ $page->assign('year',$year);
+
+ // retrieve available months for the current year
+ $page->assign('months',$this->_getMonths($year));
+ $page->assign('month',$month);
+
+ // retrieve available days for the current year and month
+ $page->assign('days',$this->_getDays($year,$month));
+ $page->assign('day',$day);
+
+ // retrieve available auths
+ $auths = $this->_getAuths();
+ $page->assign('auths',$auths);
+
+ $page->assign('logauth',$logauth);
+ $page->assign('loguser',$loguser);
+ // smarty assignments
+
+ if($loguid || $year) {
+
+ // get the requested sessions
+ $where = $this->_makeWhere($year,$month,$day,$logauth,$loguid);
+ $select = "SELECT id,UNIX_TIMESTAMP(start) as start,auth,uid
+ FROM {$globals->table_log_sessions} AS s
+ $where
+ ORDER BY start DESC";
+ $res = $globals->db->query($select);
+
+ $sessions = array();
+ while ( $mysess = mysql_fetch_assoc($res) ) {
+ $mysess['username'] = $this->_getUsername($mysess['auth'],$mysess['uid']);
+ // pretty label for auth method
+ $mysess['lauth'] = $auths[$mysess['auth']];
+ // summary of events
+ $mysess['events'] = array();
+ // actions
+ $mysess['actions'] = array(
+ array(__("view session"),"?logsess={$mysess['id']}"),
+ array(__("user's log"),"?logauth={$mysess['auth']}&loguser={$mysess['username']}")
+ );
+
+ $sessions[$mysess['id']] = $mysess;
+ }
+ mysql_free_result($res);
+ array_reverse($sessions);
+
+ // attach events
+ $sql = "SELECT s.id, a.text
+ FROM {$globals->table_log_sessions} AS s
+ LEFT JOIN {$globals->table_log_events} AS e ON(e.session=s.id)
+ INNER JOIN {$globals->table_log_actions} AS a ON(a.id=e.action)
+ $where";
+
+ $res = $globals->db->query($sql);
+ while( $event = mysql_fetch_assoc($res) ) {
+ array_push($sessions[$event['id']]['events'],$event['text']);
+ }
+ mysql_free_result($res);
+ $page->assign_by_ref('sessions',$sessions);
+ } else {
+ $page->assign('msg_nofilters', __("Please select a year and/or a user."));
+ }
+ }
+
+ // translations
+ $page->assign('msg_session_properties', __("session properties"));
+ $page->assign('msg_user', __("user"));
+ $page->assign('msg_host', __("host"));
+ $page->assign('msg_browser', __("browser"));
+ $page->assign('msg_date', __("date"));
+ $page->assign('msg_action', __("action"));
+ $page->assign('msg_data', __("data"));
+ $page->assign('msg_filter_by', __("filter by"));
+ $page->assign('msg_start', __("start"));
+ $page->assign('msg_summary', __("summary"));
+ $page->assign('msg_actions', __("actions"));
+ $page->assign('msg_year', __("year"));
+ $page->assign('msg_month', __("month"));
+ $page->assign('msg_day', __("day"));
+ $page->assign('msg_submit', __("Submit"));
+
+ // if requested, assign the content to be displayed
+ if (!empty($outputvar)) {
+ if (empty($template))
+ $template = $globals->libroot."/templates/logger-view.tpl";
+ $page->assign($outputvar, $page->fetch($template));
+ }
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** Converts and HTML message into plaintext.
+ *
+ * @param $html the HTML code to convert
+ */
+function html2plain($html) {
+ $text = html_entity_decode($html);
+ return trim(strip_tags($text));
+}
+
+
+/** Converts a plaintext message into an HTML message with clickable hyperlinks.
+ *
+ * @param $text the plain text to convert
+ */
+function plain2html($text) {
+ $html = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
+ "<a href=\"\\0\">\\0</a>", $text);
+ $html = nl2br($html);
+ return "<HTML><BODY>\n$html\n</BODY></HTML>";
+}
+
+
+/** Class for sending inline or multipart-emails.
+ */
+class DiogenesMailer {
+ /** The header of the email. */
+ var $header;
+ /** The body of the email. */
+ var $body;
+ /** The sender of the email. */
+ var $from;
+ /** The recipient of the email. */
+ var $to;
+ /** Carbon copy for the email. */
+ var $cc;
+ /** Blind carbon copy for the email. */
+ var $bcc;
+ /** Subject of the email. */
+ var $subject;
+ /** The boundary used to separate the email's body parts. */
+ var $boundary;
+ /** Do we have a "From:" header? If none is explicitly set, just before
+ * sending it will be constructed from the sender's email address. */
+ var $from_present;
+
+
+ /** The constructor. Initialises header & body.
+ *
+ * @param from the sender of the email
+ * @param to the recipient of the email
+ * @param subject the subject of the email
+ * @param multipart boolean indicating whether we have a multipart email
+ * @param cc carbon copy for the email
+ * @param bcc blind carbon copy for the email
+ */
+ function DiogenesMailer($from, $to, $subject, $multipart=false, $cc="", $bcc="") {
+ trigger_error("DiogenesMailer class is obsolete, use HermesMailer instead !", E_USER_NOTICE);
+ $this->from = $from;
+ $this->from_present = false;
+ $this->to = ($to == '' ? $from : $to);
+ $this->cc = $cc;
+ $this->bcc = $bcc;
+ $this->subject = $subject;
+ $this->body = "";
+ $this->header = "X-Mailer: PHP/" . phpversion()."\n".
+ "Mime-Version: 1.0\n";
+ if ($multipart) {
+ $this->boundary="-=partie_suivante_(".uniqid("").")=-";
+ $this->header .=
+ "Content-Type: multipart/alternative;\n".
+ " boundary=\"{$this->boundary}\"\n";
+
+ } else {
+ $this->boundary="";
+ $this->header .=
+ "Content-Type: text/plain; charset=iso-8859-1\n".
+ "Content-Disposition: inline\n".
+ "Content-Transfer-Encoding: 8bit\n";
+ }
+ }
+
+
+ /** Adds a part to the email's body.
+ *
+ * @param type the MIME type of this part (e.g. "text/plain; charset=iso-8859-1")
+ * @param encoding the content encoding for this part (e.g "8bit")
+ * @param value the contents of this part
+ */
+ function addPart($type,$encoding,$value)
+ {
+ if ($this->boundary) {
+ $this->body.=
+ "--{$this->boundary}\n".
+ "Content-Type: $type\n".
+ "Content-Transfer-Encoding: $encoding\n\n";
+ $this->body .= "$value\n";
+ } else {
+ echo "<b>Erreur : addPart s'applique uniquement aux messages multipart!</b>";
+ }
+ }
+
+
+ /** Adds a header to the email.
+ *
+ * @param text the contents of the header (without the final line feed)
+ */
+ function addHeader($text)
+ {
+ if (preg_match('/^From:/i', $text)) $this->from_present = true;
+ $this->header .= "$text\n";
+ }
+
+
+ /** Adds a "text/plain" part to the email.
+ *
+ * @param text
+ */
+ function addPartText($text)
+ {
+ $this->addPart("text/plain; charset=iso-8859-1",
+ "8bit", $text);
+ }
+
+
+ /** Adds a "text/html" part to the email.
+ *
+ * @param html
+ */
+ function addPartHtml($html)
+ {
+ $this->addPart("text/html; charset=iso-8859-1",
+ "8bit", $html);
+ }
+
+
+ /** Sets the body of the email (only for inline messages!).
+ *
+ * @param text
+ */
+ function setBody($text)
+ {
+ if (!$this->boundary) {
+ $this->body = $text;
+ } else {
+ die("Error : setBody only applies to inline messages!");
+ }
+ }
+
+
+ /** Sends the email using a pipe to sendmail.
+ */
+ function send()
+ {
+ if(!$this->from_present)
+ $this->header .= "From: {$this->from}\n";
+ if ($this->to)
+ $this->header .= "To: {$this->to}\n";
+ if ($this->cc)
+ $this->header .= "Cc: {$this->cc}\n";
+
+ $this->header .= "Subject: {$this->subject}\n";
+ $this->header .= "\n";
+
+ if ($this->boundary)
+ $this->body .= "--{$this->boundary}--\n";
+
+ $fp = popen('/usr/sbin/sendmail -oi -f '.escapeshellarg($this->from).' '.escapeshellarg($this->to).' '.escapeshellarg($this->cc).' '.escapeshellarg($this->bcc),'w');
+ if ($fp) {
+ if(fwrite($fp, $this->header) == -1) return false;
+ if(fwrite($fp, $this->body) == -1) return false;
+ if (pclose($fp) == 0) return true;
+ }
+ return false;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/** Custom implementation of mime_content_type.
+ * It avoids problems encountered with the built-in mime_content_type such as
+ * - CSS files being returned as text/plain
+ */
+function get_mime_type($filename) {
+ // we use the file extension for the basic file types, as file
+ // sometimes gets confused
+
+ $mime_map = array(
+ ".ai" => "application/postscript",
+ ".arj" => "application/arj",
+ ".asf" => "video/x-ms-asf",
+ ".asr" => "video/x-ms-asf",
+ ".asx" => "video/x-ms-asf",
+ ".au" => "audio/basic",
+ ".avi" => "video/x-msvideo",
+ ".bmp" => "image/bmp",
+ ".bz" => "application/x-bzip",
+ ".bz2" => "application/x-bzip2",
+ ".css" => "text/css",
+ ".dcf" => "application/vnd.oma.drm.content",
+ ".deb" => "application/x-deb",
+ ".dm" => "application/vnd.oma.drm.message",
+ ".doc" => "application/msword",
+ ".dot" => "application/msword",
+ ".dvi" => "application/x-dvi",
+ ".eps" => "application/postscript",
+ ".gif" => "image/gif",
+ ".gz" => "application/x-gzip",
+ ".gzip" => "application/x-gzip",
+ ".hqx" => "application/mac-binhex40",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".jad" => "text/vnd.sun.j2me.app-descriptor",
+ ".jar" => "application/java-archive",
+ ".jfif" => "image/jpeg",
+ ".jpe" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".jpg" => "image/jpeg",
+ ".lyx" => "text/x-lyx",
+ ".midi" => "audio/midi",
+ ".mid" => "audio/midi",
+ ".mp2" => "audio/mpeg",
+ ".mp3" => "audio/mpeg",
+ ".mpg" => "video/mpeg",
+ ".mpe" => "video/mpeg",
+ ".mpeg" => "video/mpeg",
+ ".mov" => "video/quicktime",
+ ".pbm" => "image/x-portable-bitmap",
+ ".pdf" => "application/pdf",
+ ".png" => "image/x-png",
+ ".pnm" => "image/x-portable-anymap",
+ ".ppt" => "application/vnd.ms-powerpoint",
+ ".pps" => "application/vnd.ms-powerpoint",
+ ".ps" => "application/postscript",
+ ".qt" => "video/quicktime",
+ ".ra" => "audio/x-realaudio",
+ ".ram" => "audio/x-pn-realaudio",
+ ".rm" => "audio/x-pn-realaudio",
+ ".rtf" => "application/rtf",
+ ".snd" => "audio/basic",
+ ".tar" => "application/x-tar",
+ ".tex" => "application/x-tex",
+ ".texi" => "application/x-texinfo",
+ ".texinfo" => "application/x-texinfo",
+ ".tgz" => "application/x-compressed",
+ ".txt" => "text/plain",
+ ".wav" => "audio/x-wav",
+ ".wml" => "text/vnd.wap.wml",
+ ".xls" => "application/vnd.ms-excel",
+ ".xml" => "text/xml",
+ ".xpm" => "image/x-xpixmap",
+ ".z" => "application/x-compressed",
+ ".zip" => "application/zip",
+ );
+
+ if (empty($mime_type)) {
+ $ext = strtolower(strrchr(basename($filename), "."));
+ if (isset($mime_map[$ext])) {
+ $mime_type = $mime_map[$ext];
+ }
+ }
+
+ // try to use 'file' to determine mimetype
+ if (empty($mime_type)) {
+ $fp = popen("file -i '$filename' 2>/dev/null", "r");
+ $reply = fgets($fp);
+ pclose($fp);
+
+ // the reply begins with the requested filename
+ if (!strncmp($reply, "$filename: ", strlen($filename)+2)) {
+ $reply = substr($reply, strlen($filename)+2);
+ // followed by the mime type (maybe including options)
+ if (ereg("^([[:alnum:]_-]+/[[:alnum:]_-]+);?.*", $reply, $matches)) {
+ $mime_type = $matches[1];
+ }
+ }
+ }
+
+ // if all else fails, return application/octet-stream
+ if (empty($mime_type)) {
+ $mime_type = "application/octet-stream";
+ }
+
+ return $mime_type;
+}
+
+
+/** Returns the boundary of a MIME multipart content.
+ */
+function get_mime_boundary($filename)
+{
+ $fp = fopen($filename, "rb");
+ $boundary = "";
+ if ($fp && (fscanf($fp, "--%s\r\n", $boundary) == 1) && strlen($boundary))
+ {
+ $expect = "--$boundary--\r\n";
+ fseek($fp, - strlen($expect), SEEK_END);
+ $got = fread($fp, strlen($expect));
+ if ($got != $expect) {
+ $boundary = "";
+ }
+ }
+ fclose($fp);
+ return $boundary;
+}
+
+
+/** Determine whether a given MIME type is multipart.
+ */
+function is_mime_multipart($mimetype)
+{
+ return (preg_match('/^application\/vnd\.oma\.drm\.message$/', $mimetype));
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once dirname(__FILE__).'/diogenes.mime.inc.php';
+
+$lc_accent = "éèëêáàäâåãïîìíôöòóõøúùûüçñ";
+$lc_plain = "eeeeaaaaaaiiiioooooouuuucn";
+$uc_accent = "ÉÈËÊÁÀÄÂÅÃÏÎÌÍÔÖÒÓÕØÚÙÛÜÇÑ";
+$uc_plain = "EEEEAAAAAAIIIIOOOOOOUUUUCN";
+
+
+/** Returns the value of one or more request variables, catching
+ * the case where they do not exist.
+ *
+ * @param req name(s) of the request variables : a string or array strings
+ */
+function clean_request($req) {
+ if (is_array($req)) {
+ $out = array();
+ foreach($req as $reqitem)
+ array_push($out,(isset($_REQUEST[$reqitem])) ? $_REQUEST[$reqitem] : "");
+ return $out;
+ } else {
+ return (isset($_REQUEST[$req])) ? $_REQUEST[$req] : "";
+ }
+}
+
+
+/** Strips slashes off a request var.
+ *
+ * @param req the request variable name
+ */
+function strip_request($req) {
+ return stripslashes(clean_request($req));
+}
+
+/** replaces accentuated characters in a string by their
+ * html counterpart
+ *
+ * @param $string the input string
+ * @return STRING the output string
+ */
+function html_accent($string) {
+ global $lc_accent,$uc_accent;
+ $lca = preg_split('//', $lc_accent, -1, PREG_SPLIT_NO_EMPTY);
+ $uca = preg_split('//', $uc_accent, -1, PREG_SPLIT_NO_EMPTY);
+ foreach($lca as $key=>$val)
+ $lch[$key] = htmlentities($val);
+ foreach($uca as $key=>$val)
+ $uch[$key] = htmlentities($val);
+ $newstring = str_replace($lca,$lch,$string);
+ $newstring = str_replace($uca,$uch,$newstring);
+ return $newstring;
+}
+
+
+/** replaces accentuated characters in a string by their
+ * non-accentuaded counterpart
+ *
+ * @param $string the input string
+ * @return STRING the output string
+ */
+function replace_accent($string) {
+ global $lc_accent,$lc_plain,$uc_accent,$uc_plain;
+
+ $newstring = strtr($string,$lc_accent,$lc_plain);
+ $newstring = strtr($newstring,$uc_accent,$uc_plain);
+ return $newstring;
+}
+
+
+/** remplace les caractères accentués par la regexp (caractère accentué ou caractère non accentué)
+ * @param $string la chaîne de caractères
+ * @return STRING la nouvelle chaîne de caractères
+ * @see recherche.php
+ */
+function replace_accent_regexp($string) {
+ $classes_accent[] = "éèëêe";
+ $classes_accent[] = "áàäâåãa";
+ $classes_accent[] = "ïîìíi";
+ $classes_accent[] = "ôöòóõøo";
+ $classes_accent[] = "úùûüu";
+ $classes_accent[] = "çc";
+ $classes_accent[] = "ñn";
+ $classes_accent[] = "ÉÈËÊE";
+ $classes_accent[] = "ÁÀÄÂÅÃA";
+ $classes_accent[] = "ÏÎÌÍI";
+ $classes_accent[] = "ÔÖÒÓÕØO";
+ $classes_accent[] = "ÚÙÛÜU";
+ $classes_accent[] = "ÇC";
+ $classes_accent[] = "ÑN";
+
+ for ($i=0;$i<count($classes_accent);$i++)
+ for ($j=0;$j<strlen($classes_accent[$i]);$j++)
+ $trans[$classes_accent[$i][$j]] = '['.$classes_accent[$i].']';
+ $newstring = strtr($string,$trans);
+ return $newstring;
+}
+
+
+/** capitalises the first letters of the elements of a name
+ *
+ * @param $name the name to capitalise
+ *
+ * @return STRING the capitalised name
+ */
+function make_name_case($name) {
+ $name = strtolower($name);
+ $pieces = explode('-',$name);
+
+ foreach ($pieces as $piece) {
+ $subpieces = explode("'",$piece);
+ $usubpieces="";
+ foreach ($subpieces as $subpiece)
+ $usubpieces[] = ucwords($subpiece);
+ $upieces[] = implode("'",$usubpieces);
+ }
+ return implode('-',$upieces);
+}
+
+/** creates a username from a first and last name
+*
+* @param $prenom the firstname
+* @param $nom the last name
+*
+* return STRING the corresponding username
+*/
+function make_username($prenom,$nom) {
+ /* on traite le prenom */
+ $prenomUS=replace_accent(trim($prenom));
+ $prenomUS=stripslashes($prenomUS);
+
+ /* on traite le nom */
+ $nomUS=replace_accent(trim($nom));
+ $nomUS=stripslashes($nomUS);
+
+ // calcul du login
+ $username = strtolower($prenomUS.".".$nomUS);
+ $username = str_replace(" ","-",$username);
+ $username = str_replace("'","",$username);
+ return $username;
+}
+
+/** met les majuscules au debut de chaque atome du prénom
+ * @param $prenom le prénom à formater
+ * return STRING le prénom avec les majuscules
+ */
+function make_firstname_case($prenom) {
+ $prenom = strtolower($prenom);
+ $pieces = explode('-',$prenom);
+
+ foreach ($pieces as $piece) {
+ $subpieces = explode("'",$piece);
+ $usubpieces="";
+ foreach ($subpieces as $subpiece)
+ $usubpieces[] = ucwords($subpiece);
+ $upieces[] = implode("'",$usubpieces);
+ }
+ return implode('-',$upieces);
+}
+
+
+/** vérifie si une adresse email est bien formatée
+ * ATTENTION, cette fonction ne doit pas être appelée sur une chaîne ayant subit un addslashes (car elle accepte le "'" qui serait alors un "\'"
+ * @param $email l'adresse email a verifier
+ * @return BOOL
+ */
+function isvalid_email($email) {
+ // la rfc2822 authorise les caractères "a-z", "0-9", "!", "#", "$", "%", "&", "'", "*", "+", "-", "/", "=", "?", "^", "_", "`", "{", "|", "}", "~" aussi bien dans la partie locale que dans le domaine.
+ // Pour la partie locale, on réduit cet ensemble car il n'est pas utilisé.
+ // Pour le domaine, le système DNS limite à [a-z0-9.-], on y ajoute le "_" car il est parfois utilisé.
+ return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,4}$/i", $email);
+}
+
+
+/** genere une chaine aleatoire de 22 caracteres ou moins
+ * @param $len longueur souhaitée, 22 par défaut
+ * @return la chaine aleatoire qui contient les caractères [A-Za-z0-9+/]
+ */
+function rand_token($len = 22) {
+ $len = max(2, $len);
+ $len = min(50, $len);
+ $fp = fopen('/dev/urandom', 'r');
+ // $len * 2 is certainly an overkill,
+ // but HEY, reading 40 bytes from /dev/urandom is not that slow !
+ $token = fread($fp, $len * 2);
+ fclose($fp);
+ $token = base64_encode($token);
+ $token = preg_replace("![Il10O+/]!", "", $token);
+ $token = substr($token,0,$len);
+ return $token;
+}
+
+/** genere une chaine aleatoire convenable pour une url
+ * @param $len longueur souhaitée, 22 par défaut
+ * @return la chaine aleatoire
+ */
+function rand_url_id($len = 22) {
+ return rand_token($len);
+}
+
+
+/** genere une chaine aleatoire convenable pour un mot de passe
+ * @return la chaine aleatoire
+ */
+function rand_pass() {
+ return rand_token(8);
+}
+
+
+/** replacement for file_get_contents functions
+ */
+if (!function_exists("file_get_contents")) {
+ function file_get_contents($filename, $use_include_path = 0) {
+ $data = ""; // just to be safe. Dunno, if this is really needed
+ $file = @fopen($filename, "rb", $use_include_path);
+ if ($file) {
+ while (!feof($file))
+ $data .= fread($file, 1024);
+ fclose($file);
+ }
+ return $data;
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+/**
+ * A class for describing database queries and breaking down the results
+ * into pages.
+ */
+class DiogenesQuery {
+ /** The number of arguments in the current query. */
+ var $nArgs;
+ /** The current query string. */
+ var $sQuery;
+
+ /** The constructor.
+ */
+ function DiogenesQuery($sQue = "") {
+ $this->sQuery = $sQue;
+ $this->nArgs = 0;
+ }
+
+
+ /** Add an argument to the query.
+ */
+ function addArg($sArg, $sSep = "") {
+ if ($sSep && $this->nArgs)
+ $this->sQuery .= $sSep;
+ $this->sQuery .= $sArg;
+ $this->nArgs++;
+ }
+
+
+ /** Return an array holding the start and end point
+ * for the pages holding the results.
+ */
+ function getPages($qcount,$hitmax=0)
+ {
+ if (!$hitmax)
+ return array(array(0,$qcount));
+
+ $pages = array();
+ $nrest = $qcount % $hitmax;
+ $npages = ($qcount - $nrest) / $hitmax;
+
+ // complete pages
+ for($i = 0; $i < $npages; $i++)
+ array_push($pages, array($i*$hitmax, ($i+1)*$hitmax));
+
+ // leftovers
+ if ($nrest)
+ array_push($pages, array($npages*$hitmax, $npages*$hitmax+$nrest));
+ return $pages;
+ }
+
+
+ /** Execute the query and return the result.
+ */
+ function getResult(&$dbh,$hitmax=0,$start=0)
+ {
+ $query = $this->sQuery;
+ if ($hitmax) {
+ $query .= " LIMIT $start, $hitmax";
+ }
+
+ return $dbh->query($query);
+ }
+
+
+ /** Accessor for the query string.
+ */
+ function getQuery() {
+ return $this->sQuery;
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2004 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+
+require_once dirname(__FILE__).'/diogenes.misc.inc.php';
+require_once dirname(__FILE__).'/diogenes.database.table.inc.php';
+
+/** Generic class for editing MySQL tables.
+ *
+ * TODO: give an example of how to use the class
+ *
+ * @see DiogenesDatabaseTable
+ */
+class DiogenesTableEditor extends DiogenesDatabaseTable {
+ /** The actions. */
+ var $actions;
+ /** Is the idfield automatically incremented? */
+ var $autoinc;
+ /** Id of the current entry. */
+ var $id;
+ /** Is the id field editable? */
+ var $idedit;
+ /** Is the id field in the summary? */
+ var $idsum = true;
+ /** The field that is used as the primary key */
+ var $idfield;
+ /** The tables we do a join on. */
+ var $jtables = array();
+ /** The where clause for the select */
+ var $wheres = array();
+ /** Prefix for all the form variables (to avoid conflicting with
+ * any parameters used by the site's pages). */
+ var $prefix = "frm_";
+ /** Should editing functions be disabled? */
+ var $readonly = false;
+ /** Maximum number of results per page, 0 for unlimited */
+ var $maxrows = 0;
+
+ /** CSS class of the table that contains the editor */
+ var $table_class = "light";
+ /** Extra CSS style info for the table that contains the editor */
+ var $table_style = "";
+
+ /** The constructor.
+ *
+ * @param $table the MySQL table we are operating on
+ * @param $idfield the field we use as unique id
+ * @param $idedit is the id field editable ?
+ */
+ function DiogenesTableEditor($table, $idfield, $idedit = false) {
+ global $globals;
+ if (!is_object($globals->db))
+ die("\$globals->db is not an object!");
+
+ $this->DiogenesDatabaseTable($globals->db,$table);
+
+ $this->actions = array();
+
+ if (!isset($this->vars[$idfield]))
+ die("the field '$idfield' was not found in '$table'");
+ $this->idfield = $idfield;
+ $extra = new flagset($this->vars[$idfield]["extra"]);
+ $this->autoinc = $extra->hasflag("auto_increment");
+ $this->idedit = $idedit;
+
+ // unless the id field is editable, remove it from the variables
+ if (!$this->idedit)
+ unset($this->vars[$idfield]);
+ }
+
+
+ /** Add an "action" (hyperlink) to be displayed next to items in the summary.
+ *
+ * @param text the text for the hyperlink
+ * @param url the url for the hyperlink. anything of the form %foobar% will
+ * be replaced by the value of the field 'foobar'
+ */
+ function addAction($text,$url)
+ {
+ array_push($this->actions, array("text" => $text, "url" =>$url));
+ }
+
+
+ /** Adds a join with another table.
+ *
+ * @param $name the name of the table
+ * @param $joinid the fields on which we do a join with our "id"
+ * @param $joindel should we delete the joined entries in the table when we
+ delete an entry from $this->table?
+ * @param $joinextra extra clause for the join
+ *
+ * @see delete_db
+ */
+ function add_join_table($name,$joinid,$joindel,$joinextra="") {
+ $this->jtables[$name] = array("joinid" => $joinid,"joindel" => $joindel,
+ "joinextra" => $joinextra);
+ }
+
+
+ /** EXPERIMENTAL : Add a field from another table.
+ *
+ * @param $table the table for which we are adding the field
+ * @param $name name of the variable (AS clause)
+ * @param $field the name of the table's field
+ * @param $value the default value of the field
+ * @param $desc a description
+ * @param $sum should we display this field in the table summary?
+ * @param $type type of the field : "enum", "set", "text", "textarea", "timestamp"
+ */
+ function add_join_field($table,$name,$field,$value,$desc,$sum,$type="text") {
+ $this->vars[$name] = array("table" => $table, "field" => $field, "type" => $type,
+ "value" => $value, "desc" => $desc, "sum" => $sum);
+ }
+
+
+ /** Add a WHERE condition to the SELECT used for listing.
+ *
+ * @param cond string containing the WHERE condition
+ */
+ function add_where_condition($cond) {
+ array_push($this->wheres, $cond);
+ }
+
+
+ /** Deletes the specified entry from the database.
+ *
+ * @param $id id of the entry to be deleted
+ */
+ function delete_db($id) {
+ if ($id != '') {
+ $this->dbh->query("delete from {$this->table} where {$this->idfield}='$id'");
+
+ // delete dependencies in the tables on which we have a join
+ foreach ($this->jtables as $key => $val) {
+ if ($val['joindel']) {
+ $sql = "delete from {$key} where {$val['joinid']}='$id'";
+ if ($val['joinextra'])
+ $sql .= " and {$val['joinextra']}";
+ $this->dbh->query($sql);
+ }
+ }
+ reset($this->jtables);
+ }
+ }
+
+
+ /** Describe a column and sets it visibility
+ *
+ * @param name the name of the field
+ * @param desc the description for the field
+ * @param sum a boolean indicating whether to display the field in the summary
+ * @param type type of the field (optional)
+ * @param value default value of the field (optional)
+ * @param trans stores translations when it's a "set" value
+ */
+ function describe($name,$desc,$sum,$type='',$value='',$trans=null) {
+ if (!isset($this->vars[$name]))
+ die("unknown field $name");
+ $this->vars[$name]["desc"] = $desc;
+ $this->vars[$name]["sum"] = $sum;
+ if (!empty($type))
+ $this->vars[$name]["type"] = $type;
+ if (!empty($value))
+ $this->vars[$name]["value"] = $value;
+ if (!empty($trans) and $type=="set")
+ $this->vars[$name]["trans"] = $trans;
+ }
+
+
+ /** Describe a column and tell where to find possible values and sets it visibility
+ *
+ * @param name the name of the field
+ * @param desc the description for the field
+ * @param sum a boolean indicating whether to display the field in the summary
+ * @param vtable the name of the table where are located the external values
+ * @param vjoinid the $vtable field name corresponding to $this->table field $name
+ * @param vfield the $vtable field wich hold the significative and comprehensive value
+ */
+ function describe_join_value($name,$desc,$sum,$vtable,$vjoinid,$vfield) {
+ global $globals;
+ if (!isset($this->vars[$name]))
+ die("unknown field $name");
+ $this->vars[$name]["desc"] = $desc;
+ $this->vars[$name]["sum"] = $sum;
+ $this->vars[$name]["type"] = "ext";
+
+ $this->vars[$name]["vtable"] = $vtable;
+ $this->vars[$name]["vjoinid"] = $vjoinid;
+ $this->vars[$name]["vfield"] = $vfield;
+ }
+
+
+ /** Make a field hidden and uneditable
+ *
+ * @param name the name of the field
+ * @param value default value of the field (optional)
+ */
+ function hide($name, $value = null) {
+ if (!isset($this->vars[$name]))
+ die("unknown field $name");
+
+ if (!empty($value))
+ $this->vars[$name]["value"] = $value;
+
+ $this->vars[$name]["edit"] = false;
+ $this->vars[$name]["show"] = false;
+ }
+
+
+ /** Do not display the id field in the summary
+ *
+ */
+ function hide_id() {
+ $this->idsum = false;
+ }
+
+
+ /** Make a field uneditable
+ *
+ * @param name the name of the field
+ * @param value default value of the field (optional)
+ */
+ function lock($name, $value = null) {
+ if (!isset($this->vars[$name]))
+ die("unknown field $name");
+
+ if (!empty($value))
+ $this->vars[$name]["value"] = $value;
+
+ $this->vars[$name]["edit"] = false;
+ }
+
+ /** Read the selected entry from database
+ *
+ * @param id id of the entry we want to read
+ */
+ function from_db($id) {
+ $sql = $this->make_select(false,$id);
+ $res = $this->dbh->query($sql);
+
+ if ($myrow = mysql_fetch_array($res)) {
+ $this->id = $id;
+ foreach ($this->vars as $key => $val) {
+ $this->vars[$key]['value'] = $myrow[$key];
+ }
+ reset($this->vars);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+ /** Read the current entry's values from the $_REQUEST variable
+ */
+ function from_request() {
+ if (isset($_REQUEST[$this->prefix.'id']))
+ $this->id = clean_request($this->prefix.'id');
+
+ foreach ($this->vars as $key => $val) {
+ // if this field is editable, retrieve the value from $_REQUEST
+ if ($val['edit'])
+ $this->vars[$key]['value'] = clean_request($this->prefix.$key);
+
+ // apply type-specific transformations
+ switch ($val['type']) {
+ case "set":
+ if ( is_array($this->vars[$key]['value']) )
+ $this->vars[$key]['value'] = implode(",",$this->vars[$key]['value']);
+ break;
+ case "timestamp":
+ $this->vars[$key]['value'] = mktime($this->vars[$key]['value']);
+ break;
+ }
+ }
+ reset($this->vars);
+ }
+
+
+ /** Write the current entry to database.
+ */
+ function to_db() {
+ $varlst = new flagset();
+ foreach ($this->vars as $key => $val) {
+ # we only want fields from our own table that are either editable or new
+ if (($val['table'] == $this->table) && ($val['edit'] || !isset($this->id))) {
+ switch ($val['type']) {
+ case "password":
+ if ($val['value'])
+ $varlst->addflag("$key='".md5($val['value'])."'");
+ break;
+ default:
+ $varlst->addflag("$key='{$val['value']}'");
+ }
+ }
+ }
+ reset($this->vars);
+
+ if (isset($this->id)) {
+ $sql = "update {$this->table} set {$varlst->value} where {$this->idfield}='{$this->id}'";
+ if ($this->wheres)
+ $sql .= " AND " . join(" AND ", $this->wheres);
+ } else {
+ if (!$this->autoinc && !$this->idedit) {
+ list($this->id) = mysql_fetch_row($this->dbh->query("select MAX({$this->idfield})+1 from {$this->table}"));
+ $varlst->addflag("{$this->idfield}='{$this->id}'");
+ }
+ $sql = "insert into {$this->table} set {$varlst->value}";
+ }
+ $this->dbh->query($sql);
+
+ // retrieve the insertion id
+ if ($this->idedit) {
+ $this->id = $this->vars[$this->idfield]['value'];
+ } else if ($this->autoinc && !isset($this->id)) {
+ $this->id = $this->dbh->insert_id();
+ }
+ }
+
+
+ /** Returns the JOIN clause to read a field.
+ *
+ * @param $val the field we want to read
+ */
+ function make_join_flag($val) {
+ if ($val['table'] == $this->table) {
+ // this field is local, no join clause needed
+ return "";
+ } else {
+ // not a local field, we need a join clause
+ $tbl_key = $val['table'];
+ $tbl_val = $this->jtables[$tbl_key];
+ $flg = "left join $tbl_key on {$this->table}.{$this->idfield}={$tbl_key}.{$tbl_val['joinid']}";
+ if ($tbl_val['joinextra'])
+ $flg .= " and {$tbl_val['joinextra']}";
+ return $flg;
+ }
+ }
+
+
+ /** Create the SELECT request to display the table summary
+ * or to read an entry from the database
+ *
+ * @param $list boolean : are we displaying the summary?
+ * @param $num depending on $list, either the column names or the entry to display
+ */
+ function make_select($list,&$num) {
+ if ($list) {
+ $varlst = new flagset("{$this->table}.{$this->idfield}");
+ $orderby = "";
+ $num = $this->idsum ? 1 : 0;
+ } else {
+ $varlst = new flagset();
+ }
+
+ $joinlst = new flagset();
+ // run over all the variables
+ foreach ($this->vars as $key => $val) {
+ // if we are listing the summary, we want only the variables
+ // where ['sum'] is true.
+ if (!$list || $val['sum']) {
+ // type conversion
+ if ($val['type'] == "timestamp")
+ $varlst->addflag("UNIX_TIMESTAMP({$val['table']}.{$val['field']}) as $key");
+ else
+ $varlst->addflag("{$val['table']}.{$val['field']} as $key");
+
+ // do we need a join clause?
+ if ($flag = $this->make_join_flag($val))
+ $joinlst->addflag($flag);
+
+ // if we are listing the summary, we want an order clause
+ if ($list) {
+ if (!$orderby) $orderby = "order by $key";
+ $num++;
+ }
+ }
+ }
+
+ reset($this->vars);
+
+ $sql = "select {$varlst->value} from {$this->table} {$joinlst->value}";
+
+ # if we are in edit mode, add a WHERE condition
+ if (!$list)
+ $this->add_where_condition("{$this->table}.{$this->idfield}='$num'");
+
+ # sum up all the WHERE conditions
+ if ($this->wheres)
+ $sql .= " where " . join(" AND ", $this->wheres);
+
+ # add order by clause
+ if ($list)
+ $sql .= " $orderby";
+
+ return $sql;
+ }
+
+
+ /** Set the maximum number of rows to return per page when viewing entries.
+ * By default, this is set to 0, meaning all rows are returned.
+ *
+ * @param maxrows the maximum number of rows (0 means unlimited)
+ */
+ function set_maxrows($maxrows)
+ {
+ // check we were given a zero or positive number
+ if ($maxrows < 0) {
+ trigger_error("You cannot pass a negative number ($maxrows) to set_maxrows!");
+ return;
+ }
+
+ $this->maxrows = $maxrows;
+ }
+
+ /** Process the requested action and fill out the Smarty variables for display.
+ * By default, displays the entries in the database table.
+ *
+ * @param page the page that will display the editor's forms
+ * @param outputvar the Smarty variable to which we should assign the output
+ * @param template the template to use for display
+ */
+ function run(&$page,$outputvar='',$template='') {
+ global $globals;
+
+ $action = clean_request('action');
+ $page->assign('table',$this->table);
+
+ switch($action) {
+ case "edit":
+ // check we are not in read-only mode
+ if ($this->readonly) die("Sorry, this table is read-only.");
+
+ // if this is an existing entry, retrieve it
+ if (clean_request("{$this->prefix}id") != '') {
+ $this->from_db(clean_request("{$this->prefix}id"));
+ $page->assign('id',$this->id);
+ }
+
+ // remove the uneditable fields
+ #foreach ($this->vars as $key => $val) {
+ #if (!$val['edit'])
+ # unset($this->vars[$key]);
+ #}
+ reset($this->vars);
+
+ $page->assign('doedit',true);
+ break;
+ case "update":
+ // check we are not in read-only mode
+ if ($this->readonly) die("Sorry, this table is read-only.");
+
+ $this->from_request();
+ $this->to_db();
+ break;
+ case "del":
+ // check we are not in read-only mode
+ if ($this->readonly) die("Sorry, this table is read-only.");
+
+ $this->delete_db(clean_request("{$this->prefix}id"));
+ break;
+ }
+
+ // if we are not in editor mode, display the list
+ if ($action != "edit") {
+ $ncols = 0;
+ $sql = $this->make_select(true,$ncols);
+ $res = $this->dbh->query($sql);
+ $page->assign('ncols',$ncols);
+
+ // determine start and stop of displayed results
+ $p_total = mysql_num_rows($res);
+ $p_start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
+ $p_stop = $this->maxrows ? min($p_total, $p_start + $this->maxrows) : $p_total;
+ $counter = 0;
+
+ while (($counter < $p_stop) and ($myarr = mysql_fetch_array($res))) {
+ if ($counter >= $p_start) {
+ $actions = array();
+ foreach ($this->actions as $myaction) {
+ $url = $myaction['url'];
+ foreach ($myarr as $key=>$val)
+ $url = str_replace("%$key%", $val, $url);
+
+ array_push($actions, array($myaction['text'],$url));
+ }
+ $page->append('rows', array($myarr[$this->idfield], $myarr, $actions) );
+ }
+ $counter++;
+ }
+ mysql_free_result($res);
+
+ // smarty assignements for prev / next page links
+ $page->assign('p_prev', $p_start ? max($p_start - $this->maxrows, 0) : -1);
+ $page->assign('p_next', ($p_stop < $p_total) ? $p_stop : - 1 );
+ $page->assign('p_total', $p_total);
+
+ }
+
+ $page->assign('vars',$this->vars);
+ $page->assign('prefix',$this->prefix);
+ $page->assign('idfield',$this->idfield);
+ $page->assign('idsum',$this->idsum);
+ $page->assign('readonly',$this->readonly);
+ if ($this->readonly && ($this->actions == array()))
+ $page->assign('hideactions', 1);
+ $page->assign('table_class', $this->table_class);
+ $page->assign('table_style', $this->table_style);
+
+ // translations
+ $page->assign('msg_previous_page', __("previous page"));
+ $page->assign('msg_next_page', __("next page"));
+ $page->assign('msg_id', __("id"));
+ $page->assign('msg_action', __("action"));
+ $page->assign('msg_create', __("create"));
+ $page->assign('msg_delete', __("delete"));
+ $page->assign('msg_edit', __("edit"));
+ $page->assign('msg_new_entry', __("new entry"));
+ $page->assign('msg_existing_entry', __("existing entry"));
+ $page->assign('msg_no_change', __("(blank = no change)"));
+ $page->assign('msg_back', __("back"));
+ $page->assign('msg_confirm_delete',
+ __("You are about to delete this entry. Do you want to proceed?"));
+ $page->assign('msg_submit', __("Submit"));
+
+ // if requested, assign the content to be displayed
+ if (!empty($outputvar)) {
+ if (empty($template))
+ $template = $globals->libroot."/templates/table-editor.tpl";
+ $page->assign($outputvar, $page->fetch($template));
+ }
+ }
+
+}
+
+?>
--- /dev/null
+{foreach item=query from=$trace_data}
+<table class="light" style="width: 100%; font-family: monospace">
+ <tr>
+ <td><strong>QUERY:</strong><br />{$query.query}</td>
+ </tr>
+ {if $query.error}
+ <tr>
+ <td><strong>ERROR:</strong><br />{$query.error}</td>
+ </tr>
+ {/if}
+</table>
+{if $query.explain}
+<table class="light" style="width: 100%; font-family: monospace">
+ <tr>
+ {foreach key=key item=item from=$query.explain[0]}
+ <th>{$key}</th>
+ {/foreach}
+ </tr>
+ {foreach item=explain_row from=$query.explain}
+ <tr>
+ {foreach item=item from=$explain_row}
+ <td>{$item}</td>
+ {/foreach}
+ </tr>
+ {/foreach}
+</table>
+{/if}
+<br />
+{/foreach}
--- /dev/null
+{if $smarty.request.logsess}
+
+<table class="light">
+<tr>
+ <th colspan="2">{$msg_session_properties}</th>
+</tr>
+<tr>
+ <td><strong>{$msg_user}</strong></td>
+ <td>{$session.username} {if $session.suer}(suid by {$session.suer}){/if} [<a href="?logauth={$session.auth}&loguser={$session.username}">user's log</a>]</td>
+</tr>
+<tr>
+ <td><strong>{$msg_host}</strong></td>
+ <td>{$session.host} / {$session.ip}</td>
+</tr>
+<tr>
+ <td><strong>{$msg_browser}</strong></td>
+ <td>{$session.browser}</td>
+</tr>
+</table>
+
+<br />
+
+<table class="light">
+<tr>
+ <th>{$msg_date}</th>
+ <th>{$msg_action}</th>
+ <th>{$msg_data}</th>
+</tr>
+{foreach from=$events item=myevent}
+<tr>
+ <td class="logdate">{$myevent.stamp|date_format:"%Y-%m-%d %H:%M:%S"}</td>
+ <td class="logmain">{$myevent.text}</td>
+ <td>{$myevent.data|escape}</td>
+</tr>
+{/foreach}
+</table>
+
+
+{else}
+
+<form name="filter" method="post" action="{$smarty.server.PHP_SELF}">
+<table class="light">
+<tr>
+ <th colspan="2">{$msg_filter_by}</th>
+</tr>
+<tr>
+ <td><strong>{$msg_date}</strong></td>
+ <td>
+ {$msg_year}
+ <select name="year" onChange="this.form.submit()">
+ {html_options options=$years selected=$year}
+ </select>
+ {$msg_month}
+ <select name="month" onChange="this.form.submit()">
+ {html_options options=$months selected=$month}
+ </select>
+ {$msg_day}
+ <select name="day" onChange="this.form.submit()">
+ {html_options options=$days selected=$day}
+ </select>
+ </td>
+</tr>
+<tr>
+ <td><strong>{$msg_user}</strong></td>
+ <td>
+ <input type="text" name="loguser" value="{$loguser}" />
+ {html_options name="logauth" options=$auths selected=$logauth}
+ <input type="submit" value="{$msg_submit}" />
+ </td>
+</tr>
+</table>
+
+</form>
+
+<p/>
+
+<table class="light">
+<tr>
+ <th>{$msg_start}</th>
+ <th>{$msg_user}</th>
+ <th>{$msg_summary}</th>
+ <th>{$msg_actions}</th>
+</tr>
+{counter start=0 assign=cnt print=0}
+{foreach from=$sessions item=mysess}
+<tr{if $cnt % 2} class="odd"{/if}>
+ <td class="logdate">{$mysess.start|date_format:"%Y-%m-%d %H:%M:%S"}</td>
+ <td class="logmain">{$mysess.username} <span class="auth">({$mysess.lauth})</span></td>
+ <td class="logevents">
+ {foreach from=$mysess.events item=myevent}{$myevent} {/foreach}
+ </td>
+ <td>
+{foreach from=$mysess.actions item=myaction}
+ {a class="action" lnk=$myaction}
+{/foreach}
+ </td>
+</tr>
+{counter}
+{/foreach}
+{if $msg_nofilters}
+<tr>
+ <td>{$msg_nofilters}</td>
+</tr>
+{/if}
+</table>
+
+{/if}
--- /dev/null
+{if !$doedit}
+{if !$readonly}
+{literal}
+<script language="javascript" type="text/javascript">
+ <!--
+ function del( myid ) {
+ if (confirm ("{/literal}{$msg_confirm_delete}{literal}")) {
+ document.operations.action.value = "del";
+ document.operations.{/literal}{$prefix}{literal}id.value = myid;
+ document.operations.submit();
+ return true;
+ }
+ }
+ function edit( myid ) {
+ document.operations.action.value = "edit";
+ document.operations.{/literal}{$prefix}{literal}id.value = myid;
+ document.operations.submit();
+ return true;
+ }
+ // -->
+</script>
+{/literal}
+{/if}
+
+<form method="post" action="{$smarty.server.PHP_SELF}" name="operations">
+<input type="hidden" name="action" value="" />
+<input type="hidden" name="{$prefix}id" value="" />
+</form>
+
+<table class="{$table_class}"{if $table_style} style="{$table_style}"{/if}>
+<tr>
+ {if $idsum}<th>{$msg_id}</th>{/if}
+ {foreach from=$vars item=myval}
+ {if $myval.sum}<th>{$myval.desc}</th>{/if}
+ {/foreach}
+{if !$hideactions}
+ <th>{$msg_action}</th>
+{/if}
+</tr>
+{if !$readonly}
+<tr>
+ <td colspan="{$ncols}"><strong>{$msg_new_entry}</strong></td>
+ <td>
+ <a class="action" href="javascript:edit('');">{$msg_create}</a>
+ </td>
+</tr>
+{/if}
+{counter start=1 assign=cnt print=0}
+{foreach from=$rows item=myrow}{assign var="myarr" value=$myrow[1]}
+<tr{if $cnt % 2} class="odd"{/if}>
+{if $idsum} <td>{$myrow[0]}</td>{/if}
+{foreach from=$vars key=mykey item=myval}
+{if $myval.sum}
+ <td>
+ {if $myval.type=="timestamp"}
+ <small>{$myarr.$mykey|date_format:"%Y-%m-%d %H:%M:%S"}</small>
+ {elseif $myval.type=="set" and $myval.trans}
+ {$myval.trans[$myval.value]}
+ {elseif $myval.type=="ext"}
+ {extval table=$table field=$mykey value=$myarr.$mykey vtable=$myval.vtable vjoinid=$myval.vjoinid vfield=$myval.vfield}
+ {else}
+ {$myarr.$mykey}
+ {/if}
+ </td>
+{/if}
+{/foreach}
+{if !$hideactions}
+ <td>
+{if !$readonly}
+ <a class="action" href="javascript:edit('{$myrow[0]}');">{$msg_edit}</a>
+ <a class="action" href="javascript:del('{$myrow[0]}');">{$msg_delete}</a>
+{/if}
+{foreach from=$myrow[2] item=myaction}
+ {a class="action" lnk=$myaction}
+{/foreach}
+ </td>
+{/if}
+</tr>
+{counter}
+{/foreach}
+</table>
+
+{if ($p_prev > -1) || ($p_next > -1)}
+<p class="pagenavigation">
+{if $p_prev > -1}<a href="?start={$p_prev}">{$msg_previous_page}</a> {/if}
+{if $p_next > -1}<a href="?start={$p_next}">{$msg_next_page}</a>{/if}
+</p>
+{/if}
+
+{else}
+
+<form method="post" action="{$smarty.server.PHP_SELF}">
+<input type="hidden" name="action" value="update">
+{if $id!=''}
+<input type="hidden" name="{$prefix}id" value="{$id}">
+{/if}
+<table class="light">
+<tr>
+ <th colspan="2">
+ {if $id!=''}{$msg_existing_entry} {$id}
+ {else}{$msg_new_entry}{/if}
+ </th>
+</tr>
+{foreach from=$vars key=mykey item=myval}
+{if $myval.show}
+<tr>
+ <td>
+ <strong>{$myval.desc}</strong>
+ {if $myval.type=="password"}<br /><em>{$msg_no_change}</em>{/if}
+ </td>
+ <td>
+{if $myval.edit}
+{if $myval.type=="textarea"}
+ <textarea name="{$prefix}{$mykey}" rows="10" cols="70">{$myval.value|escape}</textarea>
+{elseif $myval.type=="set"}
+ {if $myval.trans}
+ {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.trans[$myval.value] trans=$myval.trans}
+ {else}
+ {flags table=$table field=$mykey name="$prefix$mykey" selected=$myval.value}
+ {/if}
+{elseif $myval.type=="ext"}
+ {extval table=$table field=$mykey name="$prefix$mykey" vtable=$myval.vtable vjoinid=$myval.vjoinid vfield=$myval.vfield selected=$myval.value}
+{elseif $myval.type=="timestamp"}
+ <input type="text" name="{$prefix}{$mykey}" value="{$myval.value|date_format:"%Y-%m-%d %H:%M:%S"}" />
+{elseif $myval.type=="password"}
+ <input type="password" name="{$prefix}{$mykey}" size="40" />
+{else}
+ <input type="{$myval.type}" name="{$prefix}{$mykey}" size="40" value="{$myval.value|escape}" />
+{/if}
+{else}
+ {$myval.value|escape}
+{/if}
+ </td>
+</tr>
+{/if}
+{/foreach}
+</table>
+
+<p class="center">
+ <input type="submit" value="{$msg_submit}" />
+</p>
+
+</form>
+
+<p>
+ <a href="{$smarty.server.PHP_SELF}">{$msg_back}</a>
+</p>
+
+{/if}
--- /dev/null
+<?php
+// vim: set expandtab tabstop=4 shiftwidth=4:
+// This code that was derived from the original PHPLIB Template class
+// is copyright by Kristian Koehntopp, NetUSE AG and was released
+// under the LGPL.
+//
+// Authors: Kristian Koehntopp <kris@koehntopp.de> (original from PHPLIB)
+// Bjoern Schotte <bjoern@rent-a-phpwizard.de> (PEARification)
+// Martin Jansen <mj@php.net> (PEAR conformance)
+//
+
+//require_once "PEAR.php";
+
+/**
+ * Converted PHPLIB Template class
+ *
+ * For those who want to use PHPLIB's fine template class,
+ * here's a PEAR conforming class with the original PHPLIB
+ * template code from phplib-stable CVS. Original author
+ * was Kristian Koehntopp <kris@koehntopp.de>
+ *
+ * @author Bjoern Schotte <bjoern@rent-a-phpwizard.de>
+ * @author Martin Jansen <mj@php.net> (PEAR conformance)
+ * @version 1.0
+ */
+class Template_PHPLIB
+{
+ /**
+ * If set, echo assignments
+ * @var bool
+ */
+ var $debug = false;
+
+ /**
+ * $file[handle] = "filename";
+ * @var array
+ */
+ var $file = array();
+
+ /**
+ * fallback paths that should be defined in a child class
+ * @var array
+ */
+ var $file_fallbacks = array();
+
+ /**
+ * Relative filenames are relative to this pathname
+ * @var string
+ */
+ var $root = "";
+
+ /*
+ * $_varKeys[key] = "key"
+ * @var array
+ */
+ var $_varKeys = array();
+
+ /**
+ * $_varVals[key] = "value";
+ * @var array
+ */
+ var $_varVals = array();
+
+ /**
+ * "remove" => remove undefined variables
+ * "comment" => replace undefined variables with comments
+ * "keep" => keep undefined variables
+ * @var string
+ */
+ var $unknowns = "remove";
+
+ /**
+ * "yes" => halt, "report" => report error, continue, "no" => ignore error quietly
+ * @var string
+ */
+ var $haltOnError = "report";
+
+ /**
+ * The last error message is retained here
+ * @var string
+ * @see halt
+ */
+ var $_lastError = "";
+
+
+ /**
+ * Constructor
+ *
+ * @access public
+ * @param string template root directory
+ * @param string how to handle unknown variables
+ * @param array fallback paths
+ */
+ function Template_PHPLIB($root = ".", $unknowns = "remove", $fallback="")
+ {
+ $this->setRoot($root);
+ $this->setUnknowns($unknowns);
+ if (is_array($fallback)) $this->file_fallbacks = $fallback;
+ }
+
+ /**
+ * Sets the template directory
+ *
+ * @access public
+ * @param string new template directory
+ * @return bool
+ */
+ function setRoot($root)
+ {
+ if (!is_dir($root)) {
+ $this->halt("setRoot: $root is not a directory.");
+ return false;
+ }
+
+ $this->root = $root;
+
+ return true;
+ }
+
+ /**
+ * What to do with unknown variables
+ *
+ * three possible values:
+ *
+ * - "remove" will remove unknown variables
+ * (don't use this if you define CSS in your page)
+ * - "comment" will replace undefined variables with comments
+ * - "keep" will keep undefined variables as-is
+ *
+ * @access public
+ * @param string unknowns
+ */
+ function setUnknowns($unknowns = "keep")
+ {
+ $this->unknowns = $unknowns;
+ }
+
+ /**
+ * Set appropriate template files
+ *
+ * With this method you set the template files you want to use.
+ * Either you supply an associative array with key/value pairs
+ * where the key is the handle for the filname and the value
+ * is the filename itself, or you define $handle as the file name
+ * handle and $filename as the filename if you want to define only
+ * one template.
+ *
+ * @access public
+ * @param mixed handle for a filename or array with handle/name value pairs
+ * @param string name of template file
+ * @return bool
+ */
+ function setFile($handle, $filename = "")
+ {
+ if (!is_array($handle)) {
+
+ if ($filename == "") {
+ $this->halt("setFile: For handle $handle filename is empty.");
+ return false;
+ }
+
+ $this->file[$handle] = $this->_filename($filename);
+
+ } else {
+
+ reset($handle);
+ while (list($h, $f) = each($handle)) {
+ $this->file[$h] = $this->_filename($f);
+ }
+ }
+ }
+
+ /**
+ * Set a block in the appropriate template handle
+ *
+ * By setting a block like that:
+ *
+ * <!-- BEGIN blockname -->
+ * html code
+ * <!-- END blockname -->
+ *
+ * you can easily do repeating HTML code, i.e. output
+ * database data nice formatted into a HTML table where
+ * each DB row is placed into a HTML table row which is
+ * defined in this block.
+ * It extracts the template $handle from $parent and places
+ * variable {$name} instead.
+ *
+ * @access public
+ * @param string parent handle
+ * @param string block name handle
+ * @param string variable substitution name
+ */
+ function setBlock($parent, $handle, $name = "")
+ {
+ if (!$this->_loadFile($parent)) {
+ $this->halt("setBlock: unable to load $parent.");
+ return false;
+ }
+
+ if ($name == "") {
+ $name = $handle;
+ }
+
+ $str = $this->getVar($parent);
+ $reg = "/[ \t]*<!--\s+BEGIN $handle\s+-->\s*?\n?(\s*.*?\n?)\s*<!--\s+END $handle\s+-->\s*?\n?/sm";
+ preg_match_all($reg, $str, $m);
+ $str = preg_replace($reg, "{" . "$name}", $str);
+
+ if (isset($m[1][0])) $this->setVar($handle, $m[1][0]);
+ $this->setVar($parent, $str);
+ }
+
+ /**
+ * Set corresponding substitutions for placeholders
+ *
+ * @access public
+ * @param string name of a variable that is to be defined or an array of variables with value substitution as key/value pairs
+ * @param string value of that variable
+ * @param boolean if true, the value is appended to the variable's existing value
+ */
+ function setVar($varname, $value = "", $append = false)
+ {
+ if (!is_array($varname)) {
+
+ if (!empty($varname))
+ if ($this->debug) print "scalar: set *$varname* to *$value*<br>\n";
+
+ $this->_varKeys[$varname] = $this->_varname($varname);
+ ($append) ? $this->_varVals[$varname] .= $value : $this->_varVals[$varname] = $value;
+
+ } else {
+ reset($varname);
+
+ while (list($k, $v) = each($varname)) {
+ if (!empty($k))
+ if ($this->debug) print "array: set *$k* to *$v*<br>\n";
+
+ $this->_varKeys[$k] = $this->_varname($k);
+ ($append) ? $this->_varVals[$k] .= $v : $this->_varVals[$k] = $v;
+ }
+ }
+ }
+
+ /**
+ * Substitute variables in handle $handle
+ *
+ * @access public
+ * @param string name of handle
+ * @return mixed string substituted content of handle
+ */
+ function subst($handle)
+ {
+ if (!$this->_loadFile($handle)) {
+ $this->halt("subst: unable to load $handle.");
+ return false;
+ }
+
+ return @str_replace($this->_varKeys, $this->_varVals, $this->getVar($handle));
+ }
+
+ /**
+ * Same as subst but printing the result
+ *
+ * @access public
+ * @brother subst
+ * @param string handle of template
+ * @return bool always false
+ */
+ function pSubst($handle)
+ {
+ print $this->subst($handle);
+ return false;
+ }
+
+ /**
+ * Parse handle into target
+ *
+ * Parses handle $handle into $target, eventually
+ * appending handle at $target if $append is defined
+ * as TRUE.
+ *
+ * @access public
+ * @param string target handle to parse into
+ * @param string which handle should be parsed
+ * @param boolean append it to $target or not?
+ * @return string parsed handle
+ */
+ function parse($target, $handle, $append = false)
+ {
+ if (!is_array($handle)) {
+ $str = $this->subst($handle);
+
+ ($append) ? $this->setVar($target, $this->getVar($target) . $str) : $this->setVar($target, $str);
+ } else {
+ reset($handle);
+
+ while (list(, $h) = each($handle)) {
+ $str = $this->subst($h);
+ $this->setVar($target, $str);
+ }
+ }
+
+ return $str;
+ }
+
+ /**
+ * Same as parse, but printing it.
+ *
+ * @access public
+ * @brother parse
+ * @param string target to parse into
+ * @param string handle which should be parsed
+ * @param should $handle be appended to $target?
+ * @return bool
+ */
+ function pParse($target, $handle, $append = false)
+ {
+ print $this->finish($this->parse($target, $handle, $append));
+ return false;
+ }
+
+ /**
+ * Return all defined variables and their values
+ *
+ * @access public
+ * @return array with all defined variables and their values
+ */
+ function getVars()
+ {
+ reset($this->_varKeys);
+
+ while (list($k, ) = each($this->_varKeys)) {
+ $result[$k] = $this->getVar($k);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Return one or more specific variable(s) with their values.
+ *
+ * @access public
+ * @param mixed array with variable names or one variable name as a string
+ * @return mixed array of variable names with their values or value of one specific variable
+ */
+ function getVar($varname)
+ {
+ if (!is_array($varname)) {
+ if (isset($this->_varVals[$varname])) {
+ return $this->_varVals[$varname];
+ } else {
+ return "";
+ }
+ } else {
+ reset($varname);
+
+ while (list($k, ) = each($varname)) {
+ $result[$k] = (isset($this->_varVals[$k])) ? $this->_varVals[$k] : "";
+ }
+
+ return $result;
+ }
+ }
+
+ /**
+ * Get undefined values of a handle
+ *
+ * @access public
+ * @param string handle name
+ * @return mixed false if an error occured or the undefined values
+ */
+ function getUndefined($handle)
+ {
+ if (!$this->_loadFile($handle)) {
+ $this->halt("getUndefined: unable to load $handle.");
+ return false;
+ }
+
+ preg_match_all("/{([^ \t\r\n}]+)}/", $this->getVar($handle), $m);
+ $m = $m[1];
+ if (!is_array($m)) {
+ return false;
+ }
+
+ reset($m);
+ while (list(, $v) = each($m)) {
+ if (!isset($this->_varKeys[$v])) {
+ $result[$v] = $v;
+ }
+ }
+
+ if (isset($result) && count($result)) {
+ return $result;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Finish string
+ *
+ * @access public
+ * @param string string to finish
+ * @return finished, i.e. substituted string
+ */
+ function finish($str)
+ {
+ switch ($this->unknowns) {
+ case "remove":
+ $str = preg_replace('/{[^ \t\r\n}]+}/', "", $str);
+ break;
+
+ case "comment":
+ $str = preg_replace('/{([^ \t\r\n}]+)}/', "<!-- Template $handle: Variable \\1 undefined -->", $str);
+ break;
+ }
+
+ return $str;
+ }
+
+ /**
+ * Print variable to the browser
+ *
+ * @access public
+ * @param string name of variable to print
+ */
+ function p($varname)
+ {
+ print $this->finish($this->getVar($varname));
+ }
+
+ /**
+ * Get finished variable
+ *
+ * @access public public
+ * @param string variable to get
+ * @return string string with finished variable
+ */
+ function get($varname)
+ {
+ return $this->finish($this->getVar($varname));
+ }
+
+ /**
+ * Complete filename
+ *
+ * Complete filename, i.e. testing it for slashes
+ *
+ * @access private
+ * @param string filename to be completed
+ * @return string completed filename
+ */
+ function _filename($filename)
+ {
+// if (substr($filename, 0, 1) != "/") {
+// $filename = $this->root."/".$filename;
+// }
+
+ if (file_exists($filename)) return $filename;
+ if (is_array($this->file_fallbacks) && count($this->file_fallbacks) > 0) {
+ reset($this->file_fallbacks);
+ while (list(,$v) = each($this->file_fallbacks)) {
+ if (file_exists($v.basename($filename))) return $v.basename($filename);
+ }
+ $this->halt(sprintf("filename: file %s does not exist in the fallback paths %s.",$filename,implode(",",$this->file_fallbacks)));
+ return false;
+ } else {
+ $this->halt(sprintf("filename: file %s does not exist.",$filename));
+ return false;
+ }
+
+ return $filename;
+ }
+
+ /**
+ * Protect a replacement variable
+ *
+ * @access private
+ * @param string name of replacement variable
+ * @return string replaced variable
+ */
+ function _varname($varname)
+ {
+ return "{".$varname."}";
+ }
+
+ /**
+ * load file defined by handle if it is not loaded yet
+ *
+ * @access private
+ * @param string handle
+ * @return bool FALSE if error, true if all is ok
+ */
+ function _loadFile($handle)
+ {
+ if (isset($this->_varKeys[$handle]) and !empty($this->_varVals[$handle])) {
+ return true;
+ }
+
+ if (!isset($this->file[$handle])) {
+ $this->halt("loadfile: $handle is not a valid handle.");
+ return false;
+ }
+
+ $filename = $this->file[$handle];
+ if (function_exists("file_get_contents")) {
+ $str = file_get_contents($filename);
+ } else {
+ if (!$fp = @fopen($filename,"r")) {
+ $this->halt("loadfile: couldn't open $filename");
+ return false;
+ }
+
+ $str = fread($fp,filesize($filename));
+ fclose($fp);
+ }
+
+ if ($str=='') {
+ $this->halt("loadfile: While loading $handle, $filename does not exist or is empty.");
+ return false;
+ }
+
+ $this->setVar($handle, $str);
+
+ return true;
+ }
+
+ /**
+ * Error function. Halt template system with message to show
+ *
+ * @access public
+ * @param string message to show
+ * @return bool
+ */
+ function halt($msg)
+ {
+ $this->_lastError = $msg;
+
+ if ($this->haltOnError != "no") {
+// return $this->haltMsg($msg);
+ $this->haltMsg($msg);
+ }
+
+ if ($this->haltOnError == "yes") {
+ die("<b>Halted.</b>");
+ }
+
+ return false;
+ }
+
+ /**
+ * printf error message to show
+ *
+ * @access public
+ * @param string message to show
+ * @return object PEAR error object
+ */
+ function haltMsg($msg)
+ {
+// PEAR::raiseError(sprintf("<b>Template Error:</b> %s<br>\n", $msg));
+ printf("<b>Template Error:</b> %s<br>\n", $msg);
+ }
+}
+?>
--- /dev/null
+<?php
+// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
+
+/**
+* This file contains the code of the LayersMenuCommon class.
+* @package PHPLayersMenu
+*/
+
+
+/**
+* This is the "common" class of the PHP Layers Menu library.
+* @version 3.1.1
+* @package PHPLayersMenu
+*/
+class LayersMenuCommon {
+
+/**
+* The name of the package
+* @access private
+* @var string
+*/
+var $_packageName;
+/**
+* The version of the package
+* @access private
+* @var string
+*/
+var $version;
+/**
+* The copyright of the package
+* @access private
+* @var string
+*/
+var $copyright;
+/**
+* The author of the package
+* @access private
+* @var string
+*/
+var $author;
+
+/**
+* URL to be prepended to the menu hrefs
+* @access private
+* @var string
+*/
+var $prependedUrl = "";
+/**
+* Do you want that code execution halts on error?
+* @access private
+* @var string
+*/
+var $haltOnError = "yes";
+
+/**
+* The base directory where the package is installed
+* @access private
+* @var string
+*/
+var $dirroot;
+/**
+* The "libjs" directory of the package
+* @access private
+* @var string
+*/
+var $libjsdir;
+/**
+* The directory where images related to the menu can be found
+* @access private
+* @var string
+*/
+var $imgdir;
+/**
+* The http path corresponding to imgdir
+* @access private
+* @var string
+*/
+var $imgwww;
+/**
+* The directory where templates can be found
+* @access private
+* @var string
+*/
+var $tpldir;
+/**
+* The string containing the menu structure
+* @access private
+* @var string
+*/
+var $menuStructure;
+
+/**
+* It counts nodes for all menus
+* @access private
+* @var integer
+*/
+var $_nodesCount;
+/**
+* A multi-dimensional array where we store informations for each menu entry
+* @access private
+* @var array
+*/
+var $tree;
+/**
+* The maximum hierarchical level of menu items
+* @access private
+* @var integer
+*/
+var $_maxLevel;
+/**
+* An array that counts the number of first level items for each menu
+* @access private
+* @var array
+*/
+var $_firstLevelCnt;
+/**
+* An array containing the number identifying the first item of each menu
+* @access private
+* @var array
+*/
+var $_firstItem;
+/**
+* An array containing the number identifying the last item of each menu
+* @access private
+* @var array
+*/
+var $_lastItem;
+
+/**
+* Data Source Name: the connection string for PEAR DB
+* @access private
+* @var string
+*/
+var $dsn = "pgsql://dbuser:dbpass@dbhost/dbname";
+/**
+* DB connections are either persistent or not persistent
+* @access private
+* @var boolean
+*/
+var $persistent = false;
+/**
+* Name of the table storing data describing the menu
+* @access private
+* @var string
+*/
+var $tableName = "phplayersmenu";
+/**
+* Name of the i18n table corresponding to $tableName
+* @access private
+* @var string
+*/
+var $tableName_i18n = "phplayersmenu_i18n";
+/**
+* Names of fields of the table storing data describing the menu
+*
+* default field names correspond to the same field names foreseen
+* by the menu structure format
+*
+* @access private
+* @var array
+*/
+var $tableFields = array(
+ "id" => "id",
+ "parent_id" => "parent_id",
+ "text" => "text",
+ "href" => "href",
+ "title" => "title",
+ "icon" => "icon",
+ "target" => "target",
+ "orderfield" => "orderfield",
+ "expanded" => "expanded"
+);
+/**
+* Names of fields of the i18n table corresponding to $tableName
+* @access private
+* @var array
+*/
+var $tableFields_i18n = array(
+ "language" => "language",
+ "id" => "id",
+ "text" => "text",
+ "title" => "title"
+);
+/**
+* A temporary array to store data retrieved from the DB and to perform the depth-first search
+* @access private
+* @var array
+*/
+var $_tmpArray = array();
+
+/**
+* The constructor method; it initializates the menu system
+* @return void
+*/
+function LayersMenuCommon() {
+
+ $this->_packageName = "PHP Layers Menu";
+ $this->version = "3.1.1";
+ $this->copyright = "(C) 2001-2003";
+ $this->author = "Marco Pratesi (marco at telug dot it)";
+
+ $this->prependedUrl = "";
+
+ $this->dirroot = "./";
+ $this->libjsdir = "./libjs/";
+ $this->imgdir = "./images/";
+ $this->imgwww = "images/";
+ $this->tpldir = "./templates/";
+ $this->menuStructure = "";
+ $this->separator = "|";
+
+ $this->_nodesCount = 0;
+ $this->tree = array();
+ $this->_maxLevel = array();
+ $this->_firstLevelCnt = array();
+ $this->_firstItem = array();
+ $this->_lastItem = array();
+}
+
+/**
+* The method to set the prepended URL
+* @access public
+* @return boolean
+*/
+function setPrependedUrl($prependedUrl) {
+ // We do not perform any check
+ $this->prependedUrl = $prependedUrl;
+ return true;
+}
+
+/**
+* The method to set the dirroot directory
+* @access public
+* @return boolean
+*/
+function setDirrootCommon($dirroot) {
+ if (!is_dir($dirroot)) {
+ $this->error("setDirroot: $dirroot is not a directory.");
+ return false;
+ }
+ if (substr($dirroot, -1) != "/") {
+ $dirroot .= "/";
+ }
+ $oldlength = strlen($this->dirroot);
+ $foobar = strpos($this->libjsdir, $this->dirroot);
+ if (!($foobar === false || $foobar != 0)) {
+ $this->libjsdir = $dirroot . substr($this->libjsdir, $oldlength);
+ }
+ $foobar = strpos($this->imgdir, $this->dirroot);
+ if (!($foobar === false || $foobar != 0)) {
+ $this->imgdir = $dirroot . substr($this->imgdir, $oldlength);
+ }
+ $foobar = strpos($this->tpldir, $this->dirroot);
+ if (!($foobar === false || $foobar != 0)) {
+ $this->tpldir = $dirroot . substr($this->tpldir, $oldlength);
+ }
+ $this->dirroot = $dirroot;
+ return true;
+}
+
+/**
+* The method to set the libjsdir directory
+* @access public
+* @return boolean
+*/
+function setLibjsdir($libjsdir) {
+ if ($libjsdir != "" && substr($libjsdir, -1) != "/") {
+ $libjsdir .= "/";
+ }
+ if ($libjsdir == "" || substr($libjsdir, 0, 1) != "/") {
+ $foobar = strpos($libjsdir, $this->dirroot);
+ if ($foobar === false || $foobar != 0) {
+ $libjsdir = $this->dirroot . $libjsdir;
+ }
+ }
+ if (!is_dir($libjsdir)) {
+ $this->error("setLibjsdir: $libjsdir is not a directory.");
+ return false;
+ }
+ $this->libjsdir = $libjsdir;
+ return true;
+}
+
+/**
+* The method to set the imgdir directory
+* @access public
+* @return boolean
+*/
+function setImgdir($imgdir) {
+ if ($imgdir != "" && substr($imgdir, -1) != "/") {
+ $imgdir .= "/";
+ }
+ if ($imgdir == "" || substr($imgdir, 0, 1) != "/") {
+ $foobar = strpos($imgdir, $this->dirroot);
+ if ($foobar === false || $foobar != 0) {
+ $imgdir = $this->dirroot . $imgdir;
+ }
+ }
+ if (!is_dir($imgdir)) {
+ $this->error("setImgdir: $imgdir is not a directory.");
+ return false;
+ }
+ $this->imgdir = $imgdir;
+ return true;
+}
+
+/**
+* The method to set imgwww
+* @access public
+* @return void
+*/
+function setImgwww($imgwww) {
+ if ($imgwww != "" && substr($imgwww, -1) != "/") {
+ $imgwww .= "/";
+ }
+ $this->imgwww = $imgwww;
+}
+
+/**
+* The method to set the tpldir directory
+* @access public
+* @return boolean
+*/
+function setTpldirCommon($tpldir) {
+ if ($tpldir != "" && substr($tpldir, -1) != "/") {
+ $tpldir .= "/";
+ }
+ if ($tpldir == "" || substr($tpldir, 0, 1) != "/") {
+ $foobar = strpos($tpldir, $this->dirroot);
+ if ($foobar === false || $foobar != 0) {
+ $tpldir = $this->dirroot . $tpldir;
+ }
+ }
+ if (!is_dir($tpldir)) {
+ $this->error("setTpldir: $tpldir is not a directory.");
+ return false;
+ }
+ $this->tpldir = $tpldir;
+ return true;
+}
+
+/**
+* The method to read the menu structure from a file
+* @access public
+* @param string $tree_file the menu structure file
+* @return boolean
+*/
+function setMenuStructureFile($tree_file) {
+ if (!($fd = fopen($tree_file, "r"))) {
+ $this->error("setMenuStructureFile: unable to open file $tree_file.");
+ return false;
+ }
+ $this->menuStructure = "";
+ while ($buffer = fgets($fd, 4096)) {
+ $buffer = ereg_replace(chr(13), "", $buffer); // Microsoft Stupidity Suppression
+ $this->menuStructure .= $buffer;
+ }
+ fclose($fd);
+ if ($this->menuStructure == "") {
+ $this->error("setMenuStructureFile: $tree_file is empty.");
+ return false;
+ }
+ return true;
+}
+
+/**
+* The method to set the menu structure passing it through a string
+* @access public
+* @param string $tree_string the menu structure string
+* @return boolean
+*/
+function setMenuStructureString($tree_string) {
+ $this->menuStructure = ereg_replace(chr(13), "", $tree_string); // Microsoft Stupidity Suppression
+ if ($this->menuStructure == "") {
+ $this->error("setMenuStructureString: empty string.");
+ return false;
+ }
+ return true;
+}
+
+/**
+* The method to set the value of separator
+* @access public
+* @return void
+*/
+function setSeparator($separator) {
+ $this->separator = $separator;
+}
+
+/**
+* The method to set parameters for the DB connection
+* @access public
+* @param string $dns Data Source Name: the connection string for PEAR DB
+* @param bool $persistent DB connections are either persistent or not persistent
+* @return boolean
+*/
+function setDBConnParms($dsn, $persistent=false) {
+ if (!is_string($dsn)) {
+ $this->error("initdb: \$dsn is not an string.");
+ return false;
+ }
+ if (!is_bool($persistent)) {
+ $this->error("initdb: \$persistent is not a boolean.");
+ return false;
+ }
+ $this->dsn = $dsn;
+ $this->persistent = $persistent;
+ return true;
+}
+
+/**
+* The method to set the name of the table storing data describing the menu
+* @access public
+* @param string
+* @return boolean
+*/
+function setTableName($tableName) {
+ if (!is_string($tableName)) {
+ $this->error("setTableName: \$tableName is not a string.");
+ return false;
+ }
+ $this->tableName = $tableName;
+ return true;
+}
+
+/**
+* The method to set the name of the i18n table corresponding to $tableName
+* @access public
+* @param string
+* @return boolean
+*/
+function setTableName_i18n($tableName_i18n) {
+ if (!is_string($tableName_i18n)) {
+ $this->error("setTableName_i18n: \$tableName_i18n is not a string.");
+ return false;
+ }
+ $this->tableName_i18n = $tableName_i18n;
+ return true;
+}
+
+/**
+* The method to set names of fields of the table storing data describing the menu
+* @access public
+* @param array
+* @return boolean
+*/
+function setTableFields($tableFields) {
+ if (!is_array($tableFields)) {
+ $this->error("setTableFields: \$tableFields is not an array.");
+ return false;
+ }
+ if (count($tableFields) == 0) {
+ $this->error("setTableFields: \$tableFields is a zero-length array.");
+ return false;
+ }
+ reset ($tableFields);
+ while (list($key, $value) = each($tableFields)) {
+ $this->tableFields[$key] = ($value == "") ? "''" : $value;
+ }
+ return true;
+}
+
+/**
+* The method to set names of fields of the i18n table corresponding to $tableName
+* @access public
+* @param array
+* @return boolean
+*/
+function setTableFields_i18n($tableFields_i18n) {
+ if (!is_array($tableFields_i18n)) {
+ $this->error("setTableFields_i18n: \$tableFields_i18n is not an array.");
+ return false;
+ }
+ if (count($tableFields_i18n) == 0) {
+ $this->error("setTableFields_i18n: \$tableFields_i18n is a zero-length array.");
+ return false;
+ }
+ reset ($tableFields_i18n);
+ while (list($key, $value) = each($tableFields_i18n)) {
+ $this->tableFields_i18n[$key] = ($value == "") ? "''" : $value;
+ }
+ return true;
+}
+
+/**
+* The method to parse the current menu structure and correspondingly update related variables
+* @access public
+* @param string $menu_name the name to be attributed to the menu
+* whose structure has to be parsed
+* @return void
+*/
+function parseStructureForMenu(
+ $menu_name = "" // non consistent default...
+ ) {
+ $this->_maxLevel[$menu_name] = 0;
+ $this->_firstLevelCnt[$menu_name] = 0;
+ $this->_firstItem[$menu_name] = $this->_nodesCount + 1;
+ $cnt = $this->_firstItem[$menu_name];
+ $menuStructure = $this->menuStructure;
+
+ /* *********************************************** */
+ /* Partially based on a piece of code taken from */
+ /* TreeMenu 1.1 - Bjorge Dijkstra (bjorge@gmx.net) */
+ /* *********************************************** */
+
+ while ($menuStructure != "") {
+ $before_cr = strcspn($menuStructure, "\n");
+ $buffer = substr($menuStructure, 0, $before_cr);
+ $menuStructure = substr($menuStructure, $before_cr+1);
+ if (substr($buffer, 0, 1) != "#") { // non commented item line...
+ $tmp = rtrim($buffer);
+ $node = explode($this->separator, $tmp);
+ for ($i=count($node); $i<=6; $i++) {
+ $node[$i] = "";
+ }
+ $this->tree[$cnt]["level"] = strlen($node[0]);
+ $this->tree[$cnt]["text"] = $node[1];
+ $this->tree[$cnt]["href"] = $node[2];
+ $this->tree[$cnt]["title"] = $node[3];
+ $this->tree[$cnt]["icon"] = $node[4];
+ $this->tree[$cnt]["target"] = $node[5];
+ $this->tree[$cnt]["expanded"] = $node[6];
+ $cnt++;
+ }
+ }
+
+ /* *********************************************** */
+
+ $this->_lastItem[$menu_name] = count($this->tree);
+ $this->_nodesCount = $this->_lastItem[$menu_name];
+ $this->tree[$this->_lastItem[$menu_name]+1]["level"] = 0;
+ $this->_postParse($menu_name);
+}
+
+/**
+* The method to parse the current menu table and correspondingly update related variables
+* @access public
+* @param string $menu_name the name to be attributed to the menu
+* whose structure has to be parsed
+* @param string $language i18n language; either omit it or pass
+* an empty string ("") if you do not want to use any i18n table
+* @return void
+*/
+function scanTableForMenu(
+ $menu_name = "", // non consistent default...
+ $language = ""
+ ) {
+ $this->_maxLevel[$menu_name] = 0;
+ $this->_firstLevelCnt[$menu_name] = 0;
+ unset($this->tree[$this->_nodesCount+1]);
+ $this->_firstItem[$menu_name] = $this->_nodesCount + 1;
+/* BEGIN BENCHMARK CODE
+$time_start = $this->_getmicrotime();
+/* END BENCHMARK CODE */
+ $db = DB::connect($this->dsn, $this->persistent);
+ if (DB::isError($db)) {
+ $this->error("scanTableForMenu: " . $db->getMessage());
+ }
+ $dbresult = $db->query("
+ SELECT " .
+ $this->tableFields["id"] . " AS id, " .
+ $this->tableFields["parent_id"] . " AS parent_id, " .
+ $this->tableFields["text"] . " AS text, " .
+ $this->tableFields["href"] . " AS href, " .
+ $this->tableFields["title"] . " AS title, " .
+ $this->tableFields["icon"] . " AS icon, " .
+ $this->tableFields["target"] . " AS target, " .
+ $this->tableFields["expanded"] . " AS expanded
+ FROM " . $this->tableName . "
+ WHERE " . $this->tableFields["id"] . " <> 1
+ ORDER BY " . $this->tableFields["orderfield"] . ", " . $this->tableFields["text"] . " ASC
+ ");
+ $this->_tmpArray = array();
+ while ($dbresult->fetchInto($row, DB_FETCHMODE_ASSOC)) {
+ $this->_tmpArray[$row["id"]]["parent_id"] = $row["parent_id"];
+ $this->_tmpArray[$row["id"]]["text"] = $row["text"];
+ $this->_tmpArray[$row["id"]]["href"] = $row["href"];
+ $this->_tmpArray[$row["id"]]["title"] = $row["title"];
+ $this->_tmpArray[$row["id"]]["icon"] = $row["icon"];
+ $this->_tmpArray[$row["id"]]["target"] = $row["target"];
+ $this->_tmpArray[$row["id"]]["expanded"] = $row["expanded"];
+ }
+ if ($language != "") {
+ $dbresult = $db->query("
+ SELECT " .
+ $this->tableFields_i18n["id"] . " AS id, " .
+ $this->tableFields_i18n["text"] . " AS text, " .
+ $this->tableFields_i18n["title"] . " AS title
+ FROM " . $this->tableName_i18n . "
+ WHERE " . $this->tableFields_i18n["id"] . " <> 1
+ AND " . $this->tableFields_i18n["language"] . " = '$language'
+ ");
+ while ($dbresult->fetchInto($row, DB_FETCHMODE_ASSOC)) {
+ $this->_tmpArray[$row["id"]]["text"] = $row["text"];
+ $this->_tmpArray[$row["id"]]["title"] = $row["title"];
+ }
+ }
+ unset($dbresult);
+ unset($row);
+ $this->_depthFirstSearch($this->_tmpArray, $menu_name, 1, 1);
+/* BEGIN BENCHMARK CODE
+$time_end = $this->_getmicrotime();
+$time = $time_end - $time_start;
+print "TIME ELAPSED = " . $time . "\n<br>";
+/* END BENCHMARK CODE */
+ $this->_lastItem[$menu_name] = count($this->tree);
+ $this->_nodesCount = $this->_lastItem[$menu_name];
+ $this->tree[$this->_lastItem[$menu_name]+1]["level"] = 0;
+ $this->_postParse($menu_name);
+}
+
+function _getmicrotime() {
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float) $usec + (float) $sec);
+}
+
+/**
+* Recursive method to perform the depth-first search of the tree data taken from the current menu table
+* @access private
+* @param array $tmpArray the temporary array that stores data to perform
+* the depth-first search
+* @param string $menu_name the name to be attributed to the menu
+* whose structure has to be parsed
+* @param integer $parent_id id of the item whose children have
+* to be searched for
+* @param integer $level the hierarchical level of children to be searched for
+* @return void
+*/
+function _depthFirstSearch($tmpArray, $menu_name, $parent_id=1, $level) {
+ reset ($tmpArray);
+ while (list($id, $foobar) = each($tmpArray)) {
+ if ($foobar["parent_id"] == $parent_id) {
+ unset($tmpArray[$id]);
+ unset($this->_tmpArray[$id]);
+ $cnt = count($this->tree) + 1;
+ $this->tree[$cnt]["level"] = $level;
+ $this->tree[$cnt]["text"] = $foobar["text"];
+ $this->tree[$cnt]["href"] = $foobar["href"];
+ $this->tree[$cnt]["title"] = $foobar["title"];
+ $this->tree[$cnt]["icon"] = $foobar["icon"];
+ $this->tree[$cnt]["target"] = $foobar["target"];
+ $this->tree[$cnt]["expanded"] = $foobar["expanded"];
+ unset($foobar);
+ if ($id != $parent_id) {
+ $this->_depthFirstSearch($this->_tmpArray, $menu_name, $id, $level+1);
+ }
+ }
+ }
+}
+
+/**
+* A method providing parsing needed after both file/string parsing and DB table parsing
+* @access private
+* @param string $menu_name the name of the menu for which the parsing
+* has to be performed
+* @return void
+*/
+function _postParse(
+ $menu_name = "" // non consistent default...
+ ) {
+ for ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) { // this counter scans all nodes of the new menu
+ $this->tree[$cnt]["child_of_root_node"] = ($this->tree[$cnt]["level"] == 1);
+ $this->tree[$cnt]["parsed_text"] = stripslashes($this->tree[$cnt]["text"]);
+ $this->tree[$cnt]["parsed_href"] = (ereg_replace(" ", "", $this->tree[$cnt]["href"]) == "") ? "#" : $this->prependedUrl . $this->tree[$cnt]["href"];
+ $this->tree[$cnt]["parsed_title"] = ($this->tree[$cnt]["title"] == "") ? "" : " title=\"" . addslashes($this->tree[$cnt]["title"]) . "\"";
+ $fooimg = $this->imgdir . $this->tree[$cnt]["icon"];
+ if ($this->tree[$cnt]["icon"] == "" || !(file_exists($fooimg))) {
+ $this->tree[$cnt]["parsed_icon"] = "";
+ } else {
+ $this->tree[$cnt]["parsed_icon"] = $this->tree[$cnt]["icon"];
+ $foobar = getimagesize($fooimg);
+ $this->tree[$cnt]["iconwidth"] = $foobar[0];
+ $this->tree[$cnt]["iconheight"] = $foobar[1];
+ }
+ $this->tree[$cnt]["parsed_target"] = ($this->tree[$cnt]["target"] == "") ? "" : " target=\"" . $this->tree[$cnt]["target"] . "\"";
+// $this->tree[$cnt]["expanded"] = ($this->tree[$cnt]["expanded"] == "") ? 0 : $this->tree[$cnt]["expanded"];
+ $this->_maxLevel[$menu_name] = max($this->_maxLevel[$menu_name], $this->tree[$cnt]["level"]);
+ if ($this->tree[$cnt]["level"] == 1) {
+ $this->_firstLevelCnt[$menu_name]++;
+ }
+ }
+}
+
+/**
+* Method to handle errors
+* @access private
+* @param string $errormsg the error message
+* @return void
+*/
+function error($errormsg) {
+ print "<b>LayersMenu Error:</b> " . $errormsg . "<br />\n";
+ if ($this->haltOnError == "yes") {
+ die("<b>Halted.</b><br />\n");
+ }
+}
+
+} /* END OF CLASS */
+
+?>
--- /dev/null
+<?php
+// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
+
+/**
+* This file contains the code of the TreeMenu class.
+* @package PHPLayersMenu
+*/
+
+/**
+* This is the TreeMenu class of the PHP Layers Menu library.
+*
+* This class depends on the LayersMenuCommon class and on the PEAR conforming version of the PHPLib Template class, i.e. on HTML_Template_PHPLIB
+*
+* @version 3.1.1
+* @package PHPLayersMenu
+*/
+class TreeMenu extends LayersMenuCommon {
+
+/**
+* Type of images used for the Tree Menu
+* @access private
+* @var string
+*/
+var $treeMenuImagesType;
+/**
+* An array where we store the Tree Menu code for each menu
+* @access private
+* @var array
+*/
+var $_treeMenu;
+
+/**
+* The constructor method; it initializates the menu system
+* @return void
+*/
+function TreeMenu() {
+ $this->LayersMenuCommon();
+
+ $this->treeMenuImagesType = "png";
+ $this->_treeMenu = array();
+
+ $this->_nodesCount = 0;
+ $this->tree = array();
+ $this->_maxLevel = array();
+ $this->_firstLevelCnt = array();
+ $this->_firstItem = array();
+ $this->_lastItem = array();
+}
+
+/**
+* The method to set the dirroot directory
+* @access public
+* @return boolean
+*/
+function setDirroot($dirroot) {
+ return $this->setDirrootCommon($dirroot);
+}
+
+/**
+* The method to set the type of images used for the Tree Menu
+* @access public
+* @return void
+*/
+function setTreeMenuImagesType($treeMenuImagesType) {
+ $this->treeMenuImagesType = $treeMenuImagesType;
+}
+
+/**
+* Method to prepare a new Tree Menu.
+*
+* This method processes items of a menu to prepare and return
+* the corresponding Tree Menu code.
+*
+* @access public
+* @param string $menu_name the name of the menu whose items have to be processed
+* @return string
+*/
+function newTreeMenu(
+ $menu_name = "" // non consistent default...
+ ) {
+ if (!isset($this->_firstItem[$menu_name]) || !isset($this->_lastItem[$menu_name])) {
+ $this->error("newTreeMenu: the first/last item of the menu '$menu_name' is not defined; please check if you have parsed its menu data.");
+ return 0;
+ }
+
+ $this->_treeMenu[$menu_name] = "";
+
+ $img_space = $this->imgwww . "tree_space." . $this->treeMenuImagesType;
+ $alt_space = " ";
+ $img_vertline = $this->imgwww . "tree_vertline." . $this->treeMenuImagesType;
+ $alt_vertline = "| ";
+ $img_expand = $this->imgwww . "tree_expand." . $this->treeMenuImagesType;
+ $alt_expand = "+-";
+ $img_expand_first = $this->imgwww . "tree_expand_first." . $this->treeMenuImagesType;
+ $alt_expand_first = "+-";
+ $img_expand_corner = $this->imgwww . "tree_expand_corner." . $this->treeMenuImagesType;
+ $alt_expand_corner = "+-";
+ $img_collapse = $this->imgwww . "tree_collapse." . $this->treeMenuImagesType;
+ $alt_collapse = "--";
+ $img_collapse_first = $this->imgwww . "tree_collapse_first." . $this->treeMenuImagesType;
+ $alt_collapse_first = "--";
+ $img_collapse_corner = $this->imgwww . "tree_collapse_corner." . $this->treeMenuImagesType;
+ $alt_collapse_corner = "--";
+ $img_split = $this->imgwww . "tree_split." . $this->treeMenuImagesType;
+ $alt_split = "|-";
+ $img_split_first = $this->imgwww . "tree_split_first." . $this->treeMenuImagesType;
+ $alt_split_first = "|-";
+ $img_corner = $this->imgwww . "tree_corner." . $this->treeMenuImagesType;
+ $alt_corner = "`-";
+ $img_folder_closed = $this->imgwww . "tree_folder_closed." . $this->treeMenuImagesType;
+ $alt_folder_closed = "->";
+ $img_folder_open = $this->imgwww . "tree_folder_open." . $this->treeMenuImagesType;
+ $alt_folder_open = "->";
+ $img_leaf = $this->imgwww . "tree_leaf." . $this->treeMenuImagesType;
+ $alt_leaf = "->";
+
+ for ($i=0; $i<=$this->_maxLevel[$menu_name]; $i++) {
+ $levels[$i] = 0;
+ }
+
+ // Find last nodes of subtrees
+ $last_level = $this->_maxLevel[$menu_name];
+ for ($i=$this->_lastItem[$menu_name]; $i>=$this->_firstItem[$menu_name]; $i--) {
+ if ($this->tree[$i]["level"] < $last_level) {
+ for ($j=$this->tree[$i]["level"]+1; $j<=$this->_maxLevel[$menu_name]; $j++) {
+ $levels[$j] = 0;
+ }
+ }
+ if ($levels[$this->tree[$i]["level"]] == 0) {
+ $levels[$this->tree[$i]["level"]] = 1;
+ $this->tree[$i]["last_item"] = 1;
+ } else {
+ $this->tree[$i]["last_item"] = 0;
+ }
+ $last_level = $this->tree[$i]["level"];
+ }
+
+ $toggle = "";
+ $toggle_function_name = "toggle" . $menu_name;
+
+ for ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) {
+ $this->_treeMenu[$menu_name] .= "<div id=\"jt" . $cnt . "\" class=\"treemenudiv\">\n";
+
+ // vertical lines from higher levels
+ for ($i=0; $i<$this->tree[$cnt]["level"]-1; $i++) {
+ if ($levels[$i] == 1) {
+ $img = $img_vertline;
+ $alt = $alt_vertline;
+ } else {
+ $img = $img_space;
+ $alt = $alt_space;
+ }
+ $this->_treeMenu[$menu_name] .= "<img class=\"imgs\" src=\"" . $img . "\" alt=\"" . $alt . "\" />";
+ }
+
+ $not_a_leaf = $cnt<$this->_lastItem[$menu_name] && $this->tree[$cnt+1]["level"]>$this->tree[$cnt]["level"];
+
+ if ($this->tree[$cnt]["last_item"] == 1) {
+ // corner at end of subtree or t-split
+ if ($not_a_leaf) {
+ $this->_treeMenu[$menu_name] .= "<a onmousedown=\"". $toggle_function_name . "('" . $cnt . "')\"><img class=\"imgs\" id=\"jt" . $cnt . "node\" src=\"" . $img_collapse_corner . "\" alt=\"" . $alt_collapse_corner . "\" /></a>";
+ } else {
+ $this->_treeMenu[$menu_name] .= "<img class=\"imgs\" src=\"" . $img_corner . "\" alt=\"" . $alt_corner . "\" />";
+ }
+ $levels[$this->tree[$cnt]["level"]-1] = 0;
+ } else {
+ if ($not_a_leaf) {
+ if ($cnt == $this->_firstItem[$menu_name]) {
+ $img = $img_collapse_first;
+ $alt = $alt_collapse_first;
+ } else {
+ $img = $img_collapse;
+ $alt = $alt_collapse;
+ }
+ $this->_treeMenu[$menu_name] .= "<a onmousedown=\"". $toggle_function_name . "('" . $cnt . "');\"><img class=\"imgs\" id=\"jt" . $cnt . "node\" src=\"" . $img . "\" alt=\"" . $alt . "\" /></a>";
+ } else {
+ if ($cnt == $this->_firstItem[$menu_name]) {
+ $img = $img_split_first;
+ $alt = $alt_split_first;
+ } else {
+ $img = $img_split;
+ $alt = $alt_split;
+ }
+ $this->_treeMenu[$menu_name] .= "<a onmousedown=\"". $toggle_function_name . "('" . $cnt . "');\"><img class=\"imgs\" id=\"jt" . $cnt . "node\" src=\"" . $img . "\" alt=\"" . $alt . "\" /></a>";
+ }
+ $levels[$this->tree[$cnt]["level"]-1] = 1;
+ }
+
+ if ($this->tree[$cnt]["parsed_href"] == "" || $this->tree[$cnt]["parsed_href"] == "#") {
+ $a_href_open_img = "";
+ $a_href_close_img = "";
+ $a_href_open = "<a class=\"phplmnormal\">";
+ $a_href_close = "</a>";
+ } else {
+ $a_href_open_img = "<a href=\"" . $this->tree[$cnt]["parsed_href"] . "\"" . $this->tree[$cnt]["parsed_title"] . $this->tree[$cnt]["parsed_target"] . ">";
+ $a_href_close_img = "</a>";
+ $a_href_open = "<a href=\"" . $this->tree[$cnt]["parsed_href"] . "\"" . $this->tree[$cnt]["parsed_title"] . $this->tree[$cnt]["parsed_target"] . " class=\"phplm\">";
+ $a_href_close = "</a>";
+ }
+
+ if ($not_a_leaf) {
+ $this->_treeMenu[$menu_name] .= $a_href_open_img . "<img class=\"imgs\" id=\"jt" . $cnt . "folder\" src=\"" . $img_folder_open . "\" alt=\"" . $alt_folder_open . "\" />" . $a_href_close_img;
+ } else {
+ if ($this->tree[$cnt]["parsed_icon"] != "") {
+ $this->_treeMenu[$menu_name] .= $a_href_open_img . "<img class=\"imgs\" src=\"" . $this->imgwww . $this->tree[$cnt]["parsed_icon"] . "\" width=\"" . $this->tree[$cnt]["iconwidth"] . "\" height=\"" . $this->tree[$cnt]["iconheight"] . "\" alt=\"" . $alt_leaf . "\" />" . $a_href_close_img;
+ } else {
+ $this->_treeMenu[$menu_name] .= $a_href_open_img . "<img class=\"imgs\" src=\"" . $img_leaf . "\" alt=\"" . $alt_leaf . "\" />" . $a_href_close_img;
+ }
+ }
+ $this->_treeMenu[$menu_name] .= " " . $a_href_open . $this->tree[$cnt]["text"] . $a_href_close . "\n";
+ $this->_treeMenu[$menu_name] .= "</div>\n";
+
+ if ($cnt<$this->_lastItem[$menu_name] && $this->tree[$cnt]["level"]<$this->tree[$cnt+1]["level"]) {
+ $this->_treeMenu[$menu_name] .= "<div id=\"jt" . $cnt . "son\" class=\"treemenudiv\">\n";
+ if ($this->tree[$cnt]["expanded"] != 1) {
+ $toggle .= "if (expand[" . $cnt . "] != 1) " . $toggle_function_name . "('" . $cnt . "');\n";
+ } else {
+ $toggle .= "if (collapse[" . $cnt . "] == 1) " . $toggle_function_name . "('" . $cnt . "');\n";
+ }
+ }
+
+ if ($cnt>$this->_firstItem[$menu_name] && $this->tree[$cnt]["level"]>$this->tree[$cnt+1]["level"]) {
+ for ($i=max(1, $this->tree[$cnt+1]["level"]); $i<$this->tree[$cnt]["level"]; $i++) {
+ $this->_treeMenu[$menu_name] .= "</div>\n";
+ }
+ }
+ }
+
+/*
+ $this->_treeMenu[$menu_name] =
+ "<div class=\"phplmnormal\">\n" .
+ $this->_treeMenu[$menu_name] .
+ "</div>\n";
+*/
+ // Some (old) browsers do not support the "white-space: nowrap;" CSS property...
+ $this->_treeMenu[$menu_name] =
+ "<table cellspacing=\"0\" cellpadding=\"0\" style=\"border: 0;\">\n" .
+ "<tr>\n" .
+ "<td class=\"phplmnormal\" style=\"white-space: nowrap;\">\n" .
+ $this->_treeMenu[$menu_name] .
+ "</td>\n" .
+ "</tr>\n" .
+ "</table>\n";
+
+ $t = new Template_PHPLIB();
+ $t->setFile("tplfile", $this->libjsdir . "layerstreemenu.ijs");
+ $t->setVar(array(
+ "toggle_function_name" => $toggle_function_name,
+ "img_expand" => $img_expand,
+ "img_expand_first" => $img_expand_first,
+ "img_collapse" => $img_collapse,
+ "img_collapse_first" => $img_collapse_first,
+ "img_collapse_corner" => $img_collapse_corner,
+ "img_folder_open" => $img_folder_open,
+ "img_expand_corner" => $img_expand_corner,
+ "img_folder_closed" => $img_folder_closed
+ ));
+ $toggle_function = $t->parse("out", "tplfile");
+ $toggle_function =
+ "<script type=\"text/javascript\">\n" .
+ "<!--\n" .
+ $toggle_function .
+ "// -->\n" .
+ "</script>\n";
+
+ $toggle =
+ "<script type=\"text/javascript\">\n" .
+ "<!--\n" .
+ "if ((DOM && !Opera56 && !Konqueror22) || IE4) {\n" .
+ $toggle .
+ "}\n" .
+ "if (NS4) alert('Only the accessibility is provided to Netscape 4 on the JavaScript Tree Menu.\\nWe *strongly* suggest you to upgrade your browser.');\n" .
+ "// -->\n" .
+ "</script>\n";
+
+ $this->_treeMenu[$menu_name] = $toggle_function . "\n" . $this->_treeMenu[$menu_name] . "\n" . $toggle;
+
+ return $this->_treeMenu[$menu_name];
+}
+
+/**
+* Method that returns the code of the requested Tree Menu
+* @access public
+* @param string $menu_name the name of the menu whose Tree Menu code
+* has to be returned
+* @return string
+*/
+function getTreeMenu($menu_name) {
+ return $this->_treeMenu[$menu_name];
+}
+
+/**
+* Method that prints the code of the requested Tree Menu
+* @access public
+* @param string $menu_name the name of the menu whose Tree Menu code
+* has to be printed
+* @return void
+*/
+function printTreeMenu($menu_name) {
+ print $this->_treeMenu[$menu_name];
+}
+
+} /* END OF CLASS */
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'diogenes.icons.inc.php';
+
+
+/** This plugin allows you to insert a directory listing with icons
+ * and modification date.
+ *
+ * To make use of this plugin, insert {FileList} in your page where
+ * the file list should appear.
+ */
+class FileList extends Diogenes_Plugin_Filter {
+ /** Plugin name */
+ var $name = "FileList";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to insert a directory listing with icons and modification date. To make use of this plugin, insert <b>{FileList}</b> in your page where the file list should appear.";
+
+ /** Plugin parameters */
+ var $params = array('dirbase' => "", 'urlbase' => "", 'match' => "");
+
+
+ /** Prepare the output for a single file of the list.
+ *
+ * @param $file
+ * @param $title
+ * @param $url
+ */
+ function list_file($file,$title,$url="") {
+ if (empty($url)) $url = $file;
+ global $globals;
+
+ /* get modification date / time */
+ $modified = date ("d M Y H:m:s", filemtime($file));
+
+ /* get file icon */
+ $icon = $globals->icons->get_mime_icon($file);
+
+ /* calculate file size */
+ $size = filesize($file);
+ if ($size < 1000)
+ $size = "$size B";
+ elseif ($size < 1000000)
+ $size = floor($size/1000)." kB";
+ else
+ $size = floor($size/1000000)." MB";
+
+ /* figure out description */
+ $show = 1;
+ if (preg_match("/(i386\.changes|\.dsc)$/",$file))
+ $show = 0;
+ elseif (preg_match("/\.tar\.gz$/",$file))
+ $desc = "source tarball";
+ elseif (preg_match("/_(all|i386)\.deb$/",$file,$matches))
+ {
+ $type = $matches[1];
+ $desc = "Debian package";
+ if ($type == "all")
+ $desc .= " [platform independant]";
+ else
+ $desc .= " [$type specific]";
+ }
+ elseif (preg_match("/\.diff\.gz$/",$file))
+ $desc = "Debian diff";
+ else $desc = " ";
+
+ /* display the link */
+ if ($show)
+ return "<tr><td><img class=\"fileicon\" src=\"$icon\" /><a href=\"$url\">$title</a></td><td><small>$modified</small></td><td>$size</td><td>$desc</td></tr>\n";
+ }
+
+
+ /** Show an instance of the FileList plugin.
+ *
+ * @param $args
+ */
+ function show($args)
+ {
+ global $page;
+ $bbarel = $page->barrel;
+
+ // process arguments
+ $params = array();
+ foreach($this->params as $key => $val) {
+ $params[$key] = isset($args[$key]) ? $args[$key] : $this->params[$key];
+ }
+
+ //print_r($params);
+ if (empty($params['dirbase'])) {
+ $params['dirbase'] = $bbarel->spool->spoolPath($page->curpage->props['PID']);
+ }
+
+ // process parameters
+ $output = '';
+ $dir = $params['dirbase'];
+ if (is_dir($dir) && ($dh = opendir($dir))) {
+ $output .=
+ '<table class="light">
+ <tr>
+ <th>'.__("file").'</th>
+ <th>'.__("date").'</th>
+ <th>'.__("size").'</th>
+ <th>'.__("description").'</th>
+ </tr>';
+
+ /* get the matching files */
+ while (($fname = readdir($dh)) !== false) {
+ if ( is_file("$dir/$fname")
+ && preg_match('/^'.$params['match'].'/',$fname) )
+ $filelist[] = $fname;
+ }
+ closedir($dh);
+
+ /* order and display */
+ if (is_array($filelist)) {
+ rsort($filelist);
+ while(list ($key,$val) = each($filelist)) {
+ $output .= $this->list_file("$dir/$val",$val,$params['urlbase'].$val);
+ }
+ } else {
+ $output .= '<tr><td colspan="4"><i>'.__("no files").'</i></td></tr>';
+ }
+ $output .= '</table>';
+ }
+ return $output;
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'diogenes/diogenes.hermes.inc.php';
+
+/** The HtmlHead plugin allows you to add entries to a page's <head> block.
+ */
+class HtmlHead extends Diogenes_Plugin_Filter
+{
+ /** Plugin name */
+ var $name = "HtmlHead";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to add entries to a page's <head> block.";
+
+ /** Plugin parameters */
+ var $params = array('contents' => '');
+
+ /** Apply filtering to the input and return an output.
+ *
+ * @param $input
+ */
+ function filter($input)
+ {
+ global $page;
+
+ if ($this->params['contents'])
+ {
+ array_push($page->head, $this->params['contents']);
+ }
+
+ return $input;
+ }
+
+}
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'diogenes/diogenes.hermes.inc.php';
+
+/** The HttpHeader plugin allows you to add an HTTP header to a page.
+ */
+class HttpHeader extends Diogenes_Plugin_Filter
+{
+ /** Plugin name */
+ var $name = "HttpHeader";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to add an HTTP header to a page.";
+
+ /** Plugin parameters */
+ var $params = array('contents' => '');
+
+ /** Apply filtering to the input and return an output.
+ *
+ * @param $input
+ */
+ function filter($input)
+ {
+ $header = $this->params['contents'];
+
+ if ($header)
+ {
+ header($header);
+ }
+
+ return $input;
+ }
+
+}
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'diogenes/diogenes.hermes.inc.php';
+
+/** The MailForm plugin allows you to insert a form to send
+ * an e-mail to a fixed recipient.
+*/
+class LinksMagic extends Diogenes_Plugin_Filter
+{
+ /** Plugin name */
+ var $name = "LinksMagic";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to mark external and secure (HTTPS) links in your pages.";
+
+ /** Plugin parameters */
+ var $params = array('main' => 1, 'sidebar' => 1);
+
+ /** Apply filtering to the input and return an output.
+ *
+ * @param $input
+ */
+ function filter($input)
+ {
+ global $page;
+
+ if ($this->params['sidebar'])
+ {
+ array_unshift($page->head, '<link rel="stylesheet" href="'.$page->url('links-sidebar.css').'" type="text/css" />');
+ }
+
+ if ($this->params['main'])
+ {
+ array_unshift($page->head, '<link rel="stylesheet" href="'.$page->url('links-main.css').'" type="text/css" />');
+ }
+
+ return $input;
+ }
+
+}
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'diogenes/diogenes.hermes.inc.php';
+
+/** The MailForm plugin allows you to insert a form to send
+ * an e-mail to a fixed recipient.
+ *
+ * To make use of this plugin, insert {MailForm}in your page
+ * where the mail form should appear.
+ */
+class MailForm extends Diogenes_Plugin_Filter
+{
+ /** Plugin name */
+ var $name = "MailForm";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to insert a form to send an e-mail to a fixed recipient. To make use of this plugin, insert <b>{MailForm}</b> in your page where the mail form should appear.";
+
+ /** Plugin parameters */
+ var $params = array('email' => '', 'title' => '', 'subject_tag' => '[web form] ');
+
+ /** Show an instance of the MailForm plugin.
+ */
+ function show()
+ {
+ global $page;
+
+ // get params
+ $to_email = $this->params['email'];
+ $form_title = $this->params['title'];
+
+ if (!isvalid_email($to_email)) {
+ return '<p>You must specify a valid e-mail in the "email" parameter to make use of the MailForm plugin.<p>';
+ }
+
+ // get input
+ $action = clean_request('action');
+ $from = clean_request('from');
+
+ $refer = strip_request('refer');
+ if (!$refer)
+ $refer = $_SERVER['HTTP_REFERER'];
+ $message = strip_request('message');
+ $subject = strip_request('subject');
+
+ $showform=0;
+ $output = '';
+ switch($action) {
+ case "mail":
+ if ((!$subject)||(!$message)||(!$from)) {
+ $output .= '<p align="center"><strong>Missing fields !</strong></p>';
+ $showform=1;
+ break;
+ }
+
+ if (!isvalid_email($from)) {
+ $output .= '<p align="center"><strong>Invalid email address !</strong></p>';
+ $showform=1;
+ break;
+ }
+
+ $mymail = new HermesMailer();
+ $mymail->setFrom($from);
+ $mymail->setSubject($this->params['subject_tag'].$subject);
+ $mymail->addTo($to_email);
+ $mymail->setTxtBody($message);
+ $mymail->send();
+
+ $output .= '<p align="center"><strong>Message sent !</strong></p>';
+ if ($refer!="") {
+ $output .= '<p align="center">To return to referring web page click <a href="'.$refer.'">here</a></p>';
+ }
+ break;
+ default:
+ $showform=1;
+ }
+
+ if ($showform) {
+ $output .=
+ '<br/>
+
+ <form action="'.$page->script_uri().'" method="post">
+
+ <table class="light">
+ <tr>
+ <th colspan="2">'.$form_title.'</a></th>
+ </tr>
+ <tr>
+ <td>'.__("from").'</td>
+ <td><input type="text" name="from" size="68" value="'.$from.'" /></td>
+ </tr>
+ <tr>
+ <td>'.__("subject").'</td>
+ <td><input type="text" name="subject" size="68" value="'.$subject.'" /></td>
+ </tr>
+ <tr>
+ <td>'.__("message").'</td>
+ <td><textarea name="message" rows="10" cols="70">'.$message.'</textarea></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <input type="hidden" name="action" value="mail" />
+ <input type="hidden" name="refer" value="'.$refer.'" />
+ <input type="submit" value="'.__("Send").'"/>
+ </td>
+ </tr>
+ </table>
+
+ </form>';
+ }
+ return $output;
+ }
+}
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Render.php';
+
+/** The RenderPhp plugin allows you to execute a file as PHP
+ * rather than return its content.
+ **/
+class RenderPhp extends Diogenes_Plugin_Render
+{
+ /** Plugin name */
+ var $name = "RenderPhp";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to execute a page as PHP code. Simply write your page as a PHP page and its output will be displayed within the template framework.";
+
+ /** Execute a given file and return the output.
+ */
+ function render($file)
+ {
+ ob_start();
+ include($file);
+ $content = ob_get_contents();
+ ob_end_clean();
+
+ return $content;
+ }
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'classTextile.php';
+
+/** The TextileMarkup plugin allows you to render Textile markup into XHTML.
+ */
+class TextileMarkup extends Diogenes_Plugin_Filter
+{
+ /** Plugin name */
+ var $name = "TextileMarkup";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to render Textile markup into XHTML. To get started, take a look at some <a href=\"http://www.textism.com/tools/textile/\">sample Textile markup pages</a>.";
+
+
+ /** Is the plugin allowed with respect to a given write permission on a page ?
+ *
+ * @param $wperms
+ */
+ function allow_wperms($wperms)
+ {
+ return 1;
+ }
+
+
+ /** Take the Wiki markup and return XHTML.
+ *
+ * @param $input
+ */
+ function filter($input)
+ {
+ $textile = new Textile();
+ return $textile->TextileThis($input);
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+/*
+ * Copyright (C) 2003-2005 Polytechnique.org
+ * http://opensource.polytechnique.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+require_once 'Plugin/Filter.php';
+require_once 'Text/Wiki.php';
+
+
+/** The WikiMarkup plugin allows you to render Wiki markup into XHTML.
+ */
+class WikiMarkup extends Diogenes_Plugin_Filter
+{
+ /** Plugin name */
+ var $name = "WikiMarkup";
+
+ /** Plugin description */
+ var $description = "This plugin allows you to render Wiki markup into XHTML. To get started, take a look at some <a href=\"http://wiki.ciaweb.net/yawiki/index.php?area=Text_Wiki&page=SamplePage\">sample Text_Wiki markup pages</a>.";
+
+
+ /** Is the plugin allowed with respect to a given write permission on a page ?
+ * @param $wperms
+ */
+ function allow_wperms($wperms)
+ {
+ return 1;
+ }
+
+
+ /** Take the Wiki markup and return XHTML.
+ *
+ * @param $input
+ */
+ function filter($input)
+ {
+ $wiki =& new Text_Wiki();
+ return $wiki->transform($input, 'Xhtml');
+ }
+}
+
+?>
--- /dev/null
+# Horde .mo files makefile
+#
+# $Horde: horde/po/Makefile,v 1.2.2.3 2002/05/20 17:36:22 jan Exp $
+#
+
+APPLICATION = diogenes
+MSGFMT = msgfmt --statistics -c -v -o
+MSGFMTSOL = msgfmt -v -o
+MSGMERGE = msgmerge -U
+XGETTEXT = xgettext
+XGETTEXT_OPTS = -j -k__ -o
+PHPFILES = find htdocs include -name "*.php"
+
+
+all: install
+
+clearlocations:
+ cd .. && ${XGETTEXT} --no-location ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
+ cd .. && ${XGETTEXT} --add-location ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
+
+xgettext:
+ cd .. && ${XGETTEXT} ${XGETTEXT_OPTS} po/${APPLICATION}.pot `${PHPFILES}`
+
+%.po: ${APPLICATION}.pot
+ @echo "Updating .po files from .pot:"
+ ${MSGMERGE} $@ $<
+
+install: *.po
+ @echo "Checking for os ... ${OSTYPE}"; \
+ if test "${OSTYPE}" = "solaris"; then \
+ echo "You'll probably get some warnings on Solaris. This is normal."; \
+ fi; \
+ for LOCALE in `ls *.po | sed 's/\.[^.]*$$//g'`; do \
+ if test $${LOCALE}.po = "messages.po"; then \
+ continue; \
+ fi; \
+ echo "Compiling locale $${LOCALE}:"; \
+ if ./shtool mkdir -p ../locale/$${LOCALE}/LC_MESSAGES; then \
+ if test "${OSTYPE}" = "solaris"; then \
+ if ${MSGFMTSOL} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \
+ echo " ... done"; \
+ echo; \
+ else \
+ echo " ... FAILED"; \
+ echo; \
+ fi \
+ else \
+ if ${MSGFMT} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \
+ echo " ... done"; \
+ echo; \
+ else \
+ echo " ... FAILED"; \
+ echo; \
+ fi \
+ fi; \
+ else \
+ echo "Could not create locale directory for $${LOCALE}."; \
+ fi \
+ done;
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-01-07 16:44+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: htdocs/index.php:9 htdocs/index.php:13 include/admin/bad.php:46
+msgid "Welcome to Diogenes"
+msgstr ""
+
+#: htdocs/index.php:11 htdocs/index.php:15
+msgid "Welcome to the Diogenes content management system."
+msgstr ""
+
+#: htdocs/index.php:12 htdocs/index.php:16
+msgid ""
+"Diogenes was developed by the webmasters of the Polytechnique.org web site."
+msgstr ""
+
+#: htdocs/index.php:13 htdocs/index.php:17
+msgid "The following barrels are currently available"
+msgstr ""
+
+#: htdocs/index.php:14 htdocs/toplevel/admins.php:8
+#: include/diogenes.barrel-editor.inc.php:152 include/Barrel/Editor.php:159
+msgid "site"
+msgstr ""
+
+#: htdocs/index.php:15 htdocs/toplevel/index.php:12
+#: htdocs/toplevel/logger_actions.php:14 include/admin/options.php:61
+#: include/admin/options.php:63 include/diogenes.barrel-editor.inc.php:153
+#: include/diogenes.plugin-editor.inc.php:238 include/admin/options.php:65
+#: include/Barrel/Editor.php:160 include/Plugin/Editor.php:267
+msgid "description"
+msgstr ""
+
+#: htdocs/prefs.php:19
+msgid "Changing password.."
+msgstr ""
+
+#: htdocs/prefs.php:33 include/admin/prefs.php:20
+msgid "User preferences"
+msgstr ""
+
+#: htdocs/prefs.php:34 include/admin/prefs.php:21
+msgid "Diogenes preferences"
+msgstr ""
+
+#: htdocs/prefs.php:36
+msgid "my information"
+msgstr ""
+
+#: htdocs/prefs.php:37 htdocs/toplevel/accounts.php:13
+#: htdocs/toplevel/boot.php:28 include/diogenes.session.inc.php:138
+msgid "username"
+msgstr ""
+
+#: htdocs/prefs.php:38
+msgid "full name"
+msgstr ""
+
+#: htdocs/prefs.php:40 include/admin/prefs.php:23
+msgid "language"
+msgstr ""
+
+#: htdocs/prefs.php:41 include/admin/prefs.php:24
+msgid ""
+"You can select your preferred language by clicking on the appropriate "
+"language below."
+msgstr ""
+
+#: htdocs/prefs.php:43
+msgid "my password"
+msgstr ""
+
+#: htdocs/prefs.php:44
+msgid "new password"
+msgstr ""
+
+#: htdocs/prefs.php:45
+msgid "confirmation"
+msgstr ""
+
+#: htdocs/prefs.php:47 include/admin/prefs.php:26
+msgid "Change"
+msgstr ""
+
+#: include/admin/compose.php:32 include/admin/edit.php:31
+#: include/admin/compose.php:34 include/admin/edit.php:33
+msgid "Commiting changes to file"
+msgstr ""
+
+#: include/admin/edit.php:41 include/admin/edit.php:43
+msgid "File editor"
+msgstr ""
+
+#: include/admin/edit.php:45 include/admin/edit.php:47
+msgid "File source"
+msgstr ""
+
+#: htdocs/toplevel/index.php:16 htdocs/toplevel/options.php:89
+#: include/admin/menus.php:151 include/admin/options.php:72
+#: include/admin/pages.php:12 include/admin/edit.php:48
+#: include/diogenes.session.inc.php:137
+#: include/diogenes/diogenes.logger-view.inc.php:382
+#: include/diogenes/diogenes.table-editor.inc.php:536
+#: htdocs/toplevel/options.php:53 include/admin/files.php:41
+#: include/admin/menus.php:152 include/admin/options.php:74
+#: include/admin/pages.php:15 include/admin/edit.php:50
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.table-editor.inc.php:541
+#: include/diogenes.barrel-editor.inc.php:157
+#: include/diogenes.plugin-editor.inc.php:235 include/admin/files.php:38
+#: include/admin/menus.php:164 include/admin/options.php:76
+#: include/admin/pages.php:14 include/Barrel/Editor.php:164
+#: include/Plugin/Editor.php:264
+#: include/diogenes/diogenes.logger-view.inc.php:378
+msgid "Submit"
+msgstr ""
+
+#: include/admin/files.php:27 include/admin/pages.php:152
+#: include/admin/compose.php:58 include/admin/edit.php:50
+#: include/Barrel/Page.php:143
+msgid "pages catalog"
+msgstr ""
+
+#: include/admin/files.php:28 include/admin/pages.php:154
+#: include/admin/compose.php:59 include/admin/edit.php:51
+#: include/Barrel/Page.php:147 include/admin/index.php:74
+#: include/Barrel/Page.php:174
+msgid "page properties"
+msgstr ""
+
+#: include/admin/files.php:29 include/admin/pages.php:155
+#: include/admin/compose.php:60 include/admin/edit.php:52
+#: include/diogenes.rcs.inc.php:452 include/diogenes.rcs.inc.php:621
+#: include/Barrel/Page.php:148 include/admin/files.php:146
+#: include/Barrel/Page.php:175
+msgid "view page"
+msgstr ""
+
+#: include/admin/files.php:83 include/admin/files.php:92
+#: include/admin/files.php:101 include/admin/pages.php:156
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/Barrel/Page.php:149 include/Barrel/Page.php:173
+msgid "browse files"
+msgstr ""
+
+#: include/admin/files.php:35 include/admin/pages.php:167
+#: include/admin/compose.php:64 include/admin/edit.php:56
+#: include/admin/pages.php:132 include/Barrel/File.php:94
+#: include/Barrel/File.php:114
+msgid "raw editor"
+msgstr ""
+
+#: htdocs/toplevel/options.php:88 include/admin/files.php:36
+#: include/admin/pages.php:168 include/admin/compose.php:65
+#: include/admin/edit.php:57 include/diogenes.barrel.inc.php:316
+#: htdocs/toplevel/options.php:51 include/admin/pages.php:133
+#: include/diogenes.barrel.inc.php:347 include/Barrel/File.php:95
+#: include/Barrel/File.php:115 include/diogenes.barrel.inc.php:343
+msgid "HTML editor"
+msgstr ""
+
+#: include/admin/files.php:85 include/admin/files.php:94
+#: include/admin/pages.php:163 include/admin/pages.php:170
+#: include/admin/compose.php:66 include/admin/edit.php:58
+#: include/admin/pages.php:129 include/admin/pages.php:134
+#: include/Barrel/File.php:97 include/Barrel/File.php:117
+msgid "file revisions"
+msgstr ""
+
+msgid "Ekit"
+msgstr ""
+
+#: include/admin/menus.php:36 include/admin/menus.php:37
+msgid "The site's menus"
+msgstr ""
+
+#: include/admin/menus.php:44 include/admin/menus.php:45
+msgid "The selected menu has child items, please remove them first."
+msgstr ""
+
+#: include/admin/menus.php:144 include/admin/menus.php:145
+#: include/admin/menus.php:157
+msgid "menu entry properties"
+msgstr ""
+
+#: include/admin/menus.php:147 include/admin/menus.php:148
+#: include/admin/menus.php:160
+msgid "none"
+msgstr ""
+
+#: include/admin/menus.php:148 include/admin/menus.php:149
+#: include/admin/menus.php:161
+msgid "internal link"
+msgstr ""
+
+#: include/admin/menus.php:149 include/admin/menus.php:150
+#: include/admin/menus.php:162
+msgid "external link"
+msgstr ""
+
+#: include/admin/menus.php:173 include/diogenes.plugin-editor.inc.php:240
+#: include/admin/menus.php:185 include/Plugin/Editor.php:269
+msgid "move up"
+msgstr ""
+
+#: include/admin/menus.php:176 include/diogenes.plugin-editor.inc.php:241
+#: include/admin/menus.php:188 include/Plugin/Editor.php:270
+msgid "move down"
+msgstr ""
+
+#: htdocs/toplevel/index.php:85 include/admin/menus.php:178
+#: include/diogenes.rcs.inc.php:417
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#: include/diogenes/diogenes.table-editor.inc.php:534
+#: include/diogenes.barrel-editor.inc.php:43 include/Barrel/Page.php:119
+#: include/Barrel/File.php:74 include/admin/menus.php:190
+#: include/Barrel/File.php:92 include/Barrel/Page.php:143
+#: include/Barrel/Editor.php:45
+msgid "edit"
+msgstr ""
+
+#: htdocs/toplevel/index.php:87 include/admin/menus.php:179
+#: include/admin/pages.php:202 include/diogenes.rcs.inc.php:419
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes.barrel-editor.inc.php:52 include/Barrel/Page.php:129
+#: include/Barrel/File.php:77 include/admin/menus.php:191
+#: include/Barrel/File.php:95 include/Barrel/Page.php:153
+#: include/Barrel/Editor.php:54
+msgid "delete"
+msgstr ""
+
+#: include/admin/menus.php:217 include/admin/menus.php:216
+#: include/admin/menus.php:228
+msgid "External links are denoted with the [ext] prefix."
+msgstr ""
+
+#: include/admin/menus.php:222 include/admin/menus.php:221
+#: include/admin/menus.php:233
+msgid "Add new entry"
+msgstr ""
+
+#: include/admin/files.php:63 include/admin/files.php:86
+#: include/admin/files.php:88
+msgid "Error during file transfer!"
+msgstr ""
+
+#: include/admin/files.php:69 include/admin/files.php:92
+#: include/admin/files.php:94
+msgid "Deleting file"
+msgstr ""
+
+#: include/admin/files.php:81 include/admin/files.php:112
+#: include/admin/files.php:120
+msgid "Revision differences"
+msgstr ""
+
+#: include/admin/files.php:90 include/admin/files.php:120
+#: include/admin/files.php:128
+msgid "File revisions"
+msgstr ""
+
+#: include/admin/files.php:103 include/admin/files.php:155
+#: include/admin/files.php:194
+msgid "File manager"
+msgstr ""
+
+#: include/admin/files.php:40 include/admin/files.php:38
+msgid "Files in current directory"
+msgstr ""
+
+#: include/admin/files.php:41 include/admin/files.php:40
+#: include/admin/files.php:37
+msgid "Import file"
+msgstr ""
+
+#: include/admin/files.php:42 include/admin/pages.php:210
+#: include/admin/pages.php:191 include/admin/files.php:39
+#: include/admin/pages.php:163
+msgid "Send"
+msgstr ""
+
+#: include/admin/files.php:43
+msgid "File to upload"
+msgstr ""
+
+#: include/admin/index.php:20 include/admin/index.php:45
+#: include/admin/index.php:47
+msgid "site created"
+msgstr ""
+
+#: include/admin/index.php:23 include/admin/index.php:50
+#: include/admin/index.php:63
+msgid "page created"
+msgstr ""
+
+#: include/admin/index.php:26 include/admin/index.php:54
+msgid "page deleted"
+msgstr ""
+
+#: include/admin/index.php:31 include/admin/index.php:59
+#: include/admin/index.php:86
+msgid "file updated"
+msgstr ""
+
+#: include/admin/index.php:34 include/admin/index.php:64
+msgid "file removed"
+msgstr ""
+
+#: include/admin/index.php:43 include/admin/index.php:77
+#: include/admin/index.php:105
+msgid "Welcome to the Diogenes backoffice"
+msgstr ""
+
+#: include/admin/files.php:47 include/admin/index.php:44
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/admin/files.php:49 include/admin/index.php:78
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/files.php:46 include/admin/index.php:106
+#: include/diogenes/diogenes.logger-view.inc.php:368
+msgid "date"
+msgstr ""
+
+#: include/admin/index.php:45 include/admin/users.php:28
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/index.php:79
+#: include/diogenes/diogenes.logger-view.inc.php:366
+#: include/admin/index.php:107
+#: include/diogenes/diogenes.logger-view.inc.php:365
+msgid "user"
+msgstr ""
+
+#: include/admin/index.php:46 include/admin/index.php:80
+#: include/admin/index.php:108
+msgid "event"
+msgstr ""
+
+#: include/admin/pages.php:11 include/admin/pages.php:14
+#: include/admin/pages.php:158
+msgid "Page manager"
+msgstr ""
+
+#: include/admin/pages.php:13 include/admin/pages.php:16
+#: include/admin/pages.php:15
+msgid "Reset"
+msgstr ""
+
+#: include/admin/pages.php:14 include/diogenes.barrel.inc.php:312
+#: include/admin/pages.php:17 include/diogenes.barrel.inc.php:343
+#: include/admin/pages.php:16 include/diogenes.barrel.inc.php:339
+msgid "Page properties"
+msgstr ""
+
+#: include/admin/pages.php:15 include/admin/files.php:55
+#: include/admin/pages.php:19 include/admin/files.php:52
+#: include/admin/pages.php:18
+msgid "location"
+msgstr ""
+
+#: htdocs/toplevel/index.php:10 htdocs/toplevel/logger_actions.php:13
+#: include/admin/options.php:60 include/admin/pages.php:16
+#: include/admin/files.php:56 include/admin/options.php:62
+#: include/admin/pages.php:20 include/admin/files.php:53
+#: include/admin/options.php:64 include/admin/pages.php:19
+msgid "title"
+msgstr ""
+
+msgid "display"
+msgstr ""
+
+#: include/admin/files.php:56 include/admin/pages.php:22
+msgid "access"
+msgstr ""
+
+#: include/admin/pages.php:22 include/admin/pages.php:26
+msgid "Add a page"
+msgstr ""
+
+#: include/admin/pages.php:43 include/admin/pages.php:47
+#: include/admin/pages.php:50
+msgid "Document name does not end in .doc"
+msgstr ""
+
+#: include/admin/pages.php:46 include/admin/pages.php:50
+#: include/admin/pages.php:53
+msgid "Checking in Word file"
+msgstr ""
+
+#: include/admin/pages.php:51 include/admin/pages.php:55
+#: include/admin/pages.php:58
+msgid "Importing Word file"
+msgstr ""
+
+#: include/admin/pages.php:57 include/admin/pages.php:61
+#: include/admin/pages.php:64
+msgid "Importing HTML file"
+msgstr ""
+
+#: include/admin/pages.php:62 include/admin/pages.php:66
+#: include/admin/pages.php:69
+msgid "Raw file import"
+msgstr ""
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "visible"
+msgstr ""
+
+msgid "invisible"
+msgstr ""
+
+#: htdocs/toplevel/index.php:84 include/admin/pages.php:196
+#: include/diogenes.rcs.inc.php:416 include/diogenes.rcs.inc.php:450
+#: include/diogenes.rcs.inc.php:619 include/Barrel/Page.php:118
+#: include/Barrel/File.php:73 include/admin/files.php:144
+#: include/Barrel/File.php:91 include/Barrel/Page.php:142
+msgid "view"
+msgstr ""
+
+#: include/admin/pages.php:197 include/Barrel/Page.php:120
+#: include/Barrel/Page.php:144
+msgid "properties"
+msgstr ""
+
+#: include/admin/pages.php:198
+msgid "files"
+msgstr ""
+
+#: include/admin/pages.php:199 include/diogenes.rcs.inc.php:418
+#: include/Barrel/Page.php:121 include/Barrel/File.php:75
+#: include/Barrel/File.php:93 include/Barrel/Page.php:145
+msgid "revisions"
+msgstr ""
+
+#: include/admin/pages.php:211 include/admin/pages.php:195
+#: include/admin/pages.php:172
+msgid "Import a Word document"
+msgstr ""
+
+#: include/admin/pages.php:214 include/admin/pages.php:198
+#: include/admin/pages.php:176
+msgid "This page's master document is currently a Word document."
+msgstr ""
+
+#: include/admin/pages.php:215 include/admin/pages.php:199
+#: include/admin/pages.php:177
+msgid "You can upload a new version of the Word document below."
+msgstr ""
+
+#: include/admin/pages.php:216 include/admin/pages.php:200
+#: include/admin/pages.php:178
+msgid "You can get the current version of the file here"
+msgstr ""
+
+#: include/admin/pages.php:219 include/admin/pages.php:203
+#: include/admin/pages.php:181
+msgid "If you wish, you can set this page's content from a Word document."
+msgstr ""
+
+#: include/admin/pages.php:220 include/admin/pages.php:204
+#: include/admin/pages.php:182
+msgid "To do so, simply upload the Word document below."
+msgstr ""
+
+#: include/admin/pages.php:222 include/admin/pages.php:208
+#: include/admin/pages.php:160
+msgid "Import HTML"
+msgstr ""
+
+#: include/admin/pages.php:223 include/admin/pages.php:209
+#: include/admin/pages.php:161
+msgid ""
+"You can replace the current page's contents by uploading an HTML file below."
+msgstr ""
+
+#: include/admin/pages.php:224 include/admin/pages.php:210
+#: include/admin/pages.php:162
+msgid ""
+"If the file name ends with .htm or .html, anything outside the <body>"
+"</body> pair will be stripped."
+msgstr ""
+
+#: htdocs/toplevel/admins.php:20 include/admin/users.php:15
+msgid "Could not find requested user"
+msgstr ""
+
+#: include/admin/users.php:24
+msgid "Users administration"
+msgstr ""
+
+#: include/admin/users.php:25
+msgid "Registered users"
+msgstr ""
+
+#: include/admin/users.php:26 include/diogenes.toplevel.inc.php:200
+#: include/diogenes.toplevel.inc.php:94 include/diogenes.toplevel.inc.php:95
+msgid "Administrators"
+msgstr ""
+
+#: include/admin/users.php:29
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.table-editor.inc.php:526
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.logger-view.inc.php:369
+msgid "action"
+msgstr ""
+
+#: htdocs/toplevel/admins.php:45 include/admin/users.php:35
+msgid "remove"
+msgstr ""
+
+#: include/diogenes.session.inc.php:134
+msgid "Diogenes login"
+msgstr ""
+
+#: include/diogenes.session.inc.php:135
+msgid "Connexion"
+msgstr ""
+
+#: htdocs/toplevel/accounts.php:16 htdocs/toplevel/boot.php:31
+#: include/diogenes.session.inc.php:136
+msgid "password"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:52 include/diogenes.barrel.inc.php:104
+#: include/diogenes.barrel.inc.php:105 include/diogenes.toplevel.inc.php:53
+#: include/diogenes.barrel.inc.php:107
+msgid "You are not authorized to view this page!"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:187
+#: include/diogenes.admin.inc.php:62 include/diogenes.barrel.inc.php:301
+#: include/diogenes.toplevel.inc.php:81 include/diogenes.barrel.inc.php:332
+#: include/diogenes.admin.inc.php:69 include/diogenes.toplevel.inc.php:39
+#: include/diogenes.toplevel.inc.php:82 include/diogenes.admin.inc.php:68
+#: include/diogenes.barrel.inc.php:328
+msgid "Home"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:192 include/diogenes.barrel.inc.php:303
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:334
+#: include/diogenes.toplevel.inc.php:87 include/diogenes.barrel.inc.php:330
+msgid "Logout"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:194 include/diogenes.barrel.inc.php:306
+#: include/diogenes.toplevel.inc.php:88 include/diogenes.barrel.inc.php:337
+#: include/diogenes.toplevel.inc.php:89 include/diogenes.barrel.inc.php:333
+msgid "Login"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:37 include/diogenes.admin.inc.php:64
+#: include/diogenes.barrel.inc.php:310 include/diogenes.barrel.inc.php:341
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:70
+#: include/diogenes.barrel.inc.php:337
+msgid "Administration"
+msgstr ""
+
+#: include/diogenes.rcs.inc.php:455 include/diogenes.rcs.inc.php:624
+#: include/admin/files.php:149
+msgid "diff to"
+msgstr ""
+
+#: include/diogenes.rcs.inc.php:459 include/diogenes.rcs.inc.php:628
+#: include/admin/files.php:153
+msgid "restore"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "Admin manual"
+msgstr ""
+
+msgid "Settings"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:202 include/diogenes.admin.inc.php:67
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:78
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.admin.inc.php:77
+msgid "Users"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:68 include/diogenes.admin.inc.php:80
+#: include/diogenes.admin.inc.php:79
+msgid "Content"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:69 include/diogenes.admin.inc.php:81
+#: include/diogenes.admin.inc.php:80
+msgid "Pages catalog"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:70 include/diogenes.admin.inc.php:82
+#: include/diogenes.admin.inc.php:81
+msgid "Edit style sheet"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:83
+#: include/diogenes.admin.inc.php:82
+msgid "Edit menu"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:39
+msgid "Toplevel administration"
+msgstr ""
+
+#: include/diogenes.page.inc.php:59
+msgid "Powered by Diogenes"
+msgstr ""
+
+#: include/diogenes.page.inc.php:213 include/diogenes.page.inc.php:216
+#: include/diogenes.page.inc.php:212
+msgid "The requested document was not found."
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "User manual"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:191 include/diogenes.barrel.inc.php:304
+#: include/diogenes.toplevel.inc.php:85 include/diogenes.barrel.inc.php:335
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:331
+msgid "Preferences"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:197 include/diogenes.toplevel.inc.php:91
+#: include/diogenes.toplevel.inc.php:92
+msgid "Sites"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "Root manual"
+msgstr ""
+
+#: htdocs/toplevel/index.php:8 include/diogenes.toplevel.inc.php:199
+#: htdocs/toplevel/index.php:11 include/diogenes.toplevel.inc.php:93
+#: htdocs/toplevel/index.php:16 include/diogenes.toplevel.inc.php:94
+msgid "List of sites"
+msgstr ""
+
+#: htdocs/toplevel/admins.php:7
+msgid "Site administrators"
+msgstr ""
+
+#: htdocs/toplevel/accounts.php:7 include/diogenes.toplevel.inc.php:203
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.toplevel.inc.php:99
+msgid "User accounts"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:204 include/diogenes.toplevel.inc.php:99
+#: include/diogenes.toplevel.inc.php:100
+msgid "Browse user log"
+msgstr ""
+
+#: htdocs/toplevel/logger_actions.php:8 include/diogenes.toplevel.inc.php:205
+#: include/diogenes.toplevel.inc.php:100 include/diogenes.toplevel.inc.php:101
+msgid "Logger actions"
+msgstr ""
+
+#: include/diogenes.page.inc.php:198 include/diogenes.page.inc.php:201
+#: include/diogenes.page.inc.php:197
+msgid "Diogenes error"
+msgstr ""
+
+#: include/diogenes.page.inc.php:199 include/diogenes.page.inc.php:202
+#: include/diogenes.page.inc.php:198
+msgid "Error"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+#: include/diogenes/diogenes.logger-view.inc.php:336
+msgid "view session"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:339
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+msgid "user's log"
+msgstr ""
+
+#: htdocs/toplevel/logger.php:7
+msgid "User activity log"
+msgstr ""
+
+#: htdocs/toplevel/accounts.php:17 htdocs/toplevel/boot.php:32
+msgid "permissions"
+msgstr ""
+
+#: htdocs/toplevel/accounts.php:19 htdocs/toplevel/admins.php:46
+msgid "view log"
+msgstr ""
+
+#: htdocs/toplevel/admins.php:9
+msgid "administrator"
+msgstr ""
+
+#: htdocs/toplevel/admins.php:10 htdocs/toplevel/index.php:11
+#: include/admin/files.php:50 include/admin/menus.php:220
+#: include/admin/pages.php:21
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/admin/files.php:52 include/admin/menus.php:219
+#: include/admin/pages.php:25
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/admin/files.php:49 include/admin/menus.php:231
+#: include/diogenes/diogenes.logger-view.inc.php:374
+msgid "actions"
+msgstr ""
+
+#: htdocs/toplevel/admins.php:43
+msgid "site users"
+msgstr ""
+
+#: htdocs/toplevel/admins.php:44
+msgid "demote to user"
+msgstr ""
+
+#: htdocs/toplevel/index.php:9 include/diogenes.barrel-editor.inc.php:151
+#: include/Barrel/Editor.php:158
+msgid "alias"
+msgstr ""
+
+#: htdocs/toplevel/index.php:13 include/admin/options.php:62
+#: include/admin/options.php:64 include/diogenes.barrel-editor.inc.php:154
+#: include/admin/options.php:66 include/Barrel/Editor.php:161
+msgid "keywords"
+msgstr ""
+
+#: htdocs/toplevel/index.php:14 include/diogenes.barrel-editor.inc.php:155
+#: include/Barrel/Editor.php:162
+msgid "Create a new site"
+msgstr ""
+
+#: htdocs/toplevel/index.php:17 include/diogenes.barrel-editor.inc.php:158
+#: include/Barrel/Editor.php:166
+msgid "vhost (see note)"
+msgstr ""
+
+#: htdocs/toplevel/index.php:19 include/diogenes.barrel-editor.inc.php:160
+#: include/Barrel/Editor.php:168
+msgid "flags"
+msgstr ""
+
+#: htdocs/toplevel/index.php:86 include/diogenes.barrel-editor.inc.php:45
+#: include/Barrel/Editor.php:47
+msgid "admin"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:65 include/diogenes.admin.inc.php:72
+#: include/diogenes.admin.inc.php:71
+msgid "Activity"
+msgstr ""
+
+#: htdocs/toplevel/accounts.php:14 htdocs/toplevel/boot.php:29
+msgid "first name"
+msgstr ""
+
+#: htdocs/toplevel/accounts.php:15 htdocs/toplevel/boot.php:30
+msgid "last name"
+msgstr ""
+
+#: include/admin/compose.php:16 include/admin/edit.php:15
+#: include/diogenes.admin.inc.php:44
+msgid "Directory not found"
+msgstr ""
+
+#: include/admin/pages.php:19 include/admin/pages.php:23
+#: include/admin/files.php:57
+msgid "read access"
+msgstr ""
+
+#: include/admin/pages.php:20 include/admin/pages.php:24
+#: include/admin/files.php:58
+msgid "write access"
+msgstr ""
+
+#: include/admin/pages.php:83
+msgid "world-writable pages are not allowed with PHP execution enabled!"
+msgstr ""
+
+#: include/diogenes.barrel.inc.php:314 include/diogenes.barrel.inc.php:345
+#: include/diogenes.barrel.inc.php:341
+msgid "Edit this page"
+msgstr ""
+
+#: include/diogenes.barrel.inc.php:315 include/diogenes.barrel.inc.php:346
+#: include/diogenes.barrel.inc.php:342
+msgid "Raw editor"
+msgstr ""
+
+#: htdocs/toplevel/options.php:90 htdocs/toplevel/options_expert.php:56
+msgid "Convert"
+msgstr ""
+
+#: htdocs/toplevel/options.php:95 htdocs/toplevel/options_expert.php:61
+msgid ""
+"You are currently using RCS as the version control system for your barrels."
+msgstr ""
+
+#: htdocs/toplevel/options.php:96 htdocs/toplevel/options_expert.php:62
+msgid "You can switch to a full CVS repository by clicking here."
+msgstr ""
+
+#: htdocs/toplevel/options.php:100 htdocs/toplevel/options_expert.php:66
+msgid ""
+"You are currently using CVS as the version control system for your barrels."
+msgstr ""
+
+#: htdocs/toplevel/options.php:101 htdocs/toplevel/options_expert.php:67
+msgid "You can switch back to RCS by clicking here."
+msgstr ""
+
+#: include/admin/files.php:44 include/admin/files.php:46
+#: include/admin/files.php:43
+msgid "file"
+msgstr ""
+
+#: include/admin/files.php:46 include/admin/files.php:48
+#: include/admin/files.php:45
+msgid "version"
+msgstr ""
+
+#: include/admin/files.php:48 include/admin/files.php:50
+#: include/admin/files.php:47
+msgid "author"
+msgstr ""
+
+#: include/admin/files.php:49 include/admin/files.php:51
+#: include/admin/files.php:48
+msgid "size"
+msgstr ""
+
+#: include/admin/pages.php:91 include/Barrel/Page.php:205
+#: include/Barrel/Page.php:248
+msgid "the page location cannot contain spaces or special characters"
+msgstr ""
+
+#: include/admin/pages.php:95 include/Barrel/Page.php:212
+#: include/Barrel/Page.php:255
+msgid "this location cannot be used, it is reserved by Diogenes"
+msgstr ""
+
+#: include/admin/files.php:45 include/admin/files.php:47
+#: include/admin/files.php:44
+msgid "log"
+msgstr ""
+
+#: include/admin/menus.php:145 include/admin/menus.php:146
+#: include/admin/menus.php:158
+msgid "entry title"
+msgstr ""
+
+#: include/admin/menus.php:146 include/admin/menus.php:147
+#: include/admin/menus.php:159
+msgid "type of link"
+msgstr ""
+
+#: include/admin/menus.php:218 include/admin/menus.php:217
+#: include/admin/menus.php:229
+msgid "menu name"
+msgstr ""
+
+#: include/admin/menus.php:219 include/admin/menus.php:218
+#: include/admin/menus.php:230
+msgid "link"
+msgstr ""
+
+#: htdocs/toplevel/options.php:80 htdocs/toplevel/options_expert.php:8
+#: include/diogenes.toplevel.inc.php:201 htdocs/toplevel/options.php:43
+#: include/diogenes.toplevel.inc.php:95 include/diogenes.toplevel.inc.php:96
+msgid "Global options"
+msgstr ""
+
+msgid "menu options"
+msgstr ""
+
+#: htdocs/toplevel/options.php:83 include/admin/options.php:69
+#: htdocs/toplevel/options.php:46 include/admin/options.php:71
+#: include/admin/options.php:73
+msgid "menu style"
+msgstr ""
+
+#: htdocs/toplevel/options.php:84 include/admin/options.php:70
+#: htdocs/toplevel/options.php:47 include/admin/options.php:72
+#: include/admin/options.php:74
+msgid "menu theme"
+msgstr ""
+
+#: htdocs/toplevel/options.php:91 htdocs/toplevel/options_expert.php:57
+msgid "version control system"
+msgstr ""
+
+#: include/admin/options.php:6 include/admin/options.php:7
+msgid "Site options"
+msgstr ""
+
+#: include/admin/options.php:55 include/admin/options.php:57
+#: include/admin/options.php:59
+msgid "fully expanded"
+msgstr ""
+
+#: include/admin/options.php:71 include/admin/options.php:73
+#: include/admin/options.php:75
+msgid "minimum menu levels to expand"
+msgstr ""
+
+#: include/diogenes.admin.inc.php:66 include/diogenes.admin.inc.php:73
+#: include/diogenes.admin.inc.php:72
+msgid "Options"
+msgstr ""
+
+#: include/admin/options.php:59 include/admin/options.php:61
+#: include/admin/options.php:63
+msgid "general options"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:365
+#: include/diogenes/diogenes.logger-view.inc.php:364
+msgid "session properties"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.logger-view.inc.php:367
+#: include/diogenes/diogenes.logger-view.inc.php:366
+msgid "host"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:367
+msgid "browser"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:370
+msgid "data"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/diogenes/diogenes.logger-view.inc.php:371
+msgid "filter by"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.logger-view.inc.php:372
+msgid "start"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:373
+msgid "summary"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:375
+msgid "year"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:380
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:376
+msgid "month"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:381
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/diogenes/diogenes.logger-view.inc.php:377
+msgid "day"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:525
+#: include/diogenes/diogenes.table-editor.inc.php:530
+msgid "id"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:527
+#: include/diogenes/diogenes.table-editor.inc.php:532
+msgid "create"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:530
+#: include/diogenes/diogenes.table-editor.inc.php:535
+msgid "new entry"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.table-editor.inc.php:536
+msgid "existing entry"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:532
+#: include/diogenes/diogenes.table-editor.inc.php:537
+msgid "(blank = no change)"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes/diogenes.table-editor.inc.php:538
+msgid "back"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:535
+#: include/diogenes/diogenes.table-editor.inc.php:540
+msgid "You are about to delete this entry. Do you want to proceed?"
+msgstr ""
+
+#: include/diogenes.session.inc.php:62 include/diogenes.session.inc.php:71
+msgid "Authentication error!"
+msgstr ""
+
+#: include/admin/files.php:84 include/admin/files.php:93
+#: include/admin/files.php:102 include/admin/pages.php:158
+#: include/admin/compose.php:57 include/admin/edit.php:49
+#: include/admin/files.php:114 include/admin/files.php:122
+#: include/admin/files.php:154 include/admin/pages.php:124
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/admin/plugins.php:23 include/admin/files.php:61
+#: include/admin/pages.php:122
+msgid "Page"
+msgstr ""
+
+#: include/admin/files.php:86 include/admin/files.php:95
+#: include/admin/pages.php:172 include/admin/compose.php:63
+#: include/admin/edit.php:55 include/admin/files.php:115
+#: include/admin/files.php:123 include/admin/pages.php:136
+#: include/admin/compose.php:62 include/admin/edit.php:54
+#: include/admin/files.php:122 include/admin/files.php:161
+#: include/admin/pages.php:123
+msgid "File"
+msgstr ""
+
+#: htdocs/toplevel/index.php:15 include/diogenes.barrel-editor.inc.php:156
+#: include/Barrel/Editor.php:163
+msgid "The site alias may only contain letters, numbers and underscores."
+msgstr ""
+
+#: htdocs/toplevel/index.php:18 include/diogenes.barrel-editor.inc.php:159
+#: include/Barrel/Editor.php:167
+msgid ""
+"<b>vhost note</b>: If you intend to serve this site from a virtualhost, you "
+"should enter the name of the virtualhost in this field."
+msgstr ""
+
+#: htdocs/toplevel/index.php:55
+msgid "PHP execution"
+msgstr ""
+
+#: htdocs/toplevel/index.php:55 include/diogenes.barrel-editor.inc.php:106
+#: include/Barrel/Editor.php:113
+msgid "custom templates"
+msgstr ""
+
+msgid "template options"
+msgstr ""
+
+#: htdocs/toplevel/options.php:85 include/admin/options.php:66
+#: htdocs/toplevel/options.php:48 include/admin/options.php:68
+#: include/admin/options.php:70
+msgid "templates directory"
+msgstr ""
+
+#: htdocs/toplevel/options.php:86 include/admin/options.php:67
+#: htdocs/toplevel/options.php:49 include/admin/options.php:69
+#: include/admin/options.php:71
+msgid "default template"
+msgstr ""
+
+#: include/admin/compose.php:56 include/admin/edit.php:46
+#: include/admin/compose.php:58 include/admin/edit.php:48
+msgid "log message"
+msgstr ""
+
+#: include/admin/options.php:63 include/admin/options.php:65
+#: include/admin/options.php:67
+msgid "favicon"
+msgstr ""
+
+#: include/admin/options.php:64 include/admin/options.php:66
+#: include/admin/options.php:68
+msgid "(relative url to a PNG image)"
+msgstr ""
+
+#: include/admin/pages.php:17 include/admin/files.php:57
+#: include/admin/pages.php:21 include/admin/files.php:54
+#: include/admin/pages.php:20
+msgid "page template"
+msgstr ""
+
+#: include/admin/pages.php:18 include/admin/files.php:58
+#: include/admin/pages.php:22 include/admin/files.php:55
+#: include/admin/pages.php:21
+msgid "status"
+msgstr ""
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "under construction"
+msgstr ""
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "disabled"
+msgstr ""
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "archived"
+msgstr ""
+
+#: include/diogenes.barrel.inc.php:152 include/diogenes.barrel.inc.php:153
+#: include/diogenes.barrel.inc.php:155
+msgid "This page is currently under construction."
+msgstr ""
+
+#: include/diogenes.barrel.inc.php:156 include/diogenes.barrel.inc.php:157
+#: include/diogenes.barrel.inc.php:159
+msgid "This page is currently unavailable."
+msgstr ""
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "http://diogenes-doc.polytechnique.org/en-admin/"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "http://diogenes-doc.polytechnique.org/en-user/"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "http://diogenes-doc.polytechnique.org/en-root/"
+msgstr ""
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "Mode"
+msgstr ""
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "standard"
+msgstr ""
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "expert"
+msgstr ""
+
+#: htdocs/toplevel/options.php:82 include/admin/options.php:65
+#: htdocs/toplevel/options.php:45 include/admin/options.php:67
+#: include/admin/options.php:69
+msgid "display options"
+msgstr ""
+
+#: htdocs/toplevel/options.php:87 htdocs/toplevel/options.php:50
+msgid "system options"
+msgstr ""
+
+msgid "Initial user setup"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:11
+msgid ""
+"Sorry, this feature is only available using native Diogenes authentication."
+msgstr ""
+
+#: htdocs/toplevel/boot.php:19
+msgid "The database is already configured."
+msgstr ""
+
+#: htdocs/toplevel/options_expert.php:13 htdocs/toplevel/options_expert.php:75
+#: htdocs/toplevel/options_expert.php:76
+msgid "option"
+msgstr ""
+
+#: htdocs/toplevel/options_expert.php:14 htdocs/toplevel/options_expert.php:76
+#: htdocs/toplevel/options_expert.php:77
+msgid "value"
+msgstr ""
+
+#: include/admin/menus.php:221 include/admin/menus.php:220
+#: include/admin/menus.php:232
+msgid "Menu"
+msgstr ""
+
+#: include/diogenes.page.inc.php:65 include/diogenes.page.inc.php:66
+msgid "debugging"
+msgstr ""
+
+#: include/diogenes.page.inc.php:66 include/diogenes.page.inc.php:67
+msgid "call trace"
+msgstr ""
+
+#: include/diogenes.page.inc.php:67 include/diogenes.page.inc.php:68
+msgid "database trace"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:59
+#: include/diogenes/diogenes.logger-view.inc.php:85
+#: include/diogenes/diogenes.logger-view.inc.php:130
+#: include/diogenes/diogenes.logger-view.inc.php:183
+#: include/diogenes/diogenes.logger-view.inc.php:58
+#: include/diogenes/diogenes.logger-view.inc.php:84
+#: include/diogenes/diogenes.logger-view.inc.php:129
+#: include/diogenes/diogenes.logger-view.inc.php:182
+msgid "all"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:363
+#: include/diogenes/diogenes.logger-view.inc.php:360
+#: include/diogenes/diogenes.logger-view.inc.php:359
+msgid "Please select a year and/or a user."
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:523
+#: include/diogenes/diogenes.table-editor.inc.php:528
+msgid "previous page"
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:524
+#: include/diogenes/diogenes.table-editor.inc.php:529
+msgid "next page"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:7
+msgid "Initial setup"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:46
+msgid "The initial setup of the database was performed successfuly."
+msgstr ""
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "no"
+msgstr ""
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "yes"
+msgstr ""
+
+#: include/admin/options.php:68 include/admin/options.php:70
+#: include/admin/options.php:72
+msgid "hide Diogenes menu"
+msgstr ""
+
+#: include/admin/prefs.php:28
+msgid "account preferences"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:19
+msgid "Barrel plugins"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:21
+msgid "Global plugin settings"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:38
+#, php-format
+msgid "Rebuilding plugin cache for barrel '%s'"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:47
+msgid "Clean plugins database"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:48
+msgid ""
+"If you are having problems with references to plugins that no longer exist, "
+"you can have Diogenes remove such entries from the database."
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:49
+msgid "Clean"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:51
+msgid "Enable or disable plugins"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:54
+msgid "You can select the plugins you want to enable for this barrel."
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:56
+msgid ""
+"You can select the plugins you want to enable or disable globally, that is "
+"the plugins that can be used in the different barrels. Please note that for "
+"a plugin to be accessible from a barrel, you will need to activate that "
+"plugin for the barrel. To do this, from the <i>List of sites</i> click on "
+"'plugins' next to the barrel of your choice."
+msgstr ""
+
+#: htdocs/toplevel/options.php:52
+msgid "Word document import"
+msgstr ""
+
+#: include/admin/files.php:39
+msgid "File operations"
+msgstr ""
+
+#: include/admin/files.php:43 include/admin/files.php:40
+msgid "Create an empty file"
+msgstr ""
+
+#: include/admin/files.php:44 include/admin/files.php:41
+msgid "Copy or move a file"
+msgstr ""
+
+#: include/admin/files.php:45 include/admin/files.php:42
+msgid "Create"
+msgstr ""
+
+#: include/admin/files.php:53 include/admin/files.php:50
+msgid "to"
+msgstr ""
+
+#: include/admin/files.php:59
+msgid "read"
+msgstr ""
+
+#: include/admin/files.php:60
+msgid "write"
+msgstr ""
+
+#: include/admin/files.php:67 include/admin/files.php:69
+msgid "Creating empty file"
+msgstr ""
+
+#: include/admin/files.php:69 include/admin/files.php:71
+msgid "The specified file already exists!"
+msgstr ""
+
+#: include/admin/files.php:155 include/admin/pages.php:160
+#: include/admin/plugins.php:22 include/admin/files.php:194
+#: include/admin/pages.php:156 include/Barrel/Page.php:170
+msgid "home"
+msgstr ""
+
+#: include/admin/files.php:182 include/admin/files.php:224
+msgid "Copy"
+msgstr ""
+
+#: include/admin/files.php:182 include/admin/files.php:224
+msgid "Move"
+msgstr ""
+
+#: include/admin/pages.php:18 include/admin/pages.php:17
+#: include/Barrel/Page.php:171
+msgid "parent page"
+msgstr ""
+
+#: include/admin/webdav.php:7 include/diogenes.admin.inc.php:79
+#: include/diogenes.admin.inc.php:78
+msgid "WebDAV"
+msgstr ""
+
+#: include/admin/webdav.php:9 include/admin/webdav.php:11
+msgid ""
+"You can access your barrel's files using WebDAV by pointing your WebDAV "
+"client to the following address."
+msgstr ""
+
+#: include/admin/plugins.php:22
+msgid "Page plugins "
+msgstr ""
+
+#: include/admin/plugins.php:26
+msgid "Available plugins"
+msgstr ""
+
+#: include/diogenes.page.inc.php:69 include/diogenes.barrel-editor.inc.php:50
+#: include/diogenes.barrel-editor.inc.php:106 include/Barrel/Page.php:126
+#: include/Barrel/Page.php:152 include/diogenes.plugin-editor.inc.php:237
+#: include/Barrel/Page.php:150 include/Barrel/Page.php:178
+#: include/Barrel/Editor.php:52 include/Barrel/Editor.php:113
+#: include/Plugin/Editor.php:266 include/diogenes.page.inc.php:68
+msgid "plugins"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:96 include/diogenes.admin.inc.php:76
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:75
+msgid "Plugins"
+msgstr ""
+
+#: include/Barrel/Page.php:70 include/Barrel/Page.php:89
+msgid "Not deleting page, it has child pages!"
+msgstr ""
+
+#: include/Barrel/File.php:76 include/Barrel/File.php:94
+msgid "rename"
+msgstr ""
+
+#: include/diogenes.plugin-editor.inc.php:236 include/Plugin/Editor.php:265
+msgid "plugin"
+msgstr ""
+
+#: include/diogenes.plugin-editor.inc.php:239 include/Plugin/Editor.php:268
+msgid "parameters"
+msgstr ""
+
+#: include/admin/files.php:192
+msgid "Document"
+msgstr ""
+
+#: include/admin/index.php:52
+msgid "barrel options"
+msgstr ""
+
+#: include/admin/index.php:57
+msgid "barrel plugins"
+msgstr ""
+
+#: include/admin/index.php:68
+msgid "page removed"
+msgstr ""
+
+#: include/admin/index.php:80
+msgid "page plugins"
+msgstr ""
+
+#: include/admin/index.php:92
+msgid "file deleted"
+msgstr ""
+
+#: include/admin/webdav.php:14
+msgid ""
+"In order to access your barrel's files using WebDAV, please ask your "
+"Diogenes administrator to enable this feature in the Diogenes configuration "
+"file."
+msgstr ""
+
+#: include/Barrel/Page.php:81
+msgid "Deleting page"
+msgstr ""
+
+#: include/Barrel/Page.php:176
+msgid "add a page"
+msgstr ""
+
+#: include/Barrel/Page.php:266
+msgid "Creating new page"
+msgstr ""
+
+#: include/Barrel/Editor.php:165
+msgid "no barrels available"
+msgstr ""
+
+#: htdocs/toplevel/index.php:13
+msgid ""
+"Warning : in order to make use of virtual hosts or WebDAV, you need to set "
+"$globals->rooturl to a full URL starting with http:// or https:// in your "
+"Diogenes configuration file."
+msgstr ""
--- /dev/null
+# Spanish translation for Diogenes package.
+# Copyright (C) 2004 Pablo Castellazzi
+# This file is distributed under the same license as the Diogenes package.
+# Pablo Castellazzi <pcastell@adinet.com.uy>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Diogenes 0.9.12\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-01-07 16:41+0100\n"
+"PO-Revision-Date: 2004-07-02 05:19-0300\n"
+"Last-Translator: Pablo Castellazzi <pcastell@adinet.com.uy>\n"
+"Language-Team: Spanish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: htdocs/index.php:9 htdocs/index.php:13 include/admin/bad.php:46
+msgid "Welcome to Diogenes"
+msgstr "Bienvenido a Diogenes"
+
+#: htdocs/index.php:11 htdocs/index.php:15
+msgid "Welcome to the Diogenes content management system."
+msgstr "Bienvenido al administrador de contenido Diogenes."
+
+#: htdocs/index.php:12 htdocs/index.php:16
+msgid ""
+"Diogenes was developed by the webmasters of the Polytechnique.org web site."
+msgstr "Diogenes ha sido desarrollado por los webmasters de Polytechnique.org."
+
+#: htdocs/index.php:13 htdocs/index.php:17
+msgid "The following barrels are currently available"
+msgstr "Los siguientes barriles están disponibles actualmente."
+
+#: htdocs/index.php:14 htdocs/toplevel/admins.php:8
+#: include/diogenes.barrel-editor.inc.php:152 include/Barrel/Editor.php:159
+msgid "site"
+msgstr "sitio"
+
+#: htdocs/index.php:15 htdocs/toplevel/index.php:12
+#: htdocs/toplevel/logger_actions.php:14 include/admin/options.php:61
+#: include/admin/options.php:63 include/diogenes.barrel-editor.inc.php:153
+#: include/diogenes.plugin-editor.inc.php:238 include/admin/options.php:65
+#: include/Barrel/Editor.php:160 include/Plugin/Editor.php:267
+msgid "description"
+msgstr "descripción"
+
+#: htdocs/prefs.php:19
+msgid "Changing password.."
+msgstr "Cambiando contraseña ..."
+
+#: htdocs/prefs.php:33 include/admin/prefs.php:20
+msgid "User preferences"
+msgstr "Preferencias de usuario"
+
+#: htdocs/prefs.php:34 include/admin/prefs.php:21
+msgid "Diogenes preferences"
+msgstr "Preferencias de Diogenes"
+
+#: htdocs/prefs.php:36
+msgid "my information"
+msgstr "mi información"
+
+#: htdocs/prefs.php:37 htdocs/toplevel/accounts.php:13
+#: htdocs/toplevel/boot.php:28 include/diogenes.session.inc.php:138
+msgid "username"
+msgstr "usuario"
+
+#: htdocs/prefs.php:38
+msgid "full name"
+msgstr "nombre completo"
+
+#: htdocs/prefs.php:40 include/admin/prefs.php:23
+msgid "language"
+msgstr "idioma"
+
+#: htdocs/prefs.php:41 include/admin/prefs.php:24
+msgid ""
+"You can select your preferred language by clicking on the appropriate "
+"language below."
+msgstr ""
+"A continuación puede seleccionar su idioma preferido haciendo clic en él."
+
+#: htdocs/prefs.php:43
+msgid "my password"
+msgstr "mi contraseña"
+
+#: htdocs/prefs.php:44
+msgid "new password"
+msgstr "nueva contraseña"
+
+#: htdocs/prefs.php:45
+msgid "confirmation"
+msgstr "confirmación"
+
+#: htdocs/prefs.php:47 include/admin/prefs.php:26
+msgid "Change"
+msgstr "Cambiar"
+
+#: include/admin/compose.php:32 include/admin/edit.php:31
+#: include/admin/compose.php:34 include/admin/edit.php:33
+msgid "Commiting changes to file"
+msgstr "Guardar cambios en archivo"
+
+#: include/admin/edit.php:41 include/admin/edit.php:43
+msgid "File editor"
+msgstr "Editor de archivos"
+
+#: include/admin/edit.php:45 include/admin/edit.php:47
+msgid "File source"
+msgstr "Código del archivo"
+
+#: htdocs/toplevel/index.php:16 htdocs/toplevel/options.php:89
+#: include/admin/menus.php:151 include/admin/options.php:72
+#: include/admin/pages.php:12 include/admin/edit.php:48
+#: include/diogenes.session.inc.php:137
+#: include/diogenes/diogenes.logger-view.inc.php:382
+#: include/diogenes/diogenes.table-editor.inc.php:536
+#: htdocs/toplevel/options.php:53 include/admin/files.php:41
+#: include/admin/menus.php:152 include/admin/options.php:74
+#: include/admin/pages.php:15 include/admin/edit.php:50
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.table-editor.inc.php:541
+#: include/diogenes.barrel-editor.inc.php:157
+#: include/diogenes.plugin-editor.inc.php:235 include/admin/files.php:38
+#: include/admin/menus.php:164 include/admin/options.php:76
+#: include/admin/pages.php:14 include/Barrel/Editor.php:164
+#: include/Plugin/Editor.php:264
+#: include/diogenes/diogenes.logger-view.inc.php:378
+msgid "Submit"
+msgstr "Enviar"
+
+#: include/admin/files.php:27 include/admin/pages.php:152
+#: include/admin/compose.php:58 include/admin/edit.php:50
+#: include/Barrel/Page.php:143
+msgid "pages catalog"
+msgstr "catalogo de páginas"
+
+#: include/admin/files.php:28 include/admin/pages.php:154
+#: include/admin/compose.php:59 include/admin/edit.php:51
+#: include/Barrel/Page.php:147 include/admin/index.php:74
+#: include/Barrel/Page.php:174
+msgid "page properties"
+msgstr "propiedades de la página"
+
+#: include/admin/files.php:29 include/admin/pages.php:155
+#: include/admin/compose.php:60 include/admin/edit.php:52
+#: include/diogenes.rcs.inc.php:452 include/diogenes.rcs.inc.php:621
+#: include/Barrel/Page.php:148 include/admin/files.php:146
+#: include/Barrel/Page.php:175
+msgid "view page"
+msgstr "ver página"
+
+#: include/admin/files.php:83 include/admin/files.php:92
+#: include/admin/files.php:101 include/admin/pages.php:156
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/Barrel/Page.php:149 include/Barrel/Page.php:173
+msgid "browse files"
+msgstr "examinar archivos"
+
+#: include/admin/files.php:35 include/admin/pages.php:167
+#: include/admin/compose.php:64 include/admin/edit.php:56
+#: include/admin/pages.php:132 include/Barrel/File.php:94
+#: include/Barrel/File.php:114
+msgid "raw editor"
+msgstr "editor en grueso"
+
+#: htdocs/toplevel/options.php:88 include/admin/files.php:36
+#: include/admin/pages.php:168 include/admin/compose.php:65
+#: include/admin/edit.php:57 include/diogenes.barrel.inc.php:316
+#: htdocs/toplevel/options.php:51 include/admin/pages.php:133
+#: include/diogenes.barrel.inc.php:347 include/Barrel/File.php:95
+#: include/Barrel/File.php:115 include/diogenes.barrel.inc.php:343
+msgid "HTML editor"
+msgstr "editor HTML"
+
+#: include/admin/files.php:85 include/admin/files.php:94
+#: include/admin/pages.php:163 include/admin/pages.php:170
+#: include/admin/compose.php:66 include/admin/edit.php:58
+#: include/admin/pages.php:129 include/admin/pages.php:134
+#: include/Barrel/File.php:97 include/Barrel/File.php:117
+msgid "file revisions"
+msgstr "revisiones de archivos"
+
+msgid "Ekit"
+msgstr "Ekit"
+
+#: include/admin/menus.php:36 include/admin/menus.php:37
+msgid "The site's menus"
+msgstr "Menú del sitio"
+
+#: include/admin/menus.php:44 include/admin/menus.php:45
+msgid "The selected menu has child items, please remove them first."
+msgstr ""
+"El menú seleccionado tiene elementos hijo, por favor eliminelos primero."
+
+#: include/admin/menus.php:144 include/admin/menus.php:145
+#: include/admin/menus.php:157
+msgid "menu entry properties"
+msgstr "propiedades de la entrada"
+
+#: include/admin/menus.php:147 include/admin/menus.php:148
+#: include/admin/menus.php:160
+msgid "none"
+msgstr "ninguno"
+
+#: include/admin/menus.php:148 include/admin/menus.php:149
+#: include/admin/menus.php:161
+msgid "internal link"
+msgstr "enlace interno"
+
+#: include/admin/menus.php:149 include/admin/menus.php:150
+#: include/admin/menus.php:162
+msgid "external link"
+msgstr "enlace externo"
+
+#: include/admin/menus.php:173 include/diogenes.plugin-editor.inc.php:240
+#: include/admin/menus.php:185 include/Plugin/Editor.php:269
+msgid "move up"
+msgstr "mover hacia arriba"
+
+#: include/admin/menus.php:176 include/diogenes.plugin-editor.inc.php:241
+#: include/admin/menus.php:188 include/Plugin/Editor.php:270
+msgid "move down"
+msgstr "mover hacia abajo"
+
+#: htdocs/toplevel/index.php:85 include/admin/menus.php:178
+#: include/diogenes.rcs.inc.php:417
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#: include/diogenes/diogenes.table-editor.inc.php:534
+#: include/diogenes.barrel-editor.inc.php:43 include/Barrel/Page.php:119
+#: include/Barrel/File.php:74 include/admin/menus.php:190
+#: include/Barrel/File.php:92 include/Barrel/Page.php:143
+#: include/Barrel/Editor.php:45
+msgid "edit"
+msgstr "editar"
+
+#: htdocs/toplevel/index.php:87 include/admin/menus.php:179
+#: include/admin/pages.php:202 include/diogenes.rcs.inc.php:419
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes.barrel-editor.inc.php:52 include/Barrel/Page.php:129
+#: include/Barrel/File.php:77 include/admin/menus.php:191
+#: include/Barrel/File.php:95 include/Barrel/Page.php:153
+#: include/Barrel/Editor.php:54
+msgid "delete"
+msgstr "eliminar"
+
+#: include/admin/menus.php:217 include/admin/menus.php:216
+#: include/admin/menus.php:228
+msgid "External links are denoted with the [ext] prefix."
+msgstr "Los enlaces externos están marcados con el prefijo [ext]."
+
+#: include/admin/menus.php:222 include/admin/menus.php:221
+#: include/admin/menus.php:233
+msgid "Add new entry"
+msgstr "Agregar nueva entrada"
+
+#: include/admin/files.php:63 include/admin/files.php:86
+#: include/admin/files.php:88
+msgid "Error during file transfer!"
+msgstr "Error durante la transferencia del archivo!"
+
+#: include/admin/files.php:69 include/admin/files.php:92
+#: include/admin/files.php:94
+msgid "Deleting file"
+msgstr "Eliminando archivo"
+
+#: include/admin/files.php:81 include/admin/files.php:112
+#: include/admin/files.php:120
+msgid "Revision differences"
+msgstr "Diferentes revisiones"
+
+#: include/admin/files.php:90 include/admin/files.php:120
+#: include/admin/files.php:128
+msgid "File revisions"
+msgstr "Revisiones del archivo"
+
+#: include/admin/files.php:103 include/admin/files.php:155
+#: include/admin/files.php:194
+msgid "File manager"
+msgstr "Manajador de archivos"
+
+#: include/admin/files.php:40 include/admin/files.php:38
+msgid "Files in current directory"
+msgstr "Archivos en el directorio actual"
+
+#: include/admin/files.php:41 include/admin/files.php:40
+#: include/admin/files.php:37
+msgid "Import file"
+msgstr "Importar archivo"
+
+#: include/admin/files.php:42 include/admin/pages.php:210
+#: include/admin/pages.php:191 include/admin/files.php:39
+#: include/admin/pages.php:163
+msgid "Send"
+msgstr "Enviar"
+
+#: include/admin/files.php:43
+msgid "File to upload"
+msgstr "Archivo a subir"
+
+#: include/admin/index.php:20 include/admin/index.php:45
+#: include/admin/index.php:47
+msgid "site created"
+msgstr "sitio creado"
+
+#: include/admin/index.php:23 include/admin/index.php:50
+#: include/admin/index.php:63
+msgid "page created"
+msgstr "página creada"
+
+#: include/admin/index.php:26 include/admin/index.php:54
+msgid "page deleted"
+msgstr "página eliminada"
+
+#: include/admin/index.php:31 include/admin/index.php:59
+#: include/admin/index.php:86
+msgid "file updated"
+msgstr "archivo actualizado"
+
+#: include/admin/index.php:34 include/admin/index.php:64
+msgid "file removed"
+msgstr "archivo eliminado"
+
+#: include/admin/index.php:43 include/admin/index.php:77
+#: include/admin/index.php:105
+msgid "Welcome to the Diogenes backoffice"
+msgstr "Bienvenido a Diogenes backoffice"
+
+#: include/admin/files.php:47 include/admin/index.php:44
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/admin/files.php:49 include/admin/index.php:78
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/files.php:46 include/admin/index.php:106
+#: include/diogenes/diogenes.logger-view.inc.php:368
+msgid "date"
+msgstr "fecha"
+
+#: include/admin/index.php:45 include/admin/users.php:28
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/index.php:79
+#: include/diogenes/diogenes.logger-view.inc.php:366
+#: include/admin/index.php:107
+#: include/diogenes/diogenes.logger-view.inc.php:365
+msgid "user"
+msgstr "usuario"
+
+#: include/admin/index.php:46 include/admin/index.php:80
+#: include/admin/index.php:108
+msgid "event"
+msgstr "evento"
+
+#: include/admin/pages.php:11 include/admin/pages.php:14
+#: include/admin/pages.php:158
+msgid "Page manager"
+msgstr "Administrador de páginas"
+
+#: include/admin/pages.php:13 include/admin/pages.php:16
+#: include/admin/pages.php:15
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: include/admin/pages.php:14 include/diogenes.barrel.inc.php:312
+#: include/admin/pages.php:17 include/diogenes.barrel.inc.php:343
+#: include/admin/pages.php:16 include/diogenes.barrel.inc.php:339
+msgid "Page properties"
+msgstr "Propiedades de la página"
+
+#: include/admin/pages.php:15 include/admin/files.php:55
+#: include/admin/pages.php:19 include/admin/files.php:52
+#: include/admin/pages.php:18
+msgid "location"
+msgstr "hubicación"
+
+#: htdocs/toplevel/index.php:10 htdocs/toplevel/logger_actions.php:13
+#: include/admin/options.php:60 include/admin/pages.php:16
+#: include/admin/files.php:56 include/admin/options.php:62
+#: include/admin/pages.php:20 include/admin/files.php:53
+#: include/admin/options.php:64 include/admin/pages.php:19
+msgid "title"
+msgstr "título"
+
+msgid "display"
+msgstr "mostrar"
+
+#: include/admin/files.php:56 include/admin/pages.php:22
+msgid "access"
+msgstr "acceder"
+
+#: include/admin/pages.php:22 include/admin/pages.php:26
+msgid "Add a page"
+msgstr "Agregar página"
+
+#: include/admin/pages.php:43 include/admin/pages.php:47
+#: include/admin/pages.php:50
+msgid "Document name does not end in .doc"
+msgstr "El documento no termina en .doc"
+
+#: include/admin/pages.php:46 include/admin/pages.php:50
+#: include/admin/pages.php:53
+msgid "Checking in Word file"
+msgstr "Verificando archivo Word"
+
+#: include/admin/pages.php:51 include/admin/pages.php:55
+#: include/admin/pages.php:58
+msgid "Importing Word file"
+msgstr "Importando archivo Word"
+
+#: include/admin/pages.php:57 include/admin/pages.php:61
+#: include/admin/pages.php:64
+msgid "Importing HTML file"
+msgstr "Importando archivo HTML"
+
+#: include/admin/pages.php:62 include/admin/pages.php:66
+#: include/admin/pages.php:69
+msgid "Raw file import"
+msgstr "Importando archivo en grueso"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "visible"
+msgstr "mostrar"
+
+msgid "invisible"
+msgstr "ocultar"
+
+#: htdocs/toplevel/index.php:84 include/admin/pages.php:196
+#: include/diogenes.rcs.inc.php:416 include/diogenes.rcs.inc.php:450
+#: include/diogenes.rcs.inc.php:619 include/Barrel/Page.php:118
+#: include/Barrel/File.php:73 include/admin/files.php:144
+#: include/Barrel/File.php:91 include/Barrel/Page.php:142
+msgid "view"
+msgstr "ver"
+
+#: include/admin/pages.php:197 include/Barrel/Page.php:120
+#: include/Barrel/Page.php:144
+msgid "properties"
+msgstr "propiedades"
+
+#: include/admin/pages.php:198
+msgid "files"
+msgstr "archivos"
+
+#: include/admin/pages.php:199 include/diogenes.rcs.inc.php:418
+#: include/Barrel/Page.php:121 include/Barrel/File.php:75
+#: include/Barrel/File.php:93 include/Barrel/Page.php:145
+msgid "revisions"
+msgstr "revisiones"
+
+#: include/admin/pages.php:211 include/admin/pages.php:195
+#: include/admin/pages.php:172
+msgid "Import a Word document"
+msgstr "Importar documento Word"
+
+#: include/admin/pages.php:214 include/admin/pages.php:198
+#: include/admin/pages.php:176
+msgid "This page's master document is currently a Word document."
+msgstr "El documento maestro es actualemente un documento Word"
+
+#: include/admin/pages.php:215 include/admin/pages.php:199
+#: include/admin/pages.php:177
+msgid "You can upload a new version of the Word document below."
+msgstr "A continuaicón puede subir una nueva version del documento Word."
+
+#: include/admin/pages.php:216 include/admin/pages.php:200
+#: include/admin/pages.php:178
+msgid "You can get the current version of the file here"
+msgstr "Aquí obtendrá la versión actual del archivo"
+
+#: include/admin/pages.php:219 include/admin/pages.php:203
+#: include/admin/pages.php:181
+msgid "If you wish, you can set this page's content from a Word document."
+msgstr ""
+"Si lo desea, puede cargar el contenido de esta página desde un documento de "
+"Word."
+
+#: include/admin/pages.php:220 include/admin/pages.php:204
+#: include/admin/pages.php:182
+msgid "To do so, simply upload the Word document below."
+msgstr "Para hacerlo, a continuación simplemente suba el documento."
+
+#: include/admin/pages.php:222 include/admin/pages.php:208
+#: include/admin/pages.php:160
+msgid "Import HTML"
+msgstr "Importar HTML"
+
+#: include/admin/pages.php:223 include/admin/pages.php:209
+#: include/admin/pages.php:161
+msgid ""
+"You can replace the current page's contents by uploading an HTML file below."
+msgstr ""
+"A continuación puede reemplezar el contenido actual de la página subiendo un "
+"archivo HTML."
+
+#: include/admin/pages.php:224 include/admin/pages.php:210
+#: include/admin/pages.php:162
+msgid ""
+"If the file name ends with .htm or .html, anything outside the <body>"
+"</body> pair will be stripped."
+msgstr ""
+"Si el archivo termina en .htm o .html, cualquier cosa fuera de <body>"
+"</body> será eliminado."
+
+#: htdocs/toplevel/admins.php:20 include/admin/users.php:15
+msgid "Could not find requested user"
+msgstr "No se puede encontrar al usuario solicitado"
+
+#: include/admin/users.php:24
+msgid "Users administration"
+msgstr "Administración de usuarios"
+
+#: include/admin/users.php:25
+msgid "Registered users"
+msgstr "Usuarios registrados"
+
+#: include/admin/users.php:26 include/diogenes.toplevel.inc.php:200
+#: include/diogenes.toplevel.inc.php:94 include/diogenes.toplevel.inc.php:95
+msgid "Administrators"
+msgstr "Administradores"
+
+#: include/admin/users.php:29
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.table-editor.inc.php:526
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.logger-view.inc.php:369
+msgid "action"
+msgstr "Acción"
+
+#: htdocs/toplevel/admins.php:45 include/admin/users.php:35
+msgid "remove"
+msgstr "Eliminar"
+
+#: include/diogenes.session.inc.php:134
+msgid "Diogenes login"
+msgstr "Ingresar a Diogenes"
+
+#: include/diogenes.session.inc.php:135
+msgid "Connexion"
+msgstr "Conexión"
+
+#: htdocs/toplevel/accounts.php:16 htdocs/toplevel/boot.php:31
+#: include/diogenes.session.inc.php:136
+msgid "password"
+msgstr "contraseña"
+
+#: include/diogenes.toplevel.inc.php:52 include/diogenes.barrel.inc.php:104
+#: include/diogenes.barrel.inc.php:105 include/diogenes.toplevel.inc.php:53
+#: include/diogenes.barrel.inc.php:107
+msgid "You are not authorized to view this page!"
+msgstr "No está autorizado a ver esta página!"
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:187
+#: include/diogenes.admin.inc.php:62 include/diogenes.barrel.inc.php:301
+#: include/diogenes.toplevel.inc.php:81 include/diogenes.barrel.inc.php:332
+#: include/diogenes.admin.inc.php:69 include/diogenes.toplevel.inc.php:39
+#: include/diogenes.toplevel.inc.php:82 include/diogenes.admin.inc.php:68
+#: include/diogenes.barrel.inc.php:328
+msgid "Home"
+msgstr "Inicio"
+
+#: include/diogenes.toplevel.inc.php:192 include/diogenes.barrel.inc.php:303
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:334
+#: include/diogenes.toplevel.inc.php:87 include/diogenes.barrel.inc.php:330
+msgid "Logout"
+msgstr "Desconectar"
+
+#: include/diogenes.toplevel.inc.php:194 include/diogenes.barrel.inc.php:306
+#: include/diogenes.toplevel.inc.php:88 include/diogenes.barrel.inc.php:337
+#: include/diogenes.toplevel.inc.php:89 include/diogenes.barrel.inc.php:333
+msgid "Login"
+msgstr "Iniciar sesión"
+
+#: include/diogenes.admin.inc.php:37 include/diogenes.admin.inc.php:64
+#: include/diogenes.barrel.inc.php:310 include/diogenes.barrel.inc.php:341
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:70
+#: include/diogenes.barrel.inc.php:337
+msgid "Administration"
+msgstr "Administración"
+
+#: include/diogenes.rcs.inc.php:455 include/diogenes.rcs.inc.php:624
+#: include/admin/files.php:149
+msgid "diff to"
+msgstr "diferencias con"
+
+#: include/diogenes.rcs.inc.php:459 include/diogenes.rcs.inc.php:628
+#: include/admin/files.php:153
+msgid "restore"
+msgstr "recuperar"
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "Admin manual"
+msgstr "Manual de administración"
+
+msgid "Settings"
+msgstr "Opciones"
+
+#: include/diogenes.toplevel.inc.php:202 include/diogenes.admin.inc.php:67
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:78
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.admin.inc.php:77
+msgid "Users"
+msgstr "Usuarios"
+
+#: include/diogenes.admin.inc.php:68 include/diogenes.admin.inc.php:80
+#: include/diogenes.admin.inc.php:79
+msgid "Content"
+msgstr "Contenido"
+
+#: include/diogenes.admin.inc.php:69 include/diogenes.admin.inc.php:81
+#: include/diogenes.admin.inc.php:80
+msgid "Pages catalog"
+msgstr "Catalogo de páginas"
+
+#: include/diogenes.admin.inc.php:70 include/diogenes.admin.inc.php:82
+#: include/diogenes.admin.inc.php:81
+msgid "Edit style sheet"
+msgstr "Editar CSS"
+
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:83
+#: include/diogenes.admin.inc.php:82
+msgid "Edit menu"
+msgstr "Editar menú"
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:39
+msgid "Toplevel administration"
+msgstr "Administración principal"
+
+#: include/diogenes.page.inc.php:59
+msgid "Powered by Diogenes"
+msgstr "Construído con Diogenes"
+
+#: include/diogenes.page.inc.php:213 include/diogenes.page.inc.php:216
+#: include/diogenes.page.inc.php:212
+msgid "The requested document was not found."
+msgstr "El documento solicitado no existe."
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "User manual"
+msgstr "Manual de usuario"
+
+#: include/diogenes.toplevel.inc.php:191 include/diogenes.barrel.inc.php:304
+#: include/diogenes.toplevel.inc.php:85 include/diogenes.barrel.inc.php:335
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:331
+msgid "Preferences"
+msgstr "Preferencias"
+
+#: include/diogenes.toplevel.inc.php:197 include/diogenes.toplevel.inc.php:91
+#: include/diogenes.toplevel.inc.php:92
+msgid "Sites"
+msgstr "Sitios"
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "Root manual"
+msgstr "Manual de Root"
+
+#: htdocs/toplevel/index.php:8 include/diogenes.toplevel.inc.php:199
+#: htdocs/toplevel/index.php:11 include/diogenes.toplevel.inc.php:93
+#: htdocs/toplevel/index.php:16 include/diogenes.toplevel.inc.php:94
+msgid "List of sites"
+msgstr "Lista de sitios"
+
+#: htdocs/toplevel/admins.php:7
+msgid "Site administrators"
+msgstr "Administradores de sitios"
+
+#: htdocs/toplevel/accounts.php:7 include/diogenes.toplevel.inc.php:203
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.toplevel.inc.php:99
+msgid "User accounts"
+msgstr "Cuentas de usuario"
+
+#: include/diogenes.toplevel.inc.php:204 include/diogenes.toplevel.inc.php:99
+#: include/diogenes.toplevel.inc.php:100
+msgid "Browse user log"
+msgstr "Examinar registro de usuario"
+
+#: htdocs/toplevel/logger_actions.php:8 include/diogenes.toplevel.inc.php:205
+#: include/diogenes.toplevel.inc.php:100 include/diogenes.toplevel.inc.php:101
+msgid "Logger actions"
+msgstr "Registrar acciones"
+
+#: include/diogenes.page.inc.php:198 include/diogenes.page.inc.php:201
+#: include/diogenes.page.inc.php:197
+msgid "Diogenes error"
+msgstr "Error de Diogenes"
+
+#: include/diogenes.page.inc.php:199 include/diogenes.page.inc.php:202
+#: include/diogenes.page.inc.php:198
+msgid "Error"
+msgstr "Error"
+
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+#: include/diogenes/diogenes.logger-view.inc.php:336
+msgid "view session"
+msgstr "ver sesión"
+
+#: include/diogenes/diogenes.logger-view.inc.php:339
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+msgid "user's log"
+msgstr "registro de usuarios"
+
+#: htdocs/toplevel/logger.php:7
+msgid "User activity log"
+msgstr "Registro de actividad de usuarios"
+
+#: htdocs/toplevel/accounts.php:17 htdocs/toplevel/boot.php:32
+msgid "permissions"
+msgstr "permisos"
+
+#: htdocs/toplevel/accounts.php:19 htdocs/toplevel/admins.php:46
+msgid "view log"
+msgstr "ver registro"
+
+#: htdocs/toplevel/admins.php:9
+msgid "administrator"
+msgstr "administrador"
+
+#: htdocs/toplevel/admins.php:10 htdocs/toplevel/index.php:11
+#: include/admin/files.php:50 include/admin/menus.php:220
+#: include/admin/pages.php:21
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/admin/files.php:52 include/admin/menus.php:219
+#: include/admin/pages.php:25
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/admin/files.php:49 include/admin/menus.php:231
+#: include/diogenes/diogenes.logger-view.inc.php:374
+msgid "actions"
+msgstr "acciones"
+
+#: htdocs/toplevel/admins.php:43
+msgid "site users"
+msgstr "usuarios del sitio"
+
+#: htdocs/toplevel/admins.php:44
+msgid "demote to user"
+msgstr "degradar al usuario"
+
+#: htdocs/toplevel/index.php:9 include/diogenes.barrel-editor.inc.php:151
+#: include/Barrel/Editor.php:158
+msgid "alias"
+msgstr "alias"
+
+#: htdocs/toplevel/index.php:13 include/admin/options.php:62
+#: include/admin/options.php:64 include/diogenes.barrel-editor.inc.php:154
+#: include/admin/options.php:66 include/Barrel/Editor.php:161
+msgid "keywords"
+msgstr "palabras clave"
+
+#: htdocs/toplevel/index.php:14 include/diogenes.barrel-editor.inc.php:155
+#: include/Barrel/Editor.php:162
+msgid "Create a new site"
+msgstr "Crear un nuevo sitio"
+
+#: htdocs/toplevel/index.php:17 include/diogenes.barrel-editor.inc.php:158
+#: include/Barrel/Editor.php:166
+msgid "vhost (see note)"
+msgstr "vhost (ver notas)"
+
+#: htdocs/toplevel/index.php:19 include/diogenes.barrel-editor.inc.php:160
+#: include/Barrel/Editor.php:168
+msgid "flags"
+msgstr "banderas"
+
+#: htdocs/toplevel/index.php:86 include/diogenes.barrel-editor.inc.php:45
+#: include/Barrel/Editor.php:47
+msgid "admin"
+msgstr "administrador"
+
+#: include/diogenes.admin.inc.php:65 include/diogenes.admin.inc.php:72
+#: include/diogenes.admin.inc.php:71
+msgid "Activity"
+msgstr "Actividad"
+
+#: htdocs/toplevel/accounts.php:14 htdocs/toplevel/boot.php:29
+msgid "first name"
+msgstr "nombre"
+
+#: htdocs/toplevel/accounts.php:15 htdocs/toplevel/boot.php:30
+msgid "last name"
+msgstr "apellido"
+
+#: include/admin/compose.php:16 include/admin/edit.php:15
+#: include/diogenes.admin.inc.php:44
+msgid "Directory not found"
+msgstr "Directorio no encontrado"
+
+#: include/admin/pages.php:19 include/admin/pages.php:23
+#: include/admin/files.php:57
+msgid "read access"
+msgstr "acceso de lectura"
+
+#: include/admin/pages.php:20 include/admin/pages.php:24
+#: include/admin/files.php:58
+msgid "write access"
+msgstr "acceso de escritura"
+
+#: include/admin/pages.php:83
+msgid "world-writable pages are not allowed with PHP execution enabled!"
+msgstr ""
+"las páginas con escritura global no están permitidas cuando la ejecución de "
+"PHP está activa."
+
+#: include/diogenes.barrel.inc.php:314 include/diogenes.barrel.inc.php:345
+#: include/diogenes.barrel.inc.php:341
+msgid "Edit this page"
+msgstr "Editar es página"
+
+#: include/diogenes.barrel.inc.php:315 include/diogenes.barrel.inc.php:346
+#: include/diogenes.barrel.inc.php:342
+msgid "Raw editor"
+msgstr "Editor en grueso"
+
+#: htdocs/toplevel/options.php:90 htdocs/toplevel/options_expert.php:56
+msgid "Convert"
+msgstr "Convertir"
+
+#: htdocs/toplevel/options.php:95 htdocs/toplevel/options_expert.php:61
+msgid ""
+"You are currently using RCS as the version control system for your barrels."
+msgstr ""
+"Actualmente está usando RCS como sistema de control de versión para sus "
+"barriles."
+
+#: htdocs/toplevel/options.php:96 htdocs/toplevel/options_expert.php:62
+msgid "You can switch to a full CVS repository by clicking here."
+msgstr "Puede cambiar a CVS haciendo click aquí."
+
+#: htdocs/toplevel/options.php:100 htdocs/toplevel/options_expert.php:66
+msgid ""
+"You are currently using CVS as the version control system for your barrels."
+msgstr ""
+"Actualmente está usando CVS como sistema de control de versión para sus "
+"barriles."
+
+#: htdocs/toplevel/options.php:101 htdocs/toplevel/options_expert.php:67
+msgid "You can switch back to RCS by clicking here."
+msgstr "Puede volver a RCS haciendo click aquí."
+
+#: include/admin/files.php:44 include/admin/files.php:46
+#: include/admin/files.php:43
+msgid "file"
+msgstr "archivo"
+
+#: include/admin/files.php:46 include/admin/files.php:48
+#: include/admin/files.php:45
+msgid "version"
+msgstr "versión"
+
+#: include/admin/files.php:48 include/admin/files.php:50
+#: include/admin/files.php:47
+msgid "author"
+msgstr "autor"
+
+#: include/admin/files.php:49 include/admin/files.php:51
+#: include/admin/files.php:48
+msgid "size"
+msgstr "tamaño"
+
+#: include/admin/pages.php:91 include/Barrel/Page.php:205
+#: include/Barrel/Page.php:248
+msgid "the page location cannot contain spaces or special characters"
+msgstr ""
+"la ubicación de la página no pueden contener espacios o símbolos de "
+"puntuación."
+
+#: include/admin/pages.php:95 include/Barrel/Page.php:212
+#: include/Barrel/Page.php:255
+msgid "this location cannot be used, it is reserved by Diogenes"
+msgstr "esta ubicación no puede ser usada, es reservada para Diogenes"
+
+#: include/admin/files.php:45 include/admin/files.php:47
+#: include/admin/files.php:44
+msgid "log"
+msgstr "registro"
+
+#: include/admin/menus.php:145 include/admin/menus.php:146
+#: include/admin/menus.php:158
+msgid "entry title"
+msgstr "ingrese título"
+
+#: include/admin/menus.php:146 include/admin/menus.php:147
+#: include/admin/menus.php:159
+msgid "type of link"
+msgstr "tipo del enlace"
+
+#: include/admin/menus.php:218 include/admin/menus.php:217
+#: include/admin/menus.php:229
+msgid "menu name"
+msgstr "nombre del menú"
+
+#: include/admin/menus.php:219 include/admin/menus.php:218
+#: include/admin/menus.php:230
+msgid "link"
+msgstr "enlace"
+
+#: htdocs/toplevel/options.php:80 htdocs/toplevel/options_expert.php:8
+#: include/diogenes.toplevel.inc.php:201 htdocs/toplevel/options.php:43
+#: include/diogenes.toplevel.inc.php:95 include/diogenes.toplevel.inc.php:96
+msgid "Global options"
+msgstr "Opciones globales"
+
+msgid "menu options"
+msgstr "opciones del menú"
+
+#: htdocs/toplevel/options.php:83 include/admin/options.php:69
+#: htdocs/toplevel/options.php:46 include/admin/options.php:71
+#: include/admin/options.php:73
+msgid "menu style"
+msgstr "estilo del menú"
+
+#: htdocs/toplevel/options.php:84 include/admin/options.php:70
+#: htdocs/toplevel/options.php:47 include/admin/options.php:72
+#: include/admin/options.php:74
+msgid "menu theme"
+msgstr "tema del menú"
+
+#: htdocs/toplevel/options.php:91 htdocs/toplevel/options_expert.php:57
+msgid "version control system"
+msgstr "sistema de control de versión"
+
+#: include/admin/options.php:6 include/admin/options.php:7
+msgid "Site options"
+msgstr "Opciones del sitio"
+
+#: include/admin/options.php:55 include/admin/options.php:57
+#: include/admin/options.php:59
+msgid "fully expanded"
+msgstr "completamente expandido"
+
+#: include/admin/options.php:71 include/admin/options.php:73
+#: include/admin/options.php:75
+msgid "minimum menu levels to expand"
+msgstr "níveles mínimos a expandir"
+
+#: include/diogenes.admin.inc.php:66 include/diogenes.admin.inc.php:73
+#: include/diogenes.admin.inc.php:72
+msgid "Options"
+msgstr "Opciones"
+
+#: include/admin/options.php:59 include/admin/options.php:61
+#: include/admin/options.php:63
+msgid "general options"
+msgstr "opciones generales"
+
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:365
+#: include/diogenes/diogenes.logger-view.inc.php:364
+msgid "session properties"
+msgstr "propiedades de la sesión"
+
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.logger-view.inc.php:367
+#: include/diogenes/diogenes.logger-view.inc.php:366
+msgid "host"
+msgstr "host"
+
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:367
+msgid "browser"
+msgstr "examinar"
+
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:370
+msgid "data"
+msgstr "datos"
+
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/diogenes/diogenes.logger-view.inc.php:371
+msgid "filter by"
+msgstr "filtrar por"
+
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.logger-view.inc.php:372
+msgid "start"
+msgstr "comenzar"
+
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:373
+msgid "summary"
+msgstr "sumario"
+
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:375
+msgid "year"
+msgstr "año"
+
+#: include/diogenes/diogenes.logger-view.inc.php:380
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:376
+msgid "month"
+msgstr "mes"
+
+#: include/diogenes/diogenes.logger-view.inc.php:381
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/diogenes/diogenes.logger-view.inc.php:377
+msgid "day"
+msgstr "día"
+
+#: include/diogenes/diogenes.table-editor.inc.php:525
+#: include/diogenes/diogenes.table-editor.inc.php:530
+msgid "id"
+msgstr "id"
+
+#: include/diogenes/diogenes.table-editor.inc.php:527
+#: include/diogenes/diogenes.table-editor.inc.php:532
+msgid "create"
+msgstr "crear"
+
+#: include/diogenes/diogenes.table-editor.inc.php:530
+#: include/diogenes/diogenes.table-editor.inc.php:535
+msgid "new entry"
+msgstr "nueva entrada"
+
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.table-editor.inc.php:536
+msgid "existing entry"
+msgstr "entrada existente"
+
+#: include/diogenes/diogenes.table-editor.inc.php:532
+#: include/diogenes/diogenes.table-editor.inc.php:537
+msgid "(blank = no change)"
+msgstr "(blanco = no cambiar)"
+
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes/diogenes.table-editor.inc.php:538
+msgid "back"
+msgstr "volver"
+
+#: include/diogenes/diogenes.table-editor.inc.php:535
+#: include/diogenes/diogenes.table-editor.inc.php:540
+msgid "You are about to delete this entry. Do you want to proceed?"
+msgstr "Esta apunto de eliminar esta entrada. ¿Desea continuar?"
+
+#: include/diogenes.session.inc.php:62 include/diogenes.session.inc.php:71
+msgid "Authentication error!"
+msgstr "Error de autenticación!"
+
+#: include/admin/files.php:84 include/admin/files.php:93
+#: include/admin/files.php:102 include/admin/pages.php:158
+#: include/admin/compose.php:57 include/admin/edit.php:49
+#: include/admin/files.php:114 include/admin/files.php:122
+#: include/admin/files.php:154 include/admin/pages.php:124
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/admin/plugins.php:23 include/admin/files.php:61
+#: include/admin/pages.php:122
+msgid "Page"
+msgstr "Página"
+
+#: include/admin/files.php:86 include/admin/files.php:95
+#: include/admin/pages.php:172 include/admin/compose.php:63
+#: include/admin/edit.php:55 include/admin/files.php:115
+#: include/admin/files.php:123 include/admin/pages.php:136
+#: include/admin/compose.php:62 include/admin/edit.php:54
+#: include/admin/files.php:122 include/admin/files.php:161
+#: include/admin/pages.php:123
+msgid "File"
+msgstr "Archivo"
+
+#: htdocs/toplevel/index.php:15 include/diogenes.barrel-editor.inc.php:156
+#: include/Barrel/Editor.php:163
+msgid "The site alias may only contain letters, numbers and underscores."
+msgstr "El alias del sitio solo puede contener letras, números y guión bajo."
+
+#: htdocs/toplevel/index.php:18 include/diogenes.barrel-editor.inc.php:159
+#: include/Barrel/Editor.php:167
+msgid ""
+"<b>vhost note</b>: If you intend to serve this site from a virtualhost, you "
+"should enter the name of the virtualhost in this field."
+msgstr ""
+"<b>nota sobre vhost</b>: si quiere servir este sitio desde un host virtual, "
+"debe ingresar el nombre del mismo en este campo."
+
+#: htdocs/toplevel/index.php:55
+msgid "PHP execution"
+msgstr "Ejecutar PHP"
+
+#: htdocs/toplevel/index.php:55 include/diogenes.barrel-editor.inc.php:106
+#: include/Barrel/Editor.php:113
+msgid "custom templates"
+msgstr "plantillas personalizadas"
+
+msgid "template options"
+msgstr "opciones de la plantilla"
+
+#: htdocs/toplevel/options.php:85 include/admin/options.php:66
+#: htdocs/toplevel/options.php:48 include/admin/options.php:68
+#: include/admin/options.php:70
+msgid "templates directory"
+msgstr "directiorio de plantillas"
+
+#: htdocs/toplevel/options.php:86 include/admin/options.php:67
+#: htdocs/toplevel/options.php:49 include/admin/options.php:69
+#: include/admin/options.php:71
+msgid "default template"
+msgstr "plantilla por omisión"
+
+#: include/admin/compose.php:56 include/admin/edit.php:46
+#: include/admin/compose.php:58 include/admin/edit.php:48
+msgid "log message"
+msgstr "registrar mensaje"
+
+#: include/admin/options.php:63 include/admin/options.php:65
+#: include/admin/options.php:67
+msgid "favicon"
+msgstr "favicon"
+
+#: include/admin/options.php:64 include/admin/options.php:66
+#: include/admin/options.php:68
+msgid "(relative url to a PNG image)"
+msgstr "(url relativa a una imagen PNG)"
+
+#: include/admin/pages.php:17 include/admin/files.php:57
+#: include/admin/pages.php:21 include/admin/files.php:54
+#: include/admin/pages.php:20
+msgid "page template"
+msgstr "plantilla de la página"
+
+#: include/admin/pages.php:18 include/admin/files.php:58
+#: include/admin/pages.php:22 include/admin/files.php:55
+#: include/admin/pages.php:21
+msgid "status"
+msgstr "estado"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "under construction"
+msgstr "en construcción"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "disabled"
+msgstr "deshabilitado"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "archived"
+msgstr "archivado"
+
+#: include/diogenes.barrel.inc.php:152 include/diogenes.barrel.inc.php:153
+#: include/diogenes.barrel.inc.php:155
+msgid "This page is currently under construction."
+msgstr "Esta página se encuentra en construcción."
+
+#: include/diogenes.barrel.inc.php:156 include/diogenes.barrel.inc.php:157
+#: include/diogenes.barrel.inc.php:159
+msgid "This page is currently unavailable."
+msgstr "Está página no se encuentra disponible."
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "http://diogenes-doc.polytechnique.org/en-admin/"
+msgstr "http://diogenes-doc.polytechnique.org/en-admin/"
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "http://diogenes-doc.polytechnique.org/en-user/"
+msgstr "http://diogenes-doc.polytechnique.org/en-user/"
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "http://diogenes-doc.polytechnique.org/en-root/"
+msgstr "http://diogenes-doc.polytechnique.org/en-root/"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "Mode"
+msgstr ""
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+#, fuzzy
+msgid "standard"
+msgstr "comenzar"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "expert"
+msgstr ""
+
+#: htdocs/toplevel/options.php:82 include/admin/options.php:65
+#: htdocs/toplevel/options.php:45 include/admin/options.php:67
+#: include/admin/options.php:69
+#, fuzzy
+msgid "display options"
+msgstr "opciones de la plantilla"
+
+#: htdocs/toplevel/options.php:87 htdocs/toplevel/options.php:50
+#, fuzzy
+msgid "system options"
+msgstr "Opciones del sitio"
+
+msgid "Initial user setup"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:11
+msgid ""
+"Sorry, this feature is only available using native Diogenes authentication."
+msgstr ""
+
+#: htdocs/toplevel/boot.php:19
+msgid "The database is already configured."
+msgstr ""
+
+#: htdocs/toplevel/options_expert.php:13 htdocs/toplevel/options_expert.php:75
+#: htdocs/toplevel/options_expert.php:76
+#, fuzzy
+msgid "option"
+msgstr "Opciones"
+
+#: htdocs/toplevel/options_expert.php:14 htdocs/toplevel/options_expert.php:76
+#: htdocs/toplevel/options_expert.php:77
+msgid "value"
+msgstr ""
+
+#: include/admin/menus.php:221 include/admin/menus.php:220
+#: include/admin/menus.php:232
+msgid "Menu"
+msgstr ""
+
+#: include/diogenes.page.inc.php:65 include/diogenes.page.inc.php:66
+msgid "debugging"
+msgstr ""
+
+#: include/diogenes.page.inc.php:66 include/diogenes.page.inc.php:67
+msgid "call trace"
+msgstr ""
+
+#: include/diogenes.page.inc.php:67 include/diogenes.page.inc.php:68
+msgid "database trace"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:59
+#: include/diogenes/diogenes.logger-view.inc.php:85
+#: include/diogenes/diogenes.logger-view.inc.php:130
+#: include/diogenes/diogenes.logger-view.inc.php:183
+#: include/diogenes/diogenes.logger-view.inc.php:58
+#: include/diogenes/diogenes.logger-view.inc.php:84
+#: include/diogenes/diogenes.logger-view.inc.php:129
+#: include/diogenes/diogenes.logger-view.inc.php:182
+msgid "all"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:363
+#: include/diogenes/diogenes.logger-view.inc.php:360
+#: include/diogenes/diogenes.logger-view.inc.php:359
+msgid "Please select a year and/or a user."
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:523
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#, fuzzy
+msgid "previous page"
+msgstr "ver página"
+
+#: include/diogenes/diogenes.table-editor.inc.php:524
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#, fuzzy
+msgid "next page"
+msgstr "ver página"
+
+#: htdocs/toplevel/boot.php:7
+msgid "Initial setup"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:46
+msgid "The initial setup of the database was performed successfuly."
+msgstr ""
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+#, fuzzy
+msgid "no"
+msgstr "ninguno"
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "yes"
+msgstr ""
+
+#: include/admin/options.php:68 include/admin/options.php:70
+#: include/admin/options.php:72
+#, fuzzy
+msgid "hide Diogenes menu"
+msgstr "Menú del sitio"
+
+#: include/admin/prefs.php:28
+#, fuzzy
+msgid "account preferences"
+msgstr "Preferencias de Diogenes"
+
+#: htdocs/toplevel/plugins.php:19
+msgid "Barrel plugins"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:21
+#, fuzzy
+msgid "Global plugin settings"
+msgstr "Opciones globales"
+
+#: htdocs/toplevel/plugins.php:38
+#, php-format
+msgid "Rebuilding plugin cache for barrel '%s'"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:47
+msgid "Clean plugins database"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:48
+msgid ""
+"If you are having problems with references to plugins that no longer exist, "
+"you can have Diogenes remove such entries from the database."
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:49
+msgid "Clean"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:51
+msgid "Enable or disable plugins"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:54
+msgid "You can select the plugins you want to enable for this barrel."
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:56
+msgid ""
+"You can select the plugins you want to enable or disable globally, that is "
+"the plugins that can be used in the different barrels. Please note that for "
+"a plugin to be accessible from a barrel, you will need to activate that "
+"plugin for the barrel. To do this, from the <i>List of sites</i> click on "
+"'plugins' next to the barrel of your choice."
+msgstr ""
+
+#: htdocs/toplevel/options.php:52
+#, fuzzy
+msgid "Word document import"
+msgstr "Importar documento Word"
+
+#: include/admin/files.php:39
+#, fuzzy
+msgid "File operations"
+msgstr "Opciones del sitio"
+
+#: include/admin/files.php:43 include/admin/files.php:40
+#, fuzzy
+msgid "Create an empty file"
+msgstr "Crear un nuevo sitio"
+
+#: include/admin/files.php:44 include/admin/files.php:41
+msgid "Copy or move a file"
+msgstr ""
+
+#: include/admin/files.php:45 include/admin/files.php:42
+#, fuzzy
+msgid "Create"
+msgstr "crear"
+
+#: include/admin/files.php:53 include/admin/files.php:50
+msgid "to"
+msgstr ""
+
+#: include/admin/files.php:59
+#, fuzzy
+msgid "read"
+msgstr "crear"
+
+#: include/admin/files.php:60
+#, fuzzy
+msgid "write"
+msgstr "sitio"
+
+#: include/admin/files.php:67 include/admin/files.php:69
+#, fuzzy
+msgid "Creating empty file"
+msgstr "Eliminando archivo"
+
+#: include/admin/files.php:69 include/admin/files.php:71
+msgid "The specified file already exists!"
+msgstr ""
+
+#: include/admin/files.php:155 include/admin/pages.php:160
+#: include/admin/plugins.php:22 include/admin/files.php:194
+#: include/admin/pages.php:156 include/Barrel/Page.php:170
+#, fuzzy
+msgid "home"
+msgstr "Inicio"
+
+#: include/admin/files.php:182 include/admin/files.php:224
+msgid "Copy"
+msgstr ""
+
+#: include/admin/files.php:182 include/admin/files.php:224
+#, fuzzy
+msgid "Move"
+msgstr "Eliminar"
+
+#: include/admin/pages.php:18 include/admin/pages.php:17
+#: include/Barrel/Page.php:171
+#, fuzzy
+msgid "parent page"
+msgstr "ver página"
+
+#: include/admin/webdav.php:7 include/diogenes.admin.inc.php:79
+#: include/diogenes.admin.inc.php:78
+msgid "WebDAV"
+msgstr ""
+
+#: include/admin/webdav.php:9 include/admin/webdav.php:11
+msgid ""
+"You can access your barrel's files using WebDAV by pointing your WebDAV "
+"client to the following address."
+msgstr ""
+
+#: include/admin/plugins.php:22
+msgid "Page plugins "
+msgstr ""
+
+#: include/admin/plugins.php:26
+msgid "Available plugins"
+msgstr ""
+
+#: include/diogenes.page.inc.php:69 include/diogenes.barrel-editor.inc.php:50
+#: include/diogenes.barrel-editor.inc.php:106 include/Barrel/Page.php:126
+#: include/Barrel/Page.php:152 include/diogenes.plugin-editor.inc.php:237
+#: include/Barrel/Page.php:150 include/Barrel/Page.php:178
+#: include/Barrel/Editor.php:52 include/Barrel/Editor.php:113
+#: include/Plugin/Editor.php:266 include/diogenes.page.inc.php:68
+msgid "plugins"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:96 include/diogenes.admin.inc.php:76
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:75
+msgid "Plugins"
+msgstr ""
+
+#: include/Barrel/Page.php:70 include/Barrel/Page.php:89
+msgid "Not deleting page, it has child pages!"
+msgstr ""
+
+#: include/Barrel/File.php:76 include/Barrel/File.php:94
+#, fuzzy
+msgid "rename"
+msgstr "usuario"
+
+#: include/diogenes.plugin-editor.inc.php:236 include/Plugin/Editor.php:265
+#, fuzzy
+msgid "plugin"
+msgstr "enlace"
+
+#: include/diogenes.plugin-editor.inc.php:239 include/Plugin/Editor.php:268
+#, fuzzy
+msgid "parameters"
+msgstr "propiedades"
+
+#: include/admin/files.php:192
+msgid "Document"
+msgstr ""
+
+#: include/admin/index.php:52
+#, fuzzy
+msgid "barrel options"
+msgstr "Opciones globales"
+
+#: include/admin/index.php:57
+#, fuzzy
+msgid "barrel plugins"
+msgstr "Opciones globales"
+
+#: include/admin/index.php:68
+#, fuzzy
+msgid "page removed"
+msgstr "página creada"
+
+#: include/admin/index.php:80
+#, fuzzy
+msgid "page plugins"
+msgstr "enlace"
+
+#: include/admin/index.php:92
+#, fuzzy
+msgid "file deleted"
+msgstr "página eliminada"
+
+#: include/admin/webdav.php:14
+msgid ""
+"In order to access your barrel's files using WebDAV, please ask your "
+"Diogenes administrator to enable this feature in the Diogenes configuration "
+"file."
+msgstr ""
+
+#: include/Barrel/Page.php:81
+#, fuzzy
+msgid "Deleting page"
+msgstr "Eliminando archivo"
+
+#: include/Barrel/Page.php:176
+#, fuzzy
+msgid "add a page"
+msgstr "Agregar página"
+
+#: include/Barrel/Page.php:266
+#, fuzzy
+msgid "Creating new page"
+msgstr "Eliminando archivo"
+
+#: include/Barrel/Editor.php:165
+msgid "no barrels available"
+msgstr ""
+
+#: htdocs/toplevel/index.php:13
+msgid ""
+"Warning : in order to make use of virtual hosts or WebDAV, you need to set "
+"$globals->rooturl to a full URL starting with http:// or https:// in your "
+"Diogenes configuration file."
+msgstr ""
--- /dev/null
+# translation of fr.po to
+# translation of fr.po to English
+# French translations for Diogenes package.
+# Copyright (C) 2003, 2004 Jeremy Lainé
+# This file is distributed under the same license as the Diogenes package.
+# Jeremy Lainé <jeremy.laine@m4x.org>, 2003, 2004, 2005, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-01-07 16:41+0100\n"
+"PO-Revision-Date: 2006-01-07 16:18+0100\n"
+"Last-Translator: Jeremy Lainé <jeremy.laine@m4x.org>\n"
+"Language-Team: <en@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.10.2\n"
+
+#: htdocs/index.php:9 htdocs/index.php:13 include/admin/bad.php:46
+msgid "Welcome to Diogenes"
+msgstr "Bienvenue sur Diogenes"
+
+#: htdocs/index.php:11 htdocs/index.php:15
+msgid "Welcome to the Diogenes content management system."
+msgstr ""
+"Diogenes est un système permettant de créer des sites web et de les "
+"administrer à travers une interface web."
+
+#: htdocs/index.php:12 htdocs/index.php:16
+msgid ""
+"Diogenes was developed by the webmasters of the Polytechnique.org web site."
+msgstr "Diogenes a été mis au point par l'équipe de Polytechnique.org."
+
+#: htdocs/index.php:13 htdocs/index.php:17
+msgid "The following barrels are currently available"
+msgstr "Les tonneaux suivants sont disponibles"
+
+#: htdocs/index.php:14 htdocs/toplevel/admins.php:8
+#: include/diogenes.barrel-editor.inc.php:152 include/Barrel/Editor.php:159
+msgid "site"
+msgstr "site"
+
+#: htdocs/index.php:15 htdocs/toplevel/index.php:12
+#: htdocs/toplevel/logger_actions.php:14 include/admin/options.php:61
+#: include/admin/options.php:63 include/diogenes.barrel-editor.inc.php:153
+#: include/diogenes.plugin-editor.inc.php:238 include/admin/options.php:65
+#: include/Barrel/Editor.php:160 include/Plugin/Editor.php:267
+msgid "description"
+msgstr "description"
+
+#: htdocs/prefs.php:19
+msgid "Changing password.."
+msgstr "Changement de mot de passe..."
+
+#: htdocs/prefs.php:33 include/admin/prefs.php:20
+msgid "User preferences"
+msgstr "Préférences"
+
+#: htdocs/prefs.php:34 include/admin/prefs.php:21
+msgid "Diogenes preferences"
+msgstr "Préférences de Diogenes"
+
+#: htdocs/prefs.php:36
+msgid "my information"
+msgstr "mes informations"
+
+#: htdocs/prefs.php:37 htdocs/toplevel/accounts.php:13
+#: htdocs/toplevel/boot.php:28 include/diogenes.session.inc.php:138
+msgid "username"
+msgstr "utilisateur"
+
+#: htdocs/prefs.php:38
+msgid "full name"
+msgstr "identité"
+
+#: htdocs/prefs.php:40 include/admin/prefs.php:23
+msgid "language"
+msgstr "langue"
+
+#: htdocs/prefs.php:41 include/admin/prefs.php:24
+msgid ""
+"You can select your preferred language by clicking on the appropriate "
+"language below."
+msgstr ""
+"Vous pouvez choisir votre langue préférée en cliquant sur la langue de votre "
+"choix ci-dessous."
+
+#: htdocs/prefs.php:43
+msgid "my password"
+msgstr "mot de passe"
+
+#: htdocs/prefs.php:44
+msgid "new password"
+msgstr "nouveau mot de passe"
+
+#: htdocs/prefs.php:45
+msgid "confirmation"
+msgstr "confirmation"
+
+#: htdocs/prefs.php:47 include/admin/prefs.php:26
+msgid "Change"
+msgstr "Changer"
+
+#: include/admin/compose.php:32 include/admin/edit.php:31
+#: include/admin/compose.php:34 include/admin/edit.php:33
+msgid "Commiting changes to file"
+msgstr "Enregistrement des modifications"
+
+#: include/admin/edit.php:41 include/admin/edit.php:43
+msgid "File editor"
+msgstr "Éditeur de fichier"
+
+#: include/admin/edit.php:45 include/admin/edit.php:47
+msgid "File source"
+msgstr "Source du fichier"
+
+#: htdocs/toplevel/index.php:16 htdocs/toplevel/options.php:89
+#: include/admin/menus.php:151 include/admin/options.php:72
+#: include/admin/pages.php:12 include/admin/edit.php:48
+#: include/diogenes.session.inc.php:137
+#: include/diogenes/diogenes.logger-view.inc.php:382
+#: include/diogenes/diogenes.table-editor.inc.php:536
+#: htdocs/toplevel/options.php:53 include/admin/files.php:41
+#: include/admin/menus.php:152 include/admin/options.php:74
+#: include/admin/pages.php:15 include/admin/edit.php:50
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.table-editor.inc.php:541
+#: include/diogenes.barrel-editor.inc.php:157
+#: include/diogenes.plugin-editor.inc.php:235 include/admin/files.php:38
+#: include/admin/menus.php:164 include/admin/options.php:76
+#: include/admin/pages.php:14 include/Barrel/Editor.php:164
+#: include/Plugin/Editor.php:264
+#: include/diogenes/diogenes.logger-view.inc.php:378
+msgid "Submit"
+msgstr "Envoyer"
+
+#: include/admin/files.php:27 include/admin/pages.php:152
+#: include/admin/compose.php:58 include/admin/edit.php:50
+#: include/Barrel/Page.php:143
+msgid "pages catalog"
+msgstr "catalogue des pages"
+
+#: include/admin/files.php:28 include/admin/pages.php:154
+#: include/admin/compose.php:59 include/admin/edit.php:51
+#: include/Barrel/Page.php:147 include/admin/index.php:74
+#: include/Barrel/Page.php:174
+msgid "page properties"
+msgstr "propriétés de la page"
+
+#: include/admin/files.php:29 include/admin/pages.php:155
+#: include/admin/compose.php:60 include/admin/edit.php:52
+#: include/diogenes.rcs.inc.php:452 include/diogenes.rcs.inc.php:621
+#: include/Barrel/Page.php:148 include/admin/files.php:146
+#: include/Barrel/Page.php:175
+msgid "view page"
+msgstr "voir la page"
+
+#: include/admin/files.php:83 include/admin/files.php:92
+#: include/admin/files.php:101 include/admin/pages.php:156
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/Barrel/Page.php:149 include/Barrel/Page.php:173
+msgid "browse files"
+msgstr "parcourir les fichiers"
+
+#: include/admin/files.php:35 include/admin/pages.php:167
+#: include/admin/compose.php:64 include/admin/edit.php:56
+#: include/admin/pages.php:132 include/Barrel/File.php:94
+#: include/Barrel/File.php:114
+msgid "raw editor"
+msgstr "éditeur brut"
+
+#: htdocs/toplevel/options.php:88 include/admin/files.php:36
+#: include/admin/pages.php:168 include/admin/compose.php:65
+#: include/admin/edit.php:57 include/diogenes.barrel.inc.php:316
+#: htdocs/toplevel/options.php:51 include/admin/pages.php:133
+#: include/diogenes.barrel.inc.php:347 include/Barrel/File.php:95
+#: include/Barrel/File.php:115 include/diogenes.barrel.inc.php:343
+msgid "HTML editor"
+msgstr "éditeur HTML"
+
+#: include/admin/files.php:85 include/admin/files.php:94
+#: include/admin/pages.php:163 include/admin/pages.php:170
+#: include/admin/compose.php:66 include/admin/edit.php:58
+#: include/admin/pages.php:129 include/admin/pages.php:134
+#: include/Barrel/File.php:97 include/Barrel/File.php:117
+msgid "file revisions"
+msgstr "versions du fichier"
+
+msgid "Ekit"
+msgstr "Ekit"
+
+#: include/admin/menus.php:36 include/admin/menus.php:37
+msgid "The site's menus"
+msgstr "Menus du site"
+
+#: include/admin/menus.php:44 include/admin/menus.php:45
+msgid "The selected menu has child items, please remove them first."
+msgstr ""
+"Le menu sélectionné a encore des menus fils, il faut d'abord les supprimer."
+
+#: include/admin/menus.php:144 include/admin/menus.php:145
+#: include/admin/menus.php:157
+msgid "menu entry properties"
+msgstr "propriétés de l'entrée"
+
+#: include/admin/menus.php:147 include/admin/menus.php:148
+#: include/admin/menus.php:160
+msgid "none"
+msgstr "aucun"
+
+#: include/admin/menus.php:148 include/admin/menus.php:149
+#: include/admin/menus.php:161
+msgid "internal link"
+msgstr "lien interne"
+
+#: include/admin/menus.php:149 include/admin/menus.php:150
+#: include/admin/menus.php:162
+msgid "external link"
+msgstr "lien extérieur"
+
+#: include/admin/menus.php:173 include/diogenes.plugin-editor.inc.php:240
+#: include/admin/menus.php:185 include/Plugin/Editor.php:269
+msgid "move up"
+msgstr "remonter"
+
+#: include/admin/menus.php:176 include/diogenes.plugin-editor.inc.php:241
+#: include/admin/menus.php:188 include/Plugin/Editor.php:270
+msgid "move down"
+msgstr "descendre"
+
+#: htdocs/toplevel/index.php:85 include/admin/menus.php:178
+#: include/diogenes.rcs.inc.php:417
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#: include/diogenes/diogenes.table-editor.inc.php:534
+#: include/diogenes.barrel-editor.inc.php:43 include/Barrel/Page.php:119
+#: include/Barrel/File.php:74 include/admin/menus.php:190
+#: include/Barrel/File.php:92 include/Barrel/Page.php:143
+#: include/Barrel/Editor.php:45
+msgid "edit"
+msgstr "éditer"
+
+#: htdocs/toplevel/index.php:87 include/admin/menus.php:179
+#: include/admin/pages.php:202 include/diogenes.rcs.inc.php:419
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes.barrel-editor.inc.php:52 include/Barrel/Page.php:129
+#: include/Barrel/File.php:77 include/admin/menus.php:191
+#: include/Barrel/File.php:95 include/Barrel/Page.php:153
+#: include/Barrel/Editor.php:54
+msgid "delete"
+msgstr "supprimer"
+
+#: include/admin/menus.php:217 include/admin/menus.php:216
+#: include/admin/menus.php:228
+msgid "External links are denoted with the [ext] prefix."
+msgstr "Les liens extérieurs sont signalés par le préfixe [ext]."
+
+#: include/admin/menus.php:222 include/admin/menus.php:221
+#: include/admin/menus.php:233
+msgid "Add new entry"
+msgstr "Ajouter une entrée"
+
+#: include/admin/files.php:63 include/admin/files.php:86
+#: include/admin/files.php:88
+msgid "Error during file transfer!"
+msgstr "Erreur lors de l'envoi du fichier !"
+
+#: include/admin/files.php:69 include/admin/files.php:92
+#: include/admin/files.php:94
+msgid "Deleting file"
+msgstr "Suppression du fichier"
+
+#: include/admin/files.php:81 include/admin/files.php:112
+#: include/admin/files.php:120
+msgid "Revision differences"
+msgstr "Différences entre versions"
+
+#: include/admin/files.php:90 include/admin/files.php:120
+#: include/admin/files.php:128
+msgid "File revisions"
+msgstr "Versions du fichier"
+
+#: include/admin/files.php:103 include/admin/files.php:155
+#: include/admin/files.php:194
+msgid "File manager"
+msgstr "Gestionnaire de fichiers"
+
+#: include/admin/files.php:40 include/admin/files.php:38
+msgid "Files in current directory"
+msgstr "Fichiers actuellement dans ce répertoire"
+
+#: include/admin/files.php:41 include/admin/files.php:40
+#: include/admin/files.php:37
+msgid "Import file"
+msgstr "Importer un fichier"
+
+#: include/admin/files.php:42 include/admin/pages.php:210
+#: include/admin/pages.php:191 include/admin/files.php:39
+#: include/admin/pages.php:163
+msgid "Send"
+msgstr "Envoyer"
+
+#: include/admin/files.php:43
+msgid "File to upload"
+msgstr "Fichier à envoyer"
+
+#: include/admin/index.php:20 include/admin/index.php:45
+#: include/admin/index.php:47
+msgid "site created"
+msgstr "site créé"
+
+#: include/admin/index.php:23 include/admin/index.php:50
+#: include/admin/index.php:63
+msgid "page created"
+msgstr "page créée"
+
+#: include/admin/index.php:26 include/admin/index.php:54
+msgid "page deleted"
+msgstr "page supprimée"
+
+#: include/admin/index.php:31 include/admin/index.php:59
+#: include/admin/index.php:86
+msgid "file updated"
+msgstr "mise à jour"
+
+#: include/admin/index.php:34 include/admin/index.php:64
+msgid "file removed"
+msgstr "suppression du fichier"
+
+#: include/admin/index.php:43 include/admin/index.php:77
+#: include/admin/index.php:105
+msgid "Welcome to the Diogenes backoffice"
+msgstr "Bienvenue sur l'interface d'administration"
+
+#: include/admin/files.php:47 include/admin/index.php:44
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/admin/files.php:49 include/admin/index.php:78
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/files.php:46 include/admin/index.php:106
+#: include/diogenes/diogenes.logger-view.inc.php:368
+msgid "date"
+msgstr "date"
+
+#: include/admin/index.php:45 include/admin/users.php:28
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/index.php:79
+#: include/diogenes/diogenes.logger-view.inc.php:366
+#: include/admin/index.php:107
+#: include/diogenes/diogenes.logger-view.inc.php:365
+msgid "user"
+msgstr "utilisateur"
+
+#: include/admin/index.php:46 include/admin/index.php:80
+#: include/admin/index.php:108
+msgid "event"
+msgstr "événement"
+
+#: include/admin/pages.php:11 include/admin/pages.php:14
+#: include/admin/pages.php:158
+msgid "Page manager"
+msgstr "Gestionnaire des pages"
+
+#: include/admin/pages.php:13 include/admin/pages.php:16
+#: include/admin/pages.php:15
+msgid "Reset"
+msgstr "R.À.Z."
+
+#: include/admin/pages.php:14 include/diogenes.barrel.inc.php:312
+#: include/admin/pages.php:17 include/diogenes.barrel.inc.php:343
+#: include/admin/pages.php:16 include/diogenes.barrel.inc.php:339
+msgid "Page properties"
+msgstr "Propriétés de la page"
+
+#: include/admin/pages.php:15 include/admin/files.php:55
+#: include/admin/pages.php:19 include/admin/files.php:52
+#: include/admin/pages.php:18
+msgid "location"
+msgstr "emplacement"
+
+#: htdocs/toplevel/index.php:10 htdocs/toplevel/logger_actions.php:13
+#: include/admin/options.php:60 include/admin/pages.php:16
+#: include/admin/files.php:56 include/admin/options.php:62
+#: include/admin/pages.php:20 include/admin/files.php:53
+#: include/admin/options.php:64 include/admin/pages.php:19
+msgid "title"
+msgstr "titre"
+
+msgid "display"
+msgstr "affichage"
+
+#: include/admin/files.php:56 include/admin/pages.php:22
+msgid "access"
+msgstr "accès"
+
+#: include/admin/pages.php:22 include/admin/pages.php:26
+msgid "Add a page"
+msgstr "Ajouter une page"
+
+#: include/admin/pages.php:43 include/admin/pages.php:47
+#: include/admin/pages.php:50
+msgid "Document name does not end in .doc"
+msgstr "Le nom du document ne se termine pas en .doc"
+
+#: include/admin/pages.php:46 include/admin/pages.php:50
+#: include/admin/pages.php:53
+msgid "Checking in Word file"
+msgstr "Enregistrement du fichier Word"
+
+#: include/admin/pages.php:51 include/admin/pages.php:55
+#: include/admin/pages.php:58
+msgid "Importing Word file"
+msgstr "Import du fichier Word"
+
+#: include/admin/pages.php:57 include/admin/pages.php:61
+#: include/admin/pages.php:64
+msgid "Importing HTML file"
+msgstr "Import du fichier HTML"
+
+#: include/admin/pages.php:62 include/admin/pages.php:66
+#: include/admin/pages.php:69
+msgid "Raw file import"
+msgstr "Import du fichier brut"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "visible"
+msgstr "visible"
+
+msgid "invisible"
+msgstr "invisible"
+
+#: htdocs/toplevel/index.php:84 include/admin/pages.php:196
+#: include/diogenes.rcs.inc.php:416 include/diogenes.rcs.inc.php:450
+#: include/diogenes.rcs.inc.php:619 include/Barrel/Page.php:118
+#: include/Barrel/File.php:73 include/admin/files.php:144
+#: include/Barrel/File.php:91 include/Barrel/Page.php:142
+msgid "view"
+msgstr "voir"
+
+#: include/admin/pages.php:197 include/Barrel/Page.php:120
+#: include/Barrel/Page.php:144
+msgid "properties"
+msgstr "propriétés"
+
+#: include/admin/pages.php:198
+msgid "files"
+msgstr "fichiers"
+
+#: include/admin/pages.php:199 include/diogenes.rcs.inc.php:418
+#: include/Barrel/Page.php:121 include/Barrel/File.php:75
+#: include/Barrel/File.php:93 include/Barrel/Page.php:145
+msgid "revisions"
+msgstr "versions"
+
+#: include/admin/pages.php:211 include/admin/pages.php:195
+#: include/admin/pages.php:172
+msgid "Import a Word document"
+msgstr "Importer un document Word"
+
+#: include/admin/pages.php:214 include/admin/pages.php:198
+#: include/admin/pages.php:176
+msgid "This page's master document is currently a Word document."
+msgstr "Le document maître pour cette page est actuellement un fichier Word."
+
+#: include/admin/pages.php:215 include/admin/pages.php:199
+#: include/admin/pages.php:177
+msgid "You can upload a new version of the Word document below."
+msgstr "Vous pouvez envoyer une nouvelle version du fichier Word ci-dessous."
+
+#: include/admin/pages.php:216 include/admin/pages.php:200
+#: include/admin/pages.php:178
+msgid "You can get the current version of the file here"
+msgstr "Vous pouvez récupérer la version actuelle du fichier ici"
+
+#: include/admin/pages.php:219 include/admin/pages.php:203
+#: include/admin/pages.php:181
+msgid "If you wish, you can set this page's content from a Word document."
+msgstr ""
+"Si vous le souhaitez, vous pouvez remplacer le contenu de cette page par "
+"celui d'un fichier Word."
+
+#: include/admin/pages.php:220 include/admin/pages.php:204
+#: include/admin/pages.php:182
+msgid "To do so, simply upload the Word document below."
+msgstr ""
+"Pour ce faire, il vous suffit d'indiquer le fichier Word à importer ci-"
+"dessous."
+
+#: include/admin/pages.php:222 include/admin/pages.php:208
+#: include/admin/pages.php:160
+msgid "Import HTML"
+msgstr "Import HTML"
+
+#: include/admin/pages.php:223 include/admin/pages.php:209
+#: include/admin/pages.php:161
+msgid ""
+"You can replace the current page's contents by uploading an HTML file below."
+msgstr ""
+"Vous pouvez remplacer le contenu de la page en important un fichier HTML ci-"
+"dessous."
+
+#: include/admin/pages.php:224 include/admin/pages.php:210
+#: include/admin/pages.php:162
+msgid ""
+"If the file name ends with .htm or .html, anything outside the <body>"
+"</body> pair will be stripped."
+msgstr ""
+"Si le nom se termine par .htm ou .html, tout ce qui est en dehors des "
+"balises <body></body> sera retiré."
+
+#: htdocs/toplevel/admins.php:20 include/admin/users.php:15
+msgid "Could not find requested user"
+msgstr "L'utilisateur demandé n'a pas été trouvé"
+
+#: include/admin/users.php:24
+msgid "Users administration"
+msgstr "Gestion des utilisateurs"
+
+#: include/admin/users.php:25
+msgid "Registered users"
+msgstr "Utilisateurs du site"
+
+#: include/admin/users.php:26 include/diogenes.toplevel.inc.php:200
+#: include/diogenes.toplevel.inc.php:94 include/diogenes.toplevel.inc.php:95
+msgid "Administrators"
+msgstr "Administrateurs"
+
+#: include/admin/users.php:29
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.table-editor.inc.php:526
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.logger-view.inc.php:369
+msgid "action"
+msgstr "action"
+
+#: htdocs/toplevel/admins.php:45 include/admin/users.php:35
+msgid "remove"
+msgstr "retirer"
+
+#: include/diogenes.session.inc.php:134
+msgid "Diogenes login"
+msgstr "Connexion à Diogenes"
+
+#: include/diogenes.session.inc.php:135
+msgid "Connexion"
+msgstr "Connexion"
+
+#: htdocs/toplevel/accounts.php:16 htdocs/toplevel/boot.php:31
+#: include/diogenes.session.inc.php:136
+msgid "password"
+msgstr "mot de passe"
+
+#: include/diogenes.toplevel.inc.php:52 include/diogenes.barrel.inc.php:104
+#: include/diogenes.barrel.inc.php:105 include/diogenes.toplevel.inc.php:53
+#: include/diogenes.barrel.inc.php:107
+msgid "You are not authorized to view this page!"
+msgstr "Vous n'êtes pas autorisé à consulter cette page !"
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:187
+#: include/diogenes.admin.inc.php:62 include/diogenes.barrel.inc.php:301
+#: include/diogenes.toplevel.inc.php:81 include/diogenes.barrel.inc.php:332
+#: include/diogenes.admin.inc.php:69 include/diogenes.toplevel.inc.php:39
+#: include/diogenes.toplevel.inc.php:82 include/diogenes.admin.inc.php:68
+#: include/diogenes.barrel.inc.php:328
+msgid "Home"
+msgstr "Accueil"
+
+#: include/diogenes.toplevel.inc.php:192 include/diogenes.barrel.inc.php:303
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:334
+#: include/diogenes.toplevel.inc.php:87 include/diogenes.barrel.inc.php:330
+msgid "Logout"
+msgstr "Déconnexion"
+
+#: include/diogenes.toplevel.inc.php:194 include/diogenes.barrel.inc.php:306
+#: include/diogenes.toplevel.inc.php:88 include/diogenes.barrel.inc.php:337
+#: include/diogenes.toplevel.inc.php:89 include/diogenes.barrel.inc.php:333
+msgid "Login"
+msgstr "Connexion"
+
+#: include/diogenes.admin.inc.php:37 include/diogenes.admin.inc.php:64
+#: include/diogenes.barrel.inc.php:310 include/diogenes.barrel.inc.php:341
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:70
+#: include/diogenes.barrel.inc.php:337
+msgid "Administration"
+msgstr "Administration"
+
+#: include/diogenes.rcs.inc.php:455 include/diogenes.rcs.inc.php:624
+#: include/admin/files.php:149
+msgid "diff to"
+msgstr "diff. avec"
+
+#: include/diogenes.rcs.inc.php:459 include/diogenes.rcs.inc.php:628
+#: include/admin/files.php:153
+msgid "restore"
+msgstr "restaurer"
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "Admin manual"
+msgstr "Manuel d'administration"
+
+msgid "Settings"
+msgstr "Paramètres"
+
+#: include/diogenes.toplevel.inc.php:202 include/diogenes.admin.inc.php:67
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:78
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.admin.inc.php:77
+msgid "Users"
+msgstr "Utilisateurs"
+
+#: include/diogenes.admin.inc.php:68 include/diogenes.admin.inc.php:80
+#: include/diogenes.admin.inc.php:79
+msgid "Content"
+msgstr "Contenu"
+
+#: include/diogenes.admin.inc.php:69 include/diogenes.admin.inc.php:81
+#: include/diogenes.admin.inc.php:80
+msgid "Pages catalog"
+msgstr "Catalogue des pages"
+
+#: include/diogenes.admin.inc.php:70 include/diogenes.admin.inc.php:82
+#: include/diogenes.admin.inc.php:81
+msgid "Edit style sheet"
+msgstr "Éditer la feuille de style"
+
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:83
+#: include/diogenes.admin.inc.php:82
+msgid "Edit menu"
+msgstr "Éditer le menu"
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:39
+msgid "Toplevel administration"
+msgstr "Administration"
+
+#: include/diogenes.page.inc.php:59
+msgid "Powered by Diogenes"
+msgstr "Fonctionne sous Diogenes"
+
+#: include/diogenes.page.inc.php:213 include/diogenes.page.inc.php:216
+#: include/diogenes.page.inc.php:212
+msgid "The requested document was not found."
+msgstr "Le document demandé n'existe pas."
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "User manual"
+msgstr "Manuel de l'utilisateur"
+
+#: include/diogenes.toplevel.inc.php:191 include/diogenes.barrel.inc.php:304
+#: include/diogenes.toplevel.inc.php:85 include/diogenes.barrel.inc.php:335
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:331
+msgid "Preferences"
+msgstr "Préférences"
+
+#: include/diogenes.toplevel.inc.php:197 include/diogenes.toplevel.inc.php:91
+#: include/diogenes.toplevel.inc.php:92
+msgid "Sites"
+msgstr "Sites"
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "Root manual"
+msgstr "Manuel du système"
+
+#: htdocs/toplevel/index.php:8 include/diogenes.toplevel.inc.php:199
+#: htdocs/toplevel/index.php:11 include/diogenes.toplevel.inc.php:93
+#: htdocs/toplevel/index.php:16 include/diogenes.toplevel.inc.php:94
+msgid "List of sites"
+msgstr "Liste des sites"
+
+#: htdocs/toplevel/admins.php:7
+msgid "Site administrators"
+msgstr "Administrateurs des sites"
+
+#: htdocs/toplevel/accounts.php:7 include/diogenes.toplevel.inc.php:203
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.toplevel.inc.php:99
+msgid "User accounts"
+msgstr "Comptes utilisateurs"
+
+#: include/diogenes.toplevel.inc.php:204 include/diogenes.toplevel.inc.php:99
+#: include/diogenes.toplevel.inc.php:100
+msgid "Browse user log"
+msgstr "Afficher le journal"
+
+#: htdocs/toplevel/logger_actions.php:8 include/diogenes.toplevel.inc.php:205
+#: include/diogenes.toplevel.inc.php:100 include/diogenes.toplevel.inc.php:101
+msgid "Logger actions"
+msgstr "Actions logger"
+
+#: include/diogenes.page.inc.php:198 include/diogenes.page.inc.php:201
+#: include/diogenes.page.inc.php:197
+msgid "Diogenes error"
+msgstr "Erreur de Diogenes"
+
+#: include/diogenes.page.inc.php:199 include/diogenes.page.inc.php:202
+#: include/diogenes.page.inc.php:198
+msgid "Error"
+msgstr "Erreur"
+
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+#: include/diogenes/diogenes.logger-view.inc.php:336
+msgid "view session"
+msgstr "afficher la session"
+
+#: include/diogenes/diogenes.logger-view.inc.php:339
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+msgid "user's log"
+msgstr "voir le journal"
+
+#: htdocs/toplevel/logger.php:7
+msgid "User activity log"
+msgstr "Journal des événements"
+
+#: htdocs/toplevel/accounts.php:17 htdocs/toplevel/boot.php:32
+msgid "permissions"
+msgstr "permissions"
+
+#: htdocs/toplevel/accounts.php:19 htdocs/toplevel/admins.php:46
+msgid "view log"
+msgstr "voir le journal"
+
+#: htdocs/toplevel/admins.php:9
+msgid "administrator"
+msgstr "administrateur"
+
+#: htdocs/toplevel/admins.php:10 htdocs/toplevel/index.php:11
+#: include/admin/files.php:50 include/admin/menus.php:220
+#: include/admin/pages.php:21
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/admin/files.php:52 include/admin/menus.php:219
+#: include/admin/pages.php:25
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/admin/files.php:49 include/admin/menus.php:231
+#: include/diogenes/diogenes.logger-view.inc.php:374
+msgid "actions"
+msgstr "actions"
+
+#: htdocs/toplevel/admins.php:43
+msgid "site users"
+msgstr "utilisateurs du site"
+
+#: htdocs/toplevel/admins.php:44
+msgid "demote to user"
+msgstr "rétrograder"
+
+#: htdocs/toplevel/index.php:9 include/diogenes.barrel-editor.inc.php:151
+#: include/Barrel/Editor.php:158
+msgid "alias"
+msgstr "alias"
+
+#: htdocs/toplevel/index.php:13 include/admin/options.php:62
+#: include/admin/options.php:64 include/diogenes.barrel-editor.inc.php:154
+#: include/admin/options.php:66 include/Barrel/Editor.php:161
+msgid "keywords"
+msgstr "mots clés"
+
+#: htdocs/toplevel/index.php:14 include/diogenes.barrel-editor.inc.php:155
+#: include/Barrel/Editor.php:162
+msgid "Create a new site"
+msgstr "Créer un nouveau site"
+
+#: htdocs/toplevel/index.php:17 include/diogenes.barrel-editor.inc.php:158
+#: include/Barrel/Editor.php:166
+msgid "vhost (see note)"
+msgstr "vhost (voir notice)"
+
+#: htdocs/toplevel/index.php:19 include/diogenes.barrel-editor.inc.php:160
+#: include/Barrel/Editor.php:168
+msgid "flags"
+msgstr "drapeaux"
+
+#: htdocs/toplevel/index.php:86 include/diogenes.barrel-editor.inc.php:45
+#: include/Barrel/Editor.php:47
+msgid "admin"
+msgstr "admin"
+
+#: include/diogenes.admin.inc.php:65 include/diogenes.admin.inc.php:72
+#: include/diogenes.admin.inc.php:71
+msgid "Activity"
+msgstr "Activité"
+
+#: htdocs/toplevel/accounts.php:14 htdocs/toplevel/boot.php:29
+msgid "first name"
+msgstr "prénom"
+
+#: htdocs/toplevel/accounts.php:15 htdocs/toplevel/boot.php:30
+msgid "last name"
+msgstr "nom"
+
+#: include/admin/compose.php:16 include/admin/edit.php:15
+#: include/diogenes.admin.inc.php:44
+msgid "Directory not found"
+msgstr "Répertoire introuvable"
+
+#: include/admin/pages.php:19 include/admin/pages.php:23
+#: include/admin/files.php:57
+msgid "read access"
+msgstr "accès en lecture"
+
+#: include/admin/pages.php:20 include/admin/pages.php:24
+#: include/admin/files.php:58
+msgid "write access"
+msgstr "accès en écriture"
+
+#: include/admin/pages.php:83
+msgid "world-writable pages are not allowed with PHP execution enabled!"
+msgstr ""
+"il n'est pas possible de rendre une page publiquement modifiable avec "
+"l'exécution PHP activée !"
+
+#: include/diogenes.barrel.inc.php:314 include/diogenes.barrel.inc.php:345
+#: include/diogenes.barrel.inc.php:341
+msgid "Edit this page"
+msgstr "Éditer cette page"
+
+#: include/diogenes.barrel.inc.php:315 include/diogenes.barrel.inc.php:346
+#: include/diogenes.barrel.inc.php:342
+msgid "Raw editor"
+msgstr "Éditeur brut"
+
+#: htdocs/toplevel/options.php:90 htdocs/toplevel/options_expert.php:56
+msgid "Convert"
+msgstr "Convertir"
+
+#: htdocs/toplevel/options.php:95 htdocs/toplevel/options_expert.php:61
+msgid ""
+"You are currently using RCS as the version control system for your barrels."
+msgstr "Vous utilisez actuellement RCS pour gérer les versions de fichiers."
+
+#: htdocs/toplevel/options.php:96 htdocs/toplevel/options_expert.php:62
+msgid "You can switch to a full CVS repository by clicking here."
+msgstr "Vous pouvez passer à CVS en cliquant ici."
+
+#: htdocs/toplevel/options.php:100 htdocs/toplevel/options_expert.php:66
+msgid ""
+"You are currently using CVS as the version control system for your barrels."
+msgstr "Vous utilisez actuellement CVS pour gérer les versions de fichiers."
+
+#: htdocs/toplevel/options.php:101 htdocs/toplevel/options_expert.php:67
+msgid "You can switch back to RCS by clicking here."
+msgstr "Vous pouvez repasser à RCS en cliquant ici."
+
+#: include/admin/files.php:44 include/admin/files.php:46
+#: include/admin/files.php:43
+msgid "file"
+msgstr "fichier"
+
+#: include/admin/files.php:46 include/admin/files.php:48
+#: include/admin/files.php:45
+msgid "version"
+msgstr "version"
+
+#: include/admin/files.php:48 include/admin/files.php:50
+#: include/admin/files.php:47
+msgid "author"
+msgstr "auteur"
+
+#: include/admin/files.php:49 include/admin/files.php:51
+#: include/admin/files.php:48
+msgid "size"
+msgstr "taille"
+
+#: include/admin/pages.php:91 include/Barrel/Page.php:205
+#: include/Barrel/Page.php:248
+msgid "the page location cannot contain spaces or special characters"
+msgstr ""
+"l'emplacement de la page ne peut contenir ni espaces ni caractères spéciaux"
+
+#: include/admin/pages.php:95 include/Barrel/Page.php:212
+#: include/Barrel/Page.php:255
+msgid "this location cannot be used, it is reserved by Diogenes"
+msgstr "cet emplacement ne peut être utilisé, il est réservé par Diogenes"
+
+#: include/admin/files.php:45 include/admin/files.php:47
+#: include/admin/files.php:44
+msgid "log"
+msgstr "journal"
+
+#: include/admin/menus.php:145 include/admin/menus.php:146
+#: include/admin/menus.php:158
+msgid "entry title"
+msgstr "titre de l'entrée"
+
+#: include/admin/menus.php:146 include/admin/menus.php:147
+#: include/admin/menus.php:159
+msgid "type of link"
+msgstr "type de lien"
+
+#: include/admin/menus.php:218 include/admin/menus.php:217
+#: include/admin/menus.php:229
+msgid "menu name"
+msgstr "nom du menu"
+
+#: include/admin/menus.php:219 include/admin/menus.php:218
+#: include/admin/menus.php:230
+msgid "link"
+msgstr "lien"
+
+#: htdocs/toplevel/options.php:80 htdocs/toplevel/options_expert.php:8
+#: include/diogenes.toplevel.inc.php:201 htdocs/toplevel/options.php:43
+#: include/diogenes.toplevel.inc.php:95 include/diogenes.toplevel.inc.php:96
+msgid "Global options"
+msgstr "Options globales"
+
+msgid "menu options"
+msgstr "options des menus"
+
+#: htdocs/toplevel/options.php:83 include/admin/options.php:69
+#: htdocs/toplevel/options.php:46 include/admin/options.php:71
+#: include/admin/options.php:73
+msgid "menu style"
+msgstr "style du menu"
+
+#: htdocs/toplevel/options.php:84 include/admin/options.php:70
+#: htdocs/toplevel/options.php:47 include/admin/options.php:72
+#: include/admin/options.php:74
+msgid "menu theme"
+msgstr "thème du menu"
+
+#: htdocs/toplevel/options.php:91 htdocs/toplevel/options_expert.php:57
+msgid "version control system"
+msgstr "système de révision"
+
+#: include/admin/options.php:6 include/admin/options.php:7
+msgid "Site options"
+msgstr "Options du site"
+
+#: include/admin/options.php:55 include/admin/options.php:57
+#: include/admin/options.php:59
+msgid "fully expanded"
+msgstr "totalement déroulé"
+
+#: include/admin/options.php:71 include/admin/options.php:73
+#: include/admin/options.php:75
+msgid "minimum menu levels to expand"
+msgstr "nombre minimum de niveaux à afficher"
+
+#: include/diogenes.admin.inc.php:66 include/diogenes.admin.inc.php:73
+#: include/diogenes.admin.inc.php:72
+msgid "Options"
+msgstr "Options"
+
+#: include/admin/options.php:59 include/admin/options.php:61
+#: include/admin/options.php:63
+msgid "general options"
+msgstr "options générales"
+
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:365
+#: include/diogenes/diogenes.logger-view.inc.php:364
+msgid "session properties"
+msgstr "propriétés de la session"
+
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.logger-view.inc.php:367
+#: include/diogenes/diogenes.logger-view.inc.php:366
+msgid "host"
+msgstr "hôte"
+
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:367
+msgid "browser"
+msgstr "navigateur"
+
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:370
+msgid "data"
+msgstr "données"
+
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/diogenes/diogenes.logger-view.inc.php:371
+msgid "filter by"
+msgstr "filtrer par"
+
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.logger-view.inc.php:372
+msgid "start"
+msgstr "début"
+
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:373
+msgid "summary"
+msgstr "résumé"
+
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:375
+msgid "year"
+msgstr "année"
+
+#: include/diogenes/diogenes.logger-view.inc.php:380
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:376
+msgid "month"
+msgstr "mois"
+
+#: include/diogenes/diogenes.logger-view.inc.php:381
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/diogenes/diogenes.logger-view.inc.php:377
+msgid "day"
+msgstr "jour"
+
+#: include/diogenes/diogenes.table-editor.inc.php:525
+#: include/diogenes/diogenes.table-editor.inc.php:530
+msgid "id"
+msgstr "id"
+
+#: include/diogenes/diogenes.table-editor.inc.php:527
+#: include/diogenes/diogenes.table-editor.inc.php:532
+msgid "create"
+msgstr "créer"
+
+#: include/diogenes/diogenes.table-editor.inc.php:530
+#: include/diogenes/diogenes.table-editor.inc.php:535
+msgid "new entry"
+msgstr "nouvelle entrée"
+
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.table-editor.inc.php:536
+msgid "existing entry"
+msgstr "entrée existante"
+
+#: include/diogenes/diogenes.table-editor.inc.php:532
+#: include/diogenes/diogenes.table-editor.inc.php:537
+msgid "(blank = no change)"
+msgstr "(vide = ne pas changer)"
+
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes/diogenes.table-editor.inc.php:538
+msgid "back"
+msgstr "retour"
+
+#: include/diogenes/diogenes.table-editor.inc.php:535
+#: include/diogenes/diogenes.table-editor.inc.php:540
+msgid "You are about to delete this entry. Do you want to proceed?"
+msgstr ""
+"Vous êtes sur le point de supprimer cette entrée. Souhaitez-vous continuer?"
+
+#: include/diogenes.session.inc.php:62 include/diogenes.session.inc.php:71
+msgid "Authentication error!"
+msgstr "Erreur lors de l'authentification !"
+
+#: include/admin/files.php:84 include/admin/files.php:93
+#: include/admin/files.php:102 include/admin/pages.php:158
+#: include/admin/compose.php:57 include/admin/edit.php:49
+#: include/admin/files.php:114 include/admin/files.php:122
+#: include/admin/files.php:154 include/admin/pages.php:124
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/admin/plugins.php:23 include/admin/files.php:61
+#: include/admin/pages.php:122
+msgid "Page"
+msgstr "Page"
+
+#: include/admin/files.php:86 include/admin/files.php:95
+#: include/admin/pages.php:172 include/admin/compose.php:63
+#: include/admin/edit.php:55 include/admin/files.php:115
+#: include/admin/files.php:123 include/admin/pages.php:136
+#: include/admin/compose.php:62 include/admin/edit.php:54
+#: include/admin/files.php:122 include/admin/files.php:161
+#: include/admin/pages.php:123
+msgid "File"
+msgstr "Fichier"
+
+#: htdocs/toplevel/index.php:15 include/diogenes.barrel-editor.inc.php:156
+#: include/Barrel/Editor.php:163
+msgid "The site alias may only contain letters, numbers and underscores."
+msgstr ""
+"L'alias du site ne peut contenir que des lettres, des chiffres et des tirets "
+"bas."
+
+#: htdocs/toplevel/index.php:18 include/diogenes.barrel-editor.inc.php:159
+#: include/Barrel/Editor.php:167
+msgid ""
+"<b>vhost note</b>: If you intend to serve this site from a virtualhost, you "
+"should enter the name of the virtualhost in this field."
+msgstr ""
+"<b>note sur vhost</b> : Si vous comptez héberger ce site sur un virtualhost, "
+"il vous faut saisir dans ce champs le nom du virtualhost."
+
+#: htdocs/toplevel/index.php:55
+msgid "PHP execution"
+msgstr "exécution PHP"
+
+#: htdocs/toplevel/index.php:55 include/diogenes.barrel-editor.inc.php:106
+#: include/Barrel/Editor.php:113
+msgid "custom templates"
+msgstr "templates personnalisées"
+
+msgid "template options"
+msgstr "options des templates"
+
+#: htdocs/toplevel/options.php:85 include/admin/options.php:66
+#: htdocs/toplevel/options.php:48 include/admin/options.php:68
+#: include/admin/options.php:70
+msgid "templates directory"
+msgstr "répertoire des templates"
+
+#: htdocs/toplevel/options.php:86 include/admin/options.php:67
+#: htdocs/toplevel/options.php:49 include/admin/options.php:69
+#: include/admin/options.php:71
+msgid "default template"
+msgstr "template par défaut"
+
+#: include/admin/compose.php:56 include/admin/edit.php:46
+#: include/admin/compose.php:58 include/admin/edit.php:48
+msgid "log message"
+msgstr "message pour le log"
+
+#: include/admin/options.php:63 include/admin/options.php:65
+#: include/admin/options.php:67
+msgid "favicon"
+msgstr "favicon"
+
+#: include/admin/options.php:64 include/admin/options.php:66
+#: include/admin/options.php:68
+msgid "(relative url to a PNG image)"
+msgstr "(adresse relative de l'image PNG)"
+
+#: include/admin/pages.php:17 include/admin/files.php:57
+#: include/admin/pages.php:21 include/admin/files.php:54
+#: include/admin/pages.php:20
+msgid "page template"
+msgstr "template de la page"
+
+#: include/admin/pages.php:18 include/admin/files.php:58
+#: include/admin/pages.php:22 include/admin/files.php:55
+#: include/admin/pages.php:21
+msgid "status"
+msgstr "état"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "under construction"
+msgstr "en construction"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "disabled"
+msgstr "désactivée"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "archived"
+msgstr "archivée"
+
+#: include/diogenes.barrel.inc.php:152 include/diogenes.barrel.inc.php:153
+#: include/diogenes.barrel.inc.php:155
+msgid "This page is currently under construction."
+msgstr "Cette page est actuellement en construction."
+
+#: include/diogenes.barrel.inc.php:156 include/diogenes.barrel.inc.php:157
+#: include/diogenes.barrel.inc.php:159
+msgid "This page is currently unavailable."
+msgstr "Cette page n'est pas disponible actuellement."
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "http://diogenes-doc.polytechnique.org/en-admin/"
+msgstr "http://diogenes-doc.polytechnique.org/fr-admin/"
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "http://diogenes-doc.polytechnique.org/en-user/"
+msgstr "http://diogenes-doc.polytechnique.org/fr-user/"
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "http://diogenes-doc.polytechnique.org/en-root/"
+msgstr "http://diogenes-doc.polytechnique.org/fr-root/"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "Mode"
+msgstr "Mode"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "standard"
+msgstr "standard"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "expert"
+msgstr "expert"
+
+#: htdocs/toplevel/options.php:82 include/admin/options.php:65
+#: htdocs/toplevel/options.php:45 include/admin/options.php:67
+#: include/admin/options.php:69
+msgid "display options"
+msgstr "options d'affichage"
+
+#: htdocs/toplevel/options.php:87 htdocs/toplevel/options.php:50
+msgid "system options"
+msgstr "options système"
+
+msgid "Initial user setup"
+msgstr "Paramétrage d'un utilisateur initial"
+
+#: htdocs/toplevel/boot.php:11
+msgid ""
+"Sorry, this feature is only available using native Diogenes authentication."
+msgstr ""
+"Désolé, cette fonctionalité est disponible uniquement pour "
+"l'authentification native de Diogenes."
+
+#: htdocs/toplevel/boot.php:19
+msgid "The database is already configured."
+msgstr "La base de données est déjà configurée."
+
+#: htdocs/toplevel/options_expert.php:13 htdocs/toplevel/options_expert.php:75
+#: htdocs/toplevel/options_expert.php:76
+msgid "option"
+msgstr "option"
+
+#: htdocs/toplevel/options_expert.php:14 htdocs/toplevel/options_expert.php:76
+#: htdocs/toplevel/options_expert.php:77
+msgid "value"
+msgstr "valeur"
+
+#: include/admin/menus.php:221 include/admin/menus.php:220
+#: include/admin/menus.php:232
+msgid "Menu"
+msgstr "Menu"
+
+#: include/diogenes.page.inc.php:65 include/diogenes.page.inc.php:66
+msgid "debugging"
+msgstr "deboggage"
+
+#: include/diogenes.page.inc.php:66 include/diogenes.page.inc.php:67
+msgid "call trace"
+msgstr "appels de fonctions"
+
+#: include/diogenes.page.inc.php:67 include/diogenes.page.inc.php:68
+msgid "database trace"
+msgstr "appels base de données"
+
+#: include/diogenes/diogenes.logger-view.inc.php:59
+#: include/diogenes/diogenes.logger-view.inc.php:85
+#: include/diogenes/diogenes.logger-view.inc.php:130
+#: include/diogenes/diogenes.logger-view.inc.php:183
+#: include/diogenes/diogenes.logger-view.inc.php:58
+#: include/diogenes/diogenes.logger-view.inc.php:84
+#: include/diogenes/diogenes.logger-view.inc.php:129
+#: include/diogenes/diogenes.logger-view.inc.php:182
+msgid "all"
+msgstr "tous"
+
+#: include/diogenes/diogenes.logger-view.inc.php:363
+#: include/diogenes/diogenes.logger-view.inc.php:360
+#: include/diogenes/diogenes.logger-view.inc.php:359
+msgid "Please select a year and/or a user."
+msgstr "Veuillez sélectionner une année et/ou un utilisateur."
+
+#: include/diogenes/diogenes.table-editor.inc.php:523
+#: include/diogenes/diogenes.table-editor.inc.php:528
+msgid "previous page"
+msgstr "page précédente"
+
+#: include/diogenes/diogenes.table-editor.inc.php:524
+#: include/diogenes/diogenes.table-editor.inc.php:529
+msgid "next page"
+msgstr "page suivante"
+
+#: htdocs/toplevel/boot.php:7
+msgid "Initial setup"
+msgstr "Paramétrage initial"
+
+#: htdocs/toplevel/boot.php:46
+msgid "The initial setup of the database was performed successfuly."
+msgstr ""
+"Le paramétrage initial de la base de données a été effectué avec succès."
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "no"
+msgstr "non"
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "yes"
+msgstr "oui"
+
+#: include/admin/options.php:68 include/admin/options.php:70
+#: include/admin/options.php:72
+msgid "hide Diogenes menu"
+msgstr "cacher le menu Diogenes"
+
+#: include/admin/prefs.php:28
+msgid "account preferences"
+msgstr "préférences"
+
+#: htdocs/toplevel/plugins.php:19
+msgid "Barrel plugins"
+msgstr "Plugins du tonneau"
+
+#: htdocs/toplevel/plugins.php:21
+msgid "Global plugin settings"
+msgstr "Configuration globale des plugins"
+
+#: htdocs/toplevel/plugins.php:38
+#, php-format
+msgid "Rebuilding plugin cache for barrel '%s'"
+msgstr "Reconstruction du cache pour le tonneau '%s'"
+
+#: htdocs/toplevel/plugins.php:47
+msgid "Clean plugins database"
+msgstr "Nettoyage de la base de données des plugins"
+
+#: htdocs/toplevel/plugins.php:48
+msgid ""
+"If you are having problems with references to plugins that no longer exist, "
+"you can have Diogenes remove such entries from the database."
+msgstr ""
+"Si vous rencontrez des problèmes de références à des plugins qui n'existent "
+"plus, vous pouvez demander à Diogenes de supprimer ces références dans la "
+"base de données."
+
+#: htdocs/toplevel/plugins.php:49
+msgid "Clean"
+msgstr "Nettoyer"
+
+#: htdocs/toplevel/plugins.php:51
+msgid "Enable or disable plugins"
+msgstr "Active ou désactiver des plugins"
+
+#: htdocs/toplevel/plugins.php:54
+msgid "You can select the plugins you want to enable for this barrel."
+msgstr "Sélectionnez les plugins que vous voulez activer pour ce tonneau."
+
+#: htdocs/toplevel/plugins.php:56
+msgid ""
+"You can select the plugins you want to enable or disable globally, that is "
+"the plugins that can be used in the different barrels. Please note that for "
+"a plugin to be accessible from a barrel, you will need to activate that "
+"plugin for the barrel. To do this, from the <i>List of sites</i> click on "
+"'plugins' next to the barrel of your choice."
+msgstr ""
+"Sélectionnez les plugins que vous souhaitez activer ou désactiver de façon "
+"globale, c'est à dire que vous définissez la liste de plugins qui peuvent "
+"être utilisés dans les différents tonneaux. Veuillez noter que pour qu'un "
+"plugin soit accessible depuis un tonneau, il vous faudra activer ce plugin "
+"pour le tonneau. Pour ce faire, depuis la <i>List des sites</i>, cliquez sur "
+"'plugins' à côté du tonneau de votre choix."
+
+#: htdocs/toplevel/options.php:52
+msgid "Word document import"
+msgstr "Import d'un document Word"
+
+#: include/admin/files.php:39
+msgid "File operations"
+msgstr "Opérations sur les fichiers"
+
+#: include/admin/files.php:43 include/admin/files.php:40
+msgid "Create an empty file"
+msgstr "Créer un fichier vide"
+
+#: include/admin/files.php:44 include/admin/files.php:41
+msgid "Copy or move a file"
+msgstr "Copier ou déplacer un fichier"
+
+#: include/admin/files.php:45 include/admin/files.php:42
+msgid "Create"
+msgstr "Créer"
+
+#: include/admin/files.php:53 include/admin/files.php:50
+msgid "to"
+msgstr "vers"
+
+#: include/admin/files.php:59
+msgid "read"
+msgstr "lecture"
+
+#: include/admin/files.php:60
+msgid "write"
+msgstr "écriture"
+
+#: include/admin/files.php:67 include/admin/files.php:69
+msgid "Creating empty file"
+msgstr "Création d'un fichier vide"
+
+#: include/admin/files.php:69 include/admin/files.php:71
+msgid "The specified file already exists!"
+msgstr "Le fichier spécifié existe déjà!"
+
+#: include/admin/files.php:155 include/admin/pages.php:160
+#: include/admin/plugins.php:22 include/admin/files.php:194
+#: include/admin/pages.php:156 include/Barrel/Page.php:170
+msgid "home"
+msgstr "accueil"
+
+#: include/admin/files.php:182 include/admin/files.php:224
+msgid "Copy"
+msgstr "Copier"
+
+#: include/admin/files.php:182 include/admin/files.php:224
+msgid "Move"
+msgstr "Déplacer"
+
+#: include/admin/pages.php:18 include/admin/pages.php:17
+#: include/Barrel/Page.php:171
+msgid "parent page"
+msgstr "page parent"
+
+#: include/admin/webdav.php:7 include/diogenes.admin.inc.php:79
+#: include/diogenes.admin.inc.php:78
+msgid "WebDAV"
+msgstr "WebDAV"
+
+#: include/admin/webdav.php:9 include/admin/webdav.php:11
+msgid ""
+"You can access your barrel's files using WebDAV by pointing your WebDAV "
+"client to the following address."
+msgstr ""
+"Vous pouvez accéder aux fichiers de votre site par WebDAV en vous rendant à "
+"l'adresse suivante."
+
+#: include/admin/plugins.php:22
+msgid "Page plugins "
+msgstr "Plugins de la page"
+
+#: include/admin/plugins.php:26
+msgid "Available plugins"
+msgstr "Plugins disponibles"
+
+#: include/diogenes.page.inc.php:69 include/diogenes.barrel-editor.inc.php:50
+#: include/diogenes.barrel-editor.inc.php:106 include/Barrel/Page.php:126
+#: include/Barrel/Page.php:152 include/diogenes.plugin-editor.inc.php:237
+#: include/Barrel/Page.php:150 include/Barrel/Page.php:178
+#: include/Barrel/Editor.php:52 include/Barrel/Editor.php:113
+#: include/Plugin/Editor.php:266 include/diogenes.page.inc.php:68
+msgid "plugins"
+msgstr "plugins"
+
+#: include/diogenes.toplevel.inc.php:96 include/diogenes.admin.inc.php:76
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:75
+msgid "Plugins"
+msgstr "Plugins"
+
+#: include/Barrel/Page.php:70 include/Barrel/Page.php:89
+msgid "Not deleting page, it has child pages!"
+msgstr "Impossible de supprimer la page, elle comporte des sous-pages."
+
+#: include/Barrel/File.php:76 include/Barrel/File.php:94
+msgid "rename"
+msgstr "renommer"
+
+#: include/diogenes.plugin-editor.inc.php:236 include/Plugin/Editor.php:265
+msgid "plugin"
+msgstr "plugin"
+
+#: include/diogenes.plugin-editor.inc.php:239 include/Plugin/Editor.php:268
+msgid "parameters"
+msgstr "paramètres"
+
+#: include/admin/files.php:192
+msgid "Document"
+msgstr "Document"
+
+#: include/admin/index.php:52
+msgid "barrel options"
+msgstr "options du tonneau"
+
+#: include/admin/index.php:57
+msgid "barrel plugins"
+msgstr "plugins du tonneau"
+
+#: include/admin/index.php:68
+msgid "page removed"
+msgstr "page supprimée"
+
+#: include/admin/index.php:80
+msgid "page plugins"
+msgstr "plugins de la page"
+
+#: include/admin/index.php:92
+msgid "file deleted"
+msgstr "page supprimée"
+
+#: include/admin/webdav.php:14
+msgid ""
+"In order to access your barrel's files using WebDAV, please ask your "
+"Diogenes administrator to enable this feature in the Diogenes configuration "
+"file."
+msgstr ""
+"Pour accéder aux fichiers de votre tonneau grâce à WebDAV, veuillez demander "
+"à votre administrateur de Diogenes d'activer cette fonctionalité dans la "
+"configuration de Diogenes."
+
+#: include/Barrel/Page.php:81
+msgid "Deleting page"
+msgstr "Suppression du fichier"
+
+#: include/Barrel/Page.php:176
+msgid "add a page"
+msgstr "ajouter une page"
+
+#: include/Barrel/Page.php:266
+msgid "Creating new page"
+msgstr "Création d'une nouvelle page"
+
+#: include/Barrel/Editor.php:165
+msgid "no barrels available"
+msgstr "pas de tonneaux disponibles"
+
+#: htdocs/toplevel/index.php:13
+msgid ""
+"Warning : in order to make use of virtual hosts or WebDAV, you need to set "
+"$globals->rooturl to a full URL starting with http:// or https:// in your "
+"Diogenes configuration file."
+msgstr ""
+"Attention : pour utiliser les fonctionalités de serveurs virtuels ou de "
+"WebDAV, $globals->rooturl doit être une URL complete commen_ant par http:// "
+"ou https:// dans votre fichier de configuration de Diogenes."
+
+#~ msgid "Warning"
+#~ msgstr "Avertissement"
+
+#~ msgid ""
+#~ "in order to make use of virtual hosts or WebDAV, you need to set $globals-"
+#~ ">rooturl to a full URL starting with http:// or https:// in your Diogenes "
+#~ "configuration file."
+#~ msgstr ""
+#~ "pour utiliser les fonctionalités de serveurs virtuels ou de WebDAV, "
+#~ "$globals->rooturl doit être une URL complete commen_ant par http:// ou "
+#~ "https:// dans votre fichier de configuration de Diogenes."
--- /dev/null
+# translation of nl.po to English
+# translation of nl.po to
+# Dutch translations for Diogenes package.
+# Copyright (C) 2004 Jeremy Lainé
+# This file is distributed under the same license as the Diogenes package.
+# Michiel Alkemade <dropthestuff@hotmail.com>, 2004.
+# Jeremy Lainé <jeremy.laine@m4x.org>, 2004, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: nl\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-01-07 16:41+0100\n"
+"PO-Revision-Date: 2006-01-10 07:50+0100\n"
+"Last-Translator: Jeremy Lainé <jeremy.laine@m4x.org>\n"
+"Language-Team: English\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.9.1\n"
+
+#: htdocs/index.php:9
+#: htdocs/index.php:13
+#: include/admin/bad.php:46
+msgid "Welcome to Diogenes"
+msgstr "Welkom bij Diogenes"
+
+#: htdocs/index.php:11
+#: htdocs/index.php:15
+msgid "Welcome to the Diogenes content management system."
+msgstr "Welkom bij het Diogenes Content Management Systeem."
+
+#: htdocs/index.php:12
+#: htdocs/index.php:16
+msgid "Diogenes was developed by the webmasters of the Polytechnique.org web site."
+msgstr "Diogenes is ontwikkeld door de webmasters van Polytechnique.org."
+
+#: htdocs/index.php:13
+#: htdocs/index.php:17
+msgid "The following barrels are currently available"
+msgstr "De volgende barrels zijn momenteel beschikbaar"
+
+#: htdocs/index.php:14
+#: htdocs/toplevel/admins.php:8
+#: include/diogenes.barrel-editor.inc.php:152
+#: include/Barrel/Editor.php:159
+msgid "site"
+msgstr "site"
+
+#: htdocs/index.php:15
+#: htdocs/toplevel/index.php:12
+#: htdocs/toplevel/logger_actions.php:14
+#: include/admin/options.php:61
+#: include/admin/options.php:63
+#: include/diogenes.barrel-editor.inc.php:153
+#: include/diogenes.plugin-editor.inc.php:238
+#: include/admin/options.php:65
+#: include/Barrel/Editor.php:160
+#: include/Plugin/Editor.php:267
+msgid "description"
+msgstr "beschrijving"
+
+#: htdocs/prefs.php:19
+msgid "Changing password.."
+msgstr "Bezig wachtwoord te veranderen.."
+
+#: htdocs/prefs.php:33
+#: include/admin/prefs.php:20
+msgid "User preferences"
+msgstr "Gebruikersvoorkeuren"
+
+#: htdocs/prefs.php:34
+#: include/admin/prefs.php:21
+msgid "Diogenes preferences"
+msgstr "Diogenes voorkeuren"
+
+#: htdocs/prefs.php:36
+msgid "my information"
+msgstr "mijn informatie"
+
+#: htdocs/prefs.php:37
+#: htdocs/toplevel/accounts.php:13
+#: htdocs/toplevel/boot.php:28
+#: include/diogenes.session.inc.php:138
+msgid "username"
+msgstr "gebruikersnaam"
+
+#: htdocs/prefs.php:38
+msgid "full name"
+msgstr "volledige naam"
+
+#: htdocs/prefs.php:40
+#: include/admin/prefs.php:23
+msgid "language"
+msgstr "taal"
+
+#: htdocs/prefs.php:41
+#: include/admin/prefs.php:24
+msgid "You can select your preferred language by clicking on the appropriate language below."
+msgstr "Je kan een voorkeurstaal selecteren door de gewenste taal hieronder aan te klikken."
+
+#: htdocs/prefs.php:43
+msgid "my password"
+msgstr "mijn wachtwoord"
+
+#: htdocs/prefs.php:44
+msgid "new password"
+msgstr "nieuw wachtwoord"
+
+#: htdocs/prefs.php:45
+msgid "confirmation"
+msgstr "bevestiging"
+
+#: htdocs/prefs.php:47
+#: include/admin/prefs.php:26
+msgid "Change"
+msgstr "Veranderen"
+
+#: include/admin/compose.php:32
+#: include/admin/edit.php:31
+#: include/admin/compose.php:34
+#: include/admin/edit.php:33
+msgid "Commiting changes to file"
+msgstr "Veranderingen aan file aan het doorvoeren"
+
+#: include/admin/edit.php:41
+#: include/admin/edit.php:43
+msgid "File editor"
+msgstr "Bestands editor"
+
+#: include/admin/edit.php:45
+#: include/admin/edit.php:47
+msgid "File source"
+msgstr "Bestands locatie"
+
+#: htdocs/toplevel/index.php:16
+#: htdocs/toplevel/options.php:89
+#: include/admin/menus.php:151
+#: include/admin/options.php:72
+#: include/admin/pages.php:12
+#: include/admin/edit.php:48
+#: include/diogenes.session.inc.php:137
+#: include/diogenes/diogenes.logger-view.inc.php:382
+#: include/diogenes/diogenes.table-editor.inc.php:536
+#: htdocs/toplevel/options.php:53
+#: include/admin/files.php:41
+#: include/admin/menus.php:152
+#: include/admin/options.php:74
+#: include/admin/pages.php:15
+#: include/admin/edit.php:50
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.table-editor.inc.php:541
+#: include/diogenes.barrel-editor.inc.php:157
+#: include/diogenes.plugin-editor.inc.php:235
+#: include/admin/files.php:38
+#: include/admin/menus.php:164
+#: include/admin/options.php:76
+#: include/admin/pages.php:14
+#: include/Barrel/Editor.php:164
+#: include/Plugin/Editor.php:264
+#: include/diogenes/diogenes.logger-view.inc.php:378
+msgid "Submit"
+msgstr "Bevestigen"
+
+#: include/admin/files.php:27
+#: include/admin/pages.php:152
+#: include/admin/compose.php:58
+#: include/admin/edit.php:50
+#: include/Barrel/Page.php:143
+msgid "pages catalog"
+msgstr "pagina catalogus"
+
+#: include/admin/files.php:28
+#: include/admin/pages.php:154
+#: include/admin/compose.php:59
+#: include/admin/edit.php:51
+#: include/Barrel/Page.php:147
+#: include/admin/index.php:74
+#: include/Barrel/Page.php:174
+msgid "page properties"
+msgstr "pagina-eigenschappen"
+
+#: include/admin/files.php:29
+#: include/admin/pages.php:155
+#: include/admin/compose.php:60
+#: include/admin/edit.php:52
+#: include/diogenes.rcs.inc.php:452
+#: include/diogenes.rcs.inc.php:621
+#: include/Barrel/Page.php:148
+#: include/admin/files.php:146
+#: include/Barrel/Page.php:175
+msgid "view page"
+msgstr "pagina tonen"
+
+#: include/admin/files.php:83
+#: include/admin/files.php:92
+#: include/admin/files.php:101
+#: include/admin/pages.php:156
+#: include/admin/compose.php:61
+#: include/admin/edit.php:53
+#: include/Barrel/Page.php:149
+#: include/Barrel/Page.php:173
+msgid "browse files"
+msgstr "bestanden doorbladeren"
+
+#: include/admin/files.php:35
+#: include/admin/pages.php:167
+#: include/admin/compose.php:64
+#: include/admin/edit.php:56
+#: include/admin/pages.php:132
+#: include/Barrel/File.php:94
+#: include/Barrel/File.php:114
+msgid "raw editor"
+msgstr "raw editor"
+
+#: htdocs/toplevel/options.php:88
+#: include/admin/files.php:36
+#: include/admin/pages.php:168
+#: include/admin/compose.php:65
+#: include/admin/edit.php:57
+#: include/diogenes.barrel.inc.php:316
+#: htdocs/toplevel/options.php:51
+#: include/admin/pages.php:133
+#: include/diogenes.barrel.inc.php:347
+#: include/Barrel/File.php:95
+#: include/Barrel/File.php:115
+#: include/diogenes.barrel.inc.php:343
+msgid "HTML editor"
+msgstr "HTML editor"
+
+#: include/admin/files.php:85
+#: include/admin/files.php:94
+#: include/admin/pages.php:163
+#: include/admin/pages.php:170
+#: include/admin/compose.php:66
+#: include/admin/edit.php:58
+#: include/admin/pages.php:129
+#: include/admin/pages.php:134
+#: include/Barrel/File.php:97
+#: include/Barrel/File.php:117
+msgid "file revisions"
+msgstr "bestandsrevisies"
+
+msgid "Ekit"
+msgstr "Ekit"
+
+#: include/admin/menus.php:36
+#: include/admin/menus.php:37
+msgid "The site's menus"
+msgstr "Menu opbouw van de site"
+
+#: include/admin/menus.php:44
+#: include/admin/menus.php:45
+msgid "The selected menu has child items, please remove them first."
+msgstr "Het geselecteerde menu item heeft onderliggende items, verwijder deze eerst."
+
+#: include/admin/menus.php:144
+#: include/admin/menus.php:145
+#: include/admin/menus.php:157
+msgid "menu entry properties"
+msgstr "eigenschappen van menu ingang"
+
+#: include/admin/menus.php:147
+#: include/admin/menus.php:148
+#: include/admin/menus.php:160
+msgid "none"
+msgstr "geen"
+
+#: include/admin/menus.php:148
+#: include/admin/menus.php:149
+#: include/admin/menus.php:161
+msgid "internal link"
+msgstr "intern koppeling"
+
+#: include/admin/menus.php:149
+#: include/admin/menus.php:150
+#: include/admin/menus.php:162
+msgid "external link"
+msgstr "extern koppeling"
+
+#: include/admin/menus.php:173
+#: include/diogenes.plugin-editor.inc.php:240
+#: include/admin/menus.php:185
+#: include/Plugin/Editor.php:269
+msgid "move up"
+msgstr "naar boven"
+
+#: include/admin/menus.php:176
+#: include/diogenes.plugin-editor.inc.php:241
+#: include/admin/menus.php:188
+#: include/Plugin/Editor.php:270
+msgid "move down"
+msgstr "naar beneden"
+
+#: htdocs/toplevel/index.php:85
+#: include/admin/menus.php:178
+#: include/diogenes.rcs.inc.php:417
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#: include/diogenes/diogenes.table-editor.inc.php:534
+#: include/diogenes.barrel-editor.inc.php:43
+#: include/Barrel/Page.php:119
+#: include/Barrel/File.php:74
+#: include/admin/menus.php:190
+#: include/Barrel/File.php:92
+#: include/Barrel/Page.php:143
+#: include/Barrel/Editor.php:45
+msgid "edit"
+msgstr "bewerken"
+
+#: htdocs/toplevel/index.php:87
+#: include/admin/menus.php:179
+#: include/admin/pages.php:202
+#: include/diogenes.rcs.inc.php:419
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes.barrel-editor.inc.php:52
+#: include/Barrel/Page.php:129
+#: include/Barrel/File.php:77
+#: include/admin/menus.php:191
+#: include/Barrel/File.php:95
+#: include/Barrel/Page.php:153
+#: include/Barrel/Editor.php:54
+msgid "delete"
+msgstr "verwijderen"
+
+#: include/admin/menus.php:217
+#: include/admin/menus.php:216
+#: include/admin/menus.php:228
+msgid "External links are denoted with the [ext] prefix."
+msgstr "Externe koppelingen beginnen met het voorvoegsel [ext]."
+
+#: include/admin/menus.php:222
+#: include/admin/menus.php:221
+#: include/admin/menus.php:233
+msgid "Add new entry"
+msgstr "Nieuwe ingang toevoegen"
+
+#: include/admin/files.php:63
+#: include/admin/files.php:86
+#: include/admin/files.php:88
+msgid "Error during file transfer!"
+msgstr "Fout bij het verzenden van het bestand!"
+
+#: include/admin/files.php:69
+#: include/admin/files.php:92
+#: include/admin/files.php:94
+msgid "Deleting file"
+msgstr "Bezig met verwijderen van bestand"
+
+#: include/admin/files.php:81
+#: include/admin/files.php:112
+#: include/admin/files.php:120
+msgid "Revision differences"
+msgstr "Verschillen tussen revisies"
+
+#: include/admin/files.php:90
+#: include/admin/files.php:120
+#: include/admin/files.php:128
+msgid "File revisions"
+msgstr "Bestandsrevisies"
+
+#: include/admin/files.php:103
+#: include/admin/files.php:155
+#: include/admin/files.php:194
+msgid "File manager"
+msgstr "Bestandmanager"
+
+#: include/admin/files.php:40
+#: include/admin/files.php:38
+msgid "Files in current directory"
+msgstr "Bestanden in huidige map"
+
+#: include/admin/files.php:41
+#: include/admin/files.php:40
+#: include/admin/files.php:37
+msgid "Import file"
+msgstr "Bestand importeren"
+
+#: include/admin/files.php:42
+#: include/admin/pages.php:210
+#: include/admin/pages.php:191
+#: include/admin/files.php:39
+#: include/admin/pages.php:163
+msgid "Send"
+msgstr "Verzenden"
+
+#: include/admin/files.php:43
+msgid "File to upload"
+msgstr "Te verzenden bestand"
+
+#: include/admin/index.php:20
+#: include/admin/index.php:45
+#: include/admin/index.php:47
+msgid "site created"
+msgstr "site angemaakt"
+
+#: include/admin/index.php:23
+#: include/admin/index.php:50
+#: include/admin/index.php:63
+msgid "page created"
+msgstr "pagina angemaakt"
+
+#: include/admin/index.php:26
+#: include/admin/index.php:54
+msgid "page deleted"
+msgstr "pagina verwijdert"
+
+#: include/admin/index.php:31
+#: include/admin/index.php:59
+#: include/admin/index.php:86
+msgid "file updated"
+msgstr "bestand bijgewerkt"
+
+#: include/admin/index.php:34
+#: include/admin/index.php:64
+msgid "file removed"
+msgstr "bestand verwijderd"
+
+#: include/admin/index.php:43
+#: include/admin/index.php:77
+#: include/admin/index.php:105
+msgid "Welcome to the Diogenes backoffice"
+msgstr "Welkom bij het Diogenes backoffice"
+
+#: include/admin/files.php:47
+#: include/admin/index.php:44
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/admin/files.php:49
+#: include/admin/index.php:78
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/files.php:46
+#: include/admin/index.php:106
+#: include/diogenes/diogenes.logger-view.inc.php:368
+msgid "date"
+msgstr "datum"
+
+#: include/admin/index.php:45
+#: include/admin/users.php:28
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/index.php:79
+#: include/diogenes/diogenes.logger-view.inc.php:366
+#: include/admin/index.php:107
+#: include/diogenes/diogenes.logger-view.inc.php:365
+msgid "user"
+msgstr "gebruiker"
+
+#: include/admin/index.php:46
+#: include/admin/index.php:80
+#: include/admin/index.php:108
+msgid "event"
+msgstr "gebeurtenis"
+
+#: include/admin/pages.php:11
+#: include/admin/pages.php:14
+#: include/admin/pages.php:158
+msgid "Page manager"
+msgstr "Paginabeheer"
+
+#: include/admin/pages.php:13
+#: include/admin/pages.php:16
+#: include/admin/pages.php:15
+msgid "Reset"
+msgstr "Terugzetten"
+
+#: include/admin/pages.php:14
+#: include/diogenes.barrel.inc.php:312
+#: include/admin/pages.php:17
+#: include/diogenes.barrel.inc.php:343
+#: include/admin/pages.php:16
+#: include/diogenes.barrel.inc.php:339
+msgid "Page properties"
+msgstr "Pagina-eigenschappen"
+
+#: include/admin/pages.php:15
+#: include/admin/files.php:55
+#: include/admin/pages.php:19
+#: include/admin/files.php:52
+#: include/admin/pages.php:18
+msgid "location"
+msgstr "locatie"
+
+#: htdocs/toplevel/index.php:10
+#: htdocs/toplevel/logger_actions.php:13
+#: include/admin/options.php:60
+#: include/admin/pages.php:16
+#: include/admin/files.php:56
+#: include/admin/options.php:62
+#: include/admin/pages.php:20
+#: include/admin/files.php:53
+#: include/admin/options.php:64
+#: include/admin/pages.php:19
+msgid "title"
+msgstr "titel"
+
+msgid "display"
+msgstr "tonen"
+
+#: include/admin/files.php:56
+#: include/admin/pages.php:22
+msgid "access"
+msgstr "toegang"
+
+#: include/admin/pages.php:22
+#: include/admin/pages.php:26
+msgid "Add a page"
+msgstr "Pagina toevoegen"
+
+#: include/admin/pages.php:43
+#: include/admin/pages.php:47
+#: include/admin/pages.php:50
+msgid "Document name does not end in .doc"
+msgstr "Dit document heeft geen .doc exensie"
+
+#: include/admin/pages.php:46
+#: include/admin/pages.php:50
+#: include/admin/pages.php:53
+msgid "Checking in Word file"
+msgstr "Controleren in Word document"
+
+#: include/admin/pages.php:51
+#: include/admin/pages.php:55
+#: include/admin/pages.php:58
+msgid "Importing Word file"
+msgstr "Bezig Word bestand te importeren"
+
+#: include/admin/pages.php:57
+#: include/admin/pages.php:61
+#: include/admin/pages.php:64
+msgid "Importing HTML file"
+msgstr "Bezig HTML file te importeren"
+
+#: include/admin/pages.php:62
+#: include/admin/pages.php:66
+#: include/admin/pages.php:69
+msgid "Raw file import"
+msgstr "Raw file importeren"
+
+#: include/admin/pages.php:184
+#: include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "visible"
+msgstr "zichtbaar"
+
+msgid "invisible"
+msgstr "onzichtbaar"
+
+#: htdocs/toplevel/index.php:84
+#: include/admin/pages.php:196
+#: include/diogenes.rcs.inc.php:416
+#: include/diogenes.rcs.inc.php:450
+#: include/diogenes.rcs.inc.php:619
+#: include/Barrel/Page.php:118
+#: include/Barrel/File.php:73
+#: include/admin/files.php:144
+#: include/Barrel/File.php:91
+#: include/Barrel/Page.php:142
+msgid "view"
+msgstr "tonen"
+
+#: include/admin/pages.php:197
+#: include/Barrel/Page.php:120
+#: include/Barrel/Page.php:144
+msgid "properties"
+msgstr "eigenschappen"
+
+#: include/admin/pages.php:198
+msgid "files"
+msgstr "bestanden"
+
+#: include/admin/pages.php:199
+#: include/diogenes.rcs.inc.php:418
+#: include/Barrel/Page.php:121
+#: include/Barrel/File.php:75
+#: include/Barrel/File.php:93
+#: include/Barrel/Page.php:145
+msgid "revisions"
+msgstr "revisies"
+
+#: include/admin/pages.php:211
+#: include/admin/pages.php:195
+#: include/admin/pages.php:172
+msgid "Import a Word document"
+msgstr "Importeer een Word document"
+
+#: include/admin/pages.php:214
+#: include/admin/pages.php:198
+#: include/admin/pages.php:176
+msgid "This page's master document is currently a Word document."
+msgstr "Het master document van deze pagina is op een Word document."
+
+#: include/admin/pages.php:215
+#: include/admin/pages.php:199
+#: include/admin/pages.php:177
+msgid "You can upload a new version of the Word document below."
+msgstr "Upload een nieuwe versie van het Word document hieronder."
+
+#: include/admin/pages.php:216
+#: include/admin/pages.php:200
+#: include/admin/pages.php:178
+msgid "You can get the current version of the file here"
+msgstr "Haal hier de huidige versie van het bestand op"
+
+#: include/admin/pages.php:219
+#: include/admin/pages.php:203
+#: include/admin/pages.php:181
+msgid "If you wish, you can set this page's content from a Word document."
+msgstr "Indien gewenst kan de content uit een Word document worden overgenomen."
+
+#: include/admin/pages.php:220
+#: include/admin/pages.php:204
+#: include/admin/pages.php:182
+msgid "To do so, simply upload the Word document below."
+msgstr "Om dit te doen, upload het Word document hier beneden."
+
+#: include/admin/pages.php:222
+#: include/admin/pages.php:208
+#: include/admin/pages.php:160
+msgid "Import HTML"
+msgstr "Importeer HTML"
+
+#: include/admin/pages.php:223
+#: include/admin/pages.php:209
+#: include/admin/pages.php:161
+msgid "You can replace the current page's contents by uploading an HTML file below."
+msgstr "Vervang de huidige content in de pagina door onderstaand een HTML bestand te uploaden."
+
+#: include/admin/pages.php:224
+#: include/admin/pages.php:210
+#: include/admin/pages.php:162
+msgid "If the file name ends with .htm or .html, anything outside the <body></body> pair will be stripped."
+msgstr "Indien de bestandsnaam eindigt op .htm of .html, alles buiten de <body></body> zal worden verwijdert."
+
+#: htdocs/toplevel/admins.php:20
+#: include/admin/users.php:15
+msgid "Could not find requested user"
+msgstr "Registreerde gebruiker is niet te vinden"
+
+#: include/admin/users.php:24
+msgid "Users administration"
+msgstr "Gebruikersbeheer"
+
+#: include/admin/users.php:25
+msgid "Registered users"
+msgstr "Registreerde gebruikers"
+
+#: include/admin/users.php:26
+#: include/diogenes.toplevel.inc.php:200
+#: include/diogenes.toplevel.inc.php:94
+#: include/diogenes.toplevel.inc.php:95
+msgid "Administrators"
+msgstr "Administratoren"
+
+#: include/admin/users.php:29
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.table-editor.inc.php:526
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.logger-view.inc.php:369
+msgid "action"
+msgstr "actie"
+
+#: htdocs/toplevel/admins.php:45
+#: include/admin/users.php:35
+msgid "remove"
+msgstr "verwijderen"
+
+#: include/diogenes.session.inc.php:134
+msgid "Diogenes login"
+msgstr "Diogenes login"
+
+#: include/diogenes.session.inc.php:135
+msgid "Connexion"
+msgstr "Verbinding"
+
+#: htdocs/toplevel/accounts.php:16
+#: htdocs/toplevel/boot.php:31
+#: include/diogenes.session.inc.php:136
+msgid "password"
+msgstr "wachtwoord"
+
+#: include/diogenes.toplevel.inc.php:52
+#: include/diogenes.barrel.inc.php:104
+#: include/diogenes.barrel.inc.php:105
+#: include/diogenes.toplevel.inc.php:53
+#: include/diogenes.barrel.inc.php:107
+msgid "You are not authorized to view this page!"
+msgstr "Je bent niet geautoriseerd om deze pagina te bekijken!"
+
+#: include/diogenes.toplevel.inc.php:38
+#: include/diogenes.toplevel.inc.php:187
+#: include/diogenes.admin.inc.php:62
+#: include/diogenes.barrel.inc.php:301
+#: include/diogenes.toplevel.inc.php:81
+#: include/diogenes.barrel.inc.php:332
+#: include/diogenes.admin.inc.php:69
+#: include/diogenes.toplevel.inc.php:39
+#: include/diogenes.toplevel.inc.php:82
+#: include/diogenes.admin.inc.php:68
+#: include/diogenes.barrel.inc.php:328
+msgid "Home"
+msgstr "Home"
+
+#: include/diogenes.toplevel.inc.php:192
+#: include/diogenes.barrel.inc.php:303
+#: include/diogenes.toplevel.inc.php:86
+#: include/diogenes.barrel.inc.php:334
+#: include/diogenes.toplevel.inc.php:87
+#: include/diogenes.barrel.inc.php:330
+msgid "Logout"
+msgstr "Afmelden"
+
+#: include/diogenes.toplevel.inc.php:194
+#: include/diogenes.barrel.inc.php:306
+#: include/diogenes.toplevel.inc.php:88
+#: include/diogenes.barrel.inc.php:337
+#: include/diogenes.toplevel.inc.php:89
+#: include/diogenes.barrel.inc.php:333
+msgid "Login"
+msgstr "Aanmelden"
+
+#: include/diogenes.admin.inc.php:37
+#: include/diogenes.admin.inc.php:64
+#: include/diogenes.barrel.inc.php:310
+#: include/diogenes.barrel.inc.php:341
+#: include/diogenes.admin.inc.php:71
+#: include/diogenes.admin.inc.php:70
+#: include/diogenes.barrel.inc.php:337
+msgid "Administration"
+msgstr "Beheer"
+
+#: include/diogenes.rcs.inc.php:455
+#: include/diogenes.rcs.inc.php:624
+#: include/admin/files.php:149
+msgid "diff to"
+msgstr "diff to"
+
+#: include/diogenes.rcs.inc.php:459
+#: include/diogenes.rcs.inc.php:628
+#: include/admin/files.php:153
+msgid "restore"
+msgstr "herstellen"
+
+#: include/diogenes.admin.inc.php:63
+#: include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "Admin manual"
+msgstr "Admin handleiding"
+
+msgid "Settings"
+msgstr "Instellingen"
+
+#: include/diogenes.toplevel.inc.php:202
+#: include/diogenes.admin.inc.php:67
+#: include/diogenes.toplevel.inc.php:97
+#: include/diogenes.admin.inc.php:78
+#: include/diogenes.toplevel.inc.php:98
+#: include/diogenes.admin.inc.php:77
+msgid "Users"
+msgstr "Gebruikers"
+
+#: include/diogenes.admin.inc.php:68
+#: include/diogenes.admin.inc.php:80
+#: include/diogenes.admin.inc.php:79
+msgid "Content"
+msgstr "Inhoud"
+
+#: include/diogenes.admin.inc.php:69
+#: include/diogenes.admin.inc.php:81
+#: include/diogenes.admin.inc.php:80
+msgid "Pages catalog"
+msgstr "Paginacatalogus"
+
+#: include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:82
+#: include/diogenes.admin.inc.php:81
+msgid "Edit style sheet"
+msgstr "Stijlblad bewerken"
+
+#: include/diogenes.admin.inc.php:71
+#: include/diogenes.admin.inc.php:83
+#: include/diogenes.admin.inc.php:82
+msgid "Edit menu"
+msgstr "Menu bewerken"
+
+#: include/diogenes.toplevel.inc.php:38
+#: include/diogenes.toplevel.inc.php:39
+msgid "Toplevel administration"
+msgstr "Topniveau beheer"
+
+#: include/diogenes.page.inc.php:59
+msgid "Powered by Diogenes"
+msgstr "Powered by Diogenes"
+
+#: include/diogenes.page.inc.php:213
+#: include/diogenes.page.inc.php:216
+#: include/diogenes.page.inc.php:212
+msgid "The requested document was not found."
+msgstr "Het gevraagde document werd niet gevonden."
+
+#: include/diogenes.toplevel.inc.php:188
+#: include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "User manual"
+msgstr "Handleiding"
+
+#: include/diogenes.toplevel.inc.php:191
+#: include/diogenes.barrel.inc.php:304
+#: include/diogenes.toplevel.inc.php:85
+#: include/diogenes.barrel.inc.php:335
+#: include/diogenes.toplevel.inc.php:86
+#: include/diogenes.barrel.inc.php:331
+msgid "Preferences"
+msgstr "Voorkeuren"
+
+#: include/diogenes.toplevel.inc.php:197
+#: include/diogenes.toplevel.inc.php:91
+#: include/diogenes.toplevel.inc.php:92
+msgid "Sites"
+msgstr "Websites"
+
+#: include/diogenes.toplevel.inc.php:198
+#: include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "Root manual"
+msgstr "Root handleiding"
+
+#: htdocs/toplevel/index.php:8
+#: include/diogenes.toplevel.inc.php:199
+#: htdocs/toplevel/index.php:11
+#: include/diogenes.toplevel.inc.php:93
+#: htdocs/toplevel/index.php:16
+#: include/diogenes.toplevel.inc.php:94
+msgid "List of sites"
+msgstr "Lijst met websites"
+
+#: htdocs/toplevel/admins.php:7
+msgid "Site administrators"
+msgstr "Website administratoren"
+
+#: htdocs/toplevel/accounts.php:7
+#: include/diogenes.toplevel.inc.php:203
+#: include/diogenes.toplevel.inc.php:98
+#: include/diogenes.toplevel.inc.php:99
+msgid "User accounts"
+msgstr "Accounts"
+
+#: include/diogenes.toplevel.inc.php:204
+#: include/diogenes.toplevel.inc.php:99
+#: include/diogenes.toplevel.inc.php:100
+msgid "Browse user log"
+msgstr "Log bladeren"
+
+#: htdocs/toplevel/logger_actions.php:8
+#: include/diogenes.toplevel.inc.php:205
+#: include/diogenes.toplevel.inc.php:100
+#: include/diogenes.toplevel.inc.php:101
+msgid "Logger actions"
+msgstr "Logger acties"
+
+#: include/diogenes.page.inc.php:198
+#: include/diogenes.page.inc.php:201
+#: include/diogenes.page.inc.php:197
+msgid "Diogenes error"
+msgstr "Diogenes fout"
+
+#: include/diogenes.page.inc.php:199
+#: include/diogenes.page.inc.php:202
+#: include/diogenes.page.inc.php:198
+msgid "Error"
+msgstr "Fout"
+
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+#: include/diogenes/diogenes.logger-view.inc.php:336
+msgid "view session"
+msgstr "bekijk sessie"
+
+#: include/diogenes/diogenes.logger-view.inc.php:339
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+msgid "user's log"
+msgstr "gebruikers log"
+
+#: htdocs/toplevel/logger.php:7
+msgid "User activity log"
+msgstr "Gebruikers activiteiten log"
+
+#: htdocs/toplevel/accounts.php:17
+#: htdocs/toplevel/boot.php:32
+msgid "permissions"
+msgstr "toestemmingen"
+
+#: htdocs/toplevel/accounts.php:19
+#: htdocs/toplevel/admins.php:46
+msgid "view log"
+msgstr "log tonen"
+
+#: htdocs/toplevel/admins.php:9
+msgid "administrator"
+msgstr "administrator"
+
+#: htdocs/toplevel/admins.php:10
+#: htdocs/toplevel/index.php:11
+#: include/admin/files.php:50
+#: include/admin/menus.php:220
+#: include/admin/pages.php:21
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/admin/files.php:52
+#: include/admin/menus.php:219
+#: include/admin/pages.php:25
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/admin/files.php:49
+#: include/admin/menus.php:231
+#: include/diogenes/diogenes.logger-view.inc.php:374
+msgid "actions"
+msgstr "acties"
+
+#: htdocs/toplevel/admins.php:43
+msgid "site users"
+msgstr "site gebruikers"
+
+#: htdocs/toplevel/admins.php:44
+msgid "demote to user"
+msgstr "gewoon user"
+
+#: htdocs/toplevel/index.php:9
+#: include/diogenes.barrel-editor.inc.php:151
+#: include/Barrel/Editor.php:158
+msgid "alias"
+msgstr "alias"
+
+#: htdocs/toplevel/index.php:13
+#: include/admin/options.php:62
+#: include/admin/options.php:64
+#: include/diogenes.barrel-editor.inc.php:154
+#: include/admin/options.php:66
+#: include/Barrel/Editor.php:161
+msgid "keywords"
+msgstr "zoektermen"
+
+#: htdocs/toplevel/index.php:14
+#: include/diogenes.barrel-editor.inc.php:155
+#: include/Barrel/Editor.php:162
+msgid "Create a new site"
+msgstr "Nieuw website toevoegen"
+
+#: htdocs/toplevel/index.php:17
+#: include/diogenes.barrel-editor.inc.php:158
+#: include/Barrel/Editor.php:166
+msgid "vhost (see note)"
+msgstr "vhost (zie documentatie)"
+
+#: htdocs/toplevel/index.php:19
+#: include/diogenes.barrel-editor.inc.php:160
+#: include/Barrel/Editor.php:168
+msgid "flags"
+msgstr "flags"
+
+#: htdocs/toplevel/index.php:86
+#: include/diogenes.barrel-editor.inc.php:45
+#: include/Barrel/Editor.php:47
+msgid "admin"
+msgstr "admin"
+
+#: include/diogenes.admin.inc.php:65
+#: include/diogenes.admin.inc.php:72
+#: include/diogenes.admin.inc.php:71
+msgid "Activity"
+msgstr "Activiteit"
+
+#: htdocs/toplevel/accounts.php:14
+#: htdocs/toplevel/boot.php:29
+msgid "first name"
+msgstr "voornaam"
+
+#: htdocs/toplevel/accounts.php:15
+#: htdocs/toplevel/boot.php:30
+msgid "last name"
+msgstr "achternaam"
+
+#: include/admin/compose.php:16
+#: include/admin/edit.php:15
+#: include/diogenes.admin.inc.php:44
+msgid "Directory not found"
+msgstr "Map niet gevonden"
+
+#: include/admin/pages.php:19
+#: include/admin/pages.php:23
+#: include/admin/files.php:57
+msgid "read access"
+msgstr "leestoegang"
+
+#: include/admin/pages.php:20
+#: include/admin/pages.php:24
+#: include/admin/files.php:58
+msgid "write access"
+msgstr "schrijftoegang"
+
+#: include/admin/pages.php:83
+msgid "world-writable pages are not allowed with PHP execution enabled!"
+msgstr "world-writable paginas zijn niet toegestaan met PHP executie toestemming in werken!"
+
+#: include/diogenes.barrel.inc.php:314
+#: include/diogenes.barrel.inc.php:345
+#: include/diogenes.barrel.inc.php:341
+msgid "Edit this page"
+msgstr "Pagina bewerken"
+
+#: include/diogenes.barrel.inc.php:315
+#: include/diogenes.barrel.inc.php:346
+#: include/diogenes.barrel.inc.php:342
+msgid "Raw editor"
+msgstr "Raw editor"
+
+#: htdocs/toplevel/options.php:90
+#: htdocs/toplevel/options_expert.php:56
+msgid "Convert"
+msgstr "Converteren"
+
+#: htdocs/toplevel/options.php:95
+#: htdocs/toplevel/options_expert.php:61
+msgid "You are currently using RCS as the version control system for your barrels."
+msgstr "RCS wordt op dit moment gebruikt als versie controle systeem voor je barrels."
+
+#: htdocs/toplevel/options.php:96
+#: htdocs/toplevel/options_expert.php:62
+msgid "You can switch to a full CVS repository by clicking here."
+msgstr "Je kan naar het CVS repository linken door hier te klikken."
+
+#: htdocs/toplevel/options.php:100
+#: htdocs/toplevel/options_expert.php:66
+msgid "You are currently using CVS as the version control system for your barrels."
+msgstr "CVS wordt op dit moment gebruikt als versie controle systeem voor je barrels."
+
+#: htdocs/toplevel/options.php:101
+#: htdocs/toplevel/options_expert.php:67
+msgid "You can switch back to RCS by clicking here."
+msgstr "Je kan terug gaan naar RCS door hier te klikken."
+
+#: include/admin/files.php:44
+#: include/admin/files.php:46
+#: include/admin/files.php:43
+msgid "file"
+msgstr "bestand"
+
+#: include/admin/files.php:46
+#: include/admin/files.php:48
+#: include/admin/files.php:45
+msgid "version"
+msgstr "versie"
+
+#: include/admin/files.php:48
+#: include/admin/files.php:50
+#: include/admin/files.php:47
+msgid "author"
+msgstr "auteur"
+
+#: include/admin/files.php:49
+#: include/admin/files.php:51
+#: include/admin/files.php:48
+msgid "size"
+msgstr "grootte"
+
+#: include/admin/pages.php:91
+#: include/Barrel/Page.php:205
+#: include/Barrel/Page.php:248
+msgid "the page location cannot contain spaces or special characters"
+msgstr "de pagina lokatie kan geen spaties en speciale karakters als invoer gebruiken"
+
+#: include/admin/pages.php:95
+#: include/Barrel/Page.php:212
+#: include/Barrel/Page.php:255
+msgid "this location cannot be used, it is reserved by Diogenes"
+msgstr "deze locatie kan niet worden gebruikt omdat het is gereserveerd door Diogenes"
+
+#: include/admin/files.php:45
+#: include/admin/files.php:47
+#: include/admin/files.php:44
+msgid "log"
+msgstr "log"
+
+#: include/admin/menus.php:145
+#: include/admin/menus.php:146
+#: include/admin/menus.php:158
+msgid "entry title"
+msgstr "ingangtitel"
+
+#: include/admin/menus.php:146
+#: include/admin/menus.php:147
+#: include/admin/menus.php:159
+msgid "type of link"
+msgstr "type koppeling"
+
+#: include/admin/menus.php:218
+#: include/admin/menus.php:217
+#: include/admin/menus.php:229
+msgid "menu name"
+msgstr "menunaam"
+
+#: include/admin/menus.php:219
+#: include/admin/menus.php:218
+#: include/admin/menus.php:230
+msgid "link"
+msgstr "koppeling"
+
+#: htdocs/toplevel/options.php:80
+#: htdocs/toplevel/options_expert.php:8
+#: include/diogenes.toplevel.inc.php:201
+#: htdocs/toplevel/options.php:43
+#: include/diogenes.toplevel.inc.php:95
+#: include/diogenes.toplevel.inc.php:96
+msgid "Global options"
+msgstr "Algemene opties"
+
+msgid "menu options"
+msgstr "menuopties"
+
+#: htdocs/toplevel/options.php:83
+#: include/admin/options.php:69
+#: htdocs/toplevel/options.php:46
+#: include/admin/options.php:71
+#: include/admin/options.php:73
+msgid "menu style"
+msgstr "menustijl"
+
+#: htdocs/toplevel/options.php:84
+#: include/admin/options.php:70
+#: htdocs/toplevel/options.php:47
+#: include/admin/options.php:72
+#: include/admin/options.php:74
+msgid "menu theme"
+msgstr "menuthema"
+
+#: htdocs/toplevel/options.php:91
+#: htdocs/toplevel/options_expert.php:57
+msgid "version control system"
+msgstr "versie controle systeem"
+
+#: include/admin/options.php:6
+#: include/admin/options.php:7
+msgid "Site options"
+msgstr "Website opties"
+
+#: include/admin/options.php:55
+#: include/admin/options.php:57
+#: include/admin/options.php:59
+msgid "fully expanded"
+msgstr "volledige uitgeklapt"
+
+#: include/admin/options.php:71
+#: include/admin/options.php:73
+#: include/admin/options.php:75
+msgid "minimum menu levels to expand"
+msgstr "minimum aantal menu niveaus om uit te klappen"
+
+#: include/diogenes.admin.inc.php:66
+#: include/diogenes.admin.inc.php:73
+#: include/diogenes.admin.inc.php:72
+msgid "Options"
+msgstr "Opties"
+
+#: include/admin/options.php:59
+#: include/admin/options.php:61
+#: include/admin/options.php:63
+msgid "general options"
+msgstr "algemene opties"
+
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:365
+#: include/diogenes/diogenes.logger-view.inc.php:364
+msgid "session properties"
+msgstr "sessie-eigenschappen"
+
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.logger-view.inc.php:367
+#: include/diogenes/diogenes.logger-view.inc.php:366
+msgid "host"
+msgstr "server"
+
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:367
+msgid "browser"
+msgstr "browser"
+
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:370
+msgid "data"
+msgstr "data"
+
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/diogenes/diogenes.logger-view.inc.php:371
+msgid "filter by"
+msgstr "filteren op"
+
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.logger-view.inc.php:372
+msgid "start"
+msgstr "begin"
+
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:373
+msgid "summary"
+msgstr "samenvatting"
+
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:375
+msgid "year"
+msgstr "jaar"
+
+#: include/diogenes/diogenes.logger-view.inc.php:380
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:376
+msgid "month"
+msgstr "maand"
+
+#: include/diogenes/diogenes.logger-view.inc.php:381
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/diogenes/diogenes.logger-view.inc.php:377
+msgid "day"
+msgstr "dag"
+
+#: include/diogenes/diogenes.table-editor.inc.php:525
+#: include/diogenes/diogenes.table-editor.inc.php:530
+msgid "id"
+msgstr "id"
+
+#: include/diogenes/diogenes.table-editor.inc.php:527
+#: include/diogenes/diogenes.table-editor.inc.php:532
+msgid "create"
+msgstr "toevoegen"
+
+#: include/diogenes/diogenes.table-editor.inc.php:530
+#: include/diogenes/diogenes.table-editor.inc.php:535
+msgid "new entry"
+msgstr "nieuwe item"
+
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.table-editor.inc.php:536
+msgid "existing entry"
+msgstr "bestaande item"
+
+#: include/diogenes/diogenes.table-editor.inc.php:532
+#: include/diogenes/diogenes.table-editor.inc.php:537
+msgid "(blank = no change)"
+msgstr "(leeg = geen veranderingen)"
+
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes/diogenes.table-editor.inc.php:538
+msgid "back"
+msgstr "terug"
+
+#: include/diogenes/diogenes.table-editor.inc.php:535
+#: include/diogenes/diogenes.table-editor.inc.php:540
+msgid "You are about to delete this entry. Do you want to proceed?"
+msgstr "Je gaat het item verwijderen, wil je doorgaan?"
+
+#: include/diogenes.session.inc.php:62
+#: include/diogenes.session.inc.php:71
+msgid "Authentication error!"
+msgstr "Authenticatie fout!"
+
+#: include/admin/files.php:84
+#: include/admin/files.php:93
+#: include/admin/files.php:102
+#: include/admin/pages.php:158
+#: include/admin/compose.php:57
+#: include/admin/edit.php:49
+#: include/admin/files.php:114
+#: include/admin/files.php:122
+#: include/admin/files.php:154
+#: include/admin/pages.php:124
+#: include/admin/compose.php:61
+#: include/admin/edit.php:53
+#: include/admin/plugins.php:23
+#: include/admin/files.php:61
+#: include/admin/pages.php:122
+msgid "Page"
+msgstr "Pagina"
+
+#: include/admin/files.php:86
+#: include/admin/files.php:95
+#: include/admin/pages.php:172
+#: include/admin/compose.php:63
+#: include/admin/edit.php:55
+#: include/admin/files.php:115
+#: include/admin/files.php:123
+#: include/admin/pages.php:136
+#: include/admin/compose.php:62
+#: include/admin/edit.php:54
+#: include/admin/files.php:122
+#: include/admin/files.php:161
+#: include/admin/pages.php:123
+msgid "File"
+msgstr "Bestand"
+
+#: htdocs/toplevel/index.php:15
+#: include/diogenes.barrel-editor.inc.php:156
+#: include/Barrel/Editor.php:163
+msgid "The site alias may only contain letters, numbers and underscores."
+msgstr "De alias van de website mag alleen bestaan uit letters, cijfers en onderstreeptekens."
+
+#: htdocs/toplevel/index.php:18
+#: include/diogenes.barrel-editor.inc.php:159
+#: include/Barrel/Editor.php:167
+msgid "<b>vhost note</b>: If you intend to serve this site from a virtualhost, you should enter the name of the virtualhost in this field."
+msgstr "<b>vhost notitie</b> : Als je van plan bent deze website op en virtualhost te draaien, dan moet je de virtualhost hier invoeren."
+
+#: htdocs/toplevel/index.php:55
+msgid "PHP execution"
+msgstr "PHP uitvoering"
+
+#: htdocs/toplevel/index.php:55
+#: include/diogenes.barrel-editor.inc.php:106
+#: include/Barrel/Editor.php:113
+msgid "custom templates"
+msgstr "aagepaste sjablonen"
+
+msgid "template options"
+msgstr "sjabloonopties"
+
+#: htdocs/toplevel/options.php:85
+#: include/admin/options.php:66
+#: htdocs/toplevel/options.php:48
+#: include/admin/options.php:68
+#: include/admin/options.php:70
+msgid "templates directory"
+msgstr "sjablonenmap"
+
+#: htdocs/toplevel/options.php:86
+#: include/admin/options.php:67
+#: htdocs/toplevel/options.php:49
+#: include/admin/options.php:69
+#: include/admin/options.php:71
+msgid "default template"
+msgstr "stan&daardsjabloon"
+
+#: include/admin/compose.php:56
+#: include/admin/edit.php:46
+#: include/admin/compose.php:58
+#: include/admin/edit.php:48
+msgid "log message"
+msgstr "logbericht"
+
+#: include/admin/options.php:63
+#: include/admin/options.php:65
+#: include/admin/options.php:67
+msgid "favicon"
+msgstr "favicon"
+
+#: include/admin/options.php:64
+#: include/admin/options.php:66
+#: include/admin/options.php:68
+msgid "(relative url to a PNG image)"
+msgstr "(relatief pad naar en PNG afbeelding)"
+
+#: include/admin/pages.php:17
+#: include/admin/files.php:57
+#: include/admin/pages.php:21
+#: include/admin/files.php:54
+#: include/admin/pages.php:20
+msgid "page template"
+msgstr "pagina sjabloon"
+
+#: include/admin/pages.php:18
+#: include/admin/files.php:58
+#: include/admin/pages.php:22
+#: include/admin/files.php:55
+#: include/admin/pages.php:21
+msgid "status"
+msgstr "status"
+
+#: include/admin/pages.php:184
+#: include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "under construction"
+msgstr "nog in ontwikkeling"
+
+#: include/admin/pages.php:184
+#: include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "disabled"
+msgstr "uitgeschakeld"
+
+#: include/admin/pages.php:184
+#: include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "archived"
+msgstr "gearchiveerd"
+
+#: include/diogenes.barrel.inc.php:152
+#: include/diogenes.barrel.inc.php:153
+#: include/diogenes.barrel.inc.php:155
+msgid "This page is currently under construction."
+msgstr "Deze pagina is nog in ontwikkeling."
+
+#: include/diogenes.barrel.inc.php:156
+#: include/diogenes.barrel.inc.php:157
+#: include/diogenes.barrel.inc.php:159
+msgid "This page is currently unavailable."
+msgstr "Deze pagina is momenteel niet beschikbaar."
+
+#: include/diogenes.admin.inc.php:63
+#: include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "http://diogenes-doc.polytechnique.org/en-admin/"
+msgstr "http://diogenes-doc.polytechnique.org/en-admin/"
+
+#: include/diogenes.toplevel.inc.php:188
+#: include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "http://diogenes-doc.polytechnique.org/en-user/"
+msgstr "http://diogenes-doc.polytechnique.org/en-user/"
+
+#: include/diogenes.toplevel.inc.php:198
+#: include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "http://diogenes-doc.polytechnique.org/en-root/"
+msgstr "http://diogenes-doc.polytechnique.org/en-root/"
+
+#: htdocs/toplevel/options.php:81
+#: htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "Mode"
+msgstr "Modus"
+
+#: htdocs/toplevel/options.php:81
+#: htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "standard"
+msgstr "standaard"
+
+#: htdocs/toplevel/options.php:81
+#: htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "expert"
+msgstr "expert"
+
+#: htdocs/toplevel/options.php:82
+#: include/admin/options.php:65
+#: htdocs/toplevel/options.php:45
+#: include/admin/options.php:67
+#: include/admin/options.php:69
+msgid "display options"
+msgstr "weergave-opties"
+
+#: htdocs/toplevel/options.php:87
+#: htdocs/toplevel/options.php:50
+msgid "system options"
+msgstr "systeem opties"
+
+msgid "Initial user setup"
+msgstr "Initiele gebruikers configuratie"
+
+#: htdocs/toplevel/boot.php:11
+msgid "Sorry, this feature is only available using native Diogenes authentication."
+msgstr "Sorry, deze functionaliteit is alleen beschikbaar met de specifieke Diogenes authenticatie. "
+
+#: htdocs/toplevel/boot.php:19
+msgid "The database is already configured."
+msgstr "De database is al geconfigureerd. "
+
+#: htdocs/toplevel/options_expert.php:13
+#: htdocs/toplevel/options_expert.php:75
+#: htdocs/toplevel/options_expert.php:76
+msgid "option"
+msgstr "optie"
+
+#: htdocs/toplevel/options_expert.php:14
+#: htdocs/toplevel/options_expert.php:76
+#: htdocs/toplevel/options_expert.php:77
+msgid "value"
+msgstr "waarde"
+
+#: include/admin/menus.php:221
+#: include/admin/menus.php:220
+#: include/admin/menus.php:232
+msgid "Menu"
+msgstr "Menu"
+
+#: include/diogenes.page.inc.php:65
+#: include/diogenes.page.inc.php:66
+msgid "debugging"
+msgstr "debug"
+
+#: include/diogenes.page.inc.php:66
+#: include/diogenes.page.inc.php:67
+msgid "call trace"
+msgstr "call trace"
+
+#: include/diogenes.page.inc.php:67
+#: include/diogenes.page.inc.php:68
+msgid "database trace"
+msgstr "database trace"
+
+#: include/diogenes/diogenes.logger-view.inc.php:59
+#: include/diogenes/diogenes.logger-view.inc.php:85
+#: include/diogenes/diogenes.logger-view.inc.php:130
+#: include/diogenes/diogenes.logger-view.inc.php:183
+#: include/diogenes/diogenes.logger-view.inc.php:58
+#: include/diogenes/diogenes.logger-view.inc.php:84
+#: include/diogenes/diogenes.logger-view.inc.php:129
+#: include/diogenes/diogenes.logger-view.inc.php:182
+msgid "all"
+msgstr "allemaal"
+
+#: include/diogenes/diogenes.logger-view.inc.php:363
+#: include/diogenes/diogenes.logger-view.inc.php:360
+#: include/diogenes/diogenes.logger-view.inc.php:359
+msgid "Please select a year and/or a user."
+msgstr "Selecteer een jaar en/of gebruiker. "
+
+#: include/diogenes/diogenes.table-editor.inc.php:523
+#: include/diogenes/diogenes.table-editor.inc.php:528
+msgid "previous page"
+msgstr "vorige pagina"
+
+#: include/diogenes/diogenes.table-editor.inc.php:524
+#: include/diogenes/diogenes.table-editor.inc.php:529
+msgid "next page"
+msgstr "volgende pagina"
+
+#: htdocs/toplevel/boot.php:7
+msgid "Initial setup"
+msgstr "Initiele configuratie"
+
+#: htdocs/toplevel/boot.php:46
+msgid "The initial setup of the database was performed successfuly."
+msgstr "De initiele configuratie is succesvol ingesteld."
+
+#: include/admin/options.php:47
+#: include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "no"
+msgstr "nee"
+
+#: include/admin/options.php:47
+#: include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "yes"
+msgstr "ja"
+
+#: include/admin/options.php:68
+#: include/admin/options.php:70
+#: include/admin/options.php:72
+msgid "hide Diogenes menu"
+msgstr "Diogenes menu verbergen"
+
+#: include/admin/prefs.php:28
+msgid "account preferences"
+msgstr "account voorkeuren"
+
+#: htdocs/toplevel/plugins.php:19
+msgid "Barrel plugins"
+msgstr "Barrel plugins"
+
+#: htdocs/toplevel/plugins.php:21
+msgid "Global plugin settings"
+msgstr "Algemene plugin opties"
+
+#: htdocs/toplevel/plugins.php:38
+#, php-format
+msgid "Rebuilding plugin cache for barrel '%s'"
+msgstr "Vernieuwen plugin cache voor barrel '%s'"
+
+#: htdocs/toplevel/plugins.php:47
+msgid "Clean plugins database"
+msgstr "Opschonen van de plugins database"
+
+#: htdocs/toplevel/plugins.php:48
+msgid "If you are having problems with references to plugins that no longer exist, you can have Diogenes remove such entries from the database."
+msgstr "Indien er problemen zijn met verwijzingen naar plugins die niet langer meer werken kan Diogenes zulke verwijzingen verwijderen uit de database. "
+
+#: htdocs/toplevel/plugins.php:49
+msgid "Clean"
+msgstr "Opschonen"
+
+#: htdocs/toplevel/plugins.php:51
+msgid "Enable or disable plugins"
+msgstr "Plugins activeren of deactiveren"
+
+#: htdocs/toplevel/plugins.php:54
+msgid "You can select the plugins you want to enable for this barrel."
+msgstr "Selecteer de plugin die je wilt activeren voor deze barrel. "
+
+#: htdocs/toplevel/plugins.php:56
+msgid "You can select the plugins you want to enable or disable globally, that is the plugins that can be used in the different barrels. Please note that for a plugin to be accessible from a barrel, you will need to activate that plugin for the barrel. To do this, from the <i>List of sites</i> click on 'plugins' next to the barrel of your choice."
+msgstr ""
+
+#: htdocs/toplevel/options.php:52
+msgid "Word document import"
+msgstr "Importeer een Word document"
+
+#: include/admin/files.php:39
+msgid "File operations"
+msgstr "Bestands aanpassingen"
+
+#: include/admin/files.php:43
+#: include/admin/files.php:40
+msgid "Create an empty file"
+msgstr "Een nieuw bestand toevoegen"
+
+#: include/admin/files.php:44
+#: include/admin/files.php:41
+msgid "Copy or move a file"
+msgstr "Kopieer of verplaats een file"
+
+#: include/admin/files.php:45
+#: include/admin/files.php:42
+msgid "Create"
+msgstr "Aanmaken"
+
+#: include/admin/files.php:53
+#: include/admin/files.php:50
+msgid "to"
+msgstr "naar"
+
+#: include/admin/files.php:59
+msgid "read"
+msgstr "lezen"
+
+#: include/admin/files.php:60
+msgid "write"
+msgstr "schrijven"
+
+#: include/admin/files.php:67
+#: include/admin/files.php:69
+msgid "Creating empty file"
+msgstr "Leeg bestand aanmaken"
+
+#: include/admin/files.php:69
+#: include/admin/files.php:71
+msgid "The specified file already exists!"
+msgstr "Dit specifieke bestand is reeds aanwezig!"
+
+#: include/admin/files.php:155
+#: include/admin/pages.php:160
+#: include/admin/plugins.php:22
+#: include/admin/files.php:194
+#: include/admin/pages.php:156
+#: include/Barrel/Page.php:170
+msgid "home"
+msgstr "home"
+
+#: include/admin/files.php:182
+#: include/admin/files.php:224
+msgid "Copy"
+msgstr "Kopieer"
+
+#: include/admin/files.php:182
+#: include/admin/files.php:224
+msgid "Move"
+msgstr "Verplaats"
+
+#: include/admin/pages.php:18
+#: include/admin/pages.php:17
+#: include/Barrel/Page.php:171
+msgid "parent page"
+msgstr "moeder pagina"
+
+#: include/admin/webdav.php:7
+#: include/diogenes.admin.inc.php:79
+#: include/diogenes.admin.inc.php:78
+msgid "WebDAV"
+msgstr "WebDAV"
+
+#: include/admin/webdav.php:9
+#: include/admin/webdav.php:11
+msgid "You can access your barrel's files using WebDAV by pointing your WebDAV client to the following address."
+msgstr "Je hebt toegang tot de bestanden in je barrel via WebDAV door je WebDAV client naar het volgende adres te verwijzen. "
+
+#: include/admin/plugins.php:22
+msgid "Page plugins "
+msgstr "Pagina plugins"
+
+#: include/admin/plugins.php:26
+msgid "Available plugins"
+msgstr "Beschikbare plugins"
+
+#: include/diogenes.page.inc.php:69
+#: include/diogenes.barrel-editor.inc.php:50
+#: include/diogenes.barrel-editor.inc.php:106
+#: include/Barrel/Page.php:126
+#: include/Barrel/Page.php:152
+#: include/diogenes.plugin-editor.inc.php:237
+#: include/Barrel/Page.php:150
+#: include/Barrel/Page.php:178
+#: include/Barrel/Editor.php:52
+#: include/Barrel/Editor.php:113
+#: include/Plugin/Editor.php:266
+#: include/diogenes.page.inc.php:68
+msgid "plugins"
+msgstr "plugins"
+
+#: include/diogenes.toplevel.inc.php:96
+#: include/diogenes.admin.inc.php:76
+#: include/diogenes.toplevel.inc.php:97
+#: include/diogenes.admin.inc.php:75
+msgid "Plugins"
+msgstr "Plugins"
+
+#: include/Barrel/Page.php:70
+#: include/Barrel/Page.php:89
+msgid "Not deleting page, it has child pages!"
+msgstr "Pagina kan niet verwijdert worden, er zijn nog afgeleide pagina's!"
+
+#: include/Barrel/File.php:76
+#: include/Barrel/File.php:94
+msgid "rename"
+msgstr "naam wijzigen"
+
+#: include/diogenes.plugin-editor.inc.php:236
+#: include/Plugin/Editor.php:265
+msgid "plugin"
+msgstr "plugin"
+
+#: include/diogenes.plugin-editor.inc.php:239
+#: include/Plugin/Editor.php:268
+msgid "parameters"
+msgstr "parameters"
+
+#: include/admin/files.php:192
+msgid "Document"
+msgstr "Document"
+
+#: include/admin/index.php:52
+msgid "barrel options"
+msgstr "barrel opties"
+
+#: include/admin/index.php:57
+msgid "barrel plugins"
+msgstr "barrel plugins"
+
+#: include/admin/index.php:68
+msgid "page removed"
+msgstr "pagina verwijderd"
+
+#: include/admin/index.php:80
+msgid "page plugins"
+msgstr "pagina plugins"
+
+#: include/admin/index.php:92
+msgid "file deleted"
+msgstr "bestand verwijdert"
+
+#: include/admin/webdav.php:14
+msgid "In order to access your barrel's files using WebDAV, please ask your Diogenes administrator to enable this feature in the Diogenes configuration file."
+msgstr "Voor toegang tot de bestande in je barrel via WebDAV, vraag uw Diogenes administrator om deze functie aan te zetten in het Diogenes configuratie bestand. "
+
+#: include/Barrel/Page.php:81
+msgid "Deleting page"
+msgstr "Pagina aan het verwijderen"
+
+#: include/Barrel/Page.php:176
+msgid "add a page"
+msgstr "Voeg een pagina toe"
+
+#: include/Barrel/Page.php:266
+msgid "Creating new page"
+msgstr "Nieuwe pagina aanmaken"
+
+#: include/Barrel/Editor.php:165
+msgid "no barrels available"
+msgstr "geen barrels beschikbaar"
+
+#: htdocs/toplevel/index.php:13
+msgid "Warning : in order to make use of virtual hosts or WebDAV, you need to set $globals->rooturl to a full URL starting with http:// or https:// in your Diogenes configuration file."
+msgstr "LET OP: om gebruik te maken van virtual hosts of WebDAV dient $globals->rooturl te verwijzen naar een volledige URL beginnend met http:// of https:// in je Diogenes configuratie bestand."
+
--- /dev/null
+#!/bin/sh
+##
+## GNU shtool -- The GNU Portable Shell Tool
+## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
+##
+## See http://www.gnu.org/software/shtool/ for more information.
+## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
+##
+## Version 1.4.9 (16-Apr-2000)
+## Ingredients: 3/17 available modules
+##
+
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program 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 this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
+##
+## Notice: Given that you include this file verbatim into your own
+## source tree, you are justified in saying that it remains separate
+## from your package, and that this way you are simply just using GNU
+## shtool. So, in this situation, there is no requirement that your
+## package itself is licensed under the GNU General Public License in
+## order to take advantage of GNU shtool.
+##
+
+##
+## Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]
+##
+## Available commands:
+## echo Print string with optional construct expansion
+## install Install a program, script or datafile
+## mkdir Make one or more directories
+##
+## Not available commands (because module was not built-in):
+## mdate Pretty-print modification time of a file or dir
+## table Pretty-print a field-separated list as a table
+## prop Display progress with a running propeller
+## move Move files with simultaneous substitution
+## mkln Make link with calculation of relative paths
+## mkshadow Make a shadow tree through symbolic links
+## fixperm Fix file permissions inside a source tree
+## tarball Roll distribution tarballs
+## guessos Simple operating system guesser
+## arx Extended archive command
+## slo Separate linker options by library class
+## scpp Sharing C Pre-Processor
+## version Generate and maintain a version information file
+## path Deal with program paths
+##
+
+if [ $# -eq 0 ]; then
+ echo "$0:Error: invalid command line" 1>&2
+ echo "$0:Hint: run \`$0 -h' for usage" 1>&2
+ exit 1
+fi
+if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
+ echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
+ echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
+ echo "Report bugs to <bug-shtool@gnu.org>"
+ echo ''
+ echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
+ echo ''
+ echo 'Available global <options>:'
+ echo ' -v, --version display shtool version information'
+ echo ' -h, --help display shtool usage help page (this one)'
+ echo ' -d, --debug display shell trace information'
+ echo ''
+ echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
+ echo ' echo [-n] [-e] [<str> ...]'
+ echo ' install [-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>]'
+ echo ' [-e<ext>] <file> <path>'
+ echo ' mkdir [-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]'
+ echo ''
+ echo 'Not available <cmd-name> (because module was not built-in):'
+ echo ' mdate [-n] [-z] [-s] [-d] [-f<str>] [-o<spec>] <path>'
+ echo ' table [-F<sep>] [-w<width>] [-c<cols>] [-s<strip>] <str><sep><str>...'
+ echo ' prop [-p<str>]'
+ echo ' move [-v] [-t] [-e] [-p] <src-file> <dst-file>'
+ echo ' mkln [-t] [-f] [-s] <src-path> [<src-path> ...] <dst-path>'
+ echo ' mkshadow [-v] [-t] [-a] <src-dir> <dst-dir>'
+ echo ' fixperm [-v] [-t] <path> [<path> ...]'
+ echo ' tarball [-t] [-v] [-o <tarball>] [-c <prog>] [-d <dir>] [-u'
+ echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
+ echo ' guessos '
+ echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
+ echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
+ echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
+ echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
+ echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
+ echo ' [-d<type>] <file>'
+ echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
+ echo ''
+ exit 0
+fi
+if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
+ echo "GNU shtool 1.4.9 (16-Apr-2000)"
+ exit 0
+fi
+if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
+ shift
+ set -x
+fi
+name=`echo "$0" | sed -e 's;.*/\([^/]*\)$;\1;' -e 's;-sh$;;' -e 's;\.sh$;;'`
+case "$name" in
+ echo|install|mkdir )
+ # implicit tool command selection
+ tool="$name"
+ ;;
+ * )
+ # explicit tool command selection
+ tool="$1"
+ shift
+ ;;
+esac
+arg_spec=""
+opt_spec=""
+gen_tmpfile=no
+
+##
+## DISPATCH INTO SCRIPT PROLOG
+##
+
+case $tool in
+ echo )
+ str_tool="echo"
+ str_usage="[-n] [-e] [<str> ...]"
+ arg_spec="0+"
+ opt_spec="n.e."
+ opt_n=no
+ opt_e=no
+ ;;
+ install )
+ str_tool="install"
+ str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
+ arg_spec="2="
+ opt_spec="v.t.c.C.s.m:o:g:e:"
+ opt_v=no
+ opt_t=no
+ opt_c=no
+ opt_C=no
+ opt_s=no
+ opt_m=""
+ opt_o=""
+ opt_g=""
+ opt_e=""
+ ;;
+ mkdir )
+ str_tool="mkdir"
+ str_usage="[-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]"
+ arg_spec="1+"
+ opt_spec="t.f.p.m:"
+ opt_t=no
+ opt_f=no
+ opt_p=no
+ opt_m=""
+ ;;
+ -* )
+ echo "$0:Error: unknown option \`$tool'" 2>&1
+ echo "$0:Hint: run \`$0 -h' for usage" 2>&1
+ exit 1
+ ;;
+ * )
+ echo "$0:Error: unknown command \`$tool'" 2>&1
+ echo "$0:Hint: run \`$0 -h' for usage" 2>&1
+ exit 1
+ ;;
+esac
+
+##
+## COMMON UTILITY CODE
+##
+
+# determine name of tool
+if [ ".$tool" != . ]; then
+ # used inside shtool script
+ toolcmd="$0 $tool"
+ toolcmdhelp="shtool $tool"
+ msgprefix="shtool:$tool"
+else
+ # used as standalone script
+ toolcmd="$0"
+ toolcmdhelp="sh $0"
+ msgprefix="$str_tool"
+fi
+
+# parse argument specification string
+eval `echo $arg_spec |\
+ sed -e 's/^\([0-9]*\)\([+=]\)/arg_NUMS=\1; arg_MODE=\2/'`
+
+# parse option specification string
+eval `echo h.$opt_spec |\
+ sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'`
+
+# interate over argument line
+opt_PREV=''
+while [ $# -gt 0 ]; do
+ # special option stops processing
+ if [ ".$1" = ".--" ]; then
+ shift
+ break
+ fi
+
+ # determine option and argument
+ opt_ARG_OK=no
+ if [ ".$opt_PREV" != . ]; then
+ # merge previous seen option with argument
+ opt_OPT="$opt_PREV"
+ opt_ARG="$1"
+ opt_ARG_OK=yes
+ opt_PREV=''
+ else
+ # split argument into option and argument
+ case "$1" in
+ -[a-zA-Z0-9]*)
+ eval `echo "x$1" |\
+ sed -e 's/^x-\([a-zA-Z0-9]\)/opt_OPT="\1";/' \
+ -e 's/";\(.*\)$/"; opt_ARG="\1"/'`
+ ;;
+ -[a-zA-Z0-9])
+ opt_OPT=`echo "x$1" | cut -c3-`
+ opt_ARG=''
+ ;;
+ *)
+ break
+ ;;
+ esac
+ fi
+
+ # eat up option
+ shift
+
+ # determine whether option needs an argument
+ eval "opt_MODE=\$opt_MODE_${opt_OPT}"
+ if [ ".$opt_ARG" = . -a ".$opt_ARG_OK" != .yes ]; then
+ if [ ".$opt_MODE" = ".:" -o ".$opt_MODE" = ".+" ]; then
+ opt_PREV="$opt_OPT"
+ continue
+ fi
+ fi
+
+ # process option
+ case $opt_MODE in
+ '.' )
+ # boolean option
+ eval "opt_${opt_OPT}=yes"
+ ;;
+ ':' )
+ # option with argument (multiple occurances override)
+ eval "opt_${opt_OPT}=\"\$opt_ARG\""
+ ;;
+ '+' )
+ # option with argument (multiple occurances append)
+ eval "opt_${opt_OPT}=\"\$opt_${opt_OPT} \$opt_ARG\""
+ ;;
+ * )
+ echo "$msgprefix:Error: unknown option: \`-$opt_OPT'" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2
+ exit 1
+ ;;
+ esac
+done
+if [ ".$opt_PREV" != . ]; then
+ echo "$msgprefix:Error: missing argument to option \`-$opt_PREV'" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2
+ exit 1
+fi
+
+# process help option
+if [ ".$opt_h" = .yes ]; then
+ echo "Usage: $toolcmdhelp $str_usage"
+ exit 0
+fi
+
+# complain about incorrect number of arguments
+case $arg_MODE in
+ '=' )
+ if [ $# -ne $arg_NUMS ]; then
+ echo "$msgprefix:Error: invalid number of arguments (exactly $arg_NUMS expected)" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
+ exit 1
+ fi
+ ;;
+ '+' )
+ if [ $# -lt $arg_NUMS ]; then
+ echo "$msgprefix:Error: invalid number of arguments (at least $arg_NUMS expected)" 1>&2
+ echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
+ exit 1
+ fi
+ ;;
+esac
+
+# establish a temporary file on request
+if [ ".$gen_tmpfile" = .yes ]; then
+ if [ ".$TMPDIR" != . ]; then
+ tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
+ tmpdir="$TEMPDIR"
+ else
+ tmpdir="/tmp"
+ fi
+ tmpfile="$tmpdir/.shtool.$$"
+ rm -f $tmpfile >/dev/null 2>&1
+ touch $tmpfile
+fi
+
+##
+## DISPATCH INTO SCRIPT BODY
+##
+
+case $tool in
+
+echo )
+ ##
+ ## echo -- Print string with optional construct expansion
+ ## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
+ ## Originally written for WML as buildinfo
+ ##
+
+ text="$*"
+
+ # check for broken escape sequence expansion
+ seo=''
+ bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'`
+ if [ ".$bytes" != .3 ]; then
+ bytes=`echo -E '\1' | wc -c | awk '{ printf("%s", $1); }'`
+ if [ ".$bytes" = .3 ]; then
+ seo='-E'
+ fi
+ fi
+
+ # check for existing -n option (to suppress newline)
+ minusn=''
+ bytes=`echo -n 123 2>/dev/null | wc -c | awk '{ printf("%s", $1); }'`
+ if [ ".$bytes" = .3 ]; then
+ minusn='-n'
+ fi
+
+ # determine terminal bold sequence
+ term_bold=''
+ term_norm=''
+ if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
+ case $TERM in
+ # for the most important terminal types we directly know the sequences
+ xterm|xterm*|vt220|vt220*)
+ term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
+ term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
+ ;;
+ vt100|vt100*)
+ term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
+ term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
+ ;;
+ # for all others, we try to use a possibly existing `tput' or `tcout' utility
+ * )
+ paths=`echo $PATH | sed -e 's/:/ /g'`
+ for tool in tput tcout; do
+ for dir in $paths; do
+ if [ -r "$dir/$tool" ]; then
+ for seq in bold md smso; do # 'smso' is last
+ bold="`$dir/$tool $seq 2>/dev/null`"
+ if [ ".$bold" != . ]; then
+ term_bold="$bold"
+ break
+ fi
+ done
+ if [ ".$term_bold" != . ]; then
+ for seq in sgr0 me rmso reset; do # 'reset' is last
+ norm="`$dir/$tool $seq 2>/dev/null`"
+ if [ ".$norm" != . ]; then
+ term_norm="$norm"
+ break
+ fi
+ done
+ fi
+ break
+ fi
+ done
+ if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
+ break;
+ fi
+ done
+ ;;
+ esac
+ if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
+ echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
+ fi
+ fi
+
+ # determine user name
+ username=''
+ if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then
+ username="$LOGNAME"
+ if [ ".$username" = . ]; then
+ username="$USER"
+ if [ ".$username" = . ]; then
+ username="`(whoami) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$username" = . ]; then
+ username="`(who am i) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$username" = . ]; then
+ username='unknown'
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # determine user id
+ userid=''
+ if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%U'`" != . ]; then
+ userid="`(id -u) 2>/dev/null`"
+ if [ ".$userid" = . ]; then
+ str="`(id) 2>/dev/null`"
+ if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
+ userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*//'`
+ fi
+ if [ ".$userid" = . ]; then
+ userid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
+ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$userid" = . ]; then
+ userid=`(ypcat passwd) 2>/dev/null |
+ egrep "^${username}:" | \
+ sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
+ if [ ".$userid" = . ]; then
+ userid='?'
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ # determine host name
+ hostname=''
+ if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
+ hostname="`(uname -n) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$hostname" = . ]; then
+ hostname="`(hostname) 2>/dev/null |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$hostname" = . ]; then
+ hostname='unknown'
+ fi
+ fi
+ case $hostname in
+ *.* )
+ domainname=".`echo $hostname | cut -d. -f2-`"
+ hostname="`echo $hostname | cut -d. -f1`"
+ ;;
+ esac
+ fi
+
+ # determine domain name
+ domainname=''
+ if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
+ if [ ".$domainname" = . ]; then
+ if [ -f /etc/resolv.conf ]; then
+ domainname="`egrep '^[ ]*domain' /etc/resolv.conf | head -1 |\
+ sed -e 's/.*domain//' \
+ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
+ -e 's/^\.//' -e 's/^/./' |\
+ awk '{ printf("%s", $1); }'`"
+ if [ ".$domainname" = . ]; then
+ domainname="`egrep '^[ ]*search' /etc/resolv.conf | head -1 |\
+ sed -e 's/.*search//' \
+ -e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
+ -e 's/ .*//' -e 's/ .*//' \
+ -e 's/^\.//' -e 's/^/./' |\
+ awk '{ printf("%s", $1); }'`"
+ fi
+ fi
+ fi
+ fi
+
+ # determine current time
+ time_day=''
+ time_month=''
+ time_year=''
+ time_monthname=''
+ if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[DMYm]'`" != . ]; then
+ time_day=`date '+%d'`
+ time_month=`date '+%m'`
+ time_year=`date '+%Y' 2>/dev/null`
+ if [ ".$time_year" = . ]; then
+ time_year=`date '+%y'`
+ case $time_year in
+ [5-9][0-9]) time_year="19$time_year" ;;
+ [0-4][0-9]) time_year="20$time_year" ;;
+ esac
+ fi
+ case $time_month in
+ 1|01) time_monthname='Jan' ;;
+ 2|02) time_monthname='Feb' ;;
+ 3|03) time_monthname='Mar' ;;
+ 4|04) time_monthname='Apr' ;;
+ 5|05) time_monthname='May' ;;
+ 6|06) time_monthname='Jun' ;;
+ 7|07) time_monthname='Jul' ;;
+ 8|08) time_monthname='Aug' ;;
+ 9|09) time_monthname='Sep' ;;
+ 10) time_monthname='Oct' ;;
+ 11) time_monthname='Nov' ;;
+ 12) time_monthname='Dec' ;;
+ esac
+ fi
+
+ # expand special ``%x'' constructs
+ if [ ".$opt_e" = .yes ]; then
+ text=`echo $seo "$text" |\
+ sed -e "s/%B/${term_bold}/g" \
+ -e "s/%b/${term_norm}/g" \
+ -e "s/%u/${username}/g" \
+ -e "s/%U/${userid}/g" \
+ -e "s/%h/${hostname}/g" \
+ -e "s/%d/${domainname}/g" \
+ -e "s/%D/${time_day}/g" \
+ -e "s/%M/${time_month}/g" \
+ -e "s/%Y/${time_year}/g" \
+ -e "s/%m/${time_monthname}/g" 2>/dev/null`
+ fi
+
+ # create output
+ if [ .$opt_n = .no ]; then
+ echo $seo "$text"
+ else
+ # the harder part: echo -n is best, because
+ # awk may complain about some \xx sequences.
+ if [ ".$minusn" != . ]; then
+ echo $seo $minusn "$text"
+ else
+ echo dummy | awk '{ printf("%s", TEXT); }' TEXT="$text"
+ fi
+ fi
+ ;;
+
+install )
+ ##
+ ## install -- Install a program, script or datafile
+ ## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
+ ## Originally written for shtool
+ ##
+
+ src="$1"
+ dst="$2"
+
+ # If destination is a directory, append the input filename
+ if [ -d $dst ]; then
+ dst=`echo "$dst" | sed -e 's:/$::'`
+ dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
+ dst="$dst/$dstfile"
+ fi
+
+ # Add a possible extension to src and dst
+ if [ ".$opt_e" != . ]; then
+ src="$src$opt_e"
+ dst="$dst$opt_e"
+ fi
+
+ # Check for correct arguments
+ if [ ".$src" = ".$dst" ]; then
+ echo "$msgprefix:Error: source and destination are the same" 1>&2
+ exit 1
+ fi
+
+ # Make a temp file name in the destination directory
+ dstdir=`echo $dst | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'`
+ dsttmp="$dstdir/#INST@$$#"
+
+ # Verbosity
+ if [ ".$opt_v" = .yes ]; then
+ echo "$src -> $dst" 1>&2
+ fi
+
+ # Copy or move the file name to the temp name
+ # (because we might be not allowed to change the source)
+ if [ ".$opt_C" = .yes ]; then
+ opt_c=yes
+ fi
+ if [ ".$opt_c" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp $src $dsttmp" 1>&2
+ fi
+ cp $src $dsttmp || exit $?
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv $src $dsttmp" 1>&2
+ fi
+ mv $src $dsttmp || exit $?
+ fi
+
+ # Adjust the target file
+ # (we do chmod last to preserve setuid bits)
+ if [ ".$opt_s" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "strip $dsttmp" 1>&2
+ fi
+ strip $dsttmp || exit $?
+ fi
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o $dsttmp" 1>&2
+ fi
+ chown $opt_o $dsttmp || exit $?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g $dsttmp" 1>&2
+ fi
+ chgrp $opt_g $dsttmp || exit $?
+ fi
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m $dsttmp" 1>&2
+ fi
+ chmod $opt_m $dsttmp || exit $?
+ fi
+
+ # Determine whether to do a quick install
+ # (has to be done _after_ the strip was already done)
+ quick=no
+ if [ ".$opt_C" = .yes ]; then
+ if [ -r $dst ]; then
+ if cmp -s $src $dst; then
+ quick=yes
+ fi
+ fi
+ fi
+
+ # Finally install the file to the real destination
+ if [ $quick = yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f $dsttmp" 1>&2
+ fi
+ rm -f $dsttmp
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "rm -f $dst && mv $dsttmp $dst" 1>&2
+ fi
+ rm -f $dst && mv $dsttmp $dst
+ fi
+ ;;
+
+mkdir )
+ ##
+ ## mkdir -- Make one or more directories
+ ## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
+ ## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
+ ## Cleaned up and enhanced for shtool
+ ##
+
+ errstatus=0
+ for p in ${1+"$@"}; do
+ # if the directory already exists...
+ if [ -d "$p" ]; then
+ if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
+ echo "$msgprefix:Error: directory already exists: $p" 1>&2
+ errstatus=1
+ break
+ else
+ continue
+ fi
+ fi
+ # if the directory has to be created...
+ if [ ".$opt_p" = .no ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $p" 1>&2
+ fi
+ mkdir $p || errstatus=$?
+ else
+ # the smart situation
+ set fnord `echo ":$p" |\
+ sed -e 's/^:\//%/' \
+ -e 's/^://' \
+ -e 's/\// /g' \
+ -e 's/^%/\//'`
+ shift
+ pathcomp=''
+ for d in ${1+"$@"}; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp="./$pathcomp" ;;
+ esac
+ if [ ! -d "$pathcomp" ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "mkdir $pathcomp" 1>&2
+ fi
+ mkdir $pathcomp || errstatus=$?
+ if [ ".$opt_m" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m $pathcomp" 1>&2
+ fi
+ chmod $opt_m $pathcomp || errstatus=$?
+ fi
+ fi
+ pathcomp="$pathcomp/"
+ done
+ fi
+ done
+ exit $errstatus
+ ;;
+
+esac
+
+exit 0
+
+##EOF##
--- /dev/null
+# Swedish translations for Diogenes package.
+# Copyright (C) 2004 Jeremy Lainé
+# This file is distributed under the same license as the Diogenes package.
+# Jonas Johansson <fazer75@hotmail.com>, 2004.
+# Jeremy Lainé <jeremy.laine@m4x.org>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Diogenes 0.9.12\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-01-07 16:41+0100\n"
+"PO-Revision-Date: 2004-06-10 17:09+0200\n"
+"Last-Translator: Jeremy Lainé <jeremy.laine@m4x.org>\n"
+"Language-Team: Swedish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.3.1\n"
+
+#: htdocs/index.php:9 htdocs/index.php:13 include/admin/bad.php:46
+msgid "Welcome to Diogenes"
+msgstr "Välkommen till Diogenes"
+
+#: htdocs/index.php:11 htdocs/index.php:15
+msgid "Welcome to the Diogenes content management system."
+msgstr "Välkommen till Diogenes innehållshanteringssystem."
+
+#: htdocs/index.php:12 htdocs/index.php:16
+msgid ""
+"Diogenes was developed by the webmasters of the Polytechnique.org web site."
+msgstr "Diogenes utvecklades av Polytechnique.org:s webmasters."
+
+#: htdocs/index.php:13 htdocs/index.php:17
+msgid "The following barrels are currently available"
+msgstr "Följande tunnor är tillgängliga för tillfället."
+
+#: htdocs/index.php:14 htdocs/toplevel/admins.php:8
+#: include/diogenes.barrel-editor.inc.php:152 include/Barrel/Editor.php:159
+msgid "site"
+msgstr "sajt"
+
+#: htdocs/index.php:15 htdocs/toplevel/index.php:12
+#: htdocs/toplevel/logger_actions.php:14 include/admin/options.php:61
+#: include/admin/options.php:63 include/diogenes.barrel-editor.inc.php:153
+#: include/diogenes.plugin-editor.inc.php:238 include/admin/options.php:65
+#: include/Barrel/Editor.php:160 include/Plugin/Editor.php:267
+msgid "description"
+msgstr "beskrivning"
+
+#: htdocs/prefs.php:19
+msgid "Changing password.."
+msgstr "Ändrar lösenord.."
+
+#: htdocs/prefs.php:33 include/admin/prefs.php:20
+msgid "User preferences"
+msgstr "Användarinställningar"
+
+#: htdocs/prefs.php:34 include/admin/prefs.php:21
+msgid "Diogenes preferences"
+msgstr "Diogenes inställningar"
+
+#: htdocs/prefs.php:36
+msgid "my information"
+msgstr "min information"
+
+#: htdocs/prefs.php:37 htdocs/toplevel/accounts.php:13
+#: htdocs/toplevel/boot.php:28 include/diogenes.session.inc.php:138
+msgid "username"
+msgstr "användarnamn"
+
+#: htdocs/prefs.php:38
+msgid "full name"
+msgstr "fullständigt namn"
+
+#: htdocs/prefs.php:40 include/admin/prefs.php:23
+msgid "language"
+msgstr "språk"
+
+#: htdocs/prefs.php:41 include/admin/prefs.php:24
+msgid ""
+"You can select your preferred language by clicking on the appropriate "
+"language below."
+msgstr "Du kan välja språk genom att klicka på det språk som passar nedan."
+
+#: htdocs/prefs.php:43
+msgid "my password"
+msgstr "mitt lösenord"
+
+#: htdocs/prefs.php:44
+msgid "new password"
+msgstr "nytt lösenord"
+
+#: htdocs/prefs.php:45
+msgid "confirmation"
+msgstr "bekräftelse"
+
+#: htdocs/prefs.php:47 include/admin/prefs.php:26
+msgid "Change"
+msgstr "Ändra"
+
+#: include/admin/compose.php:32 include/admin/edit.php:31
+#: include/admin/compose.php:34 include/admin/edit.php:33
+msgid "Commiting changes to file"
+msgstr "Genomför ändringar av filen"
+
+#: include/admin/edit.php:41 include/admin/edit.php:43
+msgid "File editor"
+msgstr "Fileditor"
+
+#: include/admin/edit.php:45 include/admin/edit.php:47
+msgid "File source"
+msgstr "Filens källa"
+
+#: htdocs/toplevel/index.php:16 htdocs/toplevel/options.php:89
+#: include/admin/menus.php:151 include/admin/options.php:72
+#: include/admin/pages.php:12 include/admin/edit.php:48
+#: include/diogenes.session.inc.php:137
+#: include/diogenes/diogenes.logger-view.inc.php:382
+#: include/diogenes/diogenes.table-editor.inc.php:536
+#: htdocs/toplevel/options.php:53 include/admin/files.php:41
+#: include/admin/menus.php:152 include/admin/options.php:74
+#: include/admin/pages.php:15 include/admin/edit.php:50
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.table-editor.inc.php:541
+#: include/diogenes.barrel-editor.inc.php:157
+#: include/diogenes.plugin-editor.inc.php:235 include/admin/files.php:38
+#: include/admin/menus.php:164 include/admin/options.php:76
+#: include/admin/pages.php:14 include/Barrel/Editor.php:164
+#: include/Plugin/Editor.php:264
+#: include/diogenes/diogenes.logger-view.inc.php:378
+msgid "Submit"
+msgstr "Skicka"
+
+#: include/admin/files.php:27 include/admin/pages.php:152
+#: include/admin/compose.php:58 include/admin/edit.php:50
+#: include/Barrel/Page.php:143
+msgid "pages catalog"
+msgstr "sidornas katalog"
+
+#: include/admin/files.php:28 include/admin/pages.php:154
+#: include/admin/compose.php:59 include/admin/edit.php:51
+#: include/Barrel/Page.php:147 include/admin/index.php:74
+#: include/Barrel/Page.php:174
+msgid "page properties"
+msgstr "sidans egenskaper"
+
+#: include/admin/files.php:29 include/admin/pages.php:155
+#: include/admin/compose.php:60 include/admin/edit.php:52
+#: include/diogenes.rcs.inc.php:452 include/diogenes.rcs.inc.php:621
+#: include/Barrel/Page.php:148 include/admin/files.php:146
+#: include/Barrel/Page.php:175
+msgid "view page"
+msgstr "visa sida"
+
+#: include/admin/files.php:83 include/admin/files.php:92
+#: include/admin/files.php:101 include/admin/pages.php:156
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/Barrel/Page.php:149 include/Barrel/Page.php:173
+msgid "browse files"
+msgstr "bläddra bland filer"
+
+#: include/admin/files.php:35 include/admin/pages.php:167
+#: include/admin/compose.php:64 include/admin/edit.php:56
+#: include/admin/pages.php:132 include/Barrel/File.php:94
+#: include/Barrel/File.php:114
+msgid "raw editor"
+msgstr "raw editor"
+
+#: htdocs/toplevel/options.php:88 include/admin/files.php:36
+#: include/admin/pages.php:168 include/admin/compose.php:65
+#: include/admin/edit.php:57 include/diogenes.barrel.inc.php:316
+#: htdocs/toplevel/options.php:51 include/admin/pages.php:133
+#: include/diogenes.barrel.inc.php:347 include/Barrel/File.php:95
+#: include/Barrel/File.php:115 include/diogenes.barrel.inc.php:343
+msgid "HTML editor"
+msgstr "HTML editor"
+
+#: include/admin/files.php:85 include/admin/files.php:94
+#: include/admin/pages.php:163 include/admin/pages.php:170
+#: include/admin/compose.php:66 include/admin/edit.php:58
+#: include/admin/pages.php:129 include/admin/pages.php:134
+#: include/Barrel/File.php:97 include/Barrel/File.php:117
+msgid "file revisions"
+msgstr "filversion"
+
+msgid "Ekit"
+msgstr "Ekit"
+
+#: include/admin/menus.php:36 include/admin/menus.php:37
+msgid "The site's menus"
+msgstr "Sajtens menyer"
+
+#: include/admin/menus.php:44 include/admin/menus.php:45
+msgid "The selected menu has child items, please remove them first."
+msgstr "Den valda menyn har undermenyer, var vänlig ta bort dem först."
+
+#: include/admin/menus.php:144 include/admin/menus.php:145
+#: include/admin/menus.php:157
+msgid "menu entry properties"
+msgstr "menyinläggsegenskaper"
+
+#: include/admin/menus.php:147 include/admin/menus.php:148
+#: include/admin/menus.php:160
+msgid "none"
+msgstr "ingen"
+
+#: include/admin/menus.php:148 include/admin/menus.php:149
+#: include/admin/menus.php:161
+msgid "internal link"
+msgstr "intern länk"
+
+#: include/admin/menus.php:149 include/admin/menus.php:150
+#: include/admin/menus.php:162
+msgid "external link"
+msgstr "extern länk"
+
+#: include/admin/menus.php:173 include/diogenes.plugin-editor.inc.php:240
+#: include/admin/menus.php:185 include/Plugin/Editor.php:269
+msgid "move up"
+msgstr "flytta upp"
+
+#: include/admin/menus.php:176 include/diogenes.plugin-editor.inc.php:241
+#: include/admin/menus.php:188 include/Plugin/Editor.php:270
+msgid "move down"
+msgstr "flytta ner"
+
+#: htdocs/toplevel/index.php:85 include/admin/menus.php:178
+#: include/diogenes.rcs.inc.php:417
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#: include/diogenes/diogenes.table-editor.inc.php:534
+#: include/diogenes.barrel-editor.inc.php:43 include/Barrel/Page.php:119
+#: include/Barrel/File.php:74 include/admin/menus.php:190
+#: include/Barrel/File.php:92 include/Barrel/Page.php:143
+#: include/Barrel/Editor.php:45
+msgid "edit"
+msgstr "redigera"
+
+#: htdocs/toplevel/index.php:87 include/admin/menus.php:179
+#: include/admin/pages.php:202 include/diogenes.rcs.inc.php:419
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes.barrel-editor.inc.php:52 include/Barrel/Page.php:129
+#: include/Barrel/File.php:77 include/admin/menus.php:191
+#: include/Barrel/File.php:95 include/Barrel/Page.php:153
+#: include/Barrel/Editor.php:54
+msgid "delete"
+msgstr "ta bort"
+
+#: include/admin/menus.php:217 include/admin/menus.php:216
+#: include/admin/menus.php:228
+msgid "External links are denoted with the [ext] prefix."
+msgstr "Externa länkar är märkta med prefixet [ext]."
+
+#: include/admin/menus.php:222 include/admin/menus.php:221
+#: include/admin/menus.php:233
+msgid "Add new entry"
+msgstr "Lägg till ny post"
+
+#: include/admin/files.php:63 include/admin/files.php:86
+#: include/admin/files.php:88
+msgid "Error during file transfer!"
+msgstr "Fel vid filöverföring!"
+
+#: include/admin/files.php:69 include/admin/files.php:92
+#: include/admin/files.php:94
+msgid "Deleting file"
+msgstr "Tar bort fil"
+
+#: include/admin/files.php:81 include/admin/files.php:112
+#: include/admin/files.php:120
+msgid "Revision differences"
+msgstr "Versionsskillnader"
+
+#: include/admin/files.php:90 include/admin/files.php:120
+#: include/admin/files.php:128
+msgid "File revisions"
+msgstr "Filversioner"
+
+#: include/admin/files.php:103 include/admin/files.php:155
+#: include/admin/files.php:194
+msgid "File manager"
+msgstr "Filhanterare"
+
+#: include/admin/files.php:40 include/admin/files.php:38
+msgid "Files in current directory"
+msgstr "Filer i aktuell katalog"
+
+#: include/admin/files.php:41 include/admin/files.php:40
+#: include/admin/files.php:37
+msgid "Import file"
+msgstr "Importera fil"
+
+#: include/admin/files.php:42 include/admin/pages.php:210
+#: include/admin/pages.php:191 include/admin/files.php:39
+#: include/admin/pages.php:163
+msgid "Send"
+msgstr "Skicka"
+
+#: include/admin/files.php:43
+msgid "File to upload"
+msgstr "Fil att ladda upp"
+
+#: include/admin/index.php:20 include/admin/index.php:45
+#: include/admin/index.php:47
+msgid "site created"
+msgstr "sajten skapad"
+
+#: include/admin/index.php:23 include/admin/index.php:50
+#: include/admin/index.php:63
+msgid "page created"
+msgstr "sidan skapad"
+
+#: include/admin/index.php:26 include/admin/index.php:54
+msgid "page deleted"
+msgstr "sidan borttagen"
+
+#: include/admin/index.php:31 include/admin/index.php:59
+#: include/admin/index.php:86
+msgid "file updated"
+msgstr "filen uppdaterad"
+
+#: include/admin/index.php:34 include/admin/index.php:64
+msgid "file removed"
+msgstr "filen borttagen"
+
+#: include/admin/index.php:43 include/admin/index.php:77
+#: include/admin/index.php:105
+msgid "Welcome to the Diogenes backoffice"
+msgstr "Välkommen till Diogenes backoffice"
+
+#: include/admin/files.php:47 include/admin/index.php:44
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/admin/files.php:49 include/admin/index.php:78
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/files.php:46 include/admin/index.php:106
+#: include/diogenes/diogenes.logger-view.inc.php:368
+msgid "date"
+msgstr "datum"
+
+#: include/admin/index.php:45 include/admin/users.php:28
+#: include/diogenes/diogenes.logger-view.inc.php:369
+#: include/admin/index.php:79
+#: include/diogenes/diogenes.logger-view.inc.php:366
+#: include/admin/index.php:107
+#: include/diogenes/diogenes.logger-view.inc.php:365
+msgid "user"
+msgstr "användare"
+
+#: include/admin/index.php:46 include/admin/index.php:80
+#: include/admin/index.php:108
+msgid "event"
+msgstr "händelse"
+
+#: include/admin/pages.php:11 include/admin/pages.php:14
+#: include/admin/pages.php:158
+msgid "Page manager"
+msgstr "Sidhanterare"
+
+#: include/admin/pages.php:13 include/admin/pages.php:16
+#: include/admin/pages.php:15
+msgid "Reset"
+msgstr "Återställ"
+
+#: include/admin/pages.php:14 include/diogenes.barrel.inc.php:312
+#: include/admin/pages.php:17 include/diogenes.barrel.inc.php:343
+#: include/admin/pages.php:16 include/diogenes.barrel.inc.php:339
+msgid "Page properties"
+msgstr "Sidegenskaper"
+
+#: include/admin/pages.php:15 include/admin/files.php:55
+#: include/admin/pages.php:19 include/admin/files.php:52
+#: include/admin/pages.php:18
+msgid "location"
+msgstr "plats"
+
+#: htdocs/toplevel/index.php:10 htdocs/toplevel/logger_actions.php:13
+#: include/admin/options.php:60 include/admin/pages.php:16
+#: include/admin/files.php:56 include/admin/options.php:62
+#: include/admin/pages.php:20 include/admin/files.php:53
+#: include/admin/options.php:64 include/admin/pages.php:19
+msgid "title"
+msgstr "titel"
+
+msgid "display"
+msgstr "visa"
+
+#: include/admin/files.php:56 include/admin/pages.php:22
+msgid "access"
+msgstr "åtkomst"
+
+#: include/admin/pages.php:22 include/admin/pages.php:26
+msgid "Add a page"
+msgstr "Lägg till en sida"
+
+#: include/admin/pages.php:43 include/admin/pages.php:47
+#: include/admin/pages.php:50
+msgid "Document name does not end in .doc"
+msgstr "Dokumentets namn slutar inte med .doc"
+
+#: include/admin/pages.php:46 include/admin/pages.php:50
+#: include/admin/pages.php:53
+msgid "Checking in Word file"
+msgstr "Kollar i Wordfilen"
+
+#: include/admin/pages.php:51 include/admin/pages.php:55
+#: include/admin/pages.php:58
+msgid "Importing Word file"
+msgstr "Importerar Wordfil"
+
+#: include/admin/pages.php:57 include/admin/pages.php:61
+#: include/admin/pages.php:64
+msgid "Importing HTML file"
+msgstr "Importerar HTML-fil"
+
+#: include/admin/pages.php:62 include/admin/pages.php:66
+#: include/admin/pages.php:69
+msgid "Raw file import"
+msgstr "Importera Raw-fil"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "visible"
+msgstr "synlig"
+
+msgid "invisible"
+msgstr "osynlig"
+
+#: htdocs/toplevel/index.php:84 include/admin/pages.php:196
+#: include/diogenes.rcs.inc.php:416 include/diogenes.rcs.inc.php:450
+#: include/diogenes.rcs.inc.php:619 include/Barrel/Page.php:118
+#: include/Barrel/File.php:73 include/admin/files.php:144
+#: include/Barrel/File.php:91 include/Barrel/Page.php:142
+msgid "view"
+msgstr "vy"
+
+#: include/admin/pages.php:197 include/Barrel/Page.php:120
+#: include/Barrel/Page.php:144
+msgid "properties"
+msgstr "egenskaper"
+
+#: include/admin/pages.php:198
+msgid "files"
+msgstr "filer"
+
+#: include/admin/pages.php:199 include/diogenes.rcs.inc.php:418
+#: include/Barrel/Page.php:121 include/Barrel/File.php:75
+#: include/Barrel/File.php:93 include/Barrel/Page.php:145
+msgid "revisions"
+msgstr "versioner"
+
+#: include/admin/pages.php:211 include/admin/pages.php:195
+#: include/admin/pages.php:172
+msgid "Import a Word document"
+msgstr "Importera ett Worddokument"
+
+#: include/admin/pages.php:214 include/admin/pages.php:198
+#: include/admin/pages.php:176
+msgid "This page's master document is currently a Word document."
+msgstr "Den här sidans källdokument är för tillfället ett Worddokument."
+
+#: include/admin/pages.php:215 include/admin/pages.php:199
+#: include/admin/pages.php:177
+msgid "You can upload a new version of the Word document below."
+msgstr "Du kan ladda upp en ny version av Worddokumentet nedan."
+
+#: include/admin/pages.php:216 include/admin/pages.php:200
+#: include/admin/pages.php:178
+msgid "You can get the current version of the file here"
+msgstr "Du kan hämta den aktuella versionen av filen här"
+
+#: include/admin/pages.php:219 include/admin/pages.php:203
+#: include/admin/pages.php:181
+msgid "If you wish, you can set this page's content from a Word document."
+msgstr ""
+"Om du vill kan du välja att innehållet på den här sidan kommer från ett "
+"Worddokument."
+
+#: include/admin/pages.php:220 include/admin/pages.php:204
+#: include/admin/pages.php:182
+msgid "To do so, simply upload the Word document below."
+msgstr "För att göra så är det bara att ladda upp Worddokumentet nedan."
+
+#: include/admin/pages.php:222 include/admin/pages.php:208
+#: include/admin/pages.php:160
+msgid "Import HTML"
+msgstr "Importera HTML"
+
+#: include/admin/pages.php:223 include/admin/pages.php:209
+#: include/admin/pages.php:161
+msgid ""
+"You can replace the current page's contents by uploading an HTML file below."
+msgstr ""
+"Du kan byta ut den aktuella sidans innehåll genom att ladda upp en HTML-fil "
+"nedan."
+
+#: include/admin/pages.php:224 include/admin/pages.php:210
+#: include/admin/pages.php:162
+msgid ""
+"If the file name ends with .htm or .html, anything outside the <body>"
+"</body> pair will be stripped."
+msgstr ""
+"Om filnamnet slutar med .htm eller .html, så tas allt utanför <body>"
+"</body> bort."
+
+#: htdocs/toplevel/admins.php:20 include/admin/users.php:15
+msgid "Could not find requested user"
+msgstr "Kunde inte hitta efterfrågad användare"
+
+#: include/admin/users.php:24
+msgid "Users administration"
+msgstr "Användaradministration"
+
+#: include/admin/users.php:25
+msgid "Registered users"
+msgstr "Registrerade användare"
+
+#: include/admin/users.php:26 include/diogenes.toplevel.inc.php:200
+#: include/diogenes.toplevel.inc.php:94 include/diogenes.toplevel.inc.php:95
+msgid "Administrators"
+msgstr "Administratörer"
+
+#: include/admin/users.php:29
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.table-editor.inc.php:526
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.logger-view.inc.php:369
+msgid "action"
+msgstr "funktion"
+
+#: htdocs/toplevel/admins.php:45 include/admin/users.php:35
+msgid "remove"
+msgstr "ta bort"
+
+#: include/diogenes.session.inc.php:134
+msgid "Diogenes login"
+msgstr "Diogenes login"
+
+#: include/diogenes.session.inc.php:135
+msgid "Connexion"
+msgstr "Anslutning"
+
+#: htdocs/toplevel/accounts.php:16 htdocs/toplevel/boot.php:31
+#: include/diogenes.session.inc.php:136
+msgid "password"
+msgstr "lösenord"
+
+#: include/diogenes.toplevel.inc.php:52 include/diogenes.barrel.inc.php:104
+#: include/diogenes.barrel.inc.php:105 include/diogenes.toplevel.inc.php:53
+#: include/diogenes.barrel.inc.php:107
+msgid "You are not authorized to view this page!"
+msgstr "Du har inte behörighet för att se den här sidan!"
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:187
+#: include/diogenes.admin.inc.php:62 include/diogenes.barrel.inc.php:301
+#: include/diogenes.toplevel.inc.php:81 include/diogenes.barrel.inc.php:332
+#: include/diogenes.admin.inc.php:69 include/diogenes.toplevel.inc.php:39
+#: include/diogenes.toplevel.inc.php:82 include/diogenes.admin.inc.php:68
+#: include/diogenes.barrel.inc.php:328
+msgid "Home"
+msgstr "Hemma"
+
+#: include/diogenes.toplevel.inc.php:192 include/diogenes.barrel.inc.php:303
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:334
+#: include/diogenes.toplevel.inc.php:87 include/diogenes.barrel.inc.php:330
+msgid "Logout"
+msgstr "Logga ut"
+
+#: include/diogenes.toplevel.inc.php:194 include/diogenes.barrel.inc.php:306
+#: include/diogenes.toplevel.inc.php:88 include/diogenes.barrel.inc.php:337
+#: include/diogenes.toplevel.inc.php:89 include/diogenes.barrel.inc.php:333
+msgid "Login"
+msgstr "Login"
+
+#: include/diogenes.admin.inc.php:37 include/diogenes.admin.inc.php:64
+#: include/diogenes.barrel.inc.php:310 include/diogenes.barrel.inc.php:341
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:70
+#: include/diogenes.barrel.inc.php:337
+msgid "Administration"
+msgstr "Administration"
+
+#: include/diogenes.rcs.inc.php:455 include/diogenes.rcs.inc.php:624
+#: include/admin/files.php:149
+msgid "diff to"
+msgstr "skillnad från"
+
+#: include/diogenes.rcs.inc.php:459 include/diogenes.rcs.inc.php:628
+#: include/admin/files.php:153
+msgid "restore"
+msgstr "återskapa"
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "Admin manual"
+msgstr "Admin manual"
+
+msgid "Settings"
+msgstr "Inställningar"
+
+#: include/diogenes.toplevel.inc.php:202 include/diogenes.admin.inc.php:67
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:78
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.admin.inc.php:77
+msgid "Users"
+msgstr "Användare"
+
+#: include/diogenes.admin.inc.php:68 include/diogenes.admin.inc.php:80
+#: include/diogenes.admin.inc.php:79
+msgid "Content"
+msgstr "Innehåll"
+
+#: include/diogenes.admin.inc.php:69 include/diogenes.admin.inc.php:81
+#: include/diogenes.admin.inc.php:80
+msgid "Pages catalog"
+msgstr "Sidornas katalog"
+
+#: include/diogenes.admin.inc.php:70 include/diogenes.admin.inc.php:82
+#: include/diogenes.admin.inc.php:81
+msgid "Edit style sheet"
+msgstr "Editera style sheet"
+
+#: include/diogenes.admin.inc.php:71 include/diogenes.admin.inc.php:83
+#: include/diogenes.admin.inc.php:82
+msgid "Edit menu"
+msgstr "Editera menyen"
+
+#: include/diogenes.toplevel.inc.php:38 include/diogenes.toplevel.inc.php:39
+msgid "Toplevel administration"
+msgstr "Huvudadministration"
+
+#: include/diogenes.page.inc.php:59
+msgid "Powered by Diogenes"
+msgstr "Powered by Diogenes"
+
+#: include/diogenes.page.inc.php:213 include/diogenes.page.inc.php:216
+#: include/diogenes.page.inc.php:212
+msgid "The requested document was not found."
+msgstr "Det efterfrågade dokumentet hittades inte."
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "User manual"
+msgstr "Användarmanual"
+
+#: include/diogenes.toplevel.inc.php:191 include/diogenes.barrel.inc.php:304
+#: include/diogenes.toplevel.inc.php:85 include/diogenes.barrel.inc.php:335
+#: include/diogenes.toplevel.inc.php:86 include/diogenes.barrel.inc.php:331
+msgid "Preferences"
+msgstr "Inställningar"
+
+#: include/diogenes.toplevel.inc.php:197 include/diogenes.toplevel.inc.php:91
+#: include/diogenes.toplevel.inc.php:92
+msgid "Sites"
+msgstr "Sajter"
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "Root manual"
+msgstr "Källmanual"
+
+#: htdocs/toplevel/index.php:8 include/diogenes.toplevel.inc.php:199
+#: htdocs/toplevel/index.php:11 include/diogenes.toplevel.inc.php:93
+#: htdocs/toplevel/index.php:16 include/diogenes.toplevel.inc.php:94
+msgid "List of sites"
+msgstr "Lista över sajter"
+
+#: htdocs/toplevel/admins.php:7
+msgid "Site administrators"
+msgstr "Sajtadministratörer"
+
+#: htdocs/toplevel/accounts.php:7 include/diogenes.toplevel.inc.php:203
+#: include/diogenes.toplevel.inc.php:98 include/diogenes.toplevel.inc.php:99
+msgid "User accounts"
+msgstr "Användarkonton"
+
+#: include/diogenes.toplevel.inc.php:204 include/diogenes.toplevel.inc.php:99
+#: include/diogenes.toplevel.inc.php:100
+msgid "Browse user log"
+msgstr "Bläddra igenom användarloggen"
+
+#: htdocs/toplevel/logger_actions.php:8 include/diogenes.toplevel.inc.php:205
+#: include/diogenes.toplevel.inc.php:100 include/diogenes.toplevel.inc.php:101
+msgid "Logger actions"
+msgstr "Logghändelser"
+
+#: include/diogenes.page.inc.php:198 include/diogenes.page.inc.php:201
+#: include/diogenes.page.inc.php:197
+msgid "Diogenes error"
+msgstr "Diogenes fel"
+
+#: include/diogenes.page.inc.php:199 include/diogenes.page.inc.php:202
+#: include/diogenes.page.inc.php:198
+msgid "Error"
+msgstr "Fel"
+
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+#: include/diogenes/diogenes.logger-view.inc.php:336
+msgid "view session"
+msgstr "visa session"
+
+#: include/diogenes/diogenes.logger-view.inc.php:339
+#: include/diogenes/diogenes.logger-view.inc.php:338
+#: include/diogenes/diogenes.logger-view.inc.php:337
+msgid "user's log"
+msgstr "användarens logg"
+
+#: htdocs/toplevel/logger.php:7
+msgid "User activity log"
+msgstr "Användarens aktivitetslogg"
+
+#: htdocs/toplevel/accounts.php:17 htdocs/toplevel/boot.php:32
+msgid "permissions"
+msgstr "tillåtelser"
+
+#: htdocs/toplevel/accounts.php:19 htdocs/toplevel/admins.php:46
+msgid "view log"
+msgstr "visa logg"
+
+#: htdocs/toplevel/admins.php:9
+msgid "administrator"
+msgstr "administratör"
+
+#: htdocs/toplevel/admins.php:10 htdocs/toplevel/index.php:11
+#: include/admin/files.php:50 include/admin/menus.php:220
+#: include/admin/pages.php:21
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/admin/files.php:52 include/admin/menus.php:219
+#: include/admin/pages.php:25
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/admin/files.php:49 include/admin/menus.php:231
+#: include/diogenes/diogenes.logger-view.inc.php:374
+msgid "actions"
+msgstr "händelser"
+
+#: htdocs/toplevel/admins.php:43
+msgid "site users"
+msgstr "sajtanvändare"
+
+#: htdocs/toplevel/admins.php:44
+msgid "demote to user"
+msgstr "överlåt till användare"
+
+#: htdocs/toplevel/index.php:9 include/diogenes.barrel-editor.inc.php:151
+#: include/Barrel/Editor.php:158
+msgid "alias"
+msgstr "alias"
+
+#: htdocs/toplevel/index.php:13 include/admin/options.php:62
+#: include/admin/options.php:64 include/diogenes.barrel-editor.inc.php:154
+#: include/admin/options.php:66 include/Barrel/Editor.php:161
+msgid "keywords"
+msgstr "nyckelord"
+
+#: htdocs/toplevel/index.php:14 include/diogenes.barrel-editor.inc.php:155
+#: include/Barrel/Editor.php:162
+msgid "Create a new site"
+msgstr "Skapa en ny sajt"
+
+#: htdocs/toplevel/index.php:17 include/diogenes.barrel-editor.inc.php:158
+#: include/Barrel/Editor.php:166
+msgid "vhost (see note)"
+msgstr "vhost (se anteckning)"
+
+#: htdocs/toplevel/index.php:19 include/diogenes.barrel-editor.inc.php:160
+#: include/Barrel/Editor.php:168
+msgid "flags"
+msgstr "flaggor"
+
+#: htdocs/toplevel/index.php:86 include/diogenes.barrel-editor.inc.php:45
+#: include/Barrel/Editor.php:47
+msgid "admin"
+msgstr "admin"
+
+#: include/diogenes.admin.inc.php:65 include/diogenes.admin.inc.php:72
+#: include/diogenes.admin.inc.php:71
+msgid "Activity"
+msgstr "Aktivitet"
+
+#: htdocs/toplevel/accounts.php:14 htdocs/toplevel/boot.php:29
+msgid "first name"
+msgstr "förnamn"
+
+#: htdocs/toplevel/accounts.php:15 htdocs/toplevel/boot.php:30
+msgid "last name"
+msgstr "efternamn"
+
+#: include/admin/compose.php:16 include/admin/edit.php:15
+#: include/diogenes.admin.inc.php:44
+msgid "Directory not found"
+msgstr "Katalog hittades inte"
+
+#: include/admin/pages.php:19 include/admin/pages.php:23
+#: include/admin/files.php:57
+msgid "read access"
+msgstr "läsbehörighet"
+
+#: include/admin/pages.php:20 include/admin/pages.php:24
+#: include/admin/files.php:58
+msgid "write access"
+msgstr "skrivbehörighet"
+
+#: include/admin/pages.php:83
+msgid "world-writable pages are not allowed with PHP execution enabled!"
+msgstr "världsskrivbara sidor är inte tillåtna med PHP exekvering påslagen!"
+
+#: include/diogenes.barrel.inc.php:314 include/diogenes.barrel.inc.php:345
+#: include/diogenes.barrel.inc.php:341
+msgid "Edit this page"
+msgstr "Editera den här sidan"
+
+#: include/diogenes.barrel.inc.php:315 include/diogenes.barrel.inc.php:346
+#: include/diogenes.barrel.inc.php:342
+msgid "Raw editor"
+msgstr "Raw editor"
+
+#: htdocs/toplevel/options.php:90 htdocs/toplevel/options_expert.php:56
+msgid "Convert"
+msgstr "Konvertera"
+
+#: htdocs/toplevel/options.php:95 htdocs/toplevel/options_expert.php:61
+msgid ""
+"You are currently using RCS as the version control system for your barrels."
+msgstr ""
+"Du använder för närvarande RCS som versionskontrollsystem för dina tunnor."
+
+#: htdocs/toplevel/options.php:96 htdocs/toplevel/options_expert.php:62
+msgid "You can switch to a full CVS repository by clicking here."
+msgstr ""
+"Du kan byta till en fullständig CVS-förvaringsplats genom att klicka här."
+
+#: htdocs/toplevel/options.php:100 htdocs/toplevel/options_expert.php:66
+msgid ""
+"You are currently using CVS as the version control system for your barrels."
+msgstr ""
+"Du använder för närvarande CVS som versionskontrollsystem för dina tunnor."
+
+#: htdocs/toplevel/options.php:101 htdocs/toplevel/options_expert.php:67
+msgid "You can switch back to RCS by clicking here."
+msgstr "Du kan byta tillbaka till RCS genom att klicka här."
+
+#: include/admin/files.php:44 include/admin/files.php:46
+#: include/admin/files.php:43
+msgid "file"
+msgstr "fil"
+
+#: include/admin/files.php:46 include/admin/files.php:48
+#: include/admin/files.php:45
+msgid "version"
+msgstr "version"
+
+#: include/admin/files.php:48 include/admin/files.php:50
+#: include/admin/files.php:47
+msgid "author"
+msgstr "författare"
+
+#: include/admin/files.php:49 include/admin/files.php:51
+#: include/admin/files.php:48
+msgid "size"
+msgstr "storlek"
+
+#: include/admin/pages.php:91 include/Barrel/Page.php:205
+#: include/Barrel/Page.php:248
+msgid "the page location cannot contain spaces or special characters"
+msgstr "sidans plats kan inte innehålla mellanslag eller specialsymboler"
+
+#: include/admin/pages.php:95 include/Barrel/Page.php:212
+#: include/Barrel/Page.php:255
+msgid "this location cannot be used, it is reserved by Diogenes"
+msgstr "platsen kan inte användas, den är reserverad av Diogenes"
+
+#: include/admin/files.php:45 include/admin/files.php:47
+#: include/admin/files.php:44
+msgid "log"
+msgstr "logg"
+
+#: include/admin/menus.php:145 include/admin/menus.php:146
+#: include/admin/menus.php:158
+msgid "entry title"
+msgstr "postens titel"
+
+#: include/admin/menus.php:146 include/admin/menus.php:147
+#: include/admin/menus.php:159
+msgid "type of link"
+msgstr "typ av länk"
+
+#: include/admin/menus.php:218 include/admin/menus.php:217
+#: include/admin/menus.php:229
+msgid "menu name"
+msgstr "menynamn"
+
+#: include/admin/menus.php:219 include/admin/menus.php:218
+#: include/admin/menus.php:230
+msgid "link"
+msgstr "länk"
+
+#: htdocs/toplevel/options.php:80 htdocs/toplevel/options_expert.php:8
+#: include/diogenes.toplevel.inc.php:201 htdocs/toplevel/options.php:43
+#: include/diogenes.toplevel.inc.php:95 include/diogenes.toplevel.inc.php:96
+msgid "Global options"
+msgstr "Globala valmöjligheter"
+
+msgid "menu options"
+msgstr "menyvalmöjligheter"
+
+#: htdocs/toplevel/options.php:83 include/admin/options.php:69
+#: htdocs/toplevel/options.php:46 include/admin/options.php:71
+#: include/admin/options.php:73
+msgid "menu style"
+msgstr "menystil"
+
+#: htdocs/toplevel/options.php:84 include/admin/options.php:70
+#: htdocs/toplevel/options.php:47 include/admin/options.php:72
+#: include/admin/options.php:74
+msgid "menu theme"
+msgstr "menytema"
+
+#: htdocs/toplevel/options.php:91 htdocs/toplevel/options_expert.php:57
+msgid "version control system"
+msgstr "versionskontrollssystem"
+
+#: include/admin/options.php:6 include/admin/options.php:7
+msgid "Site options"
+msgstr "Sajtens valmöjligheter"
+
+#: include/admin/options.php:55 include/admin/options.php:57
+#: include/admin/options.php:59
+msgid "fully expanded"
+msgstr "fullt expanderad"
+
+#: include/admin/options.php:71 include/admin/options.php:73
+#: include/admin/options.php:75
+msgid "minimum menu levels to expand"
+msgstr "minimum menynivåer att expandera"
+
+#: include/diogenes.admin.inc.php:66 include/diogenes.admin.inc.php:73
+#: include/diogenes.admin.inc.php:72
+msgid "Options"
+msgstr "Valmöjligheter"
+
+#: include/admin/options.php:59 include/admin/options.php:61
+#: include/admin/options.php:63
+msgid "general options"
+msgstr "generella valmöjligheter"
+
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:365
+#: include/diogenes/diogenes.logger-view.inc.php:364
+msgid "session properties"
+msgstr "sessionegenskaper"
+
+#: include/diogenes/diogenes.logger-view.inc.php:370
+#: include/diogenes/diogenes.logger-view.inc.php:367
+#: include/diogenes/diogenes.logger-view.inc.php:366
+msgid "host"
+msgstr "värd"
+
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:368
+#: include/diogenes/diogenes.logger-view.inc.php:367
+msgid "browser"
+msgstr "browser"
+
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:371
+#: include/diogenes/diogenes.logger-view.inc.php:370
+msgid "data"
+msgstr "data"
+
+#: include/diogenes/diogenes.logger-view.inc.php:375
+#: include/diogenes/diogenes.logger-view.inc.php:372
+#: include/diogenes/diogenes.logger-view.inc.php:371
+msgid "filter by"
+msgstr "sortera efter"
+
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:373
+#: include/diogenes/diogenes.logger-view.inc.php:372
+msgid "start"
+msgstr "starta"
+
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:374
+#: include/diogenes/diogenes.logger-view.inc.php:373
+msgid "summary"
+msgstr "summering"
+
+#: include/diogenes/diogenes.logger-view.inc.php:379
+#: include/diogenes/diogenes.logger-view.inc.php:376
+#: include/diogenes/diogenes.logger-view.inc.php:375
+msgid "year"
+msgstr "år"
+
+#: include/diogenes/diogenes.logger-view.inc.php:380
+#: include/diogenes/diogenes.logger-view.inc.php:377
+#: include/diogenes/diogenes.logger-view.inc.php:376
+msgid "month"
+msgstr "månad"
+
+#: include/diogenes/diogenes.logger-view.inc.php:381
+#: include/diogenes/diogenes.logger-view.inc.php:378
+#: include/diogenes/diogenes.logger-view.inc.php:377
+msgid "day"
+msgstr "dag"
+
+#: include/diogenes/diogenes.table-editor.inc.php:525
+#: include/diogenes/diogenes.table-editor.inc.php:530
+msgid "id"
+msgstr "id"
+
+#: include/diogenes/diogenes.table-editor.inc.php:527
+#: include/diogenes/diogenes.table-editor.inc.php:532
+msgid "create"
+msgstr "skapa"
+
+#: include/diogenes/diogenes.table-editor.inc.php:530
+#: include/diogenes/diogenes.table-editor.inc.php:535
+msgid "new entry"
+msgstr "nytt inlägg"
+
+#: include/diogenes/diogenes.table-editor.inc.php:531
+#: include/diogenes/diogenes.table-editor.inc.php:536
+msgid "existing entry"
+msgstr "existerande inlägg"
+
+#: include/diogenes/diogenes.table-editor.inc.php:532
+#: include/diogenes/diogenes.table-editor.inc.php:537
+msgid "(blank = no change)"
+msgstr "(blank = ingen förändring)"
+
+#: include/diogenes/diogenes.table-editor.inc.php:533
+#: include/diogenes/diogenes.table-editor.inc.php:538
+msgid "back"
+msgstr "tillbaka"
+
+#: include/diogenes/diogenes.table-editor.inc.php:535
+#: include/diogenes/diogenes.table-editor.inc.php:540
+msgid "You are about to delete this entry. Do you want to proceed?"
+msgstr "Du håller på att ta bort den här posten. Vill du fortsätta?"
+
+#: include/diogenes.session.inc.php:62 include/diogenes.session.inc.php:71
+msgid "Authentication error!"
+msgstr "Autenticeringsfel!"
+
+#: include/admin/files.php:84 include/admin/files.php:93
+#: include/admin/files.php:102 include/admin/pages.php:158
+#: include/admin/compose.php:57 include/admin/edit.php:49
+#: include/admin/files.php:114 include/admin/files.php:122
+#: include/admin/files.php:154 include/admin/pages.php:124
+#: include/admin/compose.php:61 include/admin/edit.php:53
+#: include/admin/plugins.php:23 include/admin/files.php:61
+#: include/admin/pages.php:122
+msgid "Page"
+msgstr "Sida"
+
+#: include/admin/files.php:86 include/admin/files.php:95
+#: include/admin/pages.php:172 include/admin/compose.php:63
+#: include/admin/edit.php:55 include/admin/files.php:115
+#: include/admin/files.php:123 include/admin/pages.php:136
+#: include/admin/compose.php:62 include/admin/edit.php:54
+#: include/admin/files.php:122 include/admin/files.php:161
+#: include/admin/pages.php:123
+msgid "File"
+msgstr "Fil"
+
+#: htdocs/toplevel/index.php:15 include/diogenes.barrel-editor.inc.php:156
+#: include/Barrel/Editor.php:163
+msgid "The site alias may only contain letters, numbers and underscores."
+msgstr ""
+"Alias för sajten får endast bestå av bokstäver, siffror och understreck."
+
+#: htdocs/toplevel/index.php:18 include/diogenes.barrel-editor.inc.php:159
+#: include/Barrel/Editor.php:167
+msgid ""
+"<b>vhost note</b>: If you intend to serve this site from a virtualhost, you "
+"should enter the name of the virtualhost in this field."
+msgstr ""
+"<b>vhost anmärkning</b>: Om sajten kommer att användas från en virtualhost, "
+"så måste du fylla i namnet på virtualhost i detta fält."
+
+#: htdocs/toplevel/index.php:55
+msgid "PHP execution"
+msgstr "PHP-exekvering"
+
+#: htdocs/toplevel/index.php:55 include/diogenes.barrel-editor.inc.php:106
+#: include/Barrel/Editor.php:113
+msgid "custom templates"
+msgstr "egna mallar"
+
+msgid "template options"
+msgstr "mallvalmöjligheter"
+
+#: htdocs/toplevel/options.php:85 include/admin/options.php:66
+#: htdocs/toplevel/options.php:48 include/admin/options.php:68
+#: include/admin/options.php:70
+msgid "templates directory"
+msgstr "mallkatalog"
+
+#: htdocs/toplevel/options.php:86 include/admin/options.php:67
+#: htdocs/toplevel/options.php:49 include/admin/options.php:69
+#: include/admin/options.php:71
+msgid "default template"
+msgstr "standardmall"
+
+#: include/admin/compose.php:56 include/admin/edit.php:46
+#: include/admin/compose.php:58 include/admin/edit.php:48
+msgid "log message"
+msgstr "loggmeddelande"
+
+#: include/admin/options.php:63 include/admin/options.php:65
+#: include/admin/options.php:67
+msgid "favicon"
+msgstr "favicon"
+
+#: include/admin/options.php:64 include/admin/options.php:66
+#: include/admin/options.php:68
+msgid "(relative url to a PNG image)"
+msgstr "(relativ sökväg till en PNG bildfil)"
+
+#: include/admin/pages.php:17 include/admin/files.php:57
+#: include/admin/pages.php:21 include/admin/files.php:54
+#: include/admin/pages.php:20
+msgid "page template"
+msgstr "sidmall"
+
+#: include/admin/pages.php:18 include/admin/files.php:58
+#: include/admin/pages.php:22 include/admin/files.php:55
+#: include/admin/pages.php:21
+msgid "status"
+msgstr "status"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "under construction"
+msgstr "under konstruktion"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "disabled"
+msgstr "inaktiverad"
+
+#: include/admin/pages.php:184 include/admin/pages.php:169
+#: include/admin/pages.php:167
+msgid "archived"
+msgstr "arkiverad"
+
+#: include/diogenes.barrel.inc.php:152 include/diogenes.barrel.inc.php:153
+#: include/diogenes.barrel.inc.php:155
+msgid "This page is currently under construction."
+msgstr "Sidan är för närvarande under konstruktion."
+
+#: include/diogenes.barrel.inc.php:156 include/diogenes.barrel.inc.php:157
+#: include/diogenes.barrel.inc.php:159
+msgid "This page is currently unavailable."
+msgstr "Sidan är för närvarande otillgänglig."
+
+#: include/diogenes.admin.inc.php:63 include/diogenes.admin.inc.php:70
+#: include/diogenes.admin.inc.php:69
+msgid "http://diogenes-doc.polytechnique.org/en-admin/"
+msgstr "http://diogenes-doc.polytechnique.org/en-admin/"
+
+#: include/diogenes.toplevel.inc.php:188 include/diogenes.toplevel.inc.php:82
+#: include/diogenes.toplevel.inc.php:83
+msgid "http://diogenes-doc.polytechnique.org/en-user/"
+msgstr "http://diogenes-doc.polytechnique.org/en-user/"
+
+#: include/diogenes.toplevel.inc.php:198 include/diogenes.toplevel.inc.php:92
+#: include/diogenes.toplevel.inc.php:93
+msgid "http://diogenes-doc.polytechnique.org/en-root/"
+msgstr "http://diogenes-doc.polytechnique.org/en-root/"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "Mode"
+msgstr ""
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+#, fuzzy
+msgid "standard"
+msgstr "starta"
+
+#: htdocs/toplevel/options.php:81 htdocs/toplevel/options_expert.php:9
+#: htdocs/toplevel/options.php:44
+msgid "expert"
+msgstr ""
+
+#: htdocs/toplevel/options.php:82 include/admin/options.php:65
+#: htdocs/toplevel/options.php:45 include/admin/options.php:67
+#: include/admin/options.php:69
+#, fuzzy
+msgid "display options"
+msgstr "mallvalmöjligheter"
+
+#: htdocs/toplevel/options.php:87 htdocs/toplevel/options.php:50
+#, fuzzy
+msgid "system options"
+msgstr "Sajtens valmöjligheter"
+
+msgid "Initial user setup"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:11
+msgid ""
+"Sorry, this feature is only available using native Diogenes authentication."
+msgstr ""
+
+#: htdocs/toplevel/boot.php:19
+msgid "The database is already configured."
+msgstr ""
+
+#: htdocs/toplevel/options_expert.php:13 htdocs/toplevel/options_expert.php:75
+#: htdocs/toplevel/options_expert.php:76
+#, fuzzy
+msgid "option"
+msgstr "Valmöjligheter"
+
+#: htdocs/toplevel/options_expert.php:14 htdocs/toplevel/options_expert.php:76
+#: htdocs/toplevel/options_expert.php:77
+msgid "value"
+msgstr ""
+
+#: include/admin/menus.php:221 include/admin/menus.php:220
+#: include/admin/menus.php:232
+msgid "Menu"
+msgstr ""
+
+#: include/diogenes.page.inc.php:65 include/diogenes.page.inc.php:66
+msgid "debugging"
+msgstr ""
+
+#: include/diogenes.page.inc.php:66 include/diogenes.page.inc.php:67
+msgid "call trace"
+msgstr ""
+
+#: include/diogenes.page.inc.php:67 include/diogenes.page.inc.php:68
+msgid "database trace"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:59
+#: include/diogenes/diogenes.logger-view.inc.php:85
+#: include/diogenes/diogenes.logger-view.inc.php:130
+#: include/diogenes/diogenes.logger-view.inc.php:183
+#: include/diogenes/diogenes.logger-view.inc.php:58
+#: include/diogenes/diogenes.logger-view.inc.php:84
+#: include/diogenes/diogenes.logger-view.inc.php:129
+#: include/diogenes/diogenes.logger-view.inc.php:182
+msgid "all"
+msgstr ""
+
+#: include/diogenes/diogenes.logger-view.inc.php:363
+#: include/diogenes/diogenes.logger-view.inc.php:360
+#: include/diogenes/diogenes.logger-view.inc.php:359
+msgid "Please select a year and/or a user."
+msgstr ""
+
+#: include/diogenes/diogenes.table-editor.inc.php:523
+#: include/diogenes/diogenes.table-editor.inc.php:528
+#, fuzzy
+msgid "previous page"
+msgstr "visa sida"
+
+#: include/diogenes/diogenes.table-editor.inc.php:524
+#: include/diogenes/diogenes.table-editor.inc.php:529
+#, fuzzy
+msgid "next page"
+msgstr "visa sida"
+
+#: htdocs/toplevel/boot.php:7
+msgid "Initial setup"
+msgstr ""
+
+#: htdocs/toplevel/boot.php:46
+msgid "The initial setup of the database was performed successfuly."
+msgstr ""
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+#, fuzzy
+msgid "no"
+msgstr "ingen"
+
+#: include/admin/options.php:47 include/admin/options.php:49
+#: include/admin/options.php:51
+msgid "yes"
+msgstr ""
+
+#: include/admin/options.php:68 include/admin/options.php:70
+#: include/admin/options.php:72
+#, fuzzy
+msgid "hide Diogenes menu"
+msgstr "Sajtens menyer"
+
+#: include/admin/prefs.php:28
+#, fuzzy
+msgid "account preferences"
+msgstr "Diogenes inställningar"
+
+#: htdocs/toplevel/plugins.php:19
+msgid "Barrel plugins"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:21
+#, fuzzy
+msgid "Global plugin settings"
+msgstr "Globala valmöjligheter"
+
+#: htdocs/toplevel/plugins.php:38
+#, php-format
+msgid "Rebuilding plugin cache for barrel '%s'"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:47
+msgid "Clean plugins database"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:48
+msgid ""
+"If you are having problems with references to plugins that no longer exist, "
+"you can have Diogenes remove such entries from the database."
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:49
+msgid "Clean"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:51
+msgid "Enable or disable plugins"
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:54
+msgid "You can select the plugins you want to enable for this barrel."
+msgstr ""
+
+#: htdocs/toplevel/plugins.php:56
+msgid ""
+"You can select the plugins you want to enable or disable globally, that is "
+"the plugins that can be used in the different barrels. Please note that for "
+"a plugin to be accessible from a barrel, you will need to activate that "
+"plugin for the barrel. To do this, from the <i>List of sites</i> click on "
+"'plugins' next to the barrel of your choice."
+msgstr ""
+
+#: htdocs/toplevel/options.php:52
+#, fuzzy
+msgid "Word document import"
+msgstr "Importera ett Worddokument"
+
+#: include/admin/files.php:39
+#, fuzzy
+msgid "File operations"
+msgstr "Sajtens valmöjligheter"
+
+#: include/admin/files.php:43 include/admin/files.php:40
+#, fuzzy
+msgid "Create an empty file"
+msgstr "Skapa en ny sajt"
+
+#: include/admin/files.php:44 include/admin/files.php:41
+msgid "Copy or move a file"
+msgstr ""
+
+#: include/admin/files.php:45 include/admin/files.php:42
+#, fuzzy
+msgid "Create"
+msgstr "skapa"
+
+#: include/admin/files.php:53 include/admin/files.php:50
+msgid "to"
+msgstr ""
+
+#: include/admin/files.php:59
+#, fuzzy
+msgid "read"
+msgstr "skapa"
+
+#: include/admin/files.php:60
+#, fuzzy
+msgid "write"
+msgstr "sajt"
+
+#: include/admin/files.php:67 include/admin/files.php:69
+#, fuzzy
+msgid "Creating empty file"
+msgstr "Tar bort fil"
+
+#: include/admin/files.php:69 include/admin/files.php:71
+msgid "The specified file already exists!"
+msgstr ""
+
+#: include/admin/files.php:155 include/admin/pages.php:160
+#: include/admin/plugins.php:22 include/admin/files.php:194
+#: include/admin/pages.php:156 include/Barrel/Page.php:170
+#, fuzzy
+msgid "home"
+msgstr "Hemma"
+
+#: include/admin/files.php:182 include/admin/files.php:224
+msgid "Copy"
+msgstr ""
+
+#: include/admin/files.php:182 include/admin/files.php:224
+#, fuzzy
+msgid "Move"
+msgstr "ta bort"
+
+#: include/admin/pages.php:18 include/admin/pages.php:17
+#: include/Barrel/Page.php:171
+#, fuzzy
+msgid "parent page"
+msgstr "visa sida"
+
+#: include/admin/webdav.php:7 include/diogenes.admin.inc.php:79
+#: include/diogenes.admin.inc.php:78
+msgid "WebDAV"
+msgstr ""
+
+#: include/admin/webdav.php:9 include/admin/webdav.php:11
+msgid ""
+"You can access your barrel's files using WebDAV by pointing your WebDAV "
+"client to the following address."
+msgstr ""
+
+#: include/admin/plugins.php:22
+msgid "Page plugins "
+msgstr ""
+
+#: include/admin/plugins.php:26
+msgid "Available plugins"
+msgstr ""
+
+#: include/diogenes.page.inc.php:69 include/diogenes.barrel-editor.inc.php:50
+#: include/diogenes.barrel-editor.inc.php:106 include/Barrel/Page.php:126
+#: include/Barrel/Page.php:152 include/diogenes.plugin-editor.inc.php:237
+#: include/Barrel/Page.php:150 include/Barrel/Page.php:178
+#: include/Barrel/Editor.php:52 include/Barrel/Editor.php:113
+#: include/Plugin/Editor.php:266 include/diogenes.page.inc.php:68
+msgid "plugins"
+msgstr ""
+
+#: include/diogenes.toplevel.inc.php:96 include/diogenes.admin.inc.php:76
+#: include/diogenes.toplevel.inc.php:97 include/diogenes.admin.inc.php:75
+msgid "Plugins"
+msgstr ""
+
+#: include/Barrel/Page.php:70 include/Barrel/Page.php:89
+msgid "Not deleting page, it has child pages!"
+msgstr ""
+
+#: include/Barrel/File.php:76 include/Barrel/File.php:94
+#, fuzzy
+msgid "rename"
+msgstr "användarnamn"
+
+#: include/diogenes.plugin-editor.inc.php:236 include/Plugin/Editor.php:265
+#, fuzzy
+msgid "plugin"
+msgstr "länk"
+
+#: include/diogenes.plugin-editor.inc.php:239 include/Plugin/Editor.php:268
+#, fuzzy
+msgid "parameters"
+msgstr "egenskaper"
+
+#: include/admin/files.php:192
+msgid "Document"
+msgstr ""
+
+#: include/admin/index.php:52
+#, fuzzy
+msgid "barrel options"
+msgstr "Globala valmöjligheter"
+
+#: include/admin/index.php:57
+#, fuzzy
+msgid "barrel plugins"
+msgstr "Globala valmöjligheter"
+
+#: include/admin/index.php:68
+#, fuzzy
+msgid "page removed"
+msgstr "sidan skapad"
+
+#: include/admin/index.php:80
+#, fuzzy
+msgid "page plugins"
+msgstr "länk"
+
+#: include/admin/index.php:92
+#, fuzzy
+msgid "file deleted"
+msgstr "sidan borttagen"
+
+#: include/admin/webdav.php:14
+msgid ""
+"In order to access your barrel's files using WebDAV, please ask your "
+"Diogenes administrator to enable this feature in the Diogenes configuration "
+"file."
+msgstr ""
+
+#: include/Barrel/Page.php:81
+#, fuzzy
+msgid "Deleting page"
+msgstr "Tar bort fil"
+
+#: include/Barrel/Page.php:176
+#, fuzzy
+msgid "add a page"
+msgstr "Lägg till en sida"
+
+#: include/Barrel/Page.php:266
+#, fuzzy
+msgid "Creating new page"
+msgstr "Tar bort fil"
+
+#: include/Barrel/Editor.php:165
+msgid "no barrels available"
+msgstr ""
+
+#: htdocs/toplevel/index.php:13
+msgid ""
+"Warning : in order to make use of virtual hosts or WebDAV, you need to set "
+"$globals->rooturl to a full URL starting with http:// or https:// in your "
+"Diogenes configuration file."
+msgstr ""
--- /dev/null
+/* insert your CSS customisations below */
+
+body {
+ background-color: #60a5e0;
+ color: inherit;
+}
+
+.menu .item a {
+ background-color: #4080c0;
+ color: inherit;
+}
+
+.menu .item a.odd {
+ background-color: #4590d0;
+ color: inherit;
+}
+
+.menu .item a:hover {
+ background-color: #3050d0;
+ color: white;
+}
+
+.menu .item a.top {
+ background-color: #2050a0;
+ color: white;
+}
+
+/* table class 'light' */
+table.light {
+ border-collapse: collapse;
+ background-color: #edf8ff;
+ border: 2px solid #2050a0;
+ color: black;
+}
+
+table.light tr.odd {
+ background-color: #90c0e0;
+}
+
+table.light th {
+ background-color: #2050a0;
+ color: white;
+}
--- /dev/null
+<form name="modif" method="post" action="{$post}">
+<input type="hidden" name="action" value="update" />
+<input type="hidden" name="file" value="{$file}" />
+<input type="hidden" name="dir" value="{$dir}" />
+
+<table class="light">
+<tr>
+ <th>{$source}</th>
+</tr>
+<tr>
+ <td>
+ <textarea name="file_content" rows="30" cols="80">{$file_content}</textarea>
+ </td>
+</tr>
+<tr>
+ <td>
+ {$msg_log}
+ <input type="text" name="message" size="50" />
+ <input type="submit" value="{$submit}" />
+ </td>
+</tr>
+</table>
+
+</form>
--- /dev/null
+{literal}
+<script type="text/javascript">
+<!--
+function doUpdate()
+{
+ document.modif.file_content.value = document.Ekit.getDocumentBody();
+ document.modif.submit();
+}
+-->
+</script>
+{/literal}
+
+
+<APPLET CODEBASE="." CODE="com.hexidec.ekit.EkitApplet.class" ARCHIVE="ekitapplet.jar" NAME="Ekit" WIDTH="800" HEIGHT="600" MAYSCRIPT>
+ <PARAM NAME="codebase" VALUE=".">
+ <PARAM NAME="code" VALUE="com.hexidec.ekit.EkitApplet.class">
+ <PARAM NAME="archive" VALUE="ekitapplet.jar">
+ <PARAM NAME="name" VALUE="Ekit">
+ <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
+ <PARAM NAME="scriptable" VALUE="true">
+ <PARAM NAME="BASEURL" VALUE="{$dirloc}">
+ <PARAM NAME="DOCUMENT" VALUE="{$file_content}">
+ <PARAM NAME="BASE64" VALUE="true">
+ <PARAM NAME="STYLESHEET" VALUE="{$cssfiles}">
+ <PARAM NAME="LANGCODE" VALUE="en">
+ <PARAM NAME="LANGCOUNTRY" VALUE="US">
+ <PARAM NAME="TOOLBAR" VALUE="true">
+ <PARAM NAME="SOURCEVIEW" VALUE="false">
+ <PARAM NAME="EXCLUSIVE" VALUE="true">
+ <PARAM NAME="MENUICONS" VALUE="true">
+ <PARAM NAME="MENU_EDIT" VALUE="true">
+ <PARAM NAME="MENU_VIEW" VALUE="true">
+ <PARAM NAME="MENU_FONT" VALUE="true">
+ <PARAM NAME="MENU_FORMAT" VALUE="true">
+ <PARAM NAME="MENU_INSERT" VALUE="true">
+ <PARAM NAME="MENU_TABLE" VALUE="true">
+ <PARAM NAME="MENU_FORMS" VALUE="true">
+ <PARAM NAME="MENU_SEARCH" VALUE="true">
+ <PARAM NAME="MENU_TOOLS" VALUE="true">
+ <PARAM NAME="MENU_HELP" VALUE="true">
+</APPLET>
+
+
+<form name="modif" method="post" action="{$post}">
+<input type="hidden" name="action" value="update" />
+<input type="hidden" name="file" value="{$file}" />
+<input type="hidden" name="dir" value="{$dir}" />
+<input type="hidden" name="file_content" value="" />
+
+<table class="light" style="width:800px">
+<tr>
+ <td>
+ {$msg_log}
+ <input type="text" name="message" size="50" />
+ <input type="button" value="update" onClick="doUpdate();" />
+ </td>
+</tr>
+</table>
+
+</form>
--- /dev/null
+{if $canedit}
+<form method="post" action="{$post}" enctype="multipart/form-data">
+<input type="hidden" name="dir" value="{$smarty.request.dir}" />
+<input type="hidden" name="MAX_FILE_SIZE" value="{$maxsize}" />
+<table class="light" style="width: 90%; margin-bottom: 15px;">
+<tr>
+ <td><input type="radio" name="action" value="file_upload" {if !$smarty.request.action || ($smarty.request.action == "file_upload")}checked="checked" {/if}/> {$msg_import}</td>
+ <td><input type="file" name="userfile" /></td>
+ <td rowspan="3"><input type="submit" value="{$msg_btn_fileop}" /></td>
+</tr>
+<tr>
+ <td>
+ <input type="radio" name="action" value="fileop" {if $smarty.request.action == "fileop"}checked="checked" {/if}/>
+ {$msg_copy_or_move}
+ </td>
+ <td>
+ {html_options name='file_action' options=$fileops selected=$smarty.request.file_action}
+ <select name="fileop_sfile">
+{foreach from=$childfiles item=entry}
+ <option value="{$entry.file}" {if $entry.file == $smarty.request.fileop_sfile}selected="selected" {/if}>{$entry.file}</option>
+{/foreach}
+ </select>
+ {$msg_fileop_to}
+ {html_options name='fileop_ddir' options=$fileop_ddirs selected=$smarty.request.fileop_ddir}
+ </td>
+</tr>
+<tr>
+ <td><input type="radio" name="action" value="file_create" {if $smarty.request.action == "file_create"}checked="checked" {/if}/> {$msg_create}</td>
+ <td><input type="text" name="createfile" value="{$smarty.request.createfile}" /></td>
+</tr>
+</table>
+</form>
+{/if}
+
+{include file='page-browser.tpl'}
+
--- /dev/null
+<table class="light">
+<tr>
+ <th> </th>
+ <th>{$msg_date}</th>
+ <th>{$msg_user}</th>
+ <th colspan="2">{$msg_event}</th>
+</tr>
+{foreach from=$events item=myevent}
+<tr>
+ <td>{if $myevent.icon}<img class="fileicon" src="{$myevent.icon}" />{else} {/if}</td>
+ <td class="logdate">{$myevent.stamp|date_format:"%Y-%m-%d %H:%M:%S"}</td>
+ <td class="logauthor">{$myevent.username}</td>
+ <td>{a lnk=$myevent.desc}</td>
+ <td>{$myevent.file}</td>
+</tr>
+{/foreach}
+</table>
--- /dev/null
+{literal}
+<script type="text/javascript">
+<!--
+function doUpdate()
+{
+ document.modif.file_content.value = document.Kafenio.getDocumentBody();
+ document.modif.submit();
+}
+-->
+</script>
+{/literal}
+
+<APPLET CODEBASE="." ARCHIVE="kafenio.jar,gnu-regexp-1.1.4.jar,kafenio-config.jar,kafenio-icons.jar" CODE="de.xeinfach.kafenio.KafenioApplet.class" NAME="Kafenio" WIDTH="800" HEIGHT="600" MAYSCRIPT>
+ <PARAM NAME="BASEURL" VALUE="{$dirloc}">
+ <PARAM NAME="CODEBASE" VALUE=".">
+ <PARAM NAME="CODE" VALUE="de.xeinfach.kafenio.KafenioApplet.class">
+ <PARAM NAME="ARCHIVE" VALUE="kafenio.jar,gnu-regexp-1.1.4.jar,kafenio-config.jar,kafenio-icons.jar">
+
+ <PARAM NAME="NAME" VALUE="Kafenio">
+ <PARAM NAME="TYPE" VALUE="application/x-java-applet;version=1.3">
+ <PARAM NAME="SCRIPTABLE" VALUE="true">
+ <PARAM NAME="BASE64" VALUE="true">
+ <PARAM NAME="STYLESHEET" VALUE="{$cssfiles}">
+ <PARAM NAME="LANGCODE" VALUE="en">
+ <PARAM NAME="LANGCOUNTRY" VALUE="US">
+ <PARAM NAME="TOOLBAR" VALUE="true">
+ <PARAM NAME="TOOLBAR2" VALUE="true">
+
+ <PARAM NAME="MENUBAR" VALUE="true">
+ <PARAM NAME="SOURCEVIEW" VALUE="false">
+ <PARAM NAME="MENUICONS" VALUE="true">
+ <!-- all available toolbar items: NEW,OPEN,SAVE,CUT,COPY,PASTE,UNDO,REDO,FIND,BOLD,ITALIC,UNDERLINE,STRIKE,SUPERSCRIPT,SUBSCRIPT,ULIST,OLIST,CLEARFORMATS,INSERTCHARACTER,ANCHOR,VIEWSOURCE,STYLESELECT,LEFT,CENTER,RIGHT,JUSTIFY,DEINDENT,INDENT,IMAGE,COLOR,TABLE,SAVECONTENT,DETACHFRAME,SEPARATOR -->
+ <PARAM NAME="BUTTONS" VALUE="CUT,COPY,PASTE,SEPARATOR,BOLD,ITALIC,UNDERLINE,SEPARATOR,LEFT,CENTER,RIGHT,justify,SEPARATOR,STYLESELECT,DETACHFRAME">
+ <PARAM NAME="BUTTONS2" VALUE="ULIST,OLIST,SEPARATOR,UNDO,REDO,SEPARATOR,DEINDENT,INDENT,SEPARATOR,ANCHOR,SEPARATOR,IMAGE,SEPARATOR,CLEARFORMATS,SEPARATOR,VIEWSOURCE,SEPARATOR,STRIKE,SUPERSCRIPT,SUBSCRIPT,INSERTCHARACTER,SEPARATOR,FIND,COLOR,TABLE,SEPARATOR,SAVECONTENT">
+ <!-- all available menuitems: <PARAM NAME="MENUITEMS" VALUE="FILE,EDIT,VIEW,FONT,FORMAT,INSERT,TABLE,FORMS,SEARCH,TOOLS,HELP,DEBUG"> -->
+ <PARAM NAME="MENUITEMS" VALUE="EDIT,VIEW,FONT,FORMAT,INSERT,TABLE,FORMS,SEARCH,TOOLS,HELP">
+<!-- <PARAM NAME="SERVLETURL" VALUE="http://www.xeinfach.de/media/projects/kafenio/demo/getDemoData.php"> -->
+
+<!-- <PARAM NAME="IMAGEDIR" VALUE="{$dirloc}"> -->
+<!-- <PARAM NAME="FILEDIR" VALUE="{$dirloc}"> -->
+ <PARAM NAME="SERVLETMODE" VALUE="cgi">
+ <PARAM NAME="SYSTEMID" VALUE="">
+<!-- <PARAM NAME="POSTCONTENTURL" VALUE="http://www.xeinfach.de/media/projects/kafenio/demo/postTester.php"> -->
+ <PARAM NAME="CONTENTPARAMETER" VALUE="mycontent">
+ <PARAM NAME="OUTPUTMODE" VALUE="normal">
+ <PARAM NAME="BGCOLOR" VALUE="#FFFFFF">
+ <PARAM NAME="DEBUG" VALUE="true">
+
+ <PARAM NAME="DOCUMENT" VALUE="{$file_content}">
+</APPLET>
+
+<form name="modif" method="post" action="{$post}">
+<input type="hidden" name="action" value="update" />
+<input type="hidden" name="file" value="{$file}" />
+<input type="hidden" name="dir" value="{$dir}" />
+<input type="hidden" name="file_content" value="" />
+
+<table class="light" style="width:800px">
+<tr>
+ <td>
+ {$msg_log}
+ <input type="text" name="message" size="50" />
+ <input type="button" value="update" onClick="doUpdate();" />
+ </td>
+</tr>
+</table>
+
+</form>
--- /dev/null
+{if $doedit}
+
+{* we are in editor mode *}
+<form method="post" action="{$post}">
+<input type="hidden" name="action" value="modifier" />
+<input type="hidden" name="MID" value="{$MID}" />
+<input type="hidden" name="MIDpere" value="{$MIDpere}" />
+
+<table class="light">
+<tr>
+ <th colspan="3">{$msg_prop}</th>
+</tr>
+<tr>
+ <td>{$msg_title}</td>
+ <td colspan="2">
+ <input type="text" name="title" value="{$title|escape}" size="30" maxlength="255" />
+ </td>
+</tr>
+<tr>
+ <td>{$msg_type}</td>
+ <td colspan="2">
+ <input type="radio" name="typelink" value="boutonZ" {$chk_z}>
+ {$msg_type_z}
+ </td>
+<tr>
+ <td> </td>
+ <td>
+ <input type="radio" name="typelink" value="boutonPI" {$chk_pi}>
+ {$msg_type_pi}
+ </td>
+ <td>
+ <select name="PIvaleur">
+ {html_options options=$page_opts selected=$page_sel}
+ </select>
+ </td>
+</tr>
+<tr>
+ <td> </td>
+ <td>
+ <input type="radio" name="typelink" value="boutonSE" {$chk_se}>
+ {$msg_type_se}
+ </td>
+ <td>
+ <input type="text" name="SEvaleur" value="{$SEvaleur}" size='30' maxlength='65535'>
+ </td>
+</tr>
+<tr>
+ <td colspan="3">
+ <input type="submit" value="{$submit}">
+ </th>
+</tr>
+</table>
+
+</form>
+
+{else}
+
+{* we are viewing the list *}
+
+<p>{$msg_ext}</p>
+
+<p><b>{$msg_menubar}</b> : {toolbar lnk=$menubar}</p>
+
+<table class="light">
+<tr>
+ <th> </th>
+ <th>{$msg_menu}</th>
+ <th>{$msg_link}</th>
+ <th colspan="2">{$msg_actions}</th>
+</tr>
+{counter start=0 assign=cnt print=0}
+{foreach from=$entries item=entry}
+<tr{if $cnt % 2} class="odd"{/if}>
+ <td><u>{$entry[0]}</u></td>
+ <td>{a lnk=$entry[1]}</td>
+ <td>{$entry[2]}</td>
+ <td>
+ {a lnk=$entry[3] class='action'}
+ {a lnk=$entry[4] class='action'}
+ </td>
+ <td>
+ {a lnk=$entry[5] class='action'}
+ {a lnk=$entry[6] class='action'}
+ </td>
+</tr>
+{counter}
+{/foreach}
+</table>
+
+<br/>
+
+<form method="get" action="{$script}" name="formulaire">
+<input type="hidden" name="action" value="editer" />
+<input type="hidden" name="MIDpere" value="{$MIDpere}" />
+<input type="submit" value="{$submit}">
+</form>
+
+{/if}
--- /dev/null
+<form method="post" action="{$post}">
+<input type="hidden" name="action" value="update" />
+<table class="light" style="width:80%">
+<tr>
+ <th colspan="2">{$msg_general_options}</th>
+</tr>
+<tr>
+ <td>{$msg_title}</td>
+ <td><input type="text" name="title" value="{$title}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_description}</td>
+ <td><input type="text" name="description" value="{$description}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_keywords}</td>
+ <td><input type="text" name="keywords" value="{$keywords}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_favicon}</td>
+ <td><input type="text" name="favicon" value="{$favicon}" size="20" /> {$msg_favicon_hint}</td>
+</tr>
+</table>
+
+<br/>
+
+<table class="light" style="width:80%">
+<tr>
+ <th colspan="2">{$msg_display_options}</th>
+</tr>
+{if $template_dirs}
+<tr>
+ <td>{$msg_site_template_dir}</td>
+ <td>{html_options name='template_dir' selected=$template_dir options=$template_dirs}</td>
+</tr>
+{/if}
+<tr>
+ <td>{$msg_site_template}</td>
+ <td>{html_options name='template' selected=$template options=$templates}</td>
+</tr>
+<tr>
+ <td>{$msg_menu_style}</td>
+ <td>{html_options name='menu_style' selected=$menu_style options=$menu_styles}</td>
+</tr>
+{if $menu_themes}
+<tr>
+ <td>{$msg_menu_theme}</td>
+ <td>{html_options name='menu_theme' selected=$menu_theme options=$menu_themes}</td>
+</tr>
+{/if}
+<tr>
+ <td>{$msg_menu_min_level}</td>
+ <td>{html_options name='menu_min_level' selected=$menu_min_level options=$menu_levels}</td>
+</tr>
+<tr>
+ <td>{$msg_menu_hide_diogenes}</td>
+ <td>{html_options name='menu_hide_diogenes' selected=$menu_hide_diogenes options=$menu_hide_diogeness}</td>
+</tr>
+</table>
+
+<p>
+ <input type="submit" value="{$msg_submit}" />
+</p>
+</form>
--- /dev/null
+<table class="light" style="width:60%">
+<tr>
+ <th>{$msg_lang}</th>
+</tr>
+<tr>
+ <td>
+ {$msg_lang_blab}
+ <ul>
+{foreach key=key item=item from=$langs}
+ <li><a href="?nlang={$key}">{$item}</a></li>
+{/foreach}
+ </ul>
+ </td>
+</tr>
+</table>
+
+<p>
+ <a href="{$global_prefs}">{$msg_global_prefs}</a>
+</p>
--- /dev/null
+{if $diff}
+
+<div class="diff">
+<table class="light">
+<tr>
+ <th colspan="2">differences between {$smarty.request.r1} and {$smarty.request.r2}</th>
+</tr>
+{foreach from=$diff item=mydiff}
+<tr>
+ <td>[ {$smarty.request.r1} - {$mydiff[0]} ]</td>
+ <td>[ {$smarty.request.r2} - {$mydiff[2]} ]</td>
+</tr>
+<tr>
+ <td>{diff block=$mydiff[3] op=$mydiff[1]}</td>
+ <td>{diff block=$mydiff[4] op=$mydiff[1]}</td>
+</tr>
+{/foreach}
+</table>
+</div>
+
+{else}
+
+{literal}
+<script type="text/javascript">
+ <!--
+ function restore( myrev ) {
+ if (confirm ("You are about to restore revision " + myrev + ". Do you want to proceed?")) {
+ document.operations.rev.value = myrev;
+ document.operations.submit();
+ return true;
+ }
+ }
+ // -->
+</script>
+{/literal}
+
+<form method="post" action="{$post}" name="operations">
+<input type="hidden" name="dir" value="{$smarty.request.dir}" />
+<input type="hidden" name="target" value="{$smarty.request.target}" />
+<input type="hidden" name="rev" value=""/>
+<input type="hidden" name="action" value="restore" />
+</form>
+
+<table class="light">
+<tr>
+ <th>{$msg_version}</th>
+ <th>{$msg_date}</th>
+ <th>{$msg_author}</th>
+ <th>{$msg_log}</th>
+ <th>{$msg_actions}</th>
+</tr>
+{counter start=0 assign=cnt print=0}
+{foreach from=$entries item=entry}
+<tr{if $cnt % 2} class="odd"{/if}>
+ <td>{$entry[0]}</td>
+ <td><small>{$entry[1]}</small></td>
+ <td>{$entry[2]}</td>
+ <td>{$entry[3]}</td>
+ <td>
+ {foreach from=$entry[4] item=myaction}
+ {a lnk=$myaction class="action"}
+ {/foreach}
+ </td>
+</tr>
+{counter}
+{/foreach}
+</table>
+
+{/if}
--- /dev/null
+<h3>{$msg_users}</h3>
+
+<form method="post" action="{$post}">
+<table class="light">
+<tr>
+ <th>{$user}</th>
+ <th>{$action}</th>
+</tr>
+{foreach from=$users item=myuser}
+<tr>
+ <td>{$myuser[0]} <span class="auth">({$myuser[1]})</span></td>
+ <td>{a lnk=$myuser[2]}</td>
+</tr>
+{/foreach}
+<tr>
+ <td colspan="2">
+ <input type="text" name="username"/>
+ {html_options name="auth" options=$auths}
+ <input type="submit" name="action" value="add">
+ </td>
+</tr>
+</table>
+</form>
+
+<h3>{$msg_admins}</h3>
+
+<table class="light">
+<tr>
+ <th>{$user}</th>
+</tr>
+{foreach from=$admins item=myuser}
+<tr>
+ <td>{$myuser[0]} <span class="auth">({$myuser[1]})</span></td>
+</tr>
+{/foreach}
+</table>
--- /dev/null
+<p>
+ {$msg_webdav}
+</p>
+
+<pre>
+{$url_webdav}
+</pre>
\ No newline at end of file
--- /dev/null
+{if $action eq "edit"}
+
+<form action="{$post}" method="post">
+<input type="hidden" name="target" value="{$target}">
+<input type="hidden" name="action" value="update">
+<table class="light">
+<tr>
+ <th colspan="2">{$target}</th>
+</tr>
+<tr>
+ <td>{$msg_title}</td>
+ <td><input type="text" name="title" value="{$v_title}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_desc}</td>
+ <td><input type="text" name="description" value="{$v_desc}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_keywords}</td>
+ <td><input type="text" name="keywords" value="{$v_keywords}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_vhost}</td>
+ <td><input type="text" name="vhost" value="{$v_vhost}" size="60" /></td>
+</tr>
+<tr>
+ <td>{$msg_flags}</td>
+ <td>{html_checkboxes name="flags" options=$v_flag_opts selected=$v_flags}</td>
+</tr>
+<tr>
+ <td colspan="2">
+ <input type="submit" value="{$msg_submit}" />
+ </td>
+</tr>
+</table>
+</form>
+
+<p>
+ {$msg_vhost_note}
+</p>
+
+{else}
+
+{if !$readonly}
+{literal}
+<script type="text/javascript">
+ <!--
+ function del( mysite ) {
+ if (confirm ("You are about to destroy the site '" + mysite +
+ "'. All data associated with it will irremediably lost! Do you want to proceed?")) {
+ document.operations.action.value = "delete";
+ document.operations.target.value = mysite;
+ document.operations.submit();
+ return true;
+ }
+ }
+ // -->
+</script>
+{/literal}
+
+<form method="post" action="{$post}" name="operations">
+<input type="hidden" name="target" value=""/>
+<input type="hidden" name="action" value="" />
+</form>
+{/if}
+
+<table class="light" style="width:90%">
+<tr>
+{if !$readonly}
+ <th>{$msg_alias}</th>
+{/if}
+ <th>{$msg_title}</th>
+ <th>{$msg_desc}</th>
+ <th> </th>
+</tr>
+{if $sites}
+{counter start=0 assign=cnt print=0}
+{foreach from=$sites item=mysite}
+<tr{if $cnt % 2} class="odd"{/if}>
+{if !$readonly}
+ <td>{$mysite.alias}</td>
+{/if}
+ <td>{a lnk=$mysite.title}</td>
+ <td>{$mysite.description}</td>
+ <td>
+ {foreach from=$mysite.actions item=action}
+ {a lnk=$action class="action"}
+ {/foreach}
+ </td>
+</tr>{counter}
+{/foreach}
+{else}
+<tr>
+ <td colspan="{if $readonly}3{else}4{/if}"><i>{$msg_no_barrels}</i></td>
+</tr>
+{/if}
+</table>
+
+{if !$readonly}
+<form method="post" action="{$post}">
+<input type="hidden" name="action" value="create" />
+<p>
+ {$msg_create} : <input type="text" name="target" maxlength="16"/><input type="submit" value="create"/>
+</p>
+<p>
+ {$msg_create_note}
+</p>
+</form>
+{/if}
+
+{/if}
--- /dev/null
+<!-- Beginning of Diogenes footer -->
+</div>
+
+<div id="footer">
+{if !$skipvalidator}
+ <a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" /></a>
+ <a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a>
+ <br />
+{/if}
+ {$poweredby}
+</div>
+
+</body>
+</html>
--- /dev/null
+{include file='header/head.tpl'}
+{if $banner}{include file=$banner}{/if}
+
+{include file='header/debug.tpl'}
+
+<div id="header">
+ <div class="logo"> </div>
+ <div class="titlebar">
+ <div class="site">{$site}</div>
+ <div class="page">{$page}</div>
+ </div>
+</div>
+
+{include file='header/sidebar.tpl'}
+
+<div id="main">
+{if $greeting}<h2>{$greeting}</h2>{/if}
+
+{include file='header/toolbar.tpl'}
+{include file='header/status.tpl'}
+
+<!-- End of Diogenes header -->
--- /dev/null
+{if $db_trace or $call_trace or $plugins_trace}
+{literal}
+<script type="text/javascript">
+<!--
+function show_debug_trace( title, trace )
+{
+ _diogenes_debug = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
+ _diogenes_debug.document.write("<HTML><HEAD>");
+ _diogenes_debug.document.write("<TITLE>" + title + "</TITLE>");
+ {/literal}_diogenes_debug.document.write("<link rel=\"stylesheet\" href=\"{$debug_css}\" type=\"text/css\" />");{literal}
+ _diogenes_debug.document.write("</HEAD>");
+ _diogenes_debug.document.write("<BODY style=\"padding: 10px;\">");
+ _diogenes_debug.document.write("<h2>" + title + "</h2>");
+ _diogenes_debug.document.write(trace);
+ _diogenes_debug.document.write("</BODY></HTML>");
+ _diogenes_debug.document.close();
+}
+
+function show_db_trace()
+{
+ {/literal}show_debug_trace('{$msg_debug_dbtrace}', '{$db_trace|escape:"javascript"}');{literal}
+}
+
+function show_call_trace()
+{
+ {/literal}show_debug_trace('{$msg_debug_calltrace}', '{$call_trace|escape:"javascript"}');{literal}
+}
+
+function show_plugins_trace()
+{
+ {/literal}show_debug_trace('{$msg_debug_plugins}', '{$plugins_trace|escape:"javascript"}');{literal}
+}
+
+// -->
+</script>
+{/literal}
+<div id="debug">
+<div class="title">{$msg_debug_bar}</div>
+{if $db_trace}
+<div class="item" id="db-trace"><a href="javascript:show_db_trace();">{$msg_debug_dbtrace}</a></div>
+{/if}
+{if $call_trace}
+<div class="item" id="call-trace"><a href="javascript:show_call_trace();">{$msg_debug_calltrace}</a></div>
+{/if}
+{if $plugins_trace}
+<div class="item" id="plugins-trace"><a href="javascript:show_plugins_trace();">{$msg_debug_plugins}</a></div>
+{/if}
+</div>
+{/if}
--- /dev/null
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>{$site}{if $page} - {$page}{/if}</title>
+{foreach from=$head item=mytag}
+{$mytag}
+{/foreach}
+{if ($menustyle==1 or $menustyle==2)}
+{include file='header/phplayersmenu.tpl'}
+{/if}
+</head>
+<body>
--- /dev/null
+<script type="text/javascript">
+<!--
+// PHP Layers Menu 3.1.1 (C) 2001-2003 Marco Pratesi (marco at telug dot it)
+
+DOM = (document.getElementById) ? 1 : 0;
+NS4 = (document.layers) ? 1 : 0;
+// We need to explicitly detect Konqueror
+// because Konqueror 3 sets IE = 1 ... AAAAAAAAAARGHHH!!!
+Konqueror = (navigator.userAgent.indexOf("Konqueror") > -1) ? 1 : 0;
+// We need to detect Konqueror 2.2 as it does not handle the window.onresize event
+Konqueror22 = (navigator.userAgent.indexOf("Konqueror 2.2") > -1 || navigator.userAgent.indexOf("Konqueror/2.2") > -1) ? 1 : 0;
+Opera = (navigator.userAgent.indexOf("Opera") > -1) ? 1 : 0;
+Opera5 = (navigator.userAgent.indexOf("Opera 5") > -1 || navigator.userAgent.indexOf("Opera/5") > -1) ? 1 : 0;
+Opera6 = (navigator.userAgent.indexOf("Opera 6") > -1 || navigator.userAgent.indexOf("Opera/6") > -1) ? 1 : 0;
+Opera56 = Opera5 || Opera6;
+IE = (navigator.userAgent.indexOf("MSIE") > -1) ? 1 : 0;
+IE = IE && !Opera;
+IE5 = IE && DOM;
+IE4 = (document.all) ? 1 : 0;
+IE4 = IE4 && IE && !DOM;
+// -->
+</script>
+
+{if $menustyle==1}
+<script type="text/javascript" src="{$phplayersmenu}/layerstreemenu-nocookies.js"></script>
+{else}
+<script type="text/javascript" src="{$phplayersmenu}/layerstreemenu-cookies.js"></script>
+{/if}
--- /dev/null
+<div id="sidebar">
+ {menu items=$menuitems style=$menustyle theme=$menutheme}
+</div>
--- /dev/null
+{if $status}
+<pre>
+{foreach from=$status item=mystatus}
+{$mystatus}
+{/foreach}
+</pre>
+{/if}
--- /dev/null
+{if $toolbars}
+<ul class="toolbar">
+{foreach from=$toolbars item=mybar}
+<li><b>{$mybar.title}</b> : {toolbar lnk=$mybar.items}</li>
+{/foreach}
+</ul>
+{/if}
--- /dev/null
+<p>
+ {$about}
+</p>
+
+<p>
+ {$available} :
+</p>
+
+{$viewer_content}
\ No newline at end of file
--- /dev/null
+<script type="text/javascript" src="{$md5}"></script>
+{literal}
+<script type="text/javascript">
+<!--
+ function doChallengeResponse() {
+ str = document.getElementById('main_login').value + ":" +
+ MD5(document.getElementById('main_password').value) + ":" +
+ document.getElementById('sub_challenge').value;
+
+ document.getElementById('sub_response').value = MD5(str);
+ document.getElementById('sub_login').value = document.getElementById('main_login').value;
+ document.getElementById('main_password').value = "";
+ document.getElementById('sub_form').submit();
+ }
+// -->
+</script>
+{/literal}
+
+<form method="post" action="{$post}" onsubmit="doChallengeResponse(); return false;">
+<table class="light">
+<tr>
+ <th colspan="2">{$msg_connexion}</th>
+</tr>
+<tr>
+ <td>{$msg_username}</td>
+ <td><input type="text" id="main_login" name="login" value="{$username}" /></td>
+</tr>
+<tr>
+ <td>{$msg_password}</td>
+ <td><input type="password" id="main_password" name="password" /></td>
+</tr>
+<tr>
+ <td> </td>
+ <td><input type="submit" value="{$msg_submit}"/></td>
+</tr>
+</table>
+</form>
+
+ <!-- Set up the form with the challenge value and an empty reply value //-->
+<form method="post" action="{$post}" id="sub_form">
+ <input type="hidden" id="sub_challenge" name="challenge" value="{$challenge}" />
+ <input type="hidden" id="sub_response" name="response" value="" />
+ <input type="hidden" id="sub_login" name="login" value="" />
+</form>
+
+<script type="text/javascript">
+<!--
+ // Activate the appropriate input form field.
+{if $username}
+{literal}
+ document.loginmain.password.focus();
+{/literal}
+{else}
+{literal}
+ document.loginmain.login.focus();
+{/literal}
+{/if}
+// -->
+</script>
--- /dev/null
+{include file='header.tpl'}
+
+{if $page_template}{include file=$page_template}{/if}
+{if $page_content}{$page_content}{/if}
+
+{include file='footer.tpl'}
--- /dev/null
+{literal}
+<script type="text/javascript">
+ <!--
+ function page_delete( mypage, myloc ) {
+ if (confirm ("You are about to delete the page '" + myloc + "' and all its contents. Do you want to proceed?")) {
+ document.operations.action.value = "page_delete";
+ document.operations.target.value = mypage;
+ document.operations.submit();
+ return true;
+ }
+ }
+ function file_delete( mypage, myfile ) {
+ if (confirm ("You are about to delete the file '" + myfile + "'. Do you want to proceed?")) {
+ document.operations.action.value = "file_delete";
+ document.operations.target.value = myfile;
+ document.operations.submit();
+ return true;
+ }
+ }
+ function file_rename( mypage, myfile ) {
+ if ((newname = prompt ("Rename '" + myfile + "' to", myfile)) != null) {
+ document.operations.action.value = "file_rename";
+ document.operations.target.value = myfile;
+ document.operations.newname.value = newname;
+ document.operations.submit();
+ return true;
+ }
+ }
+ // -->
+</script>
+{/literal}
+
+<form method="post" action="{$post}" name="operations">
+<input type="hidden" name="dir" value="{$smarty.request.dir}" />
+<input type="hidden" name="target" value=""/>
+<input type="hidden" name="newname" value=""/>
+<input type="hidden" name="action" value="" />
+</form>
+
+<table class="light" style="width:90%">
+{if $childpages}
+<tr>
+ <th>{$msg_location}</th>
+ <th>{$msg_access}</th>
+ <th colspan="3">{$msg_title}</th>
+ <th>{$msg_actions}</th>
+</tr>
+{counter start=0 assign=cnt print=0}
+{foreach from=$childpages item=page}
+<tr{if $cnt % 2} class="odd"{/if}>
+ <td>
+ <img class="fileicon" src="{$page.icon}" />
+ <a href="{$page.click}">{if $page.location==''}<i>home</i>{else}{$page.location}{/if}</a>
+ </td>
+ <td><img class="fileicon" alt="{$msg_read_perms} : {$page.perms}" title="{$msg_read_perms} : {$page.perms}" src="{$page.iperms}" /><img class="fileicon" alt="{$msg_write_perms} : {$page.wperms}" title="{$msg_write_perms} : {$page.wperms}" src="{$page.iwperms}" /></td>
+ <td colspan="3"><b>{$page.title|escape}</b></td>
+ <td>
+{foreach from=$page.actions item=action}
+{a lnk=$action class="action"}
+{/foreach}
+ </td>
+</tr>
+{counter}
+{/foreach}
+{/if}
+{if $childfiles}
+<tr>
+ <th>{$msg_file}</th>
+ <th>{$msg_version}</th>
+ <th>{$msg_date}</th>
+ <th>{$msg_author}</th>
+ <th>{$msg_size}</th>
+ <th>{$msg_actions}</th>
+</tr>
+{counter start=0 assign=cnt print=0}
+{foreach from=$childfiles item=entry}
+<tr{if $cnt % 2} class="odd"{/if}>
+ <td><img class="fileicon" src="{$entry.icon}" alt="" />{a lnk=$entry.file}</td>
+ <td>{a lnk=$entry.rev}</td>
+ <td class="logdate">{$entry.date}</td>
+ <td class="logauthor">{$entry.author}</td>
+ <td class="filesize">{$entry.size}</td>
+ <td>
+{foreach from=$entry.actions item=lnk}
+{a lnk=$lnk class="action" title=$lnk[0]}
+{/foreach}
+ </td>
+</tr>
+{counter}
+{/foreach}
+{/if}
+</table>
--- /dev/null
+<form method="post" action="{$post}">
+<input type="hidden" name="action" value="update" />
+<input type="hidden" name="dir" value="{$page_obj.PID}" />
+<table class="light" style="width:70%">
+<tr>
+ <th colspan="2">{$msg_properties}</th>
+</tr>
+{if $page_obj.parent}
+<tr>
+ <td>{$msg_parent}</td>
+ <td>
+ {html_options name='pedit_parent' options=$parent_opts selected=$page_obj.parent}
+ </td>
+</tr>
+{else}
+<input type="hidden" name="pedit_parent" value="0"/>
+{/if}
+<tr>
+ <td>{$msg_location}</td>
+ <td>
+ {if $page_obj.PID && $page_obj.location==''}
+ <i>home</i>
+ {else}
+ <input type="text" name="pedit_location" value="{$page_obj.location}" />
+ {/if}
+ </td>
+</tr>
+<tr>
+ <td>{$msg_title}</td>
+ <td><input type="text" name="pedit_title" value="{$page_obj.title|escape}" /></td>
+</tr>
+<tr>
+ <td>{$msg_page_template}</td>
+ <td>{html_options name='pedit_template' selected=$page_obj.template options=$templates}</td>
+</tr>
+<tr>
+ <td>{$msg_status}</td>
+ <td>
+ {html_options name='pedit_status' options=$status_opts selected=$page_obj.status}
+ </td>
+</tr>
+<tr>
+ <td>{$msg_read_perms}</td>
+ <td>
+ <select name="pedit_perms">
+ {flags table=$table field='perms' selected=$page_obj.perms}
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>{$msg_write_perms}</td>
+ <td>
+ <select name="pedit_wperms">
+ {flags table=$table field='wperms' selected=$page_obj.wperms}
+ </select>
+ </td>
+</tr>
+
+
+<tr>
+ <td><input type="submit" value="{$msg_submit}" /></td>
+ <td><input type="reset" value="{$msg_reset}" /></td>
+</tr>
+</table>
+</form>
+
+{if $smarty.request.dir}
+
+{if $word}
+
+<table class="light" style="width:70%">
+<tr>
+ <th>{$word}</th>
+</tr>
+<tr>
+ <td>
+ <p>
+ {$wordblab}
+ </p>
+{if $wordfile}
+ <p>
+ {$wordfile} : {a lnk=$wordlnk}
+ </p>
+{/if}
+ <p>
+ {$wordsend}
+ </p>
+ <form name="import" method="post" action="{$post}" enctype="multipart/form-data">
+ <input type="hidden" name="action" value="import" />
+ <input type="hidden" name="dir" value="{$dir}" />
+ <input type="file" name="wordfile" />
+ <input type="submit" value="{$send}" />
+ </form>
+ </td>
+</tr>
+</table>
+
+{/if}
+
+{if !$wordfile}
+<br/>
+
+<table class="light" style="width:70%">
+<tr>
+ <th>{$html}</th>
+</tr>
+<tr>
+ <td>
+ <p>
+ {$htmlblab}
+ </p>
+ <p>
+ {$htmlstrip}
+ </p>
+ <form name="import" method="post" action="{$post}" enctype="multipart/form-data">
+ <input type="hidden" name="action" value="import" />
+ <input type="hidden" name="dir" value="{$dir}" />
+ <input type="file" name="htmlfile" />
+ <input type="submit" value="{$send}" />
+ </form>
+ </td>
+</tr>
+{/if}
+</table>
+
+{/if}
--- /dev/null
+{if !$readonly}
+{literal}
+<script type="text/javascript">
+ <!--
+ function move_up( myplug ) {
+ document.plug_form.action.value = "move_up";
+ document.plug_form.plug_target.value = myplug;
+ document.plug_form.submit();
+ return true;
+ }
+ function move_down( myplug ) {
+ document.plug_form.action.value = "move_down";
+ document.plug_form.plug_target.value = myplug;
+ document.plug_form.submit();
+ return true;
+ }
+ // -->
+</script>
+{/literal}
+
+<form name="plug_form" method="post" action="{$post}">
+<input type="hidden" name="action" value="update" />
+<input type="hidden" name="plug_target" value="" />
+<input type="hidden" name="plug_page" value="{$plug_page}" />
+<input type="hidden" name="plug_barrel" value="{$plug_barrel}" />
+{/if}
+
+<div class="plugins">
+{foreach from=$plugins key=plugtype item=plugarr}
+<table class="light" style="width:80%">
+<tr>
+ <th colspan="{if $show_params}4{else}3{/if}">{$plugtype} {$msg_plugedit_plugins}</th>
+</tr>
+{counter start=0 assign=cnt print=0}
+{foreach from=$plugarr item=plug}
+<tr{if $cnt % 2} class="odd"{/if}>
+ <td style="width:30px">
+ <img class="fileicon" src="{$plug.icon}" />
+ </td>
+ <td>
+ <div class="name">{if !$readonly}<input type="checkbox" name="plugins_active[]" value="{$plug.name}"{if $plug.active} checked="checked"{/if} /> {/if}{$plug.name} v{$plug.version}</div>
+{if !$readonly}
+ <a class="action"{if $plug.move_up}href="javascript:move_up('{$plug.name}');"{/if}>{$msg_move_up}</a> <a class="action"{if $plug.move_down}href="javascript:move_down('{$plug.name}');"{/if}>{$msg_move_down}</a>
+{/if}
+ </td>
+ <td>
+ <div class="description">{$plug.description}</div>
+ </td>
+{if !$readonly && $show_params}
+ <td>
+ <table>
+{foreach from=$plug.params key=key item=val}
+ <tr>
+ <td>{$key}</td>
+ <td><input type="text" name="{$plug.name}_{$key}" value="{$val|escape}" size="30" /></td>
+ </tr>
+{/foreach}
+ </table>
+ </td>
+{/if}
+</tr>
+{counter}
+{/foreach}
+</table>
+<br/>
+{/foreach}
+</div>
+
+{if !$readonly}
+<p>
+ <input type="submit" value="{$msg_submit}" />
+</p>
+</form>
+{/if}
--- /dev/null
+<table class="light" style="width:60%">
+<tr>
+ <th colspan="2">{$msg_myinfo}</th>
+</tr>
+<tr>
+ <td><b>{$msg_username}</b></td>
+ <td>{$username}</td>
+</tr>
+<tr>
+ <td><b>{$msg_fullname}</b></td>
+ <td>{$fullname}</td>
+</tr>
+</table>
+
+<br/>
+
+<table class="light" style="width:60%">
+<tr>
+ <th>{$msg_lang}</th>
+</tr>
+<tr>
+ <td>
+ {$msg_lang_blab}
+ <ul>
+{foreach key=key item=item from=$langs}
+ <li><a href="?nlang={$key}">{$item}</a></li>
+{/foreach}
+ </ul>
+ </td>
+</tr>
+</table>
+
+{if $native}
+<script type="text/javascript" src="{$md5}"></script>
+{literal}
+<script type="text/javascript">
+ <!--
+ function changePass() {
+ if (document.passwd.password1.value == "") {
+ alert('Password cannot be empty!');
+ } else if (document.passwd.password1.value != document.passwd.password2.value) {
+ alert('Password mismatch!');
+ } else {
+ document.passwd_enc.newpass.value = MD5(document.passwd.password1.value);
+ document.passwd_enc.submit();
+ }
+ }
+ // -->
+</script>
+{/literal}
+
+<form method="post" name="passwd_enc" action="{$smarty.server.PHP_SELF}">
+<input type="hidden" name="action" value="passwd" />
+<input type="hidden" name="newpass" value="" />
+</form>
+
+<form method="post" name="passwd" action="{$smarty.server.PHP_SELF}" onsubmit="changePass(); return false;">
+
+<table class="light" style="width:60%">
+ <tr>
+ <th colspan=2>{$msg_mypassword}</th>
+ </tr>
+ <tr>
+ <td><b>{$msg_password}</b></td>
+ <td><input type="password" name="password1" /></td>
+
+ </tr>
+ <tr>
+ <td><b>{$msg_confirmation}</b></td>
+ <td><input type="password" name="password2" /></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input type="submit" value="{$submit}"></td>
+ </tr>
+
+</table>
+</form>
+
+{/if}
--- /dev/null
+<form method="post" action="{$post}">
+<table class="light">
+<tr>
+ <th>{$msg_site}</th>
+ <th>{$msg_admin}</th>
+ <th>{$msg_actions}</th>
+</tr>
+{foreach from=$entries item=entry}
+<tr class="{$entry[0]}">
+ <td>{$entry[1]}</td>
+ <td><b>{$entry[3]}</b> <span class="auth">({$entry[2]})</span></td>
+ <td>
+ {foreach from=$entry[4] item=myaction}
+ {a class="action" lnk=$myaction}
+ {/foreach}
+ </td>
+</tr>
+{/foreach}
+<tr>
+ <td>
+ <select name="target">
+ {html_options options=$sites}
+ </select>
+ </td>
+ <td colspan="2">
+ <input type="text" name="username"/>
+ <select name="auth">
+ {html_options options=$auths}
+ </select>
+ <input type="submit" name="action" value="add">
+ </td>
+</tr>
+</table>
+</form>
--- /dev/null
+<form method="post" action="{$post}">
+<input type="hidden" name="action" value="options" />
+<table class="light" style="width:80%">
+<tr>
+ <th colspan="2">{$msg_display_options}</th>
+</tr>
+<tr>
+ <td>{$msg_menu_style}</td>
+ <td>{html_options name='menu_style' selected=$menu_style options=$menu_styles}</td>
+</tr>
+{if $menu_themes}
+<tr>
+ <td>{$msg_menu_theme}</td>
+ <td>{html_options name='menu_theme' selected=$menu_theme options=$menu_themes}</td>
+</tr>
+{/if}
+<tr>
+ <td>{$msg_site_template_dir}</td>
+ <td><input type="text" name="template_dir" value="{$template_dir}" size="30" /></td>
+</tr>
+<tr>
+ <td>{$msg_site_template}</td>
+ <td>{html_options name='template' selected=$template options=$templates}</td>
+</tr>
+<tr>
+ <td>{$msg_validate_pages}</td>
+ <td><input type="checkbox" name="validatepages"{if $validatepages} checked="checked"{/if}/></td>
+</tr>
+</table>
+
+<br/>
+
+<table class="light" style="width:80%">
+<tr>
+ <th colspan="2">{$msg_system_options}</th>
+</tr>
+<tr>
+ <td>{$msg_html_editor}</td>
+ <td>{html_options name='html_editor' selected=$html_editor options=$html_editors}</td>
+</tr>
+<tr>
+ <td>{$msg_word_import}</td>
+ <td>{html_options name='word_import' selected=$word_import options=$word_imports}</td>
+</tr>
+</table>
+
+<br/>
+
+<table class="light" style="width:80%">
+<tr>
+ <th colspan="2">{$msg_debug_options}</th>
+</tr>
+<tr>
+ <td>{$msg_debug_database}</td>
+ <td><input type="checkbox" name="debugdatabase"{if $debugdatabase} checked="checked"{/if}/></td>
+</tr>
+<tr>
+ <td>{$msg_debug_plugins}</td>
+ <td><input type="checkbox" name="debugplugins"{if $debugplugins} checked="checked"{/if}/></td>
+</tr>
+</table>
+
+<p>
+ <input type="submit" value="{$msg_submit}" />
+</p>
+
+</form>
+
--- /dev/null
+{$editor_content}
+
+<br/>
+
+<table class="light" style="width:80%">
+<tr>
+ <th>{$msg_vcs}</th>
+</tr>
+<tr>
+ <td>{$msg_current_vcs}</td>
+</tr>
+{foreach from=$conversions item="conv"}
+<tr>
+ <td>
+ <form method="post" action="{$smarty.server.PHP_SELF}">
+ {$conv[1]}
+ <input type="hidden" name="action" value="{$conv[0]}" />
+ <input type="submit" value="{$msg_convert}" />
+ </form>
+ </td>
+</tr>
+{/foreach}
+</table>
\ No newline at end of file
--- /dev/null
+{if 0 && !$plug_barrel}
+<h3>{$msg_clean_database}</h3>
+
+<form method="post" action="{$post}">
+<input type="hidden" name="action" value="clean" />
+<p>
+ {$msg_clean_database_text}
+ <input type="submit" value="{$msg_clean}" />
+</p>
+</form>
+{/if}
+
+<h3>{$msg_enable_disable}</h3>
+<p>
+ {$msg_enable_disable_text}
+</p>
+
+{$editor_content}
\ No newline at end of file
--- /dev/null
+{if $msg_information}
+<p>{$msg_information}</p>
+{/if}
+
+{$sites_content}
--- /dev/null
+<?php
+
+require_once 'PHPUnit.php';
+
+require_once 'DB.php';
+require_once 'diogenes/diogenes.database.inc.php';
+
+class DBInitialTest extends PHPUnit_TestCase
+{
+ var $db = NULL;
+
+ function DBInitialTest($name)
+ {
+ parent::PHPUnit_TestCase($name);
+
+ if (!extension_loaded('mysql') && !dl('mysql.so'))
+ {
+ die("The MySQL module is not your PHP configuration and could not be loaded, fix your PHP setup!");
+ }
+
+ $conn = mysql_connect('localhost', 'test');
+
+ if (!$conn)
+ {
+ die("You need to have a MySQL database running on the local host, with a user\ncalled 'test' with no password.");
+ }
+
+ $rv = mysql_query("DROP DATABASE test");
+ if (!$rv)
+ {
+ die("Database drop failed. The user 'test' must have full privileges to the\n'test' database.");
+ }
+
+ mysql_query("CREATE DATABASE test");
+
+ system("mysql -u test test < config/db/diogenes.sql");
+ }
+
+ function testTables()
+ {
+ $tables = array('diogenes_auth', 'diogenes_logactions',
+ 'diogenes_logevents',
+ 'diogenes_logsessions', 'diogenes_option',
+ 'diogenes_perm', 'diogenes_site');
+
+ $DB = DB::Connect('mysql://test@localhost/test');
+ if (DB::isError($DB))
+ {
+ die($DB->getMessage()."\n".$DB->getUserInfo()."\n");
+ }
+
+ $this->assertEquals($tables, $DB->getCol('show tables'));
+ }
+}
+
+class DiogenesDatabaseTest extends PHPUnit_TestCase
+{
+ function testConstructor()
+ {
+ $DB = new DiogenesDatabase('localhost', 'test', 'test', '');
+
+ $this->assertTrue(is_object($DB));
+ }
+
+ function testErrors()
+ {
+ $db = new DiogenesDatabase('tst', 'localhost', 'test', '');
+
+ $this->assertTrue($db->err());
+ $this->assertEquals(1049, $db->errno());
+ $this->assertEquals("Unknown database 'tst'", $db->error());
+
+ $db->ResetError();
+ $this->assertFalse($db->err());
+ $this->assertEquals(0, $db->errno());
+ $this->assertEquals('', $db->error());
+
+ }
+
+ function testMoreErrors()
+ {
+ $db = new DiogenesDatabase('test', 'localhost', 'test', '');
+
+ $this->assertFalse($db->err(), "Should be no error");
+
+ $db->query("SLECT");
+
+ $this->assertTrue($db->err(), "Should be error");
+ $this->assertEquals(1064, $db->errno());
+ $this->assertEquals("You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SLECT' at line 1", $db->error());
+ $this->assertEquals("SLECT", $db->errinfo());
+
+ $db->ResetError();
+ $this->assertEquals('', $db->errinfo());
+ }
+}
--- /dev/null
+<?php
+
+require_once 'PHPUnit.php';
+require_once 'diogenes/diogenes.logger-view.inc.php';
+require_once 'diogenes/diogenes.core.globals.inc.php';
+require_once 'TestHelpers.php';
+
+class DiogenesLoggerViewTest extends PHPUnit_TestCase
+{
+ function setUp()
+ {
+ global $globals;
+
+ $globals = new DiogenesCoreGlobals;
+
+ $globals->database_error_fatal = true;
+ $globals->db = new DiogenesDatabase('test', 'localhost', 'test', '');
+ $globals->db->_fatal = true;
+
+ if ($globals->db->err())
+ {
+ echo "DB err: " . $globals->db->error() . "\n";
+ }
+
+ $this->o = new DiogenesLoggerView();
+ }
+
+ function testConstructor()
+ {
+ global $globals;
+
+ $this->assertEquals($this->o->dbh, $globals->db);
+ $this->assertTrue(is_a($this->o->dbh, 'diogenesdatabase'));
+ }
+
+ function test_getAuths()
+ {
+ global $globals;
+ $globals->table_log_sessions = 'diogenes_logsessions';
+
+ $this->assertEquals(array(0 => __('all'), 'native' => 'native', 'external' => 'external'), $this->o->_getAuths());
+
+ $globals->db->query("CREATE TABLE logsesh (auth enum('x', 'y', 'z', 'heh'))");
+ $this->assertFalse($globals->db->err());
+
+ $globals->table_log_sessions = 'logsesh';
+ $this->assertEquals(array(0 => __('all'), 'x' => 'x', 'y' => 'y', 'z' => 'z', 'heh' => 'heh'), $this->o->_getAuths());
+ }
+
+ function test_getDays()
+ {
+ global $globals;
+
+ $rows[] = "DELETE FROM diogenes_logsessions";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20040215000000)";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20040315000000)";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20040415000000)";
+ BulkQueries($rows);
+
+ $globals->table_log_sessions = 'diogenes_logsessions';
+
+ $febdays[0] = __('all');
+ $mardays[0] = __('all');
+ $aprdays[0] = __('all');
+
+ // Febdays should be 16 to 29 (leap year), mardays should be
+ // all month, and aprdays should be up to and including
+ // the 15th.
+
+ for ($i = 1; $i < 16; $i++)
+ {
+ $aprdays[$i] = $mardays[$i] = $i;
+ }
+
+ for ($i = 15; $i < 30; $i++)
+ {
+ $mardays[$i] = $febdays[$i] = $i;
+ }
+
+ $mardays[30] = 30;
+ $mardays[31] = 31;
+
+ $this->assertTrue(checkdate(2,29,2004), "Checkdate giving dodgy results");
+ $this->assertEquals(array(), $this->o->_getDays(2003, 1));
+ $this->assertEquals(array(), $this->o->_getDays(2003, 3));
+ $this->assertEquals(array(), $this->o->_getDays(2003, 6));
+ $this->assertEquals(array(), $this->o->_getDays(2004, 1));
+ $this->assertEquals($febdays, $this->o->_getDays(2004, 2));
+ $this->assertEquals($mardays, $this->o->_getDays(2004, 3));
+ $this->assertEquals($aprdays, $this->o->_getDays(2004, 4));
+ $this->assertEquals(array(), $this->o->_getDays(2004, 6));
+ $this->assertEquals(array(), $this->o->_getDays(2005, 1));
+ $this->assertEquals(array(), $this->o->_getDays(2005, 3));
+ $this->assertEquals(array(), $this->o->_getDays(2005, 8));
+ }
+
+ function test_getMonths()
+ {
+ global $globals;
+
+ $rows[] = "DELETE FROM diogenes_logsessions";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20020401000000)";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20030401000000)";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20040401000000)";
+ BulkQueries($rows);
+
+ $this->assertEquals(array(), $this->o->_getMonths(2001));
+ $this->assertEquals(array(0=>__('all'), 4=>4, 5=>5, 6=>6, 7=>7, 8=>8,
+ 9=>9, 10=>10, 11=>11, 12=>12),
+ $this->o->_getMonths(2002));
+ $this->assertEquals(array(0=>__('all'), 1=>1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6,
+ 7=>7, 8=>8, 9=>9, 10=>10, 11=>11, 12=>12),
+ $this->o->_getMonths(2003));
+ $this->assertEquals(array(0=>__('all'), 1=>1, 2=>2, 3=>3, 4=>4),
+ $this->o->_getMonths(2004));
+ $this->assertEquals(array(), $this->o->_getMonths(2005));
+ }
+
+ function test_getYears()
+ {
+ global $globals;
+
+ $rows[] = "DELETE FROM diogenes_logsessions";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20020401000000)";
+ $rows[] = "INSERT INTO diogenes_logsessions (start)
+ VALUES (20040401000000)";
+ BulkQueries($rows);
+
+ $this->assertEquals(array(0=>__('all'), 2002=>2002, 2003=>2003, 2004=>2004),
+ $this->o->_getYears());
+
+ }
+}
--- /dev/null
+<?php
+
+require_once 'PHPUnit.php';
+
+class InternalTest extends PHPUnit_TestCase
+{
+ function InternalTest($name)
+ {
+ $this->PHPUnit_TestCase($name);
+ }
+
+ function testInternal()
+ {
+ $this->assertEquals('xyz', 'xyz');
+ $this->assertNull(NULL, "Aiee! It's not null!");
+ $this->assertNotNull('notnull', "Aiee! It's null!");
+ $this->assertTrue(true, "Feck! It's false!");
+
+/* if (!method_exists($this, 'assertSubStr'))
+ {
+ die("You need a version of PHPUnit which supports assertSubStr. Apply\nassert.patch to your PHPUnit code. Hassle Matt if this makes no sense.\n");
+ }
+*/
+ }
+}
+
--- /dev/null
+Unit Testing for Diogenes
+===========================
+
+Unit testing is the process of writing lots of little pieces of test code
+which each test some part of the functionality of a software system. By
+having a comprehensive set of test cases which are satisfied by the
+production code, we can have real confidence in our software, instead of
+just "hoping" it works.
+
+What is a unit test?
+----------------------
+
+The general structure of all unit tests is as follows:
+
+* Setup pre-conditions (the state of the system prior to the execution of the
+ code under test)
+* Run the code to be tested, giving it all applicable arguments
+* Validate that the code ran correctly by examining the state of the system
+ after the code under test has run, and ensuring that it has done
+ what it should have done.
+
+The pre-conditions are normally either set at the beginning of the test
+method, or in a general method called setUp() (see below for the structure
+of test code).
+
+Running the code itself is normally making a call to the function to
+be tested, constructing an object, or, for Web applications, running the
+top-level web script (using require()).
+
+Validating the post-run state of the system is done by examining the
+database, system files, and script output, and using various assert methods
+to communicate the success or failure of various tests to the user.
+
+Testing Web applications such as Diogenes is relatively easy, especially the
+user interface side of things.
+
+Unlike traditional GUI applications, every state change of a web application
+is defined by the database and filesystem, the user's session, and the
+values passed from the web browser through $_REQUEST and $_SERVER. Since
+all of these aspects are relatively easy to control, setting the pre-run
+state of the application is quite simple. There are also relatively few
+discrete states that your web application can be in, because all of the
+system control has to be made through the constrained interface above.
+
+Testing post-conditions, as well, is simple. If you want to ensure that a
+certain thing is part of the post-run display, you can just interrogate the
+HTML output from the test run, which is all text and can be tested with
+assertRegExp() and assertSubStr(). Again, the only state available is in
+the user's session, database, and filesystem, all of which are easy to
+interrogate.
+
+Test cases and test methods
+-----------------------------
+
+(This is where things get a bit hairy -- hold on, and perhaps read it twice)
+
+A test case is a collection of tests which are related in some way. Each
+test case is represented in our testing framework by a class subclassed from
+PHPUnit_TestCase. Each test is a method on the test case whose name starts
+with 'test'. You should name the tests appropriately from there.
+
+Test cases can have a couple of special methods defined on them, called
+setUp() and tearDown(). The first method is called before each of the test
+methods is called, and the second is called after each test method has run.
+
+The setUp() and tearDown() methods are the primary reason for grouping test
+methods together. Methods should, as much as possible, grouped into test
+cases with common setUp() and tearDown() requirements.
+
+So how do I write a Unit Test?
+-------------------------------
+
+Put together a snippet of code which sets up the state of the application,
+then run the code to be tested, and check the result. This snippet of code
+should be placed in a test case in a method named test[Something](). Each
+test method takes no arguments and returns nothing.
+
+Have a look at the existing test code in the testing/ directory of the
+diogenes source distribution for examples of how to write test code.
+
+When you create a new test case, you need to tell the test code runner that
+it needs to run the new test code. There is an array in the alltests script
+which defines the files and test cases to be run. Each key in the array
+specifies a filename to be read (without the .php extension), while the
+value associated with the key is an array of class names in that file.
+
+What should I test?
+---------------------
+
+The naive answer would be "everything". However, that is impractical.
+There are just too many things that could be tested for a policy of "test
+everything" to allow any actual code to be written.
+
+It helps to think of tests as pulls of the handle on a poker machine. Each
+pull costs you something (some time to write it). You "win" when a test
+that you expected to pass fails, or when a test you expected to fail passes.
+You lose when a test gives you no additional useful feedback. You want to
+maximise your winnings.
+
+So, write tests that demonstrate something new and different about the
+operation of the system. Before you write any production code, write a test
+which defines how you want the system to act in order to pass the test. Run
+the test suite, verify that the test fails. Now, modify the production code
+just enough so the test passes. If you want the system to do something that
+can't be expressed in one test, write multiple tests, each one interspersed
+with some production development to satisfy *just* *that* new test. This
+is, in my experience, the best way to ensure that you have good test
+coverage, whilst minimising the production of tests which add no value to
+the system.
+
+How do I retro-fit unit testing onto an existing codebase?
+------------------------------------------------------------
+
+Diogenes already has a significant amount of code written, which would take
+hundreds of tests to cover completely. There is little point in going back
+and writing tests for all of this functionality. It appears to work well
+enough, so we should just leave it as-is.
+
+However, from now on, every time you want to make some modification (whether
+it be a refactoring, a bug fix, or a feature addition), write one or more
+test cases which demonstrate your desired result:
+
+Refactoring: Write tests surrounding the functionality you intend to
+ refactor. Show the test cases accurately represent the desired
+ functionality of the system by ensuring they all run properly. Then
+ perform the refactoring, ensuring you haven't broken anything by
+ making sure the tests all still run properly.
+
+Bug fix: Write one or more tests which shows the bug in action -- in other
+ words, it hits the bug, and produces erroneous results. Then modify
+ the system so that the test passes. You can be confident that
+ you've fixed the bug, because you have concrete feedback in the form
+ of your test suite that the bug no longer exists.
+
+Feature addition: Put together some tests which invoke the feature you want
+ to add, and test that the feature is working as it should.
+ Naturally, these tests will fail at first, because the feature
+ doesn't exist. But you then modify the production code to make the
+ feature work, and you stop when your tests all pass.
+
+Over time, as old code gets modified, the percentage of code covered by the
+tests will increase, and eventually we will have a comprehensively tested
+piece of software.
+
+During modifications, if you manage to break something accidentally, write a
+test to show the breakage and fix it from there. If you broke it once,
+there's a good chance it'll break again when someone else modifies it, and
+there should be a test to immediately warn the programmer that they've
+broken something.
+
+How do I run the unit tests?
+------------------------------
+
+The primary script that executes all of the unit tests is the 'alltests'
+script in the testing/ directory of the distribution. However, the output
+of this script is one line for every test that passes or fails.
+
+To help highlight the test failures, there is a 'run' script, which filters
+out all of the passes, and only shows you the failures. Very useful.
+
+So, your regular test run will be done with ./run, but if you want to see a
+thousand passes, run ./alltests. Both of these should be run from the
+testing/ directory. Running it from elsewhere isn't likely to get good
+results.
+
--- /dev/null
+<?php
+
+/* Send the array of query strings ($queries) to the DB connection given in
+ * $db.
+ */
+function BulkQueries($queries)
+{
+ global $globals;
+
+ foreach ($queries as $q)
+ {
+ $globals->db->query($q);
+ if ($globals->db->err())
+ {
+ die($globals->db->error()."\n".$globals->db->errinfo()."\n");
+ }
+ }
+}
--- /dev/null
+#!/usr/bin/php4 -Cq
+<?php
+
+$testfiles = array(
+ // For your own good, don't move these first two test suites
+ 'InternalTest' => array('InternalTest'),
+ 'DBTest' => array('DBInitialTest',
+ 'DiogenesDatabaseTest'),
+ 'DiogenesLoggerViewTest' => array('DiogenesLoggerViewTest')
+ );
+
+global $TESTING;
+$TESTING=true;
+chdir('..');
+
+error_reporting(E_ALL);
+ini_set('include_path', 'include:testing:'.ini_get('include_path'));
+
+require_once 'PHPUnit.php';
+
+foreach ($testfiles as $file => $tests)
+{
+ require_once "$file.php";
+
+ echo "Now running tests from $file.php...\n";
+
+ $suite = new PHPUnit_TestSuite();
+
+ foreach ($tests as $test)
+ {
+ $suite->addTestSuite($test);
+ }
+
+ $result = PHPUnit::run($suite);
+
+ echo $result->toString();
+}
+
+echo "All Tests Complete\n";
--- /dev/null
+--- Assert.php.orig 2004-06-09 15:52:13.000000000 +1000
++++ Assert.php 2004-06-09 15:55:10.000000000 +1000
+@@ -240,6 +240,89 @@
+ }
+
+ /**
++ * Asserts that the actual string does not match a given
++ * regular expression.
++ *
++ * @param string
++ * @param string
++ * @param string
++ * @access public
++ * @author Sébastien Hordeaux <marms@marms.com>
++ * @author Matthew Palmer <mpalmer@hezmatt.org>
++ */
++ function assertNotRegExp($expected, $actual, $message = '') {
++ $message = sprintf(
++ '%sexpected %s, actual %s',
++
++ !empty($message) ? $message . ' ' : '',
++ $expected,
++ $actual
++ );
++
++ if (preg_match($expected, $actual)) {
++ return $this->fail($message);
++ }
++ }
++
++ /**
++ * Asserts that the expected string is contained somewhere within the
++ * data string given.
++ *
++ * @param string
++ * @param string
++ * @param string
++ * @access public
++ * @author Matthew Palmer <mpalmer@hezmatt.org>
++ */
++ function assertSubStr($needle, $haystack, $message = '')
++ {
++ if (empty($message))
++ {
++ $message = sprintf(
++ '"%s" not found in "%s"',
++ $expected,
++ $actual
++ );
++ }
++
++ if (substr_count($haystack, $needle) == 0)
++ {
++ return $this->fail($message);
++ }
++
++ return $this->pass();
++ }
++
++ /**
++ * Asserts that the expected string is not contained anywhere within the
++ * data string given.
++ *
++ * @param string
++ * @param string
++ * @param string
++ * @access public
++ * @author Matthew Palmer <mpalmer@hezmatt.org>
++ */
++ function assertNotSubStr($needle, $haystack, $message = '')
++ {
++ if (empty($message))
++ {
++ $message = sprintf(
++ '"%s" found in "%s"',
++ $expected,
++ $actual
++ );
++ }
++
++ if (substr_count($haystack, $needle) > 0)
++ {
++ return $this->fail($message);
++ }
++
++ return $this->pass();
++ }
++
++ /**
+ * Asserts that a variable is of a given type.
+ *
+ * @param string $expected
--- /dev/null
+#!/bin/sh -e
+
+./alltests | grep -v '() passed$'
+
+echo