From 4023001a68b3d85891ab744eb77e7b22a9dd8e3f Mon Sep 17 00:00:00 2001 From: jimmacfx Date: Fri, 25 Nov 2005 22:16:10 +0000 Subject: import original 0.11 git-svn-id: https://forgesvn1.novell.com/svn/original/trunk@2 4fa712ea-3c06-0410-9261-c11b4c06c003 --- AUTHORS | 3 + COPYING | 340 ++++++++++++++++++++++++++++++++ CVS/Entries | 9 + CVS/Repository | 1 + CVS/Root | 1 + ChangeLog | 351 ++++++++++++++++++++++++++++++++++ README | 28 +++ REQUIREMENTS | 44 +++++ TODO | 7 + convert/CVS/Entries | 6 + convert/CVS/Repository | 1 + convert/CVS/Root | 1 + convert/Makefile | 44 +++++ convert/gdk-pixbuf-convert | Bin 0 -> 15595 bytes convert/gdk-pixbuf-convert.c | 226 ++++++++++++++++++++++ convert/gdk-pixbuf-convert.d | 80 ++++++++ convert/imgconv | 46 +++++ convert/webgallery-zenity.pl | 160 ++++++++++++++++ convert/webgallery.pl | 154 +++++++++++++++ logo.xcf.bz2 | Bin 0 -> 85758 bytes www/CVS/Entries | 11 ++ www/CVS/Repository | 1 + www/CVS/Root | 1 + www/bcg.png | Bin 0 -> 87 bytes www/inc/.config.inc.php.swo | Bin 0 -> 12288 bytes www/inc/CVS/Entries | 8 + www/inc/CVS/Repository | 1 + www/inc/CVS/Root | 1 + www/inc/config.inc.php | 71 +++++++ www/inc/exif.inc.php | 139 ++++++++++++++ www/inc/footer.inc.php | 27 +++ www/inc/funkce.inc.php | 96 ++++++++++ www/inc/header.inc.php | 14 ++ www/inc/javascript-eek.inc.php | 112 +++++++++++ www/inc/javascript.inc.php | 51 +++++ www/inc/styles/CVS/Entries | 2 + www/inc/styles/CVS/Repository | 1 + www/inc/styles/CVS/Root | 1 + www/inc/styles/default/CVS/Entries | 12 ++ www/inc/styles/default/CVS/Repository | 1 + www/inc/styles/default/CVS/Root | 1 + www/inc/styles/default/bcg.png | Bin 0 -> 87 bytes www/inc/styles/default/default.css | 285 +++++++++++++++++++++++++++ www/inc/styles/default/left-16.png | Bin 0 -> 298 bytes www/inc/styles/default/left.png | Bin 0 -> 523 bytes www/inc/styles/default/logo-mini.png | Bin 0 -> 4163 bytes www/inc/styles/default/minus.png | Bin 0 -> 291 bytes www/inc/styles/default/plus.png | Bin 0 -> 556 bytes www/inc/styles/default/right-16.png | Bin 0 -> 290 bytes www/inc/styles/default/right.png | Bin 0 -> 522 bytes www/inc/styles/default/title.png | Bin 0 -> 3434 bytes www/inc/styles/default/zip.png | Bin 0 -> 539 bytes www/inc/styles/gorilla/CVS/Entries | 7 + www/inc/styles/gorilla/CVS/Repository | 1 + www/inc/styles/gorilla/CVS/Root | 1 + www/inc/styles/gorilla/gorilla.css | 258 +++++++++++++++++++++++++ www/inc/styles/gorilla/left.png | Bin 0 -> 1644 bytes www/inc/styles/gorilla/minus.png | Bin 0 -> 1403 bytes www/inc/styles/gorilla/plus.png | Bin 0 -> 1436 bytes www/inc/styles/gorilla/right.png | Bin 0 -> 1661 bytes www/inc/styles/gorilla/title.png | Bin 0 -> 2506 bytes www/inc/styles/ie/ie.css | 8 + www/inc/stylesheet.inc.css | 141 ++++++++++++++ www/inc/www.class.inc.php | 210 ++++++++++++++++++++ www/index.php | 284 +++++++++++++++++++++++++++ www/left.png | Bin 0 -> 1644 bytes www/logo-mini.png | Bin 0 -> 4163 bytes www/logo.png | Bin 0 -> 15635 bytes www/minus.png | Bin 0 -> 1403 bytes www/plus.png | Bin 0 -> 1436 bytes www/right.png | Bin 0 -> 1661 bytes www/top.png | Bin 0 -> 1631 bytes www/zip.png | Bin 0 -> 1027 bytes 73 files changed, 3248 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 CVS/Entries create mode 100644 CVS/Repository create mode 100644 CVS/Root create mode 100644 ChangeLog create mode 100644 README create mode 100644 REQUIREMENTS create mode 100644 TODO create mode 100644 convert/CVS/Entries create mode 100644 convert/CVS/Repository create mode 100644 convert/CVS/Root create mode 100644 convert/Makefile create mode 100755 convert/gdk-pixbuf-convert create mode 100644 convert/gdk-pixbuf-convert.c create mode 100644 convert/gdk-pixbuf-convert.d create mode 100755 convert/imgconv create mode 100755 convert/webgallery-zenity.pl create mode 100755 convert/webgallery.pl create mode 100644 logo.xcf.bz2 create mode 100644 www/CVS/Entries create mode 100644 www/CVS/Repository create mode 100644 www/CVS/Root create mode 100644 www/bcg.png create mode 100644 www/inc/.config.inc.php.swo create mode 100644 www/inc/CVS/Entries create mode 100644 www/inc/CVS/Repository create mode 100644 www/inc/CVS/Root create mode 100644 www/inc/config.inc.php create mode 100644 www/inc/exif.inc.php create mode 100644 www/inc/footer.inc.php create mode 100644 www/inc/funkce.inc.php create mode 100644 www/inc/header.inc.php create mode 100644 www/inc/javascript-eek.inc.php create mode 100644 www/inc/javascript.inc.php create mode 100644 www/inc/styles/CVS/Entries create mode 100644 www/inc/styles/CVS/Repository create mode 100644 www/inc/styles/CVS/Root create mode 100644 www/inc/styles/default/CVS/Entries create mode 100644 www/inc/styles/default/CVS/Repository create mode 100644 www/inc/styles/default/CVS/Root create mode 100644 www/inc/styles/default/bcg.png create mode 100644 www/inc/styles/default/default.css create mode 100644 www/inc/styles/default/left-16.png create mode 100644 www/inc/styles/default/left.png create mode 100644 www/inc/styles/default/logo-mini.png create mode 100644 www/inc/styles/default/minus.png create mode 100644 www/inc/styles/default/plus.png create mode 100644 www/inc/styles/default/right-16.png create mode 100644 www/inc/styles/default/right.png create mode 100644 www/inc/styles/default/title.png create mode 100644 www/inc/styles/default/zip.png create mode 100644 www/inc/styles/gorilla/CVS/Entries create mode 100644 www/inc/styles/gorilla/CVS/Repository create mode 100644 www/inc/styles/gorilla/CVS/Root create mode 100644 www/inc/styles/gorilla/gorilla.css create mode 100644 www/inc/styles/gorilla/left.png create mode 100644 www/inc/styles/gorilla/minus.png create mode 100644 www/inc/styles/gorilla/plus.png create mode 100644 www/inc/styles/gorilla/right.png create mode 100644 www/inc/styles/gorilla/title.png create mode 100644 www/inc/styles/ie/ie.css create mode 100644 www/inc/stylesheet.inc.css create mode 100644 www/inc/www.class.inc.php create mode 100644 www/index.php create mode 100644 www/left.png create mode 100644 www/logo-mini.png create mode 100644 www/logo.png create mode 100644 www/minus.png create mode 100644 www/plus.png create mode 100644 www/right.png create mode 100644 www/top.png create mode 100644 www/zip.png diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..ee84f3b --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Jakub Steiner (original package, zenity-based frontend) +Tuomas Kuosmanen (Nautilus script) +Larry Ewing (gdk-pixbuf scaler) diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + 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. + + 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.) + +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. + + 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. + + 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 + + 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. + + + Copyright (C) + + 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. + + , 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. diff --git a/CVS/Entries b/CVS/Entries new file mode 100644 index 0000000..cb873e4 --- /dev/null +++ b/CVS/Entries @@ -0,0 +1,9 @@ +/AUTHORS/1.1.1.1/Tue Oct 21 06:45:08 2003// +/COPYING/1.1.1.1/Tue Oct 21 06:45:11 2003// +/README/1.1.1.1/Tue Oct 21 06:45:00 2003// +/REQUIREMENTS/1.1.1.1/Tue Oct 21 06:45:00 2003// +/logo.xcf.bz2/1.1.1.1/Tue Oct 21 06:45:08 2003// +D/convert//// +D/www//// +/TODO/1.2/Sun Oct 26 15:07:52 2003// +/ChangeLog/1.26/Sun Nov 2 18:58:17 2003// diff --git a/CVS/Repository b/CVS/Repository new file mode 100644 index 0000000..4b48dee --- /dev/null +++ b/CVS/Repository @@ -0,0 +1 @@ +original diff --git a/CVS/Root b/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..a712fa0 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,351 @@ +2004-02-16 Jakub Steiner + + * www/inc/header.inc.php: + * www/inc/javascript.inc.php: + * www/inc/www.class.inc.php: + * www/inc/config.inc.php: make stylesheet selectable in the + document (javascript dependent). Set a cookie so it gets stored + across session. + + * www/inc/stylesheet/ie/ie.css: dummy (doesn't crash IE) + * www/inc/stylesheet/default/default.css: doesn't jump in + thumbnail view + * www/inc/stylesheet/gorilla/gorilla.css: implemented centering + of the image properly. First, I hacked up a gross javascript + kludge then figured a trivial solution with CSS. ehm + * www/index.php: solve tall images overlapping description by a + small inline style="" definition. This breaks CSS2 validity, + though? + +2004-01-10 Colin Marquardt + + * convert/webgallery-zenity.pl: Quote $arg in system calls to + handle filenames with spaces. + + * www/index.php, + www/inc/header.inc.php, + www/inc/footer.inc.php, + www/inc/www.class.inc.php, + www/inc/funkce.inc.php: + Make it validate with W3C. + Make resulting HTML more readable. + +2003-12-15 Colin Marquardt + + * convert/webgallery-zenity.pl: Set mtime of web-gallery directory + to the mtime of the first image with a good-looking time stamp. + Skip directories and non-image files. + Set autoflush for PROGRESS in a more readable way. + (make_dirs): Better error messages (show them to the user). + +2003-12-07 Colin Marquardt + + * convert/webgallery-zenity.pl: Use gdk-pixbuf-convert if + available, otherwise convert. Make error messages more in spirit + of the HIG (zenity doesn't support Pango markup though?). Some + cleanup. + +2003-11-02 Jakub Steiner + + patch from Colin Marquardt : + + * convert/gdk-pixbuf-convert.c: Add '-quality' switch. + + * convert/webgallery-zenity.pl: Use new '-quality' switch. + Make error messages nicer. + +2003-11-01 Jakub Steiner + + * www/index.php + * www/inc/exif.inc.php + * www/inc/funkce.inc.php + * www/inc/www.class.inc.php: stylesheet & $gallery_dir updates + + * www/inc/styles/gorilla/left.png + * www/inc/styles/gorilla/right.png + * www/inc/styles/gorilla/gorilla.css: stylesheet updates + + * www/inc/styles/default/bcg.png + * www/inc/styles/default/default.css + * www/inc/styles/default/left-16.png + * www/inc/styles/default/left.png + * www/inc/styles/default/logo-mini.png + * www/inc/styles/default/minus.png + * www/inc/styles/default/plus.png + * www/inc/styles/default/right-16.png + * www/inc/styles/default/right.png + * www/inc/styles/default/title.png + * www/inc/styles/default/zip.png: default stylesheet (WIP) + +2003-10-27 Jakub Steiner + + * www/inc/styles/gorilla/gorilla.css + * www/inc/styles/gorilla/minus.png + * www/inc/styles/gorilla/plus.png + * www/inc/styles/gorilla/title.png + * www/inc/header.inc.php + * www/index.php: more stylesheet work. _Some_ issues. Like + killing IE6 *ehm* ;) + + I'll concentrate on doing the original stylesheet first and let + my gorilla playground there for a while. + +2003-10-27 Jakub Steiner + + * www/index.php: + * www/inc/funkce.inc.php: applied a patch from Mark, fixing + issues with local relative paths + + Also fixed archive listing in the gallery thumbnail view. + +2003-10-27 Jakub Steiner + + * www/index.php: remove legacy style definitions + +2003-10-27 Mark Finlay + + * www/index.php: + (Re)Add year sorting when generating the index page. + +2003-10-26 Jakub Steiner + + * www/index.php + * www/inc/config.inc.php + * www/inc/footer.inc.php + * www/inc/funkce.inc.php + * www/inc/header.inc.php + * www/inc/www.class.inc.php: start breaking style and document + structure apart. There will be multiple styles to choose from, + including a plaintext one. The navigation and titlebar artwork + will be implemented in CSS eventually so no php-fu for this + will be required. + + Because of this, the plaintext config option will go, since + this will all be defined by using a specific stylesheet. + + Cleaned up the navigation() function. + + Header and footer are unfinished. + + * www/inc/stylesheet.inc.css: removed global stylesheet + * www/inc/styles/gorilla/gorilla.css: sample Gorilla stylesheet. + It will not be the default. It's just something to start with. + The existing artwork will go to the stylesheet directory. + +2003-10-26 Mark Finlay + + * www/index.php: + Change datefile format in expectance + of supporting sorting by date of the + month. + +2003-10-26 Mark Finlay + + * www/inc/config.inc.php: + Fix comment for $gallery_dir + +2003-10-26 Jakub Steiner + + * www/index.php: + * www/inc/www.class.inc.php: + * www/inc/funkce.inc.php: implement $gallery_dir correctly + +2003-10-26 Jakub Steiner + + * www/inc/config.inc.php: get rid of old gallery listing + + * www/inc/www.class.inc.php: rename the SortedDir() function to + be the constructor (easier-to-read code). + + * www/index.php: used spaces instead of tabs, the indentation + looked weird (3 spaces == 1 tab) + +2003-10-26 Jakub Steiner + + * www/inc/www.class.inc.php: + * www/index.php: remove old unused classes, start renaming + cz>en variables + + * TODO: prepare for the stylesheet stuff + +2003-10-26 Mark Finlay + + * www/inc/config.inc.php: + Remove the trailing / from $gallery_dir + + * www/index.php: + Implement using $gallery_dir preference + + * www/galleries: + Directory Added; new location for galleries + +2003-10-26 Mark Finlay + + * www/inc/config.inc.php: + Add gallery directory preference; still need + to make index.php use this preference. + +2003-10-25 Mark Finlay + + * www/index.php: + Fix include() and require() statements so that they work + on more php configurations. + +2003-10-25 Mark Finlay + + * www/inc/config.inc.php: + Turn off EXIF retreival by default + +2003-10-25 Colin Marquardt + + * www/inc/config.inc.php: Set version to "0.7-cvs". + Make format more customization friendly. + + * www/inc/exif.inc.php: Quote filename given to exec in case there + are spaces in the path. + + * www/inc/config.inc.php: Add examples for jhead. + + * www/inc/exif.inc.php: Use trim() for comparisons, this makes it + work with jhead as EXIF extractor. + +2003-10-24 Colin Marquardt + + * www/inc/www.class.inc.php: New class SortDir with SortedDir() + and Read() functions. (patch by Markus Ulbricht, thanks) + + * www/index.php: Use SortedDir() function. (patch by Markus Ulbricht) + +2003-10-24 Mark Finlay + + * www/index.php: + Fix navigation bar so it works with register_globals off + +2003-10-24 Mark Finlay + + * www/inc/header.inc.php: + Use Same header for all pages + + * www/index.php: + Add heirarchy navigation bar + +2003-10-24 Mark Finlay + + * www/index.php: + Fix new sorting algorithm to show newest galleries first + +2003-10-24 Mark Finlay + + * www/index.php: + Add the ability to use date.txt in each gallery to specify + the date for that gallery. + +2003-10-23 Mark Finlay + + * www/inc/footer.inc.php: + * www/inc/header.inc.php: + ADDED; Make the header image a link to the root of the site + instead of the Original Home Page. + + * www/index.php: + Modified to use new header and footer include files; + Added comments to sepporate different pages + +2003-10-22 Colin Marquardt + + * www/index.php: + * www/inc/config.inc.php: + * www/inc/exif.inc.php: + * www/inc/funkce.inc.php: + * www/inc/www.class.inc.php: + + Make it work with register_globals = Off in php.ini. + +2003-10-22 Colin Marquardt + + * convert/Makefile (uninstall): New target. + +2003-10-21 Colin Marquardt + + * convert/gdk-pixbuf-convert.c: #include + , not local file. + (main): Add meaningful usage text. + + * convert/Makefile: New file. + +2003-10-21 Mark Finlay + + Initial Checkin of Original to CVS + +2003-08-22 Jakub Steiner + + * convert/webgallery-zenity.pl: modification of Tuomas' script. + Uses gnome2's zenity for progress bars, no gtk-perl magic + * convert/gdk-pixbuf-convert.c: Larry Ewing's pixbuf-based + scaler. This thing is fast! + +2002-11-19 Jakub Steiner + + * convert/imgconv: + * convert/webgallery.pl: go back to ImageMagcik. It keeps EXIF + info while scaling, jpeg thumbnails + * www/index.php, www/inc/config.inc.php, www/inc/exif.inc.php: + - nicer index + - jpeg thumbnail support + - don't show EXIF mode switch when no EXIF info available + - fix portrait thumbnail scaling (should work fo most aspect + ratios now) + - previous/next image thumbnails (in image mode) + - Mozilla's link navigation (First, Previous, Next, Last, Top) + * www/left.png, right.png, top.png, plus.png, minus.png: new icons (from + gorilla) + * logo.xcf.bz2, www/logo.png, www/logo-mini.png: pretty logo + +2002-04-01 Jakub Steiner + + * convert/imgconv: + * convert/webgallery.pl: use netpbm instead of ImageMagick; + imgconv now uses the same subdir as webgallery.pl + + * www/index.php, www/inc/config.inc.php: portrait thumbnails are now the + same height as the landscape ones. Also incorporated suggestion from + Eduardo Pérez <100018135@alumnos.uc3m.es> to support ISO 8601 + date format instead of the US format. + + And last but not least the imgconv has a commented-out line to + tar up or zip the HQ or MQ images. index.php links to those in + the thumbnail view if you have them uploaded. The minithumbnail + view also has a small floppy icon (zip.png) for the HQ version. + + +2001-10-27 Jakub Steiner + + * www/inc/config.inc.php: + * www/inc/exif.inc.php: php4 exif handling (untested); also added + config option to have fixed thumbnails (looks better on + portrait photos) + * convert/webgallery.pl: use nautilus metafile to get comments + +2001-10-16 Jakub Steiner + + * www/index.php: mini thumbnails + * www/inc/exif.inc.php: EXIF stuff (using Metacam), check + REQUIREMENTS + +2001-04-14 Jakub Steiner + + * REQUIREMENTS: Imagemagick, perl, gtk-perl, bash ;) + * convert/webgallery.pl: Tigert's Nautilus web-gallery + script for Nautilus. It simply rocks! + * *.png: I accidentaly left the gif images in the + distribution + * index.php: check for mq and hq dirs before creating a link + + +16.10.2000 - few configuration addditions + - dropped nasty GIF format for the navigation + (1bit mask is screwed under NN4, but its CSS support + is so crap, so that the default theme is unusable for it) + also imgconv is using png fro thumbnails (64 colors should + be enough for everyone (tm)) +15.10.2000 - first public release diff --git a/README b/README new file mode 100644 index 0000000..efb7356 --- /dev/null +++ b/README @@ -0,0 +1,28 @@ +This package includes two separate applications. In the www dir, there is the +PHP frontend app, the convert dir includes a simple (too simple i guess) script +that converts your wildcard of images into three subdirs in the current +directory. You can easily create and upload all images using: + + mkdir temp + cd $_ + /path/to/imgconv *.png *.gif *.{jpeg,jpg} + scp -rp ./web-gallery me@my_server:web_dir/gallery_name + +and that's it. + +Tuomas Kuosmannen (tigert@gimp.org) has created a Nautilus script to create +"original" galleries (check the REQUIREMENTS file). Just copy the +convert/webgallery.pl file to ~/.gnome2/nautilus-scripts and make sure it's got +the execute bit set. + +# UPDATE + + Apart from using netpbm package (http://sourceforge.net/projects/netpbm/) for + scaling images, the new webgallery-zenity.pl script uses Larry Ewing's + gdk-pixbuf-based scaler. See REQUIREMENTS for details. + + Latest versions of the tools can be found at + http://jimmac.musichall.cz/original.php3 + +-- +Jakub 'Jimmac' Steiner diff --git a/REQUIREMENTS b/REQUIREMENTS new file mode 100644 index 0000000..119c570 --- /dev/null +++ b/REQUIREMENTS @@ -0,0 +1,44 @@ +The web backend requires to have a PHP scripting engine running on +your web server. + +There are two scripts doing the scaling work. convert/imgconv is a plain +bash script using Imagemagick to generate thumbnails and scaling images. +You can get Imagemagick at http://www.imagemagick.org/. + +# UPDATES # + +* netpbm + ------ + You can use netpbm tools instead of ImageMagick for better speed. You can + grab netpbm at http://sourceforge.net/projects/netpbm/ but ususally your + distro ships with it already. My YDL distro has all the toos in netpbm-progs + package. + +* webgallery.pl + ------------- + + Tuomas Kuosmannen created a nautilus script that operates on selection + of images. It's way cooler than the bash script. Because the operation + can take a while, it has a nifty progressbar. The script itself is in + Perl, so you obviously need a functiuoning installation of Perl. For the + progressbar to work, you need gtk-perl bindings. You can get them at + ftp://ftp.gtk.org. Nautilus is a GUI file manager that rocks for photo + management. you can grab it at http://www.eazel.com. + +* webgallery-zenity.pl + -------------------- + + I hacked up Tuomas' script to use only gnome's zenity for the progress bars, + so there's no more gtk-perl dependency. Also this script uses Larry Ewing's + cool gdk-pixbuf scaler. It is an alternative to ImageMagick's convert + (sharing the basic commandline parameters) that discards EXIF information + (yet), but is 5 to 8 times as fast. You can really tell on large galleries. + You can find both at the convert/ directory. Instructions how to compile + gdk-pixbuf-convert.c are included in the file header. + + +If you wan't to have advanced EXIF information for your photos, make sure you +use a recent ImageMagick so that convert doesn't throw away this info when +scaling down. Also grab Metacam +(http://www.cheeseplant.org/~daniel/pages/metacam.html) and configure the path +to it in inc/config.inc.php. diff --git a/TODO b/TODO new file mode 100644 index 0000000..83b0280 --- /dev/null +++ b/TODO @@ -0,0 +1,7 @@ +- editable image comments (in php, not using nautilus metadata as ATM) +- mysql logging (how many people seen particular picture, rating etc) / optional +- default setting for quality (LQ/MQ/HQ) + + +Jimmac: * make an XHTML document with external CSS stylesheet(s) + * get rid of czech comments and variable names diff --git a/convert/CVS/Entries b/convert/CVS/Entries new file mode 100644 index 0000000..c0db717 --- /dev/null +++ b/convert/CVS/Entries @@ -0,0 +1,6 @@ +/Makefile/1.2/Thu Oct 23 07:35:22 2003// +/imgconv/1.1.1.1/Tue Oct 21 06:45:11 2003// +/webgallery.pl/1.1.1.1/Tue Oct 21 06:45:11 2003// +/gdk-pixbuf-convert.c/1.3/Sun Nov 2 18:57:35 2003// +/webgallery-zenity.pl/1.2/Sun Nov 2 18:57:35 2003// +D diff --git a/convert/CVS/Repository b/convert/CVS/Repository new file mode 100644 index 0000000..4bbc3e5 --- /dev/null +++ b/convert/CVS/Repository @@ -0,0 +1 @@ +original/convert diff --git a/convert/CVS/Root b/convert/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/convert/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/convert/Makefile b/convert/Makefile new file mode 100644 index 0000000..e350747 --- /dev/null +++ b/convert/Makefile @@ -0,0 +1,44 @@ +PREFIX = /usr/local + +GTKCFLAGS = `pkg-config --cflags gtk+-2.0` +GTKLDFLAGS += `pkg-config --libs gtk+-2.0` +GDKPIXBUFCFLAGS = `pkg-config --cflags gdk-pixbuf-2.0` +GDKPIXBUFLDFLAGS += `pkg-config --libs gdk-pixbuf-2.0` + +CPPFLAGS = $(GTKCFLAGS) -D_GNU_SOURCE +ifeq ($(DEBUG),yes) +CFLAGS += -O2 -g +LDFLAGS = -g #-lefence +else +CFLAGS += -Os -fomit-frame-pointer +endif +CFLAGS += -Wall +CPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\" +CFLAGS += -MD + +MEMBERS = gdk-pixbuf-convert +LIB_MEMBERS = + +OBJS = $(patsubst %,%.o,$(MEMBERS)) +SOURCES = $(patsubst %,%.c,$(MEMBERS) $(LIB_MEMBERS)) +LIB_OBJS = $(patsubst %,%.o,$(LIB_MEMBERS)) +LIB_SOURCES = $(patsubst %,%.c,$(LIB_MEMBERS)) + +DEPS = $(patsubst %,%.d,$(MEMBERS) $(LIB_MEMBERS)) + + +all: gdk-pixbuf-convert + +gdk-pixbuf-convert: $(OBJS) + $(CC) -o $@ $^ $(GDKPIXBUFCFLAGS) $(GDKPIXBUFLDFLAGS) $(LDFLAGS) -L. + +clean: + rm -f $(MEMBERS) $(OBJS) $(DEPS) + +install: all + mkdir -p $(PREFIX)/bin + install -s $(MEMBERS) $(PREFIX)/bin/ + +uninstall: + $(RM) $(PREFIX)/bin/$(MEMBERS) + diff --git a/convert/gdk-pixbuf-convert b/convert/gdk-pixbuf-convert new file mode 100755 index 0000000..d6943b1 Binary files /dev/null and b/convert/gdk-pixbuf-convert differ diff --git a/convert/gdk-pixbuf-convert.c b/convert/gdk-pixbuf-convert.c new file mode 100644 index 0000000..2bdbeca --- /dev/null +++ b/convert/gdk-pixbuf-convert.c @@ -0,0 +1,226 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* + * gdk-pixbuf-convert.c gdk pixbuf replacement for convert geometry commands + * + * Copyright (C) 2003 Ximian Inc. + * + * Author: Larry Ewing + * + * 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. + */ + +/* + * build with + * gcc `pkg-config --cflags gdk-pixbuf-2.0` gdk-pixbuf-convert.c -o gdk-pixbuf-convert `pkg-config --libs gdk-pixbuf-2.0` + */ + +#include +#include +#include +#include +#include +#include + +#define d(x) x + +typedef enum { + SAVE_JPG, + SAVE_PNG +} OutputType; + +GdkPixbuf * +scale (GdkPixbuf *src, char *geom) +{ + GdkPixbuf *dest = NULL; + char *s, *e; + guint w; + guint h; + guint src_w, dest_w; + guint src_h, dest_h; + double scale_w = 1.0; + double scale_h = 1.0; + gboolean force = FALSE; + + src_w = gdk_pixbuf_get_width (src); + src_h = gdk_pixbuf_get_height (src); + + /* d(printf ("%d %d ", src_w, src_h);) */ + + s = e = geom; + + w = strtol (s, &e, 10); + /* d(printf ("%d ", w);) */ + if (e != s) { + scale_w = w / (double)src_w; + } else { + w = 100; + } + + + if (*e == 'x') + e++; + else + return NULL; + + s = e; + + h = strtol (s, &e, 10); + /* d(printf ("%d ", h);) */ + if (e != s) { + scale_h = h / (double)src_h; + } else { + h = 100; + } + + if (*e == '%') { + scale_h = h / 100.0; + scale_w = w / 100.0; + e++; + } + + /* d(printf ("%f %f\n", scale_w, scale_h);) */ + + while (*e) { + switch (*e) { + case '!': + force = TRUE; + break; + case '>': + if (scale_w >= 1.0 && scale_h >= 1.0) + scale_w = scale_h = 1.0; + break; + case '<': + if (scale_w < 1.0 || scale_h <= 1.0) + scale_w = scale_h = 1.0; + break; + default: + break; + } + e++; + } + + if (!force) { + /* Keep aspect ratio */ + scale_w = scale_h = MIN (scale_h, scale_w); + } + + dest_w = (int)(src_w * scale_w + 0.5); + dest_h = (int)(src_h * scale_h + 0.5); + + /* printf ("%dx%d\n", dest_w, dest_h); */ + + /* dest = gdk_pixbuf_scale_simple (src, dest_w, dest_h, GDK_INTERP_BILINEAR);*/ + dest = gdk_pixbuf_scale_simple (src, dest_w, dest_h, GDK_INTERP_HYPER); + + return dest; +} + +OutputType +get_filetype (char *filename) +{ + gint len = strlen (filename); + + if (len > 4 && g_ascii_strncasecmp (filename + len - 4, ".png", 4)== 0) + return SAVE_PNG; + else + return SAVE_JPG; +} + +int +convert (char *geom, char *quality, char *sfile, char *dfile) +{ + GdkPixbuf *src; + GdkPixbuf *dest; + GError *error = NULL; + + src = gdk_pixbuf_new_from_file (sfile, &error); + + if (!src) { + fprintf (stderr, "Unable to open input file"); + return 1; + } + + if (geom) { + dest = scale (src, geom); + } else { + dest = src; + g_object_ref (dest); + } + + if (!dest) + return 1; + + unlink (dfile); + if (get_filetype (dfile) == SAVE_JPG) + gdk_pixbuf_save (dest, dfile, "jpeg", &error, + "quality", quality, NULL); + else + gdk_pixbuf_save (dest, dfile, "png", &error, NULL); + + g_object_unref (src); + g_object_unref (dest); + + if (error) { + return 1; + } + + return 0; +} + +int +main (int argc, char **argv) +{ + char *dfile; + char *sfile; + char *geom = NULL; + char *quality = "100"; + + g_type_init (); + + if (argc > 4) { + int i = 1; + if (!g_ascii_strcasecmp (argv[i], "-geometry")) { + i++; + geom = argv[i++]; + if (argc < 5) + goto usage; + } + if (!g_ascii_strcasecmp (argv[i], "-quality")) { + i++; + quality = argv[i++]; + if (argc < 7) + goto usage; + if ((atoi(quality) < 0) || (atoi(quality) > 100)) { + g_print ("Value for '-quality' must be in range 0-100!\n"); + goto usage; + } + } + sfile = argv[i++]; + dfile = argv[i++]; + } else { + goto usage; + } + + return convert (geom, quality, sfile, dfile); + + usage: + g_print ("Usage:\n"); + g_print (" gdk-pixbuf-convert -geometry x [-quality <0-100>] \n"); + g_print ("\n"); + g_print ("Example:\n"); + g_print (" gdk-pixbuf-convert -geometry 120x120 -quality 75 foo.jpg bar.jpg\n"); + exit (2); +} diff --git a/convert/gdk-pixbuf-convert.d b/convert/gdk-pixbuf-convert.d new file mode 100644 index 0000000..f0e1e76 --- /dev/null +++ b/convert/gdk-pixbuf-convert.d @@ -0,0 +1,80 @@ +gdk-pixbuf-convert.o: gdk-pixbuf-convert.c /usr/include/stdio.h \ + /usr/include/features.h /usr/include/sys/cdefs.h \ + /usr/include/gnu/stubs.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h \ + /usr/include/bits/types.h /usr/include/bits/wordsize.h \ + /usr/include/bits/typesizes.h /usr/include/libio.h \ + /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \ + /usr/include/gconv.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h \ + /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ + /usr/include/stdlib.h /usr/include/bits/waitflags.h \ + /usr/include/bits/waitstatus.h /usr/include/endian.h \ + /usr/include/bits/endian.h /usr/include/xlocale.h \ + /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \ + /usr/include/bits/select.h /usr/include/bits/sigset.h \ + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \ + /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \ + /usr/include/alloca.h /usr/include/unistd.h \ + /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \ + /usr/include/bits/confname.h /usr/include/getopt.h \ + /usr/include/string.h /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h \ + /usr/include/glib-2.0/glib.h /usr/include/glib-2.0/glib/galloca.h \ + /usr/include/glib-2.0/glib/gtypes.h \ + /usr/lib/glib-2.0/include/glibconfig.h \ + /usr/include/glib-2.0/glib/gmacros.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/limits.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/syslimits.h \ + /usr/include/limits.h /usr/include/bits/posix1_lim.h \ + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ + /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ + /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/float.h \ + /usr/include/glib-2.0/glib/garray.h \ + /usr/include/glib-2.0/glib/gasyncqueue.h \ + /usr/include/glib-2.0/glib/gthread.h \ + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \ + /usr/include/glib-2.0/glib/gbacktrace.h \ + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \ + /usr/include/glib-2.0/glib/gmem.h \ + /usr/include/glib-2.0/glib/gcompletion.h \ + /usr/include/glib-2.0/glib/gconvert.h \ + /usr/include/glib-2.0/glib/gdataset.h \ + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \ + /usr/include/glib-2.0/glib/gfileutils.h \ + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \ + /usr/include/glib-2.0/glib/giochannel.h \ + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \ + /usr/include/glib-2.0/glib/gstring.h \ + /usr/include/glib-2.0/glib/gunicode.h \ + /usr/include/glib-2.0/glib/gmarkup.h \ + /usr/include/glib-2.0/glib/gmessages.h \ + /usr/include/glib-2.0/glib/gnode.h \ + /usr/include/glib-2.0/glib/gpattern.h \ + /usr/include/glib-2.0/glib/gprimes.h \ + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \ + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \ + /usr/include/glib-2.0/glib/gscanner.h \ + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \ + /usr/include/glib-2.0/glib/gstrfuncs.h \ + /usr/include/glib-2.0/glib/gthreadpool.h \ + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \ + /usr/include/glib-2.0/glib/gutils.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-features.h \ + /usr/include/glib-2.0/glib-object.h \ + /usr/include/glib-2.0/gobject/gboxed.h \ + /usr/include/glib-2.0/gobject/gtype.h \ + /usr/include/glib-2.0/gobject/genums.h \ + /usr/include/glib-2.0/gobject/gobject.h \ + /usr/include/glib-2.0/gobject/gvalue.h \ + /usr/include/glib-2.0/gobject/gparam.h \ + /usr/include/glib-2.0/gobject/gclosure.h \ + /usr/include/glib-2.0/gobject/gsignal.h \ + /usr/include/glib-2.0/gobject/gmarshal.h \ + /usr/include/glib-2.0/gobject/gparamspecs.h \ + /usr/include/glib-2.0/gobject/gsourceclosure.h \ + /usr/include/glib-2.0/gobject/gtypemodule.h \ + /usr/include/glib-2.0/gobject/gtypeplugin.h \ + /usr/include/glib-2.0/gobject/gvaluearray.h \ + /usr/include/glib-2.0/gobject/gvaluetypes.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h \ + /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h diff --git a/convert/imgconv b/convert/imgconv new file mode 100755 index 0000000..3ac8bc5 --- /dev/null +++ b/convert/imgconv @@ -0,0 +1,46 @@ +#!/bin/bash + +#sem dodelat err + +adresar=$@ + +mkdir ./web-gallery +mkdir ./web-gallery/thumbs +mkdir ./web-gallery/lq +mkdir ./web-gallery/mq +mkdir ./web-gallery/hq +mkdir ./web-gallery/zip #used for image tarballs +mkdir ./web-gallery/comments + +i=1 +for soubor in $adresar + do + echo "konvertuji $soubor" +# IMAGEMAGICK + #convert -geometry 160x120 -colors 16 -dither $soubor ./web-gallery/thumbs/img-$i.png + convert -geometry 120x120 $soubor ./web-gallery/thumbs/img-$i.jpg + convert -geometry 640x480 $soubor ./web-gallery/lq/img-$i.jpg + convert -geometry 800x600 $soubor ./web-gallery/mq/img-$i.jpg + +# NETPBM + #jpegtopnm $soubor > temp.pnm + ##cat temp.pnm | pnmscale -xysize 120 120 | ppmquant -floyd 16 | pnmtopng -interlace -compression 9 > ./web-gallery/thumbs/img-$i.png + #cat temp.pnm | pnmscale -xysize 120 120 | ppmtojpeg --quality 80 --progressive > ./web-gallery/thumbs/img-$i.jpg + #cat temp.pnm | pnmscale -xysize 640 640 | ppmtojpeg --quality 80 --progressive > ./web-gallery/lq/img-$i.jpg + #cat temp.pnm | pnmscale -xysize 800 800 | ppmtojpeg --quality 80 --progressive > ./web-gallery/mq/img-$i.jpg + #rm temp.pnm + + cp $soubor ./web-gallery/hq/img-$i.jpg + # template for comment + echo "image $i " > ./web-gallery/comments/$i.txt + i=`expr $i + 1` +done + +##################### +# Tar-up/zip images # +##################### + +#tar cvjf web-gallery/zip/mq.tar.bz2 mq/*.jpg +#tar cvjf web-gallery/zip/hq.tar.bz2 hq/*.jpg +zip -R web-gallery/zip/mq.zip web-gallery/mq/*.jpg +zip -R web-gallery/zip/hq.zip web-gallery/hq/*.jpg diff --git a/convert/webgallery-zenity.pl b/convert/webgallery-zenity.pl new file mode 100755 index 0000000..a6377d0 --- /dev/null +++ b/convert/webgallery-zenity.pl @@ -0,0 +1,160 @@ +#!/usr/bin/perl -w + +# little script to generate image galleries for use with original PHP backend +# uses Gnome's zenity for user dialogs +# uses gdk-pixbuf-convert if available, otherwise convert (from ImageMagick) +# (c) 2003-2004 Jakub 'jimmac' Steiner, (c) 2003-2004 Colin Marquardt +# based on webgallery.pl by Tuomas Kuosmanen + +use strict; +use warnings; +use FileHandle; + +my $num_of_args = scalar @ARGV; + +if (!@ARGV or ($num_of_args == 0)) { + exec("zenity --error --title \"\" --text \"No args\n\nYou have to select images to work on.\""); + exit; +} + +my $GdkPixbufConvert = "gdk-pixbuf-convert"; +my $Convert = "convert"; +my $dir = "web-gallery"; + + +# try to find a scaler program +my $scaler; +$scaler = `which $GdkPixbufConvert`; +if ($scaler eq "") { + $scaler = `which $Convert`; +} +if ($scaler eq "") { + exec("zenity --error --title \"Giving Up\" --text \"No scaling program\n\nYou need to have '$GdkPixbufConvert' or '$Convert' available.\""); + exit; +} +chomp $scaler; + +my @args = sort(@ARGV); +my $NumOfIncrements = 5; # 5 increments per file (as we are + # expecting to create 5 files for each + # image) +my $increment = 100 / ($num_of_args * $NumOfIncrements); +my $progress=0; +my $reply=""; + +sub make_dirs { + my $ErrMsg; + unless (-d "$dir") { + mkdir("./$dir") or + $ErrMsg .= "Could not create './$dir'!\n"; + } + unless (-d "$dir/thumbs") { + mkdir("./$dir/thumbs") or + $ErrMsg .= "Could not create './$dir/thumbs'!\n"; + } + unless (-d "$dir/lq") { + mkdir("./$dir/lq") or + $ErrMsg .= "Could not create './$dir/lq'!\n"; + } + unless (-d "$dir/mq") { + mkdir("./$dir/mq") or + $ErrMsg .= "Could not create './$dir/mq'!\n"; + } + unless (-d "$dir/hq") { + mkdir("./$dir/hq") or + $ErrMsg .= "Could not create './$dir/hq'!\n"; + } + unless (-d "$dir/comments") { + mkdir("./$dir/comments") or + $ErrMsg .= "Could not create './$dir/comments'!\n"; + } + unless (-d "$dir/zip") { + mkdir("./$dir/zip") or + $ErrMsg .= "Could not create './$dir/zip'!\n"; + } + if ($ErrMsg ne "") { + exec("zenity --error --title \"Giving Up\" --text \"Fatal Error\n\n$ErrMsg\""); + die "Errors occurred:\n$ErrMsg"; + } +} +make_dirs(); + +# ------------------------------------------------------------------------ +open(PROGRESS,"| zenity --progress --auto-close --title=\"Scaling\" \\ + --text=\"Scaling images, please wait\""); +PROGRESS->autoflush(1); + +my $i=1; +my $SetDirDate = 0; +foreach my $arg (@args) { + if (-d $arg) { # argument is a directory, skip it + $progress += ($increment * $NumOfIncrements); + print PROGRESS "$progress\n"; + next; + } + my $FileType = `file "$arg"`; + unless ($FileType =~ /image data/i) { # check for valid file type + # maybe check for JPEG and PNG explicitly? + #print $FileType; + $progress += ($increment * $NumOfIncrements); + print PROGRESS "$progress\n"; + next; + } + if ($SetDirDate == 0) { # we are looking at the first image + $SetDirDate = (stat $arg)[9]; # get mtime + if ($SetDirDate > 0) { + # (can also return -1 if strange mtime, don't use this + # time stamp then) + # set mtime of gallery directory to the one of the first + # image file: + $reply .= `touch -r "$arg" $dir`; + print "Setting mtime of $dir to $SetDirDate\n"; + } else { + # give it another try the next time around: + $SetDirDate = 0; + } + } + # thumbnails + $reply .= `$scaler -geometry 120x120 -quality 60 "$arg" $dir/thumbs/img-$i\.jpg 2>&1`; + $progress += $increment; + print PROGRESS "$progress\n"; + # LQ size + $reply .= `$scaler -geometry 640x480 -quality 75 "$arg" $dir/lq/img-$i\.jpg 2>&1`; + $progress += $increment; + print PROGRESS "$progress\n"; + # MQ size + $reply .= `$scaler -geometry 800x600 -quality 75 "$arg" $dir/mq/img-$i\.jpg 2>&1`; + $progress += $increment; + print PROGRESS "$progress\n"; + # HQ size (just copy the original) + $reply .= `cp "$arg" $dir/hq/img-$i\.jpg 2>&1`; + $progress += $increment; + print PROGRESS "$progress\n"; + # comment + open(COMM, ">$dir/comments/$i\.txt"); + print(COMM "image $i\n"); + close(COMM); + $progress += $increment; + print PROGRESS "$progress\n"; + $i++; + + # an error occurred: + if ($reply ne "") { + print PROGRESS "100\n"; + close(PROGRESS); + exec("zenity --error --title \"Giving Up\" --text \"Fatal Error\n\n$reply\""); + die("Error while scaling"); + } +} +print PROGRESS "100\n"; +close(PROGRESS); + +# ------------------------------------------------------------------------ +open(PROGRESS, "| zenity --progress --pulsate --auto-close \\ +--title \"Compressing\" --text \"Zipping images\""); +PROGRESS->autoflush(1); +print PROGRESS "1"; +system("zip -R $dir/zip/mq.zip $dir/mq/*.jpg"); +system("zip -R $dir/zip/hq.zip $dir/hq/*.jpg"); +print PROGRESS "100\n"; +close(PROGRESS); diff --git a/convert/webgallery.pl b/convert/webgallery.pl new file mode 100755 index 0000000..d8a7ce7 --- /dev/null +++ b/convert/webgallery.pl @@ -0,0 +1,154 @@ +#!/usr/bin/perl -w +# +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# # +# Web Gallery script for Nautilus - Depends on "original" web backend # +# for displaying the gallery. # +# # +# Written in perl because I suck more with sh scripting. # +# Also needs gnome-utils for gdialog. # +# # +# Hacked together by Tuomas Kuosmanen # +# Tweaked to use NetPBM by Jakub Steiner # +# Released under the GPL license. # +# # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +die "No files to convert" unless @ARGV; + +use Gtk; +init Gtk; + +@files = sort(@ARGV); + +my $dir = "web-gallery"; + +sub make_dirs { + + unless (-d "$dir") { + mkdir("./$dir") or die "Aargh.\n"; + } + unless (-d "$dir/thumbs") { + mkdir("./$dir/thumbs") or die "Aargh.\n"; + } + unless (-d "$dir/lq") { + mkdir("./$dir/lq") or die "Aargh.\n"; + } + unless (-d "$dir/mq") { + mkdir("./$dir/mq") or die "Aargh.\n"; + } + unless (-d "$dir/hq") { + mkdir("./$dir/hq") or die "Aargh.\n"; + } + unless (-d "$dir/comments") { + mkdir("./$dir/comments") or die "Aargh.\n"; + } +} + +sub make_gallery_fake { + my $foo = shift; + print ("PARAM: $foo\n"); + sleep 1; +} + + +$w = new Gtk::Window; +$label = new Gtk::Label(' Web Gallery generation in progress... '); +$pbar = new Gtk::ProgressBar; +$vb = new Gtk::VBox(0, 0); +$b = new Gtk::Button('Cancel'); +$w->add($vb); +$vb->add($label); +$vb->add($pbar); +$vb->add($b); + +$b->signal_connect('clicked', sub {Gtk->exit(0)}); +$w->signal_connect('destroy', sub {Gtk->exit(0)}); + +$w->show_all(); +$i = 0; +$pbar->update($i); + +@files = sort(@ARGV); +$num_of_files = scalar @files; +$increment = 1 / ( 5 * $num_of_files ); +$i = 1; +$progress = 0; + +make_dirs(); +#read nautilus metafile if available +open(METAXML, "./.nautilus-metafile.xml") or print("no metafile"); +@meta_xml = ; +close(METAXML); + + +foreach $file (@files) { + + $pbar->update($progress); + $pbar->set_show_text(1); + $pbar->set_format_string("$i of $num_of_files"); + $progress += $increment; + while (Gtk->events_pending) { + Gtk->main_iteration; + } + + # do the stuff, collect error messages to a variable. + #$reply=`convert -geometry 120x120 -colors 64 -dither $file $dir/thumbs/img-$i\.png 2>&1`; + $reply=`convert -geometry 120x120 $file $dir/thumbs/img-$i\.jpg 2>&1`; + #$reply =`jpegtopnm $file | pnmscale -xysize 120 120 | ppmquant -floyd 16 | pnmtopng -interlace -compression 9 > $dir/thumbs/img-$i\.png 2>&1`; + + $pbar->update($progress); + $progress += $increment; + while (Gtk->events_pending) { + Gtk->main_iteration; + } + + $reply = $reply . `convert -geometry 640x640 $file $dir/lq/img-$i.jpg 2>&1`; + #$reply = $reply . `jpegtopnm $file | pnmscale -xysize 640 640 | ppmtojpeg --quality 80 --progressive > $dir/lq/img-$i.jpg 2>&1`; + + $pbar->update($progress); + $progress += $increment; + while (Gtk->events_pending) { + Gtk->main_iteration; + } + + $reply = $reply . `convert -geometry 800x800 $file $dir/mq/img-$i.jpg 2>&1`; + #$reply = $reply . `jpegtopnm $file | pnmscale -xysize 800 800 | ppmtojpeg --quality 80 --progressive > $dir/mq/img-$i.jpg 2>&1`; + + $pbar->update($progress); + $progress += $increment; + while (Gtk->events_pending) { + Gtk->main_iteration; + } + + $reply = $reply . `cp $file $dir/hq/img-$i.jpg 2>&1`; + + $pbar->update($progress); + $progress += $increment; + while (Gtk->events_pending) { + Gtk->main_iteration; + } + + # comment + open (COMM, ">$dir/comments/$i\.txt"); + print(COMM "image $i: \n"); + #check for comments in the metafile + #maybe using a proper XML parser would make sense in future + foreach $radek (@meta_xml) { + chomp($radek); + if ($radek =~ m/.*name="([^"]*)".*annotation="([^"]*).*"/) { + if ($1 eq $file) { + print(COMM "$2\n"); + } + } + } + close(COMM); + + $i++; + + # print possible error messages + if ($reply ne "") { + print("There was an error message: $reply\n"); + } +} + diff --git a/logo.xcf.bz2 b/logo.xcf.bz2 new file mode 100644 index 0000000..73268eb Binary files /dev/null and b/logo.xcf.bz2 differ diff --git a/www/CVS/Entries b/www/CVS/Entries new file mode 100644 index 0000000..ea6e294 --- /dev/null +++ b/www/CVS/Entries @@ -0,0 +1,11 @@ +/bcg.png/1.1.1.1/Tue Oct 21 06:45:11 2003// +/logo-mini.png/1.1.1.1/Tue Oct 21 06:45:11 2003// +/logo.png/1.1.1.1/Tue Oct 21 06:45:11 2003// +/zip.png/1.1.1.1/Tue Oct 21 06:45:11 2003// +D/inc//// +/left.png/1.1.1.1/Sun Oct 26 21:17:37 2003// +/minus.png/1.1.1.1/Sun Oct 26 21:17:37 2003// +/plus.png/1.1.1.1/Sun Oct 26 21:17:37 2003// +/right.png/1.1.1.1/Sun Oct 26 21:17:37 2003// +/top.png/1.1.1.1/Sun Oct 26 21:17:37 2003// +/index.php/1.19/Tue Oct 28 22:38:07 2003// diff --git a/www/CVS/Repository b/www/CVS/Repository new file mode 100644 index 0000000..a516823 --- /dev/null +++ b/www/CVS/Repository @@ -0,0 +1 @@ +original/www diff --git a/www/CVS/Root b/www/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/www/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/www/bcg.png b/www/bcg.png new file mode 100644 index 0000000..d4f7ac8 Binary files /dev/null and b/www/bcg.png differ diff --git a/www/inc/.config.inc.php.swo b/www/inc/.config.inc.php.swo new file mode 100644 index 0000000..9cf5367 Binary files /dev/null and b/www/inc/.config.inc.php.swo differ diff --git a/www/inc/CVS/Entries b/www/inc/CVS/Entries new file mode 100644 index 0000000..6556eb2 --- /dev/null +++ b/www/inc/CVS/Entries @@ -0,0 +1,8 @@ +/.config.inc.php.swo/1.1.1.1/Tue Oct 21 06:45:11 2003// +D/styles//// +/config.inc.php/1.9/Sun Oct 26 21:19:41 2003// +/footer.inc.php/1.2/Sun Oct 26 18:43:36 2003// +/header.inc.php/1.4/Mon Oct 27 11:15:00 2003// +/exif.inc.php/1.4/Mon Oct 27 14:31:36 2003// +/funkce.inc.php/1.6/Wed Oct 29 00:02:55 2003// +/www.class.inc.php/1.7/Tue Oct 28 21:45:27 2003// diff --git a/www/inc/CVS/Repository b/www/inc/CVS/Repository new file mode 100644 index 0000000..ada892b --- /dev/null +++ b/www/inc/CVS/Repository @@ -0,0 +1 @@ +original/www/inc diff --git a/www/inc/CVS/Root b/www/inc/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/www/inc/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/www/inc/config.inc.php b/www/inc/config.inc.php new file mode 100644 index 0000000..5bfb36e --- /dev/null +++ b/www/inc/config.inc.php @@ -0,0 +1,71 @@ +1 is smaller, <1 is bigger + $PNthumbScale = 1; +# =========================================================================== +#colors and backgrounds +# this has been removed in favour of custom CSS stylesheets +# =========================================================================== +#app info + $app["name"] = "Original"; // opensource remote image gallery, + // initialy not as lovely + $app["url"] = "http://jimmac.musichall.cz/original.php3"; + $app["version"] = "0.8-cvs"; +# =========================================================================== +# EXIF metadata app path (helper app for php3 and older php4) +# uncomment the method you want to use if you want EXIF data reported +# --------------------------------------------------------------------------- +## use internal function of PHP 4 (does not seem to work yet): +# $exif_prog = "php4"; +# --------------------------------------------------------------------------- +## use metacam (give absolute path to the binary on the server): +# $exif_prog = "/usr/local/bin/metacam"; +## what EXIF data to show (if unset, all will be shown) +## some example fields for metacam: +# $exif_show = array("Image Capture Date", "Make", "Model", +# "Exposure Program", "Exposure Mode", +# "Focal Length", "Exposure Time", +# "Aperture Value", "ISO Speed Rating", "White Balance", +# "Flash", "Scene Capture Type", +# "Metering Mode", "Max Aperture Value", "Shutter Speed Value" +# ); +# --------------------------------------------------------------------------- +## use jhead (give absolute path to the binary on the server): +# $exif_prog = "/usr/local/bin/jhead"; +## what EXIF data to show (if unset, all will be shown) +## some example fields for jhead: +# $exif_show = array( +# "Date/Time", +# "Camera make", +# "Camera model", +# "Focal length", +# "Exposure time", +# "Aperture Value", +# "ISO equiv.", +# "Exposure", +# ); +# =========================================================================== +## Gallery Directory +# This is a path relative to the directory where original is installed +# eg. it can be "../galleries" to use a galleries dir above the original dir. + $gallery_dir="galleries"; + +#css styles + $themes = array( + "default" => "inc/styles/default/default.css", + "ie" => "inc/styles/ie/ie.css", + "gorilla" => "inc/styles/gorilla/gorilla.css" + ); +?> diff --git a/www/inc/exif.inc.php b/www/inc/exif.inc.php new file mode 100644 index 0000000..be76168 --- /dev/null +++ b/www/inc/exif.inc.php @@ -0,0 +1,139 @@ +\n"; + //co ukazat (podle exif_show + if ($exif_show) { + while(list($k,$v)=each($exif_array)) { + while ($x = current($exif_show)) { + if ($x==$k) { + echo ""; + echo "$k :"; + echo "$v"; + echo "\n"; + } + next($exif_show); + } + } + } else { + //ukaze vsechno + while(list($k,$v)=each($exif_array)) { + echo ""; + echo "$k :"; + echo "$v"; + echo "\n"; + } + } + echo "\n"; + echo ""; + # only show if EXIF header exists + if ($exif_array["Make"]) { + echo ""; + echo "display line\n"; + } + echo "\n"; + echo "\n"; + echo ""; + } else { + // in one line + if ($exif_show) { + while(list($k,$v)=each($exif_array)) { + while ($x = current($exif_show)) { + if ($x==$k) { + echo "$v | "; + } + next($exif_show); + } + } + } else { + while(list($k,$v)=each($exif_array)) { + echo "$v | "; + } + } + # only show if EXIF header exists + if ($exif_array["Make"]) { + echo ""; + echo "display table\n"; + echo "

\n"; + } + } + +} else { + // the old code, handles e.g. metacam and jhead as EXIF extractors + // loading lq means it won't work if the convertor doesn't copy EXIF data + // (newer ImageMagick can) + exec("$exif_prog \"$gallery_dir/$galerie/lq/img-$snimek.jpg\"", $exif_data, $exif_status); + if ($exif_status!="2") { + if ($exif_style=="descriptive") { + // fancy table look + echo "\n"; + while ($x = current($exif_data)) { + eregi("^ *([^:]*): *(.*)", $x, $y); + //filter according to $exif_show array + if (!$exif_show) { //all fields shown + echo ""; + echo ""; + echo ""; + echo "\n"; + } else { + reset($exif_show); + while ($z = current($exif_show)) { + //echo ".$z. ::: .$y[1].
"; + if (trim($z) == trim($y[1])) { + echo ""; + echo ""; + echo ""; + echo "\n"; + } + next($exif_show); + } + } + next($exif_data); + } + echo "\n"; + echo ""; + # only show if EXIF header exists + if ($y[1]!="File") { // don't show when no EXIF + echo "\n"; + } + echo "\n"; + echo "
$y[1] :$y[2]
$y[1] :$y[2]
"; + echo "display line
\n"; + } else { + //simple plaintext look + echo "

"; + while ($x = current($exif_data)) { + eregi("^ *([^:]*): *(.*)", $x, $y); + if (!$exif_show) { //all fields shown + echo "$y[2] |"; + } else { + reset($exif_show); + while ($z = current($exif_show)) { + if (trim($z) == trim($y[1])) { + echo "$y[2] | "; + } + next($exif_show); + } + } + next($exif_data); + } + # only show if EXIF header exists + if ($y[1]!="File") { + echo ""; + echo "display table\n"; + echo "

\n"; + } + } + } +} +?> diff --git a/www/inc/footer.inc.php b/www/inc/footer.inc.php new file mode 100644 index 0000000..7143fd5 --- /dev/null +++ b/www/inc/footer.inc.php @@ -0,0 +1,27 @@ +\n"; +echo ""; +echo "\"Valid"; +echo "\n"; + +echo ""; +echo "\"Valid"; +echo "\n"; +*/ + +echo "\n\n
"; +echo "Generated by\n "; +echo ""; +echo $app["name"]; +echo ""; +echo " ver. " . $app["version"]; +echo "\n"; +echo "
\n"; +?> diff --git a/www/inc/funkce.inc.php b/www/inc/funkce.inc.php new file mode 100644 index 0000000..2a1e8cc --- /dev/null +++ b/www/inc/funkce.inc.php @@ -0,0 +1,96 @@ +\n"; + echo "
\n"; + if ($snapshot > 1) { //previous + echo ""; + echo "< previous\n"; + } + echo " "; + if (is_file("$gallery_dir/$gallery/lq/img-$next.jpg")) { //next + echo ""; + echo "next >\n"; + } + echo "
\n\n"; + } elseif ($image=="prev") { //previous thumbnail + if ($snapshot > 1) { //previous + echo "\n"; + } + } else { //next thumbnail + if (is_file("$gallery_dir/$gallery/lq/img-$next.jpg")) { + echo "\n"; + } + } + +} + +function check($file) { + global $gallery_dir, $page; + +# if (eregi("[^0-9a-z\_\-\ ]",$file) || !file_exists("$gallery_dir/$file")) { +# if (eregi("CVS",$file) || !file_exists("$gallery_dir/$file")) { + if (!file_exists("$gallery_dir/$file")) { + echo "funkce.inc.php/check(): Bad input"; + $page->footer(); + exit; + } +} + +function browserCheck() { + global $HTTP_USER_AGENT; + + if (eregi("(MSIE.[456789]).*Mac.*",$HTTP_USER_AGENT)) { + return("macie4+"); + } elseif (eregi("(MSIE.[678])",$HTTP_USER_AGENT)) { + return("ie6+"); + } elseif (eregi("(MSIE.[45])",$HTTP_USER_AGENT)) { + return("ie4+"); + } elseif (eregi("Opera",$HTTP_USER_AGENT)) { + return("opera"); + } elseif (eregi("(Mozilla.4)",$HTTP_USER_AGENT)) { + return("netscape4"); + } elseif (eregi("(Mozilla.[5-9])",$HTTP_USER_AGENT)) { + return("mozilla"); + } elseif (eregi("KMeleon",$HTTP_USER_AGENT)) { + return("mozilla"); + } else { + return("Netscape3"); + } +} + +?> diff --git a/www/inc/header.inc.php b/www/inc/header.inc.php new file mode 100644 index 0000000..3242c1c --- /dev/null +++ b/www/inc/header.inc.php @@ -0,0 +1,14 @@ +
+[ style: + $url) { + echo ""; + echo "$skin \n"; +} +?> +] +
+Photo Gallery\n\n"; +?> diff --git a/www/inc/javascript-eek.inc.php b/www/inc/javascript-eek.inc.php new file mode 100644 index 0000000..3672c8c --- /dev/null +++ b/www/inc/javascript-eek.inc.php @@ -0,0 +1,112 @@ + diff --git a/www/inc/javascript.inc.php b/www/inc/javascript.inc.php new file mode 100644 index 0000000..f2e3deb --- /dev/null +++ b/www/inc/javascript.inc.php @@ -0,0 +1,51 @@ + diff --git a/www/inc/styles/CVS/Entries b/www/inc/styles/CVS/Entries new file mode 100644 index 0000000..138bf3e --- /dev/null +++ b/www/inc/styles/CVS/Entries @@ -0,0 +1,2 @@ +D/gorilla//// +D/default//// diff --git a/www/inc/styles/CVS/Repository b/www/inc/styles/CVS/Repository new file mode 100644 index 0000000..4339a69 --- /dev/null +++ b/www/inc/styles/CVS/Repository @@ -0,0 +1 @@ +original/www/inc/styles diff --git a/www/inc/styles/CVS/Root b/www/inc/styles/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/www/inc/styles/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/www/inc/styles/default/CVS/Entries b/www/inc/styles/default/CVS/Entries new file mode 100644 index 0000000..9eaa230 --- /dev/null +++ b/www/inc/styles/default/CVS/Entries @@ -0,0 +1,12 @@ +/bcg.png/1.1/Tue Oct 21 06:45:11 2003/-kb/ +/default.css/1.1/Wed Oct 29 00:47:30 2003// +/left-16.png/1.1/Tue Apr 8 13:23:53 2003/-kb/ +/left.png/1.1/Wed Apr 23 11:03:22 2003/-kb/ +/logo-mini.png/1.1/Tue Oct 21 06:45:11 2003/-kb/ +/minus.png/1.1/Thu Mar 28 19:34:49 2002/-kb/ +/plus.png/1.1/Thu Mar 28 19:34:49 2002/-kb/ +/right-16.png/1.1/Tue Apr 8 13:24:17 2003/-kb/ +/right.png/1.1/Wed Apr 23 11:04:26 2003/-kb/ +/title.png/1.1/Tue Oct 28 21:54:11 2003/-kb/ +/zip.png/1.1/Fri May 23 12:44:44 2003/-kb/ +D diff --git a/www/inc/styles/default/CVS/Repository b/www/inc/styles/default/CVS/Repository new file mode 100644 index 0000000..ec15a90 --- /dev/null +++ b/www/inc/styles/default/CVS/Repository @@ -0,0 +1 @@ +original/www/inc/styles/default diff --git a/www/inc/styles/default/CVS/Root b/www/inc/styles/default/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/www/inc/styles/default/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/www/inc/styles/default/bcg.png b/www/inc/styles/default/bcg.png new file mode 100644 index 0000000..d4f7ac8 Binary files /dev/null and b/www/inc/styles/default/bcg.png differ diff --git a/www/inc/styles/default/default.css b/www/inc/styles/default/default.css new file mode 100644 index 0000000..482267d --- /dev/null +++ b/www/inc/styles/default/default.css @@ -0,0 +1,285 @@ +/* Default stylesheet + ================== + + stylesheet & artwork + (c) 2003 Jakub 'jimmac' Steiner + +*/ + +body { + background-color: #f6f6f6; + background: url("bcg.png") top left repeat; + /* + margin: 0px 50px 0px 50px; + width: auto; + */ + margin: auto; + width: 770px; + font-family: "Bitstream Vera Sans", sans-serif; + font-size: 10pt; +} + +img { + border: 0px; +} + +a:link { + color: #909090; +} + +a:visited { + color: #808080; +} + +a:hover { + color: #f0f0f0; + background-color: #707070; +} + + +h1.title { + background-color: #a7a9a6; + font-size: 16pt; + color: #808080; + width: 100%; + margin-bottom: 0px; + padding: 5px; + +} + +.title a { + display: block; + position:relative; + width:100%; + height:48px; + margin:0; padding:0; +} + +.title a:hover { + border: 0px; + background-color: #a7a9a6; +} + +.title a span { + /* this overlays text below with an image */ + display: block; + position:absolute; left:0; top:0; z-index:1; + width:338px; height:48px; + margin:0; padding:0; + background-image: url("title.png"); + background-attachment: top left; + background-repeat: no-repeat; +} + +div.thumbroll { + margin: 10px 0px 4px 0px; + min-height: 29px; +} + +p.bigthumbnails { + text-align: center; +} + +p.bigthumbnails a { + padding: 0px; + margin: 0px; + border: 0px; + +} +/* +p.bigthumbnails a:link img { + border: 1px solid white; +} + +p.bigthumbnails a:hover img { + border: 1px solid #909090; + +} +*/ + +a#minus,a#plus { + display: block; + position: relative; + float: left; + width:24px; + height:24px; + margin:0px; padding:0px; +} + +a#minus { + background: url("minus.png") top left no-repeat; +} + +a#plus { + background: url("plus.png") top left no-repeat; +} + +a#zip { + /* display: block; */ + position: relative; + width:16px; + height:16px; + margin:0px; padding:0px; + font-size: 9px; +} + +a#zip span { + background: url("zip.png") top left no-repeat; + position:absolute; left:0; top:0; z-index:1; + width:16px; height:16px; +} + +div.navigation { + background-color: #f6f6f6; + width: 100%; + padding: 5px; + font-size: 10px; +} + +div.navigation a { + color: #a0a0a0; + font-weight: bold; +} + +div.footer { + font-size: 9px; + width: 100%; + margin-top: 40px; + padding: 5px 5px 20px 5px; + clear: both; + border-top: 1px dotted #909090; +} + +div.year { + font-size: 11pt; + float: left; + margin: 10px; +} + +div.month { + margin: 0px 0px 0px 2em; + padding: 2px; +} + +div.month h4 { + margin: 0px 0px 3px 0px; +} + +/* ul won't work on safari with float: left */ +div.month p { + margin: 2px; + padding: 0px 0px 0px 6px; + list-style: none; + font-size: 10px; +} + +div#image { + /* width: 800px; */ + display: block; + position: relative; + clear: both; + margin-left: auto; + margin-right: auto; + /* border: 1px solid black; */ + min-height: 480px; /* only works in gecko :/ */ +} + +img#preview { + position: relative; + float: left; + margin-right: 8px; +} + +div.comment { + margin: 2em 0px; + color: #808080; + font-size: 9px; +} + +div.comment span { + color: black; + font-weight: bold; + font-size: 10px; +} + +div.navbuttons { + position: absolute; + top: 580px; left: 50%; + margin-left: 260px; /* 260px to the right of the center of the page */ + width: 64px; height: 32px; + z-index: 1; +} + +div.navbuttonsshell { + position: relative; + width: 100%; + margin: 2px; +} + +div.navbuttonsshell a#previcon { + display: block; + position: absolute; + width: 24px; height: 24px; + margin: 2px; padding: 0; + top: 0px; + left: 0px; + color: #f6f6f6; + font-size: 30px; /* make unreadable */ + text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */ + overflow: hidden; /* hide the oveflow text */ + background: url("left.png") top left no-repeat; /* have a pixmap */ +} + +div.navbuttonsshell a#nexticon { + display: block; + position: absolute; + width: 24px; height: 24px; + margin: 2px 4px 2px auto; padding: 0; + right: 4px; top: 0px; + color: #f6f6f6; + font-size: 30px; /* make unreadable */ + text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */ + overflow: hidden; /* hide the overflow text */ + background: url("right.png") top left no-repeat; /* have a pixmap */ +} + + +div.prevthumb,div.nextthumb { + margin-bottom: 1em; +} + +div.nextthumb a,div.prevthumb a { + text-decoration: none; +} + +div#mqhq { + margin: 2px 2px 4px 0px; + height: 32px; +} + +div#mqhq a { + display: block; + border: 1px solid #909090; + padding: 2px; + font-size: 10px; + background-color: #f6f6f6; + color: black; + float: left; + width: 48px; + text-align: center; + margin: 2px; + -moz-border-radius: 2px; +} + +div#mqhq a:hover { + background-color: #909090; + border: 1px solid black; + color: white; +} + +div.stylenavbar { + position:relative; + font-size: 9px; + margin: 4px 0px; + padding-bottom: 0px; +} diff --git a/www/inc/styles/default/left-16.png b/www/inc/styles/default/left-16.png new file mode 100644 index 0000000..625a1ab Binary files /dev/null and b/www/inc/styles/default/left-16.png differ diff --git a/www/inc/styles/default/left.png b/www/inc/styles/default/left.png new file mode 100644 index 0000000..bd5607c Binary files /dev/null and b/www/inc/styles/default/left.png differ diff --git a/www/inc/styles/default/logo-mini.png b/www/inc/styles/default/logo-mini.png new file mode 100644 index 0000000..8949154 Binary files /dev/null and b/www/inc/styles/default/logo-mini.png differ diff --git a/www/inc/styles/default/minus.png b/www/inc/styles/default/minus.png new file mode 100644 index 0000000..19eaef3 Binary files /dev/null and b/www/inc/styles/default/minus.png differ diff --git a/www/inc/styles/default/plus.png b/www/inc/styles/default/plus.png new file mode 100644 index 0000000..062d005 Binary files /dev/null and b/www/inc/styles/default/plus.png differ diff --git a/www/inc/styles/default/right-16.png b/www/inc/styles/default/right-16.png new file mode 100644 index 0000000..42e783f Binary files /dev/null and b/www/inc/styles/default/right-16.png differ diff --git a/www/inc/styles/default/right.png b/www/inc/styles/default/right.png new file mode 100644 index 0000000..bc5bcc5 Binary files /dev/null and b/www/inc/styles/default/right.png differ diff --git a/www/inc/styles/default/title.png b/www/inc/styles/default/title.png new file mode 100644 index 0000000..8a6ad6b Binary files /dev/null and b/www/inc/styles/default/title.png differ diff --git a/www/inc/styles/default/zip.png b/www/inc/styles/default/zip.png new file mode 100644 index 0000000..0bc44ab Binary files /dev/null and b/www/inc/styles/default/zip.png differ diff --git a/www/inc/styles/gorilla/CVS/Entries b/www/inc/styles/gorilla/CVS/Entries new file mode 100644 index 0000000..ad515e3 --- /dev/null +++ b/www/inc/styles/gorilla/CVS/Entries @@ -0,0 +1,7 @@ +/minus.png/1.1/Tue Oct 21 06:45:11 2003/-kb/ +/plus.png/1.1/Tue Oct 21 06:45:11 2003/-kb/ +/title.png/1.1/Mon Oct 27 11:01:36 2003/-kb/ +/gorilla.css/1.4/Wed Oct 29 00:23:08 2003// +/left.png/1.1/Tue Oct 21 06:45:11 2003/-kb/ +/right.png/1.1/Tue Oct 21 06:45:11 2003/-kb/ +D diff --git a/www/inc/styles/gorilla/CVS/Repository b/www/inc/styles/gorilla/CVS/Repository new file mode 100644 index 0000000..887b74e --- /dev/null +++ b/www/inc/styles/gorilla/CVS/Repository @@ -0,0 +1 @@ +original/www/inc/styles/gorilla diff --git a/www/inc/styles/gorilla/CVS/Root b/www/inc/styles/gorilla/CVS/Root new file mode 100644 index 0000000..16bd216 --- /dev/null +++ b/www/inc/styles/gorilla/CVS/Root @@ -0,0 +1 @@ +:ext:jimmac@cvs.tuxfamily.org:/cvsroot/original diff --git a/www/inc/styles/gorilla/gorilla.css b/www/inc/styles/gorilla/gorilla.css new file mode 100644 index 0000000..9b23168 --- /dev/null +++ b/www/inc/styles/gorilla/gorilla.css @@ -0,0 +1,258 @@ +/* Gorilla stylesheet + ================== + + stylesheet & artwork + (c) 2003 Jakub 'jimmac' Steiner + + bugs/TODO: + + * navbuttons overlap minithubroll if there's many images +*/ + +body { + background-color: #dedfce; + margin: 0px 50px 0px 50px; + width: auto; + /* + margin: auto; + width: 780px; + */ + font-family: "Bitstream Vera Sans", sans-serif; + font-size: 10pt; +} + +img { + border: 0px; +} + +a { +} + +a:hover { +} + +h1.title { + background-color: black; + font-size: 16pt; + color: #808080; + width: 100%; + margin-bottom: 0px; + padding: 5px; + +} + +.title a { + display: block; + position:relative; + width:100%; + height:48px; + margin:0; padding:0; +} + +.title a span { + /* this overlays text below with an image */ + display: block; + position:absolute; left:0; top:0; z-index:1; + width:400px; height:48px; + margin:0; padding:0; + background-image: url("title.png"); + background-attachment: top left; + background-repeat: no-repeat; +} + +div.thumbroll { + position: relative; + margin: 10px 0px 4px 0px; + min-height: 28px; +} + +a#minus,a#plus { + display: block; + position: relative; + float: left; + width:24px; + height:24px; + margin:0px; padding:0px; +} + +a#minus { + background: url("minus.png") top left no-repeat; +} + +a#plus { + background: url("plus.png") top left no-repeat; +} + +.navigation { + background-color: #505050; + width: 100%; + padding: 5px; + font-size: 10px; + clear: both; +} + +.navigation a { + color: #a0a0a0; + font-weight: bold; +} + +div.footer { + font-size: 9px; + background-color: #d9dac9; + width: 100%; + margin-top: 2em; + padding: 5px 5px 20px 5px; + clear: both; +} + +div.year { + font-size: 11pt; + float: left; + margin: 10px; +} + +div.month { + margin: 0px 0px 0px 2em; + padding: 2px; +} + +div.month h4 { + margin: 0px 0px 3px 0px; +} + +/* ul won't work on safari with float: left */ +div.month p { + margin: 2px; + padding: 0px 0px 0px 6px; + list-style: none; + font-size: 10px; +} + +div#image { + position: relative; + display: block; + clear: both; + margin-left: auto; + margin-right: auto; + /* border: 1px solid black; */ + min-height: 480px; /* only works in gecko :/ */ + height: 500px; +} + +img#preview { + position: absolute; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + margin-left: auto; + margin-right: auto; + /* margin-left: -320px; later fixed by javascript; what a kludge this was */ +} + +div.comment { + margin: 2em 0px; + color: #808080; + font-size: 9px; +} + +div.comment span { + color: black; + font-weight: bold; + font-size: 10px; +} + +div.prevthumb,div.nextthumb { + position: absolute; + margin-bottom: 1em; + width: 120px; + height: 140px; +} + +div.prevthub { + top: 0px; + left: 0px; + text-align: right; +} + +div.nextthumb { + margin-left: auto; + right: 0px; + top: 0px; +} + +div.nextthumb a,div.prevthumb a { + text-decoration: none; +} + +div#mqhq a { + display: block; + border: 2px solid black; + padding: 2px; + font-size: 10px; + font-weight: bold; + background-color: #d1940c; + color: black; + float: left; + width: 48px; + text-align: center; + margin: 2px; + +} + +div.navbuttons { + position: absolute; + top: 140px; left: 50%; + margin-left: -50px; + width: 64px; height: 32px; + z-index: 1; +} + +div.navbuttonsshell { + position: relative; + width: 100%; + margin: 2px; +} + +div.navbuttonsshell a#previcon { + display: block; + position: absolute; + width: 24px; height: 24px; + margin: 2px; padding: 0; + top: 0px; + left: 0px; + color: #f6f6f6; + font-size: 30px; /* make unreadable */ + text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */ + overflow: hidden; /* hide the oveflow text */ + background: url("left.png") top left no-repeat; /* have a pixmap */ +} + +div.navbuttonsshell a#nexticon { + display: block; + position: absolute; + width: 24px; height: 24px; + margin: 2px 4px 2px auto; padding: 0; + right: 4px; top: 0px; + color: #f6f6f6; + font-size: 30px; /* make unreadable */ + text-indent: 2em; /* push it off screen, since khtml doesn't do 0px fonts */ + overflow: hidden; /* hide the overflow text */ + background: url("right.png") top left no-repeat; /* have a pixmap */ +} +div#mqhq { + margin: 2px 2px 4px 0px; + height: 32px; +} + +div.stylenavbar { + position:relative; + /* + left: 0px; + right: auto; + top:auto; + bottom:0px; + */ + margin: 2px; + font-size: 9px; +} diff --git a/www/inc/styles/gorilla/left.png b/www/inc/styles/gorilla/left.png new file mode 100644 index 0000000..63d306c Binary files /dev/null and b/www/inc/styles/gorilla/left.png differ diff --git a/www/inc/styles/gorilla/minus.png b/www/inc/styles/gorilla/minus.png new file mode 100644 index 0000000..bc7a830 Binary files /dev/null and b/www/inc/styles/gorilla/minus.png differ diff --git a/www/inc/styles/gorilla/plus.png b/www/inc/styles/gorilla/plus.png new file mode 100644 index 0000000..6b103cd Binary files /dev/null and b/www/inc/styles/gorilla/plus.png differ diff --git a/www/inc/styles/gorilla/right.png b/www/inc/styles/gorilla/right.png new file mode 100644 index 0000000..f998098 Binary files /dev/null and b/www/inc/styles/gorilla/right.png differ diff --git a/www/inc/styles/gorilla/title.png b/www/inc/styles/gorilla/title.png new file mode 100644 index 0000000..275528f Binary files /dev/null and b/www/inc/styles/gorilla/title.png differ diff --git a/www/inc/styles/ie/ie.css b/www/inc/styles/ie/ie.css new file mode 100644 index 0000000..36cd2c4 --- /dev/null +++ b/www/inc/styles/ie/ie.css @@ -0,0 +1,8 @@ +/* IE sucks; this is the only stylesheet doesn't crash it + this is low priority for me; if you want a nice stylesheet for IE + (if such thing can be written), please send a patch to jimmac@ximian.com +*/ + +body { + font-family: Verdana, Sans-Serif; +} diff --git a/www/inc/stylesheet.inc.css b/www/inc/stylesheet.inc.css new file mode 100644 index 0000000..9415271 --- /dev/null +++ b/www/inc/stylesheet.inc.css @@ -0,0 +1,141 @@ + diff --git a/www/inc/www.class.inc.php b/www/inc/www.class.inc.php new file mode 100644 index 0000000..6fa319e --- /dev/null +++ b/www/inc/www.class.inc.php @@ -0,0 +1,210 @@ +bgcolor = $bgcolor; + $this->link = $link; + $this->vlink = $vlink; + $this->alink = $alink; + $this->hover = $hover; + $this->font = $font; + $this->fontsize = $fontsize; + $this->textcol = $textcol; + } + + //// + // !vykpise HTML hlavicku dokumentu + // Ten CSS style jeste neni moc dodelanej + function header($title) { + global $gallery_dir,$root, $snimek, $galerie, $ThisScript, $themes; + + echo "\n"; + + echo "\n"; + echo "\n"; + echo " $title\n"; + # mozilla style links + if ($snimek && $galerie) { + #Top + echo " \n"; + #First + #Prev + $predchozi = $snimek - 1; + $dalsi = $snimek + 1; + if ($snimek > 1) { + echo " \n"; + echo " \n"; + } + #Next + if (is_file("$gallery_dir/$galerie/lq/img-$dalsi.jpg")) { + echo " \n"; + } + #Last + $adr = opendir("$gallery_dir/$galerie/thumbs/"); + $i = -2; + while ($file = readdir($adr)) { + $i++; + } + if ($i!=$snimek) { + echo " \n"; + } + } + + /* check the theme in a cookie */ + $theme = $_COOKIE["theme"]; + if (!$theme) { //we didn't set the cookie yet + if (browserCheck()=="ie6+" || browserCheck()=="ie4+") { + $theme = "ie"; //IE crashes on other themes + } else { + $theme = "default"; + } + } + foreach ($themes as $skin => $url) { + echo "\n"; + } + + require("javascript.inc.php"); + echo "\n\n"; + echo "\n"; + } + + //// + // !zavre html stranku + function footer() { + echo "\n"; + echo "\n"; + } + + //// + // !vypise chybovou hlasku + // $title - nadpis a title HTML stranky + // $message - vlastni chybova hlaska + function error($title, $message) { + $this->header($title); + echo "

$title

\n"; + echo $message; + $this->footer(); + exit; //vysere se na vsechno + } + + + + //// + // !zacatek fomrulare + function form_start($action, $method, $upload) { + echo "
\n"; + echo "\n"; + } + + //// + // !konec formulare + function form_end() { + echo "
\n"; + echo "
\n"; + } + + //// + // !vykresli polozku formulare + // umi text, password, submit, file, hidden, textarea, select + // u textarea je default pocet radku... + function input($type, $name, $value, $popis, $default) { + if ($type!="hidden") { + echo "\n"; + echo "$popis\n"; + echo ""; + } + switch ($type) { + case "checkbox": + echo ""; + break; + case "password": + case "text": + echo ""; + break; + case "file": + echo ""; + break; + case "hidden": + echo "\n"; + break; + case "textarea": + echo ""; + break; + case "select": + echo ""; + break; + case "submit": + echo ""; + break; + } + if ($type!="hidden") { + echo "\n"; + echo "\n"; + } + } + + +} + +# return dirs sorted +class SortDir { + var $items; + + function SortDir($directory) { + $handle=opendir($directory); + while ($file = readdir($handle)) { + if ($file != "." && $file != "..") { + $this->items[]=$file; + } + } + closedir($handle); + natsort($this->items); + } + + function Read() { + $getback= (pos($this->items)); + next($this->items); + return $getback; + } +} + +?> diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..0ef7bc8 --- /dev/null +++ b/www/index.php @@ -0,0 +1,284 @@ +header("Photos"); +require("inc/header.inc.php"); + +// folder > tree +echo "
Photo Gallery Index"; + +######################################### +# Overall Gallery Index # +######################################### +if (!$galerie) { + # finish off navigation bar + echo "
\n\n"; + /* + - nacti adresare + - setrid podle casu + - pro kazdy rok + - setrid podle mesice + - vypis + */ +# TODO: Make date file support date of the month +# And add info to README about date files + while ($file = $adr->Read()) { + // checking for inc is only really needed when gallery_dir == $root + // hopefully not many galleries will be named inc ;) + if (is_dir("$gallery_dir/$file") && !ereg("\.", $file) && $file!="inc") { + // Use date file for gallery date if avaliable + $datefile = "$root/$gallery_dir/$file/date.txt"; + if (file_exists($datefile)) { + $date_array = file($datefile); + $year=trim($date_array[2]); + $month=trim($date_array[1]); + $galerieyear["$file"]=$year; + $galeriemonth["$file"]=$month; + } else { // Get Dates from modification times + $mtime = filemtime("$gallery_dir/$file"); + $galerieyear["$file"] = date("Y", $mtime); + $galeriemonth["$file"] = date("F", $mtime); + } + } + } + + // re-sort array in order of months - so that they will be printed in order + $months = array("December", "November", "October", "September", "August", "July", "June", "May", "April", "March", "February", "January"); + for ($i = 2010; $i >= 1990; $i--) { + foreach ($months as $thismonth) { + foreach ($galeriemonth as $foldername => $month) { + if (strcasecmp($month, $thismonth) == 0) { + if ($galerieyear["$foldername"] == $i) { + $galerieyearordered["$foldername"]=$galerieyear["$foldername"]; + $galeriemonthordered["$foldername"]=$galeriemonth["$foldername"]; + } + } + } + } + } + + foreach ($galerieyearordered as $file => $mtime) { + $year=$galerieyearordered["$file"]; + $month=$galeriemonthordered["$file"]; + if ($thisyear!=$year) { #if the year is not equal to the current year + #This is the first year + if ($thisyear) { echo " \n\n";}// end last year if this is + // not the first one + #This is a new year + unset($thismonth); + echo "

$year

\n"; + echo ""; + } + # now months + if ($thismonth!=$month) { + #first one + if ($thismonth) { echo "
\n"; } // end of last month if + // this is not the first one + #new month + echo "

$month

\n"; + } + + echo "

$file

\n"; + $thisyear=$year; + $thismonth=$month; + } + echo "
\n\n\n"; + +############################## +# Individual Gallery Index # +############################## +} elseif (!$snimek) { + # finish off navigation header + echo "\n > $galerie\n\n

\n"; + //thumbnails + $path = "$gallery_dir/$galerie/thumbs"; + $obrazky = new SortDir($path); + check($galerie); // check for nasty input + while ($file = $obrazky->read()) { + if (is_file("$path/$file") && eregi("^img-([0-9]+)\.(png|jpg)", $file, $x)) { + $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}"; + $velikost = getimagesize("$root/$thumb"); + echo " "; + echo "90) { + echo $velikost[3]; + } else { + echo "width=\""; + $scaled = round($velikost[0] / 1.5); + echo $scaled; + echo "\" height=\"${velikost[0]}\""; + } + } + echo " src=\"$thumb\" "; + echo "alt=\"photo No. ${x[1]}\" />"; + echo "\n"; + } + } + echo "

\n"; + //and links to archived images: + echo "\n

\n"; + if (file_exists("$gallery_dir/$galerie/zip/mq.zip")) { + echo "[ zipped MQ images ] "; + } + if (file_exists("$gallery_dir/$galerie/zip/mq.tar.bz2")) { + echo "[ MQ images tarball ] "; + } + if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) { + echo "[ zipped HQ images ]"; + } + if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) { + echo "[ HQ images tarball ]"; + } + echo "

"; + +################################# +# Individual Image # +################################# +} else { //low-res image + # finish off header + echo "\n > $galerie\n > Photo"; + echo " $snimek"; + $path = "$gallery_dir/$galerie/thumbs"; + $obrazky = new SortDir("$path"); + check($galerie); + $path = "$gallery_dir/$galerie/lq"; + $file = "$path/img-$snimek.jpg"; + if (!file_exists($file)) { + echo "No such image"; + $page->footer(); + exit; + } + $velikost = getimagesize("$root/$file"); + /* + navigation($galerie, $snimek, null); + */ + + // mini thumbnail roll + + if ($show_thumbs) { + echo "\n\n
"; + echo ""; + echo "\n"; + echo " : \n"; + while ($thumbfile = $obrazky->read()) { + if ( eregi("^img-([0-9]+)\.(png|jpg)", + $thumbfile, $x)) { + $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}"; + echo " "; + echo ""; + echo " \n"; + } + } + if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) { + echo ""; + echo "zip"; + } + if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) { + echo ""; + echo "zip"; + } + echo "
\n"; + } else { + // show the popup button + echo "\n\n
"; + echo ""; + echo "\n"; + echo "
\n"; + } + + /* main image + thumbnail navigation (prev/next) */ + + $divheight = $velikost[1] + 10; + echo "
\n"; // extra kludge + // because of tall + // images + + echo "\"$snimek\"\n"; + navigation($galerie, $snimek, "prev"); + navigation($galerie, $snimek, "next"); + echo "
\n"; //image + + + if ($exif_prog) require("$root/inc/exif.inc.php"); // FIXME: prettify + $comment = "$root/$gallery_dir/$galerie/comments/$snimek.txt"; + if (file_exists($comment)) { + $cmnt_array = file($comment); + while ($x = current($cmnt_array)) { + eregi("^ *(.*) *", $x, $y); + $cmnt .= $y[1]; + next($cmnt_array); + } + /* php4 only + foreach ($cmnt_array as $x) { + $cmnt .= $x; + } + */ + echo "
$cmnt
"; + } + echo "
"; + if (file_exists("$gallery_dir/$galerie/mq/img-$snimek.jpg")) { + echo "MQ "; + } + if (file_exists("$gallery_dir/$galerie/hq/img-$snimek.jpg")) { + echo "HQ"; + } + echo "
\n"; //mqhq + + navigation($galerie, $snimek, null); +} + +require("inc/footer.inc.php"); +$page->footer(); +?> diff --git a/www/left.png b/www/left.png new file mode 100644 index 0000000..63d306c Binary files /dev/null and b/www/left.png differ diff --git a/www/logo-mini.png b/www/logo-mini.png new file mode 100644 index 0000000..8949154 Binary files /dev/null and b/www/logo-mini.png differ diff --git a/www/logo.png b/www/logo.png new file mode 100644 index 0000000..24878c3 Binary files /dev/null and b/www/logo.png differ diff --git a/www/minus.png b/www/minus.png new file mode 100644 index 0000000..bc7a830 Binary files /dev/null and b/www/minus.png differ diff --git a/www/plus.png b/www/plus.png new file mode 100644 index 0000000..6b103cd Binary files /dev/null and b/www/plus.png differ diff --git a/www/right.png b/www/right.png new file mode 100644 index 0000000..f998098 Binary files /dev/null and b/www/right.png differ diff --git a/www/top.png b/www/top.png new file mode 100644 index 0000000..8cc26b4 Binary files /dev/null and b/www/top.png differ diff --git a/www/zip.png b/www/zip.png new file mode 100644 index 0000000..b52d1d7 Binary files /dev/null and b/www/zip.png differ -- cgit v1.2.3